teodor-new-chat-ui 4.1.81 → 4.1.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var xm = Object.defineProperty;
2
2
  var vm = (e, t, n) => t in e ? xm(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var ml = (e, t, n) => vm(e, typeof t != "symbol" ? t + "" : t, n);
4
- import * as g from "react";
4
+ import * as m from "react";
5
5
  import q, { createContext as co, useContext as vs, useReducer as ym, useRef as We, useCallback as Ne, useEffect as st, useMemo as dt, useState as we, startTransition as ru, createElement as Mo, useLayoutEffect as wm } from "react";
6
6
  import { Square as bm, Send as Sm, X as Cr, ExternalLink as Cm, Download as km, Image as Tm, FileText as gl, Loader as ou, Bot as xl, Wrench as Im, User as Rm, ChevronUp as Wr, ChevronDown as Sr, Paperclip as ji, Copy as vl, Edit as yl, RotateCcw as Pi, ChevronRight as Em, Check as ha, Circle as Nm, Loader2 as Oi, Edit3 as su, Plus as Am, FileSpreadsheet as _m, MessageSquarePlus as jm, MessageSquare as Pm, Calendar as Om, Trash2 as Mm, Settings as Dm, Server as Lm, EyeOff as Fm, Eye as $m, Layout as zm, MessageCircle as Bm, Save as Hm } from "lucide-react";
7
7
  import { Slot as Um, createSlot as Er } from "@radix-ui/react-slot";
@@ -48,57 +48,57 @@ var bl;
48
48
  function qm() {
49
49
  return bl || (bl = 1, process.env.NODE_ENV !== "production" && function() {
50
50
  var e = q, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), a = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), w = Symbol.iterator, y = "@@iterator";
51
- function x(m) {
52
- if (m === null || typeof m != "object")
51
+ function x(g) {
52
+ if (g === null || typeof g != "object")
53
53
  return null;
54
- var I = w && m[w] || m[y];
55
- return typeof I == "function" ? I : null;
54
+ var T = w && g[w] || g[y];
55
+ return typeof T == "function" ? T : null;
56
56
  }
57
57
  var v = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
58
- function b(m) {
58
+ function b(g) {
59
59
  {
60
- for (var I = arguments.length, j = new Array(I > 1 ? I - 1 : 0), U = 1; U < I; U++)
60
+ for (var T = arguments.length, j = new Array(T > 1 ? T - 1 : 0), U = 1; U < T; U++)
61
61
  j[U - 1] = arguments[U];
62
- S("error", m, j);
62
+ S("error", g, j);
63
63
  }
64
64
  }
65
- function S(m, I, j) {
65
+ function S(g, T, j) {
66
66
  {
67
67
  var U = v.ReactDebugCurrentFrame, ee = U.getStackAddendum();
68
- ee !== "" && (I += "%s", j = j.concat([ee]));
68
+ ee !== "" && (T += "%s", j = j.concat([ee]));
69
69
  var se = j.map(function(Q) {
70
70
  return String(Q);
71
71
  });
72
- se.unshift("Warning: " + I), Function.prototype.apply.call(console[m], console, se);
72
+ se.unshift("Warning: " + T), Function.prototype.apply.call(console[g], console, se);
73
73
  }
74
74
  }
75
- var T = !1, C = !1, k = !1, R = !1, E = !1, A;
75
+ var I = !1, C = !1, k = !1, R = !1, E = !1, A;
76
76
  A = Symbol.for("react.module.reference");
77
- function O(m) {
78
- return !!(typeof m == "string" || typeof m == "function" || m === r || m === s || E || m === o || m === u || m === d || R || m === p || T || C || k || typeof m == "object" && m !== null && (m.$$typeof === h || m.$$typeof === f || m.$$typeof === i || m.$$typeof === a || m.$$typeof === l || // This needs to include all possible module reference object
77
+ function O(g) {
78
+ return !!(typeof g == "string" || typeof g == "function" || g === r || g === s || E || g === o || g === u || g === d || R || g === p || I || C || k || typeof g == "object" && g !== null && (g.$$typeof === h || g.$$typeof === f || g.$$typeof === i || g.$$typeof === a || g.$$typeof === l || // This needs to include all possible module reference object
79
79
  // types supported by any Flight configuration anywhere since
80
80
  // we don't know which Flight build this will end up being used
81
81
  // with.
82
- m.$$typeof === A || m.getModuleId !== void 0));
82
+ g.$$typeof === A || g.getModuleId !== void 0));
83
83
  }
84
- function L(m, I, j) {
85
- var U = m.displayName;
84
+ function L(g, T, j) {
85
+ var U = g.displayName;
86
86
  if (U)
87
87
  return U;
88
- var ee = I.displayName || I.name || "";
88
+ var ee = T.displayName || T.name || "";
89
89
  return ee !== "" ? j + "(" + ee + ")" : j;
90
90
  }
91
- function F(m) {
92
- return m.displayName || "Context";
91
+ function F(g) {
92
+ return g.displayName || "Context";
93
93
  }
94
- function V(m) {
95
- if (m == null)
94
+ function V(g) {
95
+ if (g == null)
96
96
  return null;
97
- if (typeof m.tag == "number" && b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof m == "function")
98
- return m.displayName || m.name || null;
99
- if (typeof m == "string")
100
- return m;
101
- switch (m) {
97
+ if (typeof g.tag == "number" && b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof g == "function")
98
+ return g.displayName || g.name || null;
99
+ if (typeof g == "string")
100
+ return g;
101
+ switch (g) {
102
102
  case r:
103
103
  return "Fragment";
104
104
  case n:
@@ -112,21 +112,21 @@ function qm() {
112
112
  case d:
113
113
  return "SuspenseList";
114
114
  }
115
- if (typeof m == "object")
116
- switch (m.$$typeof) {
115
+ if (typeof g == "object")
116
+ switch (g.$$typeof) {
117
117
  case a:
118
- var I = m;
119
- return F(I) + ".Consumer";
118
+ var T = g;
119
+ return F(T) + ".Consumer";
120
120
  case i:
121
- var j = m;
121
+ var j = g;
122
122
  return F(j._context) + ".Provider";
123
123
  case l:
124
- return L(m, m.render, "ForwardRef");
124
+ return L(g, g.render, "ForwardRef");
125
125
  case f:
126
- var U = m.displayName || null;
127
- return U !== null ? U : V(m.type) || "Memo";
126
+ var U = g.displayName || null;
127
+ return U !== null ? U : V(g.type) || "Memo";
128
128
  case h: {
129
- var ee = m, se = ee._payload, Q = ee._init;
129
+ var ee = g, se = ee._payload, Q = ee._init;
130
130
  try {
131
131
  return V(Q(se));
132
132
  } catch {
@@ -144,20 +144,20 @@ function qm() {
144
144
  {
145
145
  if (B === 0) {
146
146
  z = console.log, H = console.info, M = console.warn, D = console.error, X = console.group, _ = console.groupCollapsed, G = console.groupEnd;
147
- var m = {
147
+ var g = {
148
148
  configurable: !0,
149
149
  enumerable: !0,
150
150
  value: ce,
151
151
  writable: !0
152
152
  };
153
153
  Object.defineProperties(console, {
154
- info: m,
155
- log: m,
156
- warn: m,
157
- error: m,
158
- group: m,
159
- groupCollapsed: m,
160
- groupEnd: m
154
+ info: g,
155
+ log: g,
156
+ warn: g,
157
+ error: g,
158
+ group: g,
159
+ groupCollapsed: g,
160
+ groupEnd: g
161
161
  });
162
162
  }
163
163
  B++;
@@ -166,31 +166,31 @@ function qm() {
166
166
  function Ce() {
167
167
  {
168
168
  if (B--, B === 0) {
169
- var m = {
169
+ var g = {
170
170
  configurable: !0,
171
171
  enumerable: !0,
172
172
  writable: !0
173
173
  };
174
174
  Object.defineProperties(console, {
175
- log: N({}, m, {
175
+ log: N({}, g, {
176
176
  value: z
177
177
  }),
178
- info: N({}, m, {
178
+ info: N({}, g, {
179
179
  value: H
180
180
  }),
181
- warn: N({}, m, {
181
+ warn: N({}, g, {
182
182
  value: M
183
183
  }),
184
- error: N({}, m, {
184
+ error: N({}, g, {
185
185
  value: D
186
186
  }),
187
- group: N({}, m, {
187
+ group: N({}, g, {
188
188
  value: X
189
189
  }),
190
- groupCollapsed: N({}, m, {
190
+ groupCollapsed: N({}, g, {
191
191
  value: _
192
192
  }),
193
- groupEnd: N({}, m, {
193
+ groupEnd: N({}, g, {
194
194
  value: G
195
195
  })
196
196
  });
@@ -199,7 +199,7 @@ function qm() {
199
199
  }
200
200
  }
201
201
  var de = v.ReactCurrentDispatcher, K;
202
- function $(m, I, j) {
202
+ function $(g, T, j) {
203
203
  {
204
204
  if (K === void 0)
205
205
  try {
@@ -209,7 +209,7 @@ function qm() {
209
209
  K = U && U[1] || "";
210
210
  }
211
211
  return `
212
- ` + K + m;
212
+ ` + K + g;
213
213
  }
214
214
  }
215
215
  var Y = !1, J;
@@ -217,11 +217,11 @@ function qm() {
217
217
  var me = typeof WeakMap == "function" ? WeakMap : Map;
218
218
  J = new me();
219
219
  }
220
- function oe(m, I) {
221
- if (!m || Y)
220
+ function oe(g, T) {
221
+ if (!g || Y)
222
222
  return "";
223
223
  {
224
- var j = J.get(m);
224
+ var j = J.get(g);
225
225
  if (j !== void 0)
226
226
  return j;
227
227
  }
@@ -232,7 +232,7 @@ function qm() {
232
232
  var se;
233
233
  se = de.current, de.current = null, ye();
234
234
  try {
235
- if (I) {
235
+ if (T) {
236
236
  var Q = function() {
237
237
  throw Error();
238
238
  };
@@ -246,14 +246,14 @@ function qm() {
246
246
  } catch (Ge) {
247
247
  U = Ge;
248
248
  }
249
- Reflect.construct(m, [], Q);
249
+ Reflect.construct(g, [], Q);
250
250
  } else {
251
251
  try {
252
252
  Q.call();
253
253
  } catch (Ge) {
254
254
  U = Ge;
255
255
  }
256
- m.call(Q.prototype);
256
+ g.call(Q.prototype);
257
257
  }
258
258
  } else {
259
259
  try {
@@ -261,7 +261,7 @@ function qm() {
261
261
  } catch (Ge) {
262
262
  U = Ge;
263
263
  }
264
- m();
264
+ g();
265
265
  }
266
266
  } catch (Ge) {
267
267
  if (Ge && U && typeof Ge.stack == "string") {
@@ -276,7 +276,7 @@ function qm() {
276
276
  if (Re--, Ke--, Ke < 0 || ge[Re] !== Se[Ke]) {
277
277
  var Qe = `
278
278
  ` + ge[Re].replace(" at new ", " at ");
279
- return m.displayName && Qe.includes("<anonymous>") && (Qe = Qe.replace("<anonymous>", m.displayName)), typeof m == "function" && J.set(m, Qe), Qe;
279
+ return g.displayName && Qe.includes("<anonymous>") && (Qe = Qe.replace("<anonymous>", g.displayName)), typeof g == "function" && J.set(g, Qe), Qe;
280
280
  }
281
281
  while (Re >= 1 && Ke >= 0);
282
282
  break;
@@ -285,39 +285,39 @@ function qm() {
285
285
  } finally {
286
286
  Y = !1, de.current = se, Ce(), Error.prepareStackTrace = ee;
287
287
  }
288
- var rt = m ? m.displayName || m.name : "", lt = rt ? $(rt) : "";
289
- return typeof m == "function" && J.set(m, lt), lt;
288
+ var rt = g ? g.displayName || g.name : "", lt = rt ? $(rt) : "";
289
+ return typeof g == "function" && J.set(g, lt), lt;
290
290
  }
291
- function te(m, I, j) {
292
- return oe(m, !1);
291
+ function te(g, T, j) {
292
+ return oe(g, !1);
293
293
  }
294
- function Xe(m) {
295
- var I = m.prototype;
296
- return !!(I && I.isReactComponent);
294
+ function Xe(g) {
295
+ var T = g.prototype;
296
+ return !!(T && T.isReactComponent);
297
297
  }
298
- function Ue(m, I, j) {
299
- if (m == null)
298
+ function Ue(g, T, j) {
299
+ if (g == null)
300
300
  return "";
301
- if (typeof m == "function")
302
- return oe(m, Xe(m));
303
- if (typeof m == "string")
304
- return $(m);
305
- switch (m) {
301
+ if (typeof g == "function")
302
+ return oe(g, Xe(g));
303
+ if (typeof g == "string")
304
+ return $(g);
305
+ switch (g) {
306
306
  case u:
307
307
  return $("Suspense");
308
308
  case d:
309
309
  return $("SuspenseList");
310
310
  }
311
- if (typeof m == "object")
312
- switch (m.$$typeof) {
311
+ if (typeof g == "object")
312
+ switch (g.$$typeof) {
313
313
  case l:
314
- return te(m.render);
314
+ return te(g.render);
315
315
  case f:
316
- return Ue(m.type, I, j);
316
+ return Ue(g.type, T, j);
317
317
  case h: {
318
- var U = m, ee = U._payload, se = U._init;
318
+ var U = g, ee = U._payload, se = U._init;
319
319
  try {
320
- return Ue(se(ee), I, j);
320
+ return Ue(se(ee), T, j);
321
321
  } catch {
322
322
  }
323
323
  }
@@ -325,25 +325,25 @@ function qm() {
325
325
  return "";
326
326
  }
327
327
  var Oe = Object.prototype.hasOwnProperty, $e = {}, ot = v.ReactDebugCurrentFrame;
328
- function Je(m) {
329
- if (m) {
330
- var I = m._owner, j = Ue(m.type, m._source, I ? I.type : null);
328
+ function Je(g) {
329
+ if (g) {
330
+ var T = g._owner, j = Ue(g.type, g._source, T ? T.type : null);
331
331
  ot.setExtraStackFrame(j);
332
332
  } else
333
333
  ot.setExtraStackFrame(null);
334
334
  }
335
- function _e(m, I, j, U, ee) {
335
+ function _e(g, T, j, U, ee) {
336
336
  {
337
337
  var se = Function.call.bind(Oe);
338
- for (var Q in m)
339
- if (se(m, Q)) {
338
+ for (var Q in g)
339
+ if (se(g, Q)) {
340
340
  var ge = void 0;
341
341
  try {
342
- if (typeof m[Q] != "function") {
343
- var Se = Error((U || "React class") + ": " + j + " type `" + Q + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof m[Q] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
342
+ if (typeof g[Q] != "function") {
343
+ var Se = Error((U || "React class") + ": " + j + " type `" + Q + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof g[Q] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
344
344
  throw Se.name = "Invariant Violation", Se;
345
345
  }
346
- ge = m[Q](I, Q, U, j, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
346
+ ge = g[Q](T, Q, U, j, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
347
347
  } catch (Re) {
348
348
  ge = Re;
349
349
  }
@@ -352,28 +352,28 @@ function qm() {
352
352
  }
353
353
  }
354
354
  var pt = Array.isArray;
355
- function ne(m) {
356
- return pt(m);
355
+ function ne(g) {
356
+ return pt(g);
357
357
  }
358
- function ae(m) {
358
+ function ae(g) {
359
359
  {
360
- var I = typeof Symbol == "function" && Symbol.toStringTag, j = I && m[Symbol.toStringTag] || m.constructor.name || "Object";
360
+ var T = typeof Symbol == "function" && Symbol.toStringTag, j = T && g[Symbol.toStringTag] || g.constructor.name || "Object";
361
361
  return j;
362
362
  }
363
363
  }
364
- function he(m) {
364
+ function he(g) {
365
365
  try {
366
- return be(m), !1;
366
+ return be(g), !1;
367
367
  } catch {
368
368
  return !0;
369
369
  }
370
370
  }
371
- function be(m) {
372
- return "" + m;
371
+ function be(g) {
372
+ return "" + g;
373
373
  }
374
- function pe(m) {
375
- if (he(m))
376
- return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ae(m)), be(m);
374
+ function pe(g) {
375
+ if (he(g))
376
+ return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ae(g)), be(g);
377
377
  }
378
378
  var Ie = v.ReactCurrentOwner, Ze = {
379
379
  key: !0,
@@ -381,54 +381,54 @@ function qm() {
381
381
  __self: !0,
382
382
  __source: !0
383
383
  }, ze, nt;
384
- function ft(m) {
385
- if (Oe.call(m, "ref")) {
386
- var I = Object.getOwnPropertyDescriptor(m, "ref").get;
387
- if (I && I.isReactWarning)
384
+ function ft(g) {
385
+ if (Oe.call(g, "ref")) {
386
+ var T = Object.getOwnPropertyDescriptor(g, "ref").get;
387
+ if (T && T.isReactWarning)
388
388
  return !1;
389
389
  }
390
- return m.ref !== void 0;
390
+ return g.ref !== void 0;
391
391
  }
392
- function Et(m) {
393
- if (Oe.call(m, "key")) {
394
- var I = Object.getOwnPropertyDescriptor(m, "key").get;
395
- if (I && I.isReactWarning)
392
+ function Et(g) {
393
+ if (Oe.call(g, "key")) {
394
+ var T = Object.getOwnPropertyDescriptor(g, "key").get;
395
+ if (T && T.isReactWarning)
396
396
  return !1;
397
397
  }
398
- return m.key !== void 0;
398
+ return g.key !== void 0;
399
399
  }
400
- function Gt(m, I) {
401
- typeof m.ref == "string" && Ie.current;
400
+ function Gt(g, T) {
401
+ typeof g.ref == "string" && Ie.current;
402
402
  }
403
- function rn(m, I) {
403
+ function rn(g, T) {
404
404
  {
405
405
  var j = function() {
406
- ze || (ze = !0, b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", I));
406
+ ze || (ze = !0, b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", T));
407
407
  };
408
- j.isReactWarning = !0, Object.defineProperty(m, "key", {
408
+ j.isReactWarning = !0, Object.defineProperty(g, "key", {
409
409
  get: j,
410
410
  configurable: !0
411
411
  });
412
412
  }
413
413
  }
414
- function Hn(m, I) {
414
+ function Hn(g, T) {
415
415
  {
416
416
  var j = function() {
417
- nt || (nt = !0, b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", I));
417
+ nt || (nt = !0, b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", T));
418
418
  };
419
- j.isReactWarning = !0, Object.defineProperty(m, "ref", {
419
+ j.isReactWarning = !0, Object.defineProperty(g, "ref", {
420
420
  get: j,
421
421
  configurable: !0
422
422
  });
423
423
  }
424
424
  }
425
- var zr = function(m, I, j, U, ee, se, Q) {
425
+ var zr = function(g, T, j, U, ee, se, Q) {
426
426
  var ge = {
427
427
  // This tag allows us to uniquely identify this as a React Element
428
428
  $$typeof: t,
429
429
  // Built-in properties that belong on the element
430
- type: m,
431
- key: I,
430
+ type: g,
431
+ key: T,
432
432
  ref: j,
433
433
  props: Q,
434
434
  // Record the component responsible for creating this element.
@@ -451,164 +451,164 @@ function qm() {
451
451
  value: ee
452
452
  }), Object.freeze && (Object.freeze(ge.props), Object.freeze(ge)), ge;
453
453
  };
454
- function hr(m, I, j, U, ee) {
454
+ function hr(g, T, j, U, ee) {
455
455
  {
456
456
  var se, Q = {}, ge = null, Se = null;
457
- j !== void 0 && (pe(j), ge = "" + j), Et(I) && (pe(I.key), ge = "" + I.key), ft(I) && (Se = I.ref, Gt(I, ee));
458
- for (se in I)
459
- Oe.call(I, se) && !Ze.hasOwnProperty(se) && (Q[se] = I[se]);
460
- if (m && m.defaultProps) {
461
- var Re = m.defaultProps;
457
+ j !== void 0 && (pe(j), ge = "" + j), Et(T) && (pe(T.key), ge = "" + T.key), ft(T) && (Se = T.ref, Gt(T, ee));
458
+ for (se in T)
459
+ Oe.call(T, se) && !Ze.hasOwnProperty(se) && (Q[se] = T[se]);
460
+ if (g && g.defaultProps) {
461
+ var Re = g.defaultProps;
462
462
  for (se in Re)
463
463
  Q[se] === void 0 && (Q[se] = Re[se]);
464
464
  }
465
465
  if (ge || Se) {
466
- var Ke = typeof m == "function" ? m.displayName || m.name || "Unknown" : m;
466
+ var Ke = typeof g == "function" ? g.displayName || g.name || "Unknown" : g;
467
467
  ge && rn(Q, Ke), Se && Hn(Q, Ke);
468
468
  }
469
- return zr(m, ge, Se, ee, U, Ie.current, Q);
469
+ return zr(g, ge, Se, ee, U, Ie.current, Q);
470
470
  }
471
471
  }
472
472
  var In = v.ReactCurrentOwner, on = v.ReactDebugCurrentFrame;
473
- function Pt(m) {
474
- if (m) {
475
- var I = m._owner, j = Ue(m.type, m._source, I ? I.type : null);
473
+ function Pt(g) {
474
+ if (g) {
475
+ var T = g._owner, j = Ue(g.type, g._source, T ? T.type : null);
476
476
  on.setExtraStackFrame(j);
477
477
  } else
478
478
  on.setExtraStackFrame(null);
479
479
  }
480
480
  var sn;
481
481
  sn = !1;
482
- function Rn(m) {
483
- return typeof m == "object" && m !== null && m.$$typeof === t;
482
+ function Rn(g) {
483
+ return typeof g == "object" && g !== null && g.$$typeof === t;
484
484
  }
485
485
  function Un() {
486
486
  {
487
487
  if (In.current) {
488
- var m = V(In.current.type);
489
- if (m)
488
+ var g = V(In.current.type);
489
+ if (g)
490
490
  return `
491
491
 
492
- Check the render method of \`` + m + "`.";
492
+ Check the render method of \`` + g + "`.";
493
493
  }
494
494
  return "";
495
495
  }
496
496
  }
497
- function pr(m) {
497
+ function pr(g) {
498
498
  return "";
499
499
  }
500
500
  var Yt = {};
501
- function mr(m) {
501
+ function mr(g) {
502
502
  {
503
- var I = Un();
504
- if (!I) {
505
- var j = typeof m == "string" ? m : m.displayName || m.name;
506
- j && (I = `
503
+ var T = Un();
504
+ if (!T) {
505
+ var j = typeof g == "string" ? g : g.displayName || g.name;
506
+ j && (T = `
507
507
 
508
508
  Check the top-level render call using <` + j + ">.");
509
509
  }
510
- return I;
510
+ return T;
511
511
  }
512
512
  }
513
- function Wn(m, I) {
513
+ function Wn(g, T) {
514
514
  {
515
- if (!m._store || m._store.validated || m.key != null)
515
+ if (!g._store || g._store.validated || g.key != null)
516
516
  return;
517
- m._store.validated = !0;
518
- var j = mr(I);
517
+ g._store.validated = !0;
518
+ var j = mr(T);
519
519
  if (Yt[j])
520
520
  return;
521
521
  Yt[j] = !0;
522
522
  var U = "";
523
- m && m._owner && m._owner !== In.current && (U = " It was passed a child from " + V(m._owner.type) + "."), Pt(m), b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', j, U), Pt(null);
523
+ g && g._owner && g._owner !== In.current && (U = " It was passed a child from " + V(g._owner.type) + "."), Pt(g), b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', j, U), Pt(null);
524
524
  }
525
525
  }
526
- function Vn(m, I) {
526
+ function Vn(g, T) {
527
527
  {
528
- if (typeof m != "object")
528
+ if (typeof g != "object")
529
529
  return;
530
- if (ne(m))
531
- for (var j = 0; j < m.length; j++) {
532
- var U = m[j];
533
- Rn(U) && Wn(U, I);
530
+ if (ne(g))
531
+ for (var j = 0; j < g.length; j++) {
532
+ var U = g[j];
533
+ Rn(U) && Wn(U, T);
534
534
  }
535
- else if (Rn(m))
536
- m._store && (m._store.validated = !0);
537
- else if (m) {
538
- var ee = x(m);
539
- if (typeof ee == "function" && ee !== m.entries)
540
- for (var se = ee.call(m), Q; !(Q = se.next()).done; )
541
- Rn(Q.value) && Wn(Q.value, I);
535
+ else if (Rn(g))
536
+ g._store && (g._store.validated = !0);
537
+ else if (g) {
538
+ var ee = x(g);
539
+ if (typeof ee == "function" && ee !== g.entries)
540
+ for (var se = ee.call(g), Q; !(Q = se.next()).done; )
541
+ Rn(Q.value) && Wn(Q.value, T);
542
542
  }
543
543
  }
544
544
  }
545
- function gr(m) {
545
+ function gr(g) {
546
546
  {
547
- var I = m.type;
548
- if (I == null || typeof I == "string")
547
+ var T = g.type;
548
+ if (T == null || typeof T == "string")
549
549
  return;
550
550
  var j;
551
- if (typeof I == "function")
552
- j = I.propTypes;
553
- else if (typeof I == "object" && (I.$$typeof === l || // Note: Memo only checks outer props here.
551
+ if (typeof T == "function")
552
+ j = T.propTypes;
553
+ else if (typeof T == "object" && (T.$$typeof === l || // Note: Memo only checks outer props here.
554
554
  // Inner props are checked in the reconciler.
555
- I.$$typeof === f))
556
- j = I.propTypes;
555
+ T.$$typeof === f))
556
+ j = T.propTypes;
557
557
  else
558
558
  return;
559
559
  if (j) {
560
- var U = V(I);
561
- _e(j, m.props, "prop", U, m);
562
- } else if (I.PropTypes !== void 0 && !sn) {
560
+ var U = V(T);
561
+ _e(j, g.props, "prop", U, g);
562
+ } else if (T.PropTypes !== void 0 && !sn) {
563
563
  sn = !0;
564
- var ee = V(I);
564
+ var ee = V(T);
565
565
  b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", ee || "Unknown");
566
566
  }
567
- typeof I.getDefaultProps == "function" && !I.getDefaultProps.isReactClassApproved && b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
567
+ typeof T.getDefaultProps == "function" && !T.getDefaultProps.isReactClassApproved && b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
568
568
  }
569
569
  }
570
- function xr(m) {
570
+ function xr(g) {
571
571
  {
572
- for (var I = Object.keys(m.props), j = 0; j < I.length; j++) {
573
- var U = I[j];
572
+ for (var T = Object.keys(g.props), j = 0; j < T.length; j++) {
573
+ var U = T[j];
574
574
  if (U !== "children" && U !== "key") {
575
- Pt(m), b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", U), Pt(null);
575
+ Pt(g), b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", U), Pt(null);
576
576
  break;
577
577
  }
578
578
  }
579
- m.ref !== null && (Pt(m), b("Invalid attribute `ref` supplied to `React.Fragment`."), Pt(null));
579
+ g.ref !== null && (Pt(g), b("Invalid attribute `ref` supplied to `React.Fragment`."), Pt(null));
580
580
  }
581
581
  }
582
582
  var ie = {};
583
- function xe(m, I, j, U, ee, se) {
583
+ function xe(g, T, j, U, ee, se) {
584
584
  {
585
- var Q = O(m);
585
+ var Q = O(g);
586
586
  if (!Q) {
587
587
  var ge = "";
588
- (m === void 0 || typeof m == "object" && m !== null && Object.keys(m).length === 0) && (ge += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
588
+ (g === void 0 || typeof g == "object" && g !== null && Object.keys(g).length === 0) && (ge += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
589
589
  var Se = pr();
590
590
  Se ? ge += Se : ge += Un();
591
591
  var Re;
592
- m === null ? Re = "null" : ne(m) ? Re = "array" : m !== void 0 && m.$$typeof === t ? (Re = "<" + (V(m.type) || "Unknown") + " />", ge = " Did you accidentally export a JSX literal instead of a component?") : Re = typeof m, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Re, ge);
592
+ g === null ? Re = "null" : ne(g) ? Re = "array" : g !== void 0 && g.$$typeof === t ? (Re = "<" + (V(g.type) || "Unknown") + " />", ge = " Did you accidentally export a JSX literal instead of a component?") : Re = typeof g, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Re, ge);
593
593
  }
594
- var Ke = hr(m, I, j, ee, se);
594
+ var Ke = hr(g, T, j, ee, se);
595
595
  if (Ke == null)
596
596
  return Ke;
597
597
  if (Q) {
598
- var Qe = I.children;
598
+ var Qe = T.children;
599
599
  if (Qe !== void 0)
600
600
  if (U)
601
601
  if (ne(Qe)) {
602
602
  for (var rt = 0; rt < Qe.length; rt++)
603
- Vn(Qe[rt], m);
603
+ Vn(Qe[rt], g);
604
604
  Object.freeze && Object.freeze(Qe);
605
605
  } else
606
606
  b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
607
607
  else
608
- Vn(Qe, m);
608
+ Vn(Qe, g);
609
609
  }
610
- if (Oe.call(I, "key")) {
611
- var lt = V(m), Ge = Object.keys(I).filter(function(En) {
610
+ if (Oe.call(T, "key")) {
611
+ var lt = V(g), Ge = Object.keys(T).filter(function(En) {
612
612
  return En !== "key";
613
613
  }), yt = Ge.length > 0 ? "{key: someKey, " + Ge.join(": ..., ") + ": ...}" : "{key: someKey}";
614
614
  if (!ie[lt + yt]) {
@@ -621,14 +621,14 @@ React keys must be passed directly to JSX without using spread:
621
621
  <%s key={someKey} {...props} />`, yt, lt, Nt, lt), ie[lt + yt] = !0;
622
622
  }
623
623
  }
624
- return m === r ? xr(Ke) : gr(Ke), Ke;
624
+ return g === r ? xr(Ke) : gr(Ke), Ke;
625
625
  }
626
626
  }
627
- function Me(m, I, j) {
628
- return xe(m, I, j, !0);
627
+ function Me(g, T, j) {
628
+ return xe(g, T, j, !0);
629
629
  }
630
- function ut(m, I, j) {
631
- return xe(m, I, j, !1);
630
+ function ut(g, T, j) {
631
+ return xe(g, T, j, !1);
632
632
  }
633
633
  var an = ut, Kn = Me;
634
634
  Hr.Fragment = r, Hr.jsx = an, Hr.jsxs = Kn;
@@ -973,10 +973,10 @@ function ks(e, t, n) {
973
973
  if (P.endsWith(y, "{}"))
974
974
  y = r ? y : y.slice(0, -2), w = JSON.stringify(w);
975
975
  else if (P.isArray(w) && Og(w) || (P.isFileList(w) || P.endsWith(y, "[]")) && (v = P.toArray(w)))
976
- return y = xu(y), v.forEach(function(S, T) {
976
+ return y = xu(y), v.forEach(function(S, I) {
977
977
  !(P.isUndefined(S) || S === null) && t.append(
978
978
  // eslint-disable-next-line no-nested-ternary
979
- i === !0 ? Cl([y], T, s) : i === null ? y : y + "[]",
979
+ i === !0 ? Cl([y], I, s) : i === null ? y : y + "[]",
980
980
  u(S)
981
981
  );
982
982
  }), !1;
@@ -1691,20 +1691,20 @@ const Tu = (e) => {
1691
1691
  !x || x.readyState !== 4 || x.status === 0 && !(x.responseURL && x.responseURL.indexOf("file:") === 0) || setTimeout(v);
1692
1692
  }, x.onabort = function() {
1693
1693
  x && (r(new De("Request aborted", De.ECONNABORTED, e, x)), x = null);
1694
- }, x.onerror = function(T) {
1695
- const C = T && T.message ? T.message : "Network Error", k = new De(C, De.ERR_NETWORK, e, x);
1696
- k.event = T || null, r(k), x = null;
1694
+ }, x.onerror = function(I) {
1695
+ const C = I && I.message ? I.message : "Network Error", k = new De(C, De.ERR_NETWORK, e, x);
1696
+ k.event = I || null, r(k), x = null;
1697
1697
  }, x.ontimeout = function() {
1698
- let T = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
1698
+ let I = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
1699
1699
  const C = o.transitional || wu;
1700
- o.timeoutErrorMessage && (T = o.timeoutErrorMessage), r(new De(
1701
- T,
1700
+ o.timeoutErrorMessage && (I = o.timeoutErrorMessage), r(new De(
1701
+ I,
1702
1702
  C.clarifyTimeoutError ? De.ETIMEDOUT : De.ECONNABORTED,
1703
1703
  e,
1704
1704
  x
1705
1705
  )), x = null;
1706
- }, s === void 0 && i.setContentType(null), "setRequestHeader" in x && P.forEach(i.toJSON(), function(T, C) {
1707
- x.setRequestHeader(C, T);
1706
+ }, s === void 0 && i.setContentType(null), "setRequestHeader" in x && P.forEach(i.toJSON(), function(I, C) {
1707
+ x.setRequestHeader(C, I);
1708
1708
  }), P.isUndefined(o.withCredentials) || (x.withCredentials = !!o.withCredentials), a && a !== "json" && (x.responseType = o.responseType), u && ([h, w] = Zo(u, !0), x.addEventListener("progress", h)), l && x.upload && ([f, p] = Zo(l), x.upload.addEventListener("progress", f), x.upload.addEventListener("loadend", p)), (o.cancelToken || o.signal) && (d = (S) => {
1709
1709
  x && (r(!S || S.type ? new Or(null, e, x) : S), x.abort(), x = null);
1710
1710
  }, o.cancelToken && o.cancelToken.subscribe(d), o.signal && (o.signal.aborted ? d() : o.signal.addEventListener("abort", d)));
@@ -1860,7 +1860,7 @@ const Tu = (e) => {
1860
1860
  data: v,
1861
1861
  signal: b,
1862
1862
  cancelToken: S,
1863
- timeout: T,
1863
+ timeout: I,
1864
1864
  onDownloadProgress: C,
1865
1865
  onUploadProgress: k,
1866
1866
  responseType: R,
@@ -1869,7 +1869,7 @@ const Tu = (e) => {
1869
1869
  fetchOptions: O
1870
1870
  } = Tu(w), L = t || fetch;
1871
1871
  R = R ? (R + "").toLowerCase() : "text";
1872
- let F = ux([b, S && S.toAbortSignal()], T), V = null;
1872
+ let F = ux([b, S && S.toAbortSignal()], I), V = null;
1873
1873
  const N = F && F.unsubscribe && (() => {
1874
1874
  F.unsubscribe();
1875
1875
  });
@@ -3030,7 +3030,7 @@ function Lx(e) {
3030
3030
  return t[t.length - 1] || null;
3031
3031
  }
3032
3032
  function Fx(e = {}) {
3033
- const t = dt(() => Cn(e.baseUrl), [e.baseUrl]), n = e.streamPath ?? "/runs/stream", [r, o] = we(e.token ?? null), s = We(e.headers ?? {}), i = e.credentials ?? "include", [a, l] = we(!1), [u, d] = we(null), [f, h] = we(""), [p, w] = we(null), [y, x] = we(0), [v, b] = we(!1), S = We(null), T = We(!0), C = We(0), k = Ne((O) => {
3033
+ const t = dt(() => Cn(e.baseUrl), [e.baseUrl]), n = e.streamPath ?? "/runs/stream", [r, o] = we(e.token ?? null), s = We(e.headers ?? {}), i = e.credentials ?? "include", [a, l] = we(!1), [u, d] = we(null), [f, h] = we(""), [p, w] = we(null), [y, x] = we(0), [v, b] = we(!1), S = We(null), I = We(!0), C = We(0), k = Ne((O) => {
3034
3034
  o(O);
3035
3035
  }, []), R = Ne(() => {
3036
3036
  var O;
@@ -3108,7 +3108,7 @@ function Fx(e = {}) {
3108
3108
  const me = () => {
3109
3109
  if ($.length) {
3110
3110
  const Oe = $.join("");
3111
- $ = [], T.current && h(($e) => $e + Oe);
3111
+ $ = [], I.current && h(($e) => $e + Oe);
3112
3112
  }
3113
3113
  J = null;
3114
3114
  }, oe = () => {
@@ -3197,7 +3197,7 @@ function Fx(e = {}) {
3197
3197
  );
3198
3198
  return st(() => () => {
3199
3199
  var O;
3200
- T.current = !1, (O = S.current) == null || O.abort();
3200
+ I.current = !1, (O = S.current) == null || O.abort();
3201
3201
  }, []), {
3202
3202
  isStreaming: a,
3203
3203
  error: u,
@@ -3640,7 +3640,7 @@ function Qx(e) {
3640
3640
  ui(n, (B = t.getAuthToken) == null ? void 0 : B.call(t))
3641
3641
  );
3642
3642
  return To(N);
3643
- }), u = dt(() => fi(a), [a]), [d, f] = we(o), [h, p] = we(!1), [w, y] = we(null), x = We(u.length), v = We(!1), b = We(null), S = We(""), T = We(!1), C = We(null);
3643
+ }), u = dt(() => fi(a), [a]), [d, f] = we(o), [h, p] = we(!1), [w, y] = we(null), x = We(u.length), v = We(!1), b = We(null), S = We(""), I = We(!1), C = We(null);
3644
3644
  st(() => {
3645
3645
  x.current = u.length;
3646
3646
  }, [u.length]);
@@ -3696,7 +3696,7 @@ function Qx(e) {
3696
3696
  } catch (B) {
3697
3697
  r == null || r(String(B)), console.error("[useThreadList] Failed to refresh threads:", B), y(String(B));
3698
3698
  } finally {
3699
- N || p(!1);
3699
+ p(!1);
3700
3700
  }
3701
3701
  }, [t, r]), O = Ne(
3702
3702
  async (N) => {
@@ -3776,9 +3776,9 @@ function Qx(e) {
3776
3776
  var H, M, D;
3777
3777
  const N = (X) => {
3778
3778
  const _ = ui(n, X ?? null);
3779
- C.current !== _ && (C.current = _, T.current = !1), i(_);
3779
+ C.current !== _ && (C.current = _, I.current = !1), i(_);
3780
3780
  const G = di(_);
3781
- l(To(G)), T.current || (T.current = !0, A().catch(() => {
3781
+ l(To(G)), I.current || (I.current = !0, A().catch(() => {
3782
3782
  }));
3783
3783
  }, B = ((H = t.getAuthToken) == null ? void 0 : H.call(t)) ?? null;
3784
3784
  (M = e.onAuthTokenChange) == null || M.call(e, B), N(B);
@@ -3838,57 +3838,57 @@ function tv({
3838
3838
  } catch {
3839
3839
  return "unknown";
3840
3840
  }
3841
- }, [u]), h = dt(() => `threadPayload:${Gx}:${f}:`, [f]), p = Ne((m) => `${h}${m}`, [h]), w = Ne((m) => {
3842
- if (!m || typeof m != "object") return null;
3843
- const I = m;
3844
- if (typeof I.threadId != "string") return null;
3845
- const j = Array.isArray(I.checkpoints) ? I.checkpoints.filter((Q) => Q && typeof Q == "object") : [], U = Array.isArray(I.pendingCheckpoints) ? I.pendingCheckpoints.map((Q) => $u(Q)).filter((Q) => !!Q) : [], ee = I.activeCheckpointId === null || I.activeCheckpointId === void 0 ? null : ht(I.activeCheckpointId) ?? null, se = I.activeCheckpointNs === null || I.activeCheckpointNs === void 0 ? null : ht(I.activeCheckpointNs) ?? null;
3841
+ }, [u]), h = dt(() => `threadPayload:${Gx}:${f}:`, [f]), p = Ne((g) => `${h}${g}`, [h]), w = Ne((g) => {
3842
+ if (!g || typeof g != "object") return null;
3843
+ const T = g;
3844
+ if (typeof T.threadId != "string") return null;
3845
+ const j = Array.isArray(T.checkpoints) ? T.checkpoints.filter((Q) => Q && typeof Q == "object") : [], U = Array.isArray(T.pendingCheckpoints) ? T.pendingCheckpoints.map((Q) => $u(Q)).filter((Q) => !!Q) : [], ee = T.activeCheckpointId === null || T.activeCheckpointId === void 0 ? null : ht(T.activeCheckpointId) ?? null, se = T.activeCheckpointNs === null || T.activeCheckpointNs === void 0 ? null : ht(T.activeCheckpointNs) ?? null;
3846
3846
  return {
3847
- threadId: I.threadId,
3847
+ threadId: T.threadId,
3848
3848
  checkpoints: j,
3849
3849
  pendingCheckpoints: U,
3850
3850
  activeCheckpointId: ee,
3851
3851
  activeCheckpointNs: se
3852
3852
  };
3853
- }, []), y = Ne((m) => {
3854
- const I = wa(p(m));
3855
- if (!I) return null;
3853
+ }, []), y = Ne((g) => {
3854
+ const T = wa(p(g));
3855
+ if (!T) return null;
3856
3856
  try {
3857
- const j = JSON.parse(I);
3857
+ const j = JSON.parse(T);
3858
3858
  return w(j);
3859
3859
  } catch {
3860
3860
  return null;
3861
3861
  }
3862
- }, [p, w]), x = Ne((m) => {
3863
- const I = {
3864
- threadId: m.threadId,
3865
- checkpoints: Array.isArray(m.checkpoints) ? m.checkpoints : [],
3866
- pendingCheckpoints: Array.isArray(m.pendingCheckpoints) ? m.pendingCheckpoints.map((j) => ({
3862
+ }, [p, w]), x = Ne((g) => {
3863
+ const T = {
3864
+ threadId: g.threadId,
3865
+ checkpoints: Array.isArray(g.checkpoints) ? g.checkpoints : [],
3866
+ pendingCheckpoints: Array.isArray(g.pendingCheckpoints) ? g.pendingCheckpoints.map((j) => ({
3867
3867
  checkpointId: j.checkpointId,
3868
3868
  checkpointNs: j.checkpointNs ?? null
3869
3869
  })) : [],
3870
- activeCheckpointId: m.activeCheckpointId ?? null,
3871
- activeCheckpointNs: m.activeCheckpointNs ?? null
3870
+ activeCheckpointId: g.activeCheckpointId ?? null,
3871
+ activeCheckpointNs: g.activeCheckpointNs ?? null
3872
3872
  };
3873
3873
  try {
3874
- Bu(p(m.threadId), JSON.stringify(I));
3874
+ Bu(p(g.threadId), JSON.stringify(T));
3875
3875
  } catch {
3876
3876
  }
3877
- }, [p]), v = Ne((m) => {
3878
- Hu(p(m));
3877
+ }, [p]), v = Ne((g) => {
3878
+ Hu(p(g));
3879
3879
  }, [p]), b = Ne(() => {
3880
3880
  if (Ar())
3881
3881
  try {
3882
- const m = h;
3883
- for (let I = 0; I < window.localStorage.length; I++) {
3884
- const j = window.localStorage.key(I);
3885
- j && j.startsWith(m) && window.localStorage.removeItem(j);
3882
+ const g = h;
3883
+ for (let T = 0; T < window.localStorage.length; T++) {
3884
+ const j = window.localStorage.key(T);
3885
+ j && j.startsWith(g) && window.localStorage.removeItem(j);
3886
3886
  }
3887
3887
  } catch {
3888
3888
  }
3889
3889
  }, [h]), S = We(() => {
3890
3890
  }), {
3891
- threads: T,
3891
+ threads: I,
3892
3892
  currentThreadId: C,
3893
3893
  setCurrentThreadId: k,
3894
3894
  isLoadingThreads: R,
@@ -3906,7 +3906,7 @@ function tv({
3906
3906
  onError: i,
3907
3907
  initialThreadId: t,
3908
3908
  clearAllMessageCaches: b,
3909
- onAuthTokenChange: (m) => S.current(m ?? null)
3909
+ onAuthTokenChange: (g) => S.current(g ?? null)
3910
3910
  }), [z, H] = we(!1), [M, D] = we(null), [X, _] = we(null), [G, ce] = we(!1), [ye, Ce] = we(!1), [de, K] = we([]), [$, Y] = we([]), J = We([]), [me, oe] = we(null), {
3911
3911
  state: te,
3912
3912
  dispatch: Xe,
@@ -3919,11 +3919,11 @@ function tv({
3919
3919
  st(() => {
3920
3920
  _e.current = C;
3921
3921
  }, [C]);
3922
- const pt = We(!1), ne = We([]), ae = We(null), he = We(null), be = We(/* @__PURE__ */ new Map()), pe = We(C), Ie = We({ threadId: null, checkpointId: null, checkpointNs: null }), Ze = Ne((m, I) => new Promise((j, U) => {
3922
+ const pt = We(!1), ne = We([]), ae = We(null), he = We(null), be = We(/* @__PURE__ */ new Map()), pe = We(C), Ie = We({ threadId: null, checkpointId: null, checkpointNs: null }), Ze = Ne((g, T) => new Promise((j, U) => {
3923
3923
  const ee = async () => {
3924
3924
  pt.current = !0;
3925
3925
  try {
3926
- await m(), j();
3926
+ await g(), j();
3927
3927
  } catch (se) {
3928
3928
  U(se);
3929
3929
  } finally {
@@ -3939,8 +3939,8 @@ function tv({
3939
3939
  }), []);
3940
3940
  st(() => {
3941
3941
  var ee;
3942
- const m = _e.current;
3943
- if (!m) {
3942
+ const g = _e.current;
3943
+ if (!g) {
3944
3944
  X !== null && _(null), Ie.current = {
3945
3945
  threadId: null,
3946
3946
  checkpointId: null,
@@ -3948,17 +3948,17 @@ function tv({
3948
3948
  };
3949
3949
  return;
3950
3950
  }
3951
- const I = te.pendingInterrupt ?? Hx(te.messages);
3952
- if (I) {
3953
- li(X, I) || _(I), Ie.current = {
3954
- threadId: m,
3951
+ const T = te.pendingInterrupt ?? Hx(te.messages);
3952
+ if (T) {
3953
+ li(X, T) || _(T), Ie.current = {
3954
+ threadId: g,
3955
3955
  checkpointId: te.lastCheckpointId ?? null,
3956
3956
  checkpointNs: te.lastCheckpointNs ?? null
3957
3957
  };
3958
3958
  return;
3959
3959
  }
3960
3960
  const j = {
3961
- threadId: m,
3961
+ threadId: g,
3962
3962
  checkpointId: te.lastCheckpointId ?? null,
3963
3963
  checkpointNs: te.lastCheckpointNs ?? null
3964
3964
  };
@@ -3979,7 +3979,7 @@ function tv({
3979
3979
  }
3980
3980
  let U = !1;
3981
3981
  return Ie.current = j, l.getState({
3982
- threadId: m,
3982
+ threadId: g,
3983
3983
  checkpointId: j.checkpointId ?? void 0,
3984
3984
  checkpointNs: j.checkpointNs ?? void 0
3985
3985
  }).then((se) => {
@@ -4001,17 +4001,17 @@ function tv({
4001
4001
  te.pendingInterrupt
4002
4002
  ]);
4003
4003
  const ze = We(!1), nt = We(null), ft = Ne(
4004
- (m, I, j, U) => {
4005
- const ee = Array.isArray(m == null ? void 0 : m.checkpoints) ? m.checkpoints.filter((vr) => vr && typeof vr == "object") : [], se = Vx(ee), Q = j ?? (m == null ? void 0 : m.threadId) ?? _e.current;
4004
+ (g, T, j, U) => {
4005
+ const ee = Array.isArray(g == null ? void 0 : g.checkpoints) ? g.checkpoints.filter((vr) => vr && typeof vr == "object") : [], se = Vx(ee), Q = j ?? (g == null ? void 0 : g.threadId) ?? _e.current;
4006
4006
  if (!Q)
4007
4007
  return;
4008
- const ge = Q === _e.current, Se = I === "replace" ? null : be.current.get(Q) ?? null, Re = I === "replace" ? [] : ge ? de : (Se == null ? void 0 : Se.checkpoints) ?? [], Ke = I === "replace" ? [] : ge ? J.current : (Se == null ? void 0 : Se.pendingCheckpoints) ?? [], Qe = {
4009
- checkpointId: (m == null ? void 0 : m.checkpointId) ?? null,
4010
- checkpointNs: (m == null ? void 0 : m.checkpointNs) ?? null
4008
+ const ge = Q === _e.current, Se = T === "replace" ? null : be.current.get(Q) ?? null, Re = T === "replace" ? [] : ge ? de : (Se == null ? void 0 : Se.checkpoints) ?? [], Ke = T === "replace" ? [] : ge ? J.current : (Se == null ? void 0 : Se.pendingCheckpoints) ?? [], Qe = {
4009
+ checkpointId: (g == null ? void 0 : g.checkpointId) ?? null,
4010
+ checkpointNs: (g == null ? void 0 : g.checkpointNs) ?? null
4011
4011
  }, rt = se[se.length - 1] ?? null, lt = Yn(rt, Qe), Ge = {
4012
- checkpointId: (U == null ? void 0 : U.checkpointId) ?? (I === "replace" ? lt.checkpointId : (ge ? te.lastCheckpointId ?? null : (Se == null ? void 0 : Se.activeCheckpointId) ?? null) ?? lt.checkpointId),
4013
- checkpointNs: (U == null ? void 0 : U.checkpointNs) ?? (I === "replace" ? lt.checkpointNs : (ge ? te.lastCheckpointNs ?? null : (Se == null ? void 0 : Se.activeCheckpointNs) ?? null) ?? lt.checkpointNs)
4014
- }, yt = Ux(Re, se, I), Nt = Kx(yt, Ke), En = {
4012
+ checkpointId: (U == null ? void 0 : U.checkpointId) ?? (T === "replace" ? lt.checkpointId : (ge ? te.lastCheckpointId ?? null : (Se == null ? void 0 : Se.activeCheckpointId) ?? null) ?? lt.checkpointId),
4013
+ checkpointNs: (U == null ? void 0 : U.checkpointNs) ?? (T === "replace" ? lt.checkpointNs : (ge ? te.lastCheckpointNs ?? null : (Se == null ? void 0 : Se.activeCheckpointNs) ?? null) ?? lt.checkpointNs)
4014
+ }, yt = Ux(Re, se, T), Nt = Kx(yt, Ke), En = {
4015
4015
  threadId: Q,
4016
4016
  checkpoints: yt,
4017
4017
  pendingCheckpoints: Nt,
@@ -4022,13 +4022,13 @@ function tv({
4022
4022
  return;
4023
4023
  J.current = Nt, Y(Nt), ce(Nt.length > 0), K(yt);
4024
4024
  const Ot = ko(yt, Ge) ?? yt[yt.length - 1] ?? null;
4025
- if (oe(Ot), I === "replace") {
4025
+ if (oe(Ot), T === "replace") {
4026
4026
  const vr = Nn(Ot ?? rt);
4027
4027
  Ue(vr, {
4028
4028
  checkpointId: Ge.checkpointId,
4029
4029
  checkpointNs: Ge.checkpointNs
4030
4030
  });
4031
- } else if (I === "prepend") {
4031
+ } else if (T === "prepend") {
4032
4032
  const pl = Nn(rt ?? Ot);
4033
4033
  pl.length && Oe(pl);
4034
4034
  }
@@ -4046,23 +4046,23 @@ function tv({
4046
4046
  oe
4047
4047
  ]
4048
4048
  ), Et = Ne(
4049
- (m) => {
4050
- if (m.threadId != null && m.threadId !== _e.current)
4049
+ (g) => {
4050
+ if (g.threadId != null && g.threadId !== _e.current)
4051
4051
  return;
4052
- const I = Array.isArray(m.checkpoints) ? m.checkpoints : [];
4053
- K(I);
4054
- const j = Array.isArray(m.pendingCheckpoints) ? m.pendingCheckpoints : [];
4052
+ const T = Array.isArray(g.checkpoints) ? g.checkpoints : [];
4053
+ K(T);
4054
+ const j = Array.isArray(g.pendingCheckpoints) ? g.pendingCheckpoints : [];
4055
4055
  J.current = j, Y(j), ce(j.length > 0);
4056
4056
  const U = {
4057
- checkpointId: m.activeCheckpointId ?? null,
4058
- checkpointNs: m.activeCheckpointNs ?? null
4059
- }, ee = ko(I, U) ?? I[I.length - 1] ?? null;
4057
+ checkpointId: g.activeCheckpointId ?? null,
4058
+ checkpointNs: g.activeCheckpointNs ?? null
4059
+ }, ee = ko(T, U) ?? T[T.length - 1] ?? null;
4060
4060
  oe(ee);
4061
4061
  const se = Nn(ee);
4062
4062
  Ue(se, {
4063
4063
  checkpointId: U.checkpointId,
4064
4064
  checkpointNs: U.checkpointNs
4065
- }), pe.current = m.threadId;
4065
+ }), pe.current = g.threadId;
4066
4066
  },
4067
4067
  [
4068
4068
  Ue,
@@ -4075,15 +4075,15 @@ function tv({
4075
4075
  );
4076
4076
  st(() => {
4077
4077
  if (!_e.current || !de.length) return;
4078
- const m = {
4078
+ const g = {
4079
4079
  checkpointId: te.lastCheckpointId ?? null,
4080
4080
  checkpointNs: te.lastCheckpointNs ?? null
4081
- }, I = m.checkpointId ? va(m) : null;
4081
+ }, T = g.checkpointId ? va(g) : null;
4082
4082
  let j = !1;
4083
4083
  const U = de.map((ee, se) => {
4084
4084
  var Qe;
4085
4085
  const Q = mo(ee);
4086
- if (!(I ? Q === I : se === de.length - 1))
4086
+ if (!(T ? Q === T : se === de.length - 1))
4087
4087
  return ee;
4088
4088
  const Se = Array.isArray(
4089
4089
  (Qe = ee.values) == null ? void 0 : Qe.messages
@@ -4101,30 +4101,30 @@ function tv({
4101
4101
  });
4102
4102
  j && K(U);
4103
4103
  }, [de, te.lastCheckpointId, te.lastCheckpointNs, te.messages]);
4104
- const Gt = Ne((m) => {
4105
- m && (be.current.delete(m), v(m), pe.current === m && (pe.current = null));
4104
+ const Gt = Ne((g) => {
4105
+ g && (be.current.delete(g), v(g), pe.current === g && (pe.current = null));
4106
4106
  }, [v]), rn = Ne(() => {
4107
- const m = _e.current;
4108
- m && Gt(m), Je([]), ce(!1), Ce(!1), K([]), Y([]), J.current = [], oe(null);
4109
- }, [Gt, Je]), Hn = Ne(({ from: m, to: I }) => {
4107
+ const g = _e.current;
4108
+ g && Gt(g), Je([]), ce(!1), Ce(!1), K([]), Y([]), J.current = [], oe(null);
4109
+ }, [Gt, Je]), Hn = Ne(({ from: g, to: T }) => {
4110
4110
  const j = _e.current;
4111
4111
  j && console.warn(
4112
- `[ChatSessionProvider] Stream sequence gap detected (${m} -> ${I}) for thread ${j}`
4112
+ `[ChatSessionProvider] Stream sequence gap detected (${g} -> ${T}) for thread ${j}`
4113
4113
  );
4114
4114
  }, []), zr = Ne(
4115
- (m) => {
4116
- const I = m, j = ht(m.threadId) ?? ht(I.thread_id) ?? ht(I.id);
4115
+ (g) => {
4116
+ const T = g, j = ht(g.threadId) ?? ht(T.thread_id) ?? ht(T.id);
4117
4117
  if (!j) {
4118
- console.warn("[ChatSessionProvider] thread_info event missing threadId", m);
4118
+ console.warn("[ChatSessionProvider] thread_info event missing threadId", g);
4119
4119
  return;
4120
4120
  }
4121
4121
  console.log("[ChatSessionProvider] 📥 Handling thread_info event:", {
4122
4122
  threadId: j,
4123
- title: ht(m.title) ?? ht(I.title),
4124
- created: ht(m.createdAt) ?? ht(I.created_at),
4125
- currentThreads: T.length
4123
+ title: ht(g.title) ?? ht(T.title),
4124
+ created: ht(g.createdAt) ?? ht(T.created_at),
4125
+ currentThreads: I.length
4126
4126
  });
4127
- const U = ht(m.title) ?? ht(I.title) ?? `Thread ${j.slice(0, 8)}`, ee = ht(m.createdAt) ?? ht(I.created_at) ?? (/* @__PURE__ */ new Date()).toISOString(), se = ht(m.updatedAt) ?? ht(I.updated_at) ?? ee, Q = m.messageCount ?? I.message_count ?? I.messages_count;
4127
+ const U = ht(g.title) ?? ht(T.title) ?? `Thread ${j.slice(0, 8)}`, ee = ht(g.createdAt) ?? ht(T.created_at) ?? (/* @__PURE__ */ new Date()).toISOString(), se = ht(g.updatedAt) ?? ht(T.updated_at) ?? ee, Q = g.messageCount ?? T.message_count ?? T.messages_count;
4128
4128
  let ge = 0;
4129
4129
  if (typeof Q == "number" && Number.isFinite(Q))
4130
4130
  ge = Q;
@@ -4143,69 +4143,69 @@ function tv({
4143
4143
  B(Se);
4144
4144
  });
4145
4145
  },
4146
- [te.messages.length, T.length, B]
4146
+ [te.messages.length, I.length, B]
4147
4147
  ), { startStream: hr, stop: In, isStreaming: on, error: Pt, setAuthToken: sn } = Bx({
4148
4148
  baseUrl: d,
4149
4149
  onThreadInfo: zr,
4150
4150
  onMessageEvent: ot,
4151
- onUnhandledEvent: (m) => {
4152
- console.warn(`[ChatSessionProvider] Unhandled stream event: ${m.type}`, m);
4151
+ onUnhandledEvent: (g) => {
4152
+ console.warn(`[ChatSessionProvider] Unhandled stream event: ${g.type}`, g);
4153
4153
  },
4154
4154
  onSequenceGap: Hn
4155
4155
  });
4156
4156
  st(() => {
4157
4157
  ze.current = on;
4158
4158
  }, [on]), st(() => {
4159
- S.current = (m) => sn(m ?? null);
4159
+ S.current = (g) => sn(g ?? null);
4160
4160
  }, [sn]), st(() => {
4161
- var m;
4162
- S.current(((m = l.getAuthToken) == null ? void 0 : m.call(l)) ?? null);
4161
+ var g;
4162
+ S.current(((g = l.getAuthToken) == null ? void 0 : g.call(l)) ?? null);
4163
4163
  }, [l]);
4164
4164
  const Rn = Ne(
4165
- async (m) => {
4166
- const I = await O(m);
4167
- return (I == null ? void 0 : I.threadId) ?? null;
4165
+ async (g) => {
4166
+ const T = await O(g);
4167
+ return (T == null ? void 0 : T.threadId) ?? null;
4168
4168
  },
4169
4169
  [O]
4170
4170
  ), Un = Ne(
4171
- async (m) => {
4172
- const I = _e.current === m;
4173
- await L(m), Gt(m), I && (he.current = m, k(null), _e.current = null, pe.current = null, rn());
4171
+ async (g) => {
4172
+ const T = _e.current === g;
4173
+ await L(g), Gt(g), T && (he.current = g, k(null), _e.current = null, pe.current = null, rn());
4174
4174
  },
4175
4175
  [L, rn, Gt, k]
4176
4176
  ), pr = Ne(
4177
- (m, I) => F(m, I),
4177
+ (g, T) => F(g, T),
4178
4178
  [F]
4179
4179
  ), Yt = Ne(
4180
- async (m, I, j, U = !1) => {
4180
+ async (g, T, j, U = !1) => {
4181
4181
  await Ze(async () => {
4182
- if (he.current === m && !U) {
4182
+ if (he.current === g && !U) {
4183
4183
  he.current = null;
4184
4184
  return;
4185
4185
  }
4186
- if (ae.current === m && !U)
4186
+ if (ae.current === g && !U)
4187
4187
  return;
4188
- k((Se) => Se === m ? Se : m), _e.current = m;
4189
- const ee = !U && !I && !j;
4188
+ k((Se) => Se === g ? Se : g), _e.current = g;
4189
+ const ee = !U && !T && !j;
4190
4190
  let se = !1;
4191
4191
  if (ee) {
4192
- const Se = be.current.get(m);
4192
+ const Se = be.current.get(g);
4193
4193
  if (Se)
4194
4194
  Et(Se), se = !0;
4195
4195
  else {
4196
- const Re = y(m);
4197
- Re && (be.current.set(m, Re), Et(Re), se = !0);
4196
+ const Re = y(g);
4197
+ Re && (be.current.set(g, Re), Et(Re), se = !0);
4198
4198
  }
4199
4199
  }
4200
- const Q = U || !se || !!I || !!j, ge = async (Se) => {
4201
- Se && H(!0), ae.current = m;
4200
+ const Q = U || !se || !!T || !!j, ge = async (Se) => {
4201
+ Se && H(!0), ae.current = g;
4202
4202
  try {
4203
4203
  const Re = await l.getStateHistory({
4204
- threadId: m,
4205
- checkpointId: I,
4204
+ threadId: g,
4205
+ checkpointId: T,
4206
4206
  checkpointNs: j
4207
4207
  });
4208
- ft(Re, "replace", m), D(null);
4208
+ ft(Re, "replace", g), D(null);
4209
4209
  } catch (Re) {
4210
4210
  throw (!se || U || Se) && (i == null || i(String(Re))), D(String(Re)), Re;
4211
4211
  } finally {
@@ -4215,31 +4215,31 @@ function tv({
4215
4215
  Q ? await ge(!0) : ee && se && ge(!1).catch((Se) => {
4216
4216
  console.warn("[ChatSessionProvider] Background refresh failed:", Se);
4217
4217
  });
4218
- }, `loadThread-${m}`);
4218
+ }, `loadThread-${g}`);
4219
4219
  },
4220
4220
  [l, Et, ft, Ze, i]
4221
4221
  ), mr = Ne(async () => {
4222
4222
  await Ze(async () => {
4223
- const m = _e.current;
4224
- m && Gt(m), he.current = null, k(null), _e.current = null, pe.current = null, rn();
4223
+ const g = _e.current;
4224
+ g && Gt(g), he.current = null, k(null), _e.current = null, pe.current = null, rn();
4225
4225
  try {
4226
4226
  localStorage.removeItem("lastThreadId");
4227
- } catch (I) {
4228
- console.warn("[ChatSessionProvider] Failed to clear lastThreadId:", I);
4227
+ } catch (T) {
4228
+ console.warn("[ChatSessionProvider] Failed to clear lastThreadId:", T);
4229
4229
  }
4230
4230
  }, "clearCurrentThread");
4231
4231
  }, [rn, Gt, Ze]), Wn = Ne(
4232
- async (m, I) => {
4232
+ async (g, T) => {
4233
4233
  if (!_e.current) throw new Error("No active thread");
4234
4234
  const U = ko(de, {
4235
- checkpointId: m,
4236
- checkpointNs: I ?? null
4235
+ checkpointId: g,
4236
+ checkpointNs: T ?? null
4237
4237
  });
4238
4238
  if (!U)
4239
- throw new Error(`Checkpoint ${m} not found in loaded history`);
4239
+ throw new Error(`Checkpoint ${g} not found in loaded history`);
4240
4240
  const ee = {
4241
- checkpointId: m,
4242
- checkpointNs: I ?? null
4241
+ checkpointId: g,
4242
+ checkpointNs: T ?? null
4243
4243
  }, se = {
4244
4244
  threadId: _e.current,
4245
4245
  checkpoints: de,
@@ -4262,12 +4262,12 @@ function tv({
4262
4262
  oe
4263
4263
  ]
4264
4264
  ), Vn = Ne(async () => {
4265
- var I, j;
4265
+ var T, j;
4266
4266
  if (!_e.current) throw new Error("No active thread");
4267
- const m = de[de.length - 1];
4268
- if (m) {
4269
- const U = m.config, ee = {
4270
- checkpointId: ((I = U == null ? void 0 : U.configurable) == null ? void 0 : I.checkpoint_id) ?? null,
4267
+ const g = de[de.length - 1];
4268
+ if (g) {
4269
+ const U = g.config, ee = {
4270
+ checkpointId: ((T = U == null ? void 0 : U.configurable) == null ? void 0 : T.checkpoint_id) ?? null,
4271
4271
  checkpointNs: ((j = U == null ? void 0 : U.configurable) == null ? void 0 : j.checkpoint_ns) ?? null
4272
4272
  }, se = {
4273
4273
  threadId: _e.current,
@@ -4276,8 +4276,8 @@ function tv({
4276
4276
  activeCheckpointId: ee.checkpointId,
4277
4277
  activeCheckpointNs: ee.checkpointNs
4278
4278
  };
4279
- be.current.set(_e.current, se), pe.current = _e.current, oe(m);
4280
- const Q = Nn(m);
4279
+ be.current.set(_e.current, se), pe.current = _e.current, oe(g);
4280
+ const Q = Nn(g);
4281
4281
  Ue(Q, {
4282
4282
  checkpointId: ee.checkpointId,
4283
4283
  checkpointNs: ee.checkpointNs
@@ -4294,18 +4294,18 @@ function tv({
4294
4294
  async () => {
4295
4295
  if (!_e.current) throw new Error("No active thread");
4296
4296
  if (ye) return;
4297
- const m = J.current;
4298
- if (!m.length) {
4297
+ const g = J.current;
4298
+ if (!g.length) {
4299
4299
  ce(!1);
4300
4300
  return;
4301
4301
  }
4302
- const [I, ...j] = m;
4302
+ const [T, ...j] = g;
4303
4303
  J.current = j, Y(j), Ce(!0);
4304
4304
  try {
4305
4305
  const U = _e.current, ee = await l.getStateHistory({
4306
4306
  threadId: U,
4307
- checkpointId: I.checkpointId,
4308
- checkpointNs: I.checkpointNs ?? void 0
4307
+ checkpointId: T.checkpointId,
4308
+ checkpointNs: T.checkpointNs ?? void 0
4309
4309
  });
4310
4310
  ft(
4311
4311
  ee,
@@ -4317,7 +4317,7 @@ function tv({
4317
4317
  }
4318
4318
  ), D(null);
4319
4319
  } catch (U) {
4320
- throw J.current = [I, ...J.current], Y(J.current), ce(!0), D(String(U)), U;
4320
+ throw J.current = [T, ...J.current], Y(J.current), ce(!0), D(String(U)), U;
4321
4321
  } finally {
4322
4322
  Ce(!1);
4323
4323
  }
@@ -4332,11 +4332,11 @@ function tv({
4332
4332
  Y
4333
4333
  ]
4334
4334
  ), xr = Ne(
4335
- (m) => {
4335
+ (g) => {
4336
4336
  var Ke, Qe, rt, lt, Ge, yt, Nt;
4337
- const I = ((Ke = m == null ? void 0 : m.config) == null ? void 0 : Ke.threadId) ?? ((Qe = m == null ? void 0 : m.config) == null ? void 0 : Qe.thread_id) ?? (m == null ? void 0 : m.threadId) ?? (m == null ? void 0 : m.thread_id), j = ht(I);
4337
+ const T = ((Ke = g == null ? void 0 : g.config) == null ? void 0 : Ke.threadId) ?? ((Qe = g == null ? void 0 : g.config) == null ? void 0 : Qe.thread_id) ?? (g == null ? void 0 : g.threadId) ?? (g == null ? void 0 : g.thread_id), j = ht(T);
4338
4338
  if (!j) return;
4339
- const U = ((rt = m == null ? void 0 : m.config) == null ? void 0 : rt.checkpointId) ?? ((lt = m == null ? void 0 : m.config) == null ? void 0 : lt.checkpoint_id) ?? (m == null ? void 0 : m.checkpointId) ?? (m == null ? void 0 : m.checkpoint_id) ?? ((Ge = m == null ? void 0 : m.checkpoint) == null ? void 0 : Ge.id), ee = ht(U) ?? void 0, se = ((yt = m == null ? void 0 : m.config) == null ? void 0 : yt.checkpointNs) ?? ((Nt = m == null ? void 0 : m.config) == null ? void 0 : Nt.checkpoint_ns) ?? (m == null ? void 0 : m.checkpointNs) ?? (m == null ? void 0 : m.checkpoint_ns), Q = ht(se) ?? void 0, ge = Nn(m), Se = {
4339
+ const U = ((rt = g == null ? void 0 : g.config) == null ? void 0 : rt.checkpointId) ?? ((lt = g == null ? void 0 : g.config) == null ? void 0 : lt.checkpoint_id) ?? (g == null ? void 0 : g.checkpointId) ?? (g == null ? void 0 : g.checkpoint_id) ?? ((Ge = g == null ? void 0 : g.checkpoint) == null ? void 0 : Ge.id), ee = ht(U) ?? void 0, se = ((yt = g == null ? void 0 : g.config) == null ? void 0 : yt.checkpointNs) ?? ((Nt = g == null ? void 0 : g.config) == null ? void 0 : Nt.checkpoint_ns) ?? (g == null ? void 0 : g.checkpointNs) ?? (g == null ? void 0 : g.checkpoint_ns), Q = ht(se) ?? void 0, ge = Nn(g), Se = {
4340
4340
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
4341
4341
  config: {
4342
4342
  configurable: {
@@ -4348,7 +4348,7 @@ function tv({
4348
4348
  values: { messages: ge },
4349
4349
  next: [],
4350
4350
  parentConfig: null,
4351
- tasks: m.tasks ?? []
4351
+ tasks: g.tasks ?? []
4352
4352
  };
4353
4353
  ft({
4354
4354
  threadId: j,
@@ -4363,11 +4363,11 @@ function tv({
4363
4363
  },
4364
4364
  [ft]
4365
4365
  ), ie = Ne(
4366
- async (m, I) => {
4366
+ async (g, T) => {
4367
4367
  var En;
4368
- const j = _e.current, U = (m == null ? void 0 : m.text) ?? "", ee = (m == null ? void 0 : m.attachments) ?? [], se = ee.length ? ee : (I == null ? void 0 : I.attachments) ?? [], Q = {
4369
- ...(I == null ? void 0 : I.payloadExtras) ?? {},
4370
- ...(m == null ? void 0 : m.payload) ?? {}
4368
+ const j = _e.current, U = (g == null ? void 0 : g.text) ?? "", ee = (g == null ? void 0 : g.attachments) ?? [], se = ee.length ? ee : (T == null ? void 0 : T.attachments) ?? [], Q = {
4369
+ ...(T == null ? void 0 : T.payloadExtras) ?? {},
4370
+ ...(g == null ? void 0 : g.payload) ?? {}
4371
4371
  };
4372
4372
  if (!j && !Object.keys(Q).length && se.length === 0 && !U.trim()) {
4373
4373
  console.warn("[ChatSessionProvider] Nothing to submit - skipping");
@@ -4379,7 +4379,7 @@ function tv({
4379
4379
  se
4380
4380
  ), Re = [...ge];
4381
4381
  U && U.trim() && Re.push({ type: "text", text: U.trim() });
4382
- const Ke = !!j, Qe = Ke ? (I == null ? void 0 : I.checkpointId) ?? te.lastCheckpointId ?? void 0 : void 0, rt = Ke ? (I == null ? void 0 : I.checkpointNs) ?? te.lastCheckpointNs ?? void 0 : void 0, lt = {
4382
+ const Ke = !!j, Qe = Ke ? (T == null ? void 0 : T.checkpointId) ?? te.lastCheckpointId ?? void 0 : void 0, rt = Ke ? (T == null ? void 0 : T.checkpointNs) ?? te.lastCheckpointNs ?? void 0 : void 0, lt = {
4383
4383
  id: ((En = crypto.randomUUID) == null ? void 0 : En.call(crypto)) || `user-${Date.now()}`,
4384
4384
  role: "user",
4385
4385
  content: Re,
@@ -4398,8 +4398,8 @@ function tv({
4398
4398
  },
4399
4399
  ...Qe != null ? { checkpointId: Qe } : {},
4400
4400
  ...rt != null ? { checkpointNs: rt } : {},
4401
- nodeFilter: I == null ? void 0 : I.nodeFilter,
4402
- config: I == null ? void 0 : I.config
4401
+ nodeFilter: T == null ? void 0 : T.nodeFilter,
4402
+ config: T == null ? void 0 : T.config
4403
4403
  };
4404
4404
  hr(Nt, {
4405
4405
  onError: (Ot) => {
@@ -4423,15 +4423,15 @@ function tv({
4423
4423
  hr
4424
4424
  ]
4425
4425
  ), xe = Ne(
4426
- async (m, I, j) => {
4426
+ async (g, T, j) => {
4427
4427
  var ee, se;
4428
4428
  const U = _e.current;
4429
4429
  if (!U)
4430
4430
  throw new Error("No active thread to handle interrupt");
4431
4431
  try {
4432
- const Q = I ? j ?? !0 : !1;
4432
+ const Q = T ? j ?? !0 : !1;
4433
4433
  try {
4434
- Xe({ type: "interrupt_response", payload: { interruptId: m } });
4434
+ Xe({ type: "interrupt_response", payload: { interruptId: g } });
4435
4435
  } catch (lt) {
4436
4436
  console.warn("[ChatSessionProvider] optimistic interrupt_response dispatch failed:", lt);
4437
4437
  }
@@ -4472,50 +4472,50 @@ function tv({
4472
4472
  }
4473
4473
  _(null);
4474
4474
  } catch (Q) {
4475
- throw console.error(`[ChatSessionProvider] Failed to handle interrupt ${m}:`, Q), Q;
4475
+ throw console.error(`[ChatSessionProvider] Failed to handle interrupt ${g}:`, Q), Q;
4476
4476
  }
4477
4477
  },
4478
4478
  [l, Xe, d]
4479
4479
  ), Me = Ne(
4480
- (m) => xe(m.interruptId, m.approved, m.value),
4480
+ (g) => xe(g.interruptId, g.approved, g.value),
4481
4481
  [xe]
4482
4482
  );
4483
4483
  st(() => {
4484
4484
  if (a == null || a(C), C)
4485
4485
  try {
4486
4486
  localStorage.setItem("lastThreadId", C);
4487
- } catch (m) {
4488
- console.warn("[ChatSessionProvider] Failed to persist lastThreadId:", m);
4487
+ } catch (g) {
4488
+ console.warn("[ChatSessionProvider] Failed to persist lastThreadId:", g);
4489
4489
  }
4490
4490
  }, [C, a]), st(() => ((async () => {
4491
4491
  try {
4492
- if (A().catch((I) => {
4493
- console.error("[ChatSessionProvider] Failed to refresh threads (background):", I), i == null || i(String(I));
4492
+ if (A().catch((T) => {
4493
+ console.error("[ChatSessionProvider] Failed to refresh threads (background):", T), i == null || i(String(T));
4494
4494
  }), !r && !t)
4495
4495
  try {
4496
- const I = localStorage.getItem("lastThreadId");
4497
- I && (k(I), n && await Yt(I));
4498
- } catch (I) {
4499
- console.warn("[ChatSessionProvider] Failed to restore last thread:", I);
4496
+ const T = localStorage.getItem("lastThreadId");
4497
+ T && (k(T), n && await Yt(T));
4498
+ } catch (T) {
4499
+ console.warn("[ChatSessionProvider] Failed to restore last thread:", T);
4500
4500
  }
4501
4501
  else t && n && await Yt(t);
4502
- } catch (I) {
4503
- console.error("[ChatSessionProvider] Initialization failed:", I), i == null || i(String(I));
4502
+ } catch (T) {
4503
+ console.error("[ChatSessionProvider] Initialization failed:", T), i == null || i(String(T));
4504
4504
  }
4505
4505
  })(), () => {
4506
4506
  }), []), st(() => {
4507
- const m = _e.current;
4508
- if (!m || pe.current !== m) return;
4509
- const I = {
4510
- threadId: m,
4507
+ const g = _e.current;
4508
+ if (!g || pe.current !== g) return;
4509
+ const T = {
4510
+ threadId: g,
4511
4511
  checkpoints: de,
4512
4512
  pendingCheckpoints: J.current,
4513
4513
  activeCheckpointId: te.lastCheckpointId ?? null,
4514
4514
  activeCheckpointNs: te.lastCheckpointNs ?? null
4515
- }, j = be.current.get(m), U = !j || ql(j.checkpoints ?? []) !== ql(I.checkpoints), ee = (ge) => ge.map((Se) => es(Se)).join("|"), se = !j || ee(j.pendingCheckpoints ?? []) !== ee(I.pendingCheckpoints), Q = !j || j.activeCheckpointId !== I.activeCheckpointId || j.activeCheckpointNs !== I.activeCheckpointNs;
4516
- (U || se || Q) && (be.current.set(m, I), nt.current && window.clearTimeout(nt.current), nt.current = window.setTimeout(() => {
4515
+ }, j = be.current.get(g), U = !j || ql(j.checkpoints ?? []) !== ql(T.checkpoints), ee = (ge) => ge.map((Se) => es(Se)).join("|"), se = !j || ee(j.pendingCheckpoints ?? []) !== ee(T.pendingCheckpoints), Q = !j || j.activeCheckpointId !== T.activeCheckpointId || j.activeCheckpointNs !== T.activeCheckpointNs;
4516
+ (U || se || Q) && (be.current.set(g, T), nt.current && window.clearTimeout(nt.current), nt.current = window.setTimeout(() => {
4517
4517
  try {
4518
- x(I);
4518
+ x(T);
4519
4519
  } catch (ge) {
4520
4520
  console.warn("[ChatSessionProvider] Failed to persist thread payload:", ge);
4521
4521
  }
@@ -4527,26 +4527,23 @@ function tv({
4527
4527
  $
4528
4528
  ]);
4529
4529
  const ut = dt(
4530
- () => {
4531
- const m = {
4532
- threads: T,
4533
- currentThreadId: C,
4534
- setCurrentThreadId: k,
4535
- isLoading: R,
4536
- error: E,
4537
- actions: {
4538
- createThread: Rn,
4539
- deleteThread: Un,
4540
- renameThread: pr,
4541
- refreshThreads: () => A()
4542
- },
4543
- persistThreadsCache: V,
4544
- hydrateFromCache: N
4545
- };
4546
- return T.length > 0 && console.log("[ChatSessionProvider] threadsValue.threads.length:", T.length), m;
4547
- },
4530
+ () => ({
4531
+ threads: I,
4532
+ currentThreadId: C,
4533
+ setCurrentThreadId: k,
4534
+ isLoading: R,
4535
+ error: E,
4536
+ actions: {
4537
+ createThread: Rn,
4538
+ deleteThread: Un,
4539
+ renameThread: pr,
4540
+ refreshThreads: () => A()
4541
+ },
4542
+ persistThreadsCache: V,
4543
+ hydrateFromCache: N
4544
+ }),
4548
4545
  [
4549
- T,
4546
+ I,
4550
4547
  C,
4551
4548
  R,
4552
4549
  E,
@@ -4559,10 +4556,10 @@ function tv({
4559
4556
  k
4560
4557
  ]
4561
4558
  ), an = dt(() => {
4562
- const m = te.lastBranch ?? null, I = te.assemblingId ?? null, j = m || I ? {
4563
- branchLabel: (m == null ? void 0 : m.branchLabel) ?? null,
4564
- lastBranch: m,
4565
- assemblingMessageId: I
4559
+ const g = te.lastBranch ?? null, T = te.assemblingId ?? null, j = g || T ? {
4560
+ branchLabel: (g == null ? void 0 : g.branchLabel) ?? null,
4561
+ lastBranch: g,
4562
+ assemblingMessageId: T
4566
4563
  } : null;
4567
4564
  return {
4568
4565
  threadId: C,
@@ -4690,7 +4687,7 @@ const rv = ys(
4690
4687
  size: "default"
4691
4688
  }
4692
4689
  }
4693
- ), Ve = g.forwardRef(
4690
+ ), Ve = m.forwardRef(
4694
4691
  ({ className: e, variant: t, size: n, asChild: r = !1, ...o }, s) => {
4695
4692
  const i = r ? Um : "button";
4696
4693
  return /* @__PURE__ */ c.jsx(
@@ -4704,7 +4701,7 @@ const rv = ys(
4704
4701
  }
4705
4702
  );
4706
4703
  Ve.displayName = "Button";
4707
- const qu = g.forwardRef(
4704
+ const qu = m.forwardRef(
4708
4705
  ({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
4709
4706
  "textarea",
4710
4707
  {
@@ -4761,7 +4758,7 @@ function ov({
4761
4758
  [h, i, f]
4762
4759
  ), S = q.useCallback((E) => {
4763
4760
  p(E.target.value), x.current && (x.current.style.height = "auto", x.current.style.height = `${x.current.scrollHeight}px`);
4764
- }, []), T = q.useCallback(
4761
+ }, []), I = q.useCallback(
4765
4762
  (E) => {
4766
4763
  E.key === "Enter" && !E.shiftKey ? (E.preventDefault(), b()) : E.key === "Escape" && t && (E.preventDefault(), a == null || a());
4767
4764
  },
@@ -4774,7 +4771,7 @@ function ov({
4774
4771
  ref: x,
4775
4772
  value: h,
4776
4773
  onChange: S,
4777
- onKeyDown: T,
4774
+ onKeyDown: I,
4778
4775
  placeholder: t ? "Edit your message..." : n,
4779
4776
  className: R,
4780
4777
  disabled: o,
@@ -5700,7 +5697,7 @@ const Nv = {
5700
5697
  ),
5701
5698
  n
5702
5699
  );
5703
- const T = Ft(
5700
+ const I = Ft(
5704
5701
  W(
5705
5702
  i,
5706
5703
  Fe(y, p),
@@ -5760,7 +5757,7 @@ const Nv = {
5760
5757
  itemSize: f,
5761
5758
  listRefresh: b,
5762
5759
  shiftWith: i,
5763
- shiftWithOffset: T,
5760
+ shiftWithOffset: I,
5764
5761
  sizeRanges: n,
5765
5762
  // output
5766
5763
  sizes: y,
@@ -5856,16 +5853,16 @@ const go = qe(
5856
5853
  Fe(e, s, o),
5857
5854
  le(
5858
5855
  ([
5859
- [T, C, k, R, E, A, O, L],
5856
+ [I, C, k, R, E, A, O, L],
5860
5857
  F,
5861
5858
  V,
5862
5859
  N
5863
5860
  ]) => {
5864
- const B = ld(T), { align: z, behavior: H, offset: M } = B, D = R - 1, X = id(B, C, D);
5861
+ const B = ld(I), { align: z, behavior: H, offset: M } = B, D = R - 1, X = id(B, C, D);
5865
5862
  let _ = no(X, C.offsetTree, F) + A;
5866
5863
  z === "end" ? (_ += V + Zt(C.sizeTree, X)[1] - k + N, X === D && (_ += O)) : z === "center" ? _ += (V + Zt(C.sizeTree, X)[1] - k + N) / 2 : _ -= E, M && (_ += M);
5867
5864
  const G = (ce) => {
5868
- S(), ce ? (L("retrying to scroll to", { location: T }, jt.DEBUG), Le(p, T)) : (Le(w, !0), L("list did not change, scroll successful", {}, jt.DEBUG));
5865
+ S(), ce ? (L("retrying to scroll to", { location: I }, jt.DEBUG), Le(p, I)) : (Le(w, !0), L("list did not change, scroll successful", {}, jt.DEBUG));
5869
5866
  };
5870
5867
  if (S(), H === "smooth") {
5871
5868
  let ce = !1;
@@ -5989,15 +5986,15 @@ const ro = "up", qr = "down", Pv = "none", Ov = {
5989
5986
  const w = Ft(
5990
5987
  W(
5991
5988
  xt(r, Ee(s), Ee(t), Ee(e), Ee(d)),
5992
- dn((b, [{ scrollHeight: S, scrollTop: T }, C, k, R, E]) => {
5993
- const A = T + C - S > -E, O = {
5989
+ dn((b, [{ scrollHeight: S, scrollTop: I }, C, k, R, E]) => {
5990
+ const A = I + C - S > -E, O = {
5994
5991
  scrollHeight: S,
5995
- scrollTop: T,
5992
+ scrollTop: I,
5996
5993
  viewportHeight: C
5997
5994
  };
5998
5995
  if (A) {
5999
5996
  let F, V;
6000
- return T > b.state.scrollTop ? (F = "SCROLLED_DOWN", V = b.state.scrollTop - T) : (F = "SIZE_DECREASED", V = b.state.scrollTop - T || b.scrollTopDelta), {
5997
+ return I > b.state.scrollTop ? (F = "SCROLLED_DOWN", V = b.state.scrollTop - I) : (F = "SIZE_DECREASED", V = b.state.scrollTop - I || b.scrollTopDelta), {
6001
5998
  atBottom: !0,
6002
5999
  atBottomBecause: F,
6003
6000
  scrollTopDelta: V,
@@ -6005,7 +6002,7 @@ const ro = "up", qr = "down", Pv = "none", Ov = {
6005
6002
  };
6006
6003
  }
6007
6004
  let L;
6008
- return O.scrollHeight > b.state.scrollHeight ? L = "SIZE_INCREASED" : C < b.state.viewportHeight ? L = "VIEWPORT_HEIGHT_DECREASING" : T < b.state.scrollTop ? L = "SCROLLING_UPWARDS" : L = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
6005
+ return O.scrollHeight > b.state.scrollHeight ? L = "SIZE_INCREASED" : C < b.state.viewportHeight ? L = "VIEWPORT_HEIGHT_DECREASING" : I < b.state.scrollTop ? L = "SCROLLING_UPWARDS" : L = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
6009
6006
  atBottom: !1,
6010
6007
  notAtBottomBecause: L,
6011
6008
  state: O
@@ -6017,26 +6014,26 @@ const ro = "up", qr = "down", Pv = "none", Ov = {
6017
6014
  W(
6018
6015
  r,
6019
6016
  dn(
6020
- (b, { scrollHeight: S, scrollTop: T, viewportHeight: C }) => {
6017
+ (b, { scrollHeight: S, scrollTop: I, viewportHeight: C }) => {
6021
6018
  if (cd(b.scrollHeight, S))
6022
6019
  return {
6023
6020
  changed: !1,
6024
6021
  jump: 0,
6025
6022
  scrollHeight: S,
6026
- scrollTop: T
6023
+ scrollTop: I
6027
6024
  };
6028
6025
  {
6029
- const k = S - (T + C) < 1;
6030
- return b.scrollTop !== T && k ? {
6026
+ const k = S - (I + C) < 1;
6027
+ return b.scrollTop !== I && k ? {
6031
6028
  changed: !0,
6032
- jump: b.scrollTop - T,
6029
+ jump: b.scrollTop - I,
6033
6030
  scrollHeight: S,
6034
- scrollTop: T
6031
+ scrollTop: I
6035
6032
  } : {
6036
6033
  changed: !0,
6037
6034
  jump: 0,
6038
6035
  scrollHeight: S,
6039
- scrollTop: T
6036
+ scrollTop: I
6040
6037
  };
6041
6038
  }
6042
6039
  },
@@ -6082,7 +6079,7 @@ const ro = "up", qr = "down", Pv = "none", Ov = {
6082
6079
  Sn(100),
6083
6080
  Fe(h),
6084
6081
  Ae(([b, S]) => !!S),
6085
- dn(([b, S], [T]) => [S, T], [0, 0]),
6082
+ dn(([b, S], [I]) => [S, I], [0, 0]),
6086
6083
  le(([b, S]) => S - b)
6087
6084
  ),
6088
6085
  v
@@ -6134,12 +6131,12 @@ const Aa = qe(
6134
6131
  b,
6135
6132
  S
6136
6133
  ]) => {
6137
- const T = d - b, C = x + v, k = Math.max(h - T, 0);
6134
+ const I = d - b, C = x + v, k = Math.max(h - I, 0);
6138
6135
  let R = ec;
6139
6136
  const E = nc(S, ns), A = nc(S, rs);
6140
6137
  return p -= b, p += h + v, w += h + v, w -= b, p > d + C - E && (R = ro), w < d - k + f + A && (R = qr), R !== ec ? [
6141
- Math.max(T - h - tc(y, ns, R) - E, 0),
6142
- T - k - v + f + tc(y, rs, R) + A
6138
+ Math.max(I - h - tc(y, ns, R) - E, 0),
6139
+ I - k - v + f + tc(y, rs, R) + A
6143
6140
  ] : null;
6144
6141
  }
6145
6142
  ),
@@ -6381,7 +6378,7 @@ const cr = qe(
6381
6378
  it(to),
6382
6379
  le(([k]) => k)
6383
6380
  )
6384
- ), T = Ft(
6381
+ ), I = Ft(
6385
6382
  W(
6386
6383
  b,
6387
6384
  Sn(200),
@@ -6407,7 +6404,7 @@ const cr = qe(
6407
6404
  it(rd)
6408
6405
  )
6409
6406
  );
6410
- return { endReached: S, initialItemCount: x, itemsRendered: v, listState: b, rangeChanged: C, startReached: T, topItemsIndexes: y, ...h };
6407
+ return { endReached: S, initialItemCount: x, itemsRendered: v, listState: b, rangeChanged: C, startReached: I, topItemsIndexes: y, ...h };
6411
6408
  },
6412
6409
  at(
6413
6410
  gn,
@@ -6470,10 +6467,10 @@ const cr = qe(
6470
6467
  Fe(t, l, n, s, o, r, a),
6471
6468
  Fe(e),
6472
6469
  le(([[f, h, p, w, y, x, v, b], S]) => {
6473
- const { align: T, behavior: C, calculateViewLocation: k = Fv, done: R, ...E } = f, A = id(f, h, w - 1), O = no(A, h.offsetTree, S) + y + x, L = O + Zt(h.sizeTree, A)[1], F = b + x, V = b + p - v, N = k({
6470
+ const { align: I, behavior: C, calculateViewLocation: k = Fv, done: R, ...E } = f, A = id(f, h, w - 1), O = no(A, h.offsetTree, S) + y + x, L = O + Zt(h.sizeTree, A)[1], F = b + x, V = b + p - v, N = k({
6474
6471
  itemBottom: L,
6475
6472
  itemTop: O,
6476
- locationParams: { align: T, behavior: C, ...E },
6473
+ locationParams: { align: I, behavior: C, ...E },
6477
6474
  viewportBottom: V,
6478
6475
  viewportTop: F
6479
6476
  });
@@ -6565,7 +6562,7 @@ const $v = (e, t) => typeof e == "function" ? oc(e(t)) : t && oc(e), zv = qe(
6565
6562
  }), Ye(xt(Ee(w), o), ([C, k]) => {
6566
6563
  C && !k.atBottom && k.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && v("auto");
6567
6564
  });
6568
- const S = Z(null), T = He();
6565
+ const S = Z(null), I = He();
6569
6566
  return ve(
6570
6567
  Ui(
6571
6568
  W(
@@ -6577,10 +6574,10 @@ const $v = (e, t) => typeof e == "function" ? oc(e(t)) : t && oc(e), zv = qe(
6577
6574
  ),
6578
6575
  W(Ee(t))
6579
6576
  ),
6580
- T
6577
+ I
6581
6578
  ), Ye(
6582
6579
  W(
6583
- xt(W(T, nr(1)), l),
6580
+ xt(W(I, nr(1)), l),
6584
6581
  Fe(Ee(S), a, f, h),
6585
6582
  le(([[C, k], R, E, A, O]) => k && E && (R == null ? void 0 : R({ context: O, totalCount: C, scrollingInProgress: A }))),
6586
6583
  Ae((C) => !!C),
@@ -6725,8 +6722,8 @@ const $v = (e, t) => typeof e == "function" ? oc(e(t)) : t && oc(e), zv = qe(
6725
6722
  Fe(t, r, i, f, h, n)
6726
6723
  ),
6727
6724
  ([p, w, y, x, v, b, S]) => {
6728
- const T = Iv(w.sizeTree);
6729
- x && v !== null && b !== null && (y = v.scrollTop - b.offsetTop), y -= S, p({ ranges: T, scrollTop: y });
6725
+ const I = Iv(w.sizeTree);
6726
+ x && v !== null && b !== null && (y = v.scrollTop - b.offsetTop), y -= S, p({ ranges: I, scrollTop: y });
6730
6727
  }
6731
6728
  ), ve(W(d, Ae(Ca), le(Wv)), o), ve(
6732
6729
  W(
@@ -6776,8 +6773,8 @@ const Kv = md(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
6776
6773
  l,
6777
6774
  Fe(i),
6778
6775
  dn(
6779
- ([, v, b, S], [{ bottom: T, items: C, offsetBottom: k, totalCount: R }, E]) => {
6780
- const A = T + k;
6776
+ ([, v, b, S], [{ bottom: I, items: C, offsetBottom: k, totalCount: R }, E]) => {
6777
+ const A = I + k;
6781
6778
  let O = 0;
6782
6779
  return b === R && v.length > 0 && C.length > 0 && (C[0].originalIndex === 0 && v[0].originalIndex === 0 || (O = A - S, O !== 0 && (O += E))), [O, C, R, A];
6783
6780
  },
@@ -6785,7 +6782,7 @@ const Kv = md(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
6785
6782
  ),
6786
6783
  Ae(([v]) => v !== 0),
6787
6784
  Fe(r, a, n, o, p, w),
6788
- Ae(([, v, b, S, , , T]) => !T && !S && v !== 0 && b === ro),
6785
+ Ae(([, v, b, S, , , I]) => !I && !S && v !== 0 && b === ro),
6789
6786
  le(([[v], , , , , b]) => (b("Upward scrolling compensation", { amount: v }, jt.DEBUG), v))
6790
6787
  )
6791
6788
  );
@@ -6812,7 +6809,7 @@ const Kv = md(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
6812
6809
  W(
6813
6810
  u,
6814
6811
  Fe(h, d),
6815
- le(([v, { groupIndices: b, lastSize: S, sizeTree: T }, C]) => {
6812
+ le(([v, { groupIndices: b, lastSize: S, sizeTree: I }, C]) => {
6816
6813
  function k(R) {
6817
6814
  return R * (S + C);
6818
6815
  }
@@ -6820,7 +6817,7 @@ const Kv = md(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
6820
6817
  return k(v);
6821
6818
  {
6822
6819
  let R = 0;
6823
- const E = eo(T, 0);
6820
+ const E = eo(I, 0);
6824
6821
  let A = 0, O = 0;
6825
6822
  for (; A < v; ) {
6826
6823
  A++, R += E;
@@ -6900,13 +6897,13 @@ const Kv = md(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
6900
6897
  y,
6901
6898
  x,
6902
6899
  v,
6903
- { listState: b, topItemsIndexes: S, ...T },
6900
+ { listState: b, topItemsIndexes: S, ...I },
6904
6901
  { scrollToIndex: C },
6905
6902
  k,
6906
6903
  { topItemCount: R },
6907
6904
  { groupCounts: E },
6908
6905
  A
6909
- ]) => (ve(T.rangeChanged, A.scrollSeekRangeChanged), ve(
6906
+ ]) => (ve(I.rangeChanged, A.scrollSeekRangeChanged), ve(
6910
6907
  W(
6911
6908
  A.windowViewportRect,
6912
6909
  le((O) => O.visibleHeight)
@@ -6936,7 +6933,7 @@ const Kv = md(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
6936
6933
  statefulTotalCount: u,
6937
6934
  trackItemSizes: f,
6938
6935
  // exported from stateFlagsSystem
6939
- ...T,
6936
+ ...I,
6940
6937
  // the bag of IO from featureGroup1System
6941
6938
  ...A,
6942
6939
  ...y,
@@ -6985,28 +6982,28 @@ function xd(e, t, n) {
6985
6982
  }
6986
6983
  function u(x) {
6987
6984
  return s.reduce((v, b) => (v[b] = (S) => {
6988
- const T = x[t.methods[b]];
6989
- Le(T, S);
6985
+ const I = x[t.methods[b]];
6986
+ Le(I, S);
6990
6987
  }, v), {});
6991
6988
  }
6992
6989
  function d(x) {
6993
6990
  return i.reduce((v, b) => (v[b] = dv(x[t.events[b]]), v), {});
6994
6991
  }
6995
6992
  const f = q.forwardRef((x, v) => {
6996
- const { children: b, ...S } = x, [T] = q.useState(() => Rs(hv(e), (R) => {
6993
+ const { children: b, ...S } = x, [I] = q.useState(() => Rs(hv(e), (R) => {
6997
6994
  l(R, S);
6998
- })), [C] = q.useState(Yl(d, T));
6995
+ })), [C] = q.useState(Yl(d, I));
6999
6996
  Io(() => {
7000
6997
  for (const R of i)
7001
6998
  R in S && Ye(C[R], S[R]);
7002
6999
  return () => {
7003
7000
  Object.values(C).map(ka);
7004
7001
  };
7005
- }, [S, C, T]), Io(() => {
7006
- l(T, S);
7007
- }), q.useImperativeHandle(v, Gl(u(T)));
7002
+ }, [S, C, I]), Io(() => {
7003
+ l(I, S);
7004
+ }), q.useImperativeHandle(v, Gl(u(I)));
7008
7005
  const k = n;
7009
- return /* @__PURE__ */ c.jsx(a.Provider, { value: T, children: n ? /* @__PURE__ */ c.jsx(k, { ...Yv([...r, ...o, ...i], S), children: b }) : b });
7006
+ return /* @__PURE__ */ c.jsx(a.Provider, { value: I, children: n ? /* @__PURE__ */ c.jsx(k, { ...Yv([...r, ...o, ...i], S), children: b }) : b });
7010
7007
  }), h = (x) => {
7011
7008
  const v = q.useContext(a);
7012
7009
  return q.useCallback(
@@ -7028,8 +7025,8 @@ function xd(e, t, n) {
7028
7025
  }, w = (x) => {
7029
7026
  const v = q.useContext(a)[x], [b, S] = q.useState(Yl(mt, v));
7030
7027
  return Io(
7031
- () => Ye(v, (T) => {
7032
- T !== b && S(Gl(T));
7028
+ () => Ye(v, (I) => {
7029
+ I !== b && S(Gl(I));
7033
7030
  }),
7034
7031
  [v, b]
7035
7032
  ), b;
@@ -7155,7 +7152,7 @@ const Jv = /* @__PURE__ */ qe(() => {
7155
7152
  Oa("deviation", (N) => {
7156
7153
  v !== N && b(N);
7157
7154
  });
7158
- const S = Pe("EmptyPlaceholder"), T = Pe("ScrollSeekPlaceholder") || Qv, C = Pe("ListComponent"), k = Pe("ItemComponent"), R = Pe("GroupComponent"), E = Pe("computeItemKey"), A = Pe("isSeeking"), O = Pe("groupIndices").length > 0, L = Pe("alignToBottom"), F = Pe("initialItemFinalLocationReached"), V = e ? {} : {
7155
+ const S = Pe("EmptyPlaceholder"), I = Pe("ScrollSeekPlaceholder") || Qv, C = Pe("ListComponent"), k = Pe("ItemComponent"), R = Pe("GroupComponent"), E = Pe("computeItemKey"), A = Pe("isSeeking"), O = Pe("groupIndices").length > 0, L = Pe("alignToBottom"), F = Pe("initialItemFinalLocationReached"), V = e ? {} : {
7159
7156
  boxSizing: "border-box",
7160
7157
  ...y ? {
7161
7158
  display: "inline-block",
@@ -7181,9 +7178,9 @@ const Jv = /* @__PURE__ */ qe(() => {
7181
7178
  children: (e ? t.topItems : t.items).map((N) => {
7182
7179
  const B = N.originalIndex, z = E(B + t.firstItemIndex, N.data, u);
7183
7180
  return A ? /* @__PURE__ */ Mo(
7184
- T,
7181
+ I,
7185
7182
  {
7186
- ...kt(T, u),
7183
+ ...kt(I, u),
7187
7184
  height: N.size,
7188
7185
  index: N.index,
7189
7186
  key: z,
@@ -7495,7 +7492,7 @@ const wy = /* @__PURE__ */ qe(
7495
7492
  h,
7496
7493
  p,
7497
7494
  { didMount: w, propsReady: y },
7498
- { customScrollParent: x, useWindowScroll: v, windowScrollContainerState: b, windowScrollTo: S, windowViewportRect: T },
7495
+ { customScrollParent: x, useWindowScroll: v, windowScrollContainerState: b, windowScrollTo: S, windowViewportRect: I },
7499
7496
  C
7500
7497
  ]) => {
7501
7498
  const k = Z(0), R = Z(0), E = Z(ac), A = Z({ height: 0, width: 0 }), O = Z({ height: 0, width: 0 }), L = He(), F = He(), V = Z(0), N = Z(null), B = Z({ column: 0, row: 0 }), z = He(), H = He(), M = Z(!1), D = Z(0), X = Z(!0), _ = Z(!1), G = Z(!1);
@@ -7687,7 +7684,7 @@ const wy = /* @__PURE__ */ qe(
7687
7684
  );
7688
7685
  return ve(
7689
7686
  W(
7690
- T,
7687
+ I,
7691
7688
  le(($) => ({ height: $.visibleHeight, width: $.visibleWidth }))
7692
7689
  ),
7693
7690
  A
@@ -7716,7 +7713,7 @@ const wy = /* @__PURE__ */ qe(
7716
7713
  viewportDimensions: A,
7717
7714
  windowScrollContainerState: b,
7718
7715
  windowScrollTo: S,
7719
- windowViewportRect: T,
7716
+ windowViewportRect: I,
7720
7717
  ...p,
7721
7718
  // output
7722
7719
  gridState: E,
@@ -7787,8 +7784,8 @@ const by = /* @__PURE__ */ qe(() => {
7787
7784
  i(b);
7788
7785
  const S = v.firstChild;
7789
7786
  if (S) {
7790
- const { height: T, width: C } = S.getBoundingClientRect();
7791
- f({ height: T, width: C });
7787
+ const { height: I, width: C } = S.getBoundingClientRect();
7788
+ f({ height: I, width: C });
7792
7789
  }
7793
7790
  h({
7794
7791
  column: fc("column-gap", getComputedStyle(v).columnGap, p),
@@ -7959,13 +7956,13 @@ function fe(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
7959
7956
  };
7960
7957
  }
7961
7958
  function jy(e, t) {
7962
- const n = g.createContext(t), r = (s) => {
7963
- const { children: i, ...a } = s, l = g.useMemo(() => a, Object.values(a));
7959
+ const n = m.createContext(t), r = (s) => {
7960
+ const { children: i, ...a } = s, l = m.useMemo(() => a, Object.values(a));
7964
7961
  return /* @__PURE__ */ c.jsx(n.Provider, { value: l, children: i });
7965
7962
  };
7966
7963
  r.displayName = e + "Provider";
7967
7964
  function o(s) {
7968
- const i = g.useContext(n);
7965
+ const i = m.useContext(n);
7969
7966
  if (i) return i;
7970
7967
  if (t !== void 0) return t;
7971
7968
  throw new Error(`\`${s}\` must be used within \`${e}\``);
@@ -7975,17 +7972,17 @@ function jy(e, t) {
7975
7972
  function xn(e, t = []) {
7976
7973
  let n = [];
7977
7974
  function r(s, i) {
7978
- const a = g.createContext(i), l = n.length;
7975
+ const a = m.createContext(i), l = n.length;
7979
7976
  n = [...n, i];
7980
7977
  const u = (f) => {
7981
7978
  var v;
7982
- const { scope: h, children: p, ...w } = f, y = ((v = h == null ? void 0 : h[e]) == null ? void 0 : v[l]) || a, x = g.useMemo(() => w, Object.values(w));
7979
+ const { scope: h, children: p, ...w } = f, y = ((v = h == null ? void 0 : h[e]) == null ? void 0 : v[l]) || a, x = m.useMemo(() => w, Object.values(w));
7983
7980
  return /* @__PURE__ */ c.jsx(y.Provider, { value: x, children: p });
7984
7981
  };
7985
7982
  u.displayName = s + "Provider";
7986
7983
  function d(f, h) {
7987
7984
  var y;
7988
- const p = ((y = h == null ? void 0 : h[e]) == null ? void 0 : y[l]) || a, w = g.useContext(p);
7985
+ const p = ((y = h == null ? void 0 : h[e]) == null ? void 0 : y[l]) || a, w = m.useContext(p);
7989
7986
  if (w) return w;
7990
7987
  if (i !== void 0) return i;
7991
7988
  throw new Error(`\`${f}\` must be used within \`${s}\``);
@@ -7993,10 +7990,10 @@ function xn(e, t = []) {
7993
7990
  return [u, d];
7994
7991
  }
7995
7992
  const o = () => {
7996
- const s = n.map((i) => g.createContext(i));
7993
+ const s = n.map((i) => m.createContext(i));
7997
7994
  return function(a) {
7998
7995
  const l = (a == null ? void 0 : a[e]) || s;
7999
- return g.useMemo(
7996
+ return m.useMemo(
8000
7997
  () => ({ [`__scope${e}`]: { ...a, [e]: l } }),
8001
7998
  [a, l]
8002
7999
  );
@@ -8017,13 +8014,13 @@ function Py(...e) {
8017
8014
  const f = l(s)[`__scope${u}`];
8018
8015
  return { ...a, ...f };
8019
8016
  }, {});
8020
- return g.useMemo(() => ({ [`__scope${t.scopeName}`]: i }), [i]);
8017
+ return m.useMemo(() => ({ [`__scope${t.scopeName}`]: i }), [i]);
8021
8018
  };
8022
8019
  };
8023
8020
  return n.scopeName = t.scopeName, n;
8024
8021
  }
8025
- var wt = globalThis != null && globalThis.document ? g.useLayoutEffect : () => {
8026
- }, Oy = g[" useInsertionEffect ".trim().toString()] || wt;
8022
+ var wt = globalThis != null && globalThis.document ? m.useLayoutEffect : () => {
8023
+ }, Oy = m[" useInsertionEffect ".trim().toString()] || wt;
8027
8024
  function rr({
8028
8025
  prop: e,
8029
8026
  defaultProp: t,
@@ -8036,15 +8033,15 @@ function rr({
8036
8033
  onChange: n
8037
8034
  }), a = e !== void 0, l = a ? e : o;
8038
8035
  {
8039
- const d = g.useRef(e !== void 0);
8040
- g.useEffect(() => {
8036
+ const d = m.useRef(e !== void 0);
8037
+ m.useEffect(() => {
8041
8038
  const f = d.current;
8042
8039
  f !== a && console.warn(
8043
8040
  `${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.`
8044
8041
  ), d.current = a;
8045
8042
  }, [a, r]);
8046
8043
  }
8047
- const u = g.useCallback(
8044
+ const u = m.useCallback(
8048
8045
  (d) => {
8049
8046
  var f;
8050
8047
  if (a) {
@@ -8061,10 +8058,10 @@ function My({
8061
8058
  defaultProp: e,
8062
8059
  onChange: t
8063
8060
  }) {
8064
- const [n, r] = g.useState(e), o = g.useRef(n), s = g.useRef(t);
8061
+ const [n, r] = m.useState(e), o = m.useRef(n), s = m.useRef(t);
8065
8062
  return Oy(() => {
8066
8063
  s.current = t;
8067
- }, [t]), g.useEffect(() => {
8064
+ }, [t]), m.useEffect(() => {
8068
8065
  var i;
8069
8066
  o.current !== n && ((i = s.current) == null || i.call(s, n), o.current = n);
8070
8067
  }, [n, o]), [n, r, s];
@@ -8094,7 +8091,7 @@ function Ma(...e) {
8094
8091
  };
8095
8092
  }
8096
8093
  function Be(...e) {
8097
- return g.useCallback(Ma(...e), e);
8094
+ return m.useCallback(Ma(...e), e);
8098
8095
  }
8099
8096
  var Ly = [
8100
8097
  "a",
@@ -8115,7 +8112,7 @@ var Ly = [
8115
8112
  "svg",
8116
8113
  "ul"
8117
8114
  ], je = Ly.reduce((e, t) => {
8118
- const n = Er(`Primitive.${t}`), r = g.forwardRef((o, s) => {
8115
+ const n = Er(`Primitive.${t}`), r = m.forwardRef((o, s) => {
8119
8116
  const { asChild: i, ...a } = o, l = i ? n : t;
8120
8117
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ c.jsx(l, { ...a, ref: s });
8121
8118
  });
@@ -8125,15 +8122,15 @@ function Rd(e, t) {
8125
8122
  e && ws.flushSync(() => e.dispatchEvent(t));
8126
8123
  }
8127
8124
  function Fy(e, t) {
8128
- return g.useReducer((n, r) => t[n][r] ?? n, e);
8125
+ return m.useReducer((n, r) => t[n][r] ?? n, e);
8129
8126
  }
8130
8127
  var zt = (e) => {
8131
- const { present: t, children: n } = e, r = $y(t), o = typeof n == "function" ? n({ present: r.isPresent }) : g.Children.only(n), s = Be(r.ref, zy(o));
8132
- return typeof n == "function" || r.isPresent ? g.cloneElement(o, { ref: s }) : null;
8128
+ const { present: t, children: n } = e, r = $y(t), o = typeof n == "function" ? n({ present: r.isPresent }) : m.Children.only(n), s = Be(r.ref, zy(o));
8129
+ return typeof n == "function" || r.isPresent ? m.cloneElement(o, { ref: s }) : null;
8133
8130
  };
8134
8131
  zt.displayName = "Presence";
8135
8132
  function $y(e) {
8136
- const [t, n] = g.useState(), r = g.useRef(null), o = g.useRef(e), s = g.useRef("none"), i = e ? "mounted" : "unmounted", [a, l] = Fy(i, {
8133
+ const [t, n] = m.useState(), r = m.useRef(null), o = m.useRef(e), s = m.useRef("none"), i = e ? "mounted" : "unmounted", [a, l] = Fy(i, {
8137
8134
  mounted: {
8138
8135
  UNMOUNT: "unmounted",
8139
8136
  ANIMATION_OUT: "unmountSuspended"
@@ -8146,7 +8143,7 @@ function $y(e) {
8146
8143
  MOUNT: "mounted"
8147
8144
  }
8148
8145
  });
8149
- return g.useEffect(() => {
8146
+ return m.useEffect(() => {
8150
8147
  const u = Eo(r.current);
8151
8148
  s.current = a === "mounted" ? u : "none";
8152
8149
  }, [a]), wt(() => {
@@ -8176,7 +8173,7 @@ function $y(e) {
8176
8173
  l("ANIMATION_END");
8177
8174
  }, [t, l]), {
8178
8175
  isPresent: ["mounted", "unmountSuspended"].includes(a),
8179
- ref: g.useCallback((u) => {
8176
+ ref: m.useCallback((u) => {
8180
8177
  r.current = u ? getComputedStyle(u) : null, n(u);
8181
8178
  }, [])
8182
8179
  };
@@ -8189,15 +8186,15 @@ function zy(e) {
8189
8186
  let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
8190
8187
  return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
8191
8188
  }
8192
- var By = g[" useId ".trim().toString()] || (() => {
8189
+ var By = m[" useId ".trim().toString()] || (() => {
8193
8190
  }), Hy = 0;
8194
8191
  function hn(e) {
8195
- const [t, n] = g.useState(By());
8192
+ const [t, n] = m.useState(By());
8196
8193
  return wt(() => {
8197
8194
  n((r) => r ?? String(Hy++));
8198
8195
  }, [e]), e || (t ? `radix-${t}` : "");
8199
8196
  }
8200
- var _s = "Collapsible", [Uy, IT] = xn(_s), [Wy, Da] = Uy(_s), Ed = g.forwardRef(
8197
+ var _s = "Collapsible", [Uy, IT] = xn(_s), [Wy, Da] = Uy(_s), Ed = m.forwardRef(
8201
8198
  (e, t) => {
8202
8199
  const {
8203
8200
  __scopeCollapsible: n,
@@ -8219,7 +8216,7 @@ var _s = "Collapsible", [Uy, IT] = xn(_s), [Wy, Da] = Uy(_s), Ed = g.forwardRef(
8219
8216
  disabled: s,
8220
8217
  contentId: hn(),
8221
8218
  open: l,
8222
- onOpenToggle: g.useCallback(() => u((d) => !d), [u]),
8219
+ onOpenToggle: m.useCallback(() => u((d) => !d), [u]),
8223
8220
  children: /* @__PURE__ */ c.jsx(
8224
8221
  je.div,
8225
8222
  {
@@ -8234,7 +8231,7 @@ var _s = "Collapsible", [Uy, IT] = xn(_s), [Wy, Da] = Uy(_s), Ed = g.forwardRef(
8234
8231
  }
8235
8232
  );
8236
8233
  Ed.displayName = _s;
8237
- var Nd = "CollapsibleTrigger", Ad = g.forwardRef(
8234
+ var Nd = "CollapsibleTrigger", Ad = m.forwardRef(
8238
8235
  (e, t) => {
8239
8236
  const { __scopeCollapsible: n, ...r } = e, o = Da(Nd, n);
8240
8237
  return /* @__PURE__ */ c.jsx(
@@ -8254,16 +8251,16 @@ var Nd = "CollapsibleTrigger", Ad = g.forwardRef(
8254
8251
  }
8255
8252
  );
8256
8253
  Ad.displayName = Nd;
8257
- var La = "CollapsibleContent", Vy = g.forwardRef(
8254
+ var La = "CollapsibleContent", Vy = m.forwardRef(
8258
8255
  (e, t) => {
8259
8256
  const { forceMount: n, ...r } = e, o = Da(La, e.__scopeCollapsible);
8260
8257
  return /* @__PURE__ */ c.jsx(zt, { present: n || o.open, children: ({ present: s }) => /* @__PURE__ */ c.jsx(Ky, { ...r, ref: t, present: s }) });
8261
8258
  }
8262
8259
  );
8263
8260
  Vy.displayName = La;
8264
- var Ky = g.forwardRef((e, t) => {
8265
- const { __scopeCollapsible: n, present: r, children: o, ...s } = e, i = Da(La, n), [a, l] = g.useState(r), u = g.useRef(null), d = Be(t, u), f = g.useRef(0), h = f.current, p = g.useRef(0), w = p.current, y = i.open || a, x = g.useRef(y), v = g.useRef(void 0);
8266
- return g.useEffect(() => {
8261
+ var Ky = m.forwardRef((e, t) => {
8262
+ const { __scopeCollapsible: n, present: r, children: o, ...s } = e, i = Da(La, n), [a, l] = m.useState(r), u = m.useRef(null), d = Be(t, u), f = m.useRef(0), h = f.current, p = m.useRef(0), w = p.current, y = i.open || a, x = m.useRef(y), v = m.useRef(void 0);
8263
+ return m.useEffect(() => {
8267
8264
  const b = requestAnimationFrame(() => x.current = !1);
8268
8265
  return () => cancelAnimationFrame(b);
8269
8266
  }, []), wt(() => {
@@ -8298,7 +8295,7 @@ function Fa(e) {
8298
8295
  return e ? "open" : "closed";
8299
8296
  }
8300
8297
  var qy = Ed;
8301
- const pc = qy, mc = Ad, Yr = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
8298
+ const pc = qy, mc = Ad, Yr = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
8302
8299
  "div",
8303
8300
  {
8304
8301
  ref: n,
@@ -8310,7 +8307,7 @@ const pc = qy, mc = Ad, Yr = g.forwardRef(({ className: e, ...t }, n) => /* @__P
8310
8307
  }
8311
8308
  ));
8312
8309
  Yr.displayName = "Card";
8313
- const Xr = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
8310
+ const Xr = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
8314
8311
  "div",
8315
8312
  {
8316
8313
  ref: n,
@@ -8319,7 +8316,7 @@ const Xr = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
8319
8316
  }
8320
8317
  ));
8321
8318
  Xr.displayName = "CardHeader";
8322
- const Jr = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
8319
+ const Jr = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
8323
8320
  "h3",
8324
8321
  {
8325
8322
  ref: n,
@@ -8331,7 +8328,7 @@ const Jr = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
8331
8328
  }
8332
8329
  ));
8333
8330
  Jr.displayName = "CardTitle";
8334
- const _d = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
8331
+ const _d = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
8335
8332
  "p",
8336
8333
  {
8337
8334
  ref: n,
@@ -8340,9 +8337,9 @@ const _d = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
8340
8337
  }
8341
8338
  ));
8342
8339
  _d.displayName = "CardDescription";
8343
- const Uo = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx("div", { ref: n, className: re("p-6 pt-0", e), ...t }));
8340
+ const Uo = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx("div", { ref: n, className: re("p-6 pt-0", e), ...t }));
8344
8341
  Uo.displayName = "CardContent";
8345
- const jd = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
8342
+ const jd = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
8346
8343
  "div",
8347
8344
  {
8348
8345
  ref: n,
@@ -8620,12 +8617,12 @@ class $a {
8620
8617
  const b = new RegExp(`^( {0,3}${y})((?:[ ][^\\n]*)?(?:\\n|$))`);
8621
8618
  for (; t && (w = !1, !(!(n = b.exec(t)) || this.rules.block.hr.test(t))); ) {
8622
8619
  if (r = n[0], t = t.substring(r.length), d = n[2].split(`
8623
- `, 1)[0].replace(/^\t+/, (T) => " ".repeat(3 * T.length)), f = t.split(`
8620
+ `, 1)[0].replace(/^\t+/, (I) => " ".repeat(3 * I.length)), f = t.split(`
8624
8621
  `, 1)[0], this.options.pedantic ? (i = 2, p = d.trimLeft()) : (i = n[2].search(/[^ ]/), i = i > 4 ? 1 : i, p = d.slice(i), i += n[1].length), l = !1, !d && /^ *$/.test(f) && (r += f + `
8625
8622
  `, t = t.substring(f.length + 1), w = !0), !w) {
8626
- const T = new RegExp(`^ {0,${Math.min(3, i - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), C = new RegExp(`^ {0,${Math.min(3, i - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), k = new RegExp(`^ {0,${Math.min(3, i - 1)}}(?:\`\`\`|~~~)`), R = new RegExp(`^ {0,${Math.min(3, i - 1)}}#`);
8623
+ const I = new RegExp(`^ {0,${Math.min(3, i - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), C = new RegExp(`^ {0,${Math.min(3, i - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), k = new RegExp(`^ {0,${Math.min(3, i - 1)}}(?:\`\`\`|~~~)`), R = new RegExp(`^ {0,${Math.min(3, i - 1)}}#`);
8627
8624
  for (; t && (h = t.split(`
8628
- `, 1)[0], f = h, this.options.pedantic && (f = f.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), !(k.test(f) || R.test(f) || T.test(f) || C.test(t))); ) {
8625
+ `, 1)[0], f = h, this.options.pedantic && (f = f.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), !(k.test(f) || R.test(f) || I.test(f) || C.test(t))); ) {
8629
8626
  if (f.search(/[^ ]/) >= i || !f.trim())
8630
8627
  p += `
8631
8628
  ` + f.slice(i);
@@ -8652,7 +8649,7 @@ class $a {
8652
8649
  const S = v.items.length;
8653
8650
  for (a = 0; a < S; a++)
8654
8651
  if (this.lexer.state.top = !1, v.items[a].tokens = this.lexer.blockTokens(v.items[a].text, []), !v.loose) {
8655
- const T = v.items[a].tokens.filter((k) => k.type === "space"), C = T.length > 0 && T.some((k) => /\n.*\n/.test(k.raw));
8652
+ const I = v.items[a].tokens.filter((k) => k.type === "space"), C = I.length > 0 && I.some((k) => /\n.*\n/.test(k.raw));
8656
8653
  v.loose = C;
8657
8654
  }
8658
8655
  if (v.loose)
@@ -9532,7 +9529,7 @@ class On {
9532
9529
  * Parse Loop
9533
9530
  */
9534
9531
  parse(t, n = !0) {
9535
- let r = "", o, s, i, a, l, u, d, f, h, p, w, y, x, v, b, S, T, C, k;
9532
+ let r = "", o, s, i, a, l, u, d, f, h, p, w, y, x, v, b, S, I, C, k;
9536
9533
  const R = t.length;
9537
9534
  for (o = 0; o < R; o++) {
9538
9535
  if (p = t[o], this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[p.type] && (k = this.options.extensions.renderers[p.type].call({ parser: this }, p), k !== !1 || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "paragraph", "text"].includes(p.type))) {
@@ -9586,10 +9583,10 @@ class On {
9586
9583
  }
9587
9584
  case "list": {
9588
9585
  for (w = p.ordered, y = p.start, x = p.loose, a = p.items.length, h = "", s = 0; s < a; s++)
9589
- b = p.items[s], S = b.checked, T = b.task, v = "", b.task && (C = this.renderer.checkbox(S), x ? b.tokens.length > 0 && b.tokens[0].type === "paragraph" ? (b.tokens[0].text = C + " " + b.tokens[0].text, b.tokens[0].tokens && b.tokens[0].tokens.length > 0 && b.tokens[0].tokens[0].type === "text" && (b.tokens[0].tokens[0].text = C + " " + b.tokens[0].tokens[0].text)) : b.tokens.unshift({
9586
+ b = p.items[s], S = b.checked, I = b.task, v = "", b.task && (C = this.renderer.checkbox(S), x ? b.tokens.length > 0 && b.tokens[0].type === "paragraph" ? (b.tokens[0].text = C + " " + b.tokens[0].text, b.tokens[0].tokens && b.tokens[0].tokens.length > 0 && b.tokens[0].tokens[0].type === "text" && (b.tokens[0].tokens[0].text = C + " " + b.tokens[0].tokens[0].text)) : b.tokens.unshift({
9590
9587
  type: "text",
9591
9588
  text: C
9592
- }) : v += C), v += this.parse(b.tokens, x), h += this.renderer.listitem(v, T, S);
9589
+ }) : v += C), v += this.parse(b.tokens, x), h += this.renderer.listitem(v, I, S);
9593
9590
  r += this.renderer.list(h, w, y);
9594
9591
  continue;
9595
9592
  }
@@ -10061,8 +10058,8 @@ function xw({ ...e }) {
10061
10058
  };
10062
10059
  }
10063
10060
  function Ba() {
10064
- const [e, t] = g.useState(Ko);
10065
- return g.useEffect(() => (Vo.push(t), () => {
10061
+ const [e, t] = m.useState(Ko);
10062
+ return m.useEffect(() => (Vo.push(t), () => {
10066
10063
  const n = Vo.indexOf(t);
10067
10064
  n > -1 && Vo.splice(n, 1);
10068
10065
  }), [e]), {
@@ -10072,28 +10069,28 @@ function Ba() {
10072
10069
  };
10073
10070
  }
10074
10071
  function bt(e) {
10075
- const t = g.useRef(e);
10076
- return g.useEffect(() => {
10072
+ const t = m.useRef(e);
10073
+ return m.useEffect(() => {
10077
10074
  t.current = e;
10078
- }), g.useMemo(() => (...n) => {
10075
+ }), m.useMemo(() => (...n) => {
10079
10076
  var r;
10080
10077
  return (r = t.current) == null ? void 0 : r.call(t, ...n);
10081
10078
  }, []);
10082
10079
  }
10083
10080
  function vw(e, t = globalThis == null ? void 0 : globalThis.document) {
10084
10081
  const n = bt(e);
10085
- g.useEffect(() => {
10082
+ m.useEffect(() => {
10086
10083
  const r = (o) => {
10087
10084
  o.key === "Escape" && n(o);
10088
10085
  };
10089
10086
  return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
10090
10087
  }, [n, t]);
10091
10088
  }
10092
- var yw = "DismissableLayer", Xi = "dismissableLayer.update", ww = "dismissableLayer.pointerDownOutside", bw = "dismissableLayer.focusOutside", Tc, Bd = g.createContext({
10089
+ var yw = "DismissableLayer", Xi = "dismissableLayer.update", ww = "dismissableLayer.pointerDownOutside", bw = "dismissableLayer.focusOutside", Tc, Bd = m.createContext({
10093
10090
  layers: /* @__PURE__ */ new Set(),
10094
10091
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
10095
10092
  branches: /* @__PURE__ */ new Set()
10096
- }), js = g.forwardRef(
10093
+ }), js = m.forwardRef(
10097
10094
  (e, t) => {
10098
10095
  const {
10099
10096
  disableOutsidePointerEvents: n = !1,
@@ -10103,23 +10100,23 @@ var yw = "DismissableLayer", Xi = "dismissableLayer.update", ww = "dismissableLa
10103
10100
  onInteractOutside: i,
10104
10101
  onDismiss: a,
10105
10102
  ...l
10106
- } = e, u = g.useContext(Bd), [d, f] = g.useState(null), h = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, p] = g.useState({}), w = Be(t, (R) => f(R)), y = Array.from(u.layers), [x] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), v = y.indexOf(x), b = d ? y.indexOf(d) : -1, S = u.layersWithOutsidePointerEventsDisabled.size > 0, T = b >= v, C = kw((R) => {
10103
+ } = e, u = m.useContext(Bd), [d, f] = m.useState(null), h = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, p] = m.useState({}), w = Be(t, (R) => f(R)), y = Array.from(u.layers), [x] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), v = y.indexOf(x), b = d ? y.indexOf(d) : -1, S = u.layersWithOutsidePointerEventsDisabled.size > 0, I = b >= v, C = kw((R) => {
10107
10104
  const E = R.target, A = [...u.branches].some((O) => O.contains(E));
10108
- !T || A || (o == null || o(R), i == null || i(R), R.defaultPrevented || a == null || a());
10105
+ !I || A || (o == null || o(R), i == null || i(R), R.defaultPrevented || a == null || a());
10109
10106
  }, h), k = Tw((R) => {
10110
10107
  const E = R.target;
10111
10108
  [...u.branches].some((O) => O.contains(E)) || (s == null || s(R), i == null || i(R), R.defaultPrevented || a == null || a());
10112
10109
  }, h);
10113
10110
  return vw((R) => {
10114
10111
  b === u.layers.size - 1 && (r == null || r(R), !R.defaultPrevented && a && (R.preventDefault(), a()));
10115
- }, h), g.useEffect(() => {
10112
+ }, h), m.useEffect(() => {
10116
10113
  if (d)
10117
10114
  return n && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (Tc = h.body.style.pointerEvents, h.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(d)), u.layers.add(d), Ic(), () => {
10118
10115
  n && u.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents = Tc);
10119
10116
  };
10120
- }, [d, h, n, u]), g.useEffect(() => () => {
10117
+ }, [d, h, n, u]), m.useEffect(() => () => {
10121
10118
  d && (u.layers.delete(d), u.layersWithOutsidePointerEventsDisabled.delete(d), Ic());
10122
- }, [d, u]), g.useEffect(() => {
10119
+ }, [d, u]), m.useEffect(() => {
10123
10120
  const R = () => p({});
10124
10121
  return document.addEventListener(Xi, R), () => document.removeEventListener(Xi, R);
10125
10122
  }, []), /* @__PURE__ */ c.jsx(
@@ -10128,7 +10125,7 @@ var yw = "DismissableLayer", Xi = "dismissableLayer.update", ww = "dismissableLa
10128
10125
  ...l,
10129
10126
  ref: w,
10130
10127
  style: {
10131
- pointerEvents: S ? T ? "auto" : "none" : void 0,
10128
+ pointerEvents: S ? I ? "auto" : "none" : void 0,
10132
10129
  ...e.style
10133
10130
  },
10134
10131
  onFocusCapture: fe(e.onFocusCapture, k.onFocusCapture),
@@ -10142,9 +10139,9 @@ var yw = "DismissableLayer", Xi = "dismissableLayer.update", ww = "dismissableLa
10142
10139
  }
10143
10140
  );
10144
10141
  js.displayName = yw;
10145
- var Sw = "DismissableLayerBranch", Cw = g.forwardRef((e, t) => {
10146
- const n = g.useContext(Bd), r = g.useRef(null), o = Be(t, r);
10147
- return g.useEffect(() => {
10142
+ var Sw = "DismissableLayerBranch", Cw = m.forwardRef((e, t) => {
10143
+ const n = m.useContext(Bd), r = m.useRef(null), o = Be(t, r);
10144
+ return m.useEffect(() => {
10148
10145
  const s = r.current;
10149
10146
  if (s)
10150
10147
  return n.branches.add(s), () => {
@@ -10154,9 +10151,9 @@ var Sw = "DismissableLayerBranch", Cw = g.forwardRef((e, t) => {
10154
10151
  });
10155
10152
  Cw.displayName = Sw;
10156
10153
  function kw(e, t = globalThis == null ? void 0 : globalThis.document) {
10157
- const n = bt(e), r = g.useRef(!1), o = g.useRef(() => {
10154
+ const n = bt(e), r = m.useRef(!1), o = m.useRef(() => {
10158
10155
  });
10159
- return g.useEffect(() => {
10156
+ return m.useEffect(() => {
10160
10157
  const s = (a) => {
10161
10158
  if (a.target && !r.current) {
10162
10159
  let l = function() {
@@ -10184,8 +10181,8 @@ function kw(e, t = globalThis == null ? void 0 : globalThis.document) {
10184
10181
  };
10185
10182
  }
10186
10183
  function Tw(e, t = globalThis == null ? void 0 : globalThis.document) {
10187
- const n = bt(e), r = g.useRef(!1);
10188
- return g.useEffect(() => {
10184
+ const n = bt(e), r = m.useRef(!1);
10185
+ return m.useEffect(() => {
10189
10186
  const o = (s) => {
10190
10187
  s.target && !r.current && Hd(bw, n, { originalEvent: s }, {
10191
10188
  discrete: !1
@@ -10205,14 +10202,14 @@ function Hd(e, t, n, { discrete: r }) {
10205
10202
  const o = n.originalEvent.target, s = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
10206
10203
  t && o.addEventListener(e, t, { once: !0 }), r ? Rd(o, s) : o.dispatchEvent(s);
10207
10204
  }
10208
- var bi = "focusScope.autoFocusOnMount", Si = "focusScope.autoFocusOnUnmount", Rc = { bubbles: !1, cancelable: !0 }, Iw = "FocusScope", Ps = g.forwardRef((e, t) => {
10205
+ var bi = "focusScope.autoFocusOnMount", Si = "focusScope.autoFocusOnUnmount", Rc = { bubbles: !1, cancelable: !0 }, Iw = "FocusScope", Ps = m.forwardRef((e, t) => {
10209
10206
  const {
10210
10207
  loop: n = !1,
10211
10208
  trapped: r = !1,
10212
10209
  onMountAutoFocus: o,
10213
10210
  onUnmountAutoFocus: s,
10214
10211
  ...i
10215
- } = e, [a, l] = g.useState(null), u = bt(o), d = bt(s), f = g.useRef(null), h = Be(t, (y) => l(y)), p = g.useRef({
10212
+ } = e, [a, l] = m.useState(null), u = bt(o), d = bt(s), f = m.useRef(null), h = Be(t, (y) => l(y)), p = m.useRef({
10216
10213
  paused: !1,
10217
10214
  pause() {
10218
10215
  this.paused = !0;
@@ -10221,16 +10218,16 @@ var bi = "focusScope.autoFocusOnMount", Si = "focusScope.autoFocusOnUnmount", Rc
10221
10218
  this.paused = !1;
10222
10219
  }
10223
10220
  }).current;
10224
- g.useEffect(() => {
10221
+ m.useEffect(() => {
10225
10222
  if (r) {
10226
10223
  let y = function(S) {
10227
10224
  if (p.paused || !a) return;
10228
- const T = S.target;
10229
- a.contains(T) ? f.current = T : An(f.current, { select: !0 });
10225
+ const I = S.target;
10226
+ a.contains(I) ? f.current = I : An(f.current, { select: !0 });
10230
10227
  }, x = function(S) {
10231
10228
  if (p.paused || !a) return;
10232
- const T = S.relatedTarget;
10233
- T !== null && (a.contains(T) || An(f.current, { select: !0 }));
10229
+ const I = S.relatedTarget;
10230
+ I !== null && (a.contains(I) || An(f.current, { select: !0 }));
10234
10231
  }, v = function(S) {
10235
10232
  if (document.activeElement === document.body)
10236
10233
  for (const C of S)
@@ -10242,7 +10239,7 @@ var bi = "focusScope.autoFocusOnMount", Si = "focusScope.autoFocusOnUnmount", Rc
10242
10239
  document.removeEventListener("focusin", y), document.removeEventListener("focusout", x), b.disconnect();
10243
10240
  };
10244
10241
  }
10245
- }, [r, a, p.paused]), g.useEffect(() => {
10242
+ }, [r, a, p.paused]), m.useEffect(() => {
10246
10243
  if (a) {
10247
10244
  Nc.add(p);
10248
10245
  const y = document.activeElement;
@@ -10258,13 +10255,13 @@ var bi = "focusScope.autoFocusOnMount", Si = "focusScope.autoFocusOnUnmount", Rc
10258
10255
  };
10259
10256
  }
10260
10257
  }, [a, u, d, p]);
10261
- const w = g.useCallback(
10258
+ const w = m.useCallback(
10262
10259
  (y) => {
10263
10260
  if (!n && !r || p.paused) return;
10264
10261
  const x = y.key === "Tab" && !y.altKey && !y.ctrlKey && !y.metaKey, v = document.activeElement;
10265
10262
  if (x && v) {
10266
- const b = y.currentTarget, [S, T] = Ew(b);
10267
- S && T ? !y.shiftKey && v === T ? (y.preventDefault(), n && An(S, { select: !0 })) : y.shiftKey && v === S && (y.preventDefault(), n && An(T, { select: !0 })) : v === b && y.preventDefault();
10263
+ const b = y.currentTarget, [S, I] = Ew(b);
10264
+ S && I ? !y.shiftKey && v === I ? (y.preventDefault(), n && An(S, { select: !0 })) : y.shiftKey && v === S && (y.preventDefault(), n && An(I, { select: !0 })) : v === b && y.preventDefault();
10268
10265
  }
10269
10266
  },
10270
10267
  [n, r, p.paused]
@@ -10334,9 +10331,9 @@ function Ac(e, t) {
10334
10331
  function jw(e) {
10335
10332
  return e.filter((t) => t.tagName !== "A");
10336
10333
  }
10337
- var Pw = "Portal", Os = g.forwardRef((e, t) => {
10334
+ var Pw = "Portal", Os = m.forwardRef((e, t) => {
10338
10335
  var a;
10339
- const { container: n, ...r } = e, [o, s] = g.useState(!1);
10336
+ const { container: n, ...r } = e, [o, s] = m.useState(!1);
10340
10337
  wt(() => s(!0), []);
10341
10338
  const i = n || o && ((a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : a.body);
10342
10339
  return i ? iu.createPortal(/* @__PURE__ */ c.jsx(je.div, { ...r, ref: t }), i) : null;
@@ -10344,7 +10341,7 @@ var Pw = "Portal", Os = g.forwardRef((e, t) => {
10344
10341
  Os.displayName = Pw;
10345
10342
  var Ci = 0;
10346
10343
  function Ha() {
10347
- g.useEffect(() => {
10344
+ m.useEffect(() => {
10348
10345
  const e = document.querySelectorAll("[data-radix-focus-guard]");
10349
10346
  return document.body.insertAdjacentElement("afterbegin", e[0] ?? _c()), document.body.insertAdjacentElement("beforeend", e[1] ?? _c()), Ci++, () => {
10350
10347
  Ci === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), Ci--;
@@ -10402,7 +10399,7 @@ function Lw(e, t) {
10402
10399
  })[0];
10403
10400
  return n.callback = t, n.facade;
10404
10401
  }
10405
- var Fw = typeof window < "u" ? g.useLayoutEffect : g.useEffect, jc = /* @__PURE__ */ new WeakMap();
10402
+ var Fw = typeof window < "u" ? m.useLayoutEffect : m.useEffect, jc = /* @__PURE__ */ new WeakMap();
10406
10403
  function $w(e, t) {
10407
10404
  var n = Lw(null, function(r) {
10408
10405
  return e.forEach(function(o) {
@@ -10492,24 +10489,24 @@ var Vd = function(e) {
10492
10489
  var r = t.read();
10493
10490
  if (!r)
10494
10491
  throw new Error("Sidecar medium not found");
10495
- return g.createElement(r, un({}, n));
10492
+ return m.createElement(r, un({}, n));
10496
10493
  };
10497
10494
  Vd.isSideCarExport = !0;
10498
10495
  function Uw(e, t) {
10499
10496
  return e.useMedium(t), Vd;
10500
10497
  }
10501
10498
  var Kd = Hw(), Ti = function() {
10502
- }, Ms = g.forwardRef(function(e, t) {
10503
- var n = g.useRef(null), r = g.useState({
10499
+ }, Ms = m.forwardRef(function(e, t) {
10500
+ var n = m.useRef(null), r = m.useState({
10504
10501
  onScrollCapture: Ti,
10505
10502
  onWheelCapture: Ti,
10506
10503
  onTouchMoveCapture: Ti
10507
- }), o = r[0], s = r[1], i = e.forwardProps, a = e.children, l = e.className, u = e.removeScrollBar, d = e.enabled, f = e.shards, h = e.sideCar, p = e.noRelative, w = e.noIsolation, y = e.inert, x = e.allowPinchZoom, v = e.as, b = v === void 0 ? "div" : v, S = e.gapMode, T = Wd(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), C = h, k = $w([n, t]), R = un(un({}, T), o);
10508
- return g.createElement(
10509
- g.Fragment,
10504
+ }), o = r[0], s = r[1], i = e.forwardProps, a = e.children, l = e.className, u = e.removeScrollBar, d = e.enabled, f = e.shards, h = e.sideCar, p = e.noRelative, w = e.noIsolation, y = e.inert, x = e.allowPinchZoom, v = e.as, b = v === void 0 ? "div" : v, S = e.gapMode, I = Wd(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), C = h, k = $w([n, t]), R = un(un({}, I), o);
10505
+ return m.createElement(
10506
+ m.Fragment,
10510
10507
  null,
10511
- d && g.createElement(C, { sideCar: Kd, removeScrollBar: u, shards: f, noRelative: p, noIsolation: w, inert: y, setCallbacks: s, allowPinchZoom: !!x, lockRef: n, gapMode: S }),
10512
- i ? g.cloneElement(g.Children.only(a), un(un({}, R), { ref: k })) : g.createElement(b, un({}, R, { className: l, ref: k }), a)
10508
+ d && m.createElement(C, { sideCar: Kd, removeScrollBar: u, shards: f, noRelative: p, noIsolation: w, inert: y, setCallbacks: s, allowPinchZoom: !!x, lockRef: n, gapMode: S }),
10509
+ i ? m.cloneElement(m.Children.only(a), un(un({}, R), { ref: k })) : m.createElement(b, un({}, R, { className: l, ref: k }), a)
10513
10510
  );
10514
10511
  });
10515
10512
  Ms.defaultProps = {
@@ -10553,7 +10550,7 @@ var Gw = function() {
10553
10550
  }, Yw = function() {
10554
10551
  var e = Gw();
10555
10552
  return function(t, n) {
10556
- g.useEffect(function() {
10553
+ m.useEffect(function() {
10557
10554
  return e.add(t), function() {
10558
10555
  e.remove();
10559
10556
  };
@@ -10633,7 +10630,7 @@ var Gw = function() {
10633
10630
  var e = parseInt(document.body.getAttribute(Tr) || "0", 10);
10634
10631
  return isFinite(e) ? e : 0;
10635
10632
  }, tb = function() {
10636
- g.useEffect(function() {
10633
+ m.useEffect(function() {
10637
10634
  return document.body.setAttribute(Tr, (Pc() + 1).toString()), function() {
10638
10635
  var e = Pc() - 1;
10639
10636
  e <= 0 ? document.body.removeAttribute(Tr) : document.body.setAttribute(Tr, e.toString());
@@ -10642,10 +10639,10 @@ var Gw = function() {
10642
10639
  }, nb = function(e) {
10643
10640
  var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
10644
10641
  tb();
10645
- var s = g.useMemo(function() {
10642
+ var s = m.useMemo(function() {
10646
10643
  return Zw(o);
10647
10644
  }, [o]);
10648
- return g.createElement(Qw, { styles: eb(s, !t, o, n ? "" : "!important") });
10645
+ return m.createElement(Qw, { styles: eb(s, !t, o, n ? "" : "!important") });
10649
10646
  }, Ji = !1;
10650
10647
  if (typeof window < "u")
10651
10648
  try {
@@ -10736,10 +10733,10 @@ var yr = Ji ? { passive: !1 } : !1, rb = function(e) {
10736
10733
  `);
10737
10734
  }, fb = 0, wr = [];
10738
10735
  function hb(e) {
10739
- var t = g.useRef([]), n = g.useRef([0, 0]), r = g.useRef(), o = g.useState(fb++)[0], s = g.useState(qd)[0], i = g.useRef(e);
10740
- g.useEffect(function() {
10736
+ var t = m.useRef([]), n = m.useRef([0, 0]), r = m.useRef(), o = m.useState(fb++)[0], s = m.useState(qd)[0], i = m.useRef(e);
10737
+ m.useEffect(function() {
10741
10738
  i.current = e;
10742
- }, [e]), g.useEffect(function() {
10739
+ }, [e]), m.useEffect(function() {
10743
10740
  if (e.inert) {
10744
10741
  document.body.classList.add("block-interactivity-".concat(o));
10745
10742
  var y = Ow([e.lockRef.current], (e.shards || []).map(Dc), !0).filter(Boolean);
@@ -10752,10 +10749,10 @@ function hb(e) {
10752
10749
  };
10753
10750
  }
10754
10751
  }, [e.inert, e.lockRef.current, e.shards]);
10755
- var a = g.useCallback(function(y, x) {
10752
+ var a = m.useCallback(function(y, x) {
10756
10753
  if ("touches" in y && y.touches.length === 2 || y.type === "wheel" && y.ctrlKey)
10757
10754
  return !i.current.allowPinchZoom;
10758
- var v = _o(y), b = n.current, S = "deltaX" in y ? y.deltaX : b[0] - v[0], T = "deltaY" in y ? y.deltaY : b[1] - v[1], C, k = y.target, R = Math.abs(S) > Math.abs(T) ? "h" : "v";
10755
+ var v = _o(y), b = n.current, S = "deltaX" in y ? y.deltaX : b[0] - v[0], I = "deltaY" in y ? y.deltaY : b[1] - v[1], C, k = y.target, R = Math.abs(S) > Math.abs(I) ? "h" : "v";
10759
10756
  if ("touches" in y && R === "h" && k.type === "range")
10760
10757
  return !1;
10761
10758
  var E = Oc(R, k);
@@ -10763,11 +10760,11 @@ function hb(e) {
10763
10760
  return !0;
10764
10761
  if (E ? C = R : (C = R === "v" ? "h" : "v", E = Oc(R, k)), !E)
10765
10762
  return !1;
10766
- if (!r.current && "changedTouches" in y && (S || T) && (r.current = C), !C)
10763
+ if (!r.current && "changedTouches" in y && (S || I) && (r.current = C), !C)
10767
10764
  return !0;
10768
10765
  var A = r.current || C;
10769
- return cb(A, x, y, A === "h" ? S : T);
10770
- }, []), l = g.useCallback(function(y) {
10766
+ return cb(A, x, y, A === "h" ? S : I);
10767
+ }, []), l = m.useCallback(function(y) {
10771
10768
  var x = y;
10772
10769
  if (!(!wr.length || wr[wr.length - 1] !== s)) {
10773
10770
  var v = "deltaY" in x ? Mc(x) : _o(x), b = t.current.filter(function(C) {
@@ -10780,25 +10777,25 @@ function hb(e) {
10780
10777
  if (!b) {
10781
10778
  var S = (i.current.shards || []).map(Dc).filter(Boolean).filter(function(C) {
10782
10779
  return C.contains(x.target);
10783
- }), T = S.length > 0 ? a(x, S[0]) : !i.current.noIsolation;
10784
- T && x.cancelable && x.preventDefault();
10780
+ }), I = S.length > 0 ? a(x, S[0]) : !i.current.noIsolation;
10781
+ I && x.cancelable && x.preventDefault();
10785
10782
  }
10786
10783
  }
10787
- }, []), u = g.useCallback(function(y, x, v, b) {
10784
+ }, []), u = m.useCallback(function(y, x, v, b) {
10788
10785
  var S = { name: y, delta: x, target: v, should: b, shadowParent: pb(v) };
10789
10786
  t.current.push(S), setTimeout(function() {
10790
- t.current = t.current.filter(function(T) {
10791
- return T !== S;
10787
+ t.current = t.current.filter(function(I) {
10788
+ return I !== S;
10792
10789
  });
10793
10790
  }, 1);
10794
- }, []), d = g.useCallback(function(y) {
10791
+ }, []), d = m.useCallback(function(y) {
10795
10792
  n.current = _o(y), r.current = void 0;
10796
- }, []), f = g.useCallback(function(y) {
10793
+ }, []), f = m.useCallback(function(y) {
10797
10794
  u(y.type, Mc(y), y.target, a(y, e.lockRef.current));
10798
- }, []), h = g.useCallback(function(y) {
10795
+ }, []), h = m.useCallback(function(y) {
10799
10796
  u(y.type, _o(y), y.target, a(y, e.lockRef.current));
10800
10797
  }, []);
10801
- g.useEffect(function() {
10798
+ m.useEffect(function() {
10802
10799
  return wr.push(s), e.setCallbacks({
10803
10800
  onScrollCapture: f,
10804
10801
  onWheelCapture: f,
@@ -10810,11 +10807,11 @@ function hb(e) {
10810
10807
  };
10811
10808
  }, []);
10812
10809
  var p = e.removeScrollBar, w = e.inert;
10813
- return g.createElement(
10814
- g.Fragment,
10810
+ return m.createElement(
10811
+ m.Fragment,
10815
10812
  null,
10816
- w ? g.createElement(s, { styles: db(o) }) : null,
10817
- p ? g.createElement(nb, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
10813
+ w ? m.createElement(s, { styles: db(o) }) : null,
10814
+ p ? m.createElement(nb, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
10818
10815
  );
10819
10816
  }
10820
10817
  function pb(e) {
@@ -10823,8 +10820,8 @@ function pb(e) {
10823
10820
  return t;
10824
10821
  }
10825
10822
  const mb = Uw(Kd, hb);
10826
- var Ds = g.forwardRef(function(e, t) {
10827
- return g.createElement(Ms, un({}, e, { ref: t, sideCar: mb }));
10823
+ var Ds = m.forwardRef(function(e, t) {
10824
+ return m.createElement(Ms, un({}, e, { ref: t, sideCar: mb }));
10828
10825
  });
10829
10826
  Ds.classNames = Ms.classNames;
10830
10827
  var gb = function(e) {
@@ -10883,7 +10880,7 @@ var gb = function(e) {
10883
10880
  defaultOpen: o,
10884
10881
  onOpenChange: s,
10885
10882
  modal: i = !0
10886
- } = e, a = g.useRef(null), l = g.useRef(null), [u, d] = rr({
10883
+ } = e, a = m.useRef(null), l = m.useRef(null), [u, d] = rr({
10887
10884
  prop: r,
10888
10885
  defaultProp: o ?? !1,
10889
10886
  onChange: s,
@@ -10900,14 +10897,14 @@ var gb = function(e) {
10900
10897
  descriptionId: hn(),
10901
10898
  open: u,
10902
10899
  onOpenChange: d,
10903
- onOpenToggle: g.useCallback(() => d((f) => !f), [d]),
10900
+ onOpenToggle: m.useCallback(() => d((f) => !f), [d]),
10904
10901
  modal: i,
10905
10902
  children: n
10906
10903
  }
10907
10904
  );
10908
10905
  };
10909
10906
  Qd.displayName = Ls;
10910
- var ef = "DialogTrigger", tf = g.forwardRef(
10907
+ var ef = "DialogTrigger", tf = m.forwardRef(
10911
10908
  (e, t) => {
10912
10909
  const { __scopeDialog: n, ...r } = e, o = nn(ef, n), s = Be(t, o.triggerRef);
10913
10910
  return /* @__PURE__ */ c.jsx(
@@ -10930,17 +10927,17 @@ var Wa = "DialogPortal", [wb, nf] = Zd(Wa, {
10930
10927
  forceMount: void 0
10931
10928
  }), rf = (e) => {
10932
10929
  const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, s = nn(Wa, t);
10933
- return /* @__PURE__ */ c.jsx(wb, { scope: t, forceMount: n, children: g.Children.map(r, (i) => /* @__PURE__ */ c.jsx(zt, { present: n || s.open, children: /* @__PURE__ */ c.jsx(Os, { asChild: !0, container: o, children: i }) })) });
10930
+ return /* @__PURE__ */ c.jsx(wb, { scope: t, forceMount: n, children: m.Children.map(r, (i) => /* @__PURE__ */ c.jsx(zt, { present: n || s.open, children: /* @__PURE__ */ c.jsx(Os, { asChild: !0, container: o, children: i }) })) });
10934
10931
  };
10935
10932
  rf.displayName = Wa;
10936
- var as = "DialogOverlay", of = g.forwardRef(
10933
+ var as = "DialogOverlay", of = m.forwardRef(
10937
10934
  (e, t) => {
10938
10935
  const n = nf(as, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = nn(as, e.__scopeDialog);
10939
10936
  return s.modal ? /* @__PURE__ */ c.jsx(zt, { present: r || s.open, children: /* @__PURE__ */ c.jsx(Sb, { ...o, ref: t }) }) : null;
10940
10937
  }
10941
10938
  );
10942
10939
  of.displayName = as;
10943
- var bb = Er("DialogOverlay.RemoveScroll"), Sb = g.forwardRef(
10940
+ var bb = Er("DialogOverlay.RemoveScroll"), Sb = m.forwardRef(
10944
10941
  (e, t) => {
10945
10942
  const { __scopeDialog: n, ...r } = e, o = nn(as, n);
10946
10943
  return (
@@ -10957,17 +10954,17 @@ var bb = Er("DialogOverlay.RemoveScroll"), Sb = g.forwardRef(
10957
10954
  ) })
10958
10955
  );
10959
10956
  }
10960
- ), or = "DialogContent", sf = g.forwardRef(
10957
+ ), or = "DialogContent", sf = m.forwardRef(
10961
10958
  (e, t) => {
10962
10959
  const n = nf(or, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = nn(or, e.__scopeDialog);
10963
10960
  return /* @__PURE__ */ c.jsx(zt, { present: r || s.open, children: s.modal ? /* @__PURE__ */ c.jsx(Cb, { ...o, ref: t }) : /* @__PURE__ */ c.jsx(kb, { ...o, ref: t }) });
10964
10961
  }
10965
10962
  );
10966
10963
  sf.displayName = or;
10967
- var Cb = g.forwardRef(
10964
+ var Cb = m.forwardRef(
10968
10965
  (e, t) => {
10969
- const n = nn(or, e.__scopeDialog), r = g.useRef(null), o = Be(t, n.contentRef, r);
10970
- return g.useEffect(() => {
10966
+ const n = nn(or, e.__scopeDialog), r = m.useRef(null), o = Be(t, n.contentRef, r);
10967
+ return m.useEffect(() => {
10971
10968
  const s = r.current;
10972
10969
  if (s) return Ua(s);
10973
10970
  }, []), /* @__PURE__ */ c.jsx(
@@ -10992,9 +10989,9 @@ var Cb = g.forwardRef(
10992
10989
  }
10993
10990
  );
10994
10991
  }
10995
- ), kb = g.forwardRef(
10992
+ ), kb = m.forwardRef(
10996
10993
  (e, t) => {
10997
- const n = nn(or, e.__scopeDialog), r = g.useRef(!1), o = g.useRef(!1);
10994
+ const n = nn(or, e.__scopeDialog), r = m.useRef(!1), o = m.useRef(!1);
10998
10995
  return /* @__PURE__ */ c.jsx(
10999
10996
  af,
11000
10997
  {
@@ -11015,9 +11012,9 @@ var Cb = g.forwardRef(
11015
11012
  }
11016
11013
  );
11017
11014
  }
11018
- ), af = g.forwardRef(
11015
+ ), af = m.forwardRef(
11019
11016
  (e, t) => {
11020
- const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: s, ...i } = e, a = nn(or, n), l = g.useRef(null), u = Be(t, l);
11017
+ const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: s, ...i } = e, a = nn(or, n), l = m.useRef(null), u = Be(t, l);
11021
11018
  return Ha(), /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
11022
11019
  /* @__PURE__ */ c.jsx(
11023
11020
  Ps,
@@ -11048,21 +11045,21 @@ var Cb = g.forwardRef(
11048
11045
  ] })
11049
11046
  ] });
11050
11047
  }
11051
- ), Va = "DialogTitle", lf = g.forwardRef(
11048
+ ), Va = "DialogTitle", lf = m.forwardRef(
11052
11049
  (e, t) => {
11053
11050
  const { __scopeDialog: n, ...r } = e, o = nn(Va, n);
11054
11051
  return /* @__PURE__ */ c.jsx(je.h2, { id: o.titleId, ...r, ref: t });
11055
11052
  }
11056
11053
  );
11057
11054
  lf.displayName = Va;
11058
- var cf = "DialogDescription", uf = g.forwardRef(
11055
+ var cf = "DialogDescription", uf = m.forwardRef(
11059
11056
  (e, t) => {
11060
11057
  const { __scopeDialog: n, ...r } = e, o = nn(cf, n);
11061
11058
  return /* @__PURE__ */ c.jsx(je.p, { id: o.descriptionId, ...r, ref: t });
11062
11059
  }
11063
11060
  );
11064
11061
  uf.displayName = cf;
11065
- var df = "DialogClose", ff = g.forwardRef(
11062
+ var df = "DialogClose", ff = m.forwardRef(
11066
11063
  (e, t) => {
11067
11064
  const { __scopeDialog: n, ...r } = e, o = nn(df, n);
11068
11065
  return /* @__PURE__ */ c.jsx(
@@ -11090,18 +11087,18 @@ var hf = "DialogTitleWarning", [ET, pf] = jy(hf, {
11090
11087
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
11091
11088
 
11092
11089
  For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
11093
- return g.useEffect(() => {
11090
+ return m.useEffect(() => {
11094
11091
  e && (document.getElementById(e) || console.error(n));
11095
11092
  }, [n, e]), null;
11096
11093
  }, Ib = "DialogDescriptionWarning", Rb = ({ contentRef: e, descriptionId: t }) => {
11097
11094
  const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${pf(Ib).contentName}}.`;
11098
- return g.useEffect(() => {
11095
+ return m.useEffect(() => {
11099
11096
  var s;
11100
11097
  const o = (s = e.current) == null ? void 0 : s.getAttribute("aria-describedby");
11101
11098
  t && o && (document.getElementById(t) || console.warn(r));
11102
11099
  }, [r, e, t]), null;
11103
11100
  }, mf = Qd, Eb = tf, gf = rf, Fs = of, $s = sf, Qn = lf, zs = uf, xf = ff;
11104
- const Nb = mf, Ab = gf, vf = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
11101
+ const Nb = mf, Ab = gf, vf = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
11105
11102
  Fs,
11106
11103
  {
11107
11104
  ref: n,
@@ -11113,12 +11110,12 @@ const Nb = mf, Ab = gf, vf = g.forwardRef(({ className: e, ...t }, n) => /* @__P
11113
11110
  }
11114
11111
  ));
11115
11112
  vf.displayName = Fs.displayName;
11116
- const yf = g.forwardRef(({ className: e, children: t, ...n }, r) => {
11117
- const o = g.useMemo(() => {
11113
+ const yf = m.forwardRef(({ className: e, children: t, ...n }, r) => {
11114
+ const o = m.useMemo(() => {
11118
11115
  let s = !1;
11119
11116
  function i(a) {
11120
- g.Children.forEach(a, (l) => {
11121
- if (s || !g.isValidElement(l)) return;
11117
+ m.Children.forEach(a, (l) => {
11118
+ if (s || !m.isValidElement(l)) return;
11122
11119
  const u = l.type;
11123
11120
  if (u === Qn || (u == null ? void 0 : u.displayName) === Qn.displayName || (u == null ? void 0 : u.name) === "DialogTitle") {
11124
11121
  s = !0;
@@ -11167,7 +11164,7 @@ const wf = ({
11167
11164
  }
11168
11165
  );
11169
11166
  wf.displayName = "DialogHeader";
11170
- const bf = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
11167
+ const bf = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
11171
11168
  Qn,
11172
11169
  {
11173
11170
  ref: n,
@@ -11179,7 +11176,7 @@ const bf = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
11179
11176
  }
11180
11177
  ));
11181
11178
  bf.displayName = Qn.displayName;
11182
- const _b = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
11179
+ const _b = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
11183
11180
  zs,
11184
11181
  {
11185
11182
  ref: n,
@@ -11506,7 +11503,7 @@ const zb = q.memo(function({
11506
11503
  onCancelEdit: x,
11507
11504
  onCopy: v
11508
11505
  }) {
11509
- const [b, S] = we(!1), [T, C] = we("collapsed"), [k, R] = we(!1), { currentThreadId: E } = ba(), { respondToInterrupt: A } = Sa(), { toast: O } = Ba(), [L, F] = we({}), [V, N] = we(!1), [B, z] = we(null), H = l === "phone" || l === "half-screen", M = t.role, D = M === "tool", X = !(r && M !== "user"), _ = q.useMemo(() => {
11506
+ const [b, S] = we(!1), [I, C] = we("collapsed"), [k, R] = we(!1), { currentThreadId: E } = ba(), { respondToInterrupt: A } = Sa(), { toast: O } = Ba(), [L, F] = we({}), [V, N] = we(!1), [B, z] = we(null), H = l === "phone" || l === "half-screen", M = t.role, D = M === "tool", X = !(r && M !== "user"), _ = q.useMemo(() => {
11510
11507
  switch (M) {
11511
11508
  case "user":
11512
11509
  return "text-[hsl(var(--chat-bubble-user-text))]";
@@ -11782,7 +11779,7 @@ const zb = q.memo(function({
11782
11779
  if (ae.length > 0)
11783
11780
  return /* @__PURE__ */ c.jsx("div", { className: "space-y-2", children: ae.map((he, be) => {
11784
11781
  const pe = typeof he.output == "string" ? he.output : Zi(he.output), Ie = pe.length > qn ? `${pe.slice(0, qn)}
11785
- … [truncated ${pe.length - qn} chars]` : pe, Ze = T === "expanded";
11782
+ … [truncated ${pe.length - qn} chars]` : pe, Ze = I === "expanded";
11786
11783
  return /* @__PURE__ */ c.jsxs(pc, { open: Ze, onOpenChange: (ze) => C(ze ? "expanded" : "preview"), children: [
11787
11784
  /* @__PURE__ */ c.jsx("div", { className: "flex items-center gap-2 text-xs", children: /* @__PURE__ */ c.jsx(Yi, { variant: "outline", children: (he.name ?? "tool") + (he.toolCallId ? ` • ${he.toolCallId.slice(0, 8)}` : "") }) }),
11788
11785
  /* @__PURE__ */ c.jsx("div", { className: "font-mono text-sm mt-1", children: /* @__PURE__ */ c.jsx("pre", { className: "whitespace-pre-wrap break-words", children: Ze ? Ie : Ie.slice(0, d) + (Ie.length > d ? "..." : "") }) }),
@@ -11814,7 +11811,7 @@ const zb = q.memo(function({
11814
11811
  D,
11815
11812
  ce.name,
11816
11813
  K,
11817
- T,
11814
+ I,
11818
11815
  u,
11819
11816
  Je,
11820
11817
  _
@@ -11846,14 +11843,14 @@ const zb = q.memo(function({
11846
11843
  ),
11847
11844
  role: "button",
11848
11845
  tabIndex: 0,
11849
- "aria-expanded": T !== "collapsed",
11846
+ "aria-expanded": I !== "collapsed",
11850
11847
  onKeyDown: (ne) => {
11851
11848
  (ne.key === "Enter" || ne.key === " ") && (ne.preventDefault(), C((ae) => ae === "collapsed" ? "preview" : "collapsed"));
11852
11849
  },
11853
11850
  onClick: () => C((ne) => ne === "collapsed" ? "preview" : "collapsed"),
11854
11851
  children: [
11855
11852
  /* @__PURE__ */ c.jsx("span", { children: ce.name }),
11856
- /* @__PURE__ */ c.jsx("span", { className: "inline-flex items-center", children: T !== "collapsed" ? /* @__PURE__ */ c.jsx(Wr, { className: "h-3 w-3" }) : /* @__PURE__ */ c.jsx(Sr, { className: "h-3 w-3" }) })
11853
+ /* @__PURE__ */ c.jsx("span", { className: "inline-flex items-center", children: I !== "collapsed" ? /* @__PURE__ */ c.jsx(Wr, { className: "h-3 w-3" }) : /* @__PURE__ */ c.jsx(Sr, { className: "h-3 w-3" }) })
11857
11854
  ]
11858
11855
  }
11859
11856
  ),
@@ -11866,7 +11863,7 @@ const zb = q.memo(function({
11866
11863
  onClick: () => C((ne) => ne === "collapsed" ? "preview" : "collapsed"),
11867
11864
  children: /* @__PURE__ */ c.jsxs("span", { className: "text-xs flex items-center gap-1", children: [
11868
11865
  "Tool Output ",
11869
- T !== "collapsed" ? /* @__PURE__ */ c.jsx(Wr, { className: "h-3 w-3" }) : /* @__PURE__ */ c.jsx(Sr, { className: "h-3 w-3" })
11866
+ I !== "collapsed" ? /* @__PURE__ */ c.jsx(Wr, { className: "h-3 w-3" }) : /* @__PURE__ */ c.jsx(Sr, { className: "h-3 w-3" })
11870
11867
  ] })
11871
11868
  }
11872
11869
  )
@@ -11946,7 +11943,7 @@ const zb = q.memo(function({
11946
11943
  }
11947
11944
  ),
11948
11945
  /* @__PURE__ */ c.jsx("div", { className: "relative", children: _e() }),
11949
- D && T === "expanded" && (ce.toolCallId || ce.name) && /* @__PURE__ */ c.jsxs("div", { className: re("mt-2 pt-2 border-t border-current/10 text-xs opacity-60", H && "text-xs"), children: [
11946
+ D && I === "expanded" && (ce.toolCallId || ce.name) && /* @__PURE__ */ c.jsxs("div", { className: re("mt-2 pt-2 border-t border-current/10 text-xs opacity-60", H && "text-xs"), children: [
11950
11947
  ce.name && /* @__PURE__ */ c.jsxs("div", { children: [
11951
11948
  "Function: ",
11952
11949
  ce.name
@@ -12161,7 +12158,7 @@ const $c = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, kf = q.forwa
12161
12158
  onScrollAway: x,
12162
12159
  onAtBottom: v
12163
12160
  }, b) => {
12164
- const S = We(null), T = We(null), C = We(!1), [k, R] = we(!0), E = Ne((L) => {
12161
+ const S = We(null), I = We(null), C = We(!1), [k, R] = we(!0), E = Ne((L) => {
12165
12162
  R(L), x && x(!L), v && v(L);
12166
12163
  }, [x, v]), A = dt(() => {
12167
12164
  if (a)
@@ -12183,7 +12180,7 @@ const $c = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, kf = q.forwa
12183
12180
  S.current = L;
12184
12181
  },
12185
12182
  scrollerRef: (L) => {
12186
- T.current = L instanceof HTMLDivElement ? L : null;
12183
+ I.current = L instanceof HTMLDivElement ? L : null;
12187
12184
  },
12188
12185
  data: e,
12189
12186
  followOutput: O,
@@ -12285,15 +12282,15 @@ function qa(e) {
12285
12282
  i.displayName = t;
12286
12283
  const a = e + "CollectionSlot", l = Er(a), u = q.forwardRef(
12287
12284
  (y, x) => {
12288
- const { scope: v, children: b } = y, S = s(a, v), T = Be(x, S.collectionRef);
12289
- return /* @__PURE__ */ c.jsx(l, { ref: T, children: b });
12285
+ const { scope: v, children: b } = y, S = s(a, v), I = Be(x, S.collectionRef);
12286
+ return /* @__PURE__ */ c.jsx(l, { ref: I, children: b });
12290
12287
  }
12291
12288
  );
12292
12289
  u.displayName = a;
12293
12290
  const d = e + "CollectionItemSlot", f = "data-radix-collection-item", h = Er(d), p = q.forwardRef(
12294
12291
  (y, x) => {
12295
- const { scope: v, children: b, ...S } = y, T = q.useRef(null), C = Be(x, T), k = s(d, v);
12296
- return q.useEffect(() => (k.itemMap.set(T, { ref: T, ...S }), () => void k.itemMap.delete(T))), /* @__PURE__ */ c.jsx(h, { [f]: "", ref: C, children: b });
12292
+ const { scope: v, children: b, ...S } = y, I = q.useRef(null), C = Be(x, I), k = s(d, v);
12293
+ return q.useEffect(() => (k.itemMap.set(I, { ref: I, ...S }), () => void k.itemMap.delete(I))), /* @__PURE__ */ c.jsx(h, { [f]: "", ref: C, children: b });
12297
12294
  }
12298
12295
  );
12299
12296
  p.displayName = d;
@@ -12314,9 +12311,9 @@ function qa(e) {
12314
12311
  r
12315
12312
  ];
12316
12313
  }
12317
- var Yb = g.createContext(void 0);
12314
+ var Yb = m.createContext(void 0);
12318
12315
  function Bs(e) {
12319
- const t = g.useContext(Yb);
12316
+ const t = m.useContext(Yb);
12320
12317
  return e || t || "ltr";
12321
12318
  }
12322
12319
  const Xb = ["top", "right", "bottom", "left"], Mn = Math.min, Dt = Math.max, ls = Math.round, Oo = Math.floor, pn = (e) => ({
@@ -12495,7 +12492,7 @@ const a0 = async (e, t, n) => {
12495
12492
  } = a[y], {
12496
12493
  x: b,
12497
12494
  y: S,
12498
- data: T,
12495
+ data: I,
12499
12496
  reset: C
12500
12497
  } = await v({
12501
12498
  x: d,
@@ -12515,7 +12512,7 @@ const a0 = async (e, t, n) => {
12515
12512
  ...p,
12516
12513
  [x]: {
12517
12514
  ...p[x],
12518
- ...T
12515
+ ...I
12519
12516
  }
12520
12517
  }, C && w <= 50 && (w++, typeof C == "object" && (C.placement && (h = C.placement), C.rects && (u = C.rects === !0 ? await i.getElementRects({
12521
12518
  reference: e,
@@ -12560,7 +12557,7 @@ async function so(e, t) {
12560
12557
  y: o,
12561
12558
  width: i.floating.width,
12562
12559
  height: i.floating.height
12563
- } : i.reference, S = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(a.floating)), T = await (s.isElement == null ? void 0 : s.isElement(S)) ? await (s.getScale == null ? void 0 : s.getScale(S)) || {
12560
+ } : i.reference, S = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(a.floating)), I = await (s.isElement == null ? void 0 : s.isElement(S)) ? await (s.getScale == null ? void 0 : s.getScale(S)) || {
12564
12561
  x: 1,
12565
12562
  y: 1
12566
12563
  } : {
@@ -12573,10 +12570,10 @@ async function so(e, t) {
12573
12570
  strategy: l
12574
12571
  }) : b);
12575
12572
  return {
12576
- top: (v.top - C.top + w.top) / T.y,
12577
- bottom: (C.bottom - v.bottom + w.bottom) / T.y,
12578
- left: (v.left - C.left + w.left) / T.x,
12579
- right: (C.right - v.right + w.right) / T.x
12573
+ top: (v.top - C.top + w.top) / I.y,
12574
+ bottom: (C.bottom - v.bottom + w.bottom) / I.y,
12575
+ left: (v.left - C.left + w.left) / I.x,
12576
+ right: (C.right - v.right + w.right) / I.x
12580
12577
  };
12581
12578
  }
12582
12579
  const l0 = (e) => ({
@@ -12600,10 +12597,10 @@ const l0 = (e) => ({
12600
12597
  const f = Tf(d), h = {
12601
12598
  x: n,
12602
12599
  y: r
12603
- }, p = Xa(o), w = Ya(p), y = await i.getDimensions(u), x = p === "y", v = x ? "top" : "left", b = x ? "bottom" : "right", S = x ? "clientHeight" : "clientWidth", T = s.reference[w] + s.reference[p] - h[p] - s.floating[w], C = h[p] - s.reference[p], k = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(u));
12600
+ }, p = Xa(o), w = Ya(p), y = await i.getDimensions(u), x = p === "y", v = x ? "top" : "left", b = x ? "bottom" : "right", S = x ? "clientHeight" : "clientWidth", I = s.reference[w] + s.reference[p] - h[p] - s.floating[w], C = h[p] - s.reference[p], k = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(u));
12604
12601
  let R = k ? k[S] : 0;
12605
12602
  (!R || !await (i.isElement == null ? void 0 : i.isElement(k))) && (R = a.floating[S] || s.floating[w]);
12606
- const E = T / 2 - C / 2, A = R / 2 - y[w] / 2 - 1, O = Mn(f[v], A), L = Mn(f[b], A), F = O, V = R - y[w] - L, N = R / 2 - y[w] / 2 + E, B = Qi(F, N, V), z = !l.arrow && Lr(o) != null && N !== B && s.reference[w] / 2 - (N < F ? O : L) - y[w] / 2 < 0, H = z ? N < F ? N - F : N - V : 0;
12603
+ const E = I / 2 - C / 2, A = R / 2 - y[w] / 2 - 1, O = Mn(f[v], A), L = Mn(f[b], A), F = O, V = R - y[w] - L, N = R / 2 - y[w] / 2 + E, B = Qi(F, N, V), z = !l.arrow && Lr(o) != null && N !== B && s.reference[w] / 2 - (N < F ? O : L) - y[w] / 2 < 0, H = z ? N < F ? N - F : N - V : 0;
12607
12604
  return {
12608
12605
  [p]: h[p] + H,
12609
12606
  data: {
@@ -12640,12 +12637,12 @@ const l0 = (e) => ({
12640
12637
  } = kn(e, t);
12641
12638
  if ((n = s.arrow) != null && n.alignmentOffset)
12642
12639
  return {};
12643
- const v = Tn(o), b = fn(a), S = Tn(a) === a, T = await (l.isRTL == null ? void 0 : l.isRTL(u.floating)), C = h || (S || !y ? [cs(a)] : t0(a)), k = w !== "none";
12644
- !h && k && C.push(...s0(a, y, w, T));
12640
+ const v = Tn(o), b = fn(a), S = Tn(a) === a, I = await (l.isRTL == null ? void 0 : l.isRTL(u.floating)), C = h || (S || !y ? [cs(a)] : t0(a)), k = w !== "none";
12641
+ !h && k && C.push(...s0(a, y, w, I));
12645
12642
  const R = [a, ...C], E = await so(t, x), A = [];
12646
12643
  let O = ((r = s.flip) == null ? void 0 : r.overflows) || [];
12647
12644
  if (d && A.push(E[v]), f) {
12648
- const N = e0(o, i, T);
12645
+ const N = e0(o, i, I);
12649
12646
  A.push(E[N[0]], E[N[1]]);
12650
12647
  }
12651
12648
  if (O = [...O, {
@@ -12884,12 +12881,12 @@ const f0 = function(e) {
12884
12881
  ...y
12885
12882
  };
12886
12883
  if (l) {
12887
- const S = h === "y" ? "height" : "width", T = s.reference[h] - s.floating[S] + x.mainAxis, C = s.reference[h] + s.reference[S] - x.mainAxis;
12888
- p < T ? p = T : p > C && (p = C);
12884
+ const S = h === "y" ? "height" : "width", I = s.reference[h] - s.floating[S] + x.mainAxis, C = s.reference[h] + s.reference[S] - x.mainAxis;
12885
+ p < I ? p = I : p > C && (p = C);
12889
12886
  }
12890
12887
  if (u) {
12891
12888
  var v, b;
12892
- const S = h === "y" ? "width" : "height", T = If.has(Tn(o)), C = s.reference[f] - s.floating[S] + (T && ((v = i.offset) == null ? void 0 : v[f]) || 0) + (T ? 0 : x.crossAxis), k = s.reference[f] + s.reference[S] + (T ? 0 : ((b = i.offset) == null ? void 0 : b[f]) || 0) - (T ? x.crossAxis : 0);
12889
+ const S = h === "y" ? "width" : "height", I = If.has(Tn(o)), C = s.reference[f] - s.floating[S] + (I && ((v = i.offset) == null ? void 0 : v[f]) || 0) + (I ? 0 : x.crossAxis), k = s.reference[f] + s.reference[S] + (I ? 0 : ((b = i.offset) == null ? void 0 : b[f]) || 0) - (I ? x.crossAxis : 0);
12893
12890
  w < C ? w = C : w > k && (w = k);
12894
12891
  }
12895
12892
  return {
@@ -12919,8 +12916,8 @@ const f0 = function(e) {
12919
12916
  } = s.floating;
12920
12917
  let x, v;
12921
12918
  f === "top" || f === "bottom" ? (x = f, v = h === (await (i.isRTL == null ? void 0 : i.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (v = f, x = h === "end" ? "top" : "bottom");
12922
- const b = y - d.top - d.bottom, S = w - d.left - d.right, T = Mn(y - d[x], b), C = Mn(w - d[v], S), k = !t.middlewareData.shift;
12923
- let R = T, E = C;
12919
+ const b = y - d.top - d.bottom, S = w - d.left - d.right, I = Mn(y - d[x], b), C = Mn(w - d[v], S), k = !t.middlewareData.shift;
12920
+ let R = I, E = C;
12924
12921
  if ((n = t.middlewareData.shift) != null && n.enabled.x && (E = S), (r = t.middlewareData.shift) != null && r.enabled.y && (R = b), k && !h) {
12925
12922
  const O = Dt(d.left, 0), L = Dt(d.right, 0), F = Dt(d.top, 0), V = Dt(d.bottom, 0);
12926
12923
  p ? E = w - 2 * (O !== 0 || L !== 0 ? O + L : Dt(d.left, d.right)) : R = y - 2 * (F !== 0 || V !== 0 ? F + V : Dt(d.top, d.bottom));
@@ -13103,8 +13100,8 @@ function sr(e, t, n, r) {
13103
13100
  const h = $t(s), p = r && Qt(r) ? $t(r) : r;
13104
13101
  let w = h, y = ta(w);
13105
13102
  for (; y && r && p !== w; ) {
13106
- const x = Ir(y), v = y.getBoundingClientRect(), b = en(y), S = v.left + (y.clientLeft + parseFloat(b.paddingLeft)) * x.x, T = v.top + (y.clientTop + parseFloat(b.paddingTop)) * x.y;
13107
- l *= x.x, u *= x.y, d *= x.x, f *= x.y, l += S, u += T, w = $t(y), y = ta(w);
13103
+ const x = Ir(y), v = y.getBoundingClientRect(), b = en(y), S = v.left + (y.clientLeft + parseFloat(b.paddingLeft)) * x.x, I = v.top + (y.clientTop + parseFloat(b.paddingTop)) * x.y;
13104
+ l *= x.x, u *= x.y, d *= x.x, f *= x.y, l += S, u += I, w = $t(y), y = ta(w);
13108
13105
  }
13109
13106
  }
13110
13107
  return us({
@@ -13365,17 +13362,17 @@ function z0(e, t) {
13365
13362
  rootMargin: -w + "px " + -y + "px " + -x + "px " + -v + "px",
13366
13363
  threshold: Dt(0, Mn(1, l)) || 1
13367
13364
  };
13368
- let T = !0;
13365
+ let I = !0;
13369
13366
  function C(k) {
13370
13367
  const R = k[0].intersectionRatio;
13371
13368
  if (R !== l) {
13372
- if (!T)
13369
+ if (!I)
13373
13370
  return i();
13374
13371
  R ? i(!1, R) : r = setTimeout(() => {
13375
13372
  i(!1, 1e-7);
13376
13373
  }, 1e3);
13377
13374
  }
13378
- R === 1 && !Of(u, e.getBoundingClientRect()) && i(), T = !1;
13375
+ R === 1 && !Of(u, e.getBoundingClientRect()) && i(), I = !1;
13379
13376
  }
13380
13377
  try {
13381
13378
  n = new IntersectionObserver(C, {
@@ -13479,7 +13476,7 @@ function Xc(e, t) {
13479
13476
  return Math.round(t * n) / n;
13480
13477
  }
13481
13478
  function Ni(e) {
13482
- const t = g.useRef(e);
13479
+ const t = m.useRef(e);
13483
13480
  return Jo(() => {
13484
13481
  t.current = e;
13485
13482
  }), t;
@@ -13498,20 +13495,20 @@ function J0(e) {
13498
13495
  transform: a = !0,
13499
13496
  whileElementsMounted: l,
13500
13497
  open: u
13501
- } = e, [d, f] = g.useState({
13498
+ } = e, [d, f] = m.useState({
13502
13499
  x: 0,
13503
13500
  y: 0,
13504
13501
  strategy: n,
13505
13502
  placement: t,
13506
13503
  middlewareData: {},
13507
13504
  isPositioned: !1
13508
- }), [h, p] = g.useState(r);
13505
+ }), [h, p] = m.useState(r);
13509
13506
  ds(h, r) || p(r);
13510
- const [w, y] = g.useState(null), [x, v] = g.useState(null), b = g.useCallback((M) => {
13507
+ const [w, y] = m.useState(null), [x, v] = m.useState(null), b = m.useCallback((M) => {
13511
13508
  M !== k.current && (k.current = M, y(M));
13512
- }, []), S = g.useCallback((M) => {
13509
+ }, []), S = m.useCallback((M) => {
13513
13510
  M !== R.current && (R.current = M, v(M));
13514
- }, []), T = s || w, C = i || x, k = g.useRef(null), R = g.useRef(null), E = g.useRef(d), A = l != null, O = Ni(l), L = Ni(o), F = Ni(u), V = g.useCallback(() => {
13511
+ }, []), I = s || w, C = i || x, k = m.useRef(null), R = m.useRef(null), E = m.useRef(d), A = l != null, O = Ni(l), L = Ni(o), F = Ni(u), V = m.useCallback(() => {
13515
13512
  if (!k.current || !R.current)
13516
13513
  return;
13517
13514
  const M = {
@@ -13539,25 +13536,25 @@ function J0(e) {
13539
13536
  isPositioned: !1
13540
13537
  })));
13541
13538
  }, [u]);
13542
- const N = g.useRef(!1);
13539
+ const N = m.useRef(!1);
13543
13540
  Jo(() => (N.current = !0, () => {
13544
13541
  N.current = !1;
13545
13542
  }), []), Jo(() => {
13546
- if (T && (k.current = T), C && (R.current = C), T && C) {
13543
+ if (I && (k.current = I), C && (R.current = C), I && C) {
13547
13544
  if (O.current)
13548
- return O.current(T, C, V);
13545
+ return O.current(I, C, V);
13549
13546
  V();
13550
13547
  }
13551
- }, [T, C, V, O, A]);
13552
- const B = g.useMemo(() => ({
13548
+ }, [I, C, V, O, A]);
13549
+ const B = m.useMemo(() => ({
13553
13550
  reference: k,
13554
13551
  floating: R,
13555
13552
  setReference: b,
13556
13553
  setFloating: S
13557
- }), [b, S]), z = g.useMemo(() => ({
13558
- reference: T,
13554
+ }), [b, S]), z = m.useMemo(() => ({
13555
+ reference: I,
13559
13556
  floating: C
13560
- }), [T, C]), H = g.useMemo(() => {
13557
+ }), [I, C]), H = m.useMemo(() => {
13561
13558
  const M = {
13562
13559
  position: n,
13563
13560
  left: 0,
@@ -13578,7 +13575,7 @@ function J0(e) {
13578
13575
  top: X
13579
13576
  };
13580
13577
  }, [n, a, z.floating, d.x, d.y]);
13581
- return g.useMemo(() => ({
13578
+ return m.useMemo(() => ({
13582
13579
  ...d,
13583
13580
  update: V,
13584
13581
  refs: B,
@@ -13629,7 +13626,7 @@ const Z0 = (e) => {
13629
13626
  ...Z0(e),
13630
13627
  options: [e, t]
13631
13628
  });
13632
- var iS = "Arrow", Df = g.forwardRef((e, t) => {
13629
+ var iS = "Arrow", Df = m.forwardRef((e, t) => {
13633
13630
  const { children: n, width: r = 10, height: o = 5, ...s } = e;
13634
13631
  return /* @__PURE__ */ c.jsx(
13635
13632
  je.svg,
@@ -13647,7 +13644,7 @@ var iS = "Arrow", Df = g.forwardRef((e, t) => {
13647
13644
  Df.displayName = iS;
13648
13645
  var aS = Df;
13649
13646
  function Lf(e) {
13650
- const [t, n] = g.useState(void 0);
13647
+ const [t, n] = m.useState(void 0);
13651
13648
  return wt(() => {
13652
13649
  if (e) {
13653
13650
  n({ width: e.offsetWidth, height: e.offsetHeight });
@@ -13669,21 +13666,21 @@ function Lf(e) {
13669
13666
  }, [e]), t;
13670
13667
  }
13671
13668
  var el = "Popper", [Ff, Ks] = xn(el), [lS, $f] = Ff(el), zf = (e) => {
13672
- const { __scopePopper: t, children: n } = e, [r, o] = g.useState(null);
13669
+ const { __scopePopper: t, children: n } = e, [r, o] = m.useState(null);
13673
13670
  return /* @__PURE__ */ c.jsx(lS, { scope: t, anchor: r, onAnchorChange: o, children: n });
13674
13671
  };
13675
13672
  zf.displayName = el;
13676
- var Bf = "PopperAnchor", Hf = g.forwardRef(
13673
+ var Bf = "PopperAnchor", Hf = m.forwardRef(
13677
13674
  (e, t) => {
13678
- const { __scopePopper: n, virtualRef: r, ...o } = e, s = $f(Bf, n), i = g.useRef(null), a = Be(t, i), l = g.useRef(null);
13679
- return g.useEffect(() => {
13675
+ const { __scopePopper: n, virtualRef: r, ...o } = e, s = $f(Bf, n), i = m.useRef(null), a = Be(t, i), l = m.useRef(null);
13676
+ return m.useEffect(() => {
13680
13677
  const u = l.current;
13681
13678
  l.current = (r == null ? void 0 : r.current) || i.current, u !== l.current && s.onAnchorChange(l.current);
13682
13679
  }), r ? null : /* @__PURE__ */ c.jsx(je.div, { ...o, ref: a });
13683
13680
  }
13684
13681
  );
13685
13682
  Hf.displayName = Bf;
13686
- var tl = "PopperContent", [cS, uS] = Ff(tl), Uf = g.forwardRef(
13683
+ var tl = "PopperContent", [cS, uS] = Ff(tl), Uf = m.forwardRef(
13687
13684
  (e, t) => {
13688
13685
  var K, $, Y, J, me, oe;
13689
13686
  const {
@@ -13701,7 +13698,7 @@ var tl = "PopperContent", [cS, uS] = Ff(tl), Uf = g.forwardRef(
13701
13698
  updatePositionStrategy: p = "optimized",
13702
13699
  onPlaced: w,
13703
13700
  ...y
13704
- } = e, x = $f(tl, n), [v, b] = g.useState(null), S = Be(t, (te) => b(te)), [T, C] = g.useState(null), k = Lf(T), R = (k == null ? void 0 : k.width) ?? 0, E = (k == null ? void 0 : k.height) ?? 0, A = r + (s !== "center" ? "-" + s : ""), O = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, L = Array.isArray(u) ? u : [u], F = L.length > 0, V = {
13701
+ } = e, x = $f(tl, n), [v, b] = m.useState(null), S = Be(t, (te) => b(te)), [I, C] = m.useState(null), k = Lf(I), R = (k == null ? void 0 : k.width) ?? 0, E = (k == null ? void 0 : k.height) ?? 0, A = r + (s !== "center" ? "-" + s : ""), O = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, L = Array.isArray(u) ? u : [u], F = L.length > 0, V = {
13705
13702
  padding: O,
13706
13703
  boundary: L.filter(fS),
13707
13704
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
@@ -13732,7 +13729,7 @@ var tl = "PopperContent", [cS, uS] = Ff(tl), Uf = g.forwardRef(
13732
13729
  Je.setProperty("--radix-popper-available-width", `${Ue}px`), Je.setProperty("--radix-popper-available-height", `${Oe}px`), Je.setProperty("--radix-popper-anchor-width", `${$e}px`), Je.setProperty("--radix-popper-anchor-height", `${ot}px`);
13733
13730
  }
13734
13731
  }),
13735
- T && sS({ element: T, padding: a }),
13732
+ I && sS({ element: I, padding: a }),
13736
13733
  hS({ arrowWidth: R, arrowHeight: E }),
13737
13734
  h && oS({ strategy: "referenceHidden", ...V })
13738
13735
  ]
@@ -13740,7 +13737,7 @@ var tl = "PopperContent", [cS, uS] = Ff(tl), Uf = g.forwardRef(
13740
13737
  wt(() => {
13741
13738
  H && (_ == null || _());
13742
13739
  }, [H, _]);
13743
- const G = (K = M.arrow) == null ? void 0 : K.x, ce = ($ = M.arrow) == null ? void 0 : $.y, ye = ((Y = M.arrow) == null ? void 0 : Y.centerOffset) !== 0, [Ce, de] = g.useState();
13740
+ const G = (K = M.arrow) == null ? void 0 : K.x, ce = ($ = M.arrow) == null ? void 0 : $.y, ye = ((Y = M.arrow) == null ? void 0 : Y.centerOffset) !== 0, [Ce, de] = m.useState();
13744
13741
  return wt(() => {
13745
13742
  v && de(window.getComputedStyle(v).zIndex);
13746
13743
  }, [v]), /* @__PURE__ */ c.jsx(
@@ -13803,7 +13800,7 @@ var Wf = "PopperArrow", dS = {
13803
13800
  right: "left",
13804
13801
  bottom: "top",
13805
13802
  left: "right"
13806
- }, Vf = g.forwardRef(function(t, n) {
13803
+ }, Vf = m.forwardRef(function(t, n) {
13807
13804
  const { __scopePopper: r, ...o } = t, s = uS(Wf, r), i = dS[s.placedSide];
13808
13805
  return (
13809
13806
  // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
@@ -13869,11 +13866,11 @@ function Kf(e) {
13869
13866
  var qf = zf, Gf = Hf, Yf = Uf, Xf = Vf, Ai = "rovingFocusGroup.onEntryFocus", pS = { bubbles: !1, cancelable: !0 }, wo = "RovingFocusGroup", [na, Jf, mS] = qa(wo), [gS, Zf] = xn(
13870
13867
  wo,
13871
13868
  [mS]
13872
- ), [xS, vS] = gS(wo), Qf = g.forwardRef(
13869
+ ), [xS, vS] = gS(wo), Qf = m.forwardRef(
13873
13870
  (e, t) => /* @__PURE__ */ c.jsx(na.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ c.jsx(na.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ c.jsx(yS, { ...e, ref: t }) }) })
13874
13871
  );
13875
13872
  Qf.displayName = wo;
13876
- var yS = g.forwardRef((e, t) => {
13873
+ var yS = m.forwardRef((e, t) => {
13877
13874
  const {
13878
13875
  __scopeRovingFocusGroup: n,
13879
13876
  orientation: r,
@@ -13885,13 +13882,13 @@ var yS = g.forwardRef((e, t) => {
13885
13882
  onEntryFocus: u,
13886
13883
  preventScrollOnEntryFocus: d = !1,
13887
13884
  ...f
13888
- } = e, h = g.useRef(null), p = Be(t, h), w = Bs(s), [y, x] = rr({
13885
+ } = e, h = m.useRef(null), p = Be(t, h), w = Bs(s), [y, x] = rr({
13889
13886
  prop: i,
13890
13887
  defaultProp: a ?? null,
13891
13888
  onChange: l,
13892
13889
  caller: wo
13893
- }), [v, b] = g.useState(!1), S = bt(u), T = Jf(n), C = g.useRef(!1), [k, R] = g.useState(0);
13894
- return g.useEffect(() => {
13890
+ }), [v, b] = m.useState(!1), S = bt(u), I = Jf(n), C = m.useRef(!1), [k, R] = m.useState(0);
13891
+ return m.useEffect(() => {
13895
13892
  const E = h.current;
13896
13893
  if (E)
13897
13894
  return E.addEventListener(Ai, S), () => E.removeEventListener(Ai, S);
@@ -13903,16 +13900,16 @@ var yS = g.forwardRef((e, t) => {
13903
13900
  dir: w,
13904
13901
  loop: o,
13905
13902
  currentTabStopId: y,
13906
- onItemFocus: g.useCallback(
13903
+ onItemFocus: m.useCallback(
13907
13904
  (E) => x(E),
13908
13905
  [x]
13909
13906
  ),
13910
- onItemShiftTab: g.useCallback(() => b(!0), []),
13911
- onFocusableItemAdd: g.useCallback(
13907
+ onItemShiftTab: m.useCallback(() => b(!0), []),
13908
+ onFocusableItemAdd: m.useCallback(
13912
13909
  () => R((E) => E + 1),
13913
13910
  []
13914
13911
  ),
13915
- onFocusableItemRemove: g.useCallback(
13912
+ onFocusableItemRemove: m.useCallback(
13916
13913
  () => R((E) => E - 1),
13917
13914
  []
13918
13915
  ),
@@ -13932,7 +13929,7 @@ var yS = g.forwardRef((e, t) => {
13932
13929
  if (E.target === E.currentTarget && A && !v) {
13933
13930
  const O = new CustomEvent(Ai, pS);
13934
13931
  if (E.currentTarget.dispatchEvent(O), !O.defaultPrevented) {
13935
- const L = T().filter((z) => z.focusable), F = L.find((z) => z.active), V = L.find((z) => z.id === y), B = [F, V, ...L].filter(
13932
+ const L = I().filter((z) => z.focusable), F = L.find((z) => z.active), V = L.find((z) => z.id === y), B = [F, V, ...L].filter(
13936
13933
  Boolean
13937
13934
  ).map((z) => z.ref.current);
13938
13935
  nh(B, d);
@@ -13945,7 +13942,7 @@ var yS = g.forwardRef((e, t) => {
13945
13942
  )
13946
13943
  }
13947
13944
  );
13948
- }), eh = "RovingFocusGroupItem", th = g.forwardRef(
13945
+ }), eh = "RovingFocusGroupItem", th = m.forwardRef(
13949
13946
  (e, t) => {
13950
13947
  const {
13951
13948
  __scopeRovingFocusGroup: n,
@@ -13955,7 +13952,7 @@ var yS = g.forwardRef((e, t) => {
13955
13952
  children: i,
13956
13953
  ...a
13957
13954
  } = e, l = hn(), u = s || l, d = vS(eh, n), f = d.currentTabStopId === u, h = Jf(n), { onFocusableItemAdd: p, onFocusableItemRemove: w, currentTabStopId: y } = d;
13958
- return g.useEffect(() => {
13955
+ return m.useEffect(() => {
13959
13956
  if (r)
13960
13957
  return p(), () => w();
13961
13958
  }, [r, p, w]), /* @__PURE__ */ c.jsx(
@@ -13986,12 +13983,12 @@ var yS = g.forwardRef((e, t) => {
13986
13983
  if (v !== void 0) {
13987
13984
  if (x.metaKey || x.ctrlKey || x.altKey || x.shiftKey) return;
13988
13985
  x.preventDefault();
13989
- let S = h().filter((T) => T.focusable).map((T) => T.ref.current);
13986
+ let S = h().filter((I) => I.focusable).map((I) => I.ref.current);
13990
13987
  if (v === "last") S.reverse();
13991
13988
  else if (v === "prev" || v === "next") {
13992
13989
  v === "prev" && S.reverse();
13993
- const T = S.indexOf(x.currentTarget);
13994
- S = d.loop ? CS(S, T + 1) : S.slice(T + 1);
13990
+ const I = S.indexOf(x.currentTarget);
13991
+ S = d.loop ? CS(S, I + 1) : S.slice(I + 1);
13995
13992
  }
13996
13993
  setTimeout(() => nh(S));
13997
13994
  }
@@ -14041,8 +14038,8 @@ var kS = Qf, TS = th, ra = ["Enter", " "], IS = ["ArrowDown", "PageUp", "Home"],
14041
14038
  Ks,
14042
14039
  Zf
14043
14040
  ]), qs = Ks(), sh = Zf(), [jS, fr] = dr(bo), [PS, So] = dr(bo), ih = (e) => {
14044
- const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, a = qs(t), [l, u] = g.useState(null), d = g.useRef(!1), f = bt(s), h = Bs(o);
14045
- return g.useEffect(() => {
14041
+ const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, a = qs(t), [l, u] = m.useState(null), d = m.useRef(!1), f = bt(s), h = Bs(o);
14042
+ return m.useEffect(() => {
14046
14043
  const p = () => {
14047
14044
  d.current = !0, document.addEventListener("pointerdown", w, { capture: !0, once: !0 }), document.addEventListener("pointermove", w, { capture: !0, once: !0 });
14048
14045
  }, w = () => d.current = !1;
@@ -14061,7 +14058,7 @@ var kS = Qf, TS = th, ra = ["Enter", " "], IS = ["ArrowDown", "PageUp", "Home"],
14061
14058
  PS,
14062
14059
  {
14063
14060
  scope: t,
14064
- onClose: g.useCallback(() => f(!1), [f]),
14061
+ onClose: m.useCallback(() => f(!1), [f]),
14065
14062
  isUsingKeyboardRef: d,
14066
14063
  dir: h,
14067
14064
  modal: i,
@@ -14072,7 +14069,7 @@ var kS = Qf, TS = th, ra = ["Enter", " "], IS = ["ArrowDown", "PageUp", "Home"],
14072
14069
  ) });
14073
14070
  };
14074
14071
  ih.displayName = bo;
14075
- var OS = "MenuAnchor", nl = g.forwardRef(
14072
+ var OS = "MenuAnchor", nl = m.forwardRef(
14076
14073
  (e, t) => {
14077
14074
  const { __scopeMenu: n, ...r } = e, o = qs(n);
14078
14075
  return /* @__PURE__ */ c.jsx(Gf, { ...o, ...r, ref: t });
@@ -14086,15 +14083,15 @@ var rl = "MenuPortal", [MS, ah] = dr(rl, {
14086
14083
  return /* @__PURE__ */ c.jsx(MS, { scope: t, forceMount: n, children: /* @__PURE__ */ c.jsx(zt, { present: n || s.open, children: /* @__PURE__ */ c.jsx(Os, { asChild: !0, container: o, children: r }) }) });
14087
14084
  };
14088
14085
  lh.displayName = rl;
14089
- var Vt = "MenuContent", [DS, ol] = dr(Vt), ch = g.forwardRef(
14086
+ var Vt = "MenuContent", [DS, ol] = dr(Vt), ch = m.forwardRef(
14090
14087
  (e, t) => {
14091
14088
  const n = ah(Vt, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = fr(Vt, e.__scopeMenu), i = So(Vt, e.__scopeMenu);
14092
14089
  return /* @__PURE__ */ c.jsx(ao.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ c.jsx(zt, { present: r || s.open, children: /* @__PURE__ */ c.jsx(ao.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ c.jsx(LS, { ...o, ref: t }) : /* @__PURE__ */ c.jsx(FS, { ...o, ref: t }) }) }) });
14093
14090
  }
14094
- ), LS = g.forwardRef(
14091
+ ), LS = m.forwardRef(
14095
14092
  (e, t) => {
14096
- const n = fr(Vt, e.__scopeMenu), r = g.useRef(null), o = Be(t, r);
14097
- return g.useEffect(() => {
14093
+ const n = fr(Vt, e.__scopeMenu), r = m.useRef(null), o = Be(t, r);
14094
+ return m.useEffect(() => {
14098
14095
  const s = r.current;
14099
14096
  if (s) return Ua(s);
14100
14097
  }, []), /* @__PURE__ */ c.jsx(
@@ -14114,7 +14111,7 @@ var Vt = "MenuContent", [DS, ol] = dr(Vt), ch = g.forwardRef(
14114
14111
  }
14115
14112
  );
14116
14113
  }
14117
- ), FS = g.forwardRef((e, t) => {
14114
+ ), FS = m.forwardRef((e, t) => {
14118
14115
  const n = fr(Vt, e.__scopeMenu);
14119
14116
  return /* @__PURE__ */ c.jsx(
14120
14117
  sl,
@@ -14127,7 +14124,7 @@ var Vt = "MenuContent", [DS, ol] = dr(Vt), ch = g.forwardRef(
14127
14124
  onDismiss: () => n.onOpenChange(!1)
14128
14125
  }
14129
14126
  );
14130
- }), $S = Er("MenuContent.ScrollLock"), sl = g.forwardRef(
14127
+ }), $S = Er("MenuContent.ScrollLock"), sl = m.forwardRef(
14131
14128
  (e, t) => {
14132
14129
  const {
14133
14130
  __scopeMenu: n,
@@ -14144,15 +14141,15 @@ var Vt = "MenuContent", [DS, ol] = dr(Vt), ch = g.forwardRef(
14144
14141
  onDismiss: p,
14145
14142
  disableOutsideScroll: w,
14146
14143
  ...y
14147
- } = e, x = fr(Vt, n), v = So(Vt, n), b = qs(n), S = sh(n), T = AS(n), [C, k] = g.useState(null), R = g.useRef(null), E = Be(t, R, x.onContentChange), A = g.useRef(0), O = g.useRef(""), L = g.useRef(0), F = g.useRef(null), V = g.useRef("right"), N = g.useRef(0), B = w ? Ds : g.Fragment, z = w ? { as: $S, allowPinchZoom: !0 } : void 0, H = (D) => {
14144
+ } = e, x = fr(Vt, n), v = So(Vt, n), b = qs(n), S = sh(n), I = AS(n), [C, k] = m.useState(null), R = m.useRef(null), E = Be(t, R, x.onContentChange), A = m.useRef(0), O = m.useRef(""), L = m.useRef(0), F = m.useRef(null), V = m.useRef("right"), N = m.useRef(0), B = w ? Ds : m.Fragment, z = w ? { as: $S, allowPinchZoom: !0 } : void 0, H = (D) => {
14148
14145
  var K, $;
14149
- const X = O.current + D, _ = T().filter((Y) => !Y.disabled), G = document.activeElement, ce = (K = _.find((Y) => Y.ref.current === G)) == null ? void 0 : K.textValue, ye = _.map((Y) => Y.textValue), Ce = JS(ye, X, ce), de = ($ = _.find((Y) => Y.textValue === Ce)) == null ? void 0 : $.ref.current;
14146
+ const X = O.current + D, _ = I().filter((Y) => !Y.disabled), G = document.activeElement, ce = (K = _.find((Y) => Y.ref.current === G)) == null ? void 0 : K.textValue, ye = _.map((Y) => Y.textValue), Ce = JS(ye, X, ce), de = ($ = _.find((Y) => Y.textValue === Ce)) == null ? void 0 : $.ref.current;
14150
14147
  (function Y(J) {
14151
14148
  O.current = J, window.clearTimeout(A.current), J !== "" && (A.current = window.setTimeout(() => Y(""), 1e3));
14152
14149
  })(X), de && setTimeout(() => de.focus());
14153
14150
  };
14154
- g.useEffect(() => () => window.clearTimeout(A.current), []), Ha();
14155
- const M = g.useCallback((D) => {
14151
+ m.useEffect(() => () => window.clearTimeout(A.current), []), Ha();
14152
+ const M = m.useCallback((D) => {
14156
14153
  var _, G;
14157
14154
  return V.current === ((_ = F.current) == null ? void 0 : _.side) && QS(D, (G = F.current) == null ? void 0 : G.area);
14158
14155
  }, []);
@@ -14161,27 +14158,27 @@ var Vt = "MenuContent", [DS, ol] = dr(Vt), ch = g.forwardRef(
14161
14158
  {
14162
14159
  scope: n,
14163
14160
  searchRef: O,
14164
- onItemEnter: g.useCallback(
14161
+ onItemEnter: m.useCallback(
14165
14162
  (D) => {
14166
14163
  M(D) && D.preventDefault();
14167
14164
  },
14168
14165
  [M]
14169
14166
  ),
14170
- onItemLeave: g.useCallback(
14167
+ onItemLeave: m.useCallback(
14171
14168
  (D) => {
14172
14169
  var X;
14173
14170
  M(D) || ((X = R.current) == null || X.focus(), k(null));
14174
14171
  },
14175
14172
  [M]
14176
14173
  ),
14177
- onTriggerLeave: g.useCallback(
14174
+ onTriggerLeave: m.useCallback(
14178
14175
  (D) => {
14179
14176
  M(D) && D.preventDefault();
14180
14177
  },
14181
14178
  [M]
14182
14179
  ),
14183
14180
  pointerGraceTimerRef: L,
14184
- onPointerGraceIntentChange: g.useCallback((D) => {
14181
+ onPointerGraceIntentChange: m.useCallback((D) => {
14185
14182
  F.current = D;
14186
14183
  }, []),
14187
14184
  children: /* @__PURE__ */ c.jsx(B, { ...z, children: /* @__PURE__ */ c.jsx(
@@ -14236,7 +14233,7 @@ var Vt = "MenuContent", [DS, ol] = dr(Vt), ch = g.forwardRef(
14236
14233
  const ye = R.current;
14237
14234
  if (D.target !== ye || !RS.includes(D.key)) return;
14238
14235
  D.preventDefault();
14239
- const de = T().filter((K) => !K.disabled).map((K) => K.ref.current);
14236
+ const de = I().filter((K) => !K.disabled).map((K) => K.ref.current);
14240
14237
  rh.includes(D.key) && de.reverse(), YS(de);
14241
14238
  }),
14242
14239
  onBlur: fe(e.onBlur, (D) => {
@@ -14265,23 +14262,23 @@ var Vt = "MenuContent", [DS, ol] = dr(Vt), ch = g.forwardRef(
14265
14262
  }
14266
14263
  );
14267
14264
  ch.displayName = Vt;
14268
- var zS = "MenuGroup", il = g.forwardRef(
14265
+ var zS = "MenuGroup", il = m.forwardRef(
14269
14266
  (e, t) => {
14270
14267
  const { __scopeMenu: n, ...r } = e;
14271
14268
  return /* @__PURE__ */ c.jsx(je.div, { role: "group", ...r, ref: t });
14272
14269
  }
14273
14270
  );
14274
14271
  il.displayName = zS;
14275
- var BS = "MenuLabel", uh = g.forwardRef(
14272
+ var BS = "MenuLabel", uh = m.forwardRef(
14276
14273
  (e, t) => {
14277
14274
  const { __scopeMenu: n, ...r } = e;
14278
14275
  return /* @__PURE__ */ c.jsx(je.div, { ...r, ref: t });
14279
14276
  }
14280
14277
  );
14281
14278
  uh.displayName = BS;
14282
- var fs = "MenuItem", Jc = "menu.itemSelect", Gs = g.forwardRef(
14279
+ var fs = "MenuItem", Jc = "menu.itemSelect", Gs = m.forwardRef(
14283
14280
  (e, t) => {
14284
- const { disabled: n = !1, onSelect: r, ...o } = e, s = g.useRef(null), i = So(fs, e.__scopeMenu), a = ol(fs, e.__scopeMenu), l = Be(t, s), u = g.useRef(!1), d = () => {
14281
+ const { disabled: n = !1, onSelect: r, ...o } = e, s = m.useRef(null), i = So(fs, e.__scopeMenu), a = ol(fs, e.__scopeMenu), l = Be(t, s), u = m.useRef(!1), d = () => {
14285
14282
  const f = s.current;
14286
14283
  if (!n && f) {
14287
14284
  const h = new CustomEvent(Jc, { bubbles: !0, cancelable: !0 });
@@ -14312,10 +14309,10 @@ var fs = "MenuItem", Jc = "menu.itemSelect", Gs = g.forwardRef(
14312
14309
  }
14313
14310
  );
14314
14311
  Gs.displayName = fs;
14315
- var dh = g.forwardRef(
14312
+ var dh = m.forwardRef(
14316
14313
  (e, t) => {
14317
- const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, i = ol(fs, n), a = sh(n), l = g.useRef(null), u = Be(t, l), [d, f] = g.useState(!1), [h, p] = g.useState("");
14318
- return g.useEffect(() => {
14314
+ const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, i = ol(fs, n), a = sh(n), l = m.useRef(null), u = Be(t, l), [d, f] = m.useState(!1), [h, p] = m.useState("");
14315
+ return m.useEffect(() => {
14319
14316
  const w = l.current;
14320
14317
  w && p((w.textContent ?? "").trim());
14321
14318
  }, [s.children]), /* @__PURE__ */ c.jsx(
@@ -14350,7 +14347,7 @@ var dh = g.forwardRef(
14350
14347
  }
14351
14348
  );
14352
14349
  }
14353
- ), HS = "MenuCheckboxItem", fh = g.forwardRef(
14350
+ ), HS = "MenuCheckboxItem", fh = m.forwardRef(
14354
14351
  (e, t) => {
14355
14352
  const { checked: n = !1, onCheckedChange: r, ...o } = e;
14356
14353
  return /* @__PURE__ */ c.jsx(xh, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ c.jsx(
@@ -14375,14 +14372,14 @@ var hh = "MenuRadioGroup", [US, WS] = dr(
14375
14372
  hh,
14376
14373
  { value: void 0, onValueChange: () => {
14377
14374
  } }
14378
- ), ph = g.forwardRef(
14375
+ ), ph = m.forwardRef(
14379
14376
  (e, t) => {
14380
14377
  const { value: n, onValueChange: r, ...o } = e, s = bt(r);
14381
14378
  return /* @__PURE__ */ c.jsx(US, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ c.jsx(il, { ...o, ref: t }) });
14382
14379
  }
14383
14380
  );
14384
14381
  ph.displayName = hh;
14385
- var mh = "MenuRadioItem", gh = g.forwardRef(
14382
+ var mh = "MenuRadioItem", gh = m.forwardRef(
14386
14383
  (e, t) => {
14387
14384
  const { value: n, ...r } = e, o = WS(mh, e.__scopeMenu), s = n === o.value;
14388
14385
  return /* @__PURE__ */ c.jsx(xh, { scope: e.__scopeMenu, checked: s, children: /* @__PURE__ */ c.jsx(
@@ -14409,7 +14406,7 @@ gh.displayName = mh;
14409
14406
  var al = "MenuItemIndicator", [xh, VS] = dr(
14410
14407
  al,
14411
14408
  { checked: !1 }
14412
- ), vh = g.forwardRef(
14409
+ ), vh = m.forwardRef(
14413
14410
  (e, t) => {
14414
14411
  const { __scopeMenu: n, forceMount: r, ...o } = e, s = VS(al, n);
14415
14412
  return /* @__PURE__ */ c.jsx(
@@ -14429,7 +14426,7 @@ var al = "MenuItemIndicator", [xh, VS] = dr(
14429
14426
  }
14430
14427
  );
14431
14428
  vh.displayName = al;
14432
- var KS = "MenuSeparator", yh = g.forwardRef(
14429
+ var KS = "MenuSeparator", yh = m.forwardRef(
14433
14430
  (e, t) => {
14434
14431
  const { __scopeMenu: n, ...r } = e;
14435
14432
  return /* @__PURE__ */ c.jsx(
@@ -14444,19 +14441,19 @@ var KS = "MenuSeparator", yh = g.forwardRef(
14444
14441
  }
14445
14442
  );
14446
14443
  yh.displayName = KS;
14447
- var qS = "MenuArrow", wh = g.forwardRef(
14444
+ var qS = "MenuArrow", wh = m.forwardRef(
14448
14445
  (e, t) => {
14449
14446
  const { __scopeMenu: n, ...r } = e, o = qs(n);
14450
14447
  return /* @__PURE__ */ c.jsx(Xf, { ...o, ...r, ref: t });
14451
14448
  }
14452
14449
  );
14453
14450
  wh.displayName = qS;
14454
- var GS = "MenuSub", [NT, bh] = dr(GS), Vr = "MenuSubTrigger", Sh = g.forwardRef(
14451
+ var GS = "MenuSub", [NT, bh] = dr(GS), Vr = "MenuSubTrigger", Sh = m.forwardRef(
14455
14452
  (e, t) => {
14456
- const n = fr(Vr, e.__scopeMenu), r = So(Vr, e.__scopeMenu), o = bh(Vr, e.__scopeMenu), s = ol(Vr, e.__scopeMenu), i = g.useRef(null), { pointerGraceTimerRef: a, onPointerGraceIntentChange: l } = s, u = { __scopeMenu: e.__scopeMenu }, d = g.useCallback(() => {
14453
+ const n = fr(Vr, e.__scopeMenu), r = So(Vr, e.__scopeMenu), o = bh(Vr, e.__scopeMenu), s = ol(Vr, e.__scopeMenu), i = m.useRef(null), { pointerGraceTimerRef: a, onPointerGraceIntentChange: l } = s, u = { __scopeMenu: e.__scopeMenu }, d = m.useCallback(() => {
14457
14454
  i.current && window.clearTimeout(i.current), i.current = null;
14458
14455
  }, []);
14459
- return g.useEffect(() => d, [d]), g.useEffect(() => {
14456
+ return m.useEffect(() => d, [d]), m.useEffect(() => {
14460
14457
  const f = a.current;
14461
14458
  return () => {
14462
14459
  window.clearTimeout(f), l(null);
@@ -14522,9 +14519,9 @@ var GS = "MenuSub", [NT, bh] = dr(GS), Vr = "MenuSubTrigger", Sh = g.forwardRef(
14522
14519
  }
14523
14520
  );
14524
14521
  Sh.displayName = Vr;
14525
- var Ch = "MenuSubContent", kh = g.forwardRef(
14522
+ var Ch = "MenuSubContent", kh = m.forwardRef(
14526
14523
  (e, t) => {
14527
- const n = ah(Vt, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = fr(Vt, e.__scopeMenu), i = So(Vt, e.__scopeMenu), a = bh(Ch, e.__scopeMenu), l = g.useRef(null), u = Be(t, l);
14524
+ const n = ah(Vt, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = fr(Vt, e.__scopeMenu), i = So(Vt, e.__scopeMenu), a = bh(Ch, e.__scopeMenu), l = m.useRef(null), u = Be(t, l);
14528
14525
  return /* @__PURE__ */ c.jsx(ao.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ c.jsx(zt, { present: r || s.open, children: /* @__PURE__ */ c.jsx(ao.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ c.jsx(
14529
14526
  sl,
14530
14527
  {
@@ -14613,7 +14610,7 @@ var eC = ih, tC = nl, nC = lh, rC = ch, oC = il, sC = uh, iC = Gs, aC = fh, lC =
14613
14610
  defaultOpen: s,
14614
14611
  onOpenChange: i,
14615
14612
  modal: a = !0
14616
- } = e, l = Rt(t), u = g.useRef(null), [d, f] = rr({
14613
+ } = e, l = Rt(t), u = m.useRef(null), [d, f] = rr({
14617
14614
  prop: o,
14618
14615
  defaultProp: s ?? !1,
14619
14616
  onChange: i,
@@ -14628,14 +14625,14 @@ var eC = ih, tC = nl, nC = lh, rC = ch, oC = il, sC = uh, iC = Gs, aC = fh, lC =
14628
14625
  contentId: hn(),
14629
14626
  open: d,
14630
14627
  onOpenChange: f,
14631
- onOpenToggle: g.useCallback(() => f((h) => !h), [f]),
14628
+ onOpenToggle: m.useCallback(() => f((h) => !h), [f]),
14632
14629
  modal: a,
14633
14630
  children: /* @__PURE__ */ c.jsx(eC, { ...l, open: d, onOpenChange: f, dir: r, modal: a, children: n })
14634
14631
  }
14635
14632
  );
14636
14633
  };
14637
14634
  Rh.displayName = Ys;
14638
- var Eh = "DropdownMenuTrigger", Nh = g.forwardRef(
14635
+ var Eh = "DropdownMenuTrigger", Nh = m.forwardRef(
14639
14636
  (e, t) => {
14640
14637
  const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = Ih(Eh, n), i = Rt(n);
14641
14638
  return /* @__PURE__ */ c.jsx(tC, { asChild: !0, ...i, children: /* @__PURE__ */ c.jsx(
@@ -14667,9 +14664,9 @@ var xC = "DropdownMenuPortal", Ah = (e) => {
14667
14664
  return /* @__PURE__ */ c.jsx(nC, { ...r, ...n });
14668
14665
  };
14669
14666
  Ah.displayName = xC;
14670
- var _h = "DropdownMenuContent", jh = g.forwardRef(
14667
+ var _h = "DropdownMenuContent", jh = m.forwardRef(
14671
14668
  (e, t) => {
14672
- const { __scopeDropdownMenu: n, ...r } = e, o = Ih(_h, n), s = Rt(n), i = g.useRef(!1);
14669
+ const { __scopeDropdownMenu: n, ...r } = e, o = Ih(_h, n), s = Rt(n), i = m.useRef(!1);
14673
14670
  return /* @__PURE__ */ c.jsx(
14674
14671
  rC,
14675
14672
  {
@@ -14699,65 +14696,65 @@ var _h = "DropdownMenuContent", jh = g.forwardRef(
14699
14696
  }
14700
14697
  );
14701
14698
  jh.displayName = _h;
14702
- var vC = "DropdownMenuGroup", yC = g.forwardRef(
14699
+ var vC = "DropdownMenuGroup", yC = m.forwardRef(
14703
14700
  (e, t) => {
14704
14701
  const { __scopeDropdownMenu: n, ...r } = e, o = Rt(n);
14705
14702
  return /* @__PURE__ */ c.jsx(oC, { ...o, ...r, ref: t });
14706
14703
  }
14707
14704
  );
14708
14705
  yC.displayName = vC;
14709
- var wC = "DropdownMenuLabel", Ph = g.forwardRef(
14706
+ var wC = "DropdownMenuLabel", Ph = m.forwardRef(
14710
14707
  (e, t) => {
14711
14708
  const { __scopeDropdownMenu: n, ...r } = e, o = Rt(n);
14712
14709
  return /* @__PURE__ */ c.jsx(sC, { ...o, ...r, ref: t });
14713
14710
  }
14714
14711
  );
14715
14712
  Ph.displayName = wC;
14716
- var bC = "DropdownMenuItem", Oh = g.forwardRef(
14713
+ var bC = "DropdownMenuItem", Oh = m.forwardRef(
14717
14714
  (e, t) => {
14718
14715
  const { __scopeDropdownMenu: n, ...r } = e, o = Rt(n);
14719
14716
  return /* @__PURE__ */ c.jsx(iC, { ...o, ...r, ref: t });
14720
14717
  }
14721
14718
  );
14722
14719
  Oh.displayName = bC;
14723
- var SC = "DropdownMenuCheckboxItem", Mh = g.forwardRef((e, t) => {
14720
+ var SC = "DropdownMenuCheckboxItem", Mh = m.forwardRef((e, t) => {
14724
14721
  const { __scopeDropdownMenu: n, ...r } = e, o = Rt(n);
14725
14722
  return /* @__PURE__ */ c.jsx(aC, { ...o, ...r, ref: t });
14726
14723
  });
14727
14724
  Mh.displayName = SC;
14728
- var CC = "DropdownMenuRadioGroup", kC = g.forwardRef((e, t) => {
14725
+ var CC = "DropdownMenuRadioGroup", kC = m.forwardRef((e, t) => {
14729
14726
  const { __scopeDropdownMenu: n, ...r } = e, o = Rt(n);
14730
14727
  return /* @__PURE__ */ c.jsx(lC, { ...o, ...r, ref: t });
14731
14728
  });
14732
14729
  kC.displayName = CC;
14733
- var TC = "DropdownMenuRadioItem", Dh = g.forwardRef((e, t) => {
14730
+ var TC = "DropdownMenuRadioItem", Dh = m.forwardRef((e, t) => {
14734
14731
  const { __scopeDropdownMenu: n, ...r } = e, o = Rt(n);
14735
14732
  return /* @__PURE__ */ c.jsx(cC, { ...o, ...r, ref: t });
14736
14733
  });
14737
14734
  Dh.displayName = TC;
14738
- var IC = "DropdownMenuItemIndicator", Lh = g.forwardRef((e, t) => {
14735
+ var IC = "DropdownMenuItemIndicator", Lh = m.forwardRef((e, t) => {
14739
14736
  const { __scopeDropdownMenu: n, ...r } = e, o = Rt(n);
14740
14737
  return /* @__PURE__ */ c.jsx(uC, { ...o, ...r, ref: t });
14741
14738
  });
14742
14739
  Lh.displayName = IC;
14743
- var RC = "DropdownMenuSeparator", Fh = g.forwardRef((e, t) => {
14740
+ var RC = "DropdownMenuSeparator", Fh = m.forwardRef((e, t) => {
14744
14741
  const { __scopeDropdownMenu: n, ...r } = e, o = Rt(n);
14745
14742
  return /* @__PURE__ */ c.jsx(dC, { ...o, ...r, ref: t });
14746
14743
  });
14747
14744
  Fh.displayName = RC;
14748
- var EC = "DropdownMenuArrow", NC = g.forwardRef(
14745
+ var EC = "DropdownMenuArrow", NC = m.forwardRef(
14749
14746
  (e, t) => {
14750
14747
  const { __scopeDropdownMenu: n, ...r } = e, o = Rt(n);
14751
14748
  return /* @__PURE__ */ c.jsx(fC, { ...o, ...r, ref: t });
14752
14749
  }
14753
14750
  );
14754
14751
  NC.displayName = EC;
14755
- var AC = "DropdownMenuSubTrigger", $h = g.forwardRef((e, t) => {
14752
+ var AC = "DropdownMenuSubTrigger", $h = m.forwardRef((e, t) => {
14756
14753
  const { __scopeDropdownMenu: n, ...r } = e, o = Rt(n);
14757
14754
  return /* @__PURE__ */ c.jsx(hC, { ...o, ...r, ref: t });
14758
14755
  });
14759
14756
  $h.displayName = AC;
14760
- var _C = "DropdownMenuSubContent", zh = g.forwardRef((e, t) => {
14757
+ var _C = "DropdownMenuSubContent", zh = m.forwardRef((e, t) => {
14761
14758
  const { __scopeDropdownMenu: n, ...r } = e, o = Rt(n);
14762
14759
  return /* @__PURE__ */ c.jsx(
14763
14760
  pC,
@@ -14778,7 +14775,7 @@ var _C = "DropdownMenuSubContent", zh = g.forwardRef((e, t) => {
14778
14775
  });
14779
14776
  zh.displayName = _C;
14780
14777
  var jC = Rh, PC = Nh, OC = Ah, Bh = jh, Hh = Ph, Uh = Oh, Wh = Mh, Vh = Dh, Kh = Lh, qh = Fh, Gh = $h, Yh = zh;
14781
- const MC = jC, DC = PC, LC = g.forwardRef(({ className: e, inset: t, children: n, ...r }, o) => /* @__PURE__ */ c.jsxs(
14778
+ const MC = jC, DC = PC, LC = m.forwardRef(({ className: e, inset: t, children: n, ...r }, o) => /* @__PURE__ */ c.jsxs(
14782
14779
  Gh,
14783
14780
  {
14784
14781
  ref: o,
@@ -14795,7 +14792,7 @@ const MC = jC, DC = PC, LC = g.forwardRef(({ className: e, inset: t, children: n
14795
14792
  }
14796
14793
  ));
14797
14794
  LC.displayName = Gh.displayName;
14798
- const FC = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14795
+ const FC = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14799
14796
  Yh,
14800
14797
  {
14801
14798
  ref: n,
@@ -14807,7 +14804,7 @@ const FC = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14807
14804
  }
14808
14805
  ));
14809
14806
  FC.displayName = Yh.displayName;
14810
- const Xh = g.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ c.jsx(OC, { children: /* @__PURE__ */ c.jsx(
14807
+ const Xh = m.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ c.jsx(OC, { children: /* @__PURE__ */ c.jsx(
14811
14808
  Bh,
14812
14809
  {
14813
14810
  ref: r,
@@ -14820,7 +14817,7 @@ const Xh = g.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__
14820
14817
  }
14821
14818
  ) }));
14822
14819
  Xh.displayName = Bh.displayName;
14823
- const oa = g.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ c.jsx(
14820
+ const oa = m.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ c.jsx(
14824
14821
  Uh,
14825
14822
  {
14826
14823
  ref: r,
@@ -14833,7 +14830,7 @@ const oa = g.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
14833
14830
  }
14834
14831
  ));
14835
14832
  oa.displayName = Uh.displayName;
14836
- const $C = g.forwardRef(({ className: e, children: t, checked: n, ...r }, o) => /* @__PURE__ */ c.jsxs(
14833
+ const $C = m.forwardRef(({ className: e, children: t, checked: n, ...r }, o) => /* @__PURE__ */ c.jsxs(
14837
14834
  Wh,
14838
14835
  {
14839
14836
  ref: o,
@@ -14850,7 +14847,7 @@ const $C = g.forwardRef(({ className: e, children: t, checked: n, ...r }, o) =>
14850
14847
  }
14851
14848
  ));
14852
14849
  $C.displayName = Wh.displayName;
14853
- const zC = g.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ c.jsxs(
14850
+ const zC = m.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ c.jsxs(
14854
14851
  Vh,
14855
14852
  {
14856
14853
  ref: r,
@@ -14866,7 +14863,7 @@ const zC = g.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
14866
14863
  }
14867
14864
  ));
14868
14865
  zC.displayName = Vh.displayName;
14869
- const BC = g.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ c.jsx(
14866
+ const BC = m.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ c.jsx(
14870
14867
  Hh,
14871
14868
  {
14872
14869
  ref: r,
@@ -14879,7 +14876,7 @@ const BC = g.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
14879
14876
  }
14880
14877
  ));
14881
14878
  BC.displayName = Hh.displayName;
14882
- const HC = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14879
+ const HC = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14883
14880
  qh,
14884
14881
  {
14885
14882
  ref: n,
@@ -14909,7 +14906,7 @@ function _i({
14909
14906
  messages: v,
14910
14907
  hasMore: b,
14911
14908
  isHistoryLoading: S,
14912
- isLoading: T,
14909
+ isLoading: I,
14913
14910
  loadOlder: C,
14914
14911
  checkpoints: k,
14915
14912
  navigateToCheckpoint: R,
@@ -15149,7 +15146,7 @@ function _i({
15149
15146
  isNavigatingCheckpoint: Ze
15150
15147
  }
15151
15148
  ),
15152
- T && /* @__PURE__ */ c.jsxs("div", { className: "absolute inset-0 z-10 flex flex-col items-center justify-center gap-2 bg-background/80 backdrop-blur-sm text-muted-foreground", children: [
15149
+ I && /* @__PURE__ */ c.jsxs("div", { className: "absolute inset-0 z-10 flex flex-col items-center justify-center gap-2 bg-background/80 backdrop-blur-sm text-muted-foreground", children: [
15153
15150
  /* @__PURE__ */ c.jsx(Oi, { className: "h-6 w-6 animate-spin" }),
15154
15151
  /* @__PURE__ */ c.jsx("span", { className: "text-xs font-semibold uppercase tracking-wide", children: "Loading messages…" })
15155
15152
  ] })
@@ -15281,7 +15278,7 @@ function _i({
15281
15278
  ] })
15282
15279
  ] });
15283
15280
  }
15284
- const ps = g.forwardRef(
15281
+ const ps = m.forwardRef(
15285
15282
  ({ className: e, type: t, ...n }, r) => /* @__PURE__ */ c.jsx(
15286
15283
  "input",
15287
15284
  {
@@ -15300,9 +15297,9 @@ function sa(e, [t, n]) {
15300
15297
  return Math.min(n, Math.max(t, e));
15301
15298
  }
15302
15299
  function UC(e, t) {
15303
- return g.useReducer((n, r) => t[n][r] ?? n, e);
15300
+ return m.useReducer((n, r) => t[n][r] ?? n, e);
15304
15301
  }
15305
- var cl = "ScrollArea", [Jh, _T] = xn(cl), [WC, qt] = Jh(cl), Zh = g.forwardRef(
15302
+ var cl = "ScrollArea", [Jh, _T] = xn(cl), [WC, qt] = Jh(cl), Zh = m.forwardRef(
15306
15303
  (e, t) => {
15307
15304
  const {
15308
15305
  __scopeScrollArea: n,
@@ -15310,7 +15307,7 @@ var cl = "ScrollArea", [Jh, _T] = xn(cl), [WC, qt] = Jh(cl), Zh = g.forwardRef(
15310
15307
  dir: o,
15311
15308
  scrollHideDelay: s = 600,
15312
15309
  ...i
15313
- } = e, [a, l] = g.useState(null), [u, d] = g.useState(null), [f, h] = g.useState(null), [p, w] = g.useState(null), [y, x] = g.useState(null), [v, b] = g.useState(0), [S, T] = g.useState(0), [C, k] = g.useState(!1), [R, E] = g.useState(!1), A = Be(t, (L) => l(L)), O = Bs(o);
15310
+ } = e, [a, l] = m.useState(null), [u, d] = m.useState(null), [f, h] = m.useState(null), [p, w] = m.useState(null), [y, x] = m.useState(null), [v, b] = m.useState(0), [S, I] = m.useState(0), [C, k] = m.useState(!1), [R, E] = m.useState(!1), A = Be(t, (L) => l(L)), O = Bs(o);
15314
15311
  return /* @__PURE__ */ c.jsx(
15315
15312
  WC,
15316
15313
  {
@@ -15332,7 +15329,7 @@ var cl = "ScrollArea", [Jh, _T] = xn(cl), [WC, qt] = Jh(cl), Zh = g.forwardRef(
15332
15329
  scrollbarYEnabled: R,
15333
15330
  onScrollbarYEnabledChange: E,
15334
15331
  onCornerWidthChange: b,
15335
- onCornerHeightChange: T,
15332
+ onCornerHeightChange: I,
15336
15333
  children: /* @__PURE__ */ c.jsx(
15337
15334
  je.div,
15338
15335
  {
@@ -15353,9 +15350,9 @@ var cl = "ScrollArea", [Jh, _T] = xn(cl), [WC, qt] = Jh(cl), Zh = g.forwardRef(
15353
15350
  }
15354
15351
  );
15355
15352
  Zh.displayName = cl;
15356
- var Qh = "ScrollAreaViewport", ep = g.forwardRef(
15353
+ var Qh = "ScrollAreaViewport", ep = m.forwardRef(
15357
15354
  (e, t) => {
15358
- const { __scopeScrollArea: n, children: r, nonce: o, ...s } = e, i = qt(Qh, n), a = g.useRef(null), l = Be(t, a, i.onViewportChange);
15355
+ const { __scopeScrollArea: n, children: r, nonce: o, ...s } = e, i = qt(Qh, n), a = m.useRef(null), l = Be(t, a, i.onViewportChange);
15359
15356
  return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
15360
15357
  /* @__PURE__ */ c.jsx(
15361
15358
  "style",
@@ -15395,18 +15392,18 @@ var Qh = "ScrollAreaViewport", ep = g.forwardRef(
15395
15392
  }
15396
15393
  );
15397
15394
  ep.displayName = Qh;
15398
- var yn = "ScrollAreaScrollbar", ul = g.forwardRef(
15395
+ var yn = "ScrollAreaScrollbar", ul = m.forwardRef(
15399
15396
  (e, t) => {
15400
15397
  const { forceMount: n, ...r } = e, o = qt(yn, e.__scopeScrollArea), { onScrollbarXEnabledChange: s, onScrollbarYEnabledChange: i } = o, a = e.orientation === "horizontal";
15401
- return g.useEffect(() => (a ? s(!0) : i(!0), () => {
15398
+ return m.useEffect(() => (a ? s(!0) : i(!0), () => {
15402
15399
  a ? s(!1) : i(!1);
15403
15400
  }), [a, s, i]), o.type === "hover" ? /* @__PURE__ */ c.jsx(VC, { ...r, ref: t, forceMount: n }) : o.type === "scroll" ? /* @__PURE__ */ c.jsx(KC, { ...r, ref: t, forceMount: n }) : o.type === "auto" ? /* @__PURE__ */ c.jsx(tp, { ...r, ref: t, forceMount: n }) : o.type === "always" ? /* @__PURE__ */ c.jsx(dl, { ...r, ref: t }) : null;
15404
15401
  }
15405
15402
  );
15406
15403
  ul.displayName = yn;
15407
- var VC = g.forwardRef((e, t) => {
15408
- const { forceMount: n, ...r } = e, o = qt(yn, e.__scopeScrollArea), [s, i] = g.useState(!1);
15409
- return g.useEffect(() => {
15404
+ var VC = m.forwardRef((e, t) => {
15405
+ const { forceMount: n, ...r } = e, o = qt(yn, e.__scopeScrollArea), [s, i] = m.useState(!1);
15406
+ return m.useEffect(() => {
15410
15407
  const a = o.scrollArea;
15411
15408
  let l = 0;
15412
15409
  if (a) {
@@ -15427,7 +15424,7 @@ var VC = g.forwardRef((e, t) => {
15427
15424
  ref: t
15428
15425
  }
15429
15426
  ) });
15430
- }), KC = g.forwardRef((e, t) => {
15427
+ }), KC = m.forwardRef((e, t) => {
15431
15428
  const { forceMount: n, ...r } = e, o = qt(yn, e.__scopeScrollArea), s = e.orientation === "horizontal", i = Js(() => l("SCROLL_END"), 100), [a, l] = UC("hidden", {
15432
15429
  hidden: {
15433
15430
  SCROLL: "scrolling"
@@ -15446,12 +15443,12 @@ var VC = g.forwardRef((e, t) => {
15446
15443
  POINTER_ENTER: "interacting"
15447
15444
  }
15448
15445
  });
15449
- return g.useEffect(() => {
15446
+ return m.useEffect(() => {
15450
15447
  if (a === "idle") {
15451
15448
  const u = window.setTimeout(() => l("HIDE"), o.scrollHideDelay);
15452
15449
  return () => window.clearTimeout(u);
15453
15450
  }
15454
- }, [a, o.scrollHideDelay, l]), g.useEffect(() => {
15451
+ }, [a, o.scrollHideDelay, l]), m.useEffect(() => {
15455
15452
  const u = o.viewport, d = s ? "scrollLeft" : "scrollTop";
15456
15453
  if (u) {
15457
15454
  let f = u[d];
@@ -15471,8 +15468,8 @@ var VC = g.forwardRef((e, t) => {
15471
15468
  onPointerLeave: fe(e.onPointerLeave, () => l("POINTER_LEAVE"))
15472
15469
  }
15473
15470
  ) });
15474
- }), tp = g.forwardRef((e, t) => {
15475
- const n = qt(yn, e.__scopeScrollArea), { forceMount: r, ...o } = e, [s, i] = g.useState(!1), a = e.orientation === "horizontal", l = Js(() => {
15471
+ }), tp = m.forwardRef((e, t) => {
15472
+ const n = qt(yn, e.__scopeScrollArea), { forceMount: r, ...o } = e, [s, i] = m.useState(!1), a = e.orientation === "horizontal", l = Js(() => {
15476
15473
  if (n.viewport) {
15477
15474
  const u = n.viewport.offsetWidth < n.viewport.scrollWidth, d = n.viewport.offsetHeight < n.viewport.scrollHeight;
15478
15475
  i(a ? u : d);
@@ -15486,8 +15483,8 @@ var VC = g.forwardRef((e, t) => {
15486
15483
  ref: t
15487
15484
  }
15488
15485
  ) });
15489
- }), dl = g.forwardRef((e, t) => {
15490
- const { orientation: n = "vertical", ...r } = e, o = qt(yn, e.__scopeScrollArea), s = g.useRef(null), i = g.useRef(0), [a, l] = g.useState({
15486
+ }), dl = m.forwardRef((e, t) => {
15487
+ const { orientation: n = "vertical", ...r } = e, o = qt(yn, e.__scopeScrollArea), s = m.useRef(null), i = m.useRef(0), [a, l] = m.useState({
15491
15488
  content: 0,
15492
15489
  viewport: 0,
15493
15490
  scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
@@ -15540,9 +15537,9 @@ var VC = g.forwardRef((e, t) => {
15540
15537
  }
15541
15538
  }
15542
15539
  ) : null;
15543
- }), qC = g.forwardRef((e, t) => {
15544
- const { sizes: n, onSizesChange: r, ...o } = e, s = qt(yn, e.__scopeScrollArea), [i, a] = g.useState(), l = g.useRef(null), u = Be(t, l, s.onScrollbarXChange);
15545
- return g.useEffect(() => {
15540
+ }), qC = m.forwardRef((e, t) => {
15541
+ const { sizes: n, onSizesChange: r, ...o } = e, s = qt(yn, e.__scopeScrollArea), [i, a] = m.useState(), l = m.useRef(null), u = Be(t, l, s.onScrollbarXChange);
15542
+ return m.useEffect(() => {
15546
15543
  l.current && a(getComputedStyle(l.current));
15547
15544
  }, [l]), /* @__PURE__ */ c.jsx(
15548
15545
  rp,
@@ -15579,9 +15576,9 @@ var VC = g.forwardRef((e, t) => {
15579
15576
  }
15580
15577
  }
15581
15578
  );
15582
- }), GC = g.forwardRef((e, t) => {
15583
- const { sizes: n, onSizesChange: r, ...o } = e, s = qt(yn, e.__scopeScrollArea), [i, a] = g.useState(), l = g.useRef(null), u = Be(t, l, s.onScrollbarYChange);
15584
- return g.useEffect(() => {
15579
+ }), GC = m.forwardRef((e, t) => {
15580
+ const { sizes: n, onSizesChange: r, ...o } = e, s = qt(yn, e.__scopeScrollArea), [i, a] = m.useState(), l = m.useRef(null), u = Be(t, l, s.onScrollbarYChange);
15581
+ return m.useEffect(() => {
15585
15582
  l.current && a(getComputedStyle(l.current));
15586
15583
  }, [l]), /* @__PURE__ */ c.jsx(
15587
15584
  rp,
@@ -15619,7 +15616,7 @@ var VC = g.forwardRef((e, t) => {
15619
15616
  }
15620
15617
  }
15621
15618
  );
15622
- }), [YC, np] = Jh(yn), rp = g.forwardRef((e, t) => {
15619
+ }), [YC, np] = Jh(yn), rp = m.forwardRef((e, t) => {
15623
15620
  const {
15624
15621
  __scopeScrollArea: n,
15625
15622
  sizes: r,
@@ -15632,20 +15629,20 @@ var VC = g.forwardRef((e, t) => {
15632
15629
  onWheelScroll: d,
15633
15630
  onResize: f,
15634
15631
  ...h
15635
- } = e, p = qt(yn, n), [w, y] = g.useState(null), x = Be(t, (A) => y(A)), v = g.useRef(null), b = g.useRef(""), S = p.viewport, T = r.content - r.viewport, C = bt(d), k = bt(l), R = Js(f, 10);
15632
+ } = e, p = qt(yn, n), [w, y] = m.useState(null), x = Be(t, (A) => y(A)), v = m.useRef(null), b = m.useRef(""), S = p.viewport, I = r.content - r.viewport, C = bt(d), k = bt(l), R = Js(f, 10);
15636
15633
  function E(A) {
15637
15634
  if (v.current) {
15638
15635
  const O = A.clientX - v.current.left, L = A.clientY - v.current.top;
15639
15636
  u({ x: O, y: L });
15640
15637
  }
15641
15638
  }
15642
- return g.useEffect(() => {
15639
+ return m.useEffect(() => {
15643
15640
  const A = (O) => {
15644
15641
  const L = O.target;
15645
- (w == null ? void 0 : w.contains(L)) && C(O, T);
15642
+ (w == null ? void 0 : w.contains(L)) && C(O, I);
15646
15643
  };
15647
15644
  return document.addEventListener("wheel", A, { passive: !1 }), () => document.removeEventListener("wheel", A, { passive: !1 });
15648
- }, [S, w, T, C]), g.useEffect(k, [r, k]), jr(w, R), jr(p.content, R), /* @__PURE__ */ c.jsx(
15645
+ }, [S, w, I, C]), m.useEffect(k, [r, k]), jr(w, R), jr(p.content, R), /* @__PURE__ */ c.jsx(
15649
15646
  YC,
15650
15647
  {
15651
15648
  scope: n,
@@ -15673,20 +15670,20 @@ var VC = g.forwardRef((e, t) => {
15673
15670
  )
15674
15671
  }
15675
15672
  );
15676
- }), ms = "ScrollAreaThumb", op = g.forwardRef(
15673
+ }), ms = "ScrollAreaThumb", op = m.forwardRef(
15677
15674
  (e, t) => {
15678
15675
  const { forceMount: n, ...r } = e, o = np(ms, e.__scopeScrollArea);
15679
15676
  return /* @__PURE__ */ c.jsx(zt, { present: n || o.hasThumb, children: /* @__PURE__ */ c.jsx(XC, { ref: t, ...r }) });
15680
15677
  }
15681
- ), XC = g.forwardRef(
15678
+ ), XC = m.forwardRef(
15682
15679
  (e, t) => {
15683
15680
  const { __scopeScrollArea: n, style: r, ...o } = e, s = qt(ms, n), i = np(ms, n), { onThumbPositionChange: a } = i, l = Be(
15684
15681
  t,
15685
15682
  (f) => i.onThumbChange(f)
15686
- ), u = g.useRef(void 0), d = Js(() => {
15683
+ ), u = m.useRef(void 0), d = Js(() => {
15687
15684
  u.current && (u.current(), u.current = void 0);
15688
15685
  }, 100);
15689
- return g.useEffect(() => {
15686
+ return m.useEffect(() => {
15690
15687
  const f = s.viewport;
15691
15688
  if (f) {
15692
15689
  const h = () => {
@@ -15718,15 +15715,15 @@ var VC = g.forwardRef((e, t) => {
15718
15715
  }
15719
15716
  );
15720
15717
  op.displayName = ms;
15721
- var fl = "ScrollAreaCorner", sp = g.forwardRef(
15718
+ var fl = "ScrollAreaCorner", sp = m.forwardRef(
15722
15719
  (e, t) => {
15723
15720
  const n = qt(fl, e.__scopeScrollArea), r = !!(n.scrollbarX && n.scrollbarY);
15724
15721
  return n.type !== "scroll" && r ? /* @__PURE__ */ c.jsx(JC, { ...e, ref: t }) : null;
15725
15722
  }
15726
15723
  );
15727
15724
  sp.displayName = fl;
15728
- var JC = g.forwardRef((e, t) => {
15729
- const { __scopeScrollArea: n, ...r } = e, o = qt(fl, n), [s, i] = g.useState(0), [a, l] = g.useState(0), u = !!(s && a);
15725
+ var JC = m.forwardRef((e, t) => {
15726
+ const { __scopeScrollArea: n, ...r } = e, o = qt(fl, n), [s, i] = m.useState(0), [a, l] = m.useState(0), u = !!(s && a);
15730
15727
  return jr(o.scrollbarX, () => {
15731
15728
  var f;
15732
15729
  const d = ((f = o.scrollbarX) == null ? void 0 : f.offsetHeight) || 0;
@@ -15790,8 +15787,8 @@ var QC = (e, t = () => {
15790
15787
  }(), () => window.cancelAnimationFrame(r);
15791
15788
  };
15792
15789
  function Js(e, t) {
15793
- const n = bt(e), r = g.useRef(0);
15794
- return g.useEffect(() => () => window.clearTimeout(r.current), []), g.useCallback(() => {
15790
+ const n = bt(e), r = m.useRef(0);
15791
+ return m.useEffect(() => () => window.clearTimeout(r.current), []), m.useCallback(() => {
15795
15792
  window.clearTimeout(r.current), r.current = window.setTimeout(n, t);
15796
15793
  }, [n, t]);
15797
15794
  }
@@ -15810,7 +15807,7 @@ function jr(e, t) {
15810
15807
  }, [e, n]);
15811
15808
  }
15812
15809
  var cp = Zh, ek = ep, tk = sp;
15813
- const up = g.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ c.jsxs(
15810
+ const up = m.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ c.jsxs(
15814
15811
  cp,
15815
15812
  {
15816
15813
  ref: r,
@@ -15824,7 +15821,7 @@ const up = g.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
15824
15821
  }
15825
15822
  ));
15826
15823
  up.displayName = cp.displayName;
15827
- const dp = g.forwardRef(({ className: e, orientation: t = "vertical", ...n }, r) => /* @__PURE__ */ c.jsx(
15824
+ const dp = m.forwardRef(({ className: e, orientation: t = "vertical", ...n }, r) => /* @__PURE__ */ c.jsx(
15828
15825
  ul,
15829
15826
  {
15830
15827
  ref: r,
@@ -15858,19 +15855,19 @@ function Qc({
15858
15855
  currentThreadId: h,
15859
15856
  isLoading: p,
15860
15857
  actions: w
15861
- } = ba(), { loadThread: y } = Sa(), { createThread: x, deleteThread: v, renameThread: b } = w, [S, T] = we(Array.isArray(f) ? f : []), C = We(S.length > 0), [k, R] = we(null), [E, A] = we(""), [O, L] = we(!1);
15858
+ } = ba(), { loadThread: y } = Sa(), { createThread: x, deleteThread: v, renameThread: b } = w, [S, I] = we(Array.isArray(f) ? f : []), C = We(S.length > 0), [k, R] = we(null), [E, A] = we(""), [O, L] = we(!1);
15862
15859
  st(() => {
15863
15860
  const _ = Array.isArray(f) ? f : [];
15864
15861
  if (_.length > 0) {
15865
- C.current = !0, T(_), console.log("[ThreadManager] useEffect - threads from context:", _.length);
15862
+ C.current = !0, I(_), console.log("[ThreadManager] useEffect - threads from context:", _.length);
15866
15863
  return;
15867
15864
  }
15868
- if (p) {
15865
+ if (p && !C.current) {
15869
15866
  console.log("[ThreadManager] useEffect - context empty but loading, keeping previous");
15870
15867
  return;
15871
15868
  }
15872
- C.current = !1, T(_);
15873
- }, [f, p]);
15869
+ C.current = !1, I(_);
15870
+ }, [f]);
15874
15871
  const F = async (_) => {
15875
15872
  try {
15876
15873
  await y(_), a == null || a(_), l == null || l(_);
@@ -16086,7 +16083,7 @@ function PT(e) {
16086
16083
  authToken: e.apiKey ?? void 0
16087
16084
  }), ik(e);
16088
16085
  }
16089
- var ak = "Label", gp = g.forwardRef((e, t) => /* @__PURE__ */ c.jsx(
16086
+ var ak = "Label", gp = m.forwardRef((e, t) => /* @__PURE__ */ c.jsx(
16090
16087
  je.label,
16091
16088
  {
16092
16089
  ...e,
@@ -16101,7 +16098,7 @@ gp.displayName = ak;
16101
16098
  var xp = gp;
16102
16099
  const lk = ys(
16103
16100
  "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
16104
- ), Bt = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
16101
+ ), Bt = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
16105
16102
  xp,
16106
16103
  {
16107
16104
  ref: n,
@@ -16111,10 +16108,10 @@ const lk = ys(
16111
16108
  ));
16112
16109
  Bt.displayName = xp.displayName;
16113
16110
  function vp(e) {
16114
- const t = g.useRef({ value: e, previous: e });
16115
- return g.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
16111
+ const t = m.useRef({ value: e, previous: e });
16112
+ return m.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
16116
16113
  }
16117
- var Zs = "Switch", [ck, OT] = xn(Zs), [uk, dk] = ck(Zs), yp = g.forwardRef(
16114
+ var Zs = "Switch", [ck, OT] = xn(Zs), [uk, dk] = ck(Zs), yp = m.forwardRef(
16118
16115
  (e, t) => {
16119
16116
  const {
16120
16117
  __scopeSwitch: n,
@@ -16127,7 +16124,7 @@ var Zs = "Switch", [ck, OT] = xn(Zs), [uk, dk] = ck(Zs), yp = g.forwardRef(
16127
16124
  onCheckedChange: u,
16128
16125
  form: d,
16129
16126
  ...f
16130
- } = e, [h, p] = g.useState(null), w = Be(t, (S) => p(S)), y = g.useRef(!1), x = h ? d || !!h.closest("form") : !0, [v, b] = rr({
16127
+ } = e, [h, p] = m.useState(null), w = Be(t, (S) => p(S)), y = m.useRef(!1), x = h ? d || !!h.closest("form") : !0, [v, b] = rr({
16131
16128
  prop: o,
16132
16129
  defaultProp: s ?? !1,
16133
16130
  onChange: u,
@@ -16148,7 +16145,7 @@ var Zs = "Switch", [ck, OT] = xn(Zs), [uk, dk] = ck(Zs), yp = g.forwardRef(
16148
16145
  ...f,
16149
16146
  ref: w,
16150
16147
  onClick: fe(e.onClick, (S) => {
16151
- b((T) => !T), x && (y.current = S.isPropagationStopped(), y.current || S.stopPropagation());
16148
+ b((I) => !I), x && (y.current = S.isPropagationStopped(), y.current || S.stopPropagation());
16152
16149
  })
16153
16150
  }
16154
16151
  ),
@@ -16170,7 +16167,7 @@ var Zs = "Switch", [ck, OT] = xn(Zs), [uk, dk] = ck(Zs), yp = g.forwardRef(
16170
16167
  }
16171
16168
  );
16172
16169
  yp.displayName = Zs;
16173
- var wp = "SwitchThumb", bp = g.forwardRef(
16170
+ var wp = "SwitchThumb", bp = m.forwardRef(
16174
16171
  (e, t) => {
16175
16172
  const { __scopeSwitch: n, ...r } = e, o = dk(wp, n);
16176
16173
  return /* @__PURE__ */ c.jsx(
@@ -16185,7 +16182,7 @@ var wp = "SwitchThumb", bp = g.forwardRef(
16185
16182
  }
16186
16183
  );
16187
16184
  bp.displayName = wp;
16188
- var fk = "SwitchBubbleInput", Sp = g.forwardRef(
16185
+ var fk = "SwitchBubbleInput", Sp = m.forwardRef(
16189
16186
  ({
16190
16187
  __scopeSwitch: e,
16191
16188
  control: t,
@@ -16193,8 +16190,8 @@ var fk = "SwitchBubbleInput", Sp = g.forwardRef(
16193
16190
  bubbles: r = !0,
16194
16191
  ...o
16195
16192
  }, s) => {
16196
- const i = g.useRef(null), a = Be(i, s), l = vp(n), u = Lf(t);
16197
- return g.useEffect(() => {
16193
+ const i = m.useRef(null), a = Be(i, s), l = vp(n), u = Lf(t);
16194
+ return m.useEffect(() => {
16198
16195
  const d = i.current;
16199
16196
  if (!d) return;
16200
16197
  const f = window.HTMLInputElement.prototype, p = Object.getOwnPropertyDescriptor(
@@ -16231,7 +16228,7 @@ function Cp(e) {
16231
16228
  return e ? "checked" : "unchecked";
16232
16229
  }
16233
16230
  var kp = yp, hk = bp;
16234
- const _n = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
16231
+ const _n = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
16235
16232
  kp,
16236
16233
  {
16237
16234
  className: re(
@@ -16263,7 +16260,7 @@ var Tp = Object.freeze({
16263
16260
  clip: "rect(0, 0, 0, 0)",
16264
16261
  whiteSpace: "nowrap",
16265
16262
  wordWrap: "normal"
16266
- }), pk = "VisuallyHidden", mk = g.forwardRef(
16263
+ }), pk = "VisuallyHidden", mk = m.forwardRef(
16267
16264
  (e, t) => /* @__PURE__ */ c.jsx(
16268
16265
  je.span,
16269
16266
  {
@@ -16293,7 +16290,7 @@ var gk = [" ", "Enter", "ArrowUp", "ArrowDown"], xk = [" ", "Enter"], ir = "Sele
16293
16290
  disabled: h,
16294
16291
  required: p,
16295
16292
  form: w
16296
- } = e, y = ti(t), [x, v] = g.useState(null), [b, S] = g.useState(null), [T, C] = g.useState(!1), k = Bs(u), [R, E] = rr({
16293
+ } = e, y = ti(t), [x, v] = m.useState(null), [b, S] = m.useState(null), [I, C] = m.useState(!1), k = Bs(u), [R, E] = rr({
16297
16294
  prop: r,
16298
16295
  defaultProp: o ?? !1,
16299
16296
  onChange: s,
@@ -16303,7 +16300,7 @@ var gk = [" ", "Enter", "ArrowUp", "ArrowDown"], xk = [" ", "Enter"], ir = "Sele
16303
16300
  defaultProp: a,
16304
16301
  onChange: l,
16305
16302
  caller: ir
16306
- }), L = g.useRef(null), F = x ? w || !!x.closest("form") : !0, [V, N] = g.useState(/* @__PURE__ */ new Set()), B = Array.from(V).map((z) => z.props.value).join(";");
16303
+ }), L = m.useRef(null), F = x ? w || !!x.closest("form") : !0, [V, N] = m.useState(/* @__PURE__ */ new Set()), B = Array.from(V).map((z) => z.props.value).join(";");
16307
16304
  return /* @__PURE__ */ c.jsx(qf, { ...y, children: /* @__PURE__ */ c.jsxs(
16308
16305
  yk,
16309
16306
  {
@@ -16313,7 +16310,7 @@ var gk = [" ", "Enter", "ArrowUp", "ArrowDown"], xk = [" ", "Enter"], ir = "Sele
16313
16310
  onTriggerChange: v,
16314
16311
  valueNode: b,
16315
16312
  onValueNodeChange: S,
16316
- valueNodeHasChildren: T,
16313
+ valueNodeHasChildren: I,
16317
16314
  onValueNodeHasChildrenChange: C,
16318
16315
  contentId: hn(),
16319
16316
  value: A,
@@ -16328,10 +16325,10 @@ var gk = [" ", "Enter", "ArrowUp", "ArrowDown"], xk = [" ", "Enter"], ir = "Sele
16328
16325
  wk,
16329
16326
  {
16330
16327
  scope: e.__scopeSelect,
16331
- onNativeOptionAdd: g.useCallback((z) => {
16328
+ onNativeOptionAdd: m.useCallback((z) => {
16332
16329
  N((H) => new Set(H).add(z));
16333
16330
  }, []),
16334
- onNativeOptionRemove: g.useCallback((z) => {
16331
+ onNativeOptionRemove: m.useCallback((z) => {
16335
16332
  N((H) => {
16336
16333
  const M = new Set(H);
16337
16334
  return M.delete(z), M;
@@ -16364,9 +16361,9 @@ var gk = [" ", "Enter", "ArrowUp", "ArrowDown"], xk = [" ", "Enter"], ir = "Sele
16364
16361
  ) });
16365
16362
  };
16366
16363
  Ip.displayName = ir;
16367
- var Rp = "SelectTrigger", Ep = g.forwardRef(
16364
+ var Rp = "SelectTrigger", Ep = m.forwardRef(
16368
16365
  (e, t) => {
16369
- const { __scopeSelect: n, disabled: r = !1, ...o } = e, s = ti(n), i = zn(Rp, n), a = i.disabled || r, l = Be(t, i.onTriggerChange), u = ei(n), d = g.useRef("touch"), [f, h, p] = Zp((y) => {
16366
+ const { __scopeSelect: n, disabled: r = !1, ...o } = e, s = ti(n), i = zn(Rp, n), a = i.disabled || r, l = Be(t, i.onTriggerChange), u = ei(n), d = m.useRef("touch"), [f, h, p] = Zp((y) => {
16370
16367
  const x = u().filter((S) => !S.disabled), v = x.find((S) => S.value === i.value), b = Qp(x, y, v);
16371
16368
  b !== void 0 && i.onValueChange(b.value);
16372
16369
  }), w = (y) => {
@@ -16408,7 +16405,7 @@ var Rp = "SelectTrigger", Ep = g.forwardRef(
16408
16405
  }
16409
16406
  );
16410
16407
  Ep.displayName = Rp;
16411
- var Np = "SelectValue", Ap = g.forwardRef(
16408
+ var Np = "SelectValue", Ap = m.forwardRef(
16412
16409
  (e, t) => {
16413
16410
  const { __scopeSelect: n, className: r, style: o, children: s, placeholder: i = "", ...a } = e, l = zn(Np, n), { onValueNodeHasChildrenChange: u } = l, d = s !== void 0, f = Be(t, l.onValueNodeChange);
16414
16411
  return wt(() => {
@@ -16425,7 +16422,7 @@ var Np = "SelectValue", Ap = g.forwardRef(
16425
16422
  }
16426
16423
  );
16427
16424
  Ap.displayName = Np;
16428
- var Sk = "SelectIcon", _p = g.forwardRef(
16425
+ var Sk = "SelectIcon", _p = m.forwardRef(
16429
16426
  (e, t) => {
16430
16427
  const { __scopeSelect: n, children: r, ...o } = e;
16431
16428
  return /* @__PURE__ */ c.jsx(je.span, { "aria-hidden": !0, ...o, ref: t, children: r || "▼" });
@@ -16434,9 +16431,9 @@ var Sk = "SelectIcon", _p = g.forwardRef(
16434
16431
  _p.displayName = Sk;
16435
16432
  var Ck = "SelectPortal", jp = (e) => /* @__PURE__ */ c.jsx(Os, { asChild: !0, ...e });
16436
16433
  jp.displayName = Ck;
16437
- var ar = "SelectContent", Pp = g.forwardRef(
16434
+ var ar = "SelectContent", Pp = m.forwardRef(
16438
16435
  (e, t) => {
16439
- const n = zn(ar, e.__scopeSelect), [r, o] = g.useState();
16436
+ const n = zn(ar, e.__scopeSelect), [r, o] = m.useState();
16440
16437
  if (wt(() => {
16441
16438
  o(new DocumentFragment());
16442
16439
  }, []), !n.open) {
@@ -16450,7 +16447,7 @@ var ar = "SelectContent", Pp = g.forwardRef(
16450
16447
  }
16451
16448
  );
16452
16449
  Pp.displayName = ar;
16453
- var Xt = 10, [Op, Bn] = $r(ar), kk = "SelectContentImpl", Tk = Er("SelectContent.RemoveScroll"), Mp = g.forwardRef(
16450
+ var Xt = 10, [Op, Bn] = $r(ar), kk = "SelectContentImpl", Tk = Er("SelectContent.RemoveScroll"), Mp = m.forwardRef(
16454
16451
  (e, t) => {
16455
16452
  const {
16456
16453
  __scopeSelect: n,
@@ -16472,28 +16469,28 @@ var Xt = 10, [Op, Bn] = $r(ar), kk = "SelectContentImpl", Tk = Er("SelectContent
16472
16469
  avoidCollisions: x,
16473
16470
  //
16474
16471
  ...v
16475
- } = e, b = zn(ar, n), [S, T] = g.useState(null), [C, k] = g.useState(null), R = Be(t, (K) => T(K)), [E, A] = g.useState(null), [O, L] = g.useState(
16472
+ } = e, b = zn(ar, n), [S, I] = m.useState(null), [C, k] = m.useState(null), R = Be(t, (K) => I(K)), [E, A] = m.useState(null), [O, L] = m.useState(
16476
16473
  null
16477
- ), F = ei(n), [V, N] = g.useState(!1), B = g.useRef(!1);
16478
- g.useEffect(() => {
16474
+ ), F = ei(n), [V, N] = m.useState(!1), B = m.useRef(!1);
16475
+ m.useEffect(() => {
16479
16476
  if (S) return Ua(S);
16480
16477
  }, [S]), Ha();
16481
- const z = g.useCallback(
16478
+ const z = m.useCallback(
16482
16479
  (K) => {
16483
16480
  const [$, ...Y] = F().map((oe) => oe.ref.current), [J] = Y.slice(-1), me = document.activeElement;
16484
16481
  for (const oe of K)
16485
16482
  if (oe === me || (oe == null || oe.scrollIntoView({ block: "nearest" }), oe === $ && C && (C.scrollTop = 0), oe === J && C && (C.scrollTop = C.scrollHeight), oe == null || oe.focus(), document.activeElement !== me)) return;
16486
16483
  },
16487
16484
  [F, C]
16488
- ), H = g.useCallback(
16485
+ ), H = m.useCallback(
16489
16486
  () => z([E, S]),
16490
16487
  [z, E, S]
16491
16488
  );
16492
- g.useEffect(() => {
16489
+ m.useEffect(() => {
16493
16490
  V && H();
16494
16491
  }, [V, H]);
16495
16492
  const { onOpenChange: M, triggerPointerDownPosRef: D } = b;
16496
- g.useEffect(() => {
16493
+ m.useEffect(() => {
16497
16494
  if (S) {
16498
16495
  let K = { x: 0, y: 0 };
16499
16496
  const $ = (J) => {
@@ -16509,7 +16506,7 @@ var Xt = 10, [Op, Bn] = $r(ar), kk = "SelectContentImpl", Tk = Er("SelectContent
16509
16506
  document.removeEventListener("pointermove", $), document.removeEventListener("pointerup", Y, { capture: !0 });
16510
16507
  };
16511
16508
  }
16512
- }, [S, M, D]), g.useEffect(() => {
16509
+ }, [S, M, D]), m.useEffect(() => {
16513
16510
  const K = () => M(!1);
16514
16511
  return window.addEventListener("blur", K), window.addEventListener("resize", K), () => {
16515
16512
  window.removeEventListener("blur", K), window.removeEventListener("resize", K);
@@ -16518,13 +16515,13 @@ var Xt = 10, [Op, Bn] = $r(ar), kk = "SelectContentImpl", Tk = Er("SelectContent
16518
16515
  const [X, _] = Zp((K) => {
16519
16516
  const $ = F().filter((me) => !me.disabled), Y = $.find((me) => me.ref.current === document.activeElement), J = Qp($, K, Y);
16520
16517
  J && setTimeout(() => J.ref.current.focus());
16521
- }), G = g.useCallback(
16518
+ }), G = m.useCallback(
16522
16519
  (K, $, Y) => {
16523
16520
  const J = !B.current && !Y;
16524
16521
  (b.value !== void 0 && b.value === $ || J) && (A(K), J && (B.current = !0));
16525
16522
  },
16526
16523
  [b.value]
16527
- ), ce = g.useCallback(() => S == null ? void 0 : S.focus(), [S]), ye = g.useCallback(
16524
+ ), ce = m.useCallback(() => S == null ? void 0 : S.focus(), [S]), ye = m.useCallback(
16528
16525
  (K, $, Y) => {
16529
16526
  const J = !B.current && !Y;
16530
16527
  (b.value !== void 0 && b.value === $ || J) && L(K);
@@ -16621,8 +16618,8 @@ var Xt = 10, [Op, Bn] = $r(ar), kk = "SelectContentImpl", Tk = Er("SelectContent
16621
16618
  }
16622
16619
  );
16623
16620
  Mp.displayName = kk;
16624
- var Ik = "SelectItemAlignedPosition", Dp = g.forwardRef((e, t) => {
16625
- const { __scopeSelect: n, onPlaced: r, ...o } = e, s = zn(ar, n), i = Bn(ar, n), [a, l] = g.useState(null), [u, d] = g.useState(null), f = Be(t, (R) => d(R)), h = ei(n), p = g.useRef(!1), w = g.useRef(!0), { viewport: y, selectedItem: x, selectedItemText: v, focusSelectedItem: b } = i, S = g.useCallback(() => {
16621
+ var Ik = "SelectItemAlignedPosition", Dp = m.forwardRef((e, t) => {
16622
+ const { __scopeSelect: n, onPlaced: r, ...o } = e, s = zn(ar, n), i = Bn(ar, n), [a, l] = m.useState(null), [u, d] = m.useState(null), f = Be(t, (R) => d(R)), h = ei(n), p = m.useRef(!1), w = m.useRef(!0), { viewport: y, selectedItem: x, selectedItemText: v, focusSelectedItem: b } = i, S = m.useCallback(() => {
16626
16623
  if (s.trigger && s.valueNode && a && u && y && x && v) {
16627
16624
  const R = s.trigger.getBoundingClientRect(), E = u.getBoundingClientRect(), A = s.valueNode.getBoundingClientRect(), O = v.getBoundingClientRect();
16628
16625
  if (s.dir !== "rtl") {
@@ -16678,11 +16675,11 @@ var Ik = "SelectItemAlignedPosition", Dp = g.forwardRef((e, t) => {
16678
16675
  r
16679
16676
  ]);
16680
16677
  wt(() => S(), [S]);
16681
- const [T, C] = g.useState();
16678
+ const [I, C] = m.useState();
16682
16679
  wt(() => {
16683
16680
  u && C(window.getComputedStyle(u).zIndex);
16684
16681
  }, [u]);
16685
- const k = g.useCallback(
16682
+ const k = m.useCallback(
16686
16683
  (R) => {
16687
16684
  R && w.current === !0 && (S(), b == null || b(), w.current = !1);
16688
16685
  },
@@ -16703,7 +16700,7 @@ var Ik = "SelectItemAlignedPosition", Dp = g.forwardRef((e, t) => {
16703
16700
  display: "flex",
16704
16701
  flexDirection: "column",
16705
16702
  position: "fixed",
16706
- zIndex: T
16703
+ zIndex: I
16707
16704
  },
16708
16705
  children: /* @__PURE__ */ c.jsx(
16709
16706
  je.div,
@@ -16726,7 +16723,7 @@ var Ik = "SelectItemAlignedPosition", Dp = g.forwardRef((e, t) => {
16726
16723
  );
16727
16724
  });
16728
16725
  Dp.displayName = Ik;
16729
- var Rk = "SelectPopperPosition", ia = g.forwardRef((e, t) => {
16726
+ var Rk = "SelectPopperPosition", ia = m.forwardRef((e, t) => {
16730
16727
  const {
16731
16728
  __scopeSelect: n,
16732
16729
  align: r = "start",
@@ -16755,9 +16752,9 @@ var Rk = "SelectPopperPosition", ia = g.forwardRef((e, t) => {
16755
16752
  );
16756
16753
  });
16757
16754
  ia.displayName = Rk;
16758
- var [Ek, hl] = $r(ar, {}), aa = "SelectViewport", Lp = g.forwardRef(
16755
+ var [Ek, hl] = $r(ar, {}), aa = "SelectViewport", Lp = m.forwardRef(
16759
16756
  (e, t) => {
16760
- const { __scopeSelect: n, nonce: r, ...o } = e, s = Bn(aa, n), i = hl(aa, n), a = Be(t, s.onViewportChange), l = g.useRef(0);
16757
+ const { __scopeSelect: n, nonce: r, ...o } = e, s = Bn(aa, n), i = hl(aa, n), a = Be(t, s.onViewportChange), l = m.useRef(0);
16761
16758
  return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
16762
16759
  /* @__PURE__ */ c.jsx(
16763
16760
  "style",
@@ -16795,8 +16792,8 @@ var [Ek, hl] = $r(ar, {}), aa = "SelectViewport", Lp = g.forwardRef(
16795
16792
  if (p > 0) {
16796
16793
  const w = window.innerHeight - Xt * 2, y = parseFloat(f.style.minHeight), x = parseFloat(f.style.height), v = Math.max(y, x);
16797
16794
  if (v < w) {
16798
- const b = v + p, S = Math.min(w, b), T = b - S;
16799
- f.style.height = S + "px", f.style.bottom === "0px" && (d.scrollTop = T > 0 ? T : 0, f.style.justifyContent = "flex-end");
16795
+ const b = v + p, S = Math.min(w, b), I = b - S;
16796
+ f.style.height = S + "px", f.style.bottom === "0px" && (d.scrollTop = I > 0 ? I : 0, f.style.justifyContent = "flex-end");
16800
16797
  }
16801
16798
  }
16802
16799
  }
@@ -16808,21 +16805,21 @@ var [Ek, hl] = $r(ar, {}), aa = "SelectViewport", Lp = g.forwardRef(
16808
16805
  }
16809
16806
  );
16810
16807
  Lp.displayName = aa;
16811
- var Fp = "SelectGroup", [Nk, Ak] = $r(Fp), _k = g.forwardRef(
16808
+ var Fp = "SelectGroup", [Nk, Ak] = $r(Fp), _k = m.forwardRef(
16812
16809
  (e, t) => {
16813
16810
  const { __scopeSelect: n, ...r } = e, o = hn();
16814
16811
  return /* @__PURE__ */ c.jsx(Nk, { scope: n, id: o, children: /* @__PURE__ */ c.jsx(je.div, { role: "group", "aria-labelledby": o, ...r, ref: t }) });
16815
16812
  }
16816
16813
  );
16817
16814
  _k.displayName = Fp;
16818
- var $p = "SelectLabel", zp = g.forwardRef(
16815
+ var $p = "SelectLabel", zp = m.forwardRef(
16819
16816
  (e, t) => {
16820
16817
  const { __scopeSelect: n, ...r } = e, o = Ak($p, n);
16821
16818
  return /* @__PURE__ */ c.jsx(je.div, { id: o.id, ...r, ref: t });
16822
16819
  }
16823
16820
  );
16824
16821
  zp.displayName = $p;
16825
- var xs = "SelectItem", [jk, Bp] = $r(xs), Hp = g.forwardRef(
16822
+ var xs = "SelectItem", [jk, Bp] = $r(xs), Hp = m.forwardRef(
16826
16823
  (e, t) => {
16827
16824
  const {
16828
16825
  __scopeSelect: n,
@@ -16830,13 +16827,13 @@ var xs = "SelectItem", [jk, Bp] = $r(xs), Hp = g.forwardRef(
16830
16827
  disabled: o = !1,
16831
16828
  textValue: s,
16832
16829
  ...i
16833
- } = e, a = zn(xs, n), l = Bn(xs, n), u = a.value === r, [d, f] = g.useState(s ?? ""), [h, p] = g.useState(!1), w = Be(
16830
+ } = e, a = zn(xs, n), l = Bn(xs, n), u = a.value === r, [d, f] = m.useState(s ?? ""), [h, p] = m.useState(!1), w = Be(
16834
16831
  t,
16835
16832
  (b) => {
16836
16833
  var S;
16837
16834
  return (S = l.itemRefCallback) == null ? void 0 : S.call(l, b, r, o);
16838
16835
  }
16839
- ), y = hn(), x = g.useRef("touch"), v = () => {
16836
+ ), y = hn(), x = m.useRef("touch"), v = () => {
16840
16837
  o || (a.onValueChange(r), a.onOpenChange(!1));
16841
16838
  };
16842
16839
  if (r === "")
@@ -16851,7 +16848,7 @@ var xs = "SelectItem", [jk, Bp] = $r(xs), Hp = g.forwardRef(
16851
16848
  disabled: o,
16852
16849
  textId: y,
16853
16850
  isSelected: u,
16854
- onItemTextChange: g.useCallback((b) => {
16851
+ onItemTextChange: m.useCallback((b) => {
16855
16852
  f((S) => S || ((b == null ? void 0 : b.textContent) ?? "").trim());
16856
16853
  }, []),
16857
16854
  children: /* @__PURE__ */ c.jsx(
@@ -16894,8 +16891,8 @@ var xs = "SelectItem", [jk, Bp] = $r(xs), Hp = g.forwardRef(
16894
16891
  b.currentTarget === document.activeElement && ((S = l.onItemLeave) == null || S.call(l));
16895
16892
  }),
16896
16893
  onKeyDown: fe(i.onKeyDown, (b) => {
16897
- var T;
16898
- ((T = l.searchRef) == null ? void 0 : T.current) !== "" && b.key === " " || (xk.includes(b.key) && v(), b.key === " " && b.preventDefault());
16894
+ var I;
16895
+ ((I = l.searchRef) == null ? void 0 : I.current) !== "" && b.key === " " || (xk.includes(b.key) && v(), b.key === " " && b.preventDefault());
16899
16896
  })
16900
16897
  }
16901
16898
  )
@@ -16906,9 +16903,9 @@ var xs = "SelectItem", [jk, Bp] = $r(xs), Hp = g.forwardRef(
16906
16903
  }
16907
16904
  );
16908
16905
  Hp.displayName = xs;
16909
- var Kr = "SelectItemText", Up = g.forwardRef(
16906
+ var Kr = "SelectItemText", Up = m.forwardRef(
16910
16907
  (e, t) => {
16911
- const { __scopeSelect: n, className: r, style: o, ...s } = e, i = zn(Kr, n), a = Bn(Kr, n), l = Bp(Kr, n), u = bk(Kr, n), [d, f] = g.useState(null), h = Be(
16908
+ const { __scopeSelect: n, className: r, style: o, ...s } = e, i = zn(Kr, n), a = Bn(Kr, n), l = Bp(Kr, n), u = bk(Kr, n), [d, f] = m.useState(null), h = Be(
16912
16909
  t,
16913
16910
  (v) => f(v),
16914
16911
  l.onItemTextChange,
@@ -16916,7 +16913,7 @@ var Kr = "SelectItemText", Up = g.forwardRef(
16916
16913
  var b;
16917
16914
  return (b = a.itemTextRefCallback) == null ? void 0 : b.call(a, v, l.value, l.disabled);
16918
16915
  }
16919
- ), p = d == null ? void 0 : d.textContent, w = g.useMemo(
16916
+ ), p = d == null ? void 0 : d.textContent, w = m.useMemo(
16920
16917
  () => /* @__PURE__ */ c.jsx("option", { value: l.value, disabled: l.disabled, children: p }, l.value),
16921
16918
  [l.disabled, l.value, p]
16922
16919
  ), { onNativeOptionAdd: y, onNativeOptionRemove: x } = u;
@@ -16927,15 +16924,15 @@ var Kr = "SelectItemText", Up = g.forwardRef(
16927
16924
  }
16928
16925
  );
16929
16926
  Up.displayName = Kr;
16930
- var Wp = "SelectItemIndicator", Vp = g.forwardRef(
16927
+ var Wp = "SelectItemIndicator", Vp = m.forwardRef(
16931
16928
  (e, t) => {
16932
16929
  const { __scopeSelect: n, ...r } = e;
16933
16930
  return Bp(Wp, n).isSelected ? /* @__PURE__ */ c.jsx(je.span, { "aria-hidden": !0, ...r, ref: t }) : null;
16934
16931
  }
16935
16932
  );
16936
16933
  Vp.displayName = Wp;
16937
- var la = "SelectScrollUpButton", Kp = g.forwardRef((e, t) => {
16938
- const n = Bn(la, e.__scopeSelect), r = hl(la, e.__scopeSelect), [o, s] = g.useState(!1), i = Be(t, r.onScrollButtonChange);
16934
+ var la = "SelectScrollUpButton", Kp = m.forwardRef((e, t) => {
16935
+ const n = Bn(la, e.__scopeSelect), r = hl(la, e.__scopeSelect), [o, s] = m.useState(!1), i = Be(t, r.onScrollButtonChange);
16939
16936
  return wt(() => {
16940
16937
  if (n.viewport && n.isPositioned) {
16941
16938
  let a = function() {
@@ -16958,8 +16955,8 @@ var la = "SelectScrollUpButton", Kp = g.forwardRef((e, t) => {
16958
16955
  ) : null;
16959
16956
  });
16960
16957
  Kp.displayName = la;
16961
- var ca = "SelectScrollDownButton", qp = g.forwardRef((e, t) => {
16962
- const n = Bn(ca, e.__scopeSelect), r = hl(ca, e.__scopeSelect), [o, s] = g.useState(!1), i = Be(t, r.onScrollButtonChange);
16958
+ var ca = "SelectScrollDownButton", qp = m.forwardRef((e, t) => {
16959
+ const n = Bn(ca, e.__scopeSelect), r = hl(ca, e.__scopeSelect), [o, s] = m.useState(!1), i = Be(t, r.onScrollButtonChange);
16963
16960
  return wt(() => {
16964
16961
  if (n.viewport && n.isPositioned) {
16965
16962
  let a = function() {
@@ -16982,11 +16979,11 @@ var ca = "SelectScrollDownButton", qp = g.forwardRef((e, t) => {
16982
16979
  ) : null;
16983
16980
  });
16984
16981
  qp.displayName = ca;
16985
- var Gp = g.forwardRef((e, t) => {
16986
- const { __scopeSelect: n, onAutoScroll: r, ...o } = e, s = Bn("SelectScrollButton", n), i = g.useRef(null), a = ei(n), l = g.useCallback(() => {
16982
+ var Gp = m.forwardRef((e, t) => {
16983
+ const { __scopeSelect: n, onAutoScroll: r, ...o } = e, s = Bn("SelectScrollButton", n), i = m.useRef(null), a = ei(n), l = m.useCallback(() => {
16987
16984
  i.current !== null && (window.clearInterval(i.current), i.current = null);
16988
16985
  }, []);
16989
- return g.useEffect(() => () => l(), [l]), wt(() => {
16986
+ return m.useEffect(() => () => l(), [l]), wt(() => {
16990
16987
  var d;
16991
16988
  const u = a().find((f) => f.ref.current === document.activeElement);
16992
16989
  (d = u == null ? void 0 : u.ref.current) == null || d.scrollIntoView({ block: "nearest" });
@@ -17009,24 +17006,24 @@ var Gp = g.forwardRef((e, t) => {
17009
17006
  })
17010
17007
  }
17011
17008
  );
17012
- }), Pk = "SelectSeparator", Yp = g.forwardRef(
17009
+ }), Pk = "SelectSeparator", Yp = m.forwardRef(
17013
17010
  (e, t) => {
17014
17011
  const { __scopeSelect: n, ...r } = e;
17015
17012
  return /* @__PURE__ */ c.jsx(je.div, { "aria-hidden": !0, ...r, ref: t });
17016
17013
  }
17017
17014
  );
17018
17015
  Yp.displayName = Pk;
17019
- var ua = "SelectArrow", Ok = g.forwardRef(
17016
+ var ua = "SelectArrow", Ok = m.forwardRef(
17020
17017
  (e, t) => {
17021
17018
  const { __scopeSelect: n, ...r } = e, o = ti(n), s = zn(ua, n), i = Bn(ua, n);
17022
17019
  return s.open && i.position === "popper" ? /* @__PURE__ */ c.jsx(Xf, { ...o, ...r, ref: t }) : null;
17023
17020
  }
17024
17021
  );
17025
17022
  Ok.displayName = ua;
17026
- var Mk = "SelectBubbleInput", Xp = g.forwardRef(
17023
+ var Mk = "SelectBubbleInput", Xp = m.forwardRef(
17027
17024
  ({ __scopeSelect: e, value: t, ...n }, r) => {
17028
- const o = g.useRef(null), s = Be(r, o), i = vp(t);
17029
- return g.useEffect(() => {
17025
+ const o = m.useRef(null), s = Be(r, o), i = vp(t);
17026
+ return m.useEffect(() => {
17030
17027
  const a = o.current;
17031
17028
  if (!a) return;
17032
17029
  const l = window.HTMLSelectElement.prototype, d = Object.getOwnPropertyDescriptor(
@@ -17053,7 +17050,7 @@ function Jp(e) {
17053
17050
  return e === "" || e === void 0;
17054
17051
  }
17055
17052
  function Zp(e) {
17056
- const t = bt(e), n = g.useRef(""), r = g.useRef(0), o = g.useCallback(
17053
+ const t = bt(e), n = m.useRef(""), r = m.useRef(0), o = m.useCallback(
17057
17054
  (i) => {
17058
17055
  const a = n.current + i;
17059
17056
  t(a), function l(u) {
@@ -17061,10 +17058,10 @@ function Zp(e) {
17061
17058
  }(a);
17062
17059
  },
17063
17060
  [t]
17064
- ), s = g.useCallback(() => {
17061
+ ), s = m.useCallback(() => {
17065
17062
  n.current = "", window.clearTimeout(r.current);
17066
17063
  }, []);
17067
- return g.useEffect(() => () => window.clearTimeout(r.current), []), [n, o, s];
17064
+ return m.useEffect(() => () => window.clearTimeout(r.current), []), [n, o, s];
17068
17065
  }
17069
17066
  function Qp(e, t, n) {
17070
17067
  const o = t.length > 1 && Array.from(t).every((u) => u === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
@@ -17079,7 +17076,7 @@ function Dk(e, t) {
17079
17076
  return e.map((n, r) => e[(t + r) % e.length]);
17080
17077
  }
17081
17078
  var Lk = Ip, em = Ep, Fk = Ap, $k = _p, zk = jp, tm = Pp, Bk = Lp, nm = zp, rm = Hp, Hk = Up, Uk = Vp, om = Kp, sm = qp, im = Yp;
17082
- const eu = Lk, tu = Fk, da = g.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ c.jsxs(
17079
+ const eu = Lk, tu = Fk, da = m.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ c.jsxs(
17083
17080
  em,
17084
17081
  {
17085
17082
  ref: r,
@@ -17095,7 +17092,7 @@ const eu = Lk, tu = Fk, da = g.forwardRef(({ className: e, children: t, ...n },
17095
17092
  }
17096
17093
  ));
17097
17094
  da.displayName = em.displayName;
17098
- const am = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
17095
+ const am = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
17099
17096
  om,
17100
17097
  {
17101
17098
  ref: n,
@@ -17108,7 +17105,7 @@ const am = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
17108
17105
  }
17109
17106
  ));
17110
17107
  am.displayName = om.displayName;
17111
- const lm = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
17108
+ const lm = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
17112
17109
  sm,
17113
17110
  {
17114
17111
  ref: n,
@@ -17121,7 +17118,7 @@ const lm = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
17121
17118
  }
17122
17119
  ));
17123
17120
  lm.displayName = sm.displayName;
17124
- const fa = g.forwardRef(({ className: e, children: t, position: n = "popper", ...r }, o) => /* @__PURE__ */ c.jsx(zk, { children: /* @__PURE__ */ c.jsxs(
17121
+ const fa = m.forwardRef(({ className: e, children: t, position: n = "popper", ...r }, o) => /* @__PURE__ */ c.jsx(zk, { children: /* @__PURE__ */ c.jsxs(
17125
17122
  tm,
17126
17123
  {
17127
17124
  ref: o,
@@ -17149,7 +17146,7 @@ const fa = g.forwardRef(({ className: e, children: t, position: n = "popper", ..
17149
17146
  }
17150
17147
  ) }));
17151
17148
  fa.displayName = tm.displayName;
17152
- const Wk = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
17149
+ const Wk = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
17153
17150
  nm,
17154
17151
  {
17155
17152
  ref: n,
@@ -17158,7 +17155,7 @@ const Wk = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
17158
17155
  }
17159
17156
  ));
17160
17157
  Wk.displayName = nm.displayName;
17161
- const Gn = g.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ c.jsxs(
17158
+ const Gn = m.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ c.jsxs(
17162
17159
  rm,
17163
17160
  {
17164
17161
  ref: r,
@@ -17174,7 +17171,7 @@ const Gn = g.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
17174
17171
  }
17175
17172
  ));
17176
17173
  Gn.displayName = rm.displayName;
17177
- const Vk = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
17174
+ const Vk = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
17178
17175
  im,
17179
17176
  {
17180
17177
  ref: n,
@@ -17183,7 +17180,7 @@ const Vk = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
17183
17180
  }
17184
17181
  ));
17185
17182
  Vk.displayName = im.displayName;
17186
- var Kk = "Separator", nu = "horizontal", qk = ["horizontal", "vertical"], cm = g.forwardRef((e, t) => {
17183
+ var Kk = "Separator", nu = "horizontal", qk = ["horizontal", "vertical"], cm = m.forwardRef((e, t) => {
17187
17184
  const { decorative: n, orientation: r = nu, ...o } = e, s = Gk(r) ? r : nu, a = n ? { role: "none" } : { "aria-orientation": s === "vertical" ? s : void 0, role: "separator" };
17188
17185
  return /* @__PURE__ */ c.jsx(
17189
17186
  je.div,
@@ -17200,7 +17197,7 @@ function Gk(e) {
17200
17197
  return qk.includes(e);
17201
17198
  }
17202
17199
  var um = cm;
17203
- const dm = g.forwardRef(
17200
+ const dm = m.forwardRef(
17204
17201
  ({ className: e, orientation: t = "horizontal", decorative: n = !0, ...r }, o) => /* @__PURE__ */ c.jsx(
17205
17202
  um,
17206
17203
  {
@@ -17217,7 +17214,7 @@ const dm = g.forwardRef(
17217
17214
  )
17218
17215
  );
17219
17216
  dm.displayName = um.displayName;
17220
- const Yk = mf, Xk = Eb, Jk = gf, fm = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
17217
+ const Yk = mf, Xk = Eb, Jk = gf, fm = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
17221
17218
  Fs,
17222
17219
  {
17223
17220
  className: re(
@@ -17244,7 +17241,7 @@ const Zk = ys(
17244
17241
  side: "right"
17245
17242
  }
17246
17243
  }
17247
- ), hm = g.forwardRef(({ side: e = "right", className: t, children: n, ...r }, o) => /* @__PURE__ */ c.jsxs(Jk, { children: [
17244
+ ), hm = m.forwardRef(({ side: e = "right", className: t, children: n, ...r }, o) => /* @__PURE__ */ c.jsxs(Jk, { children: [
17248
17245
  /* @__PURE__ */ c.jsx(fm, {}),
17249
17246
  /* @__PURE__ */ c.jsxs(
17250
17247
  $s,
@@ -17277,7 +17274,7 @@ const pm = ({
17277
17274
  }
17278
17275
  );
17279
17276
  pm.displayName = "SheetHeader";
17280
- const mm = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
17277
+ const mm = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
17281
17278
  Qn,
17282
17279
  {
17283
17280
  ref: n,
@@ -17286,7 +17283,7 @@ const mm = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
17286
17283
  }
17287
17284
  ));
17288
17285
  mm.displayName = Qn.displayName;
17289
- const gm = g.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
17286
+ const gm = m.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
17290
17287
  zs,
17291
17288
  {
17292
17289
  ref: n,