teodor-new-chat-ui 3.0.146 → 3.0.148

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as f from "react";
2
- import q, { useState as ue, useRef as Ke, useCallback as Ue, useEffect as Ze, useReducer as $p, useMemo as ln, createContext as Sl, useContext as Cl, createElement as go, useLayoutEffect as Hp } from "react";
2
+ import q, { useState as ue, useRef as We, useCallback as Ue, useEffect as Xe, useReducer as $p, useMemo as mn, createContext as Sl, useContext as Cl, createElement as go, useLayoutEffect as Hp } from "react";
3
3
  import { Square as zp, Send as Up, X as er, ExternalLink as Wp, Download as Vp, Image as Tl, FileText as Ya, Loader as Gp, ChevronUp as Cr, ChevronDown as Qn, Copy as qa, Edit as Xa, RotateCcw as ci, Bot as Ja, Wrench as Kp, User as Yp, Paperclip as li, ChevronRight as qp, Check as Wi, Circle as Xp, Edit3 as Rl, Loader2 as Jp, Plus as Zp, FileSpreadsheet as Qp, MessageSquarePlus as em, MessageSquare as tm, Calendar as nm, Trash2 as rm, PanelLeft as om, Settings as sm, Server as im, EyeOff as am, Eye as cm, Layout as lm, MessageCircle as um, Save as dm } from "lucide-react";
4
4
  import { Slot as ur, createSlot as sr, createSlottable as fm } from "@radix-ui/react-slot";
5
5
  import { cva as Wr } from "class-variance-authority";
@@ -133,18 +133,18 @@ function gm() {
133
133
  }
134
134
  return null;
135
135
  }
136
- var _ = Object.assign, Y = 0, U, oe, O, D, K, W, ee;
137
- function L() {
136
+ var _ = Object.assign, Y = 0, U, oe, O, L, K, W, ee;
137
+ function M() {
138
138
  }
139
- L.__reactDisabledLog = !0;
139
+ M.__reactDisabledLog = !0;
140
140
  function Z() {
141
141
  {
142
142
  if (Y === 0) {
143
- U = console.log, oe = console.info, O = console.warn, D = console.error, K = console.group, W = console.groupCollapsed, ee = console.groupEnd;
143
+ U = console.log, oe = console.info, O = console.warn, L = console.error, K = console.group, W = console.groupCollapsed, ee = console.groupEnd;
144
144
  var T = {
145
145
  configurable: !0,
146
146
  enumerable: !0,
147
- value: L,
147
+ value: M,
148
148
  writable: !0
149
149
  };
150
150
  Object.defineProperties(console, {
@@ -179,7 +179,7 @@ function gm() {
179
179
  value: O
180
180
  }),
181
181
  error: _({}, T, {
182
- value: D
182
+ value: L
183
183
  }),
184
184
  group: _({}, T, {
185
185
  value: K
@@ -264,18 +264,18 @@ function gm() {
264
264
  if (bt && xe && typeof bt.stack == "string") {
265
265
  for (var Ie = bt.stack.split(`
266
266
  `), mt = xe.stack.split(`
267
- `), Xe = Ie.length - 1, tt = mt.length - 1; Xe >= 1 && tt >= 0 && Ie[Xe] !== mt[tt]; )
267
+ `), Je = Ie.length - 1, tt = mt.length - 1; Je >= 1 && tt >= 0 && Ie[Je] !== mt[tt]; )
268
268
  tt--;
269
- for (; Xe >= 1 && tt >= 0; Xe--, tt--)
270
- if (Ie[Xe] !== mt[tt]) {
271
- if (Xe !== 1 || tt !== 1)
269
+ for (; Je >= 1 && tt >= 0; Je--, tt--)
270
+ if (Ie[Je] !== mt[tt]) {
271
+ if (Je !== 1 || tt !== 1)
272
272
  do
273
- if (Xe--, tt--, tt < 0 || Ie[Xe] !== mt[tt]) {
273
+ if (Je--, tt--, tt < 0 || Ie[Je] !== mt[tt]) {
274
274
  var kt = `
275
- ` + Ie[Xe].replace(" at new ", " at ");
275
+ ` + Ie[Je].replace(" at new ", " at ");
276
276
  return T.displayName && kt.includes("<anonymous>") && (kt = kt.replace("<anonymous>", T.displayName)), typeof T == "function" && J.set(T, kt), kt;
277
277
  }
278
- while (Xe >= 1 && tt >= 0);
278
+ while (Je >= 1 && tt >= 0);
279
279
  break;
280
280
  }
281
281
  }
@@ -341,8 +341,8 @@ function gm() {
341
341
  throw mt.name = "Invariant Violation", mt;
342
342
  }
343
343
  Ie = T[Pe](z, Pe, xe, ne, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
344
- } catch (Xe) {
345
- Ie = Xe;
344
+ } catch (Je) {
345
+ Ie = Je;
346
346
  }
347
347
  Ie && !(Ie instanceof Error) && (fe(Le), b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", xe || "React class", ne, Pe, typeof Ie), fe(null)), Ie instanceof Error && !(Ie.message in Ne) && (Ne[Ie.message] = !0, fe(Le), b("Failed %s type: %s", ne, Ie.message), fe(null));
348
348
  }
@@ -455,9 +455,9 @@ function gm() {
455
455
  for (He in z)
456
456
  ie.call(z, He) && !ae.hasOwnProperty(He) && (Pe[He] = z[He]);
457
457
  if (T && T.defaultProps) {
458
- var Xe = T.defaultProps;
459
- for (He in Xe)
460
- Pe[He] === void 0 && (Pe[He] = Xe[He]);
458
+ var Je = T.defaultProps;
459
+ for (He in Je)
460
+ Pe[He] === void 0 && (Pe[He] = Je[He]);
461
461
  }
462
462
  if (Ie || mt) {
463
463
  var tt = typeof T == "function" ? T.displayName || T.name || "Unknown" : T;
@@ -474,8 +474,8 @@ function gm() {
474
474
  } else
475
475
  cn.setExtraStackFrame(null);
476
476
  }
477
- var hn;
478
- hn = !1;
477
+ var fn;
478
+ fn = !1;
479
479
  function te(T) {
480
480
  return typeof T == "object" && T !== null && T.$$typeof === t;
481
481
  }
@@ -556,8 +556,8 @@ Check the top-level render call using <` + ne + ">.");
556
556
  if (ne) {
557
557
  var xe = G(z);
558
558
  Te(ne, T.props, "prop", xe, T);
559
- } else if (z.PropTypes !== void 0 && !hn) {
560
- hn = !0;
559
+ } else if (z.PropTypes !== void 0 && !fn) {
560
+ fn = !0;
561
561
  var Le = G(z);
562
562
  b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", Le || "Unknown");
563
563
  }
@@ -585,8 +585,8 @@ Check the top-level render call using <` + ne + ">.");
585
585
  (T === void 0 || typeof T == "object" && T !== null && Object.keys(T).length === 0) && (Ie += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
586
586
  var mt = Oe();
587
587
  mt ? Ie += mt : Ie += le();
588
- var Xe;
589
- T === null ? Xe = "null" : st(T) ? Xe = "array" : T !== void 0 && T.$$typeof === t ? (Xe = "<" + (G(T.type) || "Unknown") + " />", Ie = " Did you accidentally export a JSX literal instead of a component?") : Xe = typeof T, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Xe, Ie);
588
+ var Je;
589
+ T === null ? Je = "null" : st(T) ? Je = "array" : T !== void 0 && T.$$typeof === t ? (Je = "<" + (G(T.type) || "Unknown") + " />", Ie = " Did you accidentally export a JSX literal instead of a component?") : Je = typeof T, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Je, Ie);
590
590
  }
591
591
  var tt = ct(T, z, ne, Le, He);
592
592
  if (tt == null)
@@ -1879,11 +1879,11 @@ const Vl = (e) => {
1879
1879
  duplex: "half"
1880
1880
  }), ee;
1881
1881
  if (k.isFormData(g) && (ee = W.headers.get("content-type")) && N.setContentType(ee), W.body) {
1882
- const [L, Z] = sc(
1882
+ const [M, Z] = sc(
1883
1883
  Y,
1884
1884
  Mo(ic(C))
1885
1885
  );
1886
- g = cc(W.body, lc, L, Z);
1886
+ g = cc(W.body, lc, M, Z);
1887
1887
  }
1888
1888
  }
1889
1889
  k.isString(I) || (I = I ? "include" : "omit");
@@ -1898,18 +1898,18 @@ const Vl = (e) => {
1898
1898
  };
1899
1899
  G = s && new n(v, oe);
1900
1900
  let O = await (s ? P(G, j) : P(v, oe));
1901
- const D = d && (E === "stream" || E === "response");
1902
- if (d && (S || D && _)) {
1901
+ const L = d && (E === "stream" || E === "response");
1902
+ if (d && (S || L && _)) {
1903
1903
  const W = {};
1904
1904
  ["status", "statusText", "headers"].forEach((pe) => {
1905
1905
  W[pe] = O[pe];
1906
1906
  });
1907
- const ee = k.toFiniteNumber(O.headers.get("content-length")), [L, Z] = S && sc(
1907
+ const ee = k.toFiniteNumber(O.headers.get("content-length")), [M, Z] = S && sc(
1908
1908
  ee,
1909
1909
  Mo(ic(S), !0)
1910
1910
  ) || [];
1911
1911
  O = new r(
1912
- cc(O.body, lc, L, () => {
1912
+ cc(O.body, lc, M, () => {
1913
1913
  Z && Z(), _ && _();
1914
1914
  }),
1915
1915
  W
@@ -1917,7 +1917,7 @@ const Vl = (e) => {
1917
1917
  }
1918
1918
  E = E || "text";
1919
1919
  let K = await h[k.findKey(h, E) || "text"](O, x);
1920
- return !D && _ && _(), await new Promise((W, ee) => {
1920
+ return !L && _ && _(), await new Promise((W, ee) => {
1921
1921
  Ul(W, ee, {
1922
1922
  data: K,
1923
1923
  headers: yt.from(O.headers),
@@ -2519,7 +2519,7 @@ class Xg {
2519
2519
  }
2520
2520
  const Mn = new Xg();
2521
2521
  function Jg(e = {}) {
2522
- const t = e.baseUrl ?? "/api/chat", n = e.streamPath ?? "/runs/stream", [r, o] = ue(e.token ?? null), s = Ke(e.headers ?? {}), [i, a] = ue(!1), [l, u] = ue(null), [d, h] = ue(""), [m, w] = ue(null), [x, v] = ue(0), [p, g] = ue(!1), b = Ke(null), y = Ke(0), R = Ue((N) => {
2522
+ const t = e.baseUrl ?? "/api/chat", n = e.streamPath ?? "/runs/stream", [r, o] = ue(e.token ?? null), s = We(e.headers ?? {}), [i, a] = ue(!1), [l, u] = ue(null), [d, h] = ue(""), [m, w] = ue(null), [x, v] = ue(0), [p, g] = ue(!1), b = We(null), y = We(0), R = Ue((N) => {
2523
2523
  o(N);
2524
2524
  }, []), S = Ue(() => {
2525
2525
  var N;
@@ -2531,7 +2531,7 @@ function Jg(e = {}) {
2531
2531
  b.current && (b.current.abort(), b.current = null), a(!0), u(null), e.autoAppendAssistant !== !1 && h("");
2532
2532
  const P = new AbortController();
2533
2533
  return b.current = P, (async () => {
2534
- var _, Y, U, oe, O, D;
2534
+ var _, Y, U, oe, O, L;
2535
2535
  const B = (() => {
2536
2536
  var K;
2537
2537
  try {
@@ -2543,9 +2543,9 @@ function Jg(e = {}) {
2543
2543
  var W;
2544
2544
  try {
2545
2545
  const ee = JSON.parse(JSON.stringify(K));
2546
- return (W = ee == null ? void 0 : ee.payload) != null && W.files_info && Array.isArray(ee.payload.files_info) && (ee.payload.files_info = ee.payload.files_info.map((L) => ({
2547
- ...L,
2548
- data: L != null && L.data ? `<base64 ${String(L.data).length} chars>` : L == null ? void 0 : L.data
2546
+ return (W = ee == null ? void 0 : ee.payload) != null && W.files_info && Array.isArray(ee.payload.files_info) && (ee.payload.files_info = ee.payload.files_info.map((M) => ({
2547
+ ...M,
2548
+ data: M != null && M.data ? `<base64 ${String(M.data).length} chars>` : M == null ? void 0 : M.data
2549
2549
  }))), ee;
2550
2550
  } catch {
2551
2551
  return K;
@@ -2586,15 +2586,15 @@ function Jg(e = {}) {
2586
2586
  throw B && console.debug("[use-chat] non-OK response", W.status, pe == null ? void 0 : pe.slice(0, 500)), new Error(`stream ${W.status}${pe ? ": " + pe : ""}`);
2587
2587
  }
2588
2588
  g(!0);
2589
- let ee = null, L = null, Z = null;
2589
+ let ee = null, M = null, Z = null;
2590
2590
  try {
2591
2591
  const pe = W.headers.get("X-Thread-Id") || W.headers.get("x-thread-id"), he = W.headers.get("X-Thread-Created") || W.headers.get("x-thread-created"), F = pe ?? null, A = String(he ?? "").toLowerCase() === "true";
2592
- (oe = j == null ? void 0 : j.onOpen) == null || oe.call(j, { threadId: F, created: A }), ee = W.body.getReader(), L = new TextDecoder();
2592
+ (oe = j == null ? void 0 : j.onOpen) == null || oe.call(j, { threadId: F, created: A }), ee = W.body.getReader(), M = new TextDecoder();
2593
2593
  let H = "", J = "", ce = y.current;
2594
2594
  for (; ; ) {
2595
2595
  const { value: se, done: Ae } = await ee.read();
2596
2596
  if (Ae) break;
2597
- H += L.decode(se, { stream: !0 });
2597
+ H += M.decode(se, { stream: !0 });
2598
2598
  let _e;
2599
2599
  for (; (_e = H.indexOf(`
2600
2600
 
@@ -2645,7 +2645,7 @@ function Jg(e = {}) {
2645
2645
  } catch (K) {
2646
2646
  if ((K == null ? void 0 : K.name) === "AbortError") return;
2647
2647
  const W = (K == null ? void 0 : K.message) || String(K);
2648
- B && console.debug("[use-chat] connection error:", W), u(W), (D = j == null ? void 0 : j.onError) == null || D.call(j, W);
2648
+ B && console.debug("[use-chat] connection error:", W), u(W), (L = j == null ? void 0 : j.onError) == null || L.call(j, W);
2649
2649
  } finally {
2650
2650
  a(!1), g(!1), b.current = null;
2651
2651
  }
@@ -2653,7 +2653,7 @@ function Jg(e = {}) {
2653
2653
  },
2654
2654
  [t, r, e.autoAppendAssistant]
2655
2655
  );
2656
- return Ze(() => () => {
2656
+ return Xe(() => () => {
2657
2657
  var N;
2658
2658
  return (N = b.current) == null ? void 0 : N.abort();
2659
2659
  }, []), {
@@ -2742,7 +2742,7 @@ function tv(e, t) {
2742
2742
  }
2743
2743
  }
2744
2744
  function nv(e = []) {
2745
- const [t, n] = $p(tv, { ...ev, messages: e }), r = Ke([]), o = Ke(null), s = Ke(null), i = Ue(() => {
2745
+ const [t, n] = $p(tv, { ...ev, messages: e }), r = We([]), o = We(null), s = We(null), i = Ue(() => {
2746
2746
  o.current !== null && typeof window < "u" && window.cancelAnimationFrame(o.current), s.current !== null && clearTimeout(s.current), o.current = null, s.current = null;
2747
2747
  const d = r.current;
2748
2748
  d.length && (r.current = [], n({ type: "batch", payload: { events: d } }));
@@ -2751,10 +2751,10 @@ function nv(e = []) {
2751
2751
  }, [i]), l = Ue((d) => {
2752
2752
  r.current.push(d), a();
2753
2753
  }, [a]);
2754
- Ze(() => () => {
2754
+ Xe(() => () => {
2755
2755
  o.current !== null && typeof window < "u" && window.cancelAnimationFrame(o.current), s.current !== null && clearTimeout(s.current), r.current = [];
2756
2756
  }, []);
2757
- const u = ln(() => ({
2757
+ const u = mn(() => ({
2758
2758
  reset: (d) => n({ type: "reset", payload: { messages: d } }),
2759
2759
  seed: (d, h) => n({ type: "seed", payload: { messages: d, ...h ?? {} } }),
2760
2760
  prepend: (d) => n({ type: "prepend", payload: { messages: d } }),
@@ -2935,7 +2935,7 @@ async function uv(e, t = [], n, r, o, s) {
2935
2935
  const Jl = Sl(null);
2936
2936
  function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialThreadId: o = null, autoLoadInitial: s = !0, enableFileAgentRouting: i = !1, fileAgentId: a = "invoice_reader" }) {
2937
2937
  const l = Mn;
2938
- Ze(() => {
2938
+ Xe(() => {
2939
2939
  t && l.updateConfig({
2940
2940
  baseUrl: t.baseUrl,
2941
2941
  authToken: t.apiKey
@@ -2950,7 +2950,7 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
2950
2950
  // Ensure the path matches the chat endpoint
2951
2951
  streamPath: "/chat/runs/stream"
2952
2952
  }), [x, v] = ue(() => typeof l.getAuthToken == "function" ? l.getAuthToken() : null);
2953
- Ze(() => {
2953
+ Xe(() => {
2954
2954
  w(typeof l.getAuthToken == "function" ? l.getAuthToken() : null);
2955
2955
  const V = l.onTokenChange((ae) => {
2956
2956
  v(ae), w(ae);
@@ -2961,9 +2961,9 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
2961
2961
  }, [l, w]);
2962
2962
  const p = Ue((V) => {
2963
2963
  l.setAuthToken(V);
2964
- }, [l]), { state: g, seed: b, prepend: y, pushUser: R, onEvent: S, reset: C } = nv(), E = 20, [N, I] = ue(!1), [j, P] = ue(!1), [B, G] = ue(null), [_, Y] = ue(void 0), [U, oe] = ue(void 0), [O, D] = ue(!1), K = Ke(!1), W = Ke([]), ee = Ue((V) => {
2964
+ }, [l]), { state: g, seed: b, prepend: y, pushUser: R, onEvent: S, reset: C } = nv(), E = 20, [N, I] = ue(!1), [j, P] = ue(!1), [B, G] = ue(null), [_, Y] = ue(void 0), [U, oe] = ue(void 0), [O, L] = ue(!1), K = We(!1), W = We([]), ee = Ue((V) => {
2965
2965
  V.cursor !== void 0 && G(V.cursor), V.hasMore !== void 0 && I(V.hasMore), V.checkpointId !== void 0 && Y(V.checkpointId), V.checkpointNs !== void 0 && oe(V.checkpointNs);
2966
- }, []), L = Ue((V, ae) => new Promise(($e, rt) => {
2966
+ }, []), M = Ue((V, ae) => new Promise(($e, rt) => {
2967
2967
  const we = async () => {
2968
2968
  if (K.current) {
2969
2969
  console.warn(`[ChatProvider] Operation "${ae}" queued - another operation in progress`), W.current.push(we);
@@ -3038,7 +3038,7 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3038
3038
  },
3039
3039
  [l.baseUrl]
3040
3040
  );
3041
- Ze(() => {
3041
+ Xe(() => {
3042
3042
  let V = !0;
3043
3043
  if (!l.baseUrl) {
3044
3044
  console.debug("[ChatProvider] skipping initial refreshThreads: api.baseUrl not configured");
@@ -3055,11 +3055,11 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3055
3055
  })(), () => {
3056
3056
  V = !1;
3057
3057
  };
3058
- }, [H, l.baseUrl, se]), Ze(() => {
3058
+ }, [H, l.baseUrl, se]), Xe(() => {
3059
3059
  r == null || r(F);
3060
3060
  }, [F, r]);
3061
- const Ae = Ke(null);
3062
- Ze(() => {
3061
+ const Ae = We(null);
3062
+ Xe(() => {
3063
3063
  if (o && s) {
3064
3064
  if (!l.baseUrl) {
3065
3065
  console.debug("[ChatProvider] skipping initial load: api.baseUrl not configured");
@@ -3073,9 +3073,9 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3073
3073
  }));
3074
3074
  }
3075
3075
  }, [o, s, l.baseUrl, J]);
3076
- const _e = Ke(null), je = Ke(null), ie = Ue(
3076
+ const _e = We(null), je = We(null), ie = Ue(
3077
3077
  async (V, ae, $e) => {
3078
- await L(async () => {
3078
+ await M(async () => {
3079
3079
  if (!l.baseUrl) {
3080
3080
  console.debug("[ChatProvider] skipping loadThread: api.baseUrl not configured");
3081
3081
  return;
@@ -3084,22 +3084,20 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3084
3084
  console.warn(`[ChatProvider] Thread load cancelled - another thread (${_e.current}) is loading`);
3085
3085
  return;
3086
3086
  }
3087
- je.current !== null && je.current !== V && console.log(`[ChatProvider] Thread switch detected: ${je.current} -> ${V}`), _e.current = V, je.current = V;
3087
+ je.current !== null && je.current !== V && (console.log(`[ChatProvider] Thread switch detected: ${je.current} -> ${V}`), b([], { checkpointId: null, checkpointNs: null })), _e.current = V, je.current = V;
3088
3088
  try {
3089
3089
  ee({
3090
3090
  cursor: null,
3091
3091
  hasMore: !1,
3092
3092
  checkpointId: void 0,
3093
3093
  checkpointNs: void 0
3094
- });
3094
+ }), A(V);
3095
3095
  const we = await l.getMessages({
3096
3096
  threadId: V,
3097
3097
  checkpointId: ae,
3098
3098
  checkpointNs: $e,
3099
3099
  limit: E
3100
- });
3101
- A(V);
3102
- const qe = Array.isArray(we == null ? void 0 : we.messages) ? we.messages : [];
3100
+ }), qe = Array.isArray(we == null ? void 0 : we.messages) ? we.messages : [];
3103
3101
  console.log("[ChatProvider] Loading thread with", qe.length, "messages"), b(qe, {
3104
3102
  checkpointId: (we == null ? void 0 : we.checkpointId) ?? null,
3105
3103
  checkpointNs: (we == null ? void 0 : we.checkpointNs) ?? null
@@ -3109,12 +3107,12 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3109
3107
  }
3110
3108
  }, `loadThread-${V}`);
3111
3109
  },
3112
- [l, L, ee, b]
3110
+ [l, M, ee, b]
3113
3111
  ), Ne = Ue(async (V) => {
3114
3112
  const ae = await l.listCheckpoints(V);
3115
3113
  return cv(ae, V);
3116
3114
  }, [l]), Ce = Ue(async (V, ae) => {
3117
- await L(async () => {
3115
+ await M(async () => {
3118
3116
  if (!F) throw new Error("No active thread");
3119
3117
  ee({
3120
3118
  cursor: null,
@@ -3130,20 +3128,20 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3130
3128
  });
3131
3129
  Z($e, "replace");
3132
3130
  }, `navigateToCheckpoint-${V}`);
3133
- }, [l, F, Z, L, ee]), fe = Ue(async () => {
3131
+ }, [l, F, Z, M, ee]), fe = Ue(async () => {
3134
3132
  if (!F) throw new Error("No active thread");
3135
3133
  await ie(F);
3136
- }, [F, ie]), Te = Ke(!1);
3137
- Ze(() => {
3134
+ }, [F, ie]), Te = We(!1);
3135
+ Xe(() => {
3138
3136
  const V = Te.current;
3139
- Te.current = u, V && !u && F && L(async () => {
3137
+ Te.current = u, V && !u && F && M(async () => {
3140
3138
  try {
3141
3139
  await H();
3142
3140
  } catch (ae) {
3143
3141
  console.warn("[ChatProvider] Post-streaming thread refresh failed:", ae);
3144
3142
  }
3145
3143
  }, "postStreamingRefresh");
3146
- }, [u, F, l, Z, H, L]);
3144
+ }, [u, F, l, Z, H, M]);
3147
3145
  const Be = Ue(async (V) => {
3148
3146
  const ae = await l.createThread(V);
3149
3147
  return await H(), await ie(ae.threadId), ae.threadId;
@@ -3152,56 +3150,58 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3152
3150
  }, [l, H, F, C]), et = Ue(async (V, ae) => {
3153
3151
  await l.updateThread(V, ae), await H();
3154
3152
  }, [l, H]), xt = Ue(async (V, ae) => {
3155
- var hn;
3156
- const $e = (ae == null ? void 0 : ae.attachments) || [], { contentParts: rt, filesInfo: we } = await uv(
3157
- l,
3158
- $e,
3159
- t == null ? void 0 : t.uploadPath
3160
- ), qe = [];
3161
- V && V.trim() && qe.push({ type: "text", text: V.trim() });
3162
- const jt = {
3163
- id: ((hn = crypto.randomUUID) == null ? void 0 : hn.call(crypto)) || `user-${Date.now()}`,
3164
- role: "user",
3165
- content: qe,
3166
- // ← No empty text parts
3167
- createdAt: (/* @__PURE__ */ new Date()).toISOString(),
3168
- checkpointId: (ae == null ? void 0 : ae.checkpointId) ?? g.lastCheckpointId ?? void 0,
3169
- checkpointNs: (ae == null ? void 0 : ae.checkpointNs) ?? g.lastCheckpointNs ?? void 0
3170
- };
3171
- R(jt);
3172
- const En = {
3173
- ...jt,
3174
- // No need to filter - messageContent already only contains text
3175
- content: qe
3176
- // ← Clean content without empty parts
3177
- }, ut = { ...(ae == null ? void 0 : ae.payloadExtras) ?? {} }, Tt = !!ut.edit, ct = ut.originalMessageId, pt = typeof ct == "string" ? ct : void 0, cn = $e && $e.length > 0, Yt = {
3178
- ...F ? { threadId: F } : {},
3179
- payload: {
3180
- messages: [En],
3181
- // Remove attachments array since we're not including file parts in message content
3182
- files_info: we,
3183
- ...i && cn && a ? { active_agent: a } : {},
3184
- ...ut
3185
- },
3186
- checkpointId: (ae == null ? void 0 : ae.checkpointId) ?? g.lastCheckpointId ?? void 0,
3187
- checkpointNs: (ae == null ? void 0 : ae.checkpointNs) ?? g.lastCheckpointNs ?? void 0,
3188
- nodeFilter: ae == null ? void 0 : ae.nodeFilter,
3189
- config: ae == null ? void 0 : ae.config,
3190
- edit: Tt,
3191
- originalMessageId: pt
3192
- };
3193
- h(
3194
- Yt,
3195
- (te) => S(te),
3196
- {
3197
- onError: (te) => console.warn("stream error", te),
3198
- onOpen: ({ threadId: te, created: le }) => {
3199
- !F && te && (A(te), le && H().catch(() => {
3200
- }));
3153
+ await M(async () => {
3154
+ var fn;
3155
+ const $e = (ae == null ? void 0 : ae.attachments) || [], { contentParts: rt, filesInfo: we } = await uv(
3156
+ l,
3157
+ $e,
3158
+ t == null ? void 0 : t.uploadPath
3159
+ ), qe = [];
3160
+ V && V.trim() && qe.push({ type: "text", text: V.trim() });
3161
+ const jt = {
3162
+ id: ((fn = crypto.randomUUID) == null ? void 0 : fn.call(crypto)) || `user-${Date.now()}`,
3163
+ role: "user",
3164
+ content: qe,
3165
+ // No empty text parts
3166
+ createdAt: (/* @__PURE__ */ new Date()).toISOString(),
3167
+ checkpointId: (ae == null ? void 0 : ae.checkpointId) ?? g.lastCheckpointId ?? void 0,
3168
+ checkpointNs: (ae == null ? void 0 : ae.checkpointNs) ?? g.lastCheckpointNs ?? void 0
3169
+ };
3170
+ R(jt);
3171
+ const En = {
3172
+ ...jt,
3173
+ // No need to filter - messageContent already only contains text
3174
+ content: qe
3175
+ // Clean content without empty parts
3176
+ }, ut = { ...(ae == null ? void 0 : ae.payloadExtras) ?? {} }, Tt = !!ut.edit, ct = ut.originalMessageId, pt = typeof ct == "string" ? ct : void 0, cn = $e && $e.length > 0, Yt = {
3177
+ ...F ? { threadId: F } : {},
3178
+ payload: {
3179
+ messages: [En],
3180
+ // Remove attachments array since we're not including file parts in message content
3181
+ files_info: we,
3182
+ ...i && cn && a ? { active_agent: a } : {},
3183
+ ...ut
3184
+ },
3185
+ checkpointId: (ae == null ? void 0 : ae.checkpointId) ?? g.lastCheckpointId ?? void 0,
3186
+ checkpointNs: (ae == null ? void 0 : ae.checkpointNs) ?? g.lastCheckpointNs ?? void 0,
3187
+ nodeFilter: ae == null ? void 0 : ae.nodeFilter,
3188
+ config: ae == null ? void 0 : ae.config,
3189
+ edit: Tt,
3190
+ originalMessageId: pt
3191
+ };
3192
+ h(
3193
+ Yt,
3194
+ (te) => S(te),
3195
+ {
3196
+ onError: (te) => console.warn("stream error", te),
3197
+ onOpen: ({ threadId: te, created: le }) => {
3198
+ !F && te && (A(te), le && H().catch(() => {
3199
+ }));
3200
+ }
3201
3201
  }
3202
- }
3203
- );
3204
- }, [F, R, h, S, g.lastCheckpointId, g.lastCheckpointNs, l, t == null ? void 0 : t.uploadPath, H, A, i, a]), at = Ue(
3202
+ );
3203
+ }, "send");
3204
+ }, [F, R, h, S, g.lastCheckpointId, g.lastCheckpointNs, l, t == null ? void 0 : t.uploadPath, H, A, i, a, M]), at = Ue(
3205
3205
  async (V) => {
3206
3206
  if (!F) throw new Error("No active thread");
3207
3207
  if (j || !N) return;
@@ -3261,7 +3261,7 @@ function Yi() {
3261
3261
  if (!e) throw new Error("useChat must be used within ChatProvider");
3262
3262
  return e;
3263
3263
  }
3264
- function M(...e) {
3264
+ function D(...e) {
3265
3265
  return pm(hm(e));
3266
3266
  }
3267
3267
  const dv = Wr(
@@ -3294,7 +3294,7 @@ const dv = Wr(
3294
3294
  return /* @__PURE__ */ c.jsx(
3295
3295
  i,
3296
3296
  {
3297
- className: M(dv({ variant: t, size: n, className: e })),
3297
+ className: D(dv({ variant: t, size: n, className: e })),
3298
3298
  ref: s,
3299
3299
  ...o
3300
3300
  }
@@ -3306,7 +3306,7 @@ const Zl = f.forwardRef(
3306
3306
  ({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
3307
3307
  "textarea",
3308
3308
  {
3309
- className: M(
3309
+ className: D(
3310
3310
  "flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
3311
3311
  e
3312
3312
  ),
@@ -3441,7 +3441,7 @@ function ss(e, t) {
3441
3441
  function vv(e, t) {
3442
3442
  return t(e);
3443
3443
  }
3444
- function Ve(...e) {
3444
+ function Ge(...e) {
3445
3445
  return e;
3446
3446
  }
3447
3447
  function Fe(e, t) {
@@ -3453,7 +3453,7 @@ function Se(e, t) {
3453
3453
  function Xi(e) {
3454
3454
  e(hr);
3455
3455
  }
3456
- function Je(e) {
3456
+ function Ze(e) {
3457
3457
  return e(Ql);
3458
3458
  }
3459
3459
  function de(e, t) {
@@ -3476,7 +3476,7 @@ function Sc(e) {
3476
3476
  function tu(e, t) {
3477
3477
  return e === t;
3478
3478
  }
3479
- function We(e = tu) {
3479
+ function Ve(e = tu) {
3480
3480
  let t;
3481
3481
  return (n) => (r) => {
3482
3482
  e(t, r) || (t = r, n(r));
@@ -3517,7 +3517,7 @@ function Dn(e) {
3517
3517
  e > 0 ? e-- : t(n);
3518
3518
  };
3519
3519
  }
3520
- function un(e) {
3520
+ function ln(e) {
3521
3521
  let t = null, n;
3522
3522
  return (r) => (o) => {
3523
3523
  t = o, !n && (n = setTimeout(() => {
@@ -3641,7 +3641,7 @@ function nt(...e) {
3641
3641
  };
3642
3642
  }
3643
3643
  function me(e, t = tu) {
3644
- return $(e, We(t));
3644
+ return $(e, Ve(t));
3645
3645
  }
3646
3646
  function xi(...e) {
3647
3647
  return function(t, n) {
@@ -3668,7 +3668,7 @@ const Sv = {
3668
3668
  return {
3669
3669
  log: X((t, n, r = 1) => {
3670
3670
  var o;
3671
- const s = (o = Cv().VIRTUOSO_LOG_LEVEL) != null ? o : Je(e);
3671
+ const s = (o = Cv().VIRTUOSO_LOG_LEVEL) != null ? o : Ze(e);
3672
3672
  r >= s && console[Sv[r]](
3673
3673
  "%creact-virtuoso: %c%s %o",
3674
3674
  "color: #0253b3; font-weight: bold",
@@ -4138,12 +4138,12 @@ const Lv = {
4138
4138
  }, rn = Me(
4139
4139
  ([{ log: e }, { recalcInProgress: t }]) => {
4140
4140
  const n = ke(), r = ke(), o = ht(r, 0), s = ke(), i = ke(), a = X(0), l = X([]), u = X(void 0), d = X(void 0), h = X((S, C) => vn(S, Lv[C])), m = X(void 0), w = X(0), x = Iv(), v = ht(
4141
- $(n, Re(l, e, w), Qt(_v, x), We()),
4141
+ $(n, Re(l, e, w), Qt(_v, x), Ve()),
4142
4142
  x
4143
4143
  ), p = ht(
4144
4144
  $(
4145
4145
  l,
4146
- We(),
4146
+ Ve(),
4147
4147
  Qt((S, C) => ({ current: C, prev: S.current }), {
4148
4148
  current: [],
4149
4149
  prev: []
@@ -4192,7 +4192,7 @@ const Lv = {
4192
4192
  de(
4193
4193
  $(
4194
4194
  d,
4195
- ge((S) => S !== void 0 && ze(Je(v).sizeTree)),
4195
+ ge((S) => S !== void 0 && ze(Ze(v).sizeTree)),
4196
4196
  re((S) => [{ endIndex: 0, size: S, startIndex: 0 }])
4197
4197
  ),
4198
4198
  n
@@ -4221,11 +4221,11 @@ const Lv = {
4221
4221
  re((S) => S.diff)
4222
4222
  ),
4223
4223
  (S) => {
4224
- const { groupIndices: C } = Je(v);
4224
+ const { groupIndices: C } = Ze(v);
4225
4225
  if (S > 0)
4226
4226
  Se(t, !0), Se(s, S + Rc(S, C));
4227
4227
  else if (S < 0) {
4228
- const E = Je(p);
4228
+ const E = Ze(p);
4229
4229
  E.length > 0 && (S -= Rc(-S, E)), Se(i, S);
4230
4230
  }
4231
4231
  }
@@ -4317,7 +4317,7 @@ const Lv = {
4317
4317
  if (ze(C.sizeTree))
4318
4318
  return C;
4319
4319
  let N = tr();
4320
- const I = Je(p);
4320
+ const I = Ze(p);
4321
4321
  let j = 0, P = 0, B = 0;
4322
4322
  for (; j < -S; ) {
4323
4323
  B = I[P];
@@ -4368,7 +4368,7 @@ const Lv = {
4368
4368
  unshiftWith: s
4369
4369
  };
4370
4370
  },
4371
- Ve(Sn, Zi),
4371
+ Ge(Sn, Zi),
4372
4372
  { singleton: !0 }
4373
4373
  );
4374
4374
  function Fv(e) {
@@ -4400,27 +4400,27 @@ const fu = Me(
4400
4400
  nt(o, t, r),
4401
4401
  ge(([l, u]) => as(u)),
4402
4402
  re(([l, u, d]) => zt(u.groupOffsetTree, Math.max(l - d, 0), "v")[0]),
4403
- We(),
4403
+ Ve(),
4404
4404
  re((l) => [l])
4405
4405
  ),
4406
4406
  i
4407
4407
  ), { groupCounts: s, topItemsIndexes: i };
4408
4408
  },
4409
- Ve(rn, gt)
4409
+ Ge(rn, gt)
4410
4410
  ), Cn = Me(
4411
4411
  ([{ log: e }]) => {
4412
4412
  const t = X(!1), n = Nt(
4413
4413
  $(
4414
4414
  t,
4415
4415
  ge((r) => r),
4416
- We()
4416
+ Ve()
4417
4417
  )
4418
4418
  );
4419
4419
  return Fe(t, (r) => {
4420
- r && Je(e)("props updated", {}, St.DEBUG);
4420
+ r && Ze(e)("props updated", {}, St.DEBUG);
4421
4421
  }), { didMount: n, propsReady: t };
4422
4422
  },
4423
- Ve(Sn),
4423
+ Ge(Sn),
4424
4424
  { singleton: !0 }
4425
4425
  ), Bv = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
4426
4426
  function hu(e) {
@@ -4459,18 +4459,18 @@ const qr = Me(
4459
4459
  G,
4460
4460
  _
4461
4461
  ]) => {
4462
- const Y = hu(R), { align: U, behavior: oe, offset: O } = Y, D = E - 1, K = du(Y, S, D);
4462
+ const Y = hu(R), { align: U, behavior: oe, offset: O } = Y, L = E - 1, K = du(Y, S, L);
4463
4463
  let W = Dr(K, S.offsetTree, B) + I;
4464
- U === "end" ? (W += G + zt(S.sizeTree, K)[1] - C + _, K === D && (W += j)) : U === "center" ? W += (G + zt(S.sizeTree, K)[1] - C + _) / 2 : W -= N, O && (W += O);
4465
- const ee = (L) => {
4466
- y(), L ? (P("retrying to scroll to", { location: R }, St.DEBUG), Se(w, R)) : (Se(x, !0), P("list did not change, scroll successful", {}, St.DEBUG));
4464
+ U === "end" ? (W += G + zt(S.sizeTree, K)[1] - C + _, K === L && (W += j)) : U === "center" ? W += (G + zt(S.sizeTree, K)[1] - C + _) / 2 : W -= N, O && (W += O);
4465
+ const ee = (M) => {
4466
+ y(), M ? (P("retrying to scroll to", { location: R }, St.DEBUG), Se(w, R)) : (Se(x, !0), P("list did not change, scroll successful", {}, St.DEBUG));
4467
4467
  };
4468
4468
  if (y(), oe === "smooth") {
4469
- let L = !1;
4469
+ let M = !1;
4470
4470
  b = Fe(t, (Z) => {
4471
- L = L || Z;
4471
+ M = M || Z;
4472
4472
  }), p = $t(d, () => {
4473
- ee(L);
4473
+ ee(M);
4474
4474
  });
4475
4475
  } else
4476
4476
  p = $t($(t, $v(150)), ee);
@@ -4487,7 +4487,7 @@ const qr = Me(
4487
4487
  topListHeight: v
4488
4488
  };
4489
4489
  },
4490
- Ve(rn, gt, Sn),
4490
+ Ge(rn, gt, Sn),
4491
4491
  { singleton: !0 }
4492
4492
  );
4493
4493
  function $v(e) {
@@ -4550,7 +4550,7 @@ const Xr = Me(
4550
4550
  scrolledToInitialItem: a
4551
4551
  };
4552
4552
  },
4553
- Ve(rn, gt, qr, Cn),
4553
+ Ge(rn, gt, qr, Cn),
4554
4554
  { singleton: !0 }
4555
4555
  );
4556
4556
  function pu(e, t) {
@@ -4569,21 +4569,21 @@ const Lr = "up", Nr = "down", Hv = "none", zv = {
4569
4569
  const i = X(!1), a = X(!0), l = ke(), u = ke(), d = X(4), h = X(Uv), m = ht(
4570
4570
  $(
4571
4571
  xi($(me(o), Dn(1), Jt(!0)), $(me(o), Dn(1), Jt(!1), Sc(100))),
4572
- We()
4572
+ Ve()
4573
4573
  ),
4574
4574
  !1
4575
4575
  ), w = ht(
4576
- $(xi($(n, Jt(!0)), $(n, Jt(!1), Sc(200))), We()),
4576
+ $(xi($(n, Jt(!0)), $(n, Jt(!1), Sc(200))), Ve()),
4577
4577
  !1
4578
4578
  );
4579
4579
  de(
4580
4580
  $(
4581
4581
  nt(me(o), me(h)),
4582
4582
  re(([b, y]) => b <= y),
4583
- We()
4583
+ Ve()
4584
4584
  ),
4585
4585
  a
4586
- ), de($(a, un(50)), u);
4586
+ ), de($(a, ln(50)), u);
4587
4587
  const x = Nt(
4588
4588
  $(
4589
4589
  nt(r, me(s), me(t), me(e), me(d)),
@@ -4609,7 +4609,7 @@ const Lr = "up", Nr = "down", Hv = "none", zv = {
4609
4609
  state: j
4610
4610
  };
4611
4611
  }, zv),
4612
- We((b, y) => b && b.atBottom === y.atBottom)
4612
+ Ve((b, y) => b && b.atBottom === y.atBottom)
4613
4613
  )
4614
4614
  ), v = ht(
4615
4615
  $(
@@ -4651,21 +4651,21 @@ const Lr = "up", Nr = "down", Hv = "none", zv = {
4651
4651
  re((b) => b.atBottom)
4652
4652
  ),
4653
4653
  i
4654
- ), de($(i, un(50)), l);
4654
+ ), de($(i, ln(50)), l);
4655
4655
  const p = X(Nr);
4656
4656
  de(
4657
4657
  $(
4658
4658
  r,
4659
4659
  re(({ scrollTop: b }) => b),
4660
- We(),
4660
+ Ve(),
4661
4661
  Qt(
4662
- (b, y) => Je(w) ? { direction: b.direction, prevScrollTop: y } : { direction: y < b.prevScrollTop ? Lr : Nr, prevScrollTop: y },
4662
+ (b, y) => Ze(w) ? { direction: b.direction, prevScrollTop: y } : { direction: y < b.prevScrollTop ? Lr : Nr, prevScrollTop: y },
4663
4663
  { direction: Nr, prevScrollTop: 0 }
4664
4664
  ),
4665
4665
  re((b) => b.direction)
4666
4666
  ),
4667
4667
  p
4668
- ), de($(r, un(50), Jt(Hv)), p);
4668
+ ), de($(r, ln(50), Jt(Hv)), p);
4669
4669
  const g = X(0);
4670
4670
  return de(
4671
4671
  $(
@@ -4677,7 +4677,7 @@ const Lr = "up", Nr = "down", Hv = "none", zv = {
4677
4677
  ), de(
4678
4678
  $(
4679
4679
  o,
4680
- un(100),
4680
+ ln(100),
4681
4681
  Re(m),
4682
4682
  ge(([b, y]) => !!y),
4683
4683
  Qt(([b, y], [R]) => [y, R], [0, 0]),
@@ -4697,7 +4697,7 @@ const Lr = "up", Nr = "down", Hv = "none", zv = {
4697
4697
  scrollDirection: p,
4698
4698
  scrollVelocity: g
4699
4699
  };
4700
- }, Ve(gt)), Fo = "top", Bo = "bottom", Ec = "none";
4700
+ }, Ge(gt)), Fo = "top", Bo = "bottom", Ec = "none";
4701
4701
  function Nc(e, t, n) {
4702
4702
  return typeof e == "number" ? n === Lr && t === Fo || n === Nr && t === Bo ? e : 0 : n === Lr ? t === Fo ? e.main : e.reverse : t === Bo ? e.main : e.reverse;
4703
4703
  }
@@ -4742,7 +4742,7 @@ const na = Me(
4742
4742
  }
4743
4743
  ),
4744
4744
  ge((d) => d != null),
4745
- We(Mr)
4745
+ Ve(Mr)
4746
4746
  ),
4747
4747
  [0, 0]
4748
4748
  );
@@ -4756,7 +4756,7 @@ const na = Me(
4756
4756
  visibleRange: u
4757
4757
  };
4758
4758
  },
4759
- Ve(gt),
4759
+ Ge(gt),
4760
4760
  { singleton: !0 }
4761
4761
  );
4762
4762
  function Wv(e, t, n) {
@@ -4889,13 +4889,13 @@ const zn = Me(
4889
4889
  _,
4890
4890
  Y
4891
4891
  ]) => {
4892
- const U = I, { offsetTree: oe, sizeTree: O } = U, D = Je(p);
4892
+ const U = I, { offsetTree: oe, sizeTree: O } = U, L = Ze(p);
4893
4893
  if (N === 0)
4894
4894
  return { ...zs, totalCount: N };
4895
4895
  if (C === 0 && E === 0)
4896
- return D === 0 ? { ...zs, totalCount: N } : mu(D, j, I, G, _, Y || []);
4896
+ return L === 0 ? { ...zs, totalCount: N } : mu(L, j, I, G, _, Y || []);
4897
4897
  if (ze(O))
4898
- return D > 0 ? null : So(
4898
+ return L > 0 ? null : So(
4899
4899
  Wv(ta(j, N), U, Y),
4900
4900
  [],
4901
4901
  N,
@@ -4918,7 +4918,7 @@ const zn = Me(
4918
4918
  const W = B.length > 0 ? B[B.length - 1] + 1 : 0, ee = Pv(oe, C, E, W);
4919
4919
  if (ee.length === 0)
4920
4920
  return null;
4921
- const L = N - 1, Z = ss([], (pe) => {
4921
+ const M = N - 1, Z = ss([], (pe) => {
4922
4922
  for (const he of ee) {
4923
4923
  const F = he.value;
4924
4924
  let A = F.offset, H = he.start;
@@ -4929,7 +4929,7 @@ const zn = Me(
4929
4929
  A += se * J + se * _;
4930
4930
  }
4931
4931
  H < W && (A += (W - H) * J, H = W);
4932
- const ce = Math.min(he.end, L);
4932
+ const ce = Math.min(he.end, M);
4933
4933
  for (let se = H; se <= ce && !(A >= E); se++)
4934
4934
  pe.push({ data: Y == null ? void 0 : Y[se], index: se, offset: A, size: J }), A += J + _;
4935
4935
  }
@@ -4939,7 +4939,7 @@ const zn = Me(
4939
4939
  ),
4940
4940
  //@ts-expect-error filter needs to be fixed
4941
4941
  ge((C) => C !== null),
4942
- We()
4942
+ Ve()
4943
4943
  ),
4944
4944
  zs
4945
4945
  );
@@ -4976,16 +4976,16 @@ const zn = Me(
4976
4976
  Re(o, e),
4977
4977
  ge(([{ items: C }, E]) => C[C.length - 1].originalIndex === E - 1),
4978
4978
  re(([, C, E]) => [C - 1, E]),
4979
- We(Mr),
4979
+ Ve(Mr),
4980
4980
  re(([C]) => C)
4981
4981
  )
4982
4982
  ), R = Nt(
4983
4983
  $(
4984
4984
  b,
4985
- un(200),
4985
+ ln(200),
4986
4986
  ge(({ items: C, topItems: E }) => C.length > 0 && C[0].originalIndex === E.length),
4987
4987
  re(({ items: C }) => C[0].index),
4988
- We()
4988
+ Ve()
4989
4989
  )
4990
4990
  ), S = Nt(
4991
4991
  $(
@@ -5002,12 +5002,12 @@ const zn = Me(
5002
5002
  startIndex: C[E].index
5003
5003
  };
5004
5004
  }),
5005
- We(cu)
5005
+ Ve(cu)
5006
5006
  )
5007
5007
  );
5008
5008
  return { endReached: y, initialItemCount: p, itemsRendered: g, listState: b, rangeChanged: S, startReached: R, topItemsIndexes: v, ...m };
5009
5009
  },
5010
- Ve(
5010
+ Ge(
5011
5011
  rn,
5012
5012
  fu,
5013
5013
  na,
@@ -5029,7 +5029,7 @@ const zn = Me(
5029
5029
  );
5030
5030
  return de(me(i), s), { totalListHeight: i, totalListHeightChanged: s };
5031
5031
  },
5032
- Ve(gt, zn),
5032
+ Ge(gt, zn),
5033
5033
  { singleton: !0 }
5034
5034
  ), Vv = Me(
5035
5035
  ([{ viewportHeight: e }, { totalListHeight: t }]) => {
@@ -5038,14 +5038,14 @@ const zn = Me(
5038
5038
  nt(n, e, t),
5039
5039
  ge(([o]) => o),
5040
5040
  re(([, o, s]) => Math.max(0, o - s)),
5041
- un(0),
5042
- We()
5041
+ ln(0),
5042
+ Ve()
5043
5043
  ),
5044
5044
  0
5045
5045
  );
5046
5046
  return { alignToBottom: n, paddingTopAddition: r };
5047
5047
  },
5048
- Ve(gt, gu),
5048
+ Ge(gt, gu),
5049
5049
  { singleton: !0 }
5050
5050
  ), vu = Me(() => ({
5051
5051
  context: X(null)
@@ -5081,7 +5081,7 @@ const zn = Me(
5081
5081
  ge((Y) => !Y),
5082
5082
  // skips the initial publish of false, and the cleanup call.
5083
5083
  // but if scrollingInProgress is true, we skip the initial publish.
5084
- Dn(Je(i) ? 1 : 2)
5084
+ Dn(Ze(i) ? 1 : 2)
5085
5085
  ),
5086
5086
  E
5087
5087
  ) : E && E(), _;
@@ -5093,7 +5093,7 @@ const zn = Me(
5093
5093
  scrollIntoView: d
5094
5094
  };
5095
5095
  },
5096
- Ve(rn, gt, qr, zn, Sn),
5096
+ Ge(rn, gt, qr, zn, Sn),
5097
5097
  { singleton: !0 }
5098
5098
  );
5099
5099
  function kc(e) {
@@ -5131,16 +5131,16 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5131
5131
  ge(({ shouldFollow: S }) => S)
5132
5132
  ),
5133
5133
  ({ followOutputBehavior: S, totalCount: C }) => {
5134
- p && (p(), p = null), Je(n) ? requestAnimationFrame(() => {
5135
- Je(d)("following output to ", { totalCount: C }, St.DEBUG), g(S);
5134
+ p && (p(), p = null), Ze(n) ? requestAnimationFrame(() => {
5135
+ Ze(d)("following output to ", { totalCount: C }, St.DEBUG), g(S);
5136
5136
  }) : p = $t(e, () => {
5137
- Je(d)("following output to ", { totalCount: C }, St.DEBUG), g(S), p = null;
5137
+ Ze(d)("following output to ", { totalCount: C }, St.DEBUG), g(S), p = null;
5138
5138
  });
5139
5139
  }
5140
5140
  );
5141
5141
  function b(S) {
5142
5142
  const C = $t(o, (E) => {
5143
- S && !E.atBottom && E.notAtBottomBecause === "SIZE_INCREASED" && !p && (Je(d)("scrolling to bottom due to increased size", {}, St.DEBUG), g("auto"));
5143
+ S && !E.atBottom && E.notAtBottomBecause === "SIZE_INCREASED" && !p && (Ze(d)("scrolling to bottom due to increased size", {}, St.DEBUG), g("auto"));
5144
5144
  });
5145
5145
  setTimeout(C, 100);
5146
5146
  }
@@ -5156,10 +5156,10 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5156
5156
  Re(x, t)
5157
5157
  ),
5158
5158
  ([, S]) => {
5159
- Je(a) && b(S !== !1);
5159
+ Ze(a) && b(S !== !1);
5160
5160
  }
5161
5161
  ), Fe(v, () => {
5162
- b(Je(x) !== !1);
5162
+ b(Ze(x) !== !1);
5163
5163
  }), Fe(nt(me(x), o), ([S, C]) => {
5164
5164
  S && !C.atBottom && C.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && g("auto");
5165
5165
  });
@@ -5182,18 +5182,18 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5182
5182
  Re(me(y), a, h, m),
5183
5183
  re(([[S, C], E, N, I, j]) => C && N && (E == null ? void 0 : E({ context: j, totalCount: S, scrollingInProgress: I }))),
5184
5184
  ge((S) => !!S),
5185
- un(0)
5185
+ ln(0)
5186
5186
  ),
5187
5187
  (S) => {
5188
- p && (p(), p = null), Je(n) ? requestAnimationFrame(() => {
5189
- Je(d)("scrolling into view", {}), Se(w, S);
5188
+ p && (p(), p = null), Ze(n) ? requestAnimationFrame(() => {
5189
+ Ze(d)("scrolling into view", {}), Se(w, S);
5190
5190
  }) : p = $t(e, () => {
5191
- Je(d)("scrolling into view", {}), Se(w, S), p = null;
5191
+ Ze(d)("scrolling into view", {}), Se(w, S), p = null;
5192
5192
  });
5193
5193
  }
5194
5194
  ), { autoscrollToBottom: v, followOutput: x, scrollIntoViewOnChange: y };
5195
5195
  },
5196
- Ve(
5196
+ Ge(
5197
5197
  rn,
5198
5198
  Jr,
5199
5199
  qr,
@@ -5215,7 +5215,7 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5215
5215
  ),
5216
5216
  i
5217
5217
  ), {}),
5218
- Ve(rn, Xr, zn, Cn),
5218
+ Ge(rn, Xr, zn, Cn),
5219
5219
  { singleton: !0 }
5220
5220
  ), Xv = Me(
5221
5221
  ([{ didMount: e }, { scrollTo: t }, { listState: n }]) => {
@@ -5245,7 +5245,7 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5245
5245
  initialScrollTop: r
5246
5246
  };
5247
5247
  },
5248
- Ve(Cn, gt, zn),
5248
+ Ge(Cn, gt, zn),
5249
5249
  { singleton: !0 }
5250
5250
  ), bu = Me(
5251
5251
  ([{ scrollVelocity: e }]) => {
@@ -5264,7 +5264,7 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5264
5264
  return !0;
5265
5265
  return i;
5266
5266
  }),
5267
- We()
5267
+ Ve()
5268
5268
  ),
5269
5269
  t
5270
5270
  ), Fe(
@@ -5274,7 +5274,7 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5274
5274
  }
5275
5275
  ), { isSeeking: t, scrollSeekConfiguration: r, scrollSeekRangeChanged: n, scrollVelocity: e };
5276
5276
  },
5277
- Ve(Jr),
5277
+ Ge(Jr),
5278
5278
  { singleton: !0 }
5279
5279
  ), ra = Me(([{ scrollContainerState: e, scrollTo: t }]) => {
5280
5280
  const n = ke(), r = ke(), o = ke(), s = X(!1), i = X(void 0);
@@ -5308,7 +5308,7 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5308
5308
  windowScrollTo: o,
5309
5309
  windowViewportRect: r
5310
5310
  };
5311
- }, Ve(gt)), Jv = Me(
5311
+ }, Ge(gt)), Jv = Me(
5312
5312
  ([
5313
5313
  { sizeRanges: e, sizes: t },
5314
5314
  { headerHeight: n, scrollTop: r },
@@ -5331,7 +5331,7 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5331
5331
  s,
5332
5332
  Re(d),
5333
5333
  ge(([, w]) => w !== void 0),
5334
- We(),
5334
+ Ve(),
5335
5335
  re(([, w]) => w.ranges)
5336
5336
  ),
5337
5337
  e
@@ -5340,7 +5340,7 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5340
5340
  restoreStateFrom: d
5341
5341
  };
5342
5342
  },
5343
- Ve(rn, gt, Xr, Cn, ra)
5343
+ Ge(rn, gt, Xr, Cn, ra)
5344
5344
  );
5345
5345
  function Zv(e) {
5346
5346
  return { align: "start", index: 0, offset: e.scrollTop };
@@ -5355,7 +5355,7 @@ const Qv = Me(([{ topItemsIndexes: e }]) => {
5355
5355
  ),
5356
5356
  e
5357
5357
  ), { topItemCount: t };
5358
- }, Ve(zn));
5358
+ }, Ge(zn));
5359
5359
  function wu(e) {
5360
5360
  let t = !1, n;
5361
5361
  return () => (t || (t = !0, n = e()), n);
@@ -5397,7 +5397,7 @@ const ex = wu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5397
5397
  nt(ht(s, !1), e, x),
5398
5398
  ge(([g, b, y]) => !g && !y && b !== 0),
5399
5399
  re(([g, b]) => b),
5400
- un(1)
5400
+ ln(1)
5401
5401
  ),
5402
5402
  p
5403
5403
  ), de(
@@ -5438,7 +5438,7 @@ const ex = wu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5438
5438
  }
5439
5439
  ), { deviation: e };
5440
5440
  },
5441
- Ve(gt, Jr, zn, rn, Sn, Zi)
5441
+ Ge(gt, Jr, zn, rn, Sn, Zi)
5442
5442
  ), nx = Me(
5443
5443
  ([
5444
5444
  e,
@@ -5465,7 +5465,7 @@ const ex = wu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5465
5465
  ...u,
5466
5466
  ...d
5467
5467
  }),
5468
- Ve(
5468
+ Ge(
5469
5469
  na,
5470
5470
  qv,
5471
5471
  Cn,
@@ -5541,7 +5541,7 @@ const ex = wu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5541
5541
  sizes: l,
5542
5542
  ...p
5543
5543
  }),
5544
- Ve(
5544
+ Ge(
5545
5545
  rn,
5546
5546
  Xr,
5547
5547
  gt,
@@ -5620,11 +5620,11 @@ function Su(e, t, n) {
5620
5620
  );
5621
5621
  return q.useSyncExternalStore(
5622
5622
  b,
5623
- () => Je(g),
5624
- () => Je(g)
5623
+ () => Ze(g),
5624
+ () => Ze(g)
5625
5625
  );
5626
5626
  }, x = (p) => {
5627
- const g = q.useContext(a)[p], [b, y] = q.useState(yc(Je, g));
5627
+ const g = q.useContext(a)[p], [b, y] = q.useState(yc(Ze, g));
5628
5628
  return io(
5629
5629
  () => Fe(g, (R) => {
5630
5630
  R !== b && y(wc(R));
@@ -5714,7 +5714,7 @@ const sx = /* @__PURE__ */ Me(() => {
5714
5714
  $(
5715
5715
  n,
5716
5716
  re((u) => u[a]),
5717
- We()
5717
+ Ve()
5718
5718
  ),
5719
5719
  l
5720
5720
  );
@@ -5737,7 +5737,7 @@ const sx = /* @__PURE__ */ Me(() => {
5737
5737
  };
5738
5738
  }), ix = /* @__PURE__ */ Me(
5739
5739
  ([e, t]) => ({ ...e, ...t }),
5740
- Ve(yu, sx)
5740
+ Ge(yu, sx)
5741
5741
  ), ax = ({ height: e }) => /* @__PURE__ */ c.jsx("div", { style: { height: e } }), cx = { overflowAnchor: "none", position: oa(), zIndex: 1 }, Nu = { overflowAnchor: "none" }, lx = { ...Nu, display: "inline-block", height: "100%" }, Pc = /* @__PURE__ */ q.memo(function({ showTopList: e = !1 }) {
5742
5742
  const t = be("listState"), n = _t("sizeRanges"), r = be("useWindowScroll"), o = be("customScrollParent"), s = _t("windowScrollContainerState"), i = _t("scrollContainerState"), a = o || r ? s : i, l = be("itemContent"), u = be("context"), d = be("groupContent"), h = be("trackItemSizes"), m = be("itemSize"), w = be("log"), x = _t("gap"), v = be("horizontalDirection"), { callbackRef: p } = Tv(
5743
5743
  n,
@@ -6027,7 +6027,7 @@ const gx = ({ children: e }) => {
6027
6027
  $(
6028
6028
  s,
6029
6029
  re((h) => h[u]),
6030
- We()
6030
+ Ve()
6031
6031
  ),
6032
6032
  d
6033
6033
  );
@@ -6052,7 +6052,7 @@ const gx = ({ children: e }) => {
6052
6052
  GroupComponent: l("Group", "tr")
6053
6053
  };
6054
6054
  });
6055
- Ve(yu, Tx);
6055
+ Ge(yu, Tx);
6056
6056
  oa();
6057
6057
  const _c = {
6058
6058
  bottom: 0,
@@ -6096,11 +6096,11 @@ const Ix = /* @__PURE__ */ Me(
6096
6096
  { customScrollParent: p, useWindowScroll: g, windowScrollContainerState: b, windowScrollTo: y, windowViewportRect: R },
6097
6097
  S
6098
6098
  ]) => {
6099
- const C = X(0), E = X(0), N = X(_c), I = X({ height: 0, width: 0 }), j = X({ height: 0, width: 0 }), P = ke(), B = ke(), G = X(0), _ = X(null), Y = X({ column: 0, row: 0 }), U = ke(), oe = ke(), O = X(!1), D = X(0), K = X(!0), W = X(!1), ee = X(!1);
6099
+ const C = X(0), E = X(0), N = X(_c), I = X({ height: 0, width: 0 }), j = X({ height: 0, width: 0 }), P = ke(), B = ke(), G = X(0), _ = X(null), Y = X({ column: 0, row: 0 }), U = ke(), oe = ke(), O = X(!1), L = X(0), K = X(!0), W = X(!1), ee = X(!1);
6100
6100
  Fe(
6101
6101
  $(
6102
6102
  x,
6103
- Re(D),
6103
+ Re(L),
6104
6104
  ge(([A, H]) => !!H)
6105
6105
  ),
6106
6106
  () => {
@@ -6108,7 +6108,7 @@ const Ix = /* @__PURE__ */ Me(
6108
6108
  }
6109
6109
  ), Fe(
6110
6110
  $(
6111
- nt(x, K, j, I, D, W),
6111
+ nt(x, K, j, I, L, W),
6112
6112
  ge(([A, H, J, ce, , se]) => A && !H && J.height !== 0 && ce.height !== 0 && !se)
6113
6113
  ),
6114
6114
  ([, , , , A]) => {
@@ -6170,7 +6170,7 @@ const Ix = /* @__PURE__ */ Me(
6170
6170
  me(E),
6171
6171
  me(O),
6172
6172
  me(K),
6173
- me(D)
6173
+ me(L)
6174
6174
  ),
6175
6175
  ge(([, , , , , , , A]) => !A),
6176
6176
  re(
@@ -6217,37 +6217,37 @@ const Ix = /* @__PURE__ */ Me(
6217
6217
  const { bottom: se, top: Ae } = Lc(A, ce, H, J);
6218
6218
  return [Ae, se];
6219
6219
  }),
6220
- We(Mr)
6220
+ Ve(Mr)
6221
6221
  ),
6222
6222
  t
6223
6223
  );
6224
- const L = X(!1);
6224
+ const M = X(!1);
6225
6225
  de(
6226
6226
  $(
6227
6227
  u,
6228
- Re(L),
6228
+ Re(M),
6229
6229
  re(([A, H]) => H || A !== 0)
6230
6230
  ),
6231
- L
6231
+ M
6232
6232
  );
6233
6233
  const Z = Nt(
6234
6234
  $(
6235
6235
  nt(N, C),
6236
6236
  ge(([{ items: A }]) => A.length > 0),
6237
- Re(L),
6237
+ Re(M),
6238
6238
  ge(([[A, H], J]) => {
6239
6239
  const ce = A.items[A.items.length - 1].index === H - 1;
6240
6240
  return (J || A.bottom > 0 && A.itemHeight > 0 && A.offsetBottom === 0 && A.items.length === H) && ce;
6241
6241
  }),
6242
6242
  re(([[, A]]) => A - 1),
6243
- We()
6243
+ Ve()
6244
6244
  )
6245
6245
  ), pe = Nt(
6246
6246
  $(
6247
6247
  me(N),
6248
6248
  ge(({ items: A }) => A.length > 0 && A[0].index === 0),
6249
6249
  Jt(0),
6250
- We()
6250
+ Ve()
6251
6251
  )
6252
6252
  ), he = Nt(
6253
6253
  $(
@@ -6258,8 +6258,8 @@ const Ix = /* @__PURE__ */ Me(
6258
6258
  endIndex: A[A.length - 1].index,
6259
6259
  startIndex: A[0].index
6260
6260
  })),
6261
- We(cu),
6262
- un(0)
6261
+ Ve(cu),
6262
+ ln(0)
6263
6263
  )
6264
6264
  );
6265
6265
  de(he, w.scrollSeekRangeChanged), de(
@@ -6319,7 +6319,7 @@ const Ix = /* @__PURE__ */ Me(
6319
6319
  // output
6320
6320
  gridState: N,
6321
6321
  horizontalDirection: ee,
6322
- initialTopMostItemIndex: D,
6322
+ initialTopMostItemIndex: L,
6323
6323
  totalListHeight: F,
6324
6324
  ...m,
6325
6325
  endReached: Z,
@@ -6331,7 +6331,7 @@ const Ix = /* @__PURE__ */ Me(
6331
6331
  ...S
6332
6332
  };
6333
6333
  },
6334
- Ve(na, gt, Jr, bu, Cn, ra, Sn)
6334
+ Ge(na, gt, Jr, bu, Cn, ra, Sn)
6335
6335
  );
6336
6336
  function ku(e, t, n) {
6337
6337
  return Ir(1, $o((e + n) / ($o(t) + n)));
@@ -6352,7 +6352,7 @@ const jx = /* @__PURE__ */ Me(() => {
6352
6352
  $(
6353
6353
  t,
6354
6354
  re((w) => w[h]),
6355
- We()
6355
+ Ve()
6356
6356
  ),
6357
6357
  m
6358
6358
  ), u = X(!1), d = X(!1);
@@ -6376,9 +6376,9 @@ const jx = /* @__PURE__ */ Me(() => {
6376
6376
  };
6377
6377
  }), kx = /* @__PURE__ */ Me(
6378
6378
  ([e, t]) => ({ ...e, ...t }),
6379
- Ve(Ix, jx)
6379
+ Ge(Ix, jx)
6380
6380
  ), Ax = /* @__PURE__ */ q.memo(function() {
6381
- const e = Ge("gridState"), t = Ge("listClassName"), n = Ge("itemClassName"), r = Ge("itemContent"), o = Ge("computeItemKey"), s = Ge("isSeeking"), i = Ot("scrollHeight"), a = Ge("ItemComponent"), l = Ge("ListComponent"), u = Ge("ScrollSeekPlaceholder"), d = Ge("context"), h = Ot("itemDimensions"), m = Ot("gap"), w = Ge("log"), x = Ge("stateRestoreInProgress"), v = Ot("reportReadyState"), p = Hn(
6381
+ const e = Ke("gridState"), t = Ke("listClassName"), n = Ke("itemClassName"), r = Ke("itemContent"), o = Ke("computeItemKey"), s = Ke("isSeeking"), i = Ot("scrollHeight"), a = Ke("ItemComponent"), l = Ke("ListComponent"), u = Ke("ScrollSeekPlaceholder"), d = Ke("context"), h = Ot("itemDimensions"), m = Ot("gap"), w = Ke("log"), x = Ke("stateRestoreInProgress"), v = Ot("reportReadyState"), p = Hn(
6382
6382
  q.useMemo(
6383
6383
  () => (g) => {
6384
6384
  const b = g.parentElement.parentElement.scrollHeight;
@@ -6433,7 +6433,7 @@ const jx = /* @__PURE__ */ Me(() => {
6433
6433
  }
6434
6434
  );
6435
6435
  }), Px = q.memo(function() {
6436
- const e = Ge("HeaderComponent"), t = Ot("headerHeight"), n = Ge("headerFooterTag"), r = Hn(
6436
+ const e = Ke("HeaderComponent"), t = Ot("headerHeight"), n = Ke("headerFooterTag"), r = Hn(
6437
6437
  q.useMemo(
6438
6438
  () => (s) => {
6439
6439
  t(vn(s, "height"));
@@ -6442,10 +6442,10 @@ const jx = /* @__PURE__ */ Me(() => {
6442
6442
  ),
6443
6443
  !0,
6444
6444
  !1
6445
- ), o = Ge("context");
6445
+ ), o = Ke("context");
6446
6446
  return e ? /* @__PURE__ */ c.jsx(n, { ref: r, children: /* @__PURE__ */ c.jsx(e, { ...ft(e, o) }) }) : null;
6447
6447
  }), _x = q.memo(function() {
6448
- const e = Ge("FooterComponent"), t = Ot("footerHeight"), n = Ge("headerFooterTag"), r = Hn(
6448
+ const e = Ke("FooterComponent"), t = Ot("footerHeight"), n = Ke("headerFooterTag"), r = Hn(
6449
6449
  q.useMemo(
6450
6450
  () => (s) => {
6451
6451
  t(vn(s, "height"));
@@ -6454,7 +6454,7 @@ const jx = /* @__PURE__ */ Me(() => {
6454
6454
  ),
6455
6455
  !0,
6456
6456
  !1
6457
- ), o = Ge("context");
6457
+ ), o = Ke("context");
6458
6458
  return e ? /* @__PURE__ */ c.jsx(n, { ref: r, children: /* @__PURE__ */ c.jsx(e, { ...ft(e, o) }) }) : null;
6459
6459
  }), Ox = ({ children: e }) => {
6460
6460
  const t = q.useContext(Tu), n = Ot("itemDimensions"), r = Ot("viewportDimensions"), o = Hn(
@@ -6471,12 +6471,12 @@ const jx = /* @__PURE__ */ Me(() => {
6471
6471
  t && (r({ height: t.viewportHeight, width: t.viewportWidth }), n({ height: t.itemHeight, width: t.itemWidth }));
6472
6472
  }, [t, r, n]), /* @__PURE__ */ c.jsx("div", { ref: o, style: cs(!1), children: e });
6473
6473
  }, Mx = ({ children: e }) => {
6474
- const t = q.useContext(Tu), n = Ot("windowViewportRect"), r = Ot("itemDimensions"), o = Ge("customScrollParent"), s = nu(n, o, !1);
6474
+ const t = q.useContext(Tu), n = Ot("windowViewportRect"), r = Ot("itemDimensions"), o = Ke("customScrollParent"), s = nu(n, o, !1);
6475
6475
  return q.useEffect(() => {
6476
6476
  t && (r({ height: t.itemHeight, width: t.itemWidth }), n({ offsetTop: 0, visibleHeight: t.viewportHeight, visibleWidth: t.viewportWidth }));
6477
6477
  }, [t, n, r]), /* @__PURE__ */ c.jsx("div", { ref: s, style: cs(!1), children: e });
6478
6478
  }, Dx = /* @__PURE__ */ q.memo(function({ ...e }) {
6479
- const t = Ge("useWindowScroll"), n = Ge("customScrollParent"), r = n || t ? Fx : Lx, o = n || t ? Mx : Ox, s = Ge("context");
6479
+ const t = Ke("useWindowScroll"), n = Ke("customScrollParent"), r = n || t ? Fx : Lx, o = n || t ? Mx : Ox, s = Ke("context");
6480
6480
  return /* @__PURE__ */ c.jsx(r, { ...e, ...ft(r, s), children: /* @__PURE__ */ c.jsxs(o, { children: [
6481
6481
  /* @__PURE__ */ c.jsx(Px, {}),
6482
6482
  /* @__PURE__ */ c.jsx(Ax, {}),
@@ -6484,7 +6484,7 @@ const jx = /* @__PURE__ */ Me(() => {
6484
6484
  ] }) });
6485
6485
  }), {
6486
6486
  useEmitter: Au,
6487
- useEmitterValue: Ge,
6487
+ useEmitterValue: Ke,
6488
6488
  usePublisher: Ot
6489
6489
  } = /* @__PURE__ */ Su(
6490
6490
  kx,
@@ -6527,7 +6527,7 @@ const jx = /* @__PURE__ */ Me(() => {
6527
6527
  }
6528
6528
  },
6529
6529
  Dx
6530
- ), Lx = /* @__PURE__ */ Iu({ useEmitter: Au, useEmitterValue: Ge, usePublisher: Ot }), Fx = /* @__PURE__ */ ju({ useEmitter: Au, useEmitterValue: Ge, usePublisher: Ot });
6530
+ ), Lx = /* @__PURE__ */ Iu({ useEmitter: Au, useEmitterValue: Ke, usePublisher: Ot }), Fx = /* @__PURE__ */ ju({ useEmitter: Au, useEmitterValue: Ke, usePublisher: Ot });
6531
6531
  function Fc(e, t, n) {
6532
6532
  return t !== "normal" && !(t != null && t.endsWith("px")) && n(`${e} was not resolved to pixel value correctly`, t, St.WARN), t === "normal" ? 0 : parseInt(t ?? "0", 10);
6533
6533
  }
@@ -6548,7 +6548,7 @@ const Bx = Wr(
6548
6548
  }
6549
6549
  );
6550
6550
  function Pu({ className: e, variant: t, ...n }) {
6551
- return /* @__PURE__ */ c.jsx("div", { className: M(Bx({ variant: t }), e), ...n });
6551
+ return /* @__PURE__ */ c.jsx("div", { className: D(Bx({ variant: t }), e), ...n });
6552
6552
  }
6553
6553
  function Q(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
6554
6554
  return function(o) {
@@ -7038,8 +7038,8 @@ function lb(e, t = !1) {
7038
7038
  return `${e.length}:${n}:${r}`;
7039
7039
  }
7040
7040
  function ub(e, t) {
7041
- const [n, r] = ue(e), o = Ke(e), s = Ke(null);
7042
- return Ze(() => {
7041
+ const [n, r] = ue(e), o = We(e), s = We(null);
7042
+ return Xe(() => {
7043
7043
  if (!t) {
7044
7044
  r(e);
7045
7045
  return;
@@ -7066,8 +7066,8 @@ function Ks({
7066
7066
  const a = ub(e, r), l = lb(a, r), [u, d] = ue(() => {
7067
7067
  var x;
7068
7068
  return ((x = Sr.get(l)) == null ? void 0 : x.html) ?? null;
7069
- }), h = Ke(null), m = Ke([]);
7070
- Ze(() => {
7069
+ }), h = We(null), m = We([]);
7070
+ Xe(() => {
7071
7071
  m.current = [];
7072
7072
  const x = Sr.get(l);
7073
7073
  if (x && x.source === a) {
@@ -7185,7 +7185,7 @@ function Ks({
7185
7185
  return v.forEach((R) => y.observe(R)), () => {
7186
7186
  g = !0, y.disconnect();
7187
7187
  };
7188
- }, [u]), u ? /* @__PURE__ */ c.jsx("div", { ref: w, className: M("markdown prose max-w-none break-words dark:prose-invert", t), dangerouslySetInnerHTML: { __html: u } }) : r && o ? null : /* @__PURE__ */ c.jsx("div", { className: M("markdown prose max-w-none break-words dark:prose-invert", t), children: n });
7188
+ }, [u]), u ? /* @__PURE__ */ c.jsx("div", { ref: w, className: D("markdown prose max-w-none break-words dark:prose-invert", t), dangerouslySetInnerHTML: { __html: u } }) : r && o ? null : /* @__PURE__ */ c.jsx("div", { className: D("markdown prose max-w-none break-words dark:prose-invert", t), children: n });
7189
7189
  }
7190
7190
  async function Bu(e, t) {
7191
7191
  return await Ft(e, {
@@ -7460,15 +7460,15 @@ var Xs = "focusScope.autoFocusOnMount", Js = "focusScope.autoFocusOnUnmount", Yc
7460
7460
  let v = function(y) {
7461
7461
  if (w.paused || !a) return;
7462
7462
  const R = y.target;
7463
- a.contains(R) ? h.current = R : pn(h.current, { select: !0 });
7463
+ a.contains(R) ? h.current = R : hn(h.current, { select: !0 });
7464
7464
  }, p = function(y) {
7465
7465
  if (w.paused || !a) return;
7466
7466
  const R = y.relatedTarget;
7467
- R !== null && (a.contains(R) || pn(h.current, { select: !0 }));
7467
+ R !== null && (a.contains(R) || hn(h.current, { select: !0 }));
7468
7468
  }, g = function(y) {
7469
7469
  if (document.activeElement === document.body)
7470
7470
  for (const S of y)
7471
- S.removedNodes.length > 0 && pn(a);
7471
+ S.removedNodes.length > 0 && hn(a);
7472
7472
  };
7473
7473
  document.addEventListener("focusin", v), document.addEventListener("focusout", p);
7474
7474
  const b = new MutationObserver(g);
@@ -7482,12 +7482,12 @@ var Xs = "focusScope.autoFocusOnMount", Js = "focusScope.autoFocusOnUnmount", Yc
7482
7482
  const v = document.activeElement;
7483
7483
  if (!a.contains(v)) {
7484
7484
  const g = new CustomEvent(Xs, Yc);
7485
- a.addEventListener(Xs, u), a.dispatchEvent(g), g.defaultPrevented || (Eb(Ab(zu(a)), { select: !0 }), document.activeElement === v && pn(a));
7485
+ a.addEventListener(Xs, u), a.dispatchEvent(g), g.defaultPrevented || (Eb(Ab(zu(a)), { select: !0 }), document.activeElement === v && hn(a));
7486
7486
  }
7487
7487
  return () => {
7488
7488
  a.removeEventListener(Xs, u), setTimeout(() => {
7489
7489
  const g = new CustomEvent(Js, Yc);
7490
- a.addEventListener(Js, d), a.dispatchEvent(g), g.defaultPrevented || pn(v ?? document.body, { select: !0 }), a.removeEventListener(Js, d), Xc.remove(w);
7490
+ a.addEventListener(Js, d), a.dispatchEvent(g), g.defaultPrevented || hn(v ?? document.body, { select: !0 }), a.removeEventListener(Js, d), Xc.remove(w);
7491
7491
  }, 0);
7492
7492
  };
7493
7493
  }
@@ -7498,7 +7498,7 @@ var Xs = "focusScope.autoFocusOnMount", Js = "focusScope.autoFocusOnUnmount", Yc
7498
7498
  const p = v.key === "Tab" && !v.altKey && !v.ctrlKey && !v.metaKey, g = document.activeElement;
7499
7499
  if (p && g) {
7500
7500
  const b = v.currentTarget, [y, R] = Nb(b);
7501
- y && R ? !v.shiftKey && g === R ? (v.preventDefault(), n && pn(y, { select: !0 })) : v.shiftKey && g === y && (v.preventDefault(), n && pn(R, { select: !0 })) : g === b && v.preventDefault();
7501
+ y && R ? !v.shiftKey && g === R ? (v.preventDefault(), n && hn(y, { select: !0 })) : v.shiftKey && g === y && (v.preventDefault(), n && hn(R, { select: !0 })) : g === b && v.preventDefault();
7502
7502
  }
7503
7503
  },
7504
7504
  [n, r, w.paused]
@@ -7509,7 +7509,7 @@ us.displayName = Rb;
7509
7509
  function Eb(e, { select: t = !1 } = {}) {
7510
7510
  const n = document.activeElement;
7511
7511
  for (const r of e)
7512
- if (pn(r, { select: t }), document.activeElement !== n) return;
7512
+ if (hn(r, { select: t }), document.activeElement !== n) return;
7513
7513
  }
7514
7514
  function Nb(e) {
7515
7515
  const t = zu(e), n = qc(t, e), r = qc(t.reverse(), e);
@@ -7541,7 +7541,7 @@ function Ib(e, { upTo: t }) {
7541
7541
  function jb(e) {
7542
7542
  return e instanceof HTMLInputElement && "select" in e;
7543
7543
  }
7544
- function pn(e, { select: t = !1 } = {}) {
7544
+ function hn(e, { select: t = !1 } = {}) {
7545
7545
  if (e && e.focus) {
7546
7546
  const n = document.activeElement;
7547
7547
  e.focus({ preventScroll: !0 }), e !== n && jb(e) && t && e.select();
@@ -8339,7 +8339,7 @@ const Iw = hd, jw = pd, gd = f.forwardRef(({ className: e, ...t }, n) => /* @__P
8339
8339
  ms,
8340
8340
  {
8341
8341
  ref: n,
8342
- className: M(
8342
+ className: D(
8343
8343
  "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
8344
8344
  e
8345
8345
  ),
@@ -8369,7 +8369,7 @@ const vd = f.forwardRef(({ className: e, children: t, ...n }, r) => {
8369
8369
  gs,
8370
8370
  {
8371
8371
  ref: r,
8372
- className: M(
8372
+ className: D(
8373
8373
  "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
8374
8374
  e
8375
8375
  ),
@@ -8393,7 +8393,7 @@ const xd = ({
8393
8393
  }) => /* @__PURE__ */ c.jsx(
8394
8394
  "div",
8395
8395
  {
8396
- className: M(
8396
+ className: D(
8397
8397
  "flex flex-col space-y-1.5 text-center sm:text-left",
8398
8398
  e
8399
8399
  ),
@@ -8405,7 +8405,7 @@ const bd = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
8405
8405
  _n,
8406
8406
  {
8407
8407
  ref: n,
8408
- className: M(
8408
+ className: D(
8409
8409
  "text-lg font-semibold leading-none tracking-tight",
8410
8410
  e
8411
8411
  ),
@@ -8417,14 +8417,14 @@ const kw = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
8417
8417
  vs,
8418
8418
  {
8419
8419
  ref: n,
8420
- className: M("text-sm text-muted-foreground", e),
8420
+ className: D("text-sm text-muted-foreground", e),
8421
8421
  ...t
8422
8422
  }
8423
8423
  ));
8424
8424
  kw.displayName = vs.displayName;
8425
8425
  function Aw({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
8426
8426
  const [s, i] = ue(!1), [a, l] = ue(null), [u, d] = ue(null), { toast: h } = ha();
8427
- Ze(() => {
8427
+ Xe(() => {
8428
8428
  e && n && m();
8429
8429
  }, [e, n]);
8430
8430
  const m = async () => {
@@ -8533,14 +8533,14 @@ function Aw({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
8533
8533
  const No = "prose prose-sm max-w-none break-words dark:prose-invert prose-headings:break-words prose-p:break-words prose-li:break-words prose-td:break-words prose-th:break-words prose-a:break-all prose-code:break-words prose-blockquote:break-words";
8534
8534
  function Pw({ className: e }) {
8535
8535
  const [t, n] = ue(0);
8536
- return Ze(() => {
8536
+ return Xe(() => {
8537
8537
  const r = setInterval(() => n((o) => (o + 1) % 4), 500);
8538
8538
  return () => clearInterval(r);
8539
8539
  }, []), /* @__PURE__ */ c.jsxs(
8540
8540
  "span",
8541
8541
  {
8542
8542
  "aria-live": "polite",
8543
- className: M("inline-block text-xs opacity-70 ml-1", e),
8543
+ className: D("inline-block text-xs opacity-70 ml-1", e),
8544
8544
  children: [
8545
8545
  "Is thinking",
8546
8546
  ".".repeat(t)
@@ -8571,8 +8571,8 @@ const _w = q.memo(function({
8571
8571
  }) {
8572
8572
  const [y, R] = ue(!1), [S, C] = ue(!1), [E, N] = ue(!1), [I, j] = ue(!1), { currentThreadId: P } = Yi();
8573
8573
  ha();
8574
- const [B, G] = ue({}), [_, Y] = ue(!1), [U, oe] = ue(null), O = u === "phone" || u === "half-screen", D = t.role, K = D === "tool", W = q.useMemo(() => {
8575
- switch (D) {
8574
+ const [B, G] = ue({}), [_, Y] = ue(!1), [U, oe] = ue(null), O = u === "phone" || u === "half-screen", L = t.role, K = L === "tool", W = q.useMemo(() => {
8575
+ switch (L) {
8576
8576
  case "user":
8577
8577
  return "text-[hsl(var(--chat-bubble-user-text))]";
8578
8578
  case "assistant":
@@ -8584,7 +8584,7 @@ const _w = q.memo(function({
8584
8584
  default:
8585
8585
  return "text-[hsl(var(--chat-bubble-ai-text))]";
8586
8586
  }
8587
- }, [D]), ee = ln(() => Ow(t.content), [t.content]), L = ln(() => Bw(t.content), [t.content]), Z = ln(() => t.content.filter((ie) => ie.type === "image_url"), [t.content]), pe = ln(() => t.content.filter((ie) => ie.type === "file"), [t.content]), he = Hw(ee, r);
8587
+ }, [L]), ee = mn(() => Ow(t.content), [t.content]), M = mn(() => Bw(t.content), [t.content]), Z = mn(() => t.content.filter((ie) => ie.type === "image_url"), [t.content]), pe = mn(() => t.content.filter((ie) => ie.type === "file"), [t.content]), he = Hw(ee, r);
8588
8588
  q.useEffect(() => {
8589
8589
  r && ee !== he && console.log("[MessageComponent] Streaming update:", {
8590
8590
  messageId: t.id,
@@ -8607,8 +8607,8 @@ const _w = q.memo(function({
8607
8607
  const ie = K ? Zn(t.content) : ee;
8608
8608
  v(t.id, ie);
8609
8609
  }, H = () => p == null ? void 0 : p(n), J = () => {
8610
- const Ne = M(O ? "h-3 w-3" : "h-4 w-4", "opacity-60 flex-shrink-0", W);
8611
- switch (D) {
8610
+ const Ne = D(O ? "h-3 w-3" : "h-4 w-4", "opacity-60 flex-shrink-0", W);
8611
+ switch (L) {
8612
8612
  case "user":
8613
8613
  return /* @__PURE__ */ c.jsx(Yp, { className: Ne });
8614
8614
  case "assistant":
@@ -8620,42 +8620,42 @@ const _w = q.memo(function({
8620
8620
  }
8621
8621
  }, ce = () => {
8622
8622
  const ie = "group relative mb-4 flex w-full";
8623
- switch (D) {
8623
+ switch (L) {
8624
8624
  case "user":
8625
- return M(ie, "justify-end");
8625
+ return D(ie, "justify-end");
8626
8626
  case "assistant":
8627
8627
  case "tool":
8628
8628
  case "system":
8629
- return M(ie, "justify-start");
8629
+ return D(ie, "justify-start");
8630
8630
  default:
8631
8631
  return ie;
8632
8632
  }
8633
8633
  }, se = () => {
8634
- const ie = M(
8634
+ const ie = D(
8635
8635
  "rounded-lg px-4 py-3 relative min-w-0 max-w-full break-words",
8636
8636
  O && "px-3 py-2 text-sm"
8637
8637
  );
8638
- switch (D) {
8638
+ switch (L) {
8639
8639
  case "user":
8640
- return M(
8640
+ return D(
8641
8641
  ie,
8642
8642
  "w-full md:max-w-[95%]",
8643
8643
  "bg-[hsl(var(--chat-bubble-user))] text-[hsl(var(--chat-bubble-user-text))]",
8644
8644
  "border border-transparent"
8645
8645
  );
8646
8646
  case "assistant":
8647
- return M(
8647
+ return D(
8648
8648
  ie,
8649
8649
  "w-full md:max-w-[95%]",
8650
8650
  "bg-[hsl(var(--chat-bubble-ai))] text-[hsl(var(--chat-bubble-ai-text))]",
8651
8651
  "border border-border/60 dark:border-border/40"
8652
8652
  );
8653
8653
  case "tool":
8654
- return M(ie, "w-full md:max-w-[95%] bg-secondary/50 text-secondary-foreground border border-dashed");
8654
+ return D(ie, "w-full md:max-w-[95%] bg-secondary/50 text-secondary-foreground border border-dashed");
8655
8655
  case "system":
8656
- return M(ie, "w-full md:max-w-[85%] bg-accent/40 text-muted-foreground border");
8656
+ return D(ie, "w-full md:max-w-[85%] bg-accent/40 text-muted-foreground border");
8657
8657
  default:
8658
- return M(
8658
+ return D(
8659
8659
  ie,
8660
8660
  "w-full md:max-w-[95%]",
8661
8661
  "bg-[hsl(var(--chat-bubble-ai))] text-[hsl(var(--chat-bubble-ai-text))]",
@@ -8680,13 +8680,13 @@ const _w = q.memo(function({
8680
8680
  if (Te && typeof Te == "object")
8681
8681
  return /* @__PURE__ */ c.jsx(zw, { data: Te });
8682
8682
  }
8683
- if (K && L.name === "get_issues") {
8683
+ if (K && M.name === "get_issues") {
8684
8684
  const fe = t.content.find((st) => st.type === "tool_result"), Te = (fe == null ? void 0 : fe.output) ?? Zn(t.content), Be = yd(Te);
8685
8685
  if (Be) return /* @__PURE__ */ c.jsx(Uw, { issues: Be });
8686
8686
  }
8687
8687
  if (K && !E) {
8688
8688
  const fe = Zn(t.content).slice(0, 80).replace(/\s+/g, " ");
8689
- return /* @__PURE__ */ c.jsx("div", { className: M("text-xs font-mono opacity-70 flex items-center justify-between gap-2 text-current", O && "text-[10px]"), children: /* @__PURE__ */ c.jsxs("span", { className: "truncate max-w-full text-current", children: [
8689
+ return /* @__PURE__ */ c.jsx("div", { className: D("text-xs font-mono opacity-70 flex items-center justify-between gap-2 text-current", O && "text-[10px]"), children: /* @__PURE__ */ c.jsxs("span", { className: "truncate max-w-full text-current", children: [
8690
8690
  fe,
8691
8691
  fe.length >= 80 ? "…" : ""
8692
8692
  ] }) });
@@ -8694,7 +8694,7 @@ const _w = q.memo(function({
8694
8694
  if (K && d) {
8695
8695
  const fe = Zn(t.content), Te = fe.length > h;
8696
8696
  return /* @__PURE__ */ c.jsx($c, { open: S, onOpenChange: C, children: /* @__PURE__ */ c.jsxs("div", { className: "font-mono text-sm text-current", children: [
8697
- /* @__PURE__ */ c.jsx("pre", { className: M("whitespace-pre-wrap break-words text-current", O && "text-xs"), children: Te && !S ? fe.substring(0, h) + "..." : fe }),
8697
+ /* @__PURE__ */ c.jsx("pre", { className: D("whitespace-pre-wrap break-words text-current", O && "text-xs"), children: Te && !S ? fe.substring(0, h) + "..." : fe }),
8698
8698
  Te && /* @__PURE__ */ c.jsx(Hc, { asChild: !0, children: /* @__PURE__ */ c.jsx(De, { variant: "ghost", size: "sm", className: "h-6 text-xs text-current", children: S ? /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
8699
8699
  /* @__PURE__ */ c.jsx(Cr, { className: "h-3 w-3 mr-1" }),
8700
8700
  "Show less"
@@ -8711,9 +8711,9 @@ const _w = q.memo(function({
8711
8711
  if (fe && Mw(fe))
8712
8712
  return /* @__PURE__ */ c.jsx(Ks, { content: fe.trim(), hideFallbackDuringStreaming: !0 });
8713
8713
  const Te = Zn(t.content);
8714
- return /* @__PURE__ */ c.jsx("div", { className: "font-mono text-sm text-current", children: /* @__PURE__ */ c.jsx("pre", { className: M("whitespace-pre-wrap break-words text-current", O && "text-xs"), children: Te }) });
8714
+ return /* @__PURE__ */ c.jsx("div", { className: "font-mono text-sm text-current", children: /* @__PURE__ */ c.jsx("pre", { className: D("whitespace-pre-wrap break-words text-current", O && "text-xs"), children: Te }) });
8715
8715
  }
8716
- const Ne = Z.length > 0 && D !== "tool", Ce = pe.length > 0 && D !== "tool" && !1;
8716
+ const Ne = Z.length > 0 && L !== "tool", Ce = pe.length > 0 && L !== "tool" && !1;
8717
8717
  return /* @__PURE__ */ c.jsxs("div", { children: [
8718
8718
  r ? (
8719
8719
  // Streaming container: reserve space and show a skeleton until we have text,
@@ -8721,7 +8721,7 @@ const _w = q.memo(function({
8721
8721
  /* @__PURE__ */ c.jsxs(
8722
8722
  "div",
8723
8723
  {
8724
- className: M(
8724
+ className: D(
8725
8725
  "relative transition-all duration-200 ease-out",
8726
8726
  O ? "text-xs" : "text-sm"
8727
8727
  ),
@@ -8741,7 +8741,7 @@ const _w = q.memo(function({
8741
8741
  ] }) }) : /* @__PURE__ */ c.jsx(
8742
8742
  "pre",
8743
8743
  {
8744
- className: M(
8744
+ className: D(
8745
8745
  "whitespace-pre-wrap break-words font-sans leading-relaxed transition-opacity duration-200",
8746
8746
  O && "text-xs"
8747
8747
  ),
@@ -8749,18 +8749,18 @@ const _w = q.memo(function({
8749
8749
  }
8750
8750
  ) });
8751
8751
  })(),
8752
- /* @__PURE__ */ c.jsx("div", { className: "mt-2", children: /* @__PURE__ */ c.jsx(Pw, { className: M(W, O ? "text-xs" : "text-sm") }) })
8752
+ /* @__PURE__ */ c.jsx("div", { className: "mt-2", children: /* @__PURE__ */ c.jsx(Pw, { className: D(W, O ? "text-xs" : "text-sm") }) })
8753
8753
  ]
8754
8754
  }
8755
8755
  )
8756
8756
  ) : (() => {
8757
8757
  const fe = ri(ee.trim());
8758
8758
  if (fe !== null) return /* @__PURE__ */ c.jsx(ol, { data: fe });
8759
- if (D === "user" && m) {
8759
+ if (L === "user" && m) {
8760
8760
  const Te = ee.trim();
8761
8761
  if (Te.length > w)
8762
8762
  return /* @__PURE__ */ c.jsxs($c, { open: I, onOpenChange: j, children: [
8763
- /* @__PURE__ */ c.jsx("div", { className: M("text-sm text-[hsl(var(--chat-bubble-user-text))]", O && "text-xs"), children: I ? /* @__PURE__ */ c.jsx(Ks, { content: Te, hideFallbackDuringStreaming: !0 }) : /* @__PURE__ */ c.jsxs("pre", { className: M("font-sans whitespace-pre-wrap break-words bg-transparent p-0 m-0 text-[hsl(var(--chat-bubble-user-text))]", O && "text-xs"), children: [
8763
+ /* @__PURE__ */ c.jsx("div", { className: D("text-sm text-[hsl(var(--chat-bubble-user-text))]", O && "text-xs"), children: I ? /* @__PURE__ */ c.jsx(Ks, { content: Te, hideFallbackDuringStreaming: !0 }) : /* @__PURE__ */ c.jsxs("pre", { className: D("font-sans whitespace-pre-wrap break-words bg-transparent p-0 m-0 text-[hsl(var(--chat-bubble-user-text))]", O && "text-xs"), children: [
8764
8764
  Te.substring(0, w),
8765
8765
  "..."
8766
8766
  ] }) }),
@@ -8823,13 +8823,13 @@ const _w = q.memo(function({
8823
8823
  }) }),
8824
8824
  Ce
8825
8825
  ] });
8826
- }, je = ln(() => $w(t), [t]);
8826
+ }, je = mn(() => $w(t), [t]);
8827
8827
  return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
8828
- /* @__PURE__ */ c.jsx("div", { className: M(ce(), x.container), children: /* @__PURE__ */ c.jsxs("div", { className: M(se(), x.content), children: [
8828
+ /* @__PURE__ */ c.jsx("div", { className: D(ce(), x.container), children: /* @__PURE__ */ c.jsxs("div", { className: D(se(), x.content), children: [
8829
8829
  (a || l || K) && /* @__PURE__ */ c.jsxs(
8830
8830
  "div",
8831
8831
  {
8832
- className: M(
8832
+ className: D(
8833
8833
  "flex items-center justify-between mb-2 pb-2 border-b border-current/10",
8834
8834
  O && "mb-1 pb-1",
8835
8835
  W,
@@ -8838,12 +8838,12 @@ const _w = q.memo(function({
8838
8838
  children: [
8839
8839
  /* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-2", children: [
8840
8840
  J(),
8841
- l && je && /* @__PURE__ */ c.jsx("span", { className: M("font-medium", O ? "text-xs" : "text-sm"), children: je }),
8842
- K && L.name && /* @__PURE__ */ c.jsxs(
8841
+ l && je && /* @__PURE__ */ c.jsx("span", { className: D("font-medium", O ? "text-xs" : "text-sm"), children: je }),
8842
+ K && M.name && /* @__PURE__ */ c.jsxs(
8843
8843
  Pu,
8844
8844
  {
8845
8845
  variant: "outline",
8846
- className: M(
8846
+ className: D(
8847
8847
  "text-xs flex items-center gap-1 cursor-pointer",
8848
8848
  W,
8849
8849
  "border border-current/40",
@@ -8851,17 +8851,17 @@ const _w = q.memo(function({
8851
8851
  ),
8852
8852
  onClick: () => N((ie) => !ie),
8853
8853
  children: [
8854
- /* @__PURE__ */ c.jsx("span", { children: L.name }),
8854
+ /* @__PURE__ */ c.jsx("span", { children: M.name }),
8855
8855
  /* @__PURE__ */ c.jsx("span", { className: "inline-flex items-center", children: E ? /* @__PURE__ */ c.jsx(Cr, { className: "h-3 w-3" }) : /* @__PURE__ */ c.jsx(Qn, { className: "h-3 w-3" }) })
8856
8856
  ]
8857
8857
  }
8858
8858
  ),
8859
- K && !L.name && /* @__PURE__ */ c.jsx(
8859
+ K && !M.name && /* @__PURE__ */ c.jsx(
8860
8860
  De,
8861
8861
  {
8862
8862
  variant: "ghost",
8863
8863
  size: "sm",
8864
- className: M("h-6 px-1", W, "hover:bg-foreground/10"),
8864
+ className: D("h-6 px-1", W, "hover:bg-foreground/10"),
8865
8865
  onClick: () => N((ie) => !ie),
8866
8866
  children: /* @__PURE__ */ c.jsxs("span", { className: "text-xs flex items-center gap-1", children: [
8867
8867
  "Tool Output ",
@@ -8871,11 +8871,11 @@ const _w = q.memo(function({
8871
8871
  )
8872
8872
  ] }),
8873
8873
  /* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-2", children: [
8874
- a && /* @__PURE__ */ c.jsx("span", { className: M("text-xs opacity-60", W, O && "text-xs"), children: Ae(t.createdAt) }),
8874
+ a && /* @__PURE__ */ c.jsx("span", { className: D("text-xs opacity-60", W, O && "text-xs"), children: Ae(t.createdAt) }),
8875
8875
  i && !s && /* @__PURE__ */ c.jsxs(
8876
8876
  "div",
8877
8877
  {
8878
- className: M(
8878
+ className: D(
8879
8879
  "opacity-0 group-hover:opacity-100 transition-opacity",
8880
8880
  "flex items-center gap-1",
8881
8881
  x.actions
@@ -8887,11 +8887,11 @@ const _w = q.memo(function({
8887
8887
  variant: "ghost",
8888
8888
  size: "sm",
8889
8889
  onClick: F,
8890
- className: M("h-6 w-6 p-0 hover:bg-foreground/10", W, O && "h-5 w-5"),
8890
+ className: D("h-6 w-6 p-0 hover:bg-foreground/10", W, O && "h-5 w-5"),
8891
8891
  children: /* @__PURE__ */ c.jsx(
8892
8892
  qa,
8893
8893
  {
8894
- className: M(
8894
+ className: D(
8895
8895
  y ? "text-success" : W,
8896
8896
  O ? "h-3 w-3" : "h-4 w-4"
8897
8897
  )
@@ -8899,24 +8899,24 @@ const _w = q.memo(function({
8899
8899
  )
8900
8900
  }
8901
8901
  ),
8902
- D === "user" && v && /* @__PURE__ */ c.jsx(
8902
+ L === "user" && v && /* @__PURE__ */ c.jsx(
8903
8903
  De,
8904
8904
  {
8905
8905
  variant: "ghost",
8906
8906
  size: "sm",
8907
8907
  onClick: A,
8908
- className: M("h-6 w-6 p-0 hover:bg-foreground/10", W, O && "h-5 w-5"),
8909
- children: /* @__PURE__ */ c.jsx(Xa, { className: M(W, O ? "h-3 w-3" : "h-4 w-4") })
8908
+ className: D("h-6 w-6 p-0 hover:bg-foreground/10", W, O && "h-5 w-5"),
8909
+ children: /* @__PURE__ */ c.jsx(Xa, { className: D(W, O ? "h-3 w-3" : "h-4 w-4") })
8910
8910
  }
8911
8911
  ),
8912
- D === "assistant" && p && /* @__PURE__ */ c.jsx(
8912
+ L === "assistant" && p && /* @__PURE__ */ c.jsx(
8913
8913
  De,
8914
8914
  {
8915
8915
  variant: "ghost",
8916
8916
  size: "sm",
8917
8917
  onClick: H,
8918
- className: M("h-6 w-6 p-0 hover:bg-foreground/10", W, O && "h-5 w-5"),
8919
- children: /* @__PURE__ */ c.jsx(ci, { className: M(W, O ? "h-3 w-3" : "h-4 w-4") })
8918
+ className: D("h-6 w-6 p-0 hover:bg-foreground/10", W, O && "h-5 w-5"),
8919
+ children: /* @__PURE__ */ c.jsx(ci, { className: D(W, O ? "h-3 w-3" : "h-4 w-4") })
8920
8920
  }
8921
8921
  )
8922
8922
  ]
@@ -8927,20 +8927,20 @@ const _w = q.memo(function({
8927
8927
  }
8928
8928
  ),
8929
8929
  /* @__PURE__ */ c.jsx("div", { className: "relative", children: _e() }),
8930
- K && E && (L.toolCallId || L.name) && /* @__PURE__ */ c.jsxs("div", { className: M("mt-2 pt-2 border-t border-current/10 text-xs opacity-60", O && "text-xs"), children: [
8931
- L.name && /* @__PURE__ */ c.jsxs("div", { children: [
8930
+ K && E && (M.toolCallId || M.name) && /* @__PURE__ */ c.jsxs("div", { className: D("mt-2 pt-2 border-t border-current/10 text-xs opacity-60", O && "text-xs"), children: [
8931
+ M.name && /* @__PURE__ */ c.jsxs("div", { children: [
8932
8932
  "Function: ",
8933
- L.name
8933
+ M.name
8934
8934
  ] }),
8935
- L.toolCallId && /* @__PURE__ */ c.jsxs("div", { children: [
8935
+ M.toolCallId && /* @__PURE__ */ c.jsxs("div", { children: [
8936
8936
  "Call ID: ",
8937
- L.toolCallId
8937
+ M.toolCallId
8938
8938
  ] })
8939
8939
  ] }),
8940
8940
  !(a || l || K) && i && !s && /* @__PURE__ */ c.jsxs(
8941
8941
  "div",
8942
8942
  {
8943
- className: M(
8943
+ className: D(
8944
8944
  "absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",
8945
8945
  "flex items-center gap-1",
8946
8946
  x.actions
@@ -8952,28 +8952,28 @@ const _w = q.memo(function({
8952
8952
  variant: "ghost",
8953
8953
  size: "sm",
8954
8954
  onClick: F,
8955
- className: M("h-6 w-6 p-0 hover:bg-background/50 text-current", O && "h-5 w-5"),
8956
- children: /* @__PURE__ */ c.jsx(qa, { className: M(y ? "text-success" : "text-current", O ? "h-3 w-3" : "h-4 w-4") })
8955
+ className: D("h-6 w-6 p-0 hover:bg-background/50 text-current", O && "h-5 w-5"),
8956
+ children: /* @__PURE__ */ c.jsx(qa, { className: D(y ? "text-success" : "text-current", O ? "h-3 w-3" : "h-4 w-4") })
8957
8957
  }
8958
8958
  ),
8959
- D === "user" && v && /* @__PURE__ */ c.jsx(
8959
+ L === "user" && v && /* @__PURE__ */ c.jsx(
8960
8960
  De,
8961
8961
  {
8962
8962
  variant: "ghost",
8963
8963
  size: "sm",
8964
8964
  onClick: A,
8965
- className: M("h-6 w-6 p-0 hover:bg-background/50 text-current", O && "h-5 w-5"),
8966
- children: /* @__PURE__ */ c.jsx(Xa, { className: M("text-current", O ? "h-3 w-3" : "h-4 w-4") })
8965
+ className: D("h-6 w-6 p-0 hover:bg-background/50 text-current", O && "h-5 w-5"),
8966
+ children: /* @__PURE__ */ c.jsx(Xa, { className: D("text-current", O ? "h-3 w-3" : "h-4 w-4") })
8967
8967
  }
8968
8968
  ),
8969
- D === "assistant" && p && /* @__PURE__ */ c.jsx(
8969
+ L === "assistant" && p && /* @__PURE__ */ c.jsx(
8970
8970
  De,
8971
8971
  {
8972
8972
  variant: "ghost",
8973
8973
  size: "sm",
8974
8974
  onClick: H,
8975
- className: M("h-6 w-6 p-0 hover:bg-background/50 text-current", O && "h-5 w-5"),
8976
- children: /* @__PURE__ */ c.jsx(ci, { className: M("text-current", O ? "h-3 w-3" : "h-4 w-4") })
8975
+ className: D("h-6 w-6 p-0 hover:bg-background/50 text-current", O && "h-5 w-5"),
8976
+ children: /* @__PURE__ */ c.jsx(ci, { className: D("text-current", O ? "h-3 w-3" : "h-4 w-4") })
8977
8977
  }
8978
8978
  )
8979
8979
  ]
@@ -9120,8 +9120,8 @@ function $w(e) {
9120
9120
  return e.name && e.name.trim() ? e.name : e.model && e.model.includes("/") ? e.model.split("/").pop() || null : e.model || null;
9121
9121
  }
9122
9122
  function Hw(e, t) {
9123
- const [n, r] = ue(e), o = Ke(e), s = Ke(null);
9124
- return Ze(() => {
9123
+ const [n, r] = ue(e), o = We(e), s = We(null);
9124
+ return Xe(() => {
9125
9125
  if (!t) {
9126
9126
  r(e);
9127
9127
  return;
@@ -9244,9 +9244,9 @@ const sl = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, Sd = q.forwa
9244
9244
  onScrollAway: p,
9245
9245
  onAtBottom: g
9246
9246
  }, b) => {
9247
- const y = Ke(null), R = Ke(null), S = Ke(!1), [C, E] = ue(!0), N = Ue((P) => {
9247
+ const y = We(null), R = We(null), S = We(!1), [C, E] = ue(!0), N = Ue((P) => {
9248
9248
  E(P), p && p(!P), g && g(P);
9249
- }, [p, g]), I = ln(() => {
9249
+ }, [p, g]), I = mn(() => {
9250
9250
  if (a)
9251
9251
  return async () => {
9252
9252
  if (!S.current) {
@@ -9258,8 +9258,15 @@ const sl = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, Sd = q.forwa
9258
9258
  }
9259
9259
  }
9260
9260
  };
9261
- }, [a]), j = ln(() => !x || v ? !1 : t && C ? "auto" : !1, [t, C, x, v]);
9262
- return e.length === 0 ? /* @__PURE__ */ c.jsx("div", { className: h, style: m, children: /* @__PURE__ */ c.jsx("div", { className: "flex items-center justify-center py-8 text-muted-foreground text-center max-w-md mx-auto", children: w || "No messages yet. Start a conversation!" }) }) : /* @__PURE__ */ c.jsx("div", { className: h, style: m, children: /* @__PURE__ */ c.jsx(
9261
+ }, [a]), j = We(!1);
9262
+ return Xe(() => {
9263
+ if (!x || v) {
9264
+ j.current !== !1 && (j.current = !1);
9265
+ return;
9266
+ }
9267
+ const P = t && C ? "auto" : !1;
9268
+ j.current !== P && (j.current = P);
9269
+ }, [t, C, x, v]), e.length === 0 ? /* @__PURE__ */ c.jsx("div", { className: h, style: m, children: /* @__PURE__ */ c.jsx("div", { className: "flex items-center justify-center py-8 text-muted-foreground text-center max-w-md mx-auto", children: w || "No messages yet. Start a conversation!" }) }) : /* @__PURE__ */ c.jsx("div", { className: h, style: m, children: /* @__PURE__ */ c.jsx(
9263
9270
  Cx,
9264
9271
  {
9265
9272
  ref: (P) => {
@@ -9269,12 +9276,10 @@ const sl = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, Sd = q.forwa
9269
9276
  R.current = P instanceof HTMLDivElement ? P : null;
9270
9277
  },
9271
9278
  data: e,
9272
- followOutput: j,
9279
+ followOutput: j.current,
9273
9280
  overscan: 400,
9274
9281
  increaseViewportBy: { top: 200, bottom: 400 },
9275
9282
  defaultItemHeight: 120,
9276
- fixedItemHeight: void 0,
9277
- itemSize: () => 120,
9278
9283
  atBottomThreshold: 100,
9279
9284
  alignToBottom: !0,
9280
9285
  startReached: () => {
@@ -9419,10 +9424,10 @@ const qw = ["top", "right", "bottom", "left"], bn = Math.min, Rt = Math.max, Uo
9419
9424
  function Ni(e, t, n) {
9420
9425
  return Rt(e, bn(t, n));
9421
9426
  }
9422
- function dn(e, t) {
9427
+ function un(e, t) {
9423
9428
  return typeof e == "function" ? e(t) : e;
9424
9429
  }
9425
- function fn(e) {
9430
+ function dn(e) {
9426
9431
  return e.split("-")[0];
9427
9432
  }
9428
9433
  function mr(e) {
@@ -9436,7 +9441,7 @@ function ya(e) {
9436
9441
  }
9437
9442
  const Zw = /* @__PURE__ */ new Set(["top", "bottom"]);
9438
9443
  function en(e) {
9439
- return Zw.has(fn(e)) ? "y" : "x";
9444
+ return Zw.has(dn(e)) ? "y" : "x";
9440
9445
  }
9441
9446
  function Sa(e) {
9442
9447
  return wa(en(e));
@@ -9469,7 +9474,7 @@ function ry(e, t, n) {
9469
9474
  }
9470
9475
  function oy(e, t, n, r) {
9471
9476
  const o = mr(e);
9472
- let s = ry(fn(e), n === "start", r);
9477
+ let s = ry(dn(e), n === "start", r);
9473
9478
  return o && (s = s.map((i) => i + "-" + o), t && (s = s.concat(s.map(Ii)))), s;
9474
9479
  }
9475
9480
  function Wo(e) {
@@ -9515,7 +9520,7 @@ function cl(e, t, n) {
9515
9520
  reference: r,
9516
9521
  floating: o
9517
9522
  } = e;
9518
- const s = en(t), i = Sa(t), a = ya(i), l = fn(t), u = s === "y", d = r.x + r.width / 2 - o.width / 2, h = r.y + r.height / 2 - o.height / 2, m = r[a] / 2 - o[a] / 2;
9523
+ const s = en(t), i = Sa(t), a = ya(i), l = dn(t), u = s === "y", d = r.x + r.width / 2 - o.width / 2, h = r.y + r.height / 2 - o.height / 2, m = r[a] / 2 - o[a] / 2;
9519
9524
  let w;
9520
9525
  switch (l) {
9521
9526
  case "top":
@@ -9635,7 +9640,7 @@ async function Fr(e, t) {
9635
9640
  elementContext: h = "floating",
9636
9641
  altBoundary: m = !1,
9637
9642
  padding: w = 0
9638
- } = dn(t, e), x = Cd(w), p = a[m ? h === "floating" ? "reference" : "floating" : h], g = Vo(await s.getClippingRect({
9643
+ } = un(t, e), x = Cd(w), p = a[m ? h === "floating" ? "reference" : "floating" : h], g = Vo(await s.getClippingRect({
9639
9644
  element: (n = await (s.isElement == null ? void 0 : s.isElement(p))) == null || n ? p : p.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(a.floating)),
9640
9645
  boundary: u,
9641
9646
  rootBoundary: d,
@@ -9679,7 +9684,7 @@ const ay = (e) => ({
9679
9684
  } = t, {
9680
9685
  element: u,
9681
9686
  padding: d = 0
9682
- } = dn(e, t) || {};
9687
+ } = un(e, t) || {};
9683
9688
  if (u == null)
9684
9689
  return {};
9685
9690
  const h = Cd(d), m = {
@@ -9722,10 +9727,10 @@ const ay = (e) => ({
9722
9727
  fallbackAxisSideDirection: x = "none",
9723
9728
  flipAlignment: v = !0,
9724
9729
  ...p
9725
- } = dn(e, t);
9730
+ } = un(e, t);
9726
9731
  if ((n = s.arrow) != null && n.alignmentOffset)
9727
9732
  return {};
9728
- const g = fn(o), b = en(a), y = fn(a) === a, R = await (l.isRTL == null ? void 0 : l.isRTL(u.floating)), S = m || (y || !v ? [Wo(a)] : ey(a)), C = x !== "none";
9733
+ const g = dn(o), b = en(a), y = dn(a) === a, R = await (l.isRTL == null ? void 0 : l.isRTL(u.floating)), S = m || (y || !v ? [Wo(a)] : ey(a)), C = x !== "none";
9729
9734
  !m && C && S.push(...oy(a, v, x, R));
9730
9735
  const E = [a, ...S], N = await Fr(t, p), I = [];
9731
9736
  let j = ((r = s.flip) == null ? void 0 : r.overflows) || [];
@@ -9758,13 +9763,13 @@ const ay = (e) => ({
9758
9763
  var G;
9759
9764
  const oe = (G = j.filter((O) => {
9760
9765
  if (C) {
9761
- const D = en(O.placement);
9762
- return D === b || // Create a bias to the `y` side axis due to horizontal
9766
+ const L = en(O.placement);
9767
+ return L === b || // Create a bias to the `y` side axis due to horizontal
9763
9768
  // reading directions favoring greater width.
9764
- D === "y";
9769
+ L === "y";
9765
9770
  }
9766
9771
  return !0;
9767
- }).map((O) => [O.placement, O.overflows.filter((D) => D > 0).reduce((D, K) => D + K, 0)]).sort((O, D) => O[1] - D[1])[0]) == null ? void 0 : G[0];
9772
+ }).map((O) => [O.placement, O.overflows.filter((L) => L > 0).reduce((L, K) => L + K, 0)]).sort((O, L) => O[1] - L[1])[0]) == null ? void 0 : G[0];
9768
9773
  oe && (U = oe);
9769
9774
  break;
9770
9775
  }
@@ -9804,7 +9809,7 @@ const ly = function(e) {
9804
9809
  } = t, {
9805
9810
  strategy: r = "referenceHidden",
9806
9811
  ...o
9807
- } = dn(e, t);
9812
+ } = un(e, t);
9808
9813
  switch (r) {
9809
9814
  case "referenceHidden": {
9810
9815
  const s = await Fr(t, {
@@ -9841,7 +9846,7 @@ async function uy(e, t) {
9841
9846
  placement: n,
9842
9847
  platform: r,
9843
9848
  elements: o
9844
- } = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = fn(n), a = mr(n), l = en(n) === "y", u = Td.has(i) ? -1 : 1, d = s && l ? -1 : 1, h = dn(t, e);
9849
+ } = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = dn(n), a = mr(n), l = en(n) === "y", u = Td.has(i) ? -1 : 1, d = s && l ? -1 : 1, h = un(t, e);
9845
9850
  let {
9846
9851
  mainAxis: m,
9847
9852
  crossAxis: w,
@@ -9910,10 +9915,10 @@ const dy = function(e) {
9910
9915
  }
9911
9916
  },
9912
9917
  ...l
9913
- } = dn(e, t), u = {
9918
+ } = un(e, t), u = {
9914
9919
  x: n,
9915
9920
  y: r
9916
- }, d = await Fr(t, l), h = en(fn(o)), m = wa(h);
9921
+ }, d = await Fr(t, l), h = en(dn(o)), m = wa(h);
9917
9922
  let w = u[m], x = u[h];
9918
9923
  if (s) {
9919
9924
  const p = m === "y" ? "top" : "left", g = m === "y" ? "bottom" : "right", b = w + d[p], y = w - d[g];
@@ -9955,12 +9960,12 @@ const dy = function(e) {
9955
9960
  offset: a = 0,
9956
9961
  mainAxis: l = !0,
9957
9962
  crossAxis: u = !0
9958
- } = dn(e, t), d = {
9963
+ } = un(e, t), d = {
9959
9964
  x: n,
9960
9965
  y: r
9961
9966
  }, h = en(o), m = wa(h);
9962
9967
  let w = d[m], x = d[h];
9963
- const v = dn(a, t), p = typeof v == "number" ? {
9968
+ const v = un(a, t), p = typeof v == "number" ? {
9964
9969
  mainAxis: v,
9965
9970
  crossAxis: 0
9966
9971
  } : {
@@ -9974,7 +9979,7 @@ const dy = function(e) {
9974
9979
  }
9975
9980
  if (u) {
9976
9981
  var g, b;
9977
- const y = m === "y" ? "width" : "height", R = Td.has(fn(o)), S = s.reference[h] - s.floating[y] + (R && ((g = i.offset) == null ? void 0 : g[h]) || 0) + (R ? 0 : p.crossAxis), C = s.reference[h] + s.reference[y] + (R ? 0 : ((b = i.offset) == null ? void 0 : b[h]) || 0) - (R ? p.crossAxis : 0);
9982
+ const y = m === "y" ? "width" : "height", R = Td.has(dn(o)), S = s.reference[h] - s.floating[y] + (R && ((g = i.offset) == null ? void 0 : g[h]) || 0) + (R ? 0 : p.crossAxis), C = s.reference[h] + s.reference[y] + (R ? 0 : ((b = i.offset) == null ? void 0 : b[h]) || 0) - (R ? p.crossAxis : 0);
9978
9983
  x < S ? x = S : x > C && (x = C);
9979
9984
  }
9980
9985
  return {
@@ -9998,7 +10003,7 @@ const dy = function(e) {
9998
10003
  apply: l = () => {
9999
10004
  },
10000
10005
  ...u
10001
- } = dn(e, t), d = await Fr(t, u), h = fn(o), m = mr(o), w = en(o) === "y", {
10006
+ } = un(e, t), d = await Fr(t, u), h = dn(o), m = mr(o), w = en(o) === "y", {
10002
10007
  width: x,
10003
10008
  height: v
10004
10009
  } = s.floating;
@@ -10602,9 +10607,9 @@ function Xy(e) {
10602
10607
  strategy: n,
10603
10608
  middleware: m
10604
10609
  };
10605
- P.current && (O.platform = P.current), Ky(C.current, E.current, O).then((D) => {
10610
+ P.current && (O.platform = P.current), Ky(C.current, E.current, O).then((L) => {
10606
10611
  const K = {
10607
- ...D,
10612
+ ...L,
10608
10613
  // The floating element's position may be recomputed while it's closed
10609
10614
  // but still mounted (such as when transitioning out). To ensure
10610
10615
  // `isPositioned` will be `false` initially on the next open, avoid
@@ -10648,16 +10653,16 @@ function Xy(e) {
10648
10653
  };
10649
10654
  if (!U.floating)
10650
10655
  return O;
10651
- const D = ml(U.floating, d.x), K = ml(U.floating, d.y);
10656
+ const L = ml(U.floating, d.x), K = ml(U.floating, d.y);
10652
10657
  return a ? {
10653
10658
  ...O,
10654
- transform: "translate(" + D + "px, " + K + "px)",
10659
+ transform: "translate(" + L + "px, " + K + "px)",
10655
10660
  ..._d(U.floating) >= 1.5 && {
10656
10661
  willChange: "transform"
10657
10662
  }
10658
10663
  } : {
10659
10664
  position: n,
10660
- left: D,
10665
+ left: L,
10661
10666
  top: K
10662
10667
  };
10663
10668
  }, [n, a, U.floating, d.x, d.y]);
@@ -10819,11 +10824,11 @@ var Ia = "PopperContent", [c0, l0] = Dd(Ia), Hd = f.forwardRef(
10819
10824
  f0({ arrowWidth: E, arrowHeight: N }),
10820
10825
  m && r0({ strategy: "referenceHidden", ...G })
10821
10826
  ]
10822
- }), [D, K] = Wd(U), W = lt(x);
10827
+ }), [L, K] = Wd(U), W = lt(x);
10823
10828
  it(() => {
10824
10829
  oe && (W == null || W());
10825
10830
  }, [oe, W]);
10826
- const ee = (F = O.arrow) == null ? void 0 : F.x, L = (A = O.arrow) == null ? void 0 : A.y, Z = ((H = O.arrow) == null ? void 0 : H.centerOffset) !== 0, [pe, he] = f.useState();
10831
+ const ee = (F = O.arrow) == null ? void 0 : F.x, M = (A = O.arrow) == null ? void 0 : A.y, Z = ((H = O.arrow) == null ? void 0 : H.centerOffset) !== 0, [pe, he] = f.useState();
10827
10832
  return it(() => {
10828
10833
  g && he(window.getComputedStyle(g).zIndex);
10829
10834
  }, [g]), /* @__PURE__ */ c.jsx(
@@ -10854,15 +10859,15 @@ var Ia = "PopperContent", [c0, l0] = Dd(Ia), Hd = f.forwardRef(
10854
10859
  c0,
10855
10860
  {
10856
10861
  scope: n,
10857
- placedSide: D,
10862
+ placedSide: L,
10858
10863
  onArrowChange: S,
10859
10864
  arrowX: ee,
10860
- arrowY: L,
10865
+ arrowY: M,
10861
10866
  shouldHideArrow: Z,
10862
10867
  children: /* @__PURE__ */ c.jsx(
10863
10868
  ve.div,
10864
10869
  {
10865
- "data-side": D,
10870
+ "data-side": L,
10866
10871
  "data-align": K,
10867
10872
  ...v,
10868
10873
  ref: y,
@@ -11227,17 +11232,17 @@ var Mt = "MenuContent", [M0, Ma] = Un(Mt), rf = f.forwardRef(
11227
11232
  onDismiss: w,
11228
11233
  disableOutsideScroll: x,
11229
11234
  ...v
11230
- } = e, p = Wn(Mt, n), g = no(Mt, n), b = Ss(n), y = Qd(n), R = j0(n), [S, C] = f.useState(null), E = f.useRef(null), N = Ee(t, E, p.onContentChange), I = f.useRef(0), j = f.useRef(""), P = f.useRef(0), B = f.useRef(null), G = f.useRef("right"), _ = f.useRef(0), Y = x ? hs : f.Fragment, U = x ? { as: F0, allowPinchZoom: !0 } : void 0, oe = (D) => {
11235
+ } = e, p = Wn(Mt, n), g = no(Mt, n), b = Ss(n), y = Qd(n), R = j0(n), [S, C] = f.useState(null), E = f.useRef(null), N = Ee(t, E, p.onContentChange), I = f.useRef(0), j = f.useRef(""), P = f.useRef(0), B = f.useRef(null), G = f.useRef("right"), _ = f.useRef(0), Y = x ? hs : f.Fragment, U = x ? { as: F0, allowPinchZoom: !0 } : void 0, oe = (L) => {
11231
11236
  var F, A;
11232
- const K = j.current + D, W = R().filter((H) => !H.disabled), ee = document.activeElement, L = (F = W.find((H) => H.ref.current === ee)) == null ? void 0 : F.textValue, Z = W.map((H) => H.textValue), pe = X0(Z, K, L), he = (A = W.find((H) => H.textValue === pe)) == null ? void 0 : A.ref.current;
11237
+ const K = j.current + L, W = R().filter((H) => !H.disabled), ee = document.activeElement, M = (F = W.find((H) => H.ref.current === ee)) == null ? void 0 : F.textValue, Z = W.map((H) => H.textValue), pe = X0(Z, K, M), he = (A = W.find((H) => H.textValue === pe)) == null ? void 0 : A.ref.current;
11233
11238
  (function H(J) {
11234
11239
  j.current = J, window.clearTimeout(I.current), J !== "" && (I.current = window.setTimeout(() => H(""), 1e3));
11235
11240
  })(K), he && setTimeout(() => he.focus());
11236
11241
  };
11237
11242
  f.useEffect(() => () => window.clearTimeout(I.current), []), pa();
11238
- const O = f.useCallback((D) => {
11243
+ const O = f.useCallback((L) => {
11239
11244
  var W, ee;
11240
- return G.current === ((W = B.current) == null ? void 0 : W.side) && Z0(D, (ee = B.current) == null ? void 0 : ee.area);
11245
+ return G.current === ((W = B.current) == null ? void 0 : W.side) && Z0(L, (ee = B.current) == null ? void 0 : ee.area);
11241
11246
  }, []);
11242
11247
  return /* @__PURE__ */ c.jsx(
11243
11248
  M0,
@@ -11245,36 +11250,36 @@ var Mt = "MenuContent", [M0, Ma] = Un(Mt), rf = f.forwardRef(
11245
11250
  scope: n,
11246
11251
  searchRef: j,
11247
11252
  onItemEnter: f.useCallback(
11248
- (D) => {
11249
- O(D) && D.preventDefault();
11253
+ (L) => {
11254
+ O(L) && L.preventDefault();
11250
11255
  },
11251
11256
  [O]
11252
11257
  ),
11253
11258
  onItemLeave: f.useCallback(
11254
- (D) => {
11259
+ (L) => {
11255
11260
  var K;
11256
- O(D) || ((K = E.current) == null || K.focus(), C(null));
11261
+ O(L) || ((K = E.current) == null || K.focus(), C(null));
11257
11262
  },
11258
11263
  [O]
11259
11264
  ),
11260
11265
  onTriggerLeave: f.useCallback(
11261
- (D) => {
11262
- O(D) && D.preventDefault();
11266
+ (L) => {
11267
+ O(L) && L.preventDefault();
11263
11268
  },
11264
11269
  [O]
11265
11270
  ),
11266
11271
  pointerGraceTimerRef: P,
11267
- onPointerGraceIntentChange: f.useCallback((D) => {
11268
- B.current = D;
11272
+ onPointerGraceIntentChange: f.useCallback((L) => {
11273
+ B.current = L;
11269
11274
  }, []),
11270
11275
  children: /* @__PURE__ */ c.jsx(Y, { ...U, children: /* @__PURE__ */ c.jsx(
11271
11276
  us,
11272
11277
  {
11273
11278
  asChild: !0,
11274
11279
  trapped: o,
11275
- onMountAutoFocus: Q(s, (D) => {
11280
+ onMountAutoFocus: Q(s, (L) => {
11276
11281
  var K;
11277
- D.preventDefault(), (K = E.current) == null || K.focus({ preventScroll: !0 });
11282
+ L.preventDefault(), (K = E.current) == null || K.focus({ preventScroll: !0 });
11278
11283
  }),
11279
11284
  onUnmountAutoFocus: i,
11280
11285
  children: /* @__PURE__ */ c.jsx(
@@ -11297,8 +11302,8 @@ var Mt = "MenuContent", [M0, Ma] = Un(Mt), rf = f.forwardRef(
11297
11302
  loop: r,
11298
11303
  currentTabStopId: S,
11299
11304
  onCurrentTabStopIdChange: C,
11300
- onEntryFocus: Q(l, (D) => {
11301
- g.isUsingKeyboardRef.current || D.preventDefault();
11305
+ onEntryFocus: Q(l, (L) => {
11306
+ g.isUsingKeyboardRef.current || L.preventDefault();
11302
11307
  }),
11303
11308
  preventScrollOnEntryFocus: !0,
11304
11309
  children: /* @__PURE__ */ c.jsx(
@@ -11313,25 +11318,25 @@ var Mt = "MenuContent", [M0, Ma] = Un(Mt), rf = f.forwardRef(
11313
11318
  ...v,
11314
11319
  ref: N,
11315
11320
  style: { outline: "none", ...v.style },
11316
- onKeyDown: Q(v.onKeyDown, (D) => {
11317
- const W = D.target.closest("[data-radix-menu-content]") === D.currentTarget, ee = D.ctrlKey || D.altKey || D.metaKey, L = D.key.length === 1;
11318
- W && (D.key === "Tab" && D.preventDefault(), !ee && L && oe(D.key));
11321
+ onKeyDown: Q(v.onKeyDown, (L) => {
11322
+ const W = L.target.closest("[data-radix-menu-content]") === L.currentTarget, ee = L.ctrlKey || L.altKey || L.metaKey, M = L.key.length === 1;
11323
+ W && (L.key === "Tab" && L.preventDefault(), !ee && M && oe(L.key));
11319
11324
  const Z = E.current;
11320
- if (D.target !== Z || !E0.includes(D.key)) return;
11321
- D.preventDefault();
11325
+ if (L.target !== Z || !E0.includes(L.key)) return;
11326
+ L.preventDefault();
11322
11327
  const he = R().filter((F) => !F.disabled).map((F) => F.ref.current);
11323
- Jd.includes(D.key) && he.reverse(), Y0(he);
11328
+ Jd.includes(L.key) && he.reverse(), Y0(he);
11324
11329
  }),
11325
- onBlur: Q(e.onBlur, (D) => {
11326
- D.currentTarget.contains(D.target) || (window.clearTimeout(I.current), j.current = "");
11330
+ onBlur: Q(e.onBlur, (L) => {
11331
+ L.currentTarget.contains(L.target) || (window.clearTimeout(I.current), j.current = "");
11327
11332
  }),
11328
11333
  onPointerMove: Q(
11329
11334
  e.onPointerMove,
11330
- Hr((D) => {
11331
- const K = D.target, W = _.current !== D.clientX;
11332
- if (D.currentTarget.contains(K) && W) {
11333
- const ee = D.clientX > _.current ? "right" : "left";
11334
- G.current = ee, _.current = D.clientX;
11335
+ Hr((L) => {
11336
+ const K = L.target, W = _.current !== L.clientX;
11337
+ if (L.currentTarget.contains(K) && W) {
11338
+ const ee = L.clientX > _.current ? "right" : "left";
11339
+ G.current = ee, _.current = L.clientX;
11335
11340
  }
11336
11341
  })
11337
11342
  )
@@ -11865,7 +11870,7 @@ const OS = AS, MS = PS, DS = f.forwardRef(({ className: e, inset: t, children: n
11865
11870
  Uf,
11866
11871
  {
11867
11872
  ref: o,
11868
- className: M(
11873
+ className: D(
11869
11874
  "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
11870
11875
  t && "pl-8",
11871
11876
  e
@@ -11882,7 +11887,7 @@ const LS = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
11882
11887
  Wf,
11883
11888
  {
11884
11889
  ref: n,
11885
- className: M(
11890
+ className: D(
11886
11891
  "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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",
11887
11892
  e
11888
11893
  ),
@@ -11895,7 +11900,7 @@ const Vf = f.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__
11895
11900
  {
11896
11901
  ref: r,
11897
11902
  sideOffset: t,
11898
- className: M(
11903
+ className: D(
11899
11904
  "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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",
11900
11905
  e
11901
11906
  ),
@@ -11907,7 +11912,7 @@ const Pi = f.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
11907
11912
  Ff,
11908
11913
  {
11909
11914
  ref: r,
11910
- className: M(
11915
+ className: D(
11911
11916
  "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
11912
11917
  t && "pl-8",
11913
11918
  e
@@ -11920,7 +11925,7 @@ const FS = f.forwardRef(({ className: e, children: t, checked: n, ...r }, o) =>
11920
11925
  Bf,
11921
11926
  {
11922
11927
  ref: o,
11923
- className: M(
11928
+ className: D(
11924
11929
  "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
11925
11930
  e
11926
11931
  ),
@@ -11937,7 +11942,7 @@ const BS = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
11937
11942
  $f,
11938
11943
  {
11939
11944
  ref: r,
11940
- className: M(
11945
+ className: D(
11941
11946
  "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
11942
11947
  e
11943
11948
  ),
@@ -11953,7 +11958,7 @@ const $S = f.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
11953
11958
  Lf,
11954
11959
  {
11955
11960
  ref: r,
11956
- className: M(
11961
+ className: D(
11957
11962
  "px-2 py-1.5 text-sm font-semibold",
11958
11963
  t && "pl-8",
11959
11964
  e
@@ -11966,7 +11971,7 @@ const HS = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
11966
11971
  zf,
11967
11972
  {
11968
11973
  ref: n,
11969
- className: M("-mx-1 my-1 h-px bg-muted", e),
11974
+ className: D("-mx-1 my-1 h-px bg-muted", e),
11970
11975
  ...t
11971
11976
  }
11972
11977
  ));
@@ -12005,14 +12010,14 @@ function ko({
12005
12010
  loadOlderMessages: B,
12006
12011
  isPostStreamFetch: G,
12007
12012
  api: _
12008
- } = Yi(), [Y, U] = ue(null), [oe, O] = ue(""), [D, K] = ue(null), [W, ee] = ue([]), [L, Z] = ue(!1), [pe, he] = ue(null), [F, A] = ue(null), [H, J] = ue(!1), [ce, se] = ue(null), [Ae, _e] = ue([]), [je, ie] = ue(null), [Ne, Ce] = ue(null), [fe, Te] = ue(!1), Be = Ke(null), st = Ke(null), et = Ke(null), [xt, at] = ue("desktop");
12009
- Ze(() => {
12013
+ } = Yi(), [Y, U] = ue(null), [oe, O] = ue(""), [L, K] = ue(null), [W, ee] = ue([]), [M, Z] = ue(!1), [pe, he] = ue(null), [F, A] = ue(null), [H, J] = ue(!1), [ce, se] = ue(null), [Ae, _e] = ue([]), [je, ie] = ue(null), [Ne, Ce] = ue(null), [fe, Te] = ue(!1), Be = We(null), st = We(null), et = We(null), [xt, at] = ue("desktop");
12014
+ Xe(() => {
12010
12015
  const te = () => {
12011
12016
  const le = window.innerWidth;
12012
12017
  at(le < 640 ? "phone" : le < 1024 ? "tablet" : "desktop");
12013
12018
  };
12014
12019
  return te(), window.addEventListener("resize", te), () => window.removeEventListener("resize", te);
12015
- }, []), Ze(() => {
12020
+ }, []), Xe(() => {
12016
12021
  let te = !1;
12017
12022
  if (!x) {
12018
12023
  _e([]), ie(null), Ce(null), et.current = null;
@@ -12041,7 +12046,7 @@ function ko({
12041
12046
  }), () => {
12042
12047
  te = !0;
12043
12048
  };
12044
- }, [x, S, C, je, E]), Ze(() => {
12049
+ }, [x, S, C, je, E]), Xe(() => {
12045
12050
  S && (ie(S), Ce(C ?? null));
12046
12051
  }, [S, C]);
12047
12052
  const an = Ue(async () => {
@@ -12052,7 +12057,7 @@ function ko({
12052
12057
  console.warn("loadOlderMessages failed", te);
12053
12058
  }
12054
12059
  }, [j, P, B]);
12055
- Ze(() => {
12060
+ Xe(() => {
12056
12061
  (async () => {
12057
12062
  try {
12058
12063
  const le = await _.getAgent("default");
@@ -12061,7 +12066,7 @@ function ko({
12061
12066
  console.warn("Failed to fetch default message:", le), se(null);
12062
12067
  }
12063
12068
  })();
12064
- }, [_]), Ze(() => {
12069
+ }, [_]), Xe(() => {
12065
12070
  b && !H && (w == null || w(b));
12066
12071
  }, [b, H, w]);
12067
12072
  const V = (te) => {
@@ -12158,7 +12163,7 @@ function ko({
12158
12163
  Te(!1);
12159
12164
  }
12160
12165
  }
12161
- }, cn = `flex flex-1 w-full flex-col min-h-0 min-w-0 max-h-full overflow-hidden bg-transparent ${e} ${d.container || ""}`, Yt = `flex-1 min-h-0 min-w-0 max-h-full w-full overflow-y-auto overflow-x-auto overscroll-contain break-words break-anywhere p-4 bg-transparent ${d.messagesArea || ""}`, hn = `flex-shrink-0 w-full border-t p-4 bg-transparent ${d.inputArea || ""}`;
12166
+ }, cn = `flex flex-1 w-full flex-col min-h-0 min-w-0 max-h-full overflow-hidden bg-transparent ${e} ${d.container || ""}`, Yt = `flex-1 min-h-0 min-w-0 max-h-full w-full overflow-hidden overscroll-contain break-words break-anywhere p-4 bg-transparent ${d.messagesArea || ""}`, fn = `flex-shrink-0 w-full border-t p-4 bg-transparent ${d.inputArea || ""}`;
12162
12167
  return /* @__PURE__ */ c.jsxs("div", { className: cn, children: [
12163
12168
  !!b && !H && /* @__PURE__ */ c.jsxs("div", { className: "flex-shrink-0 bg-red-50 border border-red-200 text-red-800 px-4 py-2 text-sm flex items-center justify-between", children: [
12164
12169
  /* @__PURE__ */ c.jsx("span", { children: b }),
@@ -12218,7 +12223,7 @@ function ko({
12218
12223
  isNavigatingCheckpoint: fe || G
12219
12224
  }
12220
12225
  ),
12221
- /* @__PURE__ */ c.jsxs("div", { className: hn, children: [
12226
+ /* @__PURE__ */ c.jsxs("div", { className: fn, children: [
12222
12227
  Y && /* @__PURE__ */ c.jsx("div", { className: "mb-3 p-3 bg-blue-50 border border-blue-200 rounded-lg", children: /* @__PURE__ */ c.jsxs("div", { className: "flex items-center justify-between", children: [
12223
12228
  /* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-2", children: [
12224
12229
  /* @__PURE__ */ c.jsx(Rl, { size: 16, className: "text-blue-600" }),
@@ -12274,15 +12279,15 @@ function ko({
12274
12279
  className: "hidden"
12275
12280
  }
12276
12281
  ),
12277
- L && /* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
12282
+ M && /* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
12278
12283
  /* @__PURE__ */ c.jsx(Jp, { className: "h-4 w-4 animate-spin" }),
12279
12284
  " Uploading Excel file..."
12280
12285
  ] }),
12281
- F && !L && /* @__PURE__ */ c.jsx("div", { className: "text-sm rounded border border-emerald-200 bg-emerald-50 px-3 py-2 text-emerald-700", children: F }),
12282
- pe && !L && /* @__PURE__ */ c.jsx("div", { className: "text-sm rounded border border-red-200 bg-red-50 px-3 py-2 text-red-600", children: pe })
12286
+ F && !M && /* @__PURE__ */ c.jsx("div", { className: "text-sm rounded border border-emerald-200 bg-emerald-50 px-3 py-2 text-emerald-700", children: F }),
12287
+ pe && !M && /* @__PURE__ */ c.jsx("div", { className: "text-sm rounded border border-red-200 bg-red-50 px-3 py-2 text-red-600", children: pe })
12283
12288
  ] })
12284
12289
  ] }),
12285
- D && /* @__PURE__ */ c.jsx("div", { className: "mb-3 text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2", children: D }),
12290
+ L && /* @__PURE__ */ c.jsx("div", { className: "mb-3 text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2", children: L }),
12286
12291
  /* @__PURE__ */ c.jsxs("div", { className: "flex items-end gap-2", children: [
12287
12292
  (a || l) && /* @__PURE__ */ c.jsxs(OS, { children: [
12288
12293
  /* @__PURE__ */ c.jsx(MS, { asChild: !0, children: /* @__PURE__ */ c.jsx(
@@ -12310,9 +12315,9 @@ function ko({
12310
12315
  {
12311
12316
  onClick: () => {
12312
12317
  var te;
12313
- L || (te = st.current) == null || te.click();
12318
+ M || (te = st.current) == null || te.click();
12314
12319
  },
12315
- className: `cursor-pointer ${L ? "opacity-60 pointer-events-none" : ""}`,
12320
+ className: `cursor-pointer ${M ? "opacity-60 pointer-events-none" : ""}`,
12316
12321
  children: [
12317
12322
  /* @__PURE__ */ c.jsx(Qp, { className: "h-4 w-4 mr-2" }),
12318
12323
  " Upload Excel file"
@@ -12334,7 +12339,7 @@ function ko({
12334
12339
  onCancelEdit: we,
12335
12340
  onStop: R,
12336
12341
  allowEmptySend: W.length > 0,
12337
- textareaClassName: `resize-none min-h-[44px] max-h-[20rem] w-full transition-colors ${Y ? "border-blue-400 bg-blue-50 text-blue-900 dark:border-blue-500 dark:bg-blue-950/60 dark:text-blue-50" : ""} ${D ? "border-red-400" : ""} ${d.textarea || ""}`
12342
+ textareaClassName: `resize-none min-h-[44px] max-h-[20rem] w-full transition-colors ${Y ? "border-blue-400 bg-blue-50 text-blue-900 dark:border-blue-500 dark:bg-blue-950/60 dark:text-blue-50" : ""} ${L ? "border-red-400" : ""} ${d.textarea || ""}`
12338
12343
  }
12339
12344
  ) })
12340
12345
  ] })
@@ -12346,7 +12351,7 @@ const zr = f.forwardRef(
12346
12351
  "input",
12347
12352
  {
12348
12353
  type: t,
12349
- className: M(
12354
+ className: D(
12350
12355
  "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
12351
12356
  e
12352
12357
  ),
@@ -12874,7 +12879,7 @@ const sh = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
12874
12879
  oh,
12875
12880
  {
12876
12881
  ref: r,
12877
- className: M("relative overflow-hidden", e),
12882
+ className: D("relative overflow-hidden", e),
12878
12883
  ...n,
12879
12884
  children: [
12880
12885
  /* @__PURE__ */ c.jsx(QS, { className: "h-full w-full rounded-[inherit] overflow-auto", children: t }),
@@ -12889,7 +12894,7 @@ const ih = f.forwardRef(({ className: e, orientation: t = "vertical", ...n }, r)
12889
12894
  {
12890
12895
  ref: r,
12891
12896
  orientation: t,
12892
- className: M(
12897
+ className: D(
12893
12898
  "flex touch-none select-none transition-colors",
12894
12899
  t === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
12895
12900
  t === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
@@ -12922,54 +12927,54 @@ function Oi({
12922
12927
  deleteThread: p,
12923
12928
  renameThread: g
12924
12929
  } = Yi(), [b, y] = ue(m ?? []), [R, S] = ue(!1), [C, E] = ue(null), [N, I] = ue(null), [j, P] = ue(""), [B, G] = ue(!1);
12925
- Ze(() => {
12930
+ Xe(() => {
12926
12931
  y(m ?? []);
12927
12932
  }, [m]);
12928
- const _ = async (L) => {
12933
+ const _ = async (M) => {
12929
12934
  try {
12930
- await h(L), a == null || a(L), l == null || l(L);
12935
+ await h(M), a == null || a(M), l == null || l(M);
12931
12936
  } catch (Z) {
12932
12937
  console.error("Failed to select thread:", Z);
12933
12938
  }
12934
12939
  }, Y = async () => {
12935
12940
  try {
12936
12941
  G(!0);
12937
- const L = await v();
12938
- u == null || u(L), a == null || a(L);
12939
- } catch (L) {
12940
- console.error("Failed to create thread:", L);
12942
+ const M = await v();
12943
+ u == null || u(M), a == null || a(M);
12944
+ } catch (M) {
12945
+ console.error("Failed to create thread:", M);
12941
12946
  } finally {
12942
12947
  G(!1);
12943
12948
  }
12944
- }, U = async (L, Z) => {
12949
+ }, U = async (M, Z) => {
12945
12950
  if (Z.stopPropagation(), !!confirm("Delete this thread?"))
12946
12951
  try {
12947
- await p(L), d == null || d(L);
12952
+ await p(M), d == null || d(M);
12948
12953
  } catch (pe) {
12949
12954
  console.error("Failed to delete thread:", pe);
12950
12955
  }
12951
- }, oe = (L, Z) => {
12952
- Z.stopPropagation(), I(L.threadId), P(L.title || `Thread ${L.threadId.slice(0, 8)}`);
12953
- }, O = async (L) => {
12956
+ }, oe = (M, Z) => {
12957
+ Z.stopPropagation(), I(M.threadId), P(M.title || `Thread ${M.threadId.slice(0, 8)}`);
12958
+ }, O = async (M) => {
12954
12959
  if (j.trim())
12955
12960
  try {
12956
- await g(L, j.trim()), I(null), P("");
12961
+ await g(M, j.trim()), I(null), P("");
12957
12962
  } catch (Z) {
12958
12963
  console.error("Failed to update title:", Z);
12959
12964
  }
12960
- }, D = () => {
12965
+ }, L = () => {
12961
12966
  I(null), P("");
12962
- }, K = (L, Z) => {
12963
- L.key === "Enter" ? O(Z) : L.key === "Escape" && D();
12964
- }, W = (L) => {
12965
- if (!L) return "";
12967
+ }, K = (M, Z) => {
12968
+ M.key === "Enter" ? O(Z) : M.key === "Escape" && L();
12969
+ }, W = (M) => {
12970
+ if (!M) return "";
12966
12971
  try {
12967
- const Z = new Date(L), he = (/* @__PURE__ */ new Date()).getTime() - Z.getTime(), F = Math.floor(he / (1e3 * 60 * 60 * 24));
12972
+ const Z = new Date(M), he = (/* @__PURE__ */ new Date()).getTime() - Z.getTime(), F = Math.floor(he / (1e3 * 60 * 60 * 24));
12968
12973
  return F === 0 ? Z.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) : F === 1 ? "Yesterday" : F < 7 ? `${F} days ago` : Z.toLocaleDateString();
12969
12974
  } catch {
12970
12975
  return "";
12971
12976
  }
12972
- }, ee = (L) => L.title || `Thread ${L.threadId.slice(0, 8)}`;
12977
+ }, ee = (M) => M.title || `Thread ${M.threadId.slice(0, 8)}`;
12973
12978
  return /* @__PURE__ */ c.jsxs("div", { className: `flex flex-col h-full ${e} ${s.container || ""}`, children: [
12974
12979
  t && /* @__PURE__ */ c.jsx("div", { className: s.header || "flex-shrink-0 p-2 border-b bg-slate-800 border-slate-700 text-slate-100 flex justify-end", children: /* @__PURE__ */ c.jsx(
12975
12980
  De,
@@ -12991,32 +12996,32 @@ function Oi({
12991
12996
  children: /* @__PURE__ */ c.jsx("div", { className: "p-2 space-y-1 pb-4", children: R ? /* @__PURE__ */ c.jsx("div", { className: "text-center py-8 text-slate-400", children: "Loading…" }) : b.length === 0 ? /* @__PURE__ */ c.jsxs("div", { className: "text-center py-8 text-slate-400", children: [
12992
12997
  /* @__PURE__ */ c.jsx(tm, { className: "w-8 h-8 mx-auto mb-2 opacity-40 text-slate-500" }),
12993
12998
  /* @__PURE__ */ c.jsx("p", { className: "text-sm text-slate-500", children: "No conversations yet" })
12994
- ] }) : b.slice().sort((L, Z) => new Date(Z.updatedAt || Z.createdAt || "").getTime() - new Date(L.updatedAt || L.createdAt || "").getTime()).map((L) => /* @__PURE__ */ c.jsxs(
12999
+ ] }) : b.slice().sort((M, Z) => new Date(Z.updatedAt || Z.createdAt || "").getTime() - new Date(M.updatedAt || M.createdAt || "").getTime()).map((M) => /* @__PURE__ */ c.jsxs(
12995
13000
  "div",
12996
13001
  {
12997
- onClick: () => _(L.threadId),
12998
- className: `group relative p-3 rounded-lg cursor-pointer transition-colors border ${(i ?? x) === L.threadId ? `${s.activeThread || "bg-slate-600 border-slate-500"} ` : `${s.threadItem || "bg-slate-700 border-slate-600 hover:bg-slate-600 text-gray-900 dark:text-slate-100"}`} ${s.threadItem || ""} text-gray-900 dark:text-slate-100`,
13002
+ onClick: () => _(M.threadId),
13003
+ className: `group relative p-3 rounded-lg cursor-pointer transition-colors border ${(i ?? x) === M.threadId ? `${s.activeThread || "bg-slate-600 border-slate-500"} ` : `${s.threadItem || "bg-slate-700 border-slate-600 hover:bg-slate-600 text-gray-900 dark:text-slate-100"}`} ${s.threadItem || ""} text-gray-900 dark:text-slate-100`,
12999
13004
  children: [
13000
13005
  /* @__PURE__ */ c.jsxs("div", { className: "flex items-center justify-between", children: [
13001
- /* @__PURE__ */ c.jsx("div", { className: "flex-1 min-w-0", children: N === L.threadId ? /* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-2", onClick: (Z) => Z.stopPropagation(), children: [
13002
- /* @__PURE__ */ c.jsx(zr, { value: j, onChange: (Z) => P(Z.target.value), onKeyDown: (Z) => K(Z, L.threadId), className: "h-6 text-sm", autoFocus: !0 }),
13003
- /* @__PURE__ */ c.jsx(De, { variant: "ghost", size: "sm", onClick: () => O(L.threadId), className: "h-6 w-6 p-0", children: /* @__PURE__ */ c.jsx(Wi, { size: 12 }) }),
13004
- /* @__PURE__ */ c.jsx(De, { variant: "ghost", size: "sm", onClick: D, className: "h-6 w-6 p-0", children: /* @__PURE__ */ c.jsx(er, { size: 12 }) })
13006
+ /* @__PURE__ */ c.jsx("div", { className: "flex-1 min-w-0", children: N === M.threadId ? /* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-2", onClick: (Z) => Z.stopPropagation(), children: [
13007
+ /* @__PURE__ */ c.jsx(zr, { value: j, onChange: (Z) => P(Z.target.value), onKeyDown: (Z) => K(Z, M.threadId), className: "h-6 text-sm", autoFocus: !0 }),
13008
+ /* @__PURE__ */ c.jsx(De, { variant: "ghost", size: "sm", onClick: () => O(M.threadId), className: "h-6 w-6 p-0", children: /* @__PURE__ */ c.jsx(Wi, { size: 12 }) }),
13009
+ /* @__PURE__ */ c.jsx(De, { variant: "ghost", size: "sm", onClick: L, className: "h-6 w-6 p-0", children: /* @__PURE__ */ c.jsx(er, { size: 12 }) })
13005
13010
  ] }) : /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
13006
- /* @__PURE__ */ c.jsx("div", { className: "font-medium text-sm truncate text-gray-900 dark:text-slate-100", children: ee(L) }),
13011
+ /* @__PURE__ */ c.jsx("div", { className: "font-medium text-sm truncate text-gray-900 dark:text-slate-100", children: ee(M) }),
13007
13012
  /* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-2 text-xs text-gray-500 dark:text-slate-400 mt-1", children: [
13008
13013
  /* @__PURE__ */ c.jsx(nm, { size: 10 }),
13009
- /* @__PURE__ */ c.jsx("span", { children: W(L.updatedAt || L.createdAt) })
13014
+ /* @__PURE__ */ c.jsx("span", { children: W(M.updatedAt || M.createdAt) })
13010
13015
  ] })
13011
13016
  ] }) }),
13012
13017
  /* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity ml-2", children: [
13013
- r && N !== L.threadId && /* @__PURE__ */ c.jsx(De, { variant: "ghost", size: "sm", onClick: (Z) => oe(L, Z), className: "h-6 w-6 p-0", title: "Edit title", children: /* @__PURE__ */ c.jsx(Rl, { size: 12 }) }),
13018
+ r && N !== M.threadId && /* @__PURE__ */ c.jsx(De, { variant: "ghost", size: "sm", onClick: (Z) => oe(M, Z), className: "h-6 w-6 p-0", title: "Edit title", children: /* @__PURE__ */ c.jsx(Rl, { size: 12 }) }),
13014
13019
  n && /* @__PURE__ */ c.jsx(
13015
13020
  De,
13016
13021
  {
13017
13022
  variant: "ghost",
13018
13023
  size: "sm",
13019
- onClick: (Z) => U(L.threadId, Z),
13024
+ onClick: (Z) => U(M.threadId, Z),
13020
13025
  className: "h-6 w-6 p-0 text-red-400 hover:text-red-300 hover:bg-red-900/20",
13021
13026
  title: "Delete thread",
13022
13027
  children: /* @__PURE__ */ c.jsx(rm, { size: 12 })
@@ -13024,10 +13029,10 @@ function Oi({
13024
13029
  )
13025
13030
  ] })
13026
13031
  ] }),
13027
- i === L.threadId && /* @__PURE__ */ c.jsx("div", { className: "absolute left-0 top-1/2 -translate-y-1/2 w-1 h-8 bg-blue-400 rounded-r" })
13032
+ i === M.threadId && /* @__PURE__ */ c.jsx("div", { className: "absolute left-0 top-1/2 -translate-y-1/2 w-1 h-8 bg-blue-400 rounded-r" })
13028
13033
  ]
13029
13034
  },
13030
- L.threadId
13035
+ M.threadId
13031
13036
  )) })
13032
13037
  }
13033
13038
  )
@@ -13035,7 +13040,7 @@ function Oi({
13035
13040
  }
13036
13041
  const ah = Sl(null);
13037
13042
  function xR({ children: e, basePath: t = "/chat" }) {
13038
- const n = ln(() => t ? t === "/" ? "" : t.endsWith("/") ? t.slice(0, -1) : t : "/chat", [t]), r = {
13043
+ const n = mn(() => t ? t === "/" ? "" : t.endsWith("/") ? t.slice(0, -1) : t : "/chat", [t]), r = {
13039
13044
  basePath: n,
13040
13045
  buildThreadPath: (o) => `${n}/${o}`,
13041
13046
  buildBasePath: () => n
@@ -13167,7 +13172,7 @@ const Wa = f.forwardRef(
13167
13172
  ref: o,
13168
13173
  decorative: n,
13169
13174
  orientation: t,
13170
- className: M(
13175
+ className: D(
13171
13176
  "shrink-0 bg-border",
13172
13177
  t === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
13173
13178
  e
@@ -13180,7 +13185,7 @@ Wa.displayName = fh.displayName;
13180
13185
  const hh = hd, uC = Nw, dC = pd, ph = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13181
13186
  ms,
13182
13187
  {
13183
- className: M(
13188
+ className: D(
13184
13189
  "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
13185
13190
  e
13186
13191
  ),
@@ -13210,7 +13215,7 @@ const fC = Wr(
13210
13215
  gs,
13211
13216
  {
13212
13217
  ref: o,
13213
- className: M(fC({ side: e }), t),
13218
+ className: D(fC({ side: e }), t),
13214
13219
  ...r,
13215
13220
  children: [
13216
13221
  n,
@@ -13229,7 +13234,7 @@ const mh = ({
13229
13234
  }) => /* @__PURE__ */ c.jsx(
13230
13235
  "div",
13231
13236
  {
13232
- className: M(
13237
+ className: D(
13233
13238
  "flex flex-col space-y-2 text-center sm:text-left",
13234
13239
  e
13235
13240
  ),
@@ -13241,7 +13246,7 @@ const gh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13241
13246
  _n,
13242
13247
  {
13243
13248
  ref: n,
13244
- className: M("text-lg font-semibold text-foreground", e),
13249
+ className: D("text-lg font-semibold text-foreground", e),
13245
13250
  ...t
13246
13251
  }
13247
13252
  ));
@@ -13250,7 +13255,7 @@ const vh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13250
13255
  vs,
13251
13256
  {
13252
13257
  ref: n,
13253
- className: M("text-sm text-muted-foreground", e),
13258
+ className: D("text-sm text-muted-foreground", e),
13254
13259
  ...t
13255
13260
  }
13256
13261
  ));
@@ -13262,7 +13267,7 @@ function bl({
13262
13267
  return /* @__PURE__ */ c.jsx(
13263
13268
  "div",
13264
13269
  {
13265
- className: M("animate-pulse rounded-md bg-muted", e),
13270
+ className: D("animate-pulse rounded-md bg-muted", e),
13266
13271
  ...t
13267
13272
  }
13268
13273
  );
@@ -13601,7 +13606,7 @@ const OC = AC, MC = PC, DC = _C, Ih = f.forwardRef(({ className: e, sideOffset:
13601
13606
  {
13602
13607
  ref: r,
13603
13608
  sideOffset: t,
13604
- className: M(
13609
+ className: D(
13605
13610
  "z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",
13606
13611
  e
13607
13612
  ),
@@ -13659,7 +13664,7 @@ const kh = f.forwardRef(
13659
13664
  "--sidebar-width-icon": HC,
13660
13665
  ...o
13661
13666
  },
13662
- className: M(
13667
+ className: D(
13663
13668
  "group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",
13664
13669
  r
13665
13670
  ),
@@ -13684,7 +13689,7 @@ const Ah = f.forwardRef(
13684
13689
  return n === "none" ? /* @__PURE__ */ c.jsx(
13685
13690
  "div",
13686
13691
  {
13687
- className: M(
13692
+ className: D(
13688
13693
  "flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",
13689
13694
  r
13690
13695
  ),
@@ -13717,7 +13722,7 @@ const Ah = f.forwardRef(
13717
13722
  /* @__PURE__ */ c.jsx(
13718
13723
  "div",
13719
13724
  {
13720
- className: M(
13725
+ className: D(
13721
13726
  "duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear",
13722
13727
  "group-data-[collapsible=offcanvas]:w-0",
13723
13728
  "group-data-[side=right]:rotate-180",
@@ -13728,7 +13733,7 @@ const Ah = f.forwardRef(
13728
13733
  /* @__PURE__ */ c.jsx(
13729
13734
  "div",
13730
13735
  {
13731
- className: M(
13736
+ className: D(
13732
13737
  "duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",
13733
13738
  e === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
13734
13739
  // Adjust the padding for floating and inset variants.
@@ -13761,7 +13766,7 @@ const Ph = f.forwardRef(({ className: e, onClick: t, ...n }, r) => {
13761
13766
  "data-sidebar": "trigger",
13762
13767
  variant: "ghost",
13763
13768
  size: "icon",
13764
- className: M("h-7 w-7", e),
13769
+ className: D("h-7 w-7", e),
13765
13770
  onClick: (s) => {
13766
13771
  t == null || t(s), o();
13767
13772
  },
@@ -13785,7 +13790,7 @@ const UC = f.forwardRef(({ className: e, ...t }, n) => {
13785
13790
  tabIndex: -1,
13786
13791
  onClick: r,
13787
13792
  title: "Toggle Sidebar",
13788
- className: M(
13793
+ className: D(
13789
13794
  "absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex",
13790
13795
  "[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize",
13791
13796
  "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
@@ -13803,7 +13808,7 @@ const _h = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13803
13808
  "main",
13804
13809
  {
13805
13810
  ref: n,
13806
- className: M(
13811
+ className: D(
13807
13812
  "relative flex min-h-svh flex-1 flex-col bg-background",
13808
13813
  "peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",
13809
13814
  e
@@ -13817,7 +13822,7 @@ const WC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13817
13822
  {
13818
13823
  ref: n,
13819
13824
  "data-sidebar": "input",
13820
- className: M(
13825
+ className: D(
13821
13826
  "h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",
13822
13827
  e
13823
13828
  ),
@@ -13830,7 +13835,7 @@ const Oh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13830
13835
  {
13831
13836
  ref: n,
13832
13837
  "data-sidebar": "header",
13833
- className: M("flex flex-col gap-2 p-2", e),
13838
+ className: D("flex flex-col gap-2 p-2", e),
13834
13839
  ...t
13835
13840
  }
13836
13841
  ));
@@ -13840,7 +13845,7 @@ const VC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13840
13845
  {
13841
13846
  ref: n,
13842
13847
  "data-sidebar": "footer",
13843
- className: M("flex flex-col gap-2 p-2", e),
13848
+ className: D("flex flex-col gap-2 p-2", e),
13844
13849
  ...t
13845
13850
  }
13846
13851
  ));
@@ -13850,7 +13855,7 @@ const GC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13850
13855
  {
13851
13856
  ref: n,
13852
13857
  "data-sidebar": "separator",
13853
- className: M("mx-2 w-auto bg-sidebar-border", e),
13858
+ className: D("mx-2 w-auto bg-sidebar-border", e),
13854
13859
  ...t
13855
13860
  }
13856
13861
  ));
@@ -13860,7 +13865,7 @@ const Mh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13860
13865
  {
13861
13866
  ref: n,
13862
13867
  "data-sidebar": "content",
13863
- className: M(
13868
+ className: D(
13864
13869
  "flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
13865
13870
  e
13866
13871
  ),
@@ -13873,7 +13878,7 @@ const Dh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13873
13878
  {
13874
13879
  ref: n,
13875
13880
  "data-sidebar": "group",
13876
- className: M("relative flex w-full min-w-0 flex-col p-2", e),
13881
+ className: D("relative flex w-full min-w-0 flex-col p-2", e),
13877
13882
  ...t
13878
13883
  }
13879
13884
  ));
@@ -13885,7 +13890,7 @@ const Lh = f.forwardRef(({ className: e, asChild: t = !1, ...n }, r) => {
13885
13890
  {
13886
13891
  ref: r,
13887
13892
  "data-sidebar": "group-label",
13888
- className: M(
13893
+ className: D(
13889
13894
  "duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
13890
13895
  "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
13891
13896
  e
@@ -13902,7 +13907,7 @@ const KC = f.forwardRef(({ className: e, asChild: t = !1, ...n }, r) => {
13902
13907
  {
13903
13908
  ref: r,
13904
13909
  "data-sidebar": "group-action",
13905
- className: M(
13910
+ className: D(
13906
13911
  "absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
13907
13912
  // Increases the hit area of the button on mobile.
13908
13913
  "after:absolute after:-inset-2 after:md:hidden",
@@ -13919,7 +13924,7 @@ const Fh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13919
13924
  {
13920
13925
  ref: n,
13921
13926
  "data-sidebar": "group-content",
13922
- className: M("w-full text-sm", e),
13927
+ className: D("w-full text-sm", e),
13923
13928
  ...t
13924
13929
  }
13925
13930
  ));
@@ -13929,7 +13934,7 @@ const Bh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13929
13934
  {
13930
13935
  ref: n,
13931
13936
  "data-sidebar": "menu",
13932
- className: M("flex w-full min-w-0 flex-col gap-1", e),
13937
+ className: D("flex w-full min-w-0 flex-col gap-1", e),
13933
13938
  ...t
13934
13939
  }
13935
13940
  ));
@@ -13939,7 +13944,7 @@ const $h = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13939
13944
  {
13940
13945
  ref: n,
13941
13946
  "data-sidebar": "menu-item",
13942
- className: M("group/menu-item relative", e),
13947
+ className: D("group/menu-item relative", e),
13943
13948
  ...t
13944
13949
  }
13945
13950
  ));
@@ -13980,7 +13985,7 @@ const YC = Wr(
13980
13985
  "data-sidebar": "menu-button",
13981
13986
  "data-size": r,
13982
13987
  "data-active": t,
13983
- className: M(YC({ variant: n, size: r }), s),
13988
+ className: D(YC({ variant: n, size: r }), s),
13984
13989
  ...i
13985
13990
  }
13986
13991
  );
@@ -14008,7 +14013,7 @@ const qC = f.forwardRef(({ className: e, asChild: t = !1, showOnHover: n = !1, .
14008
14013
  {
14009
14014
  ref: o,
14010
14015
  "data-sidebar": "menu-action",
14011
- className: M(
14016
+ className: D(
14012
14017
  "absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0",
14013
14018
  // Increases the hit area of the button on mobile.
14014
14019
  "after:absolute after:-inset-2 after:md:hidden",
@@ -14029,7 +14034,7 @@ const XC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14029
14034
  {
14030
14035
  ref: n,
14031
14036
  "data-sidebar": "menu-badge",
14032
- className: M(
14037
+ className: D(
14033
14038
  "absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none",
14034
14039
  "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
14035
14040
  "peer-data-[size=sm]/menu-button:top-1",
@@ -14049,7 +14054,7 @@ const JC = f.forwardRef(({ className: e, showIcon: t = !1, ...n }, r) => {
14049
14054
  {
14050
14055
  ref: r,
14051
14056
  "data-sidebar": "menu-skeleton",
14052
- className: M("rounded-md h-8 flex gap-2 px-2 items-center", e),
14057
+ className: D("rounded-md h-8 flex gap-2 px-2 items-center", e),
14053
14058
  ...n,
14054
14059
  children: [
14055
14060
  t && /* @__PURE__ */ c.jsx(
@@ -14079,7 +14084,7 @@ const ZC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14079
14084
  {
14080
14085
  ref: n,
14081
14086
  "data-sidebar": "menu-sub",
14082
- className: M(
14087
+ className: D(
14083
14088
  "mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5",
14084
14089
  "group-data-[collapsible=icon]:hidden",
14085
14090
  e
@@ -14099,7 +14104,7 @@ const eT = f.forwardRef(({ asChild: e = !1, size: t = "md", isActive: n, classNa
14099
14104
  "data-sidebar": "menu-sub-button",
14100
14105
  "data-size": t,
14101
14106
  "data-active": n,
14102
- className: M(
14107
+ className: D(
14103
14108
  "flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring 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 [&>svg]:text-sidebar-accent-foreground",
14104
14109
  "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
14105
14110
  t === "sm" && "text-xs",
@@ -14166,7 +14171,7 @@ const nT = Wr(
14166
14171
  Uh,
14167
14172
  {
14168
14173
  ref: n,
14169
- className: M(nT(), e),
14174
+ className: D(nT(), e),
14170
14175
  ...t
14171
14176
  }
14172
14177
  ));
@@ -14292,10 +14297,10 @@ function qh(e) {
14292
14297
  return e ? "checked" : "unchecked";
14293
14298
  }
14294
14299
  var Xh = Vh, aT = Kh;
14295
- const mn = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14300
+ const pn = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14296
14301
  Xh,
14297
14302
  {
14298
- className: M(
14303
+ className: D(
14299
14304
  "peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
14300
14305
  e
14301
14306
  ),
@@ -14304,14 +14309,14 @@ const mn = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14304
14309
  children: /* @__PURE__ */ c.jsx(
14305
14310
  aT,
14306
14311
  {
14307
- className: M(
14312
+ className: D(
14308
14313
  "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
14309
14314
  )
14310
14315
  }
14311
14316
  )
14312
14317
  }
14313
14318
  ));
14314
- mn.displayName = Xh.displayName;
14319
+ pn.displayName = Xh.displayName;
14315
14320
  var cT = [" ", "Enter", "ArrowUp", "ArrowDown"], lT = [" ", "Enter"], Bn = "Select", [Ps, _s, uT] = ba(Bn), [xr, ER] = Gt(Bn, [
14316
14321
  uT,
14317
14322
  vr
@@ -14530,24 +14535,24 @@ var Bt = 10, [sp, Rn] = xr($n), gT = "SelectContentImpl", vT = sr("SelectContent
14530
14535
  f.useEffect(() => {
14531
14536
  G && oe();
14532
14537
  }, [G, oe]);
14533
- const { onOpenChange: O, triggerPointerDownPosRef: D } = b;
14538
+ const { onOpenChange: O, triggerPointerDownPosRef: L } = b;
14534
14539
  f.useEffect(() => {
14535
14540
  if (y) {
14536
14541
  let F = { x: 0, y: 0 };
14537
14542
  const A = (J) => {
14538
14543
  var ce, se;
14539
14544
  F = {
14540
- x: Math.abs(Math.round(J.pageX) - (((ce = D.current) == null ? void 0 : ce.x) ?? 0)),
14541
- y: Math.abs(Math.round(J.pageY) - (((se = D.current) == null ? void 0 : se.y) ?? 0))
14545
+ x: Math.abs(Math.round(J.pageX) - (((ce = L.current) == null ? void 0 : ce.x) ?? 0)),
14546
+ y: Math.abs(Math.round(J.pageY) - (((se = L.current) == null ? void 0 : se.y) ?? 0))
14542
14547
  };
14543
14548
  }, H = (J) => {
14544
- F.x <= 10 && F.y <= 10 ? J.preventDefault() : y.contains(J.target) || O(!1), document.removeEventListener("pointermove", A), D.current = null;
14549
+ F.x <= 10 && F.y <= 10 ? J.preventDefault() : y.contains(J.target) || O(!1), document.removeEventListener("pointermove", A), L.current = null;
14545
14550
  };
14546
- return D.current !== null && (document.addEventListener("pointermove", A), document.addEventListener("pointerup", H, { capture: !0, once: !0 })), () => {
14551
+ return L.current !== null && (document.addEventListener("pointermove", A), document.addEventListener("pointerup", H, { capture: !0, once: !0 })), () => {
14547
14552
  document.removeEventListener("pointermove", A), document.removeEventListener("pointerup", H, { capture: !0 });
14548
14553
  };
14549
14554
  }
14550
- }, [y, O, D]), f.useEffect(() => {
14555
+ }, [y, O, L]), f.useEffect(() => {
14551
14556
  const F = () => O(!1);
14552
14557
  return window.addEventListener("blur", F), window.addEventListener("resize", F), () => {
14553
14558
  window.removeEventListener("blur", F), window.removeEventListener("resize", F);
@@ -14562,7 +14567,7 @@ var Bt = 10, [sp, Rn] = xr($n), gT = "SelectContentImpl", vT = sr("SelectContent
14562
14567
  (b.value !== void 0 && b.value === A || J) && (I(F), J && (Y.current = !0));
14563
14568
  },
14564
14569
  [b.value]
14565
- ), L = f.useCallback(() => y == null ? void 0 : y.focus(), [y]), Z = f.useCallback(
14570
+ ), M = f.useCallback(() => y == null ? void 0 : y.focus(), [y]), Z = f.useCallback(
14566
14571
  (F, A, H) => {
14567
14572
  const J = !Y.current && !H;
14568
14573
  (b.value !== void 0 && b.value === A || J) && P(F);
@@ -14589,7 +14594,7 @@ var Bt = 10, [sp, Rn] = xr($n), gT = "SelectContentImpl", vT = sr("SelectContent
14589
14594
  onViewportChange: C,
14590
14595
  itemRefCallback: ee,
14591
14596
  selectedItem: N,
14592
- onItemLeave: L,
14597
+ onItemLeave: M,
14593
14598
  itemTextRefCallback: Z,
14594
14599
  focusSelectedItem: oe,
14595
14600
  selectedItemText: j,
@@ -14681,14 +14686,14 @@ var xT = "SelectItemAlignedPosition", ap = f.forwardRef((e, t) => {
14681
14686
  ]);
14682
14687
  a.style.minWidth = _e + "px", a.style.right = Ne + "px";
14683
14688
  }
14684
- const P = m(), B = window.innerHeight - Bt * 2, G = v.scrollHeight, _ = window.getComputedStyle(u), Y = parseInt(_.borderTopWidth, 10), U = parseInt(_.paddingTop, 10), oe = parseInt(_.borderBottomWidth, 10), O = parseInt(_.paddingBottom, 10), D = Y + U + G + O + oe, K = Math.min(p.offsetHeight * 5, D), W = window.getComputedStyle(v), ee = parseInt(W.paddingTop, 10), L = parseInt(W.paddingBottom, 10), Z = E.top + E.height / 2 - Bt, pe = B - Z, he = p.offsetHeight / 2, F = p.offsetTop + he, A = Y + U + F, H = D - A;
14689
+ const P = m(), B = window.innerHeight - Bt * 2, G = v.scrollHeight, _ = window.getComputedStyle(u), Y = parseInt(_.borderTopWidth, 10), U = parseInt(_.paddingTop, 10), oe = parseInt(_.borderBottomWidth, 10), O = parseInt(_.paddingBottom, 10), L = Y + U + G + O + oe, K = Math.min(p.offsetHeight * 5, L), W = window.getComputedStyle(v), ee = parseInt(W.paddingTop, 10), M = parseInt(W.paddingBottom, 10), Z = E.top + E.height / 2 - Bt, pe = B - Z, he = p.offsetHeight / 2, F = p.offsetTop + he, A = Y + U + F, H = L - A;
14685
14690
  if (A <= Z) {
14686
14691
  const ce = P.length > 0 && p === P[P.length - 1].ref.current;
14687
14692
  a.style.bottom = "0px";
14688
14693
  const se = u.clientHeight - v.offsetTop - v.offsetHeight, Ae = Math.max(
14689
14694
  pe,
14690
14695
  he + // viewport might have padding bottom, include it to avoid a scrollable viewport
14691
- (ce ? L : 0) + se + oe
14696
+ (ce ? M : 0) + se + oe
14692
14697
  ), _e = A + Ae;
14693
14698
  a.style.height = _e + "px";
14694
14699
  } else {
@@ -15121,7 +15126,7 @@ const wl = jT, yl = kT, zi = f.forwardRef(({ className: e, children: t, ...n },
15121
15126
  Rp,
15122
15127
  {
15123
15128
  ref: r,
15124
- className: M(
15129
+ className: D(
15125
15130
  "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
15126
15131
  e
15127
15132
  ),
@@ -15137,7 +15142,7 @@ const Pp = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15137
15142
  jp,
15138
15143
  {
15139
15144
  ref: n,
15140
- className: M(
15145
+ className: D(
15141
15146
  "flex cursor-default items-center justify-center py-1",
15142
15147
  e
15143
15148
  ),
@@ -15150,7 +15155,7 @@ const _p = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15150
15155
  kp,
15151
15156
  {
15152
15157
  ref: n,
15153
- className: M(
15158
+ className: D(
15154
15159
  "flex cursor-default items-center justify-center py-1",
15155
15160
  e
15156
15161
  ),
@@ -15163,7 +15168,7 @@ const Ui = f.forwardRef(({ className: e, children: t, position: n = "popper", ..
15163
15168
  Ep,
15164
15169
  {
15165
15170
  ref: o,
15166
- className: M(
15171
+ className: D(
15167
15172
  "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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",
15168
15173
  n === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
15169
15174
  e
@@ -15175,7 +15180,7 @@ const Ui = f.forwardRef(({ className: e, children: t, position: n = "popper", ..
15175
15180
  /* @__PURE__ */ c.jsx(
15176
15181
  _T,
15177
15182
  {
15178
- className: M(
15183
+ className: D(
15179
15184
  "p-1",
15180
15185
  n === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
15181
15186
  ),
@@ -15191,7 +15196,7 @@ const DT = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15191
15196
  Np,
15192
15197
  {
15193
15198
  ref: n,
15194
- className: M("py-1.5 pl-8 pr-2 text-sm font-semibold", e),
15199
+ className: D("py-1.5 pl-8 pr-2 text-sm font-semibold", e),
15195
15200
  ...t
15196
15201
  }
15197
15202
  ));
@@ -15200,7 +15205,7 @@ const jn = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
15200
15205
  Ip,
15201
15206
  {
15202
15207
  ref: r,
15203
- className: M(
15208
+ className: D(
15204
15209
  "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
15205
15210
  e
15206
15211
  ),
@@ -15216,7 +15221,7 @@ const LT = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15216
15221
  Ap,
15217
15222
  {
15218
15223
  ref: n,
15219
- className: M("-mx-1 my-1 h-px bg-muted", e),
15224
+ className: D("-mx-1 my-1 h-px bg-muted", e),
15220
15225
  ...t
15221
15226
  }
15222
15227
  ));
@@ -15225,7 +15230,7 @@ const Ao = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15225
15230
  "div",
15226
15231
  {
15227
15232
  ref: n,
15228
- className: M(
15233
+ className: D(
15229
15234
  "rounded-lg border bg-card text-card-foreground shadow-sm",
15230
15235
  e
15231
15236
  ),
@@ -15237,7 +15242,7 @@ const Po = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15237
15242
  "div",
15238
15243
  {
15239
15244
  ref: n,
15240
- className: M("flex flex-col space-y-1.5 p-6", e),
15245
+ className: D("flex flex-col space-y-1.5 p-6", e),
15241
15246
  ...t
15242
15247
  }
15243
15248
  ));
@@ -15246,7 +15251,7 @@ const _o = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15246
15251
  "h3",
15247
15252
  {
15248
15253
  ref: n,
15249
- className: M(
15254
+ className: D(
15250
15255
  "text-2xl font-semibold leading-none tracking-tight",
15251
15256
  e
15252
15257
  ),
@@ -15258,18 +15263,18 @@ const FT = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15258
15263
  "p",
15259
15264
  {
15260
15265
  ref: n,
15261
- className: M("text-sm text-muted-foreground", e),
15266
+ className: D("text-sm text-muted-foreground", e),
15262
15267
  ...t
15263
15268
  }
15264
15269
  ));
15265
15270
  FT.displayName = "CardDescription";
15266
- const Oo = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx("div", { ref: n, className: M("p-6 pt-0", e), ...t }));
15271
+ const Oo = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx("div", { ref: n, className: D("p-6 pt-0", e), ...t }));
15267
15272
  Oo.displayName = "CardContent";
15268
15273
  const BT = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15269
15274
  "div",
15270
15275
  {
15271
15276
  ref: n,
15272
- className: M("flex items-center p-6 pt-0", e),
15277
+ className: D("flex items-center p-6 pt-0", e),
15273
15278
  ...t
15274
15279
  }
15275
15280
  ));
@@ -15295,10 +15300,10 @@ const $T = {
15295
15300
  };
15296
15301
  function NR({ settings: e, onSettingsChange: t, className: n = "" }) {
15297
15302
  const [r, o] = ue(!1), [s, i] = ue(!1), [a, l] = ue(e), [u, d] = ue(!1), { toast: h } = ha();
15298
- Ze(() => {
15303
+ Xe(() => {
15299
15304
  const p = JSON.stringify(a) !== JSON.stringify(e);
15300
15305
  d(p);
15301
- }, [a, e]), Ze(() => {
15306
+ }, [a, e]), Xe(() => {
15302
15307
  l(e);
15303
15308
  }, [e]);
15304
15309
  const m = () => {
@@ -15367,7 +15372,7 @@ function NR({ settings: e, onSettingsChange: t, className: n = "" }) {
15367
15372
  /* @__PURE__ */ c.jsxs("div", { className: "flex items-center justify-between", children: [
15368
15373
  /* @__PURE__ */ c.jsx(Pt, { htmlFor: "enable-auth", children: "Enable Authentication" }),
15369
15374
  /* @__PURE__ */ c.jsx(
15370
- mn,
15375
+ pn,
15371
15376
  {
15372
15377
  id: "enable-auth",
15373
15378
  checked: a.api.enableAuth,
@@ -15460,7 +15465,7 @@ function NR({ settings: e, onSettingsChange: t, className: n = "" }) {
15460
15465
  /* @__PURE__ */ c.jsxs("div", { className: "flex items-center justify-between", children: [
15461
15466
  /* @__PURE__ */ c.jsx(Pt, { htmlFor: "show-timestamps", children: "Show Timestamps" }),
15462
15467
  /* @__PURE__ */ c.jsx(
15463
- mn,
15468
+ pn,
15464
15469
  {
15465
15470
  id: "show-timestamps",
15466
15471
  checked: a.ui.showTimestamps,
@@ -15474,7 +15479,7 @@ function NR({ settings: e, onSettingsChange: t, className: n = "" }) {
15474
15479
  /* @__PURE__ */ c.jsxs("div", { className: "flex items-center justify-between", children: [
15475
15480
  /* @__PURE__ */ c.jsx(Pt, { htmlFor: "show-agent-names", children: "Show Agent Names" }),
15476
15481
  /* @__PURE__ */ c.jsx(
15477
- mn,
15482
+ pn,
15478
15483
  {
15479
15484
  id: "show-agent-names",
15480
15485
  checked: a.ui.showAgentNames,
@@ -15488,7 +15493,7 @@ function NR({ settings: e, onSettingsChange: t, className: n = "" }) {
15488
15493
  /* @__PURE__ */ c.jsxs("div", { className: "flex items-center justify-between", children: [
15489
15494
  /* @__PURE__ */ c.jsx(Pt, { htmlFor: "compact-messages", children: "Compact Messages" }),
15490
15495
  /* @__PURE__ */ c.jsx(
15491
- mn,
15496
+ pn,
15492
15497
  {
15493
15498
  id: "compact-messages",
15494
15499
  checked: a.ui.compactMessages,
@@ -15514,7 +15519,7 @@ function NR({ settings: e, onSettingsChange: t, className: n = "" }) {
15514
15519
  /* @__PURE__ */ c.jsx("p", { className: "text-sm text-muted-foreground", children: "Automatically save messages to threads" })
15515
15520
  ] }),
15516
15521
  /* @__PURE__ */ c.jsx(
15517
- mn,
15522
+ pn,
15518
15523
  {
15519
15524
  id: "auto-save",
15520
15525
  checked: a.behavior.autoSave,
@@ -15531,7 +15536,7 @@ function NR({ settings: e, onSettingsChange: t, className: n = "" }) {
15531
15536
  /* @__PURE__ */ c.jsx("p", { className: "text-sm text-muted-foreground", children: "Stream responses in real-time" })
15532
15537
  ] }),
15533
15538
  /* @__PURE__ */ c.jsx(
15534
- mn,
15539
+ pn,
15535
15540
  {
15536
15541
  id: "enable-streaming",
15537
15542
  checked: a.behavior.enableStreaming,
@@ -15548,7 +15553,7 @@ function NR({ settings: e, onSettingsChange: t, className: n = "" }) {
15548
15553
  /* @__PURE__ */ c.jsx("p", { className: "text-sm text-muted-foreground", children: "Show typing indicator during responses" })
15549
15554
  ] }),
15550
15555
  /* @__PURE__ */ c.jsx(
15551
- mn,
15556
+ pn,
15552
15557
  {
15553
15558
  id: "typing-indicator",
15554
15559
  checked: a.behavior.showTypingIndicator,