teodor-new-chat-ui 3.0.123 → 3.0.124

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
@@ -2352,22 +2352,22 @@ Ze.getAdapter = Gl.getAdapter;
2352
2352
  Ze.HttpStatusCode = pi;
2353
2353
  Ze.default = Ze;
2354
2354
  const {
2355
- Axios: KT,
2356
- AxiosError: YT,
2357
- CanceledError: qT,
2358
- isCancel: XT,
2359
- CancelToken: JT,
2360
- VERSION: ZT,
2361
- all: QT,
2362
- Cancel: eR,
2363
- isAxiosError: tR,
2364
- spread: nR,
2365
- toFormData: rR,
2366
- AxiosHeaders: oR,
2367
- HttpStatusCode: sR,
2368
- formToJSON: iR,
2369
- getAdapter: aR,
2370
- mergeConfig: cR
2355
+ Axios: YT,
2356
+ AxiosError: qT,
2357
+ CanceledError: XT,
2358
+ isCancel: JT,
2359
+ CancelToken: ZT,
2360
+ VERSION: QT,
2361
+ all: eR,
2362
+ Cancel: tR,
2363
+ isAxiosError: nR,
2364
+ spread: rR,
2365
+ toFormData: oR,
2366
+ AxiosHeaders: sR,
2367
+ HttpStatusCode: iR,
2368
+ formToJSON: aR,
2369
+ getAdapter: cR,
2370
+ mergeConfig: lR
2371
2371
  } = Ze, pc = typeof window < "u" ? window.__API_BASE_URL__ : void 0, mi = pc ? pc.replace(/\/+$/, "") : void 0;
2372
2372
  !mi && typeof window < "u" && console.warn("API base URL is not configured. The API client will need to be configured via apiConfig prop or window.__API_BASE_URL__.");
2373
2373
  let Oo = null;
@@ -2742,7 +2742,7 @@ function Qg(e = []) {
2742
2742
  function gc(e, t) {
2743
2743
  var n;
2744
2744
  if (t.type === "message_start" && t.role === "assistant") {
2745
- const r = t.id, o = ov(t.model), s = {
2745
+ const r = t.id, o = sv(t.model), s = {
2746
2746
  id: r,
2747
2747
  role: "assistant",
2748
2748
  name: o || void 0,
@@ -2754,7 +2754,7 @@ function gc(e, t) {
2754
2754
  }
2755
2755
  if (t.type === "token") {
2756
2756
  const r = e.assemblingId ?? Bs(e.messages);
2757
- return r ? { ...e, messages: tv(e.messages, r, t.content) } : e;
2757
+ return r ? { ...e, messages: nv(e.messages, r, t.content) } : e;
2758
2758
  }
2759
2759
  if (t.type === "message_delta") {
2760
2760
  const r = e.assemblingId ?? Bs(e.messages);
@@ -2792,7 +2792,7 @@ function gc(e, t) {
2792
2792
  return { ...e, messages: a };
2793
2793
  }
2794
2794
  if (t.type === "checkpoint") {
2795
- const r = t.checkpointNs ?? e.lastCheckpointNs ?? null, o = rv(e.messages, t.checkpointId, r);
2795
+ const r = t.checkpointNs ?? e.lastCheckpointNs ?? null, o = ov(e.messages, t.checkpointId, r);
2796
2796
  return { ...e, lastCheckpointId: t.checkpointId, lastCheckpointNs: r, messages: o };
2797
2797
  }
2798
2798
  if (t.type === "branch") {
@@ -2825,12 +2825,15 @@ function Fs(e) {
2825
2825
  function ev(e, t, n) {
2826
2826
  return t <= 0 ? [n, ...e] : t >= e.length ? [...e, n] : [...e.slice(0, t), n, ...e.slice(t)];
2827
2827
  }
2828
+ function tv(e, t, n) {
2829
+ return t < 0 || t >= e.length ? e : [...e.slice(0, t), n, ...e.slice(t + 1)];
2830
+ }
2828
2831
  function Bs(e) {
2829
2832
  for (let t = e.length - 1; t >= 0; t--)
2830
2833
  if (e[t].role === "assistant") return e[t].id;
2831
2834
  return null;
2832
2835
  }
2833
- function tv(e, t, n) {
2836
+ function nv(e, t, n) {
2834
2837
  return e.map((r) => {
2835
2838
  if (r.id !== t) return r;
2836
2839
  const o = r.content.slice(), s = o[o.length - 1];
@@ -2838,9 +2841,9 @@ function tv(e, t, n) {
2838
2841
  });
2839
2842
  }
2840
2843
  function vc(e, t, n) {
2841
- return e.map((r) => r.id === t ? { ...r, content: nv(r.content, n) } : r);
2844
+ return e.map((r) => r.id === t ? { ...r, content: rv(r.content, n) } : r);
2842
2845
  }
2843
- function nv(e, t) {
2846
+ function rv(e, t) {
2844
2847
  const n = e.slice();
2845
2848
  for (const r of t)
2846
2849
  if (r.type === "text") {
@@ -2850,20 +2853,20 @@ function nv(e, t) {
2850
2853
  n.push(r);
2851
2854
  return n;
2852
2855
  }
2853
- function rv(e, t, n) {
2856
+ function ov(e, t, n) {
2854
2857
  for (let r = e.length - 1; r >= 0; r--)
2855
2858
  if (e[r].role === "assistant") {
2856
2859
  const s = { ...e[r], checkpointId: t, checkpointNs: n ?? void 0 };
2857
- return [...e.slice(0, r), s, ...e.slice(r + 1)];
2860
+ return tv(e, r, s);
2858
2861
  }
2859
2862
  return e;
2860
2863
  }
2861
- function ov(e) {
2864
+ function sv(e) {
2862
2865
  if (!e) return null;
2863
2866
  const t = e.split("/");
2864
2867
  return t[t.length - 1] || null;
2865
2868
  }
2866
- function sv(e, t) {
2869
+ function iv(e, t) {
2867
2870
  const n = e == null ? void 0 : e.checkpoints, r = Array.isArray(n) ? n.slice() : n ? Object.values(n) : [], o = (i) => i && typeof i == "object" && typeof i.checkpointId == "string" && typeof i.createdAt == "string", s = r.filter(o).map((i) => ({
2868
2871
  checkpointId: i.checkpointId,
2869
2872
  checkpointNs: i.checkpointNs ?? "",
@@ -2882,7 +2885,7 @@ function sv(e, t) {
2882
2885
  checkpoints: s
2883
2886
  };
2884
2887
  }
2885
- async function iv(e) {
2888
+ async function av(e) {
2886
2889
  return await new Promise((t, n) => {
2887
2890
  const r = new FileReader();
2888
2891
  r.onload = () => {
@@ -2898,11 +2901,11 @@ async function iv(e) {
2898
2901
  }, r.onerror = (o) => n(o), r.readAsArrayBuffer(e);
2899
2902
  });
2900
2903
  }
2901
- async function av(e, t = [], n, r, o, s) {
2904
+ async function cv(e, t = [], n, r, o, s) {
2902
2905
  const i = [], a = [];
2903
2906
  for (const l of t)
2904
2907
  try {
2905
- const u = await iv(l);
2908
+ const u = await av(l);
2906
2909
  a.push({ filename: l.name, data: u, mime_type: l.type || "application/octet-stream" });
2907
2910
  } catch {
2908
2911
  }
@@ -3082,7 +3085,7 @@ function vo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3082
3085
  [l, ee, V, W]
3083
3086
  ), Pe = $e(async (z) => {
3084
3087
  const Q = await l.listCheckpoints(z);
3085
- return sv(Q, z);
3088
+ return iv(Q, z);
3086
3089
  }, [l]), je = $e(async (z, Q) => {
3087
3090
  await V(async () => {
3088
3091
  if (!ae) throw new Error("No active thread");
@@ -3135,7 +3138,7 @@ function vo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3135
3138
  await l.updateThread(z, Q), await $();
3136
3139
  }, [l, $]), Ke = $e(async (z, Q) => {
3137
3140
  var fn;
3138
- const Fe = (Q == null ? void 0 : Q.attachments) || [], { contentParts: Ve, filesInfo: bt } = await av(
3141
+ const Fe = (Q == null ? void 0 : Q.attachments) || [], { contentParts: Ve, filesInfo: bt } = await cv(
3139
3142
  l,
3140
3143
  Fe,
3141
3144
  t == null ? void 0 : t.uploadPath
@@ -3244,7 +3247,7 @@ function Ki() {
3244
3247
  function D(...e) {
3245
3248
  return dm(um(e));
3246
3249
  }
3247
- const cv = zr(
3250
+ const lv = zr(
3248
3251
  "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
3249
3252
  {
3250
3253
  variants: {
@@ -3274,7 +3277,7 @@ const cv = zr(
3274
3277
  return /* @__PURE__ */ c.jsx(
3275
3278
  i,
3276
3279
  {
3277
- className: D(cv({ variant: t, size: n, className: e })),
3280
+ className: D(lv({ variant: t, size: n, className: e })),
3278
3281
  ref: s,
3279
3282
  ...o
3280
3283
  }
@@ -3296,7 +3299,7 @@ const Jl = f.forwardRef(
3296
3299
  )
3297
3300
  );
3298
3301
  Jl.displayName = "Textarea";
3299
- function lv({
3302
+ function uv({
3300
3303
  initialValue: e = "",
3301
3304
  editingMessageId: t = null,
3302
3305
  placeholder: n = "Type your message...",
@@ -3389,11 +3392,11 @@ function lv({
3389
3392
  ) })
3390
3393
  ] }) });
3391
3394
  }
3392
- const uv = Y.memo(lv), ns = 0, yn = 1, lr = 2, Zl = 4;
3395
+ const dv = Y.memo(uv), ns = 0, yn = 1, lr = 2, Zl = 4;
3393
3396
  function xc(e) {
3394
3397
  return () => e;
3395
3398
  }
3396
- function dv(e) {
3399
+ function fv(e) {
3397
3400
  e();
3398
3401
  }
3399
3402
  function Ql(e, t) {
@@ -3402,15 +3405,15 @@ function Ql(e, t) {
3402
3405
  function bc(e, t) {
3403
3406
  return () => e(t);
3404
3407
  }
3405
- function fv(e, t) {
3408
+ function hv(e, t) {
3406
3409
  return (n) => e(t, n);
3407
3410
  }
3408
3411
  function Yi(e) {
3409
3412
  return e !== void 0;
3410
3413
  }
3411
- function hv(...e) {
3414
+ function pv(...e) {
3412
3415
  return () => {
3413
- e.map(dv);
3416
+ e.map(fv);
3414
3417
  };
3415
3418
  }
3416
3419
  function ur() {
@@ -3418,7 +3421,7 @@ function ur() {
3418
3421
  function rs(e, t) {
3419
3422
  return t(e), e;
3420
3423
  }
3421
- function pv(e, t) {
3424
+ function mv(e, t) {
3422
3425
  return t(e);
3423
3426
  }
3424
3427
  function We(...e) {
@@ -3437,7 +3440,7 @@ function Je(e) {
3437
3440
  return e(Zl);
3438
3441
  }
3439
3442
  function de(e, t) {
3440
- return De(e, fv(t, ns));
3443
+ return De(e, hv(t, ns));
3441
3444
  }
3442
3445
  function Ft(e, t) {
3443
3446
  const n = e(yn, (r) => {
@@ -3476,7 +3479,7 @@ function qt(e) {
3476
3479
  };
3477
3480
  }
3478
3481
  function B(e, ...t) {
3479
- const n = mv(...t);
3482
+ const n = gv(...t);
3480
3483
  return (r, o) => {
3481
3484
  switch (r) {
3482
3485
  case lr:
@@ -3522,10 +3525,10 @@ function Te(...e) {
3522
3525
  n === o ? a() : r = a;
3523
3526
  };
3524
3527
  }
3525
- function mv(...e) {
3526
- return (t) => e.reduceRight(pv, t);
3528
+ function gv(...e) {
3529
+ return (t) => e.reduceRight(mv, t);
3527
3530
  }
3528
- function gv(e) {
3531
+ function vv(e) {
3529
3532
  let t, n;
3530
3533
  const r = () => t == null ? void 0 : t();
3531
3534
  return function(o, s) {
@@ -3586,12 +3589,12 @@ function _e(e, t = [], { singleton: n } = { singleton: !0 }) {
3586
3589
  return {
3587
3590
  constructor: e,
3588
3591
  dependencies: t,
3589
- id: vv(),
3592
+ id: xv(),
3590
3593
  singleton: n
3591
3594
  };
3592
3595
  }
3593
- const vv = () => Symbol();
3594
- function xv(e) {
3596
+ const xv = () => Symbol();
3597
+ function bv(e) {
3595
3598
  const t = /* @__PURE__ */ new Map(), n = ({ constructor: r, dependencies: o, id: s, singleton: i }) => {
3596
3599
  if (i && t.has(s))
3597
3600
  return t.get(s);
@@ -3629,17 +3632,17 @@ function vi(...e) {
3629
3632
  case lr:
3630
3633
  return;
3631
3634
  case yn:
3632
- return hv(...e.map((r) => De(r, n)));
3635
+ return pv(...e.map((r) => De(r, n)));
3633
3636
  }
3634
3637
  };
3635
3638
  }
3636
3639
  var vt = /* @__PURE__ */ ((e) => (e[e.DEBUG = 0] = "DEBUG", e[e.INFO = 1] = "INFO", e[e.WARN = 2] = "WARN", e[e.ERROR = 3] = "ERROR", e))(vt || {});
3637
- const bv = {
3640
+ const wv = {
3638
3641
  0: "debug",
3639
3642
  3: "error",
3640
3643
  1: "log",
3641
3644
  2: "warn"
3642
- }, wv = () => typeof globalThis > "u" ? window : globalThis, Sn = _e(
3645
+ }, yv = () => typeof globalThis > "u" ? window : globalThis, Sn = _e(
3643
3646
  () => {
3644
3647
  const e = q(
3645
3648
  3
@@ -3648,8 +3651,8 @@ const bv = {
3648
3651
  return {
3649
3652
  log: q((t, n, r = 1) => {
3650
3653
  var o;
3651
- const s = (o = wv().VIRTUOSO_LOG_LEVEL) != null ? o : Je(e);
3652
- r >= s && console[bv[r]](
3654
+ const s = (o = yv().VIRTUOSO_LOG_LEVEL) != null ? o : Je(e);
3655
+ r >= s && console[wv[r]](
3653
3656
  "%creact-virtuoso: %c%s %o",
3654
3657
  "color: #0253b3; font-weight: bold",
3655
3658
  "color: initial",
@@ -3681,10 +3684,10 @@ function Xi(e, t, n) {
3681
3684
  i && t ? (s == null || s.observe(i), r.current = i) : (r.current && (s == null || s.unobserve(r.current)), r.current = null);
3682
3685
  }, { callbackRef: o, ref: r };
3683
3686
  }
3684
- function yv(e, t, n, r, o, s, i, a, l) {
3687
+ function Sv(e, t, n, r, o, s, i, a, l) {
3685
3688
  const u = Y.useCallback(
3686
3689
  (d) => {
3687
- const h = Sv(d.children, t, a ? "offsetWidth" : "offsetHeight", o);
3690
+ const h = Cv(d.children, t, a ? "offsetWidth" : "offsetHeight", o);
3688
3691
  let m = d.parentElement;
3689
3692
  for (; !m.dataset.virtuosoScroller; )
3690
3693
  m = m.parentElement;
@@ -3704,7 +3707,7 @@ function yv(e, t, n, r, o, s, i, a, l) {
3704
3707
  );
3705
3708
  return Xi(u, n, l);
3706
3709
  }
3707
- function Sv(e, t, n, r) {
3710
+ function Cv(e, t, n, r) {
3708
3711
  const o = e.length;
3709
3712
  if (o === 0)
3710
3713
  return null;
@@ -3847,7 +3850,7 @@ function os(e, t, n) {
3847
3850
  if (He(e))
3848
3851
  return [];
3849
3852
  const r = $t(e, t)[0];
3850
- return Cv(bi(e, r, n));
3853
+ return Tv(bi(e, r, n));
3851
3854
  }
3852
3855
  function xi(e, t) {
3853
3856
  if (He(e)) return Ar;
@@ -3939,7 +3942,7 @@ function wi(e) {
3939
3942
  const { lvl: t, r: n } = e;
3940
3943
  return !He(n) && !He(n.r) && n.lvl === t && n.r.lvl === t ? nt(n, { l: nt(e, { r: n.l }), lvl: t + 1 }) : e;
3941
3944
  }
3942
- function Cv(e) {
3945
+ function Tv(e) {
3943
3946
  return nu(e, ({ k: t, v: n }) => ({ index: t, value: n }));
3944
3947
  }
3945
3948
  function au(e, t) {
@@ -3974,7 +3977,7 @@ function Mo(e, t, n, r = 0) {
3974
3977
  }
3975
3978
  throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`);
3976
3979
  }
3977
- function Tv(e, t, n, r) {
3980
+ function Rv(e, t, n, r) {
3978
3981
  const o = Mo(e, t, r), s = Mo(e, n, r, o);
3979
3982
  return e.slice(o, s + 1);
3980
3983
  }
@@ -3987,7 +3990,7 @@ function ss(e) {
3987
3990
  function Zi({ index: e }, t) {
3988
3991
  return t === e ? 0 : t < e ? -1 : 1;
3989
3992
  }
3990
- function Rv() {
3993
+ function Ev() {
3991
3994
  return {
3992
3995
  groupIndices: [],
3993
3996
  groupOffsetTree: Jn(),
@@ -3998,7 +4001,7 @@ function Rv() {
3998
4001
  sizeTree: Jn()
3999
4002
  };
4000
4003
  }
4001
- function Ev(e, t) {
4004
+ function Nv(e, t) {
4002
4005
  let n = He(e) ? 0 : 1 / 0;
4003
4006
  for (const r of t) {
4004
4007
  const { endIndex: o, size: s, startIndex: i } = r;
@@ -4007,7 +4010,7 @@ function Ev(e, t) {
4007
4010
  continue;
4008
4011
  }
4009
4012
  const a = os(e, i - 1, o + 1);
4010
- if (a.some(_v(r)))
4013
+ if (a.some(Ov(r)))
4011
4014
  continue;
4012
4015
  let l = !1, u = !1;
4013
4016
  for (const { end: d, start: h, value: m } of a)
@@ -4016,10 +4019,10 @@ function Ev(e, t) {
4016
4019
  }
4017
4020
  return [e, n];
4018
4021
  }
4019
- function Nv(e) {
4022
+ function Iv(e) {
4020
4023
  return typeof e.groupIndex < "u";
4021
4024
  }
4022
- function Iv({ offset: e }, t) {
4025
+ function jv({ offset: e }, t) {
4023
4026
  return t === e ? 0 : t < e ? -1 : 1;
4024
4027
  }
4025
4028
  function Or(e, t, n) {
@@ -4037,7 +4040,7 @@ function lu(e, t) {
4037
4040
  return e + n;
4038
4041
  }
4039
4042
  function uu(e, t, n) {
4040
- if (Nv(e))
4043
+ if (Iv(e))
4041
4044
  return t.groupIndices[e.groupIndex] + 1;
4042
4045
  {
4043
4046
  const r = e.index === "LAST" ? n : e.index;
@@ -4045,10 +4048,10 @@ function uu(e, t, n) {
4045
4048
  return o = Math.max(0, o, Math.min(n, o)), o;
4046
4049
  }
4047
4050
  }
4048
- function jv(e, t, n, r = 0) {
4049
- return r > 0 && (t = Math.max(t, cu(e, r, Zi).offset)), nu(Tv(e, t, n, Iv), Pv);
4051
+ function kv(e, t, n, r = 0) {
4052
+ return r > 0 && (t = Math.max(t, cu(e, r, Zi).offset)), nu(Rv(e, t, n, jv), _v);
4050
4053
  }
4051
- function kv(e, [t, n, r, o]) {
4054
+ function Av(e, [t, n, r, o]) {
4052
4055
  t.length > 0 && r("received item sizes", t, vt.DEBUG);
4053
4056
  const s = e.sizeTree;
4054
4057
  let i = s, a = 0;
@@ -4056,7 +4059,7 @@ function kv(e, [t, n, r, o]) {
4056
4059
  const m = t[0].size, g = t[1].size;
4057
4060
  i = n.reduce((b, v) => Tt(Tt(b, v, m), v + 1, g), i);
4058
4061
  } else
4059
- [i, a] = Ev(i, t);
4062
+ [i, a] = Nv(i, t);
4060
4063
  if (i === s)
4061
4064
  return e;
4062
4065
  const { lastIndex: l, lastOffset: u, lastSize: d, offsetTree: h } = yi(e.offsetTree, a, i, o);
@@ -4070,7 +4073,7 @@ function kv(e, [t, n, r, o]) {
4070
4073
  sizeTree: i
4071
4074
  };
4072
4075
  }
4073
- function Av(e) {
4076
+ function Pv(e) {
4074
4077
  return In(e).map(({ k: t, v: n }, r, o) => {
4075
4078
  const s = o[r + 1];
4076
4079
  return { endIndex: s ? s.k - 1 : 1 / 0, size: n, startIndex: t };
@@ -4105,20 +4108,20 @@ function yi(e, t, n, r) {
4105
4108
  offsetTree: o
4106
4109
  };
4107
4110
  }
4108
- function Pv(e) {
4111
+ function _v(e) {
4109
4112
  return { index: e.index, value: e };
4110
4113
  }
4111
- function _v(e) {
4114
+ function Ov(e) {
4112
4115
  const { endIndex: t, size: n, startIndex: r } = e;
4113
4116
  return (o) => o.start === r && (o.end === t || o.end === 1 / 0) && o.value === n;
4114
4117
  }
4115
- const Ov = {
4118
+ const Mv = {
4116
4119
  offsetHeight: "height",
4117
4120
  offsetWidth: "width"
4118
4121
  }, tn = _e(
4119
4122
  ([{ log: e }, { recalcInProgress: t }]) => {
4120
- const n = Ie(), r = Ie(), o = ut(r, 0), s = Ie(), i = Ie(), a = q(0), l = q([]), u = q(void 0), d = q(void 0), h = q((S, T) => vn(S, Ov[T])), m = q(void 0), g = q(0), b = Rv(), v = ut(
4121
- B(n, Te(l, e, g), Jt(kv, b), Ue()),
4123
+ const n = Ie(), r = Ie(), o = ut(r, 0), s = Ie(), i = Ie(), a = q(0), l = q([]), u = q(void 0), d = q(void 0), h = q((S, T) => vn(S, Mv[T])), m = q(void 0), g = q(0), b = Ev(), v = ut(
4124
+ B(n, Te(l, e, g), Jt(Av, b), Ue()),
4122
4125
  b
4123
4126
  ), p = ut(
4124
4127
  B(
@@ -4351,7 +4354,7 @@ const Ov = {
4351
4354
  We(Sn, Ji),
4352
4355
  { singleton: !0 }
4353
4356
  );
4354
- function Mv(e) {
4357
+ function Dv(e) {
4355
4358
  return e.reduce(
4356
4359
  (t, n) => (t.groupIndices.push(t.totalCount), t.totalCount += n + 1, t),
4357
4360
  {
@@ -4362,7 +4365,7 @@ function Mv(e) {
4362
4365
  }
4363
4366
  const du = _e(
4364
4367
  ([{ groupIndices: e, sizes: t, totalCount: n }, { headerHeight: r, scrollTop: o }]) => {
4365
- const s = Ie(), i = Ie(), a = Rt(B(s, oe(Mv)));
4368
+ const s = Ie(), i = Ie(), a = Rt(B(s, oe(Dv)));
4366
4369
  return de(
4367
4370
  B(
4368
4371
  a,
@@ -4402,10 +4405,10 @@ const du = _e(
4402
4405
  },
4403
4406
  We(Sn),
4404
4407
  { singleton: !0 }
4405
- ), Dv = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
4408
+ ), Lv = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
4406
4409
  function fu(e) {
4407
4410
  const t = typeof e == "number" ? { index: e } : e;
4408
- return t.align || (t.align = "start"), (!t.behavior || !Dv) && (t.behavior = "auto"), t.offset || (t.offset = 0), t;
4411
+ return t.align || (t.align = "start"), (!t.behavior || !Lv) && (t.behavior = "auto"), t.offset || (t.offset = 0), t;
4409
4412
  }
4410
4413
  const Kr = _e(
4411
4414
  ([
@@ -4453,7 +4456,7 @@ const Kr = _e(
4453
4456
  ee(F);
4454
4457
  });
4455
4458
  } else
4456
- p = Ft(B(t, Lv(150)), ee);
4459
+ p = Ft(B(t, Fv(150)), ee);
4457
4460
  return x = setTimeout(() => {
4458
4461
  y();
4459
4462
  }, 1200), Se(l, !0), L("scrolling from index to", { behavior: J, index: W, top: V }, vt.DEBUG), { behavior: J, top: V };
@@ -4470,7 +4473,7 @@ const Kr = _e(
4470
4473
  We(tn, ft, Sn),
4471
4474
  { singleton: !0 }
4472
4475
  );
4473
- function Lv(e) {
4476
+ function Fv(e) {
4474
4477
  return (t) => {
4475
4478
  const n = setTimeout(() => {
4476
4479
  t(!1);
@@ -4536,7 +4539,7 @@ const Yr = _e(
4536
4539
  function hu(e, t) {
4537
4540
  return Math.abs(e - t) < 1.01;
4538
4541
  }
4539
- const Mr = "up", Rr = "down", Fv = "none", Bv = {
4542
+ const Mr = "up", Rr = "down", Bv = "none", $v = {
4540
4543
  atBottom: !1,
4541
4544
  notAtBottomBecause: "NOT_SHOWING_LAST_ITEM",
4542
4545
  state: {
@@ -4545,8 +4548,8 @@ const Mr = "up", Rr = "down", Fv = "none", Bv = {
4545
4548
  scrollTop: 0,
4546
4549
  viewportHeight: 0
4547
4550
  }
4548
- }, $v = 0, qr = _e(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: s }]) => {
4549
- const i = q(!1), a = q(!0), l = Ie(), u = Ie(), d = q(4), h = q($v), m = ut(
4551
+ }, Hv = 0, qr = _e(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: s }]) => {
4552
+ const i = q(!1), a = q(!0), l = Ie(), u = Ie(), d = q(4), h = q(Hv), m = ut(
4550
4553
  B(
4551
4554
  vi(B(me(o), _n(1), qt(!0)), B(me(o), _n(1), qt(!1), wc(100))),
4552
4555
  Ue()
@@ -4588,7 +4591,7 @@ const Mr = "up", Rr = "down", Fv = "none", Bv = {
4588
4591
  notAtBottomBecause: L,
4589
4592
  state: j
4590
4593
  };
4591
- }, Bv),
4594
+ }, $v),
4592
4595
  Ue((w, y) => w && w.atBottom === y.atBottom)
4593
4596
  )
4594
4597
  ), v = ut(
@@ -4645,7 +4648,7 @@ const Mr = "up", Rr = "down", Fv = "none", Bv = {
4645
4648
  oe((w) => w.direction)
4646
4649
  ),
4647
4650
  p
4648
- ), de(B(r, cn(50), qt(Fv)), p);
4651
+ ), de(B(r, cn(50), qt(Bv)), p);
4649
4652
  const x = q(0);
4650
4653
  return de(
4651
4654
  B(
@@ -4739,7 +4742,7 @@ const ta = _e(
4739
4742
  We(ft),
4740
4743
  { singleton: !0 }
4741
4744
  );
4742
- function Hv(e, t, n) {
4745
+ function zv(e, t, n) {
4743
4746
  if (ss(t)) {
4744
4747
  const r = lu(e, t);
4745
4748
  return [
@@ -4876,7 +4879,7 @@ const Bn = _e(
4876
4879
  return O === 0 ? { ...Hs, totalCount: N } : pu(O, j, I, G, P, X || []);
4877
4880
  if (He(_))
4878
4881
  return O > 0 ? null : bo(
4879
- Hv(ea(j, N), M, X),
4882
+ zv(ea(j, N), M, X),
4880
4883
  [],
4881
4884
  N,
4882
4885
  P,
@@ -4895,7 +4898,7 @@ const Bn = _e(
4895
4898
  }
4896
4899
  if (!L)
4897
4900
  return bo([], W, N, P, M, G);
4898
- const V = H.length > 0 ? H[H.length - 1] + 1 : 0, ee = jv(J, T, C, V);
4901
+ const V = H.length > 0 ? H[H.length - 1] + 1 : 0, ee = kv(J, T, C, V);
4899
4902
  if (ee.length === 0)
4900
4903
  return null;
4901
4904
  const F = N - 1, Z = rs([], (ae) => {
@@ -5011,7 +5014,7 @@ const Bn = _e(
5011
5014
  },
5012
5015
  We(ft, Bn),
5013
5016
  { singleton: !0 }
5014
- ), zv = _e(
5017
+ ), Uv = _e(
5015
5018
  ([{ viewportHeight: e }, { totalListHeight: t }]) => {
5016
5019
  const n = q(!1), r = ut(
5017
5020
  B(
@@ -5029,7 +5032,7 @@ const Bn = _e(
5029
5032
  { singleton: !0 }
5030
5033
  ), gu = _e(() => ({
5031
5034
  context: q(null)
5032
- })), Uv = ({
5035
+ })), Wv = ({
5033
5036
  itemBottom: e,
5034
5037
  itemTop: t,
5035
5038
  locationParams: { align: n, behavior: r, ...o },
@@ -5048,7 +5051,7 @@ const Bn = _e(
5048
5051
  Te(t, l, n, s, o, r, a),
5049
5052
  Te(e),
5050
5053
  oe(([[h, m, g, b, v, p, x, w], y]) => {
5051
- const { align: E, behavior: S, calculateViewLocation: T = Uv, done: C, ...N } = h, I = uu(h, m, b - 1), j = Or(I, m.offsetTree, y) + v + p, L = j + $t(m.sizeTree, I)[1], H = w + p, G = w + g - x, P = T({
5054
+ const { align: E, behavior: S, calculateViewLocation: T = Wv, done: C, ...N } = h, I = uu(h, m, b - 1), j = Or(I, m.offsetTree, y) + v + p, L = j + $t(m.sizeTree, I)[1], H = w + p, G = w + g - x, P = T({
5052
5055
  itemBottom: L,
5053
5056
  itemTop: j,
5054
5057
  locationParams: { align: E, behavior: S, ...N },
@@ -5079,7 +5082,7 @@ const Bn = _e(
5079
5082
  function Ic(e) {
5080
5083
  return e ? e === "smooth" ? "smooth" : "auto" : !1;
5081
5084
  }
5082
- const Wv = (e, t) => typeof e == "function" ? Ic(e(t)) : t && Ic(e), Vv = _e(
5085
+ const Vv = (e, t) => typeof e == "function" ? Ic(e(t)) : t && Ic(e), Gv = _e(
5083
5086
  ([
5084
5087
  { listRefresh: e, totalCount: t, fixedItemSize: n, data: r },
5085
5088
  { atBottomState: o, isAtBottom: s },
@@ -5106,7 +5109,7 @@ const Wv = (e, t) => typeof e == "function" ? Ic(e(t)) : t && Ic(e), Vv = _e(
5106
5109
  Te(me(b), s, a, h),
5107
5110
  oe(([[S, T], C, N, I, j]) => {
5108
5111
  let L = T && I, H = "auto";
5109
- return L && (H = Wv(C, N || j), L = L && !!H), { followOutputBehavior: H, shouldFollow: L, totalCount: S };
5112
+ return L && (H = Vv(C, N || j), L = L && !!H), { followOutputBehavior: H, shouldFollow: L, totalCount: S };
5110
5113
  }),
5111
5114
  ve(({ shouldFollow: S }) => S)
5112
5115
  ),
@@ -5184,7 +5187,7 @@ const Wv = (e, t) => typeof e == "function" ? Ic(e(t)) : t && Ic(e), Vv = _e(
5184
5187
  gu,
5185
5188
  vu
5186
5189
  )
5187
- ), Gv = _e(
5190
+ ), Kv = _e(
5188
5191
  ([{ data: e, firstItemIndex: t, gap: n, sizes: r }, { initialTopMostItemIndex: o }, { initialItemCount: s, listState: i }, { didMount: a }]) => (de(
5189
5192
  B(
5190
5193
  a,
@@ -5197,7 +5200,7 @@ const Wv = (e, t) => typeof e == "function" ? Ic(e(t)) : t && Ic(e), Vv = _e(
5197
5200
  ), {}),
5198
5201
  We(tn, Yr, Bn, Cn),
5199
5202
  { singleton: !0 }
5200
- ), Kv = _e(
5203
+ ), Yv = _e(
5201
5204
  ([{ didMount: e }, { scrollTo: t }, { listState: n }]) => {
5202
5205
  const r = q(0);
5203
5206
  return De(
@@ -5288,7 +5291,7 @@ const Wv = (e, t) => typeof e == "function" ? Ic(e(t)) : t && Ic(e), Vv = _e(
5288
5291
  windowScrollTo: o,
5289
5292
  windowViewportRect: r
5290
5293
  };
5291
- }, We(ft)), Yv = _e(
5294
+ }, We(ft)), qv = _e(
5292
5295
  ([
5293
5296
  { sizeRanges: e, sizes: t },
5294
5297
  { headerHeight: n, scrollTop: r },
@@ -5303,10 +5306,10 @@ const Wv = (e, t) => typeof e == "function" ? Ic(e(t)) : t && Ic(e), Vv = _e(
5303
5306
  Te(t, r, i, h, m, n)
5304
5307
  ),
5305
5308
  ([g, b, v, p, x, w, y]) => {
5306
- const E = Av(b.sizeTree);
5309
+ const E = Pv(b.sizeTree);
5307
5310
  p && x !== null && w !== null && (v = x.scrollTop - w.offsetTop), v -= y, g({ ranges: E, scrollTop: v });
5308
5311
  }
5309
- ), de(B(d, ve(Yi), oe(qv)), o), de(
5312
+ ), de(B(d, ve(Yi), oe(Xv)), o), de(
5310
5313
  B(
5311
5314
  s,
5312
5315
  Te(d),
@@ -5322,10 +5325,10 @@ const Wv = (e, t) => typeof e == "function" ? Ic(e(t)) : t && Ic(e), Vv = _e(
5322
5325
  },
5323
5326
  We(tn, ft, Yr, Cn, na)
5324
5327
  );
5325
- function qv(e) {
5328
+ function Xv(e) {
5326
5329
  return { align: "start", index: 0, offset: e.scrollTop };
5327
5330
  }
5328
- const Xv = _e(([{ topItemsIndexes: e }]) => {
5331
+ const Jv = _e(([{ topItemsIndexes: e }]) => {
5329
5332
  const t = q(0);
5330
5333
  return de(
5331
5334
  B(
@@ -5340,7 +5343,7 @@ function bu(e) {
5340
5343
  let t = !1, n;
5341
5344
  return () => (t || (t = !0, n = e()), n);
5342
5345
  }
5343
- const Jv = bu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), Zv = _e(
5346
+ const Zv = bu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), Qv = _e(
5344
5347
  ([
5345
5348
  { deviation: e, scrollBy: t, scrollingInProgress: n, scrollTop: r },
5346
5349
  { isAtBottom: o, isScrolling: s, lastJumpDueToItemResize: i, scrollDirection: a },
@@ -5371,7 +5374,7 @@ const Jv = bu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5371
5374
  x > 0 ? (Se(t, { behavior: "auto", top: -x }), Se(e, 0)) : (Se(e, 0), Se(t, { behavior: "auto", top: -x }));
5372
5375
  }
5373
5376
  return De(B(v, Te(e, s)), ([x, w, y]) => {
5374
- y && Jv() ? Se(e, w - x) : p(-x);
5377
+ y && Zv() ? Se(e, w - x) : p(-x);
5375
5378
  }), De(
5376
5379
  B(
5377
5380
  tt(ut(s, !1), e, b),
@@ -5419,7 +5422,7 @@ const Jv = bu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5419
5422
  ), { deviation: e };
5420
5423
  },
5421
5424
  We(ft, qr, Bn, tn, Sn, Ji)
5422
- ), Qv = _e(
5425
+ ), ex = _e(
5423
5426
  ([
5424
5427
  e,
5425
5428
  t,
@@ -5447,12 +5450,12 @@ const Jv = bu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5447
5450
  }),
5448
5451
  We(
5449
5452
  ta,
5450
- Gv,
5453
+ Kv,
5451
5454
  Cn,
5452
5455
  xu,
5453
5456
  mu,
5454
- Kv,
5455
- zv,
5457
+ Yv,
5458
+ Uv,
5456
5459
  na,
5457
5460
  vu,
5458
5461
  Sn,
@@ -5525,17 +5528,17 @@ const Jv = bu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5525
5528
  tn,
5526
5529
  Yr,
5527
5530
  ft,
5528
- Yv,
5529
- Vv,
5531
+ qv,
5532
+ Gv,
5530
5533
  Bn,
5531
5534
  Kr,
5532
- Zv,
5533
- Xv,
5535
+ Qv,
5536
+ Jv,
5534
5537
  du,
5535
- Qv
5538
+ ex
5536
5539
  )
5537
5540
  );
5538
- function ex(e, t) {
5541
+ function tx(e, t) {
5539
5542
  const n = {}, r = {};
5540
5543
  let o = 0;
5541
5544
  const s = e.length;
@@ -5568,10 +5571,10 @@ function yu(e, t, n) {
5568
5571
  }, x), {});
5569
5572
  }
5570
5573
  function d(p) {
5571
- return i.reduce((x, w) => (x[w] = gv(p[t.events[w]]), x), {});
5574
+ return i.reduce((x, w) => (x[w] = vv(p[t.events[w]]), x), {});
5572
5575
  }
5573
5576
  const h = Y.forwardRef((p, x) => {
5574
- const { children: w, ...y } = p, [E] = Y.useState(() => rs(xv(e), (C) => {
5577
+ const { children: w, ...y } = p, [E] = Y.useState(() => rs(bv(e), (C) => {
5575
5578
  l(C, y);
5576
5579
  })), [S] = Y.useState(bc(d, E));
5577
5580
  ro(() => {
@@ -5584,7 +5587,7 @@ function yu(e, t, n) {
5584
5587
  l(E, y);
5585
5588
  }), Y.useImperativeHandle(x, xc(u(E)));
5586
5589
  const T = n;
5587
- return /* @__PURE__ */ c.jsx(a.Provider, { value: E, children: n ? /* @__PURE__ */ c.jsx(T, { ...ex([...r, ...o, ...i], y), children: w }) : w });
5590
+ return /* @__PURE__ */ c.jsx(a.Provider, { value: E, children: n ? /* @__PURE__ */ c.jsx(T, { ...tx([...r, ...o, ...i], y), children: w }) : w });
5588
5591
  }), m = (p) => {
5589
5592
  const x = Y.useContext(a);
5590
5593
  return Y.useCallback(
@@ -5626,7 +5629,7 @@ const Su = Y.createContext(void 0), Cu = Y.createContext(void 0), Tu = typeof do
5626
5629
  function zs(e) {
5627
5630
  return "self" in e;
5628
5631
  }
5629
- function tx(e) {
5632
+ function nx(e) {
5630
5633
  return "body" in e;
5631
5634
  }
5632
5635
  function Ru(e, t, n, r = ur, o, s) {
@@ -5634,7 +5637,7 @@ function Ru(e, t, n, r = ur, o, s) {
5634
5637
  (m) => {
5635
5638
  let g, b, v;
5636
5639
  const p = m.target;
5637
- if (tx(p) || zs(p)) {
5640
+ if (nx(p) || zs(p)) {
5638
5641
  const w = zs(p) ? p : p.defaultView;
5639
5642
  v = s ? w.scrollX : w.scrollY, g = s ? w.document.documentElement.scrollWidth : w.document.documentElement.scrollHeight, b = s ? w.innerWidth : w.innerHeight;
5640
5643
  } else
@@ -5689,7 +5692,7 @@ const Us = "-webkit-sticky", jc = "sticky", ra = bu(() => {
5689
5692
  function oa(e) {
5690
5693
  return e;
5691
5694
  }
5692
- const nx = /* @__PURE__ */ _e(() => {
5695
+ const rx = /* @__PURE__ */ _e(() => {
5693
5696
  const e = q((a) => `Item ${a}`), t = q((a) => `Group ${a}`), n = q({}), r = q(oa), o = q("div"), s = q(ur), i = (a, l = null) => ut(
5694
5697
  B(
5695
5698
  n,
@@ -5715,11 +5718,11 @@ const nx = /* @__PURE__ */ _e(() => {
5715
5718
  ScrollSeekPlaceholder: i("ScrollSeekPlaceholder"),
5716
5719
  TopItemListComponent: i("TopItemList")
5717
5720
  };
5718
- }), rx = /* @__PURE__ */ _e(
5721
+ }), ox = /* @__PURE__ */ _e(
5719
5722
  ([e, t]) => ({ ...e, ...t }),
5720
- We(wu, nx)
5721
- ), ox = ({ height: e }) => /* @__PURE__ */ c.jsx("div", { style: { height: e } }), sx = { overflowAnchor: "none", position: ra(), zIndex: 1 }, Eu = { overflowAnchor: "none" }, ix = { ...Eu, display: "inline-block", height: "100%" }, kc = /* @__PURE__ */ Y.memo(function({ showTopList: e = !1 }) {
5722
- const t = we("listState"), n = kt("sizeRanges"), r = we("useWindowScroll"), o = we("customScrollParent"), s = kt("windowScrollContainerState"), i = kt("scrollContainerState"), a = o || r ? s : i, l = we("itemContent"), u = we("context"), d = we("groupContent"), h = we("trackItemSizes"), m = we("itemSize"), g = we("log"), b = kt("gap"), v = we("horizontalDirection"), { callbackRef: p } = yv(
5723
+ We(wu, rx)
5724
+ ), sx = ({ height: e }) => /* @__PURE__ */ c.jsx("div", { style: { height: e } }), ix = { overflowAnchor: "none", position: ra(), zIndex: 1 }, Eu = { overflowAnchor: "none" }, ax = { ...Eu, display: "inline-block", height: "100%" }, kc = /* @__PURE__ */ Y.memo(function({ showTopList: e = !1 }) {
5725
+ const t = we("listState"), n = kt("sizeRanges"), r = we("useWindowScroll"), o = we("customScrollParent"), s = kt("windowScrollContainerState"), i = kt("scrollContainerState"), a = o || r ? s : i, l = we("itemContent"), u = we("context"), d = we("groupContent"), h = we("trackItemSizes"), m = we("itemSize"), g = we("log"), b = kt("gap"), v = we("horizontalDirection"), { callbackRef: p } = Sv(
5723
5726
  n,
5724
5727
  m,
5725
5728
  h,
@@ -5733,7 +5736,7 @@ const nx = /* @__PURE__ */ _e(() => {
5733
5736
  sa("deviation", (P) => {
5734
5737
  x !== P && w(P);
5735
5738
  });
5736
- const y = we("EmptyPlaceholder"), E = we("ScrollSeekPlaceholder") || ox, S = we("ListComponent"), T = we("ItemComponent"), C = we("GroupComponent"), N = we("computeItemKey"), I = we("isSeeking"), j = we("groupIndices").length > 0, L = we("alignToBottom"), H = we("initialItemFinalLocationReached"), G = e ? {} : {
5739
+ const y = we("EmptyPlaceholder"), E = we("ScrollSeekPlaceholder") || sx, S = we("ListComponent"), T = we("ItemComponent"), C = we("GroupComponent"), N = we("computeItemKey"), I = we("isSeeking"), j = we("groupIndices").length > 0, L = we("alignToBottom"), H = we("initialItemFinalLocationReached"), G = e ? {} : {
5737
5740
  boxSizing: "border-box",
5738
5741
  ...v ? {
5739
5742
  display: "inline-block",
@@ -5776,33 +5779,33 @@ const nx = /* @__PURE__ */ _e(() => {
5776
5779
  "data-item-index": P.index,
5777
5780
  "data-known-size": P.size,
5778
5781
  key: M,
5779
- style: sx
5782
+ style: ix
5780
5783
  },
5781
5784
  d(P.index, u)
5782
5785
  ) : /* @__PURE__ */ ho(
5783
5786
  T,
5784
5787
  {
5785
5788
  ...lt(T, u),
5786
- ...ux(T, P.data),
5789
+ ...dx(T, P.data),
5787
5790
  "data-index": X,
5788
5791
  "data-item-group-index": P.groupIndex,
5789
5792
  "data-item-index": P.index,
5790
5793
  "data-known-size": P.size,
5791
5794
  key: M,
5792
- style: v ? ix : Eu
5795
+ style: v ? ax : Eu
5793
5796
  },
5794
5797
  j ? l(P.index, P.groupIndex, P.data, u) : l(P.index, P.data, u)
5795
5798
  );
5796
5799
  })
5797
5800
  }
5798
5801
  );
5799
- }), ax = {
5802
+ }), cx = {
5800
5803
  height: "100%",
5801
5804
  outline: "none",
5802
5805
  overflowY: "auto",
5803
5806
  position: "relative",
5804
5807
  WebkitOverflowScrolling: "touch"
5805
- }, cx = {
5808
+ }, lx = {
5806
5809
  outline: "none",
5807
5810
  overflowX: "auto",
5808
5811
  position: "relative"
@@ -5812,7 +5815,7 @@ const nx = /* @__PURE__ */ _e(() => {
5812
5815
  top: 0,
5813
5816
  width: "100%",
5814
5817
  ...e ? { display: "flex", flexDirection: "column" } : {}
5815
- }), lx = {
5818
+ }), ux = {
5816
5819
  position: ra(),
5817
5820
  top: 0,
5818
5821
  width: "100%",
@@ -5822,10 +5825,10 @@ function lt(e, t) {
5822
5825
  if (typeof e != "string")
5823
5826
  return { context: t };
5824
5827
  }
5825
- function ux(e, t) {
5828
+ function dx(e, t) {
5826
5829
  return { item: typeof e == "string" ? void 0 : t };
5827
5830
  }
5828
- const dx = /* @__PURE__ */ Y.memo(function() {
5831
+ const fx = /* @__PURE__ */ Y.memo(function() {
5829
5832
  const e = we("HeaderComponent"), t = kt("headerHeight"), n = we("HeaderFooterTag"), r = Fn(
5830
5833
  Y.useMemo(
5831
5834
  () => (s) => {
@@ -5837,7 +5840,7 @@ const dx = /* @__PURE__ */ Y.memo(function() {
5837
5840
  we("skipAnimationFrameInResizeObserver")
5838
5841
  ), o = we("context");
5839
5842
  return e ? /* @__PURE__ */ c.jsx(n, { ref: r, children: /* @__PURE__ */ c.jsx(e, { ...lt(e, o) }) }) : null;
5840
- }), fx = /* @__PURE__ */ Y.memo(function() {
5843
+ }), hx = /* @__PURE__ */ Y.memo(function() {
5841
5844
  const e = we("FooterComponent"), t = kt("footerHeight"), n = we("HeaderFooterTag"), r = Fn(
5842
5845
  Y.useMemo(
5843
5846
  () => (s) => {
@@ -5866,7 +5869,7 @@ function Nu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
5866
5869
  "data-testid": "virtuoso-scroller",
5867
5870
  "data-virtuoso-scroller": !0,
5868
5871
  ref: g,
5869
- style: { ...h ? cx : ax, ...o },
5872
+ style: { ...h ? lx : cx, ...o },
5870
5873
  tabIndex: 0,
5871
5874
  ...i,
5872
5875
  ...lt(l, s),
@@ -5902,7 +5905,7 @@ function Iu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
5902
5905
  );
5903
5906
  });
5904
5907
  }
5905
- const hx = ({ children: e }) => {
5908
+ const px = ({ children: e }) => {
5906
5909
  const t = Y.useContext(Su), n = kt("viewportHeight"), r = kt("fixedItemHeight"), o = we("alignToBottom"), s = we("horizontalDirection"), i = Y.useMemo(
5907
5910
  () => Ql(n, (l) => vn(l, s ? "width" : "height")),
5908
5911
  [n, s]
@@ -5910,7 +5913,7 @@ const hx = ({ children: e }) => {
5910
5913
  return Y.useEffect(() => {
5911
5914
  t && (n(t.viewportHeight), r(t.itemHeight));
5912
5915
  }, [t, n, r]), /* @__PURE__ */ c.jsx("div", { "data-viewport-type": "element", ref: a, style: is(o), children: e });
5913
- }, px = ({ children: e }) => {
5916
+ }, mx = ({ children: e }) => {
5914
5917
  const t = Y.useContext(Su), n = kt("windowViewportRect"), r = kt("fixedItemHeight"), o = we("customScrollParent"), s = tu(
5915
5918
  n,
5916
5919
  o,
@@ -5919,26 +5922,26 @@ const hx = ({ children: e }) => {
5919
5922
  return Y.useEffect(() => {
5920
5923
  t && (r(t.itemHeight), n({ offsetTop: 0, visibleHeight: t.viewportHeight, visibleWidth: 100 }));
5921
5924
  }, [t, n, r]), /* @__PURE__ */ c.jsx("div", { "data-viewport-type": "window", ref: s, style: is(i), children: e });
5922
- }, mx = ({ children: e }) => {
5923
- const t = we("TopItemListComponent") || "div", n = we("headerHeight"), r = { ...lx, marginTop: `${n}px` }, o = we("context");
5925
+ }, gx = ({ children: e }) => {
5926
+ const t = we("TopItemListComponent") || "div", n = we("headerHeight"), r = { ...ux, marginTop: `${n}px` }, o = we("context");
5924
5927
  return /* @__PURE__ */ c.jsx(t, { style: r, ...lt(t, o), children: e });
5925
- }, gx = /* @__PURE__ */ Y.memo(function(e) {
5928
+ }, vx = /* @__PURE__ */ Y.memo(function(e) {
5926
5929
  const t = we("useWindowScroll"), n = we("topItemsIndexes").length > 0, r = we("customScrollParent"), o = we("context");
5927
- return /* @__PURE__ */ c.jsxs(r || t ? bx : xx, { ...e, context: o, children: [
5928
- n && /* @__PURE__ */ c.jsx(mx, { children: /* @__PURE__ */ c.jsx(kc, { showTopList: !0 }) }),
5929
- /* @__PURE__ */ c.jsxs(r || t ? px : hx, { children: [
5930
- /* @__PURE__ */ c.jsx(dx, {}),
5930
+ return /* @__PURE__ */ c.jsxs(r || t ? wx : bx, { ...e, context: o, children: [
5931
+ n && /* @__PURE__ */ c.jsx(gx, { children: /* @__PURE__ */ c.jsx(kc, { showTopList: !0 }) }),
5932
+ /* @__PURE__ */ c.jsxs(r || t ? mx : px, { children: [
5933
+ /* @__PURE__ */ c.jsx(fx, {}),
5931
5934
  /* @__PURE__ */ c.jsx(kc, {}),
5932
- /* @__PURE__ */ c.jsx(fx, {})
5935
+ /* @__PURE__ */ c.jsx(hx, {})
5933
5936
  ] })
5934
5937
  ] });
5935
5938
  }), {
5936
- Component: vx,
5939
+ Component: xx,
5937
5940
  useEmitter: sa,
5938
5941
  useEmitterValue: we,
5939
5942
  usePublisher: kt
5940
5943
  } = /* @__PURE__ */ yu(
5941
- rx,
5944
+ ox,
5942
5945
  {
5943
5946
  required: {},
5944
5947
  optional: {
@@ -5995,8 +5998,8 @@ const hx = ({ children: e }) => {
5995
5998
  groupIndices: "groupIndices"
5996
5999
  }
5997
6000
  },
5998
- gx
5999
- ), xx = /* @__PURE__ */ Nu({ useEmitter: sa, useEmitterValue: we, usePublisher: kt }), bx = /* @__PURE__ */ Iu({ useEmitter: sa, useEmitterValue: we, usePublisher: kt }), wx = vx, yx = /* @__PURE__ */ _e(() => {
6001
+ vx
6002
+ ), bx = /* @__PURE__ */ Nu({ useEmitter: sa, useEmitterValue: we, usePublisher: kt }), wx = /* @__PURE__ */ Iu({ useEmitter: sa, useEmitterValue: we, usePublisher: kt }), yx = xx, Sx = /* @__PURE__ */ _e(() => {
6000
6003
  const e = q((u) => /* @__PURE__ */ c.jsxs("td", { children: [
6001
6004
  "Item $",
6002
6005
  u
@@ -6032,7 +6035,7 @@ const hx = ({ children: e }) => {
6032
6035
  GroupComponent: l("Group", "tr")
6033
6036
  };
6034
6037
  });
6035
- We(wu, yx);
6038
+ We(wu, Sx);
6036
6039
  ra();
6037
6040
  const Ac = {
6038
6041
  bottom: 0,
@@ -6042,7 +6045,7 @@ const Ac = {
6042
6045
  offsetBottom: 0,
6043
6046
  offsetTop: 0,
6044
6047
  top: 0
6045
- }, Sx = {
6048
+ }, Cx = {
6046
6049
  bottom: 0,
6047
6050
  itemHeight: 0,
6048
6051
  items: [{ index: 0 }],
@@ -6054,19 +6057,19 @@ const Ac = {
6054
6057
  function Oc(e, t, n) {
6055
6058
  return Array.from({ length: t - e + 1 }).map((r, o) => ({ data: n === null ? null : n[o + e], index: o + e }));
6056
6059
  }
6057
- function Cx(e) {
6060
+ function Tx(e) {
6058
6061
  return {
6059
- ...Sx,
6062
+ ...Cx,
6060
6063
  items: e
6061
6064
  };
6062
6065
  }
6063
6066
  function oo(e, t) {
6064
6067
  return e && e.width === t.width && e.height === t.height;
6065
6068
  }
6066
- function Tx(e, t) {
6069
+ function Rx(e, t) {
6067
6070
  return e && e.column === t.column && e.row === t.row;
6068
6071
  }
6069
- const Rx = /* @__PURE__ */ _e(
6072
+ const Ex = /* @__PURE__ */ _e(
6070
6073
  ([
6071
6074
  { increaseViewportBy: e, listBoundary: t, overscan: n, visibleRange: r },
6072
6075
  { footerHeight: o, headerHeight: s, scrollBy: i, scrollContainerState: a, scrollTo: l, scrollTop: u, smoothScrollTargetReached: d, viewportHeight: h },
@@ -6143,7 +6146,7 @@ const Rx = /* @__PURE__ */ _e(
6143
6146
  tt(
6144
6147
  me(T),
6145
6148
  r,
6146
- me(X, Tx),
6149
+ me(X, Rx),
6147
6150
  me(j, oo),
6148
6151
  me(I, oo),
6149
6152
  me(P),
@@ -6171,7 +6174,7 @@ const Rx = /* @__PURE__ */ _e(
6171
6174
  return Ac;
6172
6175
  if (Ke === 0) {
6173
6176
  const Gt = ea(pe, A), rt = Gt + Math.max(je - 1, 0);
6174
- return Cx(Oc(Gt, rt, Pe));
6177
+ return Tx(Oc(Gt, rt, Pe));
6175
6178
  }
6176
6179
  const st = ju(Qe, Ke, Le);
6177
6180
  let z, Q;
@@ -6327,7 +6330,7 @@ function Si(e, t, n, r) {
6327
6330
  const o = ju(e.width, n.width, t.column), s = Fo(r / o), i = s * n.height + Er(0, s - 1) * t.row;
6328
6331
  return i > 0 ? i + t.row : i;
6329
6332
  }
6330
- const Ex = /* @__PURE__ */ _e(() => {
6333
+ const Nx = /* @__PURE__ */ _e(() => {
6331
6334
  const e = q((h) => `Item ${h}`), t = q({}), n = q(null), r = q("virtuoso-grid-item"), o = q("virtuoso-grid-list"), s = q(oa), i = q("div"), a = q(ur), l = (h, m = null) => ut(
6332
6335
  B(
6333
6336
  t,
@@ -6354,10 +6357,10 @@ const Ex = /* @__PURE__ */ _e(() => {
6354
6357
  scrollerRef: a,
6355
6358
  ScrollSeekPlaceholder: l("ScrollSeekPlaceholder", "div")
6356
6359
  };
6357
- }), Nx = /* @__PURE__ */ _e(
6360
+ }), Ix = /* @__PURE__ */ _e(
6358
6361
  ([e, t]) => ({ ...e, ...t }),
6359
- We(Rx, Ex)
6360
- ), Ix = /* @__PURE__ */ Y.memo(function() {
6362
+ We(Ex, Nx)
6363
+ ), jx = /* @__PURE__ */ Y.memo(function() {
6361
6364
  const e = Ge("gridState"), t = Ge("listClassName"), n = Ge("itemClassName"), r = Ge("itemContent"), o = Ge("computeItemKey"), s = Ge("isSeeking"), i = At("scrollHeight"), a = Ge("ItemComponent"), l = Ge("ListComponent"), u = Ge("ScrollSeekPlaceholder"), d = Ge("context"), h = At("itemDimensions"), m = At("gap"), g = Ge("log"), b = Ge("stateRestoreInProgress"), v = At("reportReadyState"), p = Fn(
6362
6365
  Y.useMemo(
6363
6366
  () => (x) => {
@@ -6412,7 +6415,7 @@ const Ex = /* @__PURE__ */ _e(() => {
6412
6415
  })
6413
6416
  }
6414
6417
  );
6415
- }), jx = Y.memo(function() {
6418
+ }), kx = Y.memo(function() {
6416
6419
  const e = Ge("HeaderComponent"), t = At("headerHeight"), n = Ge("headerFooterTag"), r = Fn(
6417
6420
  Y.useMemo(
6418
6421
  () => (s) => {
@@ -6424,7 +6427,7 @@ const Ex = /* @__PURE__ */ _e(() => {
6424
6427
  !1
6425
6428
  ), o = Ge("context");
6426
6429
  return e ? /* @__PURE__ */ c.jsx(n, { ref: r, children: /* @__PURE__ */ c.jsx(e, { ...lt(e, o) }) }) : null;
6427
- }), kx = Y.memo(function() {
6430
+ }), Ax = Y.memo(function() {
6428
6431
  const e = Ge("FooterComponent"), t = At("footerHeight"), n = Ge("headerFooterTag"), r = Fn(
6429
6432
  Y.useMemo(
6430
6433
  () => (s) => {
@@ -6436,7 +6439,7 @@ const Ex = /* @__PURE__ */ _e(() => {
6436
6439
  !1
6437
6440
  ), o = Ge("context");
6438
6441
  return e ? /* @__PURE__ */ c.jsx(n, { ref: r, children: /* @__PURE__ */ c.jsx(e, { ...lt(e, o) }) }) : null;
6439
- }), Ax = ({ children: e }) => {
6442
+ }), Px = ({ children: e }) => {
6440
6443
  const t = Y.useContext(Cu), n = At("itemDimensions"), r = At("viewportDimensions"), o = Fn(
6441
6444
  Y.useMemo(
6442
6445
  () => (s) => {
@@ -6450,24 +6453,24 @@ const Ex = /* @__PURE__ */ _e(() => {
6450
6453
  return Y.useEffect(() => {
6451
6454
  t && (r({ height: t.viewportHeight, width: t.viewportWidth }), n({ height: t.itemHeight, width: t.itemWidth }));
6452
6455
  }, [t, r, n]), /* @__PURE__ */ c.jsx("div", { ref: o, style: is(!1), children: e });
6453
- }, Px = ({ children: e }) => {
6456
+ }, _x = ({ children: e }) => {
6454
6457
  const t = Y.useContext(Cu), n = At("windowViewportRect"), r = At("itemDimensions"), o = Ge("customScrollParent"), s = tu(n, o, !1);
6455
6458
  return Y.useEffect(() => {
6456
6459
  t && (r({ height: t.itemHeight, width: t.itemWidth }), n({ offsetTop: 0, visibleHeight: t.viewportHeight, visibleWidth: t.viewportWidth }));
6457
6460
  }, [t, n, r]), /* @__PURE__ */ c.jsx("div", { ref: s, style: is(!1), children: e });
6458
- }, _x = /* @__PURE__ */ Y.memo(function({ ...e }) {
6459
- const t = Ge("useWindowScroll"), n = Ge("customScrollParent"), r = n || t ? Mx : Ox, o = n || t ? Px : Ax, s = Ge("context");
6461
+ }, Ox = /* @__PURE__ */ Y.memo(function({ ...e }) {
6462
+ const t = Ge("useWindowScroll"), n = Ge("customScrollParent"), r = n || t ? Dx : Mx, o = n || t ? _x : Px, s = Ge("context");
6460
6463
  return /* @__PURE__ */ c.jsx(r, { ...e, ...lt(r, s), children: /* @__PURE__ */ c.jsxs(o, { children: [
6464
+ /* @__PURE__ */ c.jsx(kx, {}),
6461
6465
  /* @__PURE__ */ c.jsx(jx, {}),
6462
- /* @__PURE__ */ c.jsx(Ix, {}),
6463
- /* @__PURE__ */ c.jsx(kx, {})
6466
+ /* @__PURE__ */ c.jsx(Ax, {})
6464
6467
  ] }) });
6465
6468
  }), {
6466
6469
  useEmitter: ku,
6467
6470
  useEmitterValue: Ge,
6468
6471
  usePublisher: At
6469
6472
  } = /* @__PURE__ */ yu(
6470
- Nx,
6473
+ Ix,
6471
6474
  {
6472
6475
  optional: {
6473
6476
  context: "context",
@@ -6506,12 +6509,12 @@ const Ex = /* @__PURE__ */ _e(() => {
6506
6509
  readyStateChanged: "readyStateChanged"
6507
6510
  }
6508
6511
  },
6509
- _x
6510
- ), Ox = /* @__PURE__ */ Nu({ useEmitter: ku, useEmitterValue: Ge, usePublisher: At }), Mx = /* @__PURE__ */ Iu({ useEmitter: ku, useEmitterValue: Ge, usePublisher: At });
6512
+ Ox
6513
+ ), Mx = /* @__PURE__ */ Nu({ useEmitter: ku, useEmitterValue: Ge, usePublisher: At }), Dx = /* @__PURE__ */ Iu({ useEmitter: ku, useEmitterValue: Ge, usePublisher: At });
6511
6514
  function Dc(e, t, n) {
6512
6515
  return t !== "normal" && !(t != null && t.endsWith("px")) && n(`${e} was not resolved to pixel value correctly`, t, vt.WARN), t === "normal" ? 0 : parseInt(t ?? "0", 10);
6513
6516
  }
6514
- const Dx = zr(
6517
+ const Lx = zr(
6515
6518
  "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
6516
6519
  {
6517
6520
  variants: {
@@ -6528,7 +6531,7 @@ const Dx = zr(
6528
6531
  }
6529
6532
  );
6530
6533
  function Au({ className: e, variant: t, ...n }) {
6531
- return /* @__PURE__ */ c.jsx("div", { className: D(Dx({ variant: t }), e), ...n });
6534
+ return /* @__PURE__ */ c.jsx("div", { className: D(Lx({ variant: t }), e), ...n });
6532
6535
  }
6533
6536
  function ne(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
6534
6537
  return function(o) {
@@ -6536,7 +6539,7 @@ function ne(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
6536
6539
  return t == null ? void 0 : t(o);
6537
6540
  };
6538
6541
  }
6539
- function Lx(e, t) {
6542
+ function Fx(e, t) {
6540
6543
  const n = f.createContext(t), r = (s) => {
6541
6544
  const { children: i, ...a } = s, l = f.useMemo(() => a, Object.values(a));
6542
6545
  return /* @__PURE__ */ c.jsx(n.Provider, { value: l, children: i });
@@ -6580,9 +6583,9 @@ function Wt(e, t = []) {
6580
6583
  );
6581
6584
  };
6582
6585
  };
6583
- return o.scopeName = e, [r, Fx(o, ...t)];
6586
+ return o.scopeName = e, [r, Bx(o, ...t)];
6584
6587
  }
6585
- function Fx(...e) {
6588
+ function Bx(...e) {
6586
6589
  const t = e[0];
6587
6590
  if (e.length === 1) return t;
6588
6591
  const n = () => {
@@ -6601,7 +6604,7 @@ function Fx(...e) {
6601
6604
  return n.scopeName = t.scopeName, n;
6602
6605
  }
6603
6606
  var ot = globalThis != null && globalThis.document ? f.useLayoutEffect : () => {
6604
- }, Bx = f[" useInsertionEffect ".trim().toString()] || ot;
6607
+ }, $x = f[" useInsertionEffect ".trim().toString()] || ot;
6605
6608
  function xn({
6606
6609
  prop: e,
6607
6610
  defaultProp: t,
@@ -6609,7 +6612,7 @@ function xn({
6609
6612
  },
6610
6613
  caller: r
6611
6614
  }) {
6612
- const [o, s, i] = $x({
6615
+ const [o, s, i] = Hx({
6613
6616
  defaultProp: t,
6614
6617
  onChange: n
6615
6618
  }), a = e !== void 0, l = a ? e : o;
@@ -6626,7 +6629,7 @@ function xn({
6626
6629
  (d) => {
6627
6630
  var h;
6628
6631
  if (a) {
6629
- const m = Hx(d) ? d(e) : d;
6632
+ const m = zx(d) ? d(e) : d;
6630
6633
  m !== e && ((h = i.current) == null || h.call(i, m));
6631
6634
  } else
6632
6635
  s(d);
@@ -6635,19 +6638,19 @@ function xn({
6635
6638
  );
6636
6639
  return [l, u];
6637
6640
  }
6638
- function $x({
6641
+ function Hx({
6639
6642
  defaultProp: e,
6640
6643
  onChange: t
6641
6644
  }) {
6642
6645
  const [n, r] = f.useState(e), o = f.useRef(n), s = f.useRef(t);
6643
- return Bx(() => {
6646
+ return $x(() => {
6644
6647
  s.current = t;
6645
6648
  }, [t]), f.useEffect(() => {
6646
6649
  var i;
6647
6650
  o.current !== n && ((i = s.current) == null || i.call(s, n), o.current = n);
6648
6651
  }, [n, o]), [n, r, s];
6649
6652
  }
6650
- function Hx(e) {
6653
+ function zx(e) {
6651
6654
  return typeof e == "function";
6652
6655
  }
6653
6656
  function Lc(e, t) {
@@ -6674,7 +6677,7 @@ function ia(...e) {
6674
6677
  function Re(...e) {
6675
6678
  return f.useCallback(ia(...e), e);
6676
6679
  }
6677
- var zx = [
6680
+ var Ux = [
6678
6681
  "a",
6679
6682
  "button",
6680
6683
  "div",
@@ -6692,7 +6695,7 @@ var zx = [
6692
6695
  "span",
6693
6696
  "svg",
6694
6697
  "ul"
6695
- ], xe = zx.reduce((e, t) => {
6698
+ ], xe = Ux.reduce((e, t) => {
6696
6699
  const n = tr(`Primitive.${t}`), r = f.forwardRef((o, s) => {
6697
6700
  const { asChild: i, ...a } = o, l = i ? n : t;
6698
6701
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ c.jsx(l, { ...a, ref: s });
@@ -6702,16 +6705,16 @@ var zx = [
6702
6705
  function Pu(e, t) {
6703
6706
  e && Xo.flushSync(() => e.dispatchEvent(t));
6704
6707
  }
6705
- function Ux(e, t) {
6708
+ function Wx(e, t) {
6706
6709
  return f.useReducer((n, r) => t[n][r] ?? n, e);
6707
6710
  }
6708
6711
  var xt = (e) => {
6709
- const { present: t, children: n } = e, r = Wx(t), o = typeof n == "function" ? n({ present: r.isPresent }) : f.Children.only(n), s = Re(r.ref, Vx(o));
6712
+ const { present: t, children: n } = e, r = Vx(t), o = typeof n == "function" ? n({ present: r.isPresent }) : f.Children.only(n), s = Re(r.ref, Gx(o));
6710
6713
  return typeof n == "function" || r.isPresent ? f.cloneElement(o, { ref: s }) : null;
6711
6714
  };
6712
6715
  xt.displayName = "Presence";
6713
- function Wx(e) {
6714
- const [t, n] = f.useState(), r = f.useRef(null), o = f.useRef(e), s = f.useRef("none"), i = e ? "mounted" : "unmounted", [a, l] = Ux(i, {
6716
+ function Vx(e) {
6717
+ const [t, n] = f.useState(), r = f.useRef(null), o = f.useRef(e), s = f.useRef("none"), i = e ? "mounted" : "unmounted", [a, l] = Wx(i, {
6715
6718
  mounted: {
6716
6719
  UNMOUNT: "unmounted",
6717
6720
  ANIMATION_OUT: "unmountSuspended"
@@ -6762,20 +6765,20 @@ function Wx(e) {
6762
6765
  function so(e) {
6763
6766
  return (e == null ? void 0 : e.animationName) || "none";
6764
6767
  }
6765
- function Vx(e) {
6768
+ function Gx(e) {
6766
6769
  var r, o;
6767
6770
  let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
6768
6771
  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);
6769
6772
  }
6770
- var Gx = f[" useId ".trim().toString()] || (() => {
6771
- }), Kx = 0;
6773
+ var Kx = f[" useId ".trim().toString()] || (() => {
6774
+ }), Yx = 0;
6772
6775
  function Bt(e) {
6773
- const [t, n] = f.useState(Gx());
6776
+ const [t, n] = f.useState(Kx());
6774
6777
  return ot(() => {
6775
- n((r) => r ?? String(Kx++));
6778
+ n((r) => r ?? String(Yx++));
6776
6779
  }, [e]), e || (t ? `radix-${t}` : "");
6777
6780
  }
6778
- var as = "Collapsible", [Yx, lR] = Wt(as), [qx, aa] = Yx(as), _u = f.forwardRef(
6781
+ var as = "Collapsible", [qx, uR] = Wt(as), [Xx, aa] = qx(as), _u = f.forwardRef(
6779
6782
  (e, t) => {
6780
6783
  const {
6781
6784
  __scopeCollapsible: n,
@@ -6791,7 +6794,7 @@ var as = "Collapsible", [Yx, lR] = Wt(as), [qx, aa] = Yx(as), _u = f.forwardRef(
6791
6794
  caller: as
6792
6795
  });
6793
6796
  return /* @__PURE__ */ c.jsx(
6794
- qx,
6797
+ Xx,
6795
6798
  {
6796
6799
  scope: n,
6797
6800
  disabled: s,
@@ -6832,14 +6835,14 @@ var Ou = "CollapsibleTrigger", Mu = f.forwardRef(
6832
6835
  }
6833
6836
  );
6834
6837
  Mu.displayName = Ou;
6835
- var ca = "CollapsibleContent", Xx = f.forwardRef(
6838
+ var ca = "CollapsibleContent", Jx = f.forwardRef(
6836
6839
  (e, t) => {
6837
6840
  const { forceMount: n, ...r } = e, o = aa(ca, e.__scopeCollapsible);
6838
- return /* @__PURE__ */ c.jsx(xt, { present: n || o.open, children: ({ present: s }) => /* @__PURE__ */ c.jsx(Jx, { ...r, ref: t, present: s }) });
6841
+ return /* @__PURE__ */ c.jsx(xt, { present: n || o.open, children: ({ present: s }) => /* @__PURE__ */ c.jsx(Zx, { ...r, ref: t, present: s }) });
6839
6842
  }
6840
6843
  );
6841
- Xx.displayName = ca;
6842
- var Jx = f.forwardRef((e, t) => {
6844
+ Jx.displayName = ca;
6845
+ var Zx = f.forwardRef((e, t) => {
6843
6846
  const { __scopeCollapsible: n, present: r, children: o, ...s } = e, i = aa(ca, n), [a, l] = f.useState(r), u = f.useRef(null), d = Re(t, u), h = f.useRef(0), m = h.current, g = f.useRef(0), b = g.current, v = i.open || a, p = f.useRef(v), x = f.useRef(void 0);
6844
6847
  return f.useEffect(() => {
6845
6848
  const w = requestAnimationFrame(() => p.current = !1);
@@ -6875,8 +6878,8 @@ var Jx = f.forwardRef((e, t) => {
6875
6878
  function la(e) {
6876
6879
  return e ? "open" : "closed";
6877
6880
  }
6878
- var Zx = _u;
6879
- const Fc = Zx, Bc = Mu, Du = new URL("data:video/mp2t;base64,Ly8vIDxyZWZlcmVuY2UgbGliPSJ3ZWJ3b3JrZXIiIC8+CmltcG9ydCBtYXJrZWQgZnJvbSAnbWFya2VkJzsKCmRlY2xhcmUgY29uc3Qgc2VsZjogRGVkaWNhdGVkV29ya2VyR2xvYmFsU2NvcGU7CmNvbnN0IHNjb3BlOiBEZWRpY2F0ZWRXb3JrZXJHbG9iYWxTY29wZSA9IHNlbGY7CgpzY29wZS5wb3N0TWVzc2FnZT8uKHsgd29ya2VyX3JlYWR5OiB0cnVlIH0pOwoKc2NvcGUuYWRkRXZlbnRMaXN0ZW5lcignbWVzc2FnZScsIChldmVudDogTWVzc2FnZUV2ZW50KSA9PiB7CiAgY29uc3QgcGF5bG9hZDogYW55ID0gZXZlbnQ/LmRhdGEgPz8ge307CiAgY29uc3QgaWQgPSB0eXBlb2YgcGF5bG9hZC5pZCA9PT0gJ3N0cmluZycgPyBwYXlsb2FkLmlkIDogdW5kZWZpbmVkOwogIGNvbnN0IGtleSA9IHR5cGVvZiBwYXlsb2FkLmtleSA9PT0gJ3N0cmluZycgPyBwYXlsb2FkLmtleSA6IHVuZGVmaW5lZDsKICBjb25zdCBzb3VyY2UgPSB0eXBlb2YgcGF5bG9hZC5zb3VyY2UgPT09ICdzdHJpbmcnID8gcGF5bG9hZC5zb3VyY2UgOiB1bmRlZmluZWQ7CiAgaWYgKCFpZCB8fCB0eXBlb2Ygc291cmNlICE9PSAnc3RyaW5nJykgcmV0dXJuOwoKICB0cnkgewogICAgY29uc3QgaHRtbCA9IG1hcmtlZC5wYXJzZShzb3VyY2UpOwogICAgc2NvcGUucG9zdE1lc3NhZ2UoeyBpZCwga2V5LCBodG1sIH0pOwogIH0gY2F0Y2ggKGVycikgewogICAgc2NvcGUucG9zdE1lc3NhZ2UoeyBpZCwga2V5LCBodG1sOiBgPHByZT5FcnJvciByZW5kZXJpbmcgbWFya2Rvd246ICR7U3RyaW5nKGVycil9PC9wcmU+YCB9KTsKICB9Cn0pOwo=", import.meta.url), Nr = Du.toString(), Qx = (() => {
6881
+ var Qx = _u;
6882
+ const Fc = Qx, Bc = Mu, Du = new URL("data:video/mp2t;base64,Ly8vIDxyZWZlcmVuY2UgbGliPSJ3ZWJ3b3JrZXIiIC8+CmltcG9ydCBtYXJrZWQgZnJvbSAnbWFya2VkJzsKCmRlY2xhcmUgY29uc3Qgc2VsZjogRGVkaWNhdGVkV29ya2VyR2xvYmFsU2NvcGU7CmNvbnN0IHNjb3BlOiBEZWRpY2F0ZWRXb3JrZXJHbG9iYWxTY29wZSA9IHNlbGY7CgpzY29wZS5wb3N0TWVzc2FnZT8uKHsgd29ya2VyX3JlYWR5OiB0cnVlIH0pOwoKc2NvcGUuYWRkRXZlbnRMaXN0ZW5lcignbWVzc2FnZScsIChldmVudDogTWVzc2FnZUV2ZW50KSA9PiB7CiAgY29uc3QgcGF5bG9hZDogYW55ID0gZXZlbnQ/LmRhdGEgPz8ge307CiAgY29uc3QgaWQgPSB0eXBlb2YgcGF5bG9hZC5pZCA9PT0gJ3N0cmluZycgPyBwYXlsb2FkLmlkIDogdW5kZWZpbmVkOwogIGNvbnN0IGtleSA9IHR5cGVvZiBwYXlsb2FkLmtleSA9PT0gJ3N0cmluZycgPyBwYXlsb2FkLmtleSA6IHVuZGVmaW5lZDsKICBjb25zdCBzb3VyY2UgPSB0eXBlb2YgcGF5bG9hZC5zb3VyY2UgPT09ICdzdHJpbmcnID8gcGF5bG9hZC5zb3VyY2UgOiB1bmRlZmluZWQ7CiAgaWYgKCFpZCB8fCB0eXBlb2Ygc291cmNlICE9PSAnc3RyaW5nJykgcmV0dXJuOwoKICB0cnkgewogICAgY29uc3QgaHRtbCA9IG1hcmtlZC5wYXJzZShzb3VyY2UpOwogICAgc2NvcGUucG9zdE1lc3NhZ2UoeyBpZCwga2V5LCBodG1sIH0pOwogIH0gY2F0Y2ggKGVycikgewogICAgc2NvcGUucG9zdE1lc3NhZ2UoeyBpZCwga2V5LCBodG1sOiBgPHByZT5FcnJvciByZW5kZXJpbmcgbWFya2Rvd246ICR7U3RyaW5nKGVycil9PC9wcmU+YCB9KTsKICB9Cn0pOwo=", import.meta.url), Nr = Du.toString(), eb = (() => {
6880
6883
  try {
6881
6884
  if (typeof Worker > "u" || typeof URL > "u" || typeof Blob > "u")
6882
6885
  return !1;
@@ -6885,11 +6888,11 @@ const Fc = Zx, Bc = Mu, Du = new URL("data:video/mp2t;base64,Ly8vIDxyZWZlcmVuY2U
6885
6888
  } catch {
6886
6889
  return !1;
6887
6890
  }
6888
- })(), eb = Nr.includes("data:"), tb = (() => {
6891
+ })(), tb = Nr.includes("data:"), nb = (() => {
6889
6892
  if (typeof navigator > "u") return !1;
6890
6893
  const e = navigator.userAgent.toLowerCase();
6891
6894
  return e.includes("safari") && !e.includes("chrome") && !e.includes("android");
6892
- })(), cs = Qx && !(eb && tb), ua = (e) => typeof e == "object" && e !== null, Vs = (e) => typeof e == "function" ? e : ua(e) && typeof e.parse == "function" ? e.parse : null;
6895
+ })(), cs = eb && !(tb && nb), ua = (e) => typeof e == "object" && e !== null, Vs = (e) => typeof e == "function" ? e : ua(e) && typeof e.parse == "function" ? e.parse : null;
6893
6896
  let io = null;
6894
6897
  async function $c(e) {
6895
6898
  try {
@@ -6900,7 +6903,7 @@ async function $c(e) {
6900
6903
  throw io = null, t;
6901
6904
  }
6902
6905
  }
6903
- const nb = (e) => ua(e) && typeof e.highlightElement == "function" ? { highlightElement: e.highlightElement } : null;
6906
+ const rb = (e) => ua(e) && typeof e.highlightElement == "function" ? { highlightElement: e.highlightElement } : null;
6904
6907
  console.log("[MarkdownContent] worker url", Nr);
6905
6908
  const Ir = [];
6906
6909
  let wo = !1;
@@ -6943,7 +6946,7 @@ function Ci(e) {
6943
6946
  console.warn("[MarkdownContent] markWorkerOnline notify failed", t);
6944
6947
  }
6945
6948
  }
6946
- function rb(e) {
6949
+ function ob(e) {
6947
6950
  if (!cs)
6948
6951
  return null;
6949
6952
  const t = e.indexOf("data:");
@@ -6964,7 +6967,7 @@ function rb(e) {
6964
6967
  return console.warn("[MarkdownContent] failed to decode embedded data URI", o), null;
6965
6968
  }
6966
6969
  }
6967
- async function ob(e) {
6970
+ async function sb(e) {
6968
6971
  if (cs)
6969
6972
  try {
6970
6973
  let t = "";
@@ -6990,9 +6993,9 @@ async function ob(e) {
6990
6993
  console.error("[MarkdownContent] fetch worker failed", t);
6991
6994
  }
6992
6995
  }
6993
- function sb() {
6996
+ function ib() {
6994
6997
  if (Nr.includes("data:")) {
6995
- const e = rb(Nr);
6998
+ const e = ob(Nr);
6996
6999
  if (e) {
6997
7000
  Ci(e);
6998
7001
  return;
@@ -7004,12 +7007,12 @@ function sb() {
7004
7007
  const e = new Worker(Du, { type: "module" });
7005
7008
  Ci(e);
7006
7009
  } catch (e) {
7007
- console.warn("[MarkdownContent] worker constructor failed, will try fetch+blob fallback", e), ob(Nr);
7010
+ console.warn("[MarkdownContent] worker constructor failed, will try fetch+blob fallback", e), sb(Nr);
7008
7011
  }
7009
7012
  }
7010
- cs ? sb() : console.warn("[MarkdownContent] module workers not supported; falling back to main-thread markdown parsing");
7013
+ cs ? ib() : console.warn("[MarkdownContent] module workers not supported; falling back to main-thread markdown parsing");
7011
7014
  const yr = /* @__PURE__ */ new Map();
7012
- function ib(e, t = !1) {
7015
+ function ab(e, t = !1) {
7013
7016
  if (t) {
7014
7017
  const o = e.slice(0, 128);
7015
7018
  return `streaming:${Math.floor(e.length / 50) * 50}:${o}`;
@@ -7017,7 +7020,7 @@ function ib(e, t = !1) {
7017
7020
  const n = e.slice(0, 64), r = e.length > 64 ? e.slice(-64) : "";
7018
7021
  return `${e.length}:${n}:${r}`;
7019
7022
  }
7020
- function ab(e, t) {
7023
+ function cb(e, t) {
7021
7024
  const [n, r] = fe(e), o = ze(e), s = ze(null);
7022
7025
  return Ye(() => {
7023
7026
  if (!t) {
@@ -7041,7 +7044,7 @@ function Gs({
7041
7044
  // Hosts can still override this via the prop path from ChatInterface -> MessageList -> MessageComponent.
7042
7045
  streamingThrottleMs: s = 100
7043
7046
  }) {
7044
- const i = ab(e, r), a = ib(i, r), [l, u] = fe(() => {
7047
+ const i = cb(e, r), a = ab(i, r), [l, u] = fe(() => {
7045
7048
  var g;
7046
7049
  return ((g = yr.get(a)) == null ? void 0 : g.html) ?? null;
7047
7050
  }), d = ze(null), h = ze([]);
@@ -7139,7 +7142,7 @@ function Gs({
7139
7142
  if (!v)
7140
7143
  import("./index-BixObhJB.js").then((C) => {
7141
7144
  if (p) return;
7142
- const N = nb(C.default ?? C);
7145
+ const N = rb(C.default ?? C);
7143
7146
  if (N) {
7144
7147
  v = N;
7145
7148
  try {
@@ -7180,7 +7183,7 @@ async function Fu(e, t) {
7180
7183
  async function zc(e, t) {
7181
7184
  return await (await Fu(`/chat/files/${e}/view`, t)).text();
7182
7185
  }
7183
- async function cb(e, t) {
7186
+ async function lb(e, t) {
7184
7187
  const n = await Fu(`/chat/files/${e}/download`, t), r = URL.createObjectURL(n);
7185
7188
  let o = `file_${e}`;
7186
7189
  try {
@@ -7191,9 +7194,9 @@ async function cb(e, t) {
7191
7194
  const s = document.createElement("a");
7192
7195
  s.href = r, s.download = o, document.body.appendChild(s), s.click(), s.remove(), setTimeout(() => URL.revokeObjectURL(r), 6e4);
7193
7196
  }
7194
- const lb = 1, ub = 1e6;
7197
+ const ub = 1, db = 1e6;
7195
7198
  let Ks = 0;
7196
- function db() {
7199
+ function fb() {
7197
7200
  return Ks = (Ks + 1) % Number.MAX_SAFE_INTEGER, Ks.toString();
7198
7201
  }
7199
7202
  const Ys = /* @__PURE__ */ new Map(), Uc = (e) => {
@@ -7204,14 +7207,14 @@ const Ys = /* @__PURE__ */ new Map(), Uc = (e) => {
7204
7207
  type: "REMOVE_TOAST",
7205
7208
  toastId: e
7206
7209
  });
7207
- }, ub);
7210
+ }, db);
7208
7211
  Ys.set(e, t);
7209
- }, fb = (e, t) => {
7212
+ }, hb = (e, t) => {
7210
7213
  switch (t.type) {
7211
7214
  case "ADD_TOAST":
7212
7215
  return {
7213
7216
  ...e,
7214
- toasts: [t.toast, ...e.toasts].slice(0, lb)
7217
+ toasts: [t.toast, ...e.toasts].slice(0, ub)
7215
7218
  };
7216
7219
  case "UPDATE_TOAST":
7217
7220
  return {
@@ -7246,12 +7249,12 @@ const Ys = /* @__PURE__ */ new Map(), Uc = (e) => {
7246
7249
  }, yo = [];
7247
7250
  let So = { toasts: [] };
7248
7251
  function jr(e) {
7249
- So = fb(So, e), yo.forEach((t) => {
7252
+ So = hb(So, e), yo.forEach((t) => {
7250
7253
  t(So);
7251
7254
  });
7252
7255
  }
7253
- function hb({ ...e }) {
7254
- const t = db(), n = (o) => jr({
7256
+ function pb({ ...e }) {
7257
+ const t = fb(), n = (o) => jr({
7255
7258
  type: "UPDATE_TOAST",
7256
7259
  toast: { ...o, id: t }
7257
7260
  }), r = () => jr({ type: "DISMISS_TOAST", toastId: t });
@@ -7278,7 +7281,7 @@ function da() {
7278
7281
  n > -1 && yo.splice(n, 1);
7279
7282
  }), [e]), {
7280
7283
  ...e,
7281
- toast: hb,
7284
+ toast: pb,
7282
7285
  dismiss: (n) => jr({ type: "DISMISS_TOAST", toastId: n })
7283
7286
  };
7284
7287
  }
@@ -7291,7 +7294,7 @@ function at(e) {
7291
7294
  return (r = t.current) == null ? void 0 : r.call(t, ...n);
7292
7295
  }, []);
7293
7296
  }
7294
- function pb(e, t = globalThis == null ? void 0 : globalThis.document) {
7297
+ function mb(e, t = globalThis == null ? void 0 : globalThis.document) {
7295
7298
  const n = at(e);
7296
7299
  f.useEffect(() => {
7297
7300
  const r = (o) => {
@@ -7300,7 +7303,7 @@ function pb(e, t = globalThis == null ? void 0 : globalThis.document) {
7300
7303
  return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
7301
7304
  }, [n, t]);
7302
7305
  }
7303
- var mb = "DismissableLayer", Ti = "dismissableLayer.update", gb = "dismissableLayer.pointerDownOutside", vb = "dismissableLayer.focusOutside", Wc, Bu = f.createContext({
7306
+ var gb = "DismissableLayer", Ti = "dismissableLayer.update", vb = "dismissableLayer.pointerDownOutside", xb = "dismissableLayer.focusOutside", Wc, Bu = f.createContext({
7304
7307
  layers: /* @__PURE__ */ new Set(),
7305
7308
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
7306
7309
  branches: /* @__PURE__ */ new Set()
@@ -7314,14 +7317,14 @@ var mb = "DismissableLayer", Ti = "dismissableLayer.update", gb = "dismissableLa
7314
7317
  onInteractOutside: i,
7315
7318
  onDismiss: a,
7316
7319
  ...l
7317
- } = e, u = f.useContext(Bu), [d, h] = f.useState(null), m = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, g] = f.useState({}), b = Re(t, (C) => h(C)), v = Array.from(u.layers), [p] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), x = v.indexOf(p), w = d ? v.indexOf(d) : -1, y = u.layersWithOutsidePointerEventsDisabled.size > 0, E = w >= x, S = wb((C) => {
7320
+ } = e, u = f.useContext(Bu), [d, h] = f.useState(null), m = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, g] = f.useState({}), b = Re(t, (C) => h(C)), v = Array.from(u.layers), [p] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), x = v.indexOf(p), w = d ? v.indexOf(d) : -1, y = u.layersWithOutsidePointerEventsDisabled.size > 0, E = w >= x, S = yb((C) => {
7318
7321
  const N = C.target, I = [...u.branches].some((j) => j.contains(N));
7319
7322
  !E || I || (o == null || o(C), i == null || i(C), C.defaultPrevented || a == null || a());
7320
- }, m), T = yb((C) => {
7323
+ }, m), T = Sb((C) => {
7321
7324
  const N = C.target;
7322
7325
  [...u.branches].some((j) => j.contains(N)) || (s == null || s(C), i == null || i(C), C.defaultPrevented || a == null || a());
7323
7326
  }, m);
7324
- return pb((C) => {
7327
+ return mb((C) => {
7325
7328
  w === u.layers.size - 1 && (r == null || r(C), !C.defaultPrevented && a && (C.preventDefault(), a()));
7326
7329
  }, m), f.useEffect(() => {
7327
7330
  if (d)
@@ -7352,8 +7355,8 @@ var mb = "DismissableLayer", Ti = "dismissableLayer.update", gb = "dismissableLa
7352
7355
  );
7353
7356
  }
7354
7357
  );
7355
- Xr.displayName = mb;
7356
- var xb = "DismissableLayerBranch", bb = f.forwardRef((e, t) => {
7358
+ Xr.displayName = gb;
7359
+ var bb = "DismissableLayerBranch", wb = f.forwardRef((e, t) => {
7357
7360
  const n = f.useContext(Bu), r = f.useRef(null), o = Re(t, r);
7358
7361
  return f.useEffect(() => {
7359
7362
  const s = r.current;
@@ -7363,8 +7366,8 @@ var xb = "DismissableLayerBranch", bb = f.forwardRef((e, t) => {
7363
7366
  };
7364
7367
  }, [n.branches]), /* @__PURE__ */ c.jsx(xe.div, { ...e, ref: o });
7365
7368
  });
7366
- bb.displayName = xb;
7367
- function wb(e, t = globalThis == null ? void 0 : globalThis.document) {
7369
+ wb.displayName = bb;
7370
+ function yb(e, t = globalThis == null ? void 0 : globalThis.document) {
7368
7371
  const n = at(e), r = f.useRef(!1), o = f.useRef(() => {
7369
7372
  });
7370
7373
  return f.useEffect(() => {
@@ -7372,7 +7375,7 @@ function wb(e, t = globalThis == null ? void 0 : globalThis.document) {
7372
7375
  if (a.target && !r.current) {
7373
7376
  let l = function() {
7374
7377
  $u(
7375
- gb,
7378
+ vb,
7376
7379
  n,
7377
7380
  u,
7378
7381
  { discrete: !0 }
@@ -7394,11 +7397,11 @@ function wb(e, t = globalThis == null ? void 0 : globalThis.document) {
7394
7397
  onPointerDownCapture: () => r.current = !0
7395
7398
  };
7396
7399
  }
7397
- function yb(e, t = globalThis == null ? void 0 : globalThis.document) {
7400
+ function Sb(e, t = globalThis == null ? void 0 : globalThis.document) {
7398
7401
  const n = at(e), r = f.useRef(!1);
7399
7402
  return f.useEffect(() => {
7400
7403
  const o = (s) => {
7401
- s.target && !r.current && $u(vb, n, { originalEvent: s }, {
7404
+ s.target && !r.current && $u(xb, n, { originalEvent: s }, {
7402
7405
  discrete: !1
7403
7406
  });
7404
7407
  };
@@ -7416,7 +7419,7 @@ function $u(e, t, n, { discrete: r }) {
7416
7419
  const o = n.originalEvent.target, s = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
7417
7420
  t && o.addEventListener(e, t, { once: !0 }), r ? Pu(o, s) : o.dispatchEvent(s);
7418
7421
  }
7419
- var qs = "focusScope.autoFocusOnMount", Xs = "focusScope.autoFocusOnUnmount", Gc = { bubbles: !1, cancelable: !0 }, Sb = "FocusScope", ls = f.forwardRef((e, t) => {
7422
+ var qs = "focusScope.autoFocusOnMount", Xs = "focusScope.autoFocusOnUnmount", Gc = { bubbles: !1, cancelable: !0 }, Cb = "FocusScope", ls = f.forwardRef((e, t) => {
7420
7423
  const {
7421
7424
  loop: n = !1,
7422
7425
  trapped: r = !1,
@@ -7459,7 +7462,7 @@ var qs = "focusScope.autoFocusOnMount", Xs = "focusScope.autoFocusOnUnmount", Gc
7459
7462
  const v = document.activeElement;
7460
7463
  if (!a.contains(v)) {
7461
7464
  const x = new CustomEvent(qs, Gc);
7462
- a.addEventListener(qs, u), a.dispatchEvent(x), x.defaultPrevented || (Cb(Ib(Hu(a)), { select: !0 }), document.activeElement === v && pn(a));
7465
+ a.addEventListener(qs, u), a.dispatchEvent(x), x.defaultPrevented || (Tb(jb(Hu(a)), { select: !0 }), document.activeElement === v && pn(a));
7463
7466
  }
7464
7467
  return () => {
7465
7468
  a.removeEventListener(qs, u), setTimeout(() => {
@@ -7474,7 +7477,7 @@ var qs = "focusScope.autoFocusOnMount", Xs = "focusScope.autoFocusOnUnmount", Gc
7474
7477
  if (!n && !r || g.paused) return;
7475
7478
  const p = v.key === "Tab" && !v.altKey && !v.ctrlKey && !v.metaKey, x = document.activeElement;
7476
7479
  if (p && x) {
7477
- const w = v.currentTarget, [y, E] = Tb(w);
7480
+ const w = v.currentTarget, [y, E] = Rb(w);
7478
7481
  y && E ? !v.shiftKey && x === E ? (v.preventDefault(), n && pn(y, { select: !0 })) : v.shiftKey && x === y && (v.preventDefault(), n && pn(E, { select: !0 })) : x === w && v.preventDefault();
7479
7482
  }
7480
7483
  },
@@ -7482,13 +7485,13 @@ var qs = "focusScope.autoFocusOnMount", Xs = "focusScope.autoFocusOnUnmount", Gc
7482
7485
  );
7483
7486
  return /* @__PURE__ */ c.jsx(xe.div, { tabIndex: -1, ...i, ref: m, onKeyDown: b });
7484
7487
  });
7485
- ls.displayName = Sb;
7486
- function Cb(e, { select: t = !1 } = {}) {
7488
+ ls.displayName = Cb;
7489
+ function Tb(e, { select: t = !1 } = {}) {
7487
7490
  const n = document.activeElement;
7488
7491
  for (const r of e)
7489
7492
  if (pn(r, { select: t }), document.activeElement !== n) return;
7490
7493
  }
7491
- function Tb(e) {
7494
+ function Rb(e) {
7492
7495
  const t = Hu(e), n = Kc(t, e), r = Kc(t.reverse(), e);
7493
7496
  return [n, r];
7494
7497
  }
@@ -7504,9 +7507,9 @@ function Hu(e) {
7504
7507
  }
7505
7508
  function Kc(e, t) {
7506
7509
  for (const n of e)
7507
- if (!Rb(n, { upTo: t })) return n;
7510
+ if (!Eb(n, { upTo: t })) return n;
7508
7511
  }
7509
- function Rb(e, { upTo: t }) {
7512
+ function Eb(e, { upTo: t }) {
7510
7513
  if (getComputedStyle(e).visibility === "hidden") return !0;
7511
7514
  for (; e; ) {
7512
7515
  if (t !== void 0 && e === t) return !1;
@@ -7515,17 +7518,17 @@ function Rb(e, { upTo: t }) {
7515
7518
  }
7516
7519
  return !1;
7517
7520
  }
7518
- function Eb(e) {
7521
+ function Nb(e) {
7519
7522
  return e instanceof HTMLInputElement && "select" in e;
7520
7523
  }
7521
7524
  function pn(e, { select: t = !1 } = {}) {
7522
7525
  if (e && e.focus) {
7523
7526
  const n = document.activeElement;
7524
- e.focus({ preventScroll: !0 }), e !== n && Eb(e) && t && e.select();
7527
+ e.focus({ preventScroll: !0 }), e !== n && Nb(e) && t && e.select();
7525
7528
  }
7526
7529
  }
7527
- var Yc = Nb();
7528
- function Nb() {
7530
+ var Yc = Ib();
7531
+ function Ib() {
7529
7532
  let e = [];
7530
7533
  return {
7531
7534
  add(t) {
@@ -7542,17 +7545,17 @@ function qc(e, t) {
7542
7545
  const n = [...e], r = n.indexOf(t);
7543
7546
  return r !== -1 && n.splice(r, 1), n;
7544
7547
  }
7545
- function Ib(e) {
7548
+ function jb(e) {
7546
7549
  return e.filter((t) => t.tagName !== "A");
7547
7550
  }
7548
- var jb = "Portal", us = f.forwardRef((e, t) => {
7551
+ var kb = "Portal", us = f.forwardRef((e, t) => {
7549
7552
  var a;
7550
7553
  const { container: n, ...r } = e, [o, s] = f.useState(!1);
7551
7554
  ot(() => s(!0), []);
7552
7555
  const i = n || o && ((a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : a.body);
7553
7556
  return i ? Rl.createPortal(/* @__PURE__ */ c.jsx(xe.div, { ...r, ref: t }), i) : null;
7554
7557
  });
7555
- us.displayName = jb;
7558
+ us.displayName = kb;
7556
7559
  var Js = 0;
7557
7560
  function fa() {
7558
7561
  f.useEffect(() => {
@@ -7583,16 +7586,16 @@ function zu(e, t) {
7583
7586
  t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
7584
7587
  return n;
7585
7588
  }
7586
- function kb(e, t, n) {
7589
+ function Ab(e, t, n) {
7587
7590
  if (n || arguments.length === 2) for (var r = 0, o = t.length, s; r < o; r++)
7588
7591
  (s || !(r in t)) && (s || (s = Array.prototype.slice.call(t, 0, r)), s[r] = t[r]);
7589
7592
  return e.concat(s || Array.prototype.slice.call(t));
7590
7593
  }
7591
- var Co = "right-scroll-bar-position", To = "width-before-scroll-bar", Ab = "with-scroll-bars-hidden", Pb = "--removed-body-scroll-bar-size";
7594
+ var Co = "right-scroll-bar-position", To = "width-before-scroll-bar", Pb = "with-scroll-bars-hidden", _b = "--removed-body-scroll-bar-size";
7592
7595
  function Zs(e, t) {
7593
7596
  return typeof e == "function" ? e(t) : e && (e.current = t), e;
7594
7597
  }
7595
- function _b(e, t) {
7598
+ function Ob(e, t) {
7596
7599
  var n = fe(function() {
7597
7600
  return {
7598
7601
  // value
@@ -7613,14 +7616,14 @@ function _b(e, t) {
7613
7616
  })[0];
7614
7617
  return n.callback = t, n.facade;
7615
7618
  }
7616
- var Ob = typeof window < "u" ? f.useLayoutEffect : f.useEffect, Jc = /* @__PURE__ */ new WeakMap();
7617
- function Mb(e, t) {
7618
- var n = _b(null, function(r) {
7619
+ var Mb = typeof window < "u" ? f.useLayoutEffect : f.useEffect, Jc = /* @__PURE__ */ new WeakMap();
7620
+ function Db(e, t) {
7621
+ var n = Ob(null, function(r) {
7619
7622
  return e.forEach(function(o) {
7620
7623
  return Zs(o, r);
7621
7624
  });
7622
7625
  });
7623
- return Ob(function() {
7626
+ return Mb(function() {
7624
7627
  var r = Jc.get(n);
7625
7628
  if (r) {
7626
7629
  var o = new Set(r), s = new Set(e), i = n.current;
@@ -7633,11 +7636,11 @@ function Mb(e, t) {
7633
7636
  Jc.set(n, e);
7634
7637
  }, [e]), n;
7635
7638
  }
7636
- function Db(e) {
7639
+ function Lb(e) {
7637
7640
  return e;
7638
7641
  }
7639
- function Lb(e, t) {
7640
- t === void 0 && (t = Db);
7642
+ function Fb(e, t) {
7643
+ t === void 0 && (t = Lb);
7641
7644
  var n = [], r = !1, o = {
7642
7645
  read: function() {
7643
7646
  if (r)
@@ -7691,9 +7694,9 @@ function Lb(e, t) {
7691
7694
  };
7692
7695
  return o;
7693
7696
  }
7694
- function Fb(e) {
7697
+ function Bb(e) {
7695
7698
  e === void 0 && (e = {});
7696
- var t = Lb(null);
7699
+ var t = Fb(null);
7697
7700
  return t.options = Xt({ async: !0, ssr: !1 }, e), t;
7698
7701
  }
7699
7702
  var Uu = function(e) {
@@ -7706,16 +7709,16 @@ var Uu = function(e) {
7706
7709
  return f.createElement(r, Xt({}, n));
7707
7710
  };
7708
7711
  Uu.isSideCarExport = !0;
7709
- function Bb(e, t) {
7712
+ function $b(e, t) {
7710
7713
  return e.useMedium(t), Uu;
7711
7714
  }
7712
- var Wu = Fb(), Qs = function() {
7715
+ var Wu = Bb(), Qs = function() {
7713
7716
  }, ds = f.forwardRef(function(e, t) {
7714
7717
  var n = f.useRef(null), r = f.useState({
7715
7718
  onScrollCapture: Qs,
7716
7719
  onWheelCapture: Qs,
7717
7720
  onTouchMoveCapture: Qs
7718
- }), o = r[0], s = r[1], i = e.forwardProps, a = e.children, l = e.className, u = e.removeScrollBar, d = e.enabled, h = e.shards, m = e.sideCar, g = e.noRelative, b = e.noIsolation, v = e.inert, p = e.allowPinchZoom, x = e.as, w = x === void 0 ? "div" : x, y = e.gapMode, E = zu(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = m, T = Mb([n, t]), C = Xt(Xt({}, E), o);
7721
+ }), o = r[0], s = r[1], i = e.forwardProps, a = e.children, l = e.className, u = e.removeScrollBar, d = e.enabled, h = e.shards, m = e.sideCar, g = e.noRelative, b = e.noIsolation, v = e.inert, p = e.allowPinchZoom, x = e.as, w = x === void 0 ? "div" : x, y = e.gapMode, E = zu(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = m, T = Db([n, t]), C = Xt(Xt({}, E), o);
7719
7722
  return f.createElement(
7720
7723
  f.Fragment,
7721
7724
  null,
@@ -7732,37 +7735,37 @@ ds.classNames = {
7732
7735
  fullWidth: To,
7733
7736
  zeroRight: Co
7734
7737
  };
7735
- var $b = function() {
7738
+ var Hb = function() {
7736
7739
  if (typeof __webpack_nonce__ < "u")
7737
7740
  return __webpack_nonce__;
7738
7741
  };
7739
- function Hb() {
7742
+ function zb() {
7740
7743
  if (!document)
7741
7744
  return null;
7742
7745
  var e = document.createElement("style");
7743
7746
  e.type = "text/css";
7744
- var t = $b();
7747
+ var t = Hb();
7745
7748
  return t && e.setAttribute("nonce", t), e;
7746
7749
  }
7747
- function zb(e, t) {
7750
+ function Ub(e, t) {
7748
7751
  e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
7749
7752
  }
7750
- function Ub(e) {
7753
+ function Wb(e) {
7751
7754
  var t = document.head || document.getElementsByTagName("head")[0];
7752
7755
  t.appendChild(e);
7753
7756
  }
7754
- var Wb = function() {
7757
+ var Vb = function() {
7755
7758
  var e = 0, t = null;
7756
7759
  return {
7757
7760
  add: function(n) {
7758
- e == 0 && (t = Hb()) && (zb(t, n), Ub(t)), e++;
7761
+ e == 0 && (t = zb()) && (Ub(t, n), Wb(t)), e++;
7759
7762
  },
7760
7763
  remove: function() {
7761
7764
  e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
7762
7765
  }
7763
7766
  };
7764
- }, Vb = function() {
7765
- var e = Wb();
7767
+ }, Gb = function() {
7768
+ var e = Vb();
7766
7769
  return function(t, n) {
7767
7770
  f.useEffect(function() {
7768
7771
  return e.add(t), function() {
@@ -7771,35 +7774,35 @@ var Wb = function() {
7771
7774
  }, [t && n]);
7772
7775
  };
7773
7776
  }, Vu = function() {
7774
- var e = Vb(), t = function(n) {
7777
+ var e = Gb(), t = function(n) {
7775
7778
  var r = n.styles, o = n.dynamic;
7776
7779
  return e(r, o), null;
7777
7780
  };
7778
7781
  return t;
7779
- }, Gb = {
7782
+ }, Kb = {
7780
7783
  left: 0,
7781
7784
  top: 0,
7782
7785
  right: 0,
7783
7786
  gap: 0
7784
7787
  }, ei = function(e) {
7785
7788
  return parseInt(e || "", 10) || 0;
7786
- }, Kb = function(e) {
7789
+ }, Yb = function(e) {
7787
7790
  var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
7788
7791
  return [ei(n), ei(r), ei(o)];
7789
- }, Yb = function(e) {
7792
+ }, qb = function(e) {
7790
7793
  if (e === void 0 && (e = "margin"), typeof window > "u")
7791
- return Gb;
7792
- var t = Kb(e), n = document.documentElement.clientWidth, r = window.innerWidth;
7794
+ return Kb;
7795
+ var t = Yb(e), n = document.documentElement.clientWidth, r = window.innerWidth;
7793
7796
  return {
7794
7797
  left: t[0],
7795
7798
  top: t[1],
7796
7799
  right: t[2],
7797
7800
  gap: Math.max(0, r - n + t[2] - t[0])
7798
7801
  };
7799
- }, qb = Vu(), Zn = "data-scroll-locked", Xb = function(e, t, n, r) {
7802
+ }, Xb = Vu(), Zn = "data-scroll-locked", Jb = function(e, t, n, r) {
7800
7803
  var o = e.left, s = e.top, i = e.right, a = e.gap;
7801
7804
  return n === void 0 && (n = "margin"), `
7802
- .`.concat(Ab, ` {
7805
+ .`.concat(Pb, ` {
7803
7806
  overflow: hidden `).concat(r, `;
7804
7807
  padding-right: `).concat(a, "px ").concat(r, `;
7805
7808
  }
@@ -7837,26 +7840,26 @@ var Wb = function() {
7837
7840
  }
7838
7841
 
7839
7842
  body[`).concat(Zn, `] {
7840
- `).concat(Pb, ": ").concat(a, `px;
7843
+ `).concat(_b, ": ").concat(a, `px;
7841
7844
  }
7842
7845
  `);
7843
7846
  }, Zc = function() {
7844
7847
  var e = parseInt(document.body.getAttribute(Zn) || "0", 10);
7845
7848
  return isFinite(e) ? e : 0;
7846
- }, Jb = function() {
7849
+ }, Zb = function() {
7847
7850
  f.useEffect(function() {
7848
7851
  return document.body.setAttribute(Zn, (Zc() + 1).toString()), function() {
7849
7852
  var e = Zc() - 1;
7850
7853
  e <= 0 ? document.body.removeAttribute(Zn) : document.body.setAttribute(Zn, e.toString());
7851
7854
  };
7852
7855
  }, []);
7853
- }, Zb = function(e) {
7856
+ }, Qb = function(e) {
7854
7857
  var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
7855
- Jb();
7858
+ Zb();
7856
7859
  var s = f.useMemo(function() {
7857
- return Yb(o);
7860
+ return qb(o);
7858
7861
  }, [o]);
7859
- return f.createElement(qb, { styles: Xb(s, !t, o, n ? "" : "!important") });
7862
+ return f.createElement(Xb, { styles: Jb(s, !t, o, n ? "" : "!important") });
7860
7863
  }, Ri = !1;
7861
7864
  if (typeof window < "u")
7862
7865
  try {
@@ -7869,7 +7872,7 @@ if (typeof window < "u")
7869
7872
  } catch {
7870
7873
  Ri = !1;
7871
7874
  }
7872
- var Vn = Ri ? { passive: !1 } : !1, Qb = function(e) {
7875
+ var Vn = Ri ? { passive: !1 } : !1, ew = function(e) {
7873
7876
  return e.tagName === "TEXTAREA";
7874
7877
  }, Gu = function(e, t) {
7875
7878
  if (!(e instanceof Element))
@@ -7878,11 +7881,11 @@ var Vn = Ri ? { passive: !1 } : !1, Qb = function(e) {
7878
7881
  return (
7879
7882
  // not-not-scrollable
7880
7883
  n[t] !== "hidden" && // contains scroll inside self
7881
- !(n.overflowY === n.overflowX && !Qb(e) && n[t] === "visible")
7884
+ !(n.overflowY === n.overflowX && !ew(e) && n[t] === "visible")
7882
7885
  );
7883
- }, ew = function(e) {
7884
- return Gu(e, "overflowY");
7885
7886
  }, tw = function(e) {
7887
+ return Gu(e, "overflowY");
7888
+ }, nw = function(e) {
7886
7889
  return Gu(e, "overflowX");
7887
7890
  }, Qc = function(e, t) {
7888
7891
  var n = t.ownerDocument, r = t;
@@ -7897,14 +7900,14 @@ var Vn = Ri ? { passive: !1 } : !1, Qb = function(e) {
7897
7900
  r = r.parentNode;
7898
7901
  } while (r && r !== n.body);
7899
7902
  return !1;
7900
- }, nw = function(e) {
7903
+ }, rw = function(e) {
7901
7904
  var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
7902
7905
  return [
7903
7906
  t,
7904
7907
  n,
7905
7908
  r
7906
7909
  ];
7907
- }, rw = function(e) {
7910
+ }, ow = function(e) {
7908
7911
  var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
7909
7912
  return [
7910
7913
  t,
@@ -7912,13 +7915,13 @@ var Vn = Ri ? { passive: !1 } : !1, Qb = function(e) {
7912
7915
  r
7913
7916
  ];
7914
7917
  }, Ku = function(e, t) {
7915
- return e === "v" ? ew(t) : tw(t);
7918
+ return e === "v" ? tw(t) : nw(t);
7916
7919
  }, Yu = function(e, t) {
7917
- return e === "v" ? nw(t) : rw(t);
7918
- }, ow = function(e, t) {
7920
+ return e === "v" ? rw(t) : ow(t);
7921
+ }, sw = function(e, t) {
7919
7922
  return e === "h" && t === "rtl" ? -1 : 1;
7920
- }, sw = function(e, t, n, r, o) {
7921
- var s = ow(e, window.getComputedStyle(t).direction), i = s * r, a = n.target, l = t.contains(a), u = !1, d = i > 0, h = 0, m = 0;
7923
+ }, iw = function(e, t, n, r, o) {
7924
+ var s = sw(e, window.getComputedStyle(t).direction), i = s * r, a = n.target, l = t.contains(a), u = !1, d = i > 0, h = 0, m = 0;
7922
7925
  do {
7923
7926
  if (!a)
7924
7927
  break;
@@ -7938,22 +7941,22 @@ var Vn = Ri ? { passive: !1 } : !1, Qb = function(e) {
7938
7941
  return [e.deltaX, e.deltaY];
7939
7942
  }, tl = function(e) {
7940
7943
  return e && "current" in e ? e.current : e;
7941
- }, iw = function(e, t) {
7944
+ }, aw = function(e, t) {
7942
7945
  return e[0] === t[0] && e[1] === t[1];
7943
- }, aw = function(e) {
7946
+ }, cw = function(e) {
7944
7947
  return `
7945
7948
  .block-interactivity-`.concat(e, ` {pointer-events: none;}
7946
7949
  .allow-interactivity-`).concat(e, ` {pointer-events: all;}
7947
7950
  `);
7948
- }, cw = 0, Gn = [];
7949
- function lw(e) {
7950
- var t = f.useRef([]), n = f.useRef([0, 0]), r = f.useRef(), o = f.useState(cw++)[0], s = f.useState(Vu)[0], i = f.useRef(e);
7951
+ }, lw = 0, Gn = [];
7952
+ function uw(e) {
7953
+ var t = f.useRef([]), n = f.useRef([0, 0]), r = f.useRef(), o = f.useState(lw++)[0], s = f.useState(Vu)[0], i = f.useRef(e);
7951
7954
  f.useEffect(function() {
7952
7955
  i.current = e;
7953
7956
  }, [e]), f.useEffect(function() {
7954
7957
  if (e.inert) {
7955
7958
  document.body.classList.add("block-interactivity-".concat(o));
7956
- var v = kb([e.lockRef.current], (e.shards || []).map(tl), !0).filter(Boolean);
7959
+ var v = Ab([e.lockRef.current], (e.shards || []).map(tl), !0).filter(Boolean);
7957
7960
  return v.forEach(function(p) {
7958
7961
  return p.classList.add("allow-interactivity-".concat(o));
7959
7962
  }), function() {
@@ -7977,12 +7980,12 @@ function lw(e) {
7977
7980
  if (!r.current && "changedTouches" in v && (y || E) && (r.current = S), !S)
7978
7981
  return !0;
7979
7982
  var I = r.current || S;
7980
- return sw(I, p, v, I === "h" ? y : E);
7983
+ return iw(I, p, v, I === "h" ? y : E);
7981
7984
  }, []), l = f.useCallback(function(v) {
7982
7985
  var p = v;
7983
7986
  if (!(!Gn.length || Gn[Gn.length - 1] !== s)) {
7984
7987
  var x = "deltaY" in p ? el(p) : co(p), w = t.current.filter(function(S) {
7985
- return S.name === p.type && (S.target === p.target || p.target === S.shadowParent) && iw(S.delta, x);
7988
+ return S.name === p.type && (S.target === p.target || p.target === S.shadowParent) && aw(S.delta, x);
7986
7989
  })[0];
7987
7990
  if (w && w.should) {
7988
7991
  p.cancelable && p.preventDefault();
@@ -7996,7 +7999,7 @@ function lw(e) {
7996
7999
  }
7997
8000
  }
7998
8001
  }, []), u = f.useCallback(function(v, p, x, w) {
7999
- var y = { name: v, delta: p, target: x, should: w, shadowParent: uw(x) };
8002
+ var y = { name: v, delta: p, target: x, should: w, shadowParent: dw(x) };
8000
8003
  t.current.push(y), setTimeout(function() {
8001
8004
  t.current = t.current.filter(function(E) {
8002
8005
  return E !== y;
@@ -8024,28 +8027,28 @@ function lw(e) {
8024
8027
  return f.createElement(
8025
8028
  f.Fragment,
8026
8029
  null,
8027
- b ? f.createElement(s, { styles: aw(o) }) : null,
8028
- g ? f.createElement(Zb, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
8030
+ b ? f.createElement(s, { styles: cw(o) }) : null,
8031
+ g ? f.createElement(Qb, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
8029
8032
  );
8030
8033
  }
8031
- function uw(e) {
8034
+ function dw(e) {
8032
8035
  for (var t = null; e !== null; )
8033
8036
  e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
8034
8037
  return t;
8035
8038
  }
8036
- const dw = Bb(Wu, lw);
8039
+ const fw = $b(Wu, uw);
8037
8040
  var fs = f.forwardRef(function(e, t) {
8038
- return f.createElement(ds, Xt({}, e, { ref: t, sideCar: dw }));
8041
+ return f.createElement(ds, Xt({}, e, { ref: t, sideCar: fw }));
8039
8042
  });
8040
8043
  fs.classNames = ds.classNames;
8041
- var fw = function(e) {
8044
+ var hw = function(e) {
8042
8045
  if (typeof document > "u")
8043
8046
  return null;
8044
8047
  var t = Array.isArray(e) ? e[0] : e;
8045
8048
  return t.ownerDocument.body;
8046
8049
  }, Kn = /* @__PURE__ */ new WeakMap(), lo = /* @__PURE__ */ new WeakMap(), uo = {}, ti = 0, qu = function(e) {
8047
8050
  return e && (e.host || qu(e.parentNode));
8048
- }, hw = function(e, t) {
8051
+ }, pw = function(e, t) {
8049
8052
  return t.map(function(n) {
8050
8053
  if (e.contains(n))
8051
8054
  return n;
@@ -8054,8 +8057,8 @@ var fw = function(e) {
8054
8057
  }).filter(function(n) {
8055
8058
  return !!n;
8056
8059
  });
8057
- }, pw = function(e, t, n, r) {
8058
- var o = hw(t, Array.isArray(e) ? e : [e]);
8060
+ }, mw = function(e, t, n, r) {
8061
+ var o = pw(t, Array.isArray(e) ? e : [e]);
8059
8062
  uo[n] || (uo[n] = /* @__PURE__ */ new WeakMap());
8060
8063
  var s = uo[n], i = [], a = /* @__PURE__ */ new Set(), l = new Set(o), u = function(h) {
8061
8064
  !h || a.has(h) || (a.add(h), u(h.parentNode));
@@ -8082,11 +8085,11 @@ var fw = function(e) {
8082
8085
  };
8083
8086
  }, ha = function(e, t, n) {
8084
8087
  n === void 0 && (n = "data-aria-hidden");
8085
- var r = Array.from(Array.isArray(e) ? e : [e]), o = fw(e);
8086
- return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), pw(r, o, n, "aria-hidden")) : function() {
8088
+ var r = Array.from(Array.isArray(e) ? e : [e]), o = hw(e);
8089
+ return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), mw(r, o, n, "aria-hidden")) : function() {
8087
8090
  return null;
8088
8091
  };
8089
- }, hs = "Dialog", [Xu, uR] = Wt(hs), [mw, Vt] = Xu(hs), Ju = (e) => {
8092
+ }, hs = "Dialog", [Xu, dR] = Wt(hs), [gw, Vt] = Xu(hs), Ju = (e) => {
8090
8093
  const {
8091
8094
  __scopeDialog: t,
8092
8095
  children: n,
@@ -8101,7 +8104,7 @@ var fw = function(e) {
8101
8104
  caller: hs
8102
8105
  });
8103
8106
  return /* @__PURE__ */ c.jsx(
8104
- mw,
8107
+ gw,
8105
8108
  {
8106
8109
  scope: t,
8107
8110
  triggerRef: a,
@@ -8137,27 +8140,27 @@ var Zu = "DialogTrigger", Qu = f.forwardRef(
8137
8140
  }
8138
8141
  );
8139
8142
  Qu.displayName = Zu;
8140
- var pa = "DialogPortal", [gw, ed] = Xu(pa, {
8143
+ var pa = "DialogPortal", [vw, ed] = Xu(pa, {
8141
8144
  forceMount: void 0
8142
8145
  }), td = (e) => {
8143
8146
  const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, s = Vt(pa, t);
8144
- return /* @__PURE__ */ c.jsx(gw, { scope: t, forceMount: n, children: f.Children.map(r, (i) => /* @__PURE__ */ c.jsx(xt, { present: n || s.open, children: /* @__PURE__ */ c.jsx(us, { asChild: !0, container: o, children: i }) })) });
8147
+ return /* @__PURE__ */ c.jsx(vw, { scope: t, forceMount: n, children: f.Children.map(r, (i) => /* @__PURE__ */ c.jsx(xt, { present: n || s.open, children: /* @__PURE__ */ c.jsx(us, { asChild: !0, container: o, children: i }) })) });
8145
8148
  };
8146
8149
  td.displayName = pa;
8147
8150
  var Bo = "DialogOverlay", nd = f.forwardRef(
8148
8151
  (e, t) => {
8149
8152
  const n = ed(Bo, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = Vt(Bo, e.__scopeDialog);
8150
- return s.modal ? /* @__PURE__ */ c.jsx(xt, { present: r || s.open, children: /* @__PURE__ */ c.jsx(xw, { ...o, ref: t }) }) : null;
8153
+ return s.modal ? /* @__PURE__ */ c.jsx(xt, { present: r || s.open, children: /* @__PURE__ */ c.jsx(bw, { ...o, ref: t }) }) : null;
8151
8154
  }
8152
8155
  );
8153
8156
  nd.displayName = Bo;
8154
- var vw = tr("DialogOverlay.RemoveScroll"), xw = f.forwardRef(
8157
+ var xw = tr("DialogOverlay.RemoveScroll"), bw = f.forwardRef(
8155
8158
  (e, t) => {
8156
8159
  const { __scopeDialog: n, ...r } = e, o = Vt(Bo, n);
8157
8160
  return (
8158
8161
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
8159
8162
  // ie. when `Overlay` and `Content` are siblings
8160
- /* @__PURE__ */ c.jsx(fs, { as: vw, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ c.jsx(
8163
+ /* @__PURE__ */ c.jsx(fs, { as: xw, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ c.jsx(
8161
8164
  xe.div,
8162
8165
  {
8163
8166
  "data-state": ga(o.open),
@@ -8171,11 +8174,11 @@ var vw = tr("DialogOverlay.RemoveScroll"), xw = f.forwardRef(
8171
8174
  ), On = "DialogContent", rd = f.forwardRef(
8172
8175
  (e, t) => {
8173
8176
  const n = ed(On, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = Vt(On, e.__scopeDialog);
8174
- return /* @__PURE__ */ c.jsx(xt, { present: r || s.open, children: s.modal ? /* @__PURE__ */ c.jsx(bw, { ...o, ref: t }) : /* @__PURE__ */ c.jsx(ww, { ...o, ref: t }) });
8177
+ return /* @__PURE__ */ c.jsx(xt, { present: r || s.open, children: s.modal ? /* @__PURE__ */ c.jsx(ww, { ...o, ref: t }) : /* @__PURE__ */ c.jsx(yw, { ...o, ref: t }) });
8175
8178
  }
8176
8179
  );
8177
8180
  rd.displayName = On;
8178
- var bw = f.forwardRef(
8181
+ var ww = f.forwardRef(
8179
8182
  (e, t) => {
8180
8183
  const n = Vt(On, e.__scopeDialog), r = f.useRef(null), o = Re(t, n.contentRef, r);
8181
8184
  return f.useEffect(() => {
@@ -8203,7 +8206,7 @@ var bw = f.forwardRef(
8203
8206
  }
8204
8207
  );
8205
8208
  }
8206
- ), ww = f.forwardRef(
8209
+ ), yw = f.forwardRef(
8207
8210
  (e, t) => {
8208
8211
  const n = Vt(On, e.__scopeDialog), r = f.useRef(!1), o = f.useRef(!1);
8209
8212
  return /* @__PURE__ */ c.jsx(
@@ -8254,8 +8257,8 @@ var bw = f.forwardRef(
8254
8257
  }
8255
8258
  ),
8256
8259
  /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
8257
- /* @__PURE__ */ c.jsx(yw, { titleId: a.titleId }),
8258
- /* @__PURE__ */ c.jsx(Cw, { contentRef: l, descriptionId: a.descriptionId })
8260
+ /* @__PURE__ */ c.jsx(Sw, { titleId: a.titleId }),
8261
+ /* @__PURE__ */ c.jsx(Tw, { contentRef: l, descriptionId: a.descriptionId })
8259
8262
  ] })
8260
8263
  ] });
8261
8264
  }
@@ -8291,11 +8294,11 @@ ld.displayName = cd;
8291
8294
  function ga(e) {
8292
8295
  return e ? "open" : "closed";
8293
8296
  }
8294
- var ud = "DialogTitleWarning", [dR, dd] = Lx(ud, {
8297
+ var ud = "DialogTitleWarning", [fR, dd] = Fx(ud, {
8295
8298
  contentName: On,
8296
8299
  titleName: ma,
8297
8300
  docsSlug: "dialog"
8298
- }), yw = ({ titleId: e }) => {
8301
+ }), Sw = ({ titleId: e }) => {
8299
8302
  const t = dd(ud), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
8300
8303
 
8301
8304
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
@@ -8304,15 +8307,15 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
8304
8307
  return f.useEffect(() => {
8305
8308
  e && (document.getElementById(e) || console.error(n));
8306
8309
  }, [n, e]), null;
8307
- }, Sw = "DialogDescriptionWarning", Cw = ({ contentRef: e, descriptionId: t }) => {
8308
- const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${dd(Sw).contentName}}.`;
8310
+ }, Cw = "DialogDescriptionWarning", Tw = ({ contentRef: e, descriptionId: t }) => {
8311
+ const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${dd(Cw).contentName}}.`;
8309
8312
  return f.useEffect(() => {
8310
8313
  var s;
8311
8314
  const o = (s = e.current) == null ? void 0 : s.getAttribute("aria-describedby");
8312
8315
  t && o && (document.getElementById(t) || console.warn(r));
8313
8316
  }, [r, e, t]), null;
8314
- }, fd = Ju, Tw = Qu, hd = td, ps = nd, ms = rd, kn = sd, gs = ad, pd = ld;
8315
- const Rw = fd, Ew = hd, md = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
8317
+ }, fd = Ju, Rw = Qu, hd = td, ps = nd, ms = rd, kn = sd, gs = ad, pd = ld;
8318
+ const Ew = fd, Nw = hd, md = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
8316
8319
  ps,
8317
8320
  {
8318
8321
  ref: n,
@@ -8340,7 +8343,7 @@ const gd = f.forwardRef(({ className: e, children: t, ...n }, r) => {
8340
8343
  }
8341
8344
  return i(t), s;
8342
8345
  }, [t]);
8343
- return /* @__PURE__ */ c.jsxs(Ew, { children: [
8346
+ return /* @__PURE__ */ c.jsxs(Nw, { children: [
8344
8347
  /* @__PURE__ */ c.jsx(md, {}),
8345
8348
  /* @__PURE__ */ c.jsxs(
8346
8349
  ms,
@@ -8390,7 +8393,7 @@ const xd = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
8390
8393
  }
8391
8394
  ));
8392
8395
  xd.displayName = kn.displayName;
8393
- const Nw = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
8396
+ const Iw = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
8394
8397
  gs,
8395
8398
  {
8396
8399
  ref: n,
@@ -8398,8 +8401,8 @@ const Nw = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
8398
8401
  ...t
8399
8402
  }
8400
8403
  ));
8401
- Nw.displayName = gs.displayName;
8402
- function Iw({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
8404
+ Iw.displayName = gs.displayName;
8405
+ function jw({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
8403
8406
  const [s, i] = fe(!1), [a, l] = fe(null), [u, d] = fe(null), { toast: h } = da();
8404
8407
  Ye(() => {
8405
8408
  e && n && m();
@@ -8419,7 +8422,7 @@ function Iw({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
8419
8422
  }, g = async () => {
8420
8423
  if (n)
8421
8424
  try {
8422
- await cb(n), h({ title: "Download started", description: `Downloading ${r}` });
8425
+ await lb(n), h({ title: "Download started", description: `Downloading ${r}` });
8423
8426
  } catch (x) {
8424
8427
  console.error("Failed to download file:", x), h({ title: "Download failed", description: String(x), variant: "destructive" });
8425
8428
  }
@@ -8463,7 +8466,7 @@ function Iw({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
8463
8466
  ] }),
8464
8467
  /* @__PURE__ */ c.jsx("p", { className: "text-sm text-muted-foreground", children: "This file type cannot be previewed. Use download or external view." })
8465
8468
  ] }) : /* @__PURE__ */ c.jsx("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ c.jsx("p", { className: "text-muted-foreground", children: "No content to display" }) }), p = () => o.startsWith("image/") ? /* @__PURE__ */ c.jsx(Cl, { className: "h-5 w-5" }) : /* @__PURE__ */ c.jsx(Ga, { className: "h-5 w-5" });
8466
- return /* @__PURE__ */ c.jsx(Rw, { open: e, onOpenChange: t, children: /* @__PURE__ */ c.jsxs(gd, { className: "max-w-4xl max-h-[90vh] overflow-hidden", children: [
8469
+ return /* @__PURE__ */ c.jsx(Ew, { open: e, onOpenChange: t, children: /* @__PURE__ */ c.jsxs(gd, { className: "max-w-4xl max-h-[90vh] overflow-hidden", children: [
8467
8470
  /* @__PURE__ */ c.jsx(vd, { children: /* @__PURE__ */ c.jsxs("div", { className: "flex items-center justify-between", children: [
8468
8471
  /* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-3", children: [
8469
8472
  p(),
@@ -8508,7 +8511,7 @@ function Iw({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
8508
8511
  ] }) });
8509
8512
  }
8510
8513
  const Ro = "prose prose-sm max-w-none break-words dark:prose-invert prose-headings:break-words prose-p:break-words prose-li:break-words prose-td:break-words prose-th:break-words prose-a:break-all prose-code:break-words prose-blockquote:break-words";
8511
- function jw({ className: e }) {
8514
+ function kw({ className: e }) {
8512
8515
  const [t, n] = fe(0);
8513
8516
  return Ye(() => {
8514
8517
  const r = setInterval(() => n((o) => (o + 1) % 4), 500);
@@ -8525,7 +8528,7 @@ function jw({ className: e }) {
8525
8528
  }
8526
8529
  );
8527
8530
  }
8528
- const kw = Y.memo(function({
8531
+ const Aw = Y.memo(function({
8529
8532
  message: t,
8530
8533
  messageIndex: n,
8531
8534
  isStreamingMessage: r = !1,
@@ -8560,7 +8563,7 @@ const kw = Y.memo(function({
8560
8563
  default:
8561
8564
  return "text-[hsl(var(--chat-bubble-ai-text))]";
8562
8565
  }
8563
- }, [O]), ee = an(() => Aw(t.content), [t.content]), F = an(() => Dw(t.content), [t.content]), Z = an(() => t.content.filter((ue) => ue.type === "image_url"), [t.content]), ae = an(() => t.content.filter((ue) => ue.type === "file"), [t.content]), ge = Fw(ee, r), $ = async () => {
8566
+ }, [O]), ee = an(() => Pw(t.content), [t.content]), F = an(() => Lw(t.content), [t.content]), Z = an(() => t.content.filter((ue) => ue.type === "image_url"), [t.content]), ae = an(() => t.content.filter((ue) => ue.type === "file"), [t.content]), ge = Bw(ee, r), $ = async () => {
8564
8567
  try {
8565
8568
  const ue = W ? Yn(t.content) : ee;
8566
8569
  await navigator.clipboard.writeText(ue), E(!0), setTimeout(() => E(!1), 2e3), w == null || w(ue);
@@ -8643,11 +8646,11 @@ const kw = Y.memo(function({
8643
8646
  if (t.model === "reflection") {
8644
8647
  const he = ee.trim(), Ne = ni(he);
8645
8648
  if (Ne && typeof Ne == "object")
8646
- return /* @__PURE__ */ c.jsx(Bw, { data: Ne });
8649
+ return /* @__PURE__ */ c.jsx($w, { data: Ne });
8647
8650
  }
8648
8651
  if (W && F.name === "get_issues") {
8649
8652
  const he = t.content.find((Qe) => Qe.type === "tool_result"), Ne = (he == null ? void 0 : he.output) ?? Yn(t.content), Ke = wd(Ne);
8650
- if (Ke) return /* @__PURE__ */ c.jsx($w, { issues: Ke });
8653
+ if (Ke) return /* @__PURE__ */ c.jsx(Hw, { issues: Ke });
8651
8654
  }
8652
8655
  if (W && !C) {
8653
8656
  const he = Yn(t.content).slice(0, 80).replace(/\s+/g, " ");
@@ -8672,8 +8675,8 @@ const kw = Y.memo(function({
8672
8675
  ] }) });
8673
8676
  }
8674
8677
  if (W && C && !d) {
8675
- const he = Hw(t.content);
8676
- if (he && Pw(he))
8678
+ const he = zw(t.content);
8679
+ if (he && _w(he))
8677
8680
  return /* @__PURE__ */ c.jsx(Gs, { content: he.trim(), hideFallbackDuringStreaming: !0 });
8678
8681
  const Ne = Yn(t.content);
8679
8682
  return /* @__PURE__ */ c.jsx("div", { className: "font-mono text-sm text-current", children: /* @__PURE__ */ c.jsx("pre", { className: D("whitespace-pre-wrap break-words text-current", _ && "text-xs"), children: Ne }) });
@@ -8698,7 +8701,7 @@ const kw = Y.memo(function({
8698
8701
  const he = ni(ge);
8699
8702
  if (he !== null)
8700
8703
  return /* @__PURE__ */ c.jsx(nl, { data: he });
8701
- const Ne = Ow(_w(ge)), Ke = ge.trim().length === 0;
8704
+ const Ne = Mw(Ow(ge)), Ke = ge.trim().length === 0;
8702
8705
  return /* @__PURE__ */ c.jsx(c.Fragment, { children: Ke ? /* @__PURE__ */ c.jsx("div", { className: "w-full", children: /* @__PURE__ */ c.jsxs("div", { className: "animate-pulse space-y-2", children: [
8703
8706
  /* @__PURE__ */ c.jsx("div", { className: "h-3 bg-slate-200 dark:bg-slate-700 rounded w-3/4" }),
8704
8707
  /* @__PURE__ */ c.jsx("div", { className: "h-3 bg-slate-200 dark:bg-slate-700 rounded w-5/6" }),
@@ -8714,7 +8717,7 @@ const kw = Y.memo(function({
8714
8717
  }
8715
8718
  ) });
8716
8719
  })(),
8717
- /* @__PURE__ */ c.jsx("div", { className: "mt-2", children: /* @__PURE__ */ c.jsx(jw, { className: D(V, _ ? "text-xs" : "text-sm") }) })
8720
+ /* @__PURE__ */ c.jsx("div", { className: "mt-2", children: /* @__PURE__ */ c.jsx(kw, { className: D(V, _ ? "text-xs" : "text-sm") }) })
8718
8721
  ]
8719
8722
  }
8720
8723
  )
@@ -8787,7 +8790,7 @@ const kw = Y.memo(function({
8787
8790
  }) }),
8788
8791
  Le
8789
8792
  ] });
8790
- }, je = an(() => Lw(t), [t]);
8793
+ }, je = an(() => Fw(t), [t]);
8791
8794
  return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
8792
8795
  /* @__PURE__ */ c.jsx("div", { className: D(ce(), b.container), children: /* @__PURE__ */ c.jsxs("div", { className: D(se(), b.content), children: [
8793
8796
  (a || l || W) && /* @__PURE__ */ c.jsxs(
@@ -8945,7 +8948,7 @@ const kw = Y.memo(function({
8945
8948
  )
8946
8949
  ] }) }),
8947
8950
  M && /* @__PURE__ */ c.jsx(
8948
- Iw,
8951
+ jw,
8949
8952
  {
8950
8953
  isOpen: P,
8951
8954
  onClose: () => {
@@ -8958,15 +8961,15 @@ const kw = Y.memo(function({
8958
8961
  )
8959
8962
  ] });
8960
8963
  }, (e, t) => t.isStreamingMessage ? !1 : e.message.id === t.message.id && e.message.content === t.message.content && e.isStreamingMessage === t.isStreamingMessage && e.isEditing === t.isEditing);
8961
- function Aw(e) {
8964
+ function Pw(e) {
8962
8965
  const t = e.filter((n) => n.type === "text").map((n) => n.text).join("");
8963
8966
  return t || JSON.stringify(e);
8964
8967
  }
8965
- function Pw(e) {
8968
+ function _w(e) {
8966
8969
  return e.includes(`
8967
8970
  `) || e.includes("```") || /[-*] /.test(e) || /#+\s/.test(e);
8968
8971
  }
8969
- function _w(e) {
8972
+ function Ow(e) {
8970
8973
  let t = e;
8971
8974
  try {
8972
8975
  (t.match(/```/g) || []).length % 2 === 1 && (t += "\n```"), (t.replace(/```[\s\S]*?```/g, "").match(new RegExp("(?<!`)`(?!`)", "g")) || []).length % 2 === 1 && (t += "`");
@@ -8974,7 +8977,7 @@ function _w(e) {
8974
8977
  }
8975
8978
  return t;
8976
8979
  }
8977
- function Ow(e) {
8980
+ function Mw(e) {
8978
8981
  let t = e;
8979
8982
  try {
8980
8983
  const n = [], r = [], o = "\0F", s = "\0I";
@@ -9020,12 +9023,12 @@ function nl({ data: e }) {
9020
9023
  s,
9021
9024
  ":"
9022
9025
  ] }),
9023
- /* @__PURE__ */ c.jsx("dd", { className: "inline", children: Mw(i) })
9026
+ /* @__PURE__ */ c.jsx("dd", { className: "inline", children: Dw(i) })
9024
9027
  ] }, s)) }) });
9025
9028
  }
9026
9029
  return /* @__PURE__ */ c.jsx("pre", { className: "font-mono text-xs bg-background/50 rounded border p-2 whitespace-pre-wrap break-words", children: kr(e) });
9027
9030
  }
9028
- function Mw(e) {
9031
+ function Dw(e) {
9029
9032
  if (e == null) return String(e);
9030
9033
  const t = typeof e;
9031
9034
  if (t === "string" || t === "number" || t === "boolean") return String(e);
@@ -9073,17 +9076,17 @@ function kr(e) {
9073
9076
  return "";
9074
9077
  }
9075
9078
  }
9076
- function Dw(e) {
9079
+ function Lw(e) {
9077
9080
  const t = e.find((r) => r.type === "tool_call"), n = e.find((r) => r.type === "tool_result");
9078
9081
  return {
9079
9082
  name: t == null ? void 0 : t.name,
9080
9083
  toolCallId: (n == null ? void 0 : n.toolCallId) ?? (t == null ? void 0 : t.id)
9081
9084
  };
9082
9085
  }
9083
- function Lw(e) {
9086
+ function Fw(e) {
9084
9087
  return e.name && e.name.trim() ? e.name : e.model && e.model.includes("/") ? e.model.split("/").pop() || null : e.model || null;
9085
9088
  }
9086
- function Fw(e, t) {
9089
+ function Bw(e, t) {
9087
9090
  const [n, r] = fe(e), o = ze(e), s = ze(null);
9088
9091
  return Ye(() => {
9089
9092
  if (!t) {
@@ -9097,7 +9100,7 @@ function Fw(e, t) {
9097
9100
  };
9098
9101
  }, [e, t]), n;
9099
9102
  }
9100
- function Bw({ data: e }) {
9103
+ function $w({ data: e }) {
9101
9104
  return /* @__PURE__ */ c.jsx("dl", { className: "grid grid-cols-1 gap-y-2", children: Object.entries(e).map(([t, n]) => /* @__PURE__ */ c.jsxs("div", { className: "flex", children: [
9102
9105
  /* @__PURE__ */ c.jsxs("dt", { className: "font-semibold mr-2", children: [
9103
9106
  t,
@@ -9150,7 +9153,7 @@ function wd(e) {
9150
9153
  }
9151
9154
  return Object.values(n).some((i) => i.length > 0) ? n : null;
9152
9155
  }
9153
- function $w({ issues: e }) {
9156
+ function Hw({ issues: e }) {
9154
9157
  const t = [
9155
9158
  { key: "desirability", title: "Desirability" },
9156
9159
  { key: "feasibility", title: "Feasibility" },
@@ -9182,7 +9185,7 @@ function Yn(e) {
9182
9185
  }
9183
9186
  return kr(e);
9184
9187
  }
9185
- function Hw(e) {
9188
+ function zw(e) {
9186
9189
  const t = e.find((r) => r.type === "tool_result");
9187
9190
  if (!t) return null;
9188
9191
  const n = t.output;
@@ -9246,7 +9249,7 @@ const rl = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, yd = Y.forwa
9246
9249
  J(), _.disconnect();
9247
9250
  };
9248
9251
  }, [t]);
9249
- const G = t && b && T.current && !v ? "smooth" : !1, P = an(() => {
9252
+ const G = (t || e.length > N.current) && b && T.current && !v ? "smooth" : !1, P = an(() => {
9250
9253
  }, []), X = {
9251
9254
  display: "flex",
9252
9255
  flexDirection: "column",
@@ -9261,7 +9264,7 @@ const rl = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, yd = Y.forwa
9261
9264
  contain: "layout style paint"
9262
9265
  };
9263
9266
  return e.length === 0 ? /* @__PURE__ */ c.jsx("div", { className: h, style: m, children: /* @__PURE__ */ c.jsx("div", { className: "flex items-center justify-center py-8 text-muted-foreground text-center max-w-md mx-auto", children: g || "No messages yet. Start a conversation!" }) }) : /* @__PURE__ */ c.jsx("div", { className: h, style: m, children: /* @__PURE__ */ c.jsx(
9264
- wx,
9267
+ yx,
9265
9268
  {
9266
9269
  ref: (M) => {
9267
9270
  y.current = M;
@@ -9313,7 +9316,7 @@ const rl = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, yd = Y.forwa
9313
9316
  isolation: "isolate"
9314
9317
  },
9315
9318
  children: /* @__PURE__ */ c.jsx(
9316
- kw,
9319
+ Aw,
9317
9320
  {
9318
9321
  message: J,
9319
9322
  messageIndex: M,
@@ -9340,7 +9343,7 @@ const rl = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, yd = Y.forwa
9340
9343
  });
9341
9344
  yd.displayName = "MessageList";
9342
9345
  const Eo = 1e4;
9343
- function zw(e) {
9346
+ function Uw(e) {
9344
9347
  if (typeof e != "string")
9345
9348
  return String(e);
9346
9349
  const t = [
@@ -9367,16 +9370,16 @@ function zw(e) {
9367
9370
  `).replace(/<li>(.*?)<\/li>/gi, `- $1
9368
9371
  `).trim() : n.replace(/</g, "&lt;").replace(/>/g, "&gt;").trim();
9369
9372
  }
9370
- function Uw(e, t = Eo) {
9373
+ function Ww(e, t = Eo) {
9371
9374
  if (!e || typeof e != "string")
9372
9375
  throw new Error("Invalid content: must be a non-empty string");
9373
9376
  if (e.length > t)
9374
9377
  throw new Error(`Message exceeds maximum length of ${t} characters`);
9375
9378
  return e;
9376
9379
  }
9377
- function Ww(e) {
9380
+ function Vw(e) {
9378
9381
  let t;
9379
- return typeof e == "string" ? t = e : typeof e == "object" && e !== null ? t = JSON.stringify(e) : t = String(e), Uw(t), zw(t);
9382
+ return typeof e == "string" ? t = e : typeof e == "object" && e !== null ? t = JSON.stringify(e) : t = String(e), Ww(t), Uw(t);
9380
9383
  }
9381
9384
  function va(e) {
9382
9385
  const t = e + "CollectionProvider", [n, r] = Wt(t), [o, s] = n(
@@ -9418,20 +9421,20 @@ function va(e) {
9418
9421
  r
9419
9422
  ];
9420
9423
  }
9421
- var Vw = f.createContext(void 0);
9424
+ var Gw = f.createContext(void 0);
9422
9425
  function vs(e) {
9423
- const t = f.useContext(Vw);
9426
+ const t = f.useContext(Gw);
9424
9427
  return e || t || "ltr";
9425
9428
  }
9426
- const Gw = ["top", "right", "bottom", "left"], bn = Math.min, Ct = Math.max, Ho = Math.round, fo = Math.floor, Qt = (e) => ({
9429
+ const Kw = ["top", "right", "bottom", "left"], bn = Math.min, Ct = Math.max, Ho = Math.round, fo = Math.floor, Qt = (e) => ({
9427
9430
  x: e,
9428
9431
  y: e
9429
- }), Kw = {
9432
+ }), Yw = {
9430
9433
  left: "right",
9431
9434
  right: "left",
9432
9435
  bottom: "top",
9433
9436
  top: "bottom"
9434
- }, Yw = {
9437
+ }, qw = {
9435
9438
  start: "end",
9436
9439
  end: "start"
9437
9440
  };
@@ -9453,48 +9456,48 @@ function xa(e) {
9453
9456
  function ba(e) {
9454
9457
  return e === "y" ? "height" : "width";
9455
9458
  }
9456
- const qw = /* @__PURE__ */ new Set(["top", "bottom"]);
9459
+ const Xw = /* @__PURE__ */ new Set(["top", "bottom"]);
9457
9460
  function Zt(e) {
9458
- return qw.has(un(e)) ? "y" : "x";
9461
+ return Xw.has(un(e)) ? "y" : "x";
9459
9462
  }
9460
9463
  function wa(e) {
9461
9464
  return xa(Zt(e));
9462
9465
  }
9463
- function Xw(e, t, n) {
9466
+ function Jw(e, t, n) {
9464
9467
  n === void 0 && (n = !1);
9465
9468
  const r = dr(e), o = wa(e), s = ba(o);
9466
9469
  let i = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
9467
9470
  return t.reference[s] > t.floating[s] && (i = zo(i)), [i, zo(i)];
9468
9471
  }
9469
- function Jw(e) {
9472
+ function Zw(e) {
9470
9473
  const t = zo(e);
9471
9474
  return [Ni(e), t, Ni(t)];
9472
9475
  }
9473
9476
  function Ni(e) {
9474
- return e.replace(/start|end/g, (t) => Yw[t]);
9477
+ return e.replace(/start|end/g, (t) => qw[t]);
9475
9478
  }
9476
- const ol = ["left", "right"], sl = ["right", "left"], Zw = ["top", "bottom"], Qw = ["bottom", "top"];
9477
- function ey(e, t, n) {
9479
+ const ol = ["left", "right"], sl = ["right", "left"], Qw = ["top", "bottom"], ey = ["bottom", "top"];
9480
+ function ty(e, t, n) {
9478
9481
  switch (e) {
9479
9482
  case "top":
9480
9483
  case "bottom":
9481
9484
  return n ? t ? sl : ol : t ? ol : sl;
9482
9485
  case "left":
9483
9486
  case "right":
9484
- return t ? Zw : Qw;
9487
+ return t ? Qw : ey;
9485
9488
  default:
9486
9489
  return [];
9487
9490
  }
9488
9491
  }
9489
- function ty(e, t, n, r) {
9492
+ function ny(e, t, n, r) {
9490
9493
  const o = dr(e);
9491
- let s = ey(un(e), n === "start", r);
9494
+ let s = ty(un(e), n === "start", r);
9492
9495
  return o && (s = s.map((i) => i + "-" + o), t && (s = s.concat(s.map(Ni)))), s;
9493
9496
  }
9494
9497
  function zo(e) {
9495
- return e.replace(/left|right|bottom|top/g, (t) => Kw[t]);
9498
+ return e.replace(/left|right|bottom|top/g, (t) => Yw[t]);
9496
9499
  }
9497
- function ny(e) {
9500
+ function ry(e) {
9498
9501
  return {
9499
9502
  top: 0,
9500
9503
  right: 0,
@@ -9504,7 +9507,7 @@ function ny(e) {
9504
9507
  };
9505
9508
  }
9506
9509
  function Sd(e) {
9507
- return typeof e != "number" ? ny(e) : {
9510
+ return typeof e != "number" ? ry(e) : {
9508
9511
  top: e,
9509
9512
  right: e,
9510
9513
  bottom: e,
@@ -9577,7 +9580,7 @@ function il(e, t, n) {
9577
9580
  }
9578
9581
  return g;
9579
9582
  }
9580
- const ry = async (e, t, n) => {
9583
+ const oy = async (e, t, n) => {
9581
9584
  const {
9582
9585
  placement: r = "bottom",
9583
9586
  strategy: o = "absolute",
@@ -9683,7 +9686,7 @@ async function Dr(e, t) {
9683
9686
  right: (S.right - x.right + b.right) / E.x
9684
9687
  };
9685
9688
  }
9686
- const oy = (e) => ({
9689
+ const sy = (e) => ({
9687
9690
  name: "arrow",
9688
9691
  options: e,
9689
9692
  async fn(t) {
@@ -9720,7 +9723,7 @@ const oy = (e) => ({
9720
9723
  reset: M
9721
9724
  };
9722
9725
  }
9723
- }), sy = function(e) {
9726
+ }), iy = function(e) {
9724
9727
  return e === void 0 && (e = {}), {
9725
9728
  name: "flip",
9726
9729
  options: e,
@@ -9744,12 +9747,12 @@ const oy = (e) => ({
9744
9747
  } = ln(e, t);
9745
9748
  if ((n = s.arrow) != null && n.alignmentOffset)
9746
9749
  return {};
9747
- const x = un(o), w = Zt(a), y = un(a) === a, E = await (l.isRTL == null ? void 0 : l.isRTL(u.floating)), S = m || (y || !v ? [zo(a)] : Jw(a)), T = b !== "none";
9748
- !m && T && S.push(...ty(a, v, b, E));
9750
+ const x = un(o), w = Zt(a), y = un(a) === a, E = await (l.isRTL == null ? void 0 : l.isRTL(u.floating)), S = m || (y || !v ? [zo(a)] : Zw(a)), T = b !== "none";
9751
+ !m && T && S.push(...ny(a, v, b, E));
9749
9752
  const C = [a, ...S], N = await Dr(t, p), I = [];
9750
9753
  let j = ((r = s.flip) == null ? void 0 : r.overflows) || [];
9751
9754
  if (d && I.push(N[x]), h) {
9752
- const P = Xw(o, i, E);
9755
+ const P = Jw(o, i, E);
9753
9756
  I.push(N[P[0]], N[P[1]]);
9754
9757
  }
9755
9758
  if (j = [...j, {
@@ -9811,9 +9814,9 @@ function al(e, t) {
9811
9814
  };
9812
9815
  }
9813
9816
  function cl(e) {
9814
- return Gw.some((t) => e[t] >= 0);
9817
+ return Kw.some((t) => e[t] >= 0);
9815
9818
  }
9816
- const iy = function(e) {
9819
+ const ay = function(e) {
9817
9820
  return e === void 0 && (e = {}), {
9818
9821
  name: "hide",
9819
9822
  options: e,
@@ -9855,7 +9858,7 @@ const iy = function(e) {
9855
9858
  }
9856
9859
  };
9857
9860
  }, Cd = /* @__PURE__ */ new Set(["left", "top"]);
9858
- async function ay(e, t) {
9861
+ async function cy(e, t) {
9859
9862
  const {
9860
9863
  placement: n,
9861
9864
  platform: r,
@@ -9882,7 +9885,7 @@ async function ay(e, t) {
9882
9885
  y: g * d
9883
9886
  };
9884
9887
  }
9885
- const cy = function(e) {
9888
+ const ly = function(e) {
9886
9889
  return e === void 0 && (e = 0), {
9887
9890
  name: "offset",
9888
9891
  options: e,
@@ -9893,7 +9896,7 @@ const cy = function(e) {
9893
9896
  y: s,
9894
9897
  placement: i,
9895
9898
  middlewareData: a
9896
- } = t, l = await ay(t, e);
9899
+ } = t, l = await cy(t, e);
9897
9900
  return i === ((n = a.offset) == null ? void 0 : n.placement) && (r = a.arrow) != null && r.alignmentOffset ? {} : {
9898
9901
  x: o + l.x,
9899
9902
  y: s + l.y,
@@ -9904,7 +9907,7 @@ const cy = function(e) {
9904
9907
  };
9905
9908
  }
9906
9909
  };
9907
- }, ly = function(e) {
9910
+ }, uy = function(e) {
9908
9911
  return e === void 0 && (e = {}), {
9909
9912
  name: "shift",
9910
9913
  options: e,
@@ -9960,7 +9963,7 @@ const cy = function(e) {
9960
9963
  };
9961
9964
  }
9962
9965
  };
9963
- }, uy = function(e) {
9966
+ }, dy = function(e) {
9964
9967
  return e === void 0 && (e = {}), {
9965
9968
  options: e,
9966
9969
  fn(t) {
@@ -10002,7 +10005,7 @@ const cy = function(e) {
10002
10005
  };
10003
10006
  }
10004
10007
  };
10005
- }, dy = function(e) {
10008
+ }, fy = function(e) {
10006
10009
  return e === void 0 && (e = {}), {
10007
10010
  name: "size",
10008
10011
  options: e,
@@ -10069,7 +10072,7 @@ function en(e) {
10069
10072
  function ll(e) {
10070
10073
  return !xs() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof Et(e).ShadowRoot;
10071
10074
  }
10072
- const fy = /* @__PURE__ */ new Set(["inline", "contents"]);
10075
+ const hy = /* @__PURE__ */ new Set(["inline", "contents"]);
10073
10076
  function Jr(e) {
10074
10077
  const {
10075
10078
  overflow: t,
@@ -10077,15 +10080,15 @@ function Jr(e) {
10077
10080
  overflowY: r,
10078
10081
  display: o
10079
10082
  } = zt(e);
10080
- return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !fy.has(o);
10083
+ return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !hy.has(o);
10081
10084
  }
10082
- const hy = /* @__PURE__ */ new Set(["table", "td", "th"]);
10083
- function py(e) {
10084
- return hy.has(fr(e));
10085
+ const py = /* @__PURE__ */ new Set(["table", "td", "th"]);
10086
+ function my(e) {
10087
+ return py.has(fr(e));
10085
10088
  }
10086
- const my = [":popover-open", ":modal"];
10089
+ const gy = [":popover-open", ":modal"];
10087
10090
  function bs(e) {
10088
- return my.some((t) => {
10091
+ return gy.some((t) => {
10089
10092
  try {
10090
10093
  return e.matches(t);
10091
10094
  } catch {
@@ -10093,12 +10096,12 @@ function bs(e) {
10093
10096
  }
10094
10097
  });
10095
10098
  }
10096
- const gy = ["transform", "translate", "scale", "rotate", "perspective"], vy = ["transform", "translate", "scale", "rotate", "perspective", "filter"], xy = ["paint", "layout", "strict", "content"];
10099
+ const vy = ["transform", "translate", "scale", "rotate", "perspective"], xy = ["transform", "translate", "scale", "rotate", "perspective", "filter"], by = ["paint", "layout", "strict", "content"];
10097
10100
  function ya(e) {
10098
10101
  const t = Sa(), n = Ht(e) ? zt(e) : e;
10099
- return gy.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || vy.some((r) => (n.willChange || "").includes(r)) || xy.some((r) => (n.contain || "").includes(r));
10102
+ return vy.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || xy.some((r) => (n.willChange || "").includes(r)) || by.some((r) => (n.contain || "").includes(r));
10100
10103
  }
10101
- function by(e) {
10104
+ function wy(e) {
10102
10105
  let t = wn(e);
10103
10106
  for (; en(t) && !rr(t); ) {
10104
10107
  if (ya(t))
@@ -10112,9 +10115,9 @@ function by(e) {
10112
10115
  function Sa() {
10113
10116
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
10114
10117
  }
10115
- const wy = /* @__PURE__ */ new Set(["html", "body", "#document"]);
10118
+ const yy = /* @__PURE__ */ new Set(["html", "body", "#document"]);
10116
10119
  function rr(e) {
10117
- return wy.has(fr(e));
10120
+ return yy.has(fr(e));
10118
10121
  }
10119
10122
  function zt(e) {
10120
10123
  return Et(e).getComputedStyle(e);
@@ -10185,15 +10188,15 @@ function Qn(e) {
10185
10188
  y: a
10186
10189
  };
10187
10190
  }
10188
- const yy = /* @__PURE__ */ Qt(0);
10191
+ const Sy = /* @__PURE__ */ Qt(0);
10189
10192
  function Nd(e) {
10190
10193
  const t = Et(e);
10191
- return !Sa() || !t.visualViewport ? yy : {
10194
+ return !Sa() || !t.visualViewport ? Sy : {
10192
10195
  x: t.visualViewport.offsetLeft,
10193
10196
  y: t.visualViewport.offsetTop
10194
10197
  };
10195
10198
  }
10196
- function Sy(e, t, n) {
10199
+ function Cy(e, t, n) {
10197
10200
  return t === void 0 && (t = !1), !n || t && n !== Et(e) ? !1 : t;
10198
10201
  }
10199
10202
  function Mn(e, t, n, r) {
@@ -10201,7 +10204,7 @@ function Mn(e, t, n, r) {
10201
10204
  const o = e.getBoundingClientRect(), s = Ca(e);
10202
10205
  let i = Qt(1);
10203
10206
  t && (r ? Ht(r) && (i = Qn(r)) : i = Qn(e));
10204
- const a = Sy(s, n, r) ? Nd(s) : Qt(0);
10207
+ const a = Cy(s, n, r) ? Nd(s) : Qt(0);
10205
10208
  let l = (o.left + a.x) / i.x, u = (o.top + a.y) / i.y, d = o.width / i.x, h = o.height / i.y;
10206
10209
  if (s) {
10207
10210
  const m = Et(s), g = r && Ht(r) ? Et(r) : r;
@@ -10229,7 +10232,7 @@ function Id(e, t) {
10229
10232
  y: o
10230
10233
  };
10231
10234
  }
10232
- function Cy(e) {
10235
+ function Ty(e) {
10233
10236
  let {
10234
10237
  elements: t,
10235
10238
  rect: n,
@@ -10256,10 +10259,10 @@ function Cy(e) {
10256
10259
  y: n.y * u.y - l.scrollTop * u.y + d.y + m.y
10257
10260
  };
10258
10261
  }
10259
- function Ty(e) {
10262
+ function Ry(e) {
10260
10263
  return Array.from(e.getClientRects());
10261
10264
  }
10262
- function Ry(e) {
10265
+ function Ey(e) {
10263
10266
  const t = nn(e), n = ws(e), r = e.ownerDocument.body, o = Ct(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), s = Ct(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
10264
10267
  let i = -n.scrollLeft + ys(e);
10265
10268
  const a = -n.scrollTop;
@@ -10271,7 +10274,7 @@ function Ry(e) {
10271
10274
  };
10272
10275
  }
10273
10276
  const ul = 25;
10274
- function Ey(e, t) {
10277
+ function Ny(e, t) {
10275
10278
  const n = Et(e), r = nn(e), o = n.visualViewport;
10276
10279
  let s = r.clientWidth, i = r.clientHeight, a = 0, l = 0;
10277
10280
  if (o) {
@@ -10291,8 +10294,8 @@ function Ey(e, t) {
10291
10294
  y: l
10292
10295
  };
10293
10296
  }
10294
- const Ny = /* @__PURE__ */ new Set(["absolute", "fixed"]);
10295
- function Iy(e, t) {
10297
+ const Iy = /* @__PURE__ */ new Set(["absolute", "fixed"]);
10298
+ function jy(e, t) {
10296
10299
  const n = Mn(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = en(e) ? Qn(e) : Qt(1), i = e.clientWidth * s.x, a = e.clientHeight * s.y, l = o * s.x, u = r * s.y;
10297
10300
  return {
10298
10301
  width: i,
@@ -10304,11 +10307,11 @@ function Iy(e, t) {
10304
10307
  function dl(e, t, n) {
10305
10308
  let r;
10306
10309
  if (t === "viewport")
10307
- r = Ey(e, n);
10310
+ r = Ny(e, n);
10308
10311
  else if (t === "document")
10309
- r = Ry(nn(e));
10312
+ r = Ey(nn(e));
10310
10313
  else if (Ht(t))
10311
- r = Iy(t, n);
10314
+ r = jy(t, n);
10312
10315
  else {
10313
10316
  const o = Nd(e);
10314
10317
  r = {
@@ -10324,7 +10327,7 @@ function jd(e, t) {
10324
10327
  const n = wn(e);
10325
10328
  return n === t || !Ht(n) || rr(n) ? !1 : zt(n).position === "fixed" || jd(n, t);
10326
10329
  }
10327
- function jy(e, t) {
10330
+ function ky(e, t) {
10328
10331
  const n = t.get(e);
10329
10332
  if (n)
10330
10333
  return n;
@@ -10333,18 +10336,18 @@ function jy(e, t) {
10333
10336
  let i = s ? wn(e) : e;
10334
10337
  for (; Ht(i) && !rr(i); ) {
10335
10338
  const a = zt(i), l = ya(i);
10336
- !l && a.position === "fixed" && (o = null), (s ? !l && !o : !l && a.position === "static" && !!o && Ny.has(o.position) || Jr(i) && !l && jd(e, i)) ? r = r.filter((d) => d !== i) : o = a, i = wn(i);
10339
+ !l && a.position === "fixed" && (o = null), (s ? !l && !o : !l && a.position === "static" && !!o && Iy.has(o.position) || Jr(i) && !l && jd(e, i)) ? r = r.filter((d) => d !== i) : o = a, i = wn(i);
10337
10340
  }
10338
10341
  return t.set(e, r), r;
10339
10342
  }
10340
- function ky(e) {
10343
+ function Ay(e) {
10341
10344
  let {
10342
10345
  element: t,
10343
10346
  boundary: n,
10344
10347
  rootBoundary: r,
10345
10348
  strategy: o
10346
10349
  } = e;
10347
- const i = [...n === "clippingAncestors" ? bs(t) ? [] : jy(t, this._c) : [].concat(n), r], a = i[0], l = i.reduce((u, d) => {
10350
+ const i = [...n === "clippingAncestors" ? bs(t) ? [] : ky(t, this._c) : [].concat(n), r], a = i[0], l = i.reduce((u, d) => {
10348
10351
  const h = dl(t, d, o);
10349
10352
  return u.top = Ct(h.top, u.top), u.right = bn(h.right, u.right), u.bottom = bn(h.bottom, u.bottom), u.left = Ct(h.left, u.left), u;
10350
10353
  }, dl(t, a, o));
@@ -10355,7 +10358,7 @@ function ky(e) {
10355
10358
  y: l.top
10356
10359
  };
10357
10360
  }
10358
- function Ay(e) {
10361
+ function Py(e) {
10359
10362
  const {
10360
10363
  width: t,
10361
10364
  height: n
@@ -10365,7 +10368,7 @@ function Ay(e) {
10365
10368
  height: n
10366
10369
  };
10367
10370
  }
10368
- function Py(e, t, n) {
10371
+ function _y(e, t, n) {
10369
10372
  const r = en(t), o = nn(t), s = n === "fixed", i = Mn(e, !0, s, t);
10370
10373
  let a = {
10371
10374
  scrollLeft: 0,
@@ -10414,14 +10417,14 @@ function kd(e, t) {
10414
10417
  return n;
10415
10418
  }
10416
10419
  let r = fl(e, t);
10417
- for (; r && py(r) && ri(r); )
10420
+ for (; r && my(r) && ri(r); )
10418
10421
  r = fl(r, t);
10419
- return r && rr(r) && ri(r) && !ya(r) ? n : r || by(e) || n;
10422
+ return r && rr(r) && ri(r) && !ya(r) ? n : r || wy(e) || n;
10420
10423
  }
10421
- const _y = async function(e) {
10424
+ const Oy = async function(e) {
10422
10425
  const t = this.getOffsetParent || kd, n = this.getDimensions, r = await n(e.floating);
10423
10426
  return {
10424
- reference: Py(e.reference, await t(e.floating), e.strategy),
10427
+ reference: _y(e.reference, await t(e.floating), e.strategy),
10425
10428
  floating: {
10426
10429
  x: 0,
10427
10430
  y: 0,
@@ -10430,25 +10433,25 @@ const _y = async function(e) {
10430
10433
  }
10431
10434
  };
10432
10435
  };
10433
- function Oy(e) {
10436
+ function My(e) {
10434
10437
  return zt(e).direction === "rtl";
10435
10438
  }
10436
- const My = {
10437
- convertOffsetParentRelativeRectToViewportRelativeRect: Cy,
10439
+ const Dy = {
10440
+ convertOffsetParentRelativeRectToViewportRelativeRect: Ty,
10438
10441
  getDocumentElement: nn,
10439
- getClippingRect: ky,
10442
+ getClippingRect: Ay,
10440
10443
  getOffsetParent: kd,
10441
- getElementRects: _y,
10442
- getClientRects: Ty,
10443
- getDimensions: Ay,
10444
+ getElementRects: Oy,
10445
+ getClientRects: Ry,
10446
+ getDimensions: Py,
10444
10447
  getScale: Qn,
10445
10448
  isElement: Ht,
10446
- isRTL: Oy
10449
+ isRTL: My
10447
10450
  };
10448
10451
  function Ad(e, t) {
10449
10452
  return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
10450
10453
  }
10451
- function Dy(e, t) {
10454
+ function Ly(e, t) {
10452
10455
  let n = null, r;
10453
10456
  const o = nn(e);
10454
10457
  function s() {
@@ -10494,7 +10497,7 @@ function Dy(e, t) {
10494
10497
  }
10495
10498
  return i(!0), s;
10496
10499
  }
10497
- function Ly(e, t, n, r) {
10500
+ function Fy(e, t, n, r) {
10498
10501
  r === void 0 && (r = {});
10499
10502
  const {
10500
10503
  ancestorScroll: o = !0,
@@ -10508,7 +10511,7 @@ function Ly(e, t, n, r) {
10508
10511
  passive: !0
10509
10512
  }), s && x.addEventListener("resize", n);
10510
10513
  });
10511
- const h = u && a ? Dy(u, n) : null;
10514
+ const h = u && a ? Ly(u, n) : null;
10512
10515
  let m = -1, g = null;
10513
10516
  i && (g = new ResizeObserver((x) => {
10514
10517
  let [w] = x;
@@ -10530,21 +10533,21 @@ function Ly(e, t, n, r) {
10530
10533
  }), h == null || h(), (x = g) == null || x.disconnect(), g = null, l && cancelAnimationFrame(b);
10531
10534
  };
10532
10535
  }
10533
- const Fy = cy, By = ly, $y = sy, Hy = dy, zy = iy, hl = oy, Uy = uy, Wy = (e, t, n) => {
10536
+ const By = ly, $y = uy, Hy = iy, zy = fy, Uy = ay, hl = sy, Wy = dy, Vy = (e, t, n) => {
10534
10537
  const r = /* @__PURE__ */ new Map(), o = {
10535
- platform: My,
10538
+ platform: Dy,
10536
10539
  ...n
10537
10540
  }, s = {
10538
10541
  ...o.platform,
10539
10542
  _c: r
10540
10543
  };
10541
- return ry(e, t, {
10544
+ return oy(e, t, {
10542
10545
  ...o,
10543
10546
  platform: s
10544
10547
  });
10545
10548
  };
10546
- var Vy = typeof document < "u", Gy = function() {
10547
- }, No = Vy ? Fp : Gy;
10549
+ var Gy = typeof document < "u", Ky = function() {
10550
+ }, No = Gy ? Fp : Ky;
10548
10551
  function Wo(e, t) {
10549
10552
  if (e === t)
10550
10553
  return !0;
@@ -10588,7 +10591,7 @@ function oi(e) {
10588
10591
  t.current = e;
10589
10592
  }), t;
10590
10593
  }
10591
- function Ky(e) {
10594
+ function Yy(e) {
10592
10595
  e === void 0 && (e = {});
10593
10596
  const {
10594
10597
  placement: t = "bottom",
@@ -10623,7 +10626,7 @@ function Ky(e) {
10623
10626
  strategy: n,
10624
10627
  middleware: m
10625
10628
  };
10626
- L.current && (_.platform = L.current), Wy(T.current, C.current, _).then((O) => {
10629
+ L.current && (_.platform = L.current), Vy(T.current, C.current, _).then((O) => {
10627
10630
  const W = {
10628
10631
  ...O,
10629
10632
  // The floating element's position may be recomputed while it's closed
@@ -10690,7 +10693,7 @@ function Ky(e) {
10690
10693
  floatingStyles: J
10691
10694
  }), [d, G, X, M, J]);
10692
10695
  }
10693
- const Yy = (e) => {
10696
+ const qy = (e) => {
10694
10697
  function t(n) {
10695
10698
  return {}.hasOwnProperty.call(n, "current");
10696
10699
  }
@@ -10711,17 +10714,14 @@ const Yy = (e) => {
10711
10714
  }).fn(n) : {};
10712
10715
  }
10713
10716
  };
10714
- }, qy = (e, t) => ({
10715
- ...Fy(e),
10716
- options: [e, t]
10717
- }), Xy = (e, t) => ({
10717
+ }, Xy = (e, t) => ({
10718
10718
  ...By(e),
10719
10719
  options: [e, t]
10720
10720
  }), Jy = (e, t) => ({
10721
- ...Uy(e),
10721
+ ...$y(e),
10722
10722
  options: [e, t]
10723
10723
  }), Zy = (e, t) => ({
10724
- ...$y(e),
10724
+ ...Wy(e),
10725
10725
  options: [e, t]
10726
10726
  }), Qy = (e, t) => ({
10727
10727
  ...Hy(e),
@@ -10730,10 +10730,13 @@ const Yy = (e) => {
10730
10730
  ...zy(e),
10731
10731
  options: [e, t]
10732
10732
  }), t0 = (e, t) => ({
10733
- ...Yy(e),
10733
+ ...Uy(e),
10734
+ options: [e, t]
10735
+ }), n0 = (e, t) => ({
10736
+ ...qy(e),
10734
10737
  options: [e, t]
10735
10738
  });
10736
- var n0 = "Arrow", _d = f.forwardRef((e, t) => {
10739
+ var r0 = "Arrow", _d = f.forwardRef((e, t) => {
10737
10740
  const { children: n, width: r = 10, height: o = 5, ...s } = e;
10738
10741
  return /* @__PURE__ */ c.jsx(
10739
10742
  xe.svg,
@@ -10748,8 +10751,8 @@ var n0 = "Arrow", _d = f.forwardRef((e, t) => {
10748
10751
  }
10749
10752
  );
10750
10753
  });
10751
- _d.displayName = n0;
10752
- var r0 = _d;
10754
+ _d.displayName = r0;
10755
+ var o0 = _d;
10753
10756
  function Od(e) {
10754
10757
  const [t, n] = f.useState(void 0);
10755
10758
  return ot(() => {
@@ -10772,9 +10775,9 @@ function Od(e) {
10772
10775
  n(void 0);
10773
10776
  }, [e]), t;
10774
10777
  }
10775
- var Ta = "Popper", [Md, hr] = Wt(Ta), [o0, Dd] = Md(Ta), Ld = (e) => {
10778
+ var Ta = "Popper", [Md, hr] = Wt(Ta), [s0, Dd] = Md(Ta), Ld = (e) => {
10776
10779
  const { __scopePopper: t, children: n } = e, [r, o] = f.useState(null);
10777
- return /* @__PURE__ */ c.jsx(o0, { scope: t, anchor: r, onAnchorChange: o, children: n });
10780
+ return /* @__PURE__ */ c.jsx(s0, { scope: t, anchor: r, onAnchorChange: o, children: n });
10778
10781
  };
10779
10782
  Ld.displayName = Ta;
10780
10783
  var Fd = "PopperAnchor", Bd = f.forwardRef(
@@ -10787,7 +10790,7 @@ var Fd = "PopperAnchor", Bd = f.forwardRef(
10787
10790
  }
10788
10791
  );
10789
10792
  Bd.displayName = Fd;
10790
- var Ra = "PopperContent", [s0, i0] = Md(Ra), $d = f.forwardRef(
10793
+ var Ra = "PopperContent", [i0, a0] = Md(Ra), $d = f.forwardRef(
10791
10794
  (e, t) => {
10792
10795
  var $, A, K, te, ce, se;
10793
10796
  const {
@@ -10807,38 +10810,38 @@ var Ra = "PopperContent", [s0, i0] = Md(Ra), $d = f.forwardRef(
10807
10810
  ...v
10808
10811
  } = e, p = Dd(Ra, n), [x, w] = f.useState(null), y = Re(t, (Ce) => w(Ce)), [E, S] = f.useState(null), T = Od(E), C = (T == null ? void 0 : T.width) ?? 0, N = (T == null ? void 0 : T.height) ?? 0, I = r + (s !== "center" ? "-" + s : ""), j = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, L = Array.isArray(u) ? u : [u], H = L.length > 0, G = {
10809
10812
  padding: j,
10810
- boundary: L.filter(c0),
10813
+ boundary: L.filter(l0),
10811
10814
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
10812
10815
  altBoundary: H
10813
- }, { refs: P, floatingStyles: X, placement: M, isPositioned: J, middlewareData: _ } = Ky({
10816
+ }, { refs: P, floatingStyles: X, placement: M, isPositioned: J, middlewareData: _ } = Yy({
10814
10817
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
10815
10818
  strategy: "fixed",
10816
10819
  placement: I,
10817
- whileElementsMounted: (...Ce) => Ly(...Ce, {
10820
+ whileElementsMounted: (...Ce) => Fy(...Ce, {
10818
10821
  animationFrame: g === "always"
10819
10822
  }),
10820
10823
  elements: {
10821
10824
  reference: p.anchor
10822
10825
  },
10823
10826
  middleware: [
10824
- qy({ mainAxis: o + N, alignmentAxis: i }),
10825
- l && Xy({
10827
+ Xy({ mainAxis: o + N, alignmentAxis: i }),
10828
+ l && Jy({
10826
10829
  mainAxis: !0,
10827
10830
  crossAxis: !1,
10828
- limiter: h === "partial" ? Jy() : void 0,
10831
+ limiter: h === "partial" ? Zy() : void 0,
10829
10832
  ...G
10830
10833
  }),
10831
- l && Zy({ ...G }),
10832
- Qy({
10834
+ l && Qy({ ...G }),
10835
+ e0({
10833
10836
  ...G,
10834
10837
  apply: ({ elements: Ce, rects: Pe, availableWidth: je, availableHeight: ue }) => {
10835
10838
  const { width: pe, height: Le } = Pe.reference, he = Ce.floating.style;
10836
10839
  he.setProperty("--radix-popper-available-width", `${je}px`), he.setProperty("--radix-popper-available-height", `${ue}px`), he.setProperty("--radix-popper-anchor-width", `${pe}px`), he.setProperty("--radix-popper-anchor-height", `${Le}px`);
10837
10840
  }
10838
10841
  }),
10839
- E && t0({ element: E, padding: a }),
10840
- l0({ arrowWidth: C, arrowHeight: N }),
10841
- m && e0({ strategy: "referenceHidden", ...G })
10842
+ E && n0({ element: E, padding: a }),
10843
+ u0({ arrowWidth: C, arrowHeight: N }),
10844
+ m && t0({ strategy: "referenceHidden", ...G })
10842
10845
  ]
10843
10846
  }), [O, W] = Ud(M), V = at(b);
10844
10847
  ot(() => {
@@ -10872,7 +10875,7 @@ var Ra = "PopperContent", [s0, i0] = Md(Ra), $d = f.forwardRef(
10872
10875
  },
10873
10876
  dir: e.dir,
10874
10877
  children: /* @__PURE__ */ c.jsx(
10875
- s0,
10878
+ i0,
10876
10879
  {
10877
10880
  scope: n,
10878
10881
  placedSide: O,
@@ -10902,13 +10905,13 @@ var Ra = "PopperContent", [s0, i0] = Md(Ra), $d = f.forwardRef(
10902
10905
  }
10903
10906
  );
10904
10907
  $d.displayName = Ra;
10905
- var Hd = "PopperArrow", a0 = {
10908
+ var Hd = "PopperArrow", c0 = {
10906
10909
  top: "bottom",
10907
10910
  right: "left",
10908
10911
  bottom: "top",
10909
10912
  left: "right"
10910
10913
  }, zd = f.forwardRef(function(t, n) {
10911
- const { __scopePopper: r, ...o } = t, s = i0(Hd, r), i = a0[s.placedSide];
10914
+ const { __scopePopper: r, ...o } = t, s = a0(Hd, r), i = c0[s.placedSide];
10912
10915
  return (
10913
10916
  // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
10914
10917
  // doesn't report size as we'd expect on SVG elements.
@@ -10937,7 +10940,7 @@ var Hd = "PopperArrow", a0 = {
10937
10940
  visibility: s.shouldHideArrow ? "hidden" : void 0
10938
10941
  },
10939
10942
  children: /* @__PURE__ */ c.jsx(
10940
- r0,
10943
+ o0,
10941
10944
  {
10942
10945
  ...o,
10943
10946
  ref: n,
@@ -10953,10 +10956,10 @@ var Hd = "PopperArrow", a0 = {
10953
10956
  );
10954
10957
  });
10955
10958
  zd.displayName = Hd;
10956
- function c0(e) {
10959
+ function l0(e) {
10957
10960
  return e !== null;
10958
10961
  }
10959
- var l0 = (e) => ({
10962
+ var u0 = (e) => ({
10960
10963
  name: "transformOrigin",
10961
10964
  options: e,
10962
10965
  fn(t) {
@@ -10970,14 +10973,14 @@ function Ud(e) {
10970
10973
  const [t, n = "center"] = e.split("-");
10971
10974
  return [t, n];
10972
10975
  }
10973
- var Ea = Ld, Na = Bd, Ia = $d, ja = zd, si = "rovingFocusGroup.onEntryFocus", u0 = { bubbles: !1, cancelable: !0 }, Zr = "RovingFocusGroup", [ji, Wd, d0] = va(Zr), [f0, Vd] = Wt(
10976
+ var Ea = Ld, Na = Bd, Ia = $d, ja = zd, si = "rovingFocusGroup.onEntryFocus", d0 = { bubbles: !1, cancelable: !0 }, Zr = "RovingFocusGroup", [ji, Wd, f0] = va(Zr), [h0, Vd] = Wt(
10974
10977
  Zr,
10975
- [d0]
10976
- ), [h0, p0] = f0(Zr), Gd = f.forwardRef(
10977
- (e, t) => /* @__PURE__ */ c.jsx(ji.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ c.jsx(ji.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ c.jsx(m0, { ...e, ref: t }) }) })
10978
+ [f0]
10979
+ ), [p0, m0] = h0(Zr), Gd = f.forwardRef(
10980
+ (e, t) => /* @__PURE__ */ c.jsx(ji.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ c.jsx(ji.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ c.jsx(g0, { ...e, ref: t }) }) })
10978
10981
  );
10979
10982
  Gd.displayName = Zr;
10980
- var m0 = f.forwardRef((e, t) => {
10983
+ var g0 = f.forwardRef((e, t) => {
10981
10984
  const {
10982
10985
  __scopeRovingFocusGroup: n,
10983
10986
  orientation: r,
@@ -11000,7 +11003,7 @@ var m0 = f.forwardRef((e, t) => {
11000
11003
  if (N)
11001
11004
  return N.addEventListener(si, y), () => N.removeEventListener(si, y);
11002
11005
  }, [y]), /* @__PURE__ */ c.jsx(
11003
- h0,
11006
+ p0,
11004
11007
  {
11005
11008
  scope: n,
11006
11009
  orientation: r,
@@ -11034,7 +11037,7 @@ var m0 = f.forwardRef((e, t) => {
11034
11037
  onFocus: ne(e.onFocus, (N) => {
11035
11038
  const I = !S.current;
11036
11039
  if (N.target === N.currentTarget && I && !x) {
11037
- const j = new CustomEvent(si, u0);
11040
+ const j = new CustomEvent(si, d0);
11038
11041
  if (N.currentTarget.dispatchEvent(j), !j.defaultPrevented) {
11039
11042
  const L = E().filter((M) => M.focusable), H = L.find((M) => M.active), G = L.find((M) => M.id === v), X = [H, G, ...L].filter(
11040
11043
  Boolean
@@ -11058,7 +11061,7 @@ var m0 = f.forwardRef((e, t) => {
11058
11061
  tabStopId: s,
11059
11062
  children: i,
11060
11063
  ...a
11061
- } = e, l = Bt(), u = s || l, d = p0(Kd, n), h = d.currentTabStopId === u, m = Wd(n), { onFocusableItemAdd: g, onFocusableItemRemove: b, currentTabStopId: v } = d;
11064
+ } = e, l = Bt(), u = s || l, d = m0(Kd, n), h = d.currentTabStopId === u, m = Wd(n), { onFocusableItemAdd: g, onFocusableItemRemove: b, currentTabStopId: v } = d;
11062
11065
  return f.useEffect(() => {
11063
11066
  if (r)
11064
11067
  return g(), () => b();
@@ -11086,7 +11089,7 @@ var m0 = f.forwardRef((e, t) => {
11086
11089
  return;
11087
11090
  }
11088
11091
  if (p.target !== p.currentTarget) return;
11089
- const x = x0(p, d.orientation, d.dir);
11092
+ const x = b0(p, d.orientation, d.dir);
11090
11093
  if (x !== void 0) {
11091
11094
  if (p.metaKey || p.ctrlKey || p.altKey || p.shiftKey) return;
11092
11095
  p.preventDefault();
@@ -11095,7 +11098,7 @@ var m0 = f.forwardRef((e, t) => {
11095
11098
  else if (x === "prev" || x === "next") {
11096
11099
  x === "prev" && y.reverse();
11097
11100
  const E = y.indexOf(p.currentTarget);
11098
- y = d.loop ? b0(y, E + 1) : y.slice(E + 1);
11101
+ y = d.loop ? w0(y, E + 1) : y.slice(E + 1);
11099
11102
  }
11100
11103
  setTimeout(() => qd(y));
11101
11104
  }
@@ -11108,7 +11111,7 @@ var m0 = f.forwardRef((e, t) => {
11108
11111
  }
11109
11112
  );
11110
11113
  Yd.displayName = Kd;
11111
- var g0 = {
11114
+ var v0 = {
11112
11115
  ArrowLeft: "prev",
11113
11116
  ArrowUp: "prev",
11114
11117
  ArrowRight: "next",
@@ -11118,33 +11121,33 @@ var g0 = {
11118
11121
  PageDown: "last",
11119
11122
  End: "last"
11120
11123
  };
11121
- function v0(e, t) {
11124
+ function x0(e, t) {
11122
11125
  return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
11123
11126
  }
11124
- function x0(e, t, n) {
11125
- const r = v0(e.key, n);
11127
+ function b0(e, t, n) {
11128
+ const r = x0(e.key, n);
11126
11129
  if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r)))
11127
- return g0[r];
11130
+ return v0[r];
11128
11131
  }
11129
11132
  function qd(e, t = !1) {
11130
11133
  const n = document.activeElement;
11131
11134
  for (const r of e)
11132
11135
  if (r === n || (r.focus({ preventScroll: t }), document.activeElement !== n)) return;
11133
11136
  }
11134
- function b0(e, t) {
11137
+ function w0(e, t) {
11135
11138
  return e.map((n, r) => e[(t + r) % e.length]);
11136
11139
  }
11137
- var w0 = Gd, y0 = Yd, ki = ["Enter", " "], S0 = ["ArrowDown", "PageUp", "Home"], Xd = ["ArrowUp", "PageDown", "End"], C0 = [...S0, ...Xd], T0 = {
11140
+ var y0 = Gd, S0 = Yd, ki = ["Enter", " "], C0 = ["ArrowDown", "PageUp", "Home"], Xd = ["ArrowUp", "PageDown", "End"], T0 = [...C0, ...Xd], R0 = {
11138
11141
  ltr: [...ki, "ArrowRight"],
11139
11142
  rtl: [...ki, "ArrowLeft"]
11140
- }, R0 = {
11143
+ }, E0 = {
11141
11144
  ltr: ["ArrowLeft"],
11142
11145
  rtl: ["ArrowRight"]
11143
- }, Qr = "Menu", [Fr, E0, N0] = va(Qr), [$n, Jd] = Wt(Qr, [
11144
- N0,
11146
+ }, Qr = "Menu", [Fr, N0, I0] = va(Qr), [$n, Jd] = Wt(Qr, [
11147
+ I0,
11145
11148
  hr,
11146
11149
  Vd
11147
- ]), Ss = hr(), Zd = Vd(), [I0, Hn] = $n(Qr), [j0, eo] = $n(Qr), Qd = (e) => {
11150
+ ]), Ss = hr(), Zd = Vd(), [j0, Hn] = $n(Qr), [k0, eo] = $n(Qr), Qd = (e) => {
11148
11151
  const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, a = Ss(t), [l, u] = f.useState(null), d = f.useRef(!1), h = at(s), m = vs(o);
11149
11152
  return f.useEffect(() => {
11150
11153
  const g = () => {
@@ -11154,7 +11157,7 @@ var w0 = Gd, y0 = Yd, ki = ["Enter", " "], S0 = ["ArrowDown", "PageUp", "Home"],
11154
11157
  document.removeEventListener("keydown", g, { capture: !0 }), document.removeEventListener("pointerdown", b, { capture: !0 }), document.removeEventListener("pointermove", b, { capture: !0 });
11155
11158
  };
11156
11159
  }, []), /* @__PURE__ */ c.jsx(Ea, { ...a, children: /* @__PURE__ */ c.jsx(
11157
- I0,
11160
+ j0,
11158
11161
  {
11159
11162
  scope: t,
11160
11163
  open: n,
@@ -11162,7 +11165,7 @@ var w0 = Gd, y0 = Yd, ki = ["Enter", " "], S0 = ["ArrowDown", "PageUp", "Home"],
11162
11165
  content: l,
11163
11166
  onContentChange: u,
11164
11167
  children: /* @__PURE__ */ c.jsx(
11165
- j0,
11168
+ k0,
11166
11169
  {
11167
11170
  scope: t,
11168
11171
  onClose: f.useCallback(() => h(!1), [h]),
@@ -11176,26 +11179,26 @@ var w0 = Gd, y0 = Yd, ki = ["Enter", " "], S0 = ["ArrowDown", "PageUp", "Home"],
11176
11179
  ) });
11177
11180
  };
11178
11181
  Qd.displayName = Qr;
11179
- var k0 = "MenuAnchor", ka = f.forwardRef(
11182
+ var A0 = "MenuAnchor", ka = f.forwardRef(
11180
11183
  (e, t) => {
11181
11184
  const { __scopeMenu: n, ...r } = e, o = Ss(n);
11182
11185
  return /* @__PURE__ */ c.jsx(Na, { ...o, ...r, ref: t });
11183
11186
  }
11184
11187
  );
11185
- ka.displayName = k0;
11186
- var Aa = "MenuPortal", [A0, ef] = $n(Aa, {
11188
+ ka.displayName = A0;
11189
+ var Aa = "MenuPortal", [P0, ef] = $n(Aa, {
11187
11190
  forceMount: void 0
11188
11191
  }), tf = (e) => {
11189
11192
  const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, s = Hn(Aa, t);
11190
- return /* @__PURE__ */ c.jsx(A0, { scope: t, forceMount: n, children: /* @__PURE__ */ c.jsx(xt, { present: n || s.open, children: /* @__PURE__ */ c.jsx(us, { asChild: !0, container: o, children: r }) }) });
11193
+ return /* @__PURE__ */ c.jsx(P0, { scope: t, forceMount: n, children: /* @__PURE__ */ c.jsx(xt, { present: n || s.open, children: /* @__PURE__ */ c.jsx(us, { asChild: !0, container: o, children: r }) }) });
11191
11194
  };
11192
11195
  tf.displayName = Aa;
11193
- var Pt = "MenuContent", [P0, Pa] = $n(Pt), nf = f.forwardRef(
11196
+ var Pt = "MenuContent", [_0, Pa] = $n(Pt), nf = f.forwardRef(
11194
11197
  (e, t) => {
11195
11198
  const n = ef(Pt, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = Hn(Pt, e.__scopeMenu), i = eo(Pt, e.__scopeMenu);
11196
- return /* @__PURE__ */ c.jsx(Fr.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ c.jsx(xt, { present: r || s.open, children: /* @__PURE__ */ c.jsx(Fr.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ c.jsx(_0, { ...o, ref: t }) : /* @__PURE__ */ c.jsx(O0, { ...o, ref: t }) }) }) });
11199
+ return /* @__PURE__ */ c.jsx(Fr.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ c.jsx(xt, { present: r || s.open, children: /* @__PURE__ */ c.jsx(Fr.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ c.jsx(O0, { ...o, ref: t }) : /* @__PURE__ */ c.jsx(M0, { ...o, ref: t }) }) }) });
11197
11200
  }
11198
- ), _0 = f.forwardRef(
11201
+ ), O0 = f.forwardRef(
11199
11202
  (e, t) => {
11200
11203
  const n = Hn(Pt, e.__scopeMenu), r = f.useRef(null), o = Re(t, r);
11201
11204
  return f.useEffect(() => {
@@ -11218,7 +11221,7 @@ var Pt = "MenuContent", [P0, Pa] = $n(Pt), nf = f.forwardRef(
11218
11221
  }
11219
11222
  );
11220
11223
  }
11221
- ), O0 = f.forwardRef((e, t) => {
11224
+ ), M0 = f.forwardRef((e, t) => {
11222
11225
  const n = Hn(Pt, e.__scopeMenu);
11223
11226
  return /* @__PURE__ */ c.jsx(
11224
11227
  _a,
@@ -11231,7 +11234,7 @@ var Pt = "MenuContent", [P0, Pa] = $n(Pt), nf = f.forwardRef(
11231
11234
  onDismiss: () => n.onOpenChange(!1)
11232
11235
  }
11233
11236
  );
11234
- }), M0 = tr("MenuContent.ScrollLock"), _a = f.forwardRef(
11237
+ }), D0 = tr("MenuContent.ScrollLock"), _a = f.forwardRef(
11235
11238
  (e, t) => {
11236
11239
  const {
11237
11240
  __scopeMenu: n,
@@ -11248,9 +11251,9 @@ var Pt = "MenuContent", [P0, Pa] = $n(Pt), nf = f.forwardRef(
11248
11251
  onDismiss: g,
11249
11252
  disableOutsideScroll: b,
11250
11253
  ...v
11251
- } = e, p = Hn(Pt, n), x = eo(Pt, n), w = Ss(n), y = Zd(n), E = E0(n), [S, T] = f.useState(null), C = f.useRef(null), N = Re(t, C, p.onContentChange), I = f.useRef(0), j = f.useRef(""), L = f.useRef(0), H = f.useRef(null), G = f.useRef("right"), P = f.useRef(0), X = b ? fs : f.Fragment, M = b ? { as: M0, allowPinchZoom: !0 } : void 0, J = (O) => {
11254
+ } = e, p = Hn(Pt, n), x = eo(Pt, n), w = Ss(n), y = Zd(n), E = N0(n), [S, T] = f.useState(null), C = f.useRef(null), N = Re(t, C, p.onContentChange), I = f.useRef(0), j = f.useRef(""), L = f.useRef(0), H = f.useRef(null), G = f.useRef("right"), P = f.useRef(0), X = b ? fs : f.Fragment, M = b ? { as: D0, allowPinchZoom: !0 } : void 0, J = (O) => {
11252
11255
  var $, A;
11253
- const W = j.current + O, V = E().filter((K) => !K.disabled), ee = document.activeElement, F = ($ = V.find((K) => K.ref.current === ee)) == null ? void 0 : $.textValue, Z = V.map((K) => K.textValue), ae = K0(Z, W, F), ge = (A = V.find((K) => K.textValue === ae)) == null ? void 0 : A.ref.current;
11256
+ const W = j.current + O, V = E().filter((K) => !K.disabled), ee = document.activeElement, F = ($ = V.find((K) => K.ref.current === ee)) == null ? void 0 : $.textValue, Z = V.map((K) => K.textValue), ae = Y0(Z, W, F), ge = (A = V.find((K) => K.textValue === ae)) == null ? void 0 : A.ref.current;
11254
11257
  (function K(te) {
11255
11258
  j.current = te, window.clearTimeout(I.current), te !== "" && (I.current = window.setTimeout(() => K(""), 1e3));
11256
11259
  })(W), ge && setTimeout(() => ge.focus());
@@ -11258,10 +11261,10 @@ var Pt = "MenuContent", [P0, Pa] = $n(Pt), nf = f.forwardRef(
11258
11261
  f.useEffect(() => () => window.clearTimeout(I.current), []), fa();
11259
11262
  const _ = f.useCallback((O) => {
11260
11263
  var V, ee;
11261
- return G.current === ((V = H.current) == null ? void 0 : V.side) && q0(O, (ee = H.current) == null ? void 0 : ee.area);
11264
+ return G.current === ((V = H.current) == null ? void 0 : V.side) && X0(O, (ee = H.current) == null ? void 0 : ee.area);
11262
11265
  }, []);
11263
11266
  return /* @__PURE__ */ c.jsx(
11264
- P0,
11267
+ _0,
11265
11268
  {
11266
11269
  scope: n,
11267
11270
  searchRef: j,
@@ -11309,7 +11312,7 @@ var Pt = "MenuContent", [P0, Pa] = $n(Pt), nf = f.forwardRef(
11309
11312
  onInteractOutside: m,
11310
11313
  onDismiss: g,
11311
11314
  children: /* @__PURE__ */ c.jsx(
11312
- w0,
11315
+ y0,
11313
11316
  {
11314
11317
  asChild: !0,
11315
11318
  ...y,
@@ -11338,10 +11341,10 @@ var Pt = "MenuContent", [P0, Pa] = $n(Pt), nf = f.forwardRef(
11338
11341
  const V = O.target.closest("[data-radix-menu-content]") === O.currentTarget, ee = O.ctrlKey || O.altKey || O.metaKey, F = O.key.length === 1;
11339
11342
  V && (O.key === "Tab" && O.preventDefault(), !ee && F && J(O.key));
11340
11343
  const Z = C.current;
11341
- if (O.target !== Z || !C0.includes(O.key)) return;
11344
+ if (O.target !== Z || !T0.includes(O.key)) return;
11342
11345
  O.preventDefault();
11343
11346
  const ge = E().filter(($) => !$.disabled).map(($) => $.ref.current);
11344
- Xd.includes(O.key) && ge.reverse(), V0(ge);
11347
+ Xd.includes(O.key) && ge.reverse(), G0(ge);
11345
11348
  }),
11346
11349
  onBlur: ne(e.onBlur, (O) => {
11347
11350
  O.currentTarget.contains(O.target) || (window.clearTimeout(I.current), j.current = "");
@@ -11369,20 +11372,20 @@ var Pt = "MenuContent", [P0, Pa] = $n(Pt), nf = f.forwardRef(
11369
11372
  }
11370
11373
  );
11371
11374
  nf.displayName = Pt;
11372
- var D0 = "MenuGroup", Oa = f.forwardRef(
11375
+ var L0 = "MenuGroup", Oa = f.forwardRef(
11373
11376
  (e, t) => {
11374
11377
  const { __scopeMenu: n, ...r } = e;
11375
11378
  return /* @__PURE__ */ c.jsx(xe.div, { role: "group", ...r, ref: t });
11376
11379
  }
11377
11380
  );
11378
- Oa.displayName = D0;
11379
- var L0 = "MenuLabel", rf = f.forwardRef(
11381
+ Oa.displayName = L0;
11382
+ var F0 = "MenuLabel", rf = f.forwardRef(
11380
11383
  (e, t) => {
11381
11384
  const { __scopeMenu: n, ...r } = e;
11382
11385
  return /* @__PURE__ */ c.jsx(xe.div, { ...r, ref: t });
11383
11386
  }
11384
11387
  );
11385
- rf.displayName = L0;
11388
+ rf.displayName = F0;
11386
11389
  var Vo = "MenuItem", ml = "menu.itemSelect", Cs = f.forwardRef(
11387
11390
  (e, t) => {
11388
11391
  const { disabled: n = !1, onSelect: r, ...o } = e, s = f.useRef(null), i = eo(Vo, e.__scopeMenu), a = Pa(Vo, e.__scopeMenu), l = Re(t, s), u = f.useRef(!1), d = () => {
@@ -11428,7 +11431,7 @@ var of = f.forwardRef(
11428
11431
  scope: n,
11429
11432
  disabled: r,
11430
11433
  textValue: o ?? m,
11431
- children: /* @__PURE__ */ c.jsx(y0, { asChild: !0, ...a, focusable: !r, children: /* @__PURE__ */ c.jsx(
11434
+ children: /* @__PURE__ */ c.jsx(S0, { asChild: !0, ...a, focusable: !r, children: /* @__PURE__ */ c.jsx(
11432
11435
  xe.div,
11433
11436
  {
11434
11437
  role: "menuitem",
@@ -11454,7 +11457,7 @@ var of = f.forwardRef(
11454
11457
  }
11455
11458
  );
11456
11459
  }
11457
- ), F0 = "MenuCheckboxItem", sf = f.forwardRef(
11460
+ ), B0 = "MenuCheckboxItem", sf = f.forwardRef(
11458
11461
  (e, t) => {
11459
11462
  const { checked: n = !1, onCheckedChange: r, ...o } = e;
11460
11463
  return /* @__PURE__ */ c.jsx(df, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ c.jsx(
@@ -11474,21 +11477,21 @@ var of = f.forwardRef(
11474
11477
  ) });
11475
11478
  }
11476
11479
  );
11477
- sf.displayName = F0;
11478
- var af = "MenuRadioGroup", [B0, $0] = $n(
11480
+ sf.displayName = B0;
11481
+ var af = "MenuRadioGroup", [$0, H0] = $n(
11479
11482
  af,
11480
11483
  { value: void 0, onValueChange: () => {
11481
11484
  } }
11482
11485
  ), cf = f.forwardRef(
11483
11486
  (e, t) => {
11484
11487
  const { value: n, onValueChange: r, ...o } = e, s = at(r);
11485
- return /* @__PURE__ */ c.jsx(B0, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ c.jsx(Oa, { ...o, ref: t }) });
11488
+ return /* @__PURE__ */ c.jsx($0, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ c.jsx(Oa, { ...o, ref: t }) });
11486
11489
  }
11487
11490
  );
11488
11491
  cf.displayName = af;
11489
11492
  var lf = "MenuRadioItem", uf = f.forwardRef(
11490
11493
  (e, t) => {
11491
- const { value: n, ...r } = e, o = $0(lf, e.__scopeMenu), s = n === o.value;
11494
+ const { value: n, ...r } = e, o = H0(lf, e.__scopeMenu), s = n === o.value;
11492
11495
  return /* @__PURE__ */ c.jsx(df, { scope: e.__scopeMenu, checked: s, children: /* @__PURE__ */ c.jsx(
11493
11496
  Cs,
11494
11497
  {
@@ -11510,12 +11513,12 @@ var lf = "MenuRadioItem", uf = f.forwardRef(
11510
11513
  }
11511
11514
  );
11512
11515
  uf.displayName = lf;
11513
- var Ma = "MenuItemIndicator", [df, H0] = $n(
11516
+ var Ma = "MenuItemIndicator", [df, z0] = $n(
11514
11517
  Ma,
11515
11518
  { checked: !1 }
11516
11519
  ), ff = f.forwardRef(
11517
11520
  (e, t) => {
11518
- const { __scopeMenu: n, forceMount: r, ...o } = e, s = H0(Ma, n);
11521
+ const { __scopeMenu: n, forceMount: r, ...o } = e, s = z0(Ma, n);
11519
11522
  return /* @__PURE__ */ c.jsx(
11520
11523
  xt,
11521
11524
  {
@@ -11533,7 +11536,7 @@ var Ma = "MenuItemIndicator", [df, H0] = $n(
11533
11536
  }
11534
11537
  );
11535
11538
  ff.displayName = Ma;
11536
- var z0 = "MenuSeparator", hf = f.forwardRef(
11539
+ var U0 = "MenuSeparator", hf = f.forwardRef(
11537
11540
  (e, t) => {
11538
11541
  const { __scopeMenu: n, ...r } = e;
11539
11542
  return /* @__PURE__ */ c.jsx(
@@ -11547,15 +11550,15 @@ var z0 = "MenuSeparator", hf = f.forwardRef(
11547
11550
  );
11548
11551
  }
11549
11552
  );
11550
- hf.displayName = z0;
11551
- var U0 = "MenuArrow", pf = f.forwardRef(
11553
+ hf.displayName = U0;
11554
+ var W0 = "MenuArrow", pf = f.forwardRef(
11552
11555
  (e, t) => {
11553
11556
  const { __scopeMenu: n, ...r } = e, o = Ss(n);
11554
11557
  return /* @__PURE__ */ c.jsx(ja, { ...o, ...r, ref: t });
11555
11558
  }
11556
11559
  );
11557
- pf.displayName = U0;
11558
- var W0 = "MenuSub", [fR, mf] = $n(W0), Cr = "MenuSubTrigger", gf = f.forwardRef(
11560
+ pf.displayName = W0;
11561
+ var V0 = "MenuSub", [hR, mf] = $n(V0), Cr = "MenuSubTrigger", gf = f.forwardRef(
11559
11562
  (e, t) => {
11560
11563
  const n = Hn(Cr, e.__scopeMenu), r = eo(Cr, e.__scopeMenu), o = mf(Cr, e.__scopeMenu), s = Pa(Cr, e.__scopeMenu), i = f.useRef(null), { pointerGraceTimerRef: a, onPointerGraceIntentChange: l } = s, u = { __scopeMenu: e.__scopeMenu }, d = f.useCallback(() => {
11561
11564
  i.current && window.clearTimeout(i.current), i.current = null;
@@ -11619,7 +11622,7 @@ var W0 = "MenuSub", [fR, mf] = $n(W0), Cr = "MenuSubTrigger", gf = f.forwardRef(
11619
11622
  onKeyDown: ne(e.onKeyDown, (h) => {
11620
11623
  var g;
11621
11624
  const m = s.searchRef.current !== "";
11622
- e.disabled || m && h.key === " " || T0[r.dir].includes(h.key) && (n.onOpenChange(!0), (g = n.content) == null || g.focus(), h.preventDefault());
11625
+ e.disabled || m && h.key === " " || R0[r.dir].includes(h.key) && (n.onOpenChange(!0), (g = n.content) == null || g.focus(), h.preventDefault());
11623
11626
  })
11624
11627
  }
11625
11628
  ) });
@@ -11654,7 +11657,7 @@ var vf = "MenuSubContent", xf = f.forwardRef(
11654
11657
  }),
11655
11658
  onKeyDown: ne(e.onKeyDown, (d) => {
11656
11659
  var g;
11657
- const h = d.currentTarget.contains(d.target), m = R0[i.dir].includes(d.key);
11660
+ const h = d.currentTarget.contains(d.target), m = E0[i.dir].includes(d.key);
11658
11661
  h && m && (s.onOpenChange(!1), (g = a.trigger) == null || g.focus(), d.preventDefault());
11659
11662
  })
11660
11663
  }
@@ -11671,24 +11674,24 @@ function Go(e) {
11671
11674
  function Da(e) {
11672
11675
  return Go(e) ? "indeterminate" : e ? "checked" : "unchecked";
11673
11676
  }
11674
- function V0(e) {
11677
+ function G0(e) {
11675
11678
  const t = document.activeElement;
11676
11679
  for (const n of e)
11677
11680
  if (n === t || (n.focus(), document.activeElement !== t)) return;
11678
11681
  }
11679
- function G0(e, t) {
11682
+ function K0(e, t) {
11680
11683
  return e.map((n, r) => e[(t + r) % e.length]);
11681
11684
  }
11682
- function K0(e, t, n) {
11685
+ function Y0(e, t, n) {
11683
11686
  const o = t.length > 1 && Array.from(t).every((u) => u === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
11684
- let i = G0(e, Math.max(s, 0));
11687
+ let i = K0(e, Math.max(s, 0));
11685
11688
  o.length === 1 && (i = i.filter((u) => u !== n));
11686
11689
  const l = i.find(
11687
11690
  (u) => u.toLowerCase().startsWith(o.toLowerCase())
11688
11691
  );
11689
11692
  return l !== n ? l : void 0;
11690
11693
  }
11691
- function Y0(e, t) {
11694
+ function q0(e, t) {
11692
11695
  const { x: n, y: r } = e;
11693
11696
  let o = !1;
11694
11697
  for (let s = 0, i = t.length - 1; s < t.length; i = s++) {
@@ -11697,18 +11700,18 @@ function Y0(e, t) {
11697
11700
  }
11698
11701
  return o;
11699
11702
  }
11700
- function q0(e, t) {
11703
+ function X0(e, t) {
11701
11704
  if (!t) return !1;
11702
11705
  const n = { x: e.clientX, y: e.clientY };
11703
- return Y0(n, t);
11706
+ return q0(n, t);
11704
11707
  }
11705
11708
  function Br(e) {
11706
11709
  return (t) => t.pointerType === "mouse" ? e(t) : void 0;
11707
11710
  }
11708
- var X0 = Qd, J0 = ka, Z0 = tf, Q0 = nf, eS = Oa, tS = rf, nS = Cs, rS = sf, oS = cf, sS = uf, iS = ff, aS = hf, cS = pf, lS = gf, uS = xf, Ts = "DropdownMenu", [dS, hR] = Wt(
11711
+ var J0 = Qd, Z0 = ka, Q0 = tf, eS = nf, tS = Oa, nS = rf, rS = Cs, oS = sf, sS = cf, iS = uf, aS = ff, cS = hf, lS = pf, uS = gf, dS = xf, Ts = "DropdownMenu", [fS, pR] = Wt(
11709
11712
  Ts,
11710
11713
  [Jd]
11711
- ), ht = Jd(), [fS, wf] = dS(Ts), yf = (e) => {
11714
+ ), ht = Jd(), [hS, wf] = fS(Ts), yf = (e) => {
11712
11715
  const {
11713
11716
  __scopeDropdownMenu: t,
11714
11717
  children: n,
@@ -11724,7 +11727,7 @@ var X0 = Qd, J0 = ka, Z0 = tf, Q0 = nf, eS = Oa, tS = rf, nS = Cs, rS = sf, oS =
11724
11727
  caller: Ts
11725
11728
  });
11726
11729
  return /* @__PURE__ */ c.jsx(
11727
- fS,
11730
+ hS,
11728
11731
  {
11729
11732
  scope: t,
11730
11733
  triggerId: Bt(),
@@ -11734,7 +11737,7 @@ var X0 = Qd, J0 = ka, Z0 = tf, Q0 = nf, eS = Oa, tS = rf, nS = Cs, rS = sf, oS =
11734
11737
  onOpenChange: h,
11735
11738
  onOpenToggle: f.useCallback(() => h((m) => !m), [h]),
11736
11739
  modal: a,
11737
- children: /* @__PURE__ */ c.jsx(X0, { ...l, open: d, onOpenChange: h, dir: r, modal: a, children: n })
11740
+ children: /* @__PURE__ */ c.jsx(J0, { ...l, open: d, onOpenChange: h, dir: r, modal: a, children: n })
11738
11741
  }
11739
11742
  );
11740
11743
  };
@@ -11742,7 +11745,7 @@ yf.displayName = Ts;
11742
11745
  var Sf = "DropdownMenuTrigger", Cf = f.forwardRef(
11743
11746
  (e, t) => {
11744
11747
  const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = wf(Sf, n), i = ht(n);
11745
- return /* @__PURE__ */ c.jsx(J0, { asChild: !0, ...i, children: /* @__PURE__ */ c.jsx(
11748
+ return /* @__PURE__ */ c.jsx(Z0, { asChild: !0, ...i, children: /* @__PURE__ */ c.jsx(
11746
11749
  xe.button,
11747
11750
  {
11748
11751
  type: "button",
@@ -11766,16 +11769,16 @@ var Sf = "DropdownMenuTrigger", Cf = f.forwardRef(
11766
11769
  }
11767
11770
  );
11768
11771
  Cf.displayName = Sf;
11769
- var hS = "DropdownMenuPortal", Tf = (e) => {
11772
+ var pS = "DropdownMenuPortal", Tf = (e) => {
11770
11773
  const { __scopeDropdownMenu: t, ...n } = e, r = ht(t);
11771
- return /* @__PURE__ */ c.jsx(Z0, { ...r, ...n });
11774
+ return /* @__PURE__ */ c.jsx(Q0, { ...r, ...n });
11772
11775
  };
11773
- Tf.displayName = hS;
11776
+ Tf.displayName = pS;
11774
11777
  var Rf = "DropdownMenuContent", Ef = f.forwardRef(
11775
11778
  (e, t) => {
11776
11779
  const { __scopeDropdownMenu: n, ...r } = e, o = wf(Rf, n), s = ht(n), i = f.useRef(!1);
11777
11780
  return /* @__PURE__ */ c.jsx(
11778
- Q0,
11781
+ eS,
11779
11782
  {
11780
11783
  id: o.contentId,
11781
11784
  "aria-labelledby": o.triggerId,
@@ -11803,68 +11806,68 @@ var Rf = "DropdownMenuContent", Ef = f.forwardRef(
11803
11806
  }
11804
11807
  );
11805
11808
  Ef.displayName = Rf;
11806
- var pS = "DropdownMenuGroup", mS = f.forwardRef(
11809
+ var mS = "DropdownMenuGroup", gS = f.forwardRef(
11807
11810
  (e, t) => {
11808
11811
  const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11809
- return /* @__PURE__ */ c.jsx(eS, { ...o, ...r, ref: t });
11812
+ return /* @__PURE__ */ c.jsx(tS, { ...o, ...r, ref: t });
11810
11813
  }
11811
11814
  );
11812
- mS.displayName = pS;
11813
- var gS = "DropdownMenuLabel", Nf = f.forwardRef(
11815
+ gS.displayName = mS;
11816
+ var vS = "DropdownMenuLabel", Nf = f.forwardRef(
11814
11817
  (e, t) => {
11815
11818
  const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11816
- return /* @__PURE__ */ c.jsx(tS, { ...o, ...r, ref: t });
11819
+ return /* @__PURE__ */ c.jsx(nS, { ...o, ...r, ref: t });
11817
11820
  }
11818
11821
  );
11819
- Nf.displayName = gS;
11820
- var vS = "DropdownMenuItem", If = f.forwardRef(
11822
+ Nf.displayName = vS;
11823
+ var xS = "DropdownMenuItem", If = f.forwardRef(
11821
11824
  (e, t) => {
11822
11825
  const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11823
- return /* @__PURE__ */ c.jsx(nS, { ...o, ...r, ref: t });
11826
+ return /* @__PURE__ */ c.jsx(rS, { ...o, ...r, ref: t });
11824
11827
  }
11825
11828
  );
11826
- If.displayName = vS;
11827
- var xS = "DropdownMenuCheckboxItem", jf = f.forwardRef((e, t) => {
11828
- const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11829
- return /* @__PURE__ */ c.jsx(rS, { ...o, ...r, ref: t });
11830
- });
11831
- jf.displayName = xS;
11832
- var bS = "DropdownMenuRadioGroup", wS = f.forwardRef((e, t) => {
11829
+ If.displayName = xS;
11830
+ var bS = "DropdownMenuCheckboxItem", jf = f.forwardRef((e, t) => {
11833
11831
  const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11834
11832
  return /* @__PURE__ */ c.jsx(oS, { ...o, ...r, ref: t });
11835
11833
  });
11836
- wS.displayName = bS;
11837
- var yS = "DropdownMenuRadioItem", kf = f.forwardRef((e, t) => {
11834
+ jf.displayName = bS;
11835
+ var wS = "DropdownMenuRadioGroup", yS = f.forwardRef((e, t) => {
11838
11836
  const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11839
11837
  return /* @__PURE__ */ c.jsx(sS, { ...o, ...r, ref: t });
11840
11838
  });
11841
- kf.displayName = yS;
11842
- var SS = "DropdownMenuItemIndicator", Af = f.forwardRef((e, t) => {
11839
+ yS.displayName = wS;
11840
+ var SS = "DropdownMenuRadioItem", kf = f.forwardRef((e, t) => {
11843
11841
  const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11844
11842
  return /* @__PURE__ */ c.jsx(iS, { ...o, ...r, ref: t });
11845
11843
  });
11846
- Af.displayName = SS;
11847
- var CS = "DropdownMenuSeparator", Pf = f.forwardRef((e, t) => {
11844
+ kf.displayName = SS;
11845
+ var CS = "DropdownMenuItemIndicator", Af = f.forwardRef((e, t) => {
11848
11846
  const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11849
11847
  return /* @__PURE__ */ c.jsx(aS, { ...o, ...r, ref: t });
11850
11848
  });
11851
- Pf.displayName = CS;
11852
- var TS = "DropdownMenuArrow", RS = f.forwardRef(
11849
+ Af.displayName = CS;
11850
+ var TS = "DropdownMenuSeparator", Pf = f.forwardRef((e, t) => {
11851
+ const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11852
+ return /* @__PURE__ */ c.jsx(cS, { ...o, ...r, ref: t });
11853
+ });
11854
+ Pf.displayName = TS;
11855
+ var RS = "DropdownMenuArrow", ES = f.forwardRef(
11853
11856
  (e, t) => {
11854
11857
  const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11855
- return /* @__PURE__ */ c.jsx(cS, { ...o, ...r, ref: t });
11858
+ return /* @__PURE__ */ c.jsx(lS, { ...o, ...r, ref: t });
11856
11859
  }
11857
11860
  );
11858
- RS.displayName = TS;
11859
- var ES = "DropdownMenuSubTrigger", _f = f.forwardRef((e, t) => {
11861
+ ES.displayName = RS;
11862
+ var NS = "DropdownMenuSubTrigger", _f = f.forwardRef((e, t) => {
11860
11863
  const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11861
- return /* @__PURE__ */ c.jsx(lS, { ...o, ...r, ref: t });
11864
+ return /* @__PURE__ */ c.jsx(uS, { ...o, ...r, ref: t });
11862
11865
  });
11863
- _f.displayName = ES;
11864
- var NS = "DropdownMenuSubContent", Of = f.forwardRef((e, t) => {
11866
+ _f.displayName = NS;
11867
+ var IS = "DropdownMenuSubContent", Of = f.forwardRef((e, t) => {
11865
11868
  const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11866
11869
  return /* @__PURE__ */ c.jsx(
11867
- uS,
11870
+ dS,
11868
11871
  {
11869
11872
  ...o,
11870
11873
  ...r,
@@ -11880,9 +11883,9 @@ var NS = "DropdownMenuSubContent", Of = f.forwardRef((e, t) => {
11880
11883
  }
11881
11884
  );
11882
11885
  });
11883
- Of.displayName = NS;
11884
- var IS = yf, jS = Cf, kS = Tf, Mf = Ef, Df = Nf, Lf = If, Ff = jf, Bf = kf, $f = Af, Hf = Pf, zf = _f, Uf = Of;
11885
- const AS = IS, PS = jS, _S = f.forwardRef(({ className: e, inset: t, children: n, ...r }, o) => /* @__PURE__ */ c.jsxs(
11886
+ Of.displayName = IS;
11887
+ var jS = yf, kS = Cf, AS = Tf, Mf = Ef, Df = Nf, Lf = If, Ff = jf, Bf = kf, $f = Af, Hf = Pf, zf = _f, Uf = Of;
11888
+ const PS = jS, _S = kS, OS = f.forwardRef(({ className: e, inset: t, children: n, ...r }, o) => /* @__PURE__ */ c.jsxs(
11886
11889
  zf,
11887
11890
  {
11888
11891
  ref: o,
@@ -11898,8 +11901,8 @@ const AS = IS, PS = jS, _S = f.forwardRef(({ className: e, inset: t, children: n
11898
11901
  ]
11899
11902
  }
11900
11903
  ));
11901
- _S.displayName = zf.displayName;
11902
- const OS = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
11904
+ OS.displayName = zf.displayName;
11905
+ const MS = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
11903
11906
  Uf,
11904
11907
  {
11905
11908
  ref: n,
@@ -11910,8 +11913,8 @@ const OS = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
11910
11913
  ...t
11911
11914
  }
11912
11915
  ));
11913
- OS.displayName = Uf.displayName;
11914
- const Wf = f.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ c.jsx(kS, { children: /* @__PURE__ */ c.jsx(
11916
+ MS.displayName = Uf.displayName;
11917
+ const Wf = f.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ c.jsx(AS, { children: /* @__PURE__ */ c.jsx(
11915
11918
  Mf,
11916
11919
  {
11917
11920
  ref: r,
@@ -11937,7 +11940,7 @@ const Ai = f.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
11937
11940
  }
11938
11941
  ));
11939
11942
  Ai.displayName = Lf.displayName;
11940
- const MS = f.forwardRef(({ className: e, children: t, checked: n, ...r }, o) => /* @__PURE__ */ c.jsxs(
11943
+ const DS = f.forwardRef(({ className: e, children: t, checked: n, ...r }, o) => /* @__PURE__ */ c.jsxs(
11941
11944
  Ff,
11942
11945
  {
11943
11946
  ref: o,
@@ -11953,8 +11956,8 @@ const MS = f.forwardRef(({ className: e, children: t, checked: n, ...r }, o) =>
11953
11956
  ]
11954
11957
  }
11955
11958
  ));
11956
- MS.displayName = Ff.displayName;
11957
- const DS = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ c.jsxs(
11959
+ DS.displayName = Ff.displayName;
11960
+ const LS = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ c.jsxs(
11958
11961
  Bf,
11959
11962
  {
11960
11963
  ref: r,
@@ -11969,8 +11972,8 @@ const DS = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
11969
11972
  ]
11970
11973
  }
11971
11974
  ));
11972
- DS.displayName = Bf.displayName;
11973
- const LS = f.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ c.jsx(
11975
+ LS.displayName = Bf.displayName;
11976
+ const FS = f.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ c.jsx(
11974
11977
  Df,
11975
11978
  {
11976
11979
  ref: r,
@@ -11982,8 +11985,8 @@ const LS = f.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
11982
11985
  ...n
11983
11986
  }
11984
11987
  ));
11985
- LS.displayName = Df.displayName;
11986
- const FS = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
11988
+ FS.displayName = Df.displayName;
11989
+ const BS = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
11987
11990
  Hf,
11988
11991
  {
11989
11992
  ref: n,
@@ -11991,7 +11994,7 @@ const FS = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
11991
11994
  ...t
11992
11995
  }
11993
11996
  ));
11994
- FS.displayName = Hf.displayName;
11997
+ BS.displayName = Hf.displayName;
11995
11998
  function Io({
11996
11999
  className: e = "",
11997
12000
  placeholder: t = "Type your message...",
@@ -12088,7 +12091,7 @@ function Io({
12088
12091
  if (ie.length > Eo)
12089
12092
  return `Message too long (${ie.length}/${Eo} characters)`;
12090
12093
  try {
12091
- return Ww(ie), null;
12094
+ return Vw(ie), null;
12092
12095
  } catch (le) {
12093
12096
  return (le == null ? void 0 : le.message) || "Invalid message";
12094
12097
  }
@@ -12304,8 +12307,8 @@ function Io({
12304
12307
  ] }),
12305
12308
  _ && /* @__PURE__ */ c.jsx("div", { className: "mb-3 text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2", children: _ }),
12306
12309
  /* @__PURE__ */ c.jsxs("div", { className: "flex items-end gap-2", children: [
12307
- (a || l) && /* @__PURE__ */ c.jsxs(AS, { children: [
12308
- /* @__PURE__ */ c.jsx(PS, { asChild: !0, children: /* @__PURE__ */ c.jsx(
12310
+ (a || l) && /* @__PURE__ */ c.jsxs(PS, { children: [
12311
+ /* @__PURE__ */ c.jsx(_S, { asChild: !0, children: /* @__PURE__ */ c.jsx(
12309
12312
  Oe,
12310
12313
  {
12311
12314
  type: "button",
@@ -12342,7 +12345,7 @@ function Io({
12342
12345
  ] })
12343
12346
  ] }),
12344
12347
  /* @__PURE__ */ c.jsx("div", { className: "flex-1", children: /* @__PURE__ */ c.jsx(
12345
- uv,
12348
+ dv,
12346
12349
  {
12347
12350
  initialValue: M,
12348
12351
  editingMessageId: P,
@@ -12379,10 +12382,10 @@ $r.displayName = "Input";
12379
12382
  function Pi(e, [t, n]) {
12380
12383
  return Math.min(n, Math.max(t, e));
12381
12384
  }
12382
- function BS(e, t) {
12385
+ function $S(e, t) {
12383
12386
  return f.useReducer((n, r) => t[n][r] ?? n, e);
12384
12387
  }
12385
- var La = "ScrollArea", [Vf, pR] = Wt(La), [$S, Ot] = Vf(La), Gf = f.forwardRef(
12388
+ var La = "ScrollArea", [Vf, mR] = Wt(La), [HS, Ot] = Vf(La), Gf = f.forwardRef(
12386
12389
  (e, t) => {
12387
12390
  const {
12388
12391
  __scopeScrollArea: n,
@@ -12392,7 +12395,7 @@ var La = "ScrollArea", [Vf, pR] = Wt(La), [$S, Ot] = Vf(La), Gf = f.forwardRef(
12392
12395
  ...i
12393
12396
  } = e, [a, l] = f.useState(null), [u, d] = f.useState(null), [h, m] = f.useState(null), [g, b] = f.useState(null), [v, p] = f.useState(null), [x, w] = f.useState(0), [y, E] = f.useState(0), [S, T] = f.useState(!1), [C, N] = f.useState(!1), I = Re(t, (L) => l(L)), j = vs(o);
12394
12397
  return /* @__PURE__ */ c.jsx(
12395
- $S,
12398
+ HS,
12396
12399
  {
12397
12400
  scope: n,
12398
12401
  type: r,
@@ -12480,11 +12483,11 @@ var rn = "ScrollAreaScrollbar", Fa = f.forwardRef(
12480
12483
  const { forceMount: n, ...r } = e, o = Ot(rn, e.__scopeScrollArea), { onScrollbarXEnabledChange: s, onScrollbarYEnabledChange: i } = o, a = e.orientation === "horizontal";
12481
12484
  return f.useEffect(() => (a ? s(!0) : i(!0), () => {
12482
12485
  a ? s(!1) : i(!1);
12483
- }), [a, s, i]), o.type === "hover" ? /* @__PURE__ */ c.jsx(HS, { ...r, ref: t, forceMount: n }) : o.type === "scroll" ? /* @__PURE__ */ c.jsx(zS, { ...r, ref: t, forceMount: n }) : o.type === "auto" ? /* @__PURE__ */ c.jsx(qf, { ...r, ref: t, forceMount: n }) : o.type === "always" ? /* @__PURE__ */ c.jsx(Ba, { ...r, ref: t }) : null;
12486
+ }), [a, s, i]), o.type === "hover" ? /* @__PURE__ */ c.jsx(zS, { ...r, ref: t, forceMount: n }) : o.type === "scroll" ? /* @__PURE__ */ c.jsx(US, { ...r, ref: t, forceMount: n }) : o.type === "auto" ? /* @__PURE__ */ c.jsx(qf, { ...r, ref: t, forceMount: n }) : o.type === "always" ? /* @__PURE__ */ c.jsx(Ba, { ...r, ref: t }) : null;
12484
12487
  }
12485
12488
  );
12486
12489
  Fa.displayName = rn;
12487
- var HS = f.forwardRef((e, t) => {
12490
+ var zS = f.forwardRef((e, t) => {
12488
12491
  const { forceMount: n, ...r } = e, o = Ot(rn, e.__scopeScrollArea), [s, i] = f.useState(!1);
12489
12492
  return f.useEffect(() => {
12490
12493
  const a = o.scrollArea;
@@ -12507,8 +12510,8 @@ var HS = f.forwardRef((e, t) => {
12507
12510
  ref: t
12508
12511
  }
12509
12512
  ) });
12510
- }), zS = f.forwardRef((e, t) => {
12511
- const { forceMount: n, ...r } = e, o = Ot(rn, e.__scopeScrollArea), s = e.orientation === "horizontal", i = Es(() => l("SCROLL_END"), 100), [a, l] = BS("hidden", {
12513
+ }), US = f.forwardRef((e, t) => {
12514
+ const { forceMount: n, ...r } = e, o = Ot(rn, e.__scopeScrollArea), s = e.orientation === "horizontal", i = Es(() => l("SCROLL_END"), 100), [a, l] = $S("hidden", {
12512
12515
  hidden: {
12513
12516
  SCROLL: "scrolling"
12514
12517
  },
@@ -12581,10 +12584,10 @@ var HS = f.forwardRef((e, t) => {
12581
12584
  onThumbPointerDown: (m) => i.current = m
12582
12585
  };
12583
12586
  function h(m, g) {
12584
- return YS(m, i.current, a, g);
12587
+ return qS(m, i.current, a, g);
12585
12588
  }
12586
12589
  return n === "horizontal" ? /* @__PURE__ */ c.jsx(
12587
- US,
12590
+ WS,
12588
12591
  {
12589
12592
  ...d,
12590
12593
  ref: t,
@@ -12602,7 +12605,7 @@ var HS = f.forwardRef((e, t) => {
12602
12605
  }
12603
12606
  }
12604
12607
  ) : n === "vertical" ? /* @__PURE__ */ c.jsx(
12605
- WS,
12608
+ VS,
12606
12609
  {
12607
12610
  ...d,
12608
12611
  ref: t,
@@ -12620,7 +12623,7 @@ var HS = f.forwardRef((e, t) => {
12620
12623
  }
12621
12624
  }
12622
12625
  ) : null;
12623
- }), US = f.forwardRef((e, t) => {
12626
+ }), WS = f.forwardRef((e, t) => {
12624
12627
  const { sizes: n, onSizesChange: r, ...o } = e, s = Ot(rn, e.__scopeScrollArea), [i, a] = f.useState(), l = f.useRef(null), u = Re(t, l, s.onScrollbarXChange);
12625
12628
  return f.useEffect(() => {
12626
12629
  l.current && a(getComputedStyle(l.current));
@@ -12659,7 +12662,7 @@ var HS = f.forwardRef((e, t) => {
12659
12662
  }
12660
12663
  }
12661
12664
  );
12662
- }), WS = f.forwardRef((e, t) => {
12665
+ }), VS = f.forwardRef((e, t) => {
12663
12666
  const { sizes: n, onSizesChange: r, ...o } = e, s = Ot(rn, e.__scopeScrollArea), [i, a] = f.useState(), l = f.useRef(null), u = Re(t, l, s.onScrollbarYChange);
12664
12667
  return f.useEffect(() => {
12665
12668
  l.current && a(getComputedStyle(l.current));
@@ -12699,7 +12702,7 @@ var HS = f.forwardRef((e, t) => {
12699
12702
  }
12700
12703
  }
12701
12704
  );
12702
- }), [VS, Xf] = Vf(rn), Jf = f.forwardRef((e, t) => {
12705
+ }), [GS, Xf] = Vf(rn), Jf = f.forwardRef((e, t) => {
12703
12706
  const {
12704
12707
  __scopeScrollArea: n,
12705
12708
  sizes: r,
@@ -12726,7 +12729,7 @@ var HS = f.forwardRef((e, t) => {
12726
12729
  };
12727
12730
  return document.addEventListener("wheel", I, { passive: !1 }), () => document.removeEventListener("wheel", I, { passive: !1 });
12728
12731
  }, [y, b, E, S]), f.useEffect(T, [r, T]), or(b, C), or(g.content, C), /* @__PURE__ */ c.jsx(
12729
- VS,
12732
+ GS,
12730
12733
  {
12731
12734
  scope: n,
12732
12735
  scrollbar: b,
@@ -12756,9 +12759,9 @@ var HS = f.forwardRef((e, t) => {
12756
12759
  }), Ko = "ScrollAreaThumb", Zf = f.forwardRef(
12757
12760
  (e, t) => {
12758
12761
  const { forceMount: n, ...r } = e, o = Xf(Ko, e.__scopeScrollArea);
12759
- return /* @__PURE__ */ c.jsx(xt, { present: n || o.hasThumb, children: /* @__PURE__ */ c.jsx(GS, { ref: t, ...r }) });
12762
+ return /* @__PURE__ */ c.jsx(xt, { present: n || o.hasThumb, children: /* @__PURE__ */ c.jsx(KS, { ref: t, ...r }) });
12760
12763
  }
12761
- ), GS = f.forwardRef(
12764
+ ), KS = f.forwardRef(
12762
12765
  (e, t) => {
12763
12766
  const { __scopeScrollArea: n, style: r, ...o } = e, s = Ot(Ko, n), i = Xf(Ko, n), { onThumbPositionChange: a } = i, l = Re(
12764
12767
  t,
@@ -12771,7 +12774,7 @@ var HS = f.forwardRef((e, t) => {
12771
12774
  if (h) {
12772
12775
  const m = () => {
12773
12776
  if (d(), !u.current) {
12774
- const g = qS(h, a);
12777
+ const g = XS(h, a);
12775
12778
  u.current = g, a();
12776
12779
  }
12777
12780
  };
@@ -12801,11 +12804,11 @@ Zf.displayName = Ko;
12801
12804
  var $a = "ScrollAreaCorner", Qf = f.forwardRef(
12802
12805
  (e, t) => {
12803
12806
  const n = Ot($a, e.__scopeScrollArea), r = !!(n.scrollbarX && n.scrollbarY);
12804
- return n.type !== "scroll" && r ? /* @__PURE__ */ c.jsx(KS, { ...e, ref: t }) : null;
12807
+ return n.type !== "scroll" && r ? /* @__PURE__ */ c.jsx(YS, { ...e, ref: t }) : null;
12805
12808
  }
12806
12809
  );
12807
12810
  Qf.displayName = $a;
12808
- var KS = f.forwardRef((e, t) => {
12811
+ var YS = f.forwardRef((e, t) => {
12809
12812
  const { __scopeScrollArea: n, ...r } = e, o = Ot($a, n), [s, i] = f.useState(0), [a, l] = f.useState(0), u = !!(s && a);
12810
12813
  return or(o.scrollbarX, () => {
12811
12814
  var h;
@@ -12843,7 +12846,7 @@ function Rs(e) {
12843
12846
  const t = eh(e.viewport, e.content), n = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, r = (e.scrollbar.size - n) * t;
12844
12847
  return Math.max(r, 18);
12845
12848
  }
12846
- function YS(e, t, n, r = "ltr") {
12849
+ function qS(e, t, n, r = "ltr") {
12847
12850
  const o = Rs(n), s = o / 2, i = t || s, a = o - i, l = n.scrollbar.paddingStart + i, u = n.scrollbar.size - n.scrollbar.paddingEnd - a, d = n.content - n.viewport, h = r === "ltr" ? [0, d] : [d * -1, 0];
12848
12851
  return th([l, u], h)(e);
12849
12852
  }
@@ -12861,7 +12864,7 @@ function th(e, t) {
12861
12864
  function nh(e, t) {
12862
12865
  return e > 0 && e < t;
12863
12866
  }
12864
- var qS = (e, t = () => {
12867
+ var XS = (e, t = () => {
12865
12868
  }) => {
12866
12869
  let n = { left: e.scrollLeft, top: e.scrollTop }, r = 0;
12867
12870
  return function o() {
@@ -12889,7 +12892,7 @@ function or(e, t) {
12889
12892
  }
12890
12893
  }, [e, n]);
12891
12894
  }
12892
- var rh = Gf, XS = Yf, JS = Qf;
12895
+ var rh = Gf, JS = Yf, ZS = Qf;
12893
12896
  const oh = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ c.jsxs(
12894
12897
  rh,
12895
12898
  {
@@ -12897,9 +12900,9 @@ const oh = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
12897
12900
  className: D("relative overflow-hidden", e),
12898
12901
  ...n,
12899
12902
  children: [
12900
- /* @__PURE__ */ c.jsx(XS, { className: "h-full w-full rounded-[inherit] overflow-auto", children: t }),
12903
+ /* @__PURE__ */ c.jsx(JS, { className: "h-full w-full rounded-[inherit] overflow-auto", children: t }),
12901
12904
  /* @__PURE__ */ c.jsx(sh, {}),
12902
- /* @__PURE__ */ c.jsx(JS, {})
12905
+ /* @__PURE__ */ c.jsx(ZS, {})
12903
12906
  ]
12904
12907
  }
12905
12908
  ));
@@ -13054,7 +13057,7 @@ function _i({
13054
13057
  ] });
13055
13058
  }
13056
13059
  const ih = yl(null);
13057
- function mR({ children: e, basePath: t = "/chat" }) {
13060
+ function gR({ children: e, basePath: t = "/chat" }) {
13058
13061
  const n = an(() => t ? t === "/" ? "" : t.endsWith("/") ? t.slice(0, -1) : t : "/chat", [t]), r = {
13059
13062
  basePath: n,
13060
13063
  buildThreadPath: (o) => `${n}/${o}`,
@@ -13062,7 +13065,7 @@ function mR({ children: e, basePath: t = "/chat" }) {
13062
13065
  };
13063
13066
  return /* @__PURE__ */ c.jsx(ih.Provider, { value: r, children: e });
13064
13067
  }
13065
- function gR() {
13068
+ function vR() {
13066
13069
  const e = Sl(ih);
13067
13070
  return e || {
13068
13071
  basePath: "/chat",
@@ -13074,7 +13077,7 @@ function er(e) {
13074
13077
  if (!(typeof globalThis > "u"))
13075
13078
  return globalThis[e];
13076
13079
  }
13077
- function ZS(e) {
13080
+ function QS(e) {
13078
13081
  if (typeof e != "string") return;
13079
13082
  const t = e.trim();
13080
13083
  if (t)
@@ -13087,7 +13090,7 @@ function ah() {
13087
13090
  er("__CHAT_API_URL__")
13088
13091
  ];
13089
13092
  for (const t of e) {
13090
- const n = ZS(t);
13093
+ const n = QS(t);
13091
13094
  if (n) return n;
13092
13095
  }
13093
13096
  }
@@ -13101,12 +13104,12 @@ function ch() {
13101
13104
  if (typeof t == "string" && t.trim())
13102
13105
  return t.trim();
13103
13106
  }
13104
- function QS() {
13107
+ function eC() {
13105
13108
  const e = {}, t = ah(), n = ch();
13106
13109
  return t && (e.baseUrl = t), n && (e.apiKey = n), e;
13107
13110
  }
13108
- function eC() {
13109
- const e = QS(), t = Pn.getAuthToken(), n = ah();
13111
+ function tC() {
13112
+ const e = eC(), t = Pn.getAuthToken(), n = ah();
13110
13113
  return {
13111
13114
  apiBaseUrl: e.baseUrl || Pn.baseUrl || n || "http://localhost:8000",
13112
13115
  apiKey: t || e.apiKey || ch() || "",
@@ -13124,7 +13127,7 @@ function eC() {
13124
13127
  };
13125
13128
  }
13126
13129
  const lh = "chat-settings";
13127
- function tC() {
13130
+ function nC() {
13128
13131
  try {
13129
13132
  const e = localStorage.getItem(lh);
13130
13133
  return e ? JSON.parse(e) : {};
@@ -13132,15 +13135,15 @@ function tC() {
13132
13135
  return console.error("Failed to parse stored settings:", e), {};
13133
13136
  }
13134
13137
  }
13135
- function nC(e) {
13138
+ function rC(e) {
13136
13139
  try {
13137
13140
  localStorage.setItem(lh, JSON.stringify(e)), e.apiKey && Pn.setAuthToken(e.apiKey);
13138
13141
  } catch (t) {
13139
13142
  console.error("Failed to save settings:", t);
13140
13143
  }
13141
13144
  }
13142
- function vR() {
13143
- const e = eC(), t = tC(), n = Pn.getAuthToken();
13145
+ function xR() {
13146
+ const e = tC(), t = nC(), n = Pn.getAuthToken();
13144
13147
  return {
13145
13148
  ...e,
13146
13149
  ...t,
@@ -13150,11 +13153,11 @@ function vR() {
13150
13153
  apiBaseUrl: Pn.baseUrl || t.apiBaseUrl || e.apiBaseUrl
13151
13154
  };
13152
13155
  }
13153
- function xR(e) {
13154
- e.apiKey && Pn.setAuthToken(e.apiKey), nC(e);
13156
+ function bR(e) {
13157
+ e.apiKey && Pn.setAuthToken(e.apiKey), rC(e);
13155
13158
  }
13156
13159
  const ii = 768;
13157
- function rC() {
13160
+ function oC() {
13158
13161
  const [e, t] = f.useState(void 0);
13159
13162
  return f.useEffect(() => {
13160
13163
  const n = window.matchMedia(`(max-width: ${ii - 1}px)`), r = () => {
@@ -13163,8 +13166,8 @@ function rC() {
13163
13166
  return n.addEventListener("change", r), t(window.innerWidth < ii), () => n.removeEventListener("change", r);
13164
13167
  }, []), !!e;
13165
13168
  }
13166
- var oC = "Separator", vl = "horizontal", sC = ["horizontal", "vertical"], uh = f.forwardRef((e, t) => {
13167
- const { decorative: n, orientation: r = vl, ...o } = e, s = iC(r) ? r : vl, a = n ? { role: "none" } : { "aria-orientation": s === "vertical" ? s : void 0, role: "separator" };
13169
+ var sC = "Separator", vl = "horizontal", iC = ["horizontal", "vertical"], uh = f.forwardRef((e, t) => {
13170
+ const { decorative: n, orientation: r = vl, ...o } = e, s = aC(r) ? r : vl, a = n ? { role: "none" } : { "aria-orientation": s === "vertical" ? s : void 0, role: "separator" };
13168
13171
  return /* @__PURE__ */ c.jsx(
13169
13172
  xe.div,
13170
13173
  {
@@ -13175,9 +13178,9 @@ var oC = "Separator", vl = "horizontal", sC = ["horizontal", "vertical"], uh = f
13175
13178
  }
13176
13179
  );
13177
13180
  });
13178
- uh.displayName = oC;
13179
- function iC(e) {
13180
- return sC.includes(e);
13181
+ uh.displayName = sC;
13182
+ function aC(e) {
13183
+ return iC.includes(e);
13181
13184
  }
13182
13185
  var dh = uh;
13183
13186
  const Ha = f.forwardRef(
@@ -13197,7 +13200,7 @@ const Ha = f.forwardRef(
13197
13200
  )
13198
13201
  );
13199
13202
  Ha.displayName = dh.displayName;
13200
- const fh = fd, aC = Tw, cC = hd, hh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13203
+ const fh = fd, cC = Rw, lC = hd, hh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13201
13204
  ps,
13202
13205
  {
13203
13206
  className: D(
@@ -13209,7 +13212,7 @@ const fh = fd, aC = Tw, cC = hd, hh = f.forwardRef(({ className: e, ...t }, n) =
13209
13212
  }
13210
13213
  ));
13211
13214
  hh.displayName = ps.displayName;
13212
- const lC = zr(
13215
+ const uC = zr(
13213
13216
  "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
13214
13217
  {
13215
13218
  variants: {
@@ -13224,13 +13227,13 @@ const lC = zr(
13224
13227
  side: "right"
13225
13228
  }
13226
13229
  }
13227
- ), za = f.forwardRef(({ side: e = "right", className: t, children: n, ...r }, o) => /* @__PURE__ */ c.jsxs(cC, { children: [
13230
+ ), za = f.forwardRef(({ side: e = "right", className: t, children: n, ...r }, o) => /* @__PURE__ */ c.jsxs(lC, { children: [
13228
13231
  /* @__PURE__ */ c.jsx(hh, {}),
13229
13232
  /* @__PURE__ */ c.jsxs(
13230
13233
  ms,
13231
13234
  {
13232
13235
  ref: o,
13233
- className: D(lC({ side: e }), t),
13236
+ className: D(uC({ side: e }), t),
13234
13237
  ...r,
13235
13238
  children: [
13236
13239
  n,
@@ -13299,7 +13302,7 @@ var vh = Object.freeze({
13299
13302
  clip: "rect(0, 0, 0, 0)",
13300
13303
  whiteSpace: "nowrap",
13301
13304
  wordWrap: "normal"
13302
- }), uC = "VisuallyHidden", xh = f.forwardRef(
13305
+ }), dC = "VisuallyHidden", xh = f.forwardRef(
13303
13306
  (e, t) => /* @__PURE__ */ c.jsx(
13304
13307
  xe.span,
13305
13308
  {
@@ -13309,13 +13312,13 @@ var vh = Object.freeze({
13309
13312
  }
13310
13313
  )
13311
13314
  );
13312
- xh.displayName = uC;
13313
- var dC = xh, [Ns, bR] = Wt("Tooltip", [
13315
+ xh.displayName = dC;
13316
+ var fC = xh, [Ns, wR] = Wt("Tooltip", [
13314
13317
  hr
13315
- ]), Is = hr(), bh = "TooltipProvider", fC = 700, Oi = "tooltip.open", [hC, Ua] = Ns(bh), wh = (e) => {
13318
+ ]), Is = hr(), bh = "TooltipProvider", hC = 700, Oi = "tooltip.open", [pC, Ua] = Ns(bh), wh = (e) => {
13316
13319
  const {
13317
13320
  __scopeTooltip: t,
13318
- delayDuration: n = fC,
13321
+ delayDuration: n = hC,
13319
13322
  skipDelayDuration: r = 300,
13320
13323
  disableHoverableContent: o = !1,
13321
13324
  children: s
@@ -13324,7 +13327,7 @@ var dC = xh, [Ns, bR] = Wt("Tooltip", [
13324
13327
  const u = l.current;
13325
13328
  return () => window.clearTimeout(u);
13326
13329
  }, []), /* @__PURE__ */ c.jsx(
13327
- hC,
13330
+ pC,
13328
13331
  {
13329
13332
  scope: t,
13330
13333
  isOpenDelayedRef: i,
@@ -13348,7 +13351,7 @@ var dC = xh, [Ns, bR] = Wt("Tooltip", [
13348
13351
  );
13349
13352
  };
13350
13353
  wh.displayName = bh;
13351
- var Hr = "Tooltip", [pC, js] = Ns(Hr), yh = (e) => {
13354
+ var Hr = "Tooltip", [mC, js] = Ns(Hr), yh = (e) => {
13352
13355
  const {
13353
13356
  __scopeTooltip: t,
13354
13357
  children: n,
@@ -13376,7 +13379,7 @@ var Hr = "Tooltip", [pC, js] = Ns(Hr), yh = (e) => {
13376
13379
  return f.useEffect(() => () => {
13377
13380
  g.current && (window.clearTimeout(g.current), g.current = 0);
13378
13381
  }, []), /* @__PURE__ */ c.jsx(Ea, { ...u, children: /* @__PURE__ */ c.jsx(
13379
- pC,
13382
+ mC,
13380
13383
  {
13381
13384
  scope: t,
13382
13385
  contentId: m,
@@ -13427,19 +13430,19 @@ var Mi = "TooltipTrigger", Sh = f.forwardRef(
13427
13430
  }
13428
13431
  );
13429
13432
  Sh.displayName = Mi;
13430
- var mC = "TooltipPortal", [wR, gC] = Ns(mC, {
13433
+ var gC = "TooltipPortal", [yR, vC] = Ns(gC, {
13431
13434
  forceMount: void 0
13432
13435
  }), sr = "TooltipContent", Ch = f.forwardRef(
13433
13436
  (e, t) => {
13434
- const n = gC(sr, e.__scopeTooltip), { forceMount: r = n.forceMount, side: o = "top", ...s } = e, i = js(sr, e.__scopeTooltip);
13435
- return /* @__PURE__ */ c.jsx(xt, { present: r || i.open, children: i.disableHoverableContent ? /* @__PURE__ */ c.jsx(Th, { side: o, ...s, ref: t }) : /* @__PURE__ */ c.jsx(vC, { side: o, ...s, ref: t }) });
13437
+ const n = vC(sr, e.__scopeTooltip), { forceMount: r = n.forceMount, side: o = "top", ...s } = e, i = js(sr, e.__scopeTooltip);
13438
+ return /* @__PURE__ */ c.jsx(xt, { present: r || i.open, children: i.disableHoverableContent ? /* @__PURE__ */ c.jsx(Th, { side: o, ...s, ref: t }) : /* @__PURE__ */ c.jsx(xC, { side: o, ...s, ref: t }) });
13436
13439
  }
13437
- ), vC = f.forwardRef((e, t) => {
13440
+ ), xC = f.forwardRef((e, t) => {
13438
13441
  const n = js(sr, e.__scopeTooltip), r = Ua(sr, e.__scopeTooltip), o = f.useRef(null), s = Re(t, o), [i, a] = f.useState(null), { trigger: l, onClose: u } = n, d = o.current, { onPointerInTransitChange: h } = r, m = f.useCallback(() => {
13439
13442
  a(null), h(!1);
13440
13443
  }, [h]), g = f.useCallback(
13441
13444
  (b, v) => {
13442
- const p = b.currentTarget, x = { x: b.clientX, y: b.clientY }, w = SC(x, p.getBoundingClientRect()), y = CC(x, w), E = TC(v.getBoundingClientRect()), S = EC([...y, ...E]);
13445
+ const p = b.currentTarget, x = { x: b.clientX, y: b.clientY }, w = CC(x, p.getBoundingClientRect()), y = TC(x, w), E = RC(v.getBoundingClientRect()), S = NC([...y, ...E]);
13443
13446
  a(S), h(!0);
13444
13447
  },
13445
13448
  [h]
@@ -13454,13 +13457,13 @@ var mC = "TooltipPortal", [wR, gC] = Ns(mC, {
13454
13457
  }, [l, d, g, m]), f.useEffect(() => {
13455
13458
  if (i) {
13456
13459
  const b = (v) => {
13457
- const p = v.target, x = { x: v.clientX, y: v.clientY }, w = (l == null ? void 0 : l.contains(p)) || (d == null ? void 0 : d.contains(p)), y = !RC(x, i);
13460
+ const p = v.target, x = { x: v.clientX, y: v.clientY }, w = (l == null ? void 0 : l.contains(p)) || (d == null ? void 0 : d.contains(p)), y = !EC(x, i);
13458
13461
  w ? m() : y && (m(), u());
13459
13462
  };
13460
13463
  return document.addEventListener("pointermove", b), () => document.removeEventListener("pointermove", b);
13461
13464
  }
13462
13465
  }, [l, d, i, u, m]), /* @__PURE__ */ c.jsx(Th, { ...e, ref: s });
13463
- }), [xC, bC] = Ns(Hr, { isInside: !1 }), wC = lm("TooltipContent"), Th = f.forwardRef(
13466
+ }), [bC, wC] = Ns(Hr, { isInside: !1 }), yC = lm("TooltipContent"), Th = f.forwardRef(
13464
13467
  (e, t) => {
13465
13468
  const {
13466
13469
  __scopeTooltip: n,
@@ -13503,8 +13506,8 @@ var mC = "TooltipPortal", [wR, gC] = Ns(mC, {
13503
13506
  "--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
13504
13507
  },
13505
13508
  children: [
13506
- /* @__PURE__ */ c.jsx(wC, { children: r }),
13507
- /* @__PURE__ */ c.jsx(xC, { scope: n, isInside: !0, children: /* @__PURE__ */ c.jsx(dC, { id: l.contentId, role: "tooltip", children: o || r }) })
13509
+ /* @__PURE__ */ c.jsx(yC, { children: r }),
13510
+ /* @__PURE__ */ c.jsx(bC, { scope: n, isInside: !0, children: /* @__PURE__ */ c.jsx(fC, { id: l.contentId, role: "tooltip", children: o || r }) })
13508
13511
  ]
13509
13512
  }
13510
13513
  )
@@ -13513,17 +13516,17 @@ var mC = "TooltipPortal", [wR, gC] = Ns(mC, {
13513
13516
  }
13514
13517
  );
13515
13518
  Ch.displayName = sr;
13516
- var Rh = "TooltipArrow", yC = f.forwardRef(
13519
+ var Rh = "TooltipArrow", SC = f.forwardRef(
13517
13520
  (e, t) => {
13518
13521
  const { __scopeTooltip: n, ...r } = e, o = Is(n);
13519
- return bC(
13522
+ return wC(
13520
13523
  Rh,
13521
13524
  n
13522
13525
  ).isInside ? null : /* @__PURE__ */ c.jsx(ja, { ...o, ...r, ref: t });
13523
13526
  }
13524
13527
  );
13525
- yC.displayName = Rh;
13526
- function SC(e, t) {
13528
+ SC.displayName = Rh;
13529
+ function CC(e, t) {
13527
13530
  const n = Math.abs(t.top - e.y), r = Math.abs(t.bottom - e.y), o = Math.abs(t.right - e.x), s = Math.abs(t.left - e.x);
13528
13531
  switch (Math.min(n, r, o, s)) {
13529
13532
  case s:
@@ -13538,7 +13541,7 @@ function SC(e, t) {
13538
13541
  throw new Error("unreachable");
13539
13542
  }
13540
13543
  }
13541
- function CC(e, t, n = 5) {
13544
+ function TC(e, t, n = 5) {
13542
13545
  const r = [];
13543
13546
  switch (t) {
13544
13547
  case "top":
@@ -13568,7 +13571,7 @@ function CC(e, t, n = 5) {
13568
13571
  }
13569
13572
  return r;
13570
13573
  }
13571
- function TC(e) {
13574
+ function RC(e) {
13572
13575
  const { top: t, right: n, bottom: r, left: o } = e;
13573
13576
  return [
13574
13577
  { x: o, y: t },
@@ -13577,7 +13580,7 @@ function TC(e) {
13577
13580
  { x: o, y: r }
13578
13581
  ];
13579
13582
  }
13580
- function RC(e, t) {
13583
+ function EC(e, t) {
13581
13584
  const { x: n, y: r } = e;
13582
13585
  let o = !1;
13583
13586
  for (let s = 0, i = t.length - 1; s < t.length; i = s++) {
@@ -13586,11 +13589,11 @@ function RC(e, t) {
13586
13589
  }
13587
13590
  return o;
13588
13591
  }
13589
- function EC(e) {
13592
+ function NC(e) {
13590
13593
  const t = e.slice();
13591
- return t.sort((n, r) => n.x < r.x ? -1 : n.x > r.x ? 1 : n.y < r.y ? -1 : n.y > r.y ? 1 : 0), NC(t);
13594
+ return t.sort((n, r) => n.x < r.x ? -1 : n.x > r.x ? 1 : n.y < r.y ? -1 : n.y > r.y ? 1 : 0), IC(t);
13592
13595
  }
13593
- function NC(e) {
13596
+ function IC(e) {
13594
13597
  if (e.length <= 1) return e.slice();
13595
13598
  const t = [];
13596
13599
  for (let r = 0; r < e.length; r++) {
@@ -13615,8 +13618,8 @@ function NC(e) {
13615
13618
  }
13616
13619
  return n.pop(), t.length === 1 && n.length === 1 && t[0].x === n[0].x && t[0].y === n[0].y ? t : t.concat(n);
13617
13620
  }
13618
- var IC = wh, jC = yh, kC = Sh, Eh = Ch;
13619
- const AC = IC, PC = jC, _C = kC, Nh = f.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ c.jsx(
13621
+ var jC = wh, kC = yh, AC = Sh, Eh = Ch;
13622
+ const PC = jC, _C = kC, OC = AC, Nh = f.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ c.jsx(
13620
13623
  Eh,
13621
13624
  {
13622
13625
  ref: r,
@@ -13629,7 +13632,7 @@ const AC = IC, PC = jC, _C = kC, Nh = f.forwardRef(({ className: e, sideOffset:
13629
13632
  }
13630
13633
  ));
13631
13634
  Nh.displayName = Eh.displayName;
13632
- const OC = "sidebar:state", MC = 60 * 60 * 24 * 7, DC = "16rem", LC = "18rem", FC = "3rem", BC = "b", Ih = f.createContext(null);
13635
+ const MC = "sidebar:state", DC = 60 * 60 * 24 * 7, LC = "16rem", FC = "18rem", BC = "3rem", $C = "b", Ih = f.createContext(null);
13633
13636
  function ks() {
13634
13637
  const e = f.useContext(Ih);
13635
13638
  if (!e)
@@ -13646,16 +13649,16 @@ const jh = f.forwardRef(
13646
13649
  children: s,
13647
13650
  ...i
13648
13651
  }, a) => {
13649
- const l = rC(), [u, d] = f.useState(!1), [h, m] = f.useState(e), g = t ?? h, b = f.useCallback(
13652
+ const l = oC(), [u, d] = f.useState(!1), [h, m] = f.useState(e), g = t ?? h, b = f.useCallback(
13650
13653
  (w) => {
13651
13654
  const y = typeof w == "function" ? w(g) : w;
13652
- n ? n(y) : m(y), document.cookie = `${OC}=${y}; path=/; max-age=${MC}`;
13655
+ n ? n(y) : m(y), document.cookie = `${MC}=${y}; path=/; max-age=${DC}`;
13653
13656
  },
13654
13657
  [n, g]
13655
13658
  ), v = f.useCallback(() => l ? d((w) => !w) : b((w) => !w), [l, b, d]);
13656
13659
  f.useEffect(() => {
13657
13660
  const w = (y) => {
13658
- y.key === BC && (y.metaKey || y.ctrlKey) && (y.preventDefault(), v());
13661
+ y.key === $C && (y.metaKey || y.ctrlKey) && (y.preventDefault(), v());
13659
13662
  };
13660
13663
  return window.addEventListener("keydown", w), () => window.removeEventListener("keydown", w);
13661
13664
  }, [v]);
@@ -13671,12 +13674,12 @@ const jh = f.forwardRef(
13671
13674
  }),
13672
13675
  [p, g, b, l, u, d, v]
13673
13676
  );
13674
- return /* @__PURE__ */ c.jsx(Ih.Provider, { value: x, children: /* @__PURE__ */ c.jsx(AC, { delayDuration: 0, children: /* @__PURE__ */ c.jsx(
13677
+ return /* @__PURE__ */ c.jsx(Ih.Provider, { value: x, children: /* @__PURE__ */ c.jsx(PC, { delayDuration: 0, children: /* @__PURE__ */ c.jsx(
13675
13678
  "div",
13676
13679
  {
13677
13680
  style: {
13678
- "--sidebar-width": DC,
13679
- "--sidebar-width-icon": FC,
13681
+ "--sidebar-width": LC,
13682
+ "--sidebar-width-icon": BC,
13680
13683
  ...o
13681
13684
  },
13682
13685
  className: D(
@@ -13719,7 +13722,7 @@ const kh = f.forwardRef(
13719
13722
  "data-mobile": "true",
13720
13723
  className: "w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
13721
13724
  style: {
13722
- "--sidebar-width": LC
13725
+ "--sidebar-width": FC
13723
13726
  },
13724
13727
  side: e,
13725
13728
  children: /* @__PURE__ */ c.jsx("div", { className: "flex h-full w-full flex-col", children: o })
@@ -13794,7 +13797,7 @@ const Ah = f.forwardRef(({ className: e, onClick: t, ...n }, r) => {
13794
13797
  );
13795
13798
  });
13796
13799
  Ah.displayName = "SidebarTrigger";
13797
- const $C = f.forwardRef(({ className: e, ...t }, n) => {
13800
+ const HC = f.forwardRef(({ className: e, ...t }, n) => {
13798
13801
  const { toggleSidebar: r } = ks();
13799
13802
  return /* @__PURE__ */ c.jsx(
13800
13803
  "button",
@@ -13818,7 +13821,7 @@ const $C = f.forwardRef(({ className: e, ...t }, n) => {
13818
13821
  }
13819
13822
  );
13820
13823
  });
13821
- $C.displayName = "SidebarRail";
13824
+ HC.displayName = "SidebarRail";
13822
13825
  const Ph = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13823
13826
  "main",
13824
13827
  {
@@ -13832,7 +13835,7 @@ const Ph = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13832
13835
  }
13833
13836
  ));
13834
13837
  Ph.displayName = "SidebarInset";
13835
- const HC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13838
+ const zC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13836
13839
  $r,
13837
13840
  {
13838
13841
  ref: n,
@@ -13844,7 +13847,7 @@ const HC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13844
13847
  ...t
13845
13848
  }
13846
13849
  ));
13847
- HC.displayName = "SidebarInput";
13850
+ zC.displayName = "SidebarInput";
13848
13851
  const _h = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13849
13852
  "div",
13850
13853
  {
@@ -13855,7 +13858,7 @@ const _h = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13855
13858
  }
13856
13859
  ));
13857
13860
  _h.displayName = "SidebarHeader";
13858
- const zC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13861
+ const UC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13859
13862
  "div",
13860
13863
  {
13861
13864
  ref: n,
@@ -13864,8 +13867,8 @@ const zC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13864
13867
  ...t
13865
13868
  }
13866
13869
  ));
13867
- zC.displayName = "SidebarFooter";
13868
- const UC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13870
+ UC.displayName = "SidebarFooter";
13871
+ const WC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13869
13872
  Ha,
13870
13873
  {
13871
13874
  ref: n,
@@ -13874,7 +13877,7 @@ const UC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13874
13877
  ...t
13875
13878
  }
13876
13879
  ));
13877
- UC.displayName = "SidebarSeparator";
13880
+ WC.displayName = "SidebarSeparator";
13878
13881
  const Oh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13879
13882
  "div",
13880
13883
  {
@@ -13915,7 +13918,7 @@ const Dh = f.forwardRef(({ className: e, asChild: t = !1, ...n }, r) => {
13915
13918
  );
13916
13919
  });
13917
13920
  Dh.displayName = "SidebarGroupLabel";
13918
- const WC = f.forwardRef(({ className: e, asChild: t = !1, ...n }, r) => {
13921
+ const VC = f.forwardRef(({ className: e, asChild: t = !1, ...n }, r) => {
13919
13922
  const o = t ? ir : "button";
13920
13923
  return /* @__PURE__ */ c.jsx(
13921
13924
  o,
@@ -13933,7 +13936,7 @@ const WC = f.forwardRef(({ className: e, asChild: t = !1, ...n }, r) => {
13933
13936
  }
13934
13937
  );
13935
13938
  });
13936
- WC.displayName = "SidebarGroupAction";
13939
+ VC.displayName = "SidebarGroupAction";
13937
13940
  const Lh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13938
13941
  "div",
13939
13942
  {
@@ -13964,7 +13967,7 @@ const Bh = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
13964
13967
  }
13965
13968
  ));
13966
13969
  Bh.displayName = "SidebarMenuItem";
13967
- const VC = zr(
13970
+ const GC = zr(
13968
13971
  "peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
13969
13972
  {
13970
13973
  variants: {
@@ -14000,14 +14003,14 @@ const VC = zr(
14000
14003
  "data-sidebar": "menu-button",
14001
14004
  "data-size": r,
14002
14005
  "data-active": t,
14003
- className: D(VC({ variant: n, size: r }), s),
14006
+ className: D(GC({ variant: n, size: r }), s),
14004
14007
  ...i
14005
14008
  }
14006
14009
  );
14007
14010
  return o ? (typeof o == "string" && (o = {
14008
14011
  children: o
14009
- }), /* @__PURE__ */ c.jsxs(PC, { children: [
14010
- /* @__PURE__ */ c.jsx(_C, { asChild: !0, children: h }),
14012
+ }), /* @__PURE__ */ c.jsxs(_C, { children: [
14013
+ /* @__PURE__ */ c.jsx(OC, { asChild: !0, children: h }),
14011
14014
  /* @__PURE__ */ c.jsx(
14012
14015
  Nh,
14013
14016
  {
@@ -14021,7 +14024,7 @@ const VC = zr(
14021
14024
  }
14022
14025
  );
14023
14026
  $h.displayName = "SidebarMenuButton";
14024
- const GC = f.forwardRef(({ className: e, asChild: t = !1, showOnHover: n = !1, ...r }, o) => {
14027
+ const KC = f.forwardRef(({ className: e, asChild: t = !1, showOnHover: n = !1, ...r }, o) => {
14025
14028
  const s = t ? ir : "button";
14026
14029
  return /* @__PURE__ */ c.jsx(
14027
14030
  s,
@@ -14043,8 +14046,8 @@ const GC = f.forwardRef(({ className: e, asChild: t = !1, showOnHover: n = !1, .
14043
14046
  }
14044
14047
  );
14045
14048
  });
14046
- GC.displayName = "SidebarMenuAction";
14047
- const KC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14049
+ KC.displayName = "SidebarMenuAction";
14050
+ const YC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14048
14051
  "div",
14049
14052
  {
14050
14053
  ref: n,
@@ -14061,8 +14064,8 @@ const KC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14061
14064
  ...t
14062
14065
  }
14063
14066
  ));
14064
- KC.displayName = "SidebarMenuBadge";
14065
- const YC = f.forwardRef(({ className: e, showIcon: t = !1, ...n }, r) => {
14067
+ YC.displayName = "SidebarMenuBadge";
14068
+ const qC = f.forwardRef(({ className: e, showIcon: t = !1, ...n }, r) => {
14066
14069
  const o = f.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
14067
14070
  return /* @__PURE__ */ c.jsxs(
14068
14071
  "div",
@@ -14093,8 +14096,8 @@ const YC = f.forwardRef(({ className: e, showIcon: t = !1, ...n }, r) => {
14093
14096
  }
14094
14097
  );
14095
14098
  });
14096
- YC.displayName = "SidebarMenuSkeleton";
14097
- const qC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14099
+ qC.displayName = "SidebarMenuSkeleton";
14100
+ const XC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14098
14101
  "ul",
14099
14102
  {
14100
14103
  ref: n,
@@ -14107,10 +14110,10 @@ const qC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14107
14110
  ...t
14108
14111
  }
14109
14112
  ));
14110
- qC.displayName = "SidebarMenuSub";
14111
- const XC = f.forwardRef(({ ...e }, t) => /* @__PURE__ */ c.jsx("li", { ref: t, ...e }));
14112
- XC.displayName = "SidebarMenuSubItem";
14113
- const JC = f.forwardRef(({ asChild: e = !1, size: t = "md", isActive: n, className: r, ...o }, s) => {
14113
+ XC.displayName = "SidebarMenuSub";
14114
+ const JC = f.forwardRef(({ ...e }, t) => /* @__PURE__ */ c.jsx("li", { ref: t, ...e }));
14115
+ JC.displayName = "SidebarMenuSubItem";
14116
+ const ZC = f.forwardRef(({ asChild: e = !1, size: t = "md", isActive: n, className: r, ...o }, s) => {
14114
14117
  const i = e ? ir : "a";
14115
14118
  return /* @__PURE__ */ c.jsx(
14116
14119
  i,
@@ -14131,8 +14134,8 @@ const JC = f.forwardRef(({ asChild: e = !1, size: t = "md", isActive: n, classNa
14131
14134
  }
14132
14135
  );
14133
14136
  });
14134
- JC.displayName = "SidebarMenuSubButton";
14135
- function yR({
14137
+ ZC.displayName = "SidebarMenuSubButton";
14138
+ function SR({
14136
14139
  header: e,
14137
14140
  sidebarTitle: t = "Threads",
14138
14141
  showThreads: n = !0,
@@ -14167,7 +14170,7 @@ function yR({
14167
14170
  ] })
14168
14171
  ] }) });
14169
14172
  }
14170
- var ZC = "Label", Hh = f.forwardRef((e, t) => /* @__PURE__ */ c.jsx(
14173
+ var QC = "Label", Hh = f.forwardRef((e, t) => /* @__PURE__ */ c.jsx(
14171
14174
  xe.label,
14172
14175
  {
14173
14176
  ...e,
@@ -14178,15 +14181,15 @@ var ZC = "Label", Hh = f.forwardRef((e, t) => /* @__PURE__ */ c.jsx(
14178
14181
  }
14179
14182
  }
14180
14183
  ));
14181
- Hh.displayName = ZC;
14184
+ Hh.displayName = QC;
14182
14185
  var zh = Hh;
14183
- const QC = zr(
14186
+ const eT = zr(
14184
14187
  "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
14185
14188
  ), jt = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14186
14189
  zh,
14187
14190
  {
14188
14191
  ref: n,
14189
- className: D(QC(), e),
14192
+ className: D(eT(), e),
14190
14193
  ...t
14191
14194
  }
14192
14195
  ));
@@ -14195,7 +14198,7 @@ function Uh(e) {
14195
14198
  const t = f.useRef({ value: e, previous: e });
14196
14199
  return f.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
14197
14200
  }
14198
- var As = "Switch", [eT, SR] = Wt(As), [tT, nT] = eT(As), Wh = f.forwardRef(
14201
+ var As = "Switch", [tT, CR] = Wt(As), [nT, rT] = tT(As), Wh = f.forwardRef(
14199
14202
  (e, t) => {
14200
14203
  const {
14201
14204
  __scopeSwitch: n,
@@ -14214,7 +14217,7 @@ var As = "Switch", [eT, SR] = Wt(As), [tT, nT] = eT(As), Wh = f.forwardRef(
14214
14217
  onChange: u,
14215
14218
  caller: As
14216
14219
  });
14217
- return /* @__PURE__ */ c.jsxs(tT, { scope: n, checked: x, disabled: a, children: [
14220
+ return /* @__PURE__ */ c.jsxs(nT, { scope: n, checked: x, disabled: a, children: [
14218
14221
  /* @__PURE__ */ c.jsx(
14219
14222
  xe.button,
14220
14223
  {
@@ -14253,7 +14256,7 @@ var As = "Switch", [eT, SR] = Wt(As), [tT, nT] = eT(As), Wh = f.forwardRef(
14253
14256
  Wh.displayName = As;
14254
14257
  var Vh = "SwitchThumb", Gh = f.forwardRef(
14255
14258
  (e, t) => {
14256
- const { __scopeSwitch: n, ...r } = e, o = nT(Vh, n);
14259
+ const { __scopeSwitch: n, ...r } = e, o = rT(Vh, n);
14257
14260
  return /* @__PURE__ */ c.jsx(
14258
14261
  xe.span,
14259
14262
  {
@@ -14266,7 +14269,7 @@ var Vh = "SwitchThumb", Gh = f.forwardRef(
14266
14269
  }
14267
14270
  );
14268
14271
  Gh.displayName = Vh;
14269
- var rT = "SwitchBubbleInput", Kh = f.forwardRef(
14272
+ var oT = "SwitchBubbleInput", Kh = f.forwardRef(
14270
14273
  ({
14271
14274
  __scopeSwitch: e,
14272
14275
  control: t,
@@ -14307,11 +14310,11 @@ var rT = "SwitchBubbleInput", Kh = f.forwardRef(
14307
14310
  );
14308
14311
  }
14309
14312
  );
14310
- Kh.displayName = rT;
14313
+ Kh.displayName = oT;
14311
14314
  function Yh(e) {
14312
14315
  return e ? "checked" : "unchecked";
14313
14316
  }
14314
- var qh = Wh, oT = Gh;
14317
+ var qh = Wh, sT = Gh;
14315
14318
  const mn = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14316
14319
  qh,
14317
14320
  {
@@ -14322,7 +14325,7 @@ const mn = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14322
14325
  ...t,
14323
14326
  ref: n,
14324
14327
  children: /* @__PURE__ */ c.jsx(
14325
- oT,
14328
+ sT,
14326
14329
  {
14327
14330
  className: D(
14328
14331
  "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
@@ -14332,10 +14335,10 @@ const mn = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14332
14335
  }
14333
14336
  ));
14334
14337
  mn.displayName = qh.displayName;
14335
- var sT = [" ", "Enter", "ArrowUp", "ArrowDown"], iT = [" ", "Enter"], Dn = "Select", [Ps, _s, aT] = va(Dn), [pr, CR] = Wt(Dn, [
14336
- aT,
14338
+ var iT = [" ", "Enter", "ArrowUp", "ArrowDown"], aT = [" ", "Enter"], Dn = "Select", [Ps, _s, cT] = va(Dn), [pr, TR] = Wt(Dn, [
14339
+ cT,
14337
14340
  hr
14338
- ]), Os = hr(), [cT, Tn] = pr(Dn), [lT, uT] = pr(Dn), Xh = (e) => {
14341
+ ]), Os = hr(), [lT, Tn] = pr(Dn), [uT, dT] = pr(Dn), Xh = (e) => {
14339
14342
  const {
14340
14343
  __scopeSelect: t,
14341
14344
  children: n,
@@ -14363,7 +14366,7 @@ var sT = [" ", "Enter", "ArrowUp", "ArrowDown"], iT = [" ", "Enter"], Dn = "Sele
14363
14366
  caller: Dn
14364
14367
  }), L = f.useRef(null), H = p ? b || !!p.closest("form") : !0, [G, P] = f.useState(/* @__PURE__ */ new Set()), X = Array.from(G).map((M) => M.props.value).join(";");
14365
14368
  return /* @__PURE__ */ c.jsx(Ea, { ...v, children: /* @__PURE__ */ c.jsxs(
14366
- cT,
14369
+ lT,
14367
14370
  {
14368
14371
  required: g,
14369
14372
  scope: t,
@@ -14383,7 +14386,7 @@ var sT = [" ", "Enter", "ArrowUp", "ArrowDown"], iT = [" ", "Enter"], Dn = "Sele
14383
14386
  disabled: m,
14384
14387
  children: [
14385
14388
  /* @__PURE__ */ c.jsx(Ps.Provider, { scope: t, children: /* @__PURE__ */ c.jsx(
14386
- lT,
14389
+ uT,
14387
14390
  {
14388
14391
  scope: e.__scopeSelect,
14389
14392
  onNativeOptionAdd: f.useCallback((M) => {
@@ -14459,7 +14462,7 @@ var Jh = "SelectTrigger", Zh = f.forwardRef(
14459
14462
  }),
14460
14463
  onKeyDown: ne(o.onKeyDown, (v) => {
14461
14464
  const p = h.current !== "";
14462
- !(v.ctrlKey || v.altKey || v.metaKey) && v.key.length === 1 && m(v.key), !(p && v.key === " ") && sT.includes(v.key) && (b(), v.preventDefault());
14465
+ !(v.ctrlKey || v.altKey || v.metaKey) && v.key.length === 1 && m(v.key), !(p && v.key === " ") && iT.includes(v.key) && (b(), v.preventDefault());
14463
14466
  })
14464
14467
  }
14465
14468
  ) });
@@ -14483,15 +14486,15 @@ var Qh = "SelectValue", ep = f.forwardRef(
14483
14486
  }
14484
14487
  );
14485
14488
  ep.displayName = Qh;
14486
- var dT = "SelectIcon", tp = f.forwardRef(
14489
+ var fT = "SelectIcon", tp = f.forwardRef(
14487
14490
  (e, t) => {
14488
14491
  const { __scopeSelect: n, children: r, ...o } = e;
14489
14492
  return /* @__PURE__ */ c.jsx(xe.span, { "aria-hidden": !0, ...o, ref: t, children: r || "▼" });
14490
14493
  }
14491
14494
  );
14492
- tp.displayName = dT;
14493
- var fT = "SelectPortal", np = (e) => /* @__PURE__ */ c.jsx(us, { asChild: !0, ...e });
14494
- np.displayName = fT;
14495
+ tp.displayName = fT;
14496
+ var hT = "SelectPortal", np = (e) => /* @__PURE__ */ c.jsx(us, { asChild: !0, ...e });
14497
+ np.displayName = hT;
14495
14498
  var Ln = "SelectContent", rp = f.forwardRef(
14496
14499
  (e, t) => {
14497
14500
  const n = Tn(Ln, e.__scopeSelect), [r, o] = f.useState();
@@ -14508,7 +14511,7 @@ var Ln = "SelectContent", rp = f.forwardRef(
14508
14511
  }
14509
14512
  );
14510
14513
  rp.displayName = Ln;
14511
- var Lt = 10, [op, Rn] = pr(Ln), hT = "SelectContentImpl", pT = tr("SelectContent.RemoveScroll"), sp = f.forwardRef(
14514
+ var Lt = 10, [op, Rn] = pr(Ln), pT = "SelectContentImpl", mT = tr("SelectContent.RemoveScroll"), sp = f.forwardRef(
14512
14515
  (e, t) => {
14513
14516
  const {
14514
14517
  __scopeSelect: n,
@@ -14616,7 +14619,7 @@ var Lt = 10, [op, Rn] = pr(Ln), hT = "SelectContentImpl", pT = tr("SelectContent
14616
14619
  position: r,
14617
14620
  isPositioned: G,
14618
14621
  searchRef: W,
14619
- children: /* @__PURE__ */ c.jsx(fs, { as: pT, allowPinchZoom: !0, children: /* @__PURE__ */ c.jsx(
14622
+ children: /* @__PURE__ */ c.jsx(fs, { as: mT, allowPinchZoom: !0, children: /* @__PURE__ */ c.jsx(
14620
14623
  ls,
14621
14624
  {
14622
14625
  asChild: !0,
@@ -14678,8 +14681,8 @@ var Lt = 10, [op, Rn] = pr(Ln), hT = "SelectContentImpl", pT = tr("SelectContent
14678
14681
  );
14679
14682
  }
14680
14683
  );
14681
- sp.displayName = hT;
14682
- var mT = "SelectItemAlignedPosition", ip = f.forwardRef((e, t) => {
14684
+ sp.displayName = pT;
14685
+ var gT = "SelectItemAlignedPosition", ip = f.forwardRef((e, t) => {
14683
14686
  const { __scopeSelect: n, onPlaced: r, ...o } = e, s = Tn(Ln, n), i = Rn(Ln, n), [a, l] = f.useState(null), [u, d] = f.useState(null), h = Re(t, (C) => d(C)), m = _s(n), g = f.useRef(!1), b = f.useRef(!0), { viewport: v, selectedItem: p, selectedItemText: x, focusSelectedItem: w } = i, y = f.useCallback(() => {
14684
14687
  if (s.trigger && s.valueNode && a && u && v && p && x) {
14685
14688
  const C = s.trigger.getBoundingClientRect(), N = u.getBoundingClientRect(), I = s.valueNode.getBoundingClientRect(), j = x.getBoundingClientRect();
@@ -14747,7 +14750,7 @@ var mT = "SelectItemAlignedPosition", ip = f.forwardRef((e, t) => {
14747
14750
  [y, w]
14748
14751
  );
14749
14752
  return /* @__PURE__ */ c.jsx(
14750
- vT,
14753
+ xT,
14751
14754
  {
14752
14755
  scope: n,
14753
14756
  contentWrapper: a,
@@ -14783,8 +14786,8 @@ var mT = "SelectItemAlignedPosition", ip = f.forwardRef((e, t) => {
14783
14786
  }
14784
14787
  );
14785
14788
  });
14786
- ip.displayName = mT;
14787
- var gT = "SelectPopperPosition", Di = f.forwardRef((e, t) => {
14789
+ ip.displayName = gT;
14790
+ var vT = "SelectPopperPosition", Di = f.forwardRef((e, t) => {
14788
14791
  const {
14789
14792
  __scopeSelect: n,
14790
14793
  align: r = "start",
@@ -14812,8 +14815,8 @@ var gT = "SelectPopperPosition", Di = f.forwardRef((e, t) => {
14812
14815
  }
14813
14816
  );
14814
14817
  });
14815
- Di.displayName = gT;
14816
- var [vT, Wa] = pr(Ln, {}), Li = "SelectViewport", ap = f.forwardRef(
14818
+ Di.displayName = vT;
14819
+ var [xT, Wa] = pr(Ln, {}), Li = "SelectViewport", ap = f.forwardRef(
14817
14820
  (e, t) => {
14818
14821
  const { __scopeSelect: n, nonce: r, ...o } = e, s = Rn(Li, n), i = Wa(Li, n), a = Re(t, s.onViewportChange), l = f.useRef(0);
14819
14822
  return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
@@ -14866,21 +14869,21 @@ var [vT, Wa] = pr(Ln, {}), Li = "SelectViewport", ap = f.forwardRef(
14866
14869
  }
14867
14870
  );
14868
14871
  ap.displayName = Li;
14869
- var cp = "SelectGroup", [xT, bT] = pr(cp), wT = f.forwardRef(
14872
+ var cp = "SelectGroup", [bT, wT] = pr(cp), yT = f.forwardRef(
14870
14873
  (e, t) => {
14871
14874
  const { __scopeSelect: n, ...r } = e, o = Bt();
14872
- return /* @__PURE__ */ c.jsx(xT, { scope: n, id: o, children: /* @__PURE__ */ c.jsx(xe.div, { role: "group", "aria-labelledby": o, ...r, ref: t }) });
14875
+ return /* @__PURE__ */ c.jsx(bT, { scope: n, id: o, children: /* @__PURE__ */ c.jsx(xe.div, { role: "group", "aria-labelledby": o, ...r, ref: t }) });
14873
14876
  }
14874
14877
  );
14875
- wT.displayName = cp;
14878
+ yT.displayName = cp;
14876
14879
  var lp = "SelectLabel", up = f.forwardRef(
14877
14880
  (e, t) => {
14878
- const { __scopeSelect: n, ...r } = e, o = bT(lp, n);
14881
+ const { __scopeSelect: n, ...r } = e, o = wT(lp, n);
14879
14882
  return /* @__PURE__ */ c.jsx(xe.div, { id: o.id, ...r, ref: t });
14880
14883
  }
14881
14884
  );
14882
14885
  up.displayName = lp;
14883
- var qo = "SelectItem", [yT, dp] = pr(qo), fp = f.forwardRef(
14886
+ var qo = "SelectItem", [ST, dp] = pr(qo), fp = f.forwardRef(
14884
14887
  (e, t) => {
14885
14888
  const {
14886
14889
  __scopeSelect: n,
@@ -14902,7 +14905,7 @@ var qo = "SelectItem", [yT, dp] = pr(qo), fp = f.forwardRef(
14902
14905
  "A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder."
14903
14906
  );
14904
14907
  return /* @__PURE__ */ c.jsx(
14905
- yT,
14908
+ ST,
14906
14909
  {
14907
14910
  scope: n,
14908
14911
  value: r,
@@ -14953,7 +14956,7 @@ var qo = "SelectItem", [yT, dp] = pr(qo), fp = f.forwardRef(
14953
14956
  }),
14954
14957
  onKeyDown: ne(i.onKeyDown, (w) => {
14955
14958
  var E;
14956
- ((E = l.searchRef) == null ? void 0 : E.current) !== "" && w.key === " " || (iT.includes(w.key) && x(), w.key === " " && w.preventDefault());
14959
+ ((E = l.searchRef) == null ? void 0 : E.current) !== "" && w.key === " " || (aT.includes(w.key) && x(), w.key === " " && w.preventDefault());
14957
14960
  })
14958
14961
  }
14959
14962
  )
@@ -14966,7 +14969,7 @@ var qo = "SelectItem", [yT, dp] = pr(qo), fp = f.forwardRef(
14966
14969
  fp.displayName = qo;
14967
14970
  var Tr = "SelectItemText", hp = f.forwardRef(
14968
14971
  (e, t) => {
14969
- const { __scopeSelect: n, className: r, style: o, ...s } = e, i = Tn(Tr, n), a = Rn(Tr, n), l = dp(Tr, n), u = uT(Tr, n), [d, h] = f.useState(null), m = Re(
14972
+ const { __scopeSelect: n, className: r, style: o, ...s } = e, i = Tn(Tr, n), a = Rn(Tr, n), l = dp(Tr, n), u = dT(Tr, n), [d, h] = f.useState(null), m = Re(
14970
14973
  t,
14971
14974
  (x) => h(x),
14972
14975
  l.onItemTextChange,
@@ -15067,21 +15070,21 @@ var xp = f.forwardRef((e, t) => {
15067
15070
  })
15068
15071
  }
15069
15072
  );
15070
- }), ST = "SelectSeparator", bp = f.forwardRef(
15073
+ }), CT = "SelectSeparator", bp = f.forwardRef(
15071
15074
  (e, t) => {
15072
15075
  const { __scopeSelect: n, ...r } = e;
15073
15076
  return /* @__PURE__ */ c.jsx(xe.div, { "aria-hidden": !0, ...r, ref: t });
15074
15077
  }
15075
15078
  );
15076
- bp.displayName = ST;
15077
- var $i = "SelectArrow", CT = f.forwardRef(
15079
+ bp.displayName = CT;
15080
+ var $i = "SelectArrow", TT = f.forwardRef(
15078
15081
  (e, t) => {
15079
15082
  const { __scopeSelect: n, ...r } = e, o = Os(n), s = Tn($i, n), i = Rn($i, n);
15080
15083
  return s.open && i.position === "popper" ? /* @__PURE__ */ c.jsx(ja, { ...o, ...r, ref: t }) : null;
15081
15084
  }
15082
15085
  );
15083
- CT.displayName = $i;
15084
- var TT = "SelectBubbleInput", wp = f.forwardRef(
15086
+ TT.displayName = $i;
15087
+ var RT = "SelectBubbleInput", wp = f.forwardRef(
15085
15088
  ({ __scopeSelect: e, value: t, ...n }, r) => {
15086
15089
  const o = f.useRef(null), s = Re(r, o), i = Uh(t);
15087
15090
  return f.useEffect(() => {
@@ -15106,7 +15109,7 @@ var TT = "SelectBubbleInput", wp = f.forwardRef(
15106
15109
  );
15107
15110
  }
15108
15111
  );
15109
- wp.displayName = TT;
15112
+ wp.displayName = RT;
15110
15113
  function yp(e) {
15111
15114
  return e === "" || e === void 0;
15112
15115
  }
@@ -15126,18 +15129,18 @@ function Sp(e) {
15126
15129
  }
15127
15130
  function Cp(e, t, n) {
15128
15131
  const o = t.length > 1 && Array.from(t).every((u) => u === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
15129
- let i = RT(e, Math.max(s, 0));
15132
+ let i = ET(e, Math.max(s, 0));
15130
15133
  o.length === 1 && (i = i.filter((u) => u !== n));
15131
15134
  const l = i.find(
15132
15135
  (u) => u.textValue.toLowerCase().startsWith(o.toLowerCase())
15133
15136
  );
15134
15137
  return l !== n ? l : void 0;
15135
15138
  }
15136
- function RT(e, t) {
15139
+ function ET(e, t) {
15137
15140
  return e.map((n, r) => e[(t + r) % e.length]);
15138
15141
  }
15139
- var ET = Xh, Tp = Zh, NT = ep, IT = tp, jT = np, Rp = rp, kT = ap, Ep = up, Np = fp, AT = hp, PT = mp, Ip = gp, jp = vp, kp = bp;
15140
- const bl = ET, wl = NT, Hi = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ c.jsxs(
15142
+ var NT = Xh, Tp = Zh, IT = ep, jT = tp, kT = np, Rp = rp, AT = ap, Ep = up, Np = fp, PT = hp, _T = mp, Ip = gp, jp = vp, kp = bp;
15143
+ const bl = NT, wl = IT, Hi = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ c.jsxs(
15141
15144
  Tp,
15142
15145
  {
15143
15146
  ref: r,
@@ -15148,7 +15151,7 @@ const bl = ET, wl = NT, Hi = f.forwardRef(({ className: e, children: t, ...n },
15148
15151
  ...n,
15149
15152
  children: [
15150
15153
  t,
15151
- /* @__PURE__ */ c.jsx(IT, { asChild: !0, children: /* @__PURE__ */ c.jsx(qn, { className: "h-4 w-4 opacity-50" }) })
15154
+ /* @__PURE__ */ c.jsx(jT, { asChild: !0, children: /* @__PURE__ */ c.jsx(qn, { className: "h-4 w-4 opacity-50" }) })
15152
15155
  ]
15153
15156
  }
15154
15157
  ));
@@ -15179,7 +15182,7 @@ const Pp = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15179
15182
  }
15180
15183
  ));
15181
15184
  Pp.displayName = jp.displayName;
15182
- const zi = f.forwardRef(({ className: e, children: t, position: n = "popper", ...r }, o) => /* @__PURE__ */ c.jsx(jT, { children: /* @__PURE__ */ c.jsxs(
15185
+ const zi = f.forwardRef(({ className: e, children: t, position: n = "popper", ...r }, o) => /* @__PURE__ */ c.jsx(kT, { children: /* @__PURE__ */ c.jsxs(
15183
15186
  Rp,
15184
15187
  {
15185
15188
  ref: o,
@@ -15193,7 +15196,7 @@ const zi = f.forwardRef(({ className: e, children: t, position: n = "popper", ..
15193
15196
  children: [
15194
15197
  /* @__PURE__ */ c.jsx(Ap, {}),
15195
15198
  /* @__PURE__ */ c.jsx(
15196
- kT,
15199
+ AT,
15197
15200
  {
15198
15201
  className: D(
15199
15202
  "p-1",
@@ -15207,7 +15210,7 @@ const zi = f.forwardRef(({ className: e, children: t, position: n = "popper", ..
15207
15210
  }
15208
15211
  ) }));
15209
15212
  zi.displayName = Rp.displayName;
15210
- const _T = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15213
+ const OT = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15211
15214
  Ep,
15212
15215
  {
15213
15216
  ref: n,
@@ -15215,7 +15218,7 @@ const _T = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15215
15218
  ...t
15216
15219
  }
15217
15220
  ));
15218
- _T.displayName = Ep.displayName;
15221
+ OT.displayName = Ep.displayName;
15219
15222
  const En = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ c.jsxs(
15220
15223
  Np,
15221
15224
  {
@@ -15226,13 +15229,13 @@ const En = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
15226
15229
  ),
15227
15230
  ...n,
15228
15231
  children: [
15229
- /* @__PURE__ */ c.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ c.jsx(PT, { children: /* @__PURE__ */ c.jsx(Ui, { className: "h-4 w-4" }) }) }),
15230
- /* @__PURE__ */ c.jsx(AT, { children: t })
15232
+ /* @__PURE__ */ c.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ c.jsx(_T, { children: /* @__PURE__ */ c.jsx(Ui, { className: "h-4 w-4" }) }) }),
15233
+ /* @__PURE__ */ c.jsx(PT, { children: t })
15231
15234
  ]
15232
15235
  }
15233
15236
  ));
15234
15237
  En.displayName = Np.displayName;
15235
- const OT = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15238
+ const MT = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15236
15239
  kp,
15237
15240
  {
15238
15241
  ref: n,
@@ -15240,7 +15243,7 @@ const OT = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15240
15243
  ...t
15241
15244
  }
15242
15245
  ));
15243
- OT.displayName = kp.displayName;
15246
+ MT.displayName = kp.displayName;
15244
15247
  const jo = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15245
15248
  "div",
15246
15249
  {
@@ -15274,7 +15277,7 @@ const Ao = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15274
15277
  }
15275
15278
  ));
15276
15279
  Ao.displayName = "CardTitle";
15277
- const MT = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15280
+ const DT = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15278
15281
  "p",
15279
15282
  {
15280
15283
  ref: n,
@@ -15282,10 +15285,10 @@ const MT = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15282
15285
  ...t
15283
15286
  }
15284
15287
  ));
15285
- MT.displayName = "CardDescription";
15288
+ DT.displayName = "CardDescription";
15286
15289
  const Po = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx("div", { ref: n, className: D("p-6 pt-0", e), ...t }));
15287
15290
  Po.displayName = "CardContent";
15288
- const DT = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15291
+ const LT = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15289
15292
  "div",
15290
15293
  {
15291
15294
  ref: n,
@@ -15293,8 +15296,8 @@ const DT = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
15293
15296
  ...t
15294
15297
  }
15295
15298
  ));
15296
- DT.displayName = "CardFooter";
15297
- const LT = {
15299
+ LT.displayName = "CardFooter";
15300
+ const FT = {
15298
15301
  api: {
15299
15302
  baseUrl: "http://localhost:8000/api",
15300
15303
  authToken: "",
@@ -15313,7 +15316,7 @@ const LT = {
15313
15316
  showTypingIndicator: !0
15314
15317
  }
15315
15318
  };
15316
- function TR({ settings: e, onSettingsChange: t, className: n = "" }) {
15319
+ function RR({ settings: e, onSettingsChange: t, className: n = "" }) {
15317
15320
  const [r, o] = fe(!1), [s, i] = fe(!1), [a, l] = fe(e), [u, d] = fe(!1), { toast: h } = da();
15318
15321
  Ye(() => {
15319
15322
  const p = JSON.stringify(a) !== JSON.stringify(e);
@@ -15327,7 +15330,7 @@ function TR({ settings: e, onSettingsChange: t, className: n = "" }) {
15327
15330
  description: "Your chat configuration has been updated successfully."
15328
15331
  });
15329
15332
  }, g = () => {
15330
- l(LT), d(!0), h({
15333
+ l(FT), d(!0), h({
15331
15334
  title: "Settings reset",
15332
15335
  description: "Configuration has been reset to defaults."
15333
15336
  });
@@ -15349,7 +15352,7 @@ function TR({ settings: e, onSettingsChange: t, className: n = "" }) {
15349
15352
  }
15350
15353
  };
15351
15354
  return /* @__PURE__ */ c.jsxs(fh, { open: r, onOpenChange: o, children: [
15352
- /* @__PURE__ */ c.jsx(aC, { asChild: !0, children: /* @__PURE__ */ c.jsxs(Oe, { variant: "outline", size: "sm", className: n, children: [
15355
+ /* @__PURE__ */ c.jsx(cC, { asChild: !0, children: /* @__PURE__ */ c.jsxs(Oe, { variant: "outline", size: "sm", className: n, children: [
15353
15356
  /* @__PURE__ */ c.jsx(nm, { className: "h-4 w-4 mr-2" }),
15354
15357
  "Settings",
15355
15358
  u && /* @__PURE__ */ c.jsx(Au, { variant: "destructive", className: "ml-2 h-4 w-4 p-0" })
@@ -15598,7 +15601,7 @@ function TR({ settings: e, onSettingsChange: t, className: n = "" }) {
15598
15601
  ] })
15599
15602
  ] });
15600
15603
  }
15601
- function RR({
15604
+ function ER({
15602
15605
  layout: e = "sidebar",
15603
15606
  layoutSize: t = "desktop",
15604
15607
  showThreads: n = !0,
@@ -15677,30 +15680,30 @@ export {
15677
15680
  Kg as ApiClient,
15678
15681
  Kg as ChatApi,
15679
15682
  Io as ChatInterface,
15680
- yR as ChatMainLayout,
15683
+ SR as ChatMainLayout,
15681
15684
  vo as ChatProvider,
15682
- mR as ChatRoutingProvider,
15683
- TR as ChatSettings,
15685
+ gR as ChatRoutingProvider,
15686
+ RR as ChatSettings,
15684
15687
  Gs as MarkdownContent,
15685
- kw as MessageComponent,
15688
+ Aw as MessageComponent,
15686
15689
  yd as MessageList,
15687
15690
  _i as ThreadManager,
15688
15691
  Pn as apiClient,
15689
- xR as applySettings,
15692
+ bR as applySettings,
15690
15693
  Pn as chatApiClient,
15691
- RR as default,
15694
+ ER as default,
15692
15695
  Gg as del,
15693
15696
  Dt as get,
15694
15697
  zg as getChatToken,
15695
- vR as getCurrentSettings,
15696
- QS as getDefaultApiConfig,
15697
- eC as getDefaultChatSettings,
15698
+ xR as getCurrentSettings,
15699
+ eC as getDefaultApiConfig,
15700
+ tC as getDefaultChatSettings,
15698
15701
  Ug as onChatTokenChanged,
15699
15702
  Wg as post,
15700
15703
  Vg as put,
15701
15704
  mc as setChatToken,
15702
15705
  Ki as useChat,
15703
- gR as useChatRouting,
15706
+ vR as useChatRouting,
15704
15707
  Yg as useChatStream,
15705
15708
  Qg as useMessagesReducer
15706
15709
  };