teodor-new-chat-ui 4.1.73 → 4.1.75

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