teodor-new-chat-ui 4.3.146 → 4.3.147

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 lg = Object.defineProperty;
2
2
  var cg = (e, t, n) => t in e ? lg(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var sc = (e, t, n) => cg(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import * as v from "react";
5
- import V, { createContext as zo, useContext as ei, useReducer as ug, useRef as Ee, useCallback as de, useEffect as St, useMemo as ct, useState as we, startTransition as es, useLayoutEffect as dg, createElement as ms, useImperativeHandle as fg } from "react";
5
+ import V, { createContext as Bo, useContext as ei, useReducer as ug, useRef as Ee, useCallback as de, useEffect as St, useMemo as ct, useState as we, startTransition as go, useLayoutEffect as dg, createElement as ms, useImperativeHandle as fg } from "react";
6
6
  import { Square as hg, Send as pg, ChevronRight as Ju, Check as Qa, Circle as mg, X as Yr, ExternalLink as gg, Download as xg, Image as yg, FileText as ic, Loader as el, Bot as zi, Wrench as vg, User as wg, Paperclip as xa, ChevronUp as tl, ChevronDown as ti, ChevronLeft as bg, Copy as ac, Edit as lc, RotateCcw as ya, Info as Sg, Loader2 as gs, Edit3 as Zu, Plus as Cg, FileSpreadsheet as Tg, MessageSquarePlus as kg, MessageSquare as Rg, Calendar as Eg, Trash2 as Ig, Settings as Ng, Server as Ag, EyeOff as _g, Eye as jg, Layout as Pg, MessageCircle as Og, Save as Mg } from "lucide-react";
7
7
  import { Slot as Dg, createSlot as to } from "@radix-ui/react-slot";
8
8
  import { cva as ni } from "class-variance-authority";
@@ -10,7 +10,7 @@ import { clsx as Lg } from "clsx";
10
10
  import { twMerge as Fg } from "tailwind-merge";
11
11
  import * as ri from "react-dom";
12
12
  import Qu from "react-dom";
13
- var va = { exports: {} }, go = {};
13
+ var va = { exports: {} }, xo = {};
14
14
  /**
15
15
  * @license React
16
16
  * react-jsx-runtime.production.min.js
@@ -22,7 +22,7 @@ var va = { exports: {} }, go = {};
22
22
  */
23
23
  var cc;
24
24
  function $g() {
25
- if (cc) return go;
25
+ if (cc) return xo;
26
26
  cc = 1;
27
27
  var e = V, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
28
28
  function i(a, l, c) {
@@ -32,9 +32,9 @@ function $g() {
32
32
  if (a && a.defaultProps) for (d in l = a.defaultProps, l) f[d] === void 0 && (f[d] = l[d]);
33
33
  return { $$typeof: t, type: a, key: h, ref: p, props: f, _owner: o.current };
34
34
  }
35
- return go.Fragment = n, go.jsx = i, go.jsxs = i, go;
35
+ return xo.Fragment = n, xo.jsx = i, xo.jsxs = i, xo;
36
36
  }
37
- var xo = {};
37
+ var yo = {};
38
38
  /**
39
39
  * @license React
40
40
  * react-jsx-runtime.development.js
@@ -631,8 +631,8 @@ React keys must be passed directly to JSX without using spread:
631
631
  return un(E, Y, ae, !1);
632
632
  }
633
633
  var br = Wr, Sr = Ur;
634
- xo.Fragment = r, xo.jsx = br, xo.jsxs = Sr;
635
- }()), xo;
634
+ yo.Fragment = r, yo.jsx = br, yo.jsxs = Sr;
635
+ }()), yo;
636
636
  }
637
637
  process.env.NODE_ENV === "production" ? va.exports = $g() : va.exports = zg();
638
638
  var u = va.exports;
@@ -645,7 +645,7 @@ const { toString: Bg } = Object.prototype, { getPrototypeOf: nl } = Object, { it
645
645
  const n = Bg.call(t);
646
646
  return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
647
647
  })(/* @__PURE__ */ Object.create(null)), Bn = (e) => (e = e.toLowerCase(), (t) => si(t) === e), ii = (e) => (t) => typeof t === e, { isArray: io } = Array, no = ii("undefined");
648
- function Bo(e) {
648
+ function Ho(e) {
649
649
  return e !== null && !no(e) && e.constructor !== null && !no(e.constructor) && mn(e.constructor.isBuffer) && e.constructor.isBuffer(e);
650
650
  }
651
651
  const nd = Bn("ArrayBuffer");
@@ -653,25 +653,25 @@ function Hg(e) {
653
653
  let t;
654
654
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && nd(e.buffer), t;
655
655
  }
656
- const Ug = ii("string"), mn = ii("function"), rd = ii("number"), Ho = (e) => e !== null && typeof e == "object", Wg = (e) => e === !0 || e === !1, xs = (e) => {
656
+ const Ug = ii("string"), mn = ii("function"), rd = ii("number"), Uo = (e) => e !== null && typeof e == "object", Wg = (e) => e === !0 || e === !1, xs = (e) => {
657
657
  if (si(e) !== "object")
658
658
  return !1;
659
659
  const t = nl(e);
660
660
  return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(td in e) && !(oi in e);
661
661
  }, Vg = (e) => {
662
- if (!Ho(e) || Bo(e))
662
+ if (!Uo(e) || Ho(e))
663
663
  return !1;
664
664
  try {
665
665
  return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
666
666
  } catch {
667
667
  return !1;
668
668
  }
669
- }, Kg = Bn("Date"), qg = Bn("File"), Gg = Bn("Blob"), Yg = Bn("FileList"), Xg = (e) => Ho(e) && mn(e.pipe), Jg = (e) => {
669
+ }, Kg = Bn("Date"), qg = Bn("File"), Gg = Bn("Blob"), Yg = Bn("FileList"), Xg = (e) => Uo(e) && mn(e.pipe), Jg = (e) => {
670
670
  let t;
671
671
  return e && (typeof FormData == "function" && e instanceof FormData || mn(e.append) && ((t = si(e)) === "formdata" || // detect form-data instance
672
672
  t === "object" && mn(e.toString) && e.toString() === "[object FormData]"));
673
673
  }, Zg = Bn("URLSearchParams"), [Qg, ex, tx, nx] = ["ReadableStream", "Request", "Response", "Headers"].map(Bn), rx = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
674
- function Uo(e, t, { allOwnKeys: n = !1 } = {}) {
674
+ function Wo(e, t, { allOwnKeys: n = !1 } = {}) {
675
675
  if (e === null || typeof e > "u")
676
676
  return;
677
677
  let r, o;
@@ -679,7 +679,7 @@ function Uo(e, t, { allOwnKeys: n = !1 } = {}) {
679
679
  for (r = 0, o = e.length; r < o; r++)
680
680
  t.call(null, e[r], r, e);
681
681
  else {
682
- if (Bo(e))
682
+ if (Ho(e))
683
683
  return;
684
684
  const s = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = s.length;
685
685
  let a;
@@ -688,7 +688,7 @@ function Uo(e, t, { allOwnKeys: n = !1 } = {}) {
688
688
  }
689
689
  }
690
690
  function od(e, t) {
691
- if (Bo(e))
691
+ if (Ho(e))
692
692
  return null;
693
693
  t = t.toLowerCase();
694
694
  const n = Object.keys(e);
@@ -705,10 +705,10 @@ function wa() {
705
705
  xs(n[i]) && xs(o) ? n[i] = wa(n[i], o) : xs(o) ? n[i] = wa({}, o) : io(o) ? n[i] = o.slice() : (!t || !no(o)) && (n[i] = o);
706
706
  };
707
707
  for (let o = 0, s = arguments.length; o < s; o++)
708
- arguments[o] && Uo(arguments[o], r);
708
+ arguments[o] && Wo(arguments[o], r);
709
709
  return n;
710
710
  }
711
- const ox = (e, t, n, { allOwnKeys: r } = {}) => (Uo(t, (o, s) => {
711
+ const ox = (e, t, n, { allOwnKeys: r } = {}) => (Wo(t, (o, s) => {
712
712
  n && mn(o) ? e[s] = ed(o, n) : e[s] = o;
713
713
  }, { allOwnKeys: r }), e), sx = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), ix = (e, t, n, r) => {
714
714
  e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
@@ -757,7 +757,7 @@ const ox = (e, t, n, { allOwnKeys: r } = {}) => (Uo(t, (o, s) => {
757
757
  }
758
758
  ), dc = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), mx = Bn("RegExp"), id = (e, t) => {
759
759
  const n = Object.getOwnPropertyDescriptors(e), r = {};
760
- Uo(n, (o, s) => {
760
+ Wo(n, (o, s) => {
761
761
  let i;
762
762
  (i = t(o, s, e)) !== !1 && (r[s] = i || o);
763
763
  }), Object.defineProperties(e, r);
@@ -790,15 +790,15 @@ function wx(e) {
790
790
  }
791
791
  const bx = (e) => {
792
792
  const t = new Array(10), n = (r, o) => {
793
- if (Ho(r)) {
793
+ if (Uo(r)) {
794
794
  if (t.indexOf(r) >= 0)
795
795
  return;
796
- if (Bo(r))
796
+ if (Ho(r))
797
797
  return r;
798
798
  if (!("toJSON" in r)) {
799
799
  t[o] = r;
800
800
  const s = io(r) ? [] : {};
801
- return Uo(r, (i, a) => {
801
+ return Wo(r, (i, a) => {
802
802
  const l = n(i, o + 1);
803
803
  !no(l) && (s[a] = l);
804
804
  }), t[o] = void 0, s;
@@ -807,7 +807,7 @@ const bx = (e) => {
807
807
  return r;
808
808
  };
809
809
  return n(e, 0);
810
- }, Sx = Bn("AsyncFunction"), Cx = (e) => e && (Ho(e) || mn(e)) && mn(e.then) && mn(e.catch), ad = ((e, t) => e ? setImmediate : t ? ((n, r) => (Rr.addEventListener("message", ({ source: o, data: s }) => {
810
+ }, Sx = Bn("AsyncFunction"), Cx = (e) => e && (Uo(e) || mn(e)) && mn(e.then) && mn(e.catch), ad = ((e, t) => e ? setImmediate : t ? ((n, r) => (Rr.addEventListener("message", ({ source: o, data: s }) => {
811
811
  o === Rr && s === n && r.length && r.shift()();
812
812
  }, !1), (o) => {
813
813
  r.push(o), Rr.postMessage(n, "*");
@@ -817,13 +817,13 @@ const bx = (e) => {
817
817
  ), Tx = typeof queueMicrotask < "u" ? queueMicrotask.bind(Rr) : typeof process < "u" && process.nextTick || ad, kx = (e) => e != null && mn(e[oi]), O = {
818
818
  isArray: io,
819
819
  isArrayBuffer: nd,
820
- isBuffer: Bo,
820
+ isBuffer: Ho,
821
821
  isFormData: Jg,
822
822
  isArrayBufferView: Hg,
823
823
  isString: Ug,
824
824
  isNumber: rd,
825
825
  isBoolean: Wg,
826
- isObject: Ho,
826
+ isObject: Uo,
827
827
  isPlainObject: xs,
828
828
  isEmptyObject: Vg,
829
829
  isReadableStream: Qg,
@@ -840,7 +840,7 @@ const bx = (e) => {
840
840
  isURLSearchParams: Zg,
841
841
  isTypedArray: ux,
842
842
  isFileList: Yg,
843
- forEach: Uo,
843
+ forEach: Wo,
844
844
  merge: wa,
845
845
  extend: ox,
846
846
  trim: rx,
@@ -1177,7 +1177,7 @@ function Bx(e, t, n) {
1177
1177
  }
1178
1178
  return (n || JSON.stringify)(e);
1179
1179
  }
1180
- const Wo = {
1180
+ const Vo = {
1181
1181
  transitional: hd,
1182
1182
  adapter: ["xhr", "http", "fetch"],
1183
1183
  transformRequest: [function(t, n) {
@@ -1206,7 +1206,7 @@ const Wo = {
1206
1206
  return s || o ? (n.setContentType("application/json", !1), Bx(t)) : t;
1207
1207
  }],
1208
1208
  transformResponse: [function(t) {
1209
- const n = this.transitional || Wo.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
1209
+ const n = this.transitional || Vo.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
1210
1210
  if (O.isResponse(t) || O.isReadableStream(t))
1211
1211
  return t;
1212
1212
  if (t && O.isString(t) && (r && !this.responseType || o)) {
@@ -1244,7 +1244,7 @@ const Wo = {
1244
1244
  }
1245
1245
  };
1246
1246
  O.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
1247
- Wo.headers[e] = {};
1247
+ Vo.headers[e] = {};
1248
1248
  });
1249
1249
  const Hx = O.toObjectSet([
1250
1250
  "age",
@@ -1272,7 +1272,7 @@ const Hx = O.toObjectSet([
1272
1272
  o = i.indexOf(":"), n = i.substring(0, o).trim().toLowerCase(), r = i.substring(o + 1).trim(), !(!n || t[n] && Hx[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
1273
1273
  }), t;
1274
1274
  }, mc = Symbol("internals");
1275
- function yo(e) {
1275
+ function vo(e) {
1276
1276
  return e && String(e).trim().toLowerCase();
1277
1277
  }
1278
1278
  function ys(e) {
@@ -1317,7 +1317,7 @@ let gn = class {
1317
1317
  set(t, n, r) {
1318
1318
  const o = this;
1319
1319
  function s(a, l, c) {
1320
- const d = yo(l);
1320
+ const d = vo(l);
1321
1321
  if (!d)
1322
1322
  throw new Error("header name must be a non-empty string");
1323
1323
  const f = O.findKey(o, d);
@@ -1341,7 +1341,7 @@ let gn = class {
1341
1341
  return this;
1342
1342
  }
1343
1343
  get(t, n) {
1344
- if (t = yo(t), t) {
1344
+ if (t = vo(t), t) {
1345
1345
  const r = O.findKey(this, t);
1346
1346
  if (r) {
1347
1347
  const o = this[r];
@@ -1358,7 +1358,7 @@ let gn = class {
1358
1358
  }
1359
1359
  }
1360
1360
  has(t, n) {
1361
- if (t = yo(t), t) {
1361
+ if (t = vo(t), t) {
1362
1362
  const r = O.findKey(this, t);
1363
1363
  return !!(r && this[r] !== void 0 && (!n || Bi(this, this[r], r, n)));
1364
1364
  }
@@ -1368,7 +1368,7 @@ let gn = class {
1368
1368
  const r = this;
1369
1369
  let o = !1;
1370
1370
  function s(i) {
1371
- if (i = yo(i), i) {
1371
+ if (i = vo(i), i) {
1372
1372
  const a = O.findKey(r, i);
1373
1373
  a && (!n || Bi(r, r[a], a, n)) && (delete r[a], o = !0);
1374
1374
  }
@@ -1430,7 +1430,7 @@ let gn = class {
1430
1430
  accessors: {}
1431
1431
  }).accessors, o = this.prototype;
1432
1432
  function s(i) {
1433
- const a = yo(i);
1433
+ const a = vo(i);
1434
1434
  r[a] || (qx(o, i), r[a] = !0);
1435
1435
  }
1436
1436
  return O.isArray(t) ? t.forEach(s) : s(t), this;
@@ -1448,7 +1448,7 @@ O.reduceDescriptors(gn.prototype, ({ value: e }, t) => {
1448
1448
  });
1449
1449
  O.freezeMethods(gn);
1450
1450
  function Hi(e, t) {
1451
- const n = this || Wo, r = t || n, o = gn.from(r.headers);
1451
+ const n = this || Vo, r = t || n, o = gn.from(r.headers);
1452
1452
  let s = r.data;
1453
1453
  return O.forEach(e, function(a) {
1454
1454
  s = a.call(n, s, o.normalize(), t ? t.status : void 0);
@@ -2007,7 +2007,7 @@ function kc(e) {
2007
2007
  return Ui(e), e.headers = gn.from(e.headers), e.data = Hi.call(
2008
2008
  e,
2009
2009
  e.transformRequest
2010
- ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), wd.getAdapter(e.adapter || Wo.adapter, e)(e).then(function(r) {
2010
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), wd.getAdapter(e.adapter || Vo.adapter, e)(e).then(function(r) {
2011
2011
  return Ui(e), r.data = Hi.call(
2012
2012
  e,
2013
2013
  e.transformResponse,
@@ -2349,7 +2349,7 @@ function Cd(e) {
2349
2349
  return Cd(Ar(e, o));
2350
2350
  }, n;
2351
2351
  }
2352
- const $t = Cd(Wo);
2352
+ const $t = Cd(Vo);
2353
2353
  $t.Axios = Ir;
2354
2354
  $t.CanceledError = ao;
2355
2355
  $t.CancelToken = fy;
@@ -2529,7 +2529,7 @@ class by {
2529
2529
  return (r == null ? void 0 : r.items) ?? [];
2530
2530
  }
2531
2531
  }
2532
- const _r = new by(), Td = zo(null);
2532
+ const _r = new by(), Td = Bo(null);
2533
2533
  function Sy({ children: e, apiConfig: t }) {
2534
2534
  const n = _r;
2535
2535
  if (t) {
@@ -2710,7 +2710,7 @@ function jy(e, t) {
2710
2710
  const o = r.id || `task-${t}-${n}`;
2711
2711
  if (Array.isArray(r.interrupts) && r.interrupts.length)
2712
2712
  for (let s = r.interrupts.length - 1; s >= 0; s--) {
2713
- const i = bo(
2713
+ const i = So(
2714
2714
  r.interrupts[s],
2715
2715
  `${o}-interrupt-${s}`
2716
2716
  );
@@ -2718,7 +2718,7 @@ function jy(e, t) {
2718
2718
  return i;
2719
2719
  }
2720
2720
  if (r.state !== void 0 && r.state !== null) {
2721
- const s = bo(r.state, `${o}-state`);
2721
+ const s = So(r.state, `${o}-state`);
2722
2722
  if (s)
2723
2723
  return s;
2724
2724
  }
@@ -2736,7 +2736,7 @@ function Py(e, t) {
2736
2736
  const r = zt(n, ["id", "task_id", "taskId"]) ?? t, o = zt(n, ["name"]) ?? "task", s = Array.isArray(n.interrupts) ? n.interrupts : void 0, i = Object.prototype.hasOwnProperty.call(n, "state") ? n.state : void 0;
2737
2737
  return { id: r, name: o, interrupts: s, state: i };
2738
2738
  }
2739
- function bo(e, t, n = 0, r = /* @__PURE__ */ new Set()) {
2739
+ function So(e, t, n = 0, r = /* @__PURE__ */ new Set()) {
2740
2740
  if (n > 6 || e == null)
2741
2741
  return null;
2742
2742
  if (typeof e == "object") {
@@ -2749,7 +2749,7 @@ function bo(e, t, n = 0, r = /* @__PURE__ */ new Set()) {
2749
2749
  return o;
2750
2750
  if (Array.isArray(e)) {
2751
2751
  for (let s = e.length - 1; s >= 0; s--) {
2752
- const i = bo(e[s], t, n + 1, r);
2752
+ const i = So(e[s], t, n + 1, r);
2753
2753
  if (i)
2754
2754
  return i;
2755
2755
  }
@@ -2768,14 +2768,14 @@ function bo(e, t, n = 0, r = /* @__PURE__ */ new Set()) {
2768
2768
  ];
2769
2769
  for (const a of i)
2770
2770
  if (a in s) {
2771
- const l = bo(s[a], t, n + 1, r);
2771
+ const l = So(s[a], t, n + 1, r);
2772
2772
  if (l)
2773
2773
  return l;
2774
2774
  }
2775
2775
  for (const [a, l] of Object.entries(s)) {
2776
2776
  if (i.includes(a) || a === "messages" || a === "results")
2777
2777
  continue;
2778
- const c = bo(l, t, n + 1, r);
2778
+ const c = So(l, t, n + 1, r);
2779
2779
  if (c)
2780
2780
  return c;
2781
2781
  }
@@ -4186,7 +4186,7 @@ function yv({ currentThreadId: e, currentThreadIdRef: t }) {
4186
4186
  getSnapshotFromCache: p
4187
4187
  };
4188
4188
  }
4189
- const Pd = zo(null), Od = zo(null), Md = zo(null), vv = zo(!1);
4189
+ const Pd = Bo(null), Od = Bo(null), Md = Bo(null), vv = Bo(!1);
4190
4190
  function wv({
4191
4191
  children: e,
4192
4192
  initialThreadId: t = null,
@@ -4235,7 +4235,7 @@ function wv({
4235
4235
  return os(R);
4236
4236
  }), b = ct(() => Ji(T), [T]), [k, A] = we(t), [N, _] = we(!1), [M, $] = we(!1), [z, P] = we(null), [B, j] = we(null), [W, F] = we(null), L = de(() => {
4237
4237
  const R = Xi(w);
4238
- es(() => {
4238
+ go(() => {
4239
4239
  C(os(R));
4240
4240
  });
4241
4241
  }, [w]), [ne, Q] = we(!1), [ge, _e] = we(!1), [J, ue] = we(null), [ke, ee] = we(void 0), [D, q] = we(void 0), [ie, ce] = we(void 0), {
@@ -4357,7 +4357,7 @@ function wv({
4357
4357
  R || _(!0);
4358
4358
  try {
4359
4359
  const I = await c.listThreads();
4360
- es(() => {
4360
+ go(() => {
4361
4361
  C((U) => {
4362
4362
  const K = (ht) => ht.map((bt) => `${bt.threadId}:${bt.updatedAt ?? ""}:${bt.messageCount ?? ""}`).join("|"), he = Ji(U);
4363
4363
  return K(he) === K(I) || I.length === 0 && he.length > 0 && !xt.current ? U : os(I);
@@ -4527,7 +4527,7 @@ function wv({
4527
4527
  updatedAt: R.updatedAt || (/* @__PURE__ */ new Date()).toISOString(),
4528
4528
  messageCount: R.messageCount || 0
4529
4529
  };
4530
- Ce.current !== I && (!Ce.current && H.messages.length <= 1 && (Je.current = I), A(I)), es(() => {
4530
+ Ce.current !== I && (!Ce.current && H.messages.length <= 1 && (Je.current = I), A(I)), go(() => {
4531
4531
  C((K) => {
4532
4532
  const he = K.byId[I];
4533
4533
  return he ? he.title === U.title && he.updatedAt === U.updatedAt && he.messageCount === U.messageCount ? K : {
@@ -4702,7 +4702,7 @@ function wv({
4702
4702
  const le = Yi(h, he);
4703
4703
  kt.current !== le && (kt.current = le, Mt.current = !1), S(le);
4704
4704
  const ht = Xi(le);
4705
- es(() => {
4705
+ go(() => {
4706
4706
  C(os(ht));
4707
4707
  }), he && !Mt.current && (Mt.current = !0);
4708
4708
  };
@@ -4766,7 +4766,7 @@ function wv({
4766
4766
  }
4767
4767
  },
4768
4768
  [c, _t, Oe, dt, Te]
4769
- ), Zo = de(
4769
+ ), Qo = de(
4770
4770
  async (R, I) => {
4771
4771
  try {
4772
4772
  await c.updateThread(R, I), C((U) => {
@@ -4813,7 +4813,9 @@ function wv({
4813
4813
  { threadId: R, checkpointId: I, checkpointNs: U },
4814
4814
  { force: K }
4815
4815
  ), { latest: tr, checkpoints: Cr, snapshots: Vr } = Os(Ot.payload);
4816
- Ge(tr, "replace", R), Yt(R, Cr, "replace"), Xt(R, Vr, "replace"), j(null), Ot.usedHistoryApi || ae(R).then((Cn) => {
4816
+ go(() => {
4817
+ Ge(tr, "replace", R), Yt(R, Cr, "replace"), Xt(R, Vr, "replace"), j(null);
4818
+ }), Ot.usedHistoryApi || ae(R).then((Cn) => {
4817
4819
  Jt(R, Cn);
4818
4820
  }).catch((Cn) => {
4819
4821
  console.warn("[ChatSessionProvider] Failed to refresh checkpoint summaries:", Cn);
@@ -4851,7 +4853,7 @@ function wv({
4851
4853
  Yt,
4852
4854
  Xt
4853
4855
  ]
4854
- ), Qo = de(async () => {
4856
+ ), es = de(async () => {
4855
4857
  await ve(async () => {
4856
4858
  const R = Ce.current;
4857
4859
  R && Oe(R), Je.current = null, A(null), Ce.current = null, et.current = null, _t(), ee(void 0), q(void 0), ce(void 0), ft();
@@ -5114,7 +5116,7 @@ function wv({
5114
5116
  actions: {
5115
5117
  createThread: Un,
5116
5118
  deleteThread: po,
5117
- renameThread: Zo,
5119
+ renameThread: Qo,
5118
5120
  refreshThreads: () => dt()
5119
5121
  },
5120
5122
  persistThreadsCache: Ye,
@@ -5127,7 +5129,7 @@ function wv({
5127
5129
  z,
5128
5130
  Un,
5129
5131
  po,
5130
- Zo,
5132
+ Qo,
5131
5133
  dt,
5132
5134
  Ye,
5133
5135
  L,
@@ -5159,11 +5161,11 @@ function wv({
5159
5161
  navigateToCheckpoint: ec,
5160
5162
  returnToLatest: tc,
5161
5163
  loadThread: Sn,
5162
- clearThread: Qo,
5164
+ clearThread: es,
5163
5165
  respondToInterrupt: oc
5164
5166
  };
5165
5167
  }, [
5166
- Qo,
5168
+ es,
5167
5169
  _t,
5168
5170
  k,
5169
5171
  W,
@@ -6126,7 +6128,7 @@ const iw = async (e, t, n) => {
6126
6128
  middlewareData: p
6127
6129
  };
6128
6130
  };
6129
- async function No(e, t) {
6131
+ async function Ao(e, t) {
6130
6132
  var n;
6131
6133
  t === void 0 && (t = {});
6132
6134
  const {
@@ -6234,7 +6236,7 @@ const aw = (e) => ({
6234
6236
  return {};
6235
6237
  const y = ir(o), w = Gn(a), S = ir(a) === a, T = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), C = h || (S || !g ? [Ds(a)] : ew(a)), b = m !== "none";
6236
6238
  !h && b && C.push(...ow(a, g, m, T));
6237
- const k = [a, ...C], A = await No(t, x), N = [];
6239
+ const k = [a, ...C], A = await Ao(t, x), N = [];
6238
6240
  let _ = ((r = s.flip) == null ? void 0 : r.overflows) || [];
6239
6241
  if (d && N.push(A[y]), f) {
6240
6242
  const P = Qv(o, i, T);
@@ -6314,7 +6316,7 @@ const cw = function(e) {
6314
6316
  } = sr(e, t);
6315
6317
  switch (r) {
6316
6318
  case "referenceHidden": {
6317
- const s = await No(t, {
6319
+ const s = await Ao(t, {
6318
6320
  ...o,
6319
6321
  elementContext: "reference"
6320
6322
  }), i = eu(s, n.reference);
@@ -6326,7 +6328,7 @@ const cw = function(e) {
6326
6328
  };
6327
6329
  }
6328
6330
  case "escaped": {
6329
- const s = await No(t, {
6331
+ const s = await Ao(t, {
6330
6332
  ...o,
6331
6333
  altBoundary: !0
6332
6334
  }), i = eu(s, n.floating);
@@ -6420,7 +6422,7 @@ const dw = function(e) {
6420
6422
  } = sr(e, t), c = {
6421
6423
  x: n,
6422
6424
  y: r
6423
- }, d = await No(t, l), f = Gn(ir(o)), h = pl(f);
6425
+ }, d = await Ao(t, l), f = Gn(ir(o)), h = pl(f);
6424
6426
  let p = c[h], m = c[f];
6425
6427
  if (s) {
6426
6428
  const x = h === "y" ? "top" : "left", y = h === "y" ? "bottom" : "right", w = p + d[x], S = p - d[y];
@@ -6505,7 +6507,7 @@ const dw = function(e) {
6505
6507
  apply: l = () => {
6506
6508
  },
6507
6509
  ...c
6508
- } = sr(e, t), d = await No(t, c), f = ir(o), h = lo(o), p = Gn(o) === "y", {
6510
+ } = sr(e, t), d = await Ao(t, c), f = ir(o), h = lo(o), p = Gn(o) === "y", {
6509
6511
  width: m,
6510
6512
  height: g
6511
6513
  } = s.floating;
@@ -6558,7 +6560,7 @@ function nu(e) {
6558
6560
  return !fi() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof wn(e).ShadowRoot;
6559
6561
  }
6560
6562
  const mw = /* @__PURE__ */ new Set(["inline", "contents"]);
6561
- function Vo(e) {
6563
+ function Ko(e) {
6562
6564
  const {
6563
6565
  overflow: t,
6564
6566
  overflowX: n,
@@ -6630,17 +6632,17 @@ function fr(e) {
6630
6632
  }
6631
6633
  function Wd(e) {
6632
6634
  const t = fr(e);
6633
- return oo(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Jn(t) && Vo(t) ? t : Wd(t);
6635
+ return oo(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Jn(t) && Ko(t) ? t : Wd(t);
6634
6636
  }
6635
- function Ao(e, t, n) {
6637
+ function _o(e, t, n) {
6636
6638
  var r;
6637
6639
  t === void 0 && (t = []), n === void 0 && (n = !0);
6638
6640
  const o = Wd(e), s = o === ((r = e.ownerDocument) == null ? void 0 : r.body), i = wn(o);
6639
6641
  if (s) {
6640
6642
  const a = Oa(i);
6641
- return t.concat(i, i.visualViewport || [], Vo(o) ? o : [], a && n ? Ao(a) : []);
6643
+ return t.concat(i, i.visualViewport || [], Ko(o) ? o : [], a && n ? _o(a) : []);
6642
6644
  }
6643
- return t.concat(o, Ao(o, [], n));
6645
+ return t.concat(o, _o(o, [], n));
6644
6646
  }
6645
6647
  function Oa(e) {
6646
6648
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
@@ -6732,7 +6734,7 @@ function Rw(e) {
6732
6734
  scrollTop: 0
6733
6735
  }, c = Xn(1);
6734
6736
  const d = Xn(0), f = Jn(r);
6735
- if ((f || !f && !s) && ((co(r) !== "body" || Vo(i)) && (l = pi(r)), Jn(r))) {
6737
+ if ((f || !f && !s) && ((co(r) !== "body" || Ko(i)) && (l = pi(r)), Jn(r))) {
6736
6738
  const p = Pr(r);
6737
6739
  c = Jr(r), d.x = p.x + r.clientLeft, d.y = p.y + r.clientTop;
6738
6740
  }
@@ -6816,12 +6818,12 @@ function jw(e, t) {
6816
6818
  const n = t.get(e);
6817
6819
  if (n)
6818
6820
  return n;
6819
- let r = Ao(e, [], !1).filter((a) => Fn(a) && co(a) !== "body"), o = null;
6821
+ let r = _o(e, [], !1).filter((a) => Fn(a) && co(a) !== "body"), o = null;
6820
6822
  const s = $n(e).position === "fixed";
6821
6823
  let i = s ? fr(e) : e;
6822
6824
  for (; Fn(i) && !oo(i); ) {
6823
6825
  const a = $n(i), l = xl(i);
6824
- !l && a.position === "fixed" && (o = null), (s ? !l && !o : !l && a.position === "static" && !!o && Aw.has(o.position) || Vo(i) && !l && Gd(e, i)) ? r = r.filter((d) => d !== i) : o = a, i = fr(i);
6826
+ !l && a.position === "fixed" && (o = null), (s ? !l && !o : !l && a.position === "static" && !!o && Aw.has(o.position) || Ko(i) && !l && Gd(e, i)) ? r = r.filter((d) => d !== i) : o = a, i = fr(i);
6825
6827
  }
6826
6828
  return t.set(e, r), r;
6827
6829
  }
@@ -6864,7 +6866,7 @@ function Mw(e, t, n) {
6864
6866
  l.x = mi(o);
6865
6867
  }
6866
6868
  if (r || !r && !s)
6867
- if ((co(t) !== "body" || Vo(o)) && (a = pi(t)), r) {
6869
+ if ((co(t) !== "body" || Ko(o)) && (a = pi(t)), r) {
6868
6870
  const p = Pr(t, !0, s, t);
6869
6871
  l.x = p.x + t.clientLeft, l.y = p.y + t.clientTop;
6870
6872
  } else o && c();
@@ -6990,7 +6992,7 @@ function zw(e, t, n, r) {
6990
6992
  elementResize: i = typeof ResizeObserver == "function",
6991
6993
  layoutShift: a = typeof IntersectionObserver == "function",
6992
6994
  animationFrame: l = !1
6993
- } = r, c = vl(e), d = o || s ? [...c ? Ao(c) : [], ...Ao(t)] : [];
6995
+ } = r, c = vl(e), d = o || s ? [...c ? _o(c) : [], ..._o(t)] : [];
6994
6996
  d.forEach((y) => {
6995
6997
  o && y.addEventListener("scroll", n, {
6996
6998
  passive: !0
@@ -7531,13 +7533,13 @@ function gb(e) {
7531
7533
  let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
7532
7534
  return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
7533
7535
  }
7534
- var oa = "rovingFocusGroup.onEntryFocus", xb = { bubbles: !1, cancelable: !0 }, Ko = "RovingFocusGroup", [Ma, pf, yb] = fl(Ko), [vb, mf] = ar(
7535
- Ko,
7536
+ var oa = "rovingFocusGroup.onEntryFocus", xb = { bubbles: !1, cancelable: !0 }, qo = "RovingFocusGroup", [Ma, pf, yb] = fl(qo), [vb, mf] = ar(
7537
+ qo,
7536
7538
  [yb]
7537
- ), [wb, bb] = vb(Ko), gf = v.forwardRef(
7539
+ ), [wb, bb] = vb(qo), gf = v.forwardRef(
7538
7540
  (e, t) => /* @__PURE__ */ u.jsx(Ma.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ u.jsx(Ma.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ u.jsx(Sb, { ...e, ref: t }) }) })
7539
7541
  );
7540
- gf.displayName = Ko;
7542
+ gf.displayName = qo;
7541
7543
  var Sb = v.forwardRef((e, t) => {
7542
7544
  const {
7543
7545
  __scopeRovingFocusGroup: n,
@@ -7554,7 +7556,7 @@ var Sb = v.forwardRef((e, t) => {
7554
7556
  prop: i,
7555
7557
  defaultProp: a ?? null,
7556
7558
  onChange: l,
7557
- caller: Ko
7559
+ caller: qo
7558
7560
  }), [y, w] = v.useState(!1), S = en(c), T = pf(n), C = v.useRef(!1), [b, k] = v.useState(0);
7559
7561
  return v.useEffect(() => {
7560
7562
  const A = h.current;
@@ -8221,11 +8223,11 @@ var La = ["Enter", " "], p0 = ["ArrowDown", "PageUp", "Home"], If = ["ArrowUp",
8221
8223
  }, x0 = {
8222
8224
  ltr: ["ArrowLeft"],
8223
8225
  rtl: ["ArrowRight"]
8224
- }, qo = "Menu", [_o, y0, v0] = fl(qo), [Fr, Nf] = ar(qo, [
8226
+ }, Go = "Menu", [jo, y0, v0] = fl(Go), [Fr, Nf] = ar(Go, [
8225
8227
  v0,
8226
8228
  gi,
8227
8229
  mf
8228
- ]), wi = gi(), Af = mf(), [w0, $r] = Fr(qo), [b0, Go] = Fr(qo), _f = (e) => {
8230
+ ]), wi = gi(), Af = mf(), [w0, $r] = Fr(Go), [b0, Yo] = Fr(Go), _f = (e) => {
8229
8231
  const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, a = wi(t), [l, c] = v.useState(null), d = v.useRef(!1), f = en(s), h = ci(o);
8230
8232
  return v.useEffect(() => {
8231
8233
  const p = () => {
@@ -8256,7 +8258,7 @@ var La = ["Enter", " "], p0 = ["ArrowDown", "PageUp", "Home"], If = ["ArrowUp",
8256
8258
  }
8257
8259
  ) });
8258
8260
  };
8259
- _f.displayName = qo;
8261
+ _f.displayName = Go;
8260
8262
  var S0 = "MenuAnchor", Cl = v.forwardRef(
8261
8263
  (e, t) => {
8262
8264
  const { __scopeMenu: n, ...r } = e, o = wi(n);
@@ -8273,8 +8275,8 @@ var Tl = "MenuPortal", [C0, jf] = Fr(Tl, {
8273
8275
  Pf.displayName = Tl;
8274
8276
  var In = "MenuContent", [T0, kl] = Fr(In), Of = v.forwardRef(
8275
8277
  (e, t) => {
8276
- const n = jf(In, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = $r(In, e.__scopeMenu), i = Go(In, e.__scopeMenu);
8277
- return /* @__PURE__ */ u.jsx(_o.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ u.jsx(An, { present: r || s.open, children: /* @__PURE__ */ u.jsx(_o.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ u.jsx(k0, { ...o, ref: t }) : /* @__PURE__ */ u.jsx(R0, { ...o, ref: t }) }) }) });
8278
+ const n = jf(In, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = $r(In, e.__scopeMenu), i = Yo(In, e.__scopeMenu);
8279
+ return /* @__PURE__ */ u.jsx(jo.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ u.jsx(An, { present: r || s.open, children: /* @__PURE__ */ u.jsx(jo.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ u.jsx(k0, { ...o, ref: t }) : /* @__PURE__ */ u.jsx(R0, { ...o, ref: t }) }) }) });
8278
8280
  }
8279
8281
  ), k0 = v.forwardRef(
8280
8282
  (e, t) => {
@@ -8329,7 +8331,7 @@ var In = "MenuContent", [T0, kl] = Fr(In), Of = v.forwardRef(
8329
8331
  onDismiss: p,
8330
8332
  disableOutsideScroll: m,
8331
8333
  ...g
8332
- } = e, x = $r(In, n), y = Go(In, n), w = wi(n), S = Af(n), T = y0(n), [C, b] = v.useState(null), k = v.useRef(null), A = rt(t, k, x.onContentChange), N = v.useRef(0), _ = v.useRef(""), M = v.useRef(0), $ = v.useRef(null), z = v.useRef("right"), P = v.useRef(0), B = m ? vi : v.Fragment, j = m ? { as: E0, allowPinchZoom: !0 } : void 0, W = (L) => {
8334
+ } = e, x = $r(In, n), y = Yo(In, n), w = wi(n), S = Af(n), T = y0(n), [C, b] = v.useState(null), k = v.useRef(null), A = rt(t, k, x.onContentChange), N = v.useRef(0), _ = v.useRef(""), M = v.useRef(0), $ = v.useRef(null), z = v.useRef("right"), P = v.useRef(0), B = m ? vi : v.Fragment, j = m ? { as: E0, allowPinchZoom: !0 } : void 0, W = (L) => {
8333
8335
  var ee, D;
8334
8336
  const ne = _.current + L, Q = T().filter((q) => !q.disabled), ge = document.activeElement, _e = (ee = Q.find((q) => q.ref.current === ge)) == null ? void 0 : ee.textValue, J = Q.map((q) => q.textValue), ue = $0(J, ne, _e), ke = (D = Q.find((q) => q.textValue === ue)) == null ? void 0 : D.ref.current;
8335
8337
  (function q(ie) {
@@ -8429,7 +8431,7 @@ var In = "MenuContent", [T0, kl] = Fr(In), Of = v.forwardRef(
8429
8431
  }),
8430
8432
  onPointerMove: xe(
8431
8433
  e.onPointerMove,
8432
- jo((L) => {
8434
+ Po((L) => {
8433
8435
  const ne = L.target, Q = P.current !== L.clientX;
8434
8436
  if (L.currentTarget.contains(ne) && Q) {
8435
8437
  const ge = L.clientX > P.current ? "right" : "left";
@@ -8466,7 +8468,7 @@ var N0 = "MenuLabel", Mf = v.forwardRef(
8466
8468
  Mf.displayName = N0;
8467
8469
  var $s = "MenuItem", hu = "menu.itemSelect", bi = v.forwardRef(
8468
8470
  (e, t) => {
8469
- const { disabled: n = !1, onSelect: r, ...o } = e, s = v.useRef(null), i = Go($s, e.__scopeMenu), a = kl($s, e.__scopeMenu), l = rt(t, s), c = v.useRef(!1), d = () => {
8471
+ const { disabled: n = !1, onSelect: r, ...o } = e, s = v.useRef(null), i = Yo($s, e.__scopeMenu), a = kl($s, e.__scopeMenu), l = rt(t, s), c = v.useRef(!1), d = () => {
8470
8472
  const f = s.current;
8471
8473
  if (!n && f) {
8472
8474
  const h = new CustomEvent(hu, { bubbles: !0, cancelable: !0 });
@@ -8504,7 +8506,7 @@ var Df = v.forwardRef(
8504
8506
  const m = l.current;
8505
8507
  m && p((m.textContent ?? "").trim());
8506
8508
  }, [s.children]), /* @__PURE__ */ u.jsx(
8507
- _o.ItemSlot,
8509
+ jo.ItemSlot,
8508
8510
  {
8509
8511
  scope: n,
8510
8512
  disabled: r,
@@ -8520,13 +8522,13 @@ var Df = v.forwardRef(
8520
8522
  ref: c,
8521
8523
  onPointerMove: xe(
8522
8524
  e.onPointerMove,
8523
- jo((m) => {
8525
+ Po((m) => {
8524
8526
  r ? i.onItemLeave(m) : (i.onItemEnter(m), m.defaultPrevented || m.currentTarget.focus({ preventScroll: !0 }));
8525
8527
  })
8526
8528
  ),
8527
8529
  onPointerLeave: xe(
8528
8530
  e.onPointerLeave,
8529
- jo((m) => i.onItemLeave(m))
8531
+ Po((m) => i.onItemLeave(m))
8530
8532
  ),
8531
8533
  onFocus: xe(e.onFocus, () => f(!0)),
8532
8534
  onBlur: xe(e.onBlur, () => f(!1))
@@ -8636,9 +8638,9 @@ var M0 = "MenuArrow", Vf = v.forwardRef(
8636
8638
  }
8637
8639
  );
8638
8640
  Vf.displayName = M0;
8639
- var D0 = "MenuSub", [zR, Kf] = Fr(D0), vo = "MenuSubTrigger", qf = v.forwardRef(
8641
+ var D0 = "MenuSub", [zR, Kf] = Fr(D0), wo = "MenuSubTrigger", qf = v.forwardRef(
8640
8642
  (e, t) => {
8641
- const n = $r(vo, e.__scopeMenu), r = Go(vo, e.__scopeMenu), o = Kf(vo, e.__scopeMenu), s = kl(vo, e.__scopeMenu), i = v.useRef(null), { pointerGraceTimerRef: a, onPointerGraceIntentChange: l } = s, c = { __scopeMenu: e.__scopeMenu }, d = v.useCallback(() => {
8643
+ const n = $r(wo, e.__scopeMenu), r = Yo(wo, e.__scopeMenu), o = Kf(wo, e.__scopeMenu), s = kl(wo, e.__scopeMenu), i = v.useRef(null), { pointerGraceTimerRef: a, onPointerGraceIntentChange: l } = s, c = { __scopeMenu: e.__scopeMenu }, d = v.useCallback(() => {
8642
8644
  i.current && window.clearTimeout(i.current), i.current = null;
8643
8645
  }, []);
8644
8646
  return v.useEffect(() => d, [d]), v.useEffect(() => {
@@ -8662,7 +8664,7 @@ var D0 = "MenuSub", [zR, Kf] = Fr(D0), vo = "MenuSubTrigger", qf = v.forwardRef(
8662
8664
  },
8663
8665
  onPointerMove: xe(
8664
8666
  e.onPointerMove,
8665
- jo((f) => {
8667
+ Po((f) => {
8666
8668
  s.onItemEnter(f), !f.defaultPrevented && !e.disabled && !n.open && !i.current && (s.onPointerGraceIntentChange(null), i.current = window.setTimeout(() => {
8667
8669
  n.onOpenChange(!0), d();
8668
8670
  }, 100));
@@ -8670,7 +8672,7 @@ var D0 = "MenuSub", [zR, Kf] = Fr(D0), vo = "MenuSubTrigger", qf = v.forwardRef(
8670
8672
  ),
8671
8673
  onPointerLeave: xe(
8672
8674
  e.onPointerLeave,
8673
- jo((f) => {
8675
+ Po((f) => {
8674
8676
  var p, m;
8675
8677
  d();
8676
8678
  const h = (p = n.content) == null ? void 0 : p.getBoundingClientRect();
@@ -8706,11 +8708,11 @@ var D0 = "MenuSub", [zR, Kf] = Fr(D0), vo = "MenuSubTrigger", qf = v.forwardRef(
8706
8708
  ) });
8707
8709
  }
8708
8710
  );
8709
- qf.displayName = vo;
8711
+ qf.displayName = wo;
8710
8712
  var Gf = "MenuSubContent", Yf = v.forwardRef(
8711
8713
  (e, t) => {
8712
- const n = jf(In, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = $r(In, e.__scopeMenu), i = Go(In, e.__scopeMenu), a = Kf(Gf, e.__scopeMenu), l = v.useRef(null), c = rt(t, l);
8713
- return /* @__PURE__ */ u.jsx(_o.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ u.jsx(An, { present: r || s.open, children: /* @__PURE__ */ u.jsx(_o.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ u.jsx(
8714
+ const n = jf(In, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = $r(In, e.__scopeMenu), i = Yo(In, e.__scopeMenu), a = Kf(Gf, e.__scopeMenu), l = v.useRef(null), c = rt(t, l);
8715
+ return /* @__PURE__ */ u.jsx(jo.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ u.jsx(An, { present: r || s.open, children: /* @__PURE__ */ u.jsx(jo.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ u.jsx(
8714
8716
  Rl,
8715
8717
  {
8716
8718
  id: a.contentId,
@@ -8783,7 +8785,7 @@ function B0(e, t) {
8783
8785
  const n = { x: e.clientX, y: e.clientY };
8784
8786
  return z0(n, t);
8785
8787
  }
8786
- function jo(e) {
8788
+ function Po(e) {
8787
8789
  return (t) => t.pointerType === "mouse" ? e(t) : void 0;
8788
8790
  }
8789
8791
  var H0 = _f, U0 = Cl, W0 = Pf, V0 = Of, K0 = El, q0 = Mf, G0 = bi, Y0 = Lf, X0 = $f, J0 = Bf, Z0 = Uf, Q0 = Wf, eS = Vf, tS = qf, nS = Yf, Si = "DropdownMenu", [rS, BR] = ar(
@@ -9529,7 +9531,7 @@ const cn = ut(
9529
9531
  },
9530
9532
  [],
9531
9533
  { singleton: !0 }
9532
- ), Po = { lvl: 0 };
9534
+ ), Oo = { lvl: 0 };
9533
9535
  function Rh(e, t) {
9534
9536
  const n = e.length;
9535
9537
  if (n === 0)
@@ -9543,11 +9545,11 @@ function Rh(e, t) {
9543
9545
  return s.push({ end: 1 / 0, start: r, value: o }), s;
9544
9546
  }
9545
9547
  function Ct(e) {
9546
- return e === Po;
9548
+ return e === Oo;
9547
9549
  }
9548
- function Oo(e, t) {
9550
+ function Mo(e, t) {
9549
9551
  if (!Ct(e))
9550
- return t === e.k ? e.v : t < e.k ? Oo(e.l, t) : Oo(e.r, t);
9552
+ return t === e.k ? e.v : t < e.k ? Mo(e.l, t) : Mo(e.r, t);
9551
9553
  }
9552
9554
  function zn(e, t, n = "k") {
9553
9555
  if (Ct(e))
@@ -9564,7 +9566,7 @@ function vn(e, t, n) {
9564
9566
  return Ct(e) ? Nh(t, n, 1) : t === e.k ? Vt(e, { k: t, v: n }) : t < e.k ? yu(Vt(e, { l: vn(e.l, t, n) })) : yu(Vt(e, { r: vn(e.r, t, n) }));
9565
9567
  }
9566
9568
  function Qr() {
9567
- return Po;
9569
+ return Oo;
9568
9570
  }
9569
9571
  function ki(e, t, n) {
9570
9572
  if (Ct(e))
@@ -9573,7 +9575,7 @@ function ki(e, t, n) {
9573
9575
  return KS(Ba(e, r, n));
9574
9576
  }
9575
9577
  function za(e, t) {
9576
- if (Ct(e)) return Po;
9578
+ if (Ct(e)) return Oo;
9577
9579
  const { k: n, l: r, r: o } = e;
9578
9580
  if (t === n) {
9579
9581
  if (Ct(r))
@@ -9648,7 +9650,7 @@ function ca(e) {
9648
9650
  function Ih(e) {
9649
9651
  return Ct(e.r) ? [e.k, e.v] : Ih(e.r);
9650
9652
  }
9651
- function Nh(e, t, n, r = Po, o = Po) {
9653
+ function Nh(e, t, n, r = Oo, o = Oo) {
9652
9654
  return { k: e, l: r, lvl: n, r: o, v: t };
9653
9655
  }
9654
9656
  function yu(e) {
@@ -9668,7 +9670,7 @@ function KS(e) {
9668
9670
  function _h(e, t) {
9669
9671
  return !!(e && e.startIndex === t.startIndex && e.endIndex === t.endIndex);
9670
9672
  }
9671
- function Mo(e, t) {
9673
+ function Do(e, t) {
9672
9674
  return !!(e && e[0] === t[0] && e[1] === t[1]);
9673
9675
  }
9674
9676
  const Pl = ut(
@@ -9745,7 +9747,7 @@ function XS(e) {
9745
9747
  function JS({ offset: e }, t) {
9746
9748
  return t === e ? 0 : t < e ? -1 : 1;
9747
9749
  }
9748
- function Do(e, t, n) {
9750
+ function Lo(e, t, n) {
9749
9751
  if (t.length === 0)
9750
9752
  return 0;
9751
9753
  const { index: r, offset: o, size: s } = jh(t, e, Ol), i = e - r, a = s * i + (i - 1) * n + o;
@@ -9785,7 +9787,7 @@ function QS(e, [t, n, r, o]) {
9785
9787
  const { lastIndex: l, lastOffset: c, lastSize: d, offsetTree: f } = Ua(e.offsetTree, a, i, o);
9786
9788
  return {
9787
9789
  groupIndices: n,
9788
- groupOffsetTree: n.reduce((h, p) => vn(h, p, Do(p, f, o)), Qr()),
9790
+ groupOffsetTree: n.reduce((h, p) => vn(h, p, Lo(p, f, o)), Qr()),
9789
9791
  lastIndex: l,
9790
9792
  lastOffset: c,
9791
9793
  lastSize: d,
@@ -9861,7 +9863,7 @@ const rC = {
9861
9863
  je((C) => C.length > 0),
9862
9864
  Ke(g, p),
9863
9865
  pe(([C, b, k]) => {
9864
- const A = C.reduce((N, _, M) => vn(N, _, Do(_, b.offsetTree, k) || M), Qr());
9866
+ const A = C.reduce((N, _, M) => vn(N, _, Lo(_, b.offsetTree, k) || M), Qr());
9865
9867
  return {
9866
9868
  ...b,
9867
9869
  groupIndices: C,
@@ -9947,7 +9949,7 @@ const rC = {
9947
9949
  pe(([C, b]) => {
9948
9950
  const k = b.groupIndices.length > 0, A = [], N = b.lastSize;
9949
9951
  if (k) {
9950
- const _ = Oo(b.sizeTree, 0);
9952
+ const _ = Mo(b.sizeTree, 0);
9951
9953
  let M = 0, $ = 0;
9952
9954
  for (; M < C; ) {
9953
9955
  const P = b.groupIndices[$], B = b.groupIndices.length === $ + 1 ? 1 / 0 : b.groupIndices[$ + 1] - P - 1;
@@ -10007,7 +10009,7 @@ const rC = {
10007
10009
  Ke(g, p),
10008
10010
  pe(([C, { offsetTree: b }, k]) => {
10009
10011
  const A = -C;
10010
- return Do(A, b, k);
10012
+ return Lo(A, b, k);
10011
10013
  })
10012
10014
  )
10013
10015
  );
@@ -10028,7 +10030,7 @@ const rC = {
10028
10030
  M++, _ += z + 1;
10029
10031
  }
10030
10032
  if (A = Er(b.sizeTree).reduce((z, { k: P, v: B }) => vn(z, Math.max(0, P + C), B), A), _ !== -C) {
10031
- const z = Oo(b.sizeTree, $);
10033
+ const z = Mo(b.sizeTree, $);
10032
10034
  A = vn(A, 0, z);
10033
10035
  const P = zn(b.sizeTree, -C + 1)[1];
10034
10036
  A = vn(A, 1, P);
@@ -10130,7 +10132,7 @@ function Dh(e) {
10130
10132
  const t = typeof e == "number" ? { index: e } : e;
10131
10133
  return t.align || (t.align = "start"), (!t.behavior || !sC) && (t.behavior = "auto"), t.offset || (t.offset = 0), t;
10132
10134
  }
10133
- const Yo = ut(
10135
+ const Xo = ut(
10134
10136
  ([
10135
10137
  { gap: e, listRefresh: t, sizes: n, totalCount: r },
10136
10138
  {
@@ -10163,7 +10165,7 @@ const Yo = ut(
10163
10165
  P
10164
10166
  ]) => {
10165
10167
  const B = Dh(T), { align: j, behavior: W, offset: F } = B, L = k - 1, ne = Oh(B, C, L);
10166
- let Q = Do(ne, C.offsetTree, $) + N;
10168
+ let Q = Lo(ne, C.offsetTree, $) + N;
10167
10169
  j === "end" ? (Q += z + zn(C.sizeTree, ne)[1] - b + P, ne === L && (Q += _)) : j === "center" ? Q += (z + zn(C.sizeTree, ne)[1] - b + P) / 2 : Q -= A, F && (Q += F);
10168
10170
  const ge = (_e) => {
10169
10171
  S(), _e ? (M("retrying to scroll to", { location: T }, xn.DEBUG), He(p, T)) : (He(m, !0), M("list did not change, scroll successful", {}, xn.DEBUG));
@@ -10212,7 +10214,7 @@ function Dl(e, t) {
10212
10214
  const n = t - 1;
10213
10215
  return typeof e == "number" ? e : e.index === "LAST" ? n : e.index;
10214
10216
  }
10215
- const Xo = ut(
10217
+ const Jo = ut(
10216
10218
  ([{ defaultItemSize: e, listRefresh: t, sizes: n }, { scrollTop: r }, { scrollTargetReached: o, scrollToIndex: s }, { didMount: i }]) => {
10217
10219
  const a = te(!0), l = te(0), c = te(!0);
10218
10220
  return be(
@@ -10253,13 +10255,13 @@ const Xo = ut(
10253
10255
  scrolledToInitialItem: a
10254
10256
  };
10255
10257
  },
10256
- Nt(Qn, cn, Yo, yr),
10258
+ Nt(Qn, cn, Xo, yr),
10257
10259
  { singleton: !0 }
10258
10260
  );
10259
10261
  function Lh(e, t) {
10260
10262
  return Math.abs(e - t) < 1.01;
10261
10263
  }
10262
- const Lo = "up", So = "down", aC = "none", lC = {
10264
+ const Fo = "up", Co = "down", aC = "none", lC = {
10263
10265
  atBottom: !1,
10264
10266
  notAtBottomBecause: "NOT_SHOWING_LAST_ITEM",
10265
10267
  state: {
@@ -10268,7 +10270,7 @@ const Lo = "up", So = "down", aC = "none", lC = {
10268
10270
  scrollTop: 0,
10269
10271
  viewportHeight: 0
10270
10272
  }
10271
- }, cC = 0, Jo = ut(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: s }]) => {
10273
+ }, cC = 0, Zo = ut(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: s }]) => {
10272
10274
  const i = te(!1), a = te(!0), l = nt(), c = nt(), d = te(4), f = te(cC), h = sn(
10273
10275
  X(
10274
10276
  $a(X(Ae(o), Or(1), Kn(!0)), X(Ae(o), Or(1), Kn(!1), gu(100))),
@@ -10355,15 +10357,15 @@ const Lo = "up", So = "down", aC = "none", lC = {
10355
10357
  ),
10356
10358
  i
10357
10359
  ), be(X(i, nr(50)), l);
10358
- const x = te(So);
10360
+ const x = te(Co);
10359
10361
  be(
10360
10362
  X(
10361
10363
  r,
10362
10364
  pe(({ scrollTop: w }) => w),
10363
10365
  It(),
10364
10366
  Yn(
10365
- (w, S) => Ft(p) ? { direction: w.direction, prevScrollTop: S } : { direction: S < w.prevScrollTop ? Lo : So, prevScrollTop: S },
10366
- { direction: So, prevScrollTop: 0 }
10367
+ (w, S) => Ft(p) ? { direction: w.direction, prevScrollTop: S } : { direction: S < w.prevScrollTop ? Fo : Co, prevScrollTop: S },
10368
+ { direction: Co, prevScrollTop: 0 }
10367
10369
  ),
10368
10370
  pe((w) => w.direction)
10369
10371
  ),
@@ -10402,7 +10404,7 @@ const Lo = "up", So = "down", aC = "none", lC = {
10402
10404
  };
10403
10405
  }, Nt(cn)), Hs = "top", Us = "bottom", wu = "none";
10404
10406
  function bu(e, t, n) {
10405
- return typeof e == "number" ? n === Lo && t === Hs || n === So && t === Us ? e : 0 : n === Lo ? t === Hs ? e.main : e.reverse : t === Us ? e.main : e.reverse;
10407
+ return typeof e == "number" ? n === Fo && t === Hs || n === Co && t === Us ? e : 0 : n === Fo ? t === Hs ? e.main : e.reverse : t === Us ? e.main : e.reverse;
10406
10408
  }
10407
10409
  function Su(e, t) {
10408
10410
  var n;
@@ -10416,7 +10418,7 @@ const Ll = ut(
10416
10418
  Ae(r),
10417
10419
  Ae(o),
10418
10420
  Ae(n),
10419
- Ae(s, Mo),
10421
+ Ae(s, Do),
10420
10422
  Ae(l),
10421
10423
  Ae(i),
10422
10424
  Ae(t),
@@ -10438,14 +10440,14 @@ const Ll = ut(
10438
10440
  const T = d - w, C = x + y, b = Math.max(h - T, 0);
10439
10441
  let k = wu;
10440
10442
  const A = Su(S, Hs), N = Su(S, Us);
10441
- return p -= w, p += h + y, m += h + y, m -= w, p > d + C - A && (k = Lo), m < d - b + f + N && (k = So), k !== wu ? [
10443
+ return p -= w, p += h + y, m += h + y, m -= w, p > d + C - A && (k = Fo), m < d - b + f + N && (k = Co), k !== wu ? [
10442
10444
  Math.max(T - h - bu(g, Hs, k) - A, 0),
10443
10445
  T - b - y + f + bu(g, Us, k) + N
10444
10446
  ] : null;
10445
10447
  }
10446
10448
  ),
10447
10449
  je((d) => d != null),
10448
- It(Mo)
10450
+ It(Do)
10449
10451
  ),
10450
10452
  [0, 0]
10451
10453
  );
@@ -10564,7 +10566,7 @@ const Br = ut(
10564
10566
  Bt(
10565
10567
  p,
10566
10568
  m,
10567
- Ae(l, Mo),
10569
+ Ae(l, Do),
10568
10570
  Ae(o),
10569
10571
  Ae(r),
10570
10572
  Ae(c),
@@ -10679,7 +10681,7 @@ const Br = ut(
10679
10681
  Ke(o, e),
10680
10682
  je(([{ items: b }, k]) => b[b.length - 1].originalIndex === k - 1),
10681
10683
  pe(([, b, k]) => [b - 1, k]),
10682
- It(Mo),
10684
+ It(Do),
10683
10685
  pe(([b]) => b)
10684
10686
  )
10685
10687
  ), T = bn(
@@ -10714,9 +10716,9 @@ const Br = ut(
10714
10716
  Qn,
10715
10717
  Mh,
10716
10718
  Ll,
10717
- Xo,
10718
- Yo,
10719
10719
  Jo,
10720
+ Xo,
10721
+ Zo,
10720
10722
  yr,
10721
10723
  Pl
10722
10724
  ),
@@ -10771,7 +10773,7 @@ const Br = ut(
10771
10773
  Ke(t, l, n, s, o, r, a),
10772
10774
  Ke(e),
10773
10775
  pe(([[f, h, p, m, g, x, y, w], S]) => {
10774
- const { align: T, behavior: C, calculateViewLocation: b = fC, done: k, ...A } = f, N = Oh(f, h, m - 1), _ = Do(N, h.offsetTree, S) + g + x, M = _ + zn(h.sizeTree, N)[1], $ = w + x, z = w + p - y, P = b({
10776
+ const { align: T, behavior: C, calculateViewLocation: b = fC, done: k, ...A } = f, N = Oh(f, h, m - 1), _ = Lo(N, h.offsetTree, S) + g + x, M = _ + zn(h.sizeTree, N)[1], $ = w + x, z = w + p - y, P = b({
10775
10777
  itemBottom: M,
10776
10778
  itemTop: _,
10777
10779
  locationParams: { align: T, behavior: C, ...A },
@@ -10796,7 +10798,7 @@ const Br = ut(
10796
10798
  scrollIntoView: d
10797
10799
  };
10798
10800
  },
10799
- Nt(Qn, cn, Yo, Br, xr),
10801
+ Nt(Qn, cn, Xo, Br, xr),
10800
10802
  { singleton: !0 }
10801
10803
  );
10802
10804
  function Tu(e) {
@@ -10898,9 +10900,9 @@ const hC = (e, t) => typeof e == "function" ? Tu(e(t)) : t && Tu(e), pC = ut(
10898
10900
  },
10899
10901
  Nt(
10900
10902
  Qn,
10901
- Jo,
10902
- Yo,
10903
+ Zo,
10903
10904
  Xo,
10905
+ Jo,
10904
10906
  yr,
10905
10907
  xr,
10906
10908
  cn,
@@ -10918,7 +10920,7 @@ const hC = (e, t) => typeof e == "function" ? Tu(e(t)) : t && Tu(e), pC = ut(
10918
10920
  ),
10919
10921
  i
10920
10922
  ), {}),
10921
- Nt(Qn, Xo, Br, yr),
10923
+ Nt(Qn, Jo, Br, yr),
10922
10924
  { singleton: !0 }
10923
10925
  ), gC = ut(
10924
10926
  ([{ didMount: e }, { scrollTo: t }, { listState: n }]) => {
@@ -10977,7 +10979,7 @@ const hC = (e, t) => typeof e == "function" ? Tu(e(t)) : t && Tu(e), pC = ut(
10977
10979
  }
10978
10980
  ), { isSeeking: t, scrollSeekConfiguration: r, scrollSeekRangeChanged: n, scrollVelocity: e };
10979
10981
  },
10980
- Nt(Jo),
10982
+ Nt(Zo),
10981
10983
  { singleton: !0 }
10982
10984
  ), Fl = ut(([{ scrollContainerState: e, scrollTo: t }]) => {
10983
10985
  const n = nt(), r = nt(), o = nt(), s = te(!1), i = te(void 0);
@@ -11043,7 +11045,7 @@ const hC = (e, t) => typeof e == "function" ? Tu(e(t)) : t && Tu(e), pC = ut(
11043
11045
  restoreStateFrom: d
11044
11046
  };
11045
11047
  },
11046
- Nt(Qn, cn, Xo, yr, Fl)
11048
+ Nt(Qn, cn, Jo, yr, Fl)
11047
11049
  );
11048
11050
  function yC(e) {
11049
11051
  return { align: "start", index: 0, offset: e.scrollTop };
@@ -11086,7 +11088,7 @@ const wC = Uh(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
11086
11088
  ),
11087
11089
  je(([y]) => y !== 0),
11088
11090
  Ke(r, a, n, o, p, m),
11089
- je(([, y, w, S, , , T]) => !T && !S && y !== 0 && w === Lo),
11091
+ je(([, y, w, S, , , T]) => !T && !S && y !== 0 && w === Fo),
11090
11092
  pe(([[y], , , , , w]) => (w("Upward scrolling compensation", { amount: y }, xn.DEBUG), y))
11091
11093
  )
11092
11094
  );
@@ -11121,7 +11123,7 @@ const wC = Uh(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
11121
11123
  return b(y);
11122
11124
  {
11123
11125
  let k = 0;
11124
- const A = Oo(T, 0);
11126
+ const A = Mo(T, 0);
11125
11127
  let N = 0, _ = 0;
11126
11128
  for (; N < y; ) {
11127
11129
  N++, k += A;
@@ -11141,7 +11143,7 @@ const wC = Uh(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
11141
11143
  }
11142
11144
  ), { deviation: e };
11143
11145
  },
11144
- Nt(cn, Jo, Br, Qn, xr, Pl)
11146
+ Nt(cn, Zo, Br, Qn, xr, Pl)
11145
11147
  ), SC = ut(
11146
11148
  ([
11147
11149
  e,
@@ -11246,12 +11248,12 @@ const wC = Uh(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
11246
11248
  }),
11247
11249
  Nt(
11248
11250
  Qn,
11249
- Xo,
11251
+ Jo,
11250
11252
  cn,
11251
11253
  xC,
11252
11254
  pC,
11253
11255
  Br,
11254
- Yo,
11256
+ Xo,
11255
11257
  bC,
11256
11258
  vC,
11257
11259
  Mh,
@@ -11773,7 +11775,7 @@ const Eu = {
11773
11775
  offsetBottom: 0,
11774
11776
  offsetTop: 0,
11775
11777
  top: 0
11776
- }, { ceil: Iu, floor: Ws, max: Co, min: ha, round: Nu } = Math;
11778
+ }, { ceil: Iu, floor: Ws, max: To, min: ha, round: Nu } = Math;
11777
11779
  function Au(e, t, n) {
11778
11780
  return Array.from({ length: t - e + 1 }).map((r, o) => ({ data: n === null ? null : n[o + e], index: o + e }));
11779
11781
  }
@@ -11898,7 +11900,7 @@ const GC = /* @__PURE__ */ ut(
11898
11900
  }
11899
11901
  const Je = Qh(Qe, st, ot);
11900
11902
  let qe, et;
11901
- Pe ? q === 0 && ie === 0 && ye > 0 ? (qe = 0, et = ye - 1) : (qe = Je * Ws((q + Ce) / (Xe + Ce)), et = Je * Iu((ie + Ce) / (Xe + Ce)) - 1, et = ha(D - 1, Co(et, Je - 1)), qe = ha(et, Co(0, qe))) : (qe = 0, et = -1);
11903
+ Pe ? q === 0 && ie === 0 && ye > 0 ? (qe = 0, et = ye - 1) : (qe = Je * Ws((q + Ce) / (Xe + Ce)), et = Je * Iu((ie + Ce) / (Xe + Ce)) - 1, et = ha(D - 1, To(et, Je - 1)), qe = ha(et, To(0, qe))) : (qe = 0, et = -1);
11902
11904
  const Mt = Au(qe, et, re), { bottom: kt, top: tt } = _u(We, ce, H, Mt), vt = Iu(D / Je), At = vt * Xe + (vt - 1) * Ce - kt;
11903
11905
  return { bottom: kt, itemHeight: Xe, items: Mt, itemWidth: st, offsetBottom: At, offsetTop: tt, top: tt };
11904
11906
  }
@@ -11920,7 +11922,7 @@ const GC = /* @__PURE__ */ ut(
11920
11922
  const { bottom: H, top: We } = _u(D, ce, q, ie);
11921
11923
  return [We, H];
11922
11924
  }),
11923
- It(Mo)
11925
+ It(Do)
11924
11926
  ),
11925
11927
  t
11926
11928
  );
@@ -11972,7 +11974,7 @@ const GC = /* @__PURE__ */ ut(
11972
11974
  pe(([D, q, ie, ce, H]) => {
11973
11975
  const We = Dh(D), { align: re, behavior: ye, offset: Pe } = We;
11974
11976
  let $e = We.index;
11975
- $e === "LAST" && ($e = ce - 1), $e = Co(0, $e, ha(ce - 1, $e));
11977
+ $e === "LAST" && ($e = ce - 1), $e = To(0, $e, ha(ce - 1, $e));
11976
11978
  let ot = Wa(q, H, ie, $e);
11977
11979
  return re === "end" ? ot = Nu(ot - q.height + ie.height) : re === "center" && (ot = Nu(ot - q.height / 2 + ie.height / 2)), Pe && (ot += Pe), { behavior: ye, top: ot };
11978
11980
  })
@@ -12034,10 +12036,10 @@ const GC = /* @__PURE__ */ ut(
12034
12036
  ...C
12035
12037
  };
12036
12038
  },
12037
- Nt(Ll, cn, Jo, Hh, yr, Fl, xr)
12039
+ Nt(Ll, cn, Zo, Hh, yr, Fl, xr)
12038
12040
  );
12039
12041
  function Qh(e, t, n) {
12040
- return Co(1, Ws((e + n) / (Ws(t) + n)));
12042
+ return To(1, Ws((e + n) / (Ws(t) + n)));
12041
12043
  }
12042
12044
  function _u(e, t, n, r) {
12043
12045
  const { height: o } = n;
@@ -12047,7 +12049,7 @@ function _u(e, t, n, r) {
12047
12049
  return { bottom: Wa(e, t, n, r[r.length - 1].index) + o, top: s };
12048
12050
  }
12049
12051
  function Wa(e, t, n, r) {
12050
- const o = Qh(e.width, n.width, t.column), s = Ws(r / o), i = s * n.height + Co(0, s - 1) * t.row;
12052
+ const o = Qh(e.width, n.width, t.column), s = Ws(r / o), i = s * n.height + To(0, s - 1) * t.row;
12051
12053
  return i > 0 ? i + t.row : i;
12052
12054
  }
12053
12055
  const YC = /* @__PURE__ */ ut(() => {
@@ -12253,7 +12255,7 @@ const sT = ni(
12253
12255
  function tp({ className: e, variant: t, ...n }) {
12254
12256
  return /* @__PURE__ */ u.jsx("div", { className: oe(sT({ variant: t }), e), ...n });
12255
12257
  }
12256
- const To = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
12258
+ const ko = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
12257
12259
  "div",
12258
12260
  {
12259
12261
  ref: n,
@@ -12264,8 +12266,8 @@ const To = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
12264
12266
  ...t
12265
12267
  }
12266
12268
  ));
12267
- To.displayName = "Card";
12268
- const ko = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
12269
+ ko.displayName = "Card";
12270
+ const Ro = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
12269
12271
  "div",
12270
12272
  {
12271
12273
  ref: n,
@@ -12273,8 +12275,8 @@ const ko = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
12273
12275
  ...t
12274
12276
  }
12275
12277
  ));
12276
- ko.displayName = "CardHeader";
12277
- const Ro = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
12278
+ Ro.displayName = "CardHeader";
12279
+ const Eo = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
12278
12280
  "h3",
12279
12281
  {
12280
12282
  ref: n,
@@ -12285,7 +12287,7 @@ const Ro = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
12285
12287
  ...t
12286
12288
  }
12287
12289
  ));
12288
- Ro.displayName = "CardTitle";
12290
+ Eo.displayName = "CardTitle";
12289
12291
  const np = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
12290
12292
  "p",
12291
12293
  {
@@ -12295,8 +12297,8 @@ const np = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
12295
12297
  }
12296
12298
  ));
12297
12299
  np.displayName = "CardDescription";
12298
- const Eo = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx("div", { ref: n, className: oe("p-6 pt-0", e), ...t }));
12299
- Eo.displayName = "CardContent";
12300
+ const Io = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx("div", { ref: n, className: oe("p-6 pt-0", e), ...t }));
12301
+ Io.displayName = "CardContent";
12300
12302
  const rp = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
12301
12303
  "div",
12302
12304
  {
@@ -12315,7 +12317,7 @@ const ma = /* @__PURE__ */ new Map(), Pu = (e) => {
12315
12317
  if (ma.has(e))
12316
12318
  return;
12317
12319
  const t = setTimeout(() => {
12318
- ma.delete(e), Io({
12320
+ ma.delete(e), No({
12319
12321
  type: "REMOVE_TOAST",
12320
12322
  toastId: e
12321
12323
  });
@@ -12360,17 +12362,17 @@ const ma = /* @__PURE__ */ new Map(), Pu = (e) => {
12360
12362
  }
12361
12363
  }, Ns = [];
12362
12364
  let As = { toasts: [] };
12363
- function Io(e) {
12365
+ function No(e) {
12364
12366
  As = cT(As, e), Ns.forEach((t) => {
12365
12367
  t(As);
12366
12368
  });
12367
12369
  }
12368
12370
  function uT({ ...e }) {
12369
- const t = lT(), n = (o) => Io({
12371
+ const t = lT(), n = (o) => No({
12370
12372
  type: "UPDATE_TOAST",
12371
12373
  toast: { ...o, id: t }
12372
- }), r = () => Io({ type: "DISMISS_TOAST", toastId: t });
12373
- return Io({
12374
+ }), r = () => No({ type: "DISMISS_TOAST", toastId: t });
12375
+ return No({
12374
12376
  type: "ADD_TOAST",
12375
12377
  toast: {
12376
12378
  ...e,
@@ -12394,7 +12396,7 @@ function Hl() {
12394
12396
  }), [e]), {
12395
12397
  ...e,
12396
12398
  toast: uT,
12397
- dismiss: (n) => Io({ type: "DISMISS_TOAST", toastId: n })
12399
+ dismiss: (n) => No({ type: "DISMISS_TOAST", toastId: n })
12398
12400
  };
12399
12401
  }
12400
12402
  async function op(e, t) {
@@ -12440,12 +12442,12 @@ function Ul(e) {
12440
12442
  function sp(e) {
12441
12443
  return !!(e && typeof e == "object" && (e.type === "file" || e.mimeType || e.filename || e.sourceType === "base64"));
12442
12444
  }
12443
- function Fo(e) {
12445
+ function $o(e) {
12444
12446
  if (typeof e == "string")
12445
12447
  return e;
12446
12448
  if (e && typeof e == "object") {
12447
12449
  if (Array.isArray(e)) {
12448
- const n = e.map(Fo).filter((r) => r !== void 0);
12450
+ const n = e.map($o).filter((r) => r !== void 0);
12449
12451
  if (!n.length) {
12450
12452
  console.debug("[message-utils] sanitizeForDisplay - array emptied -> returning undefined", { originalLength: e.length });
12451
12453
  return;
@@ -12469,7 +12471,7 @@ function Fo(e) {
12469
12471
  if (n === "data" && typeof r == "string" && r.length > 100)
12470
12472
  t[n] = `[base64 ${r.length} chars omitted]`;
12471
12473
  else {
12472
- const o = Fo(r);
12474
+ const o = $o(r);
12473
12475
  o !== void 0 && (t[n] = o);
12474
12476
  }
12475
12477
  }
@@ -12484,11 +12486,11 @@ function Fo(e) {
12484
12486
  }
12485
12487
  return e;
12486
12488
  }
12487
- function $o(e) {
12489
+ function zo(e) {
12488
12490
  if (typeof e == "string") return e;
12489
12491
  if (sp(e)) return "";
12490
12492
  try {
12491
- const t = Fo(e);
12493
+ const t = $o(e);
12492
12494
  return t === void 0 ? "" : typeof t == "string" ? t : JSON.stringify(t, null, 2);
12493
12495
  } catch {
12494
12496
  return "";
@@ -12498,7 +12500,7 @@ function hT(e) {
12498
12500
  return typeof e != "string" ? !1 : /^[\s\n]*[-*]\s|^[\s\n]*#+\s|```|^\s*\[.*\]\(|^>\s/.test(e);
12499
12501
  }
12500
12502
  function pT(e) {
12501
- const t = $o(e);
12503
+ const t = zo(e);
12502
12504
  return typeof e == "string" && hT(e) ? { content: e, isMarkdown: !0 } : { content: t, isMarkdown: !1 };
12503
12505
  }
12504
12506
  function Vs(e) {
@@ -14567,7 +14569,7 @@ function ps(e) {
14567
14569
  function GT(e) {
14568
14570
  const t = (o) => {
14569
14571
  try {
14570
- const s = Fo(o);
14572
+ const s = $o(o);
14571
14573
  return typeof s == "string" ? s : JSON.stringify(s ?? "");
14572
14574
  } catch {
14573
14575
  return "";
@@ -15185,7 +15187,7 @@ const Hu = V.memo(function({
15185
15187
  return o && s;
15186
15188
  });
15187
15189
  function Lp({ data: e }) {
15188
- return Array.isArray(e) ? e.every((n) => n === null || ["string", "number", "boolean"].includes(typeof n)) ? /* @__PURE__ */ u.jsx("div", { className: KT, children: /* @__PURE__ */ u.jsx("ul", { className: "list-disc pl-5", children: e.map((n, r) => /* @__PURE__ */ u.jsx("li", { children: String(n) }, r)) }) }) : /* @__PURE__ */ u.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: $o(e) }) : /* @__PURE__ */ u.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: $o(e) });
15190
+ return Array.isArray(e) ? e.every((n) => n === null || ["string", "number", "boolean"].includes(typeof n)) ? /* @__PURE__ */ u.jsx("div", { className: KT, children: /* @__PURE__ */ u.jsx("ul", { className: "list-disc pl-5", children: e.map((n, r) => /* @__PURE__ */ u.jsx("li", { children: String(n) }, r)) }) }) : /* @__PURE__ */ u.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: zo(e) }) : /* @__PURE__ */ u.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: zo(e) });
15189
15191
  }
15190
15192
  function JT({
15191
15193
  interruptPart: e,
@@ -15201,23 +15203,23 @@ function JT({
15201
15203
  if (typeof s == "string")
15202
15204
  a = /* @__PURE__ */ u.jsx("p", { className: "text-sm leading-relaxed text-blue-800/90 dark:text-blue-200/90 whitespace-pre-wrap", children: s });
15203
15205
  else {
15204
- const c = $o(s);
15206
+ const c = zo(s);
15205
15207
  a = /* @__PURE__ */ u.jsx("pre", { className: "max-h-48 overflow-auto rounded bg-blue-100/60 p-2 text-xs text-blue-900/90 dark:bg-blue-900/40 dark:text-blue-100/80", children: c });
15206
15208
  }
15207
15209
  const l = o ? "Please approve or reject this action to resume the workflow." : "Waiting for approval from another participant.";
15208
15210
  return /* @__PURE__ */ u.jsxs(
15209
- To,
15211
+ ko,
15210
15212
  {
15211
15213
  className: oe(
15212
15214
  "border-blue-200 dark:border-blue-800 bg-blue-50/50 dark:bg-blue-950/10 transition-shadow",
15213
15215
  o ? "shadow-md ring-1 ring-blue-300 dark:ring-blue-500/70" : "opacity-80"
15214
15216
  ),
15215
15217
  children: [
15216
- /* @__PURE__ */ u.jsxs(ko, { className: "pb-3", children: [
15217
- /* @__PURE__ */ u.jsx(Ro, { className: "text-blue-900 dark:text-blue-100 text-base", children: i }),
15218
+ /* @__PURE__ */ u.jsxs(Ro, { className: "pb-3", children: [
15219
+ /* @__PURE__ */ u.jsx(Eo, { className: "text-blue-900 dark:text-blue-100 text-base", children: i }),
15218
15220
  /* @__PURE__ */ u.jsx(np, { className: "text-blue-700 dark:text-blue-300 text-sm", children: l })
15219
15221
  ] }),
15220
- a && /* @__PURE__ */ u.jsx(Eo, { className: "pt-0 pb-3", children: a }),
15222
+ a && /* @__PURE__ */ u.jsx(Io, { className: "pt-0 pb-3", children: a }),
15221
15223
  /* @__PURE__ */ u.jsx(rp, { className: "pt-0", children: /* @__PURE__ */ u.jsxs("div", { className: "flex gap-2 ml-auto", children: [
15222
15224
  /* @__PURE__ */ u.jsx(
15223
15225
  pt,
@@ -15368,7 +15370,7 @@ function ek({ message: e, viewMode: t }) {
15368
15370
  return /* @__PURE__ */ u.jsx(Lp, { data: d });
15369
15371
  const f = typeof d == "string" ? d : (() => {
15370
15372
  try {
15371
- return $o(d);
15373
+ return zo(d);
15372
15374
  } catch {
15373
15375
  return String(d ?? "");
15374
15376
  }
@@ -15398,7 +15400,7 @@ function ek({ message: e, viewMode: t }) {
15398
15400
  const f = Vs(d);
15399
15401
  return s(f);
15400
15402
  }
15401
- const a = Fo(i), l = Vs(a);
15403
+ const a = $o(i), l = Vs(a);
15402
15404
  return s(l);
15403
15405
  }
15404
15406
  const Uu = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, tk = (e) => {
@@ -15809,11 +15811,11 @@ function ga({
15809
15811
  if (!an) return null;
15810
15812
  const Un = dt(at.metadata, "source");
15811
15813
  dt(at.metadata, "next");
15812
- const { text: po, messageId: Zo } = gt(at.messages), Sn = po && po.replace(/\s+/g, " ").trim() || dt(at.metadata, "title") || dt(at.metadata, "label") || Ut || Un || "Checkpoint", Qo = Sn.length > 60 ? `${Sn.slice(0, 57)}…` : Sn;
15814
+ const { text: po, messageId: Qo } = gt(at.messages), Sn = po && po.replace(/\s+/g, " ").trim() || dt(at.metadata, "title") || dt(at.metadata, "label") || Ut || Un || "Checkpoint", es = Sn.length > 60 ? `${Sn.slice(0, 57)}…` : Sn;
15813
15815
  return {
15814
15816
  id: an,
15815
- label: Qo,
15816
- messageId: Zo ?? null,
15817
+ label: es,
15818
+ messageId: Qo ?? null,
15817
15819
  createdAt: at.createdAt ?? null,
15818
15820
  step: xt(at.metadata, "step"),
15819
15821
  source: Un ?? null,
@@ -17898,9 +17900,9 @@ var Qs = "SelectItem", [Vk, Nm] = ho(Qs), Am = v.forwardRef(
17898
17900
  }
17899
17901
  );
17900
17902
  Am.displayName = Qs;
17901
- var wo = "SelectItemText", _m = v.forwardRef(
17903
+ var bo = "SelectItemText", _m = v.forwardRef(
17902
17904
  (e, t) => {
17903
- const { __scopeSelect: n, className: r, style: o, ...s } = e, i = vr(wo, n), a = wr(wo, n), l = Nm(wo, n), c = Ok(wo, n), [d, f] = v.useState(null), h = rt(
17905
+ const { __scopeSelect: n, className: r, style: o, ...s } = e, i = vr(bo, n), a = wr(bo, n), l = Nm(bo, n), c = Ok(bo, n), [d, f] = v.useState(null), h = rt(
17904
17906
  t,
17905
17907
  (y) => f(y),
17906
17908
  l.onItemTextChange,
@@ -17918,7 +17920,7 @@ var wo = "SelectItemText", _m = v.forwardRef(
17918
17920
  ] });
17919
17921
  }
17920
17922
  );
17921
- _m.displayName = wo;
17923
+ _m.displayName = bo;
17922
17924
  var jm = "SelectItemIndicator", Pm = v.forwardRef(
17923
17925
  (e, t) => {
17924
17926
  const { __scopeSelect: n, ...r } = e;
@@ -18353,12 +18355,12 @@ function YR({ settings: e, onSettingsChange: t, className: n = "" }) {
18353
18355
  /* @__PURE__ */ u.jsx(og, { children: "Configure your chat interface, API connection, and behavior preferences." })
18354
18356
  ] }),
18355
18357
  /* @__PURE__ */ u.jsxs("div", { className: "space-y-6 py-6", children: [
18356
- /* @__PURE__ */ u.jsxs(To, { children: [
18357
- /* @__PURE__ */ u.jsx(ko, { className: "pb-3", children: /* @__PURE__ */ u.jsxs(Ro, { className: "text-lg flex items-center gap-2", children: [
18358
+ /* @__PURE__ */ u.jsxs(ko, { children: [
18359
+ /* @__PURE__ */ u.jsx(Ro, { className: "pb-3", children: /* @__PURE__ */ u.jsxs(Eo, { className: "text-lg flex items-center gap-2", children: [
18358
18360
  /* @__PURE__ */ u.jsx(Ag, { className: "h-5 w-5" }),
18359
18361
  "API Configuration"
18360
18362
  ] }) }),
18361
- /* @__PURE__ */ u.jsxs(Eo, { className: "space-y-4", children: [
18363
+ /* @__PURE__ */ u.jsxs(Io, { className: "space-y-4", children: [
18362
18364
  /* @__PURE__ */ u.jsxs("div", { className: "space-y-2", children: [
18363
18365
  /* @__PURE__ */ u.jsx(kn, { htmlFor: "api-url", children: "API Base URL" }),
18364
18366
  /* @__PURE__ */ u.jsxs("div", { className: "flex gap-2", children: [
@@ -18420,12 +18422,12 @@ function YR({ settings: e, onSettingsChange: t, className: n = "" }) {
18420
18422
  ] })
18421
18423
  ] })
18422
18424
  ] }),
18423
- /* @__PURE__ */ u.jsxs(To, { children: [
18424
- /* @__PURE__ */ u.jsx(ko, { className: "pb-3", children: /* @__PURE__ */ u.jsxs(Ro, { className: "text-lg flex items-center gap-2", children: [
18425
+ /* @__PURE__ */ u.jsxs(ko, { children: [
18426
+ /* @__PURE__ */ u.jsx(Ro, { className: "pb-3", children: /* @__PURE__ */ u.jsxs(Eo, { className: "text-lg flex items-center gap-2", children: [
18425
18427
  /* @__PURE__ */ u.jsx(Pg, { className: "h-5 w-5" }),
18426
18428
  "Interface Settings"
18427
18429
  ] }) }),
18428
- /* @__PURE__ */ u.jsxs(Eo, { className: "space-y-4", children: [
18430
+ /* @__PURE__ */ u.jsxs(Io, { className: "space-y-4", children: [
18429
18431
  /* @__PURE__ */ u.jsxs("div", { className: "space-y-2", children: [
18430
18432
  /* @__PURE__ */ u.jsx(kn, { htmlFor: "layout", children: "Layout Style" }),
18431
18433
  /* @__PURE__ */ u.jsxs(
@@ -18515,12 +18517,12 @@ function YR({ settings: e, onSettingsChange: t, className: n = "" }) {
18515
18517
  ] })
18516
18518
  ] })
18517
18519
  ] }),
18518
- /* @__PURE__ */ u.jsxs(To, { children: [
18519
- /* @__PURE__ */ u.jsx(ko, { className: "pb-3", children: /* @__PURE__ */ u.jsxs(Ro, { className: "text-lg flex items-center gap-2", children: [
18520
+ /* @__PURE__ */ u.jsxs(ko, { children: [
18521
+ /* @__PURE__ */ u.jsx(Ro, { className: "pb-3", children: /* @__PURE__ */ u.jsxs(Eo, { className: "text-lg flex items-center gap-2", children: [
18520
18522
  /* @__PURE__ */ u.jsx(Og, { className: "h-5 w-5" }),
18521
18523
  "Behavior Settings"
18522
18524
  ] }) }),
18523
- /* @__PURE__ */ u.jsxs(Eo, { className: "space-y-4", children: [
18525
+ /* @__PURE__ */ u.jsxs(Io, { className: "space-y-4", children: [
18524
18526
  /* @__PURE__ */ u.jsxs("div", { className: "flex items-center justify-between", children: [
18525
18527
  /* @__PURE__ */ u.jsxs("div", { children: [
18526
18528
  /* @__PURE__ */ u.jsx(kn, { htmlFor: "auto-save", children: "Auto-save Conversations" }),