teodor-new-chat-ui 4.3.626 → 4.3.627

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
@@ -3,7 +3,7 @@ var cp = (e, t, n) => t in e ? lp(e, t, { enumerable: !0, configurable: !0, writ
3
3
  var Us = (e, t, n) => cp(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import { clsx as Cc } from "clsx";
5
5
  import { twMerge as kc } from "tailwind-merge";
6
- import * as b from "react";
6
+ import * as w from "react";
7
7
  import ee, { createContext as yr, useContext as Sr, useState as ue, useRef as Se, useCallback as te, useEffect as Pe, useMemo as De, useReducer as up, createElement as No, memo as dp, useImperativeHandle as fp, useLayoutEffect as hp } from "react";
8
8
  import { Slot as pp, createSlot as Ur } from "@radix-ui/react-slot";
9
9
  import { cva as Tc } from "class-variance-authority";
@@ -345,12 +345,12 @@ function xs(e, t, n) {
345
345
  return B.isArrayBuffer(m) || B.isTypedArray(m) ? c && typeof Blob == "function" ? new Blob([m]) : Buffer.from(m) : m;
346
346
  }
347
347
  function u(m, g, x) {
348
- let w = m;
348
+ let b = m;
349
349
  if (m && !x && typeof m == "object") {
350
350
  if (B.endsWith(g, "{}"))
351
351
  g = r ? g : g.slice(0, -2), m = JSON.stringify(m);
352
- else if (B.isArray(m) && ym(m) || (B.isFileList(m) || B.endsWith(g, "[]")) && (w = B.toArray(m)))
353
- return g = Uc(g), w.forEach(function(k, R) {
352
+ else if (B.isArray(m) && ym(m) || (B.isFileList(m) || B.endsWith(g, "[]")) && (b = B.toArray(m)))
353
+ return g = Uc(g), b.forEach(function(k, R) {
354
354
  !(B.isUndefined(k) || k === null) && t.append(
355
355
  // eslint-disable-next-line no-nested-ternary
356
356
  i === !0 ? Ka([g], R, s) : i === null ? g : g + "[]",
@@ -369,14 +369,14 @@ function xs(e, t, n) {
369
369
  if (!B.isUndefined(m)) {
370
370
  if (f.indexOf(m) !== -1)
371
371
  throw Error("Circular reference detected in " + g.join("."));
372
- f.push(m), B.forEach(m, function(w, v) {
373
- (!(B.isUndefined(w) || w === null) && o.call(
372
+ f.push(m), B.forEach(m, function(b, v) {
373
+ (!(B.isUndefined(b) || b === null) && o.call(
374
374
  t,
375
- w,
375
+ b,
376
376
  B.isString(v) ? v.trim() : v,
377
377
  g,
378
378
  h
379
- )) === !0 && p(w, g ? g.concat(v) : [v]);
379
+ )) === !0 && p(b, g ? g.concat(v) : [v]);
380
380
  }), f.pop();
381
381
  }
382
382
  }
@@ -1045,7 +1045,7 @@ const Jc = (e) => {
1045
1045
  }
1046
1046
  let x = new XMLHttpRequest();
1047
1047
  x.open(o.method.toUpperCase(), o.url, !0), x.timeout = o.timeout;
1048
- function w() {
1048
+ function b() {
1049
1049
  if (!x)
1050
1050
  return;
1051
1051
  const k = zt.from(
@@ -1064,8 +1064,8 @@ const Jc = (e) => {
1064
1064
  r(T), g();
1065
1065
  }, C), x = null;
1066
1066
  }
1067
- "onloadend" in x ? x.onloadend = w : x.onreadystatechange = function() {
1068
- !x || x.readyState !== 4 || x.status === 0 && !(x.responseURL && x.responseURL.indexOf("file:") === 0) || setTimeout(w);
1067
+ "onloadend" in x ? x.onloadend = b : x.onreadystatechange = function() {
1068
+ !x || x.readyState !== 4 || x.status === 0 && !(x.responseURL && x.responseURL.indexOf("file:") === 0) || setTimeout(b);
1069
1069
  }, x.onabort = function() {
1070
1070
  x && (r(new Ee("Request aborted", Ee.ECONNABORTED, e, x)), x = null);
1071
1071
  }, x.onerror = function(R) {
@@ -1206,9 +1206,9 @@ const Jc = (e) => {
1206
1206
  };
1207
1207
  o && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((m) => {
1208
1208
  !f[m] && (f[m] = (g, x) => {
1209
- let w = g && g[m];
1210
- if (w)
1211
- return w.call(g);
1209
+ let b = g && g[m];
1210
+ if (b)
1211
+ return b.call(g);
1212
1212
  throw new Ee(`Response type '${m}' is not supported`, Ee.ERR_NOT_SUPPORT, x);
1213
1213
  });
1214
1214
  });
@@ -1234,7 +1234,7 @@ const Jc = (e) => {
1234
1234
  let {
1235
1235
  url: g,
1236
1236
  method: x,
1237
- data: w,
1237
+ data: b,
1238
1238
  signal: v,
1239
1239
  cancelToken: k,
1240
1240
  timeout: R,
@@ -1252,18 +1252,18 @@ const Jc = (e) => {
1252
1252
  });
1253
1253
  let Z;
1254
1254
  try {
1255
- if (y && l && x !== "get" && x !== "head" && (Z = await p(N, w)) !== 0) {
1255
+ if (y && l && x !== "get" && x !== "head" && (Z = await p(N, b)) !== 0) {
1256
1256
  let H = new n(g, {
1257
1257
  method: "POST",
1258
- body: w,
1258
+ body: b,
1259
1259
  duplex: "half"
1260
1260
  }), I;
1261
- if (B.isFormData(w) && (I = H.headers.get("content-type")) && N.setContentType(I), H.body) {
1261
+ if (B.isFormData(b) && (I = H.headers.get("content-type")) && N.setContentType(I), H.body) {
1262
1262
  const [E, P] = Xa(
1263
1263
  Z,
1264
1264
  Yo(Ja(y))
1265
1265
  );
1266
- w = Qa(H.body, el, E, P);
1266
+ b = Qa(H.body, el, E, P);
1267
1267
  }
1268
1268
  }
1269
1269
  B.isString(A) || (A = A ? "include" : "omit");
@@ -1272,7 +1272,7 @@ const Jc = (e) => {
1272
1272
  signal: W,
1273
1273
  method: x.toUpperCase(),
1274
1274
  headers: N.normalize().toJSON(),
1275
- body: w,
1275
+ body: b,
1276
1276
  duplex: "half",
1277
1277
  credentials: G ? A : void 0
1278
1278
  };
@@ -2037,7 +2037,7 @@ function mg() {
2037
2037
  var j = m && S[m] || S[g];
2038
2038
  return typeof j == "function" ? j : null;
2039
2039
  }
2040
- var w = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
2040
+ var b = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
2041
2041
  function v(S) {
2042
2042
  {
2043
2043
  for (var j = arguments.length, z = new Array(j > 1 ? j - 1 : 0), re = 1; re < j; re++)
@@ -2047,7 +2047,7 @@ function mg() {
2047
2047
  }
2048
2048
  function k(S, j, z) {
2049
2049
  {
2050
- var re = w.ReactDebugCurrentFrame, ie = re.getStackAddendum();
2050
+ var re = b.ReactDebugCurrentFrame, ie = re.getStackAddendum();
2051
2051
  ie !== "" && (j += "%s", z = z.concat([ie]));
2052
2052
  var ke = z.map(function(Te) {
2053
2053
  return String(Te);
@@ -2181,7 +2181,7 @@ function mg() {
2181
2181
  Z < 0 && v("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
2182
2182
  }
2183
2183
  }
2184
- var K = w.ReactCurrentDispatcher, F;
2184
+ var K = b.ReactCurrentDispatcher, F;
2185
2185
  function _(S, j, z) {
2186
2186
  {
2187
2187
  if (F === void 0)
@@ -2307,7 +2307,7 @@ function mg() {
2307
2307
  }
2308
2308
  return "";
2309
2309
  }
2310
- var We = Object.prototype.hasOwnProperty, Fe = {}, je = w.ReactDebugCurrentFrame;
2310
+ var We = Object.prototype.hasOwnProperty, Fe = {}, je = b.ReactDebugCurrentFrame;
2311
2311
  function He(S) {
2312
2312
  if (S) {
2313
2313
  var j = S._owner, z = be(S.type, S._source, j ? j.type : null);
@@ -2358,7 +2358,7 @@ function mg() {
2358
2358
  if (Le(S))
2359
2359
  return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ue(S)), Qe(S);
2360
2360
  }
2361
- var Ye = w.ReactCurrentOwner, mt = {
2361
+ var Ye = b.ReactCurrentOwner, mt = {
2362
2362
  key: !0,
2363
2363
  ref: !0,
2364
2364
  __self: !0,
@@ -2452,7 +2452,7 @@ function mg() {
2452
2452
  return Ct(S, Ne, rt, ie, re, Ye.current, Te);
2453
2453
  }
2454
2454
  }
2455
- var Xe = w.ReactCurrentOwner, bt = w.ReactDebugCurrentFrame;
2455
+ var Xe = b.ReactCurrentOwner, bt = b.ReactDebugCurrentFrame;
2456
2456
  function dt(S) {
2457
2457
  if (S) {
2458
2458
  var j = S._owner, z = be(S.type, S._source, j ? j.type : null);
@@ -2816,7 +2816,7 @@ function hr(e) {
2816
2816
  function Tg(e, t) {
2817
2817
  var C, y, T, N;
2818
2818
  if (!e) return null;
2819
- const n = ((C = e.values) == null ? void 0 : C.active_agent) ?? ((y = e.values) == null ? void 0 : y.activeAgent) ?? null, r = (T = e.values) == null ? void 0 : T.messages, s = (Array.isArray(r) ? r : []).map((A) => Rg(A, n)).filter((A) => !!A), i = qn(e.metadata) ?? {}, a = dl(e.config), c = qn(e.parent_config ?? e.parentConfig), l = dl(c), u = Dr(a, ["checkpoint_id", "checkpointId"]), f = Dr(a, ["checkpoint_ns", "checkpointNs"]), h = Dr(l, ["checkpoint_id", "checkpointId"]), p = qn(e.config), m = Array.isArray(e.tasks) ? e.tasks.map((A) => ({ ...A })) : e.tasks ?? null, g = Array.isArray(e.next) ? [...e.next] : e.next ?? null, x = typeof e.created_at == "string" && e.created_at.trim() ? e.created_at : typeof e.createdAt == "string" && e.createdAt.trim() ? e.createdAt : new Date(Date.now() - t).toISOString(), w = {
2819
+ const n = ((C = e.values) == null ? void 0 : C.active_agent) ?? ((y = e.values) == null ? void 0 : y.activeAgent) ?? null, r = (T = e.values) == null ? void 0 : T.messages, s = (Array.isArray(r) ? r : []).map((A) => Rg(A, n)).filter((A) => !!A), i = qn(e.metadata) ?? {}, a = dl(e.config), c = qn(e.parent_config ?? e.parentConfig), l = dl(c), u = Dr(a, ["checkpoint_id", "checkpointId"]), f = Dr(a, ["checkpoint_ns", "checkpointNs"]), h = Dr(l, ["checkpoint_id", "checkpointId"]), p = qn(e.config), m = Array.isArray(e.tasks) ? e.tasks.map((A) => ({ ...A })) : e.tasks ?? null, g = Array.isArray(e.next) ? [...e.next] : e.next ?? null, x = typeof e.created_at == "string" && e.created_at.trim() ? e.created_at : typeof e.createdAt == "string" && e.createdAt.trim() ? e.createdAt : new Date(Date.now() - t).toISOString(), b = {
2820
2820
  ...i,
2821
2821
  step: Sg(i, ["step"]) ?? 0,
2822
2822
  source: Dr(i, ["source"]) ?? null
@@ -2836,7 +2836,7 @@ function Tg(e, t) {
2836
2836
  t,
2837
2837
  u ?? null
2838
2838
  ),
2839
- metadata: w,
2839
+ metadata: b,
2840
2840
  config: p ?? null,
2841
2841
  parentConfig: c ?? null,
2842
2842
  next: g,
@@ -2939,7 +2939,7 @@ function jg(e) {
2939
2939
  return !!e && typeof e == "object" && "data" in e;
2940
2940
  }
2941
2941
  function Pg(e = {}) {
2942
- const t = e.baseUrl || "", n = e.streamPath ?? "/stream", [r, o] = ue(e.token ?? null), s = Se(e.headers ?? {}), i = e.credentials ?? "include", [a, c] = ue(!1), [l, u] = ue(null), [f, h] = ue(""), [p, m] = ue(null), [g, x] = ue(0), [w, v] = ue(!1), [k, R] = ue({}), [C, y] = ue(null), [T, N] = ue({}), A = Se(null), M = Se(!0), L = Se(0), W = Se(null), V = Se(null), D = Se(null), Z = Se(null), G = Se({
2942
+ const t = e.baseUrl || "", n = e.streamPath ?? "/stream", [r, o] = ue(e.token ?? null), s = Se(e.headers ?? {}), i = e.credentials ?? "include", [a, c] = ue(!1), [l, u] = ue(null), [f, h] = ue(""), [p, m] = ue(null), [g, x] = ue(0), [b, v] = ue(!1), [k, R] = ue({}), [C, y] = ue(null), [T, N] = ue({}), A = Se(null), M = Se(!0), L = Se(0), W = Se(null), V = Se(null), D = Se(null), Z = Se(null), G = Se({
2943
2943
  messageId: null,
2944
2944
  lastSeq: null,
2945
2945
  lastText: ""
@@ -3285,7 +3285,7 @@ function Pg(e = {}) {
3285
3285
  streamedMessages: k,
3286
3286
  lastCheckpointId: p,
3287
3287
  lastSeq: g,
3288
- connected: w,
3288
+ connected: b,
3289
3289
  stream: Y,
3290
3290
  stop: $,
3291
3291
  clear: U,
@@ -3346,7 +3346,7 @@ function Dg({
3346
3346
  onThreadChange: r,
3347
3347
  onCurrentThreadDeleted: o
3348
3348
  }) {
3349
- const [s, i] = ue([]), [a, c] = ue(t), [l, u] = ue(!1), [f, h] = ue(null), [p, m] = ue([]), [g, x] = ue(!1), [, w] = ue(null), [v, k] = ue(null), [R, C] = ue(!1), y = Se(a), T = Se(/* @__PURE__ */ new Map());
3349
+ const [s, i] = ue([]), [a, c] = ue(t), [l, u] = ue(!1), [f, h] = ue(null), [p, m] = ue([]), [g, x] = ue(!1), [, b] = ue(null), [v, k] = ue(null), [R, C] = ue(!1), y = Se(a), T = Se(/* @__PURE__ */ new Map());
3350
3350
  Pe(() => {
3351
3351
  y.current = a;
3352
3352
  }, [a]), Pe(() => {
@@ -3364,13 +3364,13 @@ function Dg({
3364
3364
  u(!1);
3365
3365
  }
3366
3366
  }, [e, n]), A = te(async () => {
3367
- x(!0), w(null);
3367
+ x(!0), b(null);
3368
3368
  try {
3369
3369
  const U = await e.listSharedThreads();
3370
3370
  m(U ?? []);
3371
3371
  } catch (U) {
3372
3372
  const $ = String(U);
3373
- w($), n == null || n($);
3373
+ b($), n == null || n($);
3374
3374
  } finally {
3375
3375
  x(!1);
3376
3376
  }
@@ -3511,7 +3511,7 @@ function Lg({
3511
3511
  addThreadFromEvent: m,
3512
3512
  shareInFlight: g,
3513
3513
  shareStatus: x,
3514
- clearShareStatus: w
3514
+ clearShareStatus: b
3515
3515
  } = Dg({
3516
3516
  api: o,
3517
3517
  initialThreadId: t,
@@ -3530,7 +3530,7 @@ function Lg({
3530
3530
  actions: p,
3531
3531
  shareInFlight: g,
3532
3532
  shareStatus: x,
3533
- clearShareStatus: w,
3533
+ clearShareStatus: b,
3534
3534
  addThreadFromEvent: m
3535
3535
  }),
3536
3536
  [
@@ -3545,7 +3545,7 @@ function Lg({
3545
3545
  p,
3546
3546
  g,
3547
3547
  x,
3548
- w,
3548
+ b,
3549
3549
  m
3550
3550
  ]
3551
3551
  );
@@ -3678,78 +3678,75 @@ function Bg(e) {
3678
3678
  return e.role === "tool" ? !0 : e.role === "assistant" ? zg(e) : !1;
3679
3679
  }
3680
3680
  function Hg(e, t) {
3681
- const n = [], r = e.findIndex((c) => c.id === t);
3681
+ var u, f;
3682
+ const n = [], r = e.findIndex((h) => h.id === t);
3682
3683
  if (r === -1) return n;
3683
- const o = /* @__PURE__ */ new Map();
3684
- let s = 0;
3685
- for (let c = r; c >= 0; c--) {
3686
- const l = e[c];
3687
- if (l.role === "user")
3684
+ let o = 0;
3685
+ for (let h = r; h >= 0; h--)
3686
+ if (e[h].role === "user") {
3687
+ o = h + 1;
3688
3688
  break;
3689
- if (l.role === "assistant") {
3690
- const u = Array.isArray(l.content) ? l.content : Array.isArray(l.parts) ? l.parts : [];
3691
- if (l.toolCalls)
3692
- for (const f of l.toolCalls)
3693
- f.id && f.name && !o.has(f.id) && o.set(f.id, {
3694
- name: f.name,
3695
- timestamp: l.createdAt,
3696
- order: s++
3697
- });
3698
- for (const f of u)
3699
- if (f.type === "tool_call") {
3700
- const h = f;
3701
- h.id && h.name && !o.has(h.id) && o.set(h.id, {
3702
- name: h.name,
3703
- timestamp: l.createdAt,
3704
- order: s++
3689
+ }
3690
+ let s = e.length - 1;
3691
+ for (let h = r + 1; h < e.length; h++)
3692
+ if (e[h].role === "user") {
3693
+ s = h - 1;
3694
+ break;
3695
+ }
3696
+ const i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
3697
+ let c = 0;
3698
+ for (let h = o; h <= s; h++) {
3699
+ const p = e[h];
3700
+ if (p.role === "assistant") {
3701
+ if (h <= r) {
3702
+ const m = p.toolCalls || p.tool_calls || [], g = Array.isArray(p.content) ? p.content : Array.isArray(p.parts) ? p.parts : [];
3703
+ for (const x of m) {
3704
+ const b = x.id || x.tool_call_id;
3705
+ b && !i.has(b) && i.set(b, {
3706
+ name: x.name || ((u = x.function) == null ? void 0 : u.name) || "tool",
3707
+ timestamp: p.createdAt,
3708
+ order: c++
3705
3709
  });
3706
3710
  }
3707
- }
3708
- }
3709
- if (o.size === 0) return n;
3710
- const i = /* @__PURE__ */ new Map();
3711
- for (let c = r + 1; c < e.length; c++) {
3712
- const l = e[c];
3713
- if (l.role === "tool") {
3714
- const f = ws(l).toolCallId;
3715
- if (console.log("[buildToolExecutionTimeline] Tool message at index", c, {
3716
- toolCallId: f,
3717
- name: l.name,
3718
- hasMatch: o.has(f || ""),
3719
- toolCallMapKeys: Array.from(o.keys())
3720
- }), f && o.has(f)) {
3721
- const h = Array.isArray(l.content) ? l.content : Array.isArray(l.parts) ? l.parts : [], p = uu(h.filter((m) => m.type === "text"));
3722
- i.set(f, {
3723
- content: p || `Finished ${l.name || "tool"}`,
3724
- artifact: l.artifact,
3725
- timestamp: l.createdAt
3711
+ for (const x of g)
3712
+ if (x.type === "tool_call") {
3713
+ const b = x, v = b.id || b.tool_call_id;
3714
+ v && !i.has(v) && i.set(v, {
3715
+ name: b.name || ((f = b.function) == null ? void 0 : f.name) || "tool",
3716
+ timestamp: p.createdAt,
3717
+ order: c++
3718
+ });
3719
+ }
3720
+ }
3721
+ } else if (p.role === "tool") {
3722
+ const g = ws(p).toolCallId;
3723
+ if (g) {
3724
+ const x = Array.isArray(p.content) ? p.content : Array.isArray(p.parts) ? p.parts : [], b = uu(x.filter((v) => v.type === "text"));
3725
+ a.set(g, {
3726
+ content: b || `Finished ${p.name || "tool"}`,
3727
+ artifact: p.artifact,
3728
+ timestamp: p.createdAt
3726
3729
  });
3727
3730
  }
3728
3731
  }
3729
3732
  }
3730
- const a = Array.from(o.entries()).sort((c, l) => c[1].order - l[1].order);
3731
- for (const [c, l] of a) {
3732
- const u = i.get(c);
3733
- u ? (n.push({
3733
+ const l = Array.from(i.entries()).sort((h, p) => h[1].order - p[1].order);
3734
+ for (const [h, p] of l) {
3735
+ const m = a.get(h);
3736
+ n.push({
3734
3737
  type: "tool.start",
3735
- toolName: l.name,
3736
- toolCallId: c,
3737
- content: `Starting ${l.name}...`,
3738
- timestamp: l.timestamp
3739
- }), n.push({
3738
+ toolName: p.name,
3739
+ toolCallId: h,
3740
+ content: `Starting ${p.name}...`,
3741
+ timestamp: p.timestamp
3742
+ }), m && n.push({
3740
3743
  type: "tool.end",
3741
- toolName: l.name,
3742
- toolCallId: c,
3743
- content: u.content,
3744
- timestamp: u.timestamp,
3745
- output: u.content,
3746
- artifact: u.artifact
3747
- })) : n.push({
3748
- type: "tool.start",
3749
- toolName: l.name,
3750
- toolCallId: c,
3751
- content: `Starting ${l.name}...`,
3752
- timestamp: l.timestamp
3744
+ toolName: p.name,
3745
+ toolCallId: h,
3746
+ content: m.content,
3747
+ timestamp: m.timestamp,
3748
+ output: m.content,
3749
+ artifact: m.artifact
3753
3750
  });
3754
3751
  }
3755
3752
  return n;
@@ -4174,10 +4171,10 @@ function ix(e) {
4174
4171
  const t = /* @__PURE__ */ new Map(), n = [], r = /* @__PURE__ */ new Map(), o = [];
4175
4172
  for (let l = 0; l < e.length; l++) {
4176
4173
  const u = e[l], f = u.checkpointId, h = f ?? `cp-${l}`, p = u.metadata ?? {}, m = typeof p.step == "number" ? p.step : null, g = typeof p.source == "string" ? p.source : null;
4177
- let x = null, w = null;
4174
+ let x = null, b = null;
4178
4175
  const v = Array.isArray(u.messages) ? u.messages : [];
4179
4176
  for (const y of v)
4180
- y.role === "user" && (w || (w = y), y.id && (x = y.id));
4177
+ y.role === "user" && (b || (b = y), y.id && (x = y.id));
4181
4178
  const k = u.next && u.next.length > 0 ? String(u.next[0]) : null, R = u.parentConfig ?? null, C = {
4182
4179
  id: h,
4183
4180
  step: m,
@@ -4189,8 +4186,8 @@ function ix(e) {
4189
4186
  parentConfig: R,
4190
4187
  userMessageId: x
4191
4188
  };
4192
- if (o.push(C), f && t.set(f, C), f && w) {
4193
- const y = sx(w);
4189
+ if (o.push(C), f && t.set(f, C), f && b) {
4190
+ const y = sx(b);
4194
4191
  y && r.set(f, y);
4195
4192
  }
4196
4193
  n.push({
@@ -4278,7 +4275,7 @@ function cx({
4278
4275
  const [u, f] = ue(null), p = De(
4279
4276
  () => hr(u),
4280
4277
  [u]
4281
- ).checkpoints, m = lx(p), g = m.timeline, [x, w] = ue(!1), [v, k] = ue(!1), [R, C] = ue(null), y = Se(r), T = Se(null), N = Se(null), A = Se(null), M = Se(null), L = Se(null), W = Se(/* @__PURE__ */ new Map()), V = Se(null);
4278
+ ).checkpoints, m = lx(p), g = m.timeline, [x, b] = ue(!1), [v, k] = ue(!1), [R, C] = ue(null), y = Se(r), T = Se(null), N = Se(null), A = Se(null), M = Se(null), L = Se(null), W = Se(/* @__PURE__ */ new Map()), V = Se(null);
4282
4279
  Pe(() => {
4283
4280
  y.current = r;
4284
4281
  }, [r]);
@@ -4313,7 +4310,7 @@ function cx({
4313
4310
  V.current = _;
4314
4311
  const q = D({
4315
4312
  threadId: P,
4316
- setLoading: w,
4313
+ setLoading: b,
4317
4314
  onStart: () => C(null),
4318
4315
  handleError: (fe) => C(fe),
4319
4316
  action: async (fe) => {
@@ -4451,7 +4448,7 @@ function cx({
4451
4448
  G
4452
4449
  ]);
4453
4450
  const E = te(() => {
4454
- f(null), w(!1), k(!1), C(null), N.current = null, A.current = null, T.current = null, L.current = null, M.current = null;
4451
+ f(null), b(!1), k(!1), C(null), N.current = null, A.current = null, T.current = null, L.current = null, M.current = null;
4455
4452
  }, []);
4456
4453
  return {
4457
4454
  threadCheckpoints: p,
@@ -4497,7 +4494,7 @@ function dx({
4497
4494
  threadTimeline: m,
4498
4495
  checkpointIndex: g,
4499
4496
  isLoadingThread: x,
4500
- isLoadingCheckpoint: w,
4497
+ isLoadingCheckpoint: b,
4501
4498
  threadStateError: v,
4502
4499
  loadThread: k,
4503
4500
  navigateToCheckpoint: R,
@@ -4561,7 +4558,7 @@ function dx({
4561
4558
  metadata: Z,
4562
4559
  values: l.values ?? {},
4563
4560
  isLoading: x,
4564
- isLoadingCheckpoint: w,
4561
+ isLoadingCheckpoint: b,
4565
4562
  error: v,
4566
4563
  loadOlder: async () => {
4567
4564
  },
@@ -4604,7 +4601,7 @@ function dx({
4604
4601
  g,
4605
4602
  Z,
4606
4603
  x,
4607
- w,
4604
+ b,
4608
4605
  v,
4609
4606
  u,
4610
4607
  oe,
@@ -4670,7 +4667,7 @@ function mx({
4670
4667
  onConnectionError: c,
4671
4668
  onToolEnd: l
4672
4669
  }) {
4673
- const { chatApi: u, baseUrl: f } = Tr(), h = f, { stream: p, stop: m, clear: g, isStreaming: x, error: w, connected: v } = Pg({ baseUrl: h }), [k, R] = ue(!1);
4670
+ const { chatApi: u, baseUrl: f } = Tr(), h = f, { stream: p, stop: m, clear: g, isStreaming: x, error: b, connected: v } = Pg({ baseUrl: h }), [k, R] = ue(!1);
4674
4671
  return Pe(() => {
4675
4672
  R(x);
4676
4673
  }, [x]), /* @__PURE__ */ d.jsx(
@@ -4692,7 +4689,7 @@ function mx({
4692
4689
  gx,
4693
4690
  {
4694
4691
  api: u,
4695
- streamApi: { stream: p, stop: m, clear: g, isStreaming: x, error: w, connected: v },
4692
+ streamApi: { stream: p, stop: m, clear: g, isStreaming: x, error: b, connected: v },
4696
4693
  onError: s,
4697
4694
  onAuthError: i,
4698
4695
  onConnectionError: c,
@@ -4719,7 +4716,7 @@ function gx({
4719
4716
  x !== void 0 && l();
4720
4717
  }, [x, l]);
4721
4718
  const {
4722
- interrupt: w,
4719
+ interrupt: b,
4723
4720
  checkpoint: v,
4724
4721
  timelineCheckpoints: k,
4725
4722
  handleStateHistoryEvent: R,
@@ -4841,14 +4838,14 @@ function gx({
4841
4838
  messages: M,
4842
4839
  submit: $,
4843
4840
  stop: c,
4844
- interrupt: w,
4841
+ interrupt: b,
4845
4842
  resume: () => Promise.resolve(),
4846
4843
  goto: (H, I) => Promise.resolve(),
4847
4844
  clearError: () => {
4848
4845
  }
4849
4846
  // TODO: Implement error clearing
4850
4847
  }),
4851
- [u, f, $, c, w, h, M]
4848
+ [u, f, $, c, b, h, M]
4852
4849
  );
4853
4850
  return /* @__PURE__ */ d.jsx(gu.Provider, { value: Y, children: e });
4854
4851
  }
@@ -4891,7 +4888,7 @@ function Lo({
4891
4888
  onThreadChange: l,
4892
4889
  onToolEnd: u
4893
4890
  }) {
4894
- const f = bx(t), h = Pr(a), p = Pr(c), m = Pr(i), g = Pr(l), x = Pr(u), w = De(
4891
+ const f = bx(t), h = Pr(a), p = Pr(c), m = Pr(i), g = Pr(l), x = Pr(u), b = De(
4895
4892
  () => ({
4896
4893
  initialThreadId: n,
4897
4894
  initialCheckpointId: r,
@@ -4915,7 +4912,7 @@ function Lo({
4915
4912
  x
4916
4913
  ]
4917
4914
  );
4918
- return /* @__PURE__ */ d.jsx(bg, { apiConfig: f, children: /* @__PURE__ */ d.jsx(mx, { ...w, children: e }) });
4915
+ return /* @__PURE__ */ d.jsx(bg, { apiConfig: f, children: /* @__PURE__ */ d.jsx(mx, { ...b, children: e }) });
4919
4916
  }
4920
4917
  function Pr(e) {
4921
4918
  const t = Se(e);
@@ -5048,7 +5045,7 @@ const Cx = Tc(
5048
5045
  size: "default"
5049
5046
  }
5050
5047
  }
5051
- ), Ze = b.forwardRef(
5048
+ ), Ze = w.forwardRef(
5052
5049
  ({ className: e, variant: t, size: n, asChild: r = !1, ...o }, s) => {
5053
5050
  const i = r ? pp : "button";
5054
5051
  return /* @__PURE__ */ d.jsx(
@@ -5364,11 +5361,11 @@ function Ox(e, t, n, r, o, s, i, a, c) {
5364
5361
  const p = h.lastElementChild.dataset.viewportType === "window";
5365
5362
  let m;
5366
5363
  p && (m = h.ownerDocument.defaultView);
5367
- const g = i ? a ? i.scrollLeft : i.scrollTop : p ? a ? m.scrollX || m.document.documentElement.scrollLeft : m.scrollY || m.document.documentElement.scrollTop : a ? h.scrollLeft : h.scrollTop, x = i ? a ? i.scrollWidth : i.scrollHeight : p ? a ? m.document.documentElement.scrollWidth : m.document.documentElement.scrollHeight : a ? h.scrollWidth : h.scrollHeight, w = i ? a ? i.offsetWidth : i.offsetHeight : p ? a ? m.innerWidth : m.innerHeight : a ? h.offsetWidth : h.offsetHeight;
5364
+ const g = i ? a ? i.scrollLeft : i.scrollTop : p ? a ? m.scrollX || m.document.documentElement.scrollLeft : m.scrollY || m.document.documentElement.scrollTop : a ? h.scrollLeft : h.scrollTop, x = i ? a ? i.scrollWidth : i.scrollHeight : p ? a ? m.document.documentElement.scrollWidth : m.document.documentElement.scrollHeight : a ? h.scrollWidth : h.scrollHeight, b = i ? a ? i.offsetWidth : i.offsetHeight : p ? a ? m.innerWidth : m.innerHeight : a ? h.offsetWidth : h.offsetHeight;
5368
5365
  r({
5369
5366
  scrollHeight: x,
5370
5367
  scrollTop: Math.max(g, 0),
5371
- viewportHeight: w
5368
+ viewportHeight: b
5372
5369
  }), s == null || s(
5373
5370
  a ? yl("column-gap", getComputedStyle(u).columnGap, o) : yl("row-gap", getComputedStyle(u).rowGap, o)
5374
5371
  ), f !== null && e(f);
@@ -5835,7 +5832,7 @@ const qx = {
5835
5832
  ),
5836
5833
  n
5837
5834
  ), ge(l, u);
5838
- const w = At(
5835
+ const b = At(
5839
5836
  Q(
5840
5837
  l,
5841
5838
  le((C) => C === void 0)
@@ -6017,7 +6014,7 @@ const qx = {
6017
6014
  sizes: g,
6018
6015
  statefulTotalCount: o,
6019
6016
  totalCount: r,
6020
- trackItemSizes: w,
6017
+ trackItemSizes: b,
6021
6018
  unshiftWith: s
6022
6019
  };
6023
6020
  },
@@ -6096,9 +6093,9 @@ const lo = $e(
6096
6093
  { log: h }
6097
6094
  ]) => {
6098
6095
  const p = Me(), m = Me(), g = ne(0);
6099
- let x = null, w = null, v = null;
6096
+ let x = null, b = null, v = null;
6100
6097
  function k() {
6101
- x && (x(), x = null), v && (v(), v = null), w && (clearTimeout(w), w = null), Ae(c, !1);
6098
+ x && (x(), x = null), v && (v(), v = null), b && (clearTimeout(b), b = null), Ae(c, !1);
6102
6099
  }
6103
6100
  return ge(
6104
6101
  Q(
@@ -6127,7 +6124,7 @@ const lo = $e(
6127
6124
  });
6128
6125
  } else
6129
6126
  x = on(Q(t, Xx(150)), I);
6130
- return w = setTimeout(() => {
6127
+ return b = setTimeout(() => {
6131
6128
  k();
6132
6129
  }, 1200), Ae(c, !0), L("scrolling from index to", { behavior: oe, index: Y, top: H }, Bt.DEBUG), { behavior: oe, top: H };
6133
6130
  }
@@ -6319,14 +6316,14 @@ const Yr = "up", Fr = "down", Jx = "none", Zx = {
6319
6316
  ),
6320
6317
  x
6321
6318
  ), ge(Q(r, Tn(50), hn(Jx)), x);
6322
- const w = ne(0);
6319
+ const b = ne(0);
6323
6320
  return ge(
6324
6321
  Q(
6325
6322
  h,
6326
6323
  ye((v) => !v),
6327
6324
  hn(0)
6328
6325
  ),
6329
- w
6326
+ b
6330
6327
  ), ge(
6331
6328
  Q(
6332
6329
  o,
@@ -6336,7 +6333,7 @@ const Yr = "up", Fr = "down", Jx = "none", Zx = {
6336
6333
  mn(([v, k], [R]) => [k, R], [0, 0]),
6337
6334
  le(([v, k]) => k - v)
6338
6335
  ),
6339
- w
6336
+ b
6340
6337
  ), {
6341
6338
  atBottomState: m,
6342
6339
  atBottomStateChange: c,
@@ -6348,7 +6345,7 @@ const Yr = "up", Fr = "down", Jx = "none", Zx = {
6348
6345
  isScrolling: h,
6349
6346
  lastJumpDueToItemResize: g,
6350
6347
  scrollDirection: x,
6351
- scrollVelocity: w
6348
+ scrollVelocity: b
6352
6349
  };
6353
6350
  }, tt(_t)), es = "top", ts = "bottom", kl = "none";
6354
6351
  function Tl(e, t, n) {
@@ -6381,16 +6378,16 @@ const ea = $e(
6381
6378
  [p, m],
6382
6379
  g,
6383
6380
  x,
6384
- w,
6381
+ b,
6385
6382
  v,
6386
6383
  k
6387
6384
  ]) => {
6388
- const R = u - v, C = x + w, y = Math.max(h - R, 0);
6385
+ const R = u - v, C = x + b, y = Math.max(h - R, 0);
6389
6386
  let T = kl;
6390
6387
  const N = Rl(k, es), A = Rl(k, ts);
6391
- return p -= v, p += h + w, m += h + w, m -= v, p > u + C - N && (T = Yr), m < u - y + f + A && (T = Fr), T !== kl ? [
6388
+ return p -= v, p += h + b, m += h + b, m -= v, p > u + C - N && (T = Yr), m < u - y + f + A && (T = Fr), T !== kl ? [
6392
6389
  Math.max(R - h - Tl(g, es, T) - N, 0),
6393
- R - y - w + f + Tl(g, ts, T) + A
6390
+ R - y - b + f + Tl(g, ts, T) + A
6394
6391
  ] : null;
6395
6392
  }
6396
6393
  ),
@@ -6507,7 +6504,7 @@ const nr = $e(
6507
6504
  { didMount: p },
6508
6505
  { recalcInProgress: m }
6509
6506
  ]) => {
6510
- const g = ne([]), x = ne(0), w = Me();
6507
+ const g = ne([]), x = ne(0), b = Me();
6511
6508
  ge(s.topItemsIndexes, g);
6512
6509
  const v = At(
6513
6510
  Q(
@@ -6620,7 +6617,7 @@ const nr = $e(
6620
6617
  v,
6621
6618
  le((y) => y.items)
6622
6619
  ),
6623
- w
6620
+ b
6624
6621
  );
6625
6622
  const k = qt(
6626
6623
  Q(
@@ -6658,7 +6655,7 @@ const nr = $e(
6658
6655
  et(ju)
6659
6656
  )
6660
6657
  );
6661
- return { endReached: k, initialItemCount: x, itemsRendered: w, listState: v, rangeChanged: C, startReached: R, topItemsIndexes: g, ...h };
6658
+ return { endReached: k, initialItemCount: x, itemsRendered: b, listState: v, rangeChanged: C, startReached: R, topItemsIndexes: g, ...h };
6662
6659
  },
6663
6660
  tt(
6664
6661
  vn,
@@ -6720,8 +6717,8 @@ const nr = $e(
6720
6717
  u,
6721
6718
  _e(t, c, n, s, o, r, a),
6722
6719
  _e(e),
6723
- le(([[f, h, p, m, g, x, w, v], k]) => {
6724
- const { align: R, behavior: C, calculateViewLocation: y = nb, done: T, ...N } = f, A = Mu(f, h, m - 1), M = Gr(A, h.offsetTree, k) + g + x, L = M + sn(h.sizeTree, A)[1], W = v + x, V = v + p - w, D = y({
6720
+ le(([[f, h, p, m, g, x, b, v], k]) => {
6721
+ const { align: R, behavior: C, calculateViewLocation: y = nb, done: T, ...N } = f, A = Mu(f, h, m - 1), M = Gr(A, h.offsetTree, k) + g + x, L = M + sn(h.sizeTree, A)[1], W = v + x, V = v + p - b, D = y({
6725
6722
  itemBottom: L,
6726
6723
  itemTop: M,
6727
6724
  locationParams: { align: R, behavior: C, ...N },
@@ -6766,7 +6763,7 @@ const rb = (e, t) => typeof e == "function" ? El(e(t)) : t && El(e), ob = $e(
6766
6763
  ]) => {
6767
6764
  const m = ne(!1), g = Me();
6768
6765
  let x = null;
6769
- function w(C) {
6766
+ function b(C) {
6770
6767
  Ae(i, {
6771
6768
  align: "end",
6772
6769
  behavior: C,
@@ -6785,15 +6782,15 @@ const rb = (e, t) => typeof e == "function" ? El(e(t)) : t && El(e), ob = $e(
6785
6782
  ),
6786
6783
  ({ followOutputBehavior: C, totalCount: y }) => {
6787
6784
  x && (x(), x = null), ht(n) ? requestAnimationFrame(() => {
6788
- ht(u)("following output to ", { totalCount: y }, Bt.DEBUG), w(C);
6785
+ ht(u)("following output to ", { totalCount: y }, Bt.DEBUG), b(C);
6789
6786
  }) : x = on(e, () => {
6790
- ht(u)("following output to ", { totalCount: y }, Bt.DEBUG), w(C), x = null;
6787
+ ht(u)("following output to ", { totalCount: y }, Bt.DEBUG), b(C), x = null;
6791
6788
  });
6792
6789
  }
6793
6790
  );
6794
6791
  function v(C) {
6795
6792
  const y = on(o, (T) => {
6796
- C && !T.atBottom && T.notAtBottomBecause === "SIZE_INCREASED" && !x && (ht(u)("scrolling to bottom due to increased size", {}, Bt.DEBUG), w("auto"));
6793
+ C && !T.atBottom && T.notAtBottomBecause === "SIZE_INCREASED" && !x && (ht(u)("scrolling to bottom due to increased size", {}, Bt.DEBUG), b("auto"));
6797
6794
  });
6798
6795
  setTimeout(y, 100);
6799
6796
  }
@@ -6814,7 +6811,7 @@ const rb = (e, t) => typeof e == "function" ? El(e(t)) : t && El(e), ob = $e(
6814
6811
  ), Be(g, () => {
6815
6812
  v(ht(m) !== !1);
6816
6813
  }), Be(gt(ve(m), o), ([C, y]) => {
6817
- C && !y.atBottom && y.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && w("auto");
6814
+ C && !y.atBottom && y.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && b("auto");
6818
6815
  });
6819
6816
  const k = ne(null), R = Me();
6820
6817
  return ge(
@@ -6975,9 +6972,9 @@ const rb = (e, t) => typeof e == "function" ? El(e(t)) : t && El(e), ob = $e(
6975
6972
  l,
6976
6973
  _e(t, r, i, f, h, n)
6977
6974
  ),
6978
- ([p, m, g, x, w, v, k]) => {
6975
+ ([p, m, g, x, b, v, k]) => {
6979
6976
  const R = Wx(m.sizeTree);
6980
- x && w !== null && v !== null && (g = w.scrollTop - v.offsetTop), g -= k, p({ ranges: R, scrollTop: g });
6977
+ x && b !== null && v !== null && (g = b.scrollTop - v.offsetTop), g -= k, p({ ranges: R, scrollTop: g });
6981
6978
  }
6982
6979
  ), ge(Q(u, ye(qi), le(lb)), o), ge(
6983
6980
  Q(
@@ -7027,64 +7024,64 @@ const ub = Wu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
7027
7024
  c,
7028
7025
  _e(i),
7029
7026
  mn(
7030
- ([, w, v, k], [{ bottom: R, items: C, offsetBottom: y, totalCount: T }, N]) => {
7027
+ ([, b, v, k], [{ bottom: R, items: C, offsetBottom: y, totalCount: T }, N]) => {
7031
7028
  const A = R + y;
7032
7029
  let M = 0;
7033
- return v === T && w.length > 0 && C.length > 0 && (C[0].originalIndex === 0 && w[0].originalIndex === 0 || (M = A - k, M !== 0 && (M += N))), [M, C, T, A];
7030
+ return v === T && b.length > 0 && C.length > 0 && (C[0].originalIndex === 0 && b[0].originalIndex === 0 || (M = A - k, M !== 0 && (M += N))), [M, C, T, A];
7034
7031
  },
7035
7032
  [0, [], 0, 0]
7036
7033
  ),
7037
- ye(([w]) => w !== 0),
7034
+ ye(([b]) => b !== 0),
7038
7035
  _e(r, a, n, o, p, m),
7039
- ye(([, w, v, k, , , R]) => !R && !k && w !== 0 && v === Yr),
7040
- le(([[w], , , , , v]) => (v("Upward scrolling compensation", { amount: w }, Bt.DEBUG), w))
7036
+ ye(([, b, v, k, , , R]) => !R && !k && b !== 0 && v === Yr),
7037
+ le(([[b], , , , , v]) => (v("Upward scrolling compensation", { amount: b }, Bt.DEBUG), b))
7041
7038
  )
7042
7039
  );
7043
- function x(w) {
7044
- w > 0 ? (Ae(t, { behavior: "auto", top: -w }), Ae(e, 0)) : (Ae(e, 0), Ae(t, { behavior: "auto", top: -w }));
7040
+ function x(b) {
7041
+ b > 0 ? (Ae(t, { behavior: "auto", top: -b }), Ae(e, 0)) : (Ae(e, 0), Ae(t, { behavior: "auto", top: -b }));
7045
7042
  }
7046
- return Be(Q(g, _e(e, s)), ([w, v, k]) => {
7047
- k && ub() ? Ae(e, v - w) : x(-w);
7043
+ return Be(Q(g, _e(e, s)), ([b, v, k]) => {
7044
+ k && ub() ? Ae(e, v - b) : x(-b);
7048
7045
  }), Be(
7049
7046
  Q(
7050
7047
  gt(At(s, !1), e, m),
7051
- ye(([w, v, k]) => !w && !k && v !== 0),
7052
- le(([w, v]) => v),
7048
+ ye(([b, v, k]) => !b && !k && v !== 0),
7049
+ le(([b, v]) => v),
7053
7050
  Tn(1)
7054
7051
  ),
7055
7052
  x
7056
7053
  ), ge(
7057
7054
  Q(
7058
7055
  f,
7059
- le((w) => ({ top: -w }))
7056
+ le((b) => ({ top: -b }))
7060
7057
  ),
7061
7058
  t
7062
7059
  ), Be(
7063
7060
  Q(
7064
7061
  l,
7065
7062
  _e(h, u),
7066
- le(([w, { groupIndices: v, lastSize: k, sizeTree: R }, C]) => {
7063
+ le(([b, { groupIndices: v, lastSize: k, sizeTree: R }, C]) => {
7067
7064
  function y(T) {
7068
7065
  return T * (k + C);
7069
7066
  }
7070
7067
  if (v.length === 0)
7071
- return y(w);
7068
+ return y(b);
7072
7069
  {
7073
7070
  let T = 0;
7074
7071
  const N = Kr(R, 0);
7075
7072
  let A = 0, M = 0;
7076
- for (; A < w; ) {
7073
+ for (; A < b; ) {
7077
7074
  A++, T += N;
7078
7075
  let L = v.length === M + 1 ? 1 / 0 : v[M + 1] - v[M] - 1;
7079
- A + L > w && (T -= N, L = w - A + 1), A += L, T += y(L), M++;
7076
+ A + L > b && (T -= N, L = b - A + 1), A += L, T += y(L), M++;
7080
7077
  }
7081
7078
  return T;
7082
7079
  }
7083
7080
  })
7084
7081
  ),
7085
- (w) => {
7086
- Ae(e, w), requestAnimationFrame(() => {
7087
- Ae(t, { top: w }), requestAnimationFrame(() => {
7082
+ (b) => {
7083
+ Ae(e, b), requestAnimationFrame(() => {
7084
+ Ae(t, { top: b }), requestAnimationFrame(() => {
7088
7085
  Ae(e, 0), Ae(m, !1);
7089
7086
  });
7090
7087
  });
@@ -7150,7 +7147,7 @@ const ub = Wu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
7150
7147
  { initialItemFinalLocationReached: h, initialTopMostItemIndex: p, scrolledToInitialItem: m },
7151
7148
  g,
7152
7149
  x,
7153
- w,
7150
+ b,
7154
7151
  { listState: v, topItemsIndexes: k, ...R },
7155
7152
  { scrollToIndex: C },
7156
7153
  y,
@@ -7178,7 +7175,7 @@ const ub = Wu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
7178
7175
  topItemsIndexes: k,
7179
7176
  // input
7180
7177
  totalCount: u,
7181
- ...w,
7178
+ ...b,
7182
7179
  groupIndices: s,
7183
7180
  itemSize: i,
7184
7181
  listState: v,
@@ -7221,29 +7218,29 @@ function hb(e, t) {
7221
7218
  const bo = typeof document < "u" ? ee.useLayoutEffect : ee.useEffect;
7222
7219
  function Ku(e, t, n) {
7223
7220
  const r = Object.keys(t.required || {}), o = Object.keys(t.optional || {}), s = Object.keys(t.methods || {}), i = Object.keys(t.events || {}), a = ee.createContext({});
7224
- function c(x, w) {
7221
+ function c(x, b) {
7225
7222
  x.propsReady && Ae(x.propsReady, !1);
7226
7223
  for (const v of r) {
7227
7224
  const k = x[t.required[v]];
7228
- Ae(k, w[v]);
7225
+ Ae(k, b[v]);
7229
7226
  }
7230
7227
  for (const v of o)
7231
- if (v in w) {
7228
+ if (v in b) {
7232
7229
  const k = x[t.optional[v]];
7233
- Ae(k, w[v]);
7230
+ Ae(k, b[v]);
7234
7231
  }
7235
7232
  x.propsReady && Ae(x.propsReady, !0);
7236
7233
  }
7237
7234
  function l(x) {
7238
- return s.reduce((w, v) => (w[v] = (k) => {
7235
+ return s.reduce((b, v) => (b[v] = (k) => {
7239
7236
  const R = x[t.methods[v]];
7240
7237
  Ae(R, k);
7241
- }, w), {});
7238
+ }, b), {});
7242
7239
  }
7243
7240
  function u(x) {
7244
- return i.reduce((w, v) => (w[v] = Ax(x[t.events[v]]), w), {});
7241
+ return i.reduce((b, v) => (b[v] = Ax(x[t.events[v]]), b), {});
7245
7242
  }
7246
- const f = ee.forwardRef((x, w) => {
7243
+ const f = ee.forwardRef((x, b) => {
7247
7244
  const { children: v, ...k } = x, [R] = ee.useState(() => Cs(_x(e), (T) => {
7248
7245
  c(T, k);
7249
7246
  })), [C] = ee.useState(wl(u, R));
@@ -7255,41 +7252,41 @@ function Ku(e, t, n) {
7255
7252
  };
7256
7253
  }, [k, C, R]), bo(() => {
7257
7254
  c(R, k);
7258
- }), ee.useImperativeHandle(w, bl(l(R)));
7255
+ }), ee.useImperativeHandle(b, bl(l(R)));
7259
7256
  const y = n;
7260
7257
  return /* @__PURE__ */ d.jsx(a.Provider, { value: R, children: n ? /* @__PURE__ */ d.jsx(y, { ...hb([...r, ...o, ...i], k), children: v }) : v });
7261
7258
  }), h = (x) => {
7262
- const w = ee.useContext(a);
7259
+ const b = ee.useContext(a);
7263
7260
  return ee.useCallback(
7264
7261
  (v) => {
7265
- Ae(w[x], v);
7262
+ Ae(b[x], v);
7266
7263
  },
7267
- [w, x]
7264
+ [b, x]
7268
7265
  );
7269
7266
  }, p = (x) => {
7270
- const w = ee.useContext(a)[x], v = ee.useCallback(
7271
- (k) => Be(w, k),
7272
- [w]
7267
+ const b = ee.useContext(a)[x], v = ee.useCallback(
7268
+ (k) => Be(b, k),
7269
+ [b]
7273
7270
  );
7274
7271
  return ee.useSyncExternalStore(
7275
7272
  v,
7276
- () => ht(w),
7277
- () => ht(w)
7273
+ () => ht(b),
7274
+ () => ht(b)
7278
7275
  );
7279
7276
  }, m = (x) => {
7280
- const w = ee.useContext(a)[x], [v, k] = ee.useState(wl(ht, w));
7277
+ const b = ee.useContext(a)[x], [v, k] = ee.useState(wl(ht, b));
7281
7278
  return bo(
7282
- () => Be(w, (R) => {
7279
+ () => Be(b, (R) => {
7283
7280
  R !== v && k(bl(R));
7284
7281
  }),
7285
- [w, v]
7282
+ [b, v]
7286
7283
  ), v;
7287
7284
  }, g = ee.version.startsWith("18") ? p : m;
7288
7285
  return {
7289
7286
  Component: f,
7290
- useEmitter: (x, w) => {
7287
+ useEmitter: (x, b) => {
7291
7288
  const v = ee.useContext(a)[x];
7292
- bo(() => Be(v, w), [w, v]);
7289
+ bo(() => Be(v, b), [b, v]);
7293
7290
  },
7294
7291
  useEmitterValue: g,
7295
7292
  usePublisher: h
@@ -7312,14 +7309,14 @@ function Xu(e, t, n, r = Ir, o, s) {
7312
7309
  g = s ? v.scrollX : v.scrollY, p = s ? v.document.documentElement.scrollWidth : v.document.documentElement.scrollHeight, m = s ? v.innerWidth : v.innerHeight;
7313
7310
  } else
7314
7311
  g = s ? x.scrollLeft : x.scrollTop, p = s ? x.scrollWidth : x.scrollHeight, m = s ? x.offsetWidth : x.offsetHeight;
7315
- const w = () => {
7312
+ const b = () => {
7316
7313
  e({
7317
7314
  scrollHeight: p,
7318
7315
  scrollTop: Math.max(g, 0),
7319
7316
  viewportHeight: m
7320
7317
  });
7321
7318
  };
7322
- h.suppressFlushSync ? w() : Ic.flushSync(w), a.current !== null && (g === a.current || g <= 0 || g === p - m) && (a.current = null, t(!0), c.current && (clearTimeout(c.current), c.current = null));
7319
+ h.suppressFlushSync ? b() : Ic.flushSync(b), a.current !== null && (g === a.current || g <= 0 || g === p - m) && (a.current = null, t(!0), c.current && (clearTimeout(c.current), c.current = null));
7323
7320
  },
7324
7321
  [e, t, s]
7325
7322
  );
@@ -7334,14 +7331,14 @@ function Xu(e, t, n, r = Ir, o, s) {
7334
7331
  if (!p || (s ? "offsetWidth" in p && p.offsetWidth === 0 : "offsetHeight" in p && p.offsetHeight === 0))
7335
7332
  return;
7336
7333
  const m = h.behavior === "smooth";
7337
- let g, x, w;
7334
+ let g, x, b;
7338
7335
  Js(p) ? (x = Math.max(
7339
7336
  Nn(p.document.documentElement, s ? "width" : "height"),
7340
7337
  s ? p.document.documentElement.scrollWidth : p.document.documentElement.scrollHeight
7341
- ), g = s ? p.innerWidth : p.innerHeight, w = s ? window.scrollX : window.scrollY) : (x = p[s ? "scrollWidth" : "scrollHeight"], g = Nn(p, s ? "width" : "height"), w = p[s ? "scrollLeft" : "scrollTop"]);
7338
+ ), g = s ? p.innerWidth : p.innerHeight, b = s ? window.scrollX : window.scrollY) : (x = p[s ? "scrollWidth" : "scrollHeight"], g = Nn(p, s ? "width" : "height"), b = p[s ? "scrollLeft" : "scrollTop"]);
7342
7339
  const v = x - g;
7343
- if (h.top = Math.ceil(Math.max(Math.min(v, h.top), 0)), $u(g, x) || h.top === w) {
7344
- e({ scrollHeight: x, scrollTop: w, viewportHeight: g }), m && t(!0);
7340
+ if (h.top = Math.ceil(Math.max(Math.min(v, h.top), 0)), $u(g, x) || h.top === b) {
7341
+ e({ scrollHeight: x, scrollTop: b, viewportHeight: g }), m && t(!0);
7345
7342
  return;
7346
7343
  }
7347
7344
  m ? (a.current = h.top, c.current && clearTimeout(c.current), c.current = setTimeout(() => {
@@ -7402,21 +7399,21 @@ const mb = /* @__PURE__ */ $e(() => {
7402
7399
  o,
7403
7400
  g,
7404
7401
  Re("skipAnimationFrameInResizeObserver")
7405
- ), [w, v] = ee.useState(0);
7402
+ ), [b, v] = ee.useState(0);
7406
7403
  oa("deviation", (D) => {
7407
- w !== D && v(D);
7404
+ b !== D && v(D);
7408
7405
  });
7409
7406
  const k = Re("EmptyPlaceholder"), R = Re("ScrollSeekPlaceholder") || xb, C = Re("ListComponent"), y = Re("ItemComponent"), T = Re("GroupComponent"), N = Re("computeItemKey"), A = Re("isSeeking"), M = Re("groupIndices").length > 0, L = Re("alignToBottom"), W = Re("initialItemFinalLocationReached"), V = e ? {} : {
7410
7407
  boxSizing: "border-box",
7411
7408
  ...g ? {
7412
7409
  display: "inline-block",
7413
7410
  height: "100%",
7414
- marginLeft: w !== 0 ? w : L ? "auto" : 0,
7411
+ marginLeft: b !== 0 ? b : L ? "auto" : 0,
7415
7412
  paddingLeft: t.offsetTop,
7416
7413
  paddingRight: t.offsetBottom,
7417
7414
  whiteSpace: "nowrap"
7418
7415
  } : {
7419
- marginTop: w !== 0 ? w : L ? "auto" : 0,
7416
+ marginTop: b !== 0 ? b : L ? "auto" : 0,
7420
7417
  paddingBottom: t.offsetBottom,
7421
7418
  paddingTop: t.offsetTop
7422
7419
  },
@@ -7550,7 +7547,7 @@ function Zu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
7550
7547
  }
7551
7548
  function Qu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
7552
7549
  return ee.memo(function({ children: r, style: o, context: s, ...i }) {
7553
- const a = n("windowScrollContainerState"), c = t("ScrollerComponent"), l = n("smoothScrollTargetReached"), u = t("totalListHeight"), f = t("deviation"), h = t("customScrollParent"), p = ee.useRef(null), m = t("scrollerRef"), { scrollByCallback: g, scrollerRef: x, scrollToCallback: w } = Xu(
7550
+ const a = n("windowScrollContainerState"), c = t("ScrollerComponent"), l = n("smoothScrollTargetReached"), u = t("totalListHeight"), f = t("deviation"), h = t("customScrollParent"), p = ee.useRef(null), m = t("scrollerRef"), { scrollByCallback: g, scrollerRef: x, scrollToCallback: b } = Xu(
7554
7551
  a,
7555
7552
  l,
7556
7553
  c,
@@ -7562,7 +7559,7 @@ function Qu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
7562
7559
  return x.current = h || ((v = p.current) == null ? void 0 : v.ownerDocument.defaultView), () => {
7563
7560
  x.current = null;
7564
7561
  };
7565
- }, [x, h]), e("windowScrollTo", w), e("scrollBy", g), /* @__PURE__ */ d.jsx(
7562
+ }, [x, h]), e("windowScrollTo", b), e("scrollBy", g), /* @__PURE__ */ d.jsx(
7566
7563
  c,
7567
7564
  {
7568
7565
  ref: p,
@@ -7746,7 +7743,7 @@ const $b = /* @__PURE__ */ $e(
7746
7743
  h,
7747
7744
  p,
7748
7745
  { didMount: m, propsReady: g },
7749
- { customScrollParent: x, useWindowScroll: w, windowScrollContainerState: v, windowScrollTo: k, windowViewportRect: R },
7746
+ { customScrollParent: x, useWindowScroll: b, windowScrollContainerState: v, windowScrollTo: k, windowViewportRect: R },
7750
7747
  C
7751
7748
  ]) => {
7752
7749
  const y = ne(0), T = ne(0), N = ne(_l), A = ne({ height: 0, width: 0 }), M = ne({ height: 0, width: 0 }), L = Me(), W = Me(), V = ne(0), D = ne(null), Z = ne({ column: 0, row: 0 }), G = Me(), oe = Me(), U = ne(!1), $ = ne(0), Y = ne(!0), H = ne(!1), I = ne(!1);
@@ -7963,7 +7960,7 @@ const $b = /* @__PURE__ */ $e(
7963
7960
  scrollTop: l,
7964
7961
  smoothScrollTargetReached: u,
7965
7962
  totalCount: y,
7966
- useWindowScroll: w,
7963
+ useWindowScroll: b,
7967
7964
  viewportDimensions: A,
7968
7965
  windowScrollContainerState: v,
7969
7966
  windowScrollTo: k,
@@ -8033,17 +8030,17 @@ const Fb = /* @__PURE__ */ $e(() => {
8033
8030
  ), Bb = /* @__PURE__ */ ee.memo(function() {
8034
8031
  const e = ot("gridState"), t = ot("listClassName"), n = ot("itemClassName"), r = ot("itemContent"), o = ot("computeItemKey"), s = ot("isSeeking"), i = Qt("scrollHeight"), a = ot("ItemComponent"), c = ot("ListComponent"), l = ot("ScrollSeekPlaceholder"), u = ot("context"), f = Qt("itemDimensions"), h = Qt("gap"), p = ot("log"), m = ot("stateRestoreInProgress"), g = Qt("reportReadyState"), x = tr(
8035
8032
  ee.useMemo(
8036
- () => (w) => {
8037
- const v = w.parentElement.parentElement.scrollHeight;
8033
+ () => (b) => {
8034
+ const v = b.parentElement.parentElement.scrollHeight;
8038
8035
  i(v);
8039
- const k = w.firstChild;
8036
+ const k = b.firstChild;
8040
8037
  if (k) {
8041
8038
  const { height: R, width: C } = k.getBoundingClientRect();
8042
8039
  f({ height: R, width: C });
8043
8040
  }
8044
8041
  h({
8045
- column: Dl("column-gap", getComputedStyle(w).columnGap, p),
8046
- row: Dl("row-gap", getComputedStyle(w).rowGap, p)
8042
+ column: Dl("column-gap", getComputedStyle(b).columnGap, p),
8043
+ row: Dl("row-gap", getComputedStyle(b).rowGap, p)
8047
8044
  });
8048
8045
  },
8049
8046
  [i, f, h, p]
@@ -8061,14 +8058,14 @@ const Fb = /* @__PURE__ */ $e(() => {
8061
8058
  ...It(c, u),
8062
8059
  "data-testid": "virtuoso-item-list",
8063
8060
  style: { paddingBottom: e.offsetBottom, paddingTop: e.offsetTop },
8064
- children: e.items.map((w) => {
8065
- const v = o(w.index, w.data, u);
8061
+ children: e.items.map((b) => {
8062
+ const v = o(b.index, b.data, u);
8066
8063
  return s ? /* @__PURE__ */ d.jsx(
8067
8064
  l,
8068
8065
  {
8069
8066
  ...It(l, u),
8070
8067
  height: e.itemHeight,
8071
- index: w.index,
8068
+ index: b.index,
8072
8069
  width: e.itemWidth
8073
8070
  },
8074
8071
  v
@@ -8077,10 +8074,10 @@ const Fb = /* @__PURE__ */ $e(() => {
8077
8074
  {
8078
8075
  ...It(a, u),
8079
8076
  className: n,
8080
- "data-index": w.index,
8077
+ "data-index": b.index,
8081
8078
  key: v
8082
8079
  },
8083
- r(w.index, w.data, u)
8080
+ r(b.index, b.data, u)
8084
8081
  );
8085
8082
  })
8086
8083
  }
@@ -8212,16 +8209,16 @@ function _n(...e) {
8212
8209
  };
8213
8210
  }
8214
8211
  function st(...e) {
8215
- return b.useCallback(_n(...e), e);
8212
+ return w.useCallback(_n(...e), e);
8216
8213
  }
8217
8214
  function Yb(e, t) {
8218
- const n = b.createContext(t), r = (s) => {
8219
- const { children: i, ...a } = s, c = b.useMemo(() => a, Object.values(a));
8215
+ const n = w.createContext(t), r = (s) => {
8216
+ const { children: i, ...a } = s, c = w.useMemo(() => a, Object.values(a));
8220
8217
  return /* @__PURE__ */ d.jsx(n.Provider, { value: c, children: i });
8221
8218
  };
8222
8219
  r.displayName = e + "Provider";
8223
8220
  function o(s) {
8224
- const i = b.useContext(n);
8221
+ const i = w.useContext(n);
8225
8222
  if (i) return i;
8226
8223
  if (t !== void 0) return t;
8227
8224
  throw new Error(`\`${s}\` must be used within \`${e}\``);
@@ -8231,17 +8228,17 @@ function Yb(e, t) {
8231
8228
  function zn(e, t = []) {
8232
8229
  let n = [];
8233
8230
  function r(s, i) {
8234
- const a = b.createContext(i), c = n.length;
8231
+ const a = w.createContext(i), c = n.length;
8235
8232
  n = [...n, i];
8236
8233
  const l = (f) => {
8237
- var w;
8238
- const { scope: h, children: p, ...m } = f, g = ((w = h == null ? void 0 : h[e]) == null ? void 0 : w[c]) || a, x = b.useMemo(() => m, Object.values(m));
8234
+ var b;
8235
+ const { scope: h, children: p, ...m } = f, g = ((b = h == null ? void 0 : h[e]) == null ? void 0 : b[c]) || a, x = w.useMemo(() => m, Object.values(m));
8239
8236
  return /* @__PURE__ */ d.jsx(g.Provider, { value: x, children: p });
8240
8237
  };
8241
8238
  l.displayName = s + "Provider";
8242
8239
  function u(f, h) {
8243
8240
  var g;
8244
- const p = ((g = h == null ? void 0 : h[e]) == null ? void 0 : g[c]) || a, m = b.useContext(p);
8241
+ const p = ((g = h == null ? void 0 : h[e]) == null ? void 0 : g[c]) || a, m = w.useContext(p);
8245
8242
  if (m) return m;
8246
8243
  if (i !== void 0) return i;
8247
8244
  throw new Error(`\`${f}\` must be used within \`${s}\``);
@@ -8249,10 +8246,10 @@ function zn(e, t = []) {
8249
8246
  return [l, u];
8250
8247
  }
8251
8248
  const o = () => {
8252
- const s = n.map((i) => b.createContext(i));
8249
+ const s = n.map((i) => w.createContext(i));
8253
8250
  return function(a) {
8254
8251
  const c = (a == null ? void 0 : a[e]) || s;
8255
- return b.useMemo(
8252
+ return w.useMemo(
8256
8253
  () => ({ [`__scope${e}`]: { ...a, [e]: c } }),
8257
8254
  [a, c]
8258
8255
  );
@@ -8273,21 +8270,21 @@ function Xb(...e) {
8273
8270
  const f = c(s)[`__scope${l}`];
8274
8271
  return { ...a, ...f };
8275
8272
  }, {});
8276
- return b.useMemo(() => ({ [`__scope${t.scopeName}`]: i }), [i]);
8273
+ return w.useMemo(() => ({ [`__scope${t.scopeName}`]: i }), [i]);
8277
8274
  };
8278
8275
  };
8279
8276
  return n.scopeName = t.scopeName, n;
8280
8277
  }
8281
- var bn = globalThis != null && globalThis.document ? b.useLayoutEffect : () => {
8282
- }, Jb = b[" useId ".trim().toString()] || (() => {
8278
+ var bn = globalThis != null && globalThis.document ? w.useLayoutEffect : () => {
8279
+ }, Jb = w[" useId ".trim().toString()] || (() => {
8283
8280
  }), Zb = 0;
8284
8281
  function Gt(e) {
8285
- const [t, n] = b.useState(Jb());
8282
+ const [t, n] = w.useState(Jb());
8286
8283
  return bn(() => {
8287
8284
  n((r) => r ?? String(Zb++));
8288
8285
  }, [e]), e || (t ? `radix-${t}` : "");
8289
8286
  }
8290
- var Qb = b[" useInsertionEffect ".trim().toString()] || bn;
8287
+ var Qb = w[" useInsertionEffect ".trim().toString()] || bn;
8291
8288
  function Is({
8292
8289
  prop: e,
8293
8290
  defaultProp: t,
@@ -8300,15 +8297,15 @@ function Is({
8300
8297
  onChange: n
8301
8298
  }), a = e !== void 0, c = a ? e : o;
8302
8299
  {
8303
- const u = b.useRef(e !== void 0);
8304
- b.useEffect(() => {
8300
+ const u = w.useRef(e !== void 0);
8301
+ w.useEffect(() => {
8305
8302
  const f = u.current;
8306
8303
  f !== a && console.warn(
8307
8304
  `${r} is changing from ${f ? "controlled" : "uncontrolled"} to ${a ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
8308
8305
  ), u.current = a;
8309
8306
  }, [a, r]);
8310
8307
  }
8311
- const l = b.useCallback(
8308
+ const l = w.useCallback(
8312
8309
  (u) => {
8313
8310
  var f;
8314
8311
  if (a) {
@@ -8325,10 +8322,10 @@ function ew({
8325
8322
  defaultProp: e,
8326
8323
  onChange: t
8327
8324
  }) {
8328
- const [n, r] = b.useState(e), o = b.useRef(n), s = b.useRef(t);
8325
+ const [n, r] = w.useState(e), o = w.useRef(n), s = w.useRef(t);
8329
8326
  return Qb(() => {
8330
8327
  s.current = t;
8331
- }, [t]), b.useEffect(() => {
8328
+ }, [t]), w.useEffect(() => {
8332
8329
  var i;
8333
8330
  o.current !== n && ((i = s.current) == null || i.call(s, n), o.current = n);
8334
8331
  }, [n, o]), [n, r, s];
@@ -8355,7 +8352,7 @@ var nw = [
8355
8352
  "svg",
8356
8353
  "ul"
8357
8354
  ], Oe = nw.reduce((e, t) => {
8358
- const n = Ur(`Primitive.${t}`), r = b.forwardRef((o, s) => {
8355
+ const n = Ur(`Primitive.${t}`), r = w.forwardRef((o, s) => {
8359
8356
  const { asChild: i, ...a } = o, c = i ? n : t;
8360
8357
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ d.jsx(c, { ...a, ref: s });
8361
8358
  });
@@ -8365,28 +8362,28 @@ function nd(e, t) {
8365
8362
  e && Rc.flushSync(() => e.dispatchEvent(t));
8366
8363
  }
8367
8364
  function Et(e) {
8368
- const t = b.useRef(e);
8369
- return b.useEffect(() => {
8365
+ const t = w.useRef(e);
8366
+ return w.useEffect(() => {
8370
8367
  t.current = e;
8371
- }), b.useMemo(() => (...n) => {
8368
+ }), w.useMemo(() => (...n) => {
8372
8369
  var r;
8373
8370
  return (r = t.current) == null ? void 0 : r.call(t, ...n);
8374
8371
  }, []);
8375
8372
  }
8376
8373
  function rw(e, t = globalThis == null ? void 0 : globalThis.document) {
8377
8374
  const n = Et(e);
8378
- b.useEffect(() => {
8375
+ w.useEffect(() => {
8379
8376
  const r = (o) => {
8380
8377
  o.key === "Escape" && n(o);
8381
8378
  };
8382
8379
  return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
8383
8380
  }, [n, t]);
8384
8381
  }
8385
- var ow = "DismissableLayer", Ni = "dismissableLayer.update", sw = "dismissableLayer.pointerDownOutside", iw = "dismissableLayer.focusOutside", $l, rd = b.createContext({
8382
+ var ow = "DismissableLayer", Ni = "dismissableLayer.update", sw = "dismissableLayer.pointerDownOutside", iw = "dismissableLayer.focusOutside", $l, rd = w.createContext({
8386
8383
  layers: /* @__PURE__ */ new Set(),
8387
8384
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
8388
8385
  branches: /* @__PURE__ */ new Set()
8389
- }), sa = b.forwardRef(
8386
+ }), sa = w.forwardRef(
8390
8387
  (e, t) => {
8391
8388
  const {
8392
8389
  disableOutsidePointerEvents: n = !1,
@@ -8396,7 +8393,7 @@ var ow = "DismissableLayer", Ni = "dismissableLayer.update", sw = "dismissableLa
8396
8393
  onInteractOutside: i,
8397
8394
  onDismiss: a,
8398
8395
  ...c
8399
- } = e, l = b.useContext(rd), [u, f] = b.useState(null), h = (u == null ? void 0 : u.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, p] = b.useState({}), m = st(t, (T) => f(T)), g = Array.from(l.layers), [x] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), w = g.indexOf(x), v = u ? g.indexOf(u) : -1, k = l.layersWithOutsidePointerEventsDisabled.size > 0, R = v >= w, C = cw((T) => {
8396
+ } = e, l = w.useContext(rd), [u, f] = w.useState(null), h = (u == null ? void 0 : u.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, p] = w.useState({}), m = st(t, (T) => f(T)), g = Array.from(l.layers), [x] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), b = g.indexOf(x), v = u ? g.indexOf(u) : -1, k = l.layersWithOutsidePointerEventsDisabled.size > 0, R = v >= b, C = cw((T) => {
8400
8397
  const N = T.target, A = [...l.branches].some((M) => M.contains(N));
8401
8398
  !R || A || (o == null || o(T), i == null || i(T), T.defaultPrevented || a == null || a());
8402
8399
  }, h), y = uw((T) => {
@@ -8405,14 +8402,14 @@ var ow = "DismissableLayer", Ni = "dismissableLayer.update", sw = "dismissableLa
8405
8402
  }, h);
8406
8403
  return rw((T) => {
8407
8404
  v === l.layers.size - 1 && (r == null || r(T), !T.defaultPrevented && a && (T.preventDefault(), a()));
8408
- }, h), b.useEffect(() => {
8405
+ }, h), w.useEffect(() => {
8409
8406
  if (u)
8410
8407
  return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && ($l = h.body.style.pointerEvents, h.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(u)), l.layers.add(u), Fl(), () => {
8411
8408
  n && l.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents = $l);
8412
8409
  };
8413
- }, [u, h, n, l]), b.useEffect(() => () => {
8410
+ }, [u, h, n, l]), w.useEffect(() => () => {
8414
8411
  u && (l.layers.delete(u), l.layersWithOutsidePointerEventsDisabled.delete(u), Fl());
8415
- }, [u, l]), b.useEffect(() => {
8412
+ }, [u, l]), w.useEffect(() => {
8416
8413
  const T = () => p({});
8417
8414
  return document.addEventListener(Ni, T), () => document.removeEventListener(Ni, T);
8418
8415
  }, []), /* @__PURE__ */ d.jsx(
@@ -8435,9 +8432,9 @@ var ow = "DismissableLayer", Ni = "dismissableLayer.update", sw = "dismissableLa
8435
8432
  }
8436
8433
  );
8437
8434
  sa.displayName = ow;
8438
- var aw = "DismissableLayerBranch", lw = b.forwardRef((e, t) => {
8439
- const n = b.useContext(rd), r = b.useRef(null), o = st(t, r);
8440
- return b.useEffect(() => {
8435
+ var aw = "DismissableLayerBranch", lw = w.forwardRef((e, t) => {
8436
+ const n = w.useContext(rd), r = w.useRef(null), o = st(t, r);
8437
+ return w.useEffect(() => {
8441
8438
  const s = r.current;
8442
8439
  if (s)
8443
8440
  return n.branches.add(s), () => {
@@ -8447,9 +8444,9 @@ var aw = "DismissableLayerBranch", lw = b.forwardRef((e, t) => {
8447
8444
  });
8448
8445
  lw.displayName = aw;
8449
8446
  function cw(e, t = globalThis == null ? void 0 : globalThis.document) {
8450
- const n = Et(e), r = b.useRef(!1), o = b.useRef(() => {
8447
+ const n = Et(e), r = w.useRef(!1), o = w.useRef(() => {
8451
8448
  });
8452
- return b.useEffect(() => {
8449
+ return w.useEffect(() => {
8453
8450
  const s = (a) => {
8454
8451
  if (a.target && !r.current) {
8455
8452
  let c = function() {
@@ -8477,8 +8474,8 @@ function cw(e, t = globalThis == null ? void 0 : globalThis.document) {
8477
8474
  };
8478
8475
  }
8479
8476
  function uw(e, t = globalThis == null ? void 0 : globalThis.document) {
8480
- const n = Et(e), r = b.useRef(!1);
8481
- return b.useEffect(() => {
8477
+ const n = Et(e), r = w.useRef(!1);
8478
+ return w.useEffect(() => {
8482
8479
  const o = (s) => {
8483
8480
  s.target && !r.current && od(iw, n, { originalEvent: s }, {
8484
8481
  discrete: !1
@@ -8498,14 +8495,14 @@ function od(e, t, n, { discrete: r }) {
8498
8495
  const o = n.originalEvent.target, s = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
8499
8496
  t && o.addEventListener(e, t, { once: !0 }), r ? nd(o, s) : o.dispatchEvent(s);
8500
8497
  }
8501
- var ei = "focusScope.autoFocusOnMount", ti = "focusScope.autoFocusOnUnmount", zl = { bubbles: !1, cancelable: !0 }, dw = "FocusScope", ia = b.forwardRef((e, t) => {
8498
+ var ei = "focusScope.autoFocusOnMount", ti = "focusScope.autoFocusOnUnmount", zl = { bubbles: !1, cancelable: !0 }, dw = "FocusScope", ia = w.forwardRef((e, t) => {
8502
8499
  const {
8503
8500
  loop: n = !1,
8504
8501
  trapped: r = !1,
8505
8502
  onMountAutoFocus: o,
8506
8503
  onUnmountAutoFocus: s,
8507
8504
  ...i
8508
- } = e, [a, c] = b.useState(null), l = Et(o), u = Et(s), f = b.useRef(null), h = st(t, (g) => c(g)), p = b.useRef({
8505
+ } = e, [a, c] = w.useState(null), l = Et(o), u = Et(s), f = w.useRef(null), h = st(t, (g) => c(g)), p = w.useRef({
8509
8506
  paused: !1,
8510
8507
  pause() {
8511
8508
  this.paused = !0;
@@ -8514,7 +8511,7 @@ var ei = "focusScope.autoFocusOnMount", ti = "focusScope.autoFocusOnUnmount", zl
8514
8511
  this.paused = !1;
8515
8512
  }
8516
8513
  }).current;
8517
- b.useEffect(() => {
8514
+ w.useEffect(() => {
8518
8515
  if (r) {
8519
8516
  let g = function(k) {
8520
8517
  if (p.paused || !a) return;
@@ -8524,40 +8521,40 @@ var ei = "focusScope.autoFocusOnMount", ti = "focusScope.autoFocusOnUnmount", zl
8524
8521
  if (p.paused || !a) return;
8525
8522
  const R = k.relatedTarget;
8526
8523
  R !== null && (a.contains(R) || En(f.current, { select: !0 }));
8527
- }, w = function(k) {
8524
+ }, b = function(k) {
8528
8525
  if (document.activeElement === document.body)
8529
8526
  for (const C of k)
8530
8527
  C.removedNodes.length > 0 && En(a);
8531
8528
  };
8532
8529
  document.addEventListener("focusin", g), document.addEventListener("focusout", x);
8533
- const v = new MutationObserver(w);
8530
+ const v = new MutationObserver(b);
8534
8531
  return a && v.observe(a, { childList: !0, subtree: !0 }), () => {
8535
8532
  document.removeEventListener("focusin", g), document.removeEventListener("focusout", x), v.disconnect();
8536
8533
  };
8537
8534
  }
8538
- }, [r, a, p.paused]), b.useEffect(() => {
8535
+ }, [r, a, p.paused]), w.useEffect(() => {
8539
8536
  if (a) {
8540
8537
  Hl.add(p);
8541
8538
  const g = document.activeElement;
8542
8539
  if (!a.contains(g)) {
8543
- const w = new CustomEvent(ei, zl);
8544
- a.addEventListener(ei, l), a.dispatchEvent(w), w.defaultPrevented || (fw(xw(sd(a)), { select: !0 }), document.activeElement === g && En(a));
8540
+ const b = new CustomEvent(ei, zl);
8541
+ a.addEventListener(ei, l), a.dispatchEvent(b), b.defaultPrevented || (fw(xw(sd(a)), { select: !0 }), document.activeElement === g && En(a));
8545
8542
  }
8546
8543
  return () => {
8547
8544
  a.removeEventListener(ei, l), setTimeout(() => {
8548
- const w = new CustomEvent(ti, zl);
8549
- a.addEventListener(ti, u), a.dispatchEvent(w), w.defaultPrevented || En(g ?? document.body, { select: !0 }), a.removeEventListener(ti, u), Hl.remove(p);
8545
+ const b = new CustomEvent(ti, zl);
8546
+ a.addEventListener(ti, u), a.dispatchEvent(b), b.defaultPrevented || En(g ?? document.body, { select: !0 }), a.removeEventListener(ti, u), Hl.remove(p);
8550
8547
  }, 0);
8551
8548
  };
8552
8549
  }
8553
8550
  }, [a, l, u, p]);
8554
- const m = b.useCallback(
8551
+ const m = w.useCallback(
8555
8552
  (g) => {
8556
8553
  if (!n && !r || p.paused) return;
8557
- const x = g.key === "Tab" && !g.altKey && !g.ctrlKey && !g.metaKey, w = document.activeElement;
8558
- if (x && w) {
8554
+ const x = g.key === "Tab" && !g.altKey && !g.ctrlKey && !g.metaKey, b = document.activeElement;
8555
+ if (x && b) {
8559
8556
  const v = g.currentTarget, [k, R] = hw(v);
8560
- k && R ? !g.shiftKey && w === R ? (g.preventDefault(), n && En(k, { select: !0 })) : g.shiftKey && w === k && (g.preventDefault(), n && En(R, { select: !0 })) : w === v && g.preventDefault();
8557
+ k && R ? !g.shiftKey && b === R ? (g.preventDefault(), n && En(k, { select: !0 })) : g.shiftKey && b === k && (g.preventDefault(), n && En(R, { select: !0 })) : b === v && g.preventDefault();
8561
8558
  }
8562
8559
  },
8563
8560
  [n, r, p.paused]
@@ -8627,24 +8624,24 @@ function Ul(e, t) {
8627
8624
  function xw(e) {
8628
8625
  return e.filter((t) => t.tagName !== "A");
8629
8626
  }
8630
- var bw = "Portal", aa = b.forwardRef((e, t) => {
8627
+ var bw = "Portal", aa = w.forwardRef((e, t) => {
8631
8628
  var a;
8632
- const { container: n, ...r } = e, [o, s] = b.useState(!1);
8629
+ const { container: n, ...r } = e, [o, s] = w.useState(!1);
8633
8630
  bn(() => s(!0), []);
8634
8631
  const i = n || o && ((a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : a.body);
8635
8632
  return i ? Ic.createPortal(/* @__PURE__ */ d.jsx(Oe.div, { ...r, ref: t }), i) : null;
8636
8633
  });
8637
8634
  aa.displayName = bw;
8638
8635
  function ww(e, t) {
8639
- return b.useReducer((n, r) => t[n][r] ?? n, e);
8636
+ return w.useReducer((n, r) => t[n][r] ?? n, e);
8640
8637
  }
8641
8638
  var Xt = (e) => {
8642
- const { present: t, children: n } = e, r = vw(t), o = typeof n == "function" ? n({ present: r.isPresent }) : b.Children.only(n), s = st(r.ref, yw(o));
8643
- return typeof n == "function" || r.isPresent ? b.cloneElement(o, { ref: s }) : null;
8639
+ const { present: t, children: n } = e, r = vw(t), o = typeof n == "function" ? n({ present: r.isPresent }) : w.Children.only(n), s = st(r.ref, yw(o));
8640
+ return typeof n == "function" || r.isPresent ? w.cloneElement(o, { ref: s }) : null;
8644
8641
  };
8645
8642
  Xt.displayName = "Presence";
8646
8643
  function vw(e) {
8647
- const [t, n] = b.useState(), r = b.useRef(null), o = b.useRef(e), s = b.useRef("none"), i = e ? "mounted" : "unmounted", [a, c] = ww(i, {
8644
+ const [t, n] = w.useState(), r = w.useRef(null), o = w.useRef(e), s = w.useRef("none"), i = e ? "mounted" : "unmounted", [a, c] = ww(i, {
8648
8645
  mounted: {
8649
8646
  UNMOUNT: "unmounted",
8650
8647
  ANIMATION_OUT: "unmountSuspended"
@@ -8657,7 +8654,7 @@ function vw(e) {
8657
8654
  MOUNT: "mounted"
8658
8655
  }
8659
8656
  });
8660
- return b.useEffect(() => {
8657
+ return w.useEffect(() => {
8661
8658
  const l = vo(r.current);
8662
8659
  s.current = a === "mounted" ? l : "none";
8663
8660
  }, [a]), bn(() => {
@@ -8687,7 +8684,7 @@ function vw(e) {
8687
8684
  c("ANIMATION_END");
8688
8685
  }, [t, c]), {
8689
8686
  isPresent: ["mounted", "unmountSuspended"].includes(a),
8690
- ref: b.useCallback((l) => {
8687
+ ref: w.useCallback((l) => {
8691
8688
  r.current = l ? getComputedStyle(l) : null, n(l);
8692
8689
  }, [])
8693
8690
  };
@@ -8702,7 +8699,7 @@ function yw(e) {
8702
8699
  }
8703
8700
  var ni = 0;
8704
8701
  function id() {
8705
- b.useEffect(() => {
8702
+ w.useEffect(() => {
8706
8703
  const e = document.querySelectorAll("[data-radix-focus-guard]");
8707
8704
  return document.body.insertAdjacentElement("afterbegin", e[0] ?? Wl()), document.body.insertAdjacentElement("beforeend", e[1] ?? Wl()), ni++, () => {
8708
8705
  ni === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), ni--;
@@ -8760,7 +8757,7 @@ function Tw(e, t) {
8760
8757
  })[0];
8761
8758
  return n.callback = t, n.facade;
8762
8759
  }
8763
- var Rw = typeof window < "u" ? b.useLayoutEffect : b.useEffect, Vl = /* @__PURE__ */ new WeakMap();
8760
+ var Rw = typeof window < "u" ? w.useLayoutEffect : w.useEffect, Vl = /* @__PURE__ */ new WeakMap();
8764
8761
  function Iw(e, t) {
8765
8762
  var n = Tw(null, function(r) {
8766
8763
  return e.forEach(function(o) {
@@ -8850,24 +8847,24 @@ var ld = function(e) {
8850
8847
  var r = t.read();
8851
8848
  if (!r)
8852
8849
  throw new Error("Sidecar medium not found");
8853
- return b.createElement(r, pn({}, n));
8850
+ return w.createElement(r, pn({}, n));
8854
8851
  };
8855
8852
  ld.isSideCarExport = !0;
8856
8853
  function _w(e, t) {
8857
8854
  return e.useMedium(t), ld;
8858
8855
  }
8859
8856
  var cd = Nw(), oi = function() {
8860
- }, Es = b.forwardRef(function(e, t) {
8861
- var n = b.useRef(null), r = b.useState({
8857
+ }, Es = w.forwardRef(function(e, t) {
8858
+ var n = w.useRef(null), r = w.useState({
8862
8859
  onScrollCapture: oi,
8863
8860
  onWheelCapture: oi,
8864
8861
  onTouchMoveCapture: oi
8865
- }), o = r[0], s = r[1], i = e.forwardProps, a = e.children, c = e.className, l = e.removeScrollBar, u = e.enabled, f = e.shards, h = e.sideCar, p = e.noRelative, m = e.noIsolation, g = e.inert, x = e.allowPinchZoom, w = e.as, v = w === void 0 ? "div" : w, k = e.gapMode, R = ad(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), C = h, y = Iw([n, t]), T = pn(pn({}, R), o);
8866
- return b.createElement(
8867
- b.Fragment,
8862
+ }), o = r[0], s = r[1], i = e.forwardProps, a = e.children, c = e.className, l = e.removeScrollBar, u = e.enabled, f = e.shards, h = e.sideCar, p = e.noRelative, m = e.noIsolation, g = e.inert, x = e.allowPinchZoom, b = e.as, v = b === void 0 ? "div" : b, k = e.gapMode, R = ad(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), C = h, y = Iw([n, t]), T = pn(pn({}, R), o);
8863
+ return w.createElement(
8864
+ w.Fragment,
8868
8865
  null,
8869
- u && b.createElement(C, { sideCar: cd, removeScrollBar: l, shards: f, noRelative: p, noIsolation: m, inert: g, setCallbacks: s, allowPinchZoom: !!x, lockRef: n, gapMode: k }),
8870
- i ? b.cloneElement(b.Children.only(a), pn(pn({}, T), { ref: y })) : b.createElement(v, pn({}, T, { className: c, ref: y }), a)
8866
+ u && w.createElement(C, { sideCar: cd, removeScrollBar: l, shards: f, noRelative: p, noIsolation: m, inert: g, setCallbacks: s, allowPinchZoom: !!x, lockRef: n, gapMode: k }),
8867
+ i ? w.cloneElement(w.Children.only(a), pn(pn({}, T), { ref: y })) : w.createElement(v, pn({}, T, { className: c, ref: y }), a)
8871
8868
  );
8872
8869
  });
8873
8870
  Es.defaultProps = {
@@ -8911,7 +8908,7 @@ var Dw = function() {
8911
8908
  }, Lw = function() {
8912
8909
  var e = Dw();
8913
8910
  return function(t, n) {
8914
- b.useEffect(function() {
8911
+ w.useEffect(function() {
8915
8912
  return e.add(t), function() {
8916
8913
  e.remove();
8917
8914
  };
@@ -8991,7 +8988,7 @@ var Dw = function() {
8991
8988
  var e = parseInt(document.body.getAttribute(gr) || "0", 10);
8992
8989
  return isFinite(e) ? e : 0;
8993
8990
  }, Uw = function() {
8994
- b.useEffect(function() {
8991
+ w.useEffect(function() {
8995
8992
  return document.body.setAttribute(gr, (Kl() + 1).toString()), function() {
8996
8993
  var e = Kl() - 1;
8997
8994
  e <= 0 ? document.body.removeAttribute(gr) : document.body.setAttribute(gr, e.toString());
@@ -9000,10 +8997,10 @@ var Dw = function() {
9000
8997
  }, Ww = function(e) {
9001
8998
  var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
9002
8999
  Uw();
9003
- var s = b.useMemo(function() {
9000
+ var s = w.useMemo(function() {
9004
9001
  return zw(o);
9005
9002
  }, [o]);
9006
- return b.createElement(Bw, { styles: Hw(s, !t, o, n ? "" : "!important") });
9003
+ return w.createElement(Bw, { styles: Hw(s, !t, o, n ? "" : "!important") });
9007
9004
  }, _i = !1;
9008
9005
  if (typeof window < "u")
9009
9006
  try {
@@ -9069,8 +9066,8 @@ var ar = _i ? { passive: !1 } : !1, Vw = function(e) {
9069
9066
  do {
9070
9067
  if (!a)
9071
9068
  break;
9072
- var p = hd(e, a), m = p[0], g = p[1], x = p[2], w = g - x - s * m;
9073
- (m || w) && fd(e, a) && (f += w, h += m);
9069
+ var p = hd(e, a), m = p[0], g = p[1], x = p[2], b = g - x - s * m;
9070
+ (m || b) && fd(e, a) && (f += b, h += m);
9074
9071
  var v = a.parentNode;
9075
9072
  a = v && v.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? v.host : v;
9076
9073
  } while (
@@ -9094,10 +9091,10 @@ var ar = _i ? { passive: !1 } : !1, Vw = function(e) {
9094
9091
  `);
9095
9092
  }, ev = 0, lr = [];
9096
9093
  function tv(e) {
9097
- var t = b.useRef([]), n = b.useRef([0, 0]), r = b.useRef(), o = b.useState(ev++)[0], s = b.useState(ud)[0], i = b.useRef(e);
9098
- b.useEffect(function() {
9094
+ var t = w.useRef([]), n = w.useRef([0, 0]), r = w.useRef(), o = w.useState(ev++)[0], s = w.useState(ud)[0], i = w.useRef(e);
9095
+ w.useEffect(function() {
9099
9096
  i.current = e;
9100
- }, [e]), b.useEffect(function() {
9097
+ }, [e]), w.useEffect(function() {
9101
9098
  if (e.inert) {
9102
9099
  document.body.classList.add("block-interactivity-".concat(o));
9103
9100
  var g = Sw([e.lockRef.current], (e.shards || []).map(Yl), !0).filter(Boolean);
@@ -9110,10 +9107,10 @@ function tv(e) {
9110
9107
  };
9111
9108
  }
9112
9109
  }, [e.inert, e.lockRef.current, e.shards]);
9113
- var a = b.useCallback(function(g, x) {
9110
+ var a = w.useCallback(function(g, x) {
9114
9111
  if ("touches" in g && g.touches.length === 2 || g.type === "wheel" && g.ctrlKey)
9115
9112
  return !i.current.allowPinchZoom;
9116
- var w = So(g), v = n.current, k = "deltaX" in g ? g.deltaX : v[0] - w[0], R = "deltaY" in g ? g.deltaY : v[1] - w[1], C, y = g.target, T = Math.abs(k) > Math.abs(R) ? "h" : "v";
9113
+ var b = So(g), v = n.current, k = "deltaX" in g ? g.deltaX : v[0] - b[0], R = "deltaY" in g ? g.deltaY : v[1] - b[1], C, y = g.target, T = Math.abs(k) > Math.abs(R) ? "h" : "v";
9117
9114
  if ("touches" in g && T === "h" && y.type === "range")
9118
9115
  return !1;
9119
9116
  var N = ql(T, y);
@@ -9125,11 +9122,11 @@ function tv(e) {
9125
9122
  return !0;
9126
9123
  var A = r.current || C;
9127
9124
  return Jw(A, x, g, A === "h" ? k : R);
9128
- }, []), c = b.useCallback(function(g) {
9125
+ }, []), c = w.useCallback(function(g) {
9129
9126
  var x = g;
9130
9127
  if (!(!lr.length || lr[lr.length - 1] !== s)) {
9131
- var w = "deltaY" in x ? Gl(x) : So(x), v = t.current.filter(function(C) {
9132
- return C.name === x.type && (C.target === x.target || x.target === C.shadowParent) && Zw(C.delta, w);
9128
+ var b = "deltaY" in x ? Gl(x) : So(x), v = t.current.filter(function(C) {
9129
+ return C.name === x.type && (C.target === x.target || x.target === C.shadowParent) && Zw(C.delta, b);
9133
9130
  })[0];
9134
9131
  if (v && v.should) {
9135
9132
  x.cancelable && x.preventDefault();
@@ -9142,21 +9139,21 @@ function tv(e) {
9142
9139
  R && x.cancelable && x.preventDefault();
9143
9140
  }
9144
9141
  }
9145
- }, []), l = b.useCallback(function(g, x, w, v) {
9146
- var k = { name: g, delta: x, target: w, should: v, shadowParent: nv(w) };
9142
+ }, []), l = w.useCallback(function(g, x, b, v) {
9143
+ var k = { name: g, delta: x, target: b, should: v, shadowParent: nv(b) };
9147
9144
  t.current.push(k), setTimeout(function() {
9148
9145
  t.current = t.current.filter(function(R) {
9149
9146
  return R !== k;
9150
9147
  });
9151
9148
  }, 1);
9152
- }, []), u = b.useCallback(function(g) {
9149
+ }, []), u = w.useCallback(function(g) {
9153
9150
  n.current = So(g), r.current = void 0;
9154
- }, []), f = b.useCallback(function(g) {
9151
+ }, []), f = w.useCallback(function(g) {
9155
9152
  l(g.type, Gl(g), g.target, a(g, e.lockRef.current));
9156
- }, []), h = b.useCallback(function(g) {
9153
+ }, []), h = w.useCallback(function(g) {
9157
9154
  l(g.type, So(g), g.target, a(g, e.lockRef.current));
9158
9155
  }, []);
9159
- b.useEffect(function() {
9156
+ w.useEffect(function() {
9160
9157
  return lr.push(s), e.setCallbacks({
9161
9158
  onScrollCapture: f,
9162
9159
  onWheelCapture: f,
@@ -9168,11 +9165,11 @@ function tv(e) {
9168
9165
  };
9169
9166
  }, []);
9170
9167
  var p = e.removeScrollBar, m = e.inert;
9171
- return b.createElement(
9172
- b.Fragment,
9168
+ return w.createElement(
9169
+ w.Fragment,
9173
9170
  null,
9174
- m ? b.createElement(s, { styles: Qw(o) }) : null,
9175
- p ? b.createElement(Ww, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
9171
+ m ? w.createElement(s, { styles: Qw(o) }) : null,
9172
+ p ? w.createElement(Ww, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
9176
9173
  );
9177
9174
  }
9178
9175
  function nv(e) {
@@ -9181,8 +9178,8 @@ function nv(e) {
9181
9178
  return t;
9182
9179
  }
9183
9180
  const rv = _w(cd, tv);
9184
- var la = b.forwardRef(function(e, t) {
9185
- return b.createElement(Es, pn({}, e, { ref: t, sideCar: rv }));
9181
+ var la = w.forwardRef(function(e, t) {
9182
+ return w.createElement(Es, pn({}, e, { ref: t, sideCar: rv }));
9186
9183
  });
9187
9184
  la.classNames = Es.classNames;
9188
9185
  var ov = function(e) {
@@ -9216,8 +9213,8 @@ var ov = function(e) {
9216
9213
  try {
9217
9214
  var p = h.getAttribute(r), m = p !== null && p !== "false", g = (cr.get(h) || 0) + 1, x = (s.get(h) || 0) + 1;
9218
9215
  cr.set(h, g), s.set(h, x), i.push(h), g === 1 && m && Co.set(h, !0), x === 1 && h.setAttribute(n, "true"), m || h.setAttribute(r, "true");
9219
- } catch (w) {
9220
- console.error("aria-hidden: cannot operate on ", h, w);
9216
+ } catch (b) {
9217
+ console.error("aria-hidden: cannot operate on ", h, b);
9221
9218
  }
9222
9219
  });
9223
9220
  };
@@ -9241,7 +9238,7 @@ var ov = function(e) {
9241
9238
  defaultOpen: o,
9242
9239
  onOpenChange: s,
9243
9240
  modal: i = !0
9244
- } = e, a = b.useRef(null), c = b.useRef(null), [l, u] = Is({
9241
+ } = e, a = w.useRef(null), c = w.useRef(null), [l, u] = Is({
9245
9242
  prop: r,
9246
9243
  defaultProp: o ?? !1,
9247
9244
  onChange: s,
@@ -9258,14 +9255,14 @@ var ov = function(e) {
9258
9255
  descriptionId: Gt(),
9259
9256
  open: l,
9260
9257
  onOpenChange: u,
9261
- onOpenToggle: b.useCallback(() => u((f) => !f), [u]),
9258
+ onOpenToggle: w.useCallback(() => u((f) => !f), [u]),
9262
9259
  modal: i,
9263
9260
  children: n
9264
9261
  }
9265
9262
  );
9266
9263
  };
9267
9264
  xd.displayName = As;
9268
- var bd = "DialogTrigger", lv = b.forwardRef(
9265
+ var bd = "DialogTrigger", lv = w.forwardRef(
9269
9266
  (e, t) => {
9270
9267
  const { __scopeDialog: n, ...r } = e, o = un(bd, n), s = st(t, o.triggerRef);
9271
9268
  return /* @__PURE__ */ d.jsx(
@@ -9288,17 +9285,17 @@ var ca = "DialogPortal", [cv, wd] = gd(ca, {
9288
9285
  forceMount: void 0
9289
9286
  }), vd = (e) => {
9290
9287
  const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, s = un(ca, t);
9291
- return /* @__PURE__ */ d.jsx(cv, { scope: t, forceMount: n, children: b.Children.map(r, (i) => /* @__PURE__ */ d.jsx(Xt, { present: n || s.open, children: /* @__PURE__ */ d.jsx(aa, { asChild: !0, container: o, children: i }) })) });
9288
+ return /* @__PURE__ */ d.jsx(cv, { scope: t, forceMount: n, children: w.Children.map(r, (i) => /* @__PURE__ */ d.jsx(Xt, { present: n || s.open, children: /* @__PURE__ */ d.jsx(aa, { asChild: !0, container: o, children: i }) })) });
9292
9289
  };
9293
9290
  vd.displayName = ca;
9294
- var rs = "DialogOverlay", yd = b.forwardRef(
9291
+ var rs = "DialogOverlay", yd = w.forwardRef(
9295
9292
  (e, t) => {
9296
9293
  const n = wd(rs, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = un(rs, e.__scopeDialog);
9297
9294
  return s.modal ? /* @__PURE__ */ d.jsx(Xt, { present: r || s.open, children: /* @__PURE__ */ d.jsx(dv, { ...o, ref: t }) }) : null;
9298
9295
  }
9299
9296
  );
9300
9297
  yd.displayName = rs;
9301
- var uv = Ur("DialogOverlay.RemoveScroll"), dv = b.forwardRef(
9298
+ var uv = Ur("DialogOverlay.RemoveScroll"), dv = w.forwardRef(
9302
9299
  (e, t) => {
9303
9300
  const { __scopeDialog: n, ...r } = e, o = un(rs, n);
9304
9301
  return (
@@ -9315,17 +9312,17 @@ var uv = Ur("DialogOverlay.RemoveScroll"), dv = b.forwardRef(
9315
9312
  ) })
9316
9313
  );
9317
9314
  }
9318
- ), Zn = "DialogContent", Sd = b.forwardRef(
9315
+ ), Zn = "DialogContent", Sd = w.forwardRef(
9319
9316
  (e, t) => {
9320
9317
  const n = wd(Zn, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = un(Zn, e.__scopeDialog);
9321
9318
  return /* @__PURE__ */ d.jsx(Xt, { present: r || s.open, children: s.modal ? /* @__PURE__ */ d.jsx(fv, { ...o, ref: t }) : /* @__PURE__ */ d.jsx(hv, { ...o, ref: t }) });
9322
9319
  }
9323
9320
  );
9324
9321
  Sd.displayName = Zn;
9325
- var fv = b.forwardRef(
9322
+ var fv = w.forwardRef(
9326
9323
  (e, t) => {
9327
- const n = un(Zn, e.__scopeDialog), r = b.useRef(null), o = st(t, n.contentRef, r);
9328
- return b.useEffect(() => {
9324
+ const n = un(Zn, e.__scopeDialog), r = w.useRef(null), o = st(t, n.contentRef, r);
9325
+ return w.useEffect(() => {
9329
9326
  const s = r.current;
9330
9327
  if (s) return md(s);
9331
9328
  }, []), /* @__PURE__ */ d.jsx(
@@ -9350,9 +9347,9 @@ var fv = b.forwardRef(
9350
9347
  }
9351
9348
  );
9352
9349
  }
9353
- ), hv = b.forwardRef(
9350
+ ), hv = w.forwardRef(
9354
9351
  (e, t) => {
9355
- const n = un(Zn, e.__scopeDialog), r = b.useRef(!1), o = b.useRef(!1);
9352
+ const n = un(Zn, e.__scopeDialog), r = w.useRef(!1), o = w.useRef(!1);
9356
9353
  return /* @__PURE__ */ d.jsx(
9357
9354
  Cd,
9358
9355
  {
@@ -9373,9 +9370,9 @@ var fv = b.forwardRef(
9373
9370
  }
9374
9371
  );
9375
9372
  }
9376
- ), Cd = b.forwardRef(
9373
+ ), Cd = w.forwardRef(
9377
9374
  (e, t) => {
9378
- const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: s, ...i } = e, a = un(Zn, n), c = b.useRef(null), l = st(t, c);
9375
+ const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: s, ...i } = e, a = un(Zn, n), c = w.useRef(null), l = st(t, c);
9379
9376
  return id(), /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
9380
9377
  /* @__PURE__ */ d.jsx(
9381
9378
  ia,
@@ -9406,21 +9403,21 @@ var fv = b.forwardRef(
9406
9403
  ] })
9407
9404
  ] });
9408
9405
  }
9409
- ), ua = "DialogTitle", kd = b.forwardRef(
9406
+ ), ua = "DialogTitle", kd = w.forwardRef(
9410
9407
  (e, t) => {
9411
9408
  const { __scopeDialog: n, ...r } = e, o = un(ua, n);
9412
9409
  return /* @__PURE__ */ d.jsx(Oe.h2, { id: o.titleId, ...r, ref: t });
9413
9410
  }
9414
9411
  );
9415
9412
  kd.displayName = ua;
9416
- var Td = "DialogDescription", Rd = b.forwardRef(
9413
+ var Td = "DialogDescription", Rd = w.forwardRef(
9417
9414
  (e, t) => {
9418
9415
  const { __scopeDialog: n, ...r } = e, o = un(Td, n);
9419
9416
  return /* @__PURE__ */ d.jsx(Oe.p, { id: o.descriptionId, ...r, ref: t });
9420
9417
  }
9421
9418
  );
9422
9419
  Rd.displayName = Td;
9423
- var Id = "DialogClose", Ed = b.forwardRef(
9420
+ var Id = "DialogClose", Ed = w.forwardRef(
9424
9421
  (e, t) => {
9425
9422
  const { __scopeDialog: n, ...r } = e, o = un(Id, n);
9426
9423
  return /* @__PURE__ */ d.jsx(
@@ -9448,18 +9445,18 @@ var Ad = "DialogTitleWarning", [zk, Nd] = Yb(Ad, {
9448
9445
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
9449
9446
 
9450
9447
  For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
9451
- return b.useEffect(() => {
9448
+ return w.useEffect(() => {
9452
9449
  e && (document.getElementById(e) || console.error(n));
9453
9450
  }, [n, e]), null;
9454
9451
  }, mv = "DialogDescriptionWarning", gv = ({ contentRef: e, descriptionId: t }) => {
9455
9452
  const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Nd(mv).contentName}}.`;
9456
- return b.useEffect(() => {
9453
+ return w.useEffect(() => {
9457
9454
  var s;
9458
9455
  const o = (s = e.current) == null ? void 0 : s.getAttribute("aria-describedby");
9459
9456
  t && o && (document.getElementById(t) || console.warn(r));
9460
9457
  }, [r, e, t]), null;
9461
9458
  }, _d = xd, jd = vd, fa = yd, ha = Sd, Br = kd, Pd = Rd, xv = Ed;
9462
- const Od = _d, bv = jd, Md = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9459
+ const Od = _d, bv = jd, Md = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9463
9460
  fa,
9464
9461
  {
9465
9462
  ref: n,
@@ -9471,12 +9468,12 @@ const Od = _d, bv = jd, Md = b.forwardRef(({ className: e, ...t }, n) => /* @__P
9471
9468
  }
9472
9469
  ));
9473
9470
  Md.displayName = fa.displayName;
9474
- const pa = b.forwardRef(({ className: e, children: t, ...n }, r) => {
9475
- const o = b.useMemo(() => {
9471
+ const pa = w.forwardRef(({ className: e, children: t, ...n }, r) => {
9472
+ const o = w.useMemo(() => {
9476
9473
  let s = !1;
9477
9474
  function i(a) {
9478
- b.Children.forEach(a, (c) => {
9479
- if (s || !b.isValidElement(c)) return;
9475
+ w.Children.forEach(a, (c) => {
9476
+ if (s || !w.isValidElement(c)) return;
9480
9477
  const l = c.type;
9481
9478
  if (l === Br || (l == null ? void 0 : l.displayName) === Br.displayName || (l == null ? void 0 : l.name) === "DialogTitle") {
9482
9479
  s = !0;
@@ -9525,7 +9522,7 @@ const Dd = ({
9525
9522
  }
9526
9523
  );
9527
9524
  Dd.displayName = "DialogHeader";
9528
- const Ld = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9525
+ const Ld = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9529
9526
  Br,
9530
9527
  {
9531
9528
  ref: n,
@@ -9537,7 +9534,7 @@ const Ld = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9537
9534
  }
9538
9535
  ));
9539
9536
  Ld.displayName = Br.displayName;
9540
- const wv = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9537
+ const wv = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9541
9538
  Pd,
9542
9539
  {
9543
9540
  ref: n,
@@ -9703,7 +9700,7 @@ function Tv({
9703
9700
  );
9704
9701
  }) });
9705
9702
  }
9706
- const Fd = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9703
+ const Fd = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9707
9704
  "div",
9708
9705
  {
9709
9706
  ref: n,
@@ -9715,7 +9712,7 @@ const Fd = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9715
9712
  }
9716
9713
  ));
9717
9714
  Fd.displayName = "Card";
9718
- const zd = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9715
+ const zd = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9719
9716
  "div",
9720
9717
  {
9721
9718
  ref: n,
@@ -9724,7 +9721,7 @@ const zd = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9724
9721
  }
9725
9722
  ));
9726
9723
  zd.displayName = "CardHeader";
9727
- const Bd = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9724
+ const Bd = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9728
9725
  "h3",
9729
9726
  {
9730
9727
  ref: n,
@@ -9736,7 +9733,7 @@ const Bd = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9736
9733
  }
9737
9734
  ));
9738
9735
  Bd.displayName = "CardTitle";
9739
- const Hd = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9736
+ const Hd = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9740
9737
  "p",
9741
9738
  {
9742
9739
  ref: n,
@@ -9745,9 +9742,9 @@ const Hd = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9745
9742
  }
9746
9743
  ));
9747
9744
  Hd.displayName = "CardDescription";
9748
- const ji = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx("div", { ref: n, className: ae("p-6 pt-0", e), ...t }));
9745
+ const ji = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx("div", { ref: n, className: ae("p-6 pt-0", e), ...t }));
9749
9746
  ji.displayName = "CardContent";
9750
- const Ud = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9747
+ const Ud = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
9751
9748
  "div",
9752
9749
  {
9753
9750
  ref: n,
@@ -10109,7 +10106,7 @@ class ma {
10109
10106
  let n = this.rules.block.list.exec(t);
10110
10107
  if (n) {
10111
10108
  let r, o, s, i, a, c, l, u, f, h, p, m, g = n[1].trim();
10112
- const x = g.length > 1, w = {
10109
+ const x = g.length > 1, b = {
10113
10110
  type: "list",
10114
10111
  raw: "",
10115
10112
  ordered: x,
@@ -10140,26 +10137,26 @@ class ma {
10140
10137
  `, t = t.substring(h.length + 1), u = f.slice(i);
10141
10138
  }
10142
10139
  }
10143
- w.loose || (l ? w.loose = !0 : /\n *\n *$/.test(r) && (l = !0)), this.options.gfm && (o = /^\[[ xX]\] /.exec(p), o && (s = o[0] !== "[ ] ", p = p.replace(/^\[[ xX]\] +/, ""))), w.items.push({
10140
+ b.loose || (l ? b.loose = !0 : /\n *\n *$/.test(r) && (l = !0)), this.options.gfm && (o = /^\[[ xX]\] /.exec(p), o && (s = o[0] !== "[ ] ", p = p.replace(/^\[[ xX]\] +/, ""))), b.items.push({
10144
10141
  type: "list_item",
10145
10142
  raw: r,
10146
10143
  task: !!o,
10147
10144
  checked: s,
10148
10145
  loose: !1,
10149
10146
  text: p
10150
- }), w.raw += r;
10147
+ }), b.raw += r;
10151
10148
  }
10152
- w.items[w.items.length - 1].raw = r.trimRight(), w.items[w.items.length - 1].text = p.trimRight(), w.raw = w.raw.trimRight();
10153
- const k = w.items.length;
10149
+ b.items[b.items.length - 1].raw = r.trimRight(), b.items[b.items.length - 1].text = p.trimRight(), b.raw = b.raw.trimRight();
10150
+ const k = b.items.length;
10154
10151
  for (a = 0; a < k; a++)
10155
- if (this.lexer.state.top = !1, w.items[a].tokens = this.lexer.blockTokens(w.items[a].text, []), !w.loose) {
10156
- const R = w.items[a].tokens.filter((y) => y.type === "space"), C = R.length > 0 && R.some((y) => /\n.*\n/.test(y.raw));
10157
- w.loose = C;
10152
+ if (this.lexer.state.top = !1, b.items[a].tokens = this.lexer.blockTokens(b.items[a].text, []), !b.loose) {
10153
+ const R = b.items[a].tokens.filter((y) => y.type === "space"), C = R.length > 0 && R.some((y) => /\n.*\n/.test(y.raw));
10154
+ b.loose = C;
10158
10155
  }
10159
- if (w.loose)
10156
+ if (b.loose)
10160
10157
  for (a = 0; a < k; a++)
10161
- w.items[a].loose = !0;
10162
- return w;
10158
+ b.items[a].loose = !0;
10159
+ return b;
10163
10160
  }
10164
10161
  }
10165
10162
  html(t) {
@@ -11033,7 +11030,7 @@ class Pn {
11033
11030
  * Parse Loop
11034
11031
  */
11035
11032
  parse(t, n = !0) {
11036
- let r = "", o, s, i, a, c, l, u, f, h, p, m, g, x, w, v, k, R, C, y;
11033
+ let r = "", o, s, i, a, c, l, u, f, h, p, m, g, x, b, v, k, R, C, y;
11037
11034
  const T = t.length;
11038
11035
  for (o = 0; o < T; o++) {
11039
11036
  if (p = t[o], this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[p.type] && (y = this.options.extensions.renderers[p.type].call({ parser: this }, p), y !== !1 || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "paragraph", "text"].includes(p.type))) {
@@ -11087,10 +11084,10 @@ class Pn {
11087
11084
  }
11088
11085
  case "list": {
11089
11086
  for (m = p.ordered, g = p.start, x = p.loose, a = p.items.length, h = "", s = 0; s < a; s++)
11090
- v = p.items[s], k = v.checked, R = v.task, w = "", v.task && (C = this.renderer.checkbox(k), x ? v.tokens.length > 0 && v.tokens[0].type === "paragraph" ? (v.tokens[0].text = C + " " + v.tokens[0].text, v.tokens[0].tokens && v.tokens[0].tokens.length > 0 && v.tokens[0].tokens[0].type === "text" && (v.tokens[0].tokens[0].text = C + " " + v.tokens[0].tokens[0].text)) : v.tokens.unshift({
11087
+ v = p.items[s], k = v.checked, R = v.task, b = "", v.task && (C = this.renderer.checkbox(k), x ? v.tokens.length > 0 && v.tokens[0].type === "paragraph" ? (v.tokens[0].text = C + " " + v.tokens[0].text, v.tokens[0].tokens && v.tokens[0].tokens.length > 0 && v.tokens[0].tokens[0].type === "text" && (v.tokens[0].tokens[0].text = C + " " + v.tokens[0].tokens[0].text)) : v.tokens.unshift({
11091
11088
  type: "text",
11092
11089
  text: C
11093
- }) : w += C), w += this.parse(v.tokens, x), h += this.renderer.listitem(w, R, k);
11090
+ }) : b += C), b += this.parse(v.tokens, x), h += this.renderer.listitem(b, R, k);
11094
11091
  r += this.renderer.list(h, m, g);
11095
11092
  continue;
11096
11093
  }
@@ -11546,7 +11543,7 @@ function qv({
11546
11543
  uploadingFiles: m,
11547
11544
  messageRole: g,
11548
11545
  truncateUserMessages: x,
11549
- userMessagePreviewLength: w,
11546
+ userMessagePreviewLength: b,
11550
11547
  isUserExpanded: v,
11551
11548
  setIsUserExpanded: k,
11552
11549
  isCompactLayout: R,
@@ -11620,13 +11617,13 @@ function qv({
11620
11617
  if (h)
11621
11618
  return null;
11622
11619
  const q = F.text ?? "", se = q.trim(), fe = so(se);
11623
- return fe && g !== "tool" ? /* @__PURE__ */ d.jsx(kv, { data: fe }, _) : g === "user" && x && se.length > w ? /* @__PURE__ */ d.jsx(
11620
+ return fe && g !== "tool" ? /* @__PURE__ */ d.jsx(kv, { data: fe }, _) : g === "user" && x && se.length > b ? /* @__PURE__ */ d.jsx(
11624
11621
  Vv,
11625
11622
  {
11626
11623
  text: se,
11627
11624
  expanded: v,
11628
11625
  onExpandedChange: k,
11629
- previewLength: w,
11626
+ previewLength: b,
11630
11627
  isCompact: R
11631
11628
  },
11632
11629
  _
@@ -11662,7 +11659,7 @@ function qv({
11662
11659
  g,
11663
11660
  x,
11664
11661
  m,
11665
- w,
11662
+ b,
11666
11663
  h,
11667
11664
  k
11668
11665
  ]), O = s.trim().length > 0 || i.length > 0 || a.length > 0 || I.length > 0 || !!e.artifact;
@@ -11788,7 +11785,7 @@ function Qv({
11788
11785
  onEdit: m,
11789
11786
  onRegenerate: g,
11790
11787
  showCheckpointControls: x,
11791
- attemptCount: w,
11788
+ attemptCount: b,
11792
11789
  attemptIndex: v,
11793
11790
  handleOlderAttemptSelect: k,
11794
11791
  handleNewerAttemptSelect: R,
@@ -11825,27 +11822,27 @@ function Qv({
11825
11822
  r && /* @__PURE__ */ d.jsx("span", { className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: "Interrupt" })
11826
11823
  ] }),
11827
11824
  /* @__PURE__ */ d.jsxs("div", { className: "flex items-center gap-2", children: [
11828
- x && w > 1 && /* @__PURE__ */ d.jsxs("div", { className: "flex items-center gap-2 text-xs", children: [
11825
+ x && b > 1 && /* @__PURE__ */ d.jsxs("div", { className: "flex items-center gap-2 text-xs", children: [
11829
11826
  /* @__PURE__ */ d.jsx(
11830
11827
  "button",
11831
11828
  {
11832
11829
  type: "button",
11833
11830
  className: ae(
11834
11831
  "flex items-center justify-center rounded border px-1.5 py-1 transition-colors",
11835
- v < w - 1 ? "border-border text-foreground hover:bg-muted/60" : "border-border text-muted-foreground cursor-not-allowed"
11832
+ v < b - 1 ? "border-border text-foreground hover:bg-muted/60" : "border-border text-muted-foreground cursor-not-allowed"
11836
11833
  ),
11837
11834
  onClick: () => {
11838
- v >= w - 1 || k();
11835
+ v >= b - 1 || k();
11839
11836
  },
11840
11837
  "aria-label": "Older attempt (back in time)",
11841
- disabled: v >= w - 1,
11838
+ disabled: v >= b - 1,
11842
11839
  children: /* @__PURE__ */ d.jsx(wp, { className: "h-3 w-3" })
11843
11840
  }
11844
11841
  ),
11845
11842
  /* @__PURE__ */ d.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ d.jsxs("span", { className: "whitespace-nowrap", children: [
11846
- w - v,
11843
+ b - v,
11847
11844
  " / ",
11848
- w
11845
+ b
11849
11846
  ] }) }),
11850
11847
  /* @__PURE__ */ d.jsx(
11851
11848
  "button",
@@ -12005,8 +12002,8 @@ function oy({ ...e }) {
12005
12002
  };
12006
12003
  }
12007
12004
  function sy() {
12008
- const [e, t] = b.useState(Vo);
12009
- return b.useEffect(() => (Wo.push(t), () => {
12005
+ const [e, t] = w.useState(Vo);
12006
+ return w.useEffect(() => (Wo.push(t), () => {
12010
12007
  const n = Wo.indexOf(t);
12011
12008
  n > -1 && Wo.splice(n, 1);
12012
12009
  }), [e]), {
@@ -12022,7 +12019,7 @@ function iy(e) {
12022
12019
  c(m), u(!0);
12023
12020
  }, []), p = te(
12024
12021
  async (m, g, x) => {
12025
- var w, v;
12022
+ var b, v;
12026
12023
  if (!t) {
12027
12024
  m.preventDefault();
12028
12025
  return;
@@ -12055,7 +12052,7 @@ function iy(e) {
12055
12052
  id: T.id,
12056
12053
  name: g.name || T.filename || `file_${T.id}`,
12057
12054
  mimeType: g.mimeType || T.mime_type || "application/octet-stream"
12058
- }), (w = C.update) == null || w.call(C, {
12055
+ }), (b = C.update) == null || b.call(C, {
12059
12056
  id: C.id,
12060
12057
  title: "Success",
12061
12058
  description: `Opened ${g.name}`,
@@ -12179,7 +12176,7 @@ const Zd = dp(function({
12179
12176
  customStyles: m = {},
12180
12177
  streamingDebounceMs: g = 300,
12181
12178
  renderStreamingMarkdown: x = !0,
12182
- enableStreamingMarkdownBuffer: w,
12179
+ enableStreamingMarkdownBuffer: b,
12183
12180
  onEdit: v,
12184
12181
  onRegenerate: k,
12185
12182
  onCopy: R,
@@ -12219,7 +12216,7 @@ const Zd = dp(function({
12219
12216
  toolRaw: je,
12220
12217
  isToolStreaming: He,
12221
12218
  interruptParts: nt
12222
- } = ce, xt = w ?? g !== 0, at = De(() => nt.length ? nt[0] : null, [nt]), Ue = te(async () => {
12219
+ } = ce, xt = b ?? g !== 0, at = De(() => nt.length ? nt[0] : null, [nt]), Ue = te(async () => {
12223
12220
  const Ie = I ? je : Fe;
12224
12221
  async function Ke(ft) {
12225
12222
  if (navigator.clipboard && typeof navigator.clipboard.writeText == "function") {
@@ -12521,7 +12518,7 @@ const dy = {
12521
12518
  onSelectCheckpoint: m,
12522
12519
  getMessageCustomStyles: g,
12523
12520
  getInterruptOptions: x,
12524
- toolConfig: w,
12521
+ toolConfig: b,
12525
12522
  renderArtifactsInline: v = !0
12526
12523
  }) {
12527
12524
  const k = Qd(t, n), y = !!t.__syntheticStreaming || o === t.id && t.role === "assistant", T = p ?? dy, N = t.checkpointId ?? null, { attemptCount: A, attemptIndex: M, attempts: L } = De(
@@ -12561,7 +12558,7 @@ const dy = {
12561
12558
  attemptMetas: L,
12562
12559
  onSelectCheckpoint: m,
12563
12560
  customStyles: W,
12564
- toolConfig: w,
12561
+ toolConfig: b,
12565
12562
  renderArtifactsInline: v
12566
12563
  }
12567
12564
  )
@@ -12587,7 +12584,7 @@ const fy = Object.freeze({}), tf = ee.forwardRef(({
12587
12584
  followNewMessages: m = !0,
12588
12585
  isNavigatingCheckpoint: g = !1,
12589
12586
  onScrollAway: x,
12590
- onAtBottom: w,
12587
+ onAtBottom: b,
12591
12588
  showToolMessages: v = !0,
12592
12589
  toolConfig: k,
12593
12590
  checkpointIndex: R,
@@ -12647,8 +12644,8 @@ const fy = Object.freeze({}), tf = ee.forwardRef(({
12647
12644
  () => k ?? fy,
12648
12645
  [k]
12649
12646
  ), O = te((ce) => {
12650
- x && x(!ce), w && w(ce);
12651
- }, [x, w]), K = De(() => {
12647
+ x && x(!ce), b && b(ce);
12648
+ }, [x, b]), K = De(() => {
12652
12649
  if (a)
12653
12650
  return async () => {
12654
12651
  if (!Z.current) {
@@ -12750,20 +12747,20 @@ function nf(e) {
12750
12747
  t,
12751
12748
  { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
12752
12749
  ), i = (g) => {
12753
- const { scope: x, children: w } = g, v = ee.useRef(null), k = ee.useRef(/* @__PURE__ */ new Map()).current;
12754
- return /* @__PURE__ */ d.jsx(o, { scope: x, itemMap: k, collectionRef: v, children: w });
12750
+ const { scope: x, children: b } = g, v = ee.useRef(null), k = ee.useRef(/* @__PURE__ */ new Map()).current;
12751
+ return /* @__PURE__ */ d.jsx(o, { scope: x, itemMap: k, collectionRef: v, children: b });
12755
12752
  };
12756
12753
  i.displayName = t;
12757
12754
  const a = e + "CollectionSlot", c = Ur(a), l = ee.forwardRef(
12758
12755
  (g, x) => {
12759
- const { scope: w, children: v } = g, k = s(a, w), R = st(x, k.collectionRef);
12756
+ const { scope: b, children: v } = g, k = s(a, b), R = st(x, k.collectionRef);
12760
12757
  return /* @__PURE__ */ d.jsx(c, { ref: R, children: v });
12761
12758
  }
12762
12759
  );
12763
12760
  l.displayName = a;
12764
12761
  const u = e + "CollectionItemSlot", f = "data-radix-collection-item", h = Ur(u), p = ee.forwardRef(
12765
12762
  (g, x) => {
12766
- const { scope: w, children: v, ...k } = g, R = ee.useRef(null), C = st(x, R), y = s(u, w);
12763
+ const { scope: b, children: v, ...k } = g, R = ee.useRef(null), C = st(x, R), y = s(u, b);
12767
12764
  return ee.useEffect(() => (y.itemMap.set(R, { ref: R, ...k }), () => void y.itemMap.delete(R))), /* @__PURE__ */ d.jsx(h, { [f]: "", ref: C, children: v });
12768
12765
  }
12769
12766
  );
@@ -12785,9 +12782,9 @@ function nf(e) {
12785
12782
  r
12786
12783
  ];
12787
12784
  }
12788
- var hy = b.createContext(void 0);
12785
+ var hy = w.createContext(void 0);
12789
12786
  function xa(e) {
12790
- const t = b.useContext(hy);
12787
+ const t = w.useContext(hy);
12791
12788
  return e || t || "ltr";
12792
12789
  }
12793
12790
  const py = ["top", "right", "bottom", "left"], On = Math.min, Vt = Math.max, is = Math.round, Ro = Math.floor, xn = (e) => ({
@@ -12962,13 +12959,13 @@ const Ty = async (e, t, n) => {
12962
12959
  for (let g = 0; g < a.length; g++) {
12963
12960
  const {
12964
12961
  name: x,
12965
- fn: w
12962
+ fn: b
12966
12963
  } = a[g], {
12967
12964
  x: v,
12968
12965
  y: k,
12969
12966
  data: R,
12970
12967
  reset: C
12971
- } = await w({
12968
+ } = await b({
12972
12969
  x: u,
12973
12970
  y: f,
12974
12971
  initialPlacement: r,
@@ -13021,7 +13018,7 @@ async function Xr(e, t) {
13021
13018
  elementContext: f = "floating",
13022
13019
  altBoundary: h = !1,
13023
13020
  padding: p = 0
13024
- } = Rn(t, e), m = rf(p), x = a[h ? f === "floating" ? "reference" : "floating" : f], w = ls(await s.getClippingRect({
13021
+ } = Rn(t, e), m = rf(p), x = a[h ? f === "floating" ? "reference" : "floating" : f], b = ls(await s.getClippingRect({
13025
13022
  element: (n = await (s.isElement == null ? void 0 : s.isElement(x))) == null || n ? x : x.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(a.floating)),
13026
13023
  boundary: l,
13027
13024
  rootBoundary: u,
@@ -13044,10 +13041,10 @@ async function Xr(e, t) {
13044
13041
  strategy: c
13045
13042
  }) : v);
13046
13043
  return {
13047
- top: (w.top - C.top + m.top) / R.y,
13048
- bottom: (C.bottom - w.bottom + m.bottom) / R.y,
13049
- left: (w.left - C.left + m.left) / R.x,
13050
- right: (C.right - w.right + m.right) / R.x
13044
+ top: (b.top - C.top + m.top) / R.y,
13045
+ bottom: (C.bottom - b.bottom + m.bottom) / R.y,
13046
+ left: (b.left - C.left + m.left) / R.x,
13047
+ right: (C.right - b.right + m.right) / R.x
13051
13048
  };
13052
13049
  }
13053
13050
  const Ry = (e) => ({
@@ -13071,10 +13068,10 @@ const Ry = (e) => ({
13071
13068
  const f = rf(u), h = {
13072
13069
  x: n,
13073
13070
  y: r
13074
- }, p = va(o), m = wa(p), g = await i.getDimensions(l), x = p === "y", w = x ? "top" : "left", v = x ? "bottom" : "right", k = x ? "clientHeight" : "clientWidth", R = s.reference[m] + s.reference[p] - h[p] - s.floating[m], C = h[p] - s.reference[p], y = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l));
13071
+ }, p = va(o), m = wa(p), g = await i.getDimensions(l), x = p === "y", b = x ? "top" : "left", v = x ? "bottom" : "right", k = x ? "clientHeight" : "clientWidth", R = s.reference[m] + s.reference[p] - h[p] - s.floating[m], C = h[p] - s.reference[p], y = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l));
13075
13072
  let T = y ? y[k] : 0;
13076
13073
  (!T || !await (i.isElement == null ? void 0 : i.isElement(y))) && (T = a.floating[k] || s.floating[m]);
13077
- const N = R / 2 - C / 2, A = T / 2 - g[m] / 2 - 1, M = On(f[w], A), L = On(f[v], A), W = M, V = T - g[m] - L, D = T / 2 - g[m] / 2 + N, Z = Pi(W, D, V), G = !c.arrow && Er(o) != null && D !== Z && s.reference[m] / 2 - (D < W ? M : L) - g[m] / 2 < 0, oe = G ? D < W ? D - W : D - V : 0;
13074
+ const N = R / 2 - C / 2, A = T / 2 - g[m] / 2 - 1, M = On(f[b], A), L = On(f[v], A), W = M, V = T - g[m] - L, D = T / 2 - g[m] / 2 + N, Z = Pi(W, D, V), G = !c.arrow && Er(o) != null && D !== Z && s.reference[m] / 2 - (D < W ? M : L) - g[m] / 2 < 0, oe = G ? D < W ? D - W : D - V : 0;
13078
13075
  return {
13079
13076
  [p]: h[p] + oe,
13080
13077
  data: {
@@ -13111,11 +13108,11 @@ const Ry = (e) => ({
13111
13108
  } = Rn(e, t);
13112
13109
  if ((n = s.arrow) != null && n.alignmentOffset)
13113
13110
  return {};
13114
- const w = In(o), v = gn(a), k = In(a) === a, R = await (c.isRTL == null ? void 0 : c.isRTL(l.floating)), C = h || (k || !g ? [as(a)] : wy(a)), y = m !== "none";
13111
+ const b = In(o), v = gn(a), k = In(a) === a, R = await (c.isRTL == null ? void 0 : c.isRTL(l.floating)), C = h || (k || !g ? [as(a)] : wy(a)), y = m !== "none";
13115
13112
  !h && y && C.push(...Cy(a, g, m, R));
13116
13113
  const T = [a, ...C], N = await Xr(t, x), A = [];
13117
13114
  let M = ((r = s.flip) == null ? void 0 : r.overflows) || [];
13118
- if (u && A.push(N[w]), f) {
13115
+ if (u && A.push(N[b]), f) {
13119
13116
  const D = by(o, i, R);
13120
13117
  A.push(N[D[0]], N[D[1]]);
13121
13118
  }
@@ -13286,11 +13283,11 @@ const Ny = function(e) {
13286
13283
  limiter: a = {
13287
13284
  fn: (x) => {
13288
13285
  let {
13289
- x: w,
13286
+ x: b,
13290
13287
  y: v
13291
13288
  } = x;
13292
13289
  return {
13293
- x: w,
13290
+ x: b,
13294
13291
  y: v
13295
13292
  };
13296
13293
  }
@@ -13302,11 +13299,11 @@ const Ny = function(e) {
13302
13299
  }, u = await Xr(t, c), f = gn(In(o)), h = ba(f);
13303
13300
  let p = l[h], m = l[f];
13304
13301
  if (s) {
13305
- const x = h === "y" ? "top" : "left", w = h === "y" ? "bottom" : "right", v = p + u[x], k = p - u[w];
13302
+ const x = h === "y" ? "top" : "left", b = h === "y" ? "bottom" : "right", v = p + u[x], k = p - u[b];
13306
13303
  p = Pi(v, p, k);
13307
13304
  }
13308
13305
  if (i) {
13309
- const x = f === "y" ? "top" : "left", w = f === "y" ? "bottom" : "right", v = m + u[x], k = m - u[w];
13306
+ const x = f === "y" ? "top" : "left", b = f === "y" ? "bottom" : "right", v = m + u[x], k = m - u[b];
13310
13307
  m = Pi(v, m, k);
13311
13308
  }
13312
13309
  const g = a.fn({
@@ -13359,8 +13356,8 @@ const Ny = function(e) {
13359
13356
  p < R ? p = R : p > C && (p = C);
13360
13357
  }
13361
13358
  if (l) {
13362
- var w, v;
13363
- const k = h === "y" ? "width" : "height", R = of.has(In(o)), C = s.reference[f] - s.floating[k] + (R && ((w = i.offset) == null ? void 0 : w[f]) || 0) + (R ? 0 : x.crossAxis), y = s.reference[f] + s.reference[k] + (R ? 0 : ((v = i.offset) == null ? void 0 : v[f]) || 0) - (R ? x.crossAxis : 0);
13359
+ var b, v;
13360
+ const k = h === "y" ? "width" : "height", R = of.has(In(o)), C = s.reference[f] - s.floating[k] + (R && ((b = i.offset) == null ? void 0 : b[f]) || 0) + (R ? 0 : x.crossAxis), y = s.reference[f] + s.reference[k] + (R ? 0 : ((v = i.offset) == null ? void 0 : v[f]) || 0) - (R ? x.crossAxis : 0);
13364
13361
  m < C ? m = C : m > y && (m = y);
13365
13362
  }
13366
13363
  return {
@@ -13388,9 +13385,9 @@ const Ny = function(e) {
13388
13385
  width: m,
13389
13386
  height: g
13390
13387
  } = s.floating;
13391
- let x, w;
13392
- f === "top" || f === "bottom" ? (x = f, w = h === (await (i.isRTL == null ? void 0 : i.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (w = f, x = h === "end" ? "top" : "bottom");
13393
- const v = g - u.top - u.bottom, k = m - u.left - u.right, R = On(g - u[x], v), C = On(m - u[w], k), y = !t.middlewareData.shift;
13388
+ let x, b;
13389
+ f === "top" || f === "bottom" ? (x = f, b = h === (await (i.isRTL == null ? void 0 : i.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (b = f, x = h === "end" ? "top" : "bottom");
13390
+ const v = g - u.top - u.bottom, k = m - u.left - u.right, R = On(g - u[x], v), C = On(m - u[b], k), y = !t.middlewareData.shift;
13394
13391
  let T = R, N = C;
13395
13392
  if ((n = t.middlewareData.shift) != null && n.enabled.x && (N = k), (r = t.middlewareData.shift) != null && r.enabled.y && (T = v), y && !h) {
13396
13393
  const M = Vt(u.left, 0), L = Vt(u.right, 0), W = Vt(u.top, 0), V = Vt(u.bottom, 0);
@@ -13574,7 +13571,7 @@ function Qn(e, t, n, r) {
13574
13571
  const h = Yt(s), p = r && an(r) ? Yt(r) : r;
13575
13572
  let m = h, g = Mi(m);
13576
13573
  for (; g && r && p !== m; ) {
13577
- const x = xr(g), w = g.getBoundingClientRect(), v = ln(g), k = w.left + (g.clientLeft + parseFloat(v.paddingLeft)) * x.x, R = w.top + (g.clientTop + parseFloat(v.paddingTop)) * x.y;
13574
+ const x = xr(g), b = g.getBoundingClientRect(), v = ln(g), k = b.left + (g.clientLeft + parseFloat(v.paddingLeft)) * x.x, R = b.top + (g.clientTop + parseFloat(v.paddingTop)) * x.y;
13578
13575
  c *= x.x, l *= x.y, u *= x.x, f *= x.y, c += k, l += R, m = Yt(g), g = Mi(m);
13579
13576
  }
13580
13577
  }
@@ -13832,8 +13829,8 @@ function o0(e, t) {
13832
13829
  } = l;
13833
13830
  if (a || t(), !h || !p)
13834
13831
  return;
13835
- const m = Ro(f), g = Ro(o.clientWidth - (u + h)), x = Ro(o.clientHeight - (f + p)), w = Ro(u), k = {
13836
- rootMargin: -m + "px " + -g + "px " + -x + "px " + -w + "px",
13832
+ const m = Ro(f), g = Ro(o.clientWidth - (u + h)), x = Ro(o.clientHeight - (f + p)), b = Ro(u), k = {
13833
+ rootMargin: -m + "px " + -g + "px " + -x + "px " + -b + "px",
13837
13834
  threshold: Vt(0, On(1, c)) || 1
13838
13835
  };
13839
13836
  let R = !0;
@@ -13870,15 +13867,15 @@ function s0(e, t, n, r) {
13870
13867
  layoutShift: a = typeof IntersectionObserver == "function",
13871
13868
  animationFrame: c = !1
13872
13869
  } = r, l = Ca(e), u = o || s ? [...l ? Jr(l) : [], ...Jr(t)] : [];
13873
- u.forEach((w) => {
13874
- o && w.addEventListener("scroll", n, {
13870
+ u.forEach((b) => {
13871
+ o && b.addEventListener("scroll", n, {
13875
13872
  passive: !0
13876
- }), s && w.addEventListener("resize", n);
13873
+ }), s && b.addEventListener("resize", n);
13877
13874
  });
13878
13875
  const f = l && a ? o0(l, n) : null;
13879
13876
  let h = -1, p = null;
13880
- i && (p = new ResizeObserver((w) => {
13881
- let [v] = w;
13877
+ i && (p = new ResizeObserver((b) => {
13878
+ let [v] = b;
13882
13879
  v && v.target === l && p && (p.unobserve(t), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
13883
13880
  var k;
13884
13881
  (k = p) == null || k.observe(t);
@@ -13887,14 +13884,14 @@ function s0(e, t, n, r) {
13887
13884
  let m, g = c ? Qn(e) : null;
13888
13885
  c && x();
13889
13886
  function x() {
13890
- const w = Qn(e);
13891
- g && !hf(g, w) && n(), g = w, m = requestAnimationFrame(x);
13887
+ const b = Qn(e);
13888
+ g && !hf(g, b) && n(), g = b, m = requestAnimationFrame(x);
13892
13889
  }
13893
13890
  return n(), () => {
13894
- var w;
13891
+ var b;
13895
13892
  u.forEach((v) => {
13896
13893
  o && v.removeEventListener("scroll", n), s && v.removeEventListener("resize", n);
13897
- }), f == null || f(), (w = p) == null || w.disconnect(), p = null, c && cancelAnimationFrame(m);
13894
+ }), f == null || f(), (b = p) == null || b.disconnect(), p = null, c && cancelAnimationFrame(m);
13898
13895
  };
13899
13896
  }
13900
13897
  const i0 = Ny, a0 = _y, l0 = Iy, c0 = Py, u0 = Ey, hc = Ry, d0 = jy, f0 = (e, t, n) => {
@@ -13950,7 +13947,7 @@ function pc(e, t) {
13950
13947
  return Math.round(t * n) / n;
13951
13948
  }
13952
13949
  function ui(e) {
13953
- const t = b.useRef(e);
13950
+ const t = w.useRef(e);
13954
13951
  return Ko(() => {
13955
13952
  t.current = e;
13956
13953
  }), t;
@@ -13969,20 +13966,20 @@ function m0(e) {
13969
13966
  transform: a = !0,
13970
13967
  whileElementsMounted: c,
13971
13968
  open: l
13972
- } = e, [u, f] = b.useState({
13969
+ } = e, [u, f] = w.useState({
13973
13970
  x: 0,
13974
13971
  y: 0,
13975
13972
  strategy: n,
13976
13973
  placement: t,
13977
13974
  middlewareData: {},
13978
13975
  isPositioned: !1
13979
- }), [h, p] = b.useState(r);
13976
+ }), [h, p] = w.useState(r);
13980
13977
  cs(h, r) || p(r);
13981
- const [m, g] = b.useState(null), [x, w] = b.useState(null), v = b.useCallback((U) => {
13978
+ const [m, g] = w.useState(null), [x, b] = w.useState(null), v = w.useCallback((U) => {
13982
13979
  U !== y.current && (y.current = U, g(U));
13983
- }, []), k = b.useCallback((U) => {
13984
- U !== T.current && (T.current = U, w(U));
13985
- }, []), R = s || m, C = i || x, y = b.useRef(null), T = b.useRef(null), N = b.useRef(u), A = c != null, M = ui(c), L = ui(o), W = ui(l), V = b.useCallback(() => {
13980
+ }, []), k = w.useCallback((U) => {
13981
+ U !== T.current && (T.current = U, b(U));
13982
+ }, []), R = s || m, C = i || x, y = w.useRef(null), T = w.useRef(null), N = w.useRef(u), A = c != null, M = ui(c), L = ui(o), W = ui(l), V = w.useCallback(() => {
13986
13983
  if (!y.current || !T.current)
13987
13984
  return;
13988
13985
  const U = {
@@ -14010,7 +14007,7 @@ function m0(e) {
14010
14007
  isPositioned: !1
14011
14008
  })));
14012
14009
  }, [l]);
14013
- const D = b.useRef(!1);
14010
+ const D = w.useRef(!1);
14014
14011
  Ko(() => (D.current = !0, () => {
14015
14012
  D.current = !1;
14016
14013
  }), []), Ko(() => {
@@ -14020,15 +14017,15 @@ function m0(e) {
14020
14017
  V();
14021
14018
  }
14022
14019
  }, [R, C, V, M, A]);
14023
- const Z = b.useMemo(() => ({
14020
+ const Z = w.useMemo(() => ({
14024
14021
  reference: y,
14025
14022
  floating: T,
14026
14023
  setReference: v,
14027
14024
  setFloating: k
14028
- }), [v, k]), G = b.useMemo(() => ({
14025
+ }), [v, k]), G = w.useMemo(() => ({
14029
14026
  reference: R,
14030
14027
  floating: C
14031
- }), [R, C]), oe = b.useMemo(() => {
14028
+ }), [R, C]), oe = w.useMemo(() => {
14032
14029
  const U = {
14033
14030
  position: n,
14034
14031
  left: 0,
@@ -14049,7 +14046,7 @@ function m0(e) {
14049
14046
  top: Y
14050
14047
  };
14051
14048
  }, [n, a, G.floating, u.x, u.y]);
14052
- return b.useMemo(() => ({
14049
+ return w.useMemo(() => ({
14053
14050
  ...u,
14054
14051
  update: V,
14055
14052
  refs: Z,
@@ -14100,7 +14097,7 @@ const g0 = (e) => {
14100
14097
  ...g0(e),
14101
14098
  options: [e, t]
14102
14099
  });
14103
- var k0 = "Arrow", mf = b.forwardRef((e, t) => {
14100
+ var k0 = "Arrow", mf = w.forwardRef((e, t) => {
14104
14101
  const { children: n, width: r = 10, height: o = 5, ...s } = e;
14105
14102
  return /* @__PURE__ */ d.jsx(
14106
14103
  Oe.svg,
@@ -14118,7 +14115,7 @@ var k0 = "Arrow", mf = b.forwardRef((e, t) => {
14118
14115
  mf.displayName = k0;
14119
14116
  var T0 = mf;
14120
14117
  function R0(e) {
14121
- const [t, n] = b.useState(void 0);
14118
+ const [t, n] = w.useState(void 0);
14122
14119
  return bn(() => {
14123
14120
  if (e) {
14124
14121
  n({ width: e.offsetWidth, height: e.offsetHeight });
@@ -14140,21 +14137,21 @@ function R0(e) {
14140
14137
  }, [e]), t;
14141
14138
  }
14142
14139
  var ka = "Popper", [gf, xf] = zn(ka), [I0, bf] = gf(ka), wf = (e) => {
14143
- const { __scopePopper: t, children: n } = e, [r, o] = b.useState(null);
14140
+ const { __scopePopper: t, children: n } = e, [r, o] = w.useState(null);
14144
14141
  return /* @__PURE__ */ d.jsx(I0, { scope: t, anchor: r, onAnchorChange: o, children: n });
14145
14142
  };
14146
14143
  wf.displayName = ka;
14147
- var vf = "PopperAnchor", yf = b.forwardRef(
14144
+ var vf = "PopperAnchor", yf = w.forwardRef(
14148
14145
  (e, t) => {
14149
- const { __scopePopper: n, virtualRef: r, ...o } = e, s = bf(vf, n), i = b.useRef(null), a = st(t, i), c = b.useRef(null);
14150
- return b.useEffect(() => {
14146
+ const { __scopePopper: n, virtualRef: r, ...o } = e, s = bf(vf, n), i = w.useRef(null), a = st(t, i), c = w.useRef(null);
14147
+ return w.useEffect(() => {
14151
14148
  const l = c.current;
14152
14149
  c.current = (r == null ? void 0 : r.current) || i.current, l !== c.current && s.onAnchorChange(c.current);
14153
14150
  }), r ? null : /* @__PURE__ */ d.jsx(Oe.div, { ...o, ref: a });
14154
14151
  }
14155
14152
  );
14156
14153
  yf.displayName = vf;
14157
- var Ta = "PopperContent", [E0, A0] = gf(Ta), Sf = b.forwardRef(
14154
+ var Ta = "PopperContent", [E0, A0] = gf(Ta), Sf = w.forwardRef(
14158
14155
  (e, t) => {
14159
14156
  var F, _, q, se, fe, pe;
14160
14157
  const {
@@ -14172,7 +14169,7 @@ var Ta = "PopperContent", [E0, A0] = gf(Ta), Sf = b.forwardRef(
14172
14169
  updatePositionStrategy: p = "optimized",
14173
14170
  onPlaced: m,
14174
14171
  ...g
14175
- } = e, x = bf(Ta, n), [w, v] = b.useState(null), k = st(t, (ce) => v(ce)), [R, C] = b.useState(null), y = R0(R), T = (y == null ? void 0 : y.width) ?? 0, N = (y == null ? void 0 : y.height) ?? 0, A = r + (s !== "center" ? "-" + s : ""), M = typeof u == "number" ? u : { top: 0, right: 0, bottom: 0, left: 0, ...u }, L = Array.isArray(l) ? l : [l], W = L.length > 0, V = {
14172
+ } = e, x = bf(Ta, n), [b, v] = w.useState(null), k = st(t, (ce) => v(ce)), [R, C] = w.useState(null), y = R0(R), T = (y == null ? void 0 : y.width) ?? 0, N = (y == null ? void 0 : y.height) ?? 0, A = r + (s !== "center" ? "-" + s : ""), M = typeof u == "number" ? u : { top: 0, right: 0, bottom: 0, left: 0, ...u }, L = Array.isArray(l) ? l : [l], W = L.length > 0, V = {
14176
14173
  padding: M,
14177
14174
  boundary: L.filter(_0),
14178
14175
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
@@ -14211,10 +14208,10 @@ var Ta = "PopperContent", [E0, A0] = gf(Ta), Sf = b.forwardRef(
14211
14208
  bn(() => {
14212
14209
  oe && (H == null || H());
14213
14210
  }, [oe, H]);
14214
- const I = (F = U.arrow) == null ? void 0 : F.x, E = (_ = U.arrow) == null ? void 0 : _.y, P = ((q = U.arrow) == null ? void 0 : q.centerOffset) !== 0, [O, K] = b.useState();
14211
+ const I = (F = U.arrow) == null ? void 0 : F.x, E = (_ = U.arrow) == null ? void 0 : _.y, P = ((q = U.arrow) == null ? void 0 : q.centerOffset) !== 0, [O, K] = w.useState();
14215
14212
  return bn(() => {
14216
- w && K(window.getComputedStyle(w).zIndex);
14217
- }, [w]), /* @__PURE__ */ d.jsx(
14213
+ b && K(window.getComputedStyle(b).zIndex);
14214
+ }, [b]), /* @__PURE__ */ d.jsx(
14218
14215
  "div",
14219
14216
  {
14220
14217
  ref: D.setFloating,
@@ -14274,7 +14271,7 @@ var Cf = "PopperArrow", N0 = {
14274
14271
  right: "left",
14275
14272
  bottom: "top",
14276
14273
  left: "right"
14277
- }, kf = b.forwardRef(function(t, n) {
14274
+ }, kf = w.forwardRef(function(t, n) {
14278
14275
  const { __scopePopper: r, ...o } = t, s = A0(Cf, r), i = N0[s.placedSide];
14279
14276
  return (
14280
14277
  // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
@@ -14327,8 +14324,8 @@ var j0 = (e) => ({
14327
14324
  name: "transformOrigin",
14328
14325
  options: e,
14329
14326
  fn(t) {
14330
- var x, w, v;
14331
- const { placement: n, rects: r, middlewareData: o } = t, i = ((x = o.arrow) == null ? void 0 : x.centerOffset) !== 0, a = i ? 0 : e.arrowWidth, c = i ? 0 : e.arrowHeight, [l, u] = Tf(n), f = { start: "0%", center: "50%", end: "100%" }[u], h = (((w = o.arrow) == null ? void 0 : w.x) ?? 0) + a / 2, p = (((v = o.arrow) == null ? void 0 : v.y) ?? 0) + c / 2;
14327
+ var x, b, v;
14328
+ const { placement: n, rects: r, middlewareData: o } = t, i = ((x = o.arrow) == null ? void 0 : x.centerOffset) !== 0, a = i ? 0 : e.arrowWidth, c = i ? 0 : e.arrowHeight, [l, u] = Tf(n), f = { start: "0%", center: "50%", end: "100%" }[u], h = (((b = o.arrow) == null ? void 0 : b.x) ?? 0) + a / 2, p = (((v = o.arrow) == null ? void 0 : v.y) ?? 0) + c / 2;
14332
14329
  let m = "", g = "";
14333
14330
  return l === "bottom" ? (m = i ? f : `${h}px`, g = `${-c}px`) : l === "top" ? (m = i ? f : `${h}px`, g = `${r.floating.height + c}px`) : l === "right" ? (m = `${-c}px`, g = i ? f : `${p}px`) : l === "left" && (m = `${r.floating.width + c}px`, g = i ? f : `${p}px`), { data: { x: m, y: g } };
14334
14331
  }
@@ -14340,11 +14337,11 @@ function Tf(e) {
14340
14337
  var P0 = wf, O0 = yf, M0 = Sf, D0 = kf, di = "rovingFocusGroup.onEntryFocus", L0 = { bubbles: !1, cancelable: !0 }, ho = "RovingFocusGroup", [Di, Rf, $0] = nf(ho), [F0, If] = zn(
14341
14338
  ho,
14342
14339
  [$0]
14343
- ), [z0, B0] = F0(ho), Ef = b.forwardRef(
14340
+ ), [z0, B0] = F0(ho), Ef = w.forwardRef(
14344
14341
  (e, t) => /* @__PURE__ */ d.jsx(Di.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ d.jsx(Di.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ d.jsx(H0, { ...e, ref: t }) }) })
14345
14342
  );
14346
14343
  Ef.displayName = ho;
14347
- var H0 = b.forwardRef((e, t) => {
14344
+ var H0 = w.forwardRef((e, t) => {
14348
14345
  const {
14349
14346
  __scopeRovingFocusGroup: n,
14350
14347
  orientation: r,
@@ -14356,13 +14353,13 @@ var H0 = b.forwardRef((e, t) => {
14356
14353
  onEntryFocus: l,
14357
14354
  preventScrollOnEntryFocus: u = !1,
14358
14355
  ...f
14359
- } = e, h = b.useRef(null), p = st(t, h), m = xa(s), [g, x] = Is({
14356
+ } = e, h = w.useRef(null), p = st(t, h), m = xa(s), [g, x] = Is({
14360
14357
  prop: i,
14361
14358
  defaultProp: a ?? null,
14362
14359
  onChange: c,
14363
14360
  caller: ho
14364
- }), [w, v] = b.useState(!1), k = Et(l), R = Rf(n), C = b.useRef(!1), [y, T] = b.useState(0);
14365
- return b.useEffect(() => {
14361
+ }), [b, v] = w.useState(!1), k = Et(l), R = Rf(n), C = w.useRef(!1), [y, T] = w.useState(0);
14362
+ return w.useEffect(() => {
14366
14363
  const N = h.current;
14367
14364
  if (N)
14368
14365
  return N.addEventListener(di, k), () => N.removeEventListener(di, k);
@@ -14374,23 +14371,23 @@ var H0 = b.forwardRef((e, t) => {
14374
14371
  dir: m,
14375
14372
  loop: o,
14376
14373
  currentTabStopId: g,
14377
- onItemFocus: b.useCallback(
14374
+ onItemFocus: w.useCallback(
14378
14375
  (N) => x(N),
14379
14376
  [x]
14380
14377
  ),
14381
- onItemShiftTab: b.useCallback(() => v(!0), []),
14382
- onFocusableItemAdd: b.useCallback(
14378
+ onItemShiftTab: w.useCallback(() => v(!0), []),
14379
+ onFocusableItemAdd: w.useCallback(
14383
14380
  () => T((N) => N + 1),
14384
14381
  []
14385
14382
  ),
14386
- onFocusableItemRemove: b.useCallback(
14383
+ onFocusableItemRemove: w.useCallback(
14387
14384
  () => T((N) => N - 1),
14388
14385
  []
14389
14386
  ),
14390
14387
  children: /* @__PURE__ */ d.jsx(
14391
14388
  Oe.div,
14392
14389
  {
14393
- tabIndex: w || y === 0 ? -1 : 0,
14390
+ tabIndex: b || y === 0 ? -1 : 0,
14394
14391
  "data-orientation": r,
14395
14392
  ...f,
14396
14393
  ref: p,
@@ -14400,7 +14397,7 @@ var H0 = b.forwardRef((e, t) => {
14400
14397
  }),
14401
14398
  onFocus: Ce(e.onFocus, (N) => {
14402
14399
  const A = !C.current;
14403
- if (N.target === N.currentTarget && A && !w) {
14400
+ if (N.target === N.currentTarget && A && !b) {
14404
14401
  const M = new CustomEvent(di, L0);
14405
14402
  if (N.currentTarget.dispatchEvent(M), !M.defaultPrevented) {
14406
14403
  const L = R().filter((G) => G.focusable), W = L.find((G) => G.active), V = L.find((G) => G.id === g), Z = [W, V, ...L].filter(
@@ -14416,7 +14413,7 @@ var H0 = b.forwardRef((e, t) => {
14416
14413
  )
14417
14414
  }
14418
14415
  );
14419
- }), Af = "RovingFocusGroupItem", Nf = b.forwardRef(
14416
+ }), Af = "RovingFocusGroupItem", Nf = w.forwardRef(
14420
14417
  (e, t) => {
14421
14418
  const {
14422
14419
  __scopeRovingFocusGroup: n,
@@ -14426,7 +14423,7 @@ var H0 = b.forwardRef((e, t) => {
14426
14423
  children: i,
14427
14424
  ...a
14428
14425
  } = e, c = Gt(), l = s || c, u = B0(Af, n), f = u.currentTabStopId === l, h = Rf(n), { onFocusableItemAdd: p, onFocusableItemRemove: m, currentTabStopId: g } = u;
14429
- return b.useEffect(() => {
14426
+ return w.useEffect(() => {
14430
14427
  if (r)
14431
14428
  return p(), () => m();
14432
14429
  }, [r, p, m]), /* @__PURE__ */ d.jsx(
@@ -14453,14 +14450,14 @@ var H0 = b.forwardRef((e, t) => {
14453
14450
  return;
14454
14451
  }
14455
14452
  if (x.target !== x.currentTarget) return;
14456
- const w = V0(x, u.orientation, u.dir);
14457
- if (w !== void 0) {
14453
+ const b = V0(x, u.orientation, u.dir);
14454
+ if (b !== void 0) {
14458
14455
  if (x.metaKey || x.ctrlKey || x.altKey || x.shiftKey) return;
14459
14456
  x.preventDefault();
14460
14457
  let k = h().filter((R) => R.focusable).map((R) => R.ref.current);
14461
- if (w === "last") k.reverse();
14462
- else if (w === "prev" || w === "next") {
14463
- w === "prev" && k.reverse();
14458
+ if (b === "last") k.reverse();
14459
+ else if (b === "prev" || b === "next") {
14460
+ b === "prev" && k.reverse();
14464
14461
  const R = k.indexOf(x.currentTarget);
14465
14462
  k = u.loop ? K0(k, R + 1) : k.slice(R + 1);
14466
14463
  }
@@ -14512,8 +14509,8 @@ var q0 = Ef, G0 = Nf, Li = ["Enter", " "], Y0 = ["ArrowDown", "PageUp", "Home"],
14512
14509
  xf,
14513
14510
  If
14514
14511
  ]), Os = xf(), Of = If(), [tS, sr] = or(po), [nS, mo] = or(po), Mf = (e) => {
14515
- const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, a = Os(t), [c, l] = b.useState(null), u = b.useRef(!1), f = Et(s), h = xa(o);
14516
- return b.useEffect(() => {
14512
+ const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, a = Os(t), [c, l] = w.useState(null), u = w.useRef(!1), f = Et(s), h = xa(o);
14513
+ return w.useEffect(() => {
14517
14514
  const p = () => {
14518
14515
  u.current = !0, document.addEventListener("pointerdown", m, { capture: !0, once: !0 }), document.addEventListener("pointermove", m, { capture: !0, once: !0 });
14519
14516
  }, m = () => u.current = !1;
@@ -14532,7 +14529,7 @@ var q0 = Ef, G0 = Nf, Li = ["Enter", " "], Y0 = ["ArrowDown", "PageUp", "Home"],
14532
14529
  nS,
14533
14530
  {
14534
14531
  scope: t,
14535
- onClose: b.useCallback(() => f(!1), [f]),
14532
+ onClose: w.useCallback(() => f(!1), [f]),
14536
14533
  isUsingKeyboardRef: u,
14537
14534
  dir: h,
14538
14535
  modal: i,
@@ -14543,7 +14540,7 @@ var q0 = Ef, G0 = Nf, Li = ["Enter", " "], Y0 = ["ArrowDown", "PageUp", "Home"],
14543
14540
  ) });
14544
14541
  };
14545
14542
  Mf.displayName = po;
14546
- var rS = "MenuAnchor", Ra = b.forwardRef(
14543
+ var rS = "MenuAnchor", Ra = w.forwardRef(
14547
14544
  (e, t) => {
14548
14545
  const { __scopeMenu: n, ...r } = e, o = Os(n);
14549
14546
  return /* @__PURE__ */ d.jsx(O0, { ...o, ...r, ref: t });
@@ -14557,15 +14554,15 @@ var Ia = "MenuPortal", [oS, Df] = or(Ia, {
14557
14554
  return /* @__PURE__ */ d.jsx(oS, { scope: t, forceMount: n, children: /* @__PURE__ */ d.jsx(Xt, { present: n || s.open, children: /* @__PURE__ */ d.jsx(aa, { asChild: !0, container: o, children: r }) }) });
14558
14555
  };
14559
14556
  Lf.displayName = Ia;
14560
- var en = "MenuContent", [sS, Ea] = or(en), $f = b.forwardRef(
14557
+ var en = "MenuContent", [sS, Ea] = or(en), $f = w.forwardRef(
14561
14558
  (e, t) => {
14562
14559
  const n = Df(en, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = sr(en, e.__scopeMenu), i = mo(en, e.__scopeMenu);
14563
14560
  return /* @__PURE__ */ d.jsx(Zr.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ d.jsx(Xt, { present: r || s.open, children: /* @__PURE__ */ d.jsx(Zr.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ d.jsx(iS, { ...o, ref: t }) : /* @__PURE__ */ d.jsx(aS, { ...o, ref: t }) }) }) });
14564
14561
  }
14565
- ), iS = b.forwardRef(
14562
+ ), iS = w.forwardRef(
14566
14563
  (e, t) => {
14567
- const n = sr(en, e.__scopeMenu), r = b.useRef(null), o = st(t, r);
14568
- return b.useEffect(() => {
14564
+ const n = sr(en, e.__scopeMenu), r = w.useRef(null), o = st(t, r);
14565
+ return w.useEffect(() => {
14569
14566
  const s = r.current;
14570
14567
  if (s) return md(s);
14571
14568
  }, []), /* @__PURE__ */ d.jsx(
@@ -14585,7 +14582,7 @@ var en = "MenuContent", [sS, Ea] = or(en), $f = b.forwardRef(
14585
14582
  }
14586
14583
  );
14587
14584
  }
14588
- ), aS = b.forwardRef((e, t) => {
14585
+ ), aS = w.forwardRef((e, t) => {
14589
14586
  const n = sr(en, e.__scopeMenu);
14590
14587
  return /* @__PURE__ */ d.jsx(
14591
14588
  Aa,
@@ -14598,7 +14595,7 @@ var en = "MenuContent", [sS, Ea] = or(en), $f = b.forwardRef(
14598
14595
  onDismiss: () => n.onOpenChange(!1)
14599
14596
  }
14600
14597
  );
14601
- }), lS = Ur("MenuContent.ScrollLock"), Aa = b.forwardRef(
14598
+ }), lS = Ur("MenuContent.ScrollLock"), Aa = w.forwardRef(
14602
14599
  (e, t) => {
14603
14600
  const {
14604
14601
  __scopeMenu: n,
@@ -14615,15 +14612,15 @@ var en = "MenuContent", [sS, Ea] = or(en), $f = b.forwardRef(
14615
14612
  onDismiss: p,
14616
14613
  disableOutsideScroll: m,
14617
14614
  ...g
14618
- } = e, x = sr(en, n), w = mo(en, n), v = Os(n), k = Of(n), R = Q0(n), [C, y] = b.useState(null), T = b.useRef(null), N = st(t, T, x.onContentChange), A = b.useRef(0), M = b.useRef(""), L = b.useRef(0), W = b.useRef(null), V = b.useRef("right"), D = b.useRef(0), Z = m ? la : b.Fragment, G = m ? { as: lS, allowPinchZoom: !0 } : void 0, oe = ($) => {
14615
+ } = e, x = sr(en, n), b = mo(en, n), v = Os(n), k = Of(n), R = Q0(n), [C, y] = w.useState(null), T = w.useRef(null), N = st(t, T, x.onContentChange), A = w.useRef(0), M = w.useRef(""), L = w.useRef(0), W = w.useRef(null), V = w.useRef("right"), D = w.useRef(0), Z = m ? la : w.Fragment, G = m ? { as: lS, allowPinchZoom: !0 } : void 0, oe = ($) => {
14619
14616
  var F, _;
14620
14617
  const Y = M.current + $, H = R().filter((q) => !q.disabled), I = document.activeElement, E = (F = H.find((q) => q.ref.current === I)) == null ? void 0 : F.textValue, P = H.map((q) => q.textValue), O = vS(P, Y, E), K = (_ = H.find((q) => q.textValue === O)) == null ? void 0 : _.ref.current;
14621
14618
  (function q(se) {
14622
14619
  M.current = se, window.clearTimeout(A.current), se !== "" && (A.current = window.setTimeout(() => q(""), 1e3));
14623
14620
  })(Y), K && setTimeout(() => K.focus());
14624
14621
  };
14625
- b.useEffect(() => () => window.clearTimeout(A.current), []), id();
14626
- const U = b.useCallback(($) => {
14622
+ w.useEffect(() => () => window.clearTimeout(A.current), []), id();
14623
+ const U = w.useCallback(($) => {
14627
14624
  var H, I;
14628
14625
  return V.current === ((H = W.current) == null ? void 0 : H.side) && SS($, (I = W.current) == null ? void 0 : I.area);
14629
14626
  }, []);
@@ -14632,27 +14629,27 @@ var en = "MenuContent", [sS, Ea] = or(en), $f = b.forwardRef(
14632
14629
  {
14633
14630
  scope: n,
14634
14631
  searchRef: M,
14635
- onItemEnter: b.useCallback(
14632
+ onItemEnter: w.useCallback(
14636
14633
  ($) => {
14637
14634
  U($) && $.preventDefault();
14638
14635
  },
14639
14636
  [U]
14640
14637
  ),
14641
- onItemLeave: b.useCallback(
14638
+ onItemLeave: w.useCallback(
14642
14639
  ($) => {
14643
14640
  var Y;
14644
14641
  U($) || ((Y = T.current) == null || Y.focus(), y(null));
14645
14642
  },
14646
14643
  [U]
14647
14644
  ),
14648
- onTriggerLeave: b.useCallback(
14645
+ onTriggerLeave: w.useCallback(
14649
14646
  ($) => {
14650
14647
  U($) && $.preventDefault();
14651
14648
  },
14652
14649
  [U]
14653
14650
  ),
14654
14651
  pointerGraceTimerRef: L,
14655
- onPointerGraceIntentChange: b.useCallback(($) => {
14652
+ onPointerGraceIntentChange: w.useCallback(($) => {
14656
14653
  W.current = $;
14657
14654
  }, []),
14658
14655
  children: /* @__PURE__ */ d.jsx(Z, { ...G, children: /* @__PURE__ */ d.jsx(
@@ -14680,13 +14677,13 @@ var en = "MenuContent", [sS, Ea] = or(en), $f = b.forwardRef(
14680
14677
  {
14681
14678
  asChild: !0,
14682
14679
  ...k,
14683
- dir: w.dir,
14680
+ dir: b.dir,
14684
14681
  orientation: "vertical",
14685
14682
  loop: r,
14686
14683
  currentTabStopId: C,
14687
14684
  onCurrentTabStopIdChange: y,
14688
14685
  onEntryFocus: Ce(c, ($) => {
14689
- w.isUsingKeyboardRef.current || $.preventDefault();
14686
+ b.isUsingKeyboardRef.current || $.preventDefault();
14690
14687
  }),
14691
14688
  preventScrollOnEntryFocus: !0,
14692
14689
  children: /* @__PURE__ */ d.jsx(
@@ -14696,7 +14693,7 @@ var en = "MenuContent", [sS, Ea] = or(en), $f = b.forwardRef(
14696
14693
  "aria-orientation": "vertical",
14697
14694
  "data-state": eh(x.open),
14698
14695
  "data-radix-menu-content": "",
14699
- dir: w.dir,
14696
+ dir: b.dir,
14700
14697
  ...v,
14701
14698
  ...g,
14702
14699
  ref: N,
@@ -14736,23 +14733,23 @@ var en = "MenuContent", [sS, Ea] = or(en), $f = b.forwardRef(
14736
14733
  }
14737
14734
  );
14738
14735
  $f.displayName = en;
14739
- var cS = "MenuGroup", Na = b.forwardRef(
14736
+ var cS = "MenuGroup", Na = w.forwardRef(
14740
14737
  (e, t) => {
14741
14738
  const { __scopeMenu: n, ...r } = e;
14742
14739
  return /* @__PURE__ */ d.jsx(Oe.div, { role: "group", ...r, ref: t });
14743
14740
  }
14744
14741
  );
14745
14742
  Na.displayName = cS;
14746
- var uS = "MenuLabel", Ff = b.forwardRef(
14743
+ var uS = "MenuLabel", Ff = w.forwardRef(
14747
14744
  (e, t) => {
14748
14745
  const { __scopeMenu: n, ...r } = e;
14749
14746
  return /* @__PURE__ */ d.jsx(Oe.div, { ...r, ref: t });
14750
14747
  }
14751
14748
  );
14752
14749
  Ff.displayName = uS;
14753
- var us = "MenuItem", mc = "menu.itemSelect", Ms = b.forwardRef(
14750
+ var us = "MenuItem", mc = "menu.itemSelect", Ms = w.forwardRef(
14754
14751
  (e, t) => {
14755
- const { disabled: n = !1, onSelect: r, ...o } = e, s = b.useRef(null), i = mo(us, e.__scopeMenu), a = Ea(us, e.__scopeMenu), c = st(t, s), l = b.useRef(!1), u = () => {
14752
+ const { disabled: n = !1, onSelect: r, ...o } = e, s = w.useRef(null), i = mo(us, e.__scopeMenu), a = Ea(us, e.__scopeMenu), c = st(t, s), l = w.useRef(!1), u = () => {
14756
14753
  const f = s.current;
14757
14754
  if (!n && f) {
14758
14755
  const h = new CustomEvent(mc, { bubbles: !0, cancelable: !0 });
@@ -14783,10 +14780,10 @@ var us = "MenuItem", mc = "menu.itemSelect", Ms = b.forwardRef(
14783
14780
  }
14784
14781
  );
14785
14782
  Ms.displayName = us;
14786
- var zf = b.forwardRef(
14783
+ var zf = w.forwardRef(
14787
14784
  (e, t) => {
14788
- const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, i = Ea(us, n), a = Of(n), c = b.useRef(null), l = st(t, c), [u, f] = b.useState(!1), [h, p] = b.useState("");
14789
- return b.useEffect(() => {
14785
+ const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, i = Ea(us, n), a = Of(n), c = w.useRef(null), l = st(t, c), [u, f] = w.useState(!1), [h, p] = w.useState("");
14786
+ return w.useEffect(() => {
14790
14787
  const m = c.current;
14791
14788
  m && p((m.textContent ?? "").trim());
14792
14789
  }, [s.children]), /* @__PURE__ */ d.jsx(
@@ -14821,7 +14818,7 @@ var zf = b.forwardRef(
14821
14818
  }
14822
14819
  );
14823
14820
  }
14824
- ), dS = "MenuCheckboxItem", Bf = b.forwardRef(
14821
+ ), dS = "MenuCheckboxItem", Bf = w.forwardRef(
14825
14822
  (e, t) => {
14826
14823
  const { checked: n = !1, onCheckedChange: r, ...o } = e;
14827
14824
  return /* @__PURE__ */ d.jsx(Kf, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ d.jsx(
@@ -14846,14 +14843,14 @@ var Hf = "MenuRadioGroup", [fS, hS] = or(
14846
14843
  Hf,
14847
14844
  { value: void 0, onValueChange: () => {
14848
14845
  } }
14849
- ), Uf = b.forwardRef(
14846
+ ), Uf = w.forwardRef(
14850
14847
  (e, t) => {
14851
14848
  const { value: n, onValueChange: r, ...o } = e, s = Et(r);
14852
14849
  return /* @__PURE__ */ d.jsx(fS, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ d.jsx(Na, { ...o, ref: t }) });
14853
14850
  }
14854
14851
  );
14855
14852
  Uf.displayName = Hf;
14856
- var Wf = "MenuRadioItem", Vf = b.forwardRef(
14853
+ var Wf = "MenuRadioItem", Vf = w.forwardRef(
14857
14854
  (e, t) => {
14858
14855
  const { value: n, ...r } = e, o = hS(Wf, e.__scopeMenu), s = n === o.value;
14859
14856
  return /* @__PURE__ */ d.jsx(Kf, { scope: e.__scopeMenu, checked: s, children: /* @__PURE__ */ d.jsx(
@@ -14880,7 +14877,7 @@ Vf.displayName = Wf;
14880
14877
  var _a = "MenuItemIndicator", [Kf, pS] = or(
14881
14878
  _a,
14882
14879
  { checked: !1 }
14883
- ), qf = b.forwardRef(
14880
+ ), qf = w.forwardRef(
14884
14881
  (e, t) => {
14885
14882
  const { __scopeMenu: n, forceMount: r, ...o } = e, s = pS(_a, n);
14886
14883
  return /* @__PURE__ */ d.jsx(
@@ -14900,7 +14897,7 @@ var _a = "MenuItemIndicator", [Kf, pS] = or(
14900
14897
  }
14901
14898
  );
14902
14899
  qf.displayName = _a;
14903
- var mS = "MenuSeparator", Gf = b.forwardRef(
14900
+ var mS = "MenuSeparator", Gf = w.forwardRef(
14904
14901
  (e, t) => {
14905
14902
  const { __scopeMenu: n, ...r } = e;
14906
14903
  return /* @__PURE__ */ d.jsx(
@@ -14915,19 +14912,19 @@ var mS = "MenuSeparator", Gf = b.forwardRef(
14915
14912
  }
14916
14913
  );
14917
14914
  Gf.displayName = mS;
14918
- var gS = "MenuArrow", Yf = b.forwardRef(
14915
+ var gS = "MenuArrow", Yf = w.forwardRef(
14919
14916
  (e, t) => {
14920
14917
  const { __scopeMenu: n, ...r } = e, o = Os(n);
14921
14918
  return /* @__PURE__ */ d.jsx(D0, { ...o, ...r, ref: t });
14922
14919
  }
14923
14920
  );
14924
14921
  Yf.displayName = gS;
14925
- var xS = "MenuSub", [Bk, Xf] = or(xS), Lr = "MenuSubTrigger", Jf = b.forwardRef(
14922
+ var xS = "MenuSub", [Bk, Xf] = or(xS), Lr = "MenuSubTrigger", Jf = w.forwardRef(
14926
14923
  (e, t) => {
14927
- const n = sr(Lr, e.__scopeMenu), r = mo(Lr, e.__scopeMenu), o = Xf(Lr, e.__scopeMenu), s = Ea(Lr, e.__scopeMenu), i = b.useRef(null), { pointerGraceTimerRef: a, onPointerGraceIntentChange: c } = s, l = { __scopeMenu: e.__scopeMenu }, u = b.useCallback(() => {
14924
+ const n = sr(Lr, e.__scopeMenu), r = mo(Lr, e.__scopeMenu), o = Xf(Lr, e.__scopeMenu), s = Ea(Lr, e.__scopeMenu), i = w.useRef(null), { pointerGraceTimerRef: a, onPointerGraceIntentChange: c } = s, l = { __scopeMenu: e.__scopeMenu }, u = w.useCallback(() => {
14928
14925
  i.current && window.clearTimeout(i.current), i.current = null;
14929
14926
  }, []);
14930
- return b.useEffect(() => u, [u]), b.useEffect(() => {
14927
+ return w.useEffect(() => u, [u]), w.useEffect(() => {
14931
14928
  const f = a.current;
14932
14929
  return () => {
14933
14930
  window.clearTimeout(f), c(null);
@@ -14961,12 +14958,12 @@ var xS = "MenuSub", [Bk, Xf] = or(xS), Lr = "MenuSubTrigger", Jf = b.forwardRef(
14961
14958
  u();
14962
14959
  const h = (p = n.content) == null ? void 0 : p.getBoundingClientRect();
14963
14960
  if (h) {
14964
- const g = (m = n.content) == null ? void 0 : m.dataset.side, x = g === "right", w = x ? -5 : 5, v = h[x ? "left" : "right"], k = h[x ? "right" : "left"];
14961
+ const g = (m = n.content) == null ? void 0 : m.dataset.side, x = g === "right", b = x ? -5 : 5, v = h[x ? "left" : "right"], k = h[x ? "right" : "left"];
14965
14962
  s.onPointerGraceIntentChange({
14966
14963
  area: [
14967
14964
  // Apply a bleed on clientX to ensure that our exit point is
14968
14965
  // consistently within polygon bounds
14969
- { x: f.clientX + w, y: f.clientY },
14966
+ { x: f.clientX + b, y: f.clientY },
14970
14967
  { x: v, y: h.top },
14971
14968
  { x: k, y: h.top },
14972
14969
  { x: k, y: h.bottom },
@@ -14993,9 +14990,9 @@ var xS = "MenuSub", [Bk, Xf] = or(xS), Lr = "MenuSubTrigger", Jf = b.forwardRef(
14993
14990
  }
14994
14991
  );
14995
14992
  Jf.displayName = Lr;
14996
- var Zf = "MenuSubContent", Qf = b.forwardRef(
14993
+ var Zf = "MenuSubContent", Qf = w.forwardRef(
14997
14994
  (e, t) => {
14998
- const n = Df(en, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = sr(en, e.__scopeMenu), i = mo(en, e.__scopeMenu), a = Xf(Zf, e.__scopeMenu), c = b.useRef(null), l = st(t, c);
14995
+ const n = Df(en, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = sr(en, e.__scopeMenu), i = mo(en, e.__scopeMenu), a = Xf(Zf, e.__scopeMenu), c = w.useRef(null), l = st(t, c);
14999
14996
  return /* @__PURE__ */ d.jsx(Zr.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ d.jsx(Xt, { present: r || s.open, children: /* @__PURE__ */ d.jsx(Zr.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ d.jsx(
15000
14997
  Aa,
15001
14998
  {
@@ -15084,7 +15081,7 @@ var CS = Mf, kS = Ra, TS = Lf, RS = $f, IS = Na, ES = Ff, AS = Ms, NS = Bf, _S =
15084
15081
  defaultOpen: s,
15085
15082
  onOpenChange: i,
15086
15083
  modal: a = !0
15087
- } = e, c = jt(t), l = b.useRef(null), [u, f] = Is({
15084
+ } = e, c = jt(t), l = w.useRef(null), [u, f] = Is({
15088
15085
  prop: o,
15089
15086
  defaultProp: s ?? !1,
15090
15087
  onChange: i,
@@ -15099,14 +15096,14 @@ var CS = Mf, kS = Ra, TS = Lf, RS = $f, IS = Na, ES = Ff, AS = Ms, NS = Bf, _S =
15099
15096
  contentId: Gt(),
15100
15097
  open: u,
15101
15098
  onOpenChange: f,
15102
- onOpenToggle: b.useCallback(() => f((h) => !h), [f]),
15099
+ onOpenToggle: w.useCallback(() => f((h) => !h), [f]),
15103
15100
  modal: a,
15104
15101
  children: /* @__PURE__ */ d.jsx(CS, { ...c, open: u, onOpenChange: f, dir: r, modal: a, children: n })
15105
15102
  }
15106
15103
  );
15107
15104
  };
15108
15105
  nh.displayName = Ds;
15109
- var rh = "DropdownMenuTrigger", oh = b.forwardRef(
15106
+ var rh = "DropdownMenuTrigger", oh = w.forwardRef(
15110
15107
  (e, t) => {
15111
15108
  const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = th(rh, n), i = jt(n);
15112
15109
  return /* @__PURE__ */ d.jsx(kS, { asChild: !0, ...i, children: /* @__PURE__ */ d.jsx(
@@ -15138,9 +15135,9 @@ var zS = "DropdownMenuPortal", sh = (e) => {
15138
15135
  return /* @__PURE__ */ d.jsx(TS, { ...r, ...n });
15139
15136
  };
15140
15137
  sh.displayName = zS;
15141
- var ih = "DropdownMenuContent", ah = b.forwardRef(
15138
+ var ih = "DropdownMenuContent", ah = w.forwardRef(
15142
15139
  (e, t) => {
15143
- const { __scopeDropdownMenu: n, ...r } = e, o = th(ih, n), s = jt(n), i = b.useRef(!1);
15140
+ const { __scopeDropdownMenu: n, ...r } = e, o = th(ih, n), s = jt(n), i = w.useRef(!1);
15144
15141
  return /* @__PURE__ */ d.jsx(
15145
15142
  RS,
15146
15143
  {
@@ -15170,65 +15167,65 @@ var ih = "DropdownMenuContent", ah = b.forwardRef(
15170
15167
  }
15171
15168
  );
15172
15169
  ah.displayName = ih;
15173
- var BS = "DropdownMenuGroup", HS = b.forwardRef(
15170
+ var BS = "DropdownMenuGroup", HS = w.forwardRef(
15174
15171
  (e, t) => {
15175
15172
  const { __scopeDropdownMenu: n, ...r } = e, o = jt(n);
15176
15173
  return /* @__PURE__ */ d.jsx(IS, { ...o, ...r, ref: t });
15177
15174
  }
15178
15175
  );
15179
15176
  HS.displayName = BS;
15180
- var US = "DropdownMenuLabel", lh = b.forwardRef(
15177
+ var US = "DropdownMenuLabel", lh = w.forwardRef(
15181
15178
  (e, t) => {
15182
15179
  const { __scopeDropdownMenu: n, ...r } = e, o = jt(n);
15183
15180
  return /* @__PURE__ */ d.jsx(ES, { ...o, ...r, ref: t });
15184
15181
  }
15185
15182
  );
15186
15183
  lh.displayName = US;
15187
- var WS = "DropdownMenuItem", ch = b.forwardRef(
15184
+ var WS = "DropdownMenuItem", ch = w.forwardRef(
15188
15185
  (e, t) => {
15189
15186
  const { __scopeDropdownMenu: n, ...r } = e, o = jt(n);
15190
15187
  return /* @__PURE__ */ d.jsx(AS, { ...o, ...r, ref: t });
15191
15188
  }
15192
15189
  );
15193
15190
  ch.displayName = WS;
15194
- var VS = "DropdownMenuCheckboxItem", uh = b.forwardRef((e, t) => {
15191
+ var VS = "DropdownMenuCheckboxItem", uh = w.forwardRef((e, t) => {
15195
15192
  const { __scopeDropdownMenu: n, ...r } = e, o = jt(n);
15196
15193
  return /* @__PURE__ */ d.jsx(NS, { ...o, ...r, ref: t });
15197
15194
  });
15198
15195
  uh.displayName = VS;
15199
- var KS = "DropdownMenuRadioGroup", qS = b.forwardRef((e, t) => {
15196
+ var KS = "DropdownMenuRadioGroup", qS = w.forwardRef((e, t) => {
15200
15197
  const { __scopeDropdownMenu: n, ...r } = e, o = jt(n);
15201
15198
  return /* @__PURE__ */ d.jsx(_S, { ...o, ...r, ref: t });
15202
15199
  });
15203
15200
  qS.displayName = KS;
15204
- var GS = "DropdownMenuRadioItem", dh = b.forwardRef((e, t) => {
15201
+ var GS = "DropdownMenuRadioItem", dh = w.forwardRef((e, t) => {
15205
15202
  const { __scopeDropdownMenu: n, ...r } = e, o = jt(n);
15206
15203
  return /* @__PURE__ */ d.jsx(jS, { ...o, ...r, ref: t });
15207
15204
  });
15208
15205
  dh.displayName = GS;
15209
- var YS = "DropdownMenuItemIndicator", fh = b.forwardRef((e, t) => {
15206
+ var YS = "DropdownMenuItemIndicator", fh = w.forwardRef((e, t) => {
15210
15207
  const { __scopeDropdownMenu: n, ...r } = e, o = jt(n);
15211
15208
  return /* @__PURE__ */ d.jsx(PS, { ...o, ...r, ref: t });
15212
15209
  });
15213
15210
  fh.displayName = YS;
15214
- var XS = "DropdownMenuSeparator", hh = b.forwardRef((e, t) => {
15211
+ var XS = "DropdownMenuSeparator", hh = w.forwardRef((e, t) => {
15215
15212
  const { __scopeDropdownMenu: n, ...r } = e, o = jt(n);
15216
15213
  return /* @__PURE__ */ d.jsx(OS, { ...o, ...r, ref: t });
15217
15214
  });
15218
15215
  hh.displayName = XS;
15219
- var JS = "DropdownMenuArrow", ZS = b.forwardRef(
15216
+ var JS = "DropdownMenuArrow", ZS = w.forwardRef(
15220
15217
  (e, t) => {
15221
15218
  const { __scopeDropdownMenu: n, ...r } = e, o = jt(n);
15222
15219
  return /* @__PURE__ */ d.jsx(MS, { ...o, ...r, ref: t });
15223
15220
  }
15224
15221
  );
15225
15222
  ZS.displayName = JS;
15226
- var QS = "DropdownMenuSubTrigger", ph = b.forwardRef((e, t) => {
15223
+ var QS = "DropdownMenuSubTrigger", ph = w.forwardRef((e, t) => {
15227
15224
  const { __scopeDropdownMenu: n, ...r } = e, o = jt(n);
15228
15225
  return /* @__PURE__ */ d.jsx(DS, { ...o, ...r, ref: t });
15229
15226
  });
15230
15227
  ph.displayName = QS;
15231
- var eC = "DropdownMenuSubContent", mh = b.forwardRef((e, t) => {
15228
+ var eC = "DropdownMenuSubContent", mh = w.forwardRef((e, t) => {
15232
15229
  const { __scopeDropdownMenu: n, ...r } = e, o = jt(n);
15233
15230
  return /* @__PURE__ */ d.jsx(
15234
15231
  LS,
@@ -15249,7 +15246,7 @@ var eC = "DropdownMenuSubContent", mh = b.forwardRef((e, t) => {
15249
15246
  });
15250
15247
  mh.displayName = eC;
15251
15248
  var tC = nh, nC = oh, rC = sh, gh = ah, xh = lh, bh = ch, wh = uh, vh = dh, yh = fh, Sh = hh, Ch = ph, kh = mh;
15252
- const Pa = tC, Oa = nC, oC = b.forwardRef(({ className: e, inset: t, children: n, ...r }, o) => /* @__PURE__ */ d.jsxs(
15249
+ const Pa = tC, Oa = nC, oC = w.forwardRef(({ className: e, inset: t, children: n, ...r }, o) => /* @__PURE__ */ d.jsxs(
15253
15250
  Ch,
15254
15251
  {
15255
15252
  ref: o,
@@ -15266,7 +15263,7 @@ const Pa = tC, Oa = nC, oC = b.forwardRef(({ className: e, inset: t, children: n
15266
15263
  }
15267
15264
  ));
15268
15265
  oC.displayName = Ch.displayName;
15269
- const sC = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
15266
+ const sC = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
15270
15267
  kh,
15271
15268
  {
15272
15269
  ref: n,
@@ -15278,7 +15275,7 @@ const sC = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
15278
15275
  }
15279
15276
  ));
15280
15277
  sC.displayName = kh.displayName;
15281
- const Ls = b.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ d.jsx(rC, { children: /* @__PURE__ */ d.jsx(
15278
+ const Ls = w.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ d.jsx(rC, { children: /* @__PURE__ */ d.jsx(
15282
15279
  gh,
15283
15280
  {
15284
15281
  ref: r,
@@ -15291,7 +15288,7 @@ const Ls = b.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__
15291
15288
  }
15292
15289
  ) }));
15293
15290
  Ls.displayName = gh.displayName;
15294
- const Gn = b.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ d.jsx(
15291
+ const Gn = w.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ d.jsx(
15295
15292
  bh,
15296
15293
  {
15297
15294
  ref: r,
@@ -15304,7 +15301,7 @@ const Gn = b.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
15304
15301
  }
15305
15302
  ));
15306
15303
  Gn.displayName = bh.displayName;
15307
- const iC = b.forwardRef(({ className: e, children: t, checked: n, ...r }, o) => /* @__PURE__ */ d.jsxs(
15304
+ const iC = w.forwardRef(({ className: e, children: t, checked: n, ...r }, o) => /* @__PURE__ */ d.jsxs(
15308
15305
  wh,
15309
15306
  {
15310
15307
  ref: o,
@@ -15321,7 +15318,7 @@ const iC = b.forwardRef(({ className: e, children: t, checked: n, ...r }, o) =>
15321
15318
  }
15322
15319
  ));
15323
15320
  iC.displayName = wh.displayName;
15324
- const aC = b.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ d.jsxs(
15321
+ const aC = w.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ d.jsxs(
15325
15322
  vh,
15326
15323
  {
15327
15324
  ref: r,
@@ -15337,7 +15334,7 @@ const aC = b.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
15337
15334
  }
15338
15335
  ));
15339
15336
  aC.displayName = vh.displayName;
15340
- const lC = b.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ d.jsx(
15337
+ const lC = w.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ d.jsx(
15341
15338
  xh,
15342
15339
  {
15343
15340
  ref: r,
@@ -15350,7 +15347,7 @@ const lC = b.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
15350
15347
  }
15351
15348
  ));
15352
15349
  lC.displayName = xh.displayName;
15353
- const cC = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
15350
+ const cC = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
15354
15351
  Sh,
15355
15352
  {
15356
15353
  ref: n,
@@ -15359,7 +15356,7 @@ const cC = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
15359
15356
  }
15360
15357
  ));
15361
15358
  cC.displayName = Sh.displayName;
15362
- const Th = b.forwardRef(
15359
+ const Th = w.forwardRef(
15363
15360
  ({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
15364
15361
  "textarea",
15365
15362
  {
@@ -15393,13 +15390,13 @@ function dC({
15393
15390
  validate: g,
15394
15391
  onValidationError: x
15395
15392
  }) {
15396
- const w = i !== void 0, [v, k] = ee.useState(e), R = (w ? i : v) ?? "", [C, y] = ee.useTransition(), T = ee.useRef(null), N = ee.useRef(0), A = ee.useRef(null), M = ee.useRef("");
15393
+ const b = i !== void 0, [v, k] = ee.useState(e), R = (b ? i : v) ?? "", [C, y] = ee.useTransition(), T = ee.useRef(null), N = ee.useRef(0), A = ee.useRef(null), M = ee.useRef("");
15397
15394
  ee.useEffect(() => {
15398
- if (!w && (k(e ?? ""), A.current = null, T.current)) {
15395
+ if (!b && (k(e ?? ""), A.current = null, T.current)) {
15399
15396
  const P = !e || e.trim() === "", O = 44;
15400
15397
  P ? T.current.style.height = `${O}px` : (T.current.style.height = "auto", T.current.style.height = `${Math.max(T.current.scrollHeight, O)}px`);
15401
15398
  }
15402
- }, [e, t, w]);
15399
+ }, [e, t, b]);
15403
15400
  const [L, W] = ee.useState(null), V = ee.useCallback(
15404
15401
  (P) => P.length > s ? `Message too long (${P.length}/${s} characters)` : null,
15405
15402
  [s]
@@ -15431,9 +15428,9 @@ function dC({
15431
15428
  }, [R, L, Z]);
15432
15429
  const oe = ee.useCallback(
15433
15430
  (P, { fromUser: O }) => {
15434
- w || k(P), O && (a == null || a(P));
15431
+ b || k(P), O && (a == null || a(P));
15435
15432
  },
15436
- [w, a]
15433
+ [b, a]
15437
15434
  ), U = ee.useCallback(
15438
15435
  async (P) => {
15439
15436
  P && P.preventDefault();
@@ -15450,17 +15447,17 @@ function dC({
15450
15447
  const se = c(O);
15451
15448
  se && typeof se.then == "function" ? se.then(() => {
15452
15449
  var fe, pe;
15453
- ((fe = A.current) == null ? void 0 : fe.id) === K && A.current.shouldClear && (w || (k(""), T.current && (T.current.style.height = "auto"), a == null || a(""))), ((pe = A.current) == null ? void 0 : pe.id) === K && (A.current = null);
15450
+ ((fe = A.current) == null ? void 0 : fe.id) === K && A.current.shouldClear && (b || (k(""), T.current && (T.current.style.height = "auto"), a == null || a(""))), ((pe = A.current) == null ? void 0 : pe.id) === K && (A.current = null);
15454
15451
  }).catch(() => {
15455
15452
  var fe;
15456
15453
  ((fe = A.current) == null ? void 0 : fe.id) === K && (A.current = null);
15457
- }) : (((F = A.current) == null ? void 0 : F.id) === K && A.current.shouldClear && (w || (k(""), T.current && (T.current.style.height = "auto"), a == null || a(""))), ((_ = A.current) == null ? void 0 : _.id) === K && (A.current = null));
15454
+ }) : (((F = A.current) == null ? void 0 : F.id) === K && A.current.shouldClear && (b || (k(""), T.current && (T.current.style.height = "auto"), a == null || a(""))), ((_ = A.current) == null ? void 0 : _.id) === K && (A.current = null));
15458
15455
  } catch {
15459
15456
  ((q = A.current) == null ? void 0 : q.id) === K && (A.current = null);
15460
15457
  }
15461
15458
  });
15462
15459
  },
15463
- [R, c, p, w, a, Z]
15460
+ [R, c, p, b, a, Z]
15464
15461
  ), $ = ee.useCallback((P) => {
15465
15462
  const O = P.target.value;
15466
15463
  oe(O, { fromUser: !0 }), A.current && (A.current.shouldClear = !1), T.current && (T.current.style.height = "auto", T.current.style.height = `${T.current.scrollHeight}px`), L && Z(O.trim());
@@ -15537,7 +15534,7 @@ function hC({
15537
15534
  onExcelUpload: m,
15538
15535
  onFilesChange: g,
15539
15536
  onError: x,
15540
- allowEmptySend: w = !1,
15537
+ allowEmptySend: b = !1,
15541
15538
  inputError: v = null
15542
15539
  }) {
15543
15540
  const [k, R] = ue([]), C = Se(null), y = Se(null), [T, N] = ue(0), [A, M] = ue(0), [L, W] = ue(!1), [V, D] = ue(null), [Z, G] = ue(null), oe = te(() => {
@@ -15574,7 +15571,7 @@ function hC({
15574
15571
  }
15575
15572
  },
15576
15573
  [m, x, oe]
15577
- ), I = De(() => w || k.length > 0, [w, k]), E = te(
15574
+ ), I = De(() => b || k.length > 0, [b, k]), E = te(
15578
15575
  async (O) => {
15579
15576
  const F = await n(O, k);
15580
15577
  return k.length > 0 && (R([]), g == null || g([]), oe()), F;
@@ -15725,7 +15722,7 @@ function qo({
15725
15722
  messageCustomStyles: m,
15726
15723
  onMessageSent: g,
15727
15724
  onExcelUploadSuccess: x,
15728
- onError: w,
15725
+ onError: b,
15729
15726
  renderArtifactsInline: v = !0,
15730
15727
  emptyMessage: k
15731
15728
  }) {
@@ -15815,8 +15812,8 @@ function qo({
15815
15812
  }
15816
15813
  yt.current === null && (yt.current = Ct.current), Xe(Qe ?? "");
15817
15814
  }, [Qe, Ue, Xe]), Pe(() => {
15818
- oe && !lt && (w == null || w(oe));
15819
- }, [oe, lt, w]);
15815
+ oe && !lt && (b == null || b(oe));
15816
+ }, [oe, lt, b]);
15820
15817
  const ft = async (J, S) => {
15821
15818
  const j = J.trim();
15822
15819
  if (!(!j && S.length === 0))
@@ -15837,7 +15834,7 @@ function qo({
15837
15834
  ), g == null || g(j), pe(!0), Xe(""), Ve(null), Le(null), it(""), mt(null);
15838
15835
  } catch (z) {
15839
15836
  const re = (z == null ? void 0 : z.message) || "Failed to send message";
15840
- Ve(re), w == null || w(re), pe(!1);
15837
+ Ve(re), b == null || b(re), pe(!1);
15841
15838
  }
15842
15839
  }, kt = te(
15843
15840
  async (J) => {
@@ -16037,7 +16034,7 @@ function qo({
16037
16034
  enableFileUpload: s,
16038
16035
  enableExcelUpload: i,
16039
16036
  onExcelUpload: kt,
16040
- onError: w,
16037
+ onError: b,
16041
16038
  customStyles: p,
16042
16039
  textareaClassName: p.textarea || "",
16043
16040
  allowEmptySend: !1,
@@ -16061,11 +16058,11 @@ function bc(e) {
16061
16058
  function CC(e, t, n) {
16062
16059
  return e = n && n.length > 0 ? `${e + " " + n.join(" ")}` : e, $i(e, t, bc(e), bc(t), 0, 0, {});
16063
16060
  }
16064
- var Mr = '[cmdk-group=""]', pi = '[cmdk-group-items=""]', kC = '[cmdk-group-heading=""]', Ih = '[cmdk-item=""]', wc = `${Ih}:not([aria-disabled="true"])`, Fi = "cmdk-item-select", ur = "data-value", TC = (e, t, n) => CC(e, t, n), Eh = b.createContext(void 0), go = () => b.useContext(Eh), Ah = b.createContext(void 0), Ma = () => b.useContext(Ah), Nh = b.createContext(void 0), _h = b.forwardRef((e, t) => {
16061
+ var Mr = '[cmdk-group=""]', pi = '[cmdk-group-items=""]', kC = '[cmdk-group-heading=""]', Ih = '[cmdk-item=""]', wc = `${Ih}:not([aria-disabled="true"])`, Fi = "cmdk-item-select", ur = "data-value", TC = (e, t, n) => CC(e, t, n), Eh = w.createContext(void 0), go = () => w.useContext(Eh), Ah = w.createContext(void 0), Ma = () => w.useContext(Ah), Nh = w.createContext(void 0), _h = w.forwardRef((e, t) => {
16065
16062
  let n = dr(() => {
16066
16063
  var I, E;
16067
16064
  return { search: "", value: (E = (I = e.value) != null ? I : e.defaultValue) != null ? E : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
16068
- }), r = dr(() => /* @__PURE__ */ new Set()), o = dr(() => /* @__PURE__ */ new Map()), s = dr(() => /* @__PURE__ */ new Map()), i = dr(() => /* @__PURE__ */ new Set()), a = jh(e), { label: c, children: l, value: u, onValueChange: f, filter: h, shouldFilter: p, loop: m, disablePointerSelection: g = !1, vimBindings: x = !0, ...w } = e, v = Gt(), k = Gt(), R = Gt(), C = b.useRef(null), y = DC();
16065
+ }), r = dr(() => /* @__PURE__ */ new Set()), o = dr(() => /* @__PURE__ */ new Map()), s = dr(() => /* @__PURE__ */ new Map()), i = dr(() => /* @__PURE__ */ new Set()), a = jh(e), { label: c, children: l, value: u, onValueChange: f, filter: h, shouldFilter: p, loop: m, disablePointerSelection: g = !1, vimBindings: x = !0, ...b } = e, v = Gt(), k = Gt(), R = Gt(), C = w.useRef(null), y = DC();
16069
16066
  er(() => {
16070
16067
  if (u !== void 0) {
16071
16068
  let I = u.trim();
@@ -16074,7 +16071,7 @@ var Mr = '[cmdk-group=""]', pi = '[cmdk-group-items=""]', kC = '[cmdk-group-head
16074
16071
  }, [u]), er(() => {
16075
16072
  y(6, V);
16076
16073
  }, []);
16077
- let T = b.useMemo(() => ({ subscribe: (I) => (i.current.add(I), () => i.current.delete(I)), snapshot: () => n.current, setState: (I, E, P) => {
16074
+ let T = w.useMemo(() => ({ subscribe: (I) => (i.current.add(I), () => i.current.delete(I)), snapshot: () => n.current, setState: (I, E, P) => {
16078
16075
  var O, K, F, _;
16079
16076
  if (!Object.is(n.current[I], E)) {
16080
16077
  if (n.current[I] = E, I === "search") W(), M(), y(1, L);
@@ -16096,7 +16093,7 @@ var Mr = '[cmdk-group=""]', pi = '[cmdk-group-items=""]', kC = '[cmdk-group-head
16096
16093
  }
16097
16094
  }, emit: () => {
16098
16095
  i.current.forEach((I) => I());
16099
- } }), []), N = b.useMemo(() => ({ value: (I, E, P) => {
16096
+ } }), []), N = w.useMemo(() => ({ value: (I, E, P) => {
16100
16097
  var O;
16101
16098
  E !== ((O = s.current.get(I)) == null ? void 0 : O.value) && (s.current.set(I, { value: E, keywords: P }), n.current.filtered.items.set(I, A(E, P)), y(2, () => {
16102
16099
  M(), T.emit();
@@ -16195,9 +16192,9 @@ var Mr = '[cmdk-group=""]', pi = '[cmdk-group-items=""]', kC = '[cmdk-group-head
16195
16192
  }, H = (I) => {
16196
16193
  I.preventDefault(), I.metaKey ? G(0) : I.altKey ? U(-1) : oe(-1);
16197
16194
  };
16198
- return b.createElement(Oe.div, { ref: t, tabIndex: -1, ...w, "cmdk-root": "", onKeyDown: (I) => {
16195
+ return w.createElement(Oe.div, { ref: t, tabIndex: -1, ...b, "cmdk-root": "", onKeyDown: (I) => {
16199
16196
  var E;
16200
- (E = w.onKeyDown) == null || E.call(w, I);
16197
+ (E = b.onKeyDown) == null || E.call(b, I);
16201
16198
  let P = I.nativeEvent.isComposing || I.keyCode === 229;
16202
16199
  if (!(I.defaultPrevented || P)) switch (I.key) {
16203
16200
  case "n":
@@ -16235,15 +16232,15 @@ var Mr = '[cmdk-group=""]', pi = '[cmdk-group-items=""]', kC = '[cmdk-group-head
16235
16232
  }
16236
16233
  }
16237
16234
  }
16238
- } }, b.createElement("label", { "cmdk-label": "", htmlFor: N.inputId, id: N.labelId, style: $C }, c), $s(e, (I) => b.createElement(Ah.Provider, { value: T }, b.createElement(Eh.Provider, { value: N }, I))));
16239
- }), RC = b.forwardRef((e, t) => {
16235
+ } }, w.createElement("label", { "cmdk-label": "", htmlFor: N.inputId, id: N.labelId, style: $C }, c), $s(e, (I) => w.createElement(Ah.Provider, { value: T }, w.createElement(Eh.Provider, { value: N }, I))));
16236
+ }), RC = w.forwardRef((e, t) => {
16240
16237
  var n, r;
16241
- let o = Gt(), s = b.useRef(null), i = b.useContext(Nh), a = go(), c = jh(e), l = (r = (n = c.current) == null ? void 0 : n.forceMount) != null ? r : i == null ? void 0 : i.forceMount;
16238
+ let o = Gt(), s = w.useRef(null), i = w.useContext(Nh), a = go(), c = jh(e), l = (r = (n = c.current) == null ? void 0 : n.forceMount) != null ? r : i == null ? void 0 : i.forceMount;
16242
16239
  er(() => {
16243
16240
  if (!l) return a.item(o, i == null ? void 0 : i.id);
16244
16241
  }, [l]);
16245
16242
  let u = Ph(o, s, [e.value, e.children, s], e.keywords), f = Ma(), h = Dn((y) => y.value && y.value === u.current), p = Dn((y) => l || a.filter() === !1 ? !0 : y.search ? y.filtered.items.get(o) > 0 : !0);
16246
- b.useEffect(() => {
16243
+ w.useEffect(() => {
16247
16244
  let y = s.current;
16248
16245
  if (!(!y || e.disabled)) return y.addEventListener(Fi, m), () => y.removeEventListener(Fi, m);
16249
16246
  }, [p, e.onSelect, e.disabled]);
@@ -16255,26 +16252,26 @@ var Mr = '[cmdk-group=""]', pi = '[cmdk-group-items=""]', kC = '[cmdk-group-head
16255
16252
  f.setState("value", u.current, !0);
16256
16253
  }
16257
16254
  if (!p) return null;
16258
- let { disabled: x, value: w, onSelect: v, forceMount: k, keywords: R, ...C } = e;
16259
- return b.createElement(Oe.div, { ref: _n(s, t), ...C, id: o, "cmdk-item": "", role: "option", "aria-disabled": !!x, "aria-selected": !!h, "data-disabled": !!x, "data-selected": !!h, onPointerMove: x || a.getDisablePointerSelection() ? void 0 : g, onClick: x ? void 0 : m }, e.children);
16260
- }), IC = b.forwardRef((e, t) => {
16261
- let { heading: n, children: r, forceMount: o, ...s } = e, i = Gt(), a = b.useRef(null), c = b.useRef(null), l = Gt(), u = go(), f = Dn((p) => o || u.filter() === !1 ? !0 : p.search ? p.filtered.groups.has(i) : !0);
16255
+ let { disabled: x, value: b, onSelect: v, forceMount: k, keywords: R, ...C } = e;
16256
+ return w.createElement(Oe.div, { ref: _n(s, t), ...C, id: o, "cmdk-item": "", role: "option", "aria-disabled": !!x, "aria-selected": !!h, "data-disabled": !!x, "data-selected": !!h, onPointerMove: x || a.getDisablePointerSelection() ? void 0 : g, onClick: x ? void 0 : m }, e.children);
16257
+ }), IC = w.forwardRef((e, t) => {
16258
+ let { heading: n, children: r, forceMount: o, ...s } = e, i = Gt(), a = w.useRef(null), c = w.useRef(null), l = Gt(), u = go(), f = Dn((p) => o || u.filter() === !1 ? !0 : p.search ? p.filtered.groups.has(i) : !0);
16262
16259
  er(() => u.group(i), []), Ph(i, a, [e.value, e.heading, c]);
16263
- let h = b.useMemo(() => ({ id: i, forceMount: o }), [o]);
16264
- return b.createElement(Oe.div, { ref: _n(a, t), ...s, "cmdk-group": "", role: "presentation", hidden: f ? void 0 : !0 }, n && b.createElement("div", { ref: c, "cmdk-group-heading": "", "aria-hidden": !0, id: l }, n), $s(e, (p) => b.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? l : void 0 }, b.createElement(Nh.Provider, { value: h }, p))));
16265
- }), EC = b.forwardRef((e, t) => {
16266
- let { alwaysRender: n, ...r } = e, o = b.useRef(null), s = Dn((i) => !i.search);
16267
- return !n && !s ? null : b.createElement(Oe.div, { ref: _n(o, t), ...r, "cmdk-separator": "", role: "separator" });
16268
- }), AC = b.forwardRef((e, t) => {
16260
+ let h = w.useMemo(() => ({ id: i, forceMount: o }), [o]);
16261
+ return w.createElement(Oe.div, { ref: _n(a, t), ...s, "cmdk-group": "", role: "presentation", hidden: f ? void 0 : !0 }, n && w.createElement("div", { ref: c, "cmdk-group-heading": "", "aria-hidden": !0, id: l }, n), $s(e, (p) => w.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? l : void 0 }, w.createElement(Nh.Provider, { value: h }, p))));
16262
+ }), EC = w.forwardRef((e, t) => {
16263
+ let { alwaysRender: n, ...r } = e, o = w.useRef(null), s = Dn((i) => !i.search);
16264
+ return !n && !s ? null : w.createElement(Oe.div, { ref: _n(o, t), ...r, "cmdk-separator": "", role: "separator" });
16265
+ }), AC = w.forwardRef((e, t) => {
16269
16266
  let { onValueChange: n, ...r } = e, o = e.value != null, s = Ma(), i = Dn((l) => l.search), a = Dn((l) => l.selectedItemId), c = go();
16270
- return b.useEffect(() => {
16267
+ return w.useEffect(() => {
16271
16268
  e.value != null && s.setState("search", e.value);
16272
- }, [e.value]), b.createElement(Oe.input, { ref: t, ...r, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: !1, "aria-autocomplete": "list", role: "combobox", "aria-expanded": !0, "aria-controls": c.listId, "aria-labelledby": c.labelId, "aria-activedescendant": a, id: c.inputId, type: "text", value: o ? e.value : i, onChange: (l) => {
16269
+ }, [e.value]), w.createElement(Oe.input, { ref: t, ...r, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: !1, "aria-autocomplete": "list", role: "combobox", "aria-expanded": !0, "aria-controls": c.listId, "aria-labelledby": c.labelId, "aria-activedescendant": a, id: c.inputId, type: "text", value: o ? e.value : i, onChange: (l) => {
16273
16270
  o || s.setState("search", l.target.value), n == null || n(l.target.value);
16274
16271
  } });
16275
- }), NC = b.forwardRef((e, t) => {
16276
- let { children: n, label: r = "Suggestions", ...o } = e, s = b.useRef(null), i = b.useRef(null), a = Dn((l) => l.selectedItemId), c = go();
16277
- return b.useEffect(() => {
16272
+ }), NC = w.forwardRef((e, t) => {
16273
+ let { children: n, label: r = "Suggestions", ...o } = e, s = w.useRef(null), i = w.useRef(null), a = Dn((l) => l.selectedItemId), c = go();
16274
+ return w.useEffect(() => {
16278
16275
  if (i.current && s.current) {
16279
16276
  let l = i.current, u = s.current, f, h = new ResizeObserver(() => {
16280
16277
  f = requestAnimationFrame(() => {
@@ -16286,13 +16283,13 @@ var Mr = '[cmdk-group=""]', pi = '[cmdk-group-items=""]', kC = '[cmdk-group-head
16286
16283
  cancelAnimationFrame(f), h.unobserve(l);
16287
16284
  };
16288
16285
  }
16289
- }, []), b.createElement(Oe.div, { ref: _n(s, t), ...o, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": a, "aria-label": r, id: c.listId }, $s(e, (l) => b.createElement("div", { ref: _n(i, c.listInnerRef), "cmdk-list-sizer": "" }, l)));
16290
- }), _C = b.forwardRef((e, t) => {
16286
+ }, []), w.createElement(Oe.div, { ref: _n(s, t), ...o, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": a, "aria-label": r, id: c.listId }, $s(e, (l) => w.createElement("div", { ref: _n(i, c.listInnerRef), "cmdk-list-sizer": "" }, l)));
16287
+ }), _C = w.forwardRef((e, t) => {
16291
16288
  let { open: n, onOpenChange: r, overlayClassName: o, contentClassName: s, container: i, ...a } = e;
16292
- return b.createElement(_d, { open: n, onOpenChange: r }, b.createElement(jd, { container: i }, b.createElement(fa, { "cmdk-overlay": "", className: o }), b.createElement(ha, { "aria-label": e.label, "cmdk-dialog": "", className: s }, b.createElement(_h, { ref: t, ...a }))));
16293
- }), jC = b.forwardRef((e, t) => Dn((n) => n.filtered.count === 0) ? b.createElement(Oe.div, { ref: t, ...e, "cmdk-empty": "", role: "presentation" }) : null), PC = b.forwardRef((e, t) => {
16289
+ return w.createElement(_d, { open: n, onOpenChange: r }, w.createElement(jd, { container: i }, w.createElement(fa, { "cmdk-overlay": "", className: o }), w.createElement(ha, { "aria-label": e.label, "cmdk-dialog": "", className: s }, w.createElement(_h, { ref: t, ...a }))));
16290
+ }), jC = w.forwardRef((e, t) => Dn((n) => n.filtered.count === 0) ? w.createElement(Oe.div, { ref: t, ...e, "cmdk-empty": "", role: "presentation" }) : null), PC = w.forwardRef((e, t) => {
16294
16291
  let { progress: n, children: r, label: o = "Loading...", ...s } = e;
16295
- return b.createElement(Oe.div, { ref: t, ...s, "cmdk-loading": "", role: "progressbar", "aria-valuenow": n, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": o }, $s(e, (i) => b.createElement("div", { "aria-hidden": !0 }, i)));
16292
+ return w.createElement(Oe.div, { ref: t, ...s, "cmdk-loading": "", role: "progressbar", "aria-valuenow": n, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": o }, $s(e, (i) => w.createElement("div", { "aria-hidden": !0 }, i)));
16296
16293
  }), Ht = Object.assign(_h, { List: NC, Item: RC, Input: AC, Group: IC, Separator: EC, Dialog: _C, Empty: jC, Loading: PC });
16297
16294
  function OC(e, t) {
16298
16295
  let n = e.nextElementSibling;
@@ -16309,22 +16306,22 @@ function MC(e, t) {
16309
16306
  }
16310
16307
  }
16311
16308
  function jh(e) {
16312
- let t = b.useRef(e);
16309
+ let t = w.useRef(e);
16313
16310
  return er(() => {
16314
16311
  t.current = e;
16315
16312
  }), t;
16316
16313
  }
16317
- var er = typeof window > "u" ? b.useEffect : b.useLayoutEffect;
16314
+ var er = typeof window > "u" ? w.useEffect : w.useLayoutEffect;
16318
16315
  function dr(e) {
16319
- let t = b.useRef();
16316
+ let t = w.useRef();
16320
16317
  return t.current === void 0 && (t.current = e()), t;
16321
16318
  }
16322
16319
  function Dn(e) {
16323
16320
  let t = Ma(), n = () => e(t.snapshot());
16324
- return b.useSyncExternalStore(t.subscribe, n, n);
16321
+ return w.useSyncExternalStore(t.subscribe, n, n);
16325
16322
  }
16326
16323
  function Ph(e, t, n, r = []) {
16327
- let o = b.useRef(), s = go();
16324
+ let o = w.useRef(), s = go();
16328
16325
  return er(() => {
16329
16326
  var i;
16330
16327
  let a = (() => {
@@ -16338,7 +16335,7 @@ function Ph(e, t, n, r = []) {
16338
16335
  }), o;
16339
16336
  }
16340
16337
  var DC = () => {
16341
- let [e, t] = b.useState(), n = dr(() => /* @__PURE__ */ new Map());
16338
+ let [e, t] = w.useState(), n = dr(() => /* @__PURE__ */ new Map());
16342
16339
  return er(() => {
16343
16340
  n.current.forEach((r) => r()), n.current = /* @__PURE__ */ new Map();
16344
16341
  }, [e]), (r, o) => {
@@ -16350,10 +16347,10 @@ function LC(e) {
16350
16347
  return typeof t == "function" ? t(e.props) : "render" in t ? t.render(e.props) : e;
16351
16348
  }
16352
16349
  function $s({ asChild: e, children: t }, n) {
16353
- return e && b.isValidElement(t) ? b.cloneElement(LC(t), { ref: t.ref }, n(t.props.children)) : n(t);
16350
+ return e && w.isValidElement(t) ? w.cloneElement(LC(t), { ref: t.ref }, n(t.props.children)) : n(t);
16354
16351
  }
16355
16352
  var $C = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" };
16356
- const Oh = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
16353
+ const Oh = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
16357
16354
  Ht,
16358
16355
  {
16359
16356
  ref: n,
@@ -16365,7 +16362,7 @@ const Oh = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
16365
16362
  }
16366
16363
  ));
16367
16364
  Oh.displayName = Ht.displayName;
16368
- const Mh = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
16365
+ const Mh = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
16369
16366
  /* @__PURE__ */ d.jsx(Ip, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
16370
16367
  /* @__PURE__ */ d.jsx(
16371
16368
  Ht.Input,
@@ -16380,7 +16377,7 @@ const Mh = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsxs("d
16380
16377
  )
16381
16378
  ] }));
16382
16379
  Mh.displayName = Ht.Input.displayName;
16383
- const Dh = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
16380
+ const Dh = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
16384
16381
  Ht.List,
16385
16382
  {
16386
16383
  ref: n,
@@ -16389,7 +16386,7 @@ const Dh = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
16389
16386
  }
16390
16387
  ));
16391
16388
  Dh.displayName = Ht.List.displayName;
16392
- const Lh = b.forwardRef((e, t) => /* @__PURE__ */ d.jsx(
16389
+ const Lh = w.forwardRef((e, t) => /* @__PURE__ */ d.jsx(
16393
16390
  Ht.Empty,
16394
16391
  {
16395
16392
  ref: t,
@@ -16398,7 +16395,7 @@ const Lh = b.forwardRef((e, t) => /* @__PURE__ */ d.jsx(
16398
16395
  }
16399
16396
  ));
16400
16397
  Lh.displayName = Ht.Empty.displayName;
16401
- const $h = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
16398
+ const $h = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
16402
16399
  Ht.Group,
16403
16400
  {
16404
16401
  ref: n,
@@ -16410,7 +16407,7 @@ const $h = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
16410
16407
  }
16411
16408
  ));
16412
16409
  $h.displayName = Ht.Group.displayName;
16413
- const FC = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
16410
+ const FC = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
16414
16411
  Ht.Separator,
16415
16412
  {
16416
16413
  ref: n,
@@ -16419,7 +16416,7 @@ const FC = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
16419
16416
  }
16420
16417
  ));
16421
16418
  FC.displayName = Ht.Separator.displayName;
16422
- const Fh = b.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
16419
+ const Fh = w.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ d.jsx(
16423
16420
  Ht.Item,
16424
16421
  {
16425
16422
  ref: n,
@@ -16435,9 +16432,9 @@ function zC(e, [t, n]) {
16435
16432
  return Math.min(n, Math.max(t, e));
16436
16433
  }
16437
16434
  function BC(e, t) {
16438
- return b.useReducer((n, r) => t[n][r] ?? n, e);
16435
+ return w.useReducer((n, r) => t[n][r] ?? n, e);
16439
16436
  }
16440
- var Da = "ScrollArea", [zh, Uk] = zn(Da), [HC, tn] = zh(Da), Bh = b.forwardRef(
16437
+ var Da = "ScrollArea", [zh, Uk] = zn(Da), [HC, tn] = zh(Da), Bh = w.forwardRef(
16441
16438
  (e, t) => {
16442
16439
  const {
16443
16440
  __scopeScrollArea: n,
@@ -16445,7 +16442,7 @@ var Da = "ScrollArea", [zh, Uk] = zn(Da), [HC, tn] = zh(Da), Bh = b.forwardRef(
16445
16442
  dir: o,
16446
16443
  scrollHideDelay: s = 600,
16447
16444
  ...i
16448
- } = e, [a, c] = b.useState(null), [l, u] = b.useState(null), [f, h] = b.useState(null), [p, m] = b.useState(null), [g, x] = b.useState(null), [w, v] = b.useState(0), [k, R] = b.useState(0), [C, y] = b.useState(!1), [T, N] = b.useState(!1), A = st(t, (L) => c(L)), M = xa(o);
16445
+ } = e, [a, c] = w.useState(null), [l, u] = w.useState(null), [f, h] = w.useState(null), [p, m] = w.useState(null), [g, x] = w.useState(null), [b, v] = w.useState(0), [k, R] = w.useState(0), [C, y] = w.useState(!1), [T, N] = w.useState(!1), A = st(t, (L) => c(L)), M = xa(o);
16449
16446
  return /* @__PURE__ */ d.jsx(
16450
16447
  HC,
16451
16448
  {
@@ -16477,7 +16474,7 @@ var Da = "ScrollArea", [zh, Uk] = zn(Da), [HC, tn] = zh(Da), Bh = b.forwardRef(
16477
16474
  style: {
16478
16475
  position: "relative",
16479
16476
  // Pass corner sizes as CSS vars to reduce re-renders of context consumers
16480
- "--radix-scroll-area-corner-width": w + "px",
16477
+ "--radix-scroll-area-corner-width": b + "px",
16481
16478
  "--radix-scroll-area-corner-height": k + "px",
16482
16479
  ...e.style
16483
16480
  }
@@ -16488,9 +16485,9 @@ var Da = "ScrollArea", [zh, Uk] = zn(Da), [HC, tn] = zh(Da), Bh = b.forwardRef(
16488
16485
  }
16489
16486
  );
16490
16487
  Bh.displayName = Da;
16491
- var Hh = "ScrollAreaViewport", Uh = b.forwardRef(
16488
+ var Hh = "ScrollAreaViewport", Uh = w.forwardRef(
16492
16489
  (e, t) => {
16493
- const { __scopeScrollArea: n, children: r, nonce: o, ...s } = e, i = tn(Hh, n), a = b.useRef(null), c = st(t, a, i.onViewportChange);
16490
+ const { __scopeScrollArea: n, children: r, nonce: o, ...s } = e, i = tn(Hh, n), a = w.useRef(null), c = st(t, a, i.onViewportChange);
16494
16491
  return /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
16495
16492
  /* @__PURE__ */ d.jsx(
16496
16493
  "style",
@@ -16530,18 +16527,18 @@ var Hh = "ScrollAreaViewport", Uh = b.forwardRef(
16530
16527
  }
16531
16528
  );
16532
16529
  Uh.displayName = Hh;
16533
- var Sn = "ScrollAreaScrollbar", La = b.forwardRef(
16530
+ var Sn = "ScrollAreaScrollbar", La = w.forwardRef(
16534
16531
  (e, t) => {
16535
16532
  const { forceMount: n, ...r } = e, o = tn(Sn, e.__scopeScrollArea), { onScrollbarXEnabledChange: s, onScrollbarYEnabledChange: i } = o, a = e.orientation === "horizontal";
16536
- return b.useEffect(() => (a ? s(!0) : i(!0), () => {
16533
+ return w.useEffect(() => (a ? s(!0) : i(!0), () => {
16537
16534
  a ? s(!1) : i(!1);
16538
16535
  }), [a, s, i]), o.type === "hover" ? /* @__PURE__ */ d.jsx(UC, { ...r, ref: t, forceMount: n }) : o.type === "scroll" ? /* @__PURE__ */ d.jsx(WC, { ...r, ref: t, forceMount: n }) : o.type === "auto" ? /* @__PURE__ */ d.jsx(Wh, { ...r, ref: t, forceMount: n }) : o.type === "always" ? /* @__PURE__ */ d.jsx($a, { ...r, ref: t }) : null;
16539
16536
  }
16540
16537
  );
16541
16538
  La.displayName = Sn;
16542
- var UC = b.forwardRef((e, t) => {
16543
- const { forceMount: n, ...r } = e, o = tn(Sn, e.__scopeScrollArea), [s, i] = b.useState(!1);
16544
- return b.useEffect(() => {
16539
+ var UC = w.forwardRef((e, t) => {
16540
+ const { forceMount: n, ...r } = e, o = tn(Sn, e.__scopeScrollArea), [s, i] = w.useState(!1);
16541
+ return w.useEffect(() => {
16545
16542
  const a = o.scrollArea;
16546
16543
  let c = 0;
16547
16544
  if (a) {
@@ -16562,7 +16559,7 @@ var UC = b.forwardRef((e, t) => {
16562
16559
  ref: t
16563
16560
  }
16564
16561
  ) });
16565
- }), WC = b.forwardRef((e, t) => {
16562
+ }), WC = w.forwardRef((e, t) => {
16566
16563
  const { forceMount: n, ...r } = e, o = tn(Sn, e.__scopeScrollArea), s = e.orientation === "horizontal", i = zs(() => c("SCROLL_END"), 100), [a, c] = BC("hidden", {
16567
16564
  hidden: {
16568
16565
  SCROLL: "scrolling"
@@ -16581,12 +16578,12 @@ var UC = b.forwardRef((e, t) => {
16581
16578
  POINTER_ENTER: "interacting"
16582
16579
  }
16583
16580
  });
16584
- return b.useEffect(() => {
16581
+ return w.useEffect(() => {
16585
16582
  if (a === "idle") {
16586
16583
  const l = window.setTimeout(() => c("HIDE"), o.scrollHideDelay);
16587
16584
  return () => window.clearTimeout(l);
16588
16585
  }
16589
- }, [a, o.scrollHideDelay, c]), b.useEffect(() => {
16586
+ }, [a, o.scrollHideDelay, c]), w.useEffect(() => {
16590
16587
  const l = o.viewport, u = s ? "scrollLeft" : "scrollTop";
16591
16588
  if (l) {
16592
16589
  let f = l[u];
@@ -16606,8 +16603,8 @@ var UC = b.forwardRef((e, t) => {
16606
16603
  onPointerLeave: Ce(e.onPointerLeave, () => c("POINTER_LEAVE"))
16607
16604
  }
16608
16605
  ) });
16609
- }), Wh = b.forwardRef((e, t) => {
16610
- const n = tn(Sn, e.__scopeScrollArea), { forceMount: r, ...o } = e, [s, i] = b.useState(!1), a = e.orientation === "horizontal", c = zs(() => {
16606
+ }), Wh = w.forwardRef((e, t) => {
16607
+ const n = tn(Sn, e.__scopeScrollArea), { forceMount: r, ...o } = e, [s, i] = w.useState(!1), a = e.orientation === "horizontal", c = zs(() => {
16611
16608
  if (n.viewport) {
16612
16609
  const l = n.viewport.offsetWidth < n.viewport.scrollWidth, u = n.viewport.offsetHeight < n.viewport.scrollHeight;
16613
16610
  i(a ? l : u);
@@ -16621,8 +16618,8 @@ var UC = b.forwardRef((e, t) => {
16621
16618
  ref: t
16622
16619
  }
16623
16620
  ) });
16624
- }), $a = b.forwardRef((e, t) => {
16625
- const { orientation: n = "vertical", ...r } = e, o = tn(Sn, e.__scopeScrollArea), s = b.useRef(null), i = b.useRef(0), [a, c] = b.useState({
16621
+ }), $a = w.forwardRef((e, t) => {
16622
+ const { orientation: n = "vertical", ...r } = e, o = tn(Sn, e.__scopeScrollArea), s = w.useRef(null), i = w.useRef(0), [a, c] = w.useState({
16626
16623
  content: 0,
16627
16624
  viewport: 0,
16628
16625
  scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
@@ -16675,9 +16672,9 @@ var UC = b.forwardRef((e, t) => {
16675
16672
  }
16676
16673
  }
16677
16674
  ) : null;
16678
- }), VC = b.forwardRef((e, t) => {
16679
- const { sizes: n, onSizesChange: r, ...o } = e, s = tn(Sn, e.__scopeScrollArea), [i, a] = b.useState(), c = b.useRef(null), l = st(t, c, s.onScrollbarXChange);
16680
- return b.useEffect(() => {
16675
+ }), VC = w.forwardRef((e, t) => {
16676
+ const { sizes: n, onSizesChange: r, ...o } = e, s = tn(Sn, e.__scopeScrollArea), [i, a] = w.useState(), c = w.useRef(null), l = st(t, c, s.onScrollbarXChange);
16677
+ return w.useEffect(() => {
16681
16678
  c.current && a(getComputedStyle(c.current));
16682
16679
  }, [c]), /* @__PURE__ */ d.jsx(
16683
16680
  Kh,
@@ -16714,9 +16711,9 @@ var UC = b.forwardRef((e, t) => {
16714
16711
  }
16715
16712
  }
16716
16713
  );
16717
- }), KC = b.forwardRef((e, t) => {
16718
- const { sizes: n, onSizesChange: r, ...o } = e, s = tn(Sn, e.__scopeScrollArea), [i, a] = b.useState(), c = b.useRef(null), l = st(t, c, s.onScrollbarYChange);
16719
- return b.useEffect(() => {
16714
+ }), KC = w.forwardRef((e, t) => {
16715
+ const { sizes: n, onSizesChange: r, ...o } = e, s = tn(Sn, e.__scopeScrollArea), [i, a] = w.useState(), c = w.useRef(null), l = st(t, c, s.onScrollbarYChange);
16716
+ return w.useEffect(() => {
16720
16717
  c.current && a(getComputedStyle(c.current));
16721
16718
  }, [c]), /* @__PURE__ */ d.jsx(
16722
16719
  Kh,
@@ -16754,7 +16751,7 @@ var UC = b.forwardRef((e, t) => {
16754
16751
  }
16755
16752
  }
16756
16753
  );
16757
- }), [qC, Vh] = zh(Sn), Kh = b.forwardRef((e, t) => {
16754
+ }), [qC, Vh] = zh(Sn), Kh = w.forwardRef((e, t) => {
16758
16755
  const {
16759
16756
  __scopeScrollArea: n,
16760
16757
  sizes: r,
@@ -16767,20 +16764,20 @@ var UC = b.forwardRef((e, t) => {
16767
16764
  onWheelScroll: u,
16768
16765
  onResize: f,
16769
16766
  ...h
16770
- } = e, p = tn(Sn, n), [m, g] = b.useState(null), x = st(t, (A) => g(A)), w = b.useRef(null), v = b.useRef(""), k = p.viewport, R = r.content - r.viewport, C = Et(u), y = Et(c), T = zs(f, 10);
16767
+ } = e, p = tn(Sn, n), [m, g] = w.useState(null), x = st(t, (A) => g(A)), b = w.useRef(null), v = w.useRef(""), k = p.viewport, R = r.content - r.viewport, C = Et(u), y = Et(c), T = zs(f, 10);
16771
16768
  function N(A) {
16772
- if (w.current) {
16773
- const M = A.clientX - w.current.left, L = A.clientY - w.current.top;
16769
+ if (b.current) {
16770
+ const M = A.clientX - b.current.left, L = A.clientY - b.current.top;
16774
16771
  l({ x: M, y: L });
16775
16772
  }
16776
16773
  }
16777
- return b.useEffect(() => {
16774
+ return w.useEffect(() => {
16778
16775
  const A = (M) => {
16779
16776
  const L = M.target;
16780
16777
  (m == null ? void 0 : m.contains(L)) && C(M, R);
16781
16778
  };
16782
16779
  return document.addEventListener("wheel", A, { passive: !1 }), () => document.removeEventListener("wheel", A, { passive: !1 });
16783
- }, [k, m, R, C]), b.useEffect(y, [r, y]), vr(m, T), vr(p.content, T), /* @__PURE__ */ d.jsx(
16780
+ }, [k, m, R, C]), w.useEffect(y, [r, y]), vr(m, T), vr(p.content, T), /* @__PURE__ */ d.jsx(
16784
16781
  qC,
16785
16782
  {
16786
16783
  scope: n,
@@ -16797,31 +16794,31 @@ var UC = b.forwardRef((e, t) => {
16797
16794
  ref: x,
16798
16795
  style: { position: "absolute", ...h.style },
16799
16796
  onPointerDown: Ce(e.onPointerDown, (A) => {
16800
- A.button === 0 && (A.target.setPointerCapture(A.pointerId), w.current = m.getBoundingClientRect(), v.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", p.viewport && (p.viewport.style.scrollBehavior = "auto"), N(A));
16797
+ A.button === 0 && (A.target.setPointerCapture(A.pointerId), b.current = m.getBoundingClientRect(), v.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", p.viewport && (p.viewport.style.scrollBehavior = "auto"), N(A));
16801
16798
  }),
16802
16799
  onPointerMove: Ce(e.onPointerMove, N),
16803
16800
  onPointerUp: Ce(e.onPointerUp, (A) => {
16804
16801
  const M = A.target;
16805
- M.hasPointerCapture(A.pointerId) && M.releasePointerCapture(A.pointerId), document.body.style.webkitUserSelect = v.current, p.viewport && (p.viewport.style.scrollBehavior = ""), w.current = null;
16802
+ M.hasPointerCapture(A.pointerId) && M.releasePointerCapture(A.pointerId), document.body.style.webkitUserSelect = v.current, p.viewport && (p.viewport.style.scrollBehavior = ""), b.current = null;
16806
16803
  })
16807
16804
  }
16808
16805
  )
16809
16806
  }
16810
16807
  );
16811
- }), fs = "ScrollAreaThumb", qh = b.forwardRef(
16808
+ }), fs = "ScrollAreaThumb", qh = w.forwardRef(
16812
16809
  (e, t) => {
16813
16810
  const { forceMount: n, ...r } = e, o = Vh(fs, e.__scopeScrollArea);
16814
16811
  return /* @__PURE__ */ d.jsx(Xt, { present: n || o.hasThumb, children: /* @__PURE__ */ d.jsx(GC, { ref: t, ...r }) });
16815
16812
  }
16816
- ), GC = b.forwardRef(
16813
+ ), GC = w.forwardRef(
16817
16814
  (e, t) => {
16818
16815
  const { __scopeScrollArea: n, style: r, ...o } = e, s = tn(fs, n), i = Vh(fs, n), { onThumbPositionChange: a } = i, c = st(
16819
16816
  t,
16820
16817
  (f) => i.onThumbChange(f)
16821
- ), l = b.useRef(void 0), u = zs(() => {
16818
+ ), l = w.useRef(void 0), u = zs(() => {
16822
16819
  l.current && (l.current(), l.current = void 0);
16823
16820
  }, 100);
16824
- return b.useEffect(() => {
16821
+ return w.useEffect(() => {
16825
16822
  const f = s.viewport;
16826
16823
  if (f) {
16827
16824
  const h = () => {
@@ -16853,15 +16850,15 @@ var UC = b.forwardRef((e, t) => {
16853
16850
  }
16854
16851
  );
16855
16852
  qh.displayName = fs;
16856
- var Fa = "ScrollAreaCorner", Gh = b.forwardRef(
16853
+ var Fa = "ScrollAreaCorner", Gh = w.forwardRef(
16857
16854
  (e, t) => {
16858
16855
  const n = tn(Fa, e.__scopeScrollArea), r = !!(n.scrollbarX && n.scrollbarY);
16859
16856
  return n.type !== "scroll" && r ? /* @__PURE__ */ d.jsx(YC, { ...e, ref: t }) : null;
16860
16857
  }
16861
16858
  );
16862
16859
  Gh.displayName = Fa;
16863
- var YC = b.forwardRef((e, t) => {
16864
- const { __scopeScrollArea: n, ...r } = e, o = tn(Fa, n), [s, i] = b.useState(0), [a, c] = b.useState(0), l = !!(s && a);
16860
+ var YC = w.forwardRef((e, t) => {
16861
+ const { __scopeScrollArea: n, ...r } = e, o = tn(Fa, n), [s, i] = w.useState(0), [a, c] = w.useState(0), l = !!(s && a);
16865
16862
  return vr(o.scrollbarX, () => {
16866
16863
  var f;
16867
16864
  const u = ((f = o.scrollbarX) == null ? void 0 : f.offsetHeight) || 0;
@@ -16925,8 +16922,8 @@ var JC = (e, t = () => {
16925
16922
  }(), () => window.cancelAnimationFrame(r);
16926
16923
  };
16927
16924
  function zs(e, t) {
16928
- const n = Et(e), r = b.useRef(0);
16929
- return b.useEffect(() => () => window.clearTimeout(r.current), []), b.useCallback(() => {
16925
+ const n = Et(e), r = w.useRef(0);
16926
+ return w.useEffect(() => () => window.clearTimeout(r.current), []), w.useCallback(() => {
16930
16927
  window.clearTimeout(r.current), r.current = window.setTimeout(n, t);
16931
16928
  }, [n, t]);
16932
16929
  }
@@ -16945,7 +16942,7 @@ function vr(e, t) {
16945
16942
  }, [e, n]);
16946
16943
  }
16947
16944
  var Zh = Bh, ZC = Uh, QC = Gh;
16948
- const Qh = b.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ d.jsxs(
16945
+ const Qh = w.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ d.jsxs(
16949
16946
  Zh,
16950
16947
  {
16951
16948
  ref: r,
@@ -16959,7 +16956,7 @@ const Qh = b.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
16959
16956
  }
16960
16957
  ));
16961
16958
  Qh.displayName = Zh.displayName;
16962
- const ep = b.forwardRef(({ className: e, orientation: t = "vertical", ...n }, r) => /* @__PURE__ */ d.jsx(
16959
+ const ep = w.forwardRef(({ className: e, orientation: t = "vertical", ...n }, r) => /* @__PURE__ */ d.jsx(
16963
16960
  La,
16964
16961
  {
16965
16962
  ref: r,
@@ -16993,7 +16990,7 @@ function mi({
16993
16990
  getDisplayThreadTitle: m,
16994
16991
  itemClassName: g,
16995
16992
  activeItemClassName: x,
16996
- secondaryLine: w
16993
+ secondaryLine: b
16997
16994
  }) {
16998
16995
  const v = n === e.threadId, k = De(
16999
16996
  () => (m == null ? void 0 : m(e)) ?? e.title ?? e.threadId,
@@ -17018,7 +17015,7 @@ function mi({
17018
17015
  onChange: (y) => i == null ? void 0 : i(y.target.value)
17019
17016
  }
17020
17017
  ) : /* @__PURE__ */ d.jsx("span", { className: "font-medium truncate", children: k }),
17021
- w && /* @__PURE__ */ d.jsx("span", { className: "text-xs text-muted-foreground truncate", children: w }),
17018
+ b && /* @__PURE__ */ d.jsx("span", { className: "text-xs text-muted-foreground truncate", children: b }),
17022
17019
  p && e.updatedAt && /* @__PURE__ */ d.jsx("span", { className: "text-[10px] text-muted-foreground", children: p(e.updatedAt) })
17023
17020
  ] }),
17024
17021
  /* @__PURE__ */ d.jsx("div", { className: "flex items-center gap-1", children: v ? /* @__PURE__ */ d.jsxs("div", { className: "flex items-center gap-1", children: [
@@ -17074,7 +17071,7 @@ function mi({
17074
17071
  }
17075
17072
  );
17076
17073
  }
17077
- var Bs = "Collapsible", [ek, Wk] = zn(Bs), [tk, za] = ek(Bs), tp = b.forwardRef(
17074
+ var Bs = "Collapsible", [ek, Wk] = zn(Bs), [tk, za] = ek(Bs), tp = w.forwardRef(
17078
17075
  (e, t) => {
17079
17076
  const {
17080
17077
  __scopeCollapsible: n,
@@ -17096,7 +17093,7 @@ var Bs = "Collapsible", [ek, Wk] = zn(Bs), [tk, za] = ek(Bs), tp = b.forwardRef(
17096
17093
  disabled: s,
17097
17094
  contentId: Gt(),
17098
17095
  open: c,
17099
- onOpenToggle: b.useCallback(() => l((u) => !u), [l]),
17096
+ onOpenToggle: w.useCallback(() => l((u) => !u), [l]),
17100
17097
  children: /* @__PURE__ */ d.jsx(
17101
17098
  Oe.div,
17102
17099
  {
@@ -17111,7 +17108,7 @@ var Bs = "Collapsible", [ek, Wk] = zn(Bs), [tk, za] = ek(Bs), tp = b.forwardRef(
17111
17108
  }
17112
17109
  );
17113
17110
  tp.displayName = Bs;
17114
- var np = "CollapsibleTrigger", rp = b.forwardRef(
17111
+ var np = "CollapsibleTrigger", rp = w.forwardRef(
17115
17112
  (e, t) => {
17116
17113
  const { __scopeCollapsible: n, ...r } = e, o = za(np, n);
17117
17114
  return /* @__PURE__ */ d.jsx(
@@ -17131,27 +17128,27 @@ var np = "CollapsibleTrigger", rp = b.forwardRef(
17131
17128
  }
17132
17129
  );
17133
17130
  rp.displayName = np;
17134
- var Ba = "CollapsibleContent", op = b.forwardRef(
17131
+ var Ba = "CollapsibleContent", op = w.forwardRef(
17135
17132
  (e, t) => {
17136
17133
  const { forceMount: n, ...r } = e, o = za(Ba, e.__scopeCollapsible);
17137
17134
  return /* @__PURE__ */ d.jsx(Xt, { present: n || o.open, children: ({ present: s }) => /* @__PURE__ */ d.jsx(nk, { ...r, ref: t, present: s }) });
17138
17135
  }
17139
17136
  );
17140
17137
  op.displayName = Ba;
17141
- var nk = b.forwardRef((e, t) => {
17142
- const { __scopeCollapsible: n, present: r, children: o, ...s } = e, i = za(Ba, n), [a, c] = b.useState(r), l = b.useRef(null), u = st(t, l), f = b.useRef(0), h = f.current, p = b.useRef(0), m = p.current, g = i.open || a, x = b.useRef(g), w = b.useRef(void 0);
17143
- return b.useEffect(() => {
17138
+ var nk = w.forwardRef((e, t) => {
17139
+ const { __scopeCollapsible: n, present: r, children: o, ...s } = e, i = za(Ba, n), [a, c] = w.useState(r), l = w.useRef(null), u = st(t, l), f = w.useRef(0), h = f.current, p = w.useRef(0), m = p.current, g = i.open || a, x = w.useRef(g), b = w.useRef(void 0);
17140
+ return w.useEffect(() => {
17144
17141
  const v = requestAnimationFrame(() => x.current = !1);
17145
17142
  return () => cancelAnimationFrame(v);
17146
17143
  }, []), bn(() => {
17147
17144
  const v = l.current;
17148
17145
  if (v) {
17149
- w.current = w.current || {
17146
+ b.current = b.current || {
17150
17147
  transitionDuration: v.style.transitionDuration,
17151
17148
  animationName: v.style.animationName
17152
17149
  }, v.style.transitionDuration = "0s", v.style.animationName = "none";
17153
17150
  const k = v.getBoundingClientRect();
17154
- f.current = k.height, p.current = k.width, x.current || (v.style.transitionDuration = w.current.transitionDuration, v.style.animationName = w.current.animationName), c(r);
17151
+ f.current = k.height, p.current = k.width, x.current || (v.style.transitionDuration = b.current.transitionDuration, v.style.animationName = b.current.animationName), c(r);
17155
17152
  }
17156
17153
  }, [i.open, r]), /* @__PURE__ */ d.jsx(
17157
17154
  Oe.div,
@@ -17224,7 +17221,7 @@ function zi({
17224
17221
  viewOptions: m,
17225
17222
  viewState: g,
17226
17223
  showHeader: x = !0,
17227
- shareTargets: w,
17224
+ shareTargets: b,
17228
17225
  isLoadingShareTargets: v,
17229
17226
  shareTargetFilter: k,
17230
17227
  groupBy: R,
@@ -17243,7 +17240,7 @@ function zi({
17243
17240
  clearShareStatus: oe
17244
17241
  } = io(), { createThread: U, deleteThread: $, renameThread: Y, shareThread: H } = D, { loadThread: I } = ys(), E = i ?? M, [P, O] = ue(Array.isArray(N) ? N : []), K = Se(P.length > 0), F = Se(null), _ = Se(0), [q, se] = ue(null), [fe, pe] = ue(""), [ce, me] = ue(!1), [be, We] = ue(!1), [Fe, je] = ue(null), [He, nt] = ue(""), [xt, at] = ue([]), [Ue, Le] = ue(!1), Qe = te((X) => pe(X), []);
17245
17242
  Pe(() => {
17246
- be && !w && xt.length === 0 && !Ue && (async () => {
17243
+ be && !b && xt.length === 0 && !Ue && (async () => {
17247
17244
  Le(!0);
17248
17245
  try {
17249
17246
  const J = (await T.listUsers()).filter((S) => S.id || S.user_id).map((S) => ({
@@ -17260,8 +17257,8 @@ function zi({
17260
17257
  Le(!1);
17261
17258
  }
17262
17259
  })();
17263
- }, [be, w, xt.length, Ue, y]);
17264
- const it = w ?? xt, Ye = v ?? Ue, mt = m && m.length > 0 ? m : ak, vt = ik({ defaultView: h }), Ve = g ?? vt, lt = f ?? Ve.view, nn = te(
17260
+ }, [be, b, xt.length, Ue, y]);
17261
+ const it = b ?? xt, Ye = v ?? Ue, mt = m && m.length > 0 ? m : ak, vt = ik({ defaultView: h }), Ve = g ?? vt, lt = f ?? Ve.view, nn = te(
17265
17262
  (X) => {
17266
17263
  f || Ve.setView(X), p == null || p(X);
17267
17264
  },
@@ -17283,7 +17280,7 @@ function zi({
17283
17280
  ), yt = De(() => {
17284
17281
  const X = it, he = He.trim().toLowerCase();
17285
17282
  return he ? k ? X.filter((J) => k(J, he)) : X.filter((J) => `${J.label} ${J.secondaryLabel ?? ""}`.toLowerCase().includes(he)) : X;
17286
- }, [w, He, k]), Xe = lt === "shared", bt = Xe ? A : P, dt = De(() => {
17283
+ }, [b, He, k]), Xe = lt === "shared", bt = Xe ? A : P, dt = De(() => {
17287
17284
  if (!R || Xe) return null;
17288
17285
  const X = "Default", he = (S) => {
17289
17286
  if (!S) return "Older";
@@ -17917,7 +17914,7 @@ function Gk({
17917
17914
  activeThreadId: h,
17918
17915
  ensureValidToken: p
17919
17916
  }) {
17920
- const { messages: m } = bu(), [g, x] = ue(null), [w, v] = ue(""), [k, R] = ue(null), [C, y] = ue(null), [T, N] = ue(!1), [A, M] = ue(""), L = Se(A), W = Se(null);
17917
+ const { messages: m } = bu(), [g, x] = ue(null), [b, v] = ue(""), [k, R] = ue(null), [C, y] = ue(null), [T, N] = ue(!1), [A, M] = ue(""), L = Se(A), W = Se(null);
17921
17918
  Pe(() => {
17922
17919
  if (!g)
17923
17920
  if (h) {
@@ -17936,8 +17933,8 @@ function Gk({
17936
17933
  W.current = null;
17937
17934
  return;
17938
17935
  }
17939
- W.current === null && (W.current = L.current), V(w ?? "");
17940
- }, [w, g, V]);
17936
+ W.current === null && (W.current = L.current), V(b ?? "");
17937
+ }, [b, g, V]);
17941
17938
  const D = te(
17942
17939
  (I) => {
17943
17940
  V(I);
@@ -18051,7 +18048,7 @@ function Gk({
18051
18048
  }, [c, e, n, r, t]);
18052
18049
  return {
18053
18050
  editingMessageId: g,
18054
- editingInitialValue: w,
18051
+ editingInitialValue: b,
18055
18052
  inputError: C,
18056
18053
  setInputError: y,
18057
18054
  dismissError: T,