@versini/sassysaint 5.5.24 → 5.5.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  import { jsxs as I, jsx as d, Fragment as yt } from "react/jsx-runtime";
2
- import { g as bt, ACTION_RESTORE as $r, ACTION_MESSAGE as xe, ROLE_ASSISTANT as we, ACTION_RESET as rr, ACTION_MODEL as ar, ACTION_STREAMING as nr, ACTION_SORT as Mr, ACTION_SEARCH as Dr, ACTION_RESET_PROMPT as or, ACTION_TOGGLE_PROMPT as sr, DEFAULT_AI_ENGINE as Se, P as ir, un as Me, ROLE_SYSTEM as Vr, ROLE_INTERNAL as vt, ROLE_HIDDEN as zr, STATS_SEPARATOR as Bt, CLIPBOARD_PROMPT as $t, TYPE_QUESTION as Ur, C as cr, SEND as Pr, ERROR_MESSAGE as Hr, ROLE_USER as nt, L as Fr, j as Gr, isLastMessageFromRole as Wr, getMessageContaintWrapperClass as jr, Logo as qr, getMainPaddingClass as Mt, r as Kr, LOCAL_STORAGE_PREFIX as Dt, LOCAL_STORAGE_SEARCH as Jr, LOCAL_STORAGE_SORT as Yr } from "./index.fO85d_Gw.js";
2
+ import { g as bt, ACTION_RESTORE as Vr, ACTION_MESSAGE as xe, ROLE_ASSISTANT as we, ACTION_RESET as ar, ACTION_MODEL as nr, ACTION_STREAMING as or, ACTION_SORT as zr, ACTION_SEARCH as Pr, ACTION_RESET_PROMPT as sr, ACTION_TOGGLE_PROMPT as ir, DEFAULT_AI_ENGINE as Se, P as cr, un as Me, ROLE_SYSTEM as Ur, ROLE_INTERNAL as vt, ROLE_HIDDEN as Hr, STATS_SEPARATOR as $t, CLIPBOARD_PROMPT as Mt, TYPE_QUESTION as Fr, C as lr, SEND as Gr, ERROR_MESSAGE as Wr, ROLE_USER as nt, L as jr, j as qr, isLastMessageFromRole as Kr, getMessageContaintWrapperClass as Jr, Logo as Yr, getMainPaddingClass as Dt, r as Xr, LOCAL_STORAGE_PREFIX as Vt, LOCAL_STORAGE_SEARCH as Qr, LOCAL_STORAGE_SORT as Zr } from "./index.DBAc9xii.js";
3
3
  import c from "clsx";
4
- import $, { useRef as S, useEffect as L, useCallback as Z, useSyncExternalStore as Xr, useState as G, useMemo as De, useContext as P, useLayoutEffect as fe, useId as Qr, useReducer as Be, createContext as Zr, useDebugValue as ea, lazy as lr, Suspense as ot } from "react";
5
- const ta = ({
4
+ import $, { useRef as S, useEffect as L, useCallback as Z, useSyncExternalStore as ea, useState as G, useMemo as De, useContext as U, createContext as ta, useLayoutEffect as fe, useDebugValue as ra, useId as aa, useReducer as Be, lazy as dr, Suspense as ot } from "react";
5
+ const na = ({
6
6
  className: e,
7
7
  viewBox: t,
8
8
  title: r,
@@ -28,7 +28,7 @@ const ta = ({
28
28
  )
29
29
  ]
30
30
  }
31
- ), ra = ({
31
+ ), oa = ({
32
32
  className: e,
33
33
  viewBox: t,
34
34
  title: r,
@@ -45,7 +45,7 @@ const ta = ({
45
45
  ...n,
46
46
  children: /* @__PURE__ */ d("path", { d: "M345 137c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-119 119L73 103c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l119 119L39 375c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l119-119L311 409c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-119-119L345 137z" })
47
47
  }
48
- ), aa = ({
48
+ ), sa = ({
49
49
  className: e,
50
50
  viewBox: t,
51
51
  title: r,
@@ -64,19 +64,19 @@ const ta = ({
64
64
  }
65
65
  );
66
66
  /*!
67
- @versini/ui-header v3.0.0
67
+ @versini/ui-header v3.0.1
68
68
  © 2025 gizmette.com
69
69
  */
70
70
  try {
71
71
  window.__VERSINI_UI_HEADER__ || (window.__VERSINI_UI_HEADER__ = {
72
- version: "3.0.0",
73
- buildTime: "01/03/2025 10:45 AM EST",
72
+ version: "3.0.1",
73
+ buildTime: "01/06/2025 08:00 PM EST",
74
74
  homepage: "https://github.com/aversini/ui-components",
75
75
  license: "MIT"
76
76
  });
77
77
  } catch {
78
78
  }
79
- const na = "av-header", oa = ({
79
+ const ia = "av-header", ca = ({
80
80
  children: e,
81
81
  className: t,
82
82
  raw: r = !1,
@@ -88,7 +88,7 @@ const na = "av-header", oa = ({
88
88
  noPadding: l = !1
89
89
  }) => {
90
90
  const h = c(
91
- na,
91
+ ia,
92
92
  {
93
93
  "border-border-accent": a === "dark" && !r && !n && !s,
94
94
  "border-border-medium": a === "light" && !r && !n && !s,
@@ -110,7 +110,7 @@ const na = "av-header", oa = ({
110
110
  });
111
111
  return /* @__PURE__ */ d("header", { className: h, children: /* @__PURE__ */ d("div", { className: f, children: e }) });
112
112
  };
113
- function sa(e) {
113
+ function la(e) {
114
114
  const t = e.toLowerCase().split("+").map((o) => o.trim()), r = {
115
115
  alt: t.includes("alt"),
116
116
  ctrl: t.includes("ctrl"),
@@ -123,8 +123,8 @@ function sa(e) {
123
123
  key: n
124
124
  };
125
125
  }
126
- function ia(e, t) {
127
- const { alt: r, ctrl: a, meta: n, mod: o, shift: s, key: i } = e, { altKey: l, ctrlKey: h, metaKey: f, shiftKey: g, key: u } = t;
126
+ function da(e, t) {
127
+ const { alt: r, ctrl: a, meta: n, mod: o, shift: s, key: i } = e, { altKey: l, ctrlKey: h, metaKey: f, shiftKey: m, key: u } = t;
128
128
  if (r !== l)
129
129
  return !1;
130
130
  if (o) {
@@ -132,45 +132,45 @@ function ia(e, t) {
132
132
  return !1;
133
133
  } else if (a !== h || n !== f)
134
134
  return !1;
135
- return s !== g ? !1 : !!(i && (u.toLowerCase() === i.toLowerCase() || t.code.replace("Key", "").toLowerCase() === i.toLowerCase()));
135
+ return s !== m ? !1 : !!(i && (u.toLowerCase() === i.toLowerCase() || t.code.replace("Key", "").toLowerCase() === i.toLowerCase()));
136
136
  }
137
- function ca(e) {
138
- return (t) => ia(sa(e), t);
137
+ function ua(e) {
138
+ return (t) => da(la(e), t);
139
139
  }
140
- function la(e) {
140
+ function ma(e) {
141
141
  return (t) => {
142
142
  const r = "nativeEvent" in t ? t.nativeEvent : t;
143
143
  e.forEach(([a, n, o = { preventDefault: !0 }]) => {
144
- ca(a)(r) && (o.preventDefault && t.preventDefault(), n(r));
144
+ ua(a)(r) && (o.preventDefault && t.preventDefault(), n(r));
145
145
  });
146
146
  };
147
147
  }
148
- function da() {
148
+ function ga() {
149
149
  const e = S(!1);
150
150
  return L(() => (e.current = !0, () => {
151
151
  e.current = !1;
152
152
  }), []), Z(() => e.current, []);
153
153
  }
154
- function dr(e, t) {
154
+ function ur(e, t) {
155
155
  window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
156
156
  }
157
- const Vt = (e, t) => {
157
+ const zt = (e, t) => {
158
158
  const r = JSON.stringify(
159
159
  typeof t == "function" ? t() : t
160
160
  );
161
- window.localStorage.setItem(e, r), dr(e, r);
162
- }, ua = (e) => {
163
- window.localStorage.removeItem(e), dr(e, null);
164
- }, zt = (e) => window.localStorage.getItem(e), ma = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
161
+ window.localStorage.setItem(e, r), ur(e, r);
162
+ }, ha = (e) => {
163
+ window.localStorage.removeItem(e), ur(e, null);
164
+ }, Pt = (e) => window.localStorage.getItem(e), fa = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
165
165
  function Ut({
166
166
  key: e,
167
167
  initialValue: t
168
168
  }) {
169
- const r = Xr(ma, () => zt(e)), a = Z(
169
+ const r = ea(fa, () => Pt(e)), a = Z(
170
170
  (s) => {
171
171
  try {
172
172
  const i = typeof s == "function" ? s(JSON.parse(r)) : s;
173
- i == null ? ua(e) : Vt(e, i);
173
+ i == null ? ha(e) : zt(e, i);
174
174
  } catch (i) {
175
175
  console.warn(i);
176
176
  }
@@ -183,13 +183,13 @@ function Ut({
183
183
  }, [a]);
184
184
  return L(() => {
185
185
  try {
186
- zt(e) === null && typeof t < "u" && Vt(e, t);
186
+ Pt(e) === null && typeof t < "u" && zt(e, t);
187
187
  } catch (s) {
188
188
  console.warn(s);
189
189
  }
190
190
  }, [e, t]), [r ? JSON.parse(r) : null, a, n, o];
191
191
  }
192
- const ga = {
192
+ const pa = {
193
193
  x: 0,
194
194
  y: 0,
195
195
  width: 0,
@@ -199,8 +199,8 @@ const ga = {
199
199
  bottom: 0,
200
200
  right: 0
201
201
  };
202
- function ha(e) {
203
- const t = da(), r = S(0), a = S(null), [n, o] = G(ga), s = De(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
202
+ function ya(e) {
203
+ const t = ga(), r = S(0), a = S(null), [n, o] = G(pa), s = De(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
204
204
  const l = i[0];
205
205
  l && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
206
206
  a.current && t() && o(l.contentRect);
@@ -211,13 +211,13 @@ function ha(e) {
211
211
  }), [s, e]), [a, n];
212
212
  }
213
213
  /*!
214
- @versini/ui-table v3.0.4
214
+ @versini/ui-table v3.0.5
215
215
  © 2025 gizmette.com
216
216
  */
217
217
  try {
218
218
  window.__VERSINI_UI_TABLE__ || (window.__VERSINI_UI_TABLE__ = {
219
- version: "3.0.4",
220
- buildTime: "01/04/2025 04:09 PM EST",
219
+ version: "3.0.5",
220
+ buildTime: "01/06/2025 08:01 PM EST",
221
221
  homepage: "https://github.com/aversini/ui-components",
222
222
  license: "MIT"
223
223
  });
@@ -226,7 +226,7 @@ try {
226
226
  const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
227
227
  ASC: "asc",
228
228
  DESC: "desc"
229
- }, fa = ({
229
+ }, ba = ({
230
230
  mode: e,
231
231
  className: t,
232
232
  wrapperClassName: r,
@@ -261,7 +261,7 @@ const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
261
261
  "text-copy-light dark:text-copy-dark": e === "system",
262
262
  "text-copy-dark dark:text-copy-light": e === "alt-system"
263
263
  })
264
- }), pa = ({
264
+ }), va = ({
265
265
  className: e,
266
266
  stickyHeader: t,
267
267
  mode: r
@@ -274,7 +274,7 @@ const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
274
274
  "shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]": t && r === "alt-system"
275
275
  },
276
276
  e
277
- ), ya = ({
277
+ ), ka = ({
278
278
  className: e,
279
279
  stickyFooter: t,
280
280
  mode: r
@@ -287,7 +287,7 @@ const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
287
287
  "shadow-[rgb(65_65_65_/30%)_-0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]": t && r === "alt-system"
288
288
  },
289
289
  e
290
- ), ba = ({
290
+ ), _a = ({
291
291
  mode: e,
292
292
  className: t,
293
293
  cellWrapper: r
@@ -312,7 +312,7 @@ const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
312
312
  "odd:bg-table-light-odd even:bg-table-light-even dark:odd:bg-table-dark-odd dark:even:bg-table-dark-even": r === ye && e === "alt-system"
313
313
  },
314
314
  t
315
- ), va = ({
315
+ ), Ea = ({
316
316
  cellWrapper: e,
317
317
  className: t,
318
318
  compact: r,
@@ -336,9 +336,9 @@ const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
336
336
  },
337
337
  t
338
338
  )
339
- }), ka = ({
339
+ }), xa = ({
340
340
  buttonClassName: e
341
- }) => c("rounded-none text-sm", e), Pt = "av-button", _t = "icon", ur = "button", st = "link", _a = ({
341
+ }) => c("rounded-none text-sm", e), Ht = "av-button", _t = "icon", mr = "button", st = "link", wa = ({
342
342
  type: e,
343
343
  size: t,
344
344
  labelRight: r,
@@ -347,7 +347,7 @@ const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
347
347
  }) => {
348
348
  const o = "max-h-8 py-0 px-2", s = "max-h-9 py-1 px-3", i = "max-h-12 py-2 px-4";
349
349
  switch (e) {
350
- case ur:
350
+ case mr:
351
351
  case st:
352
352
  return c({
353
353
  [o]: t === "small",
@@ -367,7 +367,7 @@ const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
367
367
  "h-12 px-4": t === "large" && (r || a)
368
368
  });
369
369
  }
370
- }, Ea = ({
370
+ }, Sa = ({
371
371
  type: e,
372
372
  size: t,
373
373
  labelRight: r,
@@ -375,7 +375,7 @@ const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
375
375
  }) => {
376
376
  const n = "text-sm font-medium", o = "text-base font-medium", s = "text-lg font-medium";
377
377
  switch (e) {
378
- case ur:
378
+ case mr:
379
379
  case st:
380
380
  return c({
381
381
  "text-center": e === st,
@@ -390,7 +390,7 @@ const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
390
390
  [s]: t === "large" && (r || a)
391
391
  });
392
392
  }
393
- }, xa = ({
393
+ }, Ta = ({
394
394
  mode: e,
395
395
  noBackground: t,
396
396
  noTruncate: r,
@@ -426,7 +426,7 @@ const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
426
426
  return c("not-prose text-copy-lighter", {
427
427
  truncate: !r
428
428
  });
429
- }, wa = ({
429
+ }, Na = ({
430
430
  mode: e,
431
431
  noBackground: t,
432
432
  variant: r
@@ -456,13 +456,13 @@ const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
456
456
  if (r === "selected")
457
457
  return "bg-action-selected-dark";
458
458
  }
459
- }, Sa = ({
459
+ }, Ra = ({
460
460
  radius: e
461
461
  }) => c({
462
462
  "rounded-full": e === "large",
463
463
  "rounded-md": e === "medium",
464
464
  "rounded-sm": e === "small"
465
- }), Ta = ({
465
+ }), Ca = ({
466
466
  mode: e,
467
467
  disabled: t,
468
468
  variant: r
@@ -492,7 +492,7 @@ const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
492
492
  });
493
493
  if (r === "selected")
494
494
  return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
495
- }, Na = ({
495
+ }, Ia = ({
496
496
  mode: e,
497
497
  disabled: t,
498
498
  variant: r
@@ -522,7 +522,7 @@ const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
522
522
  });
523
523
  if (r === "selected")
524
524
  return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
525
- }, Ra = ({
525
+ }, Aa = ({
526
526
  mode: e,
527
527
  noBorder: t,
528
528
  variant: r
@@ -552,14 +552,14 @@ const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
552
552
  });
553
553
  if (r === "selected")
554
554
  return "border border-border-selected-dark";
555
- }, Ca = ({
555
+ }, Oa = ({
556
556
  focusMode: e
557
557
  }) => c("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
558
558
  "focus:outline-focus-dark": e === "dark",
559
559
  "focus:outline-focus-light": e === "light",
560
560
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
561
561
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
562
- }), Ia = ({
562
+ }), La = ({
563
563
  type: e,
564
564
  className: t,
565
565
  raw: r,
@@ -571,69 +571,69 @@ const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
571
571
  noBorder: l,
572
572
  labelRight: h,
573
573
  labelLeft: f,
574
- noBackground: g,
574
+ noBackground: m,
575
575
  variant: u,
576
- noTruncate: m,
577
- align: y,
576
+ noTruncate: g,
577
+ align: p,
578
578
  radius: b
579
- }) => (u || (u = "primary"), r ? c(Pt, t) : c(
580
- Pt,
581
- xa({
579
+ }) => (u || (u = "primary"), r ? c(Ht, t) : c(
580
+ Ht,
581
+ Ta({
582
582
  mode: a,
583
583
  variant: u,
584
- noBackground: g,
585
- noTruncate: m
584
+ noBackground: m,
585
+ noTruncate: g
586
586
  }),
587
- wa({ mode: a, noBackground: g, variant: u }),
588
- Sa({ radius: b }),
589
- _a({
587
+ Na({ mode: a, noBackground: m, variant: u }),
588
+ Ra({ radius: b }),
589
+ wa({
590
590
  type: e,
591
591
  size: i,
592
592
  labelRight: h,
593
593
  labelLeft: f,
594
- align: y
594
+ align: p
595
595
  }),
596
- Ea({ type: e, size: i, labelRight: h, labelLeft: f }),
597
- Ra({ mode: a, variant: u, noBorder: l }),
598
- Ca({ focusMode: n }),
599
- Ta({ mode: a, variant: u, disabled: o }),
600
- Na({ mode: a, variant: u, disabled: o }),
596
+ Sa({ type: e, size: i, labelRight: h, labelLeft: f }),
597
+ Aa({ mode: a, variant: u, noBorder: l }),
598
+ Oa({ focusMode: n }),
599
+ Ca({ mode: a, variant: u, disabled: o }),
600
+ Ia({ mode: a, variant: u, disabled: o }),
601
601
  {
602
602
  "w-full": s,
603
603
  "disabled:cursor-not-allowed disabled:opacity-50": o
604
604
  },
605
605
  t
606
- )), Aa = (e, t, r) => {
606
+ )), Ba = (e, t, r) => {
607
607
  var a;
608
608
  !t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
609
- }, mr = $.forwardRef((e, t) => {
609
+ }, gr = $.forwardRef((e, t) => {
610
610
  const { onClick: r, noInternalClick: a = !1, ...n } = e;
611
611
  return /* @__PURE__ */ d(
612
612
  "button",
613
613
  {
614
614
  ref: t,
615
615
  onClick: (o) => {
616
- Aa(o, a, r);
616
+ Ba(o, a, r);
617
617
  },
618
618
  ...n
619
619
  }
620
620
  );
621
621
  });
622
- mr.displayName = "BaseButton";
622
+ gr.displayName = "BaseButton";
623
623
  /*!
624
- @versini/ui-button v4.0.3
624
+ @versini/ui-button v4.0.4
625
625
  © 2025 gizmette.com
626
626
  */
627
627
  try {
628
628
  window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
629
- version: "4.0.3",
630
- buildTime: "01/04/2025 04:09 PM EST",
629
+ version: "4.0.4",
630
+ buildTime: "01/06/2025 08:01 PM EST",
631
631
  homepage: "https://github.com/aversini/ui-components",
632
632
  license: "MIT"
633
633
  });
634
634
  } catch {
635
635
  }
636
- const gr = $.forwardRef(
636
+ const hr = $.forwardRef(
637
637
  ({
638
638
  children: e,
639
639
  disabled: t = !1,
@@ -646,16 +646,16 @@ const gr = $.forwardRef(
646
646
  noBorder: l = !1,
647
647
  "aria-label": h,
648
648
  label: f,
649
- size: g = "medium",
649
+ size: m = "medium",
650
650
  labelRight: u,
651
- labelLeft: m,
652
- noBackground: y = !1,
651
+ labelLeft: g,
652
+ noBackground: p = !1,
653
653
  align: b = "center",
654
654
  active: k = !1,
655
- radius: p = "large",
655
+ radius: y = "large",
656
656
  ...N
657
657
  }, A) => {
658
- const R = Ia({
658
+ const R = La({
659
659
  type: _t,
660
660
  mode: r,
661
661
  focusMode: a,
@@ -664,12 +664,12 @@ const gr = $.forwardRef(
664
664
  raw: i,
665
665
  className: o,
666
666
  noBorder: l,
667
- size: g,
667
+ size: m,
668
668
  labelRight: u,
669
- labelLeft: m,
670
- noBackground: y,
669
+ labelLeft: g,
670
+ noBackground: p,
671
671
  align: b,
672
- radius: p
672
+ radius: y
673
673
  }), E = c({
674
674
  "text-copy-accent-dark": r === "light" && !i,
675
675
  "text-copy-light": r === "dark" && !i,
@@ -693,7 +693,7 @@ const gr = $.forwardRef(
693
693
  }
694
694
  ) : "";
695
695
  return /* @__PURE__ */ d("div", { className: C, children: /* @__PURE__ */ I(
696
- mr,
696
+ gr,
697
697
  {
698
698
  ref: A,
699
699
  className: R,
@@ -702,7 +702,7 @@ const gr = $.forwardRef(
702
702
  "aria-label": h || f,
703
703
  ...N,
704
704
  children: [
705
- m && /* @__PURE__ */ d("span", { className: "pr-2", children: m }),
705
+ g && /* @__PURE__ */ d("span", { className: "pr-2", children: g }),
706
706
  /* @__PURE__ */ d("div", { className: E, children: e }),
707
707
  u && /* @__PURE__ */ d("span", { className: "pl-2", children: u })
708
708
  ]
@@ -710,7 +710,7 @@ const gr = $.forwardRef(
710
710
  ) });
711
711
  }
712
712
  );
713
- gr.displayName = "ButtonSort";
713
+ hr.displayName = "ButtonSort";
714
714
  const Et = ({
715
715
  children: e,
716
716
  fill: t,
@@ -742,19 +742,19 @@ const Et = ({
742
742
  ] });
743
743
  };
744
744
  /*!
745
- @versini/ui-svgicon v4.0.0
745
+ @versini/ui-svgicon v4.0.1
746
746
  © 2025 gizmette.com
747
747
  */
748
748
  try {
749
749
  window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
750
- version: "4.0.0",
751
- buildTime: "01/04/2025 04:09 PM EST",
750
+ version: "4.0.1",
751
+ buildTime: "01/06/2025 08:00 PM EST",
752
752
  homepage: "https://github.com/aversini/ui-components",
753
753
  license: "MIT"
754
754
  });
755
755
  } catch {
756
756
  }
757
- const Oa = ({
757
+ const $a = ({
758
758
  className: e,
759
759
  viewBox: t,
760
760
  title: r,
@@ -787,7 +787,7 @@ const Oa = ({
787
787
  )
788
788
  ]
789
789
  }
790
- ), La = ({
790
+ ), Ma = ({
791
791
  className: e,
792
792
  viewBox: t,
793
793
  title: r,
@@ -820,7 +820,7 @@ const Oa = ({
820
820
  )
821
821
  ]
822
822
  }
823
- ), Ba = ({
823
+ ), Da = ({
824
824
  className: e,
825
825
  viewBox: t,
826
826
  title: r,
@@ -855,13 +855,13 @@ const Oa = ({
855
855
  }
856
856
  );
857
857
  /*!
858
- @versini/ui-icons v4.2.0
858
+ @versini/ui-icons v4.2.1
859
859
  © 2025 gizmette.com
860
860
  */
861
861
  try {
862
862
  window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
863
- version: "4.2.0",
864
- buildTime: "01/04/2025 04:09 PM EST",
863
+ version: "4.2.1",
864
+ buildTime: "01/06/2025 08:00 PM EST",
865
865
  homepage: "https://github.com/aversini/ui-components",
866
866
  license: "MIT"
867
867
  });
@@ -873,7 +873,7 @@ const be = $.createContext({
873
873
  stickyHeader: !1,
874
874
  stickyFooter: !1,
875
875
  compact: !1
876
- }), Wo = ({
876
+ }), Ko = ({
877
877
  children: e,
878
878
  mode: t = "system",
879
879
  caption: r,
@@ -886,7 +886,7 @@ const be = $.createContext({
886
886
  stickyFooter: h,
887
887
  ...f
888
888
  }) => {
889
- const g = fa({
889
+ const m = ba({
890
890
  mode: t,
891
891
  className: o,
892
892
  wrapperClassName: s,
@@ -900,66 +900,66 @@ const be = $.createContext({
900
900
  children: /* @__PURE__ */ d(
901
901
  "div",
902
902
  {
903
- className: g.wrapper,
903
+ className: m.wrapper,
904
904
  ...i && {
905
905
  style: { maxHeight: i }
906
906
  },
907
- children: /* @__PURE__ */ I("table", { className: g.table, summary: n, ...f, children: [
908
- r && /* @__PURE__ */ d("caption", { className: g.caption, children: r }),
907
+ children: /* @__PURE__ */ I("table", { className: m.table, summary: n, ...f, children: [
908
+ r && /* @__PURE__ */ d("caption", { className: m.caption, children: r }),
909
909
  e
910
910
  ] })
911
911
  }
912
912
  )
913
913
  }
914
914
  );
915
- }, jo = ({
915
+ }, Jo = ({
916
916
  children: e,
917
917
  className: t,
918
918
  ...r
919
919
  }) => {
920
- const a = P(be);
920
+ const a = U(be);
921
921
  a.cellWrapper = Ve;
922
- const n = pa({
922
+ const n = va({
923
923
  className: t,
924
924
  mode: a.mode,
925
925
  stickyHeader: a.stickyHeader
926
926
  });
927
927
  return /* @__PURE__ */ d("thead", { className: n, ...r, children: e });
928
- }, qo = ({
928
+ }, Yo = ({
929
929
  children: e,
930
930
  className: t,
931
931
  ...r
932
932
  }) => {
933
- const a = P(be);
933
+ const a = U(be);
934
934
  a.cellWrapper = kt;
935
- const n = ya({
935
+ const n = ka({
936
936
  className: t,
937
937
  mode: a.mode,
938
938
  stickyFooter: a.stickyFooter
939
939
  });
940
940
  return /* @__PURE__ */ d("tfoot", { className: n, ...r, children: e });
941
- }, Ko = ({ children: e, ...t }) => {
942
- const r = P(be);
941
+ }, Xo = ({ children: e, ...t }) => {
942
+ const r = U(be);
943
943
  return r.cellWrapper = ye, /* @__PURE__ */ d("tbody", { ...t, children: e });
944
- }, Jo = ({
944
+ }, Qo = ({
945
945
  children: e,
946
946
  className: t,
947
947
  ...r
948
948
  }) => {
949
- const a = P(be), n = ba({
949
+ const a = U(be), n = _a({
950
950
  mode: a.mode,
951
951
  cellWrapper: a.cellWrapper,
952
952
  className: t
953
953
  });
954
954
  return /* @__PURE__ */ d("tr", { className: n, ...r, children: e });
955
- }, $a = ({
955
+ }, Va = ({
956
956
  children: e,
957
957
  component: t,
958
958
  className: r,
959
959
  align: a,
960
960
  ...n
961
961
  }) => {
962
- const o = P(be), s = t || (o.cellWrapper === Ve ? "th" : "td"), { mainClasses: i, alignClasses: l } = va({
962
+ const o = U(be), s = t || (o.cellWrapper === Ve ? "th" : "td"), { mainClasses: i, alignClasses: l } = Ea({
963
963
  cellWrapper: o.cellWrapper,
964
964
  className: r,
965
965
  mode: o.mode,
@@ -967,7 +967,7 @@ const be = $.createContext({
967
967
  align: a
968
968
  });
969
969
  return a ? /* @__PURE__ */ d(s, { className: i, ...n, children: /* @__PURE__ */ d("div", { className: l, children: e }) }) : /* @__PURE__ */ d(s, { className: i, ...n, children: e });
970
- }, Yo = ({
970
+ }, Zo = ({
971
971
  align: e,
972
972
  children: t,
973
973
  buttonClassName: r,
@@ -979,19 +979,19 @@ const be = $.createContext({
979
979
  sortDirection: l,
980
980
  sortedCell: h,
981
981
  cellId: f,
982
- ...g
982
+ ...m
983
983
  }) => {
984
- const u = ka({ buttonClassName: r });
984
+ const u = xa({ buttonClassName: r });
985
985
  return /* @__PURE__ */ d(
986
- $a,
986
+ Va,
987
987
  {
988
988
  component: n,
989
989
  className: a,
990
990
  role: "columnheader",
991
991
  "aria-sort": l === Ee.ASC && h === f ? "ascending" : l === Ee.DESC && h === f ? "descending" : "other",
992
- ...g,
992
+ ...m,
993
993
  children: /* @__PURE__ */ d(
994
- gr,
994
+ hr,
995
995
  {
996
996
  active: h === f,
997
997
  className: u,
@@ -1002,7 +1002,7 @@ const be = $.createContext({
1002
1002
  mode: s,
1003
1003
  fullWidth: !0,
1004
1004
  labelRight: t,
1005
- children: l === Ee.ASC && h === f ? /* @__PURE__ */ d(Ba, { className: "size-4", monotone: !0 }) : l === Ee.DESC && h === f ? /* @__PURE__ */ d(La, { className: "size-4", monotone: !0 }) : /* @__PURE__ */ d(Oa, { className: "size-4", monotone: !0 })
1005
+ children: l === Ee.ASC && h === f ? /* @__PURE__ */ d(Da, { className: "size-4", monotone: !0 }) : l === Ee.DESC && h === f ? /* @__PURE__ */ d(Ma, { className: "size-4", monotone: !0 }) : /* @__PURE__ */ d($a, { className: "size-4", monotone: !0 })
1006
1006
  }
1007
1007
  )
1008
1008
  }
@@ -1010,32 +1010,32 @@ const be = $.createContext({
1010
1010
  }, D = [];
1011
1011
  for (let e = 0; e < 256; ++e)
1012
1012
  D.push((e + 256).toString(16).slice(1));
1013
- function Ma(e, t = 0) {
1013
+ function za(e, t = 0) {
1014
1014
  return (D[e[t + 0]] + D[e[t + 1]] + D[e[t + 2]] + D[e[t + 3]] + "-" + D[e[t + 4]] + D[e[t + 5]] + "-" + D[e[t + 6]] + D[e[t + 7]] + "-" + D[e[t + 8]] + D[e[t + 9]] + "-" + D[e[t + 10]] + D[e[t + 11]] + D[e[t + 12]] + D[e[t + 13]] + D[e[t + 14]] + D[e[t + 15]]).toLowerCase();
1015
1015
  }
1016
1016
  let Ke;
1017
- const Da = new Uint8Array(16);
1018
- function Va() {
1017
+ const Pa = new Uint8Array(16);
1018
+ function Ua() {
1019
1019
  if (!Ke) {
1020
1020
  if (typeof crypto > "u" || !crypto.getRandomValues)
1021
1021
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
1022
1022
  Ke = crypto.getRandomValues.bind(crypto);
1023
1023
  }
1024
- return Ke(Da);
1024
+ return Ke(Pa);
1025
1025
  }
1026
- const za = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Ht = { randomUUID: za };
1026
+ const Ha = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Ft = { randomUUID: Ha };
1027
1027
  function xt(e, t, r) {
1028
1028
  var n;
1029
- if (Ht.randomUUID && !t && !e)
1030
- return Ht.randomUUID();
1029
+ if (Ft.randomUUID && !t && !e)
1030
+ return Ft.randomUUID();
1031
1031
  e = e || {};
1032
- const a = e.random ?? ((n = e.rng) == null ? void 0 : n.call(e)) ?? Va();
1032
+ const a = e.random ?? ((n = e.rng) == null ? void 0 : n.call(e)) ?? Ua();
1033
1033
  if (a.length < 16)
1034
1034
  throw new Error("Random bytes length must be >= 16");
1035
- return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Ma(a);
1035
+ return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, za(a);
1036
1036
  }
1037
- const Ua = (e, t) => {
1038
- if ((t == null ? void 0 : t.type) === $r) {
1037
+ const Fa = (e, t) => {
1038
+ if ((t == null ? void 0 : t.type) === Vr) {
1039
1039
  const r = t.payload.messages.map((a) => ({
1040
1040
  message: {
1041
1041
  role: a.role,
@@ -1069,7 +1069,7 @@ const Ua = (e, t) => {
1069
1069
  (h) => h.message.messageId === s
1070
1070
  );
1071
1071
  if (l !== -1) {
1072
- const h = e.messages.map((f, g) => g === l ? {
1072
+ const h = e.messages.map((f, m) => m === l ? {
1073
1073
  message: {
1074
1074
  ...f.message,
1075
1075
  content: `${f.message.content}${a}`,
@@ -1104,7 +1104,7 @@ const Ua = (e, t) => {
1104
1104
  };
1105
1105
  }
1106
1106
  }
1107
- return (t == null ? void 0 : t.type) === rr ? {
1107
+ return (t == null ? void 0 : t.type) === ar ? {
1108
1108
  id: xt(),
1109
1109
  model: e.model,
1110
1110
  engine: e.engine,
@@ -1112,7 +1112,7 @@ const Ua = (e, t) => {
1112
1112
  messages: [],
1113
1113
  isComponent: e.isComponent,
1114
1114
  prompts: e.prompts
1115
- } : (t == null ? void 0 : t.type) === ar ? {
1115
+ } : (t == null ? void 0 : t.type) === nr ? {
1116
1116
  id: e.id,
1117
1117
  model: t.payload.model,
1118
1118
  engine: e.engine,
@@ -1120,19 +1120,19 @@ const Ua = (e, t) => {
1120
1120
  usage: t.payload.usage,
1121
1121
  messages: e.messages,
1122
1122
  isComponent: e.isComponent
1123
- } : (t == null ? void 0 : t.type) === nr ? {
1123
+ } : (t == null ? void 0 : t.type) === or ? {
1124
1124
  ...e,
1125
1125
  streaming: t.payload.streaming
1126
1126
  } : e;
1127
- }, Pa = (e, t) => {
1127
+ }, Ga = (e, t) => {
1128
1128
  switch (t == null ? void 0 : t.type) {
1129
- case Dr:
1129
+ case Pr:
1130
1130
  return {
1131
1131
  searchString: t.payload.searchString,
1132
1132
  sortedCell: e.sortedCell,
1133
1133
  sortDirection: e.sortDirection
1134
1134
  };
1135
- case Mr:
1135
+ case zr:
1136
1136
  return {
1137
1137
  searchString: e.searchString,
1138
1138
  sortedCell: t.payload.sortedCell,
@@ -1141,575 +1141,657 @@ const Ua = (e, t) => {
1141
1141
  default:
1142
1142
  return e;
1143
1143
  }
1144
- }, Ha = (e, t) => {
1144
+ }, Wa = (e, t) => {
1145
1145
  switch (t == null ? void 0 : t.type) {
1146
- case sr:
1146
+ case ir:
1147
1147
  return {
1148
1148
  prompt: t.payload.prompt
1149
1149
  };
1150
- case or:
1150
+ case sr:
1151
1151
  return {
1152
1152
  prompt: ""
1153
1153
  };
1154
1154
  default:
1155
1155
  return e;
1156
1156
  }
1157
- }, ve = $.createContext({
1158
- state: {
1159
- id: "",
1160
- model: Se,
1161
- engine: Se,
1162
- usage: 0,
1163
- messages: [],
1164
- isComponent: !1,
1165
- prompts: []
1166
- },
1167
- dispatch: () => {
1168
- },
1169
- serverStats: {
1170
- version: "",
1171
- models: [],
1172
- plugins: [],
1173
- engines: []
1157
+ };
1158
+ var Ae = { exports: {} }, Je = {};
1159
+ /**
1160
+ * @license React
1161
+ * use-sync-external-store-shim.production.js
1162
+ *
1163
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
1164
+ *
1165
+ * This source code is licensed under the MIT license found in the
1166
+ * LICENSE file in the root directory of this source tree.
1167
+ */
1168
+ var Gt;
1169
+ function ja() {
1170
+ if (Gt) return Je;
1171
+ Gt = 1;
1172
+ var e = $;
1173
+ function t(m, u) {
1174
+ return m === u && (m !== 0 || 1 / m === 1 / u) || m !== m && u !== u;
1174
1175
  }
1175
- }), Fa = $.createContext({
1176
- state: { searchString: "", sortedCell: "", sortDirection: "" },
1177
- dispatch: () => {
1176
+ var r = typeof Object.is == "function" ? Object.is : t, a = e.useState, n = e.useEffect, o = e.useLayoutEffect, s = e.useDebugValue;
1177
+ function i(m, u) {
1178
+ var g = u(), p = a({ inst: { value: g, getSnapshot: u } }), b = p[0].inst, k = p[1];
1179
+ return o(
1180
+ function() {
1181
+ b.value = g, b.getSnapshot = u, l(b) && k({ inst: b });
1182
+ },
1183
+ [m, g, u]
1184
+ ), n(
1185
+ function() {
1186
+ return l(b) && k({ inst: b }), m(function() {
1187
+ l(b) && k({ inst: b });
1188
+ });
1189
+ },
1190
+ [m]
1191
+ ), s(g), g;
1178
1192
  }
1179
- }), wt = $.createContext({
1180
- state: { prompt: "" },
1181
- dispatch: () => {
1193
+ function l(m) {
1194
+ var u = m.getSnapshot;
1195
+ m = m.value;
1196
+ try {
1197
+ var g = u();
1198
+ return !r(m, g);
1199
+ } catch {
1200
+ return !0;
1201
+ }
1182
1202
  }
1183
- });
1184
- /*!
1185
- @versini/ui-textarea v3.0.0
1186
- © 2025 gizmette.com
1187
- */
1188
- try {
1189
- window.__VERSINI_UI_TEXTAREA__ || (window.__VERSINI_UI_TEXTAREA__ = {
1190
- version: "3.0.0",
1191
- buildTime: "01/03/2025 10:45 AM EST",
1192
- homepage: "https://github.com/aversini/ui-components",
1193
- license: "MIT"
1194
- });
1195
- } catch {
1203
+ function h(m, u) {
1204
+ return u();
1205
+ }
1206
+ var f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? h : i;
1207
+ return Je.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : f, Je;
1196
1208
  }
1197
- const hr = "av-text-area", Ga = "av-text-area-wrapper", Je = "av-text-area-helper-text", Wa = "av-text-area__control--right", ja = "av-text-area__control--left";
1209
+ var Ye = {};
1210
+ /**
1211
+ * @license React
1212
+ * use-sync-external-store-shim.development.js
1213
+ *
1214
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
1215
+ *
1216
+ * This source code is licensed under the MIT license found in the
1217
+ * LICENSE file in the root directory of this source tree.
1218
+ */
1219
+ var Wt;
1198
1220
  function qa() {
1199
- const e = S(!1);
1200
- return L(() => (e.current = !0, () => {
1201
- e.current = !1;
1202
- }), []), Z(() => e.current, []);
1203
- }
1204
- function Ka(e) {
1205
- return De(() => e.every((t) => t == null) ? () => {
1206
- } : (t) => {
1207
- e.forEach((r) => {
1208
- typeof r == "function" ? r(t) : r != null && (r.current = t);
1209
- });
1210
- }, e);
1211
- }
1212
- const Ja = {
1213
- x: 0,
1214
- y: 0,
1215
- width: 0,
1216
- height: 0,
1217
- top: 0,
1218
- left: 0,
1219
- bottom: 0,
1220
- right: 0
1221
- };
1222
- function Ft(e) {
1223
- const t = qa(), r = S(0), a = S(null), [n, o] = G(Ja), s = De(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
1224
- const l = i[0];
1225
- l && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
1226
- a.current && t() && o(l.contentRect);
1227
- }));
1228
- }), [t]);
1229
- return L(() => (a.current && (s == null || s.observe(a.current, e)), () => {
1230
- s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
1231
- }), [s, e]), [a, n];
1221
+ return Wt || (Wt = 1, process.env.NODE_ENV !== "production" && function() {
1222
+ function e(g, p) {
1223
+ return g === p && (g !== 0 || 1 / g === 1 / p) || g !== g && p !== p;
1224
+ }
1225
+ function t(g, p) {
1226
+ f || n.startTransition === void 0 || (f = !0, console.error(
1227
+ "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
1228
+ ));
1229
+ var b = p();
1230
+ if (!m) {
1231
+ var k = p();
1232
+ o(b, k) || (console.error(
1233
+ "The result of getSnapshot should be cached to avoid an infinite loop"
1234
+ ), m = !0);
1235
+ }
1236
+ k = s({
1237
+ inst: { value: b, getSnapshot: p }
1238
+ });
1239
+ var y = k[0].inst, N = k[1];
1240
+ return l(
1241
+ function() {
1242
+ y.value = b, y.getSnapshot = p, r(y) && N({ inst: y });
1243
+ },
1244
+ [g, b, p]
1245
+ ), i(
1246
+ function() {
1247
+ return r(y) && N({ inst: y }), g(function() {
1248
+ r(y) && N({ inst: y });
1249
+ });
1250
+ },
1251
+ [g]
1252
+ ), h(b), b;
1253
+ }
1254
+ function r(g) {
1255
+ var p = g.getSnapshot;
1256
+ g = g.value;
1257
+ try {
1258
+ var b = p();
1259
+ return !o(g, b);
1260
+ } catch {
1261
+ return !0;
1262
+ }
1263
+ }
1264
+ function a(g, p) {
1265
+ return p();
1266
+ }
1267
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
1268
+ var n = $, o = typeof Object.is == "function" ? Object.is : e, s = n.useState, i = n.useEffect, l = n.useLayoutEffect, h = n.useDebugValue, f = !1, m = !1, u = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? a : t;
1269
+ Ye.useSyncExternalStore = n.useSyncExternalStore !== void 0 ? n.useSyncExternalStore : u, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
1270
+ }()), Ye;
1232
1271
  }
1233
- function Ya({
1234
- value: e,
1235
- defaultValue: t,
1236
- finalValue: r,
1237
- onChange: a = () => {
1238
- },
1239
- initialControlledDelay: n = 0
1240
- }) {
1241
- const [o, s] = G(!1), [i, l] = G(
1242
- t !== void 0 ? t : r
1243
- ), h = (f) => {
1244
- l(f), a == null || a(f);
1245
- };
1246
- return L(() => {
1247
- (async () => e !== void 0 && !o && n > 0 && (await new Promise(
1248
- (f) => setTimeout(f, n)
1249
- ), s(!0)))();
1250
- }, [e, n, o]), e !== void 0 ? !o && n > 0 ? ["", a, !0] : [e, a, !0] : [i, h, !1];
1272
+ var jt;
1273
+ function Ka() {
1274
+ return jt || (jt = 1, process.env.NODE_ENV === "production" ? Ae.exports = /* @__PURE__ */ ja() : Ae.exports = /* @__PURE__ */ qa()), Ae.exports;
1251
1275
  }
1252
- function Xa(e) {
1253
- const t = Qr();
1254
- if (!e)
1255
- return t;
1256
- if (typeof e == "number" || typeof e == "string")
1257
- return `${e}${t}`;
1258
- if (typeof e == "object") {
1259
- const { id: r, prefix: a = "" } = e;
1260
- return typeof r == "number" || typeof r == "string" ? `${a}${r}` : `${a}${t}`;
1276
+ var Ja = /* @__PURE__ */ Ka(), qt = Object.prototype.hasOwnProperty;
1277
+ function it(e, t) {
1278
+ var r, a;
1279
+ if (e === t) return !0;
1280
+ if (e && t && (r = e.constructor) === t.constructor) {
1281
+ if (r === Date) return e.getTime() === t.getTime();
1282
+ if (r === RegExp) return e.toString() === t.toString();
1283
+ if (r === Array) {
1284
+ if ((a = e.length) === t.length)
1285
+ for (; a-- && it(e[a], t[a]); ) ;
1286
+ return a === -1;
1287
+ }
1288
+ if (!r || typeof e == "object") {
1289
+ a = 0;
1290
+ for (r in e)
1291
+ if (qt.call(e, r) && ++a && !qt.call(t, r) || !(r in t) || !it(e[r], t[r])) return !1;
1292
+ return Object.keys(t).length === a;
1293
+ }
1261
1294
  }
1295
+ return e !== e && t !== t;
1262
1296
  }
1263
- const fr = "SET_ANNOUNCEMENT", pr = "CLEAR_ANNOUNCEMENT", Qa = {
1264
- alert: null,
1265
- alertdialog: null,
1266
- log: "polite",
1267
- marquee: null,
1268
- progressbar: null,
1269
- status: "polite",
1270
- timer: "assertive"
1271
- }, Za = (e, t) => {
1272
- switch (t == null ? void 0 : t.type) {
1273
- case fr:
1274
- return {
1275
- ...e,
1276
- announcement: t.payload
1277
- };
1278
- case pr:
1279
- return {
1280
- ...e,
1281
- announcement: null
1282
- };
1283
- default:
1284
- return e;
1285
- }
1286
- }, en = ({
1287
- onAnnouncementClear: e,
1288
- dispatch: t
1289
- }) => {
1290
- t({
1291
- type: pr
1292
- }), typeof e == "function" && e();
1293
- }, Gt = ({
1294
- children: e,
1295
- clearAnnouncementDelay: t,
1296
- clearAnnouncementTimeoutRef: r,
1297
- onAnnouncementClear: a,
1298
- dispatch: n
1299
- }) => {
1300
- clearTimeout(r.current), e !== null && n({
1301
- type: fr,
1302
- payload: e
1303
- }), t && (r.current = setTimeout(
1304
- () => en({
1305
- onAnnouncementClear: a,
1306
- dispatch: n
1307
- }),
1308
- t
1309
- ));
1310
- }, tn = ({
1311
- children: e,
1312
- announcementTimeoutRef: t,
1313
- announcementDelay: r,
1314
- clearAnnouncementDelay: a,
1315
- clearAnnouncementTimeoutRef: n,
1316
- onAnnouncementClear: o,
1317
- dispatch: s
1318
- }) => {
1319
- clearTimeout(t.current), r ? t.current = setTimeout(Gt, r, {
1320
- children: e,
1321
- clearAnnouncementDelay: a,
1322
- clearAnnouncementTimeoutRef: n,
1323
- onAnnouncementClear: o,
1324
- dispatch: s
1325
- }) : Gt({
1326
- children: e,
1327
- clearAnnouncementDelay: a,
1328
- clearAnnouncementTimeoutRef: n,
1329
- onAnnouncementClear: o,
1330
- dispatch: s
1331
- });
1332
- };
1333
- function rn({
1334
- children: e,
1335
- className: t,
1336
- politeness: r,
1337
- role: a = null,
1338
- announcementDelay: n,
1339
- clearAnnouncementDelay: o,
1340
- onAnnouncementClear: s,
1341
- visible: i,
1342
- ...l
1343
- }) {
1344
- const h = S(null), f = S(null), [g, u] = Be(Za, {
1345
- announcement: null
1346
- });
1347
- let m = r;
1348
- typeof m > "u" && (m = a ? Qa[a] : "assertive"), L(() => {
1349
- tn({
1350
- announcementTimeoutRef: h,
1351
- announcementDelay: n,
1352
- children: e,
1353
- clearAnnouncementDelay: o,
1354
- clearAnnouncementTimeoutRef: f,
1355
- onAnnouncementClear: s,
1356
- dispatch: u
1357
- });
1358
- }, [
1297
+ const X = /* @__PURE__ */ new WeakMap(), de = () => {
1298
+ }, z = (
1299
+ /*#__NOINLINE__*/
1300
+ de()
1301
+ ), ct = Object, _ = (e) => e === z, Q = (e) => typeof e == "function", ue = (e, t) => ({
1302
+ ...e,
1303
+ ...t
1304
+ }), fr = (e) => Q(e.then), Xe = {}, Oe = {}, wt = "undefined", ze = typeof window != wt, lt = typeof document != wt, Ya = () => ze && typeof window.requestAnimationFrame != wt, pr = (e, t) => {
1305
+ const r = X.get(e);
1306
+ return [
1307
+ // Getter
1308
+ () => !_(t) && e.get(t) || Xe,
1309
+ // Setter
1310
+ (a) => {
1311
+ if (!_(t)) {
1312
+ const n = e.get(t);
1313
+ t in Oe || (Oe[t] = n), r[5](t, ue(n, a), n || Xe);
1314
+ }
1315
+ },
1316
+ // Subscriber
1317
+ r[6],
1318
+ // Get server cache snapshot
1319
+ () => !_(t) && t in Oe ? Oe[t] : !_(t) && e.get(t) || Xe
1320
+ ];
1321
+ };
1322
+ let dt = !0;
1323
+ const Xa = () => dt, [ut, mt] = ze && window.addEventListener ? [
1324
+ window.addEventListener.bind(window),
1325
+ window.removeEventListener.bind(window)
1326
+ ] : [
1327
+ de,
1328
+ de
1329
+ ], Qa = () => {
1330
+ const e = lt && document.visibilityState;
1331
+ return _(e) || e !== "hidden";
1332
+ }, Za = (e) => (lt && document.addEventListener("visibilitychange", e), ut("focus", e), () => {
1333
+ lt && document.removeEventListener("visibilitychange", e), mt("focus", e);
1334
+ }), en = (e) => {
1335
+ const t = () => {
1336
+ dt = !0, e();
1337
+ }, r = () => {
1338
+ dt = !1;
1339
+ };
1340
+ return ut("online", t), ut("offline", r), () => {
1341
+ mt("online", t), mt("offline", r);
1342
+ };
1343
+ }, tn = {
1344
+ isOnline: Xa,
1345
+ isVisible: Qa
1346
+ }, rn = {
1347
+ initFocus: Za,
1348
+ initReconnect: en
1349
+ }, Kt = !$.useId, Te = !ze || "Deno" in globalThis, an = (e) => Ya() ? window.requestAnimationFrame(e) : setTimeout(e, 1), Qe = Te ? L : fe, Ze = typeof navigator < "u" && navigator.connection, Jt = !Te && Ze && ([
1350
+ "slow-2g",
1351
+ "2g"
1352
+ ].includes(Ze.effectiveType) || Ze.saveData), Le = /* @__PURE__ */ new WeakMap(), et = (e, t) => ct.prototype.toString.call(e) === `[object ${t}]`;
1353
+ let nn = 0;
1354
+ const gt = (e) => {
1355
+ const t = typeof e, r = et(e, "Date"), a = et(e, "RegExp"), n = et(e, "Object");
1356
+ let o, s;
1357
+ if (ct(e) === e && !r && !a) {
1358
+ if (o = Le.get(e), o) return o;
1359
+ if (o = ++nn + "~", Le.set(e, o), Array.isArray(e)) {
1360
+ for (o = "@", s = 0; s < e.length; s++)
1361
+ o += gt(e[s]) + ",";
1362
+ Le.set(e, o);
1363
+ }
1364
+ if (n) {
1365
+ o = "#";
1366
+ const i = ct.keys(e).sort();
1367
+ for (; !_(s = i.pop()); )
1368
+ _(e[s]) || (o += s + ":" + gt(e[s]) + ",");
1369
+ Le.set(e, o);
1370
+ }
1371
+ } else
1372
+ o = r ? e.toJSON() : t == "symbol" ? e.toString() : t == "string" ? JSON.stringify(e) : "" + e;
1373
+ return o;
1374
+ }, Pe = (e) => {
1375
+ if (Q(e))
1376
+ try {
1377
+ e = e();
1378
+ } catch {
1379
+ e = "";
1380
+ }
1381
+ const t = e;
1382
+ return e = typeof e == "string" ? e : (Array.isArray(e) ? e.length : e) ? gt(e) : "", [
1359
1383
  e,
1360
- n,
1361
- o,
1362
- s
1363
- ]);
1364
- const y = c(t, {
1365
- "sr-only": !i
1366
- });
1367
- return /* @__PURE__ */ d(
1368
- "div",
1369
- {
1370
- "aria-live": m,
1371
- ...a && { role: a },
1372
- className: y,
1373
- ...l,
1374
- children: g.announcement
1384
+ t
1385
+ ];
1386
+ };
1387
+ let on = 0;
1388
+ const ht = () => ++on, yr = 0, br = 1, vr = 2, sn = 3;
1389
+ var _e = {
1390
+ __proto__: null,
1391
+ ERROR_REVALIDATE_EVENT: sn,
1392
+ FOCUS_EVENT: yr,
1393
+ MUTATE_EVENT: vr,
1394
+ RECONNECT_EVENT: br
1395
+ };
1396
+ async function kr(...e) {
1397
+ const [t, r, a, n] = e, o = ue({
1398
+ populateCache: !0,
1399
+ throwOnError: !0
1400
+ }, typeof n == "boolean" ? {
1401
+ revalidate: n
1402
+ } : n || {});
1403
+ let s = o.populateCache;
1404
+ const i = o.rollbackOnError;
1405
+ let l = o.optimisticData;
1406
+ const h = (u) => typeof i == "function" ? i(u) : i !== !1, f = o.throwOnError;
1407
+ if (Q(r)) {
1408
+ const u = r, g = [], p = t.keys();
1409
+ for (const b of p)
1410
+ // Skip the special useSWRInfinite and useSWRSubscription keys.
1411
+ !/^\$(inf|sub)\$/.test(b) && u(t.get(b)._k) && g.push(b);
1412
+ return Promise.all(g.map(m));
1413
+ }
1414
+ return m(r);
1415
+ async function m(u) {
1416
+ const [g] = Pe(u);
1417
+ if (!g) return;
1418
+ const [p, b] = pr(t, g), [k, y, N, A] = X.get(t), R = () => {
1419
+ const B = k[g];
1420
+ return (Q(o.revalidate) ? o.revalidate(p().data, u) : o.revalidate !== !1) && (delete N[g], delete A[g], B && B[0]) ? B[0](vr).then(() => p().data) : p().data;
1421
+ };
1422
+ if (e.length < 3)
1423
+ return R();
1424
+ let E = a, C;
1425
+ const ee = ht();
1426
+ y[g] = [
1427
+ ee,
1428
+ 0
1429
+ ];
1430
+ const x = !_(l), oe = p(), H = oe.data, W = oe._c, te = _(W) ? H : W;
1431
+ if (x && (l = Q(l) ? l(te, H) : l, b({
1432
+ data: l,
1433
+ _c: te
1434
+ })), Q(E))
1435
+ try {
1436
+ E = E(te);
1437
+ } catch (B) {
1438
+ C = B;
1439
+ }
1440
+ if (E && fr(E))
1441
+ if (E = await E.catch((B) => {
1442
+ C = B;
1443
+ }), ee !== y[g][0]) {
1444
+ if (C) throw C;
1445
+ return E;
1446
+ } else C && x && h(C) && (s = !0, b({
1447
+ data: te,
1448
+ _c: z
1449
+ }));
1450
+ if (s && !C)
1451
+ if (Q(s)) {
1452
+ const B = s(E, te);
1453
+ b({
1454
+ data: B,
1455
+ error: z,
1456
+ _c: z
1457
+ });
1458
+ } else
1459
+ b({
1460
+ data: E,
1461
+ error: z,
1462
+ _c: z
1463
+ });
1464
+ if (y[g][1] = ht(), Promise.resolve(R()).then(() => {
1465
+ b({
1466
+ _c: z
1467
+ });
1468
+ }), C) {
1469
+ if (f) throw C;
1470
+ return;
1375
1471
  }
1376
- );
1377
- }
1378
- /*!
1379
- @versini/ui-liveregion v1.3.0
1380
- © 2025 gizmette.com
1381
- */
1382
- try {
1383
- window.__VERSINI_UI_LIVEREGION__ || (window.__VERSINI_UI_LIVEREGION__ = {
1384
- version: "1.3.0",
1385
- buildTime: "01/03/2025 10:45 AM EST",
1386
- homepage: "https://github.com/aversini/ui-components",
1387
- license: "MIT"
1388
- });
1389
- } catch {
1472
+ return E;
1473
+ }
1390
1474
  }
1391
- const an = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", nn = ({ mode: e }) => c({
1392
- "bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
1393
- "bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
1394
- "bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
1395
- "bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
1396
- }), on = ({
1397
- focusMode: e
1398
- }) => c("focus:outline focus:outline-2 focus:outline-offset-2", {
1399
- "focus:outline-focus-dark": e === "dark",
1400
- "focus:outline-focus-light": e === "light",
1401
- "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
1402
- "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
1403
- }), sn = ({
1404
- noBorder: e,
1405
- error: t
1406
- }) => c("border-2", {
1407
- "border-border-dark": !e && !t,
1408
- "focus:border-border-dark": !e && t,
1409
- "border-border-error-dark": !e && t,
1410
- "border-transparent": e
1411
- }), cn = ({
1412
- disabled: e,
1413
- raw: t,
1414
- error: r,
1415
- mode: a,
1416
- leftElement: n,
1417
- rightElement: o
1418
- }) => {
1419
- if (t)
1420
- return "";
1421
- if (e)
1422
- return c(
1423
- "transform translate-y-0 scale-100 absolute px-2 cursor-not-allowed opacity-50 font-medium",
1424
- {
1425
- "translate-x-[12px]": o === !0 && !n || !o && !n
1426
- }
1427
- );
1428
- if (!r)
1429
- return c(
1430
- "absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
1431
- {
1432
- "translate-x-[12px]": o === !0 && !n || !o && !n,
1433
- "text-copy-medium": a === "dark",
1434
- "text-copy-dark": a === "light",
1435
- "text-copy-dark dark:text-copy-medium": a === "system",
1436
- "text-copy-medium dark:text-copy-dark": a === "alt-system"
1437
- }
1438
- );
1439
- if (r)
1440
- return c(
1441
- "absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
1442
- {
1443
- "translate-x-[12px]": o === !0 && !n || !o && !n,
1444
- "text-copy-medium": a === "dark",
1445
- "text-copy-error-dark": a === "light",
1446
- "text-copy-error-dark dark:text-copy-error-light": a === "system",
1447
- "text-copy-medium dark:text-copy-error-dark": a === "alt-system"
1475
+ const Yt = (e, t) => {
1476
+ for (const r in e)
1477
+ e[r][0] && e[r][0](t);
1478
+ }, cn = (e, t) => {
1479
+ if (!X.has(e)) {
1480
+ const r = ue(rn, t), a = {}, n = kr.bind(z, e);
1481
+ let o = de;
1482
+ const s = {}, i = (f, m) => {
1483
+ const u = s[f] || [];
1484
+ return s[f] = u, u.push(m), () => u.splice(u.indexOf(m), 1);
1485
+ }, l = (f, m, u) => {
1486
+ e.set(f, m);
1487
+ const g = s[f];
1488
+ if (g)
1489
+ for (const p of g)
1490
+ p(m, u);
1491
+ }, h = () => {
1492
+ if (!X.has(e) && (X.set(e, [
1493
+ a,
1494
+ {},
1495
+ {},
1496
+ {},
1497
+ n,
1498
+ l,
1499
+ i
1500
+ ]), !Te)) {
1501
+ const f = r.initFocus(setTimeout.bind(z, Yt.bind(z, a, yr))), m = r.initReconnect(setTimeout.bind(z, Yt.bind(z, a, br)));
1502
+ o = () => {
1503
+ f && f(), m && m(), X.delete(e);
1504
+ };
1448
1505
  }
1449
- );
1450
- }, ln = ({
1451
- error: e,
1452
- raw: t,
1453
- mode: r,
1454
- disabled: a
1455
- }) => {
1456
- if (t)
1457
- return "";
1458
- if (a)
1459
- return c(
1460
- Je,
1461
- "absolute px-2 cursor-not-allowed opacity-50 font-medium"
1462
- );
1463
- if (!e)
1464
- return c(Je, "absolute px-2 font-medium", {
1465
- "text-copy-medium": r === "dark",
1466
- "text-copy-dark": r === "light",
1467
- "text-copy-dark dark:text-copy-medium": r === "system",
1468
- "text-copy-medium dark:text-copy-dark": r === "alt-system"
1469
- });
1470
- if (e)
1471
- return c(Je, "absolute px-2 font-medium", {
1472
- "text-copy-error-light": r === "dark",
1473
- "text-copy-error-dark": r === "light",
1474
- "text-copy-error-dark dark:text-copy-error-light": r === "system",
1475
- "dark:text-copy-error-dark text-copy-error-light": r === "alt-system"
1476
- });
1477
- }, dn = ({
1478
- className: e,
1479
- textAreaClassName: t,
1480
- raw: r,
1481
- focusMode: a,
1482
- disabled: n,
1483
- noBorder: o,
1484
- error: s,
1485
- mode: i,
1486
- leftElement: l,
1487
- rightElement: h
1488
- }) => {
1489
- const f = r ? e : c(
1490
- "relative flex w-full flex-col justify-center",
1491
- Ga,
1492
- e
1493
- ), g = r ? c(t) : c(
1494
- hr,
1495
- t,
1496
- an(),
1497
- nn({ mode: i }),
1498
- on({ focusMode: a }),
1499
- sn({
1500
- noBorder: o,
1501
- error: s
1506
+ };
1507
+ return h(), [
1508
+ e,
1509
+ n,
1510
+ h,
1511
+ o
1512
+ ];
1513
+ }
1514
+ return [
1515
+ e,
1516
+ X.get(e)[4]
1517
+ ];
1518
+ }, ln = (e, t, r, a, n) => {
1519
+ const o = r.errorRetryCount, s = n.retryCount, i = ~~((Math.random() + 0.5) * (1 << (s < 8 ? s : 8))) * r.errorRetryInterval;
1520
+ !_(o) && s > o || setTimeout(a, i, n);
1521
+ }, dn = it, [St, un] = cn(/* @__PURE__ */ new Map()), mn = ue(
1522
+ {
1523
+ // events
1524
+ onLoadingSlow: de,
1525
+ onSuccess: de,
1526
+ onError: de,
1527
+ onErrorRetry: ln,
1528
+ onDiscarded: de,
1529
+ // switches
1530
+ revalidateOnFocus: !0,
1531
+ revalidateOnReconnect: !0,
1532
+ revalidateIfStale: !0,
1533
+ shouldRetryOnError: !0,
1534
+ // timeouts
1535
+ errorRetryInterval: Jt ? 1e4 : 5e3,
1536
+ focusThrottleInterval: 5 * 1e3,
1537
+ dedupingInterval: 2 * 1e3,
1538
+ loadingTimeout: Jt ? 5e3 : 3e3,
1539
+ // providers
1540
+ compare: dn,
1541
+ isPaused: () => !1,
1542
+ cache: St,
1543
+ mutate: un,
1544
+ fallback: {}
1545
+ },
1546
+ // use web preset by default
1547
+ tn
1548
+ ), gn = (e, t) => {
1549
+ const r = ue(e, t);
1550
+ if (t) {
1551
+ const { use: a, fallback: n } = e, { use: o, fallback: s } = t;
1552
+ a && o && (r.use = a.concat(o)), n && s && (r.fallback = ue(n, s));
1553
+ }
1554
+ return r;
1555
+ }, hn = ta({}), fn = "$inf$", _r = ze && window.__SWR_DEVTOOLS_USE__, pn = _r ? window.__SWR_DEVTOOLS_USE__ : [], yn = () => {
1556
+ _r && (window.__SWR_DEVTOOLS_REACT__ = $);
1557
+ }, bn = (e) => Q(e[1]) ? [
1558
+ e[0],
1559
+ e[1],
1560
+ e[2] || {}
1561
+ ] : [
1562
+ e[0],
1563
+ null,
1564
+ (e[1] === null ? e[2] : e[1]) || {}
1565
+ ], vn = () => ue(mn, U(hn)), Tt = (e, t) => {
1566
+ const [r, a] = Pe(e), [, , , n] = X.get(St);
1567
+ if (n[r]) return n[r];
1568
+ const o = t(a);
1569
+ return n[r] = o, o;
1570
+ }, kn = (e) => (t, r, a) => e(t, r && ((...o) => {
1571
+ const [s] = Pe(t), [, , , i] = X.get(St);
1572
+ if (s.startsWith(fn))
1573
+ return r(...o);
1574
+ const l = i[s];
1575
+ return _(l) ? r(...o) : (delete i[s], l);
1576
+ }), a), _n = pn.concat(kn), En = (e) => function(...r) {
1577
+ const a = vn(), [n, o, s] = bn(r), i = gn(a, s);
1578
+ let l = e;
1579
+ const { use: h } = i, f = (h || []).concat(_n);
1580
+ for (let m = f.length; m--; )
1581
+ l = f[m](l);
1582
+ return l(n, o || i.fetcher || null, i);
1583
+ }, xn = (e, t, r) => {
1584
+ const a = t[e] || (t[e] = []);
1585
+ return a.push(r), () => {
1586
+ const n = a.indexOf(r);
1587
+ n >= 0 && (a[n] = a[a.length - 1], a.pop());
1588
+ };
1589
+ };
1590
+ yn();
1591
+ const tt = $.use || // This extra generic is to avoid TypeScript mixing up the generic and JSX sytax
1592
+ // and emitting an error.
1593
+ // We assume that this is only for the `use(thenable)` case, not `use(context)`.
1594
+ // https://github.com/facebook/react/blob/aed00dacfb79d17c53218404c52b1c7aa59c4a89/packages/react-server/src/ReactFizzThenable.js#L45
1595
+ ((e) => {
1596
+ switch (e.status) {
1597
+ case "pending":
1598
+ throw e;
1599
+ case "fulfilled":
1600
+ return e.value;
1601
+ case "rejected":
1602
+ throw e.reason;
1603
+ default:
1604
+ throw e.status = "pending", e.then((t) => {
1605
+ e.status = "fulfilled", e.value = t;
1606
+ }, (t) => {
1607
+ e.status = "rejected", e.reason = t;
1608
+ }), e;
1609
+ }
1610
+ }), rt = {
1611
+ dedupe: !0
1612
+ }, wn = (e, t, r) => {
1613
+ const { cache: a, compare: n, suspense: o, fallbackData: s, revalidateOnMount: i, revalidateIfStale: l, refreshInterval: h, refreshWhenHidden: f, refreshWhenOffline: m, keepPreviousData: u } = r, [g, p, b, k] = X.get(a), [y, N] = Pe(e), A = S(!1), R = S(!1), E = S(y), C = S(t), ee = S(r), x = () => ee.current, oe = () => x().isVisible() && x().isOnline(), [H, W, te, B] = pr(a, y), j = S({}).current, me = _(s) ? _(r.fallback) ? z : r.fallback[y] : s, q = (w, v) => {
1614
+ for (const O in j) {
1615
+ const T = O;
1616
+ if (T === "data") {
1617
+ if (!n(w[T], v[T]) && (!_(w[T]) || !n(ge, v[T])))
1618
+ return !1;
1619
+ } else if (v[T] !== w[T])
1620
+ return !1;
1621
+ }
1622
+ return !0;
1623
+ }, ke = De(() => {
1624
+ const w = !y || !t ? !1 : _(i) ? x().isPaused() || o ? !1 : l !== !1 : i, v = (V) => {
1625
+ const ae = ue(V);
1626
+ return delete ae._k, w ? {
1627
+ isValidating: !0,
1628
+ isLoading: !0,
1629
+ ...ae
1630
+ } : ae;
1631
+ }, O = H(), T = B(), P = v(O), ce = O === T ? P : v(T);
1632
+ let M = P;
1633
+ return [
1634
+ () => {
1635
+ const V = v(H());
1636
+ return q(V, M) ? (M.data = V.data, M.isLoading = V.isLoading, M.isValidating = V.isValidating, M.error = V.error, M) : (M = V, V);
1637
+ },
1638
+ () => ce
1639
+ ];
1640
+ }, [
1641
+ a,
1642
+ y
1643
+ ]), K = Ja.useSyncExternalStore(Z(
1644
+ (w) => te(y, (v, O) => {
1645
+ q(O, v) || w();
1502
1646
  }),
1503
- {
1504
- "disabled:cursor-not-allowed disabled:opacity-50": n
1647
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1648
+ [
1649
+ a,
1650
+ y
1651
+ ]
1652
+ ), ke[0], ke[1]), se = !A.current, Ne = g[y] && g[y].length > 0, ie = K.data, re = _(ie) ? me && fr(me) ? tt(me) : me : ie, pe = K.error, Re = S(re), ge = u ? _(ie) ? Re.current : ie : re, Ce = Ne && !_(pe) ? !1 : se && !_(i) ? i : x().isPaused() ? !1 : o ? _(re) ? !1 : l : _(re) || l, J = !!(y && t && se && Ce), Y = _(K.isValidating) ? J : K.isValidating, We = _(K.isLoading) ? J : K.isLoading, he = Z(
1653
+ async (w) => {
1654
+ const v = C.current;
1655
+ if (!y || !v || R.current || x().isPaused())
1656
+ return !1;
1657
+ let O, T, P = !0;
1658
+ const ce = w || {}, M = !b[y] || !ce.dedupe, V = () => Kt ? !R.current && y === E.current && A.current : y === E.current, ae = {
1659
+ isValidating: !1,
1660
+ isLoading: !1
1661
+ }, Ot = () => {
1662
+ W(ae);
1663
+ }, Lt = () => {
1664
+ const F = b[y];
1665
+ F && F[1] === T && delete b[y];
1666
+ }, Bt = {
1667
+ isValidating: !0
1668
+ };
1669
+ _(H().data) && (Bt.isLoading = !0);
1670
+ try {
1671
+ if (M && (W(Bt), r.loadingTimeout && _(H().data) && setTimeout(() => {
1672
+ P && V() && x().onLoadingSlow(y, r);
1673
+ }, r.loadingTimeout), b[y] = [
1674
+ v(N),
1675
+ ht()
1676
+ ]), [O, T] = b[y], O = await O, M && setTimeout(Lt, r.dedupingInterval), !b[y] || b[y][1] !== T)
1677
+ return M && V() && x().onDiscarded(y), !1;
1678
+ ae.error = z;
1679
+ const F = p[y];
1680
+ if (!_(F) && // case 1
1681
+ (T <= F[0] || // case 2
1682
+ T <= F[1] || // case 3
1683
+ F[1] === 0))
1684
+ return Ot(), M && V() && x().onDiscarded(y), !1;
1685
+ const ne = H().data;
1686
+ ae.data = n(ne, O) ? ne : O, M && V() && x().onSuccess(O, y, r);
1687
+ } catch (F) {
1688
+ Lt();
1689
+ const ne = x(), { shouldRetryOnError: je } = ne;
1690
+ ne.isPaused() || (ae.error = F, M && V() && (ne.onError(F, y, ne), (je === !0 || Q(je) && je(F)) && (!x().revalidateOnFocus || !x().revalidateOnReconnect || oe()) && ne.onErrorRetry(F, y, ne, (Dr) => {
1691
+ const qe = g[y];
1692
+ qe && qe[0] && qe[0](_e.ERROR_REVALIDATE_EVENT, Dr);
1693
+ }, {
1694
+ retryCount: (ce.retryCount || 0) + 1,
1695
+ dedupe: !0
1696
+ })));
1697
+ }
1698
+ return P = !1, Ot(), !0;
1699
+ },
1700
+ // `setState` is immutable, and `eventsCallback`, `fnArg`, and
1701
+ // `keyValidating` are depending on `key`, so we can exclude them from
1702
+ // the deps array.
1703
+ //
1704
+ // FIXME:
1705
+ // `fn` and `config` might be changed during the lifecycle,
1706
+ // but they might be changed every render like this.
1707
+ // `useSWR('key', () => fetch('/api/'), { suspense: true })`
1708
+ // So we omit the values from the deps array
1709
+ // even though it might cause unexpected behaviors.
1710
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1711
+ [
1712
+ y,
1713
+ a
1714
+ ]
1715
+ ), Ie = Z(
1716
+ // Use callback to make sure `keyRef.current` returns latest result every time
1717
+ (...w) => kr(a, E.current, ...w),
1718
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1719
+ []
1720
+ );
1721
+ if (Qe(() => {
1722
+ C.current = t, ee.current = r, _(ie) || (Re.current = ie);
1723
+ }), Qe(() => {
1724
+ if (!y) return;
1725
+ const w = he.bind(z, rt);
1726
+ let v = 0;
1727
+ const T = xn(y, g, (P, ce = {}) => {
1728
+ if (P == _e.FOCUS_EVENT) {
1729
+ const M = Date.now();
1730
+ x().revalidateOnFocus && M > v && oe() && (v = M + x().focusThrottleInterval, w());
1731
+ } else if (P == _e.RECONNECT_EVENT)
1732
+ x().revalidateOnReconnect && oe() && w();
1733
+ else {
1734
+ if (P == _e.MUTATE_EVENT)
1735
+ return he();
1736
+ if (P == _e.ERROR_REVALIDATE_EVENT)
1737
+ return he(ce);
1738
+ }
1739
+ });
1740
+ return R.current = !1, E.current = y, A.current = !0, W({
1741
+ _k: N
1742
+ }), Ce && (_(re) || Te ? w() : an(w)), () => {
1743
+ R.current = !0, T();
1744
+ };
1745
+ }, [
1746
+ y
1747
+ ]), Qe(() => {
1748
+ let w;
1749
+ function v() {
1750
+ const T = Q(h) ? h(H().data) : h;
1751
+ T && w !== -1 && (w = setTimeout(O, T));
1505
1752
  }
1506
- ), u = r ? void 0 : "sr-only", m = cn({
1507
- disabled: n,
1508
- raw: r,
1509
- error: s,
1510
- mode: i,
1511
- rightElement: h,
1512
- leftElement: l
1513
- }), y = ln({
1514
- error: s,
1515
- raw: r,
1516
- mode: i,
1517
- disabled: n
1518
- }), b = r ? void 0 : c(Wa, "absolute"), k = r ? void 0 : c(ja, "absolute");
1519
- return {
1520
- wrapper: f,
1521
- textArea: g,
1522
- accessibleLabel: u,
1523
- visibleLabel: m,
1524
- helperText: y,
1525
- rightElement: b,
1526
- leftElement: k
1527
- };
1528
- }, un = ({
1529
- scrollHeight: e,
1530
- currentHeight: t,
1531
- currentLabelOffset: r = 0,
1532
- currentHelperTextOffset: a = 0
1533
- }) => {
1534
- let n, o;
1535
- if (e > 0 && e !== t) {
1536
- const s = e - t, i = Math.abs(s / 24);
1537
- n = r + -1 * Math.sign(s) * (12 * i), o = a + Math.sign(s) * (12 * i);
1753
+ function O() {
1754
+ !H().error && (f || x().isVisible()) && (m || x().isOnline()) ? he(rt).then(v) : v();
1755
+ }
1756
+ return v(), () => {
1757
+ w && (clearTimeout(w), w = -1);
1758
+ };
1759
+ }, [
1760
+ h,
1761
+ f,
1762
+ m,
1763
+ y
1764
+ ]), ra(ge), o && _(re) && y) {
1765
+ if (!Kt && Te)
1766
+ throw new Error("Fallback data is required when using Suspense in SSR.");
1767
+ C.current = t, ee.current = r, R.current = !1;
1768
+ const w = k[y];
1769
+ if (!_(w)) {
1770
+ const v = Ie(w);
1771
+ tt(v);
1772
+ }
1773
+ if (_(pe)) {
1774
+ const v = he(rt);
1775
+ _(ge) || (v.status = "fulfilled", v.value = !0), tt(v);
1776
+ } else
1777
+ throw pe;
1538
1778
  }
1539
1779
  return {
1540
- labelOffset: n,
1541
- helperTextOffset: o,
1542
- scrollHeight: e
1780
+ mutate: Ie,
1781
+ get data() {
1782
+ return j.data = !0, ge;
1783
+ },
1784
+ get error() {
1785
+ return j.error = !0, pe;
1786
+ },
1787
+ get isValidating() {
1788
+ return j.isValidating = !0, Y;
1789
+ },
1790
+ get isLoading() {
1791
+ return j.isLoading = !0, We;
1792
+ }
1543
1793
  };
1544
- }, yr = $.forwardRef(
1545
- ({
1546
- id: e,
1547
- name: t,
1548
- label: r,
1549
- error: a = !1,
1550
- raw: n = !1,
1551
- className: o,
1552
- textAreaClassName: s,
1553
- mode: i = "system",
1554
- focusMode: l = "system",
1555
- value: h,
1556
- defaultValue: f,
1557
- disabled: g = !1,
1558
- noBorder: u = !1,
1559
- labelId: m,
1560
- helperText: y = "",
1561
- helperTextOnFocus: b = !1,
1562
- rightElement: k,
1563
- leftElement: p,
1564
- onChange: N,
1565
- onFocus: A,
1566
- onBlur: R,
1567
- ...E
1568
- }, C) => {
1569
- var ee;
1570
- const x = S(null), oe = Ka([C, x]), [H, W] = Ft(), [te, B] = Ft(), j = S(80), me = S(-25), q = S(null), ke = S(30), K = S(null), se = Xa({ id: e, prefix: `${hr}-` }), [Ne, ie] = G(0), [re, pe] = G(0), [Re, ge] = G(
1571
- !!(!b && y)
1572
- ), Ce = `${t} error, ${y}`, J = dn({
1573
- className: o,
1574
- textAreaClassName: s,
1575
- error: a,
1576
- raw: n,
1577
- focusMode: l,
1578
- disabled: g,
1579
- noBorder: u,
1580
- mode: i,
1581
- rightElement: !!k,
1582
- leftElement: !!p
1583
- }), [Y, We] = Ya({
1584
- value: h,
1585
- initialControlledDelay: 20,
1586
- defaultValue: f,
1587
- onChange: (v) => {
1588
- N && N({
1589
- target: {
1590
- value: v
1591
- }
1592
- });
1593
- }
1594
- }), he = (v) => {
1595
- We(v.target.value);
1596
- }, Ie = (v) => {
1597
- b && y && ge(!0), A && A(v);
1598
- }, w = (v) => {
1599
- b && y && !Y && ge(!1), R && R(v);
1600
- };
1601
- return fe(() => {
1602
- W && W.width && ie(W.width + 18 + 10);
1603
- }, [W]), fe(() => {
1604
- B && B.width && pe(B.width + 18 + 10);
1605
- }, [B]), fe(() => {
1606
- n || x && x.current && Y !== void 0 && (x.current.style.height = "inherit", x.current.style.height = x.current.scrollHeight + "px");
1607
- }, [Y, n]), fe(() => {
1608
- n || setTimeout(() => {
1609
- var v;
1610
- (v = q == null ? void 0 : q.current) == null || v.style.setProperty(
1611
- "--av-text-area-wrapper-transition",
1612
- Y ? "none" : "all 0.2s ease-out"
1613
- );
1614
- }, 0);
1615
- }, [Y, n]), fe(() => {
1616
- var v, O;
1617
- if (!n && x && x.current && Y !== void 0) {
1618
- const { labelOffset: T, helperTextOffset: U, scrollHeight: ce } = un({
1619
- scrollHeight: x.current.scrollHeight,
1620
- currentHeight: j.current,
1621
- currentLabelOffset: me.current,
1622
- currentHelperTextOffset: ke.current
1623
- });
1624
- T && (me.current = T, (v = q == null ? void 0 : q.current) == null || v.style.setProperty(
1625
- "--av-text-area-label",
1626
- `${T}px`
1627
- )), U && (ke.current = U, (O = K == null ? void 0 : K.current) == null || O.style.setProperty(
1628
- "--av-text-area-helper-text",
1629
- `${U}px`
1630
- )), j.current = ce || j.current;
1631
- }
1632
- }, [Y, n]), B.width > 0 && ((ee = q == null ? void 0 : q.current) == null || ee.style.setProperty(
1633
- "--tw-translate-x",
1634
- `${12 + B.width + 5}px`
1635
- )), /* @__PURE__ */ I("div", { className: J.wrapper, children: [
1636
- /* @__PURE__ */ d(
1637
- "label",
1638
- {
1639
- htmlFor: se,
1640
- id: m,
1641
- className: J.accessibleLabel,
1642
- children: r
1643
- }
1644
- ),
1645
- p && /* @__PURE__ */ d(
1646
- "div",
1647
- {
1648
- ref: te,
1649
- className: J.leftElement,
1650
- children: p
1651
- }
1652
- ),
1653
- /* @__PURE__ */ d(
1654
- "textarea",
1655
- {
1656
- ref: oe,
1657
- id: se,
1658
- name: t,
1659
- disabled: g,
1660
- placeholder: n ? void 0 : " ",
1661
- className: J.textArea,
1662
- rows: 1,
1663
- ...y && { "aria-describedby": `${se}-helper` },
1664
- ...a && { "aria-invalid": "true" },
1665
- ...k && !p && !n && { style: { paddingRight: Ne } },
1666
- ...p && !k && !n && { style: { paddingLeft: re } },
1667
- ...k && p && !n && {
1668
- style: {
1669
- paddingRight: Ne,
1670
- paddingLeft: re
1671
- }
1672
- },
1673
- value: Y,
1674
- onChange: he,
1675
- onFocus: Ie,
1676
- onBlur: w,
1677
- ...E
1678
- }
1679
- ),
1680
- !n && /* @__PURE__ */ d(
1681
- "label",
1682
- {
1683
- ref: q,
1684
- "aria-hidden": !0,
1685
- htmlFor: se,
1686
- className: `${J.visibleLabel}`,
1687
- children: r
1688
- }
1689
- ),
1690
- Re && /* @__PURE__ */ d(
1691
- "div",
1692
- {
1693
- ref: K,
1694
- id: `${se}-helper`,
1695
- className: J.helperText,
1696
- children: y
1697
- }
1698
- ),
1699
- k && /* @__PURE__ */ d(
1700
- "div",
1701
- {
1702
- ref: H,
1703
- className: J.rightElement,
1704
- children: k
1705
- }
1706
- ),
1707
- a && y && /* @__PURE__ */ d(rn, { politeness: "polite", clearAnnouncementDelay: 500, children: Ce })
1708
- ] });
1709
- }
1710
- );
1711
- yr.displayName = "TextArea";
1712
- const le = {
1794
+ }, Sn = En(wn), le = {
1713
1795
  GET_LOCATION: `query GetLocation($latitude: Float!, $longitude: Float!) {
1714
1796
  location(latitude: $latitude, longitude: $longitude) {
1715
1797
  country
@@ -1800,7 +1882,7 @@ const le = {
1800
1882
  engine: $engine,
1801
1883
  tags: $tags)
1802
1884
  }`
1803
- }, ze = {
1885
+ }, Ue = {
1804
1886
  GET_LOCATION: {
1805
1887
  schema: le.GET_LOCATION,
1806
1888
  method: "location"
@@ -1833,11 +1915,11 @@ const le = {
1833
1915
  schema: le.SET_USER_PREFERENCES,
1834
1916
  method: "setUserPreferences"
1835
1917
  }
1836
- }, br = process.env.PUBLIC_SASSY_API_SERVER_URL, mn = async ({
1918
+ }, Er = process.env.PUBLIC_SASSY_API_SERVER_URL, Tn = async ({
1837
1919
  query: e,
1838
1920
  data: t,
1839
1921
  headers: r = {}
1840
- }) => await fetch(`${br}/graphql`, {
1922
+ }) => await fetch(`${Er}/graphql`, {
1841
1923
  method: "POST",
1842
1924
  credentials: "include",
1843
1925
  headers: {
@@ -1849,14 +1931,14 @@ const le = {
1849
1931
  query: e,
1850
1932
  variables: t
1851
1933
  })
1852
- }), gn = async ({
1934
+ }), Nn = async ({
1853
1935
  accessToken: e,
1854
1936
  type: t,
1855
1937
  params: r = {}
1856
1938
  }) => {
1857
1939
  const a = t != null && t.data ? t.data(r) : r;
1858
1940
  try {
1859
- const n = `Bearer ${e}`, o = await mn({
1941
+ const n = `Bearer ${e}`, o = await Tn({
1860
1942
  headers: {
1861
1943
  authorization: n
1862
1944
  },
@@ -1874,14 +1956,14 @@ const le = {
1874
1956
  } catch (n) {
1875
1957
  return console.error(n), { status: 500, data: [] };
1876
1958
  }
1877
- }, hn = async ({
1959
+ }, Rn = async ({
1878
1960
  accessToken: e,
1879
1961
  name: t,
1880
1962
  data: r,
1881
1963
  method: a = "POST"
1882
1964
  }) => {
1883
1965
  const n = `Bearer ${e}`;
1884
- return await fetch(`${br}/api/${t}`, {
1966
+ return await fetch(`${Er}/api/${t}`, {
1885
1967
  method: a,
1886
1968
  credentials: "include",
1887
1969
  headers: {
@@ -1890,925 +1972,854 @@ const le = {
1890
1972
  },
1891
1973
  body: JSON.stringify(r)
1892
1974
  });
1893
- }, fn = ({
1894
- mode: e = "light",
1895
- focusMode: t = "light",
1896
- radius: r = "small"
1975
+ }, He = ({
1976
+ fetcher: e,
1977
+ scope: t,
1978
+ keys: r,
1979
+ swrOptions: a,
1980
+ getAccessToken: n
1897
1981
  }) => {
1898
- const { state: a, dispatch: n } = P(ve), o = S(null), s = S(!1), i = (l) => {
1899
- l.preventDefault(), n({
1900
- type: rr
1901
- });
1902
- };
1903
- return L(() => {
1904
- var l;
1905
- (a == null ? void 0 : a.streaming) === !0 && !s.current && o.current && (s.current = !0, o.current.focus()), (a == null ? void 0 : a.streaming) === !1 && (s.current = !1, (l = o.current) == null || l.blur());
1906
- }, [a]), /* @__PURE__ */ d(
1907
- ir,
1908
- {
1909
- noBorder: !0,
1910
- radius: r,
1911
- mode: e,
1912
- focusMode: t,
1913
- ref: o,
1914
- onClick: i,
1915
- children: a != null && a.streaming ? /* @__PURE__ */ d(ra, { size: "size-4", monotone: !0 }) : /* @__PURE__ */ d(ta, { size: "size-4", monotone: !0 })
1916
- }
1982
+ const { data: o, error: s, isLoading: i, mutate: l } = Sn(
1983
+ [t, ...r],
1984
+ (h) => e(h, n),
1985
+ { ...a }
1917
1986
  );
1918
- }, $e = (e, t) => {
1919
- e({
1920
- type: nr,
1921
- payload: {
1922
- streaming: t
1923
- }
1924
- });
1925
- }, Wt = (e) => {
1926
- $e(e, !1), e({
1927
- type: xe,
1928
- payload: {
1929
- message: {
1930
- role: vt,
1931
- content: Hr
1932
- }
1933
- }
1987
+ return { data: o, error: s, isLoading: i, mutate: l };
1988
+ }, Fe = async ({
1989
+ getAccessToken: e,
1990
+ type: t,
1991
+ params: r
1992
+ }) => {
1993
+ const a = await e(), n = await Nn({
1994
+ accessToken: a,
1995
+ type: t,
1996
+ params: r
1934
1997
  });
1935
- }, pn = () => {
1936
- const { state: e, dispatch: t } = P(ve), { state: r, dispatch: a } = P(wt), [n, o] = G(""), { getAccessToken: s, user: i } = Me(), l = S(null), h = S(
1937
- null
1998
+ if (n.status === 200 && n.errors === void 0)
1999
+ return n.data;
2000
+ throw new Error("An error occurred while fetching the data.");
2001
+ }, xr = async ([e, t], r) => Fe({
2002
+ getAccessToken: r,
2003
+ type: Ue.GET_USER_PREFERENCES,
2004
+ params: {
2005
+ user: t
2006
+ }
2007
+ }), Cn = ({
2008
+ keys: e,
2009
+ getAccessToken: t
2010
+ }) => He({
2011
+ fetcher: xr,
2012
+ scope: "/preferences",
2013
+ keys: e,
2014
+ swrOptions: { keepPreviousData: !0 },
2015
+ getAccessToken: t
2016
+ }), In = ({
2017
+ keys: e,
2018
+ getAccessToken: t
2019
+ }) => {
2020
+ Tt(
2021
+ ["/preferences", ...e],
2022
+ (r) => xr(r, t)
1938
2023
  );
1939
- L(() => {
1940
- (async () => {
1941
- var u;
1942
- if (!e || e.messages.length === 0) {
1943
- (u = h == null ? void 0 : h.current) == null || u.cancel();
1944
- return;
1945
- }
1946
- const g = e.messages[e.messages.length - 1];
1947
- if (!(e.messages.length === 0 || g.message.role === we || g.message.role === Vr || g.message.role === vt || g.message.role === zr))
1948
- try {
1949
- const m = await hn({
1950
- accessToken: await s(),
1951
- name: "generate",
1952
- data: {
1953
- messages: e.messages,
1954
- model: e.engine || Se,
1955
- user: (i == null ? void 0 : i.username) || "",
1956
- id: e.id,
1957
- usage: e.usage
1958
- }
1959
- });
1960
- if (m && m.ok) {
1961
- const y = xt();
1962
- h.current = m.body.getReader();
1963
- const b = new TextDecoder();
1964
- for (; ; ) {
1965
- $e(t, !0);
1966
- const { done: k, value: p } = await h.current.read();
1967
- if (k) {
1968
- $e(t, !1);
1969
- break;
1970
- }
1971
- const N = b.decode(p, { stream: !0 }), A = N.indexOf(Bt);
1972
- if (A !== -1) {
1973
- const R = N.substring(0, A), E = JSON.parse(
1974
- N.substring(A + Bt.length)
1975
- );
1976
- t({
1977
- type: ar,
1978
- payload: {
1979
- model: E.model,
1980
- usage: E.usage
1981
- }
1982
- }), t({
1983
- type: xe,
1984
- payload: {
1985
- message: {
1986
- content: R,
1987
- role: we,
1988
- messageId: y,
1989
- processingTime: E.processingTime,
1990
- name: E.name
1991
- }
1992
- }
1993
- }), $e(t, !1);
1994
- break;
1995
- } else
1996
- t({
1997
- type: xe,
1998
- payload: {
1999
- message: {
2000
- content: N,
2001
- role: we,
2002
- messageId: y
2003
- }
2004
- }
2005
- });
2006
- }
2007
- } else
2008
- Wt(t);
2009
- } catch (m) {
2010
- console.error(m), Wt(t);
2011
- }
2012
- })();
2013
- }, [e == null ? void 0 : e.messages]);
2014
- const f = async (g) => {
2015
- g.preventDefault(), t({
2016
- type: xe,
2017
- payload: {
2018
- message: {
2019
- role: nt,
2020
- content: n
2021
- }
2022
- }
2023
- }), o("");
2024
- };
2025
- return L(() => {
2026
- if (r.prompt !== "") {
2027
- const g = r.prompt.endsWith(":") && !r.prompt.endsWith(": ") ? r.prompt + " " : r.prompt;
2028
- g.indexOf($t) !== -1 ? navigator.clipboard.readText().then((m) => {
2029
- o(g.replace($t, m));
2030
- }) : o(g), l.current && l.current.focus(), a({
2031
- type: or
2032
- });
2033
- }
2034
- }, [r, a]), L(() => {
2035
- e && e.usage === 0 && e.messages.length === 0 && l.current && l.current.focus();
2036
- }, [e]), /* @__PURE__ */ d(yt, { children: /* @__PURE__ */ d("form", { className: "mt-2", onSubmit: f, children: /* @__PURE__ */ d(
2037
- yr,
2038
- {
2039
- mode: "dark",
2040
- focusMode: "light",
2041
- ref: l,
2042
- name: "chat-input",
2043
- label: Ur,
2044
- helperText: "Press ENTER to add a new line",
2045
- helperTextOnFocus: !0,
2046
- required: !0,
2047
- value: n,
2048
- onChange: (g) => o(g.target.value),
2049
- onKeyDown: la([["mod+Enter", f]]),
2050
- leftElement: /* @__PURE__ */ d(fn, {}),
2051
- rightElement: /* @__PURE__ */ d(
2052
- cr,
2053
- {
2054
- disabled: e == null ? void 0 : e.streaming,
2055
- noBorder: !0,
2056
- type: "submit",
2057
- mode: "light",
2058
- focusMode: "light",
2059
- children: Pr
2060
- }
2061
- )
2062
- }
2063
- ) }) });
2064
- };
2065
- var Ae = { exports: {} }, Ye = {};
2066
- /**
2067
- * @license React
2068
- * use-sync-external-store-shim.production.js
2069
- *
2070
- * Copyright (c) Meta Platforms, Inc. and affiliates.
2071
- *
2072
- * This source code is licensed under the MIT license found in the
2073
- * LICENSE file in the root directory of this source tree.
2074
- */
2075
- var jt;
2076
- function yn() {
2077
- if (jt) return Ye;
2078
- jt = 1;
2079
- var e = $;
2080
- function t(g, u) {
2081
- return g === u && (g !== 0 || 1 / g === 1 / u) || g !== g && u !== u;
2024
+ }, An = async ([e, t], r) => Fe({
2025
+ getAccessToken: r,
2026
+ type: Ue.GET_CHATS_STATS,
2027
+ params: {
2028
+ user: t
2082
2029
  }
2083
- var r = typeof Object.is == "function" ? Object.is : t, a = e.useState, n = e.useEffect, o = e.useLayoutEffect, s = e.useDebugValue;
2084
- function i(g, u) {
2085
- var m = u(), y = a({ inst: { value: m, getSnapshot: u } }), b = y[0].inst, k = y[1];
2086
- return o(
2087
- function() {
2088
- b.value = m, b.getSnapshot = u, l(b) && k({ inst: b });
2089
- },
2090
- [g, m, u]
2091
- ), n(
2092
- function() {
2093
- return l(b) && k({ inst: b }), g(function() {
2094
- l(b) && k({ inst: b });
2095
- });
2096
- },
2097
- [g]
2098
- ), s(m), m;
2030
+ }), es = ({
2031
+ keys: e,
2032
+ getAccessToken: t
2033
+ }) => He({
2034
+ fetcher: An,
2035
+ scope: "/stats",
2036
+ keys: e,
2037
+ getAccessToken: t
2038
+ }), wr = async ([e, t, r, a], n) => Fe({
2039
+ getAccessToken: n,
2040
+ type: Ue.GET_CHATS,
2041
+ params: {
2042
+ user: t,
2043
+ searchString: r,
2044
+ direction: a,
2045
+ limit: 1,
2046
+ truncateSize: 100
2099
2047
  }
2100
- function l(g) {
2101
- var u = g.getSnapshot;
2102
- g = g.value;
2103
- try {
2104
- var m = u();
2105
- return !r(g, m);
2106
- } catch {
2107
- return !0;
2108
- }
2048
+ }), ts = ({
2049
+ keys: e,
2050
+ getAccessToken: t
2051
+ }) => He({
2052
+ fetcher: wr,
2053
+ scope: "/history",
2054
+ keys: e,
2055
+ getAccessToken: t,
2056
+ swrOptions: {
2057
+ keepPreviousData: !0,
2058
+ dedupingInterval: 1e4
2109
2059
  }
2110
- function h(g, u) {
2111
- return u();
2060
+ }), On = ({
2061
+ keys: e,
2062
+ getAccessToken: t
2063
+ }) => {
2064
+ Tt(["/history", ...e], (r) => wr(r, t));
2065
+ }, Sr = async ([e], t) => Fe({
2066
+ getAccessToken: t,
2067
+ type: Ue.GET_SERVER_CAPABILITIES
2068
+ }), rs = ({
2069
+ getAccessToken: e
2070
+ }) => He({
2071
+ fetcher: Sr,
2072
+ scope: "/capabilities",
2073
+ keys: [],
2074
+ getAccessToken: e
2075
+ }), Ln = ({
2076
+ getAccessToken: e
2077
+ }) => {
2078
+ Tt(["/capabilities"], (t) => Sr(t, e));
2079
+ }, ve = $.createContext({
2080
+ state: {
2081
+ id: "",
2082
+ model: Se,
2083
+ engine: Se,
2084
+ usage: 0,
2085
+ messages: [],
2086
+ isComponent: !1,
2087
+ prompts: []
2088
+ },
2089
+ dispatch: () => {
2090
+ },
2091
+ serverStats: {
2092
+ version: "",
2093
+ models: [],
2094
+ plugins: [],
2095
+ engines: []
2112
2096
  }
2113
- var f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? h : i;
2114
- return Ye.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : f, Ye;
2115
- }
2116
- var Xe = {};
2117
- /**
2118
- * @license React
2119
- * use-sync-external-store-shim.development.js
2120
- *
2121
- * Copyright (c) Meta Platforms, Inc. and affiliates.
2122
- *
2123
- * This source code is licensed under the MIT license found in the
2124
- * LICENSE file in the root directory of this source tree.
2097
+ }), Bn = $.createContext({
2098
+ state: { searchString: "", sortedCell: "", sortDirection: "" },
2099
+ dispatch: () => {
2100
+ }
2101
+ }), Nt = $.createContext({
2102
+ state: { prompt: "" },
2103
+ dispatch: () => {
2104
+ }
2105
+ });
2106
+ /*!
2107
+ @versini/ui-textarea v3.0.1
2108
+ © 2025 gizmette.com
2125
2109
  */
2126
- var qt;
2127
- function bn() {
2128
- return qt || (qt = 1, process.env.NODE_ENV !== "production" && function() {
2129
- function e(m, y) {
2130
- return m === y && (m !== 0 || 1 / m === 1 / y) || m !== m && y !== y;
2131
- }
2132
- function t(m, y) {
2133
- f || n.startTransition === void 0 || (f = !0, console.error(
2134
- "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
2135
- ));
2136
- var b = y();
2137
- if (!g) {
2138
- var k = y();
2139
- o(b, k) || (console.error(
2140
- "The result of getSnapshot should be cached to avoid an infinite loop"
2141
- ), g = !0);
2142
- }
2143
- k = s({
2144
- inst: { value: b, getSnapshot: y }
2145
- });
2146
- var p = k[0].inst, N = k[1];
2147
- return l(
2148
- function() {
2149
- p.value = b, p.getSnapshot = y, r(p) && N({ inst: p });
2150
- },
2151
- [m, b, y]
2152
- ), i(
2153
- function() {
2154
- return r(p) && N({ inst: p }), m(function() {
2155
- r(p) && N({ inst: p });
2156
- });
2157
- },
2158
- [m]
2159
- ), h(b), b;
2160
- }
2161
- function r(m) {
2162
- var y = m.getSnapshot;
2163
- m = m.value;
2164
- try {
2165
- var b = y();
2166
- return !o(m, b);
2167
- } catch {
2168
- return !0;
2169
- }
2170
- }
2171
- function a(m, y) {
2172
- return y();
2173
- }
2174
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
2175
- var n = $, o = typeof Object.is == "function" ? Object.is : e, s = n.useState, i = n.useEffect, l = n.useLayoutEffect, h = n.useDebugValue, f = !1, g = !1, u = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? a : t;
2176
- Xe.useSyncExternalStore = n.useSyncExternalStore !== void 0 ? n.useSyncExternalStore : u, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
2177
- }()), Xe;
2110
+ try {
2111
+ window.__VERSINI_UI_TEXTAREA__ || (window.__VERSINI_UI_TEXTAREA__ = {
2112
+ version: "3.0.1",
2113
+ buildTime: "01/06/2025 08:00 PM EST",
2114
+ homepage: "https://github.com/aversini/ui-components",
2115
+ license: "MIT"
2116
+ });
2117
+ } catch {
2118
+ }
2119
+ const Tr = "av-text-area", $n = "av-text-area-wrapper", at = "av-text-area-helper-text", Mn = "av-text-area__control--right", Dn = "av-text-area__control--left";
2120
+ function Vn() {
2121
+ const e = S(!1);
2122
+ return L(() => (e.current = !0, () => {
2123
+ e.current = !1;
2124
+ }), []), Z(() => e.current, []);
2125
+ }
2126
+ function zn(e) {
2127
+ return De(() => e.every((t) => t == null) ? () => {
2128
+ } : (t) => {
2129
+ e.forEach((r) => {
2130
+ typeof r == "function" ? r(t) : r != null && (r.current = t);
2131
+ });
2132
+ }, e);
2178
2133
  }
2179
- var Kt;
2180
- function vn() {
2181
- return Kt || (Kt = 1, process.env.NODE_ENV === "production" ? Ae.exports = /* @__PURE__ */ yn() : Ae.exports = /* @__PURE__ */ bn()), Ae.exports;
2134
+ const Pn = {
2135
+ x: 0,
2136
+ y: 0,
2137
+ width: 0,
2138
+ height: 0,
2139
+ top: 0,
2140
+ left: 0,
2141
+ bottom: 0,
2142
+ right: 0
2143
+ };
2144
+ function Xt(e) {
2145
+ const t = Vn(), r = S(0), a = S(null), [n, o] = G(Pn), s = De(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
2146
+ const l = i[0];
2147
+ l && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
2148
+ a.current && t() && o(l.contentRect);
2149
+ }));
2150
+ }), [t]);
2151
+ return L(() => (a.current && (s == null || s.observe(a.current, e)), () => {
2152
+ s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
2153
+ }), [s, e]), [a, n];
2182
2154
  }
2183
- var kn = /* @__PURE__ */ vn(), Jt = Object.prototype.hasOwnProperty;
2184
- function it(e, t) {
2185
- var r, a;
2186
- if (e === t) return !0;
2187
- if (e && t && (r = e.constructor) === t.constructor) {
2188
- if (r === Date) return e.getTime() === t.getTime();
2189
- if (r === RegExp) return e.toString() === t.toString();
2190
- if (r === Array) {
2191
- if ((a = e.length) === t.length)
2192
- for (; a-- && it(e[a], t[a]); ) ;
2193
- return a === -1;
2194
- }
2195
- if (!r || typeof e == "object") {
2196
- a = 0;
2197
- for (r in e)
2198
- if (Jt.call(e, r) && ++a && !Jt.call(t, r) || !(r in t) || !it(e[r], t[r])) return !1;
2199
- return Object.keys(t).length === a;
2200
- }
2155
+ function Un({
2156
+ value: e,
2157
+ defaultValue: t,
2158
+ finalValue: r,
2159
+ onChange: a = () => {
2160
+ },
2161
+ initialControlledDelay: n = 0
2162
+ }) {
2163
+ const [o, s] = G(!1), [i, l] = G(
2164
+ t !== void 0 ? t : r
2165
+ ), h = (f) => {
2166
+ l(f), a == null || a(f);
2167
+ };
2168
+ return L(() => {
2169
+ (async () => e !== void 0 && !o && n > 0 && (await new Promise(
2170
+ (f) => setTimeout(f, n)
2171
+ ), s(!0)))();
2172
+ }, [e, n, o]), e !== void 0 ? !o && n > 0 ? ["", a, !0] : [e, a, !0] : [i, h, !1];
2173
+ }
2174
+ function Hn(e) {
2175
+ const t = aa();
2176
+ if (!e)
2177
+ return t;
2178
+ if (typeof e == "number" || typeof e == "string")
2179
+ return `${e}${t}`;
2180
+ if (typeof e == "object") {
2181
+ const { id: r, prefix: a = "" } = e;
2182
+ return typeof r == "number" || typeof r == "string" ? `${a}${r}` : `${a}${t}`;
2201
2183
  }
2202
- return e !== e && t !== t;
2203
2184
  }
2204
- const X = /* @__PURE__ */ new WeakMap(), de = () => {
2205
- }, z = (
2206
- /*#__NOINLINE__*/
2207
- de()
2208
- ), ct = Object, _ = (e) => e === z, Q = (e) => typeof e == "function", ue = (e, t) => ({
2209
- ...e,
2210
- ...t
2211
- }), vr = (e) => Q(e.then), Qe = {}, Oe = {}, St = "undefined", Ue = typeof window != St, lt = typeof document != St, _n = () => Ue && typeof window.requestAnimationFrame != St, kr = (e, t) => {
2212
- const r = X.get(e);
2213
- return [
2214
- // Getter
2215
- () => !_(t) && e.get(t) || Qe,
2216
- // Setter
2217
- (a) => {
2218
- if (!_(t)) {
2219
- const n = e.get(t);
2220
- t in Oe || (Oe[t] = n), r[5](t, ue(n, a), n || Qe);
2221
- }
2222
- },
2223
- // Subscriber
2224
- r[6],
2225
- // Get server cache snapshot
2226
- () => !_(t) && t in Oe ? Oe[t] : !_(t) && e.get(t) || Qe
2227
- ];
2228
- };
2229
- let dt = !0;
2230
- const En = () => dt, [ut, mt] = Ue && window.addEventListener ? [
2231
- window.addEventListener.bind(window),
2232
- window.removeEventListener.bind(window)
2233
- ] : [
2234
- de,
2235
- de
2236
- ], xn = () => {
2237
- const e = lt && document.visibilityState;
2238
- return _(e) || e !== "hidden";
2239
- }, wn = (e) => (lt && document.addEventListener("visibilitychange", e), ut("focus", e), () => {
2240
- lt && document.removeEventListener("visibilitychange", e), mt("focus", e);
2241
- }), Sn = (e) => {
2242
- const t = () => {
2243
- dt = !0, e();
2244
- }, r = () => {
2245
- dt = !1;
2246
- };
2247
- return ut("online", t), ut("offline", r), () => {
2248
- mt("online", t), mt("offline", r);
2249
- };
2250
- }, Tn = {
2251
- isOnline: En,
2252
- isVisible: xn
2253
- }, Nn = {
2254
- initFocus: wn,
2255
- initReconnect: Sn
2256
- }, Yt = !$.useId, Te = !Ue || "Deno" in globalThis, Rn = (e) => _n() ? window.requestAnimationFrame(e) : setTimeout(e, 1), Ze = Te ? L : fe, et = typeof navigator < "u" && navigator.connection, Xt = !Te && et && ([
2257
- "slow-2g",
2258
- "2g"
2259
- ].includes(et.effectiveType) || et.saveData), Le = /* @__PURE__ */ new WeakMap(), tt = (e, t) => ct.prototype.toString.call(e) === `[object ${t}]`;
2260
- let Cn = 0;
2261
- const gt = (e) => {
2262
- const t = typeof e, r = tt(e, "Date"), a = tt(e, "RegExp"), n = tt(e, "Object");
2263
- let o, s;
2264
- if (ct(e) === e && !r && !a) {
2265
- if (o = Le.get(e), o) return o;
2266
- if (o = ++Cn + "~", Le.set(e, o), Array.isArray(e)) {
2267
- for (o = "@", s = 0; s < e.length; s++)
2268
- o += gt(e[s]) + ",";
2269
- Le.set(e, o);
2270
- }
2271
- if (n) {
2272
- o = "#";
2273
- const i = ct.keys(e).sort();
2274
- for (; !_(s = i.pop()); )
2275
- _(e[s]) || (o += s + ":" + gt(e[s]) + ",");
2276
- Le.set(e, o);
2277
- }
2278
- } else
2279
- o = r ? e.toJSON() : t == "symbol" ? e.toString() : t == "string" ? JSON.stringify(e) : "" + e;
2280
- return o;
2281
- }, Pe = (e) => {
2282
- if (Q(e))
2283
- try {
2284
- e = e();
2285
- } catch {
2286
- e = "";
2287
- }
2288
- const t = e;
2289
- return e = typeof e == "string" ? e : (Array.isArray(e) ? e.length : e) ? gt(e) : "", [
2290
- e,
2185
+ const Nr = "SET_ANNOUNCEMENT", Rr = "CLEAR_ANNOUNCEMENT", Fn = {
2186
+ alert: null,
2187
+ alertdialog: null,
2188
+ log: "polite",
2189
+ marquee: null,
2190
+ progressbar: null,
2191
+ status: "polite",
2192
+ timer: "assertive"
2193
+ }, Gn = (e, t) => {
2194
+ switch (t == null ? void 0 : t.type) {
2195
+ case Nr:
2196
+ return {
2197
+ ...e,
2198
+ announcement: t.payload
2199
+ };
2200
+ case Rr:
2201
+ return {
2202
+ ...e,
2203
+ announcement: null
2204
+ };
2205
+ default:
2206
+ return e;
2207
+ }
2208
+ }, Wn = ({
2209
+ onAnnouncementClear: e,
2210
+ dispatch: t
2211
+ }) => {
2212
+ t({
2213
+ type: Rr
2214
+ }), typeof e == "function" && e();
2215
+ }, Qt = ({
2216
+ children: e,
2217
+ clearAnnouncementDelay: t,
2218
+ clearAnnouncementTimeoutRef: r,
2219
+ onAnnouncementClear: a,
2220
+ dispatch: n
2221
+ }) => {
2222
+ clearTimeout(r.current), e !== null && n({
2223
+ type: Nr,
2224
+ payload: e
2225
+ }), t && (r.current = setTimeout(
2226
+ () => Wn({
2227
+ onAnnouncementClear: a,
2228
+ dispatch: n
2229
+ }),
2291
2230
  t
2292
- ];
2293
- };
2294
- let In = 0;
2295
- const ht = () => ++In, _r = 0, Er = 1, xr = 2, An = 3;
2296
- var _e = {
2297
- __proto__: null,
2298
- ERROR_REVALIDATE_EVENT: An,
2299
- FOCUS_EVENT: _r,
2300
- MUTATE_EVENT: xr,
2301
- RECONNECT_EVENT: Er
2231
+ ));
2232
+ }, jn = ({
2233
+ children: e,
2234
+ announcementTimeoutRef: t,
2235
+ announcementDelay: r,
2236
+ clearAnnouncementDelay: a,
2237
+ clearAnnouncementTimeoutRef: n,
2238
+ onAnnouncementClear: o,
2239
+ dispatch: s
2240
+ }) => {
2241
+ clearTimeout(t.current), r ? t.current = setTimeout(Qt, r, {
2242
+ children: e,
2243
+ clearAnnouncementDelay: a,
2244
+ clearAnnouncementTimeoutRef: n,
2245
+ onAnnouncementClear: o,
2246
+ dispatch: s
2247
+ }) : Qt({
2248
+ children: e,
2249
+ clearAnnouncementDelay: a,
2250
+ clearAnnouncementTimeoutRef: n,
2251
+ onAnnouncementClear: o,
2252
+ dispatch: s
2253
+ });
2302
2254
  };
2303
- async function wr(...e) {
2304
- const [t, r, a, n] = e, o = ue({
2305
- populateCache: !0,
2306
- throwOnError: !0
2307
- }, typeof n == "boolean" ? {
2308
- revalidate: n
2309
- } : n || {});
2310
- let s = o.populateCache;
2311
- const i = o.rollbackOnError;
2312
- let l = o.optimisticData;
2313
- const h = (u) => typeof i == "function" ? i(u) : i !== !1, f = o.throwOnError;
2314
- if (Q(r)) {
2315
- const u = r, m = [], y = t.keys();
2316
- for (const b of y)
2317
- // Skip the special useSWRInfinite and useSWRSubscription keys.
2318
- !/^\$(inf|sub)\$/.test(b) && u(t.get(b)._k) && m.push(b);
2319
- return Promise.all(m.map(g));
2320
- }
2321
- return g(r);
2322
- async function g(u) {
2323
- const [m] = Pe(u);
2324
- if (!m) return;
2325
- const [y, b] = kr(t, m), [k, p, N, A] = X.get(t), R = () => {
2326
- const B = k[m];
2327
- return (Q(o.revalidate) ? o.revalidate(y().data, u) : o.revalidate !== !1) && (delete N[m], delete A[m], B && B[0]) ? B[0](xr).then(() => y().data) : y().data;
2328
- };
2329
- if (e.length < 3)
2330
- return R();
2331
- let E = a, C;
2332
- const ee = ht();
2333
- p[m] = [
2334
- ee,
2335
- 0
2336
- ];
2337
- const x = !_(l), oe = y(), H = oe.data, W = oe._c, te = _(W) ? H : W;
2338
- if (x && (l = Q(l) ? l(te, H) : l, b({
2339
- data: l,
2340
- _c: te
2341
- })), Q(E))
2342
- try {
2343
- E = E(te);
2344
- } catch (B) {
2345
- C = B;
2346
- }
2347
- if (E && vr(E))
2348
- if (E = await E.catch((B) => {
2349
- C = B;
2350
- }), ee !== p[m][0]) {
2351
- if (C) throw C;
2352
- return E;
2353
- } else C && x && h(C) && (s = !0, b({
2354
- data: te,
2355
- _c: z
2356
- }));
2357
- if (s && !C)
2358
- if (Q(s)) {
2359
- const B = s(E, te);
2360
- b({
2361
- data: B,
2362
- error: z,
2363
- _c: z
2364
- });
2365
- } else
2366
- b({
2367
- data: E,
2368
- error: z,
2369
- _c: z
2370
- });
2371
- if (p[m][1] = ht(), Promise.resolve(R()).then(() => {
2372
- b({
2373
- _c: z
2374
- });
2375
- }), C) {
2376
- if (f) throw C;
2377
- return;
2255
+ function qn({
2256
+ children: e,
2257
+ className: t,
2258
+ politeness: r,
2259
+ role: a = null,
2260
+ announcementDelay: n,
2261
+ clearAnnouncementDelay: o,
2262
+ onAnnouncementClear: s,
2263
+ visible: i,
2264
+ ...l
2265
+ }) {
2266
+ const h = S(null), f = S(null), [m, u] = Be(Gn, {
2267
+ announcement: null
2268
+ });
2269
+ let g = r;
2270
+ typeof g > "u" && (g = a ? Fn[a] : "assertive"), L(() => {
2271
+ jn({
2272
+ announcementTimeoutRef: h,
2273
+ announcementDelay: n,
2274
+ children: e,
2275
+ clearAnnouncementDelay: o,
2276
+ clearAnnouncementTimeoutRef: f,
2277
+ onAnnouncementClear: s,
2278
+ dispatch: u
2279
+ });
2280
+ }, [
2281
+ e,
2282
+ n,
2283
+ o,
2284
+ s
2285
+ ]);
2286
+ const p = c(t, {
2287
+ "sr-only": !i
2288
+ });
2289
+ return /* @__PURE__ */ d(
2290
+ "div",
2291
+ {
2292
+ "aria-live": g,
2293
+ ...a && { role: a },
2294
+ className: p,
2295
+ ...l,
2296
+ children: m.announcement
2378
2297
  }
2379
- return E;
2380
- }
2298
+ );
2381
2299
  }
2382
- const Qt = (e, t) => {
2383
- for (const r in e)
2384
- e[r][0] && e[r][0](t);
2385
- }, On = (e, t) => {
2386
- if (!X.has(e)) {
2387
- const r = ue(Nn, t), a = {}, n = wr.bind(z, e);
2388
- let o = de;
2389
- const s = {}, i = (f, g) => {
2390
- const u = s[f] || [];
2391
- return s[f] = u, u.push(g), () => u.splice(u.indexOf(g), 1);
2392
- }, l = (f, g, u) => {
2393
- e.set(f, g);
2394
- const m = s[f];
2395
- if (m)
2396
- for (const y of m)
2397
- y(g, u);
2398
- }, h = () => {
2399
- if (!X.has(e) && (X.set(e, [
2400
- a,
2401
- {},
2402
- {},
2403
- {},
2404
- n,
2405
- l,
2406
- i
2407
- ]), !Te)) {
2408
- const f = r.initFocus(setTimeout.bind(z, Qt.bind(z, a, _r))), g = r.initReconnect(setTimeout.bind(z, Qt.bind(z, a, Er)));
2409
- o = () => {
2410
- f && f(), g && g(), X.delete(e);
2411
- };
2300
+ /*!
2301
+ @versini/ui-liveregion v1.3.1
2302
+ © 2025 gizmette.com
2303
+ */
2304
+ try {
2305
+ window.__VERSINI_UI_LIVEREGION__ || (window.__VERSINI_UI_LIVEREGION__ = {
2306
+ version: "1.3.1",
2307
+ buildTime: "01/06/2025 08:00 PM EST",
2308
+ homepage: "https://github.com/aversini/ui-components",
2309
+ license: "MIT"
2310
+ });
2311
+ } catch {
2312
+ }
2313
+ const Kn = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", Jn = ({ mode: e }) => c({
2314
+ "bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
2315
+ "bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
2316
+ "bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
2317
+ "bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
2318
+ }), Yn = ({
2319
+ focusMode: e
2320
+ }) => c("focus:outline focus:outline-2 focus:outline-offset-2", {
2321
+ "focus:outline-focus-dark": e === "dark",
2322
+ "focus:outline-focus-light": e === "light",
2323
+ "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
2324
+ "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
2325
+ }), Xn = ({
2326
+ noBorder: e,
2327
+ error: t
2328
+ }) => c("border-2", {
2329
+ "border-border-dark": !e && !t,
2330
+ "focus:border-border-dark": !e && t,
2331
+ "border-border-error-dark": !e && t,
2332
+ "border-transparent": e
2333
+ }), Qn = ({
2334
+ disabled: e,
2335
+ raw: t,
2336
+ error: r,
2337
+ mode: a,
2338
+ leftElement: n,
2339
+ rightElement: o
2340
+ }) => {
2341
+ if (t)
2342
+ return "";
2343
+ if (e)
2344
+ return c(
2345
+ "transform translate-y-0 scale-100 absolute px-2 cursor-not-allowed opacity-50 font-medium",
2346
+ {
2347
+ "translate-x-[12px]": o === !0 && !n || !o && !n
2412
2348
  }
2413
- };
2414
- return h(), [
2415
- e,
2416
- n,
2417
- h,
2418
- o
2419
- ];
2420
- }
2421
- return [
2422
- e,
2423
- X.get(e)[4]
2424
- ];
2425
- }, Ln = (e, t, r, a, n) => {
2426
- const o = r.errorRetryCount, s = n.retryCount, i = ~~((Math.random() + 0.5) * (1 << (s < 8 ? s : 8))) * r.errorRetryInterval;
2427
- !_(o) && s > o || setTimeout(a, i, n);
2428
- }, Bn = it, [Tt, $n] = On(/* @__PURE__ */ new Map()), Mn = ue(
2429
- {
2430
- // events
2431
- onLoadingSlow: de,
2432
- onSuccess: de,
2433
- onError: de,
2434
- onErrorRetry: Ln,
2435
- onDiscarded: de,
2436
- // switches
2437
- revalidateOnFocus: !0,
2438
- revalidateOnReconnect: !0,
2439
- revalidateIfStale: !0,
2440
- shouldRetryOnError: !0,
2441
- // timeouts
2442
- errorRetryInterval: Xt ? 1e4 : 5e3,
2443
- focusThrottleInterval: 5 * 1e3,
2444
- dedupingInterval: 2 * 1e3,
2445
- loadingTimeout: Xt ? 5e3 : 3e3,
2446
- // providers
2447
- compare: Bn,
2448
- isPaused: () => !1,
2449
- cache: Tt,
2450
- mutate: $n,
2451
- fallback: {}
2452
- },
2453
- // use web preset by default
2454
- Tn
2455
- ), Dn = (e, t) => {
2456
- const r = ue(e, t);
2457
- if (t) {
2458
- const { use: a, fallback: n } = e, { use: o, fallback: s } = t;
2459
- a && o && (r.use = a.concat(o)), n && s && (r.fallback = ue(n, s));
2460
- }
2461
- return r;
2462
- }, Vn = Zr({}), zn = "$inf$", Sr = Ue && window.__SWR_DEVTOOLS_USE__, Un = Sr ? window.__SWR_DEVTOOLS_USE__ : [], Pn = () => {
2463
- Sr && (window.__SWR_DEVTOOLS_REACT__ = $);
2464
- }, Hn = (e) => Q(e[1]) ? [
2465
- e[0],
2466
- e[1],
2467
- e[2] || {}
2468
- ] : [
2469
- e[0],
2470
- null,
2471
- (e[1] === null ? e[2] : e[1]) || {}
2472
- ], Fn = () => ue(Mn, P(Vn)), Gn = (e, t) => {
2473
- const [r, a] = Pe(e), [, , , n] = X.get(Tt);
2474
- if (n[r]) return n[r];
2475
- const o = t(a);
2476
- return n[r] = o, o;
2477
- }, Wn = (e) => (t, r, a) => e(t, r && ((...o) => {
2478
- const [s] = Pe(t), [, , , i] = X.get(Tt);
2479
- if (s.startsWith(zn))
2480
- return r(...o);
2481
- const l = i[s];
2482
- return _(l) ? r(...o) : (delete i[s], l);
2483
- }), a), jn = Un.concat(Wn), qn = (e) => function(...r) {
2484
- const a = Fn(), [n, o, s] = Hn(r), i = Dn(a, s);
2485
- let l = e;
2486
- const { use: h } = i, f = (h || []).concat(jn);
2487
- for (let g = f.length; g--; )
2488
- l = f[g](l);
2489
- return l(n, o || i.fetcher || null, i);
2490
- }, Kn = (e, t, r) => {
2491
- const a = t[e] || (t[e] = []);
2492
- return a.push(r), () => {
2493
- const n = a.indexOf(r);
2494
- n >= 0 && (a[n] = a[a.length - 1], a.pop());
2349
+ );
2350
+ if (!r)
2351
+ return c(
2352
+ "absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
2353
+ {
2354
+ "translate-x-[12px]": o === !0 && !n || !o && !n,
2355
+ "text-copy-medium": a === "dark",
2356
+ "text-copy-dark": a === "light",
2357
+ "text-copy-dark dark:text-copy-medium": a === "system",
2358
+ "text-copy-medium dark:text-copy-dark": a === "alt-system"
2359
+ }
2360
+ );
2361
+ if (r)
2362
+ return c(
2363
+ "absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
2364
+ {
2365
+ "translate-x-[12px]": o === !0 && !n || !o && !n,
2366
+ "text-copy-medium": a === "dark",
2367
+ "text-copy-error-dark": a === "light",
2368
+ "text-copy-error-dark dark:text-copy-error-light": a === "system",
2369
+ "text-copy-medium dark:text-copy-error-dark": a === "alt-system"
2370
+ }
2371
+ );
2372
+ }, Zn = ({
2373
+ error: e,
2374
+ raw: t,
2375
+ mode: r,
2376
+ disabled: a
2377
+ }) => {
2378
+ if (t)
2379
+ return "";
2380
+ if (a)
2381
+ return c(
2382
+ at,
2383
+ "absolute px-2 cursor-not-allowed opacity-50 font-medium"
2384
+ );
2385
+ if (!e)
2386
+ return c(at, "absolute px-2 font-medium", {
2387
+ "text-copy-medium": r === "dark",
2388
+ "text-copy-dark": r === "light",
2389
+ "text-copy-dark dark:text-copy-medium": r === "system",
2390
+ "text-copy-medium dark:text-copy-dark": r === "alt-system"
2391
+ });
2392
+ if (e)
2393
+ return c(at, "absolute px-2 font-medium", {
2394
+ "text-copy-error-light": r === "dark",
2395
+ "text-copy-error-dark": r === "light",
2396
+ "text-copy-error-dark dark:text-copy-error-light": r === "system",
2397
+ "dark:text-copy-error-dark text-copy-error-light": r === "alt-system"
2398
+ });
2399
+ }, eo = ({
2400
+ className: e,
2401
+ textAreaClassName: t,
2402
+ raw: r,
2403
+ focusMode: a,
2404
+ disabled: n,
2405
+ noBorder: o,
2406
+ error: s,
2407
+ mode: i,
2408
+ leftElement: l,
2409
+ rightElement: h
2410
+ }) => {
2411
+ const f = r ? e : c(
2412
+ "relative flex w-full flex-col justify-center",
2413
+ $n,
2414
+ e
2415
+ ), m = r ? c(t) : c(
2416
+ Tr,
2417
+ t,
2418
+ Kn(),
2419
+ Jn({ mode: i }),
2420
+ Yn({ focusMode: a }),
2421
+ Xn({
2422
+ noBorder: o,
2423
+ error: s
2424
+ }),
2425
+ {
2426
+ "disabled:cursor-not-allowed disabled:opacity-50": n
2427
+ }
2428
+ ), u = r ? void 0 : "sr-only", g = Qn({
2429
+ disabled: n,
2430
+ raw: r,
2431
+ error: s,
2432
+ mode: i,
2433
+ rightElement: h,
2434
+ leftElement: l
2435
+ }), p = Zn({
2436
+ error: s,
2437
+ raw: r,
2438
+ mode: i,
2439
+ disabled: n
2440
+ }), b = r ? void 0 : c(Mn, "absolute"), k = r ? void 0 : c(Dn, "absolute");
2441
+ return {
2442
+ wrapper: f,
2443
+ textArea: m,
2444
+ accessibleLabel: u,
2445
+ visibleLabel: g,
2446
+ helperText: p,
2447
+ rightElement: b,
2448
+ leftElement: k
2495
2449
  };
2496
- };
2497
- Pn();
2498
- const rt = $.use || // This extra generic is to avoid TypeScript mixing up the generic and JSX sytax
2499
- // and emitting an error.
2500
- // We assume that this is only for the `use(thenable)` case, not `use(context)`.
2501
- // https://github.com/facebook/react/blob/aed00dacfb79d17c53218404c52b1c7aa59c4a89/packages/react-server/src/ReactFizzThenable.js#L45
2502
- ((e) => {
2503
- switch (e.status) {
2504
- case "pending":
2505
- throw e;
2506
- case "fulfilled":
2507
- return e.value;
2508
- case "rejected":
2509
- throw e.reason;
2510
- default:
2511
- throw e.status = "pending", e.then((t) => {
2512
- e.status = "fulfilled", e.value = t;
2513
- }, (t) => {
2514
- e.status = "rejected", e.reason = t;
2515
- }), e;
2450
+ }, to = ({
2451
+ scrollHeight: e,
2452
+ currentHeight: t,
2453
+ currentLabelOffset: r = 0,
2454
+ currentHelperTextOffset: a = 0
2455
+ }) => {
2456
+ let n, o;
2457
+ if (e > 0 && e !== t) {
2458
+ const s = e - t, i = Math.abs(s / 24);
2459
+ n = r + -1 * Math.sign(s) * (12 * i), o = a + Math.sign(s) * (12 * i);
2516
2460
  }
2517
- }), at = {
2518
- dedupe: !0
2519
- }, Jn = (e, t, r) => {
2520
- const { cache: a, compare: n, suspense: o, fallbackData: s, revalidateOnMount: i, revalidateIfStale: l, refreshInterval: h, refreshWhenHidden: f, refreshWhenOffline: g, keepPreviousData: u } = r, [m, y, b, k] = X.get(a), [p, N] = Pe(e), A = S(!1), R = S(!1), E = S(p), C = S(t), ee = S(r), x = () => ee.current, oe = () => x().isVisible() && x().isOnline(), [H, W, te, B] = kr(a, p), j = S({}).current, me = _(s) ? _(r.fallback) ? z : r.fallback[p] : s, q = (w, v) => {
2521
- for (const O in j) {
2522
- const T = O;
2523
- if (T === "data") {
2524
- if (!n(w[T], v[T]) && (!_(w[T]) || !n(ge, v[T])))
2525
- return !1;
2526
- } else if (v[T] !== w[T])
2527
- return !1;
2528
- }
2529
- return !0;
2530
- }, ke = De(() => {
2531
- const w = !p || !t ? !1 : _(i) ? x().isPaused() || o ? !1 : l !== !1 : i, v = (V) => {
2532
- const ae = ue(V);
2533
- return delete ae._k, w ? {
2534
- isValidating: !0,
2535
- isLoading: !0,
2536
- ...ae
2537
- } : ae;
2538
- }, O = H(), T = B(), U = v(O), ce = O === T ? U : v(T);
2539
- let M = U;
2540
- return [
2541
- () => {
2542
- const V = v(H());
2543
- return q(V, M) ? (M.data = V.data, M.isLoading = V.isLoading, M.isValidating = V.isValidating, M.error = V.error, M) : (M = V, V);
2544
- },
2545
- () => ce
2546
- ];
2547
- }, [
2548
- a,
2549
- p
2550
- ]), K = kn.useSyncExternalStore(Z(
2551
- (w) => te(p, (v, O) => {
2552
- q(O, v) || w();
2553
- }),
2554
- // eslint-disable-next-line react-hooks/exhaustive-deps
2555
- [
2556
- a,
2557
- p
2558
- ]
2559
- ), ke[0], ke[1]), se = !A.current, Ne = m[p] && m[p].length > 0, ie = K.data, re = _(ie) ? me && vr(me) ? rt(me) : me : ie, pe = K.error, Re = S(re), ge = u ? _(ie) ? Re.current : ie : re, Ce = Ne && !_(pe) ? !1 : se && !_(i) ? i : x().isPaused() ? !1 : o ? _(re) ? !1 : l : _(re) || l, J = !!(p && t && se && Ce), Y = _(K.isValidating) ? J : K.isValidating, We = _(K.isLoading) ? J : K.isLoading, he = Z(
2560
- async (w) => {
2561
- const v = C.current;
2562
- if (!p || !v || R.current || x().isPaused())
2563
- return !1;
2564
- let O, T, U = !0;
2565
- const ce = w || {}, M = !b[p] || !ce.dedupe, V = () => Yt ? !R.current && p === E.current && A.current : p === E.current, ae = {
2566
- isValidating: !1,
2567
- isLoading: !1
2568
- }, At = () => {
2569
- W(ae);
2570
- }, Ot = () => {
2571
- const F = b[p];
2572
- F && F[1] === T && delete b[p];
2573
- }, Lt = {
2574
- isValidating: !0
2575
- };
2576
- _(H().data) && (Lt.isLoading = !0);
2577
- try {
2578
- if (M && (W(Lt), r.loadingTimeout && _(H().data) && setTimeout(() => {
2579
- U && V() && x().onLoadingSlow(p, r);
2580
- }, r.loadingTimeout), b[p] = [
2581
- v(N),
2582
- ht()
2583
- ]), [O, T] = b[p], O = await O, M && setTimeout(Ot, r.dedupingInterval), !b[p] || b[p][1] !== T)
2584
- return M && V() && x().onDiscarded(p), !1;
2585
- ae.error = z;
2586
- const F = y[p];
2587
- if (!_(F) && // case 1
2588
- (T <= F[0] || // case 2
2589
- T <= F[1] || // case 3
2590
- F[1] === 0))
2591
- return At(), M && V() && x().onDiscarded(p), !1;
2592
- const ne = H().data;
2593
- ae.data = n(ne, O) ? ne : O, M && V() && x().onSuccess(O, p, r);
2594
- } catch (F) {
2595
- Ot();
2596
- const ne = x(), { shouldRetryOnError: je } = ne;
2597
- ne.isPaused() || (ae.error = F, M && V() && (ne.onError(F, p, ne), (je === !0 || Q(je) && je(F)) && (!x().revalidateOnFocus || !x().revalidateOnReconnect || oe()) && ne.onErrorRetry(F, p, ne, (Br) => {
2598
- const qe = m[p];
2599
- qe && qe[0] && qe[0](_e.ERROR_REVALIDATE_EVENT, Br);
2600
- }, {
2601
- retryCount: (ce.retryCount || 0) + 1,
2602
- dedupe: !0
2603
- })));
2461
+ return {
2462
+ labelOffset: n,
2463
+ helperTextOffset: o,
2464
+ scrollHeight: e
2465
+ };
2466
+ }, Cr = $.forwardRef(
2467
+ ({
2468
+ id: e,
2469
+ name: t,
2470
+ label: r,
2471
+ error: a = !1,
2472
+ raw: n = !1,
2473
+ className: o,
2474
+ textAreaClassName: s,
2475
+ mode: i = "system",
2476
+ focusMode: l = "system",
2477
+ value: h,
2478
+ defaultValue: f,
2479
+ disabled: m = !1,
2480
+ noBorder: u = !1,
2481
+ labelId: g,
2482
+ helperText: p = "",
2483
+ helperTextOnFocus: b = !1,
2484
+ rightElement: k,
2485
+ leftElement: y,
2486
+ onChange: N,
2487
+ onFocus: A,
2488
+ onBlur: R,
2489
+ ...E
2490
+ }, C) => {
2491
+ var ee;
2492
+ const x = S(null), oe = zn([C, x]), [H, W] = Xt(), [te, B] = Xt(), j = S(80), me = S(-25), q = S(null), ke = S(30), K = S(null), se = Hn({ id: e, prefix: `${Tr}-` }), [Ne, ie] = G(0), [re, pe] = G(0), [Re, ge] = G(
2493
+ !!(!b && p)
2494
+ ), Ce = `${t} error, ${p}`, J = eo({
2495
+ className: o,
2496
+ textAreaClassName: s,
2497
+ error: a,
2498
+ raw: n,
2499
+ focusMode: l,
2500
+ disabled: m,
2501
+ noBorder: u,
2502
+ mode: i,
2503
+ rightElement: !!k,
2504
+ leftElement: !!y
2505
+ }), [Y, We] = Un({
2506
+ value: h,
2507
+ initialControlledDelay: 20,
2508
+ defaultValue: f,
2509
+ onChange: (v) => {
2510
+ N && N({
2511
+ target: {
2512
+ value: v
2513
+ }
2514
+ });
2604
2515
  }
2605
- return U = !1, At(), !0;
2606
- },
2607
- // `setState` is immutable, and `eventsCallback`, `fnArg`, and
2608
- // `keyValidating` are depending on `key`, so we can exclude them from
2609
- // the deps array.
2610
- //
2611
- // FIXME:
2612
- // `fn` and `config` might be changed during the lifecycle,
2613
- // but they might be changed every render like this.
2614
- // `useSWR('key', () => fetch('/api/'), { suspense: true })`
2615
- // So we omit the values from the deps array
2616
- // even though it might cause unexpected behaviors.
2617
- // eslint-disable-next-line react-hooks/exhaustive-deps
2618
- [
2619
- p,
2620
- a
2621
- ]
2622
- ), Ie = Z(
2623
- // Use callback to make sure `keyRef.current` returns latest result every time
2624
- (...w) => wr(a, E.current, ...w),
2625
- // eslint-disable-next-line react-hooks/exhaustive-deps
2626
- []
2627
- );
2628
- if (Ze(() => {
2629
- C.current = t, ee.current = r, _(ie) || (Re.current = ie);
2630
- }), Ze(() => {
2631
- if (!p) return;
2632
- const w = he.bind(z, at);
2633
- let v = 0;
2634
- const T = Kn(p, m, (U, ce = {}) => {
2635
- if (U == _e.FOCUS_EVENT) {
2636
- const M = Date.now();
2637
- x().revalidateOnFocus && M > v && oe() && (v = M + x().focusThrottleInterval, w());
2638
- } else if (U == _e.RECONNECT_EVENT)
2639
- x().revalidateOnReconnect && oe() && w();
2640
- else {
2641
- if (U == _e.MUTATE_EVENT)
2642
- return he();
2643
- if (U == _e.ERROR_REVALIDATE_EVENT)
2644
- return he(ce);
2516
+ }), he = (v) => {
2517
+ We(v.target.value);
2518
+ }, Ie = (v) => {
2519
+ b && p && ge(!0), A && A(v);
2520
+ }, w = (v) => {
2521
+ b && p && !Y && ge(!1), R && R(v);
2522
+ };
2523
+ return fe(() => {
2524
+ W && W.width && ie(W.width + 18 + 10);
2525
+ }, [W]), fe(() => {
2526
+ B && B.width && pe(B.width + 18 + 10);
2527
+ }, [B]), fe(() => {
2528
+ n || x && x.current && Y !== void 0 && (x.current.style.height = "inherit", x.current.style.height = x.current.scrollHeight + "px");
2529
+ }, [Y, n]), fe(() => {
2530
+ n || setTimeout(() => {
2531
+ var v;
2532
+ (v = q == null ? void 0 : q.current) == null || v.style.setProperty(
2533
+ "--av-text-area-wrapper-transition",
2534
+ Y ? "none" : "all 0.2s ease-out"
2535
+ );
2536
+ }, 0);
2537
+ }, [Y, n]), fe(() => {
2538
+ var v, O;
2539
+ if (!n && x && x.current && Y !== void 0) {
2540
+ const { labelOffset: T, helperTextOffset: P, scrollHeight: ce } = to({
2541
+ scrollHeight: x.current.scrollHeight,
2542
+ currentHeight: j.current,
2543
+ currentLabelOffset: me.current,
2544
+ currentHelperTextOffset: ke.current
2545
+ });
2546
+ T && (me.current = T, (v = q == null ? void 0 : q.current) == null || v.style.setProperty(
2547
+ "--av-text-area-label",
2548
+ `${T}px`
2549
+ )), P && (ke.current = P, (O = K == null ? void 0 : K.current) == null || O.style.setProperty(
2550
+ "--av-text-area-helper-text",
2551
+ `${P}px`
2552
+ )), j.current = ce || j.current;
2645
2553
  }
2554
+ }, [Y, n]), B.width > 0 && ((ee = q == null ? void 0 : q.current) == null || ee.style.setProperty(
2555
+ "--tw-translate-x",
2556
+ `${12 + B.width + 5}px`
2557
+ )), /* @__PURE__ */ I("div", { className: J.wrapper, children: [
2558
+ /* @__PURE__ */ d(
2559
+ "label",
2560
+ {
2561
+ htmlFor: se,
2562
+ id: g,
2563
+ className: J.accessibleLabel,
2564
+ children: r
2565
+ }
2566
+ ),
2567
+ y && /* @__PURE__ */ d(
2568
+ "div",
2569
+ {
2570
+ ref: te,
2571
+ className: J.leftElement,
2572
+ children: y
2573
+ }
2574
+ ),
2575
+ /* @__PURE__ */ d(
2576
+ "textarea",
2577
+ {
2578
+ ref: oe,
2579
+ id: se,
2580
+ name: t,
2581
+ disabled: m,
2582
+ placeholder: n ? void 0 : " ",
2583
+ className: J.textArea,
2584
+ rows: 1,
2585
+ ...p && { "aria-describedby": `${se}-helper` },
2586
+ ...a && { "aria-invalid": "true" },
2587
+ ...k && !y && !n && { style: { paddingRight: Ne } },
2588
+ ...y && !k && !n && { style: { paddingLeft: re } },
2589
+ ...k && y && !n && {
2590
+ style: {
2591
+ paddingRight: Ne,
2592
+ paddingLeft: re
2593
+ }
2594
+ },
2595
+ value: Y,
2596
+ onChange: he,
2597
+ onFocus: Ie,
2598
+ onBlur: w,
2599
+ ...E
2600
+ }
2601
+ ),
2602
+ !n && /* @__PURE__ */ d(
2603
+ "label",
2604
+ {
2605
+ ref: q,
2606
+ "aria-hidden": !0,
2607
+ htmlFor: se,
2608
+ className: `${J.visibleLabel}`,
2609
+ children: r
2610
+ }
2611
+ ),
2612
+ Re && /* @__PURE__ */ d(
2613
+ "div",
2614
+ {
2615
+ ref: K,
2616
+ id: `${se}-helper`,
2617
+ className: J.helperText,
2618
+ children: p
2619
+ }
2620
+ ),
2621
+ k && /* @__PURE__ */ d(
2622
+ "div",
2623
+ {
2624
+ ref: H,
2625
+ className: J.rightElement,
2626
+ children: k
2627
+ }
2628
+ ),
2629
+ a && p && /* @__PURE__ */ d(qn, { politeness: "polite", clearAnnouncementDelay: 500, children: Ce })
2630
+ ] });
2631
+ }
2632
+ );
2633
+ Cr.displayName = "TextArea";
2634
+ const ro = ({
2635
+ mode: e = "light",
2636
+ focusMode: t = "light",
2637
+ radius: r = "small"
2638
+ }) => {
2639
+ const { state: a, dispatch: n } = U(ve), o = S(null), s = S(!1), i = (l) => {
2640
+ l.preventDefault(), n({
2641
+ type: ar
2646
2642
  });
2647
- return R.current = !1, E.current = p, A.current = !0, W({
2648
- _k: N
2649
- }), Ce && (_(re) || Te ? w() : Rn(w)), () => {
2650
- R.current = !0, T();
2651
- };
2652
- }, [
2653
- p
2654
- ]), Ze(() => {
2655
- let w;
2656
- function v() {
2657
- const T = Q(h) ? h(H().data) : h;
2658
- T && w !== -1 && (w = setTimeout(O, T));
2659
- }
2660
- function O() {
2661
- !H().error && (f || x().isVisible()) && (g || x().isOnline()) ? he(at).then(v) : v();
2643
+ };
2644
+ return L(() => {
2645
+ var l;
2646
+ (a == null ? void 0 : a.streaming) === !0 && !s.current && o.current && (s.current = !0, o.current.focus()), (a == null ? void 0 : a.streaming) === !1 && (s.current = !1, (l = o.current) == null || l.blur());
2647
+ }, [a]), /* @__PURE__ */ d(
2648
+ cr,
2649
+ {
2650
+ noBorder: !0,
2651
+ radius: r,
2652
+ mode: e,
2653
+ focusMode: t,
2654
+ ref: o,
2655
+ onClick: i,
2656
+ children: a != null && a.streaming ? /* @__PURE__ */ d(oa, { size: "size-4", monotone: !0 }) : /* @__PURE__ */ d(na, { size: "size-4", monotone: !0 })
2662
2657
  }
2663
- return v(), () => {
2664
- w && (clearTimeout(w), w = -1);
2665
- };
2666
- }, [
2667
- h,
2668
- f,
2669
- g,
2670
- p
2671
- ]), ea(ge), o && _(re) && p) {
2672
- if (!Yt && Te)
2673
- throw new Error("Fallback data is required when using Suspense in SSR.");
2674
- C.current = t, ee.current = r, R.current = !1;
2675
- const w = k[p];
2676
- if (!_(w)) {
2677
- const v = Ie(w);
2678
- rt(v);
2658
+ );
2659
+ }, $e = (e, t) => {
2660
+ e({
2661
+ type: or,
2662
+ payload: {
2663
+ streaming: t
2679
2664
  }
2680
- if (_(pe)) {
2681
- const v = he(at);
2682
- _(ge) || (v.status = "fulfilled", v.value = !0), rt(v);
2683
- } else
2684
- throw pe;
2685
- }
2686
- return {
2687
- mutate: Ie,
2688
- get data() {
2689
- return j.data = !0, ge;
2690
- },
2691
- get error() {
2692
- return j.error = !0, pe;
2693
- },
2694
- get isValidating() {
2695
- return j.isValidating = !0, Y;
2696
- },
2697
- get isLoading() {
2698
- return j.isLoading = !0, We;
2665
+ });
2666
+ }, Zt = (e) => {
2667
+ $e(e, !1), e({
2668
+ type: xe,
2669
+ payload: {
2670
+ message: {
2671
+ role: vt,
2672
+ content: Wr
2673
+ }
2699
2674
  }
2700
- };
2701
- }, Yn = qn(Jn), He = ({
2702
- fetcher: e,
2703
- scope: t,
2704
- keys: r,
2705
- swrOptions: a,
2706
- getAccessToken: n
2707
- }) => {
2708
- const { data: o, error: s, isLoading: i, mutate: l } = Yn(
2709
- [t, ...r],
2710
- (h) => e(h, n),
2711
- { ...a }
2712
- );
2713
- return { data: o, error: s, isLoading: i, mutate: l };
2714
- }, Fe = async ({
2715
- getAccessToken: e,
2716
- type: t,
2717
- params: r
2718
- }) => {
2719
- const a = await e(), n = await gn({
2720
- accessToken: a,
2721
- type: t,
2722
- params: r
2723
2675
  });
2724
- if (n.status === 200 && n.errors === void 0)
2725
- return n.data;
2726
- throw new Error("An error occurred while fetching the data.");
2727
- }, Xn = async ([e, t], r) => Fe({
2728
- getAccessToken: r,
2729
- type: ze.GET_USER_PREFERENCES,
2730
- params: {
2731
- user: t
2732
- }
2733
- }), Qn = ({
2734
- keys: e,
2735
- getAccessToken: t
2736
- }) => He({
2737
- fetcher: Xn,
2738
- scope: "/preferences",
2739
- keys: e,
2740
- swrOptions: { keepPreviousData: !0 },
2741
- getAccessToken: t
2742
- }), Zn = async ([e, t], r) => Fe({
2743
- getAccessToken: r,
2744
- type: ze.GET_CHATS_STATS,
2745
- params: {
2746
- user: t
2747
- }
2748
- }), Xo = ({
2749
- keys: e,
2750
- getAccessToken: t
2751
- }) => He({
2752
- fetcher: Zn,
2753
- scope: "/stats",
2754
- keys: e,
2755
- getAccessToken: t
2756
- }), Tr = async ([e, t, r, a], n) => Fe({
2757
- getAccessToken: n,
2758
- type: ze.GET_CHATS,
2759
- params: {
2760
- user: t,
2761
- searchString: r,
2762
- direction: a,
2763
- limit: 1,
2764
- truncateSize: 100
2765
- }
2766
- }), Qo = ({
2767
- keys: e,
2768
- getAccessToken: t
2769
- }) => He({
2770
- fetcher: Tr,
2771
- scope: "/history",
2772
- keys: e,
2773
- getAccessToken: t,
2774
- swrOptions: {
2775
- keepPreviousData: !0,
2776
- dedupingInterval: 1e4
2777
- }
2778
- }), Zo = ({
2779
- keys: e,
2780
- getAccessToken: t
2781
- }) => {
2782
- Gn(["/history", ...e], (r) => Tr(r, t));
2783
- }, eo = async ([e], t) => Fe({
2784
- getAccessToken: t,
2785
- type: ze.GET_SERVER_CAPABILITIES
2786
- }), es = ({
2787
- keys: e,
2788
- getAccessToken: t
2789
- }) => He({
2790
- fetcher: eo,
2791
- scope: "/capabilities",
2792
- keys: e,
2793
- getAccessToken: t
2794
- }), to = () => {
2795
- const { dispatch: e } = P(wt), { getAccessToken: t, user: r } = Me(), {
2676
+ }, ao = () => {
2677
+ const { state: e, dispatch: t } = U(ve), { state: r, dispatch: a } = U(Nt), [n, o] = G(""), { getAccessToken: s, user: i } = Me(), l = S(null), h = S(
2678
+ null
2679
+ );
2680
+ L(() => {
2681
+ (async () => {
2682
+ var u;
2683
+ if (!e || e.messages.length === 0) {
2684
+ (u = h == null ? void 0 : h.current) == null || u.cancel();
2685
+ return;
2686
+ }
2687
+ const m = e.messages[e.messages.length - 1];
2688
+ if (!(e.messages.length === 0 || m.message.role === we || m.message.role === Ur || m.message.role === vt || m.message.role === Hr))
2689
+ try {
2690
+ const g = await Rn({
2691
+ accessToken: await s(),
2692
+ name: "generate",
2693
+ data: {
2694
+ messages: e.messages,
2695
+ model: e.engine || Se,
2696
+ user: (i == null ? void 0 : i.username) || "",
2697
+ id: e.id,
2698
+ usage: e.usage
2699
+ }
2700
+ });
2701
+ if (g && g.ok) {
2702
+ const p = xt();
2703
+ h.current = g.body.getReader();
2704
+ const b = new TextDecoder();
2705
+ for (; ; ) {
2706
+ $e(t, !0);
2707
+ const { done: k, value: y } = await h.current.read();
2708
+ if (k) {
2709
+ $e(t, !1);
2710
+ break;
2711
+ }
2712
+ const N = b.decode(y, { stream: !0 }), A = N.indexOf($t);
2713
+ if (A !== -1) {
2714
+ const R = N.substring(0, A), E = JSON.parse(
2715
+ N.substring(A + $t.length)
2716
+ );
2717
+ t({
2718
+ type: nr,
2719
+ payload: {
2720
+ model: E.model,
2721
+ usage: E.usage
2722
+ }
2723
+ }), t({
2724
+ type: xe,
2725
+ payload: {
2726
+ message: {
2727
+ content: R,
2728
+ role: we,
2729
+ messageId: p,
2730
+ processingTime: E.processingTime,
2731
+ name: E.name
2732
+ }
2733
+ }
2734
+ }), $e(t, !1);
2735
+ break;
2736
+ } else
2737
+ t({
2738
+ type: xe,
2739
+ payload: {
2740
+ message: {
2741
+ content: N,
2742
+ role: we,
2743
+ messageId: p
2744
+ }
2745
+ }
2746
+ });
2747
+ }
2748
+ } else
2749
+ Zt(t);
2750
+ } catch (g) {
2751
+ console.error(g), Zt(t);
2752
+ }
2753
+ })();
2754
+ }, [e == null ? void 0 : e.messages]);
2755
+ const f = async (m) => {
2756
+ m.preventDefault(), t({
2757
+ type: xe,
2758
+ payload: {
2759
+ message: {
2760
+ role: nt,
2761
+ content: n
2762
+ }
2763
+ }
2764
+ }), o("");
2765
+ };
2766
+ return L(() => {
2767
+ if (r.prompt !== "") {
2768
+ const m = r.prompt.endsWith(":") && !r.prompt.endsWith(": ") ? r.prompt + " " : r.prompt;
2769
+ m.indexOf(Mt) !== -1 ? navigator.clipboard.readText().then((g) => {
2770
+ o(m.replace(Mt, g));
2771
+ }) : o(m), l.current && l.current.focus(), a({
2772
+ type: sr
2773
+ });
2774
+ }
2775
+ }, [r, a]), L(() => {
2776
+ e && e.usage === 0 && e.messages.length === 0 && l.current && l.current.focus();
2777
+ }, [e]), /* @__PURE__ */ d(yt, { children: /* @__PURE__ */ d("form", { className: "mt-2", onSubmit: f, children: /* @__PURE__ */ d(
2778
+ Cr,
2779
+ {
2780
+ mode: "dark",
2781
+ focusMode: "light",
2782
+ ref: l,
2783
+ name: "chat-input",
2784
+ label: Fr,
2785
+ helperText: "Press ENTER to add a new line",
2786
+ helperTextOnFocus: !0,
2787
+ required: !0,
2788
+ value: n,
2789
+ onChange: (m) => o(m.target.value),
2790
+ onKeyDown: ma([["mod+Enter", f]]),
2791
+ leftElement: /* @__PURE__ */ d(ro, {}),
2792
+ rightElement: /* @__PURE__ */ d(
2793
+ lr,
2794
+ {
2795
+ disabled: e == null ? void 0 : e.streaming,
2796
+ noBorder: !0,
2797
+ type: "submit",
2798
+ mode: "light",
2799
+ focusMode: "light",
2800
+ children: Gr
2801
+ }
2802
+ )
2803
+ }
2804
+ ) }) });
2805
+ }, no = () => {
2806
+ const { dispatch: e } = U(Nt), { getAccessToken: t, user: r } = Me(), {
2796
2807
  data: a,
2797
2808
  error: n,
2798
2809
  isLoading: o
2799
- } = Qn({
2810
+ } = Cn({
2800
2811
  keys: [r == null ? void 0 : r.username],
2801
2812
  getAccessToken: t
2802
2813
  }), s = "mt-2 flex justify-center rounded-md", i = (l, h) => {
2803
2814
  l.preventDefault(), e({
2804
- type: sr,
2815
+ type: ir,
2805
2816
  payload: {
2806
2817
  prompt: h
2807
2818
  }
2808
2819
  });
2809
2820
  };
2810
- return n || o ? null : /* @__PURE__ */ d(Fr, { alignHorizontal: "center", columnGap: 2, children: a && a.tags && a.tags.map((l) => l.enabled && l.label && l.content && /* @__PURE__ */ d(Gr, { children: /* @__PURE__ */ d("div", { className: s, children: /* @__PURE__ */ d(
2811
- cr,
2821
+ return n || o ? null : /* @__PURE__ */ d(jr, { alignHorizontal: "center", columnGap: 2, children: a && a.tags && a.tags.map((l) => l.enabled && l.label && l.content && /* @__PURE__ */ d(qr, { children: /* @__PURE__ */ d("div", { className: s, children: /* @__PURE__ */ d(
2822
+ lr,
2812
2823
  {
2813
2824
  noBorder: !0,
2814
2825
  mode: "dark",
@@ -2818,8 +2829,8 @@ const rt = $.use || // This extra generic is to avoid TypeScript mixing up the g
2818
2829
  children: l.label
2819
2830
  }
2820
2831
  ) }) }, `prompt-button-${l.slot}`)) });
2821
- }, ro = () => {
2822
- const { state: e } = P(ve), t = S(!1), r = window.innerWidth < 403, [a, n] = G(
2832
+ }, oo = () => {
2833
+ const { state: e } = U(ve), t = S(!1), r = window.innerWidth < 403, [a, n] = G(
2823
2834
  r ? "bottom-10" : "top-[245px]"
2824
2835
  );
2825
2836
  return L(() => {
@@ -2834,26 +2845,26 @@ const rt = $.use || // This extra generic is to avoid TypeScript mixing up the g
2834
2845
  a
2835
2846
  ),
2836
2847
  children: [
2837
- /* @__PURE__ */ d(to, {}),
2838
- /* @__PURE__ */ d(pn, {})
2848
+ /* @__PURE__ */ d(no, {}),
2849
+ /* @__PURE__ */ d(ao, {})
2839
2850
  ]
2840
2851
  }
2841
2852
  );
2842
2853
  };
2843
2854
  /*!
2844
- @versini/ui-bubble v3.0.4
2855
+ @versini/ui-bubble v3.1.1
2845
2856
  © 2025 gizmette.com
2846
2857
  */
2847
2858
  try {
2848
2859
  window.__VERSINI_UI_BUBBLE__ || (window.__VERSINI_UI_BUBBLE__ = {
2849
- version: "3.0.4",
2850
- buildTime: "01/04/2025 07:31 PM EST",
2860
+ version: "3.1.1",
2861
+ buildTime: "01/06/2025 08:01 PM EST",
2851
2862
  homepage: "https://github.com/aversini/ui-components",
2852
2863
  license: "MIT"
2853
2864
  });
2854
2865
  } catch {
2855
2866
  }
2856
- const ao = "av-bubble", Zt = "av-button", Ge = "icon", Nr = "button", ft = "link", no = ({
2867
+ const so = "av-bubble", er = "av-button", Ge = "icon", Ir = "button", ft = "link", io = ({
2857
2868
  type: e,
2858
2869
  size: t,
2859
2870
  labelRight: r,
@@ -2862,7 +2873,7 @@ const ao = "av-bubble", Zt = "av-button", Ge = "icon", Nr = "button", ft = "link
2862
2873
  }) => {
2863
2874
  const o = "max-h-8 py-0 px-2", s = "max-h-9 py-1 px-3", i = "max-h-12 py-2 px-4";
2864
2875
  switch (e) {
2865
- case Nr:
2876
+ case Ir:
2866
2877
  case ft:
2867
2878
  return c({
2868
2879
  [o]: t === "small",
@@ -2882,7 +2893,7 @@ const ao = "av-bubble", Zt = "av-button", Ge = "icon", Nr = "button", ft = "link
2882
2893
  "h-12 px-4": t === "large" && (r || a)
2883
2894
  });
2884
2895
  }
2885
- }, oo = ({
2896
+ }, co = ({
2886
2897
  type: e,
2887
2898
  size: t,
2888
2899
  labelRight: r,
@@ -2890,7 +2901,7 @@ const ao = "av-bubble", Zt = "av-button", Ge = "icon", Nr = "button", ft = "link
2890
2901
  }) => {
2891
2902
  const n = "text-sm font-medium", o = "text-base font-medium", s = "text-lg font-medium";
2892
2903
  switch (e) {
2893
- case Nr:
2904
+ case Ir:
2894
2905
  case ft:
2895
2906
  return c({
2896
2907
  "text-center": e === ft,
@@ -2905,7 +2916,7 @@ const ao = "av-bubble", Zt = "av-button", Ge = "icon", Nr = "button", ft = "link
2905
2916
  [s]: t === "large" && (r || a)
2906
2917
  });
2907
2918
  }
2908
- }, so = ({
2919
+ }, lo = ({
2909
2920
  mode: e,
2910
2921
  noBackground: t,
2911
2922
  noTruncate: r,
@@ -2941,7 +2952,7 @@ const ao = "av-bubble", Zt = "av-button", Ge = "icon", Nr = "button", ft = "link
2941
2952
  return c("not-prose text-copy-lighter", {
2942
2953
  truncate: !r
2943
2954
  });
2944
- }, io = ({
2955
+ }, uo = ({
2945
2956
  mode: e,
2946
2957
  noBackground: t,
2947
2958
  variant: r
@@ -2971,13 +2982,13 @@ const ao = "av-bubble", Zt = "av-button", Ge = "icon", Nr = "button", ft = "link
2971
2982
  if (r === "selected")
2972
2983
  return "bg-action-selected-dark";
2973
2984
  }
2974
- }, co = ({
2985
+ }, mo = ({
2975
2986
  radius: e
2976
2987
  }) => c({
2977
2988
  "rounded-full": e === "large",
2978
2989
  "rounded-md": e === "medium",
2979
2990
  "rounded-sm": e === "small"
2980
- }), lo = ({
2991
+ }), go = ({
2981
2992
  mode: e,
2982
2993
  disabled: t,
2983
2994
  variant: r
@@ -3007,7 +3018,7 @@ const ao = "av-bubble", Zt = "av-button", Ge = "icon", Nr = "button", ft = "link
3007
3018
  });
3008
3019
  if (r === "selected")
3009
3020
  return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
3010
- }, uo = ({
3021
+ }, ho = ({
3011
3022
  mode: e,
3012
3023
  disabled: t,
3013
3024
  variant: r
@@ -3037,7 +3048,7 @@ const ao = "av-bubble", Zt = "av-button", Ge = "icon", Nr = "button", ft = "link
3037
3048
  });
3038
3049
  if (r === "selected")
3039
3050
  return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
3040
- }, mo = ({
3051
+ }, fo = ({
3041
3052
  mode: e,
3042
3053
  noBorder: t,
3043
3054
  variant: r
@@ -3067,14 +3078,14 @@ const ao = "av-bubble", Zt = "av-button", Ge = "icon", Nr = "button", ft = "link
3067
3078
  });
3068
3079
  if (r === "selected")
3069
3080
  return "border border-border-selected-dark";
3070
- }, go = ({
3081
+ }, po = ({
3071
3082
  focusMode: e
3072
3083
  }) => c("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
3073
3084
  "focus:outline-focus-dark": e === "dark",
3074
3085
  "focus:outline-focus-light": e === "light",
3075
3086
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
3076
3087
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
3077
- }), Rr = ({
3088
+ }), Ar = ({
3078
3089
  type: e,
3079
3090
  className: t,
3080
3091
  raw: r,
@@ -3086,56 +3097,56 @@ const ao = "av-bubble", Zt = "av-button", Ge = "icon", Nr = "button", ft = "link
3086
3097
  noBorder: l,
3087
3098
  labelRight: h,
3088
3099
  labelLeft: f,
3089
- noBackground: g,
3100
+ noBackground: m,
3090
3101
  variant: u,
3091
- noTruncate: m,
3092
- align: y,
3102
+ noTruncate: g,
3103
+ align: p,
3093
3104
  radius: b
3094
- }) => (u || (u = "primary"), r ? c(Zt, t) : c(
3095
- Zt,
3096
- so({
3105
+ }) => (u || (u = "primary"), r ? c(er, t) : c(
3106
+ er,
3107
+ lo({
3097
3108
  mode: a,
3098
3109
  variant: u,
3099
- noBackground: g,
3100
- noTruncate: m
3110
+ noBackground: m,
3111
+ noTruncate: g
3101
3112
  }),
3102
- io({ mode: a, noBackground: g, variant: u }),
3103
- co({ radius: b }),
3104
- no({
3113
+ uo({ mode: a, noBackground: m, variant: u }),
3114
+ mo({ radius: b }),
3115
+ io({
3105
3116
  type: e,
3106
3117
  size: i,
3107
3118
  labelRight: h,
3108
3119
  labelLeft: f,
3109
- align: y
3120
+ align: p
3110
3121
  }),
3111
- oo({ type: e, size: i, labelRight: h, labelLeft: f }),
3112
- mo({ mode: a, variant: u, noBorder: l }),
3113
- go({ focusMode: n }),
3114
- lo({ mode: a, variant: u, disabled: o }),
3115
- uo({ mode: a, variant: u, disabled: o }),
3122
+ co({ type: e, size: i, labelRight: h, labelLeft: f }),
3123
+ fo({ mode: a, variant: u, noBorder: l }),
3124
+ po({ focusMode: n }),
3125
+ go({ mode: a, variant: u, disabled: o }),
3126
+ ho({ mode: a, variant: u, disabled: o }),
3116
3127
  {
3117
3128
  "w-full": s,
3118
3129
  "disabled:cursor-not-allowed disabled:opacity-50": o
3119
3130
  },
3120
3131
  t
3121
- )), ho = (e, t, r) => {
3132
+ )), yo = (e, t, r) => {
3122
3133
  var a;
3123
3134
  !t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
3124
- }, Nt = $.forwardRef((e, t) => {
3135
+ }, Rt = $.forwardRef((e, t) => {
3125
3136
  const { onClick: r, noInternalClick: a = !1, ...n } = e;
3126
3137
  return /* @__PURE__ */ d(
3127
3138
  "button",
3128
3139
  {
3129
3140
  ref: t,
3130
3141
  onClick: (o) => {
3131
- ho(o, a, r);
3142
+ yo(o, a, r);
3132
3143
  },
3133
3144
  ...n
3134
3145
  }
3135
3146
  );
3136
3147
  });
3137
- Nt.displayName = "BaseButton";
3138
- const Cr = $.forwardRef(
3148
+ Rt.displayName = "BaseButton";
3149
+ const Or = $.forwardRef(
3139
3150
  ({
3140
3151
  children: e,
3141
3152
  disabled: t = !1,
@@ -3148,16 +3159,16 @@ const Cr = $.forwardRef(
3148
3159
  noBorder: l = !1,
3149
3160
  "aria-label": h,
3150
3161
  label: f,
3151
- size: g = "medium",
3162
+ size: m = "medium",
3152
3163
  labelRight: u,
3153
- labelLeft: m,
3154
- noBackground: y = !1,
3164
+ labelLeft: g,
3165
+ noBackground: p = !1,
3155
3166
  align: b = "center",
3156
3167
  radius: k = "large",
3157
- variant: p = "primary",
3168
+ variant: y = "primary",
3158
3169
  ...N
3159
3170
  }, A) => {
3160
- const R = Rr({
3171
+ const R = Ar({
3161
3172
  type: Ge,
3162
3173
  mode: r,
3163
3174
  focusMode: a,
@@ -3166,13 +3177,13 @@ const Cr = $.forwardRef(
3166
3177
  raw: i,
3167
3178
  className: o,
3168
3179
  noBorder: l,
3169
- size: g,
3180
+ size: m,
3170
3181
  labelRight: u,
3171
- labelLeft: m,
3172
- noBackground: y,
3182
+ labelLeft: g,
3183
+ noBackground: p,
3173
3184
  align: b,
3174
3185
  radius: k,
3175
- variant: p
3186
+ variant: y
3176
3187
  }), E = c({
3177
3188
  "text-copy-accent-dark": r === "light" && !i,
3178
3189
  "text-copy-light": r === "dark" && !i,
@@ -3180,7 +3191,7 @@ const Cr = $.forwardRef(
3180
3191
  "text-copy-light dark:text-copy-accent-dark": r === "system" && !i
3181
3192
  });
3182
3193
  return /* @__PURE__ */ I(
3183
- Nt,
3194
+ Rt,
3184
3195
  {
3185
3196
  ref: A,
3186
3197
  className: R,
@@ -3189,7 +3200,7 @@ const Cr = $.forwardRef(
3189
3200
  "aria-label": h || f,
3190
3201
  ...N,
3191
3202
  children: [
3192
- m && /* @__PURE__ */ d("span", { className: "pr-2", children: m }),
3203
+ g && /* @__PURE__ */ d("span", { className: "pr-2", children: g }),
3193
3204
  /* @__PURE__ */ d("div", { className: E, children: e }),
3194
3205
  u && /* @__PURE__ */ d("span", { className: "pl-2", children: u })
3195
3206
  ]
@@ -3197,21 +3208,21 @@ const Cr = $.forwardRef(
3197
3208
  );
3198
3209
  }
3199
3210
  );
3200
- Cr.displayName = "ButtonIcon";
3211
+ Or.displayName = "ButtonIcon";
3201
3212
  /*!
3202
- @versini/ui-button v4.0.3
3213
+ @versini/ui-button v4.0.4
3203
3214
  © 2025 gizmette.com
3204
3215
  */
3205
3216
  try {
3206
3217
  window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
3207
- version: "4.0.3",
3208
- buildTime: "01/04/2025 07:31 PM EST",
3218
+ version: "4.0.4",
3219
+ buildTime: "01/06/2025 08:01 PM EST",
3209
3220
  homepage: "https://github.com/aversini/ui-components",
3210
3221
  license: "MIT"
3211
3222
  });
3212
3223
  } catch {
3213
3224
  }
3214
- const fo = $.forwardRef(
3225
+ const bo = $.forwardRef(
3215
3226
  ({
3216
3227
  children: e,
3217
3228
  disabled: t = !1,
@@ -3224,16 +3235,16 @@ const fo = $.forwardRef(
3224
3235
  noBorder: l = !1,
3225
3236
  "aria-label": h,
3226
3237
  label: f,
3227
- size: g = "medium",
3238
+ size: m = "medium",
3228
3239
  labelRight: u,
3229
- labelLeft: m,
3230
- noBackground: y = !1,
3240
+ labelLeft: g,
3241
+ noBackground: p = !1,
3231
3242
  align: b = "center",
3232
3243
  active: k = !1,
3233
- radius: p = "large",
3244
+ radius: y = "large",
3234
3245
  ...N
3235
3246
  }, A) => {
3236
- const R = Rr({
3247
+ const R = Ar({
3237
3248
  type: Ge,
3238
3249
  mode: r,
3239
3250
  focusMode: a,
@@ -3242,12 +3253,12 @@ const fo = $.forwardRef(
3242
3253
  raw: i,
3243
3254
  className: o,
3244
3255
  noBorder: l,
3245
- size: g,
3256
+ size: m,
3246
3257
  labelRight: u,
3247
- labelLeft: m,
3248
- noBackground: y,
3258
+ labelLeft: g,
3259
+ noBackground: p,
3249
3260
  align: b,
3250
- radius: p
3261
+ radius: y
3251
3262
  }), E = c({
3252
3263
  "text-copy-accent-dark": r === "light" && !i,
3253
3264
  "text-copy-light": r === "dark" && !i,
@@ -3271,7 +3282,7 @@ const fo = $.forwardRef(
3271
3282
  }
3272
3283
  ) : "";
3273
3284
  return /* @__PURE__ */ d("div", { className: C, children: /* @__PURE__ */ I(
3274
- Nt,
3285
+ Rt,
3275
3286
  {
3276
3287
  ref: A,
3277
3288
  className: R,
@@ -3280,7 +3291,7 @@ const fo = $.forwardRef(
3280
3291
  "aria-label": h || f,
3281
3292
  ...N,
3282
3293
  children: [
3283
- m && /* @__PURE__ */ d("span", { className: "pr-2", children: m }),
3294
+ g && /* @__PURE__ */ d("span", { className: "pr-2", children: g }),
3284
3295
  /* @__PURE__ */ d("div", { className: E, children: e }),
3285
3296
  u && /* @__PURE__ */ d("span", { className: "pl-2", children: u })
3286
3297
  ]
@@ -3288,8 +3299,8 @@ const fo = $.forwardRef(
3288
3299
  ) });
3289
3300
  }
3290
3301
  );
3291
- fo.displayName = "ButtonSort";
3292
- const Ir = ({
3302
+ bo.displayName = "ButtonSort";
3303
+ const Lr = ({
3293
3304
  children: e,
3294
3305
  fill: t,
3295
3306
  viewBox: r,
@@ -3320,26 +3331,26 @@ const Ir = ({
3320
3331
  ] });
3321
3332
  };
3322
3333
  /*!
3323
- @versini/ui-svgicon v4.0.0
3334
+ @versini/ui-svgicon v4.0.1
3324
3335
  © 2025 gizmette.com
3325
3336
  */
3326
3337
  try {
3327
3338
  window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
3328
- version: "4.0.0",
3329
- buildTime: "01/04/2025 07:31 PM EST",
3339
+ version: "4.0.1",
3340
+ buildTime: "01/06/2025 08:00 PM EST",
3330
3341
  homepage: "https://github.com/aversini/ui-components",
3331
3342
  license: "MIT"
3332
3343
  });
3333
3344
  } catch {
3334
3345
  }
3335
- const po = ({
3346
+ const vo = ({
3336
3347
  className: e,
3337
3348
  viewBox: t,
3338
3349
  title: r,
3339
3350
  monotone: a,
3340
3351
  ...n
3341
3352
  }) => /* @__PURE__ */ I(
3342
- Ir,
3353
+ Lr,
3343
3354
  {
3344
3355
  defaultViewBox: "0 0 448 512",
3345
3356
  size: "size-5",
@@ -3365,14 +3376,14 @@ const po = ({
3365
3376
  )
3366
3377
  ]
3367
3378
  }
3368
- ), yo = ({
3379
+ ), ko = ({
3369
3380
  className: e,
3370
3381
  viewBox: t,
3371
3382
  title: r,
3372
3383
  monotone: a,
3373
3384
  ...n
3374
3385
  }) => /* @__PURE__ */ d(
3375
- Ir,
3386
+ Lr,
3376
3387
  {
3377
3388
  defaultViewBox: "0 0 512 512",
3378
3389
  size: "size-5",
@@ -3384,59 +3395,64 @@ const po = ({
3384
3395
  }
3385
3396
  );
3386
3397
  /*!
3387
- @versini/ui-icons v4.2.0
3398
+ @versini/ui-icons v4.2.1
3388
3399
  © 2025 gizmette.com
3389
3400
  */
3390
3401
  try {
3391
3402
  window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
3392
- version: "4.2.0",
3393
- buildTime: "01/04/2025 07:31 PM EST",
3403
+ version: "4.2.1",
3404
+ buildTime: "01/06/2025 08:00 PM EST",
3394
3405
  homepage: "https://github.com/aversini/ui-components",
3395
3406
  license: "MIT"
3396
3407
  });
3397
3408
  } catch {
3398
3409
  }
3399
- const bo = ({ kind: e }) => c("p-4 max-w-xs sm:max-w-md md:max-w-2xl", {
3400
- "lg:max-w-3xl": e === "left"
3401
- }), vo = ({ kind: e }) => c({
3410
+ const _o = ({
3411
+ kind: e,
3412
+ noMaxWidth: t
3413
+ }) => c("p-4", {
3414
+ "max-w-xs sm:max-w-md md:max-w-2xl": !t,
3415
+ "lg:max-w-3xl": e === "left" && !t
3416
+ }), Eo = ({ kind: e }) => c({
3402
3417
  "bg-surface-lighter dark:bg-surface-dark": e === "left",
3403
3418
  "bg-surface-accent": e === "right"
3404
- }), ko = ({ kind: e }) => c(
3419
+ }), xo = ({ kind: e }) => c(
3405
3420
  "prose prose-dark dark:prose-lighter prose-p:my-3 prose-blockquote:my-3 prose-ol:my-3 prose-ul:my-3 prose-ul:prose-li:marker:text-black",
3406
3421
  {
3407
3422
  "text-copy-lighter": e === "right"
3408
3423
  }
3409
- ), _o = ({ kind: e }) => c("rounded-b-xl", {
3424
+ ), wo = ({ kind: e }) => c("rounded-b-xl", {
3410
3425
  "rounded-tr-xl": e === "left",
3411
3426
  "rounded-tl-xl": e === "right"
3412
- }), Eo = ({
3427
+ }), So = ({
3413
3428
  kind: e,
3414
- className: t
3429
+ className: t,
3430
+ noMaxWidth: r
3415
3431
  }) => {
3416
- const r = c(
3417
- ao,
3432
+ const a = c(
3433
+ so,
3418
3434
  "flex items-start",
3419
3435
  {
3420
3436
  "flex-row-reverse": e === "right"
3421
3437
  },
3422
3438
  t
3423
- ), a = c(
3439
+ ), n = c(
3424
3440
  "flex flex-col empty:hidden",
3425
- bo({ kind: e }),
3426
- ko({ kind: e }),
3427
- vo({ kind: e }),
3428
- _o({ kind: e })
3429
- ), n = "pr-2 pt-1 text-end text-xs text-copy-light", o = c("flex flex-col-reverse gap-2 sm:flex-row", {
3441
+ _o({ kind: e, noMaxWidth: r }),
3442
+ xo({ kind: e }),
3443
+ Eo({ kind: e }),
3444
+ wo({ kind: e })
3445
+ ), o = "pr-2 pt-1 text-end text-xs text-copy-light", s = c("flex flex-col-reverse gap-2 sm:flex-row", {
3430
3446
  "ml-2": e === "left",
3431
3447
  "mr-2": e === "right"
3432
3448
  });
3433
3449
  return {
3434
- wrapper: r,
3435
- main: a,
3436
- footer: n,
3437
- copyButton: o
3450
+ wrapper: a,
3451
+ main: n,
3452
+ footer: o,
3453
+ copyButton: s
3438
3454
  };
3439
- }, xo = ({
3455
+ }, To = ({
3440
3456
  children: e,
3441
3457
  kind: t = "left",
3442
3458
  className: r,
@@ -3444,44 +3460,45 @@ const bo = ({ kind: e }) => c("p-4 max-w-xs sm:max-w-md md:max-w-2xl", {
3444
3460
  rawFooter: n,
3445
3461
  copyToClipboard: o,
3446
3462
  copyToClipboardFocusMode: s = "system",
3447
- copyToClipboardMode: i = "system"
3463
+ copyToClipboardMode: i = "system",
3464
+ noMaxWidth: l = !1
3448
3465
  }) => {
3449
- const [l, h] = G(!1), f = Eo({ kind: t, className: r }), g = !!o && (typeof o == "function" || typeof o == "string" || typeof e == "string"), u = () => {
3450
- h(!0), typeof o == "function" ? o(e) : typeof o == "string" ? navigator.clipboard.writeText(o) : typeof e == "string" && navigator.clipboard.writeText(e);
3466
+ const [h, f] = G(!1), m = So({ kind: t, className: r, noMaxWidth: l }), u = !!o && (typeof o == "function" || typeof o == "string" || typeof e == "string"), g = () => {
3467
+ f(!0), typeof o == "function" ? o(e) : typeof o == "string" ? navigator.clipboard.writeText(o) : typeof e == "string" && navigator.clipboard.writeText(e);
3451
3468
  };
3452
3469
  return L(() => {
3453
- let m;
3454
- return l && (m = window.setTimeout(() => {
3455
- h(!1);
3470
+ let p;
3471
+ return h && (p = window.setTimeout(() => {
3472
+ f(!1);
3456
3473
  }, 3e3)), () => {
3457
- clearTimeout(m);
3474
+ clearTimeout(p);
3458
3475
  };
3459
- }, [l]), /* @__PURE__ */ I("div", { className: f.wrapper, children: [
3476
+ }, [h]), /* @__PURE__ */ I("div", { className: m.wrapper, children: [
3460
3477
  /* @__PURE__ */ I("div", { children: [
3461
- /* @__PURE__ */ d("div", { className: f.main, children: e }),
3462
- a && Object.keys(a).map((m) => a[m] ? /* @__PURE__ */ d("div", { className: "prose-p:m-0", children: /* @__PURE__ */ I("p", { className: f.footer, children: [
3463
- m,
3478
+ /* @__PURE__ */ d("div", { className: m.main, children: e }),
3479
+ a && Object.keys(a).map((p) => a[p] ? /* @__PURE__ */ d("div", { className: "prose-p:m-0", children: /* @__PURE__ */ I("p", { className: m.footer, children: [
3480
+ p,
3464
3481
  ": ",
3465
- a[m]
3466
- ] }) }, `-${m}`) : null),
3482
+ a[p]
3483
+ ] }) }, `-${p}`) : null),
3467
3484
  n && n
3468
3485
  ] }),
3469
- g && /* @__PURE__ */ d("div", { className: f.copyButton, children: /* @__PURE__ */ d(
3470
- Cr,
3486
+ u && /* @__PURE__ */ d("div", { className: m.copyButton, children: /* @__PURE__ */ d(
3487
+ Or,
3471
3488
  {
3472
3489
  noBorder: !0,
3473
3490
  noBackground: !0,
3474
3491
  size: "small",
3475
3492
  mode: i,
3476
3493
  focusMode: s,
3477
- label: l ? "Copied to clipboard" : "Copy to clipboard",
3478
- onClick: u,
3479
- disabled: l,
3480
- children: l ? /* @__PURE__ */ d(po, { size: "size-3" }) : /* @__PURE__ */ d(yo, { size: "size-3" })
3494
+ label: h ? "Copied to clipboard" : "Copy to clipboard",
3495
+ onClick: g,
3496
+ disabled: h,
3497
+ children: h ? /* @__PURE__ */ d(vo, { size: "size-3" }) : /* @__PURE__ */ d(ko, { size: "size-3" })
3481
3498
  }
3482
3499
  ) })
3483
3500
  ] });
3484
- }, er = "av-button", Rt = "icon", Ct = "button", pt = "link", wo = ({
3501
+ }, tr = "av-button", Ct = "icon", It = "button", pt = "link", No = ({
3485
3502
  type: e,
3486
3503
  size: t,
3487
3504
  labelRight: r,
@@ -3490,14 +3507,14 @@ const bo = ({ kind: e }) => c("p-4 max-w-xs sm:max-w-md md:max-w-2xl", {
3490
3507
  }) => {
3491
3508
  const o = "max-h-8 py-0 px-2", s = "max-h-9 py-1 px-3", i = "max-h-12 py-2 px-4";
3492
3509
  switch (e) {
3493
- case Ct:
3510
+ case It:
3494
3511
  case pt:
3495
3512
  return c({
3496
3513
  [o]: t === "small",
3497
3514
  [s]: t === "medium",
3498
3515
  [i]: t === "large"
3499
3516
  });
3500
- case Rt:
3517
+ case Ct:
3501
3518
  return c("inline-flex items-center", {
3502
3519
  "justify-center": n === "center",
3503
3520
  "justify-start": n === "left",
@@ -3510,7 +3527,7 @@ const bo = ({ kind: e }) => c("p-4 max-w-xs sm:max-w-md md:max-w-2xl", {
3510
3527
  "h-12 px-4": t === "large" && (r || a)
3511
3528
  });
3512
3529
  }
3513
- }, So = ({
3530
+ }, Ro = ({
3514
3531
  type: e,
3515
3532
  size: t,
3516
3533
  labelRight: r,
@@ -3518,7 +3535,7 @@ const bo = ({ kind: e }) => c("p-4 max-w-xs sm:max-w-md md:max-w-2xl", {
3518
3535
  }) => {
3519
3536
  const n = "text-sm font-medium", o = "text-base font-medium", s = "text-lg font-medium";
3520
3537
  switch (e) {
3521
- case Ct:
3538
+ case It:
3522
3539
  case pt:
3523
3540
  return c({
3524
3541
  "text-center": e === pt,
@@ -3526,14 +3543,14 @@ const bo = ({ kind: e }) => c("p-4 max-w-xs sm:max-w-md md:max-w-2xl", {
3526
3543
  [o]: t === "medium",
3527
3544
  [s]: t === "large"
3528
3545
  });
3529
- case Rt:
3546
+ case Ct:
3530
3547
  return c({
3531
3548
  [n]: t === "small" && (r || a),
3532
3549
  [o]: t === "medium" && (r || a),
3533
3550
  [s]: t === "large" && (r || a)
3534
3551
  });
3535
3552
  }
3536
- }, To = ({
3553
+ }, Co = ({
3537
3554
  mode: e,
3538
3555
  noBackground: t,
3539
3556
  noTruncate: r,
@@ -3569,7 +3586,7 @@ const bo = ({ kind: e }) => c("p-4 max-w-xs sm:max-w-md md:max-w-2xl", {
3569
3586
  return c("not-prose text-copy-lighter", {
3570
3587
  truncate: !r
3571
3588
  });
3572
- }, No = ({
3589
+ }, Io = ({
3573
3590
  mode: e,
3574
3591
  noBackground: t,
3575
3592
  variant: r
@@ -3599,13 +3616,13 @@ const bo = ({ kind: e }) => c("p-4 max-w-xs sm:max-w-md md:max-w-2xl", {
3599
3616
  if (r === "selected")
3600
3617
  return "bg-action-selected-dark";
3601
3618
  }
3602
- }, Ro = ({
3619
+ }, Ao = ({
3603
3620
  radius: e
3604
3621
  }) => c({
3605
3622
  "rounded-full": e === "large",
3606
3623
  "rounded-md": e === "medium",
3607
3624
  "rounded-sm": e === "small"
3608
- }), Co = ({
3625
+ }), Oo = ({
3609
3626
  mode: e,
3610
3627
  disabled: t,
3611
3628
  variant: r
@@ -3635,7 +3652,7 @@ const bo = ({ kind: e }) => c("p-4 max-w-xs sm:max-w-md md:max-w-2xl", {
3635
3652
  });
3636
3653
  if (r === "selected")
3637
3654
  return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
3638
- }, Io = ({
3655
+ }, Lo = ({
3639
3656
  mode: e,
3640
3657
  disabled: t,
3641
3658
  variant: r
@@ -3665,7 +3682,7 @@ const bo = ({ kind: e }) => c("p-4 max-w-xs sm:max-w-md md:max-w-2xl", {
3665
3682
  });
3666
3683
  if (r === "selected")
3667
3684
  return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
3668
- }, Ao = ({
3685
+ }, Bo = ({
3669
3686
  mode: e,
3670
3687
  noBorder: t,
3671
3688
  variant: r
@@ -3695,14 +3712,14 @@ const bo = ({ kind: e }) => c("p-4 max-w-xs sm:max-w-md md:max-w-2xl", {
3695
3712
  });
3696
3713
  if (r === "selected")
3697
3714
  return "border border-border-selected-dark";
3698
- }, Oo = ({
3715
+ }, $o = ({
3699
3716
  focusMode: e
3700
3717
  }) => c("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
3701
3718
  "focus:outline-focus-dark": e === "dark",
3702
3719
  "focus:outline-focus-light": e === "light",
3703
3720
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
3704
3721
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
3705
- }), Ar = ({
3722
+ }), Br = ({
3706
3723
  type: e,
3707
3724
  className: t,
3708
3725
  raw: r,
@@ -3714,56 +3731,56 @@ const bo = ({ kind: e }) => c("p-4 max-w-xs sm:max-w-md md:max-w-2xl", {
3714
3731
  noBorder: l,
3715
3732
  labelRight: h,
3716
3733
  labelLeft: f,
3717
- noBackground: g,
3734
+ noBackground: m,
3718
3735
  variant: u,
3719
- noTruncate: m,
3720
- align: y,
3736
+ noTruncate: g,
3737
+ align: p,
3721
3738
  radius: b
3722
- }) => (u || (u = "primary"), r ? c(er, t) : c(
3723
- er,
3724
- To({
3739
+ }) => (u || (u = "primary"), r ? c(tr, t) : c(
3740
+ tr,
3741
+ Co({
3725
3742
  mode: a,
3726
3743
  variant: u,
3727
- noBackground: g,
3728
- noTruncate: m
3744
+ noBackground: m,
3745
+ noTruncate: g
3729
3746
  }),
3730
- No({ mode: a, noBackground: g, variant: u }),
3731
- Ro({ radius: b }),
3732
- wo({
3747
+ Io({ mode: a, noBackground: m, variant: u }),
3748
+ Ao({ radius: b }),
3749
+ No({
3733
3750
  type: e,
3734
3751
  size: i,
3735
3752
  labelRight: h,
3736
3753
  labelLeft: f,
3737
- align: y
3754
+ align: p
3738
3755
  }),
3739
- So({ type: e, size: i, labelRight: h, labelLeft: f }),
3740
- Ao({ mode: a, variant: u, noBorder: l }),
3741
- Oo({ focusMode: n }),
3742
- Co({ mode: a, variant: u, disabled: o }),
3743
- Io({ mode: a, variant: u, disabled: o }),
3756
+ Ro({ type: e, size: i, labelRight: h, labelLeft: f }),
3757
+ Bo({ mode: a, variant: u, noBorder: l }),
3758
+ $o({ focusMode: n }),
3759
+ Oo({ mode: a, variant: u, disabled: o }),
3760
+ Lo({ mode: a, variant: u, disabled: o }),
3744
3761
  {
3745
3762
  "w-full": s,
3746
3763
  "disabled:cursor-not-allowed disabled:opacity-50": o
3747
3764
  },
3748
3765
  t
3749
- )), Lo = (e, t, r) => {
3766
+ )), Mo = (e, t, r) => {
3750
3767
  var a;
3751
3768
  !t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
3752
- }, It = $.forwardRef((e, t) => {
3769
+ }, At = $.forwardRef((e, t) => {
3753
3770
  const { onClick: r, noInternalClick: a = !1, ...n } = e;
3754
3771
  return /* @__PURE__ */ d(
3755
3772
  "button",
3756
3773
  {
3757
3774
  ref: t,
3758
3775
  onClick: (o) => {
3759
- Lo(o, a, r);
3776
+ Mo(o, a, r);
3760
3777
  },
3761
3778
  ...n
3762
3779
  }
3763
3780
  );
3764
3781
  });
3765
- It.displayName = "BaseButton";
3766
- const Or = $.forwardRef(
3782
+ At.displayName = "BaseButton";
3783
+ const $r = $.forwardRef(
3767
3784
  ({
3768
3785
  children: e,
3769
3786
  disabled: t = !1,
@@ -3776,11 +3793,11 @@ const Or = $.forwardRef(
3776
3793
  noBorder: l = !1,
3777
3794
  variant: h = "primary",
3778
3795
  noTruncate: f = !1,
3779
- radius: g = "large",
3796
+ radius: m = "large",
3780
3797
  ...u
3781
- }, m) => {
3782
- const y = Ar({
3783
- type: Ct,
3798
+ }, g) => {
3799
+ const p = Br({
3800
+ type: It,
3784
3801
  mode: r,
3785
3802
  focusMode: a,
3786
3803
  fullWidth: n,
@@ -3791,13 +3808,13 @@ const Or = $.forwardRef(
3791
3808
  noBorder: l,
3792
3809
  variant: h,
3793
3810
  noTruncate: f,
3794
- radius: g
3811
+ radius: m
3795
3812
  });
3796
3813
  return /* @__PURE__ */ d(
3797
- It,
3814
+ At,
3798
3815
  {
3799
- ref: m,
3800
- className: y,
3816
+ ref: g,
3817
+ className: p,
3801
3818
  disabled: t,
3802
3819
  ...u,
3803
3820
  children: e
@@ -3805,21 +3822,21 @@ const Or = $.forwardRef(
3805
3822
  );
3806
3823
  }
3807
3824
  );
3808
- Or.displayName = "Button";
3825
+ $r.displayName = "Button";
3809
3826
  /*!
3810
- @versini/ui-button v4.0.3
3827
+ @versini/ui-button v4.0.4
3811
3828
  © 2025 gizmette.com
3812
3829
  */
3813
3830
  try {
3814
3831
  window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
3815
- version: "4.0.3",
3816
- buildTime: "01/04/2025 04:09 PM EST",
3832
+ version: "4.0.4",
3833
+ buildTime: "01/06/2025 08:01 PM EST",
3817
3834
  homepage: "https://github.com/aversini/ui-components",
3818
3835
  license: "MIT"
3819
3836
  });
3820
3837
  } catch {
3821
3838
  }
3822
- const Bo = $.forwardRef(
3839
+ const Do = $.forwardRef(
3823
3840
  ({
3824
3841
  children: e,
3825
3842
  disabled: t = !1,
@@ -3832,17 +3849,17 @@ const Bo = $.forwardRef(
3832
3849
  noBorder: l = !1,
3833
3850
  "aria-label": h,
3834
3851
  label: f,
3835
- size: g = "medium",
3852
+ size: m = "medium",
3836
3853
  labelRight: u,
3837
- labelLeft: m,
3838
- noBackground: y = !1,
3854
+ labelLeft: g,
3855
+ noBackground: p = !1,
3839
3856
  align: b = "center",
3840
3857
  active: k = !1,
3841
- radius: p = "large",
3858
+ radius: y = "large",
3842
3859
  ...N
3843
3860
  }, A) => {
3844
- const R = Ar({
3845
- type: Rt,
3861
+ const R = Br({
3862
+ type: Ct,
3846
3863
  mode: r,
3847
3864
  focusMode: a,
3848
3865
  fullWidth: n,
@@ -3850,12 +3867,12 @@ const Bo = $.forwardRef(
3850
3867
  raw: i,
3851
3868
  className: o,
3852
3869
  noBorder: l,
3853
- size: g,
3870
+ size: m,
3854
3871
  labelRight: u,
3855
- labelLeft: m,
3856
- noBackground: y,
3872
+ labelLeft: g,
3873
+ noBackground: p,
3857
3874
  align: b,
3858
- radius: p
3875
+ radius: y
3859
3876
  }), E = c({
3860
3877
  "text-copy-accent-dark": r === "light" && !i,
3861
3878
  "text-copy-light": r === "dark" && !i,
@@ -3879,7 +3896,7 @@ const Bo = $.forwardRef(
3879
3896
  }
3880
3897
  ) : "";
3881
3898
  return /* @__PURE__ */ d("div", { className: C, children: /* @__PURE__ */ I(
3882
- It,
3899
+ At,
3883
3900
  {
3884
3901
  ref: A,
3885
3902
  className: R,
@@ -3888,7 +3905,7 @@ const Bo = $.forwardRef(
3888
3905
  "aria-label": h || f,
3889
3906
  ...N,
3890
3907
  children: [
3891
- m && /* @__PURE__ */ d("span", { className: "pr-2", children: m }),
3908
+ g && /* @__PURE__ */ d("span", { className: "pr-2", children: g }),
3892
3909
  /* @__PURE__ */ d("div", { className: E, children: e }),
3893
3910
  u && /* @__PURE__ */ d("span", { className: "pl-2", children: u })
3894
3911
  ]
@@ -3896,10 +3913,10 @@ const Bo = $.forwardRef(
3896
3913
  ) });
3897
3914
  }
3898
3915
  );
3899
- Bo.displayName = "ButtonSort";
3900
- const $o = 200, Mo = ({
3916
+ Do.displayName = "ButtonSort";
3917
+ const Vo = 200, zo = ({
3901
3918
  string: e,
3902
- idealLength: t = $o
3919
+ idealLength: t = Vo
3903
3920
  }) => {
3904
3921
  if (e.length <= t)
3905
3922
  return { string: e, isTruncated: !1 };
@@ -3910,7 +3927,7 @@ const $o = 200, Mo = ({
3910
3927
  string: e.slice(0, t + r),
3911
3928
  isTruncated: !0
3912
3929
  };
3913
- }, Do = ({
3930
+ }, Po = ({
3914
3931
  children: e,
3915
3932
  length: t = 200,
3916
3933
  mode: r = "system",
@@ -3919,14 +3936,14 @@ const $o = 200, Mo = ({
3919
3936
  const [n, o] = G(!1);
3920
3937
  if (typeof e != "string")
3921
3938
  return e;
3922
- const { string: s, isTruncated: i } = Mo({
3939
+ const { string: s, isTruncated: i } = zo({
3923
3940
  string: e,
3924
3941
  idealLength: t
3925
3942
  });
3926
3943
  return /* @__PURE__ */ I("span", { style: { wordBreak: "break-word" }, children: [
3927
3944
  n ? e : s,
3928
3945
  i && /* @__PURE__ */ d(
3929
- Or,
3946
+ $r,
3930
3947
  {
3931
3948
  mode: r,
3932
3949
  focusMode: a,
@@ -3941,59 +3958,59 @@ const $o = 200, Mo = ({
3941
3958
  ] });
3942
3959
  };
3943
3960
  /*!
3944
- @versini/ui-truncate v3.0.3
3961
+ @versini/ui-truncate v3.0.4
3945
3962
  © 2025 gizmette.com
3946
3963
  */
3947
3964
  try {
3948
3965
  window.__VERSINI_UI_TRUNCATE__ || (window.__VERSINI_UI_TRUNCATE__ = {
3949
- version: "3.0.3",
3950
- buildTime: "01/04/2025 04:09 PM EST",
3966
+ version: "3.0.4",
3967
+ buildTime: "01/06/2025 08:01 PM EST",
3951
3968
  homepage: "https://github.com/aversini/ui-components",
3952
3969
  license: "MIT"
3953
3970
  });
3954
3971
  } catch {
3955
3972
  }
3956
- const tr = lr(
3973
+ const rr = dr(
3957
3974
  () => import(
3958
3975
  /* webpackChunkName: "LazyMessageAssistant" */
3959
- "./MessageAssistant.SAfzi4l-.js"
3976
+ "./MessageAssistant.eUTdhSpu.js"
3960
3977
  ).then((e) => e.MessageAssistant)
3961
- ), Vo = () => {
3962
- const { state: e } = P(ve);
3978
+ ), Uo = () => {
3979
+ const { state: e } = U(ve);
3963
3980
  return /* @__PURE__ */ I("div", { className: "space-y-6 mt-2", children: [
3964
3981
  e && e.messages.length > 0 && e.messages.map((t, r) => {
3965
3982
  const { role: a, content: n, name: o, processingTime: s } = t.message;
3966
- return (a === we || a === vt) && n ? /* @__PURE__ */ d(ot, { fallback: /* @__PURE__ */ d("span", {}), children: /* @__PURE__ */ d(tr, { name: o, processingTime: s, children: n }) }, `${r}-${a}`) : a === nt && n ? /* @__PURE__ */ d(
3967
- xo,
3983
+ return (a === we || a === vt) && n ? /* @__PURE__ */ d(ot, { fallback: /* @__PURE__ */ d("span", {}), children: /* @__PURE__ */ d(rr, { name: o, processingTime: s, children: n }) }, `${r}-${a}`) : a === nt && n ? /* @__PURE__ */ d(
3984
+ To,
3968
3985
  {
3969
3986
  kind: "right",
3970
3987
  copyToClipboard: n,
3971
3988
  copyToClipboardFocusMode: "light",
3972
- children: /* @__PURE__ */ d(Do, { mode: "light", focusMode: "light", children: n })
3989
+ children: /* @__PURE__ */ d(Po, { mode: "light", focusMode: "light", children: n })
3973
3990
  },
3974
3991
  `${r}-${a}`
3975
3992
  ) : null;
3976
3993
  }),
3977
- Wr(nt, e) && /* @__PURE__ */ d(ot, { fallback: /* @__PURE__ */ d("span", {}), children: /* @__PURE__ */ d(tr, { loading: !0 }) })
3994
+ Kr(nt, e) && /* @__PURE__ */ d(ot, { fallback: /* @__PURE__ */ d("span", {}), children: /* @__PURE__ */ d(rr, { loading: !0 }) })
3978
3995
  ] });
3979
- }, zo = () => {
3980
- const { isAuthenticated: e } = Me(), { state: t } = P(ve), [r, a] = G(!1), [n, o] = ha(), s = jr({
3996
+ }, Ho = () => {
3997
+ const { isAuthenticated: e } = Me(), { state: t } = U(ve), [r, a] = G(!1), [n, o] = ya(), s = Jr({
3981
3998
  isAuthenticated: e,
3982
3999
  extraClass: "rounded-b-md"
3983
4000
  }), i = S(!1), l = Z(() => {
3984
4001
  const f = n.current;
3985
4002
  if (f) {
3986
- const { scrollHeight: g, clientHeight: u, scrollTop: m } = f, y = g - u - m;
4003
+ const { scrollHeight: m, clientHeight: u, scrollTop: g } = f, p = m - u - g;
3987
4004
  f.scrollBy({
3988
- top: y,
4005
+ top: p,
3989
4006
  behavior: "smooth"
3990
4007
  });
3991
4008
  }
3992
4009
  }, [n]), h = Z(() => {
3993
4010
  const f = n.current;
3994
4011
  if (f) {
3995
- const { scrollTop: g, scrollHeight: u, clientHeight: m } = f, y = u > m, b = g + m >= u - 1;
3996
- a(y && !b);
4012
+ const { scrollTop: m, scrollHeight: u, clientHeight: g } = f, p = u > g, b = m + g >= u - 1;
4013
+ a(p && !b);
3997
4014
  }
3998
4015
  }, [n]);
3999
4016
  return fe(() => {
@@ -4008,7 +4025,7 @@ const tr = lr(
4008
4025
  t && (!i.current && t.streaming && l(), i.current = !!t.streaming);
4009
4026
  }, [t, l]), /* @__PURE__ */ I("div", { className: s, ref: n, children: [
4010
4027
  r && /* @__PURE__ */ d("div", { className: "bottom-44 z-40 fixed left-1/2 transform -translate-x-1/2", children: /* @__PURE__ */ d(
4011
- ir,
4028
+ cr,
4012
4029
  {
4013
4030
  className: c(
4014
4031
  "dark:bg-slate-50 dark:hover:bg-slate-300 dark:active:bg-slate-400",
@@ -4019,7 +4036,7 @@ const tr = lr(
4019
4036
  mode: "dark",
4020
4037
  onClick: l,
4021
4038
  children: /* @__PURE__ */ d(
4022
- aa,
4039
+ sa,
4023
4040
  {
4024
4041
  monotone: !0,
4025
4042
  size: "size-4",
@@ -4028,23 +4045,23 @@ const tr = lr(
4028
4045
  )
4029
4046
  }
4030
4047
  ) }),
4031
- /* @__PURE__ */ d(qr, {}),
4032
- e && /* @__PURE__ */ d(Vo, {})
4048
+ /* @__PURE__ */ d(Yr, {}),
4049
+ e && /* @__PURE__ */ d(Uo, {})
4033
4050
  ] });
4034
- }, Uo = lr(
4051
+ }, Fo = dr(
4035
4052
  () => import(
4036
4053
  /* webpackChunkName: "LazyHeader" */
4037
- "./HeaderToolbar.CMqJfj02.js"
4054
+ "./HeaderToolbar.CDxPnDwl.js"
4038
4055
  )
4039
4056
  );
4040
- function Lr({ isComponent: e = !1 }) {
4041
- const { isAuthenticated: t } = Me(), [r] = Ut({
4042
- key: Dt + Jr,
4057
+ function Mr({ isComponent: e = !1 }) {
4058
+ const { user: t, getAccessToken: r } = Me(), [a] = Ut({
4059
+ key: Vt + Qr,
4043
4060
  initialValue: ""
4044
- }), [a] = Ut({
4045
- key: Dt + Yr,
4061
+ }), [n] = Ut({
4062
+ key: Vt + Zr,
4046
4063
  initialValue: Ee.ASC
4047
- }), [n, o] = Be(Ua, {
4064
+ }), [o, s] = Be(Fa, {
4048
4065
  id: xt(),
4049
4066
  model: Se,
4050
4067
  engine: Se,
@@ -4052,85 +4069,91 @@ function Lr({ isComponent: e = !1 }) {
4052
4069
  messages: [],
4053
4070
  prompts: [],
4054
4071
  isComponent: e
4055
- }), [s, i] = Be(Pa, {
4056
- searchString: r,
4072
+ }), [i, l] = Be(Ga, {
4073
+ searchString: a,
4057
4074
  sortedCell: "timestamp",
4058
- sortDirection: a
4059
- }), [l, h] = Be(Ha, {
4075
+ sortDirection: n
4076
+ }), [h, f] = Be(Wa, {
4060
4077
  prompt: ""
4061
4078
  });
4062
- return L(() => {
4063
- var g;
4064
- (g = document.getElementById("logo")) == null || g.classList.add("fadeOut"), setTimeout(() => {
4065
- var u;
4066
- (u = document.getElementById("root")) == null || u.classList.replace("app-hidden", "fadeIn");
4079
+ return On({
4080
+ keys: [
4081
+ t == null ? void 0 : t.username,
4082
+ i.searchString,
4083
+ i.sortDirection
4084
+ ],
4085
+ getAccessToken: r
4086
+ }), Ln({ getAccessToken: r }), In({ keys: [t == null ? void 0 : t.username], getAccessToken: r }), L(() => {
4087
+ var u;
4088
+ (u = document.getElementById("logo")) == null || u.classList.add("fadeOut"), setTimeout(() => {
4089
+ var g;
4090
+ (g = document.getElementById("root")) == null || g.classList.replace("app-hidden", "fadeIn");
4067
4091
  }, 500);
4068
- }), /* @__PURE__ */ d(ve.Provider, { value: { state: n, dispatch: o }, children: /* @__PURE__ */ d(
4069
- Fa.Provider,
4092
+ }), /* @__PURE__ */ d(ve.Provider, { value: { state: o, dispatch: s }, children: /* @__PURE__ */ d(
4093
+ Bn.Provider,
4070
4094
  {
4071
4095
  value: {
4072
- state: s,
4073
- dispatch: i
4096
+ state: i,
4097
+ dispatch: l
4074
4098
  },
4075
4099
  children: /* @__PURE__ */ I(
4076
- wt.Provider,
4100
+ Nt.Provider,
4077
4101
  {
4078
- value: { state: l, dispatch: h },
4102
+ value: { state: h, dispatch: f },
4079
4103
  children: [
4080
4104
  /* @__PURE__ */ d(
4081
- oa,
4105
+ ca,
4082
4106
  {
4083
4107
  noColors: !0,
4084
4108
  noMargin: !0,
4085
4109
  noPadding: !0,
4086
4110
  noBorder: !0,
4087
- className: Mt({
4111
+ className: Dt({
4088
4112
  extraClass: "mt-5"
4089
4113
  }),
4090
- children: t && /* @__PURE__ */ d(ot, { fallback: /* @__PURE__ */ d("div", {}), children: /* @__PURE__ */ d(Uo, {}) })
4114
+ children: /* @__PURE__ */ d(ot, { fallback: /* @__PURE__ */ d("div", {}), children: /* @__PURE__ */ d(Fo, {}) })
4091
4115
  }
4092
4116
  ),
4093
4117
  /* @__PURE__ */ d(
4094
- Kr,
4118
+ Xr,
4095
4119
  {
4096
- className: Mt({
4120
+ className: Dt({
4097
4121
  extraClass: "max-h-[calc(100svh_-_250px)]"
4098
4122
  }),
4099
4123
  noMargin: !0,
4100
4124
  noPadding: !0,
4101
- children: /* @__PURE__ */ d(zo, {})
4125
+ children: /* @__PURE__ */ d(Ho, {})
4102
4126
  }
4103
4127
  ),
4104
- /* @__PURE__ */ d(ro, {})
4128
+ /* @__PURE__ */ d(oo, {})
4105
4129
  ]
4106
4130
  }
4107
4131
  )
4108
4132
  }
4109
4133
  ) });
4110
4134
  }
4111
- Lr.displayName = "App";
4112
- const ts = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: Lr }, Symbol.toStringTag, { value: "Module" }));
4135
+ Mr.displayName = "App";
4136
+ const as = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: Mr }, Symbol.toStringTag, { value: "Module" }));
4113
4137
  export {
4114
- ts as App,
4138
+ as as App,
4115
4139
  ve as AppContext,
4116
4140
  Ut as E,
4117
- Fa as HistoryContext,
4118
- fn as NewChatButton,
4119
- yr as Pe,
4120
- ze as SERVICE_TYPES,
4121
- qo as be,
4141
+ Cr as Fe,
4142
+ Bn as HistoryContext,
4143
+ ro as NewChatButton,
4144
+ Ue as SERVICE_TYPES,
4145
+ Yo as be,
4122
4146
  Ee as f,
4123
- Wo as ge,
4124
- jo as he,
4125
- $a as ie,
4126
- xo as le,
4127
- Ko as me,
4128
- gn as serviceCall,
4129
- Jo as ue,
4130
- Qo as useChatsHistory,
4131
- Zo as usePreloadChatsHistory,
4132
- es as useServerCapabilities,
4133
- Xo as useUserChatStats,
4134
- Qn as useUserPreferences,
4135
- Yo as ye
4147
+ Ko as ge,
4148
+ Jo as he,
4149
+ Va as ie,
4150
+ To as le,
4151
+ Xo as me,
4152
+ Nn as serviceCall,
4153
+ Qo as ue,
4154
+ ts as useChatsHistory,
4155
+ rs as useServerCapabilities,
4156
+ es as useUserChatStats,
4157
+ Cn as useUserPreferences,
4158
+ Zo as ye
4136
4159
  };