@leonardaustin/ui 0.1.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,34 +1,34 @@
1
1
  import { Component as e, Fragment as t, createContext as n, forwardRef as r, useCallback as i, useContext as a, useEffect as o, useId as s, useLayoutEffect as c, useMemo as l, useRef as u, useState as d } from "react";
2
2
  import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
3
- import { Accessibility as h, AlertTriangle as g, ArrowDown as _, ArrowLeft as v, ArrowUp as y, BookOpen as b, Calendar as x, Check as S, CheckCircle2 as C, ChevronDown as w, ChevronLeft as T, ChevronRight as E, ChevronsUpDown as D, Columns3 as O, Eye as k, EyeOff as A, Inbox as ee, Info as j, Loader2 as te, LogOut as ne, Menu as re, Minus as ie, Monitor as ae, Moon as oe, Palette as se, PanelLeft as ce, PanelLeftDashed as le, Search as M, Settings as ue, Sun as de, UploadCloud as fe, X as N, XCircle as pe, Zap as me } from "lucide-react";
4
- import { createPortal as P } from "react-dom";
3
+ import { Accessibility as h, AlertTriangle as g, ArrowDown as _, ArrowLeft as v, ArrowUp as y, BookOpen as b, Calendar as x, Check as S, CheckCircle2 as C, ChevronDown as w, ChevronLeft as T, ChevronRight as E, ChevronsUpDown as D, Columns3 as O, Eye as k, EyeOff as A, Inbox as j, Info as M, Loader2 as ee, LogOut as te, Menu as ne, Minus as re, Monitor as N, Moon as P, Palette as ie, PanelLeft as ae, PanelLeftDashed as oe, Search as se, Settings as ce, Sun as le, UploadCloud as ue, X as F, XCircle as de, Zap as fe } from "lucide-react";
4
+ import { createPortal as I } from "react-dom";
5
5
  //#region src/components/charts/AreaChart.tsx
6
- var F = {
6
+ var L = {
7
7
  top: 16,
8
8
  right: 12,
9
9
  bottom: 28,
10
10
  left: 48
11
11
  };
12
- function he(e) {
12
+ function pe(e) {
13
13
  return e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).toFixed(1)}k` : String(e);
14
14
  }
15
- function ge({ data: e, height: t = 240 }) {
16
- let n = s(), r = u(null), [i, a] = d(null), o = 600 - F.left - F.right, c = t - F.top - F.bottom, l = Math.min(...e.map((e) => e.value)), h = Math.max(...e.map((e) => e.value)), g = h - l || 1;
15
+ function me({ data: e, height: t = 240 }) {
16
+ let n = s(), r = u(null), [i, a] = d(null), o = 600 - L.left - L.right, c = t - L.top - L.bottom, l = Math.min(...e.map((e) => e.value)), h = Math.max(...e.map((e) => e.value)), g = h - l || 1;
17
17
  function _(t) {
18
- return F.left + t / Math.max(e.length - 1, 1) * o;
18
+ return L.left + t / Math.max(e.length - 1, 1) * o;
19
19
  }
20
20
  function v(e) {
21
- return F.top + c - (e - l) / g * c;
21
+ return L.top + c - (e - l) / g * c;
22
22
  }
23
23
  let y = e.map((e, t) => `${_(t)},${v(e.value)}`).join(" "), b = [
24
- `${_(0)},${F.top + c}`,
24
+ `${_(0)},${L.top + c}`,
25
25
  ...e.map((e, t) => `${_(t)},${v(e.value)}`),
26
- `${_(e.length - 1)},${F.top + c}`
26
+ `${_(e.length - 1)},${L.top + c}`
27
27
  ].join(" "), x = Math.max(1, Math.floor(e.length / 5)), S = e.filter((t, n) => n % x === 0 || n === e.length - 1), C = e.map((e, t) => t).filter((t) => t % x === 0 || t === e.length - 1);
28
28
  function w(t) {
29
29
  let n = r.current;
30
30
  if (!n || e.length === 0) return;
31
- let i = n.getBoundingClientRect(), s = ((t.clientX - i.left) / i.width * 600 - F.left) / o, c = Math.round(s * (e.length - 1)), l = Math.max(0, Math.min(e.length - 1, c));
31
+ let i = n.getBoundingClientRect(), s = ((t.clientX - i.left) / i.width * 600 - L.left) / o, c = Math.round(s * (e.length - 1)), l = Math.max(0, Math.min(e.length - 1, c));
32
32
  a({
33
33
  x: _(l),
34
34
  y: v(e[l].value),
@@ -63,28 +63,28 @@ function ge({ data: e, height: t = 240 }) {
63
63
  })]
64
64
  }) }),
65
65
  /* @__PURE__ */ p("text", {
66
- x: F.left - 8,
67
- y: F.top,
66
+ x: L.left - 8,
67
+ y: L.top,
68
68
  textAnchor: "end",
69
69
  dominantBaseline: "central",
70
70
  fill: "var(--text-tertiary)",
71
71
  fontSize: 10,
72
- children: he(h)
72
+ children: pe(h)
73
73
  }),
74
74
  /* @__PURE__ */ p("text", {
75
- x: F.left - 8,
76
- y: F.top + c,
75
+ x: L.left - 8,
76
+ y: L.top + c,
77
77
  textAnchor: "end",
78
78
  dominantBaseline: "central",
79
79
  fill: "var(--text-tertiary)",
80
80
  fontSize: 10,
81
- children: he(l)
81
+ children: pe(l)
82
82
  }),
83
83
  /* @__PURE__ */ p("line", {
84
- x1: F.left,
85
- y1: F.top + c,
86
- x2: F.left + o,
87
- y2: F.top + c,
84
+ x1: L.left,
85
+ y1: L.top + c,
86
+ x2: L.left + o,
87
+ y2: L.top + c,
88
88
  stroke: "var(--border)",
89
89
  strokeWidth: 1
90
90
  }),
@@ -111,9 +111,9 @@ function ge({ data: e, height: t = 240 }) {
111
111
  i && /* @__PURE__ */ m(f, { children: [
112
112
  /* @__PURE__ */ p("line", {
113
113
  x1: i.x,
114
- y1: F.top,
114
+ y1: L.top,
115
115
  x2: i.x,
116
- y2: F.top + c,
116
+ y2: L.top + c,
117
117
  stroke: "var(--border-strong)",
118
118
  strokeWidth: 1,
119
119
  strokeDasharray: "3 3"
@@ -166,14 +166,14 @@ function ge({ data: e, height: t = 240 }) {
166
166
  }
167
167
  //#endregion
168
168
  //#region src/components/charts/BarChart.tsx
169
- var _e = [
169
+ var he = [
170
170
  1,
171
171
  .85,
172
172
  .7,
173
173
  .55,
174
174
  .45
175
175
  ];
176
- function ve({ data: e, height: t }) {
176
+ function ge({ data: e, height: t }) {
177
177
  let [n, r] = d(null), i = Math.max(...e.map((e) => e.value));
178
178
  return /* @__PURE__ */ p("svg", {
179
179
  width: "100%",
@@ -219,7 +219,7 @@ function ve({ data: e, height: t }) {
219
219
  height: 22,
220
220
  fill: "var(--accent)",
221
221
  rx: 6,
222
- opacity: s ? 1 : _e[t % _e.length],
222
+ opacity: s ? 1 : he[t % he.length],
223
223
  style: { transition: "all 150ms" }
224
224
  }),
225
225
  /* @__PURE__ */ p("text", {
@@ -239,19 +239,19 @@ function ve({ data: e, height: t }) {
239
239
  }
240
240
  //#endregion
241
241
  //#region src/lib/cn.ts
242
- function ye(e) {
242
+ function _e(e) {
243
243
  if (typeof e == "string" || typeof e == "number" || typeof e == "bigint") return String(e);
244
244
  if (!e || typeof e != "object") return "";
245
245
  let t = "";
246
246
  if (Array.isArray(e)) for (let n of e) {
247
247
  if (!n) continue;
248
- let e = ye(n);
248
+ let e = _e(n);
249
249
  e && (t = t ? `${t} ${e}` : e);
250
250
  }
251
251
  else for (let n in e) e[n] && (t = t ? `${t} ${n}` : n);
252
252
  return t;
253
253
  }
254
- var be = new Set([
254
+ var ve = new Set([
255
255
  "block",
256
256
  "contents",
257
257
  "flex",
@@ -261,7 +261,7 @@ var be = new Set([
261
261
  "inline-block",
262
262
  "inline-flex",
263
263
  "table"
264
- ]), xe = new Set([
264
+ ]), ye = new Set([
265
265
  "text-2xl",
266
266
  "text-2xs",
267
267
  "text-2xs-f",
@@ -272,16 +272,16 @@ var be = new Set([
272
272
  "text-sm",
273
273
  "text-xl",
274
274
  "text-xs"
275
- ]), Se = new Set([
275
+ ]), be = new Set([
276
276
  "text-center",
277
277
  "text-left",
278
278
  "text-right"
279
- ]), Ce = new Set(["lowercase", "uppercase"]), we = new Set([
279
+ ]), xe = new Set(["lowercase", "uppercase"]), Se = new Set([
280
280
  "font-bold",
281
281
  "font-medium",
282
282
  "font-normal",
283
283
  "font-semibold"
284
- ]), Te = {
284
+ ]), Ce = {
285
285
  m: [
286
286
  "margin-top",
287
287
  "margin-right",
@@ -306,7 +306,7 @@ var be = new Set([
306
306
  pr: ["padding-right"],
307
307
  pb: ["padding-bottom"],
308
308
  pl: ["padding-left"]
309
- }, Ee = {
309
+ }, we = {
310
310
  inset: [
311
311
  "top",
312
312
  "right",
@@ -321,7 +321,7 @@ var be = new Set([
321
321
  left: ["left"],
322
322
  start: ["inset-inline-start"],
323
323
  end: ["inset-inline-end"]
324
- }, De = {
324
+ }, Te = {
325
325
  border: [
326
326
  "border-top-width",
327
327
  "border-right-width",
@@ -334,7 +334,7 @@ var be = new Set([
334
334
  "border-r": ["border-right-width"],
335
335
  "border-b": ["border-bottom-width"],
336
336
  "border-l": ["border-left-width"]
337
- }, Oe = {
337
+ }, Ee = {
338
338
  border: [
339
339
  "border-top-color",
340
340
  "border-right-color",
@@ -347,7 +347,7 @@ var be = new Set([
347
347
  "border-r": ["border-right-color"],
348
348
  "border-b": ["border-bottom-color"],
349
349
  "border-l": ["border-left-color"]
350
- }, ke = new Set([
350
+ }, De = new Set([
351
351
  "border-dashed",
352
352
  "border-dotted",
353
353
  "border-double",
@@ -355,14 +355,14 @@ var be = new Set([
355
355
  "border-none",
356
356
  "border-solid"
357
357
  ]);
358
- function I(...e) {
359
- return Ae(ye(e));
358
+ function R(...e) {
359
+ return Oe(_e(e));
360
360
  }
361
- function Ae(e) {
361
+ function Oe(e) {
362
362
  let t = [], n = /* @__PURE__ */ new Map();
363
363
  for (let r of e.split(/\s+/)) {
364
364
  if (!r) continue;
365
- let e = je(r);
365
+ let e = ke(r);
366
366
  if (e.size === 0) {
367
367
  let i = n.get(r);
368
368
  i !== void 0 && (t[i] = null), n.set(r, t.length), t.push({
@@ -373,7 +373,7 @@ function Ae(e) {
373
373
  }
374
374
  for (let n = t.length - 1; n >= 0; n--) {
375
375
  let r = t[n];
376
- r && Be(r.keys, e) && (t[n] = null);
376
+ r && Re(r.keys, e) && (t[n] = null);
377
377
  }
378
378
  t.push({
379
379
  token: r,
@@ -382,11 +382,11 @@ function Ae(e) {
382
382
  }
383
383
  return t.filter((e) => !!e).map((e) => e.token).join(" ");
384
384
  }
385
- function je(e) {
386
- let t = Me(e), n = t.pop() ?? e, r = n.startsWith("!"), i = Ne(r ? n.slice(1) : n), a = `${t.join(":")}|${r ? "!" : ""}`, o = Pe(i);
385
+ function ke(e) {
386
+ let t = Ae(e), n = t.pop() ?? e, r = n.startsWith("!"), i = je(r ? n.slice(1) : n), a = `${t.join(":")}|${r ? "!" : ""}`, o = Me(i);
387
387
  return new Set(o.map((e) => `${a}${e}`));
388
388
  }
389
- function Me(e) {
389
+ function Ae(e) {
390
390
  let t = [], n = 0, r = 0;
391
391
  for (let i = 0; i < e.length; i++) {
392
392
  let a = e[i];
@@ -394,57 +394,57 @@ function Me(e) {
394
394
  }
395
395
  return t.push(e.slice(r)), t;
396
396
  }
397
- function Ne(e) {
397
+ function je(e) {
398
398
  return e.startsWith("-") ? e.slice(1) : e;
399
399
  }
400
- function Pe(e) {
401
- let t = Fe(e);
402
- if (t) return [...Te[t]];
403
- let n = Ie(e);
404
- if (n) return [...Ee[n]];
405
- let r = Le(e);
406
- if (r) return [...De[r]];
407
- if (be.has(e)) return ["display"];
400
+ function Me(e) {
401
+ let t = Ne(e);
402
+ if (t) return [...Ce[t]];
403
+ let n = Pe(e);
404
+ if (n) return [...we[n]];
405
+ let r = Fe(e);
406
+ if (r) return [...Te[r]];
407
+ if (ve.has(e)) return ["display"];
408
408
  if (e === "absolute" || e === "fixed" || e === "relative" || e === "static" || e === "sticky") return ["position"];
409
409
  if (e === "visible" || e === "invisible" || e === "collapse") return ["visibility"];
410
410
  if (e === "border-collapse") return ["border-collapse"];
411
- if (ke.has(e)) return ["border-style"];
412
- let i = Re(e);
413
- return i ? [...Oe[i]] : e === "rounded" || e.startsWith("rounded-") ? ["border-radius"] : e.startsWith("bg-") ? ["background"] : xe.has(e) ? ["font-size"] : Se.has(e) ? ["text-align"] : Ce.has(e) ? ["text-transform"] : e.startsWith("text-") ? ["color"] : e === "font-mono" ? ["font-family"] : we.has(e) ? ["font-weight"] : e.startsWith("leading-") ? ["line-height"] : e.startsWith("tracking-") ? ["letter-spacing"] : e.startsWith("w-") ? ["width"] : e.startsWith("min-w-") ? ["min-width"] : e.startsWith("max-w-") ? ["max-width"] : e.startsWith("h-") ? ["height"] : e.startsWith("min-h-") ? ["min-height"] : e.startsWith("max-h-") ? ["max-height"] : e.startsWith("translate-x-") ? ["translate-x"] : e.startsWith("translate-y-") ? ["translate-y"] : e.startsWith("scale-") ? ["scale"] : e.startsWith("rotate-") ? ["rotate"] : e === "transform" ? ["transform"] : e.startsWith("grid-cols-") ? ["grid-template-columns"] : e.startsWith("col-span-") ? ["grid-column"] : e.startsWith("columns-") ? ["columns"] : e === "flex-col" || e === "flex-row" ? ["flex-direction"] : e === "flex-wrap" ? ["flex-wrap"] : e.startsWith("flex-") ? ["flex"] : e === "shrink" || e.startsWith("shrink-") ? ["flex-shrink"] : e === "grow" || e.startsWith("grow-") ? ["flex-grow"] : e.startsWith("items-") ? ["align-items"] : e.startsWith("justify-") ? ["justify-content"] : e.startsWith("gap-") ? ["gap"] : e.startsWith("space-y-") ? ["space-y"] : e.startsWith("overflow-y-") ? ["overflow-y"] : e.startsWith("overflow-x-") ? ["overflow-x"] : e.startsWith("overflow-") ? ["overflow-x", "overflow-y"] : e.startsWith("object-") ? ["object-fit"] : e.startsWith("aspect-") ? ["aspect-ratio"] : e.startsWith("cursor-") ? ["cursor"] : e.startsWith("opacity-") ? ["opacity"] : e.startsWith("shadow-") ? ["box-shadow"] : e === "ring" || /^ring-\d/.test(e) ? ["ring-width"] : e.startsWith("ring-offset-bg-") ? ["ring-offset-color"] : e.startsWith("ring-offset-") ? ["ring-offset-width"] : e.startsWith("ring-") ? ["ring-color"] : e.startsWith("outline-offset-") ? ["outline-offset"] : /^outline-\d/.test(e) ? ["outline-width"] : e === "outline" || e === "outline-none" ? ["outline-style"] : e.startsWith("outline-") ? ["outline-color"] : e.startsWith("transition-") || e === "transition" ? ["transition-property"] : e.startsWith("duration-") ? ["transition-duration"] : e.startsWith("ease-") ? ["transition-timing-function"] : e.startsWith("animate-") ? ["animation"] : e.startsWith("z-") ? ["z-index"] : e.startsWith("whitespace-") ? ["white-space"] : e.startsWith("break-inside-") ? ["break-inside"] : e.startsWith("break-") ? ["word-break"] : e.startsWith("line-clamp-") ? ["line-clamp"] : e === "list-inside" || e === "list-outside" ? ["list-style-position"] : e.startsWith("list-") ? ["list-style-type"] : e.startsWith("resize") ? ["resize"] : e.startsWith("select-") ? ["user-select"] : e.startsWith("pointer-events-") ? ["pointer-events"] : e.startsWith("appearance-") ? ["appearance"] : e.startsWith("accent-") ? ["accent-color"] : [];
411
+ if (De.has(e)) return ["border-style"];
412
+ let i = Ie(e);
413
+ return i ? [...Ee[i]] : e === "rounded" || e.startsWith("rounded-") ? ["border-radius"] : e.startsWith("bg-") ? ["background"] : ye.has(e) ? ["font-size"] : be.has(e) ? ["text-align"] : xe.has(e) ? ["text-transform"] : e.startsWith("text-") ? ["color"] : e === "font-mono" ? ["font-family"] : Se.has(e) ? ["font-weight"] : e.startsWith("leading-") ? ["line-height"] : e.startsWith("tracking-") ? ["letter-spacing"] : e.startsWith("w-") ? ["width"] : e.startsWith("min-w-") ? ["min-width"] : e.startsWith("max-w-") ? ["max-width"] : e.startsWith("h-") ? ["height"] : e.startsWith("min-h-") ? ["min-height"] : e.startsWith("max-h-") ? ["max-height"] : e.startsWith("translate-x-") ? ["translate-x"] : e.startsWith("translate-y-") ? ["translate-y"] : e.startsWith("scale-") ? ["scale"] : e.startsWith("rotate-") ? ["rotate"] : e === "transform" ? ["transform"] : e.startsWith("grid-cols-") ? ["grid-template-columns"] : e.startsWith("col-span-") ? ["grid-column"] : e.startsWith("columns-") ? ["columns"] : e === "flex-col" || e === "flex-row" ? ["flex-direction"] : e === "flex-wrap" ? ["flex-wrap"] : e.startsWith("flex-") ? ["flex"] : e === "shrink" || e.startsWith("shrink-") ? ["flex-shrink"] : e === "grow" || e.startsWith("grow-") ? ["flex-grow"] : e.startsWith("items-") ? ["align-items"] : e.startsWith("justify-") ? ["justify-content"] : e.startsWith("gap-") ? ["gap"] : e.startsWith("space-y-") ? ["space-y"] : e.startsWith("overflow-y-") ? ["overflow-y"] : e.startsWith("overflow-x-") ? ["overflow-x"] : e.startsWith("overflow-") ? ["overflow-x", "overflow-y"] : e.startsWith("object-") ? ["object-fit"] : e.startsWith("aspect-") ? ["aspect-ratio"] : e.startsWith("cursor-") ? ["cursor"] : e.startsWith("opacity-") ? ["opacity"] : e.startsWith("shadow-") ? ["box-shadow"] : e === "ring" || /^ring-\d/.test(e) ? ["ring-width"] : e.startsWith("ring-offset-bg-") ? ["ring-offset-color"] : e.startsWith("ring-offset-") ? ["ring-offset-width"] : e.startsWith("ring-") ? ["ring-color"] : e.startsWith("outline-offset-") ? ["outline-offset"] : /^outline-\d/.test(e) ? ["outline-width"] : e === "outline" || e === "outline-none" ? ["outline-style"] : e.startsWith("outline-") ? ["outline-color"] : e.startsWith("transition-") || e === "transition" ? ["transition-property"] : e.startsWith("duration-") ? ["transition-duration"] : e.startsWith("ease-") ? ["transition-timing-function"] : e.startsWith("animate-") ? ["animation"] : e.startsWith("z-") ? ["z-index"] : e.startsWith("whitespace-") ? ["white-space"] : e.startsWith("break-inside-") ? ["break-inside"] : e.startsWith("break-") ? ["word-break"] : e.startsWith("line-clamp-") ? ["line-clamp"] : e === "list-inside" || e === "list-outside" ? ["list-style-position"] : e.startsWith("list-") ? ["list-style-type"] : e.startsWith("resize") ? ["resize"] : e.startsWith("select-") ? ["user-select"] : e.startsWith("pointer-events-") ? ["pointer-events"] : e.startsWith("appearance-") ? ["appearance"] : e.startsWith("accent-") ? ["accent-color"] : [];
414
414
  }
415
- function Fe(e) {
416
- return ze(e, Te);
415
+ function Ne(e) {
416
+ return Le(e, Ce);
417
417
  }
418
- function Ie(e) {
419
- return ze(e, Ee);
418
+ function Pe(e) {
419
+ return Le(e, we);
420
420
  }
421
- function Le(e) {
421
+ function Fe(e) {
422
422
  return e === "border" ? "border" : e.match(/^(border(?:-[xytrbl])?)(?=$|-(?:0|2|4|8|\[))/)?.[1];
423
423
  }
424
- function Re(e) {
424
+ function Ie(e) {
425
425
  let t = e.match(/^(border-[xytrbl])-./);
426
426
  return t ? t[1] : e.startsWith("border-") ? "border" : void 0;
427
427
  }
428
- function ze(e, t) {
428
+ function Le(e, t) {
429
429
  return Object.keys(t).sort((e, t) => String(t).length - String(e).length).find((t) => {
430
430
  let n = String(t);
431
431
  return e === n || e.startsWith(`${n}-`);
432
432
  });
433
433
  }
434
- function Be(e, t) {
434
+ function Re(e, t) {
435
435
  for (let n of e) if (!t.has(n)) return !1;
436
436
  return !0;
437
437
  }
438
438
  //#endregion
439
439
  //#region src/components/charts/DonutChart.tsx
440
- var Ve = {
440
+ var ze = {
441
441
  "text-blue": "var(--blue)",
442
442
  "text-green": "var(--green)",
443
443
  "text-purple": "var(--purple)",
444
444
  "text-yellow": "var(--yellow)",
445
445
  "text-red": "var(--red)"
446
446
  };
447
- function He(e, t) {
447
+ function Be(e, t) {
448
448
  let n = e.reduce((e, t) => e + t.value, 0), r = 0;
449
449
  return e.map((e) => {
450
450
  let i = n > 0 ? e.value / n * t : 0, a = t - i, o = r / t * 360 - 90, s = o + i / t * 180, c = n > 0 ? e.value / n * 100 : 0;
@@ -458,8 +458,8 @@ function He(e, t) {
458
458
  };
459
459
  });
460
460
  }
461
- function Ue({ segments: e, size: t = 180 }) {
462
- let [n, r] = d(null), i = e.reduce((e, t) => e + t.value, 0), a = (t - 28) / 2, o = He(e, 2 * Math.PI * a), s = t + 12, c = s / 2;
461
+ function Ve({ segments: e, size: t = 180 }) {
462
+ let [n, r] = d(null), i = e.reduce((e, t) => e + t.value, 0), a = (t - 28) / 2, o = Be(e, 2 * Math.PI * a), s = t + 12, c = s / 2;
463
463
  return /* @__PURE__ */ m("div", {
464
464
  className: "flex flex-col items-center gap-4",
465
465
  children: [/* @__PURE__ */ m("div", {
@@ -491,7 +491,7 @@ function Ue({ segments: e, size: t = 180 }) {
491
491
  cy: c,
492
492
  r: a,
493
493
  fill: "none",
494
- stroke: Ve[e.segment.color] ?? "var(--accent)",
494
+ stroke: ze[e.segment.color] ?? "var(--accent)",
495
495
  strokeWidth: r ? 32 : 28,
496
496
  strokeDasharray: `${e.segmentLength} ${e.dashOffset}`,
497
497
  strokeLinecap: "butt",
@@ -524,7 +524,7 @@ function Ue({ segments: e, size: t = 180 }) {
524
524
  })
525
525
  ]
526
526
  }), n !== null && (() => {
527
- let e = o[n], t = e.midAngle * Math.PI / 180, r = a + 28 / 2 + 20, i = c + Math.cos(t) * r, s = c + Math.sin(t) * r, l = Ve[e.segment.color] ?? "var(--accent)";
527
+ let e = o[n], t = e.midAngle * Math.PI / 180, r = a + 28 / 2 + 20, i = c + Math.cos(t) * r, s = c + Math.sin(t) * r, l = ze[e.segment.color] ?? "var(--accent)";
528
528
  return /* @__PURE__ */ p("div", {
529
529
  className: "bg-bg-tertiary border-border pointer-events-none absolute z-10 rounded-md border px-2.5 py-1.5 shadow-lg",
530
530
  style: {
@@ -565,11 +565,11 @@ function Ue({ segments: e, size: t = 180 }) {
565
565
  type: "button",
566
566
  onMouseEnter: () => r(t),
567
567
  onMouseLeave: () => r(null),
568
- className: I("flex cursor-pointer items-center gap-1.5 transition-opacity duration-[100ms]", n !== null && n !== t && "opacity-50"),
568
+ className: R("flex cursor-pointer items-center gap-1.5 transition-opacity duration-[100ms]", n !== null && n !== t && "opacity-50"),
569
569
  children: [
570
570
  /* @__PURE__ */ p("span", {
571
571
  className: "h-2 w-2 rounded-full",
572
- style: { backgroundColor: Ve[e.color] ?? "var(--accent)" }
572
+ style: { backgroundColor: ze[e.color] ?? "var(--accent)" }
573
573
  }),
574
574
  /* @__PURE__ */ p("span", {
575
575
  className: "text-text-secondary text-xs",
@@ -586,8 +586,8 @@ function Ue({ segments: e, size: t = 180 }) {
586
586
  }
587
587
  //#endregion
588
588
  //#region src/components/charts/RadarChart.tsx
589
- var We = 4;
590
- function Ge({ data: e, maxValue: t, size: n = 240 }) {
589
+ var He = 4;
590
+ function Ue({ data: e, maxValue: t, size: n = 240 }) {
591
591
  let [r, i] = d(null), a = t ?? Math.max(...e.map((e) => e.value)), o = n / 2, s = (n - 60) / 2, c = 2 * Math.PI / e.length;
592
592
  function l(e, t) {
593
593
  return [o + t * Math.cos(e - Math.PI / 2), o + t * Math.sin(e - Math.PI / 2)];
@@ -604,8 +604,8 @@ function Ge({ data: e, maxValue: t, size: n = 240 }) {
604
604
  viewBox: `0 0 ${n} ${n}`,
605
605
  className: "select-none",
606
606
  children: [
607
- Array.from({ length: We }, (t, n) => {
608
- let r = (n + 1) / We * s;
607
+ Array.from({ length: He }, (t, n) => {
608
+ let r = (n + 1) / He * s;
609
609
  return /* @__PURE__ */ p("polygon", {
610
610
  points: e.map((e, t) => l(t * c, r)).map((e) => `${e[0]},${e[1]}`).join(" "),
611
611
  fill: "none",
@@ -682,7 +682,7 @@ function Ge({ data: e, maxValue: t, size: n = 240 }) {
682
682
  children: [
683
683
  /* @__PURE__ */ p("span", { className: "bg-accent h-2 w-2 shrink-0 rounded-full" }),
684
684
  /* @__PURE__ */ p("span", {
685
- className: I("text-text-secondary text-xs whitespace-nowrap"),
685
+ className: R("text-text-secondary text-xs whitespace-nowrap"),
686
686
  children: e[r].label
687
687
  }),
688
688
  /* @__PURE__ */ p("span", {
@@ -696,7 +696,7 @@ function Ge({ data: e, maxValue: t, size: n = 240 }) {
696
696
  }
697
697
  //#endregion
698
698
  //#region src/components/charts/RadialBarChart.tsx
699
- var Ke = {
699
+ var We = {
700
700
  "text-blue": "var(--blue)",
701
701
  "text-green": "var(--green)",
702
702
  "text-purple": "var(--purple)",
@@ -704,7 +704,7 @@ var Ke = {
704
704
  "text-red": "var(--red)",
705
705
  "text-accent": "var(--accent)"
706
706
  };
707
- function qe({ segments: e, size: t = 200 }) {
707
+ function Ge({ segments: e, size: t = 200 }) {
708
708
  let [n, r] = d(null), [i, a] = d({
709
709
  x: 0,
710
710
  y: 0
@@ -730,7 +730,7 @@ function qe({ segments: e, size: t = 200 }) {
730
730
  children: [e.map((e, t) => {
731
731
  let i = c - t * 20;
732
732
  if (i <= 0) return null;
733
- let a = 2 * Math.PI * i, o = a * Math.min(e.value / e.max, 1), l = a - o, u = Ke[e.color] ?? "var(--accent)", d = n === t;
733
+ let a = 2 * Math.PI * i, o = a * Math.min(e.value / e.max, 1), l = a - o, u = We[e.color] ?? "var(--accent)", d = n === t;
734
734
  return /* @__PURE__ */ m("g", {
735
735
  onMouseEnter: () => r(t),
736
736
  onMouseLeave: () => r(null),
@@ -771,7 +771,7 @@ function qe({ segments: e, size: t = 200 }) {
771
771
  });
772
772
  })()]
773
773
  }), n !== null && (() => {
774
- let t = e[n], r = Math.round(t.value / t.max * 100), a = Ke[t.color] ?? "var(--accent)";
774
+ let t = e[n], r = Math.round(t.value / t.max * 100), a = We[t.color] ?? "var(--accent)";
775
775
  return /* @__PURE__ */ p("div", {
776
776
  className: "bg-bg-tertiary border-border pointer-events-none absolute z-10 rounded-md border px-2.5 py-1.5 shadow-lg",
777
777
  style: {
@@ -816,11 +816,11 @@ function qe({ segments: e, size: t = 200 }) {
816
816
  type: "button",
817
817
  onMouseEnter: () => r(t),
818
818
  onMouseLeave: () => r(null),
819
- className: I("flex cursor-pointer items-center gap-1.5 transition-opacity duration-[100ms]", n !== null && n !== t && "opacity-50"),
819
+ className: R("flex cursor-pointer items-center gap-1.5 transition-opacity duration-[100ms]", n !== null && n !== t && "opacity-50"),
820
820
  children: [
821
821
  /* @__PURE__ */ p("span", {
822
822
  className: "h-2 w-2 rounded-full",
823
- style: { backgroundColor: Ke[e.color] ?? "var(--accent)" }
823
+ style: { backgroundColor: We[e.color] ?? "var(--accent)" }
824
824
  }),
825
825
  /* @__PURE__ */ p("span", {
826
826
  className: "text-text-secondary text-xs",
@@ -838,7 +838,7 @@ function qe({ segments: e, size: t = 200 }) {
838
838
  }
839
839
  //#endregion
840
840
  //#region src/components/charts/SparkLine.tsx
841
- function Je({ data: e, width: t = 60, height: n = 20, color: r }) {
841
+ function Ke({ data: e, width: t = 60, height: n = 20, color: r }) {
842
842
  if (e.length < 2) return null;
843
843
  let i = Math.min(...e), a = Math.max(...e) - i || 1, o = e.map((r, o) => `${o / (e.length - 1) * t},${n - (r - i) / a * (n - 2) - 1}`).join(" ");
844
844
  return /* @__PURE__ */ p("svg", {
@@ -858,7 +858,7 @@ function Je({ data: e, width: t = 60, height: n = 20, color: r }) {
858
858
  }
859
859
  //#endregion
860
860
  //#region src/components/charts/VerticalBarChart.tsx
861
- var Ye = [
861
+ var qe = [
862
862
  1,
863
863
  .85,
864
864
  .7,
@@ -866,33 +866,33 @@ var Ye = [
866
866
  .45,
867
867
  .35,
868
868
  .25
869
- ], L = {
869
+ ], z = {
870
870
  top: 20,
871
871
  right: 8,
872
872
  bottom: 24,
873
873
  left: 40
874
874
  };
875
- function Xe(e) {
875
+ function Je(e) {
876
876
  return e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).toFixed(1)}k` : String(e);
877
877
  }
878
- function Ze({ data: e, height: t = 180 }) {
879
- let [n, r] = d(null), i = 600 - L.left - L.right, a = t - L.top - L.bottom, o = Math.max(...e.map((e) => e.value), 1), s = Math.max(4, (i - 6 * (e.length - 1)) / e.length);
878
+ function Ye({ data: e, height: t = 180 }) {
879
+ let [n, r] = d(null), i = 600 - z.left - z.right, a = t - z.top - z.bottom, o = Math.max(...e.map((e) => e.value), 1), s = Math.max(4, (i - 6 * (e.length - 1)) / e.length);
880
880
  return /* @__PURE__ */ m("svg", {
881
881
  width: "100%",
882
882
  viewBox: `0 0 600 ${t}`,
883
883
  className: "select-none",
884
884
  children: [
885
885
  /* @__PURE__ */ p("text", {
886
- x: L.left - 6,
887
- y: L.top + 4,
886
+ x: z.left - 6,
887
+ y: z.top + 4,
888
888
  textAnchor: "end",
889
889
  fill: "var(--text-tertiary)",
890
890
  fontSize: 10,
891
- children: Xe(o)
891
+ children: Je(o)
892
892
  }),
893
893
  /* @__PURE__ */ p("text", {
894
- x: L.left - 6,
895
- y: L.top + a,
894
+ x: z.left - 6,
895
+ y: z.top + a,
896
896
  textAnchor: "end",
897
897
  dominantBaseline: "central",
898
898
  fill: "var(--text-tertiary)",
@@ -900,32 +900,32 @@ function Ze({ data: e, height: t = 180 }) {
900
900
  children: "0"
901
901
  }),
902
902
  /* @__PURE__ */ p("line", {
903
- x1: L.left,
904
- y1: L.top + a,
905
- x2: L.left + i,
906
- y2: L.top + a,
903
+ x1: z.left,
904
+ y1: z.top + a,
905
+ x2: z.left + i,
906
+ y2: z.top + a,
907
907
  stroke: "var(--border)",
908
908
  strokeWidth: 1
909
909
  }),
910
910
  /* @__PURE__ */ p("line", {
911
- x1: L.left,
912
- y1: L.top + a / 2,
913
- x2: L.left + i,
914
- y2: L.top + a / 2,
911
+ x1: z.left,
912
+ y1: z.top + a / 2,
913
+ x2: z.left + i,
914
+ y2: z.top + a / 2,
915
915
  stroke: "var(--border)",
916
916
  strokeWidth: 1,
917
917
  strokeDasharray: "3 3",
918
918
  opacity: .5
919
919
  }),
920
920
  e.map((e, i) => {
921
- let c = L.left + i * (s + 6), l = e.value / o * a, u = L.top + a - l, d = n === i;
921
+ let c = z.left + i * (s + 6), l = e.value / o * a, u = z.top + a - l, d = n === i;
922
922
  return /* @__PURE__ */ m("g", {
923
923
  onMouseEnter: () => r(i),
924
924
  onMouseLeave: () => r(null),
925
925
  children: [
926
926
  /* @__PURE__ */ p("rect", {
927
927
  x: c,
928
- y: L.top,
928
+ y: z.top,
929
929
  width: s,
930
930
  height: a,
931
931
  fill: "transparent"
@@ -937,7 +937,7 @@ function Ze({ data: e, height: t = 180 }) {
937
937
  height: l,
938
938
  fill: e.color ?? "var(--accent)",
939
939
  rx: 6,
940
- opacity: d ? 1 : Ye[i % Ye.length],
940
+ opacity: d ? 1 : qe[i % qe.length],
941
941
  style: { transition: "all 150ms" }
942
942
  }),
943
943
  /* @__PURE__ */ p("text", {
@@ -965,17 +965,17 @@ function Ze({ data: e, height: t = 180 }) {
965
965
  }
966
966
  //#endregion
967
967
  //#region src/components/app-shell/navigation.ts
968
- function Qe(e, t) {
968
+ function Xe(e, t) {
969
969
  if (!t) return !1;
970
970
  if (e.end ?? e.path === "/") return t === e.path;
971
971
  let n = e.path.endsWith("/") ? e.path : `${e.path}/`;
972
972
  return t === e.path || t.startsWith(n);
973
973
  }
974
- function R(e, t, n, r) {
974
+ function B(e, t, n, r) {
975
975
  let i = e.currentTarget.getAttribute("target");
976
976
  e.defaultPrevented || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || i && i !== "_self" || (n && (e.preventDefault(), n(t)), r?.());
977
977
  }
978
- function z(e, t) {
978
+ function Ze(e, t) {
979
979
  if (t) {
980
980
  t(e);
981
981
  return;
@@ -984,19 +984,19 @@ function z(e, t) {
984
984
  }
985
985
  //#endregion
986
986
  //#region src/components/app-shell/BottomNav.tsx
987
- function $e({ items: e, currentPath: t, onNavigate: n, className: r }) {
987
+ function Qe({ items: e, currentPath: t, onNavigate: n, className: r }) {
988
988
  return e.length === 0 ? null : /* @__PURE__ */ p("nav", {
989
- className: I("bg-bg-secondary border-border font-navigation fixed right-0 bottom-0 left-0 z-30 border-t md:hidden", r),
989
+ className: R("bg-bg-secondary border-border font-navigation fixed right-0 bottom-0 left-0 z-30 border-t md:hidden", r),
990
990
  style: { height: "var(--bottomnav-height)" },
991
991
  children: /* @__PURE__ */ p("ul", {
992
992
  className: "flex h-full items-center justify-around",
993
993
  children: e.map((e) => {
994
- let r = Qe(e, t);
994
+ let r = Xe(e, t);
995
995
  return /* @__PURE__ */ p("li", { children: /* @__PURE__ */ m("a", {
996
996
  href: e.path,
997
- onClick: (t) => R(t, e.path, n),
997
+ onClick: (t) => B(t, e.path, n),
998
998
  "aria-current": r ? "page" : void 0,
999
- className: I("font-navigation flex h-full w-14 flex-col items-center justify-center gap-0.5", "cursor-pointer transition-colors duration-[100ms]", r ? "text-accent" : "text-text-tertiary"),
999
+ className: R("font-navigation flex h-full w-14 flex-col items-center justify-center gap-0.5", "cursor-pointer transition-colors duration-[100ms]", r ? "text-accent" : "text-text-tertiary"),
1000
1000
  children: [/* @__PURE__ */ p(e.icon, { className: "h-5 w-5" }), /* @__PURE__ */ p("span", {
1001
1001
  className: "text-2xs",
1002
1002
  children: e.shortLabel ?? e.label
@@ -1008,44 +1008,45 @@ function $e({ items: e, currentPath: t, onNavigate: n, className: r }) {
1008
1008
  }
1009
1009
  //#endregion
1010
1010
  //#region src/hooks/useFocusTrap.ts
1011
- var et = "a[href], button:not([disabled]), input:not([disabled]), textarea:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
1012
- function B(e, t) {
1011
+ var $e = "a[href], button:not([disabled]), input:not([disabled]), textarea:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
1012
+ function V(e, t) {
1013
1013
  let n = u(null);
1014
1014
  o(() => {
1015
1015
  if (!t || !e.current) return;
1016
- n.current = document.activeElement;
1017
- let r = e.current.querySelectorAll(et);
1018
- r.length > 0 && r[0].focus();
1019
- let i = (t) => {
1016
+ let r = e.current.ownerDocument;
1017
+ n.current = r.activeElement;
1018
+ let i = e.current.querySelectorAll($e);
1019
+ i.length > 0 && i[0].focus();
1020
+ let a = (t) => {
1020
1021
  if (t.key !== "Tab" || !e.current) return;
1021
- let n = e.current.querySelectorAll(et);
1022
+ let n = e.current.querySelectorAll($e);
1022
1023
  if (n.length === 0) return;
1023
- let r = n[0], i = n[n.length - 1];
1024
- t.shiftKey ? document.activeElement === r && (t.preventDefault(), i.focus()) : document.activeElement === i && (t.preventDefault(), r.focus());
1024
+ let i = n[0], a = n[n.length - 1];
1025
+ t.shiftKey ? r.activeElement === i && (t.preventDefault(), a.focus()) : r.activeElement === a && (t.preventDefault(), i.focus());
1025
1026
  };
1026
- return document.addEventListener("keydown", i), () => {
1027
- document.removeEventListener("keydown", i), n.current instanceof HTMLElement && n.current.focus();
1027
+ return r.addEventListener("keydown", a), () => {
1028
+ r.removeEventListener("keydown", a), n.current instanceof HTMLElement && n.current.focus();
1028
1029
  };
1029
1030
  }, [t, e]);
1030
1031
  }
1031
1032
  //#endregion
1032
1033
  //#region src/components/app-shell/commandPaletteEvents.ts
1033
- var tt = "open-command-palette", nt = {
1034
+ var et = "open-command-palette", tt = {
1034
1035
  key: "k",
1035
1036
  label: "⌘K",
1036
1037
  modifier: "primary"
1037
1038
  };
1038
- function rt(e = tt) {
1039
+ function nt(e = et) {
1039
1040
  typeof document > "u" || document.dispatchEvent(new CustomEvent(e));
1040
1041
  }
1041
- function it(e, t) {
1042
+ function rt(e, t) {
1042
1043
  if (e.key.toLowerCase() !== t.key.toLowerCase()) return !1;
1043
1044
  let n = t.modifier ?? "primary";
1044
1045
  return (n === "primary" ? e.metaKey || e.ctrlKey : n === "meta" ? e.metaKey && !e.ctrlKey : n === "ctrl" ? e.ctrlKey && !e.metaKey : !e.metaKey && !e.ctrlKey) && !!e.altKey == !!t.altKey && !!e.shiftKey == !!t.shiftKey;
1045
1046
  }
1046
1047
  //#endregion
1047
1048
  //#region src/components/app-shell/CommandPalette.tsx
1048
- function at(e, t) {
1049
+ function it(e, t) {
1049
1050
  let n = t.toLowerCase();
1050
1051
  return [
1051
1052
  e.label,
@@ -1053,15 +1054,15 @@ function at(e, t) {
1053
1054
  ...e.keywords ?? []
1054
1055
  ].some((e) => e.toLowerCase().includes(n));
1055
1056
  }
1056
- function ot({ items: e, eventName: t = tt, shortcut: n = nt, placeholder: r = "Search pages...", emptyLabel: a = "No results found", onNavigate: c, onSelect: l }) {
1057
+ function at({ items: e, eventName: t = et, shortcut: n = tt, placeholder: r = "Search pages...", emptyLabel: a = "No results found", onNavigate: c, onSelect: l }) {
1057
1058
  let [f, h] = d(!1), [g, _] = d(""), [v, y] = d(0), b = u(null), x = u(null), S = s();
1058
- B(x, f);
1059
- let C = e.filter((e) => at(e, g)), w = i(() => {
1059
+ V(x, f);
1060
+ let C = e.filter((e) => it(e, g)), w = i(() => {
1060
1061
  h(!0), _(""), y(0), setTimeout(() => b.current?.focus(), 0);
1061
1062
  }, []);
1062
1063
  o(() => {
1063
1064
  let e = (e) => {
1064
- it(e, n) && (e.preventDefault(), f ? h(!1) : w());
1065
+ rt(e, n) && (e.preventDefault(), f ? h(!1) : w());
1065
1066
  }, r = () => {
1066
1067
  f || w();
1067
1068
  };
@@ -1078,7 +1079,7 @@ function ot({ items: e, eventName: t = tt, shortcut: n = nt, placeholder: r = "S
1078
1079
  _(e), y(0);
1079
1080
  }
1080
1081
  function E(e) {
1081
- l?.(e), z(e.path, c), h(!1);
1082
+ l?.(e), Ze(e.path, c), h(!1);
1082
1083
  }
1083
1084
  function D(e) {
1084
1085
  e.key === "ArrowDown" ? (e.preventDefault(), y((e) => Math.min(e + 1, C.length - 1))) : e.key === "ArrowUp" ? (e.preventDefault(), y((e) => Math.max(e - 1, 0))) : e.key === "Enter" && C[v] ? E(C[v]) : e.key === "Escape" && h(!1);
@@ -1095,7 +1096,7 @@ function ot({ items: e, eventName: t = tt, shortcut: n = nt, placeholder: r = "S
1095
1096
  children: [/* @__PURE__ */ m("div", {
1096
1097
  className: "border-border flex items-center gap-3 border-b px-4",
1097
1098
  children: [
1098
- /* @__PURE__ */ p(M, { className: "text-text-tertiary h-4 w-4 shrink-0" }),
1099
+ /* @__PURE__ */ p(se, { className: "text-text-tertiary h-4 w-4 shrink-0" }),
1099
1100
  /* @__PURE__ */ p("input", {
1100
1101
  ref: b,
1101
1102
  type: "text",
@@ -1128,14 +1129,21 @@ function ot({ items: e, eventName: t = tt, shortcut: n = nt, placeholder: r = "S
1128
1129
  role: "option",
1129
1130
  "aria-selected": t === v,
1130
1131
  onClick: () => E(e),
1131
- className: I("flex h-9 w-full cursor-pointer items-center gap-3 rounded-md px-3 text-left", "transition-colors duration-[100ms]", t === v ? "bg-accent-muted text-accent" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
1132
- children: [/* @__PURE__ */ p("span", {
1133
- className: "shrink-0 opacity-60",
1134
- children: /* @__PURE__ */ p(e.icon, { className: "h-4 w-4" })
1135
- }), /* @__PURE__ */ p("span", {
1136
- className: "text-xs font-medium",
1137
- children: e.label
1138
- })]
1132
+ className: R("flex h-9 w-full cursor-pointer items-center gap-3 rounded-md px-3 text-left", "transition-colors duration-[100ms]", t === v ? "bg-accent-muted text-accent" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
1133
+ children: [
1134
+ /* @__PURE__ */ p("span", {
1135
+ className: "shrink-0 opacity-60",
1136
+ children: /* @__PURE__ */ p(e.icon, { className: "h-4 w-4" })
1137
+ }),
1138
+ /* @__PURE__ */ p("span", {
1139
+ className: "min-w-0 flex-1 text-xs font-medium",
1140
+ children: e.label
1141
+ }),
1142
+ e.badge && /* @__PURE__ */ p("span", {
1143
+ className: "shrink-0",
1144
+ children: e.badge
1145
+ })
1146
+ ]
1139
1147
  }, e.path))
1140
1148
  })]
1141
1149
  })]
@@ -1143,7 +1151,7 @@ function ot({ items: e, eventName: t = tt, shortcut: n = nt, placeholder: r = "S
1143
1151
  }
1144
1152
  //#endregion
1145
1153
  //#region src/components/app-shell/MobileDrawer.tsx
1146
- function st({ brand: e }) {
1154
+ function ot({ brand: e }) {
1147
1155
  let t = e.icon;
1148
1156
  return e.logo ? /* @__PURE__ */ p(f, { children: e.logo }) : /* @__PURE__ */ m("div", {
1149
1157
  className: "flex items-center gap-2",
@@ -1153,16 +1161,16 @@ function st({ brand: e }) {
1153
1161
  })]
1154
1162
  });
1155
1163
  }
1156
- function ct({ open: e, onClose: t, items: n, brand: r, currentPath: i, onNavigate: a, className: s }) {
1157
- let c = u(null);
1158
- return B(c, e), o(() => {
1164
+ function st({ open: e, onClose: t, items: n, brand: r, currentPath: i, onNavigate: a, headerActions: s, className: c }) {
1165
+ let l = u(null);
1166
+ return V(l, e), o(() => {
1159
1167
  if (!e) return;
1160
1168
  document.body.style.overflow = "hidden";
1161
1169
  let n = (e) => {
1162
1170
  e.key === "Escape" && t();
1163
- };
1164
- return document.addEventListener("keydown", n), () => {
1165
- document.body.style.overflow = "", document.removeEventListener("keydown", n);
1171
+ }, r = l.current?.ownerDocument ?? document;
1172
+ return r.addEventListener("keydown", n), () => {
1173
+ document.body.style.overflow = "", r.removeEventListener("keydown", n);
1166
1174
  };
1167
1175
  }, [e, t]), e ? /* @__PURE__ */ m("div", {
1168
1176
  className: "fixed inset-0 z-40 md:hidden",
@@ -1170,45 +1178,59 @@ function ct({ open: e, onClose: t, items: n, brand: r, currentPath: i, onNavigat
1170
1178
  className: "bg-bg-overlay fixed inset-0",
1171
1179
  onClick: t
1172
1180
  }), /* @__PURE__ */ m("div", {
1173
- ref: c,
1174
- className: I("bg-bg-sidebar border-border animate-slide-in-left fixed inset-y-0 left-0 z-50 flex w-64 flex-col border-r", s),
1175
- children: [/* @__PURE__ */ m("div", {
1176
- className: "border-border flex h-11 items-center justify-between border-b px-4",
1177
- children: [/* @__PURE__ */ p(st, { brand: r }), /* @__PURE__ */ p("button", {
1178
- onClick: t,
1179
- className: "text-text-tertiary hover:text-text-primary flex h-7 w-7 cursor-pointer items-center justify-center rounded",
1180
- "aria-label": "Close menu",
1181
- children: /* @__PURE__ */ p(N, { className: "h-4 w-4" })
1182
- })]
1183
- }), /* @__PURE__ */ p("nav", {
1184
- className: "min-h-0 flex-1 overflow-y-auto overscroll-contain px-2 py-2",
1185
- children: /* @__PURE__ */ p("ul", {
1186
- className: "space-y-0.5",
1187
- children: n.map((e) => {
1188
- let n = Qe(e, i);
1189
- return /* @__PURE__ */ p("li", { children: /* @__PURE__ */ m("a", {
1190
- href: e.path,
1191
- onClick: (n) => R(n, e.path, a, t),
1192
- "aria-current": n ? "page" : void 0,
1193
- className: I("flex h-10 items-center gap-3 rounded-md px-3", "cursor-pointer transition-colors duration-[100ms]", n ? "bg-accent-muted text-accent" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
1194
- children: [/* @__PURE__ */ p(e.icon, { className: "h-4 w-4" }), /* @__PURE__ */ p("span", {
1195
- className: "text-sm",
1196
- children: e.label
1197
- })]
1198
- }) }, e.path);
1181
+ ref: l,
1182
+ className: R("bg-bg-sidebar border-border animate-slide-in-left fixed inset-y-0 left-0 z-50 flex w-64 flex-col border-r", c),
1183
+ children: [
1184
+ /* @__PURE__ */ m("div", {
1185
+ className: "border-border flex h-11 items-center justify-between border-b px-4",
1186
+ children: [/* @__PURE__ */ p(ot, { brand: r }), /* @__PURE__ */ p("button", {
1187
+ onClick: t,
1188
+ className: "text-text-tertiary hover:text-text-primary flex h-7 w-7 cursor-pointer items-center justify-center rounded",
1189
+ "aria-label": "Close menu",
1190
+ children: /* @__PURE__ */ p(F, { className: "h-4 w-4" })
1191
+ })]
1192
+ }),
1193
+ s && /* @__PURE__ */ p("div", {
1194
+ className: "border-border border-b px-4 py-2",
1195
+ children: s
1196
+ }),
1197
+ /* @__PURE__ */ p("nav", {
1198
+ className: "min-h-0 flex-1 overflow-y-auto overscroll-contain px-2 py-2",
1199
+ children: /* @__PURE__ */ p("ul", {
1200
+ className: "space-y-0.5",
1201
+ children: n.map((e) => {
1202
+ let n = Xe(e, i);
1203
+ return /* @__PURE__ */ p("li", { children: /* @__PURE__ */ m("a", {
1204
+ href: e.path,
1205
+ onClick: (n) => B(n, e.path, a, t),
1206
+ "aria-current": n ? "page" : void 0,
1207
+ className: R("flex h-10 items-center gap-3 rounded-md px-3", "cursor-pointer transition-colors duration-[100ms]", n ? "bg-accent-muted text-accent" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
1208
+ children: [
1209
+ /* @__PURE__ */ p(e.icon, { className: "h-4 w-4" }),
1210
+ /* @__PURE__ */ p("span", {
1211
+ className: "min-w-0 flex-1 text-sm",
1212
+ children: e.label
1213
+ }),
1214
+ e.badge && /* @__PURE__ */ p("span", {
1215
+ className: "shrink-0",
1216
+ children: e.badge
1217
+ })
1218
+ ]
1219
+ }) }, e.path);
1220
+ })
1199
1221
  })
1200
1222
  })
1201
- })]
1223
+ ]
1202
1224
  })]
1203
1225
  }) : null;
1204
1226
  }
1205
1227
  //#endregion
1206
1228
  //#region src/config/theme.ts
1207
- var lt = [
1229
+ var ct = [
1208
1230
  {
1209
1231
  value: "dark",
1210
1232
  label: "Dark",
1211
- icon: oe,
1233
+ icon: P,
1212
1234
  preview: {
1213
1235
  bg: "#0d0f12",
1214
1236
  fg: "#2a2e38"
@@ -1217,7 +1239,7 @@ var lt = [
1217
1239
  {
1218
1240
  value: "light",
1219
1241
  label: "Light",
1220
- icon: de,
1242
+ icon: le,
1221
1243
  preview: {
1222
1244
  bg: "#f5f5f5",
1223
1245
  fg: "#d4d4d8"
@@ -1226,7 +1248,7 @@ var lt = [
1226
1248
  {
1227
1249
  value: "monokai",
1228
1250
  label: "Monokai",
1229
- icon: se,
1251
+ icon: ie,
1230
1252
  preview: {
1231
1253
  bg: "#272822",
1232
1254
  fg: "#3E3D32"
@@ -1235,7 +1257,7 @@ var lt = [
1235
1257
  {
1236
1258
  value: "solarized",
1237
1259
  label: "Solarized",
1238
- icon: ae,
1260
+ icon: N,
1239
1261
  preview: {
1240
1262
  bg: "#002B36",
1241
1263
  fg: "#0A3F4C"
@@ -1244,7 +1266,7 @@ var lt = [
1244
1266
  {
1245
1267
  value: "cyberBrutalDark",
1246
1268
  label: "Cyber Brutal Dark",
1247
- icon: me,
1269
+ icon: fe,
1248
1270
  preview: {
1249
1271
  bg: "#050505",
1250
1272
  fg: "#18181b"
@@ -1253,7 +1275,7 @@ var lt = [
1253
1275
  {
1254
1276
  value: "cyberBrutalLight",
1255
1277
  label: "Cyber Brutal Light",
1256
- icon: me,
1278
+ icon: fe,
1257
1279
  preview: {
1258
1280
  bg: "#e4e4e7",
1259
1281
  fg: "#d4d4d8"
@@ -1268,15 +1290,15 @@ var lt = [
1268
1290
  fg: "#364153"
1269
1291
  }
1270
1292
  }
1271
- ], ut = new Set([
1293
+ ], lt = new Set([
1272
1294
  "light",
1273
1295
  "cyberBrutalLight",
1274
1296
  "hashiTheme"
1275
1297
  ]);
1276
- function V(e) {
1277
- return ut.has(e);
1298
+ function H(e) {
1299
+ return lt.has(e);
1278
1300
  }
1279
- var dt = lt.filter((e) => V(e.value)), ft = lt.filter((e) => !V(e.value)), H = {
1301
+ var ut = ct.filter((e) => H(e.value)), dt = ct.filter((e) => !H(e.value)), ft = {
1280
1302
  uiFont: "inter",
1281
1303
  headingFont: "inter",
1282
1304
  proseFont: "inter",
@@ -1307,10 +1329,10 @@ var dt = lt.filter((e) => V(e.value)), ft = lt.filter((e) => !V(e.value)), H = {
1307
1329
  lineHeight: 1.4,
1308
1330
  density: .22
1309
1331
  }, U = {
1310
- dark: H,
1311
- light: H,
1312
- monokai: H,
1313
- solarized: H,
1332
+ dark: ft,
1333
+ light: ft,
1334
+ monokai: ft,
1335
+ solarized: ft,
1314
1336
  cyberBrutalDark: pt,
1315
1337
  cyberBrutalLight: pt,
1316
1338
  hashiTheme: {
@@ -1329,7 +1351,7 @@ var dt = lt.filter((e) => V(e.value)), ft = lt.filter((e) => !V(e.value)), H = {
1329
1351
  lineHeight: 1.45,
1330
1352
  density: .25
1331
1353
  }
1332
- }, mt = [
1354
+ }, W = [
1333
1355
  {
1334
1356
  value: "archivo-expanded",
1335
1357
  label: "Archivo Expanded"
@@ -1350,7 +1372,7 @@ var dt = lt.filter((e) => V(e.value)), ft = lt.filter((e) => !V(e.value)), H = {
1350
1372
  value: "system",
1351
1373
  label: "System"
1352
1374
  }
1353
- ], ht = [
1375
+ ], mt = [
1354
1376
  {
1355
1377
  value: "purple",
1356
1378
  color: "#7C5CFC"
@@ -1386,28 +1408,30 @@ var dt = lt.filter((e) => V(e.value)), ft = lt.filter((e) => !V(e.value)), H = {
1386
1408
  ];
1387
1409
  //#endregion
1388
1410
  //#region src/hooks/useDismiss.ts
1389
- function W(e, t, n, r) {
1411
+ function G(e, t, n, r, i) {
1412
+ let a = i?.outsideClick ?? !0;
1390
1413
  o(() => {
1391
1414
  if (!e) return;
1392
1415
  let i = (e) => {
1393
1416
  let i = e.target;
1394
1417
  r?.some((e) => e.current?.contains(i)) || n.every((e) => e.current && !e.current.contains(i)) && t();
1395
- }, a = (e) => {
1418
+ }, o = (e) => {
1396
1419
  e.key === "Escape" && t();
1397
1420
  };
1398
- return document.addEventListener("mousedown", i), document.addEventListener("keydown", a), () => {
1399
- document.removeEventListener("mousedown", i), document.removeEventListener("keydown", a);
1421
+ return a && document.addEventListener("mousedown", i), document.addEventListener("keydown", o), () => {
1422
+ a && document.removeEventListener("mousedown", i), document.removeEventListener("keydown", o);
1400
1423
  };
1401
1424
  }, [
1402
1425
  e,
1403
1426
  t,
1404
1427
  n,
1405
- r
1428
+ r,
1429
+ a
1406
1430
  ]);
1407
1431
  }
1408
1432
  //#endregion
1409
1433
  //#region src/providers/SettingsContext.ts
1410
- var G = n({
1434
+ var ht = n({
1411
1435
  fontSize: 15,
1412
1436
  setFontSize: () => {},
1413
1437
  accentColor: "purple",
@@ -1459,7 +1483,7 @@ var G = n({
1459
1483
  //#endregion
1460
1484
  //#region src/hooks/useSettings.ts
1461
1485
  function K() {
1462
- return a(G);
1486
+ return a(ht);
1463
1487
  }
1464
1488
  //#endregion
1465
1489
  //#region src/components/ui/Avatar.tsx
@@ -1477,9 +1501,9 @@ function vt(e) {
1477
1501
  for (let n = 0; n < e.length; n++) t = e.charCodeAt(n) + ((t << 5) - t);
1478
1502
  return `hsl(${Math.abs(t) % 360}, 50%, 40%)`;
1479
1503
  }
1480
- function q({ name: e, src: t, size: n = "md", className: r }) {
1504
+ function yt({ name: e, src: t, size: n = "md", className: r }) {
1481
1505
  return /* @__PURE__ */ p("div", {
1482
- className: I("text-text-on-avatar flex shrink-0 items-center justify-center rounded-full font-semibold", gt[n], r),
1506
+ className: R("text-text-on-avatar flex shrink-0 items-center justify-center rounded-full font-semibold", gt[n], r),
1483
1507
  style: { backgroundColor: t ? void 0 : vt(e) },
1484
1508
  "aria-label": e,
1485
1509
  children: t ? /* @__PURE__ */ p("img", {
@@ -1491,11 +1515,11 @@ function q({ name: e, src: t, size: n = "md", className: r }) {
1491
1515
  }
1492
1516
  //#endregion
1493
1517
  //#region src/components/ui/Toast.tsx
1494
- var yt = n({ toast: () => {} });
1495
- function bt() {
1496
- return a(yt);
1518
+ var bt = n({ toast: () => {} });
1519
+ function xt() {
1520
+ return a(bt);
1497
1521
  }
1498
- function xt({ children: e }) {
1522
+ function St({ children: e }) {
1499
1523
  let [t, n] = d([]), r = u(0), a = i((e, t, i = 4e3) => {
1500
1524
  let a = r.current++;
1501
1525
  n((n) => [...n, {
@@ -1507,36 +1531,36 @@ function xt({ children: e }) {
1507
1531
  }, []), o = i((e) => {
1508
1532
  n((t) => t.filter((t) => t.id !== e));
1509
1533
  }, []);
1510
- return /* @__PURE__ */ m(yt.Provider, {
1534
+ return /* @__PURE__ */ m(bt.Provider, {
1511
1535
  value: { toast: a },
1512
1536
  children: [e, /* @__PURE__ */ p("div", {
1513
1537
  className: "pointer-events-none fixed top-3 right-3 z-[100] flex flex-col gap-2",
1514
1538
  "aria-live": "polite",
1515
- children: t.map((e) => /* @__PURE__ */ p(Tt, {
1539
+ children: t.map((e) => /* @__PURE__ */ p(Et, {
1516
1540
  toast: e,
1517
1541
  onDismiss: () => o(e.id)
1518
1542
  }, e.id))
1519
1543
  })]
1520
1544
  });
1521
1545
  }
1522
- var St = {
1546
+ var Ct = {
1523
1547
  success: C,
1524
- error: pe,
1548
+ error: de,
1525
1549
  warning: g,
1526
- info: j
1527
- }, Ct = {
1550
+ info: M
1551
+ }, wt = {
1528
1552
  success: "bg-green",
1529
1553
  error: "bg-red",
1530
1554
  warning: "bg-yellow",
1531
1555
  info: "bg-blue"
1532
- }, wt = {
1556
+ }, Tt = {
1533
1557
  success: "text-green",
1534
1558
  error: "text-red",
1535
1559
  warning: "text-yellow",
1536
1560
  info: "text-blue"
1537
1561
  };
1538
- function Tt({ toast: e, onDismiss: t }) {
1539
- let [n, r] = d(100), i = St[e.type], a = e.type === "error" || e.type === "warning", s = u(t);
1562
+ function Et({ toast: e, onDismiss: t }) {
1563
+ let [n, r] = d(100), i = Ct[e.type], a = e.type === "error" || e.type === "warning", s = u(t);
1540
1564
  return o(() => {
1541
1565
  s.current = t;
1542
1566
  }, [t]), o(() => {
@@ -1550,11 +1574,11 @@ function Tt({ toast: e, onDismiss: t }) {
1550
1574
  "aria-live": a ? "assertive" : "polite",
1551
1575
  className: "bg-bg-secondary border-border animate-slide-down pointer-events-auto relative w-80 overflow-hidden rounded-lg border shadow-lg",
1552
1576
  children: [
1553
- /* @__PURE__ */ p("div", { className: I("absolute top-1.5 bottom-1.5 left-0 w-[3px] rounded-md", Ct[e.type]) }),
1577
+ /* @__PURE__ */ p("div", { className: R("absolute top-1.5 bottom-1.5 left-0 w-[3px] rounded-md", wt[e.type]) }),
1554
1578
  /* @__PURE__ */ m("div", {
1555
1579
  className: "flex items-center gap-2.5 p-3 pl-3.5",
1556
1580
  children: [
1557
- /* @__PURE__ */ p(i, { className: I("h-4 w-4 shrink-0", wt[e.type]) }),
1581
+ /* @__PURE__ */ p(i, { className: R("h-4 w-4 shrink-0", Tt[e.type]) }),
1558
1582
  /* @__PURE__ */ p("p", {
1559
1583
  className: "text-text-primary flex-1 text-xs",
1560
1584
  children: e.message
@@ -1562,7 +1586,7 @@ function Tt({ toast: e, onDismiss: t }) {
1562
1586
  /* @__PURE__ */ p("button", {
1563
1587
  onClick: t,
1564
1588
  className: "text-text-tertiary hover:text-text-primary flex h-5 w-5 cursor-pointer items-center justify-center rounded",
1565
- children: /* @__PURE__ */ p(N, { className: "h-3 w-3" })
1589
+ children: /* @__PURE__ */ p(F, { className: "h-3 w-3" })
1566
1590
  })
1567
1591
  ]
1568
1592
  }),
@@ -1578,14 +1602,14 @@ function Tt({ toast: e, onDismiss: t }) {
1578
1602
  }
1579
1603
  //#endregion
1580
1604
  //#region src/components/app-shell/Sidebar.tsx
1581
- var Et = 140, Dt = 400, Ot = 48;
1582
- function kt({ item: e, collapsed: t, currentPath: n, onNavigate: r }) {
1583
- let i = Qe(e, n);
1605
+ var Dt = 140, Ot = 400, kt = 48;
1606
+ function At({ item: e, collapsed: t, currentPath: n, onNavigate: r }) {
1607
+ let i = Xe(e, n);
1584
1608
  return /* @__PURE__ */ m("a", {
1585
1609
  href: e.path,
1586
- onClick: (t) => R(t, e.path, r),
1610
+ onClick: (t) => B(t, e.path, r),
1587
1611
  "aria-current": i ? "page" : void 0,
1588
- className: I("font-navigation relative flex items-center gap-2 rounded px-2", "cursor-pointer transition-colors duration-[100ms]", t ? "mx-auto w-[2em] justify-center" : "", i ? "bg-accent-muted text-accent" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
1612
+ className: R("font-navigation relative flex items-center gap-2 rounded px-2", "cursor-pointer transition-colors duration-[100ms]", t ? "mx-auto w-[2em] justify-center" : "", i ? "bg-accent-muted text-accent" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
1589
1613
  style: { height: "2em" },
1590
1614
  title: t ? e.label : void 0,
1591
1615
  children: [
@@ -1601,19 +1625,23 @@ function kt({ item: e, collapsed: t, currentPath: n, onNavigate: r }) {
1601
1625
  children: /* @__PURE__ */ p(e.icon, { className: "h-3.5 w-3.5" })
1602
1626
  }),
1603
1627
  !t && /* @__PURE__ */ p("span", {
1604
- className: "truncate text-xs",
1628
+ className: "min-w-0 flex-1 truncate text-xs",
1605
1629
  children: e.label
1630
+ }),
1631
+ !t && e.badge && /* @__PURE__ */ p("span", {
1632
+ className: "ml-auto shrink-0",
1633
+ children: e.badge
1606
1634
  })
1607
1635
  ]
1608
1636
  });
1609
1637
  }
1610
- function At({ brand: e, collapsed: t }) {
1638
+ function jt({ brand: e, collapsed: t }) {
1611
1639
  let n = e.icon, r = e.name.trim().charAt(0).toUpperCase();
1612
1640
  return e.logo && !t ? /* @__PURE__ */ p("div", {
1613
1641
  className: "flex min-w-0 items-center gap-2 px-2",
1614
1642
  children: e.logo
1615
1643
  }) : /* @__PURE__ */ m("div", {
1616
- className: I("flex min-w-0 items-center gap-2 px-2", t && "mx-auto justify-center px-0"),
1644
+ className: R("flex min-w-0 items-center gap-2 px-2", t && "mx-auto justify-center px-0"),
1617
1645
  children: [n ? /* @__PURE__ */ p(n, { className: "text-accent h-3.5 w-3.5 shrink-0" }) : t && r && /* @__PURE__ */ p("span", {
1618
1646
  className: "text-accent shrink-0 text-xs font-bold",
1619
1647
  children: r
@@ -1623,15 +1651,15 @@ function At({ brand: e, collapsed: t }) {
1623
1651
  })]
1624
1652
  });
1625
1653
  }
1626
- function jt(e) {
1654
+ function Mt(e) {
1627
1655
  return e.role ?? e.email;
1628
1656
  }
1629
- function Mt({ collapsed: e, accounts: t, initialAccountIndex: n = 0, onAccountChange: r, onSignOut: a, signOutPath: o, signOutLabel: s = "Sign out", onNavigate: c }) {
1657
+ function Nt({ collapsed: e, accounts: t, initialAccountIndex: n = 0, onAccountChange: r, onSignOut: a, signOutPath: o, signOutLabel: s = "Sign out", onNavigate: c }) {
1630
1658
  let [l, h] = d(!1), [g, _] = d(() => Math.min(n, Math.max(t.length - 1, 0))), [v, y] = d({
1631
1659
  bottom: 0,
1632
1660
  left: 0
1633
1661
  }), b = u(null), x = u(null);
1634
- W(l, i(() => h(!1), []), [x], [b]);
1662
+ G(l, i(() => h(!1), []), [x], [b]);
1635
1663
  let C = t[g] ?? t[0], w = !!(a || o);
1636
1664
  function T() {
1637
1665
  if (!b.current) return;
@@ -1645,15 +1673,15 @@ function Mt({ collapsed: e, accounts: t, initialAccountIndex: n = 0, onAccountCh
1645
1673
  _(t), r?.(e, t), h(!1);
1646
1674
  }
1647
1675
  function O() {
1648
- h(!1), a ? a() : o && z(o, c);
1676
+ h(!1), a ? a() : o && Ze(o, c);
1649
1677
  }
1650
1678
  return C ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("button", {
1651
1679
  ref: b,
1652
1680
  onClick: T,
1653
- className: I("font-navigation flex w-full cursor-pointer items-center gap-2 rounded px-2 transition-colors duration-[100ms]", "text-text-secondary hover:text-text-primary hover:bg-bg-hover", e && "justify-center px-0"),
1681
+ className: R("font-navigation flex w-full cursor-pointer items-center gap-2 rounded px-2 transition-colors duration-[100ms]", "text-text-secondary hover:text-text-primary hover:bg-bg-hover", e && "justify-center px-0"),
1654
1682
  style: { height: "2.5em" },
1655
1683
  title: e ? C.name : void 0,
1656
- children: [/* @__PURE__ */ p(q, {
1684
+ children: [/* @__PURE__ */ p(yt, {
1657
1685
  name: C.name,
1658
1686
  src: C.avatarSrc,
1659
1687
  size: "sm"
@@ -1662,12 +1690,12 @@ function Mt({ collapsed: e, accounts: t, initialAccountIndex: n = 0, onAccountCh
1662
1690
  children: [/* @__PURE__ */ p("p", {
1663
1691
  className: "text-text-primary truncate text-xs leading-tight font-medium",
1664
1692
  children: C.name
1665
- }), jt(C) && /* @__PURE__ */ p("p", {
1693
+ }), Mt(C) && /* @__PURE__ */ p("p", {
1666
1694
  className: "text-2xs text-text-tertiary truncate leading-tight",
1667
- children: jt(C)
1695
+ children: Mt(C)
1668
1696
  })]
1669
1697
  }), /* @__PURE__ */ p(D, { className: "text-text-tertiary h-3 w-3 shrink-0" })] })]
1670
- }), l && P(/* @__PURE__ */ m("div", {
1698
+ }), l && I(/* @__PURE__ */ m("div", {
1671
1699
  ref: x,
1672
1700
  className: "bg-bg-tertiary border-border-strong animate-scale-in fixed z-[100] w-56 rounded-md border py-1 shadow-lg",
1673
1701
  style: {
@@ -1683,7 +1711,7 @@ function Mt({ collapsed: e, accounts: t, initialAccountIndex: n = 0, onAccountCh
1683
1711
  onClick: () => E(e, t),
1684
1712
  className: "text-text-secondary hover:text-text-primary hover:bg-bg-hover font-navigation flex h-8 w-full cursor-pointer items-center gap-2.5 px-3 text-xs transition-colors duration-[100ms]",
1685
1713
  children: [
1686
- /* @__PURE__ */ p(q, {
1714
+ /* @__PURE__ */ p(yt, {
1687
1715
  name: e.name,
1688
1716
  src: e.avatarSrc,
1689
1717
  size: "sm"
@@ -1704,17 +1732,17 @@ function Mt({ collapsed: e, accounts: t, initialAccountIndex: n = 0, onAccountCh
1704
1732
  w && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", { className: "border-border my-1 border-t" }), /* @__PURE__ */ m("button", {
1705
1733
  onClick: O,
1706
1734
  className: "text-text-secondary hover:text-text-primary hover:bg-bg-hover font-navigation flex h-7 w-full cursor-pointer items-center gap-2.5 px-3 text-xs transition-colors duration-[100ms]",
1707
- children: [/* @__PURE__ */ p(ne, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ p("span", { children: s })]
1735
+ children: [/* @__PURE__ */ p(te, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ p("span", { children: s })]
1708
1736
  })] })
1709
1737
  ]
1710
1738
  }), document.body)] }) : null;
1711
1739
  }
1712
- function Nt({ collapsed: e, settingsPath: t, settingsLabel: n = "All Settings", onOpenSettings: r, onNavigate: a }) {
1740
+ function Pt({ collapsed: e, settingsPath: t, settingsLabel: n = "All Settings", onOpenSettings: r, onNavigate: a }) {
1713
1741
  let [o, s] = d(!1), [c, l] = d({
1714
1742
  bottom: 0,
1715
1743
  left: 0
1716
- }), g = u(null), _ = u(null), { accentColor: v, setAccentColor: y, reducedMotion: b, setReducedMotion: x, colorMode: C, setColorMode: w } = K(), { toast: T } = bt(), E = !!(t || r);
1717
- W(o, i(() => s(!1), []), [_], [g]);
1744
+ }), g = u(null), _ = u(null), { accentColor: v, setAccentColor: y, reducedMotion: b, setReducedMotion: x, colorMode: C, setColorMode: w } = K(), { toast: T } = xt(), E = !!(t || r);
1745
+ G(o, i(() => s(!1), []), [_], [g]);
1718
1746
  function D() {
1719
1747
  if (!g.current) return;
1720
1748
  let e = g.current.getBoundingClientRect();
@@ -1724,19 +1752,19 @@ function Nt({ collapsed: e, settingsPath: t, settingsLabel: n = "All Settings",
1724
1752
  }), s(!o);
1725
1753
  }
1726
1754
  function O() {
1727
- s(!1), r ? r() : t && z(t, a);
1755
+ s(!1), r ? r() : t && Ze(t, a);
1728
1756
  }
1729
1757
  return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("button", {
1730
1758
  ref: g,
1731
1759
  onClick: D,
1732
- className: I("font-navigation relative flex w-full items-center gap-2 rounded px-2", "cursor-pointer transition-colors duration-[100ms]", e ? "mx-auto w-[2em] justify-center" : "", o ? "bg-accent-muted text-accent" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
1760
+ className: R("font-navigation relative flex w-full items-center gap-2 rounded px-2", "cursor-pointer transition-colors duration-[100ms]", e ? "mx-auto w-[2em] justify-center" : "", o ? "bg-accent-muted text-accent" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
1733
1761
  style: { height: "2em" },
1734
1762
  title: e ? "Settings" : void 0,
1735
- children: [/* @__PURE__ */ p(ue, { className: "h-3.5 w-3.5 shrink-0" }), !e && /* @__PURE__ */ p("span", {
1763
+ children: [/* @__PURE__ */ p(ce, { className: "h-3.5 w-3.5 shrink-0" }), !e && /* @__PURE__ */ p("span", {
1736
1764
  className: "truncate text-xs",
1737
1765
  children: "Settings"
1738
1766
  })]
1739
- }), o && P(/* @__PURE__ */ m("div", {
1767
+ }), o && I(/* @__PURE__ */ m("div", {
1740
1768
  ref: _,
1741
1769
  className: "bg-bg-tertiary border-border-strong animate-scale-in fixed z-[100] w-64 rounded-md border py-1 shadow-lg",
1742
1770
  style: {
@@ -1752,17 +1780,17 @@ function Nt({ collapsed: e, settingsPath: t, settingsLabel: n = "All Settings",
1752
1780
  {
1753
1781
  value: "dark",
1754
1782
  label: "Dark",
1755
- Icon: oe
1783
+ Icon: P
1756
1784
  },
1757
1785
  {
1758
1786
  value: "light",
1759
1787
  label: "Light",
1760
- Icon: de
1788
+ Icon: le
1761
1789
  },
1762
1790
  {
1763
1791
  value: "system",
1764
1792
  label: "System",
1765
- Icon: ae
1793
+ Icon: N
1766
1794
  }
1767
1795
  ].map(({ value: e, label: t, Icon: n }) => /* @__PURE__ */ m("button", {
1768
1796
  onClick: () => w(e),
@@ -1783,9 +1811,9 @@ function Nt({ collapsed: e, settingsPath: t, settingsLabel: n = "All Settings",
1783
1811
  }),
1784
1812
  /* @__PURE__ */ p("div", {
1785
1813
  className: "flex flex-wrap gap-1.5 px-3 pb-2",
1786
- children: ht.map((e) => /* @__PURE__ */ p("button", {
1814
+ children: mt.map((e) => /* @__PURE__ */ p("button", {
1787
1815
  onClick: () => y(e.value),
1788
- className: I("h-5 w-5 cursor-pointer rounded-full transition-transform duration-[100ms] hover:scale-110", v === e.value && "ring-offset-bg-tertiary scale-110 ring-2 ring-offset-1"),
1816
+ className: R("h-5 w-5 cursor-pointer rounded-full transition-transform duration-[100ms] hover:scale-110", v === e.value && "ring-offset-bg-tertiary scale-110 ring-2 ring-offset-1"),
1789
1817
  style: {
1790
1818
  backgroundColor: e.color,
1791
1819
  ...v === e.value ? { "--utility-ring-color": e.color } : {}
@@ -1811,7 +1839,7 @@ function Nt({ collapsed: e, settingsPath: t, settingsLabel: n = "All Settings",
1811
1839
  E && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", { className: "border-border my-1 border-t" }), /* @__PURE__ */ m("button", {
1812
1840
  onClick: O,
1813
1841
  className: "text-text-secondary hover:text-text-primary hover:bg-bg-hover font-navigation flex h-7 w-full cursor-pointer items-center gap-2.5 px-3 text-xs transition-colors duration-[100ms]",
1814
- children: [/* @__PURE__ */ p(ue, { className: "h-3.5 w-3.5 shrink-0" }), /* @__PURE__ */ p("span", {
1842
+ children: [/* @__PURE__ */ p(ce, { className: "h-3.5 w-3.5 shrink-0" }), /* @__PURE__ */ p("span", {
1815
1843
  className: "flex-1 text-left",
1816
1844
  children: n
1817
1845
  })]
@@ -1819,61 +1847,68 @@ function Nt({ collapsed: e, settingsPath: t, settingsLabel: n = "All Settings",
1819
1847
  ]
1820
1848
  }), document.body)] });
1821
1849
  }
1822
- function Pt({ navSections: e, brand: t, accounts: n = [], initialAccountIndex: r, onAccountChange: a, onSignOut: o, signOutPath: s, signOutLabel: c, settingsPath: l, settingsLabel: f, onOpenSettings: h, currentPath: g, onNavigate: _, className: v }) {
1823
- let { sidebarCollapsed: y, sidebarWidth: b, setSidebarWidth: x } = K(), [S, C] = d(/* @__PURE__ */ new Set()), T = u(null), E = u(!1), D = i((e) => {
1824
- if (y) return;
1825
- e.preventDefault(), E.current = !0, document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
1850
+ function Ft({ navSections: e, brand: t, accounts: n = [], initialAccountIndex: r, onAccountChange: a, onSignOut: o, signOutPath: s, signOutLabel: c, settingsPath: l, settingsLabel: f, onOpenSettings: h, currentPath: g, onNavigate: _, headerActions: v, className: y }) {
1851
+ let { sidebarCollapsed: b, sidebarWidth: x, setSidebarWidth: S } = K(), [C, T] = d(/* @__PURE__ */ new Set()), E = u(null), D = u(!1), O = i((e) => {
1852
+ if (b) return;
1853
+ e.preventDefault(), D.current = !0, document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
1826
1854
  let t = (e) => {
1827
- if (!E.current || !T.current) return;
1828
- let t = T.current.getBoundingClientRect(), n = e.clientX - t.left;
1829
- x(Math.max(Et, Math.min(n, Dt)));
1855
+ if (!D.current || !E.current) return;
1856
+ let t = E.current.getBoundingClientRect(), n = e.clientX - t.left;
1857
+ S(Math.max(Dt, Math.min(n, Ot)));
1830
1858
  }, n = () => {
1831
- E.current = !1, document.body.style.cursor = "", document.body.style.userSelect = "", document.removeEventListener("mousemove", t), document.removeEventListener("mouseup", n);
1859
+ D.current = !1, document.body.style.cursor = "", document.body.style.userSelect = "", document.removeEventListener("mousemove", t), document.removeEventListener("mouseup", n);
1832
1860
  };
1833
1861
  document.addEventListener("mousemove", t), document.addEventListener("mouseup", n);
1834
- }, [y, x]);
1835
- function O(e) {
1836
- C((t) => {
1862
+ }, [b, S]);
1863
+ function k(e) {
1864
+ T((t) => {
1837
1865
  let n = new Set(t);
1838
1866
  return n.has(e) ? n.delete(e) : n.add(e), n;
1839
1867
  });
1840
1868
  }
1841
1869
  return /* @__PURE__ */ m("aside", {
1842
- ref: T,
1843
- className: I("bg-bg-secondary relative hidden shrink-0 flex-col border-r md:flex", "transition-[width] duration-[200ms] ease-out", "border-border", v),
1844
- style: { width: y ? Ot : b },
1870
+ ref: E,
1871
+ className: R("bg-bg-secondary relative hidden shrink-0 flex-col border-r md:flex", "transition-[width] duration-[200ms] ease-out", "border-border", y),
1872
+ style: { width: b ? kt : x },
1845
1873
  children: [
1846
- !y && /* @__PURE__ */ p("div", {
1847
- onMouseDown: D,
1874
+ !b && /* @__PURE__ */ p("div", {
1875
+ onMouseDown: O,
1848
1876
  className: "hover:bg-accent/30 active:bg-accent/50 absolute top-0 right-0 bottom-0 z-10 w-1 cursor-col-resize"
1849
1877
  }),
1850
1878
  /* @__PURE__ */ p("div", {
1851
1879
  className: "border-border flex shrink-0 items-center border-b px-2",
1852
1880
  style: { height: "var(--topbar-height)" },
1853
- children: /* @__PURE__ */ p(At, {
1881
+ children: /* @__PURE__ */ p(jt, {
1854
1882
  brand: t,
1855
- collapsed: y
1883
+ collapsed: b
1856
1884
  })
1857
1885
  }),
1886
+ !b && v && /* @__PURE__ */ p("div", {
1887
+ className: "border-border shrink-0 border-b px-2 py-2",
1888
+ children: v
1889
+ }),
1858
1890
  /* @__PURE__ */ p("nav", {
1859
1891
  className: "flex-1 overflow-y-auto px-2 py-2",
1860
1892
  children: e.map((e, t) => {
1861
- let n = S.has(e.title);
1893
+ let n = C.has(e.title);
1862
1894
  return /* @__PURE__ */ m("div", {
1863
1895
  className: "mb-4",
1864
- children: [y ? t > 0 && /* @__PURE__ */ p("hr", { className: "border-border mx-auto my-1.5 w-4/5" }) : /* @__PURE__ */ m("button", {
1865
- onClick: () => O(e.title),
1866
- className: "text-2xs-f text-text-tertiary hover:text-text-secondary font-label flex w-full cursor-pointer items-center justify-between px-2 font-semibold tracking-wider uppercase",
1896
+ children: [b ? t > 0 && /* @__PURE__ */ p("hr", { className: "border-border mx-auto my-1.5 w-4/5" }) : /* @__PURE__ */ m("button", {
1897
+ onClick: () => k(e.title),
1898
+ className: "text-2xs-f text-text-tertiary hover:text-text-secondary font-label flex w-full cursor-pointer items-center gap-1 px-2 text-left font-semibold tracking-wider uppercase",
1867
1899
  style: {
1868
1900
  paddingTop: "0.35em",
1869
1901
  paddingBottom: "0.35em"
1870
1902
  },
1871
- children: [e.title, /* @__PURE__ */ p(w, { className: I("h-3 w-3 transition-transform", n && "-rotate-90") })]
1872
- }), (!n || y) && /* @__PURE__ */ p("ul", {
1903
+ children: [/* @__PURE__ */ p("span", {
1904
+ className: "min-w-0 flex-1",
1905
+ children: e.title
1906
+ }), /* @__PURE__ */ p(w, { className: R("h-3 w-3 shrink-0 transition-transform", n && "-rotate-90") })]
1907
+ }), (!n || b) && /* @__PURE__ */ p("ul", {
1873
1908
  className: "flex flex-col gap-1",
1874
- children: e.items.map((e) => /* @__PURE__ */ p("li", { children: /* @__PURE__ */ p(kt, {
1909
+ children: e.items.map((e) => /* @__PURE__ */ p("li", { children: /* @__PURE__ */ p(At, {
1875
1910
  item: e,
1876
- collapsed: y,
1911
+ collapsed: b,
1877
1912
  currentPath: g,
1878
1913
  onNavigate: _
1879
1914
  }) }, e.path))
@@ -1883,16 +1918,16 @@ function Pt({ navSections: e, brand: t, accounts: n = [], initialAccountIndex: r
1883
1918
  }),
1884
1919
  /* @__PURE__ */ m("div", {
1885
1920
  className: "shrink-0 px-2 py-1.5",
1886
- children: [/* @__PURE__ */ p(Nt, {
1887
- collapsed: y,
1921
+ children: [/* @__PURE__ */ p(Pt, {
1922
+ collapsed: b,
1888
1923
  settingsPath: l,
1889
1924
  settingsLabel: f,
1890
1925
  onOpenSettings: h,
1891
1926
  onNavigate: _
1892
1927
  }), n.length > 0 && /* @__PURE__ */ p("div", {
1893
1928
  className: "border-border mt-2 border-t pt-2",
1894
- children: /* @__PURE__ */ p(Mt, {
1895
- collapsed: y,
1929
+ children: /* @__PURE__ */ p(Nt, {
1930
+ collapsed: b,
1896
1931
  accounts: n,
1897
1932
  initialAccountIndex: r,
1898
1933
  onAccountChange: a,
@@ -1908,23 +1943,23 @@ function Pt({ navSections: e, brand: t, accounts: n = [], initialAccountIndex: r
1908
1943
  }
1909
1944
  //#endregion
1910
1945
  //#region src/components/app-shell/Breadcrumbs.tsx
1911
- function Ft(e) {
1946
+ function It(e) {
1912
1947
  return e.charAt(0).toUpperCase() + e.slice(1);
1913
1948
  }
1914
- function It({ homeLabel: e = "Dashboard", labels: t = {}, parents: n = {}, currentPath: r = "/", onNavigate: i, className: a }) {
1949
+ function Lt({ homeLabel: e = "Dashboard", labels: t = {}, parents: n = {}, currentPath: r = "/", onNavigate: i, className: a }) {
1915
1950
  let o = r.split("?")[0].split("/").filter(Boolean), s = [{
1916
1951
  label: e,
1917
1952
  path: "/"
1918
1953
  }, ...o.map((e, r) => {
1919
1954
  let i = o[r - 1];
1920
1955
  return {
1921
- label: t[e] || n[i] || Ft(e),
1956
+ label: t[e] || n[i] || It(e),
1922
1957
  path: "/" + o.slice(0, r + 1).join("/")
1923
1958
  };
1924
1959
  })];
1925
1960
  return /* @__PURE__ */ p("nav", {
1926
1961
  "aria-label": "Breadcrumb",
1927
- className: I("font-navigation flex items-center gap-1 text-xs", a),
1962
+ className: R("font-navigation flex items-center gap-1 text-xs", a),
1928
1963
  children: s.map((e, t) => {
1929
1964
  let n = t === s.length - 1;
1930
1965
  return /* @__PURE__ */ m("span", {
@@ -1934,8 +1969,8 @@ function It({ homeLabel: e = "Dashboard", labels: t = {}, parents: n = {}, curre
1934
1969
  children: e.label
1935
1970
  }) : /* @__PURE__ */ p("a", {
1936
1971
  href: e.path,
1937
- onClick: (t) => R(t, e.path, i),
1938
- className: I("text-text-tertiary hover:text-text-primary cursor-pointer transition-colors duration-[100ms]"),
1972
+ onClick: (t) => B(t, e.path, i),
1973
+ className: R("text-text-tertiary hover:text-text-primary cursor-pointer transition-colors duration-[100ms]"),
1939
1974
  children: e.label
1940
1975
  })]
1941
1976
  }, e.path);
@@ -1943,26 +1978,557 @@ function It({ homeLabel: e = "Dashboard", labels: t = {}, parents: n = {}, curre
1943
1978
  });
1944
1979
  }
1945
1980
  //#endregion
1981
+ //#region src/hooks/useApplyTheme.ts
1982
+ function Rt() {
1983
+ let { setPreferredDarkTheme: e, setPreferredLightTheme: t, setColorMode: n } = K();
1984
+ return i((r) => {
1985
+ H(r) ? (t(r), n("light")) : (e(r), n("dark"));
1986
+ }, [
1987
+ e,
1988
+ t,
1989
+ n
1990
+ ]);
1991
+ }
1992
+ //#endregion
1993
+ //#region src/components/ui/Button.tsx
1994
+ var zt = {
1995
+ primary: "bg-accent text-text-on-accent hover:bg-accent-hover active:bg-accent-active",
1996
+ secondary: "bg-bg-secondary text-text-primary border border-border hover:bg-bg-hover hover:border-border-strong",
1997
+ danger: "bg-red-muted text-red border border-transparent hover:bg-red/20",
1998
+ ghost: "text-text-secondary hover:text-text-primary hover:bg-bg-hover",
1999
+ icon: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover"
2000
+ }, Bt = {
2001
+ xs: "h-6 px-2 text-2xs gap-1",
2002
+ sm: "h-7 px-2.5 text-xs gap-1.5",
2003
+ md: "h-8 px-3 text-xs gap-2",
2004
+ lg: "h-9 px-4 text-sm gap-2"
2005
+ }, Vt = {
2006
+ xs: "h-6 w-6",
2007
+ sm: "h-7 w-7",
2008
+ md: "h-8 w-8",
2009
+ lg: "h-9 w-9"
2010
+ }, Ht = {
2011
+ xs: "h-3 w-3",
2012
+ sm: "h-3.5 w-3.5",
2013
+ md: "h-3.5 w-3.5",
2014
+ lg: "h-4 w-4"
2015
+ }, Ut = {
2016
+ sm: "hidden sm:inline",
2017
+ md: "hidden md:inline",
2018
+ lg: "hidden lg:inline"
2019
+ }, Wt = {
2020
+ sm: {
2021
+ xs: "px-1 sm:px-2",
2022
+ sm: "px-1.5 sm:px-2.5",
2023
+ md: "px-2 sm:px-3",
2024
+ lg: "px-2.5 sm:px-4"
2025
+ },
2026
+ md: {
2027
+ xs: "px-1 md:px-2",
2028
+ sm: "px-1.5 md:px-2.5",
2029
+ md: "px-2 md:px-3",
2030
+ lg: "px-2.5 md:px-4"
2031
+ },
2032
+ lg: {
2033
+ xs: "px-1 lg:px-2",
2034
+ sm: "px-1.5 lg:px-2.5",
2035
+ md: "px-2 lg:px-3",
2036
+ lg: "px-2.5 lg:px-4"
2037
+ }
2038
+ }, q = r(({ variant: e = "secondary", size: t = "md", loading: n, icon: r, hideLabel: i, className: a, children: o, disabled: s, ...c }, l) => {
2039
+ let u = e === "icon", d = i === !0 ? "sm" : i === !1 ? void 0 : i;
2040
+ return /* @__PURE__ */ m("button", {
2041
+ ref: l,
2042
+ disabled: s || n,
2043
+ className: R("inline-flex items-center justify-center rounded-md font-medium", "font-control", "transition-colors duration-[100ms] ease-out", "cursor-pointer", "disabled:cursor-not-allowed disabled:opacity-40", "focus-visible:outline-accent focus-visible:outline-2 focus-visible:outline-offset-2", zt[e], u ? Vt[t] : Bt[t], d && !u && Wt[d]?.[t], a),
2044
+ ...c,
2045
+ children: [
2046
+ n && /* @__PURE__ */ p(ee, { className: "h-3.5 w-3.5 animate-spin" }),
2047
+ r && !n && /* @__PURE__ */ p(r, { className: Ht[t] }),
2048
+ o && (d ? /* @__PURE__ */ p("span", {
2049
+ className: Ut[d],
2050
+ children: o
2051
+ }) : o)
2052
+ ]
2053
+ });
2054
+ });
2055
+ q.displayName = "Button";
2056
+ //#endregion
2057
+ //#region src/components/ui/SectionHeader.tsx
2058
+ function J({ children: e, as: t = "h2", className: n, border: r = !0 }) {
2059
+ return /* @__PURE__ */ p(t, {
2060
+ className: R("text-text-primary font-heading text-xs font-semibold", r && "border-border border-b pb-2", n),
2061
+ children: e
2062
+ });
2063
+ }
2064
+ //#endregion
2065
+ //#region src/hooks/useDropUp.ts
2066
+ function Gt(e, t, n) {
2067
+ let [r, i] = d(!1);
2068
+ return c(() => {
2069
+ if (!e || !n.current || !t.current) return;
2070
+ let r = t.current.getBoundingClientRect(), a = n.current.getBoundingClientRect();
2071
+ i(window.innerHeight - r.bottom < a.height + 8);
2072
+ }, [e]), r;
2073
+ }
2074
+ //#endregion
2075
+ //#region src/components/ui/SelectDropdown.tsx
2076
+ function Y({ options: e, value: t, onChange: n, label: r, placeholder: a = "Select...", className: o, size: c = "md" }) {
2077
+ let [l, f] = d(!1), [h, g] = d(-1), _ = u(null), v = u(null), y = Gt(l, _, v), b = s(), x = `${b}-listbox`, C = e.find((e) => e.value === t);
2078
+ G(l, i(() => f(!1), []), [_]);
2079
+ function T() {
2080
+ if (!l) {
2081
+ let n = e.findIndex((e) => e.value === t);
2082
+ g(n >= 0 ? n : 0);
2083
+ }
2084
+ f(!l);
2085
+ }
2086
+ function E(r) {
2087
+ if (!l) {
2088
+ if (r.key === "ArrowDown" || r.key === "ArrowUp") {
2089
+ r.preventDefault();
2090
+ let n = e.findIndex((e) => e.value === t);
2091
+ g(n >= 0 ? n : 0), f(!0);
2092
+ }
2093
+ return;
2094
+ }
2095
+ switch (r.key) {
2096
+ case "ArrowDown":
2097
+ r.preventDefault(), g((t) => Math.min(t + 1, e.length - 1));
2098
+ break;
2099
+ case "ArrowUp":
2100
+ r.preventDefault(), g((e) => Math.max(e - 1, 0));
2101
+ break;
2102
+ case "Enter":
2103
+ r.preventDefault(), e[h] && (n(e[h].value), f(!1));
2104
+ break;
2105
+ case "Escape":
2106
+ r.preventDefault(), f(!1);
2107
+ break;
2108
+ }
2109
+ }
2110
+ return /* @__PURE__ */ m("div", {
2111
+ className: R("flex flex-col gap-1.5", o),
2112
+ ref: _,
2113
+ children: [r && /* @__PURE__ */ p("span", {
2114
+ className: "text-text-secondary font-label text-xs font-medium",
2115
+ children: r
2116
+ }), /* @__PURE__ */ m("div", {
2117
+ className: "relative",
2118
+ children: [
2119
+ /* @__PURE__ */ p("button", {
2120
+ type: "button",
2121
+ onClick: T,
2122
+ onKeyDown: E,
2123
+ "aria-haspopup": "listbox",
2124
+ "aria-expanded": l,
2125
+ "aria-controls": l ? x : void 0,
2126
+ "aria-activedescendant": l && h >= 0 ? `${b}-option-${h}` : void 0,
2127
+ className: R("font-control flex w-full cursor-pointer items-center rounded-md text-xs", "bg-bg-secondary border-border text-text-primary border", "hover:bg-bg-hover hover:border-border-strong", "transition-colors duration-[100ms]", "focus-visible:outline-accent focus-visible:outline-2 focus-visible:outline-offset-2", c === "sm" ? "h-6 px-2 pr-6" : "h-7 px-2 pr-7"),
2128
+ children: C ? C.label : /* @__PURE__ */ p("span", {
2129
+ className: "text-text-disabled",
2130
+ children: a
2131
+ })
2132
+ }),
2133
+ /* @__PURE__ */ p(w, { className: R("text-text-tertiary pointer-events-none absolute top-1/2 h-3 w-3 -translate-y-1/2 transition-transform", c === "sm" ? "right-1.5" : "right-2", l && "rotate-180") }),
2134
+ l && /* @__PURE__ */ p("div", {
2135
+ ref: v,
2136
+ className: R("bg-bg-tertiary border-border-strong animate-scale-in absolute right-0 left-0 z-[100] overflow-hidden rounded-md border shadow-lg", y ? "bottom-full mb-1" : "top-full mt-1"),
2137
+ children: /* @__PURE__ */ p("ul", {
2138
+ id: x,
2139
+ className: "max-h-48 overflow-y-auto py-1",
2140
+ role: "listbox",
2141
+ children: e.map((e, r) => /* @__PURE__ */ m("li", {
2142
+ id: `${b}-option-${r}`,
2143
+ role: "option",
2144
+ "aria-selected": e.value === t,
2145
+ onClick: () => {
2146
+ n(e.value), f(!1);
2147
+ },
2148
+ onMouseEnter: () => g(r),
2149
+ className: R("font-control flex h-7 w-full cursor-pointer items-center gap-2 px-3 text-xs", "transition-colors duration-[100ms]", r === h ? "bg-accent-muted text-accent" : e.value === t ? "text-accent" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
2150
+ children: [/* @__PURE__ */ p("span", {
2151
+ className: "flex-1 truncate",
2152
+ children: e.label
2153
+ }), e.value === t && /* @__PURE__ */ p(S, { className: "h-3 w-3 shrink-0" })]
2154
+ }, e.value))
2155
+ })
2156
+ })
2157
+ ]
2158
+ })]
2159
+ });
2160
+ }
2161
+ //#endregion
2162
+ //#region src/components/ui/Slider.tsx
2163
+ function X({ min: e, max: t, step: n = 1, value: r, onChange: i, onCommit: a, label: o, showValue: s, className: c }) {
2164
+ let l = (r - e) / (t - e) * 100;
2165
+ return /* @__PURE__ */ m("div", {
2166
+ className: R("flex flex-col gap-1.5", c),
2167
+ children: [(o || s) && /* @__PURE__ */ m("div", {
2168
+ className: "flex items-center justify-between",
2169
+ children: [o && /* @__PURE__ */ p("span", {
2170
+ className: "text-text-secondary font-label text-xs font-medium",
2171
+ children: o
2172
+ }), s && /* @__PURE__ */ p("span", {
2173
+ className: "text-text-primary font-data text-xs",
2174
+ children: r
2175
+ })]
2176
+ }), /* @__PURE__ */ p("input", {
2177
+ type: "range",
2178
+ min: e,
2179
+ max: t,
2180
+ step: n,
2181
+ value: r,
2182
+ onChange: (e) => i(Number(e.target.value)),
2183
+ onPointerUp: a ? (e) => a(Number(e.target.value)) : void 0,
2184
+ className: "bg-bg-tertiary [&::-webkit-slider-thumb]:bg-accent h-1.5 w-full cursor-pointer appearance-none rounded-md [&::-webkit-slider-thumb]:h-4 [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:cursor-pointer [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:shadow-sm [&::-webkit-slider-thumb]:transition-transform [&::-webkit-slider-thumb]:duration-[100ms] [&::-webkit-slider-thumb]:hover:scale-110",
2185
+ style: { background: `linear-gradient(to right, var(--accent) ${l}%, var(--bg-tertiary) ${l}%)` }
2186
+ })]
2187
+ });
2188
+ }
2189
+ //#endregion
2190
+ //#region src/components/ui/ThemePreview.tsx
2191
+ function Kt({ label: e, active: t, icon: n, preview: r, onClick: i, className: a }) {
2192
+ return /* @__PURE__ */ m("button", {
2193
+ type: "button",
2194
+ onClick: i,
2195
+ className: R("flex cursor-pointer flex-col items-center gap-2 rounded-md border p-3 transition-colors duration-[100ms]", t ? "border-accent bg-accent-muted" : "border-border bg-bg-secondary hover:bg-bg-hover hover:border-border-strong", a),
2196
+ children: [/* @__PURE__ */ p("div", {
2197
+ className: "border-border-strong/20 flex h-10 w-full items-center justify-center rounded border",
2198
+ style: { backgroundColor: r?.bg },
2199
+ children: /* @__PURE__ */ p("div", {
2200
+ className: "h-1.5 w-8 rounded-md",
2201
+ style: { backgroundColor: r?.fg }
2202
+ })
2203
+ }), /* @__PURE__ */ m("div", {
2204
+ className: "flex items-center gap-1.5",
2205
+ children: [n && /* @__PURE__ */ p(n, { className: "h-3 w-3" }), /* @__PURE__ */ p("span", {
2206
+ className: "text-xs font-medium",
2207
+ children: e
2208
+ })]
2209
+ })]
2210
+ });
2211
+ }
2212
+ //#endregion
2213
+ //#region src/components/ui/Toggle.tsx
2214
+ function qt({ checked: e, onChange: t, disabled: n, label: r, className: i }) {
2215
+ return /* @__PURE__ */ m("label", {
2216
+ className: R("flex w-fit items-center", n ? "cursor-not-allowed opacity-40" : "cursor-pointer", i),
2217
+ style: { gap: 10 },
2218
+ children: [/* @__PURE__ */ p("button", {
2219
+ type: "button",
2220
+ role: "switch",
2221
+ "aria-checked": e,
2222
+ disabled: n,
2223
+ onClick: () => t(!e),
2224
+ className: R("relative shrink-0 rounded-full border transition-colors duration-[100ms]", "focus-visible:outline-accent focus-visible:outline-2 focus-visible:outline-offset-2", e ? "bg-accent border-accent" : "bg-bg-tertiary border-border", !n && "cursor-pointer"),
2225
+ style: {
2226
+ width: 36,
2227
+ height: 20
2228
+ },
2229
+ children: /* @__PURE__ */ p("span", {
2230
+ className: "bg-control-knob absolute top-1/2 rounded-full transition-[left] duration-[100ms]",
2231
+ style: {
2232
+ width: 14,
2233
+ height: 14,
2234
+ marginTop: -7,
2235
+ left: e ? 19 : 3,
2236
+ boxShadow: "0 0 1px rgba(0,0,0,0.1), 2px 0 4px rgba(0,0,0,0.35)"
2237
+ }
2238
+ })
2239
+ }), r && /* @__PURE__ */ p("span", {
2240
+ className: "text-text-secondary text-xs",
2241
+ children: r
2242
+ })]
2243
+ });
2244
+ }
2245
+ //#endregion
2246
+ //#region src/components/app-shell/themeMenuEvents.ts
2247
+ var Jt = "open-theme-menu";
2248
+ function Yt(e = Jt) {
2249
+ typeof document > "u" || document.dispatchEvent(new CustomEvent(e));
2250
+ }
2251
+ //#endregion
2252
+ //#region src/components/app-shell/ThemeMenu.tsx
2253
+ var Xt = [
2254
+ {
2255
+ value: "dark",
2256
+ label: "Dark",
2257
+ Icon: P
2258
+ },
2259
+ {
2260
+ value: "light",
2261
+ label: "Light",
2262
+ Icon: le
2263
+ },
2264
+ {
2265
+ value: "system",
2266
+ label: "System",
2267
+ Icon: N
2268
+ }
2269
+ ];
2270
+ function Zt({ className: e, respondToOpenEvent: t = !0 }) {
2271
+ let [n, r] = d(!1), [a, s] = d(!1), [c, l] = d({
2272
+ top: 0,
2273
+ right: 0
2274
+ }), h = u(null), g = u(null), _ = K(), v = Rt(), { toast: y } = xt(), b = i(() => {
2275
+ r(!1), s(!1);
2276
+ }, []);
2277
+ G(n, b, [g], [h], { outsideClick: !a });
2278
+ let x = i(() => {
2279
+ if (!h.current) return;
2280
+ let e = h.current.getBoundingClientRect();
2281
+ l({
2282
+ top: e.bottom + 6,
2283
+ right: window.innerWidth - e.right
2284
+ });
2285
+ }, []);
2286
+ function S() {
2287
+ if (n) {
2288
+ b();
2289
+ return;
2290
+ }
2291
+ x(), r(!0);
2292
+ }
2293
+ o(() => {
2294
+ if (!t) return;
2295
+ let e = () => {
2296
+ x(), r(!0), s(!0);
2297
+ };
2298
+ return document.addEventListener(Jt, e), () => document.removeEventListener(Jt, e);
2299
+ }, [t, x]), o(() => {
2300
+ if (n) return window.addEventListener("resize", x), window.addEventListener("scroll", x, !0), () => {
2301
+ window.removeEventListener("resize", x), window.removeEventListener("scroll", x, !0);
2302
+ };
2303
+ }, [n, x]);
2304
+ let { colorMode: C, setColorMode: w, preferredDarkTheme: T, preferredLightTheme: E, accentColor: D, setAccentColor: O, fontSize: k, setFontSize: A, uiFont: j, setUiFont: M, headingFont: ee, setHeadingFont: te, proseFont: ne, setProseFont: re, codeFont: N, setCodeFont: P, borderRadius: ae, setBorderRadius: oe, borderWidth: se, setBorderWidth: ce, tracking: le, setTracking: ue, lineHeight: F, setLineHeight: de, density: fe, setDensity: L, reducedMotion: pe, setReducedMotion: me, saveThemeCustomization: he, resetThemeCustomization: ge, hasThemeOverrides: _e, isCustomized: ve, resolvedTheme: ye } = _;
2305
+ return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("button", {
2306
+ ref: h,
2307
+ onClick: S,
2308
+ "aria-label": "Theme settings",
2309
+ "aria-haspopup": "dialog",
2310
+ "aria-expanded": n,
2311
+ title: "Theme",
2312
+ className: R("flex h-7 w-7 cursor-pointer items-center justify-center rounded transition-colors duration-[100ms]", n ? "text-accent bg-accent-muted" : "text-text-tertiary hover:text-text-primary hover:bg-bg-hover", e),
2313
+ children: /* @__PURE__ */ p(ie, { className: "h-4 w-4" })
2314
+ }), n && I(/* @__PURE__ */ p("div", {
2315
+ ref: g,
2316
+ role: "dialog",
2317
+ "aria-label": "Theme settings",
2318
+ className: "bg-bg-tertiary border-border-strong animate-scale-in fixed z-[100] flex w-80 flex-col overflow-y-auto rounded-md border p-3 shadow-lg",
2319
+ style: {
2320
+ top: c.top,
2321
+ right: c.right,
2322
+ maxHeight: "80vh"
2323
+ },
2324
+ children: /* @__PURE__ */ m("div", {
2325
+ className: "space-y-4",
2326
+ children: [
2327
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p(J, {
2328
+ as: "h3",
2329
+ border: !1,
2330
+ className: "mb-2",
2331
+ children: "Mode"
2332
+ }), /* @__PURE__ */ p("div", {
2333
+ className: "bg-bg-secondary border-border flex gap-1 rounded-md border p-1.5",
2334
+ children: Xt.map(({ value: e, label: t, Icon: n }) => /* @__PURE__ */ m("button", {
2335
+ onClick: () => w(e),
2336
+ className: R("font-navigation flex flex-1 cursor-pointer items-center justify-center gap-1.5 rounded px-2 py-1 text-xs transition-colors duration-[100ms]", C === e ? "bg-accent-muted text-accent" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
2337
+ children: [/* @__PURE__ */ p(n, { className: "h-3.5 w-3.5" }), t]
2338
+ }, e))
2339
+ })] }),
2340
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p(J, {
2341
+ as: "h3",
2342
+ border: !1,
2343
+ className: "mb-2",
2344
+ children: "Dark themes"
2345
+ }), /* @__PURE__ */ p("div", {
2346
+ className: "grid grid-cols-2 gap-2",
2347
+ children: dt.map((e) => /* @__PURE__ */ p(Kt, {
2348
+ label: e.label,
2349
+ icon: e.icon,
2350
+ preview: e.preview,
2351
+ active: T === e.value,
2352
+ onClick: () => v(e.value)
2353
+ }, e.value))
2354
+ })] }),
2355
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p(J, {
2356
+ as: "h3",
2357
+ border: !1,
2358
+ className: "mb-2",
2359
+ children: "Light themes"
2360
+ }), /* @__PURE__ */ p("div", {
2361
+ className: "grid grid-cols-2 gap-2",
2362
+ children: ut.map((e) => /* @__PURE__ */ p(Kt, {
2363
+ label: e.label,
2364
+ icon: e.icon,
2365
+ preview: e.preview,
2366
+ active: E === e.value,
2367
+ onClick: () => v(e.value)
2368
+ }, e.value))
2369
+ })] }),
2370
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p(J, {
2371
+ as: "h3",
2372
+ border: !1,
2373
+ className: "mb-2",
2374
+ children: "Accent"
2375
+ }), /* @__PURE__ */ p("div", {
2376
+ className: "flex flex-wrap gap-1.5",
2377
+ children: mt.map((e) => /* @__PURE__ */ p("button", {
2378
+ onClick: () => O(e.value),
2379
+ className: R("h-6 w-6 cursor-pointer rounded-full transition-transform duration-[100ms] hover:scale-110", D === e.value && "ring-offset-bg-tertiary scale-110 ring-2 ring-offset-1"),
2380
+ style: {
2381
+ backgroundColor: e.color,
2382
+ ...D === e.value ? { "--utility-ring-color": e.color } : {}
2383
+ },
2384
+ title: e.value.charAt(0).toUpperCase() + e.value.slice(1),
2385
+ "aria-label": e.value
2386
+ }, e.value))
2387
+ })] }),
2388
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p(J, {
2389
+ as: "h3",
2390
+ border: !1,
2391
+ className: "mb-2",
2392
+ children: "Fonts"
2393
+ }), /* @__PURE__ */ m("div", {
2394
+ className: "grid grid-cols-2 gap-2",
2395
+ children: [
2396
+ /* @__PURE__ */ p(Y, {
2397
+ label: "UI / Body",
2398
+ size: "sm",
2399
+ options: W,
2400
+ value: j,
2401
+ onChange: (e) => M(e)
2402
+ }),
2403
+ /* @__PURE__ */ p(Y, {
2404
+ label: "Headings",
2405
+ size: "sm",
2406
+ options: W,
2407
+ value: ee,
2408
+ onChange: (e) => te(e)
2409
+ }),
2410
+ /* @__PURE__ */ p(Y, {
2411
+ label: "Prose",
2412
+ size: "sm",
2413
+ options: W,
2414
+ value: ne,
2415
+ onChange: (e) => re(e)
2416
+ }),
2417
+ /* @__PURE__ */ p(Y, {
2418
+ label: "Code",
2419
+ size: "sm",
2420
+ options: W,
2421
+ value: N,
2422
+ onChange: (e) => P(e)
2423
+ })
2424
+ ]
2425
+ })] }),
2426
+ /* @__PURE__ */ m("div", {
2427
+ className: "space-y-3",
2428
+ children: [
2429
+ /* @__PURE__ */ p(X, {
2430
+ label: "Font size",
2431
+ min: 11,
2432
+ max: 18,
2433
+ value: k,
2434
+ onChange: A,
2435
+ showValue: !0
2436
+ }),
2437
+ /* @__PURE__ */ p(X, {
2438
+ label: "Corner radius",
2439
+ min: 0,
2440
+ max: 16,
2441
+ value: ae,
2442
+ onChange: oe,
2443
+ showValue: !0
2444
+ }),
2445
+ /* @__PURE__ */ p(X, {
2446
+ label: "Border width",
2447
+ min: 1,
2448
+ max: 3,
2449
+ value: se,
2450
+ onChange: ce,
2451
+ showValue: !0
2452
+ }),
2453
+ /* @__PURE__ */ p(X, {
2454
+ label: "Letter spacing",
2455
+ min: 0,
2456
+ max: .3,
2457
+ step: .01,
2458
+ value: le,
2459
+ onChange: ue,
2460
+ showValue: !0
2461
+ }),
2462
+ /* @__PURE__ */ p(X, {
2463
+ label: "Line height",
2464
+ min: 1.2,
2465
+ max: 2,
2466
+ step: .05,
2467
+ value: F,
2468
+ onChange: de,
2469
+ showValue: !0
2470
+ }),
2471
+ /* @__PURE__ */ p(X, {
2472
+ label: "Density",
2473
+ min: .18,
2474
+ max: .32,
2475
+ step: .01,
2476
+ value: fe,
2477
+ onChange: L,
2478
+ showValue: !0
2479
+ })
2480
+ ]
2481
+ }),
2482
+ /* @__PURE__ */ p(qt, {
2483
+ label: "Reduced motion",
2484
+ checked: pe,
2485
+ onChange: me
2486
+ }),
2487
+ /* @__PURE__ */ m("div", {
2488
+ className: "border-border flex items-center gap-2 border-t pt-3",
2489
+ children: [/* @__PURE__ */ p(q, {
2490
+ variant: "primary",
2491
+ size: "sm",
2492
+ disabled: !ve,
2493
+ onClick: () => {
2494
+ he(), y("success", `Saved customization for ${ct.find((e) => e.value === ye)?.label ?? ye}`);
2495
+ },
2496
+ children: "Save for theme"
2497
+ }), /* @__PURE__ */ p(q, {
2498
+ variant: "secondary",
2499
+ size: "sm",
2500
+ disabled: !_e && !ve,
2501
+ onClick: () => {
2502
+ ge(), y("info", "Reset to theme defaults");
2503
+ },
2504
+ children: "Reset"
2505
+ })]
2506
+ })
2507
+ ]
2508
+ })
2509
+ }), document.body)] });
2510
+ }
2511
+ //#endregion
1946
2512
  //#region src/components/app-shell/TopBar.tsx
1947
- var Lt = [
2513
+ var Qt = [
1948
2514
  "dark",
1949
2515
  "light",
1950
2516
  "system"
1951
- ], Rt = {
1952
- dark: oe,
1953
- light: de,
1954
- system: ae
1955
- }, zt = {
2517
+ ], $t = {
2518
+ dark: P,
2519
+ light: le,
2520
+ system: N
2521
+ }, en = {
1956
2522
  dark: "Dark",
1957
2523
  light: "Light",
1958
2524
  system: "System"
1959
2525
  };
1960
- function Bt({ onMobileMenuToggle: e, breadcrumbs: t, showCommandTrigger: n = !0, commandTriggerLabel: r = "Search", commandShortcut: i = nt, currentPath: a, onNavigate: o, onCommandTrigger: s }) {
1961
- let { sidebarCollapsed: c, setSidebarCollapsed: l, colorMode: u, setColorMode: d } = K();
1962
- function h() {
1963
- d(Lt[(Lt.indexOf(u) + 1) % Lt.length]);
2526
+ function tn({ onMobileMenuToggle: e, breadcrumbs: t, showCommandTrigger: n = !0, commandTriggerLabel: r = "Search", commandShortcut: i = tt, currentPath: a, onNavigate: o, onCommandTrigger: s, actions: c }) {
2527
+ let { sidebarCollapsed: l, setSidebarCollapsed: u, colorMode: d, setColorMode: h } = K();
2528
+ function g() {
2529
+ h(Qt[(Qt.indexOf(d) + 1) % Qt.length]);
1964
2530
  }
1965
- let g = Rt[u];
2531
+ let _ = $t[d];
1966
2532
  return /* @__PURE__ */ m("header", {
1967
2533
  className: "border-border bg-bg-secondary font-navigation flex h-9 shrink-0 items-center justify-between border-b px-3",
1968
2534
  style: { height: "var(--topbar-height)" },
@@ -1973,59 +2539,64 @@ function Bt({ onMobileMenuToggle: e, breadcrumbs: t, showCommandTrigger: n = !0,
1973
2539
  onClick: e,
1974
2540
  className: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover flex h-7 w-7 cursor-pointer items-center justify-center rounded md:hidden",
1975
2541
  "aria-label": "Toggle menu",
1976
- children: /* @__PURE__ */ p(re, { className: "h-4 w-4" })
2542
+ children: /* @__PURE__ */ p(ne, { className: "h-4 w-4" })
1977
2543
  }),
1978
2544
  /* @__PURE__ */ p("button", {
1979
- onClick: () => l(!c),
2545
+ onClick: () => u(!l),
1980
2546
  className: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover hidden h-7 w-7 cursor-pointer items-center justify-center rounded md:flex",
1981
- "aria-label": c ? "Expand sidebar" : "Collapse sidebar",
1982
- children: p(c ? le : ce, { className: "h-4 w-4" })
2547
+ "aria-label": l ? "Expand sidebar" : "Collapse sidebar",
2548
+ children: p(l ? oe : ae, { className: "h-4 w-4" })
1983
2549
  }),
1984
- t !== !1 && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", { className: "bg-border hidden h-4 w-px md:block" }), /* @__PURE__ */ p(It, {
2550
+ t !== !1 && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", { className: "bg-border hidden h-4 w-px md:block" }), /* @__PURE__ */ p(Lt, {
1985
2551
  ...t,
1986
2552
  currentPath: a,
1987
2553
  onNavigate: o
1988
2554
  })] })
1989
2555
  ]
1990
- }), /* @__PURE__ */ m("div", {
1991
- className: "flex items-center gap-1",
1992
- children: [n && /* @__PURE__ */ m("button", {
1993
- onClick: s ?? (() => rt()),
1994
- className: "text-text-tertiary bg-bg-primary border-border hover:border-border-strong hover:text-text-secondary font-navigation hidden h-6 cursor-pointer items-center gap-2 rounded-md border px-2 transition-colors duration-[100ms] sm:flex",
1995
- children: [
1996
- /* @__PURE__ */ p(M, { className: "h-3 w-3" }),
1997
- /* @__PURE__ */ p("span", {
1998
- className: "text-2xs",
1999
- children: r
2000
- }),
2001
- /* @__PURE__ */ p("kbd", {
2002
- className: "text-2xs font-mono opacity-60",
2003
- children: i.label
2004
- })
2005
- ]
2006
- }), /* @__PURE__ */ p("button", {
2007
- onClick: h,
2008
- className: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover flex h-7 w-7 cursor-pointer items-center justify-center rounded",
2009
- "aria-label": `Color mode: ${zt[u]}. Click to cycle.`,
2010
- title: zt[u],
2011
- children: /* @__PURE__ */ p(g, { className: "h-4 w-4" })
2012
- })]
2556
+ }), /* @__PURE__ */ m("div", {
2557
+ className: "flex items-center gap-1",
2558
+ children: [
2559
+ c,
2560
+ n && /* @__PURE__ */ m("button", {
2561
+ onClick: s ?? (() => nt()),
2562
+ className: "text-text-tertiary bg-bg-primary border-border hover:border-border-strong hover:text-text-secondary font-navigation hidden h-6 cursor-pointer items-center gap-2 rounded-md border px-2 transition-colors duration-[100ms] sm:flex",
2563
+ children: [
2564
+ /* @__PURE__ */ p(se, { className: "h-3 w-3" }),
2565
+ /* @__PURE__ */ p("span", {
2566
+ className: "text-2xs",
2567
+ children: r
2568
+ }),
2569
+ /* @__PURE__ */ p("kbd", {
2570
+ className: "text-2xs font-mono opacity-60",
2571
+ children: i.label
2572
+ })
2573
+ ]
2574
+ }),
2575
+ /* @__PURE__ */ p("button", {
2576
+ onClick: g,
2577
+ className: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover flex h-7 w-7 cursor-pointer items-center justify-center rounded",
2578
+ "aria-label": `Color mode: ${en[d]}. Click to cycle.`,
2579
+ title: en[d],
2580
+ children: /* @__PURE__ */ p(_, { className: "h-4 w-4" })
2581
+ }),
2582
+ /* @__PURE__ */ p(Zt, {})
2583
+ ]
2013
2584
  })]
2014
2585
  });
2015
2586
  }
2016
2587
  //#endregion
2017
2588
  //#region src/components/app-shell/AppShell.tsx
2018
- function Vt({ children: e, navSections: t, brand: n, accounts: r, bottomNavItems: i = [], commandItems: a, breadcrumbs: o, initialAccountIndex: s, onAccountChange: c, onSignOut: u, signOutPath: f, signOutLabel: h, settingsPath: g, settingsLabel: _, onOpenSettings: v, showCommandPalette: y = !0, showCommandTrigger: b = !0, commandTriggerLabel: x, commandShortcut: S, currentPath: C, onNavigate: w, mainClassName: T, className: E }) {
2019
- let [D, O] = d(!1), k = l(() => t.flatMap((e) => e.items), [t]), A = a ?? k;
2589
+ function nn({ children: e, navSections: t, brand: n, accounts: r, bottomNavItems: i = [], commandItems: a, breadcrumbs: o, initialAccountIndex: s, onAccountChange: c, onSignOut: u, signOutPath: f, signOutLabel: h, settingsPath: g, settingsLabel: _, onOpenSettings: v, showCommandPalette: y = !0, showCommandTrigger: b = !0, commandTriggerLabel: x, commandShortcut: S, sidebarHeaderActions: C, topBarActions: w, currentPath: T, onNavigate: E, mainClassName: D, className: O }) {
2590
+ let [k, A] = d(!1), j = l(() => t.flatMap((e) => e.items), [t]), M = a ?? j;
2020
2591
  return /* @__PURE__ */ m("div", {
2021
- className: I("bg-bg-primary flex h-svh overflow-hidden", E),
2592
+ className: R("bg-bg-primary flex h-svh overflow-hidden", O),
2022
2593
  children: [
2023
2594
  /* @__PURE__ */ p("a", {
2024
2595
  href: "#main-content",
2025
2596
  className: "skip-link",
2026
2597
  children: "Skip to content"
2027
2598
  }),
2028
- /* @__PURE__ */ p(Pt, {
2599
+ /* @__PURE__ */ p(Ft, {
2029
2600
  navSections: t,
2030
2601
  brand: n,
2031
2602
  accounts: r,
@@ -2037,51 +2608,54 @@ function Vt({ children: e, navSections: t, brand: n, accounts: r, bottomNavItems
2037
2608
  settingsPath: g,
2038
2609
  settingsLabel: _,
2039
2610
  onOpenSettings: v,
2040
- currentPath: C,
2041
- onNavigate: w
2611
+ currentPath: T,
2612
+ onNavigate: E,
2613
+ headerActions: C
2042
2614
  }),
2043
2615
  /* @__PURE__ */ m("div", {
2044
2616
  className: "flex min-w-0 flex-1 flex-col",
2045
- children: [/* @__PURE__ */ p(Bt, {
2046
- onMobileMenuToggle: () => O(!0),
2617
+ children: [/* @__PURE__ */ p(tn, {
2618
+ onMobileMenuToggle: () => A(!0),
2047
2619
  breadcrumbs: o,
2048
2620
  showCommandTrigger: y && b,
2049
2621
  commandTriggerLabel: x,
2050
2622
  commandShortcut: S,
2051
- currentPath: C,
2052
- onNavigate: w
2623
+ actions: w,
2624
+ currentPath: T,
2625
+ onNavigate: E
2053
2626
  }), /* @__PURE__ */ p("main", {
2054
2627
  id: "main-content",
2055
- className: I("flex-1 overflow-y-auto p-4 pb-20 md:p-6 md:pb-6", T),
2628
+ className: R("flex-1 overflow-y-auto p-4 pb-20 md:p-6 md:pb-6", D),
2056
2629
  children: e
2057
2630
  })]
2058
2631
  }),
2059
- /* @__PURE__ */ p($e, {
2632
+ /* @__PURE__ */ p(Qe, {
2060
2633
  items: i,
2061
- currentPath: C,
2062
- onNavigate: w
2634
+ currentPath: T,
2635
+ onNavigate: E
2063
2636
  }),
2064
- /* @__PURE__ */ p(ct, {
2065
- open: D,
2066
- onClose: () => O(!1),
2067
- items: k,
2637
+ /* @__PURE__ */ p(st, {
2638
+ open: k,
2639
+ onClose: () => A(!1),
2640
+ items: j,
2068
2641
  brand: n,
2069
- currentPath: C,
2070
- onNavigate: w
2642
+ currentPath: T,
2643
+ onNavigate: E,
2644
+ headerActions: C
2071
2645
  }),
2072
- y && A.length > 0 && /* @__PURE__ */ p(ot, {
2073
- items: A,
2646
+ y && M.length > 0 && /* @__PURE__ */ p(at, {
2647
+ items: M,
2074
2648
  shortcut: S,
2075
- onNavigate: w
2649
+ onNavigate: E
2076
2650
  })
2077
2651
  ]
2078
2652
  });
2079
2653
  }
2080
2654
  //#endregion
2081
2655
  //#region src/components/app-shell/AuthLayout.tsx
2082
- function Ht({ children: e, className: t }) {
2656
+ function rn({ children: e, className: t }) {
2083
2657
  return /* @__PURE__ */ m("div", {
2084
- className: I("bg-bg-primary relative flex min-h-svh items-center justify-center p-4", t),
2658
+ className: R("bg-bg-primary relative flex min-h-svh items-center justify-center p-4", t),
2085
2659
  children: [/* @__PURE__ */ p("div", {
2086
2660
  className: "pointer-events-none absolute inset-0 opacity-30",
2087
2661
  style: { background: "radial-gradient(ellipse at 50% 30%, var(--accent-muted) 0%, transparent 60%)" }
@@ -2090,27 +2664,27 @@ function Ht({ children: e, className: t }) {
2090
2664
  }
2091
2665
  //#endregion
2092
2666
  //#region src/components/app-shell/BackLink.tsx
2093
- function Ut({ to: e, children: t, onNavigate: n, className: r }) {
2667
+ function an({ to: e, children: t, onNavigate: n, className: r }) {
2094
2668
  return /* @__PURE__ */ m("a", {
2095
2669
  href: e,
2096
- onClick: (t) => R(t, e, n),
2097
- className: I("inline-flex items-center gap-1.5", "text-text-tertiary text-xs", "hover:text-text-primary", r),
2670
+ onClick: (t) => B(t, e, n),
2671
+ className: R("inline-flex items-center gap-1.5", "text-text-tertiary text-xs", "hover:text-text-primary", r),
2098
2672
  children: [/* @__PURE__ */ p(v, { className: "h-3.5 w-3.5" }), t]
2099
2673
  });
2100
2674
  }
2101
2675
  //#endregion
2102
2676
  //#region src/components/ui/Checkbox.tsx
2103
- function Wt({ checked: e, indeterminate: t, onChange: n, label: r, disabled: i, className: a }) {
2677
+ function on({ checked: e, indeterminate: t, onChange: n, label: r, disabled: i, className: a }) {
2104
2678
  let o = e || t;
2105
2679
  return /* @__PURE__ */ m("label", {
2106
- className: I("flex w-fit items-center gap-2.5", i ? "cursor-not-allowed opacity-40" : "cursor-pointer", a),
2680
+ className: R("flex w-fit items-center gap-2.5", i ? "cursor-not-allowed opacity-40" : "cursor-pointer", a),
2107
2681
  children: [/* @__PURE__ */ p("button", {
2108
2682
  role: "checkbox",
2109
2683
  "aria-checked": t ? "mixed" : e,
2110
2684
  disabled: i,
2111
2685
  onClick: () => n(!e),
2112
- className: I("flex h-4 w-4 shrink-0 items-center justify-center rounded border", "transition-colors duration-[100ms]", "focus-visible:outline-accent focus-visible:outline-2 focus-visible:outline-offset-2", o ? "bg-accent border-accent" : "bg-bg-secondary border-border", !i && "cursor-pointer"),
2113
- children: t ? /* @__PURE__ */ p(ie, { className: "text-text-on-accent h-3 w-3" }) : e ? /* @__PURE__ */ p(S, { className: "text-text-on-accent h-3 w-3" }) : null
2686
+ className: R("flex h-4 w-4 shrink-0 items-center justify-center rounded border", "transition-colors duration-[100ms]", "focus-visible:outline-accent focus-visible:outline-2 focus-visible:outline-offset-2", o ? "bg-accent border-accent" : "bg-bg-secondary border-border", !i && "cursor-pointer"),
2687
+ children: t ? /* @__PURE__ */ p(re, { className: "text-text-on-accent h-3 w-3" }) : e ? /* @__PURE__ */ p(S, { className: "text-text-on-accent h-3 w-3" }) : null
2114
2688
  }), r && /* @__PURE__ */ p("span", {
2115
2689
  className: "text-text-primary text-xs",
2116
2690
  children: r
@@ -2119,10 +2693,10 @@ function Wt({ checked: e, indeterminate: t, onChange: n, label: r, disabled: i,
2119
2693
  }
2120
2694
  //#endregion
2121
2695
  //#region src/components/ui/FilterButton.tsx
2122
- var Gt = r(function({ icon: e, children: t, className: n, ...r }, i) {
2696
+ var sn = r(function({ icon: e, children: t, className: n, ...r }, i) {
2123
2697
  return /* @__PURE__ */ m("button", {
2124
2698
  ref: i,
2125
- className: I("flex h-7 cursor-pointer items-center gap-1.5 rounded-md px-2.5", "border-border bg-bg-secondary text-text-secondary border", "hover:bg-bg-hover hover:border-border-strong", "text-xs", "transition-colors duration-[100ms]", n),
2699
+ className: R("flex h-7 cursor-pointer items-center gap-1.5 rounded-md px-2.5", "border-border bg-bg-secondary text-text-secondary border", "hover:bg-bg-hover hover:border-border-strong", "text-xs", "transition-colors duration-[100ms]", n),
2126
2700
  ...r,
2127
2701
  children: [/* @__PURE__ */ p(e, { className: "h-3.5 w-3.5 shrink-0" }), t && /* @__PURE__ */ p("span", {
2128
2702
  className: "hidden sm:inline",
@@ -2132,12 +2706,12 @@ var Gt = r(function({ icon: e, children: t, className: n, ...r }, i) {
2132
2706
  });
2133
2707
  //#endregion
2134
2708
  //#region src/components/tables/ColumnPicker.tsx
2135
- function Kt({ columns: e, hidden: t, onToggle: n }) {
2709
+ function cn({ columns: e, hidden: t, onToggle: n }) {
2136
2710
  let [r, a] = d(!1), o = u(null);
2137
- return W(r, i(() => a(!1), []), [o]), /* @__PURE__ */ m("div", {
2711
+ return G(r, i(() => a(!1), []), [o]), /* @__PURE__ */ m("div", {
2138
2712
  className: "relative",
2139
2713
  ref: o,
2140
- children: [/* @__PURE__ */ p(Gt, {
2714
+ children: [/* @__PURE__ */ p(sn, {
2141
2715
  icon: O,
2142
2716
  onClick: () => a(!r),
2143
2717
  children: "Columns"
@@ -2149,7 +2723,7 @@ function Kt({ columns: e, hidden: t, onToggle: n }) {
2149
2723
  }), e.map((e) => /* @__PURE__ */ m("button", {
2150
2724
  onClick: () => n(e.key),
2151
2725
  className: "text-text-secondary hover:text-text-primary hover:bg-bg-hover flex h-7 w-full cursor-pointer items-center gap-2.5 px-3 text-xs transition-colors duration-[100ms]",
2152
- children: [/* @__PURE__ */ p(Wt, {
2726
+ children: [/* @__PURE__ */ p(on, {
2153
2727
  checked: !t.has(e.key),
2154
2728
  onChange: () => n(e.key)
2155
2729
  }), /* @__PURE__ */ p("span", { children: e.header })]
@@ -2159,7 +2733,7 @@ function Kt({ columns: e, hidden: t, onToggle: n }) {
2159
2733
  }
2160
2734
  //#endregion
2161
2735
  //#region src/components/tables/Pagination.tsx
2162
- function qt({ page: e, totalPages: t, onPageChange: n }) {
2736
+ function ln({ page: e, totalPages: t, onPageChange: n }) {
2163
2737
  if (t <= 1) return null;
2164
2738
  let r = [];
2165
2739
  for (let n = 1; n <= t; n++) n === 1 || n === t || n >= e - 1 && n <= e + 1 ? r.push(n) : r[r.length - 1] !== "ellipsis" && r.push("ellipsis");
@@ -2178,7 +2752,7 @@ function qt({ page: e, totalPages: t, onPageChange: n }) {
2178
2752
  children: "..."
2179
2753
  }, `e${r}`) : /* @__PURE__ */ p("button", {
2180
2754
  onClick: () => n(t),
2181
- className: I("flex h-7 w-7 cursor-pointer items-center justify-center rounded text-xs font-medium", "transition-colors duration-[100ms]", t === e ? "bg-accent text-text-on-accent" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
2755
+ className: R("flex h-7 w-7 cursor-pointer items-center justify-center rounded text-xs font-medium", "transition-colors duration-[100ms]", t === e ? "bg-accent text-text-on-accent" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
2182
2756
  children: t
2183
2757
  }, t)),
2184
2758
  /* @__PURE__ */ p("button", {
@@ -2193,7 +2767,7 @@ function qt({ page: e, totalPages: t, onPageChange: n }) {
2193
2767
  }
2194
2768
  //#endregion
2195
2769
  //#region src/components/tables/sortRows.ts
2196
- function Jt(e, t, n, r) {
2770
+ function un(e, t, n, r) {
2197
2771
  if (!n) return e;
2198
2772
  let i = t.find((e) => e.key === n)?.getValue;
2199
2773
  return i ? [...e].sort((e, t) => {
@@ -2203,8 +2777,8 @@ function Jt(e, t, n, r) {
2203
2777
  }
2204
2778
  //#endregion
2205
2779
  //#region src/components/tables/ResourceTable.tsx
2206
- function Yt({ data: e, columns: t, getRowId: n, onRowClick: r, emptyMessage: i = "No data", sortKey: a, sortDir: o, onSortChange: s }) {
2207
- let c = s !== void 0, [u, f] = d(null), [h, g] = d("asc"), v = c ? a ?? null : u, b = c ? o ?? "asc" : h, x = l(() => c ? e : Jt(e, t, v, b), [
2780
+ function dn({ data: e, columns: t, getRowId: n, onRowClick: r, emptyMessage: i = "No data", sortKey: a, sortDir: o, onSortChange: s }) {
2781
+ let c = s !== void 0, [u, f] = d(null), [h, g] = d("asc"), v = c ? a ?? null : u, b = c ? o ?? "asc" : h, x = l(() => c ? e : un(e, t, v, b), [
2208
2782
  c,
2209
2783
  e,
2210
2784
  t,
@@ -2226,7 +2800,7 @@ function Yt({ data: e, columns: t, getRowId: n, onRowClick: r, emptyMessage: i =
2226
2800
  children: [/* @__PURE__ */ p("thead", { children: /* @__PURE__ */ p("tr", {
2227
2801
  className: "border-border bg-bg-secondary border-b",
2228
2802
  children: t.map((e) => /* @__PURE__ */ p("th", {
2229
- className: I("text-2xs text-text-tertiary font-label h-7 px-3 text-left font-semibold tracking-wider uppercase", e.sortable && "hover:text-text-secondary cursor-pointer select-none"),
2803
+ className: R("text-2xs text-text-tertiary font-label h-7 px-3 text-left font-semibold tracking-wider uppercase", e.sortable && "hover:text-text-secondary cursor-pointer select-none"),
2230
2804
  style: { width: e.width },
2231
2805
  onClick: e.sortable ? () => S(e.key) : void 0,
2232
2806
  children: /* @__PURE__ */ m("span", {
@@ -2239,10 +2813,10 @@ function Yt({ data: e, columns: t, getRowId: n, onRowClick: r, emptyMessage: i =
2239
2813
  className: "text-text-tertiary h-32 text-center",
2240
2814
  children: i
2241
2815
  }) }) : x.map((e) => /* @__PURE__ */ p("tr", {
2242
- className: I("border-border h-8 border-b last:border-b-0", "hover:bg-bg-hover", r && "cursor-pointer"),
2816
+ className: R("border-border h-8 border-b last:border-b-0", "hover:bg-bg-hover", r && "cursor-pointer"),
2243
2817
  onClick: r ? () => r(e) : void 0,
2244
2818
  children: t.map((t) => /* @__PURE__ */ p("td", {
2245
- className: I("text-text-primary px-3 whitespace-nowrap", t.cellClassName),
2819
+ className: R("text-text-primary px-3 whitespace-nowrap", t.cellClassName),
2246
2820
  onClick: t.interactive && r ? (e) => e.stopPropagation() : void 0,
2247
2821
  children: t.render(e)
2248
2822
  }, t.key))
@@ -2252,7 +2826,7 @@ function Yt({ data: e, columns: t, getRowId: n, onRowClick: r, emptyMessage: i =
2252
2826
  }
2253
2827
  //#endregion
2254
2828
  //#region src/components/ui/Alert.tsx
2255
- var Xt = {
2829
+ var fn = {
2256
2830
  success: {
2257
2831
  bg: "bg-green-muted",
2258
2832
  border: "border-green/30",
@@ -2268,24 +2842,24 @@ var Xt = {
2268
2842
  error: {
2269
2843
  bg: "bg-red-muted",
2270
2844
  border: "border-red/30",
2271
- icon: pe,
2845
+ icon: de,
2272
2846
  iconColor: "text-red"
2273
2847
  },
2274
2848
  info: {
2275
2849
  bg: "bg-blue-muted",
2276
2850
  border: "border-blue/30",
2277
- icon: j,
2851
+ icon: M,
2278
2852
  iconColor: "text-blue"
2279
2853
  }
2280
2854
  };
2281
- function Zt({ type: e, title: t, children: n, dismissible: r, className: i }) {
2855
+ function pn({ type: e, title: t, children: n, dismissible: r, className: i }) {
2282
2856
  let [a, o] = d(!1);
2283
2857
  if (a) return null;
2284
- let s = Xt[e], c = s.icon;
2858
+ let s = fn[e], c = s.icon;
2285
2859
  return /* @__PURE__ */ m("div", {
2286
- className: I("flex gap-2.5 rounded-md border p-3", s.bg, s.border, i),
2860
+ className: R("flex gap-2.5 rounded-md border p-3", s.bg, s.border, i),
2287
2861
  children: [
2288
- /* @__PURE__ */ p(c, { className: I("mt-0.5 h-4 w-4 shrink-0", s.iconColor) }),
2862
+ /* @__PURE__ */ p(c, { className: R("mt-0.5 h-4 w-4 shrink-0", s.iconColor) }),
2289
2863
  /* @__PURE__ */ m("div", {
2290
2864
  className: "min-w-0 flex-1",
2291
2865
  children: [t && /* @__PURE__ */ p("p", {
@@ -2300,16 +2874,16 @@ function Zt({ type: e, title: t, children: n, dismissible: r, className: i }) {
2300
2874
  onClick: () => o(!0),
2301
2875
  className: "text-text-tertiary hover:text-text-primary flex h-5 w-5 cursor-pointer items-center justify-center rounded",
2302
2876
  "aria-label": "Dismiss",
2303
- children: /* @__PURE__ */ p(N, { className: "h-3 w-3" })
2877
+ children: /* @__PURE__ */ p(F, { className: "h-3 w-3" })
2304
2878
  })
2305
2879
  ]
2306
2880
  });
2307
2881
  }
2308
2882
  //#endregion
2309
2883
  //#region src/components/ui/AuthCard.tsx
2310
- function Qt({ title: e, subtitle: t, icon: n, children: r, footer: i, className: a }) {
2884
+ function mn({ title: e, subtitle: t, icon: n, children: r, footer: i, className: a }) {
2311
2885
  return /* @__PURE__ */ p("div", {
2312
- className: I("relative z-10 w-full max-w-sm", a),
2886
+ className: R("relative z-10 w-full max-w-sm", a),
2313
2887
  children: /* @__PURE__ */ m("div", {
2314
2888
  className: "bg-bg-secondary border-border rounded-lg border p-8 shadow-lg",
2315
2889
  children: [
@@ -2341,14 +2915,14 @@ function Qt({ title: e, subtitle: t, icon: n, children: r, footer: i, className:
2341
2915
  }
2342
2916
  //#endregion
2343
2917
  //#region src/components/ui/AuthorByline.tsx
2344
- function $t({ name: e, meta: t, nameAppend: n, size: r = "sm", className: i }) {
2918
+ function hn({ name: e, meta: t, nameAppend: n, size: r = "sm", className: i }) {
2345
2919
  return /* @__PURE__ */ m("div", {
2346
- className: I("flex items-center gap-2", i),
2347
- children: [/* @__PURE__ */ p(q, {
2920
+ className: R("flex items-center gap-2", i),
2921
+ children: [/* @__PURE__ */ p(yt, {
2348
2922
  name: e,
2349
2923
  size: "sm"
2350
2924
  }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("p", {
2351
- className: I("text-text-primary font-label font-medium", r === "md" ? "text-xs" : "text-2xs"),
2925
+ className: R("text-text-primary font-label font-medium", r === "md" ? "text-xs" : "text-2xs"),
2352
2926
  children: [e, n]
2353
2927
  }), t && /* @__PURE__ */ p("p", {
2354
2928
  className: "text-text-tertiary font-label text-2xs",
@@ -2358,14 +2932,14 @@ function $t({ name: e, meta: t, nameAppend: n, size: r = "sm", className: i }) {
2358
2932
  }
2359
2933
  //#endregion
2360
2934
  //#region src/components/ui/Badge.tsx
2361
- var en = {
2935
+ var gn = {
2362
2936
  green: "bg-green-muted text-green",
2363
2937
  yellow: "bg-yellow-muted text-yellow",
2364
2938
  red: "bg-red-muted text-red",
2365
2939
  blue: "bg-blue-muted text-blue",
2366
2940
  purple: "bg-purple-muted text-purple",
2367
2941
  gray: "bg-bg-hover text-text-secondary"
2368
- }, tn = {
2942
+ }, _n = {
2369
2943
  green: "bg-green",
2370
2944
  yellow: "bg-yellow",
2371
2945
  red: "bg-red",
@@ -2373,73 +2947,15 @@ var en = {
2373
2947
  purple: "bg-purple",
2374
2948
  gray: "bg-text-tertiary"
2375
2949
  };
2376
- function nn({ color: e = "gray", dot: t, children: n, className: r }) {
2950
+ function vn({ color: e = "gray", dot: t, children: n, className: r }) {
2377
2951
  return /* @__PURE__ */ m("span", {
2378
- className: I("font-label text-2xs inline-flex items-center gap-1.5 rounded-md px-2 py-0.5 font-medium", en[e], r),
2379
- children: [t && /* @__PURE__ */ p("span", { className: I("h-1.5 w-1.5 rounded-full", tn[e]) }), n]
2952
+ className: R("font-label text-2xs inline-flex items-center gap-1.5 rounded-md px-2 py-0.5 font-medium", gn[e], r),
2953
+ children: [t && /* @__PURE__ */ p("span", { className: R("h-1.5 w-1.5 rounded-full", _n[e]) }), n]
2380
2954
  });
2381
2955
  }
2382
2956
  //#endregion
2383
- //#region src/components/ui/Button.tsx
2384
- var rn = {
2385
- primary: "bg-accent text-text-on-accent hover:bg-accent-hover active:bg-accent-active",
2386
- secondary: "bg-bg-secondary text-text-primary border border-border hover:bg-bg-hover hover:border-border-strong",
2387
- danger: "bg-red-muted text-red border border-transparent hover:bg-red/20",
2388
- ghost: "text-text-secondary hover:text-text-primary hover:bg-bg-hover",
2389
- icon: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover"
2390
- }, an = {
2391
- sm: "h-7 px-2.5 text-xs gap-1.5",
2392
- md: "h-8 px-3 text-xs gap-2",
2393
- lg: "h-9 px-4 text-sm gap-2"
2394
- }, on = {
2395
- sm: "h-7 w-7",
2396
- md: "h-8 w-8",
2397
- lg: "h-9 w-9"
2398
- }, sn = {
2399
- sm: "h-3.5 w-3.5",
2400
- md: "h-3.5 w-3.5",
2401
- lg: "h-4 w-4"
2402
- }, cn = {
2403
- sm: "hidden sm:inline",
2404
- md: "hidden md:inline",
2405
- lg: "hidden lg:inline"
2406
- }, ln = {
2407
- sm: {
2408
- sm: "px-1.5 sm:px-2.5",
2409
- md: "px-2 sm:px-3",
2410
- lg: "px-2.5 sm:px-4"
2411
- },
2412
- md: {
2413
- sm: "px-1.5 md:px-2.5",
2414
- md: "px-2 md:px-3",
2415
- lg: "px-2.5 md:px-4"
2416
- },
2417
- lg: {
2418
- sm: "px-1.5 lg:px-2.5",
2419
- md: "px-2 lg:px-3",
2420
- lg: "px-2.5 lg:px-4"
2421
- }
2422
- }, J = r(({ variant: e = "secondary", size: t = "md", loading: n, icon: r, hideLabel: i, className: a, children: o, disabled: s, ...c }, l) => {
2423
- let u = e === "icon", d = i === !0 ? "sm" : i === !1 ? void 0 : i;
2424
- return /* @__PURE__ */ m("button", {
2425
- ref: l,
2426
- disabled: s || n,
2427
- className: I("inline-flex items-center justify-center rounded-md font-medium", "font-control", "transition-colors duration-[100ms] ease-out", "cursor-pointer", "disabled:cursor-not-allowed disabled:opacity-40", "focus-visible:outline-accent focus-visible:outline-2 focus-visible:outline-offset-2", rn[e], u ? on[t] : an[t], d && !u && ln[d]?.[t], a),
2428
- ...c,
2429
- children: [
2430
- n && /* @__PURE__ */ p(te, { className: "h-3.5 w-3.5 animate-spin" }),
2431
- r && !n && /* @__PURE__ */ p(r, { className: sn[t] }),
2432
- o && (d ? /* @__PURE__ */ p("span", {
2433
- className: cn[d],
2434
- children: o
2435
- }) : o)
2436
- ]
2437
- });
2438
- });
2439
- J.displayName = "Button";
2440
- //#endregion
2441
2957
  //#region src/components/ui/CalendarGrid.tsx
2442
- var un = [
2958
+ var yn = [
2443
2959
  "Mo",
2444
2960
  "Tu",
2445
2961
  "We",
@@ -2447,7 +2963,7 @@ var un = [
2447
2963
  "Fr",
2448
2964
  "Sa",
2449
2965
  "Su"
2450
- ], dn = [
2966
+ ], bn = [
2451
2967
  "January",
2452
2968
  "February",
2453
2969
  "March",
@@ -2461,23 +2977,23 @@ var un = [
2461
2977
  "November",
2462
2978
  "December"
2463
2979
  ];
2464
- function Y(e, t) {
2980
+ function xn(e, t) {
2465
2981
  return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
2466
2982
  }
2467
- function fn(e, t, n) {
2983
+ function Sn(e, t, n) {
2468
2984
  if (!t || !n) return !1;
2469
2985
  let r = e.getTime(), i = Math.min(t.getTime(), n.getTime()), a = Math.max(t.getTime(), n.getTime());
2470
2986
  return r > i && r < a;
2471
2987
  }
2472
- function pn(e, t) {
2988
+ function Cn(e, t) {
2473
2989
  return new Date(e, t + 1, 0).getDate();
2474
2990
  }
2475
- function mn(e, t) {
2991
+ function wn(e, t) {
2476
2992
  let n = new Date(e, t, 1).getDay();
2477
2993
  return n === 0 ? 6 : n - 1;
2478
2994
  }
2479
- function X({ year: e, month: t, selected: n, rangeStart: r, rangeEnd: i, hoverDate: a, onSelect: o, onMonthChange: s, onHover: c, minDate: l, maxDate: f }) {
2480
- let h = pn(e, t), g = mn(e, t), _ = /* @__PURE__ */ new Date(), v = u(null), [y, b] = d(null);
2995
+ function Tn({ year: e, month: t, selected: n, rangeStart: r, rangeEnd: i, hoverDate: a, onSelect: o, onMonthChange: s, onHover: c, minDate: l, maxDate: f }) {
2996
+ let h = Cn(e, t), g = wn(e, t), _ = /* @__PURE__ */ new Date(), v = u(null), [y, b] = d(null);
2481
2997
  function x() {
2482
2998
  return y !== null && y >= 1 && y <= h ? y : n && n.getFullYear() === e && n.getMonth() === t ? n.getDate() : r && r.getFullYear() === e && r.getMonth() === t ? r.getDate() : _.getFullYear() === e && _.getMonth() === t ? _.getDate() : 1;
2483
2999
  }
@@ -2529,7 +3045,7 @@ function X({ year: e, month: t, selected: n, rangeStart: r, rangeEnd: i, hoverDa
2529
3045
  className: "text-text-primary text-xs font-semibold",
2530
3046
  "aria-live": "polite",
2531
3047
  children: [
2532
- dn[t],
3048
+ bn[t],
2533
3049
  " ",
2534
3050
  e
2535
3051
  ]
@@ -2544,24 +3060,24 @@ function X({ year: e, month: t, selected: n, rangeStart: r, rangeEnd: i, hoverDa
2544
3060
  ]
2545
3061
  }), /* @__PURE__ */ m("div", {
2546
3062
  className: "grid grid-cols-7 gap-0",
2547
- children: [un.map((e) => /* @__PURE__ */ p("div", {
3063
+ children: [yn.map((e) => /* @__PURE__ */ p("div", {
2548
3064
  className: "text-text-tertiary text-2xs flex h-8 items-center justify-center font-medium",
2549
3065
  children: e
2550
3066
  }, e)), O.map((s, u) => {
2551
3067
  if (s === null) return /* @__PURE__ */ p("div", { className: "h-8" }, `empty-${u}`);
2552
- let d = new Date(e, t, s), m = Y(d, _), h = n ? Y(d, n) : !1, g = r ? Y(d, r) : !1, v = i ? Y(d, i) : !1, y = fn(d, r ?? null, i ?? a ?? null), b = l && d < l || f && d > f;
3068
+ let d = new Date(e, t, s), m = xn(d, _), h = n ? xn(d, n) : !1, g = r ? xn(d, r) : !1, v = i ? xn(d, i) : !1, y = Sn(d, r ?? null, i ?? a ?? null), b = l && d < l || f && d > f;
2553
3069
  return /* @__PURE__ */ p("button", {
2554
3070
  type: "button",
2555
3071
  "data-day": s,
2556
3072
  disabled: !!b,
2557
3073
  tabIndex: s === S ? 0 : -1,
2558
- "aria-label": `${dn[t]} ${s}, ${e}`,
3074
+ "aria-label": `${bn[t]} ${s}, ${e}`,
2559
3075
  "aria-current": m ? "date" : void 0,
2560
3076
  onClick: () => o(d),
2561
3077
  onKeyDown: (e) => C(e, s),
2562
3078
  onMouseEnter: () => c?.(d),
2563
3079
  onMouseLeave: () => c?.(null),
2564
- className: I("flex h-8 w-full cursor-pointer items-center justify-center text-xs transition-colors duration-[100ms]", "rounded-md", b && "cursor-not-allowed opacity-30", !b && !h && !g && !v && !y && "hover:bg-bg-hover text-text-primary", m && !h && !g && !v && "text-accent font-semibold", (h || g || v) && "bg-accent text-text-on-accent font-semibold", y && !h && !g && !v && "bg-accent-muted text-accent"),
3080
+ className: R("flex h-8 w-full cursor-pointer items-center justify-center text-xs transition-colors duration-[100ms]", "rounded-md", b && "cursor-not-allowed opacity-30", !b && !h && !g && !v && !y && "hover:bg-bg-hover text-text-primary", m && !h && !g && !v && "text-accent font-semibold", (h || g || v) && "bg-accent text-text-on-accent font-semibold", y && !h && !g && !v && "bg-accent-muted text-accent"),
2565
3081
  children: s
2566
3082
  }, s);
2567
3083
  })]
@@ -2570,9 +3086,9 @@ function X({ year: e, month: t, selected: n, rangeStart: r, rangeEnd: i, hoverDa
2570
3086
  }
2571
3087
  //#endregion
2572
3088
  //#region src/components/ui/Card.tsx
2573
- function hn({ children: e, className: t, header: n, footer: r }) {
3089
+ function En({ children: e, className: t, header: n, footer: r }) {
2574
3090
  return /* @__PURE__ */ m("div", {
2575
- className: I("bg-bg-secondary border-border overflow-hidden rounded-md border", t),
3091
+ className: R("bg-bg-secondary border-border overflow-hidden rounded-md border", t),
2576
3092
  children: [
2577
3093
  n && /* @__PURE__ */ p("div", {
2578
3094
  className: "border-border border-b px-3 py-2.5",
@@ -2591,7 +3107,7 @@ function hn({ children: e, className: t, header: n, footer: r }) {
2591
3107
  }
2592
3108
  //#endregion
2593
3109
  //#region src/components/ui/Combobox.tsx
2594
- function gn({ options: e, value: t, onChange: n, placeholder: r = "Select...", label: a, className: o }) {
3110
+ function Dn({ options: e, value: t, onChange: n, placeholder: r = "Select...", label: a, className: o }) {
2595
3111
  let [c, l] = d(!1), [f, h] = d(""), [g, _] = d(0), v = u(null), y = u(null), b = s(), x = e.find((e) => e.value === t), C = e.filter((e) => e.label.toLowerCase().includes(f.toLowerCase()));
2596
3112
  function T(e) {
2597
3113
  h(e), _(0);
@@ -2612,12 +3128,12 @@ function gn({ options: e, value: t, onChange: n, placeholder: r = "Select...", l
2612
3128
  break;
2613
3129
  }
2614
3130
  }
2615
- W(c, i(() => l(!1), []), [v]);
3131
+ G(c, i(() => l(!1), []), [v]);
2616
3132
  function D() {
2617
3133
  l(!0), h(""), _(0), setTimeout(() => y.current?.focus(), 0);
2618
3134
  }
2619
3135
  return /* @__PURE__ */ m("div", {
2620
- className: I("flex flex-col gap-1.5", o),
3136
+ className: R("flex flex-col gap-1.5", o),
2621
3137
  ref: v,
2622
3138
  children: [a && /* @__PURE__ */ p("span", {
2623
3139
  className: "text-text-secondary font-label text-xs font-medium",
@@ -2631,20 +3147,20 @@ function gn({ options: e, value: t, onChange: n, placeholder: r = "Select...", l
2631
3147
  /* @__PURE__ */ p("button", {
2632
3148
  type: "button",
2633
3149
  onClick: () => c ? l(!1) : D(),
2634
- className: I("font-control flex h-7 w-full cursor-pointer items-center rounded-md px-2 pr-7 text-xs", "bg-bg-secondary border-border text-text-primary border", "hover:bg-bg-hover hover:border-border-strong", "transition-colors duration-[100ms]", "focus-visible:outline-accent focus-visible:outline-2 focus-visible:outline-offset-2"),
3150
+ className: R("font-control flex h-7 w-full cursor-pointer items-center rounded-md px-2 pr-7 text-xs", "bg-bg-secondary border-border text-text-primary border", "hover:bg-bg-hover hover:border-border-strong", "transition-colors duration-[100ms]", "focus-visible:outline-accent focus-visible:outline-2 focus-visible:outline-offset-2"),
2635
3151
  children: x ? x.label : /* @__PURE__ */ p("span", {
2636
3152
  className: "text-text-disabled",
2637
3153
  children: r
2638
3154
  })
2639
3155
  }),
2640
- /* @__PURE__ */ p(w, { className: I("text-text-tertiary pointer-events-none absolute top-1/2 right-2.5 h-3.5 w-3.5 -translate-y-1/2 transition-transform", c && "rotate-180") }),
3156
+ /* @__PURE__ */ p(w, { className: R("text-text-tertiary pointer-events-none absolute top-1/2 right-2.5 h-3.5 w-3.5 -translate-y-1/2 transition-transform", c && "rotate-180") }),
2641
3157
  c && /* @__PURE__ */ m("div", {
2642
3158
  className: "bg-bg-tertiary border-border-strong animate-scale-in absolute top-full right-0 left-0 z-50 mt-1 overflow-hidden rounded-md border shadow-lg",
2643
3159
  children: [/* @__PURE__ */ p("div", {
2644
3160
  className: "border-border border-b p-1.5",
2645
3161
  children: /* @__PURE__ */ m("div", {
2646
3162
  className: "relative",
2647
- children: [/* @__PURE__ */ p(M, { className: "text-text-tertiary absolute top-1/2 left-2 h-3 w-3 -translate-y-1/2" }), /* @__PURE__ */ p("input", {
3163
+ children: [/* @__PURE__ */ p(se, { className: "text-text-tertiary absolute top-1/2 left-2 h-3 w-3 -translate-y-1/2" }), /* @__PURE__ */ p("input", {
2648
3164
  ref: y,
2649
3165
  type: "text",
2650
3166
  "aria-label": "Search options",
@@ -2673,7 +3189,7 @@ function gn({ options: e, value: t, onChange: n, placeholder: r = "Select...", l
2673
3189
  n(e.value), l(!1);
2674
3190
  },
2675
3191
  onMouseEnter: () => _(r),
2676
- className: I("font-control flex h-7 w-full cursor-pointer items-center gap-2 px-3 text-xs", "transition-colors duration-[100ms]", r === g ? "bg-accent-muted text-accent" : e.value === t ? "text-accent" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
3192
+ className: R("font-control flex h-7 w-full cursor-pointer items-center gap-2 px-3 text-xs", "transition-colors duration-[100ms]", r === g ? "bg-accent-muted text-accent" : e.value === t ? "text-accent" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
2677
3193
  children: [/* @__PURE__ */ p("span", {
2678
3194
  className: "flex-1 truncate",
2679
3195
  children: e.label
@@ -2687,9 +3203,9 @@ function gn({ options: e, value: t, onChange: n, placeholder: r = "Select...", l
2687
3203
  }
2688
3204
  //#endregion
2689
3205
  //#region src/components/ui/DangerZone.tsx
2690
- function _n({ title: e = "Danger Zone", description: t, children: n, className: r }) {
3206
+ function On({ title: e = "Danger Zone", description: t, children: n, className: r }) {
2691
3207
  return /* @__PURE__ */ m("div", {
2692
- className: I("border-border mt-8 border-t pt-6", r),
3208
+ className: R("border-border mt-8 border-t pt-6", r),
2693
3209
  children: [
2694
3210
  /* @__PURE__ */ p("h3", {
2695
3211
  className: "text-red mb-2 text-xs font-semibold",
@@ -2704,18 +3220,8 @@ function _n({ title: e = "Danger Zone", description: t, children: n, className:
2704
3220
  });
2705
3221
  }
2706
3222
  //#endregion
2707
- //#region src/hooks/useDropUp.ts
2708
- function vn(e, t, n) {
2709
- let [r, i] = d(!1);
2710
- return c(() => {
2711
- if (!e || !n.current || !t.current) return;
2712
- let r = t.current.getBoundingClientRect(), a = n.current.getBoundingClientRect();
2713
- i(window.innerHeight - r.bottom < a.height + 8);
2714
- }, [e]), r;
2715
- }
2716
- //#endregion
2717
3223
  //#region src/components/ui/DatePicker.tsx
2718
- function yn(e) {
3224
+ function kn(e) {
2719
3225
  return `${[
2720
3226
  "Jan",
2721
3227
  "Feb",
@@ -2731,9 +3237,9 @@ function yn(e) {
2731
3237
  "Dec"
2732
3238
  ][e.getMonth()]} ${e.getDate()}, ${e.getFullYear()}`;
2733
3239
  }
2734
- function bn({ label: e, value: t, onChange: n, placeholder: r = "Select date...", format: a = yn }) {
2735
- let [o, s] = d(!1), c = u(null), l = u(null), f = vn(o, c, l), h = /* @__PURE__ */ new Date(), [g, _] = d(t?.getFullYear() ?? h.getFullYear()), [v, y] = d(t?.getMonth() ?? h.getMonth());
2736
- W(o, i(() => s(!1), []), [c]);
3240
+ function An({ label: e, value: t, onChange: n, placeholder: r = "Select date...", format: a = kn }) {
3241
+ let [o, s] = d(!1), c = u(null), l = u(null), f = Gt(o, c, l), h = /* @__PURE__ */ new Date(), [g, _] = d(t?.getFullYear() ?? h.getFullYear()), [v, y] = d(t?.getMonth() ?? h.getMonth());
3242
+ G(o, i(() => s(!1), []), [c]);
2737
3243
  function b(e) {
2738
3244
  n(e), s(!1);
2739
3245
  }
@@ -2754,7 +3260,7 @@ function bn({ label: e, value: t, onChange: n, placeholder: r = "Select date..."
2754
3260
  onClick: S,
2755
3261
  "aria-haspopup": "dialog",
2756
3262
  "aria-expanded": o,
2757
- className: I("flex h-7 w-full cursor-pointer items-center rounded-md text-xs", "bg-bg-secondary border-border text-text-primary border", "hover:bg-bg-hover hover:border-border-strong", "transition-colors duration-[100ms]", "px-2 pr-7"),
3263
+ className: R("flex h-7 w-full cursor-pointer items-center rounded-md text-xs", "bg-bg-secondary border-border text-text-primary border", "hover:bg-bg-hover hover:border-border-strong", "transition-colors duration-[100ms]", "px-2 pr-7"),
2758
3264
  children: t ? a(t) : /* @__PURE__ */ p("span", {
2759
3265
  className: "text-text-disabled",
2760
3266
  children: r
@@ -2765,8 +3271,8 @@ function bn({ label: e, value: t, onChange: n, placeholder: r = "Select date..."
2765
3271
  ref: l,
2766
3272
  role: "dialog",
2767
3273
  "aria-label": "Choose date",
2768
- className: I("bg-bg-tertiary border-border-strong animate-scale-in absolute left-0 z-[100] rounded-md border p-3 shadow-lg", f ? "bottom-full mb-1" : "top-full mt-1"),
2769
- children: /* @__PURE__ */ p(X, {
3274
+ className: R("bg-bg-tertiary border-border-strong animate-scale-in absolute left-0 z-[100] rounded-md border p-3 shadow-lg", f ? "bottom-full mb-1" : "top-full mt-1"),
3275
+ children: /* @__PURE__ */ p(Tn, {
2770
3276
  year: g,
2771
3277
  month: v,
2772
3278
  selected: t,
@@ -2782,7 +3288,7 @@ function bn({ label: e, value: t, onChange: n, placeholder: r = "Select date..."
2782
3288
  }
2783
3289
  //#endregion
2784
3290
  //#region src/components/ui/DateRangePicker.tsx
2785
- var xn = [
3291
+ var jn = [
2786
3292
  "Jan",
2787
3293
  "Feb",
2788
3294
  "Mar",
@@ -2796,32 +3302,32 @@ var xn = [
2796
3302
  "Nov",
2797
3303
  "Dec"
2798
3304
  ];
2799
- function Sn(e) {
2800
- return `${xn[e.getMonth()]} ${e.getDate()}, ${e.getFullYear()}`;
3305
+ function Mn(e) {
3306
+ return `${jn[e.getMonth()]} ${e.getDate()}, ${e.getFullYear()}`;
2801
3307
  }
2802
- function Cn(e) {
2803
- return e.start && e.end ? `${Sn(e.start)} – ${Sn(e.end)}` : e.start ? Sn(e.start) : "";
3308
+ function Nn(e) {
3309
+ return e.start && e.end ? `${Mn(e.start)} – ${Mn(e.end)}` : e.start ? Mn(e.start) : "";
2804
3310
  }
2805
- function wn({ label: e, value: t, onChange: n, placeholder: r = "Select date range..." }) {
2806
- let [a, o] = d(!1), s = u(null), c = u(null), l = vn(a, s, c), f = /* @__PURE__ */ new Date(), [h, g] = d(t.start?.getFullYear() ?? f.getFullYear()), [_, v] = d(t.start?.getMonth() ?? f.getMonth()), [y, b] = d(null), [S, C] = d("start"), [w, T] = d(t.start), [E, D] = d(t.end);
2807
- W(a, i(() => o(!1), []), [s]);
3311
+ function Pn({ label: e, value: t, onChange: n, placeholder: r = "Select date range..." }) {
3312
+ let [a, o] = d(!1), s = u(null), c = u(null), l = Gt(a, s, c), f = /* @__PURE__ */ new Date(), [h, g] = d(t.start?.getFullYear() ?? f.getFullYear()), [_, v] = d(t.start?.getMonth() ?? f.getMonth()), [y, b] = d(null), [S, C] = d("start"), [w, T] = d(t.start), [E, D] = d(t.end);
3313
+ G(a, i(() => o(!1), []), [s]);
2808
3314
  let O = _ === 11 ? h + 1 : h, k = _ === 11 ? 0 : _ + 1;
2809
3315
  function A() {
2810
3316
  a || (T(t.start), D(t.end), C((t.start && t.end, "start")), t.start && (g(t.start.getFullYear()), v(t.start.getMonth()))), o(!a);
2811
3317
  }
2812
- function ee(e) {
3318
+ function j(e) {
2813
3319
  S === "start" ? (T(e), D(null), C("end")) : (w && e < w ? (D(w), T(e)) : D(e), C("start"), n({
2814
3320
  start: w && e < w ? e : w,
2815
3321
  end: w && e < w ? w : e
2816
3322
  }), o(!1));
2817
3323
  }
2818
- function j() {
3324
+ function M() {
2819
3325
  _ === 0 ? (g(h - 1), v(11)) : v(_ - 1);
2820
3326
  }
2821
- function te() {
3327
+ function ee() {
2822
3328
  _ === 11 ? (g(h + 1), v(0)) : v(_ + 1);
2823
3329
  }
2824
- let ne = t.start || t.end ? Cn(t) : "";
3330
+ let te = t.start || t.end ? Nn(t) : "";
2825
3331
  return /* @__PURE__ */ m("div", {
2826
3332
  className: "flex flex-col gap-1.5",
2827
3333
  ref: s,
@@ -2836,8 +3342,8 @@ function wn({ label: e, value: t, onChange: n, placeholder: r = "Select date ran
2836
3342
  onClick: A,
2837
3343
  "aria-haspopup": "dialog",
2838
3344
  "aria-expanded": a,
2839
- className: I("flex h-7 w-full cursor-pointer items-center rounded-md text-xs", "bg-bg-secondary border-border text-text-primary border", "hover:bg-bg-hover hover:border-border-strong", "transition-colors duration-[100ms]", "px-2 pr-7"),
2840
- children: ne || /* @__PURE__ */ p("span", {
3345
+ className: R("flex h-7 w-full cursor-pointer items-center rounded-md text-xs", "bg-bg-secondary border-border text-text-primary border", "hover:bg-bg-hover hover:border-border-strong", "transition-colors duration-[100ms]", "px-2 pr-7"),
3346
+ children: te || /* @__PURE__ */ p("span", {
2841
3347
  className: "text-text-disabled",
2842
3348
  children: r
2843
3349
  })
@@ -2847,13 +3353,13 @@ function wn({ label: e, value: t, onChange: n, placeholder: r = "Select date ran
2847
3353
  ref: c,
2848
3354
  role: "dialog",
2849
3355
  "aria-label": "Choose date range",
2850
- className: I("bg-bg-tertiary border-border-strong animate-scale-in absolute left-0 z-[100] rounded-md border p-3 shadow-lg", l ? "bottom-full mb-1" : "top-full mt-1"),
3356
+ className: R("bg-bg-tertiary border-border-strong animate-scale-in absolute left-0 z-[100] rounded-md border p-3 shadow-lg", l ? "bottom-full mb-1" : "top-full mt-1"),
2851
3357
  children: [/* @__PURE__ */ m("div", {
2852
3358
  className: "mb-2 flex items-center justify-between",
2853
3359
  children: [
2854
3360
  /* @__PURE__ */ p("button", {
2855
3361
  type: "button",
2856
- onClick: j,
3362
+ onClick: M,
2857
3363
  "aria-label": "Previous month",
2858
3364
  className: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover flex h-6 w-6 cursor-pointer items-center justify-center rounded-md transition-colors duration-[100ms]",
2859
3365
  children: /* @__PURE__ */ p("span", {
@@ -2868,7 +3374,7 @@ function wn({ label: e, value: t, onChange: n, placeholder: r = "Select date ran
2868
3374
  }),
2869
3375
  /* @__PURE__ */ p("button", {
2870
3376
  type: "button",
2871
- onClick: te,
3377
+ onClick: ee,
2872
3378
  "aria-label": "Next month",
2873
3379
  className: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover flex h-6 w-6 cursor-pointer items-center justify-center rounded-md transition-colors duration-[100ms]",
2874
3380
  children: /* @__PURE__ */ p("span", {
@@ -2879,24 +3385,24 @@ function wn({ label: e, value: t, onChange: n, placeholder: r = "Select date ran
2879
3385
  ]
2880
3386
  }), /* @__PURE__ */ m("div", {
2881
3387
  className: "flex gap-4",
2882
- children: [/* @__PURE__ */ p(X, {
3388
+ children: [/* @__PURE__ */ p(Tn, {
2883
3389
  year: h,
2884
3390
  month: _,
2885
3391
  rangeStart: w,
2886
3392
  rangeEnd: E,
2887
3393
  hoverDate: S === "end" ? y : null,
2888
- onSelect: ee,
3394
+ onSelect: j,
2889
3395
  onMonthChange: (e, t) => {
2890
3396
  g(e), v(t);
2891
3397
  },
2892
3398
  onHover: b
2893
- }), /* @__PURE__ */ p(X, {
3399
+ }), /* @__PURE__ */ p(Tn, {
2894
3400
  year: O,
2895
3401
  month: k,
2896
3402
  rangeStart: w,
2897
3403
  rangeEnd: E,
2898
3404
  hoverDate: S === "end" ? y : null,
2899
- onSelect: ee,
3405
+ onSelect: j,
2900
3406
  onMonthChange: (e, t) => {
2901
3407
  t === 0 ? (g(e - 1), v(11)) : (g(e), v(t - 1));
2902
3408
  },
@@ -2910,7 +3416,7 @@ function wn({ label: e, value: t, onChange: n, placeholder: r = "Select date ran
2910
3416
  }
2911
3417
  //#endregion
2912
3418
  //#region src/components/ui/DateTimePicker.tsx
2913
- var Tn = [
3419
+ var Fn = [
2914
3420
  "Jan",
2915
3421
  "Feb",
2916
3422
  "Mar",
@@ -2924,7 +3430,7 @@ var Tn = [
2924
3430
  "Nov",
2925
3431
  "Dec"
2926
3432
  ];
2927
- function En(e) {
3433
+ function In(e) {
2928
3434
  return e === 0 ? {
2929
3435
  hour12: 12,
2930
3436
  period: "AM"
@@ -2939,22 +3445,22 @@ function En(e) {
2939
3445
  period: "PM"
2940
3446
  };
2941
3447
  }
2942
- function Dn(e, t) {
3448
+ function Ln(e, t) {
2943
3449
  return t === "AM" ? e === 12 ? 0 : e : e === 12 ? 12 : e + 12;
2944
3450
  }
2945
- function On(e) {
2946
- let t = Tn[e.getMonth()], n = e.getDate(), r = e.getFullYear(), { hour12: i, period: a } = En(e.getHours());
3451
+ function Rn(e) {
3452
+ let t = Fn[e.getMonth()], n = e.getDate(), r = e.getFullYear(), { hour12: i, period: a } = In(e.getHours());
2947
3453
  return `${t} ${n}, ${r} ${i}:${String(e.getMinutes()).padStart(2, "0")} ${a}`;
2948
3454
  }
2949
- function kn(e) {
3455
+ function zn(e) {
2950
3456
  return String(e).padStart(2, "0");
2951
3457
  }
2952
- function An({ label: e, value: t, onChange: n, placeholder: r = "Select date & time..." }) {
2953
- let [a, o] = d(!1), s = u(null), c = u(null), l = vn(a, s, c), f = /* @__PURE__ */ new Date(), h = t ? En(t.getHours()) : {
3458
+ function Bn({ label: e, value: t, onChange: n, placeholder: r = "Select date & time..." }) {
3459
+ let [a, o] = d(!1), s = u(null), c = u(null), l = Gt(a, s, c), f = /* @__PURE__ */ new Date(), h = t ? In(t.getHours()) : {
2954
3460
  hour12: 12,
2955
3461
  period: "PM"
2956
- }, [g, _] = d(t?.getFullYear() ?? f.getFullYear()), [v, y] = d(t?.getMonth() ?? f.getMonth()), [b, S] = d(String(h.hour12)), [C, w] = d(t ? kn(t.getMinutes()) : "00"), [T, E] = d(h.period), [D, O] = d(t);
2957
- W(a, i(() => o(!1), []), [s]);
3462
+ }, [g, _] = d(t?.getFullYear() ?? f.getFullYear()), [v, y] = d(t?.getMonth() ?? f.getMonth()), [b, S] = d(String(h.hour12)), [C, w] = d(t ? zn(t.getMinutes()) : "00"), [T, E] = d(h.period), [D, O] = d(t);
3463
+ G(a, i(() => o(!1), []), [s]);
2958
3464
  function k(e) {
2959
3465
  O(e);
2960
3466
  }
@@ -2964,16 +3470,16 @@ function An({ label: e, value: t, onChange: n, placeholder: r = "Select date & t
2964
3470
  let n = parseInt(t, 10);
2965
3471
  !isNaN(n) && n >= 13 && n <= 23 ? (S(String(n - 12)), E("PM")) : n === 0 && (S("12"), E("AM"));
2966
3472
  }
2967
- function ee() {
3473
+ function j() {
2968
3474
  if (!D) return;
2969
- let e = Math.max(1, Math.min(12, parseInt(b, 10) || 12)), t = Math.max(0, Math.min(59, parseInt(C, 10) || 0)), r = Dn(e, T);
3475
+ let e = Math.max(1, Math.min(12, parseInt(b, 10) || 12)), t = Math.max(0, Math.min(59, parseInt(C, 10) || 0)), r = Ln(e, T);
2970
3476
  n(new Date(D.getFullYear(), D.getMonth(), D.getDate(), r, t)), o(!1);
2971
3477
  }
2972
- function j() {
3478
+ function M() {
2973
3479
  if (!a && t) {
2974
3480
  _(t.getFullYear()), y(t.getMonth()), O(t);
2975
- let e = En(t.getHours());
2976
- S(String(e.hour12)), E(e.period), w(kn(t.getMinutes()));
3481
+ let e = In(t.getHours());
3482
+ S(String(e.hour12)), E(e.period), w(zn(t.getMinutes()));
2977
3483
  }
2978
3484
  o(!a);
2979
3485
  }
@@ -2988,11 +3494,11 @@ function An({ label: e, value: t, onChange: n, placeholder: r = "Select date & t
2988
3494
  children: [
2989
3495
  /* @__PURE__ */ p("button", {
2990
3496
  type: "button",
2991
- onClick: j,
3497
+ onClick: M,
2992
3498
  "aria-haspopup": "dialog",
2993
3499
  "aria-expanded": a,
2994
- className: I("flex h-7 w-full cursor-pointer items-center rounded-md text-xs", "bg-bg-secondary border-border text-text-primary border", "hover:bg-bg-hover hover:border-border-strong", "transition-colors duration-[100ms]", "px-2 pr-7"),
2995
- children: t ? On(t) : /* @__PURE__ */ p("span", {
3500
+ className: R("flex h-7 w-full cursor-pointer items-center rounded-md text-xs", "bg-bg-secondary border-border text-text-primary border", "hover:bg-bg-hover hover:border-border-strong", "transition-colors duration-[100ms]", "px-2 pr-7"),
3501
+ children: t ? Rn(t) : /* @__PURE__ */ p("span", {
2996
3502
  className: "text-text-disabled",
2997
3503
  children: r
2998
3504
  })
@@ -3002,8 +3508,8 @@ function An({ label: e, value: t, onChange: n, placeholder: r = "Select date & t
3002
3508
  ref: c,
3003
3509
  role: "dialog",
3004
3510
  "aria-label": "Choose date and time",
3005
- className: I("bg-bg-tertiary border-border-strong animate-scale-in absolute left-0 z-[100] rounded-md border p-3 shadow-lg", l ? "bottom-full mb-1" : "top-full mt-1"),
3006
- children: [/* @__PURE__ */ p(X, {
3511
+ className: R("bg-bg-tertiary border-border-strong animate-scale-in absolute left-0 z-[100] rounded-md border p-3 shadow-lg", l ? "bottom-full mb-1" : "top-full mt-1"),
3512
+ children: [/* @__PURE__ */ p(Tn, {
3007
3513
  year: g,
3008
3514
  month: v,
3009
3515
  selected: D,
@@ -3053,21 +3559,21 @@ function An({ label: e, value: t, onChange: n, placeholder: r = "Select date & t
3053
3559
  type: "button",
3054
3560
  onClick: () => E("AM"),
3055
3561
  "aria-pressed": T === "AM",
3056
- className: I("text-2xs cursor-pointer px-2 py-0.5 font-medium transition-colors duration-[100ms]", T === "AM" ? "bg-accent text-text-on-accent" : "bg-bg-secondary text-text-secondary hover:bg-bg-hover"),
3562
+ className: R("text-2xs cursor-pointer px-2 py-0.5 font-medium transition-colors duration-[100ms]", T === "AM" ? "bg-accent text-text-on-accent" : "bg-bg-secondary text-text-secondary hover:bg-bg-hover"),
3057
3563
  children: "AM"
3058
3564
  }), /* @__PURE__ */ p("button", {
3059
3565
  type: "button",
3060
3566
  onClick: () => E("PM"),
3061
3567
  "aria-pressed": T === "PM",
3062
- className: I("text-2xs cursor-pointer px-2 py-0.5 font-medium transition-colors duration-[100ms]", T === "PM" ? "bg-accent text-text-on-accent" : "bg-bg-secondary text-text-secondary hover:bg-bg-hover"),
3568
+ className: R("text-2xs cursor-pointer px-2 py-0.5 font-medium transition-colors duration-[100ms]", T === "PM" ? "bg-accent text-text-on-accent" : "bg-bg-secondary text-text-secondary hover:bg-bg-hover"),
3063
3569
  children: "PM"
3064
3570
  })]
3065
3571
  }),
3066
3572
  /* @__PURE__ */ p("button", {
3067
3573
  type: "button",
3068
- onClick: ee,
3574
+ onClick: j,
3069
3575
  disabled: !D,
3070
- className: I("ml-auto h-6 rounded-md px-3 text-xs font-medium transition-colors duration-[100ms]", D ? "bg-accent text-text-on-accent hover:bg-accent-hover cursor-pointer" : "bg-bg-hover text-text-disabled cursor-not-allowed"),
3576
+ className: R("ml-auto h-6 rounded-md px-3 text-xs font-medium transition-colors duration-[100ms]", D ? "bg-accent text-text-on-accent hover:bg-accent-hover cursor-pointer" : "bg-bg-hover text-text-disabled cursor-not-allowed"),
3071
3577
  children: "Apply"
3072
3578
  })
3073
3579
  ]
@@ -3079,8 +3585,8 @@ function An({ label: e, value: t, onChange: n, placeholder: r = "Select date & t
3079
3585
  }
3080
3586
  //#endregion
3081
3587
  //#region src/components/ui/DetailPanel.tsx
3082
- var jn = 360, Mn = 260, Nn = 700;
3083
- function Pn({ open: e, onClose: t, title: n, children: r, className: a, resizable: s = !0, defaultWidth: c = jn, minWidth: l = Mn, maxWidth: f = Nn }) {
3588
+ var Vn = 360, Hn = 260, Un = 700;
3589
+ function Wn({ open: e, onClose: t, title: n, children: r, className: a, resizable: s = !0, defaultWidth: c = Vn, minWidth: l = Hn, maxWidth: f = Un }) {
3084
3590
  let [h, g] = d(c), _ = u(!1), v = u(0), y = u(0);
3085
3591
  o(() => {
3086
3592
  if (!e) return;
@@ -3099,7 +3605,7 @@ function Pn({ open: e, onClose: t, title: n, children: r, className: a, resizabl
3099
3605
  _.current = !1;
3100
3606
  }, []);
3101
3607
  return /* @__PURE__ */ p("div", {
3102
- className: I("border-border bg-bg-secondary relative shrink-0 overflow-hidden border-l", "transition-[width] duration-[200ms] ease-out", a),
3608
+ className: R("border-border bg-bg-secondary relative shrink-0 overflow-hidden border-l", "transition-[width] duration-[200ms] ease-out", a),
3103
3609
  style: { width: e ? h : 0 },
3104
3610
  children: e && /* @__PURE__ */ m("div", {
3105
3611
  className: "animate-fade-in flex h-full flex-col",
@@ -3120,7 +3626,7 @@ function Pn({ open: e, onClose: t, title: n, children: r, className: a, resizabl
3120
3626
  onClick: t,
3121
3627
  className: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover flex h-6 w-6 cursor-pointer items-center justify-center rounded",
3122
3628
  "aria-label": "Close panel",
3123
- children: /* @__PURE__ */ p(N, { className: "h-3.5 w-3.5" })
3629
+ children: /* @__PURE__ */ p(F, { className: "h-3.5 w-3.5" })
3124
3630
  })]
3125
3631
  }),
3126
3632
  /* @__PURE__ */ p("div", {
@@ -3133,9 +3639,9 @@ function Pn({ open: e, onClose: t, title: n, children: r, className: a, resizabl
3133
3639
  }
3134
3640
  //#endregion
3135
3641
  //#region src/components/ui/Dialog.tsx
3136
- function Fn({ open: e, onClose: t, title: n, children: r, footer: i, className: a }) {
3642
+ function Gn({ open: e, onClose: t, title: n, children: r, footer: i, className: a }) {
3137
3643
  let c = u(null), l = s();
3138
- return B(c, e), o(() => {
3644
+ return V(c, e), o(() => {
3139
3645
  if (!e) return;
3140
3646
  let n = (e) => {
3141
3647
  e.key === "Escape" && t();
@@ -3143,14 +3649,14 @@ function Fn({ open: e, onClose: t, title: n, children: r, footer: i, className:
3143
3649
  return document.addEventListener("keydown", n), document.body.style.overflow = "hidden", () => {
3144
3650
  document.removeEventListener("keydown", n), document.body.style.overflow = "";
3145
3651
  };
3146
- }, [e, t]), e ? P(/* @__PURE__ */ m("div", {
3652
+ }, [e, t]), e ? I(/* @__PURE__ */ m("div", {
3147
3653
  className: "fixed inset-0 z-50 flex items-start justify-center overflow-y-auto pt-4 md:pt-[5vh]",
3148
3654
  children: [/* @__PURE__ */ p("div", {
3149
3655
  className: "bg-bg-overlay fixed inset-0",
3150
3656
  onClick: t
3151
3657
  }), /* @__PURE__ */ m("div", {
3152
3658
  ref: c,
3153
- className: I("relative z-50 mx-4 mb-8 w-full max-w-[400px] p-6", "bg-bg-secondary border-border rounded-lg border", "animate-scale-in shadow-lg", a),
3659
+ className: R("relative z-50 mx-4 mb-8 w-full max-w-[400px] p-6", "bg-bg-secondary border-border rounded-lg border", "animate-scale-in shadow-lg", a),
3154
3660
  role: "dialog",
3155
3661
  "aria-modal": "true",
3156
3662
  "aria-labelledby": n ? l : void 0,
@@ -3166,7 +3672,7 @@ function Fn({ open: e, onClose: t, title: n, children: r, footer: i, className:
3166
3672
  onClick: t,
3167
3673
  className: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover ml-auto flex h-6 w-6 cursor-pointer items-center justify-center rounded transition-colors duration-[100ms]",
3168
3674
  "aria-label": "Close",
3169
- children: /* @__PURE__ */ p(N, { className: "h-4 w-4" })
3675
+ children: /* @__PURE__ */ p(F, { className: "h-4 w-4" })
3170
3676
  })]
3171
3677
  }),
3172
3678
  r,
@@ -3177,15 +3683,15 @@ function Fn({ open: e, onClose: t, title: n, children: r, footer: i, className:
3177
3683
  }
3178
3684
  //#endregion
3179
3685
  //#region src/components/ui/DialogActions.tsx
3180
- function In({ onCancel: e, onConfirm: t, cancelLabel: n = "Cancel", confirmLabel: r = "Confirm", confirmVariant: i = "primary", className: a }) {
3686
+ function Kn({ onCancel: e, onConfirm: t, cancelLabel: n = "Cancel", confirmLabel: r = "Confirm", confirmVariant: i = "primary", className: a }) {
3181
3687
  return /* @__PURE__ */ m("div", {
3182
- className: I("flex justify-end gap-2", a),
3183
- children: [/* @__PURE__ */ p(J, {
3688
+ className: R("flex justify-end gap-2", a),
3689
+ children: [/* @__PURE__ */ p(q, {
3184
3690
  variant: "ghost",
3185
3691
  size: "sm",
3186
3692
  onClick: e,
3187
3693
  children: n
3188
- }), /* @__PURE__ */ p(J, {
3694
+ }), /* @__PURE__ */ p(q, {
3189
3695
  variant: i,
3190
3696
  size: "sm",
3191
3697
  onClick: t,
@@ -3195,9 +3701,9 @@ function In({ onCancel: e, onConfirm: t, cancelLabel: n = "Cancel", confirmLabel
3195
3701
  }
3196
3702
  //#endregion
3197
3703
  //#region src/components/ui/DividerLabel.tsx
3198
- function Ln({ children: e, className: t }) {
3704
+ function qn({ children: e, className: t }) {
3199
3705
  return /* @__PURE__ */ m("div", {
3200
- className: I("relative my-6", t),
3706
+ className: R("relative my-6", t),
3201
3707
  children: [/* @__PURE__ */ p("div", {
3202
3708
  className: "absolute inset-0 flex items-center",
3203
3709
  children: /* @__PURE__ */ p("div", { className: "border-border w-full border-t" })
@@ -3212,7 +3718,7 @@ function Ln({ children: e, className: t }) {
3212
3718
  }
3213
3719
  //#endregion
3214
3720
  //#region src/components/ui/DropdownMenu.tsx
3215
- function Rn({ trigger: e, items: t, align: n = "right" }) {
3721
+ function Jn({ trigger: e, items: t, align: n = "right" }) {
3216
3722
  let [r, a] = d(!1), [s, c] = d({
3217
3723
  top: 0,
3218
3724
  left: 0,
@@ -3220,7 +3726,7 @@ function Rn({ trigger: e, items: t, align: n = "right" }) {
3220
3726
  }), [h, g] = d(-1), _ = u(null), v = u(null), y = l(() => t.filter((e) => !e.divider), [t]), b = i(() => {
3221
3727
  a(!1), g(-1);
3222
3728
  }, []);
3223
- W(r, b, [v], [_]), o(() => {
3729
+ G(r, b, [v], [_]), o(() => {
3224
3730
  if (!r) return;
3225
3731
  let e = (e) => {
3226
3732
  e.key === "ArrowDown" ? (e.preventDefault(), g((e) => (e + 1) % y.length)) : e.key === "ArrowUp" ? (e.preventDefault(), g((e) => (e - 1 + y.length) % y.length)) : e.key === "Enter" && h >= 0 && (e.preventDefault(), y[h].onClick(), b());
@@ -3248,7 +3754,7 @@ function Rn({ trigger: e, items: t, align: n = "right" }) {
3248
3754
  ref: _,
3249
3755
  onClick: x,
3250
3756
  children: e
3251
- }), r && P(/* @__PURE__ */ p("div", {
3757
+ }), r && I(/* @__PURE__ */ p("div", {
3252
3758
  ref: v,
3253
3759
  role: "menu",
3254
3760
  className: "bg-bg-tertiary border-border-strong animate-scale-in fixed z-[100] w-max rounded-md border py-1 shadow-lg",
@@ -3271,7 +3777,7 @@ function Rn({ trigger: e, items: t, align: n = "right" }) {
3271
3777
  e.onClick(), b();
3272
3778
  },
3273
3779
  onMouseEnter: () => g(n),
3274
- className: I("flex h-7 w-full cursor-pointer items-center gap-2 px-4 text-left text-xs", "transition-colors duration-[100ms]", "focus:outline-none", e.danger ? "text-red hover:bg-red-muted focus:bg-red-muted" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover focus:text-text-primary focus:bg-bg-hover"),
3780
+ className: R("flex h-7 w-full cursor-pointer items-center gap-2 px-4 text-left text-xs", "transition-colors duration-[100ms]", "focus:outline-none", e.danger ? "text-red hover:bg-red-muted focus:bg-red-muted" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover focus:text-text-primary focus:bg-bg-hover"),
3275
3781
  children: [
3276
3782
  e.icon && /* @__PURE__ */ p("span", {
3277
3783
  className: "flex h-3.5 w-3.5 shrink-0 items-center",
@@ -3293,13 +3799,13 @@ function Rn({ trigger: e, items: t, align: n = "right" }) {
3293
3799
  }
3294
3800
  //#endregion
3295
3801
  //#region src/components/ui/EmptyState.tsx
3296
- function zn({ icon: e, title: t, description: n, action: r, className: i }) {
3802
+ function Yn({ icon: e, title: t, description: n, action: r, className: i }) {
3297
3803
  return /* @__PURE__ */ m("div", {
3298
- className: I("flex flex-col items-center justify-center px-4 py-12", i),
3804
+ className: R("flex flex-col items-center justify-center px-4 py-12", i),
3299
3805
  children: [
3300
3806
  /* @__PURE__ */ p("div", {
3301
3807
  className: "bg-bg-tertiary text-text-tertiary mb-3 flex h-10 w-10 items-center justify-center rounded-md",
3302
- children: e || /* @__PURE__ */ p(ee, { className: "h-5 w-5" })
3808
+ children: e || /* @__PURE__ */ p(j, { className: "h-5 w-5" })
3303
3809
  }),
3304
3810
  /* @__PURE__ */ p("p", {
3305
3811
  className: "text-text-primary mb-1 text-sm font-medium",
@@ -3318,7 +3824,7 @@ function zn({ icon: e, title: t, description: n, action: r, className: i }) {
3318
3824
  }
3319
3825
  //#endregion
3320
3826
  //#region src/components/ui/ErrorBoundary.tsx
3321
- var Bn = class extends e {
3827
+ var Xn = class extends e {
3322
3828
  state = {
3323
3829
  hasError: !1,
3324
3830
  error: null
@@ -3344,7 +3850,7 @@ var Bn = class extends e {
3344
3850
  className: "text-text-secondary mb-6 max-w-md text-xs",
3345
3851
  children: this.state.error?.message ?? "An unexpected error occurred."
3346
3852
  }),
3347
- /* @__PURE__ */ p(J, {
3853
+ /* @__PURE__ */ p(q, {
3348
3854
  variant: "secondary",
3349
3855
  onClick: () => {
3350
3856
  this.setState({
@@ -3360,10 +3866,10 @@ var Bn = class extends e {
3360
3866
  };
3361
3867
  //#endregion
3362
3868
  //#region src/components/ui/FilterDropdown.tsx
3363
- function Vn({ icon: e, children: t, items: n, align: r, className: i }) {
3364
- return /* @__PURE__ */ p(Rn, {
3869
+ function Zn({ icon: e, children: t, items: n, align: r, className: i }) {
3870
+ return /* @__PURE__ */ p(Jn, {
3365
3871
  align: r,
3366
- trigger: /* @__PURE__ */ p(Gt, {
3872
+ trigger: /* @__PURE__ */ p(sn, {
3367
3873
  icon: e,
3368
3874
  className: i,
3369
3875
  children: t
@@ -3373,30 +3879,30 @@ function Vn({ icon: e, children: t, items: n, align: r, className: i }) {
3373
3879
  }
3374
3880
  //#endregion
3375
3881
  //#region src/components/ui/Kbd.tsx
3376
- function Hn({ children: e, className: t }) {
3882
+ function Qn({ children: e, className: t }) {
3377
3883
  return /* @__PURE__ */ p("kbd", {
3378
- className: I("text-2xs inline-flex items-center px-1.5 py-0.5 font-mono font-medium", "bg-bg-tertiary text-text-secondary border-border rounded border", t),
3884
+ className: R("text-2xs inline-flex items-center px-1.5 py-0.5 font-mono font-medium", "bg-bg-tertiary text-text-secondary border-border rounded border", t),
3379
3885
  children: e
3380
3886
  });
3381
3887
  }
3382
3888
  //#endregion
3383
3889
  //#region src/components/ui/LoadingSpinner.tsx
3384
- var Un = {
3890
+ var $n = {
3385
3891
  sm: "w-4 h-4",
3386
3892
  md: "w-6 h-6",
3387
3893
  lg: "w-8 h-8"
3388
3894
  };
3389
- function Wn({ className: e, size: t = "md" }) {
3895
+ function er({ className: e, size: t = "md" }) {
3390
3896
  return /* @__PURE__ */ p("div", {
3391
- className: I("flex min-h-[200px] items-center justify-center", e),
3392
- children: /* @__PURE__ */ p(te, { className: I("text-accent animate-spin", Un[t]) })
3897
+ className: R("flex min-h-[200px] items-center justify-center", e),
3898
+ children: /* @__PURE__ */ p(ee, { className: R("text-accent animate-spin", $n[t]) })
3393
3899
  });
3394
3900
  }
3395
3901
  //#endregion
3396
3902
  //#region src/components/ui/MetadataGrid.tsx
3397
- function Gn({ items: e, labelWidth: n = "100px", className: r }) {
3903
+ function tr({ items: e, labelWidth: n = "100px", className: r }) {
3398
3904
  return /* @__PURE__ */ p("div", {
3399
- className: I("gap-x-3 gap-y-2 text-xs", r),
3905
+ className: R("gap-x-3 gap-y-2 text-xs", r),
3400
3906
  style: {
3401
3907
  display: "grid",
3402
3908
  gridTemplateColumns: `${n} 1fr`
@@ -3412,11 +3918,11 @@ function Gn({ items: e, labelWidth: n = "100px", className: r }) {
3412
3918
  }
3413
3919
  //#endregion
3414
3920
  //#region src/components/ui/MetricCard.tsx
3415
- function Kn({ label: e, value: t, sub: n, bar: r, icon: i, iconColor: a, className: o }) {
3921
+ function nr({ label: e, value: t, sub: n, bar: r, icon: i, iconColor: a, className: o }) {
3416
3922
  return /* @__PURE__ */ m("div", {
3417
- className: I("bg-bg-secondary border-border relative overflow-hidden rounded-md border p-3", o),
3923
+ className: R("bg-bg-secondary border-border relative overflow-hidden rounded-md border p-3", o),
3418
3924
  children: [
3419
- i && /* @__PURE__ */ p(i, { className: I("absolute -right-9 -bottom-9 h-44 w-44 -rotate-45 opacity-[0.06]", a) }),
3925
+ i && /* @__PURE__ */ p(i, { className: R("absolute -right-9 -bottom-9 h-44 w-44 -rotate-45 opacity-[0.06]", a) }),
3420
3926
  /* @__PURE__ */ p("p", {
3421
3927
  className: "text-2xs-f text-text-tertiary font-label mb-1 font-medium tracking-wider uppercase",
3422
3928
  children: e
@@ -3441,7 +3947,7 @@ function Kn({ label: e, value: t, sub: n, bar: r, icon: i, iconColor: a, classNa
3441
3947
  }
3442
3948
  //#endregion
3443
3949
  //#region src/components/ui/OAuthButton.tsx
3444
- function qn() {
3950
+ function rr() {
3445
3951
  return /* @__PURE__ */ m("svg", {
3446
3952
  className: "h-3.5 w-3.5",
3447
3953
  viewBox: "0 0 24 24",
@@ -3466,7 +3972,7 @@ function qn() {
3466
3972
  ]
3467
3973
  });
3468
3974
  }
3469
- function Jn() {
3975
+ function ir() {
3470
3976
  return /* @__PURE__ */ p("svg", {
3471
3977
  className: "h-3.5 w-3.5",
3472
3978
  viewBox: "0 0 24 24",
@@ -3475,27 +3981,27 @@ function Jn() {
3475
3981
  children: /* @__PURE__ */ p("path", { d: "M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z" })
3476
3982
  });
3477
3983
  }
3478
- var Yn = {
3984
+ var ar = {
3479
3985
  github: "GitHub",
3480
3986
  google: "Google"
3481
- }, Xn = {
3482
- github: Jn,
3483
- google: qn
3987
+ }, or = {
3988
+ github: ir,
3989
+ google: rr
3484
3990
  };
3485
- function Zn({ provider: e, children: t, ...n }) {
3486
- let r = Xn[e];
3487
- return /* @__PURE__ */ m(J, {
3991
+ function sr({ provider: e, children: t, ...n }) {
3992
+ let r = or[e];
3993
+ return /* @__PURE__ */ m(q, {
3488
3994
  variant: "secondary",
3489
3995
  size: "md",
3490
3996
  ...n,
3491
- children: [/* @__PURE__ */ p(r, {}), t ?? Yn[e]]
3997
+ children: [/* @__PURE__ */ p(r, {}), t ?? ar[e]]
3492
3998
  });
3493
3999
  }
3494
4000
  //#endregion
3495
4001
  //#region src/components/ui/PageHeader.tsx
3496
- function Qn({ title: e, subtitle: t, actions: n, className: r }) {
4002
+ function cr({ title: e, subtitle: t, actions: n, className: r }) {
3497
4003
  return /* @__PURE__ */ m("div", {
3498
- className: I("flex items-center justify-between", r),
4004
+ className: R("flex items-center justify-between", r),
3499
4005
  children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h1", {
3500
4006
  className: "text-text-primary font-heading text-sm font-semibold",
3501
4007
  children: e
@@ -3510,11 +4016,11 @@ function Qn({ title: e, subtitle: t, actions: n, className: r }) {
3510
4016
  }
3511
4017
  //#endregion
3512
4018
  //#region src/components/ui/PageSection.tsx
3513
- function $n({ title: e, description: t, actions: n, children: r, as: i = "h2", className: a, headerClassName: o, contentClassName: s }) {
4019
+ function lr({ title: e, description: t, actions: n, children: r, as: i = "h2", className: a, headerClassName: o, contentClassName: s }) {
3514
4020
  return /* @__PURE__ */ m("section", {
3515
- className: I("space-y-4", a),
4021
+ className: R("space-y-4", a),
3516
4022
  children: [(e || t || n) && /* @__PURE__ */ m("div", {
3517
- className: I("border-border flex items-end justify-between gap-3 border-b pb-2", o),
4023
+ className: R("border-border flex items-end justify-between gap-3 border-b pb-2", o),
3518
4024
  children: [/* @__PURE__ */ m("div", {
3519
4025
  className: "min-w-0",
3520
4026
  children: [e && /* @__PURE__ */ p(i, {
@@ -3535,95 +4041,8 @@ function $n({ title: e, description: t, actions: n, children: r, as: i = "h2", c
3535
4041
  });
3536
4042
  }
3537
4043
  //#endregion
3538
- //#region src/components/ui/SelectDropdown.tsx
3539
- function er({ options: e, value: t, onChange: n, label: r, placeholder: a = "Select...", className: o, size: c = "md" }) {
3540
- let [l, f] = d(!1), [h, g] = d(-1), _ = u(null), v = u(null), y = vn(l, _, v), b = s(), x = `${b}-listbox`, C = e.find((e) => e.value === t);
3541
- W(l, i(() => f(!1), []), [_]);
3542
- function T() {
3543
- if (!l) {
3544
- let n = e.findIndex((e) => e.value === t);
3545
- g(n >= 0 ? n : 0);
3546
- }
3547
- f(!l);
3548
- }
3549
- function E(r) {
3550
- if (!l) {
3551
- if (r.key === "ArrowDown" || r.key === "ArrowUp") {
3552
- r.preventDefault();
3553
- let n = e.findIndex((e) => e.value === t);
3554
- g(n >= 0 ? n : 0), f(!0);
3555
- }
3556
- return;
3557
- }
3558
- switch (r.key) {
3559
- case "ArrowDown":
3560
- r.preventDefault(), g((t) => Math.min(t + 1, e.length - 1));
3561
- break;
3562
- case "ArrowUp":
3563
- r.preventDefault(), g((e) => Math.max(e - 1, 0));
3564
- break;
3565
- case "Enter":
3566
- r.preventDefault(), e[h] && (n(e[h].value), f(!1));
3567
- break;
3568
- case "Escape":
3569
- r.preventDefault(), f(!1);
3570
- break;
3571
- }
3572
- }
3573
- return /* @__PURE__ */ m("div", {
3574
- className: I("flex flex-col gap-1.5", o),
3575
- ref: _,
3576
- children: [r && /* @__PURE__ */ p("span", {
3577
- className: "text-text-secondary font-label text-xs font-medium",
3578
- children: r
3579
- }), /* @__PURE__ */ m("div", {
3580
- className: "relative",
3581
- children: [
3582
- /* @__PURE__ */ p("button", {
3583
- type: "button",
3584
- onClick: T,
3585
- onKeyDown: E,
3586
- "aria-haspopup": "listbox",
3587
- "aria-expanded": l,
3588
- "aria-controls": l ? x : void 0,
3589
- "aria-activedescendant": l && h >= 0 ? `${b}-option-${h}` : void 0,
3590
- className: I("font-control flex w-full cursor-pointer items-center rounded-md text-xs", "bg-bg-secondary border-border text-text-primary border", "hover:bg-bg-hover hover:border-border-strong", "transition-colors duration-[100ms]", "focus-visible:outline-accent focus-visible:outline-2 focus-visible:outline-offset-2", c === "sm" ? "h-6 px-2 pr-6" : "h-7 px-2 pr-7"),
3591
- children: C ? C.label : /* @__PURE__ */ p("span", {
3592
- className: "text-text-disabled",
3593
- children: a
3594
- })
3595
- }),
3596
- /* @__PURE__ */ p(w, { className: I("text-text-tertiary pointer-events-none absolute top-1/2 h-3 w-3 -translate-y-1/2 transition-transform", c === "sm" ? "right-1.5" : "right-2", l && "rotate-180") }),
3597
- l && /* @__PURE__ */ p("div", {
3598
- ref: v,
3599
- className: I("bg-bg-tertiary border-border-strong animate-scale-in absolute right-0 left-0 z-[100] overflow-hidden rounded-md border shadow-lg", y ? "bottom-full mb-1" : "top-full mt-1"),
3600
- children: /* @__PURE__ */ p("ul", {
3601
- id: x,
3602
- className: "max-h-48 overflow-y-auto py-1",
3603
- role: "listbox",
3604
- children: e.map((e, r) => /* @__PURE__ */ m("li", {
3605
- id: `${b}-option-${r}`,
3606
- role: "option",
3607
- "aria-selected": e.value === t,
3608
- onClick: () => {
3609
- n(e.value), f(!1);
3610
- },
3611
- onMouseEnter: () => g(r),
3612
- className: I("font-control flex h-7 w-full cursor-pointer items-center gap-2 px-3 text-xs", "transition-colors duration-[100ms]", r === h ? "bg-accent-muted text-accent" : e.value === t ? "text-accent" : "text-text-secondary hover:text-text-primary hover:bg-bg-hover"),
3613
- children: [/* @__PURE__ */ p("span", {
3614
- className: "flex-1 truncate",
3615
- children: e.label
3616
- }), e.value === t && /* @__PURE__ */ p(S, { className: "h-3 w-3 shrink-0" })]
3617
- }, e.value))
3618
- })
3619
- })
3620
- ]
3621
- })]
3622
- });
3623
- }
3624
- //#endregion
3625
4044
  //#region src/components/ui/PaginationBar.tsx
3626
- var tr = [
4045
+ var ur = [
3627
4046
  {
3628
4047
  value: "10",
3629
4048
  label: "10 per page"
@@ -3637,13 +4056,13 @@ var tr = [
3637
4056
  label: "50 per page"
3638
4057
  }
3639
4058
  ];
3640
- function nr({ page: e, pageSize: t, total: n, pageSizeOptions: r = tr, onPageChange: i, onPageSizeChange: a, className: o }) {
4059
+ function dr({ page: e, pageSize: t, total: n, pageSizeOptions: r = ur, onPageChange: i, onPageSizeChange: a, className: o }) {
3641
4060
  let s = Math.ceil(n / t), c = Math.min((e - 1) * t + 1, n), l = Math.min(e * t, n);
3642
4061
  return /* @__PURE__ */ m("div", {
3643
- className: I("flex items-center justify-between", o),
4062
+ className: R("flex items-center justify-between", o),
3644
4063
  children: [/* @__PURE__ */ m("div", {
3645
4064
  className: "flex items-center gap-3",
3646
- children: [/* @__PURE__ */ p(er, {
4065
+ children: [/* @__PURE__ */ p(Y, {
3647
4066
  size: "sm",
3648
4067
  value: String(t),
3649
4068
  onChange: (e) => a(Number(e)),
@@ -3659,7 +4078,7 @@ function nr({ page: e, pageSize: t, total: n, pageSizeOptions: r = tr, onPageCha
3659
4078
  n
3660
4079
  ]
3661
4080
  })]
3662
- }), /* @__PURE__ */ p(qt, {
4081
+ }), /* @__PURE__ */ p(ln, {
3663
4082
  page: e,
3664
4083
  totalPages: s,
3665
4084
  onPageChange: i
@@ -3668,7 +4087,7 @@ function nr({ page: e, pageSize: t, total: n, pageSizeOptions: r = tr, onPageCha
3668
4087
  }
3669
4088
  //#endregion
3670
4089
  //#region src/components/ui/PasswordInput.tsx
3671
- var rr = r(({ label: e, error: t, className: n, id: r, ...i }, a) => {
4090
+ var fr = r(({ label: e, error: t, className: n, id: r, ...i }, a) => {
3672
4091
  let o = r || e?.toLowerCase().replace(/\s+/g, "-"), [s, c] = d(!1);
3673
4092
  return /* @__PURE__ */ m("div", {
3674
4093
  className: "flex flex-col gap-1.5",
@@ -3688,7 +4107,7 @@ var rr = r(({ label: e, error: t, className: n, id: r, ...i }, a) => {
3688
4107
  ref: a,
3689
4108
  id: o,
3690
4109
  type: s ? "text" : "password",
3691
- className: I("bg-bg-secondary text-text-primary h-7 w-full rounded-md border px-2 pr-8 text-xs", "placeholder:text-text-disabled", "transition-colors duration-[100ms]", "focus:border-accent focus:outline-none", t ? "border-red" : "border-border", n),
4110
+ className: R("bg-bg-secondary text-text-primary h-7 w-full rounded-md border px-2 pr-8 text-xs", "placeholder:text-text-disabled", "transition-colors duration-[100ms]", "focus:border-accent focus:outline-none", t ? "border-red" : "border-border", n),
3692
4111
  ...i
3693
4112
  }), /* @__PURE__ */ p("button", {
3694
4113
  type: "button",
@@ -3700,14 +4119,14 @@ var rr = r(({ label: e, error: t, className: n, id: r, ...i }, a) => {
3700
4119
  })]
3701
4120
  });
3702
4121
  });
3703
- rr.displayName = "PasswordInput";
4122
+ fr.displayName = "PasswordInput";
3704
4123
  //#endregion
3705
4124
  //#region src/components/ui/ProfileHeader.tsx
3706
- function ir({ name: e, subtitle: t, badge: n, meta: r, action: i, className: a }) {
4125
+ function pr({ name: e, subtitle: t, badge: n, meta: r, action: i, className: a }) {
3707
4126
  return /* @__PURE__ */ m("div", {
3708
- className: I("flex items-start gap-4", a),
4127
+ className: R("flex items-start gap-4", a),
3709
4128
  children: [
3710
- /* @__PURE__ */ p(q, {
4129
+ /* @__PURE__ */ p(yt, {
3711
4130
  name: e,
3712
4131
  size: "lg"
3713
4132
  }),
@@ -3751,54 +4170,46 @@ function ir({ name: e, subtitle: t, badge: n, meta: r, action: i, className: a }
3751
4170
  }
3752
4171
  //#endregion
3753
4172
  //#region src/components/ui/ProseContent.tsx
3754
- function ar({ children: e, className: t }) {
4173
+ function mr({ children: e, className: t }) {
3755
4174
  return /* @__PURE__ */ p("div", {
3756
- className: I("ui-prose", t),
4175
+ className: R("ui-prose", t),
3757
4176
  children: e
3758
4177
  });
3759
4178
  }
3760
4179
  //#endregion
3761
4180
  //#region src/components/ui/RadioPill.tsx
3762
- function or({ options: e, value: t, onChange: n, disabled: r, className: i, "aria-label": a }) {
4181
+ function hr({ options: e, value: t, onChange: n, disabled: r, className: i, "aria-label": a }) {
3763
4182
  return /* @__PURE__ */ p("div", {
3764
4183
  role: "radiogroup",
3765
4184
  "aria-label": a,
3766
- className: I("border-border inline-flex overflow-hidden rounded-md border", r && "cursor-not-allowed opacity-40", i),
4185
+ className: R("border-border inline-flex overflow-hidden rounded-md border", r && "cursor-not-allowed opacity-40", i),
3767
4186
  children: e.map((e) => /* @__PURE__ */ p("button", {
3768
4187
  role: "radio",
3769
4188
  "aria-checked": e.value === t,
3770
4189
  disabled: r,
3771
4190
  onClick: () => n(e.value),
3772
- className: I("font-control px-3 py-1.5 text-xs font-medium transition-colors duration-[100ms]", "focus-visible:outline-accent focus-visible:outline-2 focus-visible:outline-offset-[-2px]", !r && "cursor-pointer", e.value === t ? "bg-accent text-text-on-accent" : "bg-bg-secondary text-text-secondary hover:bg-bg-hover hover:text-text-primary"),
4191
+ className: R("font-control px-3 py-1.5 text-xs font-medium transition-colors duration-[100ms]", "focus-visible:outline-accent focus-visible:outline-2 focus-visible:outline-offset-[-2px]", !r && "cursor-pointer", e.value === t ? "bg-accent text-text-on-accent" : "bg-bg-secondary text-text-secondary hover:bg-bg-hover hover:text-text-primary"),
3773
4192
  children: e.label
3774
4193
  }, e.value))
3775
4194
  });
3776
4195
  }
3777
4196
  //#endregion
3778
4197
  //#region src/components/ui/SearchInput.tsx
3779
- function sr({ value: e, onChange: t, placeholder: n = "Search...", className: r }) {
4198
+ function gr({ value: e, onChange: t, placeholder: n = "Search...", className: r }) {
3780
4199
  return /* @__PURE__ */ m("div", {
3781
- className: I("relative", r),
3782
- children: [/* @__PURE__ */ p(M, { className: "text-text-tertiary absolute top-1/2 left-2 h-3.5 w-3.5 -translate-y-1/2" }), /* @__PURE__ */ p("input", {
4200
+ className: R("relative", r),
4201
+ children: [/* @__PURE__ */ p(se, { className: "text-text-tertiary absolute top-1/2 left-2 h-3.5 w-3.5 -translate-y-1/2" }), /* @__PURE__ */ p("input", {
3783
4202
  type: "search",
3784
4203
  value: e,
3785
4204
  onChange: (e) => t(e.target.value),
3786
4205
  placeholder: n,
3787
- className: I("bg-bg-secondary text-text-primary h-7 w-full pr-2 pl-7 text-xs", "border-border rounded-md border", "placeholder:text-text-disabled", "transition-colors duration-[100ms]", "focus:border-accent focus:outline-none")
4206
+ className: R("bg-bg-secondary text-text-primary h-7 w-full pr-2 pl-7 text-xs", "border-border rounded-md border", "placeholder:text-text-disabled", "transition-colors duration-[100ms]", "focus:border-accent focus:outline-none")
3788
4207
  })]
3789
4208
  });
3790
4209
  }
3791
4210
  //#endregion
3792
- //#region src/components/ui/SectionHeader.tsx
3793
- function cr({ children: e, as: t = "h2", className: n, border: r = !0 }) {
3794
- return /* @__PURE__ */ p(t, {
3795
- className: I("text-text-primary font-heading text-xs font-semibold", r && "border-border border-b pb-2", n),
3796
- children: e
3797
- });
3798
- }
3799
- //#endregion
3800
4211
  //#region src/components/ui/Select.tsx
3801
- var lr = r(({ label: e, error: t, options: n, className: r, id: i, ...a }, o) => {
4212
+ var _r = r(({ label: e, error: t, options: n, className: r, id: i, ...a }, o) => {
3802
4213
  let s = i || e?.toLowerCase().replace(/\s+/g, "-");
3803
4214
  return /* @__PURE__ */ m("div", {
3804
4215
  className: "flex flex-col gap-1.5",
@@ -3817,7 +4228,7 @@ var lr = r(({ label: e, error: t, options: n, className: r, id: i, ...a }, o) =>
3817
4228
  children: [/* @__PURE__ */ p("select", {
3818
4229
  ref: o,
3819
4230
  id: s,
3820
- className: I("bg-bg-secondary text-text-primary font-control h-7 w-full px-2 pr-7 text-xs", "appearance-none rounded-md border", "transition-colors duration-[100ms]", "focus:border-accent focus:outline-none", "disabled:cursor-not-allowed disabled:opacity-40", "cursor-pointer", t ? "border-red" : "border-border", r),
4231
+ className: R("bg-bg-secondary text-text-primary font-control h-7 w-full px-2 pr-7 text-xs", "appearance-none rounded-md border", "transition-colors duration-[100ms]", "focus:border-accent focus:outline-none", "disabled:cursor-not-allowed disabled:opacity-40", "cursor-pointer", t ? "border-red" : "border-border", r),
3821
4232
  ...a,
3822
4233
  children: n.map((e) => /* @__PURE__ */ p("option", {
3823
4234
  value: e.value,
@@ -3827,12 +4238,12 @@ var lr = r(({ label: e, error: t, options: n, className: r, id: i, ...a }, o) =>
3827
4238
  })]
3828
4239
  });
3829
4240
  });
3830
- lr.displayName = "Select";
4241
+ _r.displayName = "Select";
3831
4242
  //#endregion
3832
4243
  //#region src/components/ui/SettingRow.tsx
3833
- function ur({ label: e, description: t, action: n, className: r }) {
4244
+ function vr({ label: e, description: t, action: n, className: r }) {
3834
4245
  return /* @__PURE__ */ m("div", {
3835
- className: I("border-border flex items-center justify-between border-b py-3", r),
4246
+ className: R("border-border flex items-center justify-between border-b py-3", r),
3836
4247
  children: [/* @__PURE__ */ m("div", {
3837
4248
  className: "min-w-0 flex-1 pr-4",
3838
4249
  children: [/* @__PURE__ */ p("p", {
@@ -3849,38 +4260,10 @@ function ur({ label: e, description: t, action: n, className: r }) {
3849
4260
  });
3850
4261
  }
3851
4262
  //#endregion
3852
- //#region src/components/ui/Slider.tsx
3853
- function dr({ min: e, max: t, step: n = 1, value: r, onChange: i, onCommit: a, label: o, showValue: s, className: c }) {
3854
- let l = (r - e) / (t - e) * 100;
3855
- return /* @__PURE__ */ m("div", {
3856
- className: I("flex flex-col gap-1.5", c),
3857
- children: [(o || s) && /* @__PURE__ */ m("div", {
3858
- className: "flex items-center justify-between",
3859
- children: [o && /* @__PURE__ */ p("span", {
3860
- className: "text-text-secondary font-label text-xs font-medium",
3861
- children: o
3862
- }), s && /* @__PURE__ */ p("span", {
3863
- className: "text-text-primary font-data text-xs",
3864
- children: r
3865
- })]
3866
- }), /* @__PURE__ */ p("input", {
3867
- type: "range",
3868
- min: e,
3869
- max: t,
3870
- step: n,
3871
- value: r,
3872
- onChange: (e) => i(Number(e.target.value)),
3873
- onPointerUp: a ? (e) => a(Number(e.target.value)) : void 0,
3874
- className: "bg-bg-tertiary [&::-webkit-slider-thumb]:bg-accent h-1.5 w-full cursor-pointer appearance-none rounded-md [&::-webkit-slider-thumb]:h-4 [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:cursor-pointer [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:shadow-sm [&::-webkit-slider-thumb]:transition-transform [&::-webkit-slider-thumb]:duration-[100ms] [&::-webkit-slider-thumb]:hover:scale-110",
3875
- style: { background: `linear-gradient(to right, var(--accent) ${l}%, var(--bg-tertiary) ${l}%)` }
3876
- })]
3877
- });
3878
- }
3879
- //#endregion
3880
4263
  //#region src/components/ui/SideSheet.tsx
3881
- function fr({ open: e, onClose: t, title: n, children: r, footer: i, side: a = "right", widthClassName: s = "w-[360px]", className: c, contentClassName: l }) {
4264
+ function yr({ open: e, onClose: t, title: n, children: r, footer: i, side: a = "right", widthClassName: s = "w-[360px]", className: c, contentClassName: l }) {
3882
4265
  let d = u(null);
3883
- return B(d, e), o(() => {
4266
+ return V(d, e), o(() => {
3884
4267
  if (!e) return;
3885
4268
  let n = (e) => {
3886
4269
  e.key === "Escape" && t();
@@ -3888,7 +4271,7 @@ function fr({ open: e, onClose: t, title: n, children: r, footer: i, side: a = "
3888
4271
  return document.addEventListener("keydown", n), document.body.style.overflow = "hidden", () => {
3889
4272
  document.removeEventListener("keydown", n), document.body.style.overflow = "";
3890
4273
  };
3891
- }, [e, t]), e ? P(/* @__PURE__ */ m("div", {
4274
+ }, [e, t]), e ? I(/* @__PURE__ */ m("div", {
3892
4275
  className: "fixed inset-0 z-50 flex",
3893
4276
  children: [
3894
4277
  a === "right" && /* @__PURE__ */ p("div", {
@@ -3897,7 +4280,7 @@ function fr({ open: e, onClose: t, title: n, children: r, footer: i, side: a = "
3897
4280
  }),
3898
4281
  /* @__PURE__ */ m("div", {
3899
4282
  ref: d,
3900
- className: I("bg-bg-secondary border-border flex flex-col shadow-lg", s, a === "right" ? "animate-slide-in-right border-l" : "animate-slide-in-left border-r", c),
4283
+ className: R("bg-bg-secondary border-border flex flex-col shadow-lg", s, a === "right" ? "animate-slide-in-right border-l" : "animate-slide-in-left border-r", c),
3901
4284
  style: { maxWidth: "calc(100vw - 2rem)" },
3902
4285
  role: "dialog",
3903
4286
  "aria-modal": "true",
@@ -3912,11 +4295,11 @@ function fr({ open: e, onClose: t, title: n, children: r, footer: i, side: a = "
3912
4295
  onClick: t,
3913
4296
  className: "text-text-tertiary hover:text-text-primary hover:bg-bg-hover ml-auto flex h-6 w-6 cursor-pointer items-center justify-center rounded",
3914
4297
  "aria-label": "Close",
3915
- children: /* @__PURE__ */ p(N, { className: "h-3.5 w-3.5" })
4298
+ children: /* @__PURE__ */ p(F, { className: "h-3.5 w-3.5" })
3916
4299
  })]
3917
4300
  }),
3918
4301
  /* @__PURE__ */ p("div", {
3919
- className: I("flex-1 overflow-y-auto p-3", l),
4302
+ className: R("flex-1 overflow-y-auto p-3", l),
3920
4303
  children: r
3921
4304
  }),
3922
4305
  i && /* @__PURE__ */ p("div", {
@@ -3934,54 +4317,54 @@ function fr({ open: e, onClose: t, title: n, children: r, footer: i, side: a = "
3934
4317
  }
3935
4318
  //#endregion
3936
4319
  //#region src/components/ui/SplitPaneLayout.tsx
3937
- function pr({ children: e, direction: t = "row", className: n }) {
4320
+ function br({ children: e, direction: t = "row", className: n }) {
3938
4321
  return /* @__PURE__ */ p("div", {
3939
- className: I("-m-4 md:-m-6", "flex h-[calc(100vh-var(--topbar-height)-var(--bottomnav-height))] gap-0 md:h-[calc(100vh-var(--topbar-height))]", t === "column" && "flex-col", n),
4322
+ className: R("-m-4 md:-m-6", "flex h-[calc(100vh-var(--topbar-height)-var(--bottomnav-height))] gap-0 md:h-[calc(100vh-var(--topbar-height))]", t === "column" && "flex-col", n),
3940
4323
  children: e
3941
4324
  });
3942
4325
  }
3943
- function mr({ children: e, className: t }) {
4326
+ function xr({ children: e, className: t }) {
3944
4327
  return /* @__PURE__ */ p("div", {
3945
- className: I("flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden", t),
4328
+ className: R("flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden", t),
3946
4329
  children: e
3947
4330
  });
3948
4331
  }
3949
- var hr = Object.assign(pr, { Main: mr }), gr = {
4332
+ var Sr = Object.assign(br, { Main: xr }), Cr = {
3950
4333
  active: "bg-green",
3951
4334
  inactive: "bg-text-tertiary",
3952
4335
  pending: "bg-yellow animate-pulse-subtle",
3953
4336
  error: "bg-red"
3954
- }, _r = {
4337
+ }, wr = {
3955
4338
  active: "text-green",
3956
4339
  inactive: "text-text-tertiary",
3957
4340
  pending: "text-yellow",
3958
4341
  error: "text-red"
3959
4342
  };
3960
- function vr({ status: e, label: t, className: n }) {
4343
+ function Tr({ status: e, label: t, className: n }) {
3961
4344
  return /* @__PURE__ */ m("span", {
3962
- className: I("inline-flex items-center gap-1.5", n),
3963
- children: [/* @__PURE__ */ p("span", { className: I("h-2 w-2 rounded-full", gr[e]) }), t && /* @__PURE__ */ p("span", {
3964
- className: I("text-xs", _r[e]),
4345
+ className: R("inline-flex items-center gap-1.5", n),
4346
+ children: [/* @__PURE__ */ p("span", { className: R("h-2 w-2 rounded-full", Cr[e]) }), t && /* @__PURE__ */ p("span", {
4347
+ className: R("text-xs", wr[e]),
3965
4348
  children: t
3966
4349
  })]
3967
4350
  });
3968
4351
  }
3969
4352
  //#endregion
3970
4353
  //#region src/components/ui/StepProgress.tsx
3971
- function yr({ steps: e, currentStep: t, className: n }) {
4354
+ function Er({ steps: e, currentStep: t, className: n }) {
3972
4355
  return /* @__PURE__ */ p("div", {
3973
- className: I("flex items-center justify-between", n),
4356
+ className: R("flex items-center justify-between", n),
3974
4357
  children: e.map((n, r) => /* @__PURE__ */ m("div", {
3975
4358
  className: "flex flex-1 items-center",
3976
4359
  children: [/* @__PURE__ */ m("div", {
3977
4360
  className: "flex flex-col items-center",
3978
4361
  children: [
3979
4362
  /* @__PURE__ */ p("div", {
3980
- className: I("flex h-8 w-8 items-center justify-center rounded-full text-xs", r < t && "bg-accent text-text-on-accent", r === t && "border-accent text-accent border-2 font-semibold", r > t && "bg-bg-tertiary border-border text-text-tertiary border"),
4363
+ className: R("flex h-8 w-8 items-center justify-center rounded-full text-xs", r < t && "bg-accent text-text-on-accent", r === t && "border-accent text-accent border-2 font-semibold", r > t && "bg-bg-tertiary border-border text-text-tertiary border"),
3981
4364
  children: r < t ? /* @__PURE__ */ p(S, { className: "h-4 w-4" }) : r + 1
3982
4365
  }),
3983
4366
  /* @__PURE__ */ p("span", {
3984
- className: I("text-2xs mt-1.5 hidden sm:block", r === t && "text-accent", r < t && "text-text-primary", r > t && "text-text-tertiary"),
4367
+ className: R("text-2xs mt-1.5 hidden sm:block", r === t && "text-accent", r < t && "text-text-primary", r > t && "text-text-tertiary"),
3985
4368
  children: n.label
3986
4369
  }),
3987
4370
  n.description && /* @__PURE__ */ p("span", {
@@ -3989,13 +4372,13 @@ function yr({ steps: e, currentStep: t, className: n }) {
3989
4372
  children: n.description
3990
4373
  })
3991
4374
  ]
3992
- }), r < e.length - 1 && /* @__PURE__ */ p("div", { className: I("mx-2 h-0.5 flex-1", r < t ? "bg-accent" : "bg-border") })]
4375
+ }), r < e.length - 1 && /* @__PURE__ */ p("div", { className: R("mx-2 h-0.5 flex-1", r < t ? "bg-accent" : "bg-border") })]
3993
4376
  }, n.label))
3994
4377
  });
3995
4378
  }
3996
4379
  //#endregion
3997
4380
  //#region src/components/ui/Tabs.tsx
3998
- function br({ tabs: e, defaultTab: t, value: n, onChange: r, className: i }) {
4381
+ function Dr({ tabs: e, defaultTab: t, value: n, onChange: r, className: i }) {
3999
4382
  let [a, o] = d(t || e[0]?.key), c = n ?? a, l = e.find((e) => e.key === c);
4000
4383
  function f(e) {
4001
4384
  n === void 0 && o(e), r?.(e);
@@ -4019,7 +4402,7 @@ function br({ tabs: e, defaultTab: t, value: n, onChange: r, className: i }) {
4019
4402
  "aria-controls": `${h}-panel-${e.key}`,
4020
4403
  onClick: () => f(e.key),
4021
4404
  onKeyDown: _,
4022
- className: I("font-control relative cursor-pointer px-3 py-2 text-xs font-medium transition-colors duration-[100ms]", "hover:text-text-primary", e.key === c ? "text-accent" : "text-text-tertiary"),
4405
+ className: R("font-control relative cursor-pointer px-3 py-2 text-xs font-medium transition-colors duration-[100ms]", "hover:text-text-primary", e.key === c ? "text-accent" : "text-text-tertiary"),
4023
4406
  children: [e.label, e.key === c && /* @__PURE__ */ p("div", { className: "bg-accent absolute right-0 bottom-0 left-0 h-0.5 rounded-md" })]
4024
4407
  }, e.key))
4025
4408
  }), /* @__PURE__ */ p("div", {
@@ -4033,7 +4416,7 @@ function br({ tabs: e, defaultTab: t, value: n, onChange: r, className: i }) {
4033
4416
  }
4034
4417
  //#endregion
4035
4418
  //#region src/components/ui/Textarea.tsx
4036
- var xr = r(({ label: e, error: t, showCount: n, maxLength: r, value: i, className: a, id: o, ...s }, c) => {
4419
+ var Or = r(({ label: e, error: t, showCount: n, maxLength: r, value: i, className: a, id: o, ...s }, c) => {
4037
4420
  let l = o || e?.toLowerCase().replace(/\s+/g, "-"), u = typeof i == "string" ? i.length : 0;
4038
4421
  return /* @__PURE__ */ m("div", {
4039
4422
  className: "flex flex-col gap-1.5",
@@ -4048,7 +4431,7 @@ var xr = r(({ label: e, error: t, showCount: n, maxLength: r, value: i, classNam
4048
4431
  id: l,
4049
4432
  value: i,
4050
4433
  maxLength: r,
4051
- className: I("bg-bg-secondary text-text-primary font-control min-h-[72px] w-full px-2 py-1.5 text-xs", "resize-y rounded-md border", "placeholder:text-text-disabled", "transition-colors duration-[100ms]", "focus:border-accent focus:outline-none", t ? "border-red" : "border-border", a),
4434
+ className: R("bg-bg-secondary text-text-primary font-control min-h-[72px] w-full px-2 py-1.5 text-xs", "resize-y rounded-md border", "placeholder:text-text-disabled", "transition-colors duration-[100ms]", "focus:border-accent focus:outline-none", t ? "border-red" : "border-border", a),
4052
4435
  ...s
4053
4436
  }),
4054
4437
  /* @__PURE__ */ m("div", {
@@ -4068,10 +4451,10 @@ var xr = r(({ label: e, error: t, showCount: n, maxLength: r, value: i, classNam
4068
4451
  ]
4069
4452
  });
4070
4453
  });
4071
- xr.displayName = "Textarea";
4454
+ Or.displayName = "Textarea";
4072
4455
  //#endregion
4073
4456
  //#region src/components/ui/TextInput.tsx
4074
- var Sr = r(({ label: e, error: t, icon: n, className: r, id: i, readOnly: a, ...o }, s) => {
4457
+ var kr = r(({ label: e, error: t, icon: n, className: r, id: i, readOnly: a, ...o }, s) => {
4075
4458
  let c = i || e?.toLowerCase().replace(/\s+/g, "-");
4076
4459
  return /* @__PURE__ */ m("div", {
4077
4460
  className: "flex flex-col gap-1.5",
@@ -4094,25 +4477,25 @@ var Sr = r(({ label: e, error: t, icon: n, className: r, id: i, readOnly: a, ...
4094
4477
  ref: s,
4095
4478
  id: c,
4096
4479
  readOnly: a,
4097
- className: I("bg-bg-secondary text-text-primary font-control h-7 w-full px-2 text-xs", "rounded-md border", "placeholder:text-text-disabled", "transition-colors duration-[100ms]", "focus:border-accent focus:outline-none", "disabled:cursor-not-allowed disabled:opacity-40", a && "bg-bg-primary text-text-secondary focus:border-border cursor-default border-dashed", n && "pl-7", t ? "border-red" : !a && "border-border", a && !t && "border-border", r),
4480
+ className: R("bg-bg-secondary text-text-primary font-control h-7 w-full px-2 text-xs", "rounded-md border", "placeholder:text-text-disabled", "transition-colors duration-[100ms]", "focus:border-accent focus:outline-none", "disabled:cursor-not-allowed disabled:opacity-40", a && "bg-bg-primary text-text-secondary focus:border-border cursor-default border-dashed", n && "pl-7", t ? "border-red" : !a && "border-border", a && !t && "border-border", r),
4098
4481
  ...o
4099
4482
  })]
4100
4483
  })]
4101
4484
  });
4102
4485
  });
4103
- Sr.displayName = "TextInput";
4486
+ kr.displayName = "TextInput";
4104
4487
  //#endregion
4105
4488
  //#region src/components/ui/Timeline.tsx
4106
- function Cr({ items: e, className: t }) {
4489
+ function Ar({ items: e, className: t }) {
4107
4490
  return /* @__PURE__ */ p("div", {
4108
- className: I("space-y-0", t),
4491
+ className: R("space-y-0", t),
4109
4492
  children: e.map((t, n) => /* @__PURE__ */ m("div", {
4110
4493
  className: "flex gap-3",
4111
4494
  children: [/* @__PURE__ */ m("div", {
4112
4495
  className: "flex flex-col items-center",
4113
- children: [/* @__PURE__ */ p("div", { className: I(t.dot, "mt-1.5 h-2 w-2 shrink-0 rounded-full") }), n < e.length - 1 && /* @__PURE__ */ p("div", { className: "bg-border mt-1 w-px flex-1" })]
4496
+ children: [/* @__PURE__ */ p("div", { className: R(t.dot, "mt-1.5 h-2 w-2 shrink-0 rounded-full") }), n < e.length - 1 && /* @__PURE__ */ p("div", { className: "bg-border mt-1 w-px flex-1" })]
4114
4497
  }), /* @__PURE__ */ m("div", {
4115
- className: I("pb-4", n === e.length - 1 && "pb-0"),
4498
+ className: R("pb-4", n === e.length - 1 && "pb-0"),
4116
4499
  children: [/* @__PURE__ */ p("p", {
4117
4500
  className: "text-text-primary text-xs",
4118
4501
  children: t.text
@@ -4125,47 +4508,14 @@ function Cr({ items: e, className: t }) {
4125
4508
  });
4126
4509
  }
4127
4510
  //#endregion
4128
- //#region src/components/ui/Toggle.tsx
4129
- function wr({ checked: e, onChange: t, disabled: n, label: r, className: i }) {
4130
- return /* @__PURE__ */ m("label", {
4131
- className: I("flex w-fit items-center", n ? "cursor-not-allowed opacity-40" : "cursor-pointer", i),
4132
- style: { gap: 10 },
4133
- children: [/* @__PURE__ */ p("button", {
4134
- type: "button",
4135
- role: "switch",
4136
- "aria-checked": e,
4137
- disabled: n,
4138
- onClick: () => t(!e),
4139
- className: I("relative shrink-0 rounded-full border transition-colors duration-[100ms]", "focus-visible:outline-accent focus-visible:outline-2 focus-visible:outline-offset-2", e ? "bg-accent border-accent" : "bg-bg-tertiary border-border", !n && "cursor-pointer"),
4140
- style: {
4141
- width: 36,
4142
- height: 20
4143
- },
4144
- children: /* @__PURE__ */ p("span", {
4145
- className: "bg-control-knob absolute top-1/2 rounded-full transition-[left] duration-[100ms]",
4146
- style: {
4147
- width: 14,
4148
- height: 14,
4149
- marginTop: -7,
4150
- left: e ? 19 : 3,
4151
- boxShadow: "0 0 1px rgba(0,0,0,0.1), 2px 0 4px rgba(0,0,0,0.35)"
4152
- }
4153
- })
4154
- }), r && /* @__PURE__ */ p("span", {
4155
- className: "text-text-secondary text-xs",
4156
- children: r
4157
- })]
4158
- });
4159
- }
4160
- //#endregion
4161
4511
  //#region src/components/ui/Tooltip.tsx
4162
- var Tr = {
4512
+ var jr = {
4163
4513
  top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
4164
4514
  bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
4165
4515
  left: "right-full top-1/2 -translate-y-1/2 mr-2",
4166
4516
  right: "left-full top-1/2 -translate-y-1/2 ml-2"
4167
4517
  };
4168
- function Er({ content: e, placement: t = "top", children: n }) {
4518
+ function Mr({ content: e, placement: t = "top", children: n }) {
4169
4519
  let [r, i] = d(!1), a = s();
4170
4520
  return /* @__PURE__ */ m("div", {
4171
4521
  className: "relative inline-flex",
@@ -4176,7 +4526,7 @@ function Er({ content: e, placement: t = "top", children: n }) {
4176
4526
  "aria-describedby": r ? a : void 0,
4177
4527
  children: [n, r && /* @__PURE__ */ p("div", {
4178
4528
  id: a,
4179
- className: I("text-2xs absolute z-50 px-2 py-1 font-medium whitespace-nowrap", "bg-bg-tertiary text-text-primary border-border rounded border shadow-md", "animate-fade-in pointer-events-none", Tr[t]),
4529
+ className: R("text-2xs absolute z-50 px-2 py-1 font-medium whitespace-nowrap", "bg-bg-tertiary text-text-primary border-border rounded border shadow-md", "animate-fade-in pointer-events-none", jr[t]),
4180
4530
  role: "tooltip",
4181
4531
  children: e
4182
4532
  })]
@@ -4184,46 +4534,23 @@ function Er({ content: e, placement: t = "top", children: n }) {
4184
4534
  }
4185
4535
  //#endregion
4186
4536
  //#region src/components/ui/Toolbar.tsx
4187
- function Dr({ start: e, end: t, children: n, className: r, startClassName: i, endClassName: a }) {
4537
+ function Nr({ start: e, end: t, children: n, className: r, startClassName: i, endClassName: a }) {
4188
4538
  return /* @__PURE__ */ m("div", {
4189
- className: I("flex items-center justify-between gap-3", r),
4539
+ className: R("flex items-center justify-between gap-3", r),
4190
4540
  children: [/* @__PURE__ */ p("div", {
4191
- className: I("flex flex-1 items-center gap-3", i),
4541
+ className: R("flex flex-1 items-center gap-3", i),
4192
4542
  children: e ?? n
4193
4543
  }), t && /* @__PURE__ */ p("div", {
4194
- className: I("flex items-center gap-1.5", a),
4544
+ className: R("flex items-center gap-1.5", a),
4195
4545
  children: t
4196
4546
  })]
4197
4547
  });
4198
4548
  }
4199
4549
  //#endregion
4200
- //#region src/components/ui/ThemePreview.tsx
4201
- function Or({ label: e, active: t, icon: n, preview: r, onClick: i, className: a }) {
4202
- return /* @__PURE__ */ m("button", {
4203
- type: "button",
4204
- onClick: i,
4205
- className: I("flex cursor-pointer flex-col items-center gap-2 rounded-md border p-3 transition-colors duration-[100ms]", t ? "border-accent bg-accent-muted" : "border-border bg-bg-secondary hover:bg-bg-hover hover:border-border-strong", a),
4206
- children: [/* @__PURE__ */ p("div", {
4207
- className: "border-border-strong/20 flex h-10 w-full items-center justify-center rounded border",
4208
- style: { backgroundColor: r?.bg },
4209
- children: /* @__PURE__ */ p("div", {
4210
- className: "h-1.5 w-8 rounded-md",
4211
- style: { backgroundColor: r?.fg }
4212
- })
4213
- }), /* @__PURE__ */ m("div", {
4214
- className: "flex items-center gap-1.5",
4215
- children: [n && /* @__PURE__ */ p(n, { className: "h-3 w-3" }), /* @__PURE__ */ p("span", {
4216
- className: "text-xs font-medium",
4217
- children: e
4218
- })]
4219
- })]
4220
- });
4221
- }
4222
- //#endregion
4223
4550
  //#region src/components/ui/UploadDropzone.tsx
4224
- function kr({ title: e = "Drag and drop files here, or click to browse", description: t, icon: n, accept: r, multiple: i, disabled: a, onChange: o, className: s }) {
4551
+ function Pr({ title: e = "Drag and drop files here, or click to browse", description: t, icon: n, accept: r, multiple: i, disabled: a, onChange: o, className: s }) {
4225
4552
  return /* @__PURE__ */ m("label", {
4226
- className: I("border-border hover:border-border-strong block rounded-md border-2 border-dashed p-8 text-center transition-colors duration-[100ms]", a ? "cursor-not-allowed opacity-60" : "cursor-pointer hover:bg-bg-hover", s),
4553
+ className: R("border-border hover:border-border-strong block rounded-md border-2 border-dashed p-8 text-center transition-colors duration-[100ms]", a ? "cursor-not-allowed opacity-60" : "cursor-pointer hover:bg-bg-hover", s),
4227
4554
  children: [
4228
4555
  /* @__PURE__ */ p("input", {
4229
4556
  type: "file",
@@ -4235,7 +4562,7 @@ function kr({ title: e = "Drag and drop files here, or click to browse", descrip
4235
4562
  }),
4236
4563
  /* @__PURE__ */ p("div", {
4237
4564
  className: "text-text-tertiary mx-auto mb-3 flex h-9 w-9 items-center justify-center rounded-md bg-bg-tertiary",
4238
- children: n ?? /* @__PURE__ */ p(fe, { className: "h-4.5 w-4.5" })
4565
+ children: n ?? /* @__PURE__ */ p(ue, { className: "h-4.5 w-4.5" })
4239
4566
  }),
4240
4567
  /* @__PURE__ */ p("p", {
4241
4568
  className: "text-text-secondary mb-1 text-xs",
@@ -4249,28 +4576,16 @@ function kr({ title: e = "Drag and drop files here, or click to browse", descrip
4249
4576
  });
4250
4577
  }
4251
4578
  //#endregion
4252
- //#region src/hooks/useApplyTheme.ts
4253
- function Ar() {
4254
- let { setPreferredDarkTheme: e, setPreferredLightTheme: t, setColorMode: n } = K();
4255
- return i((r) => {
4256
- V(r) ? (t(r), n("light")) : (e(r), n("dark"));
4257
- }, [
4258
- e,
4259
- t,
4260
- n
4261
- ]);
4262
- }
4263
- //#endregion
4264
4579
  //#region src/providers/ThemeContext.ts
4265
- var jr = n({ theme: "dark" });
4580
+ var Fr = n({ theme: "dark" });
4266
4581
  //#endregion
4267
4582
  //#region src/hooks/useTheme.ts
4268
- function Mr() {
4269
- return a(jr);
4583
+ function Ir() {
4584
+ return a(Fr);
4270
4585
  }
4271
4586
  //#endregion
4272
4587
  //#region src/lib/formatDate.ts
4273
- var Nr = [
4588
+ var Lr = [
4274
4589
  "Jan",
4275
4590
  "Feb",
4276
4591
  "Mar",
@@ -4284,21 +4599,21 @@ var Nr = [
4284
4599
  "Nov",
4285
4600
  "Dec"
4286
4601
  ];
4287
- function Pr(e) {
4602
+ function Rr(e) {
4288
4603
  return (/* @__PURE__ */ new Date(e + "T00:00:00")).toLocaleDateString("en-US", {
4289
4604
  month: "short",
4290
4605
  day: "numeric",
4291
4606
  year: "numeric"
4292
4607
  });
4293
4608
  }
4294
- function Fr(e) {
4609
+ function zr(e) {
4295
4610
  return (/* @__PURE__ */ new Date(e + "T00:00:00")).toLocaleDateString("en-US", {
4296
4611
  month: "long",
4297
4612
  day: "numeric",
4298
4613
  year: "numeric"
4299
4614
  });
4300
4615
  }
4301
- function Ir(e, t = /* @__PURE__ */ new Date()) {
4616
+ function Br(e, t = /* @__PURE__ */ new Date()) {
4302
4617
  let n = t.getTime() - e.getTime(), r = Math.floor(n / 1e3);
4303
4618
  if (r < 60) return "just now";
4304
4619
  let i = Math.floor(r / 60);
@@ -4306,7 +4621,7 @@ function Ir(e, t = /* @__PURE__ */ new Date()) {
4306
4621
  let a = Math.floor(i / 60);
4307
4622
  if (a < 24) return `${a}h ago`;
4308
4623
  if (Math.floor(a / 24) === 1) return "yesterday";
4309
- let o = `${Nr[e.getMonth()]} ${e.getDate()}`;
4624
+ let o = `${Lr[e.getMonth()]} ${e.getDate()}`;
4310
4625
  return e.getFullYear() === t.getFullYear() ? o : `${o}, ${e.getFullYear()}`;
4311
4626
  }
4312
4627
  //#endregion
@@ -4317,7 +4632,7 @@ var Z = {
4317
4632
  "jetbrains-mono": "\"JetBrains Mono\", Menlo, Monaco, Consolas, monospace",
4318
4633
  "pt-serif": "\"PT Serif\", Georgia, ui-serif, Cambria, \"Times New Roman\", Times, serif",
4319
4634
  system: "system-ui, -apple-system, BlinkMacSystemFont, sans-serif"
4320
- }, Lr = {
4635
+ }, Vr = {
4321
4636
  purple: {
4322
4637
  base: "#7C5CFC",
4323
4638
  hover: "#6B4AEB",
@@ -4374,7 +4689,7 @@ var Z = {
4374
4689
  muted: "rgba(99,102,241,0.15)",
4375
4690
  subtle: "rgba(99,102,241,0.08)"
4376
4691
  }
4377
- }, Rr = "leonardaustin-ui-settings", zr = new Set(Object.keys(Lr)), Br = new Set(Object.keys(U)), Q = new Set(Object.keys(Z)), Vr = new Set([
4692
+ }, Hr = "leonardaustin-ui-settings", Ur = new Set(Object.keys(Vr)), Wr = new Set(Object.keys(U)), Q = new Set(Object.keys(Z)), Gr = new Set([
4378
4693
  "light",
4379
4694
  "dark",
4380
4695
  "system"
@@ -4382,12 +4697,12 @@ var Z = {
4382
4697
  function $(e, t, n, r) {
4383
4698
  return typeof e != "number" || !isFinite(e) ? r : Math.min(n, Math.max(t, e));
4384
4699
  }
4385
- function Hr(e) {
4700
+ function Kr(e) {
4386
4701
  let t = {};
4387
- if (zr.has(e.accentColor) && (t.accentColor = e.accentColor), Vr.has(e.colorMode) && (t.colorMode = e.colorMode), Br.has(e.preferredDarkTheme) && !V(e.preferredDarkTheme) && (t.preferredDarkTheme = e.preferredDarkTheme), Br.has(e.preferredLightTheme) && V(e.preferredLightTheme) && (t.preferredLightTheme = e.preferredLightTheme), typeof e.sidebarCollapsed == "boolean" && (t.sidebarCollapsed = e.sidebarCollapsed), typeof e.reducedMotion == "boolean" && (t.reducedMotion = e.reducedMotion), typeof e.sidebarWidth == "number" && (t.sidebarWidth = $(e.sidebarWidth, 160, 400, 220)), e.themeOverrides && typeof e.themeOverrides == "object") {
4702
+ if (Ur.has(e.accentColor) && (t.accentColor = e.accentColor), Gr.has(e.colorMode) && (t.colorMode = e.colorMode), Wr.has(e.preferredDarkTheme) && !H(e.preferredDarkTheme) && (t.preferredDarkTheme = e.preferredDarkTheme), Wr.has(e.preferredLightTheme) && H(e.preferredLightTheme) && (t.preferredLightTheme = e.preferredLightTheme), typeof e.sidebarCollapsed == "boolean" && (t.sidebarCollapsed = e.sidebarCollapsed), typeof e.reducedMotion == "boolean" && (t.reducedMotion = e.reducedMotion), typeof e.sidebarWidth == "number" && (t.sidebarWidth = $(e.sidebarWidth, 160, 400, 220)), e.themeOverrides && typeof e.themeOverrides == "object") {
4388
4703
  let n = {};
4389
4704
  for (let [t, r] of Object.entries(e.themeOverrides)) {
4390
- if (!Br.has(t) || !r || typeof r != "object") continue;
4705
+ if (!Wr.has(t) || !r || typeof r != "object") continue;
4391
4706
  let e = r, i = U[t];
4392
4707
  n[t] = {
4393
4708
  uiFont: Q.has(e.uiFont) ? e.uiFont : i.uiFont,
@@ -4410,7 +4725,7 @@ function Hr(e) {
4410
4725
  }
4411
4726
  return t;
4412
4727
  }
4413
- var Ur = {
4728
+ var qr = {
4414
4729
  accentColor: "purple",
4415
4730
  sidebarCollapsed: !1,
4416
4731
  sidebarWidth: 220,
@@ -4420,31 +4735,31 @@ var Ur = {
4420
4735
  preferredLightTheme: "light",
4421
4736
  themeOverrides: {}
4422
4737
  };
4423
- function Wr(e) {
4424
- if (typeof localStorage > "u") return Ur;
4738
+ function Jr(e) {
4739
+ if (typeof localStorage > "u") return qr;
4425
4740
  try {
4426
4741
  let t = localStorage.getItem(e);
4427
4742
  if (t) return {
4428
- ...Ur,
4429
- ...Hr(JSON.parse(t))
4743
+ ...qr,
4744
+ ...Kr(JSON.parse(t))
4430
4745
  };
4431
4746
  } catch (e) {
4432
4747
  console.warn("[SettingsProvider] Failed to load settings:", e);
4433
4748
  }
4434
- return Ur;
4749
+ return qr;
4435
4750
  }
4436
- function Gr(e, t) {
4751
+ function Yr(e, t) {
4437
4752
  let n = U[e] ?? U.dark;
4438
4753
  return t[e] ? {
4439
4754
  ...n,
4440
4755
  ...t[e]
4441
4756
  } : n;
4442
4757
  }
4443
- function Kr(e, t) {
4758
+ function Xr(e, t) {
4444
4759
  return e.uiFont === t.uiFont && e.headingFont === t.headingFont && e.proseFont === t.proseFont && e.controlFont === t.controlFont && e.labelFont === t.labelFont && e.navigationFont === t.navigationFont && e.dataFont === t.dataFont && e.codeFont === t.codeFont && e.fontSize === t.fontSize && e.borderRadius === t.borderRadius && e.borderWidth === t.borderWidth && e.tracking === t.tracking && e.lineHeight === t.lineHeight && e.density === t.density;
4445
4760
  }
4446
- function qr({ children: e, storageKey: t = Rr }) {
4447
- let [n, r] = d(() => Wr(t)), [a, s] = d(() => typeof window < "u" && window.matchMedia("(prefers-color-scheme: dark)").matches);
4761
+ function Zr({ children: e, storageKey: t = Hr }) {
4762
+ let [n, r] = d(() => Jr(t)), [a, s] = d(() => typeof window < "u" && window.matchMedia("(prefers-color-scheme: dark)").matches);
4448
4763
  o(() => {
4449
4764
  if (typeof window > "u") return;
4450
4765
  let e = window.matchMedia("(prefers-color-scheme: dark)"), t = (e) => s(e.matches);
@@ -4455,9 +4770,9 @@ function qr({ children: e, storageKey: t = Rr }) {
4455
4770
  n.preferredDarkTheme,
4456
4771
  n.preferredLightTheme,
4457
4772
  a
4458
- ]), [u, f] = d(() => Gr(c, n.themeOverrides));
4773
+ ]), [u, f] = d(() => Yr(c, n.themeOverrides));
4459
4774
  o(() => {
4460
- f(Gr(c, n.themeOverrides));
4775
+ f(Yr(c, n.themeOverrides));
4461
4776
  }, [c]);
4462
4777
  let m = i((e) => {
4463
4778
  r((n) => {
@@ -4474,7 +4789,7 @@ function qr({ children: e, storageKey: t = Rr }) {
4474
4789
  });
4475
4790
  }, [t]);
4476
4791
  o(() => {
4477
- let e = document.documentElement, t = Lr[n.accentColor];
4792
+ let e = document.documentElement, t = Vr[n.accentColor];
4478
4793
  e.style.setProperty("--accent", t.base), e.style.setProperty("--accent-hover", t.hover), e.style.setProperty("--accent-active", t.active), e.style.setProperty("--accent-muted", t.muted), e.style.setProperty("--accent-subtle", t.subtle);
4479
4794
  }, [n.accentColor]), o(() => {
4480
4795
  document.documentElement.classList.toggle("reduced-motion", n.reducedMotion);
@@ -4482,7 +4797,7 @@ function qr({ children: e, storageKey: t = Rr }) {
4482
4797
  let e = document.documentElement, t = u.borderRadius;
4483
4798
  e.style.fontSize = `${u.fontSize / 13 * 100}%`, e.style.setProperty("--font-ui", Z[u.uiFont]), e.style.setProperty("--font-heading", Z[u.headingFont]), e.style.setProperty("--font-prose", Z[u.proseFont]), e.style.setProperty("--font-control", Z[u.controlFont]), e.style.setProperty("--font-label", Z[u.labelFont]), e.style.setProperty("--font-navigation", Z[u.navigationFont]), e.style.setProperty("--font-data", Z[u.dataFont]), e.style.setProperty("--font-code", Z[u.codeFont]), e.style.setProperty("--ui-radius", t === 0 ? "0" : `${Math.round(t * 2 / 3)}px`), e.style.setProperty("--ui-radius-md", t === 0 ? "0" : `${t}px`), e.style.setProperty("--ui-radius-lg", t === 0 ? "0" : `${Math.round(t * 4 / 3)}px`), e.style.setProperty("--ui-radius-xl", t === 0 ? "0" : `${t * 2}px`), e.style.setProperty("--ui-border-width", `${u.borderWidth}px`), e.style.setProperty("--ui-tracking", `${u.tracking}em`), e.style.setProperty("--ui-line-height", String(u.lineHeight)), e.style.setProperty("--ui-density", `${u.density}rem`);
4484
4799
  }, [u]);
4485
- let h = l(() => Gr(c, n.themeOverrides), [c, n.themeOverrides]), g = c in n.themeOverrides, _ = !Kr(u, h), v = i(() => {
4800
+ let h = l(() => Yr(c, n.themeOverrides), [c, n.themeOverrides]), g = c in n.themeOverrides, _ = !Xr(u, h), v = i(() => {
4486
4801
  m({ themeOverrides: {
4487
4802
  ...n.themeOverrides,
4488
4803
  [c]: { ...u }
@@ -4599,14 +4914,14 @@ function qr({ children: e, storageKey: t = Rr }) {
4599
4914
  g,
4600
4915
  _
4601
4916
  ]);
4602
- return /* @__PURE__ */ p(G.Provider, {
4917
+ return /* @__PURE__ */ p(ht.Provider, {
4603
4918
  value: b,
4604
4919
  children: e
4605
4920
  });
4606
4921
  }
4607
4922
  //#endregion
4608
4923
  //#region src/providers/ThemeProvider.tsx
4609
- var Jr = {
4924
+ var Qr = {
4610
4925
  dark: "",
4611
4926
  light: "theme-light",
4612
4927
  monokai: "theme-monokai",
@@ -4615,19 +4930,19 @@ var Jr = {
4615
4930
  cyberBrutalLight: "theme-cyber-brutal-light",
4616
4931
  hashiTheme: "theme-hashi"
4617
4932
  };
4618
- function Yr({ children: e }) {
4619
- let { resolvedTheme: t } = a(G);
4933
+ function $r({ children: e }) {
4934
+ let { resolvedTheme: t } = a(ht);
4620
4935
  return o(() => {
4621
4936
  let e = document.documentElement;
4622
- Object.values(Jr).forEach((t) => {
4937
+ Object.values(Qr).forEach((t) => {
4623
4938
  t && e.classList.remove(t);
4624
4939
  });
4625
- let n = Jr[t];
4940
+ let n = Qr[t];
4626
4941
  n && e.classList.add(n);
4627
- }, [t]), /* @__PURE__ */ p(jr.Provider, {
4942
+ }, [t]), /* @__PURE__ */ p(Fr.Provider, {
4628
4943
  value: { theme: t },
4629
4944
  children: e
4630
4945
  });
4631
4946
  }
4632
4947
  //#endregion
4633
- export { Zt as Alert, Vt as AppShell, ge as AreaChart, Qt as AuthCard, Ht as AuthLayout, $t as AuthorByline, q as Avatar, Ut as BackLink, nn as Badge, ve as BarChart, $e as BottomNav, It as Breadcrumbs, J as Button, tt as COMMAND_PALETTE_EVENT, X as CalendarGrid, hn as Card, Wt as Checkbox, Kt as ColumnPicker, gn as Combobox, ot as CommandPalette, nt as DEFAULT_COMMAND_PALETTE_SHORTCUT, _n as DangerZone, bn as DatePicker, wn as DateRangePicker, An as DateTimePicker, Pn as DetailPanel, Fn as Dialog, In as DialogActions, Ln as DividerLabel, Ue as DonutChart, Rn as DropdownMenu, zn as EmptyState, Bn as ErrorBoundary, Gt as FilterButton, Vn as FilterDropdown, Hn as Kbd, Wn as LoadingSpinner, Gn as MetadataGrid, Kn as MetricCard, ct as MobileDrawer, Zn as OAuthButton, Qn as PageHeader, $n as PageSection, qt as Pagination, nr as PaginationBar, rr as PasswordInput, ir as ProfileHeader, ar as ProseContent, Ge as RadarChart, qe as RadialBarChart, or as RadioPill, Yt as ResourceTable, sr as SearchInput, cr as SectionHeader, lr as Select, er as SelectDropdown, ur as SettingRow, G as SettingsContext, qr as SettingsProvider, fr as SideSheet, Pt as Sidebar, dr as Slider, Je as SparkLine, hr as SplitPaneLayout, vr as StatusDot, yr as StepProgress, br as Tabs, Sr as TextInput, xr as Textarea, jr as ThemeContext, Or as ThemePreview, Yr as ThemeProvider, Cr as Timeline, xt as ToastProvider, wr as Toggle, Dr as Toolbar, Er as Tooltip, Bt as TopBar, kr as UploadDropzone, Ze as VerticalBarChart, ht as accentItems, I as cn, ft as darkThemes, mt as fontOptions, Fr as formatDateLong, Pr as formatDateShort, Ir as formatRelative, R as handleAppShellNavigate, Qe as isAppShellPathActive, V as isLightTheme, dt as lightThemes, it as matchesCommandPaletteShortcut, z as navigateToPath, rt as openCommandPalette, Jt as sortRows, U as themeDefaults, lt as themeItems, Ar as useApplyTheme, W as useDismiss, B as useFocusTrap, K as useSettings, Mr as useTheme, bt as useToast };
4948
+ export { pn as Alert, nn as AppShell, me as AreaChart, mn as AuthCard, rn as AuthLayout, hn as AuthorByline, yt as Avatar, an as BackLink, vn as Badge, ge as BarChart, Qe as BottomNav, Lt as Breadcrumbs, q as Button, et as COMMAND_PALETTE_EVENT, Tn as CalendarGrid, En as Card, on as Checkbox, cn as ColumnPicker, Dn as Combobox, at as CommandPalette, tt as DEFAULT_COMMAND_PALETTE_SHORTCUT, On as DangerZone, An as DatePicker, Pn as DateRangePicker, Bn as DateTimePicker, Wn as DetailPanel, Gn as Dialog, Kn as DialogActions, qn as DividerLabel, Ve as DonutChart, Jn as DropdownMenu, Yn as EmptyState, Xn as ErrorBoundary, sn as FilterButton, Zn as FilterDropdown, Qn as Kbd, er as LoadingSpinner, tr as MetadataGrid, nr as MetricCard, st as MobileDrawer, sr as OAuthButton, cr as PageHeader, lr as PageSection, ln as Pagination, dr as PaginationBar, fr as PasswordInput, pr as ProfileHeader, mr as ProseContent, Ue as RadarChart, Ge as RadialBarChart, hr as RadioPill, dn as ResourceTable, gr as SearchInput, J as SectionHeader, _r as Select, Y as SelectDropdown, vr as SettingRow, ht as SettingsContext, Zr as SettingsProvider, yr as SideSheet, Ft as Sidebar, X as Slider, Ke as SparkLine, Sr as SplitPaneLayout, Tr as StatusDot, Er as StepProgress, Jt as THEME_MENU_EVENT, Dr as Tabs, kr as TextInput, Or as Textarea, Fr as ThemeContext, Zt as ThemeMenu, Kt as ThemePreview, $r as ThemeProvider, Ar as Timeline, St as ToastProvider, qt as Toggle, Nr as Toolbar, Mr as Tooltip, tn as TopBar, Pr as UploadDropzone, Ye as VerticalBarChart, mt as accentItems, R as cn, dt as darkThemes, W as fontOptions, zr as formatDateLong, Rr as formatDateShort, Br as formatRelative, B as handleAppShellNavigate, Xe as isAppShellPathActive, H as isLightTheme, ut as lightThemes, rt as matchesCommandPaletteShortcut, Ze as navigateToPath, nt as openCommandPalette, Yt as openThemeMenu, un as sortRows, U as themeDefaults, ct as themeItems, Rt as useApplyTheme, G as useDismiss, V as useFocusTrap, K as useSettings, Ir as useTheme, xt as useToast };