@gentiq/ui 1.0.0-alpha.5 → 1.0.0-alpha.6

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.
@@ -5,7 +5,7 @@ import * as Z from "react";
5
5
  import { useRef as j, useState as C, useEffect as D, useContext as Se, useMemo as O, createContext as Oe, useSyncExternalStore as Ln, useLayoutEffect as qn, memo as Ee, useCallback as pe, Component as Kr, Suspense as Ve, lazy as Nt, Children as Xr, forwardRef as $n, createElement as Yr, useId as Jr } from "react";
6
6
  import { withDefaults as ie, useServerConfig as Le, createOptionsStore as kt, useOptionsStore as jn, useGentiqOptions as W, useGentiqTranslation as _, References as Ae, useMessage as G, useGentiqLanguage as B, useToolApproval as Zr, useFileUrl as ea, useChatReferencesActions as ta, useThreadView as ve, useThreadScope as Fn, Thread as De, localizeError as na, Message as le, ActionBar as be, getLocalizedErrorMessage as fe, Composer as he, useComposer as _t, useGentiqUser as Un, useComposerVoice as Bn, useGentiqStatus as Hn, useGentiqFeature as sa, useComposerRoot as ra, useGentiqEntitlement as St, useTheme as Ce, useThreadSelection as Ct, ThreadSelectionProvider as Vn, useThread as aa, GentiqRuntimeProvider as oa, useLoginCodeExchange as ia, useAuthSession as la, useGentiqApi as Xe, useGentiqQueryClient as Gn, useGentiqKeys as ca, useThreadListItem as Wn, useThreads as da, ThreadList as se, ThreadRename as $e } from "@gentiq/react";
7
7
  import { Slot as ua } from "@radix-ui/react-slot";
8
- import { c as v, u as Q, C as zt, a as It, b as Tt, D as qe, d as Qn, B as E, e as Mt, f as Kn, g as Xn, h as ma, L as Ue, T as Ye, i as Je, j as Ze, k as Yn, l as Pt, m as Rt, n as At, o as we, p as ha, q as Jn, r as pa, s as Zn, t as Dt, v as fa, w as Ot, x as ut, y as Et, z as Lt, A as ga, S as ba, E as xa, P as va, F as nn, G as ce, H as es, I as ts, J as ns, K as ss, M as rs, N as Ge, O as ya, Q as wa, R as Na, U as ka, V as _a, W as Sa, X as Ca, Y as za, Z as Ia, _ as Ta, $ as Ma, a0 as Pa } from "./shared-BPpDLW8N.js";
8
+ import { c as x, u as Q, C as zt, a as It, b as Tt, D as qe, d as Qn, B as E, e as Mt, f as Kn, g as Xn, h as ma, L as Ue, T as Ye, i as Je, j as Ze, k as Yn, l as Pt, m as Rt, n as At, o as we, p as ha, q as Jn, r as pa, s as Zn, t as Dt, v as fa, w as Ot, x as ut, y as Et, z as Lt, A as ga, S as ba, E as xa, P as va, F as nn, G as ce, H as es, I as ts, J as ns, K as ss, M as rs, N as Ge, O as ya, Q as wa, R as Na, U as ka, V as _a, W as Sa, X as Ca, Y as za, Z as Ia, _ as Ta, $ as Ma, a0 as Pa } from "./shared-BtZa4J_w.js";
9
9
  import { toast as F, Toaster as Ra } from "sonner";
10
10
  import { getTextDirection as oe, resolveMessageId as Aa, writeStored as Da, readStored as Oa, isGentiqError as qt, HIDDEN_PART_TYPES as Ea, messageText as La, textOrKey as Ne, evaluateCondition as $t, getAvailableLanguages as qa, getLanguageNativeName as $a, withAttachmentUrls as ja, toGentiqMessages as Fa } from "@gentiq/core";
11
11
  import Ua from "rehype-sanitize";
@@ -147,7 +147,7 @@ function K(e) {
147
147
  const Ut = ({ className: e, from: t, ...s }) => /* @__PURE__ */ n(
148
148
  "div",
149
149
  {
150
- className: v(
150
+ className: x(
151
151
  "group flex w-full items-end gap-3",
152
152
  t === "user" ? "is-user justify-end" : "is-assistant",
153
153
  e
@@ -157,7 +157,7 @@ const Ut = ({ className: e, from: t, ...s }) => /* @__PURE__ */ n(
157
157
  ), Bt = ({ children: e, className: t, isPlain: s, ...r }) => /* @__PURE__ */ n(
158
158
  "div",
159
159
  {
160
- className: v(
160
+ className: x(
161
161
  "flex flex-col gap-2 overflow-hidden text-base group-[.is-assistant]:bg-transparent group-[.is-assistant]:px-0 group-[.is-assistant]:py-1 group-[.is-assistant]:w-full group-[.is-assistant]:leading-[1.7]",
162
162
  !s && "group-[.is-user]:rounded-3xl group-[.is-user]:bg-bubble group-[.is-user]:text-bubble-foreground group-[.is-user]:px-5 group-[.is-user]:py-3.5 group-[.is-user]:max-w-[88%] md:group-[.is-user]:max-w-[75%]",
163
163
  t
@@ -425,7 +425,7 @@ const Ro = { linkMode: "text-only" }, Ao = { enabled: !1 }, Ht = (e) => {
425
425
  /* @__PURE__ */ n(
426
426
  Ha,
427
427
  {
428
- className: v("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 code-bg ", e),
428
+ className: x("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 code-bg ", e),
429
429
  mode: i,
430
430
  plugins: m,
431
431
  remend: Ro,
@@ -471,10 +471,10 @@ function ps(e, t, s = {}) {
471
471
  const N = t ? 0 : Math.min(
472
472
  Math.max((e.length - p.current) / $o * 1e3, r),
473
473
  a
474
- ), x = Math.floor(a * Fo / 1e3), y = (b) => {
474
+ ), v = Math.floor(a * Fo / 1e3), y = (b) => {
475
475
  f = 0;
476
476
  const I = Math.min(b - h, jo);
477
- h = b, e.length - p.current > x && (p.current = e.length - x, m.current = 0);
477
+ h = b, e.length - p.current > v && (p.current = e.length - v, m.current = 0);
478
478
  const k = e.length - p.current;
479
479
  if (k <= 0) return;
480
480
  const T = (t ? Math.min(Math.max(k / qo * 1e3, r), a) : N) * I / 1e3 + m.current, P = Math.floor(T);
@@ -535,10 +535,10 @@ function bs({
535
535
  streaming: s,
536
536
  reference: r
537
537
  }) {
538
- const { textComponents: a, remarkPlugins: o, rehypePlugins: i, linkProtocols: l } = Q(), u = K((x) => x.composer), d = fs(), p = oe(e), m = s && t === "assistant", [g] = ps(e, m, d), f = j(!1);
538
+ const { textComponents: a, remarkPlugins: o, rehypePlugins: i, linkProtocols: l } = Q(), u = K((v) => v.composer), d = fs(), p = oe(e), m = s && t === "assistant", [g] = ps(e, m, d), f = j(!1);
539
539
  m && (f.current = !0);
540
540
  const h = f.current ? "streaming" : "static", N = t === "user" ? /* @__PURE__ */ n("div", { className: "whitespace-pre-wrap break-words", children: g.split(`
541
- `).map((x, y) => /* @__PURE__ */ n("div", { dir: "auto", children: x || /* @__PURE__ */ n("br", {}) }, y)) }) : /* @__PURE__ */ n(
541
+ `).map((v, y) => /* @__PURE__ */ n("div", { dir: "auto", children: v || /* @__PURE__ */ n("br", {}) }, y)) }) : /* @__PURE__ */ n(
542
542
  nt,
543
543
  {
544
544
  components: a,
@@ -589,7 +589,7 @@ function Vo({ lines: e, children: t }) {
589
589
  children: /* @__PURE__ */ n(
590
590
  Ke,
591
591
  {
592
- className: v("size-4 transition-transform duration-200", i && "rotate-180")
592
+ className: x("size-4 transition-transform duration-200", i && "rotate-180")
593
593
  }
594
594
  )
595
595
  }
@@ -660,7 +660,7 @@ const xs = Oe(null), Qo = () => {
660
660
  return /* @__PURE__ */ n(xs.Provider, { value: f, children: /* @__PURE__ */ n(
661
661
  zt,
662
662
  {
663
- className: v("not-prose mb-4", e),
663
+ className: x("not-prose mb-4", e),
664
664
  onOpenChange: d,
665
665
  open: u,
666
666
  ...l,
@@ -673,7 +673,7 @@ const xs = Oe(null), Qo = () => {
673
673
  return /* @__PURE__ */ n(
674
674
  It,
675
675
  {
676
- className: v("flex items-center gap-2 text-muted-foreground text-sm", e),
676
+ className: x("flex items-center gap-2 text-muted-foreground text-sm", e),
677
677
  ...s,
678
678
  children: t ?? /* @__PURE__ */ c(L, { children: [
679
679
  /* @__PURE__ */ n(er, { className: "size-4" }),
@@ -681,7 +681,7 @@ const xs = Oe(null), Qo = () => {
681
681
  /* @__PURE__ */ n(
682
682
  Ke,
683
683
  {
684
- className: v(
684
+ className: x(
685
685
  "size-4 text-muted-foreground transition-transform",
686
686
  a ? "rotate-180" : "rotate-0"
687
687
  )
@@ -694,7 +694,7 @@ const xs = Oe(null), Qo = () => {
694
694
  ({ className: e, children: t, wordFade: s, mode: r, ...a }) => /* @__PURE__ */ n(
695
695
  Tt,
696
696
  {
697
- className: v(
697
+ className: x(
698
698
  "mt-4 text-base",
699
699
  "data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",
700
700
  e
@@ -733,7 +733,7 @@ const Ns = Ee(function({
733
733
  return /* @__PURE__ */ c(
734
734
  "div",
735
735
  {
736
- className: v(
736
+ className: x(
737
737
  "relative w-full overflow-hidden rounded-md border bg-background text-foreground",
738
738
  s
739
739
  ),
@@ -755,7 +755,7 @@ function Yo(e, t = "size-4") {
755
755
  const s = Xo[e] ?? rr;
756
756
  return /* @__PURE__ */ n(s, { className: t });
757
757
  }
758
- const Jo = ({ className: e, ...t }) => /* @__PURE__ */ n(zt, { className: v("not-prose mb-4 w-full rounded-md border", e), ...t }), Zo = {
758
+ const Jo = ({ className: e, ...t }) => /* @__PURE__ */ n(zt, { className: x("not-prose mb-4 w-full rounded-md border", e), ...t }), Zo = {
759
759
  "input-streaming": ["pending", lr],
760
760
  "input-available": ["running", en, "animate-pulse"],
761
761
  "approval-requested": ["awaiting_approval", ir, "text-warning"],
@@ -766,7 +766,7 @@ const Jo = ({ className: e, ...t }) => /* @__PURE__ */ n(zt, { className: v("not
766
766
  }, ei = ({ status: e }) => {
767
767
  const { t } = _(["tools_ui"]), [s, r, a] = Zo[e];
768
768
  return /* @__PURE__ */ c(ma, { className: "gap-1.5 rounded-full text-xs", variant: "secondary", children: [
769
- /* @__PURE__ */ n(r, { className: v("size-4", a) }),
769
+ /* @__PURE__ */ n(r, { className: x("size-4", a) }),
770
770
  t(s)
771
771
  ] });
772
772
  }, ti = ({ className: e, type: t, state: s, toolName: r, ...a }) => {
@@ -774,7 +774,7 @@ const Jo = ({ className: e, ...t }) => /* @__PURE__ */ n(zt, { className: v("not
774
774
  return /* @__PURE__ */ c(
775
775
  It,
776
776
  {
777
- className: v("flex w-full items-center justify-between gap-4 p-3", e),
777
+ className: x("flex w-full items-center justify-between gap-4 p-3", e),
778
778
  ...a,
779
779
  children: [
780
780
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
@@ -789,7 +789,7 @@ const Jo = ({ className: e, ...t }) => /* @__PURE__ */ n(zt, { className: v("not
789
789
  }, ni = ({ className: e, ...t }) => /* @__PURE__ */ n(
790
790
  Tt,
791
791
  {
792
- className: v(
792
+ className: x(
793
793
  "data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",
794
794
  e
795
795
  ),
@@ -805,7 +805,7 @@ const Jo = ({ className: e, ...t }) => /* @__PURE__ */ n(zt, { className: v("not
805
805
  return JSON.stringify(e, null, 2);
806
806
  }, si = ({ className: e, input: t, state: s, ...r }) => {
807
807
  const { t: a } = _(["tools_ui"]), o = O(() => ks(t), [t]), i = s === "input-streaming";
808
- return /* @__PURE__ */ c("div", { className: v("space-y-2 overflow-hidden p-4", e), ...r, children: [
808
+ return /* @__PURE__ */ c("div", { className: x("space-y-2 overflow-hidden p-4", e), ...r, children: [
809
809
  /* @__PURE__ */ n("h4", { className: "font-medium text-muted-foreground text-xs uppercase tracking-wide", children: a("parameters") }),
810
810
  /* @__PURE__ */ n("div", { className: "rounded-md bg-muted/50", children: i ? /* @__PURE__ */ n("pre", { className: "overflow-x-auto p-4 font-mono text-sm whitespace-pre-wrap", dir: "ltr", children: o }) : /* @__PURE__ */ n(Ns, { code: o }) })
811
811
  ] });
@@ -819,7 +819,7 @@ const Jo = ({ className: e, ...t }) => /* @__PURE__ */ n(zt, { className: v("not
819
819
  }
820
820
  return null;
821
821
  }, [t]);
822
- return t || s ? /* @__PURE__ */ c("div", { className: v("space-y-2 p-4", e), ...r, children: [
822
+ return t || s ? /* @__PURE__ */ c("div", { className: x("space-y-2 p-4", e), ...r, children: [
823
823
  /* @__PURE__ */ n("h4", { className: "font-medium text-muted-foreground text-xs uppercase tracking-wide", children: a(s ? "error" : "result") }),
824
824
  s && /* @__PURE__ */ c(qe, { children: [
825
825
  /* @__PURE__ */ n(Qn, { asChild: !0, children: /* @__PURE__ */ c(E, { variant: "destructive", size: "sm", children: [
@@ -938,11 +938,11 @@ function ii({ part: e }) {
938
938
  }
939
939
  function li({ part: e }) {
940
940
  const t = G((d) => d.message.role), { t: s } = _(["chat"]), { focusReference: r } = ta(), [a, o] = Vt(1200), i = e.data, l = i.excerpt || i.label || s("source_unavailable"), u = i.label && i.label !== l ? i.label : s("referenced_context");
941
- return /* @__PURE__ */ n("div", { className: v("my-1.5 flex", t === "user" && "justify-end"), children: /* @__PURE__ */ c(
941
+ return /* @__PURE__ */ n("div", { className: x("my-1.5 flex", t === "user" && "justify-end"), children: /* @__PURE__ */ c(
942
942
  "button",
943
943
  {
944
944
  type: "button",
945
- className: v(
945
+ className: x(
946
946
  "inline-flex max-w-[min(100%,34rem)] items-start gap-2 rounded-lg border border-border/60 bg-muted/35 px-3 py-2 text-start text-xs text-foreground transition hover:border-primary/30 hover:bg-muted/55 focus-visible:ring-2 focus-visible:ring-primary/30",
947
947
  a && "ring-2 ring-primary/35"
948
948
  ),
@@ -992,14 +992,14 @@ function zs({
992
992
  onSelect: a,
993
993
  className: o
994
994
  }) {
995
- return /* @__PURE__ */ n("div", { className: v("flex flex-col gap-1", o), children: e.map((i) => /* @__PURE__ */ n(
995
+ return /* @__PURE__ */ n("div", { className: x("flex flex-col gap-1", o), children: e.map((i) => /* @__PURE__ */ n(
996
996
  "button",
997
997
  {
998
998
  type: "button",
999
999
  disabled: s,
1000
1000
  dir: oe(i.label, r),
1001
1001
  onClick: () => a(i.label),
1002
- className: v(
1002
+ className: x(
1003
1003
  "w-full rounded-full px-3 py-2.5 text-start text-sm leading-snug transition-colors duration-150 outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/40",
1004
1004
  t === i.label ? "bg-primary/12 text-primary" : "text-foreground/85 hover:bg-foreground/[0.06] hover:text-foreground disabled:cursor-not-allowed disabled:opacity-55 disabled:hover:bg-transparent"
1005
1005
  ),
@@ -1016,18 +1016,18 @@ function mi({
1016
1016
  onReopen: a,
1017
1017
  onAnswer: o
1018
1018
  }) {
1019
- const { t: i } = _(["chat"]), { dir: l } = B(), { textComponents: u, remarkPlugins: d, rehypePlugins: p, linkProtocols: m } = Q(), g = O(() => Gt(e), [e]), [f, h] = C(""), [N, x] = C(null), [y, b] = C(!1);
1019
+ const { t: i } = _(["chat"]), { dir: l } = B(), { textComponents: u, remarkPlugins: d, rehypePlugins: p, linkProtocols: m } = Q(), g = O(() => Gt(e), [e]), [f, h] = C(""), [N, v] = C(null), [y, b] = C(!1);
1020
1020
  if (!g) return null;
1021
1021
  const I = !s && !!o, k = !I || y || N !== null, M = !Cs(t, g), T = oe(g.question, l);
1022
1022
  if (!M && !I && !r) return null;
1023
1023
  const P = async (z) => {
1024
1024
  const $ = z.trim();
1025
1025
  if (!(!$ || k)) {
1026
- b(!0), x($);
1026
+ b(!0), v($);
1027
1027
  try {
1028
1028
  await o?.($);
1029
1029
  } catch {
1030
- x(null), b(!1);
1030
+ v(null), b(!1);
1031
1031
  return;
1032
1032
  }
1033
1033
  b(!1);
@@ -1049,7 +1049,7 @@ function mi({
1049
1049
  r && /* @__PURE__ */ n(
1050
1050
  "div",
1051
1051
  {
1052
- className: v("flex w-full justify-start", M && "mt-2.5"),
1052
+ className: x("flex w-full justify-start", M && "mt-2.5"),
1053
1053
  dir: T,
1054
1054
  children: /* @__PURE__ */ c(
1055
1055
  "button",
@@ -1066,7 +1066,7 @@ function mi({
1066
1066
  )
1067
1067
  }
1068
1068
  ),
1069
- I && !r && /* @__PURE__ */ c("div", { className: v("max-w-xl", M && "mt-2.5"), dir: T, children: [
1069
+ I && !r && /* @__PURE__ */ c("div", { className: x("max-w-xl", M && "mt-2.5"), dir: T, children: [
1070
1070
  /* @__PURE__ */ n(
1071
1071
  zs,
1072
1072
  {
@@ -1140,7 +1140,7 @@ function fi({
1140
1140
  }) {
1141
1141
  const [i, l] = C(0), u = s || e?.role !== "assistant" ? void 0 : _s(e, { streaming: t }), d = O(() => u ? Gt(u) : null, [u]), p = u?.toolCallId, m = pe((I) => {
1142
1142
  l((k) => Math.abs(k - I) < 1 ? k : I);
1143
- }, []), g = d ? e?.id ?? null : null, f = d && e ? Aa(e) : null, [h, N] = C(() => hi(r)), x = f !== null && h.includes(f), y = pe(
1143
+ }, []), g = d ? e?.id ?? null : null, f = d && e ? Aa(e) : null, [h, N] = C(() => hi(r)), v = f !== null && h.includes(f), y = pe(
1144
1144
  (I) => {
1145
1145
  f && N((k) => {
1146
1146
  const M = k.filter((T) => T !== f);
@@ -1157,7 +1157,7 @@ function fi({
1157
1157
  question: d,
1158
1158
  messageId: g,
1159
1159
  disabled: t || !a,
1160
- dismissed: x,
1160
+ dismissed: v,
1161
1161
  setDismissed: y,
1162
1162
  answer: (I) => {
1163
1163
  p && a?.({ toolCallId: p, output: { answer: I } });
@@ -1169,7 +1169,7 @@ function fi({
1169
1169
  d,
1170
1170
  g,
1171
1171
  t,
1172
- x,
1172
+ v,
1173
1173
  y,
1174
1174
  a,
1175
1175
  p,
@@ -1261,33 +1261,6 @@ function bi({ part: e, index: t }) {
1261
1261
  const r = Gt(e);
1262
1262
  return r ? /* @__PURE__ */ n(gi, { part: e, question: r, index: t }) : null;
1263
1263
  }
1264
- function Be(e) {
1265
- if (Array.isArray(e)) return Be(e[0]);
1266
- if (typeof e == "string")
1267
- try {
1268
- return Be(JSON.parse(e));
1269
- } catch {
1270
- return null;
1271
- }
1272
- if (!e || typeof e != "object") return null;
1273
- const t = e;
1274
- if (!t.suggestions && t.data) return Be(t.data);
1275
- if (!Array.isArray(t.suggestions)) return null;
1276
- const s = /* @__PURE__ */ new Set(), r = t.suggestions.filter((a) => typeof a == "string").map((a) => a.trim()).filter((a) => {
1277
- const o = a.toLocaleLowerCase();
1278
- return !a || s.has(o) ? !1 : (s.add(o), !0);
1279
- }).slice(0, 3);
1280
- return r.length > 0 ? { suggestions: r } : null;
1281
- }
1282
- function xi({ part: e }) {
1283
- const { FollowUpSuggestions: t } = Q(), s = G(
1284
- (p) => p.message.parts.find((m) => m.type === "tool-suggest_follow_ups") === e
1285
- ), { message: r, isLast: a, isFinished: o, status: i, readonly: l, sendText: u } = Wt();
1286
- if (!s || r.role !== "assistant" || !a || !o || i !== "ready" || l || _s(r) !== void 0)
1287
- return null;
1288
- const d = Be(e.input);
1289
- return d ? /* @__PURE__ */ n(t, { suggestions: d.suggestions, onSelect: u }) : null;
1290
- }
1291
1264
  const Ms = {
1292
1265
  text: Go,
1293
1266
  reasoning: Ko,
@@ -1297,7 +1270,7 @@ const Ms = {
1297
1270
  "source-document": null,
1298
1271
  "data-reference": li,
1299
1272
  "tool-ask_user": bi,
1300
- "tool-suggest_follow_ups": xi
1273
+ "tool-suggest_follow_ups": null
1301
1274
  };
1302
1275
  class ge extends Kr {
1303
1276
  state = { error: null };
@@ -1320,19 +1293,19 @@ class ge extends Kr {
1320
1293
  const { error: t } = this.state;
1321
1294
  if (!t) return this.props.children;
1322
1295
  const { fallback: s } = this.props;
1323
- return s !== void 0 ? typeof s == "function" ? s(t, this.reset) : s : /* @__PURE__ */ n("div", { className: "my-2 rounded-lg border border-destructive/20 bg-destructive/5 px-3 py-2 text-xs text-destructive/80", children: t.message || /* @__PURE__ */ n(vi, {}) });
1296
+ return s !== void 0 ? typeof s == "function" ? s(t, this.reset) : s : /* @__PURE__ */ n("div", { className: "my-2 rounded-lg border border-destructive/20 bg-destructive/5 px-3 py-2 text-xs text-destructive/80", children: t.message || /* @__PURE__ */ n(xi, {}) });
1324
1297
  }
1325
1298
  }
1326
- function vi() {
1299
+ function xi() {
1327
1300
  const { t: e } = _("chat");
1328
1301
  return e("render_error");
1329
1302
  }
1330
- const yi = ({ className: e, ...t }) => /* @__PURE__ */ n(zt, { className: v("not-prose mb-4 text-primary text-xs", e), ...t }), wi = ({ className: e, count: t, children: s, ...r }) => {
1303
+ const vi = ({ className: e, ...t }) => /* @__PURE__ */ n(zt, { className: x("not-prose mb-4 text-primary text-xs", e), ...t }), yi = ({ className: e, count: t, children: s, ...r }) => {
1331
1304
  const { t: a } = _(["chat"]);
1332
1305
  return /* @__PURE__ */ n(
1333
1306
  It,
1334
1307
  {
1335
- className: v(
1308
+ className: x(
1336
1309
  "inline-flex items-center gap-1.5 rounded-full bg-secondary/70 px-3 py-1 text-xs font-medium text-muted-foreground transition-colors hover:bg-secondary hover:text-foreground",
1337
1310
  e
1338
1311
  ),
@@ -1343,19 +1316,46 @@ const yi = ({ className: e, ...t }) => /* @__PURE__ */ n(zt, { className: v("not
1343
1316
  ] })
1344
1317
  }
1345
1318
  );
1346
- }, Ni = ({ className: e, ...t }) => /* @__PURE__ */ n(
1319
+ }, wi = ({ className: e, ...t }) => /* @__PURE__ */ n(
1347
1320
  Tt,
1348
1321
  {
1349
- className: v(
1322
+ className: x(
1350
1323
  "mt-3 flex w-fit flex-col gap-2 data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",
1351
1324
  e
1352
1325
  ),
1353
1326
  ...t
1354
1327
  }
1355
- ), ki = ({ href: e, title: t, children: s, ...r }) => /* @__PURE__ */ n("a", { className: "flex items-center gap-2", href: e, rel: "noreferrer", target: "_blank", ...r, children: s ?? /* @__PURE__ */ c(L, { children: [
1328
+ ), Ni = ({ href: e, title: t, children: s, ...r }) => /* @__PURE__ */ n("a", { className: "flex items-center gap-2", href: e, rel: "noreferrer", target: "_blank", ...r, children: s ?? /* @__PURE__ */ c(L, { children: [
1356
1329
  /* @__PURE__ */ n(dr, { className: "h-4 w-4" }),
1357
1330
  /* @__PURE__ */ n("span", { className: "block font-medium", children: t })
1358
1331
  ] }) });
1332
+ function Be(e) {
1333
+ if (Array.isArray(e)) return Be(e[0]);
1334
+ if (typeof e == "string")
1335
+ try {
1336
+ return Be(JSON.parse(e));
1337
+ } catch {
1338
+ return null;
1339
+ }
1340
+ if (!e || typeof e != "object") return null;
1341
+ const t = e;
1342
+ if (!t.suggestions && t.data) return Be(t.data);
1343
+ if (!Array.isArray(t.suggestions)) return null;
1344
+ const s = /* @__PURE__ */ new Set(), r = t.suggestions.filter((a) => typeof a == "string").map((a) => a.trim()).filter((a) => {
1345
+ const o = a.toLocaleLowerCase();
1346
+ return !a || s.has(o) ? !1 : (s.add(o), !0);
1347
+ }).slice(0, 3);
1348
+ return r.length > 0 ? { suggestions: r } : null;
1349
+ }
1350
+ function ki() {
1351
+ const { FollowUpSuggestions: e } = Q(), { message: t, isLast: s, isFinished: r, status: a, readonly: o, sendText: i } = Wt();
1352
+ if (t.role !== "assistant" || !s || !r || a !== "ready" || o || _s(t) !== void 0)
1353
+ return null;
1354
+ const l = t.parts.find((d) => d.type === "tool-suggest_follow_ups");
1355
+ if (!l || !("input" in l)) return null;
1356
+ const u = Be(l.input);
1357
+ return u ? /* @__PURE__ */ n(e, { suggestions: u.suggestions, onSelect: i }) : null;
1358
+ }
1359
1359
  function _i() {
1360
1360
  const { t: e } = _(["chat"]);
1361
1361
  return /* @__PURE__ */ n(
@@ -1383,28 +1383,28 @@ const Si = (e) => Ea.includes(e.type) ? !1 : e.type === "text" || e.type === "re
1383
1383
  return /* @__PURE__ */ n(
1384
1384
  "div",
1385
1385
  {
1386
- className: v(
1386
+ className: x(
1387
1387
  "flex w-full py-3 mx-auto max-w-3xl px-4 md:px-0 animate-in-bubble",
1388
1388
  l === "rtl" ? "justify-end" : "justify-start"
1389
1389
  ),
1390
1390
  children: /* @__PURE__ */ c(
1391
1391
  "div",
1392
1392
  {
1393
- className: v(
1393
+ className: x(
1394
1394
  "flex items-center gap-3 text-sm text-muted-foreground",
1395
1395
  l === "rtl" && "flex-row-reverse"
1396
1396
  ),
1397
1397
  dir: l,
1398
1398
  children: [
1399
1399
  o ? /* @__PURE__ */ n("div", { className: "size-4 animate-spin rounded-full border-2 border-primary border-e-transparent shrink-0" }) : r === "error" ? /* @__PURE__ */ n(_e, { className: "size-4 text-destructive shrink-0" }) : /* @__PURE__ */ n(vt, { className: "size-4 text-success shrink-0" }),
1400
- /* @__PURE__ */ n("span", { className: v("font-medium", o && "animate-pulse"), children: a })
1400
+ /* @__PURE__ */ n("span", { className: x("font-medium", o && "animate-pulse"), children: a })
1401
1401
  ]
1402
1402
  }
1403
1403
  )
1404
1404
  }
1405
1405
  );
1406
1406
  }, zi = Nt(
1407
- () => import("./MessageEditor-CTATfUm3.js").then((e) => ({ default: e.MessageEditor }))
1407
+ () => import("./MessageEditor-thFldVmz.js").then((e) => ({ default: e.MessageEditor }))
1408
1408
  ), Ii = { UserMessage: Ti, AssistantMessage: Pi };
1409
1409
  function Ti() {
1410
1410
  const e = G((a) => a.message.id), t = G((a) => a.isEditing), { MessageActions: s } = Q(), r = K((a) => a.threadActions);
@@ -1440,9 +1440,9 @@ function Pi() {
1440
1440
  "data-gentiq-message-role": "assistant",
1441
1441
  className: "group/message",
1442
1442
  children: [
1443
- a.length > 0 && /* @__PURE__ */ c(yi, { children: [
1444
- /* @__PURE__ */ n(wi, { count: a.length }),
1445
- a.map((i, l) => /* @__PURE__ */ n(Ni, { children: /* @__PURE__ */ n(ki, { href: i, title: i }) }, `${e}-source-${l}`))
1443
+ a.length > 0 && /* @__PURE__ */ c(vi, { children: [
1444
+ /* @__PURE__ */ n(yi, { count: a.length }),
1445
+ a.map((i, l) => /* @__PURE__ */ n(wi, { children: /* @__PURE__ */ n(Ni, { href: i, title: i }) }, `${e}-source-${l}`))
1446
1446
  ] }),
1447
1447
  /* @__PURE__ */ n(le.Parts, {}),
1448
1448
  o && /* @__PURE__ */ n(
@@ -1452,7 +1452,8 @@ function Pi() {
1452
1452
  feedback: r.feedback,
1453
1453
  edit: !1
1454
1454
  }
1455
- )
1455
+ ),
1456
+ /* @__PURE__ */ n(ki, {})
1456
1457
  ]
1457
1458
  }
1458
1459
  );
@@ -1461,12 +1462,12 @@ function Ri({ className: e }) {
1461
1462
  const { t } = _(["chat", "errors"]), { ChatError: s } = Q(), { actions: r } = Fn(), a = ve((b) => b.messages), o = ve((b) => b.status), i = ve((b) => b.isLoadingHistory), l = ve((b) => b.error), u = O(
1462
1463
  () => l === void 0 ? null : na(l, t),
1463
1464
  [l, t]
1464
- ), { dockHeight: d } = st(), p = `calc(var(--gentiq-composer-inset, calc(6.5rem + ${d}px)) + 1.5rem)`, m = i, g = ve((b) => b.earlier.status), f = r?.loadEarlier, h = a[a.length - 1], N = h?.role === "assistant" && (o === "ready" || h.parts.some((b) => b.type === "data-chat-finished")), x = !m && (o === "submitted" || o === "streaming" && !(h?.role === "assistant" && h.parts.some(Si)));
1465
+ ), { dockHeight: d } = st(), p = `calc(var(--gentiq-composer-inset, calc(6.5rem + ${d}px)) + 1.5rem)`, m = i, g = ve((b) => b.earlier.status), f = r?.loadEarlier, h = a[a.length - 1], N = h?.role === "assistant" && (o === "ready" || h.parts.some((b) => b.type === "data-chat-finished")), v = !m && (o === "submitted" || o === "streaming" && !(h?.role === "assistant" && h.parts.some(Si)));
1465
1466
  let y;
1466
1467
  if (h?.role === "assistant")
1467
1468
  for (const b of h.parts)
1468
1469
  b.type === "data-progress-update" && (y = b);
1469
- return /* @__PURE__ */ c("div", { className: v("relative min-h-0 flex-1 overflow-hidden", e), children: [
1470
+ return /* @__PURE__ */ c("div", { className: x("relative min-h-0 flex-1 overflow-hidden", e), children: [
1470
1471
  /* @__PURE__ */ c(
1471
1472
  De.Viewport,
1472
1473
  {
@@ -1485,7 +1486,7 @@ function Ri({ className: e }) {
1485
1486
  isFinished: N
1486
1487
  }
1487
1488
  ),
1488
- x && /* @__PURE__ */ n("div", { className: "animate-in-bubble", children: /* @__PURE__ */ n(Ue, {}) }),
1489
+ v && /* @__PURE__ */ n("div", { className: "animate-in-bubble", children: /* @__PURE__ */ n(Ue, {}) }),
1489
1490
  o === "error" && u && /* @__PURE__ */ n("div", { className: "mx-auto max-w-3xl w-full px-4 my-3 animate-in-bubble", children: /* @__PURE__ */ n(s, { error: u, code: qt(u) ? u.code : void 0 }) })
1490
1491
  ]
1491
1492
  }
@@ -1571,7 +1572,7 @@ function mn({ label: e, children: t }) {
1571
1572
  const Oi = ({ className: e, ...t }) => /* @__PURE__ */ n("div", { className: "bg-transparent w-full", children: /* @__PURE__ */ n(
1572
1573
  he.Root,
1573
1574
  {
1574
- className: v(
1575
+ className: x(
1575
1576
  "w-full flex items-end gap-2 overflow-hidden rounded-[32px] bg-card/85 dark:bg-surface/85 backdrop-blur-md px-4 py-2 transition-[border-color,box-shadow] duration-200 ease-out border border-border/60 shadow-[0_2px_12px_rgb(0_0_0/0.05)] dark:shadow-[0_4px_20px_rgb(0_0_0/0.25)] hover:border-border has-focus-visible:border-foreground/20 has-focus-visible:shadow-md",
1576
1577
  e
1577
1578
  ),
@@ -1597,7 +1598,7 @@ const Oi = ({ className: e, ...t }) => /* @__PURE__ */ n("div", { className: "bg
1597
1598
  dir: l,
1598
1599
  rows: 1,
1599
1600
  placeholder: s,
1600
- className: v(
1601
+ className: x(
1601
1602
  "col-start-1 row-start-1 w-full min-w-0 disabled:cursor-not-allowed disabled:opacity-50 resize-none rounded-none border-none shadow-none outline-none ring-0 px-2 py-2.5 field-sizing-content max-h-[6lh] bg-transparent dark:bg-transparent focus-visible:ring-0 min-h-[40px] md:min-h-[44px] text-base placeholder:text-muted-foreground/60 transition-all duration-200",
1602
1603
  t
1603
1604
  ),
@@ -1606,7 +1607,7 @@ const Oi = ({ className: e, ...t }) => /* @__PURE__ */ n("div", { className: "bg
1606
1607
  )
1607
1608
  ] });
1608
1609
  }
1609
- ), Li = ({ className: e, ...t }) => /* @__PURE__ */ n("div", { className: v("flex shrink-0 items-center gap-1.5 pb-1", e), ...t }), qi = ({ className: e, ...t }) => /* @__PURE__ */ n("div", { className: v("flex items-center gap-0.5", e), ...t }), Ps = ({
1610
+ ), Li = ({ className: e, ...t }) => /* @__PURE__ */ n("div", { className: x("flex shrink-0 items-center gap-1.5 pb-1", e), ...t }), qi = ({ className: e, ...t }) => /* @__PURE__ */ n("div", { className: x("flex items-center gap-0.5", e), ...t }), Ps = ({
1610
1611
  variant: e = "ghost",
1611
1612
  className: t,
1612
1613
  size: s,
@@ -1616,7 +1617,7 @@ const Oi = ({ className: e, ...t }) => /* @__PURE__ */ n("div", { className: "bg
1616
1617
  return /* @__PURE__ */ n(
1617
1618
  E,
1618
1619
  {
1619
- className: v(
1620
+ className: x(
1620
1621
  "shrink-0 gap-1.5 rounded-full text-muted-foreground hover:text-foreground hover:bg-accent/60 transition-all duration-200 active:scale-95",
1621
1622
  a === "default" && "px-3",
1622
1623
  t
@@ -1644,7 +1645,7 @@ const Oi = ({ className: e, ...t }) => /* @__PURE__ */ n("div", { className: "bg
1644
1645
  E,
1645
1646
  {
1646
1647
  "aria-label": d,
1647
- className: v(
1648
+ className: x(
1648
1649
  "shrink-0 rounded-full size-9 bg-primary text-primary-foreground hover:bg-primary/90 transition-colors duration-200 disabled:opacity-40",
1649
1650
  r === "submitted" && "bg-muted text-foreground hover:bg-muted",
1650
1651
  e
@@ -1820,10 +1821,10 @@ function Rs({
1820
1821
  } = {}) {
1821
1822
  const { t, i18n: s } = _(["chat"]), { dir: r } = B(), a = K((y) => y.welcome), o = typeof a?.greeting == "function", i = typeof a?.typingPrompts == "function", { user: l, firstName: u, isLoading: d } = Un({
1822
1823
  enabled: e && (o || i)
1823
- }), p = a?.typingPrompts, m = typeof p == "function" ? p({ user: l, firstName: u, isLoading: d, t }) : p, g = t("welcome.typing_prompts", { returnObjects: !0, defaultValue: [] }), f = (m ? m.map((y) => t(y)) : Array.isArray(g) ? g : []).filter((y) => typeof y == "string" && y !== ""), h = a?.greeting, N = typeof h == "function" ? h({ user: l, firstName: u, isLoading: d, t }) : h ? Ne(h, t, s, ["chat"]) : t("welcome.title"), x = a?.subtitle ? Ne(a.subtitle, t, s, ["chat"]) : null;
1824
+ }), p = a?.typingPrompts, m = typeof p == "function" ? p({ user: l, firstName: u, isLoading: d, t }) : p, g = t("welcome.typing_prompts", { returnObjects: !0, defaultValue: [] }), f = (m ? m.map((y) => t(y)) : Array.isArray(g) ? g : []).filter((y) => typeof y == "string" && y !== ""), h = a?.greeting, N = typeof h == "function" ? h({ user: l, firstName: u, isLoading: d, t }) : h ? Ne(h, t, s, ["chat"]) : t("welcome.title"), v = a?.subtitle ? Ne(a.subtitle, t, s, ["chat"]) : null;
1824
1825
  return {
1825
1826
  title: N,
1826
- subtitle: x,
1827
+ subtitle: v,
1827
1828
  typingMessages: f,
1828
1829
  isRtl: r === "rtl",
1829
1830
  icon: a?.icon
@@ -1846,19 +1847,19 @@ function Qi(e, t = {}) {
1846
1847
  }, a);
1847
1848
  return () => clearInterval(y);
1848
1849
  }
1849
- const x = () => {
1850
+ const v = () => {
1850
1851
  const y = p[g];
1851
1852
  if (f === "typing") {
1852
- h++, u(y.slice(0, h)), h >= y.length ? (f = "pausing", m = setTimeout(x, a)) : m = setTimeout(x, s);
1853
+ h++, u(y.slice(0, h)), h >= y.length ? (f = "pausing", m = setTimeout(v, a)) : m = setTimeout(v, s);
1853
1854
  return;
1854
1855
  }
1855
1856
  if (f === "pausing") {
1856
- f = "deleting", m = setTimeout(x, r);
1857
+ f = "deleting", m = setTimeout(v, r);
1857
1858
  return;
1858
1859
  }
1859
- h--, u(y.slice(0, Math.max(h, 0))), h <= 0 ? (f = "typing", g = (g + 1) % p.length, m = setTimeout(x, s)) : m = setTimeout(x, r);
1860
+ h--, u(y.slice(0, Math.max(h, 0))), h <= 0 ? (f = "typing", g = (g + 1) % p.length, m = setTimeout(v, s)) : m = setTimeout(v, r);
1860
1861
  };
1861
- return u(""), m = setTimeout(x, o), () => clearTimeout(m);
1862
+ return u(""), m = setTimeout(v, o), () => clearTimeout(m);
1862
1863
  }, [i, s, r, a, o]), l;
1863
1864
  }
1864
1865
  function Ki({ open: e, onOpenChange: t, onCapture: s }) {
@@ -1907,7 +1908,7 @@ function Xi({ onKeep: e }) {
1907
1908
  }, [r]), D(() => () => {
1908
1909
  f && URL.revokeObjectURL(f.url);
1909
1910
  }, [f]);
1910
- const N = o?.getVideoTracks()[0]?.getSettings(), x = N?.facingMode !== "environment", y = () => {
1911
+ const N = o?.getVideoTracks()[0]?.getSettings(), v = N?.facingMode !== "environment", y = () => {
1911
1912
  const k = l[(l.indexOf(N?.deviceId ?? "") + 1) % l.length];
1912
1913
  !k || k === N?.deviceId || (s.current && (s.current.srcObject = null), i(null), p(!1), a(k));
1913
1914
  }, b = () => {
@@ -1936,10 +1937,10 @@ function Xi({ onKeep: e }) {
1936
1937
  playsInline: !0,
1937
1938
  muted: !0,
1938
1939
  onPlaying: () => p(!0),
1939
- className: v(
1940
+ className: x(
1940
1941
  "absolute inset-0 size-full object-cover transition-opacity duration-500",
1941
1942
  d ? "opacity-100" : "opacity-0",
1942
- x && "-scale-x-100"
1943
+ v && "-scale-x-100"
1943
1944
  )
1944
1945
  }
1945
1946
  ),
@@ -1965,7 +1966,7 @@ function Xi({ onKeep: e }) {
1965
1966
  {
1966
1967
  type: "button",
1967
1968
  onClick: () => h(null),
1968
- className: v(
1969
+ className: x(
1969
1970
  bn,
1970
1971
  "justify-self-start bg-white/12 text-white backdrop-blur-md hover:bg-white/20"
1971
1972
  ),
@@ -1980,7 +1981,7 @@ function Xi({ onKeep: e }) {
1980
1981
  {
1981
1982
  type: "button",
1982
1983
  onClick: I,
1983
- className: v(
1984
+ className: x(
1984
1985
  bn,
1985
1986
  "col-start-3 justify-self-end bg-white text-black shadow-lg hover:bg-white/90"
1986
1987
  ),
@@ -2009,7 +2010,7 @@ function Xi({ onKeep: e }) {
2009
2010
  onClick: y,
2010
2011
  disabled: !d,
2011
2012
  "aria-label": t("camera_switch"),
2012
- className: v(
2013
+ className: x(
2013
2014
  gn,
2014
2015
  "col-start-3 size-11 justify-self-end disabled:opacity-40"
2015
2016
  ),
@@ -2045,18 +2046,18 @@ function Ji({ disabled: e, addFiles: t, isMobile: s }) {
2045
2046
  b === "camera" && d === "webcam" ? u(!0) : p[b].current?.click();
2046
2047
  }, N = (b) => {
2047
2048
  b.target.files && t(Array.from(b.target.files)), b.target.value = "";
2048
- }, x = r("attach"), y = /* @__PURE__ */ n(
2049
+ }, v = r("attach"), y = /* @__PURE__ */ n(
2049
2050
  Ps,
2050
2051
  {
2051
2052
  variant: "ghost",
2052
2053
  disabled: e,
2053
- "aria-label": x,
2054
+ "aria-label": v,
2054
2055
  onClick: f.length === 1 ? () => h("files") : s ? () => i(!0) : void 0,
2055
- className: v(o && "bg-accent/60 text-foreground transition-colors active:scale-100"),
2056
+ className: x(o && "bg-accent/60 text-foreground transition-colors active:scale-100"),
2056
2057
  children: /* @__PURE__ */ n(
2057
2058
  wr,
2058
2059
  {
2059
- className: v(
2060
+ className: x(
2060
2061
  "size-6 transition-transform duration-300 ease-[cubic-bezier(0.34,1.56,0.64,1)]",
2061
2062
  o && "rotate-45"
2062
2063
  )
@@ -2080,7 +2081,7 @@ function Ji({ disabled: e, addFiles: t, isMobile: s }) {
2080
2081
  )),
2081
2082
  f.length === 1 ? /* @__PURE__ */ c(Ye, { children: [
2082
2083
  /* @__PURE__ */ n(Je, { asChild: !0, children: y }),
2083
- /* @__PURE__ */ n(Ze, { children: x })
2084
+ /* @__PURE__ */ n(Ze, { children: v })
2084
2085
  ] }) : s ? /* @__PURE__ */ c(L, { children: [
2085
2086
  y,
2086
2087
  /* @__PURE__ */ n(
@@ -2088,7 +2089,7 @@ function Ji({ disabled: e, addFiles: t, isMobile: s }) {
2088
2089
  {
2089
2090
  open: o,
2090
2091
  onOpenChange: i,
2091
- title: x,
2092
+ title: v,
2092
2093
  sources: f,
2093
2094
  onPick: (b) => {
2094
2095
  h(b), i(!1);
@@ -2199,7 +2200,7 @@ function el({
2199
2200
  ]
2200
2201
  }
2201
2202
  ),
2202
- /* @__PURE__ */ n("div", { className: v("grid gap-3", t.length === 3 ? "grid-cols-3" : "grid-cols-2"), children: t.map((m, g) => {
2203
+ /* @__PURE__ */ n("div", { className: x("grid gap-3", t.length === 3 ? "grid-cols-3" : "grid-cols-2"), children: t.map((m, g) => {
2203
2204
  const { icon: f, label: h } = As[m];
2204
2205
  return /* @__PURE__ */ c(
2205
2206
  "button",
@@ -2232,9 +2233,9 @@ function tl() {
2232
2233
  ] });
2233
2234
  }
2234
2235
  const nl = Nt(
2235
- () => import("./VoiceInput-CYuGXRYZ.js").then((e) => ({ default: e.VoiceRecordingBar }))
2236
+ () => import("./VoiceInput-BVH0PUC6.js").then((e) => ({ default: e.VoiceRecordingBar }))
2236
2237
  ), sl = Nt(
2237
- () => import("./VoiceInput-CYuGXRYZ.js").then((e) => ({ default: e.VoiceRecordingControls }))
2238
+ () => import("./VoiceInput-BVH0PUC6.js").then((e) => ({ default: e.VoiceRecordingControls }))
2238
2239
  );
2239
2240
  function rl({
2240
2241
  onSend: e,
@@ -2247,10 +2248,10 @@ function rl({
2247
2248
  const { t: i, i18n: l } = _(["chat", "maintenance"]), u = K((w) => w.composer), d = Le(), { ChoiceQuestionDock: p, ComposerFooter: m, composerTools: g } = Q(), { blocksChat: f } = Hn(), {
2248
2249
  question: h,
2249
2250
  disabled: N,
2250
- dismissed: x,
2251
+ dismissed: v,
2251
2252
  setDismissed: y,
2252
2253
  answer: b
2253
- } = st(), I = x ? null : h, { typingMessages: k } = Rs({ enabled: !!a }), M = Qi(a ? k : []), T = !!a && k.length > 0, P = u?.placeholder ? i(u.placeholder) : i("input_placeholder"), A = f ? i("maintenance:composer_placeholder") : I?.allowCustom !== !1 && I ? i("choice_custom_placeholder") : T ? M : P, z = Qt(), $ = t === "streaming" || t === "submitted", U = sa("voice_input", { enabled: !!u?.voice?.enabled }), H = !!u?.voice?.enabled && U === !0, J = d?.attachments, te = (u?.attachments?.enabled ?? !1) && !!J, Y = O(
2254
+ } = st(), I = v ? null : h, { typingMessages: k } = Rs({ enabled: !!a }), M = Qi(a ? k : []), T = !!a && k.length > 0, P = u?.placeholder ? i(u.placeholder) : i("input_placeholder"), A = f ? i("maintenance:composer_placeholder") : I?.allowCustom !== !1 && I ? i("choice_custom_placeholder") : T ? M : P, z = Qt(), $ = t === "streaming" || t === "submitted", U = sa("voice_input", { enabled: !!u?.voice?.enabled }), H = !!u?.voice?.enabled && U === !0, J = d?.attachments, te = (u?.attachments?.enabled ?? !1) && !!J, Y = O(
2254
2255
  () => [...g ?? []].sort((w, R) => (w.order ?? 0) - (R.order ?? 0)),
2255
2256
  [g]
2256
2257
  ), { draft: X, setDraft: ue, isClosed: re } = _t(), me = j(null), q = {
@@ -2268,7 +2269,7 @@ function rl({
2268
2269
  R && (R.focus(), R.setSelectionRange(w.length, w.length));
2269
2270
  }
2270
2271
  };
2271
- return /* @__PURE__ */ n("div", { className: v("shrink-0 px-4 pb-5 pt-2 md:px-6 md:pb-6 w-full", o), children: /* @__PURE__ */ c("div", { className: "max-w-3xl mx-auto w-full", children: [
2272
+ return /* @__PURE__ */ n("div", { className: x("shrink-0 px-4 pb-5 pt-2 md:px-6 md:pb-6 w-full", o), children: /* @__PURE__ */ c("div", { className: "max-w-3xl mx-auto w-full", children: [
2272
2273
  I && /* @__PURE__ */ n(
2273
2274
  p,
2274
2275
  {
@@ -2319,7 +2320,7 @@ function al({
2319
2320
  voiceEnabled: i,
2320
2321
  tools: l
2321
2322
  }) {
2322
- const { t: u, i18n: d } = _(["chat"]), p = K((A) => A.composer?.maxLength), { draft: m, files: g, references: f, isBusy: h } = _t(), { addFiles: N, dragging: x } = ra(), y = Bn(), { threadId: b, status: I } = t, k = !!p && m.length >= p * 0.9;
2323
+ const { t: u, i18n: d } = _(["chat"]), p = K((A) => A.composer?.maxLength), { draft: m, files: g, references: f, isBusy: h } = _t(), { addFiles: N, dragging: v } = ra(), y = Bn(), { threadId: b, status: I } = t, k = !!p && m.length >= p * 0.9;
2323
2324
  D(() => {
2324
2325
  a || e.current?.focus();
2325
2326
  }, [b, a, e]);
@@ -2329,7 +2330,7 @@ function al({
2329
2330
  }, [M, a, e]);
2330
2331
  const P = { ...t, isMobile: a, addFiles: N };
2331
2332
  return /* @__PURE__ */ c(L, { children: [
2332
- x && /* @__PURE__ */ n(
2333
+ v && /* @__PURE__ */ n(
2333
2334
  "div",
2334
2335
  {
2335
2336
  className: "pointer-events-none absolute inset-0 z-20 flex items-center justify-center rounded-lg border-2 border-dashed border-primary bg-background/90 text-sm font-medium text-foreground",
@@ -2357,7 +2358,7 @@ function al({
2357
2358
  k && /* @__PURE__ */ c(
2358
2359
  "span",
2359
2360
  {
2360
- className: v(
2361
+ className: x(
2361
2362
  "px-1 text-xs tabular-nums text-muted-foreground",
2362
2363
  m.length >= p && "text-destructive"
2363
2364
  ),
@@ -2410,9 +2411,9 @@ function il({
2410
2411
  if (!h) return;
2411
2412
  const N = () => l(h.offsetHeight);
2412
2413
  N();
2413
- const x = typeof ResizeObserver > "u" ? null : new ResizeObserver(N);
2414
- return x?.observe(h), () => {
2415
- x?.disconnect(), l(0);
2414
+ const v = typeof ResizeObserver > "u" ? null : new ResizeObserver(N);
2415
+ return v?.observe(h), () => {
2416
+ v?.disconnect(), l(0);
2416
2417
  };
2417
2418
  }, [l]);
2418
2419
  const m = oe(e.question, i), g = t || !r || d !== null, f = async (h) => {
@@ -2430,7 +2431,7 @@ function il({
2430
2431
  {
2431
2432
  ref: u,
2432
2433
  dir: m,
2433
- className: v(
2434
+ className: x(
2434
2435
  // `-mb-3` slides the bottom edge under the composer, which paints over
2435
2436
  // it (see the `z-10` wrapper there) so the joint reads as one surface.
2436
2437
  "animate-choice-dock relative z-0 -mb-3 rounded-t-lg bg-surface px-2 pb-6 pt-4",
@@ -2469,7 +2470,7 @@ function il({
2469
2470
  );
2470
2471
  }
2471
2472
  function ll({ className: e, children: t, ...s }) {
2472
- return /* @__PURE__ */ c(Me.Root, { "data-slot": "scroll-area", className: v("relative", e), ...s, children: [
2473
+ return /* @__PURE__ */ c(Me.Root, { "data-slot": "scroll-area", className: x("relative", e), ...s, children: [
2473
2474
  /* @__PURE__ */ n(
2474
2475
  Me.Viewport,
2475
2476
  {
@@ -2492,7 +2493,7 @@ function Ds({
2492
2493
  {
2493
2494
  "data-slot": "scroll-area-scrollbar",
2494
2495
  orientation: t,
2495
- className: v(
2496
+ className: x(
2496
2497
  "flex touch-none p-px transition-colors select-none",
2497
2498
  t === "vertical" && "h-full w-2.5 border-s border-s-transparent",
2498
2499
  t === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
@@ -2512,7 +2513,7 @@ function Ds({
2512
2513
  const cl = ({ className: e, children: t, ...s }) => {
2513
2514
  const { dir: r } = B();
2514
2515
  return /* @__PURE__ */ c(ll, { className: "w-full overflow-x-auto whitespace-nowrap", dir: r, ...s, children: [
2515
- /* @__PURE__ */ n("div", { className: v("flex w-max flex-nowrap items-center gap-2", e), children: t }),
2516
+ /* @__PURE__ */ n("div", { className: x("flex w-max flex-nowrap items-center gap-2", e), children: t }),
2516
2517
  /* @__PURE__ */ n(Ds, { className: "hidden", orientation: "horizontal" })
2517
2518
  ] });
2518
2519
  }, dl = ({
@@ -2530,7 +2531,7 @@ const cl = ({ className: e, children: t, ...s }) => {
2530
2531
  return /* @__PURE__ */ n(
2531
2532
  E,
2532
2533
  {
2533
- className: v("cursor-pointer rounded-full px-4", s),
2534
+ className: x("cursor-pointer rounded-full px-4", s),
2534
2535
  onClick: l,
2535
2536
  size: a,
2536
2537
  type: "button",
@@ -2556,7 +2557,7 @@ function ul({
2556
2557
  }
2557
2558
  }
2558
2559
  };
2559
- return /* @__PURE__ */ n("div", { className: v("mx-auto w-full max-w-4xl py-2", r), children: /* @__PURE__ */ n(cl, { className: "pb-1", "aria-label": a("follow_up_suggestions"), children: e.map((u) => /* @__PURE__ */ n(
2560
+ return /* @__PURE__ */ n("div", { className: x("mx-auto w-full max-w-4xl py-2", r), children: /* @__PURE__ */ n(cl, { className: "pb-1", "aria-label": a("follow_up_suggestions"), children: e.map((u) => /* @__PURE__ */ n(
2560
2561
  dl,
2561
2562
  {
2562
2563
  suggestion: u,
@@ -2621,7 +2622,7 @@ function fl({
2621
2622
  "data-slot": "hover-card-content",
2622
2623
  align: t,
2623
2624
  sideOffset: s,
2624
- className: v(
2625
+ className: x(
2625
2626
  "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
2626
2627
  e
2627
2628
  ),
@@ -2639,7 +2640,7 @@ function xn({ label: e, remaining: t, amount: s }) {
2639
2640
  /* @__PURE__ */ n("div", { className: "h-1 w-full rounded-full bg-muted overflow-hidden", children: /* @__PURE__ */ n(
2640
2641
  "div",
2641
2642
  {
2642
- className: v("h-full rounded-full transition-all duration-700", Dt(o)),
2643
+ className: x("h-full rounded-full transition-all duration-700", Dt(o)),
2643
2644
  style: { width: `${o}%` }
2644
2645
  }
2645
2646
  ) })
@@ -2656,7 +2657,7 @@ function gl({ className: e, details: t = !0 }) {
2656
2657
  label: s("quota:credits")
2657
2658
  } : null;
2658
2659
  if (!a || !u) return null;
2659
- const { remaining: d, amount: p, label: m } = u, g = Lt(d, p), f = a.kind === "credits" ? s("quota:credits") : a.plan?.name ?? s("quota:plan"), h = Zn(g, r.language), N = d <= 0, x = v(
2660
+ const { remaining: d, amount: p, label: m } = u, g = Lt(d, p), f = a.kind === "credits" ? s("quota:credits") : a.plan?.name ?? s("quota:plan"), h = Zn(g, r.language), N = d <= 0, v = x(
2660
2661
  "flex items-center gap-2 h-8 ps-2.5 pe-3 rounded-full border text-xs font-medium tabular-nums transition-colors",
2661
2662
  N ? "border-destructive/40 bg-destructive/10 text-destructive" : "border-border/60 bg-background/40 text-muted-foreground",
2662
2663
  e
@@ -2664,7 +2665,7 @@ function gl({ className: e, details: t = !0 }) {
2664
2665
  /* @__PURE__ */ n(
2665
2666
  "span",
2666
2667
  {
2667
- className: v(
2668
+ className: x(
2668
2669
  "block h-2 w-8 md:w-12 rounded-full border overflow-hidden bg-muted/40 transition-colors duration-700",
2669
2670
  fa(g)
2670
2671
  ),
@@ -2676,7 +2677,7 @@ function gl({ className: e, details: t = !0 }) {
2676
2677
  children: /* @__PURE__ */ n(
2677
2678
  "span",
2678
2679
  {
2679
- className: v("block h-full transition-all duration-700", Dt(g)),
2680
+ className: x("block h-full transition-all duration-700", Dt(g)),
2680
2681
  style: { width: `${g}%` }
2681
2682
  }
2682
2683
  )
@@ -2690,8 +2691,8 @@ function gl({ className: e, details: t = !0 }) {
2690
2691
  {
2691
2692
  type: "button",
2692
2693
  onClick: () => i((b) => !b),
2693
- className: v(
2694
- x,
2694
+ className: x(
2695
+ v,
2695
2696
  N ? "hover:bg-destructive/15" : "hover:bg-accent/60 hover:text-foreground"
2696
2697
  ),
2697
2698
  children: y
@@ -2712,7 +2713,7 @@ function gl({ className: e, details: t = !0 }) {
2712
2713
  b.key
2713
2714
  )) : a.credits && /* @__PURE__ */ n(xn, { amount: a.credits.granted, remaining: a.credits.remaining })
2714
2715
  ] })
2715
- ] }) : /* @__PURE__ */ n("div", { className: x, children: y });
2716
+ ] }) : /* @__PURE__ */ n("div", { className: v, children: y });
2716
2717
  }
2717
2718
  function bl({ title: e, message: t, endsAt: s }) {
2718
2719
  const { t: r } = _(["maintenance"]);
@@ -2856,7 +2857,7 @@ function Kt({
2856
2857
  disclaimer: i,
2857
2858
  settings: l
2858
2859
  }) {
2859
- const u = Se(mt) ?? kl, d = jn(u, (x) => x.configured), p = Q(), m = Le(), g = O(
2860
+ const u = Se(mt) ?? kl, d = jn(u, (v) => v.configured), p = Q(), m = Le(), g = O(
2860
2861
  () => Ft(
2861
2862
  Ka(d, {
2862
2863
  history: s,
@@ -2919,7 +2920,7 @@ const de = $n(function({ className: t, style: s, children: r, ...a }, o) {
2919
2920
  {
2920
2921
  ref: o,
2921
2922
  ...a,
2922
- className: v("gentiq", i, t),
2923
+ className: x("gentiq", i, t),
2923
2924
  lang: d,
2924
2925
  dir: p,
2925
2926
  style: {
@@ -2941,7 +2942,7 @@ const de = $n(function({ className: t, style: s, children: r, ...a }, o) {
2941
2942
  function Il({ classNames: e = {} }) {
2942
2943
  const { t, i18n: s } = _(["chat"]), { threadId: r, messages: a, status: o, send: i, addToolOutput: l } = aa(), u = pe((z) => {
2943
2944
  i({ text: z });
2944
- }, [i]), { MessageList: d, PromptInput: p, WelcomeScreen: m } = Q(), { composer: g, disclaimer: f } = K((z) => z), h = W((z) => z.app), N = s.exists("chat:disclaimer") ? t("chat:disclaimer") : null, x = typeof f == "string" ? Ne(f, t, s, ["chat"]) : f ?? N, y = a[a.length - 1], b = y?.role === "assistant" && (o === "ready" || y.parts.some((z) => z.type === "data-chat-finished")), I = o === "error", k = r === null && a.length === 0 && o !== "submitted", M = O(() => Ee(p), [p]), [T, P] = Qa(), A = O(
2945
+ }, [i]), { MessageList: d, PromptInput: p, WelcomeScreen: m } = Q(), { composer: g, disclaimer: f } = K((z) => z), h = W((z) => z.app), N = s.exists("chat:disclaimer") ? t("chat:disclaimer") : null, v = typeof f == "string" ? Ne(f, t, s, ["chat"]) : f ?? N, y = a[a.length - 1], b = y?.role === "assistant" && (o === "ready" || y.parts.some((z) => z.type === "data-chat-finished")), I = o === "error", k = r === null && a.length === 0 && o !== "submitted", M = O(() => Ee(p), [p]), [T, P] = Qa(), A = O(
2945
2946
  () => P ? { "--gentiq-composer-inset": `${P}px` } : void 0,
2946
2947
  [P]
2947
2948
  );
@@ -2962,7 +2963,7 @@ function Il({ classNames: e = {} }) {
2962
2963
  children: /* @__PURE__ */ c(
2963
2964
  De.Root,
2964
2965
  {
2965
- className: v(
2966
+ className: x(
2966
2967
  "relative flex flex-col h-full overflow-hidden bg-background",
2967
2968
  e.container
2968
2969
  ),
@@ -2972,21 +2973,24 @@ function Il({ classNames: e = {} }) {
2972
2973
  "div",
2973
2974
  {
2974
2975
  "aria-hidden": !0,
2975
- className: v(
2976
+ className: x(
2976
2977
  "gentiq-welcome-glow pointer-events-none absolute inset-0 transition-opacity duration-500",
2977
2978
  h.showWelcomeGlow !== !1 && k ? "opacity-100" : "opacity-0"
2978
2979
  )
2979
2980
  }
2980
2981
  ),
2981
- !k && /* @__PURE__ */ n(ge, { children: /* @__PURE__ */ n(d, { className: v("flex-1", e.messageList) }) }),
2982
+ !k && /* @__PURE__ */ n(ge, { children: /* @__PURE__ */ n(d, { className: x("flex-1", e.messageList) }) }),
2982
2983
  /* @__PURE__ */ c("div", { className: "absolute inset-0 z-10 pointer-events-none flex flex-col", children: [
2983
2984
  /* @__PURE__ */ n("div", { className: "grow basis-0 shrink-0 min-h-0 flex flex-col items-center justify-end px-4 pb-6 md:pb-8", children: k && /* @__PURE__ */ n(m, { onSuggestionClick: u }) }),
2984
2985
  /* @__PURE__ */ c("div", { ref: T, className: "relative shrink-0 flex flex-col items-stretch", children: [
2985
- !k && /* @__PURE__ */ n(
2986
+ /* @__PURE__ */ n(
2986
2987
  "div",
2987
2988
  {
2988
2989
  "aria-hidden": !0,
2989
- className: "pointer-events-none absolute inset-0 bg-gradient-to-t from-background/95 via-background/75 to-transparent backdrop-blur-sm [mask-image:linear-gradient(to_top,black_55%,transparent)]"
2990
+ className: x(
2991
+ "pointer-events-none absolute inset-0 bg-gradient-to-t from-background/95 via-background/75 to-transparent backdrop-blur-sm [mask-image:linear-gradient(to_top,black_55%,transparent)] transition-opacity",
2992
+ k ? "opacity-0 duration-200" : "opacity-100 duration-300 delay-200"
2993
+ )
2990
2994
  }
2991
2995
  ),
2992
2996
  /* @__PURE__ */ n(
@@ -2997,19 +3001,19 @@ function Il({ classNames: e = {} }) {
2997
3001
  isErrorVisible: I,
2998
3002
  threadId: r,
2999
3003
  newChat: k,
3000
- className: v(
3004
+ className: x(
3001
3005
  "relative z-10 pointer-events-auto",
3002
3006
  e.inputArea,
3003
- x && "pb-0 md:pb-0"
3007
+ v && "pb-0 md:pb-0"
3004
3008
  )
3005
3009
  }
3006
3010
  ),
3007
- x && /* @__PURE__ */ n("div", { className: "relative z-10 py-1.5 px-4 flex justify-center items-center pointer-events-auto", children: /* @__PURE__ */ n("p", { className: "text-xs text-muted-foreground select-none text-center leading-tight", children: x }) })
3011
+ v && /* @__PURE__ */ n("div", { className: "relative z-10 py-1.5 px-4 flex justify-center items-center pointer-events-auto", children: /* @__PURE__ */ n("p", { className: "text-xs text-muted-foreground select-none text-center leading-tight", children: v }) })
3008
3012
  ] }),
3009
3013
  /* @__PURE__ */ n(
3010
3014
  "div",
3011
3015
  {
3012
- className: v(
3016
+ className: x(
3013
3017
  "basis-0 shrink-0 transition-[flex-grow] duration-500 ease-in-out",
3014
3018
  k ? "grow" : "grow-0"
3015
3019
  )
@@ -3196,7 +3200,7 @@ function Es({
3196
3200
  children: /* @__PURE__ */ n(
3197
3201
  "div",
3198
3202
  {
3199
- className: v("h-full rounded-full transition-all duration-700", Dt(d)),
3203
+ className: x("h-full rounded-full transition-all duration-700", Dt(d)),
3200
3204
  style: { width: `${d}%` }
3201
3205
  }
3202
3206
  )
@@ -3207,7 +3211,7 @@ function Es({
3207
3211
  }
3208
3212
  function ql({ windows: e, className: t, renderAction: s }) {
3209
3213
  const { t: r } = _(["quota"]);
3210
- return /* @__PURE__ */ n("div", { className: v("space-y-4", t), children: e.map((a) => /* @__PURE__ */ n(
3214
+ return /* @__PURE__ */ n("div", { className: x("space-y-4", t), children: e.map((a) => /* @__PURE__ */ n(
3211
3215
  Es,
3212
3216
  {
3213
3217
  label: Et(r, a.meter),
@@ -3293,7 +3297,7 @@ function $s(e, t) {
3293
3297
  return r ? s : null;
3294
3298
  }
3295
3299
  function js(e = "editable", t = "editable", s = "editable") {
3296
- const { t: r, i18n: a } = _("settings"), o = W((x) => x.app), { theme: i, setTheme: l, locked: u } = Ce(), { language: d, setLanguage: p, locked: m, dir: g } = B(), f = qa(a, o?.languages), h = f.find((x) => x === d) ?? d.split("-")[0];
3300
+ const { t: r, i18n: a } = _("settings"), o = W((v) => v.app), { theme: i, setTheme: l, locked: u } = Ce(), { language: d, setLanguage: p, locked: m, dir: g } = B(), f = qa(a, o?.languages), h = f.find((v) => v === d) ?? d.split("-")[0];
3297
3301
  return { rows: [
3298
3302
  !u && t !== "hidden" && {
3299
3303
  key: "theme",
@@ -3301,10 +3305,10 @@ function js(e = "editable", t = "editable", s = "editable") {
3301
3305
  label: r("general.theme"),
3302
3306
  value: i,
3303
3307
  disabled: e === "faded" || t === "faded",
3304
- onChange: (x) => l(x),
3305
- options: jl.map((x) => ({
3306
- value: x,
3307
- label: r(`general.themes.${x}`),
3308
+ onChange: (v) => l(v),
3309
+ options: jl.map((v) => ({
3310
+ value: v,
3311
+ label: r(`general.themes.${v}`),
3308
3312
  lang: void 0
3309
3313
  }))
3310
3314
  },
@@ -3315,13 +3319,13 @@ function js(e = "editable", t = "editable", s = "editable") {
3315
3319
  value: h,
3316
3320
  disabled: e === "faded" || s === "faded",
3317
3321
  onChange: p,
3318
- options: f.map((x) => ({
3319
- value: x,
3320
- label: $a(x),
3321
- lang: x
3322
+ options: f.map((v) => ({
3323
+ value: v,
3324
+ label: $a(v),
3325
+ lang: v
3322
3326
  }))
3323
3327
  }
3324
- ].filter((x) => e !== "hidden" && !!x), dir: g };
3328
+ ].filter((v) => e !== "hidden" && !!v), dir: g };
3325
3329
  }
3326
3330
  function Fl({
3327
3331
  sectionMode: e = "editable",
@@ -3476,7 +3480,7 @@ function Hs({
3476
3480
  side: t = "top",
3477
3481
  align: s = "start"
3478
3482
  }) {
3479
- const { t: r } = _(["settings", "errors"]), a = K((z) => z.settings), o = a?.menu, i = Xe(), l = ze(), { sections: u } = Xt(), { displayName: d, initial: p, handleOrPlan: m } = qs(), g = Pe(a, "profile"), f = Pe(a, "account"), h = ee(a, "account", "logout"), { rows: N, dir: x } = js(
3483
+ const { t: r } = _(["settings", "errors"]), a = K((z) => z.settings), o = a?.menu, i = Xe(), l = ze(), { sections: u } = Xt(), { displayName: d, initial: p, handleOrPlan: m } = qs(), g = Pe(a, "profile"), f = Pe(a, "account"), h = ee(a, "account", "logout"), { rows: N, dir: v } = js(
3480
3484
  Pe(a, "general"),
3481
3485
  ee(a, "general", "theme"),
3482
3486
  ee(a, "general", "language")
@@ -3495,7 +3499,7 @@ function Hs({
3495
3499
  ].filter((z) => !!z), T = o?.showLogout !== !1 && f !== "hidden" && h !== "hidden", P = M.length > 0 || y.length > 0;
3496
3500
  if (!b && !P && !T) return null;
3497
3501
  const A = /* @__PURE__ */ n("div", { role: "separator", className: "my-1 h-px bg-border/50" });
3498
- return /* @__PURE__ */ c(Pt, { dir: x, children: [
3502
+ return /* @__PURE__ */ c(Pt, { dir: v, children: [
3499
3503
  /* @__PURE__ */ n(Rt, { asChild: !0, children: /* @__PURE__ */ n(
3500
3504
  E,
3501
3505
  {
@@ -3504,7 +3508,7 @@ function Hs({
3504
3508
  variant: "ghost",
3505
3509
  size: "icon",
3506
3510
  "aria-label": r("title"),
3507
- className: v(
3511
+ className: x(
3508
3512
  "size-9 shrink-0 rounded-full text-muted-foreground hover:bg-sidebar-accent hover:text-foreground transition-colors",
3509
3513
  e
3510
3514
  ),
@@ -3517,7 +3521,7 @@ function Hs({
3517
3521
  side: t,
3518
3522
  align: s,
3519
3523
  sideOffset: 8,
3520
- className: v("w-64", wn),
3524
+ className: x("w-64", wn),
3521
3525
  children: [
3522
3526
  b && /* @__PURE__ */ c(L, { children: [
3523
3527
  /* @__PURE__ */ c(
@@ -3557,7 +3561,7 @@ function Hs({
3557
3561
  Na,
3558
3562
  {
3559
3563
  sideOffset: 6,
3560
- className: v("min-w-44 max-h-72 overflow-y-auto custom-scrollbar", wn),
3564
+ className: x("min-w-44 max-h-72 overflow-y-auto custom-scrollbar", wn),
3561
3565
  children: te.map((X) => /* @__PURE__ */ c(
3562
3566
  we,
3563
3567
  {
@@ -3565,7 +3569,7 @@ function Hs({
3565
3569
  "aria-checked": J === X.value,
3566
3570
  lang: X.lang,
3567
3571
  onSelect: () => Y(X.value),
3568
- className: v(je, "justify-between"),
3572
+ className: x(je, "justify-between"),
3569
3573
  children: [
3570
3574
  /* @__PURE__ */ n("span", { children: X.label }),
3571
3575
  J === X.value && /* @__PURE__ */ n(An, { className: "size-4 text-foreground" })
@@ -3610,7 +3614,7 @@ const Ul = [
3610
3614
  function Bl({ trigger: e }) {
3611
3615
  const { t, i18n: s } = _(["settings", "common"]), r = W((S) => S.app), a = K((S) => S.settings), o = Xe(), i = Gn(), l = ca(), u = ze(), d = !e && u !== null && u.activeSection !== null, [p, m] = C(!1), g = d || p, { data: f, refetch: h } = St({
3612
3616
  enabled: g
3613
- }), N = j(null), { dir: x } = B(), { sections: y } = Xt(), [b, I] = C(y[0]?.id || "profile"), k = (d ? u.activeSection : b) || y[0]?.id || "profile", M = y.find((S) => S.id === k) ?? y[0], T = M?.component, [P, A] = C({
3617
+ }), N = j(null), { dir: v } = B(), { sections: y } = Xt(), [b, I] = C(y[0]?.id || "profile"), k = (d ? u.activeSection : b) || y[0]?.id || "profile", M = y.find((S) => S.id === k) ?? y[0], T = M?.component, [P, A] = C({
3614
3618
  name: "",
3615
3619
  surname: "",
3616
3620
  username: "",
@@ -3673,7 +3677,7 @@ function Bl({ trigger: e }) {
3673
3677
  }, Ie = /* @__PURE__ */ c(
3674
3678
  "div",
3675
3679
  {
3676
- dir: x,
3680
+ dir: v,
3677
3681
  onKeyDown: d ? (S) => {
3678
3682
  S.key === "Escape" && (S.stopPropagation(), me());
3679
3683
  } : void 0,
@@ -3689,7 +3693,7 @@ function Bl({ trigger: e }) {
3689
3693
  {
3690
3694
  type: "button",
3691
3695
  onClick: () => I(S.id),
3692
- className: v(
3696
+ className: x(
3693
3697
  "flex items-center gap-1.5 sm:gap-2 pb-2 sm:pb-3 pt-1 px-2 sm:px-1 text-sm sm:text-base font-medium transition-all border-b-2 whitespace-nowrap shrink-0",
3694
3698
  k === S.id ? "border-primary text-primary" : "border-transparent text-muted-foreground hover:text-foreground hover:border-border",
3695
3699
  S.faded && Fe
@@ -3705,7 +3709,7 @@ function Bl({ trigger: e }) {
3705
3709
  /* @__PURE__ */ n("div", { className: "flex-1 relative min-h-0 h-full bg-background", children: /* @__PURE__ */ n("div", { className: "absolute inset-0 overflow-y-auto p-5 sm:p-8 pt-6 sm:pt-10 custom-scrollbar", children: /* @__PURE__ */ c(
3706
3710
  "div",
3707
3711
  {
3708
- className: v(
3712
+ className: x(
3709
3713
  "space-y-6 animate-in fade-in slide-in-from-bottom-2 duration-200",
3710
3714
  d && "max-w-2xl mx-auto w-full"
3711
3715
  ),
@@ -3735,7 +3739,7 @@ function Bl({ trigger: e }) {
3735
3739
  return V === "hidden" ? null : /* @__PURE__ */ c(
3736
3740
  "div",
3737
3741
  {
3738
- className: v(
3742
+ className: x(
3739
3743
  "flex flex-col gap-2.5",
3740
3744
  w && "sm:col-span-2",
3741
3745
  V === "faded" && Fe
@@ -3756,7 +3760,7 @@ function Bl({ trigger: e }) {
3756
3760
  ),
3757
3761
  disabled: V === "faded",
3758
3762
  placeholder: q === "password" ? t("profile.password_placeholder") : void 0,
3759
- className: v(ft, w && "ps-10 pe-3"),
3763
+ className: x(ft, w && "ps-10 pe-3"),
3760
3764
  dir: w ? "ltr" : void 0
3761
3765
  }
3762
3766
  )
@@ -3774,7 +3778,7 @@ function Bl({ trigger: e }) {
3774
3778
  return /* @__PURE__ */ c(
3775
3779
  "div",
3776
3780
  {
3777
- className: v("flex flex-col gap-2.5", q === "faded" && Fe),
3781
+ className: x("flex flex-col gap-2.5", q === "faded" && Fe),
3778
3782
  children: [
3779
3783
  /* @__PURE__ */ n(ce, { htmlFor: w, className: "px-1", children: t(S.label) }),
3780
3784
  /* @__PURE__ */ n(
@@ -3785,7 +3789,7 @@ function Bl({ trigger: e }) {
3785
3789
  value: U[S.key],
3786
3790
  onChange: (R) => H({ ...U, [S.key]: R }),
3787
3791
  disabled: q === "faded",
3788
- dir: x,
3792
+ dir: v,
3789
3793
  t,
3790
3794
  selectPlaceholderKey: "profile.select_placeholder"
3791
3795
  }
@@ -3822,7 +3826,7 @@ function Bl({ trigger: e }) {
3822
3826
  ue !== "hidden" && f && /* @__PURE__ */ c(
3823
3827
  "div",
3824
3828
  {
3825
- className: v(
3829
+ className: x(
3826
3830
  "p-6 bg-muted/30 rounded-3xl border border-border/40 space-y-5",
3827
3831
  ue === "faded" && "opacity-50"
3828
3832
  ),
@@ -3855,7 +3859,7 @@ function Bl({ trigger: e }) {
3855
3859
  Us(o, t);
3856
3860
  },
3857
3861
  disabled: re === "faded",
3858
- className: v(
3862
+ className: x(
3859
3863
  "rounded-full px-5 gap-2 font-medium h-9",
3860
3864
  re === "faded" && Fe
3861
3865
  ),
@@ -3890,7 +3894,7 @@ function Bl({ trigger: e }) {
3890
3894
  /* @__PURE__ */ n(
3891
3895
  Mt,
3892
3896
  {
3893
- dir: x,
3897
+ dir: v,
3894
3898
  className: "w-full sm:w-[95vw] sm:max-w-[700px] p-0 gap-0 overflow-hidden rounded-t-2xl sm:rounded-3xl border-none shadow-lg bg-background h-[90vh] sm:h-[min(750px,90vh)]",
3895
3899
  children: Ie
3896
3900
  }
@@ -3909,7 +3913,7 @@ function Vl({ onSignedIn: e, reason: t }) {
3909
3913
  const { t: s } = _(["login"]), r = W((w) => w.app), a = Xe(), o = B().dir, i = Gn(), [l, u] = C("login"), d = !!r?.disableSignup, p = !!r?.disableAuthPage, m = O(
3910
3914
  () => r?.loginFields ?? ["username"],
3911
3915
  [r?.loginFields]
3912
- ), g = m.map((w) => s(w)).join(" / "), f = m.length === 1 ? kn[m[0]] : "text", h = m.length === 1 && m[0] === "phone", [N, x] = C(""), [y, b] = C(""), [I, k] = C({}), [M, T] = C(""), [P, A] = C(""), [z, $] = C(""), U = O(
3916
+ ), g = m.map((w) => s(w)).join(" / "), f = m.length === 1 ? kn[m[0]] : "text", h = m.length === 1 && m[0] === "phone", [N, v] = C(""), [y, b] = C(""), [I, k] = C({}), [M, T] = C(""), [P, A] = C(""), [z, $] = C(""), U = O(
3913
3917
  () => r?.userMetadataFields?.filter((w) => w.showInSignup) || [],
3914
3918
  [r?.userMetadataFields]
3915
3919
  ), [H, J] = C(() => {
@@ -3964,7 +3968,7 @@ function Vl({ onSignedIn: e, reason: t }) {
3964
3968
  g,
3965
3969
  f,
3966
3970
  N,
3967
- (w) => x(h ? Nn(w) : w),
3971
+ (w) => v(h ? Nn(w) : w),
3968
3972
  g,
3969
3973
  !0
3970
3974
  ],
@@ -4136,16 +4140,16 @@ function Gl({
4136
4140
  };
4137
4141
  return window.addEventListener("keydown", y), () => window.removeEventListener("keydown", y);
4138
4142
  }, [h]);
4139
- const N = g ? "expanded" : "collapsed", x = Z.useMemo(
4143
+ const N = g ? "expanded" : "collapsed", v = Z.useMemo(
4140
4144
  () => ({ state: N, open: g, setOpen: f, isMobile: l, openMobile: u, setOpenMobile: d, toggleSidebar: h }),
4141
4145
  [N, g, f, l, u, h]
4142
4146
  );
4143
- return /* @__PURE__ */ n(Yt.Provider, { value: x, children: /* @__PURE__ */ n(ka, { delayDuration: 0, children: /* @__PURE__ */ n(
4147
+ return /* @__PURE__ */ n(Yt.Provider, { value: v, children: /* @__PURE__ */ n(ka, { delayDuration: 0, children: /* @__PURE__ */ n(
4144
4148
  "div",
4145
4149
  {
4146
4150
  "data-slot": "sidebar-wrapper",
4147
4151
  style: { "--gentiq-sidebar-width": "17.5rem", ...a },
4148
- className: v("group/sidebar-wrapper flex min-h-svh w-full", r),
4152
+ className: x("group/sidebar-wrapper flex min-h-svh w-full", r),
4149
4153
  ...i,
4150
4154
  children: o
4151
4155
  }
@@ -4199,7 +4203,7 @@ function Wl({
4199
4203
  "div",
4200
4204
  {
4201
4205
  "data-slot": "sidebar-container",
4202
- className: v(
4206
+ className: x(
4203
4207
  "fixed inset-y-0 z-10 hidden h-svh w-(--gentiq-sidebar-width) transition-[inset-inline-start,inset-inline-end,width] duration-200 ease-linear md:flex group-data-[collapsible=icon]:w-14",
4204
4208
  e === "start" ? "start-0 group-data-[collapsible=offcanvas]:start-[calc(var(--gentiq-sidebar-width)*-1)]" : "end-0 group-data-[collapsible=offcanvas]:end-[calc(var(--gentiq-sidebar-width)*-1)]",
4205
4209
  r
@@ -4229,7 +4233,7 @@ function Gs({ className: e, onClick: t, ...s }) {
4229
4233
  "data-slot": "sidebar-trigger",
4230
4234
  variant: "ghost",
4231
4235
  size: "icon",
4232
- className: v("size-7", e),
4236
+ className: x("size-7", e),
4233
4237
  onClick: (o) => {
4234
4238
  t?.(o), r();
4235
4239
  },
@@ -4242,10 +4246,10 @@ function Gs({ className: e, onClick: t, ...s }) {
4242
4246
  );
4243
4247
  }
4244
4248
  function Ql({ className: e, ...t }) {
4245
- return /* @__PURE__ */ n("div", { "data-slot": "sidebar-header", "data-sidebar": "header", className: v("flex flex-col gap-2 p-2", e), ...t });
4249
+ return /* @__PURE__ */ n("div", { "data-slot": "sidebar-header", "data-sidebar": "header", className: x("flex flex-col gap-2 p-2", e), ...t });
4246
4250
  }
4247
4251
  function Kl({ className: e, ...t }) {
4248
- return /* @__PURE__ */ n("div", { "data-slot": "sidebar-footer", "data-sidebar": "footer", className: v("flex flex-col gap-2 p-2", e), ...t });
4252
+ return /* @__PURE__ */ n("div", { "data-slot": "sidebar-footer", "data-sidebar": "footer", className: x("flex flex-col gap-2 p-2", e), ...t });
4249
4253
  }
4250
4254
  function Xl({ className: e, ...t }) {
4251
4255
  return /* @__PURE__ */ n(
@@ -4253,16 +4257,16 @@ function Xl({ className: e, ...t }) {
4253
4257
  {
4254
4258
  "data-slot": "sidebar-content",
4255
4259
  "data-sidebar": "content",
4256
- className: v("flex min-h-0 flex-1 flex-col gap-2 overflow-auto", e),
4260
+ className: x("flex min-h-0 flex-1 flex-col gap-2 overflow-auto", e),
4257
4261
  ...t
4258
4262
  }
4259
4263
  );
4260
4264
  }
4261
4265
  function gt({ className: e, ...t }) {
4262
- return /* @__PURE__ */ n("ul", { "data-slot": "sidebar-menu", "data-sidebar": "menu", className: v("flex w-full min-w-0 flex-col gap-1", e), ...t });
4266
+ return /* @__PURE__ */ n("ul", { "data-slot": "sidebar-menu", "data-sidebar": "menu", className: x("flex w-full min-w-0 flex-col gap-1", e), ...t });
4263
4267
  }
4264
4268
  function Jt({ className: e, ...t }) {
4265
- return /* @__PURE__ */ n("li", { "data-slot": "sidebar-menu-item", "data-sidebar": "menu-item", className: v("group/menu-item relative", e), ...t });
4269
+ return /* @__PURE__ */ n("li", { "data-slot": "sidebar-menu-item", "data-sidebar": "menu-item", className: x("group/menu-item relative", e), ...t });
4266
4270
  }
4267
4271
  function Zt({
4268
4272
  asChild: e = !1,
@@ -4274,7 +4278,7 @@ function Zt({
4274
4278
  {
4275
4279
  "data-slot": "sidebar-menu-button",
4276
4280
  "data-sidebar": "menu-button",
4277
- className: v(
4281
+ className: x(
4278
4282
  "peer/menu-button flex h-8 w-full items-center gap-2 overflow-hidden rounded-md p-2 text-start text-sm outline-hidden ring-sidebar-ring transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
4279
4283
  t
4280
4284
  ),
@@ -4324,9 +4328,9 @@ function Qs({
4324
4328
  onRemove: u,
4325
4329
  triggerClassName: d
4326
4330
  }) {
4327
- const { t: p } = _("sidebar"), { dir: m } = B(), [g, f] = C(!1), h = async (x, y, b, I) => {
4331
+ const { t: p } = _("sidebar"), { dir: m } = B(), [g, f] = C(!1), h = async (v, y, b, I) => {
4328
4332
  try {
4329
- await x(), F.success(y, I ? { description: I } : void 0);
4333
+ await v(), F.success(y, I ? { description: I } : void 0);
4330
4334
  } catch {
4331
4335
  F.error(b);
4332
4336
  }
@@ -4377,7 +4381,7 @@ function Qs({
4377
4381
  onSelect: () => f(!0),
4378
4382
  destructive: !0
4379
4383
  }
4380
- ].filter((x) => !!x);
4384
+ ].filter((v) => !!v);
4381
4385
  return N.length ? /* @__PURE__ */ c(L, { children: [
4382
4386
  /* @__PURE__ */ c(Pt, { dir: m, children: [
4383
4387
  /* @__PURE__ */ n(Rt, { asChild: !0, children: /* @__PURE__ */ n(
@@ -4395,7 +4399,7 @@ function Qs({
4395
4399
  {
4396
4400
  align: "end",
4397
4401
  className: "min-w-44 rounded-2xl border-border/60 bg-popover p-1.5 shadow-xl",
4398
- children: N.map(({ key: x, icon: y, label: b, onSelect: I, destructive: k }) => /* @__PURE__ */ c(
4402
+ children: N.map(({ key: v, icon: y, label: b, onSelect: I, destructive: k }) => /* @__PURE__ */ c(
4399
4403
  we,
4400
4404
  {
4401
4405
  variant: k ? "destructive" : "default",
@@ -4406,7 +4410,7 @@ function Qs({
4406
4410
  /* @__PURE__ */ n("span", { children: b })
4407
4411
  ]
4408
4412
  },
4409
- x
4413
+ v
4410
4414
  ))
4411
4415
  }
4412
4416
  )
@@ -4471,15 +4475,15 @@ function ec() {
4471
4475
  }
4472
4476
  function bt({ iconOnly: e = !1 }) {
4473
4477
  const t = W((o) => o.app), { resolvedTheme: s } = Ce(), r = t?.logo ? typeof t.logo == "string" ? t.logo : s === "dark" ? t.logo.dark : t.logo.light : Pa, a = t?.name || "Gentiq";
4474
- return /* @__PURE__ */ c("div", { className: v("flex items-center gap-2 select-none min-w-0", !e && "ps-1"), children: [
4478
+ return /* @__PURE__ */ c("div", { className: x("flex items-center gap-2 select-none min-w-0", !e && "ps-1"), children: [
4475
4479
  /* @__PURE__ */ n("img", { src: r, alt: a, className: "size-6 shrink-0 object-contain" }),
4476
4480
  !e && /* @__PURE__ */ n("span", { className: "truncate text-base font-medium tracking-tight text-foreground", children: a })
4477
4481
  ] });
4478
4482
  }
4479
4483
  function Ks({ hideActions: e = !1 }) {
4480
- const t = Ct(), s = ze(), r = Vs(), { t: a } = _(["sidebar"]), o = W((x) => x.app), { history: i, headerActionsEnabled: l } = K((x) => x), { HeaderActions: u, headerActions: d, UsageMeter: p } = Q(), m = O(
4484
+ const t = Ct(), s = ze(), r = Vs(), { t: a } = _(["sidebar"]), o = W((v) => v.app), { history: i, headerActionsEnabled: l } = K((v) => v), { HeaderActions: u, headerActions: d, UsageMeter: p } = Q(), m = O(
4481
4485
  () => (d ?? []).filter(
4482
- (x) => l?.[x.id] ?? x.defaultEnabled ?? !0
4486
+ (v) => l?.[v.id] ?? v.defaultEnabled ?? !0
4483
4487
  ),
4484
4488
  [d, l]
4485
4489
  ), g = Qt(), f = !e && (i?.enabled ?? !0), h = f && r !== null;
@@ -4505,7 +4509,7 @@ function Ks({ hideActions: e = !1 }) {
4505
4509
  ] }) }),
4506
4510
  /* @__PURE__ */ n("div", { className: "flex items-center gap-1.5 min-w-9 justify-end", children: !e && /* @__PURE__ */ c(L, { children: [
4507
4511
  u && /* @__PURE__ */ n(u, { isMobile: g }),
4508
- m.map(({ id: x, component: y }) => /* @__PURE__ */ n(y, { isMobile: g }, x)),
4512
+ m.map(({ id: v, component: y }) => /* @__PURE__ */ n(y, { isMobile: g }, v)),
4509
4513
  o?.showUsageBar && /* @__PURE__ */ n(p, { details: o.showUsageDetails ?? !0, isMobile: g }),
4510
4514
  f && /* @__PURE__ */ n(ec, {}),
4511
4515
  !f && o?.showSettings !== !1 && /* @__PURE__ */ n(Hs, { side: "bottom", align: "end" })
@@ -4530,8 +4534,8 @@ function nc({ shareId: e }) {
4530
4534
  Fa(f.items),
4531
4535
  async (N) => {
4532
4536
  try {
4533
- const x = await d.getPublicAttachmentBlobUrl(e, N);
4534
- return g.add(x), x;
4537
+ const v = await d.getPublicAttachmentBlobUrl(e, N);
4538
+ return g.add(v), v;
4535
4539
  } catch {
4536
4540
  return "";
4537
4541
  }
@@ -4560,7 +4564,7 @@ function sc() {
4560
4564
  Zt,
4561
4565
  {
4562
4566
  asChild: !0,
4563
- className: v(
4567
+ className: x(
4564
4568
  "rounded-full transition-colors duration-200 group/new-chat",
4565
4569
  o ? "size-9 justify-center p-0 bg-sidebar-accent/60 text-sidebar-foreground hover:bg-sidebar-accent" : "h-10 bg-transparent text-sidebar-foreground/85 hover:bg-sidebar-accent/70 hover:text-sidebar-foreground active:bg-sidebar-accent aria-[current=page]:bg-sidebar-accent aria-[current=page]:font-semibold aria-[current=page]:text-sidebar-accent-foreground"
4566
4570
  ),
@@ -4726,7 +4730,7 @@ function lc({ side: e = "start" }) {
4726
4730
  const { t } = _(["sidebar", "settings"]), s = K((y) => y.history), r = ze(), a = Vs(), { groups: o } = Xt(), [i, l] = C(!1), { showPin: u, showShare: d, showRename: p, showDelete: m } = s, g = O(
4727
4731
  () => ({ pin: u, share: d, rename: p, delete: m }),
4728
4732
  [u, d, p, m]
4729
- ), f = r?.activeSection != null, h = !a?.isMobile && a?.state === "collapsed", N = () => a?.isMobile && a.setOpenMobile(!1), x = !f && s.enabled && /* @__PURE__ */ n(
4733
+ ), f = r?.activeSection != null, h = !a?.isMobile && a?.state === "collapsed", N = () => a?.isMobile && a.setOpenMobile(!1), v = !f && s.enabled && /* @__PURE__ */ n(
4730
4734
  E,
4731
4735
  {
4732
4736
  type: "button",
@@ -4737,7 +4741,7 @@ function lc({ side: e = "start" }) {
4737
4741
  onClick: () => {
4738
4742
  h ? (a?.setOpen(!0), l(!0)) : l((y) => !y);
4739
4743
  },
4740
- className: v(
4744
+ className: x(
4741
4745
  h ? "size-9" : "size-8",
4742
4746
  _n,
4743
4747
  !h && i && "bg-sidebar-accent text-sidebar-foreground"
@@ -4755,7 +4759,7 @@ function lc({ side: e = "start" }) {
4755
4759
  /* @__PURE__ */ c(
4756
4760
  Ql,
4757
4761
  {
4758
- className: v("pt-3 pb-1 gap-2.5", h ? "px-2 items-center" : "px-3"),
4762
+ className: x("pt-3 pb-1 gap-2.5", h ? "px-2 items-center" : "px-3"),
4759
4763
  children: [
4760
4764
  h ? /* @__PURE__ */ n(
4761
4765
  E,
@@ -4771,8 +4775,8 @@ function lc({ side: e = "start" }) {
4771
4775
  ) : /* @__PURE__ */ c("div", { className: "flex items-center justify-between gap-2 px-1", children: [
4772
4776
  /* @__PURE__ */ n(bt, {}),
4773
4777
  /* @__PURE__ */ c("div", { className: "flex items-center gap-0.5 shrink-0", children: [
4774
- x,
4775
- /* @__PURE__ */ n(Gs, { className: v("size-8", _n) })
4778
+ v,
4779
+ /* @__PURE__ */ n(Gs, { className: x("size-8", _n) })
4776
4780
  ] })
4777
4781
  ] }),
4778
4782
  f ? /* @__PURE__ */ c(
@@ -4785,7 +4789,7 @@ function lc({ side: e = "start" }) {
4785
4789
  onClick: () => {
4786
4790
  r.close(), N();
4787
4791
  },
4788
- className: v(
4792
+ className: x(
4789
4793
  "rounded-full text-sm font-medium text-sidebar-foreground hover:bg-sidebar-accent transition-colors",
4790
4794
  h ? "size-9 justify-center" : "w-full justify-start gap-2.5 px-3 h-10"
4791
4795
  ),
@@ -4796,7 +4800,7 @@ function lc({ side: e = "start" }) {
4796
4800
  }
4797
4801
  ) : /* @__PURE__ */ c(L, { children: [
4798
4802
  /* @__PURE__ */ n(sc, {}),
4799
- h && x,
4803
+ h && v,
4800
4804
  !h && s.enabled && i && /* @__PURE__ */ n(ic, { autoFocus: !0, onClose: () => l(!1) })
4801
4805
  ] })
4802
4806
  ]
@@ -4805,10 +4809,10 @@ function lc({ side: e = "start" }) {
4805
4809
  /* @__PURE__ */ n(
4806
4810
  Xl,
4807
4811
  {
4808
- className: v("py-2 custom-scrollbar", h ? "px-2 items-center" : "px-3"),
4812
+ className: x("py-2 custom-scrollbar", h ? "px-2 items-center" : "px-3"),
4809
4813
  children: f ? o.map((y) => /* @__PURE__ */ c("div", { className: "mb-3 last:mb-0", children: [
4810
4814
  !h && /* @__PURE__ */ n("div", { className: "px-3 pb-1 pt-2 text-xs font-medium text-muted-foreground", children: y.title }),
4811
- /* @__PURE__ */ n(gt, { className: v("gap-0.5", h && "items-center"), children: y.items.map((b) => /* @__PURE__ */ n(Jt, { children: /* @__PURE__ */ c(
4815
+ /* @__PURE__ */ n(gt, { className: x("gap-0.5", h && "items-center"), children: y.items.map((b) => /* @__PURE__ */ n(Jt, { children: /* @__PURE__ */ c(
4812
4816
  Zt,
4813
4817
  {
4814
4818
  type: "button",
@@ -4818,7 +4822,7 @@ function lc({ side: e = "start" }) {
4818
4822
  onClick: () => {
4819
4823
  r.openSection(b.id), N();
4820
4824
  },
4821
- className: v(
4825
+ className: x(
4822
4826
  "rounded-full font-medium text-sidebar-foreground/85 hover:bg-sidebar-accent/60 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
4823
4827
  h ? "size-9 justify-center p-0" : "h-auto gap-2.5 px-3 py-2"
4824
4828
  ),
@@ -4845,7 +4849,7 @@ function cc({ collapsed: e }) {
4845
4849
  return (!s || e) && !o ? null : /* @__PURE__ */ c(
4846
4850
  "div",
4847
4851
  {
4848
- className: v(
4852
+ className: x(
4849
4853
  "flex items-center py-2.5 mt-auto",
4850
4854
  e ? "justify-center" : "justify-between gap-2 px-3"
4851
4855
  ),
@@ -4868,7 +4872,7 @@ function uc({
4868
4872
  header: o,
4869
4873
  classNames: i
4870
4874
  }) {
4871
- const l = K((x) => x.history.enabled), { MaintenanceBanner: u, MaintenanceScreen: d } = Q(), [p, m] = C(null), g = j(null), f = O(
4875
+ const l = K((v) => v.history.enabled), { MaintenanceBanner: u, MaintenanceScreen: d } = Q(), [p, m] = C(null), g = j(null), f = O(
4872
4876
  () => ({
4873
4877
  activeSection: p,
4874
4878
  openSection: m,