teodor-new-chat-ui 4.3.83 → 4.3.85

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
@@ -2,7 +2,7 @@ var Om = Object.defineProperty;
2
2
  var Mm = (e, t, n) => t in e ? Om(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var Ol = (e, t, n) => Mm(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import * as g from "react";
5
- import U, { createContext as ko, useContext as js, useReducer as Dm, useRef as Le, useCallback as ke, useEffect as dt, useMemo as it, useState as ye, startTransition as Lo, createElement as Jo, useLayoutEffect as Lm } from "react";
5
+ import U, { createContext as ko, useContext as js, useReducer as Dm, useRef as Le, useCallback as Te, useEffect as dt, useMemo as it, useState as ye, startTransition as Lo, createElement as Jo, useLayoutEffect as Lm } from "react";
6
6
  import { Square as Fm, Send as $m, X as Or, ExternalLink as zm, Download as Bm, Image as Hm, FileText as Ml, Loader as _a, Bot as vi, Wrench as Um, User as Wm, Paperclip as qi, ChevronUp as ja, ChevronDown as Ps, Copy as Dl, Edit as Ll, RotateCcw as Gi, ChevronRight as Vm, Check as Pa, Circle as Km, Loader2 as Yi, Edit3 as Cu, Plus as qm, FileSpreadsheet as Gm, MessageSquarePlus as Ym, MessageSquare as Xm, Calendar as Jm, Trash2 as Zm, Settings as Qm, Server as eg, EyeOff as tg, Eye as ng, Layout as rg, MessageCircle as og, Save as sg } from "lucide-react";
7
7
  import { Slot as ig, createSlot as $r } from "@radix-ui/react-slot";
8
8
  import { cva as Os } from "class-variance-authority";
@@ -136,14 +136,14 @@ function ug() {
136
136
  }
137
137
  return null;
138
138
  }
139
- var _ = Object.assign, D = 0, L, ne, K, z, he, W, ce;
139
+ var _ = Object.assign, D = 0, L, ne, K, z, fe, W, ce;
140
140
  function B() {
141
141
  }
142
142
  B.__reactDisabledLog = !0;
143
143
  function Z() {
144
144
  {
145
145
  if (D === 0) {
146
- L = console.log, ne = console.info, K = console.warn, z = console.error, he = console.group, W = console.groupCollapsed, ce = console.groupEnd;
146
+ L = console.log, ne = console.info, K = console.warn, z = console.error, fe = console.group, W = console.groupCollapsed, ce = console.groupEnd;
147
147
  var R = {
148
148
  configurable: !0,
149
149
  enumerable: !0,
@@ -185,7 +185,7 @@ function ug() {
185
185
  value: z
186
186
  }),
187
187
  group: _({}, R, {
188
- value: he
188
+ value: fe
189
189
  }),
190
190
  groupCollapsed: _({}, R, {
191
191
  value: W
@@ -266,19 +266,19 @@ function ug() {
266
266
  } catch (kt) {
267
267
  if (kt && Ce && typeof kt.stack == "string") {
268
268
  for (var $ = kt.stack.split(`
269
- `), de = Ce.stack.split(`
270
- `), ue = $.length - 1, Te = de.length - 1; ue >= 1 && Te >= 0 && $[ue] !== de[Te]; )
271
- Te--;
272
- for (; ue >= 1 && Te >= 0; ue--, Te--)
273
- if ($[ue] !== de[Te]) {
274
- if (ue !== 1 || Te !== 1)
269
+ `), ue = Ce.stack.split(`
270
+ `), he = $.length - 1, _e = ue.length - 1; he >= 1 && _e >= 0 && $[he] !== ue[_e]; )
271
+ _e--;
272
+ for (; he >= 1 && _e >= 0; he--, _e--)
273
+ if ($[he] !== ue[_e]) {
274
+ if (he !== 1 || _e !== 1)
275
275
  do
276
- if (ue--, Te--, Te < 0 || $[ue] !== de[Te]) {
277
- var Je = `
278
- ` + $[ue].replace(" at new ", " at ");
279
- return R.displayName && Je.includes("<anonymous>") && (Je = Je.replace("<anonymous>", R.displayName)), typeof R == "function" && oe.set(R, Je), Je;
276
+ if (he--, _e--, _e < 0 || $[he] !== ue[_e]) {
277
+ var ot = `
278
+ ` + $[he].replace(" at new ", " at ");
279
+ return R.displayName && ot.includes("<anonymous>") && (ot = ot.replace("<anonymous>", R.displayName)), typeof R == "function" && oe.set(R, ot), ot;
280
280
  }
281
- while (ue >= 1 && Te >= 0);
281
+ while (he >= 1 && _e >= 0);
282
282
  break;
283
283
  }
284
284
  }
@@ -325,7 +325,7 @@ function ug() {
325
325
  return "";
326
326
  }
327
327
  var st = Object.prototype.hasOwnProperty, at = {}, gt = x.ReactDebugCurrentFrame;
328
- function rt(R) {
328
+ function nt(R) {
329
329
  if (R) {
330
330
  var H = R._owner, le = Ke(R.type, R._source, H ? H.type : null);
331
331
  gt.setExtraStackFrame(le);
@@ -340,14 +340,14 @@ function ug() {
340
340
  var $ = void 0;
341
341
  try {
342
342
  if (typeof R[Fe] != "function") {
343
- var de = Error((Ce || "React class") + ": " + le + " type `" + Fe + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof R[Fe] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
344
- throw de.name = "Invariant Violation", de;
343
+ var ue = Error((Ce || "React class") + ": " + le + " type `" + Fe + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof R[Fe] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
344
+ throw ue.name = "Invariant Violation", ue;
345
345
  }
346
346
  $ = R[Fe](H, Fe, Ce, le, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
347
- } catch (ue) {
348
- $ = ue;
347
+ } catch (he) {
348
+ $ = he;
349
349
  }
350
- $ && !($ instanceof Error) && (rt(Ge), w("%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).", Ce || "React class", le, Fe, typeof $), rt(null)), $ instanceof Error && !($.message in at) && (at[$.message] = !0, rt(Ge), w("Failed %s type: %s", le, $.message), rt(null));
350
+ $ && !($ instanceof Error) && (nt(Ge), w("%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).", Ce || "React class", le, Fe, typeof $), nt(null)), $ instanceof Error && !($.message in at) && (at[$.message] = !0, nt(Ge), w("Failed %s type: %s", le, $.message), nt(null));
351
351
  }
352
352
  }
353
353
  }
@@ -363,24 +363,24 @@ function ug() {
363
363
  }
364
364
  function ft(R) {
365
365
  try {
366
- return Qe(R), !1;
366
+ return Ze(R), !1;
367
367
  } catch {
368
368
  return !0;
369
369
  }
370
370
  }
371
- function Qe(R) {
371
+ function Ze(R) {
372
372
  return "" + R;
373
373
  }
374
374
  function ie(R) {
375
375
  if (ft(R))
376
- return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", vt(R)), Qe(R);
376
+ return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", vt(R)), Ze(R);
377
377
  }
378
- var _e = x.ReactCurrentOwner, Re = {
378
+ var Ne = x.ReactCurrentOwner, ke = {
379
379
  key: !0,
380
380
  ref: !0,
381
381
  __self: !0,
382
382
  __source: !0
383
- }, qe, ot;
383
+ }, qe, rt;
384
384
  function Pe(R) {
385
385
  if (st.call(R, "ref")) {
386
386
  var H = Object.getOwnPropertyDescriptor(R, "ref").get;
@@ -398,7 +398,7 @@ function ug() {
398
398
  return R.key !== void 0;
399
399
  }
400
400
  function Et(R, H) {
401
- typeof R.ref == "string" && _e.current;
401
+ typeof R.ref == "string" && Ne.current;
402
402
  }
403
403
  function Tt(R, H) {
404
404
  {
@@ -414,7 +414,7 @@ function ug() {
414
414
  function qt(R, H) {
415
415
  {
416
416
  var le = function() {
417
- ot || (ot = !0, w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", H));
417
+ rt || (rt = !0, w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", H));
418
418
  };
419
419
  le.isReactWarning = !0, Object.defineProperty(R, "ref", {
420
420
  get: le,
@@ -453,20 +453,20 @@ function ug() {
453
453
  };
454
454
  function qn(R, H, le, Ce, Ge) {
455
455
  {
456
- var ze, Fe = {}, $ = null, de = null;
457
- le !== void 0 && (ie(le), $ = "" + le), Xe(H) && (ie(H.key), $ = "" + H.key), Pe(H) && (de = H.ref, Et(H, Ge));
456
+ var ze, Fe = {}, $ = null, ue = null;
457
+ le !== void 0 && (ie(le), $ = "" + le), Xe(H) && (ie(H.key), $ = "" + H.key), Pe(H) && (ue = H.ref, Et(H, Ge));
458
458
  for (ze in H)
459
- st.call(H, ze) && !Re.hasOwnProperty(ze) && (Fe[ze] = H[ze]);
459
+ st.call(H, ze) && !ke.hasOwnProperty(ze) && (Fe[ze] = H[ze]);
460
460
  if (R && R.defaultProps) {
461
- var ue = R.defaultProps;
462
- for (ze in ue)
463
- Fe[ze] === void 0 && (Fe[ze] = ue[ze]);
461
+ var he = R.defaultProps;
462
+ for (ze in he)
463
+ Fe[ze] === void 0 && (Fe[ze] = he[ze]);
464
464
  }
465
- if ($ || de) {
466
- var Te = typeof R == "function" ? R.displayName || R.name || "Unknown" : R;
467
- $ && Tt(Fe, Te), de && qt(Fe, Te);
465
+ if ($ || ue) {
466
+ var _e = typeof R == "function" ? R.displayName || R.name || "Unknown" : R;
467
+ $ && Tt(Fe, _e), ue && qt(Fe, _e);
468
468
  }
469
- return It(R, $, de, Ge, Ce, _e.current, Fe);
469
+ return It(R, $, ue, Ge, Ce, Ne.current, Fe);
470
470
  }
471
471
  }
472
472
  var Gt = x.ReactCurrentOwner, dn = x.ReactDebugCurrentFrame;
@@ -586,26 +586,26 @@ Check the top-level render call using <` + le + ">.");
586
586
  if (!Fe) {
587
587
  var $ = "";
588
588
  (R === void 0 || typeof R == "object" && R !== null && Object.keys(R).length === 0) && ($ += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
589
- var de = xt();
590
- de ? $ += de : $ += fn();
591
- var ue;
592
- R === null ? ue = "null" : ut(R) ? ue = "array" : R !== void 0 && R.$$typeof === t ? (ue = "<" + (j(R.type) || "Unknown") + " />", $ = " Did you accidentally export a JSX literal instead of a component?") : ue = typeof R, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ue, $);
589
+ var ue = xt();
590
+ ue ? $ += ue : $ += fn();
591
+ var he;
592
+ R === null ? he = "null" : ut(R) ? he = "array" : R !== void 0 && R.$$typeof === t ? (he = "<" + (j(R.type) || "Unknown") + " />", $ = " Did you accidentally export a JSX literal instead of a component?") : he = typeof R, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", he, $);
593
593
  }
594
- var Te = qn(R, H, le, Ge, ze);
595
- if (Te == null)
596
- return Te;
594
+ var _e = qn(R, H, le, Ge, ze);
595
+ if (_e == null)
596
+ return _e;
597
597
  if (Fe) {
598
- var Je = H.children;
599
- if (Je !== void 0)
598
+ var ot = H.children;
599
+ if (ot !== void 0)
600
600
  if (Ce)
601
- if (ut(Je)) {
602
- for (var Dt = 0; Dt < Je.length; Dt++)
603
- Yt(Je[Dt], R);
604
- Object.freeze && Object.freeze(Je);
601
+ if (ut(ot)) {
602
+ for (var Dt = 0; Dt < ot.length; Dt++)
603
+ Yt(ot[Dt], R);
604
+ Object.freeze && Object.freeze(ot);
605
605
  } else
606
606
  w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
607
607
  else
608
- Yt(Je, R);
608
+ Yt(ot, R);
609
609
  }
610
610
  if (st.call(H, "key")) {
611
611
  var nn = j(R), kt = Object.keys(H).filter(function(I) {
@@ -621,7 +621,7 @@ React keys must be passed directly to JSX without using spread:
621
621
  <%s key={someKey} {...props} />`, Xr, nn, E, nn), pn[nn + Xr] = !0;
622
622
  }
623
623
  }
624
- return R === r ? kn(Te) : lr(Te), Te;
624
+ return R === r ? kn(_e) : lr(_e), _e;
625
625
  }
626
626
  }
627
627
  function cr(R, H, le) {
@@ -1919,10 +1919,10 @@ const Uu = (e) => {
1919
1919
  );
1920
1920
  }
1921
1921
  k = k || "text";
1922
- let he = await f[P.findKey(f, k) || "text"](K, m);
1922
+ let fe = await f[P.findKey(f, k) || "text"](K, m);
1923
1923
  return !z && _ && _(), await new Promise((W, ce) => {
1924
1924
  Bu(W, ce, {
1925
- data: he,
1925
+ data: fe,
1926
1926
  headers: Vt.from(K.headers),
1927
1927
  status: K.status,
1928
1928
  statusText: K.statusText,
@@ -3015,13 +3015,13 @@ function dy(e, t) {
3015
3015
  }
3016
3016
  }
3017
3017
  function fy(e = []) {
3018
- const [t, n] = Dm(dy, { ...uy, messages: e }), r = Le([]), o = Le(null), s = Le(null), i = ke(() => {
3018
+ const [t, n] = Dm(dy, { ...uy, messages: e }), r = Le([]), o = Le(null), s = Le(null), i = Te(() => {
3019
3019
  o.current !== null && typeof window < "u" && window.cancelAnimationFrame(o.current), s.current !== null && clearTimeout(s.current), o.current = null, s.current = null;
3020
3020
  const d = r.current;
3021
3021
  d.length && (r.current = [], n({ type: "batch", payload: { events: d } }));
3022
- }, []), a = ke(() => {
3022
+ }, []), a = Te(() => {
3023
3023
  typeof window < "u" && typeof window.requestAnimationFrame == "function" ? o.current === null && (o.current = window.requestAnimationFrame(() => i())) : s.current === null && (s.current = setTimeout(i, 8));
3024
- }, [i]), l = ke((d) => {
3024
+ }, [i]), l = Te((d) => {
3025
3025
  r.current.push(d), a();
3026
3026
  }, [a]);
3027
3027
  dt(() => () => {
@@ -3303,14 +3303,14 @@ function yy(e) {
3303
3303
  return t[t.length - 1] || null;
3304
3304
  }
3305
3305
  function vy(e = {}) {
3306
- const t = it(() => Wn(e.baseUrl), [e.baseUrl]), n = e.streamPath ?? "/runs/stream", [r, o] = ye(e.token ?? null), s = Le(e.headers ?? {}), i = e.credentials ?? "include", [a, l] = ye(!1), [c, d] = ye(null), [f, h] = ye(""), [p, m] = ye(null), [y, v] = ye(0), [x, w] = ye(!1), b = Le(null), T = Le(!0), C = Le(0), S = Le(null), k = ke((F) => {
3306
+ const t = it(() => Wn(e.baseUrl), [e.baseUrl]), n = e.streamPath ?? "/runs/stream", [r, o] = ye(e.token ?? null), s = Le(e.headers ?? {}), i = e.credentials ?? "include", [a, l] = ye(!1), [c, d] = ye(null), [f, h] = ye(""), [p, m] = ye(null), [y, v] = ye(0), [x, w] = ye(!1), b = Le(null), T = Le(!0), C = Le(0), S = Le(null), k = Te((F) => {
3307
3307
  o(F);
3308
- }, []), A = ke(() => {
3308
+ }, []), A = Te(() => {
3309
3309
  h(""), m(null), d(null);
3310
- }, []), N = ke(() => {
3310
+ }, []), N = Te(() => {
3311
3311
  var F;
3312
3312
  console.debug("[use-chat] stop() invoked - aborting stream"), (F = b.current) == null || F.abort(), b.current = null, S.current = null, l(!1), w(!1), C.current = 0, v(0);
3313
- }, []), M = ke(
3313
+ }, []), M = Te(
3314
3314
  (F, q, j) => {
3315
3315
  b.current && (b.current.abort(), b.current = null), l(!0), d(null), e.autoAppendAssistant !== !1 && h("");
3316
3316
  const _ = new AbortController();
@@ -3318,7 +3318,7 @@ function vy(e = {}) {
3318
3318
  threadId: F.threadId ?? null,
3319
3319
  headers: {}
3320
3320
  }, (async () => {
3321
- var L, ne, K, z, he, W, ce, B, Z;
3321
+ var L, ne, K, z, fe, W, ce, B, Z;
3322
3322
  const D = (we) => {
3323
3323
  var xe;
3324
3324
  try {
@@ -3344,8 +3344,8 @@ function vy(e = {}) {
3344
3344
  ie && (ft = ((K = JSON.parse(ie)) == null ? void 0 : K.apiKey) || null);
3345
3345
  } catch {
3346
3346
  }
3347
- const Qe = ut || vt || ft || null;
3348
- Qe && (we = { Authorization: `Bearer ${Qe}` });
3347
+ const Ze = ut || vt || ft || null;
3348
+ Ze && (we = { Authorization: `Bearer ${Ze}` });
3349
3349
  }
3350
3350
  } catch {
3351
3351
  }
@@ -3401,7 +3401,7 @@ function vy(e = {}) {
3401
3401
  typeof window < "u" && Ke == null && (Ke = requestAnimationFrame(st));
3402
3402
  };
3403
3403
  let gt = Date.now();
3404
- const rt = setInterval(() => {
3404
+ const nt = setInterval(() => {
3405
3405
  var We;
3406
3406
  if (Date.now() - gt > 6e4) {
3407
3407
  const ut = "Stream idle timeout";
@@ -3413,26 +3413,26 @@ function vy(e = {}) {
3413
3413
  for (S.current && !S.current.threadId && (S.current = {
3414
3414
  ...S.current,
3415
3415
  threadId: vt
3416
- }), (he = j == null ? void 0 : j.onOpen) == null || he.call(j, { threadId: vt, created: ft }); ; ) {
3417
- const { value: Qe, done: ie } = await oe.read();
3416
+ }), (fe = j == null ? void 0 : j.onOpen) == null || fe.call(j, { threadId: vt, created: ft }); ; ) {
3417
+ const { value: Ze, done: ie } = await oe.read();
3418
3418
  if (ie) break;
3419
- se += ge.decode(Qe, { stream: !0 }), se.length > Me && (se = "", console.warn("Stream buffer reset: exceeded 1MB"));
3420
- let _e;
3421
- for (; (_e = se.indexOf(`
3419
+ se += ge.decode(Ze, { stream: !0 }), se.length > Me && (se = "", console.warn("Stream buffer reset: exceeded 1MB"));
3420
+ let Ne;
3421
+ for (; (Ne = se.indexOf(`
3422
3422
 
3423
3423
  `)) >= 0; ) {
3424
- const Re = se.slice(0, _e);
3425
- se = se.slice(_e + 2);
3426
- const qe = by(Re);
3424
+ const ke = se.slice(0, Ne);
3425
+ se = se.slice(Ne + 2);
3426
+ const qe = by(ke);
3427
3427
  if (!qe) continue;
3428
- let ot;
3428
+ let rt;
3429
3429
  try {
3430
- ot = JSON.parse(qe);
3430
+ rt = JSON.parse(qe);
3431
3431
  } catch {
3432
3432
  console.debug("[use-chat] malformed SSE:", qe.slice(0, 200));
3433
3433
  continue;
3434
3434
  }
3435
- const Pe = wy(ot) ? ot.data : ot;
3435
+ const Pe = wy(rt) ? rt.data : rt;
3436
3436
  gt = Date.now();
3437
3437
  const Xe = Pe.seq;
3438
3438
  if (Xe !== void 0) {
@@ -3480,7 +3480,7 @@ function vy(e = {}) {
3480
3480
  } finally {
3481
3481
  (B = oe.releaseLock) == null || B.call(oe);
3482
3482
  }
3483
- Ke !== null && typeof window < "u" && window.cancelAnimationFrame(Ke), clearInterval(rt), l(!1), w(!1), b.current = null, C.current = 0, v(0), S.current = null;
3483
+ Ke !== null && typeof window < "u" && window.cancelAnimationFrame(Ke), clearInterval(nt), l(!1), w(!1), b.current = null, C.current = 0, v(0), S.current = null;
3484
3484
  }
3485
3485
  } catch (we) {
3486
3486
  if (we.name !== "AbortError") {
@@ -3530,7 +3530,7 @@ function Sy({
3530
3530
  onUnhandledEvent: r,
3531
3531
  onSequenceGap: o
3532
3532
  }) {
3533
- const s = Le(null), i = ke(
3533
+ const s = Le(null), i = Te(
3534
3534
  (p) => {
3535
3535
  const m = p.seq ?? null;
3536
3536
  if (m !== null) {
@@ -3569,7 +3569,7 @@ function Sy({
3569
3569
  ), { stream: a, stop: l, isStreaming: c, error: d, setToken: f } = vy({
3570
3570
  baseUrl: e,
3571
3571
  token: null
3572
- }), h = ke(
3572
+ }), h = Te(
3573
3573
  (p, m) => {
3574
3574
  s.current = null, a(
3575
3575
  p,
@@ -3863,20 +3863,20 @@ function By({
3863
3863
  }, [c]), h = it(
3864
3864
  () => `threadPayload:${Iy}:${f}:`,
3865
3865
  [f]
3866
- ), p = ke(
3866
+ ), p = Te(
3867
3867
  (E) => jy(h, E),
3868
3868
  [h]
3869
- ), m = ke(
3869
+ ), m = Te(
3870
3870
  (E, I = 100) => {
3871
3871
  Py(h, E, I);
3872
3872
  },
3873
3873
  [h]
3874
- ), y = ke(
3874
+ ), y = Te(
3875
3875
  (E) => {
3876
3876
  Oy(h, E);
3877
3877
  },
3878
3878
  [h]
3879
- ), v = ke(() => {
3879
+ ), v = Te(() => {
3880
3880
  My(h);
3881
3881
  }, [h]), [x, w] = ye(
3882
3882
  () => {
@@ -3889,7 +3889,7 @@ function By({
3889
3889
  ki(f, (I = l.getAuthToken) == null ? void 0 : I.call(l))
3890
3890
  );
3891
3891
  return zo(E);
3892
- }), C = it(() => Ei(b), [b]), [S, k] = ye(t), [A, N] = ye(!1), [M, F] = ye(!1), [q, j] = ye(null), [_, D] = ye(null), [L, ne] = ye(null), [K, z] = ye([]), he = ke(() => {
3892
+ }), C = it(() => Ei(b), [b]), [S, k] = ye(t), [A, N] = ye(!1), [M, F] = ye(!1), [q, j] = ye(null), [_, D] = ye(null), [L, ne] = ye(null), [K, z] = ye([]), fe = Te(() => {
3893
3893
  const E = Ri(x);
3894
3894
  Lo(() => {
3895
3895
  T(zo(E));
@@ -3901,12 +3901,12 @@ function By({
3901
3901
  prepend: st,
3902
3902
  pushUser: at,
3903
3903
  onEvent: gt,
3904
- reset: rt
3904
+ reset: nt
3905
3905
  } = fy(), Me = Le(S);
3906
3906
  dt(() => {
3907
3907
  Me.current = S;
3908
3908
  }, [S]);
3909
- const We = Le(!1), ut = Le([]), vt = Le(null), ft = Le(null), Qe = Le(/* @__PURE__ */ new Map()), ie = Le(S), _e = Le(!1), Re = Le(null), qe = Le(/* @__PURE__ */ new Map()), ot = Le(/* @__PURE__ */ new Map()), Pe = Le(/* @__PURE__ */ new Map()), Xe = Le(/* @__PURE__ */ new Map()), Et = ke(
3909
+ const We = Le(!1), ut = Le([]), vt = Le(null), ft = Le(null), Ze = Le(/* @__PURE__ */ new Map()), ie = Le(S), Ne = Le(!1), ke = Le(null), qe = Le(/* @__PURE__ */ new Map()), rt = Le(/* @__PURE__ */ new Map()), Pe = Le(/* @__PURE__ */ new Map()), Xe = Le(/* @__PURE__ */ new Map()), Et = Te(
3910
3910
  (E) => {
3911
3911
  if (!E) {
3912
3912
  z([]);
@@ -3926,7 +3926,7 @@ function By({
3926
3926
  dt(() => {
3927
3927
  Et(S);
3928
3928
  }, [S, Et]);
3929
- const Tt = ke(() => {
3929
+ const Tt = Te(() => {
3930
3930
  var ee;
3931
3931
  const E = Xe.current;
3932
3932
  if (E.size <= hc) return;
@@ -3935,7 +3935,7 @@ function By({
3935
3935
  const Q = (ee = I[ae]) == null ? void 0 : ee[0];
3936
3936
  Q && E.delete(Q);
3937
3937
  }
3938
- }, []), qt = ke(
3938
+ }, []), qt = Te(
3939
3939
  (E, I, Y) => {
3940
3940
  if (!E) return;
3941
3941
  const ee = Y === "replace" ? [] : qe.current.get(E) ?? [], ae = Y === "replace" ? I : [...I, ...ee];
@@ -3946,44 +3946,44 @@ function By({
3946
3946
  const Q = /* @__PURE__ */ new Map();
3947
3947
  for (const He of ae) {
3948
3948
  if (!(He != null && He.checkpointId)) continue;
3949
- const De = `${He.checkpointId}::${He.checkpointNs ?? ""}`, et = on(He, { cloneMessages: !0 }), wt = Q.get(De);
3949
+ const De = `${He.checkpointId}::${He.checkpointNs ?? ""}`, Qe = on(He, { cloneMessages: !0 }), wt = Q.get(De);
3950
3950
  if (!wt) {
3951
- Q.set(De, et);
3951
+ Q.set(De, Qe);
3952
3952
  continue;
3953
3953
  }
3954
- const _t = mc(wt, et);
3954
+ const _t = mc(wt, Qe);
3955
3955
  Q.set(De, { ...wt, ..._t });
3956
3956
  }
3957
3957
  const Be = Array.from(Q.values()).sort((He, De) => {
3958
- const et = Number.isFinite(Date.parse(He.createdAt ?? "")) ? Date.parse(He.createdAt ?? "") : 0;
3959
- return (Number.isFinite(Date.parse(De.createdAt ?? "")) ? Date.parse(De.createdAt ?? "") : 0) - et;
3958
+ const Qe = Number.isFinite(Date.parse(He.createdAt ?? "")) ? Date.parse(He.createdAt ?? "") : 0;
3959
+ return (Number.isFinite(Date.parse(De.createdAt ?? "")) ? Date.parse(De.createdAt ?? "") : 0) - Qe;
3960
3960
  });
3961
3961
  qe.current.set(E, Be), E === Me.current && Et(E);
3962
3962
  },
3963
3963
  [Et]
3964
- ), It = ke(
3964
+ ), It = Te(
3965
3965
  (E, I, Y) => {
3966
3966
  if (!E) return;
3967
- const ee = ot.current.get(E), ae = Y === "replace" || !ee ? /* @__PURE__ */ new Map() : new Map(ee);
3967
+ const ee = rt.current.get(E), ae = Y === "replace" || !ee ? /* @__PURE__ */ new Map() : new Map(ee);
3968
3968
  if (I && typeof I == "object")
3969
3969
  for (const [Q, Be] of Object.entries(I)) {
3970
3970
  if (!(Be != null && Be.checkpointId)) continue;
3971
3971
  const He = Q || ro(Be.checkpointId, Be.checkpointNs ?? null);
3972
3972
  ae.set(He, on(Be, { cloneMessages: !0 }));
3973
3973
  }
3974
- ot.current.set(E, ae);
3974
+ rt.current.set(E, ae);
3975
3975
  },
3976
3976
  []
3977
- ), qn = ke(
3977
+ ), qn = Te(
3978
3978
  (E, I) => {
3979
3979
  const { threadId: Y, checkpointId: ee = null, checkpointNs: ae = null } = E, Q = pc(Y, ee, ae);
3980
3980
  if (I != null && I.force)
3981
3981
  Pe.current.delete(Q), Xe.current.delete(Q);
3982
3982
  else {
3983
3983
  if (I != null && I.preferCache) {
3984
- const et = Xe.current.get(Q);
3985
- if (et)
3986
- return Promise.resolve(et.payload);
3984
+ const Qe = Xe.current.get(Q);
3985
+ if (Qe)
3986
+ return Promise.resolve(Qe.payload);
3987
3987
  }
3988
3988
  const De = Pe.current.get(Q);
3989
3989
  if (De)
@@ -3999,7 +3999,7 @@ function By({
3999
3999
  return Pe.current.set(Q, He), He;
4000
4000
  },
4001
4001
  [l, Tt]
4002
- ), Gt = ke((E, I) => new Promise((Y, ee) => {
4002
+ ), Gt = Te((E, I) => new Promise((Y, ee) => {
4003
4003
  const ae = async () => {
4004
4004
  We.current = !0;
4005
4005
  try {
@@ -4023,7 +4023,7 @@ function By({
4023
4023
  const E = re.pendingInterrupt ?? Ry(re.messages);
4024
4024
  dc(L, E) || ne(E ?? null);
4025
4025
  }, [L, re.messages, re.pendingInterrupt]);
4026
- const Mt = ke(async () => {
4026
+ const Mt = Te(async () => {
4027
4027
  const E = dn.current > 0;
4028
4028
  E || N(!0);
4029
4029
  try {
@@ -4039,7 +4039,7 @@ function By({
4039
4039
  } finally {
4040
4040
  E || N(!1);
4041
4041
  }
4042
- }, [l, i]), Cn = Le(!1), fn = Le(null), xt = Le(null), hn = Le(""), Tn = ke(
4042
+ }, [l, i]), Cn = Le(!1), fn = Le(null), xt = Le(null), hn = Le(""), Tn = Te(
4043
4043
  (E, I) => {
4044
4044
  if (!xr()) return;
4045
4045
  xt.current !== null && (window.clearTimeout(xt.current), xt.current = null);
@@ -4072,9 +4072,9 @@ function By({
4072
4072
  }, ts);
4073
4073
  },
4074
4074
  [x]
4075
- ), ar = ke(() => {
4075
+ ), ar = Te(() => {
4076
4076
  Tn(C, { immediate: !0 });
4077
- }, [Tn, C]), Yt = ke(
4077
+ }, [Tn, C]), Yt = Te(
4078
4078
  (E, I, Y, ee) => {
4079
4079
  var Pl;
4080
4080
  const ae = Y ?? Me.current;
@@ -4087,7 +4087,7 @@ function By({
4087
4087
  threadId: ae,
4088
4088
  snapshot: on(E, { cloneMessages: !0 })
4089
4089
  };
4090
- Qe.current.set(ae, At), ie.current = ae;
4090
+ Ze.current.set(ae, At), ie.current = ae;
4091
4091
  }
4092
4092
  if (!Be)
4093
4093
  return;
@@ -4098,7 +4098,7 @@ function By({
4098
4098
  }), ne(Q.interrupt ?? null), xe(Q.nextCursor ?? null), ce(!!Q.nextCursor), O(Q.checkpointId ?? void 0), oe(Q.checkpointNs ?? void 0), se(Q.nextCursorNs ?? void 0);
4099
4099
  return;
4100
4100
  }
4101
- const De = Qe.current.get(ae), et = (De == null ? void 0 : De.snapshot) ?? null, wt = Array.isArray(et == null ? void 0 : et.messages) ? et.messages : [], _t = on(et), Rn = Array.isArray(E == null ? void 0 : E.messages) ? E.messages : [], jt = /* @__PURE__ */ new Set(), Pt = [...Rn, ...wt].filter((At) => {
4101
+ const De = Ze.current.get(ae), Qe = (De == null ? void 0 : De.snapshot) ?? null, wt = Array.isArray(Qe == null ? void 0 : Qe.messages) ? Qe.messages : [], _t = on(Qe), Rn = Array.isArray(E == null ? void 0 : E.messages) ? E.messages : [], jt = /* @__PURE__ */ new Set(), Pt = [...Rn, ...wt].filter((At) => {
4102
4102
  const yi = At == null ? void 0 : At.id;
4103
4103
  return yi ? jt.has(yi) ? !1 : (jt.add(yi), !0) : !0;
4104
4104
  }), Jr = mc(_t, Q), Zr = {
@@ -4116,7 +4116,7 @@ function By({
4116
4116
  interrupt: _t.interrupt ?? Q.interrupt ?? null,
4117
4117
  ...Jr
4118
4118
  };
4119
- if (Qe.current.set(ae, {
4119
+ if (Ze.current.set(ae, {
4120
4120
  threadId: ae,
4121
4121
  snapshot: on(Zr, { cloneMessages: !0 })
4122
4122
  }), !Be)
@@ -4136,7 +4136,7 @@ function By({
4136
4136
  );
4137
4137
  },
4138
4138
  [st, Ke, ne]
4139
- ), lr = ke(
4139
+ ), lr = Te(
4140
4140
  (E) => {
4141
4141
  if (E.threadId != null && E.threadId !== Me.current)
4142
4142
  return;
@@ -4148,24 +4148,24 @@ function By({
4148
4148
  }), ne(I.interrupt ?? null), xe(I.nextCursor ?? null), ce(!!I.nextCursor), O(I.checkpointId ?? void 0), oe(I.checkpointNs ?? void 0), se(I.nextCursorNs ?? void 0), ie.current = E.threadId, Et(E.threadId ?? Me.current ?? null);
4149
4149
  },
4150
4150
  [Ke, ne, Et]
4151
- ), kn = ke((E) => {
4151
+ ), kn = Te((E) => {
4152
4152
  if (!E) return;
4153
- Qe.current.delete(E), y(E), qe.current.delete(E), ot.current.delete(E), E === Me.current && z([]);
4153
+ Ze.current.delete(E), y(E), qe.current.delete(E), rt.current.delete(E), E === Me.current && z([]);
4154
4154
  const I = `${E}__`;
4155
4155
  for (const Y of Pe.current.keys())
4156
4156
  Y.startsWith(I) && Pe.current.delete(Y);
4157
4157
  for (const Y of Xe.current.keys())
4158
4158
  Y.startsWith(I) && Xe.current.delete(Y);
4159
4159
  ie.current === E && (ie.current = null);
4160
- }, [y]), pn = ke(() => {
4160
+ }, [y]), pn = Te(() => {
4161
4161
  const E = Me.current;
4162
- E && kn(E), rt([]), ce(!1), Z(!1), xe(null), O(void 0), oe(void 0), se(void 0);
4163
- }, [kn, rt]), Hn = ke(({ from: E, to: I }) => {
4162
+ E && kn(E), nt([]), ce(!1), Z(!1), xe(null), O(void 0), oe(void 0), se(void 0);
4163
+ }, [kn, nt]), Hn = Te(({ from: E, to: I }) => {
4164
4164
  const Y = Me.current;
4165
4165
  Y && console.warn(
4166
4166
  `[ChatSessionProvider] Stream sequence gap detected (${E} -> ${I}) for thread ${Y}`
4167
4167
  );
4168
- }, []), cr = ke(
4168
+ }, []), cr = Te(
4169
4169
  (E) => {
4170
4170
  const I = E.threadId;
4171
4171
  console.log("[ChatSessionProvider] 📥 Handling thread_info event:", {
@@ -4240,11 +4240,11 @@ function By({
4240
4240
  H(E);
4241
4241
  const I = (ae) => {
4242
4242
  const Q = ki(f, ae);
4243
- Re.current !== Q && (Re.current = Q, _e.current = !1), w(Q);
4243
+ ke.current !== Q && (ke.current = Q, Ne.current = !1), w(Q);
4244
4244
  const Be = Ri(Q);
4245
4245
  Lo(() => {
4246
4246
  T(zo(Be));
4247
- }), ae && !_e.current && (_e.current = !0);
4247
+ }), ae && !Ne.current && (Ne.current = !0);
4248
4248
  };
4249
4249
  I(E);
4250
4250
  const Y = (ee = l.onTokenChange) == null ? void 0 : ee.call(l, (ae) => {
@@ -4254,7 +4254,7 @@ function By({
4254
4254
  Y == null || Y();
4255
4255
  };
4256
4256
  }, [l, f, H, v]);
4257
- const le = ke(
4257
+ const le = Te(
4258
4258
  async (E) => {
4259
4259
  var ee;
4260
4260
  const I = `Thread ${(ee = crypto.randomUUID) == null ? void 0 : ee.call(crypto)}`, Y = {
@@ -4275,8 +4275,8 @@ function By({
4275
4275
  if (!He) return Be;
4276
4276
  const De = { ...Be.byId };
4277
4277
  delete De[I], De[Q] = { ...He, threadId: Q };
4278
- const et = Be.order.map((wt) => wt === I ? Q : wt);
4279
- return { byId: De, order: et };
4278
+ const Qe = Be.order.map((wt) => wt === I ? Q : wt);
4279
+ return { byId: De, order: Qe };
4280
4280
  }), k(Q), setTimeout(() => Mt(), 10), j(null), Q;
4281
4281
  } catch (ae) {
4282
4282
  throw T((Q) => {
@@ -4289,7 +4289,7 @@ function By({
4289
4289
  }
4290
4290
  },
4291
4291
  [l, Mt]
4292
- ), Ce = ke(
4292
+ ), Ce = Te(
4293
4293
  async (E) => {
4294
4294
  try {
4295
4295
  await l.deleteThread(E);
@@ -4306,7 +4306,7 @@ function By({
4306
4306
  }
4307
4307
  },
4308
4308
  [l, pn, kn, Mt, Tn]
4309
- ), Ge = ke(
4309
+ ), Ge = Te(
4310
4310
  async (E, I) => {
4311
4311
  try {
4312
4312
  await l.updateThread(E, I), T((Y) => {
@@ -4321,7 +4321,7 @@ function By({
4321
4321
  }
4322
4322
  },
4323
4323
  [l, Mt]
4324
- ), ze = ke(
4324
+ ), ze = Te(
4325
4325
  async (E, I, Y, ee = !1) => {
4326
4326
  await Gt(async () => {
4327
4327
  if (ft.current === E && !ee) {
@@ -4335,15 +4335,15 @@ function By({
4335
4335
  E,
4336
4336
  I ?? null,
4337
4337
  Y ?? null
4338
- ), He = Xe.current.get(Be), De = !ee && !I && !Y && He && Date.now() - He.timestamp < Ly, et = !ee && !I && !Y;
4338
+ ), He = Xe.current.get(Be), De = !ee && !I && !Y && He && Date.now() - He.timestamp < Ly, Qe = !ee && !I && !Y;
4339
4339
  let wt = !1;
4340
- if (et) {
4341
- const jt = Qe.current.get(E);
4340
+ if (Qe) {
4341
+ const jt = Ze.current.get(E);
4342
4342
  if (jt)
4343
4343
  lr(jt), wt = !0;
4344
4344
  else {
4345
4345
  const Pt = p(E);
4346
- Pt && (Qe.current.set(E, Pt), lr(Pt), wt = !0);
4346
+ Pt && (Ze.current.set(E, Pt), lr(Pt), wt = !0);
4347
4347
  }
4348
4348
  }
4349
4349
  const _t = ee || !wt || !!I || !!Y, Rn = async (jt) => {
@@ -4360,7 +4360,7 @@ function By({
4360
4360
  vt.current = null, jt && F(!1);
4361
4361
  }
4362
4362
  };
4363
- _t ? await Rn(!0) : et && wt && !De && Rn(!1).catch((jt) => {
4363
+ _t ? await Rn(!0) : Qe && wt && !De && Rn(!1).catch((jt) => {
4364
4364
  console.warn("[ChatSessionProvider] Background refresh failed:", jt);
4365
4365
  });
4366
4366
  }, `loadThread-${E}`);
@@ -4374,7 +4374,7 @@ function By({
4374
4374
  qt,
4375
4375
  It
4376
4376
  ]
4377
- ), Fe = ke(async () => {
4377
+ ), Fe = Te(async () => {
4378
4378
  await Gt(async () => {
4379
4379
  const E = Me.current;
4380
4380
  E && kn(E), ft.current = null, k(null), Me.current = null, ie.current = null, pn(), O(void 0), oe(void 0), se(void 0), z([]);
@@ -4384,12 +4384,12 @@ function By({
4384
4384
  console.warn("[ChatSessionProvider] Failed to clear lastThreadId:", I);
4385
4385
  }
4386
4386
  }, "clearCurrentThread");
4387
- }, [pn, kn, Gt]), $ = ke(
4387
+ }, [pn, kn, Gt]), $ = Te(
4388
4388
  async (E, I) => {
4389
4389
  var Q;
4390
4390
  const Y = Me.current;
4391
4391
  if (!Y) throw new Error("No active thread");
4392
- const ee = ro(E, I ?? null), ae = (Q = ot.current.get(Y)) == null ? void 0 : Q.get(ee);
4392
+ const ee = ro(E, I ?? null), ae = (Q = rt.current.get(Y)) == null ? void 0 : Q.get(ee);
4393
4393
  if (ae) {
4394
4394
  await Gt(async () => {
4395
4395
  Yt(ae, "replace", Y, { persist: !1 });
@@ -4399,10 +4399,10 @@ function By({
4399
4399
  await ze(Y, E, I ?? void 0, !0);
4400
4400
  },
4401
4401
  [Yt, Gt, ze]
4402
- ), de = ke(async () => {
4402
+ ), ue = Te(async () => {
4403
4403
  if (!Me.current) throw new Error("No active thread");
4404
4404
  await ze(Me.current, void 0, void 0, !0);
4405
- }, [ze]), ue = ke(
4405
+ }, [ze]), he = Te(
4406
4406
  async () => {
4407
4407
  if (!Me.current) throw new Error("No active thread");
4408
4408
  if (B || !W) return;
@@ -4414,13 +4414,13 @@ function By({
4414
4414
  threadId: I,
4415
4415
  checkpointId: E ?? G ?? null,
4416
4416
  checkpointNs: ge ?? X ?? null
4417
- }), { latest: ee, checkpoints: ae, snapshots: Q } = ra(Y), Be = I ? ot.current.get(I) : null;
4417
+ }), { latest: ee, checkpoints: ae, snapshots: Q } = ra(Y), Be = I ? rt.current.get(I) : null;
4418
4418
  let He = ae.length > 0;
4419
4419
  if (He && Be && Be.size > 0 && (He = ae.some((De) => {
4420
4420
  if (!(De != null && De.checkpointId))
4421
4421
  return !1;
4422
- const et = ro(De.checkpointId, De.checkpointNs ?? null);
4423
- return !Be.has(et);
4422
+ const Qe = ro(De.checkpointId, De.checkpointNs ?? null);
4423
+ return !Be.has(Qe);
4424
4424
  })), !He) {
4425
4425
  xe(null), se(void 0), ce(!1), D(null);
4426
4426
  return;
@@ -4445,7 +4445,7 @@ function By({
4445
4445
  qt,
4446
4446
  It
4447
4447
  ]
4448
- ), Te = ke(
4448
+ ), _e = Te(
4449
4449
  (E) => {
4450
4450
  if (E != null && E.threadId) {
4451
4451
  if (E.checkpointId) {
@@ -4462,7 +4462,7 @@ function By({
4462
4462
  }
4463
4463
  },
4464
4464
  [Yt, It]
4465
- ), Je = ke(
4465
+ ), ot = Te(
4466
4466
  async (E, I) => {
4467
4467
  var Qr;
4468
4468
  const Y = Me.current, ee = (E == null ? void 0 : E.text) ?? "", ae = (E == null ? void 0 : E.attachments) ?? [], Q = ae.length ? ae : (I == null ? void 0 : I.attachments) ?? [], Be = {
@@ -4477,19 +4477,19 @@ function By({
4477
4477
  const { contentParts: He, filesInfo: De } = await Kx(
4478
4478
  l,
4479
4479
  Q
4480
- ), et = [...He];
4481
- ee && ee.trim() && et.push({ type: "text", text: ee.trim() });
4480
+ ), Qe = [...He];
4481
+ ee && ee.trim() && Qe.push({ type: "text", text: ee.trim() });
4482
4482
  const wt = !!Y, _t = wt ? (I == null ? void 0 : I.checkpointId) ?? re.lastCheckpointId ?? void 0 : void 0, Rn = wt ? (I == null ? void 0 : I.checkpointNs) ?? re.lastCheckpointNs ?? void 0 : void 0, jt = {
4483
4483
  id: ((Qr = crypto.randomUUID) == null ? void 0 : Qr.call(crypto)) || `user-${Date.now()}`,
4484
4484
  role: "user",
4485
- content: et,
4485
+ content: Qe,
4486
4486
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
4487
4487
  ..._t != null ? { checkpointId: _t } : {},
4488
4488
  ...Rn != null ? { checkpointNs: Rn } : {}
4489
4489
  };
4490
- et.length > 0 && at(jt);
4491
- const Pt = { ...jt, content: et }, Jr = Q.length > 0, Zr = {
4492
- messages: et.length > 0 ? [Pt] : [],
4490
+ Qe.length > 0 && at(jt);
4491
+ const Pt = { ...jt, content: Qe }, Jr = Q.length > 0, Zr = {
4492
+ messages: Qe.length > 0 ? [Pt] : [],
4493
4493
  files_info: De,
4494
4494
  ...o && Jr && s ? { active_agent: s } : {},
4495
4495
  ...Be
@@ -4526,7 +4526,7 @@ function By({
4526
4526
  at,
4527
4527
  Ar
4528
4528
  ]
4529
- ), Dt = ke(
4529
+ ), Dt = Te(
4530
4530
  async (E, I, Y) => {
4531
4531
  if (!Me.current)
4532
4532
  throw new Error("No active thread to handle interrupt");
@@ -4537,7 +4537,7 @@ function By({
4537
4537
  } catch (Q) {
4538
4538
  console.warn("[ChatSessionProvider] optimistic interrupt_response dispatch failed:", Q);
4539
4539
  }
4540
- await Je(
4540
+ await ot(
4541
4541
  { payload: {} },
4542
4542
  {
4543
4543
  checkpointId: re.lastCheckpointId ?? void 0,
@@ -4549,7 +4549,7 @@ function By({
4549
4549
  throw console.error(`[ChatSessionProvider] Failed to handle interrupt ${E}:`, Q), Q;
4550
4550
  }
4551
4551
  },
4552
- [Ue, re.lastCheckpointId, re.lastCheckpointNs, Je]
4552
+ [Ue, re.lastCheckpointId, re.lastCheckpointNs, ot]
4553
4553
  );
4554
4554
  dt(() => {
4555
4555
  if (a == null || a(S), S)
@@ -4585,9 +4585,9 @@ function By({
4585
4585
  nextCursor: we ?? null,
4586
4586
  nextCursorNs: ge ?? null,
4587
4587
  interrupt: re.pendingInterrupt ?? L ?? null
4588
- }), Y = Qe.current.get(E), ee = Y == null ? void 0 : Y.snapshot, ae = !ee || ee.messages.length !== I.messages.length || ee.messages.some((De, et) => {
4588
+ }), Y = Ze.current.get(E), ee = Y == null ? void 0 : Y.snapshot, ae = !ee || ee.messages.length !== I.messages.length || ee.messages.some((De, Qe) => {
4589
4589
  var wt;
4590
- return (De == null ? void 0 : De.id) !== ((wt = I.messages[et]) == null ? void 0 : wt.id);
4590
+ return (De == null ? void 0 : De.id) !== ((wt = I.messages[Qe]) == null ? void 0 : wt.id);
4591
4591
  }), Q = ((ee == null ? void 0 : ee.checkpointId) ?? null) !== I.checkpointId || ((ee == null ? void 0 : ee.checkpointNs) ?? null) !== I.checkpointNs, Be = ((ee == null ? void 0 : ee.nextCursor) ?? null) !== I.nextCursor || ((ee == null ? void 0 : ee.nextCursorNs) ?? null) !== I.nextCursorNs, He = !dc(
4592
4592
  (ee == null ? void 0 : ee.interrupt) ?? null,
4593
4593
  I.interrupt ?? null
@@ -4597,11 +4597,11 @@ function By({
4597
4597
  threadId: E,
4598
4598
  snapshot: I
4599
4599
  };
4600
- Qe.current.set(E, De), fn.current && window.clearTimeout(fn.current), fn.current = window.setTimeout(() => {
4600
+ Ze.current.set(E, De), fn.current && window.clearTimeout(fn.current), fn.current = window.setTimeout(() => {
4601
4601
  try {
4602
4602
  m(De, 100);
4603
- } catch (et) {
4604
- console.warn("[ChatSessionProvider] Failed to persist thread payload:", et);
4603
+ } catch (Qe) {
4604
+ console.warn("[ChatSessionProvider] Failed to persist thread payload:", Qe);
4605
4605
  }
4606
4606
  }, ts);
4607
4607
  }
@@ -4629,7 +4629,7 @@ function By({
4629
4629
  refreshThreads: () => Mt()
4630
4630
  },
4631
4631
  persistThreadsCache: ar,
4632
- hydrateFromCache: he
4632
+ hydrateFromCache: fe
4633
4633
  }),
4634
4634
  [
4635
4635
  C,
@@ -4641,7 +4641,7 @@ function By({
4641
4641
  Ge,
4642
4642
  Mt,
4643
4643
  ar,
4644
- he,
4644
+ fe,
4645
4645
  k
4646
4646
  ]
4647
4647
  ), kt = it(() => {
@@ -4664,11 +4664,11 @@ function By({
4664
4664
  isHistoryLoading: B,
4665
4665
  error: _,
4666
4666
  hasMore: W,
4667
- loadOlder: ue,
4668
- seedFromSnapshot: Te,
4667
+ loadOlder: he,
4668
+ seedFromSnapshot: _e,
4669
4669
  clearState: pn,
4670
4670
  navigateToCheckpoint: $,
4671
- returnToLatest: de,
4671
+ returnToLatest: ue,
4672
4672
  loadThread: ze,
4673
4673
  clearThread: Fe,
4674
4674
  respondToInterrupt: Dt
@@ -4681,7 +4681,7 @@ function By({
4681
4681
  W,
4682
4682
  B,
4683
4683
  M,
4684
- ue,
4684
+ he,
4685
4685
  ze,
4686
4686
  re.assemblingId,
4687
4687
  re.lastBranch,
@@ -4690,20 +4690,20 @@ function By({
4690
4690
  re.messages,
4691
4691
  $,
4692
4692
  Dt,
4693
- de,
4694
- Te,
4693
+ ue,
4694
+ _e,
4695
4695
  _,
4696
4696
  K
4697
4697
  ]), Xr = it(
4698
4698
  () => ({
4699
4699
  isStreaming: Gn,
4700
4700
  error: R,
4701
- submit: Je,
4702
- send: Je,
4701
+ submit: ot,
4702
+ send: ot,
4703
4703
  stop: Nr,
4704
4704
  setAuthToken: H
4705
4705
  }),
4706
- [Gn, R, Je, Nr, H]
4706
+ [Gn, R, ot, Nr, H]
4707
4707
  );
4708
4708
  return /* @__PURE__ */ u.jsx(Dy.Provider, { value: !0, children: /* @__PURE__ */ u.jsx(id.Provider, { value: Xr, children: /* @__PURE__ */ u.jsx(od.Provider, { value: nn, children: /* @__PURE__ */ u.jsx(sd.Provider, { value: kt, children: e }) }) }) });
4709
4709
  }
@@ -4777,7 +4777,7 @@ const Uy = Os(
4777
4777
  size: "default"
4778
4778
  }
4779
4779
  }
4780
- ), tt = g.forwardRef(
4780
+ ), et = g.forwardRef(
4781
4781
  ({ className: e, variant: t, size: n, asChild: r = !1, ...o }, s) => {
4782
4782
  const i = r ? ig : "button";
4783
4783
  return /* @__PURE__ */ u.jsx(
@@ -4790,7 +4790,7 @@ const Uy = Os(
4790
4790
  );
4791
4791
  }
4792
4792
  );
4793
- tt.displayName = "Button";
4793
+ et.displayName = "Button";
4794
4794
  const ad = g.forwardRef(
4795
4795
  ({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
4796
4796
  "textarea",
@@ -4848,7 +4848,7 @@ function Wy({
4848
4848
  id: ne,
4849
4849
  shouldClear: !0
4850
4850
  }, b(() => {
4851
- var K, z, he;
4851
+ var K, z, fe;
4852
4852
  try {
4853
4853
  const W = l(L);
4854
4854
  W && typeof W.then == "function" ? W.then(() => {
@@ -4859,7 +4859,7 @@ function Wy({
4859
4859
  ((ce = S.current) == null ? void 0 : ce.id) === ne && (S.current = null);
4860
4860
  }) : (((K = S.current) == null ? void 0 : K.id) === ne && S.current.shouldClear && (m || (v(""), T.current && (T.current.style.height = "auto"), a == null || a(""))), ((z = S.current) == null ? void 0 : z.id) === ne && (S.current = null));
4861
4861
  } catch {
4862
- ((he = S.current) == null ? void 0 : he.id) === ne && (S.current = null);
4862
+ ((fe = S.current) == null ? void 0 : fe.id) === ne && (S.current = null);
4863
4863
  }
4864
4864
  });
4865
4865
  },
@@ -4891,7 +4891,7 @@ function Wy({
4891
4891
  }
4892
4892
  ) }),
4893
4893
  /* @__PURE__ */ u.jsx("div", { children: r ? /* @__PURE__ */ u.jsx(
4894
- tt,
4894
+ et,
4895
4895
  {
4896
4896
  type: "button",
4897
4897
  onClick: () => {
@@ -4905,7 +4905,7 @@ function Wy({
4905
4905
  children: /* @__PURE__ */ u.jsx(Fm, { size: 16 })
4906
4906
  }
4907
4907
  ) : /* @__PURE__ */ u.jsx(
4908
- tt,
4908
+ et,
4909
4909
  {
4910
4910
  type: "submit",
4911
4911
  size: "icon",
@@ -4952,7 +4952,7 @@ function Yy(e, t) {
4952
4952
  function pt(...e) {
4953
4953
  return e;
4954
4954
  }
4955
- function nt(e, t) {
4955
+ function tt(e, t) {
4956
4956
  return e(nr, t);
4957
4957
  }
4958
4958
  function Oe(e, t) {
@@ -4965,7 +4965,7 @@ function bt(e) {
4965
4965
  return e(ld);
4966
4966
  }
4967
4967
  function ve(e, t) {
4968
- return nt(e, qy(t, Bs));
4968
+ return tt(e, qy(t, Bs));
4969
4969
  }
4970
4970
  function xn(e, t) {
4971
4971
  const n = e(nr, (r) => {
@@ -4990,12 +4990,12 @@ function ht(e = ud) {
4990
4990
  e(t, r) || (t = r, n(r));
4991
4991
  };
4992
4992
  }
4993
- function Ie(e) {
4993
+ function Ee(e) {
4994
4994
  return (t) => (n) => {
4995
4995
  e(n) && t(n);
4996
4996
  };
4997
4997
  }
4998
- function fe(e) {
4998
+ function de(e) {
4999
4999
  return (t) => cd(t, e);
5000
5000
  }
5001
5001
  function _n(e) {
@@ -5011,7 +5011,7 @@ function V(e, ...t) {
5011
5011
  Ua(e);
5012
5012
  return;
5013
5013
  case nr:
5014
- return nt(e, n(o));
5014
+ return tt(e, n(o));
5015
5015
  }
5016
5016
  };
5017
5017
  }
@@ -5039,7 +5039,7 @@ function $e(...e) {
5039
5039
  const o = Math.pow(2, e.length) - 1;
5040
5040
  return e.forEach((s, i) => {
5041
5041
  const a = Math.pow(2, i);
5042
- nt(s, (l) => {
5042
+ tt(s, (l) => {
5043
5043
  const c = n;
5044
5044
  n = n | a, t[i] = l, c !== o && n === o && r && (r(), r = null);
5045
5045
  });
@@ -5059,7 +5059,7 @@ function Jy(e) {
5059
5059
  return function(o, s) {
5060
5060
  switch (o) {
5061
5061
  case nr:
5062
- return s ? n === s ? void 0 : (r(), n = s, t = nt(e, s), t) : (r(), Kr);
5062
+ return s ? n === s ? void 0 : (r(), n = s, t = tt(e, s), t) : (r(), Kr);
5063
5063
  case Vr:
5064
5064
  r(), n = null;
5065
5065
  return;
@@ -5110,7 +5110,7 @@ function Ye() {
5110
5110
  function Zt(e) {
5111
5111
  return Hs(Ye(), (t) => ve(e, t));
5112
5112
  }
5113
- function Ze(e, t = [], { singleton: n } = { singleton: !0 }) {
5113
+ function Je(e, t = [], { singleton: n } = { singleton: !0 }) {
5114
5114
  return {
5115
5115
  constructor: e,
5116
5116
  dependencies: t,
@@ -5134,7 +5134,7 @@ function Ct(...e) {
5134
5134
  const o = Math.pow(2, e.length) - 1;
5135
5135
  return e.forEach((s, i) => {
5136
5136
  const a = Math.pow(2, i);
5137
- nt(s, (l) => {
5137
+ tt(s, (l) => {
5138
5138
  n[i] = l, r = r | a, r === o && Oe(t, n);
5139
5139
  });
5140
5140
  }), function(s, i) {
@@ -5144,11 +5144,11 @@ function Ct(...e) {
5144
5144
  return;
5145
5145
  }
5146
5146
  case nr:
5147
- return r === o && i(n), nt(t, i);
5147
+ return r === o && i(n), tt(t, i);
5148
5148
  }
5149
5149
  };
5150
5150
  }
5151
- function Ee(e, t = ud) {
5151
+ function Re(e, t = ud) {
5152
5152
  return V(e, ht(t));
5153
5153
  }
5154
5154
  function la(...e) {
@@ -5157,7 +5157,7 @@ function la(...e) {
5157
5157
  case Vr:
5158
5158
  return;
5159
5159
  case nr:
5160
- return Gy(...e.map((r) => nt(r, n)));
5160
+ return Gy(...e.map((r) => tt(r, n)));
5161
5161
  }
5162
5162
  };
5163
5163
  }
@@ -5167,7 +5167,7 @@ const ev = {
5167
5167
  3: "error",
5168
5168
  1: "log",
5169
5169
  2: "warn"
5170
- }, tv = () => typeof globalThis > "u" ? window : globalThis, rr = Ze(
5170
+ }, tv = () => typeof globalThis > "u" ? window : globalThis, rr = Je(
5171
5171
  () => {
5172
5172
  const e = J(
5173
5173
  3
@@ -5295,19 +5295,19 @@ function dd(e, t, n) {
5295
5295
  }
5296
5296
  }, [a, t, i]), s;
5297
5297
  }
5298
- const Bt = Ze(
5298
+ const Bt = Je(
5299
5299
  () => {
5300
5300
  const e = Ye(), t = Ye(), n = J(0), r = Ye(), o = J(0), s = Ye(), i = Ye(), a = J(0), l = J(0), c = J(0), d = J(0), f = Ye(), h = Ye(), p = J(!1), m = J(!1), y = J(!1);
5301
5301
  return ve(
5302
5302
  V(
5303
5303
  e,
5304
- fe(({ scrollTop: v }) => v)
5304
+ de(({ scrollTop: v }) => v)
5305
5305
  ),
5306
5306
  t
5307
5307
  ), ve(
5308
5308
  V(
5309
5309
  e,
5310
- fe(({ scrollHeight: v }) => v)
5310
+ de(({ scrollHeight: v }) => v)
5311
5311
  ),
5312
5312
  i
5313
5313
  ), ve(t, o), {
@@ -5476,7 +5476,7 @@ function xd(e, t) {
5476
5476
  function xo(e, t) {
5477
5477
  return !!(e && e[0] === t[0] && e[1] === t[1]);
5478
5478
  }
5479
- const Va = Ze(
5479
+ const Va = Je(
5480
5480
  () => ({ recalcInProgress: J(!1) }),
5481
5481
  [],
5482
5482
  { singleton: !0 }
@@ -5643,7 +5643,7 @@ function pv(e) {
5643
5643
  const mv = {
5644
5644
  offsetHeight: "height",
5645
5645
  offsetWidth: "width"
5646
- }, Fn = Ze(
5646
+ }, Fn = Je(
5647
5647
  ([{ log: e }, { recalcInProgress: t }]) => {
5648
5648
  const n = Ye(), r = Ye(), o = zt(r, 0), s = Ye(), i = Ye(), a = J(0), l = J([]), c = J(void 0), d = J(void 0), f = J((C, S) => Jn(C, mv[S])), h = J(void 0), p = J(0), m = iv(), y = zt(
5649
5649
  V(n, $e(l, e, p), Pn(dv, m), ht()),
@@ -5656,16 +5656,16 @@ const mv = {
5656
5656
  current: [],
5657
5657
  prev: []
5658
5658
  }),
5659
- fe(({ prev: C }) => C)
5659
+ de(({ prev: C }) => C)
5660
5660
  ),
5661
5661
  []
5662
5662
  );
5663
5663
  ve(
5664
5664
  V(
5665
5665
  l,
5666
- Ie((C) => C.length > 0),
5666
+ Ee((C) => C.length > 0),
5667
5667
  $e(y, p),
5668
- fe(([C, S, k]) => {
5668
+ de(([C, S, k]) => {
5669
5669
  const A = C.reduce((N, M, F) => Jt(N, M, yo(M, S.offsetTree, k) || F), Mr());
5670
5670
  return {
5671
5671
  ...S,
@@ -5679,8 +5679,8 @@ const mv = {
5679
5679
  V(
5680
5680
  r,
5681
5681
  $e(y),
5682
- Ie(([C, { lastIndex: S }]) => C < S),
5683
- fe(([C, { lastIndex: S, lastSize: k }]) => [
5682
+ Ee(([C, { lastIndex: S }]) => C < S),
5683
+ de(([C, { lastIndex: S, lastSize: k }]) => [
5684
5684
  {
5685
5685
  endIndex: S,
5686
5686
  size: k,
@@ -5693,15 +5693,15 @@ const mv = {
5693
5693
  const x = zt(
5694
5694
  V(
5695
5695
  c,
5696
- fe((C) => C === void 0)
5696
+ de((C) => C === void 0)
5697
5697
  ),
5698
5698
  !0
5699
5699
  );
5700
5700
  ve(
5701
5701
  V(
5702
5702
  d,
5703
- Ie((C) => C !== void 0 && lt(bt(y).sizeTree)),
5704
- fe((C) => [{ endIndex: 0, size: C, startIndex: 0 }])
5703
+ Ee((C) => C !== void 0 && lt(bt(y).sizeTree)),
5704
+ de((C) => [{ endIndex: 0, size: C, startIndex: 0 }])
5705
5705
  ),
5706
5706
  n
5707
5707
  );
@@ -5716,17 +5716,17 @@ const mv = {
5716
5716
  }),
5717
5717
  { changed: !1, sizes: m }
5718
5718
  ),
5719
- fe((C) => C.changed)
5719
+ de((C) => C.changed)
5720
5720
  )
5721
5721
  );
5722
- nt(
5722
+ tt(
5723
5723
  V(
5724
5724
  a,
5725
5725
  Pn(
5726
5726
  (C, S) => ({ diff: C.prev - S, prev: S }),
5727
5727
  { diff: 0, prev: 0 }
5728
5728
  ),
5729
- fe((C) => C.diff)
5729
+ de((C) => C.diff)
5730
5730
  ),
5731
5731
  (C) => {
5732
5732
  const { groupIndices: S } = bt(y);
@@ -5737,7 +5737,7 @@ const mv = {
5737
5737
  k.length > 0 && (C -= bc(-C, k)), Oe(i, C);
5738
5738
  }
5739
5739
  }
5740
- ), nt(V(a, $e(e)), ([C, S]) => {
5740
+ ), tt(V(a, $e(e)), ([C, S]) => {
5741
5741
  C < 0 && S(
5742
5742
  "`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",
5743
5743
  { firstItemIndex: a },
@@ -5749,7 +5749,7 @@ const mv = {
5749
5749
  V(
5750
5750
  s,
5751
5751
  $e(y),
5752
- fe(([C, S]) => {
5752
+ de(([C, S]) => {
5753
5753
  const k = S.groupIndices.length > 0, A = [], N = S.lastSize;
5754
5754
  if (k) {
5755
5755
  const M = go(S.sizeTree, 0);
@@ -5810,7 +5810,7 @@ const mv = {
5810
5810
  V(
5811
5811
  i,
5812
5812
  $e(y, p),
5813
- fe(([C, { offsetTree: S }, k]) => {
5813
+ de(([C, { offsetTree: S }, k]) => {
5814
5814
  const A = -C;
5815
5815
  return yo(A, S, k);
5816
5816
  })
@@ -5820,7 +5820,7 @@ const mv = {
5820
5820
  V(
5821
5821
  i,
5822
5822
  $e(y, p),
5823
- fe(([C, S, k]) => {
5823
+ de(([C, S, k]) => {
5824
5824
  if (S.groupIndices.length > 0) {
5825
5825
  if (lt(S.sizeTree))
5826
5826
  return S;
@@ -5888,43 +5888,43 @@ function gv(e) {
5888
5888
  }
5889
5889
  );
5890
5890
  }
5891
- const bd = Ze(
5891
+ const bd = Je(
5892
5892
  ([{ groupIndices: e, sizes: t, totalCount: n }, { headerHeight: r, scrollTop: o }]) => {
5893
- const s = Ye(), i = Ye(), a = Zt(V(s, fe(gv)));
5893
+ const s = Ye(), i = Ye(), a = Zt(V(s, de(gv)));
5894
5894
  return ve(
5895
5895
  V(
5896
5896
  a,
5897
- fe((l) => l.totalCount)
5897
+ de((l) => l.totalCount)
5898
5898
  ),
5899
5899
  n
5900
5900
  ), ve(
5901
5901
  V(
5902
5902
  a,
5903
- fe((l) => l.groupIndices)
5903
+ de((l) => l.groupIndices)
5904
5904
  ),
5905
5905
  e
5906
5906
  ), ve(
5907
5907
  V(
5908
5908
  Ct(o, t, r),
5909
- Ie(([l, c]) => Ws(c)),
5910
- fe(([l, c, d]) => yn(c.groupOffsetTree, Math.max(l - d, 0), "v")[0]),
5909
+ Ee(([l, c]) => Ws(c)),
5910
+ de(([l, c, d]) => yn(c.groupOffsetTree, Math.max(l - d, 0), "v")[0]),
5911
5911
  ht(),
5912
- fe((l) => [l])
5912
+ de((l) => [l])
5913
5913
  ),
5914
5914
  i
5915
5915
  ), { groupCounts: s, topItemsIndexes: i };
5916
5916
  },
5917
5917
  pt(Fn, Bt)
5918
- ), or = Ze(
5918
+ ), or = Je(
5919
5919
  ([{ log: e }]) => {
5920
5920
  const t = J(!1), n = Zt(
5921
5921
  V(
5922
5922
  t,
5923
- Ie((r) => r),
5923
+ Ee((r) => r),
5924
5924
  ht()
5925
5925
  )
5926
5926
  );
5927
- return nt(t, (r) => {
5927
+ return tt(t, (r) => {
5928
5928
  r && bt(e)("props updated", {}, Kt.DEBUG);
5929
5929
  }), { didMount: n, propsReady: t };
5930
5930
  },
@@ -5935,7 +5935,7 @@ function Sd(e) {
5935
5935
  const t = typeof e == "number" ? { index: e } : e;
5936
5936
  return t.align || (t.align = "start"), (!t.behavior || !xv) && (t.behavior = "auto"), t.offset || (t.offset = 0), t;
5937
5937
  }
5938
- const No = Ze(
5938
+ const No = Je(
5939
5939
  ([
5940
5940
  { gap: e, listRefresh: t, sizes: n, totalCount: r },
5941
5941
  {
@@ -5960,22 +5960,22 @@ const No = Ze(
5960
5960
  p,
5961
5961
  $e(n, f, r, y, a, i, h),
5962
5962
  $e(e, s, o),
5963
- fe(
5963
+ de(
5964
5964
  ([
5965
5965
  [T, C, S, k, A, N, M, F],
5966
5966
  q,
5967
5967
  j,
5968
5968
  _
5969
5969
  ]) => {
5970
- const D = Sd(T), { align: L, behavior: ne, offset: K } = D, z = k - 1, he = wd(D, C, z);
5971
- let W = yo(he, C.offsetTree, q) + N;
5972
- L === "end" ? (W += j + yn(C.sizeTree, he)[1] - S + _, he === z && (W += M)) : L === "center" ? W += (j + yn(C.sizeTree, he)[1] - S + _) / 2 : W -= A, K && (W += K);
5970
+ const D = Sd(T), { align: L, behavior: ne, offset: K } = D, z = k - 1, fe = wd(D, C, z);
5971
+ let W = yo(fe, C.offsetTree, q) + N;
5972
+ L === "end" ? (W += j + yn(C.sizeTree, fe)[1] - S + _, fe === z && (W += M)) : L === "center" ? W += (j + yn(C.sizeTree, fe)[1] - S + _) / 2 : W -= A, K && (W += K);
5973
5973
  const ce = (B) => {
5974
5974
  b(), B ? (F("retrying to scroll to", { location: T }, Kt.DEBUG), Oe(p, T)) : (Oe(m, !0), F("list did not change, scroll successful", {}, Kt.DEBUG));
5975
5975
  };
5976
5976
  if (b(), ne === "smooth") {
5977
5977
  let B = !1;
5978
- w = nt(t, (Z) => {
5978
+ w = tt(t, (Z) => {
5979
5979
  B = B || Z;
5980
5980
  }), v = xn(d, () => {
5981
5981
  ce(B);
@@ -5984,7 +5984,7 @@ const No = Ze(
5984
5984
  v = xn(V(t, yv(150)), ce);
5985
5985
  return x = setTimeout(() => {
5986
5986
  b();
5987
- }, 1200), Oe(l, !0), F("scrolling from index to", { behavior: ne, index: he, top: W }, Kt.DEBUG), { behavior: ne, top: W };
5987
+ }, 1200), Oe(l, !0), F("scrolling from index to", { behavior: ne, index: fe, top: W }, Kt.DEBUG), { behavior: ne, top: W };
5988
5988
  }
5989
5989
  )
5990
5990
  ),
@@ -6017,14 +6017,14 @@ function Ga(e, t) {
6017
6017
  const n = t - 1;
6018
6018
  return typeof e == "number" ? e : e.index === "LAST" ? n : e.index;
6019
6019
  }
6020
- const _o = Ze(
6020
+ const _o = Je(
6021
6021
  ([{ defaultItemSize: e, listRefresh: t, sizes: n }, { scrollTop: r }, { scrollTargetReached: o, scrollToIndex: s }, { didMount: i }]) => {
6022
6022
  const a = J(!0), l = J(0), c = J(!0);
6023
6023
  return ve(
6024
6024
  V(
6025
6025
  i,
6026
6026
  $e(l),
6027
- Ie(([d, f]) => !!f),
6027
+ Ee(([d, f]) => !!f),
6028
6028
  _n(!1)
6029
6029
  ),
6030
6030
  a
@@ -6032,15 +6032,15 @@ const _o = Ze(
6032
6032
  V(
6033
6033
  i,
6034
6034
  $e(l),
6035
- Ie(([d, f]) => !!f),
6035
+ Ee(([d, f]) => !!f),
6036
6036
  _n(!1)
6037
6037
  ),
6038
6038
  c
6039
- ), nt(
6039
+ ), tt(
6040
6040
  V(
6041
6041
  Ct(t, i),
6042
6042
  $e(a, n, e, c),
6043
- Ie(([[, d], f, { sizeTree: h }, p, m]) => d && (!lt(h) || Ha(p)) && !f && !m),
6043
+ Ee(([[, d], f, { sizeTree: h }, p, m]) => d && (!lt(h) || Ha(p)) && !f && !m),
6044
6044
  $e(l)
6045
6045
  ),
6046
6046
  ([, d]) => {
@@ -6073,10 +6073,10 @@ const vo = "up", ao = "down", vv = "none", wv = {
6073
6073
  scrollTop: 0,
6074
6074
  viewportHeight: 0
6075
6075
  }
6076
- }, bv = 0, jo = Ze(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: s }]) => {
6076
+ }, bv = 0, jo = Je(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: s }]) => {
6077
6077
  const i = J(!1), a = J(!0), l = Ye(), c = Ye(), d = J(4), f = J(bv), h = zt(
6078
6078
  V(
6079
- la(V(Ee(o), yr(1), _n(!0)), V(Ee(o), yr(1), _n(!1), yc(100))),
6079
+ la(V(Re(o), yr(1), _n(!0)), V(Re(o), yr(1), _n(!1), yc(100))),
6080
6080
  ht()
6081
6081
  ),
6082
6082
  !1
@@ -6086,15 +6086,15 @@ const vo = "up", ao = "down", vv = "none", wv = {
6086
6086
  );
6087
6087
  ve(
6088
6088
  V(
6089
- Ct(Ee(o), Ee(f)),
6090
- fe(([w, b]) => w <= b),
6089
+ Ct(Re(o), Re(f)),
6090
+ de(([w, b]) => w <= b),
6091
6091
  ht()
6092
6092
  ),
6093
6093
  a
6094
6094
  ), ve(V(a, Un(50)), c);
6095
6095
  const m = Zt(
6096
6096
  V(
6097
- Ct(r, Ee(s), Ee(t), Ee(e), Ee(d)),
6097
+ Ct(r, Re(s), Re(t), Re(e), Re(d)),
6098
6098
  Pn((w, [{ scrollHeight: b, scrollTop: T }, C, S, k, A]) => {
6099
6099
  const N = T + C - b > -A, M = {
6100
6100
  scrollHeight: b,
@@ -6148,15 +6148,15 @@ const vo = "up", ao = "down", vv = "none", wv = {
6148
6148
  },
6149
6149
  { changed: !1, jump: 0, scrollHeight: 0, scrollTop: 0 }
6150
6150
  ),
6151
- Ie((w) => w.changed),
6152
- fe((w) => w.jump)
6151
+ Ee((w) => w.changed),
6152
+ de((w) => w.jump)
6153
6153
  ),
6154
6154
  0
6155
6155
  );
6156
6156
  ve(
6157
6157
  V(
6158
6158
  m,
6159
- fe((w) => w.atBottom)
6159
+ de((w) => w.atBottom)
6160
6160
  ),
6161
6161
  i
6162
6162
  ), ve(V(i, Un(50)), l);
@@ -6164,13 +6164,13 @@ const vo = "up", ao = "down", vv = "none", wv = {
6164
6164
  ve(
6165
6165
  V(
6166
6166
  r,
6167
- fe(({ scrollTop: w }) => w),
6167
+ de(({ scrollTop: w }) => w),
6168
6168
  ht(),
6169
6169
  Pn(
6170
6170
  (w, b) => bt(p) ? { direction: w.direction, prevScrollTop: b } : { direction: b < w.prevScrollTop ? vo : ao, prevScrollTop: b },
6171
6171
  { direction: ao, prevScrollTop: 0 }
6172
6172
  ),
6173
- fe((w) => w.direction)
6173
+ de((w) => w.direction)
6174
6174
  ),
6175
6175
  v
6176
6176
  ), ve(V(r, Un(50), _n(vv)), v);
@@ -6178,7 +6178,7 @@ const vo = "up", ao = "down", vv = "none", wv = {
6178
6178
  return ve(
6179
6179
  V(
6180
6180
  h,
6181
- Ie((w) => !w),
6181
+ Ee((w) => !w),
6182
6182
  _n(0)
6183
6183
  ),
6184
6184
  x
@@ -6187,9 +6187,9 @@ const vo = "up", ao = "down", vv = "none", wv = {
6187
6187
  o,
6188
6188
  Un(100),
6189
6189
  $e(h),
6190
- Ie(([w, b]) => !!b),
6190
+ Ee(([w, b]) => !!b),
6191
6191
  Pn(([w, b], [T]) => [b, T], [0, 0]),
6192
- fe(([w, b]) => b - w)
6192
+ de(([w, b]) => b - w)
6193
6193
  ),
6194
6194
  x
6195
6195
  ), {
@@ -6213,22 +6213,22 @@ function Tc(e, t) {
6213
6213
  var n;
6214
6214
  return typeof e == "number" ? e : (n = e[t]) != null ? n : 0;
6215
6215
  }
6216
- const Ya = Ze(
6216
+ const Ya = Je(
6217
6217
  ([{ deviation: e, fixedHeaderHeight: t, headerHeight: n, scrollTop: r, viewportHeight: o }]) => {
6218
6218
  const s = Ye(), i = J(0), a = J(0), l = J(0), c = zt(
6219
6219
  V(
6220
6220
  Ct(
6221
- Ee(r),
6222
- Ee(o),
6223
- Ee(n),
6224
- Ee(s, xo),
6225
- Ee(l),
6226
- Ee(i),
6227
- Ee(t),
6228
- Ee(e),
6229
- Ee(a)
6221
+ Re(r),
6222
+ Re(o),
6223
+ Re(n),
6224
+ Re(s, xo),
6225
+ Re(l),
6226
+ Re(i),
6227
+ Re(t),
6228
+ Re(e),
6229
+ Re(a)
6230
6230
  ),
6231
- fe(
6231
+ de(
6232
6232
  ([
6233
6233
  d,
6234
6234
  f,
@@ -6249,7 +6249,7 @@ const Ya = Ze(
6249
6249
  ] : null;
6250
6250
  }
6251
6251
  ),
6252
- Ie((d) => d != null),
6252
+ Ee((d) => d != null),
6253
6253
  ht(xo)
6254
6254
  ),
6255
6255
  [0, 0]
@@ -6351,7 +6351,7 @@ function kc(e, t, n) {
6351
6351
  }
6352
6352
  return s;
6353
6353
  }
6354
- const kr = Ze(
6354
+ const kr = Je(
6355
6355
  ([
6356
6356
  { data: e, firstItemIndex: t, gap: n, sizes: r, totalCount: o },
6357
6357
  s,
@@ -6369,21 +6369,21 @@ const kr = Ze(
6369
6369
  Ct(
6370
6370
  p,
6371
6371
  m,
6372
- Ee(l, xo),
6373
- Ee(o),
6374
- Ee(r),
6375
- Ee(c),
6372
+ Re(l, xo),
6373
+ Re(o),
6374
+ Re(r),
6375
+ Re(c),
6376
6376
  d,
6377
- Ee(y),
6378
- Ee(t),
6379
- Ee(n),
6377
+ Re(y),
6378
+ Re(t),
6379
+ Re(n),
6380
6380
  e
6381
6381
  ),
6382
- Ie(([S, k, , A, , , , , , , N]) => {
6382
+ Ee(([S, k, , A, , , , , , , N]) => {
6383
6383
  const M = N && N.length !== A;
6384
6384
  return S && !k && !M;
6385
6385
  }),
6386
- fe(
6386
+ de(
6387
6387
  ([
6388
6388
  ,
6389
6389
  ,
@@ -6411,18 +6411,18 @@ const kr = Ze(
6411
6411
  L,
6412
6412
  j
6413
6413
  );
6414
- const he = [];
6414
+ const fe = [];
6415
6415
  if (q.length > 0) {
6416
6416
  const we = q[0], xe = q[q.length - 1];
6417
6417
  let G = 0;
6418
6418
  for (const O of Us(K, we, xe)) {
6419
6419
  const X = O.value, oe = Math.max(O.start, we), ge = Math.min(O.end, xe);
6420
6420
  for (let se = oe; se <= ge; se++)
6421
- he.push({ data: D == null ? void 0 : D[se], index: se, offset: G, size: X }), G += X;
6421
+ fe.push({ data: D == null ? void 0 : D[se], index: se, offset: G, size: X }), G += X;
6422
6422
  }
6423
6423
  }
6424
6424
  if (!F)
6425
- return os([], he, A, _, L, j);
6425
+ return os([], fe, A, _, L, j);
6426
6426
  const W = q.length > 0 ? q[q.length - 1] + 1 : 0, ce = uv(ne, S, k, W);
6427
6427
  if (ce.length === 0)
6428
6428
  return null;
@@ -6442,11 +6442,11 @@ const kr = Ze(
6442
6442
  we.push({ data: D == null ? void 0 : D[se], index: se, offset: O, size: oe }), O += oe + _;
6443
6443
  }
6444
6444
  });
6445
- return os(Z, he, A, _, L, j);
6445
+ return os(Z, fe, A, _, L, j);
6446
6446
  }
6447
6447
  ),
6448
6448
  //@ts-expect-error filter needs to be fixed
6449
- Ie((S) => S !== null),
6449
+ Ee((S) => S !== null),
6450
6450
  ht()
6451
6451
  ),
6452
6452
  Ni
@@ -6454,52 +6454,52 @@ const kr = Ze(
6454
6454
  ve(
6455
6455
  V(
6456
6456
  e,
6457
- Ie(Ha),
6458
- fe((S) => S == null ? void 0 : S.length)
6457
+ Ee(Ha),
6458
+ de((S) => S == null ? void 0 : S.length)
6459
6459
  ),
6460
6460
  o
6461
6461
  ), ve(
6462
6462
  V(
6463
6463
  w,
6464
- fe((S) => S.topListHeight)
6464
+ de((S) => S.topListHeight)
6465
6465
  ),
6466
6466
  f
6467
6467
  ), ve(f, a), ve(
6468
6468
  V(
6469
6469
  w,
6470
- fe((S) => [S.top, S.bottom])
6470
+ de((S) => [S.top, S.bottom])
6471
6471
  ),
6472
6472
  i
6473
6473
  ), ve(
6474
6474
  V(
6475
6475
  w,
6476
- fe((S) => S.items)
6476
+ de((S) => S.items)
6477
6477
  ),
6478
6478
  x
6479
6479
  );
6480
6480
  const b = Zt(
6481
6481
  V(
6482
6482
  w,
6483
- Ie(({ items: S }) => S.length > 0),
6483
+ Ee(({ items: S }) => S.length > 0),
6484
6484
  $e(o, e),
6485
- Ie(([{ items: S }, k]) => S[S.length - 1].originalIndex === k - 1),
6486
- fe(([, S, k]) => [S - 1, k]),
6485
+ Ee(([{ items: S }, k]) => S[S.length - 1].originalIndex === k - 1),
6486
+ de(([, S, k]) => [S - 1, k]),
6487
6487
  ht(xo),
6488
- fe(([S]) => S)
6488
+ de(([S]) => S)
6489
6489
  )
6490
6490
  ), T = Zt(
6491
6491
  V(
6492
6492
  w,
6493
6493
  Un(200),
6494
- Ie(({ items: S, topItems: k }) => S.length > 0 && S[0].originalIndex === k.length),
6495
- fe(({ items: S }) => S[0].index),
6494
+ Ee(({ items: S, topItems: k }) => S.length > 0 && S[0].originalIndex === k.length),
6495
+ de(({ items: S }) => S[0].index),
6496
6496
  ht()
6497
6497
  )
6498
6498
  ), C = Zt(
6499
6499
  V(
6500
6500
  w,
6501
- Ie(({ items: S }) => S.length > 0),
6502
- fe(({ items: S }) => {
6501
+ Ee(({ items: S }) => S.length > 0),
6502
+ de(({ items: S }) => {
6503
6503
  let k = 0, A = S.length - 1;
6504
6504
  for (; S[k].type === "group" && k < A; )
6505
6505
  k++;
@@ -6526,26 +6526,26 @@ const kr = Ze(
6526
6526
  Va
6527
6527
  ),
6528
6528
  { singleton: !0 }
6529
- ), kd = Ze(
6529
+ ), kd = Je(
6530
6530
  ([{ fixedFooterHeight: e, fixedHeaderHeight: t, footerHeight: n, headerHeight: r }, { listState: o }]) => {
6531
6531
  const s = Ye(), i = zt(
6532
6532
  V(
6533
6533
  Ct(n, e, r, t, o),
6534
- fe(([a, l, c, d, f]) => a + l + c + d + f.offsetBottom + f.bottom)
6534
+ de(([a, l, c, d, f]) => a + l + c + d + f.offsetBottom + f.bottom)
6535
6535
  ),
6536
6536
  0
6537
6537
  );
6538
- return ve(Ee(i), s), { totalListHeight: i, totalListHeightChanged: s };
6538
+ return ve(Re(i), s), { totalListHeight: i, totalListHeightChanged: s };
6539
6539
  },
6540
6540
  pt(Bt, kr),
6541
6541
  { singleton: !0 }
6542
- ), Cv = Ze(
6542
+ ), Cv = Je(
6543
6543
  ([{ viewportHeight: e }, { totalListHeight: t }]) => {
6544
6544
  const n = J(!1), r = zt(
6545
6545
  V(
6546
6546
  Ct(n, e, t),
6547
- Ie(([o]) => o),
6548
- fe(([, o, s]) => Math.max(0, o - s)),
6547
+ Ee(([o]) => o),
6548
+ de(([, o, s]) => Math.max(0, o - s)),
6549
6549
  Un(0),
6550
6550
  ht()
6551
6551
  ),
@@ -6555,7 +6555,7 @@ const kr = Ze(
6555
6555
  },
6556
6556
  pt(Bt, kd),
6557
6557
  { singleton: !0 }
6558
- ), Rd = Ze(() => ({
6558
+ ), Rd = Je(() => ({
6559
6559
  context: J(null)
6560
6560
  })), Tv = ({
6561
6561
  itemBottom: e,
@@ -6563,7 +6563,7 @@ const kr = Ze(
6563
6563
  locationParams: { align: n, behavior: r, ...o },
6564
6564
  viewportBottom: s,
6565
6565
  viewportTop: i
6566
- }) => t < i ? { ...o, align: n ?? "start", behavior: r } : e > s ? { ...o, align: n ?? "end", behavior: r } : null, Ed = Ze(
6566
+ }) => t < i ? { ...o, align: n ?? "start", behavior: r } : e > s ? { ...o, align: n ?? "end", behavior: r } : null, Ed = Je(
6567
6567
  ([
6568
6568
  { gap: e, sizes: t, totalCount: n },
6569
6569
  { fixedFooterHeight: r, fixedHeaderHeight: o, headerHeight: s, scrollingInProgress: i, scrollTop: a, viewportHeight: l },
@@ -6575,7 +6575,7 @@ const kr = Ze(
6575
6575
  d,
6576
6576
  $e(t, l, n, s, o, r, a),
6577
6577
  $e(e),
6578
- fe(([[f, h, p, m, y, v, x, w], b]) => {
6578
+ de(([[f, h, p, m, y, v, x, w], b]) => {
6579
6579
  const { align: T, behavior: C, calculateViewLocation: S = Tv, done: k, ...A } = f, N = wd(f, h, m - 1), M = yo(N, h.offsetTree, b) + y + v, F = M + yn(h.sizeTree, N)[1], q = w + v, j = w + p - x, _ = S({
6580
6580
  itemBottom: F,
6581
6581
  itemTop: M,
@@ -6586,7 +6586,7 @@ const kr = Ze(
6586
6586
  return _ ? k && xn(
6587
6587
  V(
6588
6588
  i,
6589
- Ie((D) => !D),
6589
+ Ee((D) => !D),
6590
6590
  // skips the initial publish of false, and the cleanup call.
6591
6591
  // but if scrollingInProgress is true, we skip the initial publish.
6592
6592
  yr(bt(i) ? 1 : 2)
@@ -6594,7 +6594,7 @@ const kr = Ze(
6594
6594
  k
6595
6595
  ) : k && k(), _;
6596
6596
  }),
6597
- Ie((f) => f !== null)
6597
+ Ee((f) => f !== null)
6598
6598
  ),
6599
6599
  c
6600
6600
  ), {
@@ -6607,7 +6607,7 @@ const kr = Ze(
6607
6607
  function Rc(e) {
6608
6608
  return e ? e === "smooth" ? "smooth" : "auto" : !1;
6609
6609
  }
6610
- const kv = (e, t) => typeof e == "function" ? Rc(e(t)) : t && Rc(e), Rv = Ze(
6610
+ const kv = (e, t) => typeof e == "function" ? Rc(e(t)) : t && Rc(e), Rv = Je(
6611
6611
  ([
6612
6612
  { listRefresh: e, totalCount: t, fixedItemSize: n, data: r },
6613
6613
  { atBottomState: o, isAtBottom: s },
@@ -6628,15 +6628,15 @@ const kv = (e, t) => typeof e == "function" ? Rc(e(t)) : t && Rc(e), Rv = Ze(
6628
6628
  index: "LAST"
6629
6629
  });
6630
6630
  }
6631
- nt(
6631
+ tt(
6632
6632
  V(
6633
- Ct(V(Ee(t), yr(1)), l),
6634
- $e(Ee(m), s, a, f),
6635
- fe(([[C, S], k, A, N, M]) => {
6633
+ Ct(V(Re(t), yr(1)), l),
6634
+ $e(Re(m), s, a, f),
6635
+ de(([[C, S], k, A, N, M]) => {
6636
6636
  let F = S && N, q = "auto";
6637
6637
  return F && (q = kv(k, A || M), F = F && !!q), { followOutputBehavior: q, shouldFollow: F, totalCount: C };
6638
6638
  }),
6639
- Ie(({ shouldFollow: C }) => C)
6639
+ Ee(({ shouldFollow: C }) => C)
6640
6640
  ),
6641
6641
  ({ followOutputBehavior: C, totalCount: S }) => {
6642
6642
  v && (v(), v = null), bt(n) ? requestAnimationFrame(() => {
@@ -6652,44 +6652,44 @@ const kv = (e, t) => typeof e == "function" ? Rc(e(t)) : t && Rc(e), Rv = Ze(
6652
6652
  });
6653
6653
  setTimeout(S, 100);
6654
6654
  }
6655
- nt(
6655
+ tt(
6656
6656
  V(
6657
- Ct(Ee(m), t, c),
6658
- Ie(([C, , S]) => C && S),
6657
+ Ct(Re(m), t, c),
6658
+ Ee(([C, , S]) => C && S),
6659
6659
  Pn(
6660
6660
  ({ value: C }, [, S]) => ({ refreshed: C === S, value: S }),
6661
6661
  { refreshed: !1, value: 0 }
6662
6662
  ),
6663
- Ie(({ refreshed: C }) => C),
6663
+ Ee(({ refreshed: C }) => C),
6664
6664
  $e(m, t)
6665
6665
  ),
6666
6666
  ([, C]) => {
6667
6667
  bt(a) && w(C !== !1);
6668
6668
  }
6669
- ), nt(y, () => {
6669
+ ), tt(y, () => {
6670
6670
  w(bt(m) !== !1);
6671
- }), nt(Ct(Ee(m), o), ([C, S]) => {
6671
+ }), tt(Ct(Re(m), o), ([C, S]) => {
6672
6672
  C && !S.atBottom && S.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && x("auto");
6673
6673
  });
6674
6674
  const b = J(null), T = Ye();
6675
6675
  return ve(
6676
6676
  la(
6677
6677
  V(
6678
- Ee(r),
6679
- fe((C) => {
6678
+ Re(r),
6679
+ de((C) => {
6680
6680
  var S;
6681
6681
  return (S = C == null ? void 0 : C.length) != null ? S : 0;
6682
6682
  })
6683
6683
  ),
6684
- V(Ee(t))
6684
+ V(Re(t))
6685
6685
  ),
6686
6686
  T
6687
- ), nt(
6687
+ ), tt(
6688
6688
  V(
6689
6689
  Ct(V(T, yr(1)), l),
6690
- $e(Ee(b), a, f, h),
6691
- fe(([[C, S], k, A, N, M]) => S && A && (k == null ? void 0 : k({ context: M, totalCount: C, scrollingInProgress: N }))),
6692
- Ie((C) => !!C),
6690
+ $e(Re(b), a, f, h),
6691
+ de(([[C, S], k, A, N, M]) => S && A && (k == null ? void 0 : k({ context: M, totalCount: C, scrollingInProgress: N }))),
6692
+ Ee((C) => !!C),
6693
6693
  Un(0)
6694
6694
  ),
6695
6695
  (C) => {
@@ -6712,35 +6712,35 @@ const kv = (e, t) => typeof e == "function" ? Rc(e(t)) : t && Rc(e), Rv = Ze(
6712
6712
  Rd,
6713
6713
  Ed
6714
6714
  )
6715
- ), Ev = Ze(
6715
+ ), Ev = Je(
6716
6716
  ([{ data: e, firstItemIndex: t, gap: n, sizes: r }, { initialTopMostItemIndex: o }, { initialItemCount: s, listState: i }, { didMount: a }]) => (ve(
6717
6717
  V(
6718
6718
  a,
6719
6719
  $e(s),
6720
- Ie(([, l]) => l !== 0),
6720
+ Ee(([, l]) => l !== 0),
6721
6721
  $e(o, r, t, n, e),
6722
- fe(([[, l], c, d, f, h, p = []]) => Td(l, c, d, f, h, p))
6722
+ de(([[, l], c, d, f, h, p = []]) => Td(l, c, d, f, h, p))
6723
6723
  ),
6724
6724
  i
6725
6725
  ), {}),
6726
6726
  pt(Fn, _o, kr, or),
6727
6727
  { singleton: !0 }
6728
- ), Iv = Ze(
6728
+ ), Iv = Je(
6729
6729
  ([{ didMount: e }, { scrollTo: t }, { listState: n }]) => {
6730
6730
  const r = J(0);
6731
- return nt(
6731
+ return tt(
6732
6732
  V(
6733
6733
  e,
6734
6734
  $e(r),
6735
- Ie(([, o]) => o !== 0),
6736
- fe(([, o]) => ({ top: o }))
6735
+ Ee(([, o]) => o !== 0),
6736
+ de(([, o]) => ({ top: o }))
6737
6737
  ),
6738
6738
  (o) => {
6739
6739
  xn(
6740
6740
  V(
6741
6741
  n,
6742
6742
  yr(1),
6743
- Ie((s) => s.items.length > 1)
6743
+ Ee((s) => s.items.length > 1)
6744
6744
  ),
6745
6745
  () => {
6746
6746
  requestAnimationFrame(() => {
@@ -6755,15 +6755,15 @@ const kv = (e, t) => typeof e == "function" ? Rc(e(t)) : t && Rc(e), Rv = Ze(
6755
6755
  },
6756
6756
  pt(or, Bt, kr),
6757
6757
  { singleton: !0 }
6758
- ), Id = Ze(
6758
+ ), Id = Je(
6759
6759
  ([{ scrollVelocity: e }]) => {
6760
6760
  const t = J(!1), n = Ye(), r = J(!1);
6761
6761
  return ve(
6762
6762
  V(
6763
6763
  e,
6764
6764
  $e(r, t, n),
6765
- Ie(([o, s]) => !!s),
6766
- fe(([o, s, i, a]) => {
6765
+ Ee(([o, s]) => !!s),
6766
+ de(([o, s, i, a]) => {
6767
6767
  const { enter: l, exit: c } = s;
6768
6768
  if (i) {
6769
6769
  if (c(o, a))
@@ -6775,7 +6775,7 @@ const kv = (e, t) => typeof e == "function" ? Rc(e(t)) : t && Rc(e), Rv = Ze(
6775
6775
  ht()
6776
6776
  ),
6777
6777
  t
6778
- ), nt(
6778
+ ), tt(
6779
6779
  V(Ct(t, e, n), $e(r)),
6780
6780
  ([[o, s, i], a]) => {
6781
6781
  o && a && a.change && a.change(s, i);
@@ -6784,12 +6784,12 @@ const kv = (e, t) => typeof e == "function" ? Rc(e(t)) : t && Rc(e), Rv = Ze(
6784
6784
  },
6785
6785
  pt(jo),
6786
6786
  { singleton: !0 }
6787
- ), Xa = Ze(([{ scrollContainerState: e, scrollTo: t }]) => {
6787
+ ), Xa = Je(([{ scrollContainerState: e, scrollTo: t }]) => {
6788
6788
  const n = Ye(), r = Ye(), o = Ye(), s = J(!1), i = J(void 0);
6789
6789
  return ve(
6790
6790
  V(
6791
6791
  Ct(n, r),
6792
- fe(([{ scrollHeight: a, scrollTop: l, viewportHeight: c }, { offsetTop: d }]) => ({
6792
+ de(([{ scrollHeight: a, scrollTop: l, viewportHeight: c }, { offsetTop: d }]) => ({
6793
6793
  scrollHeight: a,
6794
6794
  scrollTop: Math.max(0, l - d),
6795
6795
  viewportHeight: c
@@ -6800,7 +6800,7 @@ const kv = (e, t) => typeof e == "function" ? Rc(e(t)) : t && Rc(e), Rv = Ze(
6800
6800
  V(
6801
6801
  t,
6802
6802
  $e(r),
6803
- fe(([a, { offsetTop: l }]) => ({
6803
+ de(([a, { offsetTop: l }]) => ({
6804
6804
  ...a,
6805
6805
  top: a.top + l
6806
6806
  }))
@@ -6816,7 +6816,7 @@ const kv = (e, t) => typeof e == "function" ? Rc(e(t)) : t && Rc(e), Rv = Ze(
6816
6816
  windowScrollTo: o,
6817
6817
  windowViewportRect: r
6818
6818
  };
6819
- }, pt(Bt)), Av = Ze(
6819
+ }, pt(Bt)), Av = Je(
6820
6820
  ([
6821
6821
  { sizeRanges: e, sizes: t },
6822
6822
  { headerHeight: n, scrollTop: r },
@@ -6825,7 +6825,7 @@ const kv = (e, t) => typeof e == "function" ? Rc(e(t)) : t && Rc(e), Rv = Ze(
6825
6825
  { useWindowScroll: i, windowScrollContainerState: a, windowViewportRect: l }
6826
6826
  ]) => {
6827
6827
  const c = Ye(), d = J(void 0), f = J(null), h = J(null);
6828
- return ve(a, f), ve(l, h), nt(
6828
+ return ve(a, f), ve(l, h), tt(
6829
6829
  V(
6830
6830
  c,
6831
6831
  $e(t, r, i, f, h, n)
@@ -6834,13 +6834,13 @@ const kv = (e, t) => typeof e == "function" ? Rc(e(t)) : t && Rc(e), Rv = Ze(
6834
6834
  const T = fv(m.sizeTree);
6835
6835
  v && x !== null && w !== null && (y = x.scrollTop - w.offsetTop), y -= b, p({ ranges: T, scrollTop: y });
6836
6836
  }
6837
- ), ve(V(d, Ie(Ha), fe(Nv)), o), ve(
6837
+ ), ve(V(d, Ee(Ha), de(Nv)), o), ve(
6838
6838
  V(
6839
6839
  s,
6840
6840
  $e(d),
6841
- Ie(([, p]) => p !== void 0),
6841
+ Ee(([, p]) => p !== void 0),
6842
6842
  ht(),
6843
- fe(([, p]) => p.ranges)
6843
+ de(([, p]) => p.ranges)
6844
6844
  ),
6845
6845
  e
6846
6846
  ), {
@@ -6853,13 +6853,13 @@ const kv = (e, t) => typeof e == "function" ? Rc(e(t)) : t && Rc(e), Rv = Ze(
6853
6853
  function Nv(e) {
6854
6854
  return { align: "start", index: 0, offset: e.scrollTop };
6855
6855
  }
6856
- const _v = Ze(([{ topItemsIndexes: e }]) => {
6856
+ const _v = Je(([{ topItemsIndexes: e }]) => {
6857
6857
  const t = J(0);
6858
6858
  return ve(
6859
6859
  V(
6860
6860
  t,
6861
- Ie((n) => n >= 0),
6862
- fe((n) => Array.from({ length: n }).map((r, o) => o))
6861
+ Ee((n) => n >= 0),
6862
+ de((n) => Array.from({ length: n }).map((r, o) => o))
6863
6863
  ),
6864
6864
  e
6865
6865
  ), { topItemCount: t };
@@ -6868,7 +6868,7 @@ function Ad(e) {
6868
6868
  let t = !1, n;
6869
6869
  return () => (t || (t = !0, n = e()), n);
6870
6870
  }
6871
- const jv = Ad(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), Pv = Ze(
6871
+ const jv = Ad(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), Pv = Je(
6872
6872
  ([
6873
6873
  { deviation: e, scrollBy: t, scrollingInProgress: n, scrollTop: r },
6874
6874
  { isAtBottom: o, isScrolling: s, lastJumpDueToItemResize: i, scrollDirection: a },
@@ -6889,36 +6889,36 @@ const jv = Ad(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
6889
6889
  },
6890
6890
  [0, [], 0, 0]
6891
6891
  ),
6892
- Ie(([x]) => x !== 0),
6892
+ Ee(([x]) => x !== 0),
6893
6893
  $e(r, a, n, o, p, m),
6894
- Ie(([, x, w, b, , , T]) => !T && !b && x !== 0 && w === vo),
6895
- fe(([[x], , , , , w]) => (w("Upward scrolling compensation", { amount: x }, Kt.DEBUG), x))
6894
+ Ee(([, x, w, b, , , T]) => !T && !b && x !== 0 && w === vo),
6895
+ de(([[x], , , , , w]) => (w("Upward scrolling compensation", { amount: x }, Kt.DEBUG), x))
6896
6896
  )
6897
6897
  );
6898
6898
  function v(x) {
6899
6899
  x > 0 ? (Oe(t, { behavior: "auto", top: -x }), Oe(e, 0)) : (Oe(e, 0), Oe(t, { behavior: "auto", top: -x }));
6900
6900
  }
6901
- return nt(V(y, $e(e, s)), ([x, w, b]) => {
6901
+ return tt(V(y, $e(e, s)), ([x, w, b]) => {
6902
6902
  b && jv() ? Oe(e, w - x) : v(-x);
6903
- }), nt(
6903
+ }), tt(
6904
6904
  V(
6905
6905
  Ct(zt(s, !1), e, m),
6906
- Ie(([x, w, b]) => !x && !b && w !== 0),
6907
- fe(([x, w]) => w),
6906
+ Ee(([x, w, b]) => !x && !b && w !== 0),
6907
+ de(([x, w]) => w),
6908
6908
  Un(1)
6909
6909
  ),
6910
6910
  v
6911
6911
  ), ve(
6912
6912
  V(
6913
6913
  f,
6914
- fe((x) => ({ top: -x }))
6914
+ de((x) => ({ top: -x }))
6915
6915
  ),
6916
6916
  t
6917
- ), nt(
6917
+ ), tt(
6918
6918
  V(
6919
6919
  c,
6920
6920
  $e(h, d),
6921
- fe(([x, { groupIndices: w, lastSize: b, sizeTree: T }, C]) => {
6921
+ de(([x, { groupIndices: w, lastSize: b, sizeTree: T }, C]) => {
6922
6922
  function S(k) {
6923
6923
  return k * (b + C);
6924
6924
  }
@@ -6947,7 +6947,7 @@ const jv = Ad(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
6947
6947
  ), { deviation: e };
6948
6948
  },
6949
6949
  pt(Bt, jo, kr, Fn, rr, Va)
6950
- ), Ov = Ze(
6950
+ ), Ov = Je(
6951
6951
  ([
6952
6952
  e,
6953
6953
  t,
@@ -6986,7 +6986,7 @@ const jv = Ad(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
6986
6986
  rr,
6987
6987
  Rd
6988
6988
  )
6989
- ), Nd = Ze(
6989
+ ), Nd = Je(
6990
6990
  ([
6991
6991
  {
6992
6992
  data: e,
@@ -7015,7 +7015,7 @@ const jv = Ad(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
7015
7015
  ]) => (ve(T.rangeChanged, N.scrollSeekRangeChanged), ve(
7016
7016
  V(
7017
7017
  N.windowViewportRect,
7018
- fe((M) => M.visibleHeight)
7018
+ de((M) => M.visibleHeight)
7019
7019
  ),
7020
7020
  y.viewportHeight
7021
7021
  ), {
@@ -7104,7 +7104,7 @@ function _d(e, t, n) {
7104
7104
  })), [C] = U.useState(xc(d, T));
7105
7105
  Bo(() => {
7106
7106
  for (const k of i)
7107
- k in b && nt(C[k], b[k]);
7107
+ k in b && tt(C[k], b[k]);
7108
7108
  return () => {
7109
7109
  Object.values(C).map(Ua);
7110
7110
  };
@@ -7123,7 +7123,7 @@ function _d(e, t, n) {
7123
7123
  );
7124
7124
  }, p = (v) => {
7125
7125
  const x = U.useContext(a)[v], w = U.useCallback(
7126
- (b) => nt(x, b),
7126
+ (b) => tt(x, b),
7127
7127
  [x]
7128
7128
  );
7129
7129
  return U.useSyncExternalStore(
@@ -7134,7 +7134,7 @@ function _d(e, t, n) {
7134
7134
  }, m = (v) => {
7135
7135
  const x = U.useContext(a)[v], [w, b] = U.useState(xc(bt, x));
7136
7136
  return Bo(
7137
- () => nt(x, (T) => {
7137
+ () => tt(x, (T) => {
7138
7138
  T !== w && b(gc(T));
7139
7139
  }),
7140
7140
  [x, w]
@@ -7144,7 +7144,7 @@ function _d(e, t, n) {
7144
7144
  Component: f,
7145
7145
  useEmitter: (v, x) => {
7146
7146
  const w = U.useContext(a)[v];
7147
- Bo(() => nt(w, x), [x, w]);
7147
+ Bo(() => tt(w, x), [x, w]);
7148
7148
  },
7149
7149
  useEmitterValue: y,
7150
7150
  usePublisher: h
@@ -7217,11 +7217,11 @@ const ji = "-webkit-sticky", Ec = "sticky", Ja = Ad(() => {
7217
7217
  function Za(e) {
7218
7218
  return e;
7219
7219
  }
7220
- const Lv = /* @__PURE__ */ Ze(() => {
7220
+ const Lv = /* @__PURE__ */ Je(() => {
7221
7221
  const e = J((a) => `Item ${a}`), t = J((a) => `Group ${a}`), n = J({}), r = J(Za), o = J("div"), s = J(Kr), i = (a, l = null) => zt(
7222
7222
  V(
7223
7223
  n,
7224
- fe((c) => c[a]),
7224
+ de((c) => c[a]),
7225
7225
  ht()
7226
7226
  ),
7227
7227
  l
@@ -7243,11 +7243,11 @@ const Lv = /* @__PURE__ */ Ze(() => {
7243
7243
  ScrollSeekPlaceholder: i("ScrollSeekPlaceholder"),
7244
7244
  TopItemListComponent: i("TopItemList")
7245
7245
  };
7246
- }), Fv = /* @__PURE__ */ Ze(
7246
+ }), Fv = /* @__PURE__ */ Je(
7247
7247
  ([e, t]) => ({ ...e, ...t }),
7248
7248
  pt(Nd, Lv)
7249
7249
  ), $v = ({ height: e }) => /* @__PURE__ */ u.jsx("div", { style: { height: e } }), zv = { overflowAnchor: "none", position: Ja(), zIndex: 1 }, Dd = { overflowAnchor: "none" }, Bv = { ...Dd, display: "inline-block", height: "100%" }, Ic = /* @__PURE__ */ U.memo(function({ showTopList: e = !1 }) {
7250
- const t = Ne("listState"), n = sn("sizeRanges"), r = Ne("useWindowScroll"), o = Ne("customScrollParent"), s = sn("windowScrollContainerState"), i = sn("scrollContainerState"), a = o || r ? s : i, l = Ne("itemContent"), c = Ne("context"), d = Ne("groupContent"), f = Ne("trackItemSizes"), h = Ne("itemSize"), p = Ne("log"), m = sn("gap"), y = Ne("horizontalDirection"), { callbackRef: v } = nv(
7250
+ const t = Ae("listState"), n = sn("sizeRanges"), r = Ae("useWindowScroll"), o = Ae("customScrollParent"), s = sn("windowScrollContainerState"), i = sn("scrollContainerState"), a = o || r ? s : i, l = Ae("itemContent"), c = Ae("context"), d = Ae("groupContent"), f = Ae("trackItemSizes"), h = Ae("itemSize"), p = Ae("log"), m = sn("gap"), y = Ae("horizontalDirection"), { callbackRef: v } = nv(
7251
7251
  n,
7252
7252
  h,
7253
7253
  f,
@@ -7256,12 +7256,12 @@ const Lv = /* @__PURE__ */ Ze(() => {
7256
7256
  m,
7257
7257
  o,
7258
7258
  y,
7259
- Ne("skipAnimationFrameInResizeObserver")
7259
+ Ae("skipAnimationFrameInResizeObserver")
7260
7260
  ), [x, w] = U.useState(0);
7261
7261
  Qa("deviation", (_) => {
7262
7262
  x !== _ && w(_);
7263
7263
  });
7264
- const b = Ne("EmptyPlaceholder"), T = Ne("ScrollSeekPlaceholder") || $v, C = Ne("ListComponent"), S = Ne("ItemComponent"), k = Ne("GroupComponent"), A = Ne("computeItemKey"), N = Ne("isSeeking"), M = Ne("groupIndices").length > 0, F = Ne("alignToBottom"), q = Ne("initialItemFinalLocationReached"), j = e ? {} : {
7264
+ const b = Ae("EmptyPlaceholder"), T = Ae("ScrollSeekPlaceholder") || $v, C = Ae("ListComponent"), S = Ae("ItemComponent"), k = Ae("GroupComponent"), A = Ae("computeItemKey"), N = Ae("isSeeking"), M = Ae("groupIndices").length > 0, F = Ae("alignToBottom"), q = Ae("initialItemFinalLocationReached"), j = e ? {} : {
7265
7265
  boxSizing: "border-box",
7266
7266
  ...y ? {
7267
7267
  display: "inline-block",
@@ -7354,7 +7354,7 @@ function Vv(e, t) {
7354
7354
  return { item: typeof e == "string" ? void 0 : t };
7355
7355
  }
7356
7356
  const Kv = /* @__PURE__ */ U.memo(function() {
7357
- const e = Ne("HeaderComponent"), t = sn("headerHeight"), n = Ne("HeaderFooterTag"), r = Tr(
7357
+ const e = Ae("HeaderComponent"), t = sn("headerHeight"), n = Ae("HeaderFooterTag"), r = Tr(
7358
7358
  U.useMemo(
7359
7359
  () => (s) => {
7360
7360
  t(Jn(s, "height"));
@@ -7362,11 +7362,11 @@ const Kv = /* @__PURE__ */ U.memo(function() {
7362
7362
  [t]
7363
7363
  ),
7364
7364
  !0,
7365
- Ne("skipAnimationFrameInResizeObserver")
7366
- ), o = Ne("context");
7365
+ Ae("skipAnimationFrameInResizeObserver")
7366
+ ), o = Ae("context");
7367
7367
  return e ? /* @__PURE__ */ u.jsx(n, { ref: r, children: /* @__PURE__ */ u.jsx(e, { ...$t(e, o) }) }) : null;
7368
7368
  }), qv = /* @__PURE__ */ U.memo(function() {
7369
- const e = Ne("FooterComponent"), t = sn("footerHeight"), n = Ne("HeaderFooterTag"), r = Tr(
7369
+ const e = Ae("FooterComponent"), t = sn("footerHeight"), n = Ae("HeaderFooterTag"), r = Tr(
7370
7370
  U.useMemo(
7371
7371
  () => (s) => {
7372
7372
  t(Jn(s, "height"));
@@ -7374,8 +7374,8 @@ const Kv = /* @__PURE__ */ U.memo(function() {
7374
7374
  [t]
7375
7375
  ),
7376
7376
  !0,
7377
- Ne("skipAnimationFrameInResizeObserver")
7378
- ), o = Ne("context");
7377
+ Ae("skipAnimationFrameInResizeObserver")
7378
+ ), o = Ae("context");
7379
7379
  return e ? /* @__PURE__ */ u.jsx(n, { ref: r, children: /* @__PURE__ */ u.jsx(e, { ...$t(e, o) }) }) : null;
7380
7380
  });
7381
7381
  function Ld({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
@@ -7431,27 +7431,27 @@ function Fd({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
7431
7431
  });
7432
7432
  }
7433
7433
  const Gv = ({ children: e }) => {
7434
- const t = U.useContext(jd), n = sn("viewportHeight"), r = sn("fixedItemHeight"), o = Ne("alignToBottom"), s = Ne("horizontalDirection"), i = U.useMemo(
7434
+ const t = U.useContext(jd), n = sn("viewportHeight"), r = sn("fixedItemHeight"), o = Ae("alignToBottom"), s = Ae("horizontalDirection"), i = U.useMemo(
7435
7435
  () => cd(n, (l) => Jn(l, s ? "width" : "height")),
7436
7436
  [n, s]
7437
- ), a = Tr(i, !0, Ne("skipAnimationFrameInResizeObserver"));
7437
+ ), a = Tr(i, !0, Ae("skipAnimationFrameInResizeObserver"));
7438
7438
  return U.useEffect(() => {
7439
7439
  t && (n(t.viewportHeight), r(t.itemHeight));
7440
7440
  }, [t, n, r]), /* @__PURE__ */ u.jsx("div", { "data-viewport-type": "element", ref: a, style: Vs(o), children: e });
7441
7441
  }, Yv = ({ children: e }) => {
7442
- const t = U.useContext(jd), n = sn("windowViewportRect"), r = sn("fixedItemHeight"), o = Ne("customScrollParent"), s = dd(
7442
+ const t = U.useContext(jd), n = sn("windowViewportRect"), r = sn("fixedItemHeight"), o = Ae("customScrollParent"), s = dd(
7443
7443
  n,
7444
7444
  o,
7445
- Ne("skipAnimationFrameInResizeObserver")
7446
- ), i = Ne("alignToBottom");
7445
+ Ae("skipAnimationFrameInResizeObserver")
7446
+ ), i = Ae("alignToBottom");
7447
7447
  return U.useEffect(() => {
7448
7448
  t && (r(t.itemHeight), n({ offsetTop: 0, visibleHeight: t.viewportHeight, visibleWidth: 100 }));
7449
7449
  }, [t, n, r]), /* @__PURE__ */ u.jsx("div", { "data-viewport-type": "window", ref: s, style: Vs(i), children: e });
7450
7450
  }, Xv = ({ children: e }) => {
7451
- const t = Ne("TopItemListComponent") || "div", n = Ne("headerHeight"), r = { ...Wv, marginTop: `${n}px` }, o = Ne("context");
7451
+ const t = Ae("TopItemListComponent") || "div", n = Ae("headerHeight"), r = { ...Wv, marginTop: `${n}px` }, o = Ae("context");
7452
7452
  return /* @__PURE__ */ u.jsx(t, { style: r, ...$t(t, o), children: e });
7453
7453
  }, Jv = /* @__PURE__ */ U.memo(function(e) {
7454
- const t = Ne("useWindowScroll"), n = Ne("topItemsIndexes").length > 0, r = Ne("customScrollParent"), o = Ne("context");
7454
+ const t = Ae("useWindowScroll"), n = Ae("topItemsIndexes").length > 0, r = Ae("customScrollParent"), o = Ae("context");
7455
7455
  return /* @__PURE__ */ u.jsxs(r || t ? ew : Qv, { ...e, context: o, children: [
7456
7456
  n && /* @__PURE__ */ u.jsx(Xv, { children: /* @__PURE__ */ u.jsx(Ic, { showTopList: !0 }) }),
7457
7457
  /* @__PURE__ */ u.jsxs(r || t ? Yv : Gv, { children: [
@@ -7463,7 +7463,7 @@ const Gv = ({ children: e }) => {
7463
7463
  }), {
7464
7464
  Component: Zv,
7465
7465
  useEmitter: Qa,
7466
- useEmitterValue: Ne,
7466
+ useEmitterValue: Ae,
7467
7467
  usePublisher: sn
7468
7468
  } = /* @__PURE__ */ _d(
7469
7469
  Fv,
@@ -7524,7 +7524,7 @@ const Gv = ({ children: e }) => {
7524
7524
  }
7525
7525
  },
7526
7526
  Jv
7527
- ), Qv = /* @__PURE__ */ Ld({ useEmitter: Qa, useEmitterValue: Ne, usePublisher: sn }), ew = /* @__PURE__ */ Fd({ useEmitter: Qa, useEmitterValue: Ne, usePublisher: sn }), tw = Zv, nw = /* @__PURE__ */ Ze(() => {
7527
+ ), Qv = /* @__PURE__ */ Ld({ useEmitter: Qa, useEmitterValue: Ae, usePublisher: sn }), ew = /* @__PURE__ */ Fd({ useEmitter: Qa, useEmitterValue: Ae, usePublisher: sn }), tw = Zv, nw = /* @__PURE__ */ Je(() => {
7528
7528
  const e = J((c) => /* @__PURE__ */ u.jsxs("td", { children: [
7529
7529
  "Item $",
7530
7530
  c
@@ -7534,7 +7534,7 @@ const Gv = ({ children: e }) => {
7534
7534
  ] })), r = J(null), o = J(null), s = J({}), i = J(Za), a = J(Kr), l = (c, d = null) => zt(
7535
7535
  V(
7536
7536
  s,
7537
- fe((f) => f[c]),
7537
+ de((f) => f[c]),
7538
7538
  ht()
7539
7539
  ),
7540
7540
  d
@@ -7594,7 +7594,7 @@ function Ho(e, t) {
7594
7594
  function sw(e, t) {
7595
7595
  return e && e.column === t.column && e.row === t.row;
7596
7596
  }
7597
- const iw = /* @__PURE__ */ Ze(
7597
+ const iw = /* @__PURE__ */ Je(
7598
7598
  ([
7599
7599
  { increaseViewportBy: e, listBoundary: t, overscan: n, visibleRange: r },
7600
7600
  { footerHeight: o, headerHeight: s, scrollBy: i, scrollContainerState: a, scrollTo: l, scrollTop: c, smoothScrollTargetReached: d, viewportHeight: f },
@@ -7604,40 +7604,40 @@ const iw = /* @__PURE__ */ Ze(
7604
7604
  { customScrollParent: v, useWindowScroll: x, windowScrollContainerState: w, windowScrollTo: b, windowViewportRect: T },
7605
7605
  C
7606
7606
  ]) => {
7607
- const S = J(0), k = J(0), A = J(Ac), N = J({ height: 0, width: 0 }), M = J({ height: 0, width: 0 }), F = Ye(), q = Ye(), j = J(0), _ = J(null), D = J({ column: 0, row: 0 }), L = Ye(), ne = Ye(), K = J(!1), z = J(0), he = J(!0), W = J(!1), ce = J(!1);
7608
- nt(
7607
+ const S = J(0), k = J(0), A = J(Ac), N = J({ height: 0, width: 0 }), M = J({ height: 0, width: 0 }), F = Ye(), q = Ye(), j = J(0), _ = J(null), D = J({ column: 0, row: 0 }), L = Ye(), ne = Ye(), K = J(!1), z = J(0), fe = J(!0), W = J(!1), ce = J(!1);
7608
+ tt(
7609
7609
  V(
7610
7610
  m,
7611
7611
  $e(z),
7612
- Ie(([O, X]) => !!X)
7612
+ Ee(([O, X]) => !!X)
7613
7613
  ),
7614
7614
  () => {
7615
- Oe(he, !1);
7615
+ Oe(fe, !1);
7616
7616
  }
7617
- ), nt(
7617
+ ), tt(
7618
7618
  V(
7619
- Ct(m, he, M, N, z, W),
7620
- Ie(([O, X, oe, ge, , se]) => O && !X && oe.height !== 0 && ge.height !== 0 && !se)
7619
+ Ct(m, fe, M, N, z, W),
7620
+ Ee(([O, X, oe, ge, , se]) => O && !X && oe.height !== 0 && ge.height !== 0 && !se)
7621
7621
  ),
7622
7622
  ([, , , , O]) => {
7623
7623
  Oe(W, !0), qa(1, () => {
7624
7624
  Oe(F, O);
7625
7625
  }), xn(V(c), () => {
7626
- Oe(t, [0, 0]), Oe(he, !0);
7626
+ Oe(t, [0, 0]), Oe(fe, !0);
7627
7627
  });
7628
7628
  }
7629
7629
  ), ve(
7630
7630
  V(
7631
7631
  ne,
7632
- Ie((O) => O != null && O.scrollTop > 0),
7632
+ Ee((O) => O != null && O.scrollTop > 0),
7633
7633
  _n(0)
7634
7634
  ),
7635
7635
  k
7636
- ), nt(
7636
+ ), tt(
7637
7637
  V(
7638
7638
  m,
7639
7639
  $e(ne),
7640
- Ie(([, O]) => O != null)
7640
+ Ee(([, O]) => O != null)
7641
7641
  ),
7642
7642
  ([, O]) => {
7643
7643
  O && (Oe(N, O.viewport), Oe(M, O.item), Oe(D, O.gap), O.scrollTop > 0 && (Oe(K, !0), xn(V(c, yr(1)), (X) => {
@@ -7647,18 +7647,18 @@ const iw = /* @__PURE__ */ Ze(
7647
7647
  ), ve(
7648
7648
  V(
7649
7649
  N,
7650
- fe(({ height: O }) => O)
7650
+ de(({ height: O }) => O)
7651
7651
  ),
7652
7652
  f
7653
7653
  ), ve(
7654
7654
  V(
7655
7655
  Ct(
7656
- Ee(N, Ho),
7657
- Ee(M, Ho),
7658
- Ee(D, (O, X) => O && O.column === X.column && O.row === X.row),
7659
- Ee(c)
7656
+ Re(N, Ho),
7657
+ Re(M, Ho),
7658
+ Re(D, (O, X) => O && O.column === X.column && O.row === X.row),
7659
+ Re(c)
7660
7660
  ),
7661
- fe(([O, X, oe, ge]) => ({
7661
+ de(([O, X, oe, ge]) => ({
7662
7662
  gap: oe,
7663
7663
  item: X,
7664
7664
  scrollTop: ge,
@@ -7669,19 +7669,19 @@ const iw = /* @__PURE__ */ Ze(
7669
7669
  ), ve(
7670
7670
  V(
7671
7671
  Ct(
7672
- Ee(S),
7672
+ Re(S),
7673
7673
  r,
7674
- Ee(D, sw),
7675
- Ee(M, Ho),
7676
- Ee(N, Ho),
7677
- Ee(_),
7678
- Ee(k),
7679
- Ee(K),
7680
- Ee(he),
7681
- Ee(z)
7674
+ Re(D, sw),
7675
+ Re(M, Ho),
7676
+ Re(N, Ho),
7677
+ Re(_),
7678
+ Re(k),
7679
+ Re(K),
7680
+ Re(fe),
7681
+ Re(z)
7682
7682
  ),
7683
- Ie(([, , , , , , , O]) => !O),
7684
- fe(
7683
+ Ee(([, , , , , , , O]) => !O),
7684
+ de(
7685
7685
  ([
7686
7686
  O,
7687
7687
  [X, oe],
@@ -7694,7 +7694,7 @@ const iw = /* @__PURE__ */ Ze(
7694
7694
  st,
7695
7695
  at
7696
7696
  ]) => {
7697
- const { column: gt, row: rt } = ge, { height: Me, width: We } = se, { width: ut } = re;
7697
+ const { column: gt, row: nt } = ge, { height: Me, width: We } = se, { width: ut } = re;
7698
7698
  if (Ke === 0 && (O === 0 || ut === 0))
7699
7699
  return Ac;
7700
7700
  if (We === 0) {
@@ -7702,10 +7702,10 @@ const iw = /* @__PURE__ */ Ze(
7702
7702
  return ow(jc(Pe, Xe, Ue));
7703
7703
  }
7704
7704
  const vt = $d(ut, We, gt);
7705
- let ft, Qe;
7706
- st ? X === 0 && oe === 0 && Ke > 0 ? (ft = 0, Qe = Ke - 1) : (ft = vt * xs((X + rt) / (Me + rt)), Qe = vt * Nc((oe + rt) / (Me + rt)) - 1, Qe = Pi(O - 1, lo(Qe, vt - 1)), ft = Pi(Qe, lo(0, ft))) : (ft = 0, Qe = -1);
7707
- const ie = jc(ft, Qe, Ue), { bottom: _e, top: Re } = Pc(re, ge, se, ie), qe = Nc(O / vt), ot = qe * Me + (qe - 1) * rt - _e;
7708
- return { bottom: _e, itemHeight: Me, items: ie, itemWidth: We, offsetBottom: ot, offsetTop: Re, top: Re };
7705
+ let ft, Ze;
7706
+ st ? X === 0 && oe === 0 && Ke > 0 ? (ft = 0, Ze = Ke - 1) : (ft = vt * xs((X + nt) / (Me + nt)), Ze = vt * Nc((oe + nt) / (Me + nt)) - 1, Ze = Pi(O - 1, lo(Ze, vt - 1)), ft = Pi(Ze, lo(0, ft))) : (ft = 0, Ze = -1);
7707
+ const ie = jc(ft, Ze, Ue), { bottom: Ne, top: ke } = Pc(re, ge, se, ie), qe = Nc(O / vt), rt = qe * Me + (qe - 1) * nt - Ne;
7708
+ return { bottom: Ne, itemHeight: Me, items: ie, itemWidth: We, offsetBottom: rt, offsetTop: ke, top: ke };
7709
7709
  }
7710
7710
  )
7711
7711
  ),
@@ -7713,15 +7713,15 @@ const iw = /* @__PURE__ */ Ze(
7713
7713
  ), ve(
7714
7714
  V(
7715
7715
  _,
7716
- Ie((O) => O !== null),
7717
- fe((O) => O.length)
7716
+ Ee((O) => O !== null),
7717
+ de((O) => O.length)
7718
7718
  ),
7719
7719
  S
7720
7720
  ), ve(
7721
7721
  V(
7722
7722
  Ct(N, M, A, D),
7723
- Ie(([O, X, { items: oe }]) => oe.length > 0 && X.height !== 0 && O.height !== 0),
7724
- fe(([O, X, { items: oe }, ge]) => {
7723
+ Ee(([O, X, { items: oe }]) => oe.length > 0 && X.height !== 0 && O.height !== 0),
7724
+ de(([O, X, { items: oe }, ge]) => {
7725
7725
  const { bottom: se, top: re } = Pc(O, ge, X, oe);
7726
7726
  return [re, se];
7727
7727
  }),
@@ -7734,35 +7734,35 @@ const iw = /* @__PURE__ */ Ze(
7734
7734
  V(
7735
7735
  c,
7736
7736
  $e(B),
7737
- fe(([O, X]) => X || O !== 0)
7737
+ de(([O, X]) => X || O !== 0)
7738
7738
  ),
7739
7739
  B
7740
7740
  );
7741
7741
  const Z = Zt(
7742
7742
  V(
7743
7743
  Ct(A, S),
7744
- Ie(([{ items: O }]) => O.length > 0),
7744
+ Ee(([{ items: O }]) => O.length > 0),
7745
7745
  $e(B),
7746
- Ie(([[O, X], oe]) => {
7746
+ Ee(([[O, X], oe]) => {
7747
7747
  const ge = O.items[O.items.length - 1].index === X - 1;
7748
7748
  return (oe || O.bottom > 0 && O.itemHeight > 0 && O.offsetBottom === 0 && O.items.length === X) && ge;
7749
7749
  }),
7750
- fe(([[, O]]) => O - 1),
7750
+ de(([[, O]]) => O - 1),
7751
7751
  ht()
7752
7752
  )
7753
7753
  ), we = Zt(
7754
7754
  V(
7755
- Ee(A),
7756
- Ie(({ items: O }) => O.length > 0 && O[0].index === 0),
7755
+ Re(A),
7756
+ Ee(({ items: O }) => O.length > 0 && O[0].index === 0),
7757
7757
  _n(0),
7758
7758
  ht()
7759
7759
  )
7760
7760
  ), xe = Zt(
7761
7761
  V(
7762
- Ee(A),
7762
+ Re(A),
7763
7763
  $e(K),
7764
- Ie(([{ items: O }, X]) => O.length > 0 && !X),
7765
- fe(([{ items: O }]) => ({
7764
+ Ee(([{ items: O }, X]) => O.length > 0 && !X),
7765
+ de(([{ items: O }]) => ({
7766
7766
  endIndex: O[O.length - 1].index,
7767
7767
  startIndex: O[0].index
7768
7768
  })),
@@ -7774,7 +7774,7 @@ const iw = /* @__PURE__ */ Ze(
7774
7774
  V(
7775
7775
  F,
7776
7776
  $e(N, M, S, D),
7777
- fe(([O, X, oe, ge, se]) => {
7777
+ de(([O, X, oe, ge, se]) => {
7778
7778
  const re = Sd(O), { align: Ue, behavior: Ke, offset: st } = re;
7779
7779
  let at = re.index;
7780
7780
  at === "LAST" && (at = ge - 1), at = lo(0, at, Pi(ge - 1, at));
@@ -7787,14 +7787,14 @@ const iw = /* @__PURE__ */ Ze(
7787
7787
  const G = zt(
7788
7788
  V(
7789
7789
  A,
7790
- fe((O) => O.offsetBottom + O.bottom)
7790
+ de((O) => O.offsetBottom + O.bottom)
7791
7791
  ),
7792
7792
  0
7793
7793
  );
7794
7794
  return ve(
7795
7795
  V(
7796
7796
  T,
7797
- fe((O) => ({ height: O.visibleHeight, width: O.visibleWidth }))
7797
+ de((O) => ({ height: O.visibleHeight, width: O.visibleWidth }))
7798
7798
  ),
7799
7799
  N
7800
7800
  ), {
@@ -7855,16 +7855,16 @@ function ha(e, t, n, r) {
7855
7855
  const o = $d(e.width, n.width, t.column), s = xs(r / o), i = s * n.height + lo(0, s - 1) * t.row;
7856
7856
  return i > 0 ? i + t.row : i;
7857
7857
  }
7858
- const aw = /* @__PURE__ */ Ze(() => {
7858
+ const aw = /* @__PURE__ */ Je(() => {
7859
7859
  const e = J((f) => `Item ${f}`), t = J({}), n = J(null), r = J("virtuoso-grid-item"), o = J("virtuoso-grid-list"), s = J(Za), i = J("div"), a = J(Kr), l = (f, h = null) => zt(
7860
7860
  V(
7861
7861
  t,
7862
- fe((p) => p[f]),
7862
+ de((p) => p[f]),
7863
7863
  ht()
7864
7864
  ),
7865
7865
  h
7866
7866
  ), c = J(!1), d = J(!1);
7867
- return ve(Ee(d), c), {
7867
+ return ve(Re(d), c), {
7868
7868
  components: t,
7869
7869
  computeItemKey: s,
7870
7870
  context: n,
@@ -7882,7 +7882,7 @@ const aw = /* @__PURE__ */ Ze(() => {
7882
7882
  scrollerRef: a,
7883
7883
  ScrollSeekPlaceholder: l("ScrollSeekPlaceholder", "div")
7884
7884
  };
7885
- }), lw = /* @__PURE__ */ Ze(
7885
+ }), lw = /* @__PURE__ */ Je(
7886
7886
  ([e, t]) => ({ ...e, ...t }),
7887
7887
  pt(iw, aw)
7888
7888
  ), cw = /* @__PURE__ */ U.memo(function() {
@@ -8273,7 +8273,7 @@ var Cw = [
8273
8273
  "span",
8274
8274
  "svg",
8275
8275
  "ul"
8276
- ], Ae = Cw.reduce((e, t) => {
8276
+ ], Ie = Cw.reduce((e, t) => {
8277
8277
  const n = $r(`Primitive.${t}`), r = g.forwardRef((o, s) => {
8278
8278
  const { asChild: i, ...a } = o, l = i ? n : t;
8279
8279
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u.jsx(l, { ...a, ref: s });
@@ -8380,7 +8380,7 @@ var Ks = "Collapsible", [Aw, uR] = $n(Ks), [Nw, tl] = Aw(Ks), Vd = g.forwardRef(
8380
8380
  open: l,
8381
8381
  onOpenToggle: g.useCallback(() => c((d) => !d), [c]),
8382
8382
  children: /* @__PURE__ */ u.jsx(
8383
- Ae.div,
8383
+ Ie.div,
8384
8384
  {
8385
8385
  "data-state": rl(l),
8386
8386
  "data-disabled": s ? "" : void 0,
@@ -8397,7 +8397,7 @@ var Kd = "CollapsibleTrigger", qd = g.forwardRef(
8397
8397
  (e, t) => {
8398
8398
  const { __scopeCollapsible: n, ...r } = e, o = tl(Kd, n);
8399
8399
  return /* @__PURE__ */ u.jsx(
8400
- Ae.button,
8400
+ Ie.button,
8401
8401
  {
8402
8402
  type: "button",
8403
8403
  "aria-controls": o.contentId,
@@ -8436,7 +8436,7 @@ var jw = g.forwardRef((e, t) => {
8436
8436
  f.current = b.height, p.current = b.width, v.current || (w.style.transitionDuration = x.current.transitionDuration, w.style.animationName = x.current.animationName), l(r);
8437
8437
  }
8438
8438
  }, [i.open, r]), /* @__PURE__ */ u.jsx(
8439
- Ae.div,
8439
+ Ie.div,
8440
8440
  {
8441
8441
  "data-state": rl(i.open),
8442
8442
  "data-disabled": i.disabled ? "" : void 0,
@@ -8697,7 +8697,7 @@ var Ww = "DismissableLayer", pa = "dismissableLayer.update", Vw = "dismissableLa
8697
8697
  const k = () => p({});
8698
8698
  return document.addEventListener(pa, k), () => document.removeEventListener(pa, k);
8699
8699
  }, []), /* @__PURE__ */ u.jsx(
8700
- Ae.div,
8700
+ Ie.div,
8701
8701
  {
8702
8702
  ...l,
8703
8703
  ref: m,
@@ -8724,7 +8724,7 @@ var qw = "DismissableLayerBranch", Gw = g.forwardRef((e, t) => {
8724
8724
  return n.branches.add(s), () => {
8725
8725
  n.branches.delete(s);
8726
8726
  };
8727
- }, [n.branches]), /* @__PURE__ */ u.jsx(Ae.div, { ...e, ref: o });
8727
+ }, [n.branches]), /* @__PURE__ */ u.jsx(Ie.div, { ...e, ref: o });
8728
8728
  });
8729
8729
  Gw.displayName = qw;
8730
8730
  function Yw(e, t = globalThis == null ? void 0 : globalThis.document) {
@@ -8843,7 +8843,7 @@ var Di = "focusScope.autoFocusOnMount", Li = "focusScope.autoFocusOnUnmount", zc
8843
8843
  },
8844
8844
  [n, r, p.paused]
8845
8845
  );
8846
- return /* @__PURE__ */ u.jsx(Ae.div, { tabIndex: -1, ...i, ref: h, onKeyDown: m });
8846
+ return /* @__PURE__ */ u.jsx(Ie.div, { tabIndex: -1, ...i, ref: h, onKeyDown: m });
8847
8847
  });
8848
8848
  Gs.displayName = Jw;
8849
8849
  function Zw(e, { select: t = !1 } = {}) {
@@ -8913,7 +8913,7 @@ var ob = "Portal", Ys = g.forwardRef((e, t) => {
8913
8913
  const { container: n, ...r } = e, [o, s] = g.useState(!1);
8914
8914
  Nt(() => s(!0), []);
8915
8915
  const i = n || o && ((a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : a.body);
8916
- return i ? Tu.createPortal(/* @__PURE__ */ u.jsx(Ae.div, { ...r, ref: t }), i) : null;
8916
+ return i ? Tu.createPortal(/* @__PURE__ */ u.jsx(Ie.div, { ...r, ref: t }), i) : null;
8917
8917
  });
8918
8918
  Ys.displayName = ob;
8919
8919
  var Fi = 0;
@@ -9485,7 +9485,7 @@ var df = "DialogTrigger", ff = g.forwardRef(
9485
9485
  (e, t) => {
9486
9486
  const { __scopeDialog: n, ...r } = e, o = Sn(df, n), s = Ve(t, o.triggerRef);
9487
9487
  return /* @__PURE__ */ u.jsx(
9488
- Ae.button,
9488
+ Ie.button,
9489
9489
  {
9490
9490
  type: "button",
9491
9491
  "aria-haspopup": "dialog",
@@ -9521,7 +9521,7 @@ var Kb = $r("DialogOverlay.RemoveScroll"), qb = g.forwardRef(
9521
9521
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
9522
9522
  // ie. when `Overlay` and `Content` are siblings
9523
9523
  /* @__PURE__ */ u.jsx(Js, { as: Kb, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ u.jsx(
9524
- Ae.div,
9524
+ Ie.div,
9525
9525
  {
9526
9526
  "data-state": cl(o.open),
9527
9527
  ...r,
@@ -9625,14 +9625,14 @@ var Gb = g.forwardRef(
9625
9625
  ), ll = "DialogTitle", yf = g.forwardRef(
9626
9626
  (e, t) => {
9627
9627
  const { __scopeDialog: n, ...r } = e, o = Sn(ll, n);
9628
- return /* @__PURE__ */ u.jsx(Ae.h2, { id: o.titleId, ...r, ref: t });
9628
+ return /* @__PURE__ */ u.jsx(Ie.h2, { id: o.titleId, ...r, ref: t });
9629
9629
  }
9630
9630
  );
9631
9631
  yf.displayName = ll;
9632
9632
  var vf = "DialogDescription", wf = g.forwardRef(
9633
9633
  (e, t) => {
9634
9634
  const { __scopeDialog: n, ...r } = e, o = Sn(vf, n);
9635
- return /* @__PURE__ */ u.jsx(Ae.p, { id: o.descriptionId, ...r, ref: t });
9635
+ return /* @__PURE__ */ u.jsx(Ie.p, { id: o.descriptionId, ...r, ref: t });
9636
9636
  }
9637
9637
  );
9638
9638
  wf.displayName = vf;
@@ -9640,7 +9640,7 @@ var bf = "DialogClose", Sf = g.forwardRef(
9640
9640
  (e, t) => {
9641
9641
  const { __scopeDialog: n, ...r } = e, o = Sn(bf, n);
9642
9642
  return /* @__PURE__ */ u.jsx(
9643
- Ae.button,
9643
+ Ie.button,
9644
9644
  {
9645
9645
  type: "button",
9646
9646
  ...r,
@@ -9800,7 +9800,7 @@ function r0({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
9800
9800
  ] }) : c ? /* @__PURE__ */ u.jsxs("div", { className: "flex flex-col items-center justify-center py-12 text-center", children: [
9801
9801
  /* @__PURE__ */ u.jsx("div", { className: "text-red-500 mb-4", children: "⚠️" }),
9802
9802
  /* @__PURE__ */ u.jsx("p", { className: "text-red-600 mb-4", children: c }),
9803
- /* @__PURE__ */ u.jsx(tt, { onClick: h, variant: "outline", children: "Try Again" })
9803
+ /* @__PURE__ */ u.jsx(et, { onClick: h, variant: "outline", children: "Try Again" })
9804
9804
  ] }) : a ? o.startsWith("image/") ? /* @__PURE__ */ u.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ u.jsx(
9805
9805
  "img",
9806
9806
  {
@@ -9840,7 +9840,7 @@ function r0({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
9840
9840
  ] }),
9841
9841
  /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2", children: [
9842
9842
  /* @__PURE__ */ u.jsxs(
9843
- tt,
9843
+ et,
9844
9844
  {
9845
9845
  variant: "outline",
9846
9846
  size: "sm",
@@ -9853,7 +9853,7 @@ function r0({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
9853
9853
  }
9854
9854
  ),
9855
9855
  /* @__PURE__ */ u.jsxs(
9856
- tt,
9856
+ et,
9857
9857
  {
9858
9858
  variant: "outline",
9859
9859
  size: "sm",
@@ -11584,7 +11584,7 @@ const ru = U.memo(function({
11584
11584
  }) {
11585
11585
  const [C, S] = ye(!1), [k, A] = ye("preview"), [N, M] = ye(!1), { currentThreadId: F } = za(), { respondToInterrupt: q } = Ba(), j = l === "phone" || l === "half-screen", _ = t.role, D = _ === "tool", L = it(() => "type" in t && t.type === "default_message" ? t : null, [t]), ne = !!L, K = !(r && _ !== "user"), {
11586
11586
  uploadingFiles: z,
11587
- handleFileClick: he,
11587
+ handleFileClick: fe,
11588
11588
  fileViewerOpen: W,
11589
11589
  currentFileInfo: ce,
11590
11590
  closeFileViewer: B
@@ -11612,13 +11612,13 @@ const ru = U.memo(function({
11612
11612
  [L, t]
11613
11613
  ), oe = (x == null ? void 0 : x.id) ?? (x == null ? void 0 : x.interrupt_id), ge = Yo(oe), se = x == null ? void 0 : x.value, re = it(() => L ? "" : C0(t.content), [L, t]), Ue = U.useCallback(async () => {
11614
11614
  const ie = D ? re : we;
11615
- async function _e(Re) {
11615
+ async function Ne(ke) {
11616
11616
  if (navigator.clipboard && typeof navigator.clipboard.writeText == "function") {
11617
- await navigator.clipboard.writeText(Re);
11617
+ await navigator.clipboard.writeText(ke);
11618
11618
  return;
11619
11619
  }
11620
11620
  if (navigator.clipboard && typeof navigator.clipboard.write == "function" && typeof ClipboardItem < "u") {
11621
- const qe = new Blob([Re], { type: "text/plain" });
11621
+ const qe = new Blob([ke], { type: "text/plain" });
11622
11622
  await navigator.clipboard.write([
11623
11623
  new ClipboardItem({
11624
11624
  "text/plain": qe
@@ -11629,9 +11629,9 @@ const ru = U.memo(function({
11629
11629
  throw new Error("Clipboard API not supported in this context.");
11630
11630
  }
11631
11631
  try {
11632
- await _e(ie), S(!0), setTimeout(() => S(!1), 2e3), v == null || v(ie);
11633
- } catch (Re) {
11634
- console.error("Failed to copy:", Re);
11632
+ await Ne(ie), S(!0), setTimeout(() => S(!1), 2e3), v == null || v(ie);
11633
+ } catch (ke) {
11634
+ console.error("Failed to copy:", ke);
11635
11635
  }
11636
11636
  }, [D, re, we, v]), Ke = U.useCallback(() => {
11637
11637
  if (!p) return;
@@ -11640,16 +11640,16 @@ const ru = U.memo(function({
11640
11640
  }, [p, t.id, D, re, we]), st = U.useCallback(() => {
11641
11641
  m == null || m(n);
11642
11642
  }, [m, n]), at = U.useCallback(() => {
11643
- const _e = te(j ? "h-3 w-3" : "h-4 w-4", "opacity-60 flex-shrink-0", Z);
11643
+ const Ne = te(j ? "h-3 w-3" : "h-4 w-4", "opacity-60 flex-shrink-0", Z);
11644
11644
  switch (_) {
11645
11645
  case "user":
11646
- return /* @__PURE__ */ u.jsx(Wm, { className: _e });
11646
+ return /* @__PURE__ */ u.jsx(Wm, { className: Ne });
11647
11647
  case "assistant":
11648
- return /* @__PURE__ */ u.jsx(vi, { className: _e });
11648
+ return /* @__PURE__ */ u.jsx(vi, { className: Ne });
11649
11649
  case "tool":
11650
- return /* @__PURE__ */ u.jsx(Um, { className: _e });
11650
+ return /* @__PURE__ */ u.jsx(Um, { className: Ne });
11651
11651
  default:
11652
- return /* @__PURE__ */ u.jsx(vi, { className: _e });
11652
+ return /* @__PURE__ */ u.jsx(vi, { className: Ne });
11653
11653
  }
11654
11654
  }, [j, Z, _]), gt = U.useCallback(() => {
11655
11655
  const ie = "group relative mb-4 flex w-full";
@@ -11663,7 +11663,7 @@ const ru = U.memo(function({
11663
11663
  default:
11664
11664
  return ie;
11665
11665
  }
11666
- }, [_]), rt = U.useCallback(() => {
11666
+ }, [_]), nt = U.useCallback(() => {
11667
11667
  const ie = te(
11668
11668
  "rounded-lg px-4 py-3 relative min-w-0 max-w-full break-words",
11669
11669
  j && "px-3 py-2 text-sm"
@@ -11704,7 +11704,7 @@ const ru = U.memo(function({
11704
11704
  }
11705
11705
  }, [j, ne, _]);
11706
11706
  if (ne && L)
11707
- return /* @__PURE__ */ u.jsx("div", { className: te(gt(), h.container), children: /* @__PURE__ */ u.jsxs("div", { className: te(rt(), h.content), children: [
11707
+ return /* @__PURE__ */ u.jsx("div", { className: te(gt(), h.container), children: /* @__PURE__ */ u.jsxs("div", { className: te(nt(), h.content), children: [
11708
11708
  /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 mb-2 pb-2 border-b border-current/10", children: [
11709
11709
  /* @__PURE__ */ u.jsx(vi, { className: te("h-4 w-4", Z) }),
11710
11710
  a && /* @__PURE__ */ u.jsx("span", { className: "font-medium text-sm", children: "Assistant" })
@@ -11720,41 +11720,41 @@ const ru = U.memo(function({
11720
11720
  const Me = U.useCallback(async (ie) => {
11721
11721
  if (w)
11722
11722
  return;
11723
- const _e = Yo(
11723
+ const Ne = Yo(
11724
11724
  (ie == null ? void 0 : ie.id) ?? (ie == null ? void 0 : ie.interrupt_id)
11725
11725
  );
11726
- if (!_e) {
11726
+ if (!Ne) {
11727
11727
  console.warn("Interrupt part missing id", ie);
11728
11728
  return;
11729
11729
  }
11730
11730
  try {
11731
- b == null || b(), await q(_e, !0);
11732
- } catch (Re) {
11733
- console.error("Failed to approve interrupt:", Re);
11731
+ b == null || b(), await q(Ne, !0);
11732
+ } catch (ke) {
11733
+ console.error("Failed to approve interrupt:", ke);
11734
11734
  } finally {
11735
11735
  T == null || T();
11736
11736
  }
11737
11737
  }, [w, T, b, q]), We = U.useCallback(async (ie) => {
11738
11738
  if (w)
11739
11739
  return;
11740
- const _e = Yo(
11740
+ const Ne = Yo(
11741
11741
  (ie == null ? void 0 : ie.id) ?? (ie == null ? void 0 : ie.interrupt_id)
11742
11742
  );
11743
- if (!_e) {
11743
+ if (!Ne) {
11744
11744
  console.warn("Interrupt part missing id", ie);
11745
11745
  return;
11746
11746
  }
11747
11747
  try {
11748
- b == null || b(), await q(_e, !1);
11749
- } catch (Re) {
11750
- console.error("Failed to reject interrupt:", Re);
11748
+ b == null || b(), await q(Ne, !1);
11749
+ } catch (ke) {
11750
+ console.error("Failed to reject interrupt:", ke);
11751
11751
  } finally {
11752
11752
  T == null || T();
11753
11753
  }
11754
- }, [w, T, b, q]), ut = U.useCallback(({ part: ie, i: _e }) => {
11754
+ }, [w, T, b, q]), ut = U.useCallback(({ part: ie, i: Ne }) => {
11755
11755
  if (ie.type === "text") {
11756
- const Re = ie.text ?? "", qe = Re.trim(), ot = Yd(qe);
11757
- return ot && _ !== "tool" ? /* @__PURE__ */ u.jsx(zf, { data: ot }, _e) : _ === "user" && c && qe.length > d ? /* @__PURE__ */ u.jsx(
11756
+ const ke = ie.text ?? "", qe = ke.trim(), rt = Yd(qe);
11757
+ return rt && _ !== "tool" ? /* @__PURE__ */ u.jsx(zf, { data: rt }, Ne) : _ === "user" && c && qe.length > d ? /* @__PURE__ */ u.jsx(
11758
11758
  I0,
11759
11759
  {
11760
11760
  text: qe,
@@ -11763,45 +11763,45 @@ const ru = U.memo(function({
11763
11763
  previewLength: d,
11764
11764
  isCompact: j
11765
11765
  },
11766
- _e
11767
- ) : /* @__PURE__ */ u.jsx(ga, { content: Re, allowHtml: !1 }, _e);
11766
+ Ne
11767
+ ) : /* @__PURE__ */ u.jsx(ga, { content: ke, allowHtml: !1 }, Ne);
11768
11768
  }
11769
11769
  if (ie.type === "image_url") {
11770
- const Re = ie;
11770
+ const ke = ie;
11771
11771
  return /* @__PURE__ */ u.jsx("div", { className: "my-2", children: /* @__PURE__ */ u.jsx(
11772
11772
  "img",
11773
11773
  {
11774
- src: Re.url,
11775
- alt: Re.alt ?? "",
11774
+ src: ke.url,
11775
+ alt: ke.alt ?? "",
11776
11776
  loading: "lazy",
11777
11777
  className: "border rounded max-h-[420px] w-auto object-contain"
11778
11778
  }
11779
- ) }, _e);
11779
+ ) }, Ne);
11780
11780
  }
11781
11781
  if (ie.type === "file") {
11782
- const Re = ie, qe = Re.name || "file";
11782
+ const ke = ie, qe = ke.name || "file";
11783
11783
  return /* @__PURE__ */ u.jsxs(
11784
11784
  "a",
11785
11785
  {
11786
- href: Re.url,
11787
- onClick: (ot) => he(ot, Re, _e),
11786
+ href: ke.url,
11787
+ onClick: (rt) => fe(rt, ke, Ne),
11788
11788
  className: `inline-flex items-center gap-2 rounded px-2 py-1 text-xs bg-gray-100 border hover:bg-gray-200
11789
11789
  dark:bg-background/10 dark:border-border/30 dark:hover:bg-background/20`,
11790
11790
  children: [
11791
- z[_e] ? /* @__PURE__ */ u.jsx(_a, { className: "h-4 w-4 animate-spin" }) : null,
11791
+ z[Ne] ? /* @__PURE__ */ u.jsx(_a, { className: "h-4 w-4 animate-spin" }) : null,
11792
11792
  /* @__PURE__ */ u.jsxs("span", { className: "truncate max-w-[180px]", children: [
11793
11793
  qe,
11794
- z[_e] ? " (processing)" : ""
11794
+ z[Ne] ? " (processing)" : ""
11795
11795
  ] })
11796
11796
  ]
11797
11797
  },
11798
- _e
11798
+ Ne
11799
11799
  );
11800
11800
  }
11801
11801
  if (ie.type === "interrupt") {
11802
- const Re = ie, qe = Yo(
11803
- (Re == null ? void 0 : Re.id) ?? (Re == null ? void 0 : Re.interrupt_id)
11804
- ), ot = !!(ge && qe && qe === ge), Pe = ot ? se ?? (Re == null ? void 0 : Re.value) : Re == null ? void 0 : Re.value, Xe = qe ? { ...Re, id: qe, interrupt_id: qe } : Re;
11802
+ const ke = ie, qe = Yo(
11803
+ (ke == null ? void 0 : ke.id) ?? (ke == null ? void 0 : ke.interrupt_id)
11804
+ ), rt = !!(ge && qe && qe === ge), Pe = rt ? se ?? (ke == null ? void 0 : ke.value) : ke == null ? void 0 : ke.value, Xe = qe ? { ...ke, id: qe, interrupt_id: qe } : ke;
11805
11805
  return /* @__PURE__ */ u.jsx(
11806
11806
  R0,
11807
11807
  {
@@ -11809,15 +11809,15 @@ const ru = U.memo(function({
11809
11809
  onApprove: Me,
11810
11810
  onReject: We,
11811
11811
  disabled: w,
11812
- isActive: ot,
11812
+ isActive: rt,
11813
11813
  payload: Pe
11814
11814
  },
11815
- _e
11815
+ Ne
11816
11816
  );
11817
11817
  }
11818
11818
  return null;
11819
11819
  }, [
11820
- he,
11820
+ fe,
11821
11821
  z,
11822
11822
  Me,
11823
11823
  We,
@@ -11850,11 +11850,11 @@ const ru = U.memo(function({
11850
11850
  t.id
11851
11851
  );
11852
11852
  if (!D && !L) {
11853
- const _e = t, Re = /* @__PURE__ */ u.jsx("div", { className: "space-y-2", children: _e.content.map((qe, ot) => /* @__PURE__ */ u.jsx(ut, { part: qe, i: ot }, ot)) });
11853
+ const Ne = t, ke = /* @__PURE__ */ u.jsx("div", { className: "space-y-2", children: Ne.content.map((qe, rt) => /* @__PURE__ */ u.jsx(ut, { part: qe, i: rt }, rt)) });
11854
11854
  return r ? /* @__PURE__ */ u.jsxs("div", { "aria-busy": "true", role: "status", children: [
11855
- Re,
11855
+ ke,
11856
11856
  /* @__PURE__ */ u.jsx(k0, { className: Z })
11857
- ] }) : Re;
11857
+ ] }) : ke;
11858
11858
  }
11859
11859
  }, [
11860
11860
  we,
@@ -11866,9 +11866,9 @@ const ru = U.memo(function({
11866
11866
  k,
11867
11867
  vt,
11868
11868
  Z
11869
- ]), Qe = it(() => L ? "Assistant" : T0(t), [L, t]);
11869
+ ]), Ze = it(() => L ? "Assistant" : T0(t), [L, t]);
11870
11870
  return D && !f ? null : /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
11871
- /* @__PURE__ */ u.jsx("div", { className: te(gt(), h.container), children: /* @__PURE__ */ u.jsxs("div", { className: te(rt(), h.content), children: [
11871
+ /* @__PURE__ */ u.jsx("div", { className: te(gt(), h.container), children: /* @__PURE__ */ u.jsxs("div", { className: te(nt(), h.content), children: [
11872
11872
  (i || a || D) && /* @__PURE__ */ u.jsxs(
11873
11873
  "div",
11874
11874
  {
@@ -11881,7 +11881,7 @@ const ru = U.memo(function({
11881
11881
  children: [
11882
11882
  /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2", children: [
11883
11883
  at(),
11884
- a && Qe && /* @__PURE__ */ u.jsx("span", { className: te("font-medium", j ? "text-xs" : "text-sm"), children: Qe }),
11884
+ a && Ze && /* @__PURE__ */ u.jsx("span", { className: te("font-medium", j ? "text-xs" : "text-sm"), children: Ze }),
11885
11885
  D && /* @__PURE__ */ u.jsxs(
11886
11886
  Bd,
11887
11887
  {
@@ -11897,7 +11897,7 @@ const ru = U.memo(function({
11897
11897
  "aria-expanded": k === "expanded",
11898
11898
  onClick: () => A((ie) => ie === "expanded" ? "preview" : "expanded"),
11899
11899
  onKeyDown: (ie) => {
11900
- (ie.key === "Enter" || ie.key === " ") && (ie.preventDefault(), A((_e) => _e === "expanded" ? "preview" : "expanded"));
11900
+ (ie.key === "Enter" || ie.key === " ") && (ie.preventDefault(), A((Ne) => Ne === "expanded" ? "preview" : "expanded"));
11901
11901
  },
11902
11902
  children: [
11903
11903
  /* @__PURE__ */ u.jsx("span", { children: xe.name ?? "Tool Output" }),
@@ -11927,7 +11927,7 @@ const ru = U.memo(function({
11927
11927
  ),
11928
11928
  children: [
11929
11929
  /* @__PURE__ */ u.jsx("div", { className: "relative", children: /* @__PURE__ */ u.jsx(
11930
- tt,
11930
+ et,
11931
11931
  {
11932
11932
  variant: "ghost",
11933
11933
  size: "sm",
@@ -11939,7 +11939,7 @@ const ru = U.memo(function({
11939
11939
  }
11940
11940
  ) }),
11941
11941
  _ === "user" && p && /* @__PURE__ */ u.jsx(
11942
- tt,
11942
+ et,
11943
11943
  {
11944
11944
  variant: "ghost",
11945
11945
  size: "sm",
@@ -11950,7 +11950,7 @@ const ru = U.memo(function({
11950
11950
  }
11951
11951
  ),
11952
11952
  _ === "assistant" && m && /* @__PURE__ */ u.jsx(
11953
- tt,
11953
+ et,
11954
11954
  {
11955
11955
  variant: "ghost",
11956
11956
  size: "sm",
@@ -11988,7 +11988,7 @@ const ru = U.memo(function({
11988
11988
  ),
11989
11989
  children: [
11990
11990
  /* @__PURE__ */ u.jsx(
11991
- tt,
11991
+ et,
11992
11992
  {
11993
11993
  variant: "ghost",
11994
11994
  size: "sm",
@@ -11998,7 +11998,7 @@ const ru = U.memo(function({
11998
11998
  }
11999
11999
  ),
12000
12000
  _ === "user" && p && /* @__PURE__ */ u.jsx(
12001
- tt,
12001
+ et,
12002
12002
  {
12003
12003
  variant: "ghost",
12004
12004
  size: "sm",
@@ -12008,7 +12008,7 @@ const ru = U.memo(function({
12008
12008
  }
12009
12009
  ),
12010
12010
  _ === "assistant" && m && /* @__PURE__ */ u.jsx(
12011
- tt,
12011
+ et,
12012
12012
  {
12013
12013
  variant: "ghost",
12014
12014
  size: "sm",
@@ -12083,7 +12083,7 @@ function R0({
12083
12083
  a && /* @__PURE__ */ u.jsx(ho, { className: "pt-0 pb-3", children: a }),
12084
12084
  /* @__PURE__ */ u.jsx(Ud, { className: "pt-0", children: /* @__PURE__ */ u.jsxs("div", { className: "flex gap-2 ml-auto", children: [
12085
12085
  /* @__PURE__ */ u.jsx(
12086
- tt,
12086
+ et,
12087
12087
  {
12088
12088
  size: "sm",
12089
12089
  variant: "outline",
@@ -12094,7 +12094,7 @@ function R0({
12094
12094
  }
12095
12095
  ),
12096
12096
  /* @__PURE__ */ u.jsx(
12097
- tt,
12097
+ et,
12098
12098
  {
12099
12099
  size: "sm",
12100
12100
  onClick: () => t(e),
@@ -12201,7 +12201,7 @@ function I0({
12201
12201
  ]
12202
12202
  }
12203
12203
  ) }),
12204
- /* @__PURE__ */ u.jsx(Mw, { asChild: !0, children: /* @__PURE__ */ u.jsx(tt, { variant: "ghost", size: "sm", className: "h-6 text-xs !text-[hsl(var(--chat-bubble-user-text))]", children: t ? /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
12204
+ /* @__PURE__ */ u.jsx(Mw, { asChild: !0, children: /* @__PURE__ */ u.jsx(et, { variant: "ghost", size: "sm", className: "h-6 text-xs !text-[hsl(var(--chat-bubble-user-text))]", children: t ? /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
12205
12205
  /* @__PURE__ */ u.jsx(ja, { className: "h-3 w-3 mr-1" }),
12206
12206
  " Show less"
12207
12207
  ] }) : /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
@@ -12296,7 +12296,7 @@ const ou = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, Bf = U.forwa
12296
12296
  }
12297
12297
  ]
12298
12298
  };
12299
- }, [w, j]), D = it(() => _ ? [...e, _] : e, [e, _]), L = it(() => S ? D : D.filter((W) => (W == null ? void 0 : W.role) !== "tool"), [D, S]), ne = ke((W) => {
12299
+ }, [w, j]), D = it(() => _ ? [...e, _] : e, [e, _]), L = it(() => S ? D : D.filter((W) => (W == null ? void 0 : W.role) !== "tool"), [D, S]), ne = Te((W) => {
12300
12300
  q(W), v && v(!W), x && x(W);
12301
12301
  }, [v, x]), K = it(() => {
12302
12302
  if (a)
@@ -12310,7 +12310,7 @@ const ou = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, Bf = U.forwa
12310
12310
  }
12311
12311
  }
12312
12312
  };
12313
- }, [a]), z = it(() => !m || y ? !1 : F ? "auto" : !1, [F, m, y]), he = it(() => {
12313
+ }, [a]), z = it(() => !m || y ? !1 : F ? "auto" : !1, [F, m, y]), fe = it(() => {
12314
12314
  if (typeof p != "string") return null;
12315
12315
  const W = p.trim();
12316
12316
  return W ? {
@@ -12321,10 +12321,10 @@ const ou = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, Bf = U.forwa
12321
12321
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
12322
12322
  } : null;
12323
12323
  }, [p]);
12324
- return L.length === 0 ? he ? /* @__PURE__ */ u.jsx("div", { className: f, style: h, children: /* @__PURE__ */ u.jsx("div", { className: "p-6 overflow-y-auto h-full flex items-start justify-center", children: /* @__PURE__ */ u.jsx("div", { className: "w-full max-w-2xl", children: /* @__PURE__ */ u.jsx(
12324
+ return L.length === 0 ? fe ? /* @__PURE__ */ u.jsx("div", { className: f, style: h, children: /* @__PURE__ */ u.jsx("div", { className: "p-6 overflow-y-auto h-full flex items-start justify-center", children: /* @__PURE__ */ u.jsx("div", { className: "w-full max-w-2xl", children: /* @__PURE__ */ u.jsx(
12325
12325
  ru,
12326
12326
  {
12327
- message: he,
12327
+ message: fe,
12328
12328
  messageIndex: 0,
12329
12329
  isStreamingMessage: !1,
12330
12330
  showActions: !1,
@@ -12844,7 +12844,7 @@ const K0 = (e) => ({
12844
12844
  z === "y";
12845
12845
  }
12846
12846
  return !0;
12847
- }).map((K) => [K.placement, K.overflows.filter((z) => z > 0).reduce((z, he) => z + he, 0)]).sort((K, z) => K[1] - z[1])[0]) == null ? void 0 : j[0];
12847
+ }).map((K) => [K.placement, K.overflows.filter((z) => z > 0).reduce((z, fe) => z + fe, 0)]).sort((K, z) => K[1] - z[1])[0]) == null ? void 0 : j[0];
12848
12848
  ne && (L = ne);
12849
12849
  break;
12850
12850
  }
@@ -13685,7 +13685,7 @@ function MS(e) {
13685
13685
  middleware: h
13686
13686
  };
13687
13687
  F.current && (K.platform = F.current), jS(S.current, k.current, K).then((z) => {
13688
- const he = {
13688
+ const fe = {
13689
13689
  ...z,
13690
13690
  // The floating element's position may be recomputed while it's closed
13691
13691
  // but still mounted (such as when transitioning out). To ensure
@@ -13693,8 +13693,8 @@ function MS(e) {
13693
13693
  // setting it to `true` when `open === false` (must be specified).
13694
13694
  isPositioned: q.current !== !1
13695
13695
  };
13696
- _.current && !ks(A.current, he) && (A.current = he, Ms.flushSync(() => {
13697
- f(he);
13696
+ _.current && !ks(A.current, fe) && (A.current = fe, Ms.flushSync(() => {
13697
+ f(fe);
13698
13698
  }));
13699
13699
  });
13700
13700
  }, [h, t, n, F, q]);
@@ -13730,17 +13730,17 @@ function MS(e) {
13730
13730
  };
13731
13731
  if (!L.floating)
13732
13732
  return K;
13733
- const z = mu(L.floating, d.x), he = mu(L.floating, d.y);
13733
+ const z = mu(L.floating, d.x), fe = mu(L.floating, d.y);
13734
13734
  return a ? {
13735
13735
  ...K,
13736
- transform: "translate(" + z + "px, " + he + "px)",
13736
+ transform: "translate(" + z + "px, " + fe + "px)",
13737
13737
  ...Zf(L.floating) >= 1.5 && {
13738
13738
  willChange: "transform"
13739
13739
  }
13740
13740
  } : {
13741
13741
  position: n,
13742
13742
  left: z,
13743
- top: he
13743
+ top: fe
13744
13744
  };
13745
13745
  }, [n, a, L.floating, d.x, d.y]);
13746
13746
  return g.useMemo(() => ({
@@ -13797,7 +13797,7 @@ const DS = (e) => {
13797
13797
  var WS = "Arrow", Qf = g.forwardRef((e, t) => {
13798
13798
  const { children: n, width: r = 10, height: o = 5, ...s } = e;
13799
13799
  return /* @__PURE__ */ u.jsx(
13800
- Ae.svg,
13800
+ Ie.svg,
13801
13801
  {
13802
13802
  ...s,
13803
13803
  ref: t,
@@ -13844,7 +13844,7 @@ var oh = "PopperAnchor", sh = g.forwardRef(
13844
13844
  return g.useEffect(() => {
13845
13845
  const c = l.current;
13846
13846
  l.current = (r == null ? void 0 : r.current) || i.current, c !== l.current && s.onAnchorChange(l.current);
13847
- }), r ? null : /* @__PURE__ */ u.jsx(Ae.div, { ...o, ref: a });
13847
+ }), r ? null : /* @__PURE__ */ u.jsx(Ie.div, { ...o, ref: a });
13848
13848
  }
13849
13849
  );
13850
13850
  sh.displayName = oh;
@@ -13893,15 +13893,15 @@ var wl = "PopperContent", [qS, GS] = th(wl), ih = g.forwardRef(
13893
13893
  BS({
13894
13894
  ...j,
13895
13895
  apply: ({ elements: re, rects: Ue, availableWidth: Ke, availableHeight: st }) => {
13896
- const { width: at, height: gt } = Ue.reference, rt = re.floating.style;
13897
- rt.setProperty("--radix-popper-available-width", `${Ke}px`), rt.setProperty("--radix-popper-available-height", `${st}px`), rt.setProperty("--radix-popper-anchor-width", `${at}px`), rt.setProperty("--radix-popper-anchor-height", `${gt}px`);
13896
+ const { width: at, height: gt } = Ue.reference, nt = re.floating.style;
13897
+ nt.setProperty("--radix-popper-available-width", `${Ke}px`), nt.setProperty("--radix-popper-available-height", `${st}px`), nt.setProperty("--radix-popper-anchor-width", `${at}px`), nt.setProperty("--radix-popper-anchor-height", `${gt}px`);
13898
13898
  }
13899
13899
  }),
13900
13900
  T && US({ element: T, padding: a }),
13901
13901
  JS({ arrowWidth: k, arrowHeight: A }),
13902
13902
  h && HS({ strategy: "referenceHidden", ...j })
13903
13903
  ]
13904
- }), [z, he] = ch(L), W = Ot(m);
13904
+ }), [z, fe] = ch(L), W = Ot(m);
13905
13905
  Nt(() => {
13906
13906
  ne && (W == null || W());
13907
13907
  }, [ne, W]);
@@ -13942,10 +13942,10 @@ var wl = "PopperContent", [qS, GS] = th(wl), ih = g.forwardRef(
13942
13942
  arrowY: B,
13943
13943
  shouldHideArrow: Z,
13944
13944
  children: /* @__PURE__ */ u.jsx(
13945
- Ae.div,
13945
+ Ie.div,
13946
13946
  {
13947
13947
  "data-side": z,
13948
- "data-align": he,
13948
+ "data-align": fe,
13949
13949
  ...y,
13950
13950
  ref: b,
13951
13951
  style: {
@@ -14082,7 +14082,7 @@ var rC = g.forwardRef((e, t) => {
14082
14082
  []
14083
14083
  ),
14084
14084
  children: /* @__PURE__ */ u.jsx(
14085
- Ae.div,
14085
+ Ie.div,
14086
14086
  {
14087
14087
  tabIndex: x || S === 0 ? -1 : 0,
14088
14088
  "data-orientation": r,
@@ -14131,7 +14131,7 @@ var rC = g.forwardRef((e, t) => {
14131
14131
  focusable: r,
14132
14132
  active: o,
14133
14133
  children: /* @__PURE__ */ u.jsx(
14134
- Ae.span,
14134
+ Ie.span,
14135
14135
  {
14136
14136
  tabIndex: f ? 0 : -1,
14137
14137
  "data-orientation": d.orientation,
@@ -14311,10 +14311,10 @@ var ln = "MenuContent", [wC, Cl] = Er(ln), Rh = g.forwardRef(
14311
14311
  ...y
14312
14312
  } = e, v = Ir(ln, n), x = Do(ln, n), w = li(n), b = Sh(n), T = pC(n), [C, S] = g.useState(null), k = g.useRef(null), A = Ve(t, k, v.onContentChange), N = g.useRef(0), M = g.useRef(""), F = g.useRef(0), q = g.useRef(null), j = g.useRef("right"), _ = g.useRef(0), D = m ? Js : g.Fragment, L = m ? { as: CC, allowPinchZoom: !0 } : void 0, ne = (z) => {
14313
14313
  var G, O;
14314
- const he = M.current + z, W = T().filter((X) => !X.disabled), ce = document.activeElement, B = (G = W.find((X) => X.ref.current === ce)) == null ? void 0 : G.textValue, Z = W.map((X) => X.textValue), we = MC(Z, he, B), xe = (O = W.find((X) => X.textValue === we)) == null ? void 0 : O.ref.current;
14314
+ const fe = M.current + z, W = T().filter((X) => !X.disabled), ce = document.activeElement, B = (G = W.find((X) => X.ref.current === ce)) == null ? void 0 : G.textValue, Z = W.map((X) => X.textValue), we = MC(Z, fe, B), xe = (O = W.find((X) => X.textValue === we)) == null ? void 0 : O.ref.current;
14315
14315
  (function X(oe) {
14316
14316
  M.current = oe, window.clearTimeout(N.current), oe !== "" && (N.current = window.setTimeout(() => X(""), 1e3));
14317
- })(he), xe && setTimeout(() => xe.focus());
14317
+ })(fe), xe && setTimeout(() => xe.focus());
14318
14318
  };
14319
14319
  g.useEffect(() => () => window.clearTimeout(N.current), []), sl();
14320
14320
  const K = g.useCallback((z) => {
@@ -14334,8 +14334,8 @@ var ln = "MenuContent", [wC, Cl] = Er(ln), Rh = g.forwardRef(
14334
14334
  ),
14335
14335
  onItemLeave: g.useCallback(
14336
14336
  (z) => {
14337
- var he;
14338
- K(z) || ((he = k.current) == null || he.focus(), S(null));
14337
+ var fe;
14338
+ K(z) || ((fe = k.current) == null || fe.focus(), S(null));
14339
14339
  },
14340
14340
  [K]
14341
14341
  ),
@@ -14355,8 +14355,8 @@ var ln = "MenuContent", [wC, Cl] = Er(ln), Rh = g.forwardRef(
14355
14355
  asChild: !0,
14356
14356
  trapped: o,
14357
14357
  onMountAutoFocus: me(s, (z) => {
14358
- var he;
14359
- z.preventDefault(), (he = k.current) == null || he.focus({ preventScroll: !0 });
14358
+ var fe;
14359
+ z.preventDefault(), (fe = k.current) == null || fe.focus({ preventScroll: !0 });
14360
14360
  }),
14361
14361
  onUnmountAutoFocus: i,
14362
14362
  children: /* @__PURE__ */ u.jsx(
@@ -14410,8 +14410,8 @@ var ln = "MenuContent", [wC, Cl] = Er(ln), Rh = g.forwardRef(
14410
14410
  onPointerMove: me(
14411
14411
  e.onPointerMove,
14412
14412
  To((z) => {
14413
- const he = z.target, W = _.current !== z.clientX;
14414
- if (z.currentTarget.contains(he) && W) {
14413
+ const fe = z.target, W = _.current !== z.clientX;
14414
+ if (z.currentTarget.contains(fe) && W) {
14415
14415
  const ce = z.clientX > _.current ? "right" : "left";
14416
14416
  j.current = ce, _.current = z.clientX;
14417
14417
  }
@@ -14433,14 +14433,14 @@ Rh.displayName = ln;
14433
14433
  var TC = "MenuGroup", kl = g.forwardRef(
14434
14434
  (e, t) => {
14435
14435
  const { __scopeMenu: n, ...r } = e;
14436
- return /* @__PURE__ */ u.jsx(Ae.div, { role: "group", ...r, ref: t });
14436
+ return /* @__PURE__ */ u.jsx(Ie.div, { role: "group", ...r, ref: t });
14437
14437
  }
14438
14438
  );
14439
14439
  kl.displayName = TC;
14440
14440
  var kC = "MenuLabel", Eh = g.forwardRef(
14441
14441
  (e, t) => {
14442
14442
  const { __scopeMenu: n, ...r } = e;
14443
- return /* @__PURE__ */ u.jsx(Ae.div, { ...r, ref: t });
14443
+ return /* @__PURE__ */ u.jsx(Ie.div, { ...r, ref: t });
14444
14444
  }
14445
14445
  );
14446
14446
  Eh.displayName = kC;
@@ -14490,7 +14490,7 @@ var Ih = g.forwardRef(
14490
14490
  disabled: r,
14491
14491
  textValue: o ?? h,
14492
14492
  children: /* @__PURE__ */ u.jsx(cC, { asChild: !0, ...a, focusable: !r, children: /* @__PURE__ */ u.jsx(
14493
- Ae.div,
14493
+ Ie.div,
14494
14494
  {
14495
14495
  role: "menuitem",
14496
14496
  "data-highlighted": d ? "" : void 0,
@@ -14582,7 +14582,7 @@ var Rl = "MenuItemIndicator", [Oh, AC] = Er(
14582
14582
  {
14583
14583
  present: r || Es(s.checked) || s.checked === !0,
14584
14584
  children: /* @__PURE__ */ u.jsx(
14585
- Ae.span,
14585
+ Ie.span,
14586
14586
  {
14587
14587
  ...o,
14588
14588
  ref: t,
@@ -14598,7 +14598,7 @@ var NC = "MenuSeparator", Dh = g.forwardRef(
14598
14598
  (e, t) => {
14599
14599
  const { __scopeMenu: n, ...r } = e;
14600
14600
  return /* @__PURE__ */ u.jsx(
14601
- Ae.div,
14601
+ Ie.div,
14602
14602
  {
14603
14603
  role: "separator",
14604
14604
  "aria-orientation": "horizontal",
@@ -14804,7 +14804,7 @@ var Vh = "DropdownMenuTrigger", Kh = g.forwardRef(
14804
14804
  (e, t) => {
14805
14805
  const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = Uh(Vh, n), i = Ht(n);
14806
14806
  return /* @__PURE__ */ u.jsx($C, { asChild: !0, ...i, children: /* @__PURE__ */ u.jsx(
14807
- Ae.button,
14807
+ Ie.button,
14808
14808
  {
14809
14809
  type: "button",
14810
14810
  id: s.triggerId,
@@ -15086,42 +15086,42 @@ function Ki({
15086
15086
  checkpoints: M,
15087
15087
  interrupt: F,
15088
15088
  metadata: q
15089
- } = Ba(), { isStreaming: j, error: _, submit: D, stop: L } = Hy(), ne = x ?? v ?? null, K = (N == null ? void 0 : N.id) ?? null, z = (N == null ? void 0 : N.namespace) ?? null, he = (q == null ? void 0 : q.assemblingMessageId) ?? null, W = F, [ce, B] = ye(!1);
15089
+ } = Ba(), { isStreaming: j, error: _, submit: D, stop: L } = Hy(), ne = x ?? v ?? null, K = (N == null ? void 0 : N.id) ?? null, z = (N == null ? void 0 : N.namespace) ?? null, fe = (q == null ? void 0 : q.assemblingMessageId) ?? null, W = F, [ce, B] = ye(!1);
15090
15090
  dt(() => {
15091
15091
  W || B(!1);
15092
15092
  }, [W]);
15093
- const Z = ke(() => {
15093
+ const Z = Te(() => {
15094
15094
  B(!0);
15095
- }, []), we = ke(() => {
15095
+ }, []), we = Te(() => {
15096
15096
  B(!1);
15097
- }, []), xe = !!W || ce, [G, O] = ye(null), [X, oe] = ye(""), [ge, se] = ye(null), [re, Ue] = ye([]), [Ke, st] = ye(0), [at, gt] = ye(0), [rt, Me] = ye(!1), [We, ut] = ye(null), [vt, ft] = ye(null), [Qe, ie] = ye(!1), [_e, Re] = ye(null), [qe, ot] = ye(!1), Pe = Le(!1), [Xe, Et] = ye(() => xu.value), Tt = Le(Xe), qt = Le(null), It = ke(($) => {
15097
+ }, []), xe = !!W || ce, [G, O] = ye(null), [X, oe] = ye(""), [ge, se] = ye(null), [re, Ue] = ye([]), [Ke, st] = ye(0), [at, gt] = ye(0), [nt, Me] = ye(!1), [We, ut] = ye(null), [vt, ft] = ye(null), [Ze, ie] = ye(!1), [Ne, ke] = ye(null), [qe, rt] = ye(!1), Pe = Le(!1), [Xe, Et] = ye(() => xu.value), Tt = Le(Xe), qt = Le(null), It = Te(($) => {
15098
15098
  xu.value = $, Et($);
15099
- }, []), [qn, Gt] = ye(!1), dn = ke(
15100
- ($, de) => {
15099
+ }, []), [qn, Gt] = ye(!1), dn = Te(
15100
+ ($, ue) => {
15101
15101
  if (!$ || typeof $ != "object") return null;
15102
- const ue = $[de];
15103
- return typeof ue == "number" ? ue : null;
15102
+ const he = $[ue];
15103
+ return typeof he == "number" ? he : null;
15104
15104
  },
15105
15105
  []
15106
- ), tn = ke(
15107
- ($, de) => {
15106
+ ), tn = Te(
15107
+ ($, ue) => {
15108
15108
  if (!$ || typeof $ != "object") return null;
15109
- const ue = $[de];
15110
- return typeof ue == "string" && ue.trim() ? ue : null;
15109
+ const he = $[ue];
15110
+ return typeof he == "string" && he.trim() ? he : null;
15111
15111
  },
15112
15112
  []
15113
15113
  ), Mt = it(() => {
15114
15114
  const $ = Array.isArray(M) ? [...M] : [];
15115
- return $.some((ue) => dn(ue.metadata, "step") !== null) && $.sort((ue, Te) => {
15116
- const Je = dn(ue.metadata, "step"), Dt = dn(Te.metadata, "step");
15117
- if (Je !== null || Dt !== null)
15118
- return (Dt ?? Number.NEGATIVE_INFINITY) - (Je ?? Number.NEGATIVE_INFINITY);
15119
- const nn = Date.parse(ue.createdAt ?? ""), kt = Date.parse(Te.createdAt ?? "");
15115
+ return $.some((he) => dn(he.metadata, "step") !== null) && $.sort((he, _e) => {
15116
+ const ot = dn(he.metadata, "step"), Dt = dn(_e.metadata, "step");
15117
+ if (ot !== null || Dt !== null)
15118
+ return (Dt ?? Number.NEGATIVE_INFINITY) - (ot ?? Number.NEGATIVE_INFINITY);
15119
+ const nn = Date.parse(he.createdAt ?? ""), kt = Date.parse(_e.createdAt ?? "");
15120
15120
  return Number.isNaN(nn) || Number.isNaN(kt) ? 0 : kt - nn;
15121
15121
  }), $;
15122
- }, [M, dn]), Cn = Le(null), fn = Le(null), xt = ke(() => {
15122
+ }, [M, dn]), Cn = Le(null), fn = Le(null), xt = Te(() => {
15123
15123
  Cn.current && (Cn.current.value = ""), fn.current && (fn.current.value = ""), st(($) => $ + 1), gt(($) => $ + 1);
15124
- }, []), hn = ke(
15124
+ }, []), hn = Te(
15125
15125
  ($) => {
15126
15126
  It($);
15127
15127
  },
@@ -15133,12 +15133,12 @@ function Ki({
15133
15133
  const [ar, Yt] = ye("desktop");
15134
15134
  dt(() => {
15135
15135
  const $ = () => {
15136
- const de = window.innerWidth;
15137
- Yt(de < 640 ? "phone" : de < 1024 ? "tablet" : "desktop");
15136
+ const ue = window.innerWidth;
15137
+ Yt(ue < 640 ? "phone" : ue < 1024 ? "tablet" : "desktop");
15138
15138
  };
15139
15139
  return $(), window.addEventListener("resize", $), () => window.removeEventListener("resize", $);
15140
15140
  }, []), dt(() => {
15141
- ot(!1), Pe.current = !1;
15141
+ rt(!1), Pe.current = !1;
15142
15142
  }, [ne]), dt(() => {
15143
15143
  Tt.current = Xe;
15144
15144
  }, [Xe]), dt(() => {
@@ -15148,7 +15148,7 @@ function Ki({
15148
15148
  }
15149
15149
  qt.current === null && (qt.current = Tt.current), It(X ?? "");
15150
15150
  }, [X, G, It]);
15151
- const lr = ke(async () => {
15151
+ const lr = Te(async () => {
15152
15152
  if (!(!b || T || !qe))
15153
15153
  try {
15154
15154
  await S();
@@ -15159,44 +15159,41 @@ function Ki({
15159
15159
  dt(() => {
15160
15160
  (async () => {
15161
15161
  if (!y.baseUrl) {
15162
- Re(null);
15162
+ ke(null);
15163
15163
  return;
15164
15164
  }
15165
15165
  try {
15166
- const ue = (await y.getAgent("default")).uiDefaultMessage || "", Te = "# Hi — I'm Navi (SmartOrg AINAV)";
15167
- let Je = ue;
15168
- ue.trim().startsWith(Te) || (Je = `${Te}
15169
-
15170
- ${ue}`), Re(Je || null);
15171
- } catch (de) {
15172
- console.warn("Failed to fetch default message:", de), Re(null);
15166
+ const he = (await y.getAgent("default")).uiDefaultMessage || "";
15167
+ ke(he || null);
15168
+ } catch (ue) {
15169
+ console.warn("Failed to fetch default message:", ue), ke(null);
15173
15170
  }
15174
15171
  })();
15175
15172
  }, [y.baseUrl]), dt(() => {
15176
- _ && !Qe && (m == null || m(_));
15177
- }, [_, Qe, m]);
15173
+ _ && !Ze && (m == null || m(_));
15174
+ }, [_, Ze, m]);
15178
15175
  const kn = ($) => {
15179
15176
  if ($.length > us)
15180
15177
  return `Message too long (${$.length}/${us} characters)`;
15181
15178
  try {
15182
15179
  return j0($), null;
15183
- } catch (de) {
15184
- return (de == null ? void 0 : de.message) || "Invalid message";
15180
+ } catch (ue) {
15181
+ return (ue == null ? void 0 : ue.message) || "Invalid message";
15185
15182
  }
15186
15183
  }, pn = async ($) => {
15187
- const de = $.trim();
15188
- if (!(!de && re.length === 0)) {
15189
- if (de) {
15190
- const ue = kn(de);
15191
- if (ue) {
15192
- se(ue);
15184
+ const ue = $.trim();
15185
+ if (!(!ue && re.length === 0)) {
15186
+ if (ue) {
15187
+ const he = kn(ue);
15188
+ if (he) {
15189
+ se(he);
15193
15190
  return;
15194
15191
  }
15195
15192
  }
15196
15193
  try {
15197
15194
  await D(
15198
15195
  {
15199
- text: de || "",
15196
+ text: ue || "",
15200
15197
  attachments: re,
15201
15198
  payload: G ? { edit: !0, originalMessageId: G } : void 0
15202
15199
  },
@@ -15204,36 +15201,33 @@ ${ue}`), Re(Je || null);
15204
15201
  checkpointId: K ?? void 0,
15205
15202
  checkpointNs: z ?? void 0
15206
15203
  }
15207
- ), h == null || h(de), It(""), se(null), Ue([]), xt(), O(null), oe("");
15208
- } catch (ue) {
15209
- const Te = (ue == null ? void 0 : ue.message) || "Failed to send message";
15210
- se(Te), m == null || m(Te);
15204
+ ), h == null || h(ue), It(""), se(null), Ue([]), xt(), O(null), oe("");
15205
+ } catch (he) {
15206
+ const _e = (he == null ? void 0 : he.message) || "Failed to send message";
15207
+ se(_e), m == null || m(_e);
15211
15208
  }
15212
15209
  }
15213
15210
  }, Hn = U.useCallback(
15214
- ($, de) => {
15215
- c && (qt.current = Xe, O($), oe(de), It(de), se(null));
15211
+ ($, ue) => {
15212
+ c && (qt.current = Xe, O($), oe(ue), It(ue), se(null));
15216
15213
  },
15217
15214
  [Xe, c, It]
15218
15215
  ), cr = U.useCallback(() => {
15219
15216
  O(null), oe(""), se(null), It(qt.current ?? Xe), qt.current = null;
15220
- }, [Xe, It]), Ar = ke(($, de) => {
15221
- Hn($, de);
15222
- }, [Hn]), Nr = ke(($) => {
15223
- const de = (ue) => {
15224
- const Te = ue.content || [], Je = Te.filter((Dt) => Dt.type === "text").map((Dt) => Dt.text).join("");
15225
- if (Je) return Je;
15226
- try {
15227
- return JSON.stringify(Te, null, 2);
15228
- } catch {
15229
- return String(Te);
15230
- }
15231
- };
15217
+ }, [Xe, It]), Ar = Te(($, ue) => {
15218
+ Hn($, ue);
15219
+ }, [Hn]), Nr = Te(($) => {
15232
15220
  for (let ue = $ - 1; ue >= 0; ue--)
15233
15221
  if (w[ue].role === "user") {
15234
- const Te = de(w[ue]);
15235
- Te && D(
15236
- { text: Te },
15222
+ const he = w[ue].content || [], ot = he.filter((Dt) => Dt.type === "text").map((Dt) => Dt.text).join("") || (() => {
15223
+ try {
15224
+ return JSON.stringify(he, null, 2);
15225
+ } catch {
15226
+ return String(he);
15227
+ }
15228
+ })();
15229
+ ot && D(
15230
+ { text: ot },
15237
15231
  {
15238
15232
  checkpointId: K ?? void 0,
15239
15233
  checkpointNs: z ?? void 0
@@ -15242,38 +15236,38 @@ ${ue}`), Re(Je || null);
15242
15236
  break;
15243
15237
  }
15244
15238
  }, [w, D, K, z]), Gn = ($) => {
15245
- const de = Array.from($.target.files || []);
15246
- Ue((ue) => [...ue, ...de]), $.target.value = "";
15239
+ const ue = Array.from($.target.files || []);
15240
+ Ue((he) => [...he, ...ue]), $.target.value = "";
15247
15241
  }, R = ($) => {
15248
- Ue((de) => {
15249
- const ue = de.filter((Te, Je) => $ !== Je);
15250
- return ue.length === 0 && xt(), ue;
15242
+ Ue((ue) => {
15243
+ const he = ue.filter((_e, ot) => $ !== ot);
15244
+ return he.length === 0 && xt(), he;
15251
15245
  });
15252
15246
  }, H = async ($) => {
15253
- const de = ($.target.files || [])[0];
15254
- if (de) {
15247
+ const ue = ($.target.files || [])[0];
15248
+ if (ue) {
15255
15249
  ut(null), ft(null), Me(!0);
15256
15250
  try {
15257
15251
  await D(
15258
- { attachments: [de] },
15252
+ { attachments: [ue] },
15259
15253
  {
15260
15254
  checkpointId: K ?? void 0,
15261
15255
  checkpointNs: z ?? void 0
15262
15256
  }
15263
15257
  );
15264
- const ue = `Uploaded ${de.name} - processing through chat stream`;
15265
- ft(ue);
15266
- } catch (ue) {
15267
- const Te = ue instanceof Error ? ue.message : "Failed to upload Excel file";
15268
- console.error("Excel upload failed", ue), ut(Te), m == null || m(Te);
15258
+ const he = `Uploaded ${ue.name} - processing through chat stream`;
15259
+ ft(he);
15260
+ } catch (he) {
15261
+ const _e = he instanceof Error ? he.message : "Failed to upload Excel file";
15262
+ console.error("Excel upload failed", he), ut(_e), m == null || m(_e);
15269
15263
  } finally {
15270
15264
  Me(!1), $.target.value = "", xt();
15271
15265
  }
15272
15266
  }
15273
15267
  }, le = ($) => {
15274
15268
  if (!$) return "Unknown";
15275
- const de = Date.parse($);
15276
- return Number.isNaN(de) ? $ : new Date(de).toLocaleString();
15269
+ const ue = Date.parse($);
15270
+ return Number.isNaN(ue) ? $ : new Date(ue).toLocaleString();
15277
15271
  }, Ce = async ($) => {
15278
15272
  if (v) {
15279
15273
  Gt(!0);
@@ -15282,18 +15276,18 @@ ${ue}`), Re(Je || null);
15282
15276
  await A();
15283
15277
  return;
15284
15278
  }
15285
- const de = Mt.find((Te) => Te.checkpointId === $), ue = (de == null ? void 0 : de.checkpointNs) ?? null;
15286
- await k($, ue);
15279
+ const ue = Mt.find((_e) => _e.checkpointId === $), he = (ue == null ? void 0 : ue.checkpointNs) ?? null;
15280
+ await k($, he);
15287
15281
  } finally {
15288
15282
  Gt(!1);
15289
15283
  }
15290
15284
  }
15291
15285
  }, Ge = `flex flex-1 w-full flex-col min-h-0 min-w-0 max-h-full overflow-hidden bg-transparent ${e} ${f.container || ""}`, ze = `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 ${f.messagesArea || ""}`, Fe = `flex-shrink-0 w-full border-t p-4 bg-transparent ${f.inputArea || ""}`;
15292
15286
  return /* @__PURE__ */ u.jsxs("div", { className: Ge, children: [
15293
- !!_ && !Qe && /* @__PURE__ */ u.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: [
15287
+ !!_ && !Ze && /* @__PURE__ */ u.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: [
15294
15288
  /* @__PURE__ */ u.jsx("span", { children: _ }),
15295
15289
  /* @__PURE__ */ u.jsx(
15296
- tt,
15290
+ et,
15297
15291
  {
15298
15292
  variant: "ghost",
15299
15293
  size: "sm",
@@ -15312,18 +15306,18 @@ ${ue}`), Re(Je || null);
15312
15306
  className: "border border-border rounded px-2 py-1 text-xs bg-card text-foreground focus:outline-none focus:ring-1 focus:ring-ring dark:bg-secondary",
15313
15307
  value: K ?? "",
15314
15308
  onChange: ($) => {
15315
- const de = $.target.value || null;
15316
- Ce(de);
15309
+ const ue = $.target.value || null;
15310
+ Ce(ue);
15317
15311
  },
15318
15312
  children: [
15319
15313
  /* @__PURE__ */ u.jsx("option", { value: "", children: "Latest" }),
15320
15314
  Mt.map(($) => {
15321
- const de = dn($.metadata, "step"), ue = tn($.metadata, "source"), Te = [];
15322
- de !== null && Te.push(`Step ${de}`), ue && Te.push(ue);
15323
- const Je = Te.length ? ` — ${Te.join(" • ")}` : "";
15315
+ const ue = dn($.metadata, "step"), he = tn($.metadata, "source"), _e = [];
15316
+ ue !== null && _e.push(`Step ${ue}`), he && _e.push(he);
15317
+ const ot = _e.length ? ` — ${_e.join(" • ")}` : "";
15324
15318
  return /* @__PURE__ */ u.jsxs("option", { value: $.checkpointId, children: [
15325
15319
  le($.createdAt),
15326
- Je
15320
+ ot
15327
15321
  ] }, $.checkpointId);
15328
15322
  })
15329
15323
  ]
@@ -15343,7 +15337,7 @@ ${ue}`), Re(Je || null);
15343
15337
  style: { height: "100%" },
15344
15338
  messages: w,
15345
15339
  isStreaming: j,
15346
- streamingAssistantId: he,
15340
+ streamingAssistantId: fe,
15347
15341
  streamingDebounceMs: typeof s == "number" ? s : o,
15348
15342
  followNewMessages: i,
15349
15343
  layoutSize: ar,
@@ -15357,12 +15351,12 @@ ${ue}`), Re(Je || null);
15357
15351
  Pe.current = !0;
15358
15352
  return;
15359
15353
  }
15360
- $ && ot(!0);
15354
+ $ && rt(!0);
15361
15355
  },
15362
15356
  onEdit: Ar,
15363
15357
  onRegenerate: Nr,
15364
15358
  onCancelEdit: cr,
15365
- emptyMessage: _e ?? void 0,
15359
+ emptyMessage: Ne ?? void 0,
15366
15360
  isNavigatingCheckpoint: qn,
15367
15361
  activeInterrupt: W,
15368
15362
  disableInterruptActions: ce,
@@ -15385,7 +15379,7 @@ ${ue}`), Re(Je || null);
15385
15379
  /* @__PURE__ */ u.jsx("span", { className: "text-sm font-medium text-blue-800", children: "Editing message" })
15386
15380
  ] }),
15387
15381
  /* @__PURE__ */ u.jsx(
15388
- tt,
15382
+ et,
15389
15383
  {
15390
15384
  variant: "ghost",
15391
15385
  size: "sm",
@@ -15408,21 +15402,21 @@ ${ue}`), Re(Je || null);
15408
15402
  },
15409
15403
  Ke
15410
15404
  ),
15411
- re.length > 0 && /* @__PURE__ */ u.jsx("div", { className: "flex flex-wrap gap-2", children: re.map(($, de) => /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 bg-gray-100 dark:bg-gray-800 rounded-lg px-3 py-2 text-sm text-gray-900 dark:text-gray-100", children: [
15405
+ re.length > 0 && /* @__PURE__ */ u.jsx("div", { className: "flex flex-wrap gap-2", children: re.map(($, ue) => /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 bg-gray-100 dark:bg-gray-800 rounded-lg px-3 py-2 text-sm text-gray-900 dark:text-gray-100", children: [
15412
15406
  /* @__PURE__ */ u.jsx(qi, { size: 14 }),
15413
15407
  /* @__PURE__ */ u.jsx("span", { className: "truncate max-w-[150px]", children: $.name }),
15414
15408
  /* @__PURE__ */ u.jsx(
15415
- tt,
15409
+ et,
15416
15410
  {
15417
15411
  variant: "ghost",
15418
15412
  size: "sm",
15419
- onClick: () => R(de),
15413
+ onClick: () => R(ue),
15420
15414
  className: "h-4 w-4 p-0 text-gray-500 dark:text-gray-400 hover:text-red-500 dark:hover:text-red-400",
15421
15415
  "aria-label": `Remove ${$.name}`,
15422
15416
  children: /* @__PURE__ */ u.jsx(Or, { size: 12 })
15423
15417
  }
15424
15418
  )
15425
- ] }, de)) })
15419
+ ] }, ue)) })
15426
15420
  ] }),
15427
15421
  l && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
15428
15422
  /* @__PURE__ */ u.jsx(
@@ -15436,19 +15430,19 @@ ${ue}`), Re(Je || null);
15436
15430
  },
15437
15431
  at
15438
15432
  ),
15439
- rt && /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
15433
+ nt && /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
15440
15434
  /* @__PURE__ */ u.jsx(Yi, { className: "h-4 w-4 animate-spin" }),
15441
15435
  " Uploading Excel file..."
15442
15436
  ] }),
15443
- vt && !rt && /* @__PURE__ */ u.jsx("div", { className: "text-sm rounded border border-emerald-200 bg-emerald-50 px-3 py-2 text-emerald-700", children: vt }),
15444
- We && !rt && /* @__PURE__ */ u.jsx("div", { className: "text-sm rounded border border-red-200 bg-red-50 px-3 py-2 text-red-600", children: We })
15437
+ vt && !nt && /* @__PURE__ */ u.jsx("div", { className: "text-sm rounded border border-emerald-200 bg-emerald-50 px-3 py-2 text-emerald-700", children: vt }),
15438
+ We && !nt && /* @__PURE__ */ u.jsx("div", { className: "text-sm rounded border border-red-200 bg-red-50 px-3 py-2 text-red-600", children: We })
15445
15439
  ] })
15446
15440
  ] }),
15447
15441
  ge && /* @__PURE__ */ u.jsx("div", { className: "mb-3 text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2", children: ge }),
15448
15442
  /* @__PURE__ */ u.jsxs("div", { className: "flex items-end gap-2", children: [
15449
15443
  (a || l) && /* @__PURE__ */ u.jsxs(vT, { children: [
15450
15444
  /* @__PURE__ */ u.jsx(wT, { asChild: !0, children: /* @__PURE__ */ u.jsx(
15451
- tt,
15445
+ et,
15452
15446
  {
15453
15447
  type: "button",
15454
15448
  size: "icon",
@@ -15472,9 +15466,9 @@ ${ue}`), Re(Je || null);
15472
15466
  {
15473
15467
  onClick: () => {
15474
15468
  var $;
15475
- rt || ($ = fn.current) == null || $.click();
15469
+ nt || ($ = fn.current) == null || $.click();
15476
15470
  },
15477
- className: `cursor-pointer ${rt ? "opacity-60 pointer-events-none" : ""}`,
15471
+ className: `cursor-pointer ${nt ? "opacity-60 pointer-events-none" : ""}`,
15478
15472
  children: [
15479
15473
  /* @__PURE__ */ u.jsx(Gm, { className: "h-4 w-4 mr-2" }),
15480
15474
  " Upload Excel file"
@@ -15558,7 +15552,7 @@ var Il = "ScrollArea", [pp, mR] = $n(Il), [IT, un] = pp(Il), mp = g.forwardRef(
15558
15552
  onCornerWidthChange: w,
15559
15553
  onCornerHeightChange: T,
15560
15554
  children: /* @__PURE__ */ u.jsx(
15561
- Ae.div,
15555
+ Ie.div,
15562
15556
  {
15563
15557
  dir: M,
15564
15558
  ...i,
@@ -15591,7 +15585,7 @@ var gp = "ScrollAreaViewport", xp = g.forwardRef(
15591
15585
  }
15592
15586
  ),
15593
15587
  /* @__PURE__ */ u.jsx(
15594
- Ae.div,
15588
+ Ie.div,
15595
15589
  {
15596
15590
  "data-radix-scroll-area-viewport": "",
15597
15591
  ...s,
@@ -15880,7 +15874,7 @@ var AT = g.forwardRef((e, t) => {
15880
15874
  onThumbPositionChange: S,
15881
15875
  onThumbPointerDown: Ot(a),
15882
15876
  children: /* @__PURE__ */ u.jsx(
15883
- Ae.div,
15877
+ Ie.div,
15884
15878
  {
15885
15879
  ...h,
15886
15880
  ref: v,
@@ -15922,7 +15916,7 @@ var AT = g.forwardRef((e, t) => {
15922
15916
  return a(), f.addEventListener("scroll", h), () => f.removeEventListener("scroll", h);
15923
15917
  }
15924
15918
  }, [s.viewport, d, a]), /* @__PURE__ */ u.jsx(
15925
- Ae.div,
15919
+ Ie.div,
15926
15920
  {
15927
15921
  "data-state": i.hasThumb ? "visible" : "hidden",
15928
15922
  ...o,
@@ -15960,7 +15954,7 @@ var MT = g.forwardRef((e, t) => {
15960
15954
  const d = ((f = o.scrollbarY) == null ? void 0 : f.offsetWidth) || 0;
15961
15955
  o.onCornerWidthChange(d), i(d);
15962
15956
  }), c ? /* @__PURE__ */ u.jsx(
15963
- Ae.div,
15957
+ Ie.div,
15964
15958
  {
15965
15959
  ...r,
15966
15960
  ref: t,
@@ -16144,7 +16138,7 @@ function vu({
16144
16138
  }
16145
16139
  }, z = () => {
16146
16140
  N(null), F("");
16147
- }, he = (B, Z) => {
16141
+ }, fe = (B, Z) => {
16148
16142
  B.key === "Enter" ? K(Z) : B.key === "Escape" && z();
16149
16143
  }, W = (B) => {
16150
16144
  if (!B) return "";
@@ -16157,7 +16151,7 @@ function vu({
16157
16151
  }, ce = (B) => B.title || `Thread ${B.threadId.slice(0, 8)}`;
16158
16152
  return /* @__PURE__ */ u.jsxs("div", { className: `flex flex-col h-full ${e} ${s.container || ""}`, children: [
16159
16153
  t && /* @__PURE__ */ u.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__ */ u.jsx(
16160
- tt,
16154
+ et,
16161
16155
  {
16162
16156
  onClick: D,
16163
16157
  disabled: q || p,
@@ -16188,9 +16182,9 @@ function vu({
16188
16182
  children: [
16189
16183
  /* @__PURE__ */ u.jsxs("div", { className: "flex items-center justify-between", children: [
16190
16184
  /* @__PURE__ */ u.jsx("div", { className: "flex-1 min-w-0", children: A === B.threadId ? /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2", onClick: (Z) => Z.stopPropagation(), children: [
16191
- /* @__PURE__ */ u.jsx(Is, { value: M, onChange: (Z) => F(Z.target.value), onKeyDown: (Z) => he(Z, B.threadId), className: "h-6 text-sm", autoFocus: !0 }),
16192
- /* @__PURE__ */ u.jsx(tt, { variant: "ghost", size: "sm", onClick: () => K(B.threadId), className: "h-6 w-6 p-0", children: /* @__PURE__ */ u.jsx(Pa, { size: 12 }) }),
16193
- /* @__PURE__ */ u.jsx(tt, { variant: "ghost", size: "sm", onClick: z, className: "h-6 w-6 p-0", children: /* @__PURE__ */ u.jsx(Or, { size: 12 }) })
16185
+ /* @__PURE__ */ u.jsx(Is, { value: M, onChange: (Z) => F(Z.target.value), onKeyDown: (Z) => fe(Z, B.threadId), className: "h-6 text-sm", autoFocus: !0 }),
16186
+ /* @__PURE__ */ u.jsx(et, { variant: "ghost", size: "sm", onClick: () => K(B.threadId), className: "h-6 w-6 p-0", children: /* @__PURE__ */ u.jsx(Pa, { size: 12 }) }),
16187
+ /* @__PURE__ */ u.jsx(et, { variant: "ghost", size: "sm", onClick: z, className: "h-6 w-6 p-0", children: /* @__PURE__ */ u.jsx(Or, { size: 12 }) })
16194
16188
  ] }) : /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
16195
16189
  /* @__PURE__ */ u.jsx("div", { className: "font-medium text-sm truncate text-gray-900 dark:text-slate-100", children: ce(B) }),
16196
16190
  /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 text-xs text-gray-500 dark:text-slate-400 mt-1", children: [
@@ -16199,9 +16193,9 @@ function vu({
16199
16193
  ] })
16200
16194
  ] }) }),
16201
16195
  /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity ml-2", children: [
16202
- r && A !== B.threadId && /* @__PURE__ */ u.jsx(tt, { variant: "ghost", size: "sm", onClick: (Z) => ne(B, Z), className: "h-6 w-6 p-0", title: "Edit title", children: /* @__PURE__ */ u.jsx(Cu, { size: 12 }) }),
16196
+ r && A !== B.threadId && /* @__PURE__ */ u.jsx(et, { variant: "ghost", size: "sm", onClick: (Z) => ne(B, Z), className: "h-6 w-6 p-0", title: "Edit title", children: /* @__PURE__ */ u.jsx(Cu, { size: 12 }) }),
16203
16197
  n && /* @__PURE__ */ u.jsx(
16204
- tt,
16198
+ et,
16205
16199
  {
16206
16200
  variant: "ghost",
16207
16201
  size: "sm",
@@ -16325,7 +16319,7 @@ function xR(e) {
16325
16319
  }), WT(e);
16326
16320
  }
16327
16321
  var VT = "Label", Pp = g.forwardRef((e, t) => /* @__PURE__ */ u.jsx(
16328
- Ae.label,
16322
+ Ie.label,
16329
16323
  {
16330
16324
  ...e,
16331
16325
  ref: t,
@@ -16373,7 +16367,7 @@ var hi = "Switch", [qT, yR] = $n(hi), [GT, YT] = qT(hi), Dp = g.forwardRef(
16373
16367
  });
16374
16368
  return /* @__PURE__ */ u.jsxs(GT, { scope: n, checked: x, disabled: a, children: [
16375
16369
  /* @__PURE__ */ u.jsx(
16376
- Ae.button,
16370
+ Ie.button,
16377
16371
  {
16378
16372
  type: "button",
16379
16373
  role: "switch",
@@ -16412,7 +16406,7 @@ var Lp = "SwitchThumb", Fp = g.forwardRef(
16412
16406
  (e, t) => {
16413
16407
  const { __scopeSwitch: n, ...r } = e, o = YT(Lp, n);
16414
16408
  return /* @__PURE__ */ u.jsx(
16415
- Ae.span,
16409
+ Ie.span,
16416
16410
  {
16417
16411
  "data-state": zp(o.checked),
16418
16412
  "data-disabled": o.disabled ? "" : void 0,
@@ -16503,7 +16497,7 @@ var Hp = Object.freeze({
16503
16497
  wordWrap: "normal"
16504
16498
  }), ZT = "VisuallyHidden", QT = g.forwardRef(
16505
16499
  (e, t) => /* @__PURE__ */ u.jsx(
16506
- Ae.span,
16500
+ Ie.span,
16507
16501
  {
16508
16502
  ...e,
16509
16503
  ref: t,
@@ -16614,7 +16608,7 @@ var Wp = "SelectTrigger", Vp = g.forwardRef(
16614
16608
  });
16615
16609
  };
16616
16610
  return /* @__PURE__ */ u.jsx(dh, { asChild: !0, ...s, children: /* @__PURE__ */ u.jsx(
16617
- Ae.button,
16611
+ Ie.button,
16618
16612
  {
16619
16613
  type: "button",
16620
16614
  role: "combobox",
@@ -16652,7 +16646,7 @@ var Kp = "SelectValue", qp = g.forwardRef(
16652
16646
  return Nt(() => {
16653
16647
  c(d);
16654
16648
  }, [c, d]), /* @__PURE__ */ u.jsx(
16655
- Ae.span,
16649
+ Ie.span,
16656
16650
  {
16657
16651
  ...a,
16658
16652
  ref: f,
@@ -16666,7 +16660,7 @@ qp.displayName = Kp;
16666
16660
  var ik = "SelectIcon", Gp = g.forwardRef(
16667
16661
  (e, t) => {
16668
16662
  const { __scopeSelect: n, children: r, ...o } = e;
16669
- return /* @__PURE__ */ u.jsx(Ae.span, { "aria-hidden": !0, ...o, ref: t, children: r || "▼" });
16663
+ return /* @__PURE__ */ u.jsx(Ie.span, { "aria-hidden": !0, ...o, ref: t, children: r || "▼" });
16670
16664
  }
16671
16665
  );
16672
16666
  Gp.displayName = ik;
@@ -16753,7 +16747,7 @@ var gn = 10, [Jp, ir] = Yr(Cr), lk = "SelectContentImpl", ck = $r("SelectContent
16753
16747
  window.removeEventListener("blur", G), window.removeEventListener("resize", G);
16754
16748
  };
16755
16749
  }, [K]);
16756
- const [he, W] = mm((G) => {
16750
+ const [fe, W] = mm((G) => {
16757
16751
  const O = q().filter((ge) => !ge.disabled), X = O.find((ge) => ge.ref.current === document.activeElement), oe = gm(O, G, X);
16758
16752
  oe && setTimeout(() => oe.ref.current.focus());
16759
16753
  }), ce = g.useCallback(
@@ -16795,7 +16789,7 @@ var gn = 10, [Jp, ir] = Yr(Cr), lk = "SelectContentImpl", ck = $r("SelectContent
16795
16789
  selectedItemText: M,
16796
16790
  position: r,
16797
16791
  isPositioned: j,
16798
- searchRef: he,
16792
+ searchRef: fe,
16799
16793
  children: /* @__PURE__ */ u.jsx(Js, { as: ck, allowPinchZoom: !0, children: /* @__PURE__ */ u.jsx(
16800
16794
  Gs,
16801
16795
  {
@@ -16881,7 +16875,7 @@ var uk = "SelectItemAlignedPosition", Qp = g.forwardRef((e, t) => {
16881
16875
  ]);
16882
16876
  a.style.minWidth = Ue + "px", a.style.right = at + "px";
16883
16877
  }
16884
- const F = h(), q = window.innerHeight - gn * 2, j = y.scrollHeight, _ = window.getComputedStyle(c), D = parseInt(_.borderTopWidth, 10), L = parseInt(_.paddingTop, 10), ne = parseInt(_.borderBottomWidth, 10), K = parseInt(_.paddingBottom, 10), z = D + L + j + K + ne, he = Math.min(v.offsetHeight * 5, z), W = window.getComputedStyle(y), ce = parseInt(W.paddingTop, 10), B = parseInt(W.paddingBottom, 10), Z = k.top + k.height / 2 - gn, we = q - Z, xe = v.offsetHeight / 2, G = v.offsetTop + xe, O = D + L + G, X = z - O;
16878
+ const F = h(), q = window.innerHeight - gn * 2, j = y.scrollHeight, _ = window.getComputedStyle(c), D = parseInt(_.borderTopWidth, 10), L = parseInt(_.paddingTop, 10), ne = parseInt(_.borderBottomWidth, 10), K = parseInt(_.paddingBottom, 10), z = D + L + j + K + ne, fe = Math.min(v.offsetHeight * 5, z), W = window.getComputedStyle(y), ce = parseInt(W.paddingTop, 10), B = parseInt(W.paddingBottom, 10), Z = k.top + k.height / 2 - gn, we = q - Z, xe = v.offsetHeight / 2, G = v.offsetTop + xe, O = D + L + G, X = z - O;
16885
16879
  if (O <= Z) {
16886
16880
  const ge = F.length > 0 && v === F[F.length - 1].ref.current;
16887
16881
  a.style.bottom = "0px";
@@ -16901,7 +16895,7 @@ var uk = "SelectItemAlignedPosition", Qp = g.forwardRef((e, t) => {
16901
16895
  ) + X;
16902
16896
  a.style.height = re + "px", y.scrollTop = O - Z + y.offsetTop;
16903
16897
  }
16904
- a.style.margin = `${gn}px 0`, a.style.minHeight = he + "px", a.style.maxHeight = q + "px", r == null || r(), requestAnimationFrame(() => p.current = !0);
16898
+ a.style.margin = `${gn}px 0`, a.style.minHeight = fe + "px", a.style.maxHeight = q + "px", r == null || r(), requestAnimationFrame(() => p.current = !0);
16905
16899
  }
16906
16900
  }, [
16907
16901
  h,
@@ -16944,7 +16938,7 @@ var uk = "SelectItemAlignedPosition", Qp = g.forwardRef((e, t) => {
16944
16938
  zIndex: T
16945
16939
  },
16946
16940
  children: /* @__PURE__ */ u.jsx(
16947
- Ae.div,
16941
+ Ie.div,
16948
16942
  {
16949
16943
  ...o,
16950
16944
  ref: f,
@@ -17007,7 +17001,7 @@ var [fk, jl] = Yr(Cr, {}), ka = "SelectViewport", em = g.forwardRef(
17007
17001
  }
17008
17002
  ),
17009
17003
  /* @__PURE__ */ u.jsx(pi.Slot, { scope: n, children: /* @__PURE__ */ u.jsx(
17010
- Ae.div,
17004
+ Ie.div,
17011
17005
  {
17012
17006
  "data-radix-select-viewport": "",
17013
17007
  role: "presentation",
@@ -17049,14 +17043,14 @@ em.displayName = ka;
17049
17043
  var tm = "SelectGroup", [hk, pk] = Yr(tm), mk = g.forwardRef(
17050
17044
  (e, t) => {
17051
17045
  const { __scopeSelect: n, ...r } = e, o = Mn();
17052
- return /* @__PURE__ */ u.jsx(hk, { scope: n, id: o, children: /* @__PURE__ */ u.jsx(Ae.div, { role: "group", "aria-labelledby": o, ...r, ref: t }) });
17046
+ return /* @__PURE__ */ u.jsx(hk, { scope: n, id: o, children: /* @__PURE__ */ u.jsx(Ie.div, { role: "group", "aria-labelledby": o, ...r, ref: t }) });
17053
17047
  }
17054
17048
  );
17055
17049
  mk.displayName = tm;
17056
17050
  var nm = "SelectLabel", rm = g.forwardRef(
17057
17051
  (e, t) => {
17058
17052
  const { __scopeSelect: n, ...r } = e, o = pk(nm, n);
17059
- return /* @__PURE__ */ u.jsx(Ae.div, { id: o.id, ...r, ref: t });
17053
+ return /* @__PURE__ */ u.jsx(Ie.div, { id: o.id, ...r, ref: t });
17060
17054
  }
17061
17055
  );
17062
17056
  rm.displayName = nm;
@@ -17100,7 +17094,7 @@ var _s = "SelectItem", [gk, om] = Yr(_s), sm = g.forwardRef(
17100
17094
  disabled: o,
17101
17095
  textValue: d,
17102
17096
  children: /* @__PURE__ */ u.jsx(
17103
- Ae.div,
17097
+ Ie.div,
17104
17098
  {
17105
17099
  role: "option",
17106
17100
  "aria-labelledby": y,
@@ -17159,7 +17153,7 @@ var so = "SelectItemText", im = g.forwardRef(
17159
17153
  [l.disabled, l.value, p]
17160
17154
  ), { onNativeOptionAdd: y, onNativeOptionRemove: v } = c;
17161
17155
  return Nt(() => (y(m), () => v(m)), [y, v, m]), /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
17162
- /* @__PURE__ */ u.jsx(Ae.span, { id: l.textId, ...s, ref: h }),
17156
+ /* @__PURE__ */ u.jsx(Ie.span, { id: l.textId, ...s, ref: h }),
17163
17157
  l.isSelected && i.valueNode && !i.valueNodeHasChildren ? Ms.createPortal(s.children, i.valueNode) : null
17164
17158
  ] });
17165
17159
  }
@@ -17168,7 +17162,7 @@ im.displayName = so;
17168
17162
  var am = "SelectItemIndicator", lm = g.forwardRef(
17169
17163
  (e, t) => {
17170
17164
  const { __scopeSelect: n, ...r } = e;
17171
- return om(am, n).isSelected ? /* @__PURE__ */ u.jsx(Ae.span, { "aria-hidden": !0, ...r, ref: t }) : null;
17165
+ return om(am, n).isSelected ? /* @__PURE__ */ u.jsx(Ie.span, { "aria-hidden": !0, ...r, ref: t }) : null;
17172
17166
  }
17173
17167
  );
17174
17168
  lm.displayName = am;
@@ -17229,7 +17223,7 @@ var dm = g.forwardRef((e, t) => {
17229
17223
  const c = a().find((f) => f.ref.current === document.activeElement);
17230
17224
  (d = c == null ? void 0 : c.ref.current) == null || d.scrollIntoView({ block: "nearest" });
17231
17225
  }, [a]), /* @__PURE__ */ u.jsx(
17232
- Ae.div,
17226
+ Ie.div,
17233
17227
  {
17234
17228
  "aria-hidden": !0,
17235
17229
  ...o,
@@ -17250,7 +17244,7 @@ var dm = g.forwardRef((e, t) => {
17250
17244
  }), xk = "SelectSeparator", fm = g.forwardRef(
17251
17245
  (e, t) => {
17252
17246
  const { __scopeSelect: n, ...r } = e;
17253
- return /* @__PURE__ */ u.jsx(Ae.div, { "aria-hidden": !0, ...r, ref: t });
17247
+ return /* @__PURE__ */ u.jsx(Ie.div, { "aria-hidden": !0, ...r, ref: t });
17254
17248
  }
17255
17249
  );
17256
17250
  fm.displayName = xk;
@@ -17276,7 +17270,7 @@ var vk = "SelectBubbleInput", hm = g.forwardRef(
17276
17270
  d.call(a, t), a.dispatchEvent(f);
17277
17271
  }
17278
17272
  }, [i, t]), /* @__PURE__ */ u.jsx(
17279
- Ae.select,
17273
+ Ie.select,
17280
17274
  {
17281
17275
  ...n,
17282
17276
  style: { ...Hp, ...n.style },
@@ -17424,7 +17418,7 @@ Ak.displayName = Cm.displayName;
17424
17418
  var Nk = "Separator", Su = "horizontal", _k = ["horizontal", "vertical"], Rm = g.forwardRef((e, t) => {
17425
17419
  const { decorative: n, orientation: r = Su, ...o } = e, s = jk(r) ? r : Su, a = n ? { role: "none" } : { "aria-orientation": s === "vertical" ? s : void 0, role: "separator" };
17426
17420
  return /* @__PURE__ */ u.jsx(
17427
- Ae.div,
17421
+ Ie.div,
17428
17422
  {
17429
17423
  "data-orientation": s,
17430
17424
  ...a,
@@ -17588,7 +17582,7 @@ function wR({ settings: e, onSettingsChange: t, className: n = "" }) {
17588
17582
  }
17589
17583
  };
17590
17584
  return /* @__PURE__ */ u.jsxs(Pk, { open: r, onOpenChange: o, children: [
17591
- /* @__PURE__ */ u.jsx(Ok, { asChild: !0, children: /* @__PURE__ */ u.jsxs(tt, { variant: "outline", size: "sm", className: n, children: [
17585
+ /* @__PURE__ */ u.jsx(Ok, { asChild: !0, children: /* @__PURE__ */ u.jsxs(et, { variant: "outline", size: "sm", className: n, children: [
17592
17586
  /* @__PURE__ */ u.jsx(Qm, { className: "h-4 w-4 mr-2" }),
17593
17587
  "Settings",
17594
17588
  c && /* @__PURE__ */ u.jsx(Bd, { variant: "destructive", className: "ml-2 h-4 w-4 p-0" })
@@ -17620,7 +17614,7 @@ function wR({ settings: e, onSettingsChange: t, className: n = "" }) {
17620
17614
  placeholder: "http://localhost:8000/api"
17621
17615
  }
17622
17616
  ),
17623
- /* @__PURE__ */ u.jsx(tt, { variant: "outline", onClick: y, children: "Test" })
17617
+ /* @__PURE__ */ u.jsx(et, { variant: "outline", onClick: y, children: "Test" })
17624
17618
  ] })
17625
17619
  ] }),
17626
17620
  /* @__PURE__ */ u.jsxs("div", { className: "flex items-center justify-between", children: [
@@ -17654,7 +17648,7 @@ function wR({ settings: e, onSettingsChange: t, className: n = "" }) {
17654
17648
  }
17655
17649
  ),
17656
17650
  /* @__PURE__ */ u.jsx(
17657
- tt,
17651
+ et,
17658
17652
  {
17659
17653
  variant: "outline",
17660
17654
  size: "icon",
@@ -17822,13 +17816,13 @@ function wR({ settings: e, onSettingsChange: t, className: n = "" }) {
17822
17816
  ] })
17823
17817
  ] }),
17824
17818
  /* @__PURE__ */ u.jsxs("div", { className: "flex items-center justify-between pt-6 border-t", children: [
17825
- /* @__PURE__ */ u.jsxs(tt, { variant: "outline", onClick: p, children: [
17819
+ /* @__PURE__ */ u.jsxs(et, { variant: "outline", onClick: p, children: [
17826
17820
  /* @__PURE__ */ u.jsx(Gi, { className: "h-4 w-4 mr-2" }),
17827
17821
  "Reset"
17828
17822
  ] }),
17829
17823
  /* @__PURE__ */ u.jsxs("div", { className: "flex gap-2", children: [
17830
- /* @__PURE__ */ u.jsx(tt, { variant: "outline", onClick: m, children: "Cancel" }),
17831
- /* @__PURE__ */ u.jsxs(tt, { onClick: h, disabled: !c, children: [
17824
+ /* @__PURE__ */ u.jsx(et, { variant: "outline", onClick: m, children: "Cancel" }),
17825
+ /* @__PURE__ */ u.jsxs(et, { onClick: h, disabled: !c, children: [
17832
17826
  /* @__PURE__ */ u.jsx(sg, { className: "h-4 w-4 mr-2" }),
17833
17827
  "Save Changes"
17834
17828
  ] })