@versini/sassysaint 5.3.8 → 5.3.10

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.
@@ -1,11 +1,11 @@
1
- import { jsx as r, jsxs as v, Fragment as R } from "react/jsx-runtime";
2
- import { g as O, E as P, CARDS as w, renderDataAsList as le, pluralize as fe, AppContext as me, ABOUT_TITLE as Ot, DEFAULT_AI_ENGINE as ie, numberFormatter as Bt, durationFormatter as Qe, NA as Pt, ROLE_ASSISTANT as zt, extractAverage as Vt, GPT4_MAX_TOKENS as $t, rn as te, STATS as et, b as Me, j as ee, R as Q, HistoryContext as tt, LOCAL_STORAGE_PREFIX as D, LOCAL_STORAGE_SORT as Dt, O as Y, ACTION_RESET as ot, ACTION_RESTORE as Ht, truncate as Ft, ACTION_SORT as Ce, LOCAL_STORAGE_SEARCH as Gt, me as Ut, ACTION_SEARCH as jt, HISTORY_TITLE as Kt, LOCAL_STORAGE_ENGINE_TOGGLE as rt, ENGINE_OPENAI as Te, ENGINE_ANTHROPIC as pe, ACTION_ENGINE as at, getCurrentGeoLocation as Wt, LOCAL_STORAGE_TAG_SUMMARIZE as $e, LOCAL_STORAGE_TAG_PROOFREAD as De, LOCAL_STORAGE_TAG_REPHRASE as He, TAG_CONTENT as we, TAGS as Ne, LOCAL_STORAGE_CHAT_DETAILS as Yt, G as Zt, v as Fe, PROFILE_TITLE as qt, LOG_OUT as Ge } from "./index.BsmLg4en.js";
3
- import { serviceCall as H, SERVICE_TYPES as F, E as G, f as V, ge as Xt, he as Jt, ue as Ee, de as B, pe as Qt, me as eo, be as to, we as Ue } from "./index.C8-dCwmB.js";
1
+ import { jsx as r, jsxs as v, Fragment as A } from "react/jsx-runtime";
2
+ import { g as O, E as P, CARDS as N, renderDataAsList as se, pluralize as be, AppContext as ue, ABOUT_TITLE as Rt, DEFAULT_AI_ENGINE as ae, numberFormatter as At, durationFormatter as qe, NA as Mt, ROLE_ASSISTANT as Lt, extractAverage as $t, GPT4_MAX_TOKENS as Bt, rn as X, STATS as Xe, b as ie, j as B, R as G, HistoryContext as Ze, LOCAL_STORAGE_PREFIX as me, LOCAL_STORAGE_SORT as Pt, O as Y, ACTION_RESET as Je, ACTION_RESTORE as zt, truncate as Ot, ACTION_SORT as we, LOCAL_STORAGE_SEARCH as Vt, me as xe, ACTION_SEARCH as Dt, HISTORY_TITLE as Ft, LOCAL_STORAGE_ENGINE_TOGGLE as Qe, ENGINE_OPENAI as Te, ENGINE_ANTHROPIC as fe, ACTION_ENGINE as et, getCurrentGeoLocation as Ht, TagsContext as Gt, TAGS_DESCRIPTION as Ut, ACTION_SET_TAGS as jt, LOCAL_STORAGE_CHAT_DETAILS as Kt, G as Wt, v as Oe, PROFILE_TITLE as Yt, LOG_OUT as Ve } from "./index.BduqxN2L.js";
3
+ import { serviceCall as F, SERVICE_TYPES as H, E as he, f as D, ge as qt, he as Xt, ue as Ne, de as $, pe as Zt, me as Jt, be as Qt, we as De, n as Fe } from "./index.B5_RXEo-.js";
4
4
  import * as f from "react";
5
- import x, { useId as oo, forwardRef as nt, useState as S, useRef as ce, useContext as $, useEffect as U, Suspense as ro, lazy as ao, useMemo as no } from "react";
6
- import C from "clsx";
7
- import { useFloatingTree as st, useFloatingNodeId as so, useListItem as it, useFloating as io, offset as lo, flip as co, shift as uo, autoUpdate as mo, useClick as ho, useRole as go, useDismiss as po, useListNavigation as fo, useTypeahead as bo, useInteractions as vo, useMergeRefs as lt, FloatingNode as yo, FloatingList as ko, FloatingPortal as Co, FloatingFocusManager as To, FloatingTree as wo } from "@floating-ui/react";
8
- const ct = ({
5
+ import x, { useId as eo, forwardRef as tt, useState as S, useRef as le, useContext as z, useEffect as U, Suspense as to, lazy as oo, useMemo as ro } from "react";
6
+ import w from "clsx";
7
+ import { useFloatingTree as ot, useFloatingNodeId as ao, useListItem as rt, useFloating as no, offset as so, flip as io, shift as lo, autoUpdate as co, useClick as uo, useRole as mo, useDismiss as ho, useListNavigation as go, useTypeahead as po, useInteractions as fo, useMergeRefs as at, FloatingNode as bo, FloatingList as vo, FloatingPortal as yo, FloatingFocusManager as ko, FloatingTree as Co } from "@floating-ui/react";
8
+ const nt = ({
9
9
  className: e,
10
10
  viewBox: t,
11
11
  spacing: o,
@@ -24,7 +24,7 @@ const ct = ({
24
24
  ...s,
25
25
  children: /* @__PURE__ */ r("path", { d: "m147.487 0l70.081 175.78H256L185.919 0zM66.183 106.221l23.98-61.774l23.98 61.774zM70.07 0L0 175.78h39.18l14.33-36.914h73.308l14.328 36.914h39.179L110.255 0z" })
26
26
  }
27
- ), No = ({
27
+ ), wo = ({
28
28
  className: e,
29
29
  viewBox: t,
30
30
  spacing: o,
@@ -52,7 +52,7 @@ const ct = ({
52
52
  /* @__PURE__ */ r("path", { d: "M32 0H192c17.7 0 32 14.3 32 32s-14.3 32-32 32H109.3L342.6 297.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L64 109.3V192c0 17.7-14.3 32-32 32s-32-14.3-32-32V32C0 14.3 14.3 0 32 0z" })
53
53
  ]
54
54
  }
55
- ), Eo = ({
55
+ ), To = ({
56
56
  className: e,
57
57
  viewBox: t,
58
58
  spacing: o,
@@ -80,7 +80,7 @@ const ct = ({
80
80
  /* @__PURE__ */ r("path", { d: "M368 96c-26.5 0-48 21.5-48 48V432c0 26.5 21.5 48 48 48h32c26.5 0 48-21.5 48-48V144c0-26.5-21.5-48-48-48H368zM48 224c-26.5 0-48 21.5-48 48V432c0 26.5 21.5 48 48 48H80c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48H48z" })
81
81
  ]
82
82
  }
83
- ), xo = ({
83
+ ), No = ({
84
84
  className: e,
85
85
  viewBox: t,
86
86
  spacing: o,
@@ -108,35 +108,7 @@ const ct = ({
108
108
  /* @__PURE__ */ r("path", { d: "M163.8 0c-12.1 0-23.2 6.8-28.6 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8z" })
109
109
  ]
110
110
  }
111
- ), je = ({
112
- className: e,
113
- viewBox: t,
114
- spacing: o,
115
- title: a,
116
- monotone: n,
117
- ...s
118
- }) => /* @__PURE__ */ v(
119
- O,
120
- {
121
- defaultViewBox: "0 0 512 512",
122
- defaultClassName: "size-5",
123
- viewBox: t,
124
- className: e,
125
- spacing: o,
126
- title: a || "Edit",
127
- ...s,
128
- children: [
129
- /* @__PURE__ */ r(
130
- "path",
131
- {
132
- opacity: n ? "1" : "0.4",
133
- d: "M0 160c0-53 43-96 96-96h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H96c-17.7 0-32 14.3-32 32V416c0 17.7 14.3 32 32 32H352c17.7 0 32-14.3 32-32V320c0-17.7 14.3-32 32-32s32 14.3 32 32v96c0 53-43 96-96 96H96c-53 0-96-43-96-96V160z"
134
- }
135
- ),
136
- /* @__PURE__ */ r("path", { d: "M392.4 21.7L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0zM339.7 74.3L172.4 241.7c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3z" })
137
- ]
138
- }
139
- ), Io = ({
111
+ ), Eo = ({
140
112
  className: e,
141
113
  viewBox: t,
142
114
  spacing: o,
@@ -164,7 +136,7 @@ const ct = ({
164
136
  /* @__PURE__ */ r("path", { d: "M256 128c13.3 0 24 10.7 24 24v94.1l65 65c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-72-72c-4.5-4.5-7-10.6-7-17V152c0-13.3 10.7-24 24-24z" })
165
137
  ]
166
138
  }
167
- ), So = ({
139
+ ), xo = ({
168
140
  className: e,
169
141
  viewBox: t,
170
142
  spacing: o,
@@ -192,7 +164,7 @@ const ct = ({
192
164
  /* @__PURE__ */ r("path", { d: "M256 128a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM192 248c0-13.3 10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h24V272H216c-13.3 0-24-10.7-24-24z" })
193
165
  ]
194
166
  }
195
- ), dt = ({
167
+ ), st = ({
196
168
  className: e,
197
169
  viewBox: t,
198
170
  spacing: o,
@@ -217,7 +189,7 @@ const ct = ({
217
189
  }
218
190
  )
219
191
  }
220
- ), _o = ({
192
+ ), Io = ({
221
193
  className: e,
222
194
  viewBox: t,
223
195
  spacing: o,
@@ -245,7 +217,7 @@ const ct = ({
245
217
  /* @__PURE__ */ r("path", { d: "M176 256a64 64 0 1 0 0-128 64 64 0 1 0 0 128zm-32 32c-44.2 0-80 35.8-80 80c0 8.8 7.2 16 16 16H272c8.8 0 16-7.2 16-16c0-44.2-35.8-80-80-80H144z" })
246
218
  ]
247
219
  }
248
- ), Ao = ({
220
+ ), So = ({
249
221
  className: e,
250
222
  viewBox: t,
251
223
  spacing: o,
@@ -273,7 +245,7 @@ const ct = ({
273
245
  /* @__PURE__ */ r("path", { d: "M64 128c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V192c0-35.3-28.7-64-64-64H64zm32 64H288c17.7 0 32 14.3 32 32s-14.3 32-32 32H96c-17.7 0-32-14.3-32-32s14.3-32 32-32z" })
274
246
  ]
275
247
  }
276
- ), Ro = ({
248
+ ), _o = ({
277
249
  className: e,
278
250
  viewBox: t,
279
251
  spacing: o,
@@ -293,8 +265,8 @@ const ct = ({
293
265
  children: /* @__PURE__ */ r("path", { d: "M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z" })
294
266
  }
295
267
  );
296
- function de(e) {
297
- return oo();
268
+ function ce(e) {
269
+ return eo();
298
270
  }
299
271
  const Ie = f.createContext({
300
272
  getItemProps: () => ({}),
@@ -305,7 +277,7 @@ const Ie = f.createContext({
305
277
  setHasFocusInside: () => {
306
278
  },
307
279
  isOpen: !1
308
- }), Ke = (e) => {
280
+ }), He = (e) => {
309
281
  if (typeof e == "string")
310
282
  return e;
311
283
  if (typeof e == "function")
@@ -316,7 +288,7 @@ const Ie = f.createContext({
316
288
  return t.displayName || t.name || "Component";
317
289
  }
318
290
  return "Element";
319
- }, ut = nt(
291
+ }, it = tt(
320
292
  ({
321
293
  trigger: e,
322
294
  children: t,
@@ -325,44 +297,44 @@ const Ie = f.createContext({
325
297
  onOpenChange: n,
326
298
  spacing: s,
327
299
  mode: i = "system",
328
- focusMode: l = "system",
300
+ focusMode: c = "system",
329
301
  ...h
330
- }, u) => {
331
- const [m, g] = S(!1), [b, d] = S(!1), [c, y] = S(null), T = ce([]), p = ce([]), k = $(Ie), N = st(), I = so(), M = it(), { floatingStyles: _, refs: z, context: E } = io({
302
+ }, m) => {
303
+ const [l, g] = S(!1), [b, u] = S(!1), [d, y] = S(null), C = le([]), p = le([]), k = z(Ie), T = ot(), I = ao(), M = rt(), { floatingStyles: _, refs: V, context: E } = no({
332
304
  nodeId: I,
333
- open: m,
334
- onOpenChange: (ne) => {
335
- g(ne), n == null || n(ne);
305
+ open: l,
306
+ onOpenChange: (oe) => {
307
+ g(oe), n == null || n(oe);
336
308
  },
337
309
  placement: a,
338
310
  strategy: "fixed",
339
- middleware: [lo({ mainAxis: 10 }), co(), uo()],
340
- whileElementsMounted: mo
341
- }), re = ho(E, {
311
+ middleware: [so({ mainAxis: 10 }), io(), lo()],
312
+ whileElementsMounted: co
313
+ }), ee = uo(E, {
342
314
  event: "mousedown",
343
315
  toggle: !0,
344
316
  ignoreMouse: !1
345
- }), J = go(E, { role: "menu" }), j = po(E, { bubbles: !0 }), ae = fo(E, {
346
- listRef: T,
347
- activeIndex: c,
317
+ }), J = mo(E, { role: "menu" }), j = ho(E, { bubbles: !0 }), te = go(E, {
318
+ listRef: C,
319
+ activeIndex: d,
348
320
  nested: !1,
349
321
  onNavigate: y,
350
322
  loop: !0
351
- }), L = bo(E, {
323
+ }), L = po(E, {
352
324
  listRef: p,
353
- onMatch: m ? y : void 0,
354
- activeIndex: c
355
- }), { getReferenceProps: K, getFloatingProps: A, getItemProps: Rt } = vo([re, J, j, ae, L]), Ve = Ke(e) === "Button" || Ke(e) === "ButtonIcon", Mt = Ve ? {
356
- noInternalClick: Ve,
357
- focusMode: l,
325
+ onMatch: l ? y : void 0,
326
+ activeIndex: d
327
+ }), { getReferenceProps: K, getFloatingProps: R, getItemProps: It } = fo([ee, J, j, te, L]), ze = He(e) === "Button" || He(e) === "ButtonIcon", St = ze ? {
328
+ noInternalClick: ze,
329
+ focusMode: c,
358
330
  mode: i,
359
331
  spacing: s
360
- } : {}, Lt = x.cloneElement(e, {
361
- ...Mt,
332
+ } : {}, _t = x.cloneElement(e, {
333
+ ...St,
362
334
  "aria-label": o,
363
- "data-open": m ? "" : void 0,
335
+ "data-open": l ? "" : void 0,
364
336
  "data-focus-inside": b ? "" : void 0,
365
- ref: lt([z.setReference, M.ref, u]),
337
+ ref: at([V.setReference, M.ref, m]),
366
338
  ...K(
367
339
  k.getItemProps({
368
340
  ...h
@@ -370,30 +342,30 @@ const Ie = f.createContext({
370
342
  )
371
343
  });
372
344
  return U(() => {
373
- if (!N)
345
+ if (!T)
374
346
  return;
375
- function ne() {
347
+ function oe() {
376
348
  g(!1), n == null || n(!1);
377
349
  }
378
- return N.events.on("click", ne), () => {
379
- N.events.off("click", ne);
350
+ return T.events.on("click", oe), () => {
351
+ T.events.off("click", oe);
380
352
  };
381
- }, [N, n]), U(() => {
382
- m && N && N.events.emit("menuopen", { nodeId: I });
383
- }, [N, m, I]), /* @__PURE__ */ v(yo, { id: I, children: [
384
- Lt,
353
+ }, [T, n]), U(() => {
354
+ l && T && T.events.emit("menuopen", { nodeId: I });
355
+ }, [T, l, I]), /* @__PURE__ */ v(bo, { id: I, children: [
356
+ _t,
385
357
  /* @__PURE__ */ r(
386
358
  Ie.Provider,
387
359
  {
388
360
  value: {
389
- activeIndex: c,
361
+ activeIndex: d,
390
362
  setActiveIndex: y,
391
- getItemProps: Rt,
392
- setHasFocusInside: d,
393
- isOpen: m
363
+ getItemProps: It,
364
+ setHasFocusInside: u,
365
+ isOpen: l
394
366
  },
395
- children: /* @__PURE__ */ r(ko, { elementsRef: T, labelsRef: p, children: m && /* @__PURE__ */ r(Co, { children: /* @__PURE__ */ r(
396
- To,
367
+ children: /* @__PURE__ */ r(vo, { elementsRef: C, labelsRef: p, children: l && /* @__PURE__ */ r(yo, { children: /* @__PURE__ */ r(
368
+ ko,
397
369
  {
398
370
  context: E,
399
371
  modal: !1,
@@ -402,10 +374,10 @@ const Ie = f.createContext({
402
374
  children: /* @__PURE__ */ r(
403
375
  "div",
404
376
  {
405
- ref: z.setFloating,
377
+ ref: V.setFloating,
406
378
  className: "rounded-md bg-surface-light p-4 shadow-sm shadow-border-dark outline-none sm:p-2",
407
379
  style: _,
408
- ...A(),
380
+ ...R(),
409
381
  children: t
410
382
  }
411
383
  )
@@ -415,9 +387,9 @@ const Ie = f.createContext({
415
387
  )
416
388
  ] });
417
389
  }
418
- ), Se = nt((e, t) => /* @__PURE__ */ r(wo, { children: /* @__PURE__ */ r(ut, { ...e, ref: t }) }));
390
+ ), Se = tt((e, t) => /* @__PURE__ */ r(Co, { children: /* @__PURE__ */ r(it, { ...e, ref: t }) }));
419
391
  Se.displayName = "Menu";
420
- ut.displayName = "MenuComponent";
392
+ it.displayName = "MenuComponent";
421
393
  const W = f.forwardRef(
422
394
  ({
423
395
  label: e,
@@ -427,16 +399,16 @@ const W = f.forwardRef(
427
399
  children: n,
428
400
  ignoreClick: s = !1,
429
401
  ...i
430
- }, l) => {
431
- const h = f.useContext(Ie), u = it({ label: t ? null : e }), m = st(), g = lt([u.ref, l]);
402
+ }, c) => {
403
+ const h = f.useContext(Ie), m = rt({ label: t ? null : e }), l = ot(), g = at([m.ref, c]);
432
404
  return a && n ? /* @__PURE__ */ r(
433
405
  "div",
434
406
  {
435
407
  role: "menuitem",
436
408
  ...h.getItemProps({
437
409
  onClick(b) {
438
- var d;
439
- s || ((d = i.onClick) == null || d.call(i, b), m == null || m.events.emit("click"));
410
+ var u;
411
+ s || ((u = i.onClick) == null || u.call(i, b), l == null || l.events.emit("click"));
440
412
  }
441
413
  }),
442
414
  children: n
@@ -452,12 +424,12 @@ const W = f.forwardRef(
452
424
  disabled: t,
453
425
  ...h.getItemProps({
454
426
  onClick(b) {
455
- var d;
456
- s || ((d = i.onClick) == null || d.call(i, b), m == null || m.events.emit("click"));
427
+ var u;
428
+ s || ((u = i.onClick) == null || u.call(i, b), l == null || l.events.emit("click"));
457
429
  },
458
430
  onFocus(b) {
459
- var d;
460
- (d = i.onFocus) == null || d.call(i, b), h.setHasFocusInside(!0);
431
+ var u;
432
+ (u = i.onFocus) == null || u.call(i, b), h.setHasFocusInside(!0);
461
433
  }
462
434
  }),
463
435
  children: [
@@ -469,8 +441,8 @@ const W = f.forwardRef(
469
441
  }
470
442
  );
471
443
  W.displayName = "MenuItem";
472
- const Mo = ({ className: e, ...t }) => {
473
- const o = C(e, "my-1 border-t border-border-medium");
444
+ const Ro = ({ className: e, ...t }) => {
445
+ const o = w(e, "my-1 border-t border-border-medium");
474
446
  return /* @__PURE__ */ r("div", { className: o, ...t });
475
447
  };
476
448
  /*!
@@ -499,37 +471,37 @@ try {
499
471
  });
500
472
  } catch {
501
473
  }
502
- const Lo = "av-togglegroup", Oo = "av-togglegroup-item-wrapper", Bo = "av-togglegroup-item";
503
- function Le(e, t = []) {
474
+ const Ao = "av-togglegroup", Mo = "av-togglegroup-item-wrapper", Lo = "av-togglegroup-item";
475
+ function Me(e, t = []) {
504
476
  let o = [];
505
477
  function a(s, i) {
506
- const l = f.createContext(i), h = o.length;
478
+ const c = f.createContext(i), h = o.length;
507
479
  o = [...o, i];
508
- function u(g) {
509
- const { scope: b, children: d, ...c } = g, y = (b == null ? void 0 : b[e][h]) || l, T = f.useMemo(() => c, Object.values(c));
510
- return /* @__PURE__ */ r(y.Provider, { value: T, children: d });
480
+ function m(g) {
481
+ const { scope: b, children: u, ...d } = g, y = (b == null ? void 0 : b[e][h]) || c, C = f.useMemo(() => d, Object.values(d));
482
+ return /* @__PURE__ */ r(y.Provider, { value: C, children: u });
511
483
  }
512
- function m(g, b) {
513
- const d = (b == null ? void 0 : b[e][h]) || l, c = f.useContext(d);
514
- if (c) return c;
484
+ function l(g, b) {
485
+ const u = (b == null ? void 0 : b[e][h]) || c, d = f.useContext(u);
486
+ if (d) return d;
515
487
  if (i !== void 0) return i;
516
488
  throw new Error(`\`${g}\` must be used within \`${s}\``);
517
489
  }
518
- return u.displayName = s + "Provider", [u, m];
490
+ return m.displayName = s + "Provider", [m, l];
519
491
  }
520
492
  const n = () => {
521
493
  const s = o.map((i) => f.createContext(i));
522
494
  return function(i) {
523
- const l = (i == null ? void 0 : i[e]) || s;
495
+ const c = (i == null ? void 0 : i[e]) || s;
524
496
  return f.useMemo(
525
- () => ({ [`__scope${e}`]: { ...i, [e]: l } }),
526
- [i, l]
497
+ () => ({ [`__scope${e}`]: { ...i, [e]: c } }),
498
+ [i, c]
527
499
  );
528
500
  };
529
501
  };
530
- return n.scopeName = e, [a, Po(n, ...t)];
502
+ return n.scopeName = e, [a, $o(n, ...t)];
531
503
  }
532
- function Po(...e) {
504
+ function $o(...e) {
533
505
  const t = e[0];
534
506
  if (e.length === 1) return t;
535
507
  const o = () => {
@@ -538,51 +510,51 @@ function Po(...e) {
538
510
  scopeName: n.scopeName
539
511
  }));
540
512
  return function(n) {
541
- const s = a.reduce((i, { useScope: l, scopeName: h }) => {
542
- const u = l(n)[`__scope${h}`];
543
- return { ...i, ...u };
513
+ const s = a.reduce((i, { useScope: c, scopeName: h }) => {
514
+ const m = c(n)[`__scope${h}`];
515
+ return { ...i, ...m };
544
516
  }, {});
545
517
  return f.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
546
518
  };
547
519
  };
548
520
  return o.scopeName = t.scopeName, o;
549
521
  }
550
- function zo(e, t) {
522
+ function Bo(e, t) {
551
523
  typeof e == "function" ? e(t) : e != null && (e.current = t);
552
524
  }
553
- function mt(...e) {
554
- return (t) => e.forEach((o) => zo(o, t));
525
+ function lt(...e) {
526
+ return (t) => e.forEach((o) => Bo(o, t));
555
527
  }
556
528
  function _e(...e) {
557
- return f.useCallback(mt(...e), e);
529
+ return f.useCallback(lt(...e), e);
558
530
  }
559
- var be = f.forwardRef((e, t) => {
560
- const { children: o, ...a } = e, n = f.Children.toArray(o), s = n.find($o);
531
+ var ve = f.forwardRef((e, t) => {
532
+ const { children: o, ...a } = e, n = f.Children.toArray(o), s = n.find(zo);
561
533
  if (s) {
562
- const i = s.props.children, l = n.map((h) => h === s ? f.Children.count(i) > 1 ? f.Children.only(null) : f.isValidElement(i) ? i.props.children : null : h);
563
- return /* @__PURE__ */ r(Ae, { ...a, ref: t, children: f.isValidElement(i) ? f.cloneElement(i, void 0, l) : null });
534
+ const i = s.props.children, c = n.map((h) => h === s ? f.Children.count(i) > 1 ? f.Children.only(null) : f.isValidElement(i) ? i.props.children : null : h);
535
+ return /* @__PURE__ */ r(Re, { ...a, ref: t, children: f.isValidElement(i) ? f.cloneElement(i, void 0, c) : null });
564
536
  }
565
- return /* @__PURE__ */ r(Ae, { ...a, ref: t, children: o });
537
+ return /* @__PURE__ */ r(Re, { ...a, ref: t, children: o });
566
538
  });
567
- be.displayName = "Slot";
568
- var Ae = f.forwardRef((e, t) => {
539
+ ve.displayName = "Slot";
540
+ var Re = f.forwardRef((e, t) => {
569
541
  const { children: o, ...a } = e;
570
542
  if (f.isValidElement(o)) {
571
- const n = Ho(o);
543
+ const n = Vo(o);
572
544
  return f.cloneElement(o, {
573
- ...Do(a, o.props),
545
+ ...Oo(a, o.props),
574
546
  // @ts-ignore
575
- ref: t ? mt(t, n) : n
547
+ ref: t ? lt(t, n) : n
576
548
  });
577
549
  }
578
550
  return f.Children.count(o) > 1 ? f.Children.only(null) : null;
579
551
  });
580
- Ae.displayName = "SlotClone";
581
- var Vo = ({ children: e }) => /* @__PURE__ */ r(R, { children: e });
582
- function $o(e) {
583
- return f.isValidElement(e) && e.type === Vo;
552
+ Re.displayName = "SlotClone";
553
+ var Po = ({ children: e }) => /* @__PURE__ */ r(A, { children: e });
554
+ function zo(e) {
555
+ return f.isValidElement(e) && e.type === Po;
584
556
  }
585
- function Do(e, t) {
557
+ function Oo(e, t) {
586
558
  const o = { ...t };
587
559
  for (const a in t) {
588
560
  const n = e[a], s = t[a];
@@ -592,12 +564,12 @@ function Do(e, t) {
592
564
  }
593
565
  return { ...e, ...o };
594
566
  }
595
- function Ho(e) {
567
+ function Vo(e) {
596
568
  var t, o;
597
569
  let a = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, n = a && "isReactWarning" in a && a.isReactWarning;
598
570
  return n ? e.ref : (a = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = a && "isReactWarning" in a && a.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
599
571
  }
600
- var Fo = [
572
+ var Do = [
601
573
  "a",
602
574
  "button",
603
575
  "div",
@@ -614,52 +586,52 @@ var Fo = [
614
586
  "span",
615
587
  "svg",
616
588
  "ul"
617
- ], ue = Fo.reduce((e, t) => {
589
+ ], de = Do.reduce((e, t) => {
618
590
  const o = f.forwardRef((a, n) => {
619
- const { asChild: s, ...i } = a, l = s ? be : t;
620
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ r(l, { ...i, ref: n });
591
+ const { asChild: s, ...i } = a, c = s ? ve : t;
592
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ r(c, { ...i, ref: n });
621
593
  });
622
594
  return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
623
595
  }, {});
624
- function Z(e, t, { checkForDefaultPrevented: o = !0 } = {}) {
596
+ function q(e, t, { checkForDefaultPrevented: o = !0 } = {}) {
625
597
  return function(a) {
626
598
  if (e == null || e(a), o === !1 || !a.defaultPrevented)
627
599
  return t == null ? void 0 : t(a);
628
600
  };
629
601
  }
630
- function Go(e) {
631
- const t = e + "CollectionProvider", [o, a] = Le(t), [n, s] = o(
602
+ function Fo(e) {
603
+ const t = e + "CollectionProvider", [o, a] = Me(t), [n, s] = o(
632
604
  t,
633
605
  { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
634
- ), i = (d) => {
635
- const { scope: c, children: y } = d, T = x.useRef(null), p = x.useRef(/* @__PURE__ */ new Map()).current;
636
- return /* @__PURE__ */ r(n, { scope: c, itemMap: p, collectionRef: T, children: y });
606
+ ), i = (u) => {
607
+ const { scope: d, children: y } = u, C = x.useRef(null), p = x.useRef(/* @__PURE__ */ new Map()).current;
608
+ return /* @__PURE__ */ r(n, { scope: d, itemMap: p, collectionRef: C, children: y });
637
609
  };
638
610
  i.displayName = t;
639
- const l = e + "CollectionSlot", h = x.forwardRef(
640
- (d, c) => {
641
- const { scope: y, children: T } = d, p = s(l, y), k = _e(c, p.collectionRef);
642
- return /* @__PURE__ */ r(be, { ref: k, children: T });
611
+ const c = e + "CollectionSlot", h = x.forwardRef(
612
+ (u, d) => {
613
+ const { scope: y, children: C } = u, p = s(c, y), k = _e(d, p.collectionRef);
614
+ return /* @__PURE__ */ r(ve, { ref: k, children: C });
643
615
  }
644
616
  );
645
- h.displayName = l;
646
- const u = e + "CollectionItemSlot", m = "data-radix-collection-item", g = x.forwardRef(
647
- (d, c) => {
648
- const { scope: y, children: T, ...p } = d, k = x.useRef(null), N = _e(c, k), I = s(u, y);
649
- return x.useEffect(() => (I.itemMap.set(k, { ref: k, ...p }), () => void I.itemMap.delete(k))), /* @__PURE__ */ r(be, { [m]: "", ref: N, children: T });
617
+ h.displayName = c;
618
+ const m = e + "CollectionItemSlot", l = "data-radix-collection-item", g = x.forwardRef(
619
+ (u, d) => {
620
+ const { scope: y, children: C, ...p } = u, k = x.useRef(null), T = _e(d, k), I = s(m, y);
621
+ return x.useEffect(() => (I.itemMap.set(k, { ref: k, ...p }), () => void I.itemMap.delete(k))), /* @__PURE__ */ r(ve, { [l]: "", ref: T, children: C });
650
622
  }
651
623
  );
652
- g.displayName = u;
653
- function b(d) {
654
- const c = s(e + "CollectionConsumer", d);
624
+ g.displayName = m;
625
+ function b(u) {
626
+ const d = s(e + "CollectionConsumer", u);
655
627
  return x.useCallback(() => {
656
- const y = c.collectionRef.current;
628
+ const y = d.collectionRef.current;
657
629
  if (!y) return [];
658
- const T = Array.from(y.querySelectorAll(`[${m}]`));
659
- return Array.from(c.itemMap.values()).sort(
660
- (p, k) => T.indexOf(p.ref.current) - T.indexOf(k.ref.current)
630
+ const C = Array.from(y.querySelectorAll(`[${l}]`));
631
+ return Array.from(d.itemMap.values()).sort(
632
+ (p, k) => C.indexOf(p.ref.current) - C.indexOf(k.ref.current)
661
633
  );
662
- }, [c.collectionRef, c.itemMap]);
634
+ }, [d.collectionRef, d.itemMap]);
663
635
  }
664
636
  return [
665
637
  { Provider: i, Slot: h, ItemSlot: g },
@@ -667,16 +639,16 @@ function Go(e) {
667
639
  a
668
640
  ];
669
641
  }
670
- var Uo = globalThis != null && globalThis.document ? f.useLayoutEffect : () => {
671
- }, jo = f.useId || (() => {
672
- }), Ko = 0;
673
- function Wo(e) {
674
- const [t, o] = f.useState(jo());
675
- return Uo(() => {
676
- o((a) => a ?? String(Ko++));
642
+ var Ho = globalThis != null && globalThis.document ? f.useLayoutEffect : () => {
643
+ }, Go = f.useId || (() => {
644
+ }), Uo = 0;
645
+ function jo(e) {
646
+ const [t, o] = f.useState(Go());
647
+ return Ho(() => {
648
+ o((a) => a ?? String(Uo++));
677
649
  }, [e]), t ? `radix-${t}` : "";
678
650
  }
679
- function Oe(e) {
651
+ function Le(e) {
680
652
  const t = f.useRef(e);
681
653
  return f.useEffect(() => {
682
654
  t.current = e;
@@ -685,117 +657,117 @@ function Oe(e) {
685
657
  return (a = t.current) == null ? void 0 : a.call(t, ...o);
686
658
  }, []);
687
659
  }
688
- function ye({
660
+ function ke({
689
661
  prop: e,
690
662
  defaultProp: t,
691
663
  onChange: o = () => {
692
664
  }
693
665
  }) {
694
- const [a, n] = Yo({ defaultProp: t, onChange: o }), s = e !== void 0, i = s ? e : a, l = Oe(o), h = f.useCallback(
695
- (u) => {
666
+ const [a, n] = Ko({ defaultProp: t, onChange: o }), s = e !== void 0, i = s ? e : a, c = Le(o), h = f.useCallback(
667
+ (m) => {
696
668
  if (s) {
697
- const m = typeof u == "function" ? u(e) : u;
698
- m !== e && l(m);
669
+ const l = typeof m == "function" ? m(e) : m;
670
+ l !== e && c(l);
699
671
  } else
700
- n(u);
672
+ n(m);
701
673
  },
702
- [s, e, n, l]
674
+ [s, e, n, c]
703
675
  );
704
676
  return [i, h];
705
677
  }
706
- function Yo({
678
+ function Ko({
707
679
  defaultProp: e,
708
680
  onChange: t
709
681
  }) {
710
- const o = f.useState(e), [a] = o, n = f.useRef(a), s = Oe(t);
682
+ const o = f.useState(e), [a] = o, n = f.useRef(a), s = Le(t);
711
683
  return f.useEffect(() => {
712
684
  n.current !== a && (s(a), n.current = a);
713
685
  }, [a, n, s]), o;
714
686
  }
715
- var Zo = f.createContext(void 0);
716
- function ht(e) {
717
- const t = f.useContext(Zo);
687
+ var Wo = f.createContext(void 0);
688
+ function ct(e) {
689
+ const t = f.useContext(Wo);
718
690
  return e || t || "ltr";
719
691
  }
720
- var xe = "rovingFocusGroup.onEntryFocus", qo = { bubbles: !1, cancelable: !0 }, ke = "RovingFocusGroup", [Re, gt, Xo] = Go(ke), [Jo, pt] = Le(
721
- ke,
722
- [Xo]
723
- ), [Qo, er] = Jo(ke), ft = f.forwardRef(
724
- (e, t) => /* @__PURE__ */ r(Re.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ r(Re.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ r(tr, { ...e, ref: t }) }) })
692
+ var Ee = "rovingFocusGroup.onEntryFocus", Yo = { bubbles: !1, cancelable: !0 }, Ce = "RovingFocusGroup", [Ae, dt, qo] = Fo(Ce), [Xo, ut] = Me(
693
+ Ce,
694
+ [qo]
695
+ ), [Zo, Jo] = Xo(Ce), mt = f.forwardRef(
696
+ (e, t) => /* @__PURE__ */ r(Ae.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ r(Ae.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ r(Qo, { ...e, ref: t }) }) })
725
697
  );
726
- ft.displayName = ke;
727
- var tr = f.forwardRef((e, t) => {
698
+ mt.displayName = Ce;
699
+ var Qo = f.forwardRef((e, t) => {
728
700
  const {
729
701
  __scopeRovingFocusGroup: o,
730
702
  orientation: a,
731
703
  loop: n = !1,
732
704
  dir: s,
733
705
  currentTabStopId: i,
734
- defaultCurrentTabStopId: l,
706
+ defaultCurrentTabStopId: c,
735
707
  onCurrentTabStopIdChange: h,
736
- onEntryFocus: u,
737
- preventScrollOnEntryFocus: m = !1,
708
+ onEntryFocus: m,
709
+ preventScrollOnEntryFocus: l = !1,
738
710
  ...g
739
- } = e, b = f.useRef(null), d = _e(t, b), c = ht(s), [y = null, T] = ye({
711
+ } = e, b = f.useRef(null), u = _e(t, b), d = ct(s), [y = null, C] = ke({
740
712
  prop: i,
741
- defaultProp: l,
713
+ defaultProp: c,
742
714
  onChange: h
743
- }), [p, k] = f.useState(!1), N = Oe(u), I = gt(o), M = f.useRef(!1), [_, z] = f.useState(0);
715
+ }), [p, k] = f.useState(!1), T = Le(m), I = dt(o), M = f.useRef(!1), [_, V] = f.useState(0);
744
716
  return f.useEffect(() => {
745
717
  const E = b.current;
746
718
  if (E)
747
- return E.addEventListener(xe, N), () => E.removeEventListener(xe, N);
748
- }, [N]), /* @__PURE__ */ r(
749
- Qo,
719
+ return E.addEventListener(Ee, T), () => E.removeEventListener(Ee, T);
720
+ }, [T]), /* @__PURE__ */ r(
721
+ Zo,
750
722
  {
751
723
  scope: o,
752
724
  orientation: a,
753
- dir: c,
725
+ dir: d,
754
726
  loop: n,
755
727
  currentTabStopId: y,
756
728
  onItemFocus: f.useCallback(
757
- (E) => T(E),
758
- [T]
729
+ (E) => C(E),
730
+ [C]
759
731
  ),
760
732
  onItemShiftTab: f.useCallback(() => k(!0), []),
761
733
  onFocusableItemAdd: f.useCallback(
762
- () => z((E) => E + 1),
734
+ () => V((E) => E + 1),
763
735
  []
764
736
  ),
765
737
  onFocusableItemRemove: f.useCallback(
766
- () => z((E) => E - 1),
738
+ () => V((E) => E - 1),
767
739
  []
768
740
  ),
769
741
  children: /* @__PURE__ */ r(
770
- ue.div,
742
+ de.div,
771
743
  {
772
744
  tabIndex: p || _ === 0 ? -1 : 0,
773
745
  "data-orientation": a,
774
746
  ...g,
775
- ref: d,
747
+ ref: u,
776
748
  style: { outline: "none", ...e.style },
777
- onMouseDown: Z(e.onMouseDown, () => {
749
+ onMouseDown: q(e.onMouseDown, () => {
778
750
  M.current = !0;
779
751
  }),
780
- onFocus: Z(e.onFocus, (E) => {
781
- const re = !M.current;
782
- if (E.target === E.currentTarget && re && !p) {
783
- const J = new CustomEvent(xe, qo);
752
+ onFocus: q(e.onFocus, (E) => {
753
+ const ee = !M.current;
754
+ if (E.target === E.currentTarget && ee && !p) {
755
+ const J = new CustomEvent(Ee, Yo);
784
756
  if (E.currentTarget.dispatchEvent(J), !J.defaultPrevented) {
785
- const j = I().filter((A) => A.focusable), ae = j.find((A) => A.active), L = j.find((A) => A.id === y), K = [ae, L, ...j].filter(
757
+ const j = I().filter((R) => R.focusable), te = j.find((R) => R.active), L = j.find((R) => R.id === y), K = [te, L, ...j].filter(
786
758
  Boolean
787
- ).map((A) => A.ref.current);
788
- yt(K, m);
759
+ ).map((R) => R.ref.current);
760
+ pt(K, l);
789
761
  }
790
762
  }
791
763
  M.current = !1;
792
764
  }),
793
- onBlur: Z(e.onBlur, () => k(!1))
765
+ onBlur: q(e.onBlur, () => k(!1))
794
766
  }
795
767
  )
796
768
  }
797
769
  );
798
- }), bt = "RovingFocusGroupItem", vt = f.forwardRef(
770
+ }), ht = "RovingFocusGroupItem", gt = f.forwardRef(
799
771
  (e, t) => {
800
772
  const {
801
773
  __scopeRovingFocusGroup: o,
@@ -803,46 +775,46 @@ var tr = f.forwardRef((e, t) => {
803
775
  active: n = !1,
804
776
  tabStopId: s,
805
777
  ...i
806
- } = e, l = Wo(), h = s || l, u = er(bt, o), m = u.currentTabStopId === h, g = gt(o), { onFocusableItemAdd: b, onFocusableItemRemove: d } = u;
778
+ } = e, c = jo(), h = s || c, m = Jo(ht, o), l = m.currentTabStopId === h, g = dt(o), { onFocusableItemAdd: b, onFocusableItemRemove: u } = m;
807
779
  return f.useEffect(() => {
808
780
  if (a)
809
- return b(), () => d();
810
- }, [a, b, d]), /* @__PURE__ */ r(
811
- Re.ItemSlot,
781
+ return b(), () => u();
782
+ }, [a, b, u]), /* @__PURE__ */ r(
783
+ Ae.ItemSlot,
812
784
  {
813
785
  scope: o,
814
786
  id: h,
815
787
  focusable: a,
816
788
  active: n,
817
789
  children: /* @__PURE__ */ r(
818
- ue.span,
790
+ de.span,
819
791
  {
820
- tabIndex: m ? 0 : -1,
821
- "data-orientation": u.orientation,
792
+ tabIndex: l ? 0 : -1,
793
+ "data-orientation": m.orientation,
822
794
  ...i,
823
795
  ref: t,
824
- onMouseDown: Z(e.onMouseDown, (c) => {
825
- a ? u.onItemFocus(h) : c.preventDefault();
796
+ onMouseDown: q(e.onMouseDown, (d) => {
797
+ a ? m.onItemFocus(h) : d.preventDefault();
826
798
  }),
827
- onFocus: Z(e.onFocus, () => u.onItemFocus(h)),
828
- onKeyDown: Z(e.onKeyDown, (c) => {
829
- if (c.key === "Tab" && c.shiftKey) {
830
- u.onItemShiftTab();
799
+ onFocus: q(e.onFocus, () => m.onItemFocus(h)),
800
+ onKeyDown: q(e.onKeyDown, (d) => {
801
+ if (d.key === "Tab" && d.shiftKey) {
802
+ m.onItemShiftTab();
831
803
  return;
832
804
  }
833
- if (c.target !== c.currentTarget) return;
834
- const y = ar(c, u.orientation, u.dir);
805
+ if (d.target !== d.currentTarget) return;
806
+ const y = or(d, m.orientation, m.dir);
835
807
  if (y !== void 0) {
836
- if (c.metaKey || c.ctrlKey || c.altKey || c.shiftKey) return;
837
- c.preventDefault();
838
- let T = g().filter((p) => p.focusable).map((p) => p.ref.current);
839
- if (y === "last") T.reverse();
808
+ if (d.metaKey || d.ctrlKey || d.altKey || d.shiftKey) return;
809
+ d.preventDefault();
810
+ let C = g().filter((p) => p.focusable).map((p) => p.ref.current);
811
+ if (y === "last") C.reverse();
840
812
  else if (y === "prev" || y === "next") {
841
- y === "prev" && T.reverse();
842
- const p = T.indexOf(c.currentTarget);
843
- T = u.loop ? nr(T, p + 1) : T.slice(p + 1);
813
+ y === "prev" && C.reverse();
814
+ const p = C.indexOf(d.currentTarget);
815
+ C = m.loop ? rr(C, p + 1) : C.slice(p + 1);
844
816
  }
845
- setTimeout(() => yt(T));
817
+ setTimeout(() => pt(C));
846
818
  }
847
819
  })
848
820
  }
@@ -851,8 +823,8 @@ var tr = f.forwardRef((e, t) => {
851
823
  );
852
824
  }
853
825
  );
854
- vt.displayName = bt;
855
- var or = {
826
+ gt.displayName = ht;
827
+ var er = {
856
828
  ArrowLeft: "prev",
857
829
  ArrowUp: "prev",
858
830
  ArrowRight: "next",
@@ -862,30 +834,30 @@ var or = {
862
834
  PageDown: "last",
863
835
  End: "last"
864
836
  };
865
- function rr(e, t) {
837
+ function tr(e, t) {
866
838
  return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
867
839
  }
868
- function ar(e, t, o) {
869
- const a = rr(e.key, o);
840
+ function or(e, t, o) {
841
+ const a = tr(e.key, o);
870
842
  if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(a)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(a)))
871
- return or[a];
843
+ return er[a];
872
844
  }
873
- function yt(e, t = !1) {
845
+ function pt(e, t = !1) {
874
846
  const o = document.activeElement;
875
847
  for (const a of e)
876
848
  if (a === o || (a.focus({ preventScroll: t }), document.activeElement !== o)) return;
877
849
  }
878
- function nr(e, t) {
850
+ function rr(e, t) {
879
851
  return e.map((o, a) => e[(t + a) % e.length]);
880
852
  }
881
- var sr = ft, ir = vt, lr = "Toggle", kt = f.forwardRef((e, t) => {
882
- const { pressed: o, defaultPressed: a = !1, onPressedChange: n, ...s } = e, [i = !1, l] = ye({
853
+ var ar = mt, nr = gt, sr = "Toggle", ft = f.forwardRef((e, t) => {
854
+ const { pressed: o, defaultPressed: a = !1, onPressedChange: n, ...s } = e, [i = !1, c] = ke({
883
855
  prop: o,
884
856
  onChange: n,
885
857
  defaultProp: a
886
858
  });
887
859
  return /* @__PURE__ */ r(
888
- ue.button,
860
+ de.button,
889
861
  {
890
862
  type: "button",
891
863
  "aria-pressed": i,
@@ -893,79 +865,79 @@ var sr = ft, ir = vt, lr = "Toggle", kt = f.forwardRef((e, t) => {
893
865
  "data-disabled": e.disabled ? "" : void 0,
894
866
  ...s,
895
867
  ref: t,
896
- onClick: Z(e.onClick, () => {
897
- e.disabled || l(!i);
868
+ onClick: q(e.onClick, () => {
869
+ e.disabled || c(!i);
898
870
  })
899
871
  }
900
872
  );
901
873
  });
902
- kt.displayName = lr;
903
- var oe = "ToggleGroup", [Ct, wa] = Le(oe, [
904
- pt
905
- ]), Tt = pt(), Be = x.forwardRef((e, t) => {
874
+ ft.displayName = sr;
875
+ var Q = "ToggleGroup", [bt, Ca] = Me(Q, [
876
+ ut
877
+ ]), vt = ut(), $e = x.forwardRef((e, t) => {
906
878
  const { type: o, ...a } = e;
907
879
  if (o === "single")
908
- return /* @__PURE__ */ r(cr, { ...a, ref: t });
880
+ return /* @__PURE__ */ r(ir, { ...a, ref: t });
909
881
  if (o === "multiple")
910
- return /* @__PURE__ */ r(dr, { ...a, ref: t });
911
- throw new Error(`Missing prop \`type\` expected on \`${oe}\``);
882
+ return /* @__PURE__ */ r(lr, { ...a, ref: t });
883
+ throw new Error(`Missing prop \`type\` expected on \`${Q}\``);
912
884
  });
913
- Be.displayName = oe;
914
- var [wt, Nt] = Ct(oe), cr = x.forwardRef((e, t) => {
885
+ $e.displayName = Q;
886
+ var [yt, kt] = bt(Q), ir = x.forwardRef((e, t) => {
915
887
  const {
916
888
  value: o,
917
889
  defaultValue: a,
918
890
  onValueChange: n = () => {
919
891
  },
920
892
  ...s
921
- } = e, [i, l] = ye({
893
+ } = e, [i, c] = ke({
922
894
  prop: o,
923
895
  defaultProp: a,
924
896
  onChange: n
925
897
  });
926
898
  return /* @__PURE__ */ r(
927
- wt,
899
+ yt,
928
900
  {
929
901
  scope: e.__scopeToggleGroup,
930
902
  type: "single",
931
903
  value: i ? [i] : [],
932
- onItemActivate: l,
933
- onItemDeactivate: x.useCallback(() => l(""), [l]),
934
- children: /* @__PURE__ */ r(Et, { ...s, ref: t })
904
+ onItemActivate: c,
905
+ onItemDeactivate: x.useCallback(() => c(""), [c]),
906
+ children: /* @__PURE__ */ r(Ct, { ...s, ref: t })
935
907
  }
936
908
  );
937
- }), dr = x.forwardRef((e, t) => {
909
+ }), lr = x.forwardRef((e, t) => {
938
910
  const {
939
911
  value: o,
940
912
  defaultValue: a,
941
913
  onValueChange: n = () => {
942
914
  },
943
915
  ...s
944
- } = e, [i = [], l] = ye({
916
+ } = e, [i = [], c] = ke({
945
917
  prop: o,
946
918
  defaultProp: a,
947
919
  onChange: n
948
920
  }), h = x.useCallback(
949
- (m) => l((g = []) => [...g, m]),
950
- [l]
951
- ), u = x.useCallback(
952
- (m) => l((g = []) => g.filter((b) => b !== m)),
953
- [l]
921
+ (l) => c((g = []) => [...g, l]),
922
+ [c]
923
+ ), m = x.useCallback(
924
+ (l) => c((g = []) => g.filter((b) => b !== l)),
925
+ [c]
954
926
  );
955
927
  return /* @__PURE__ */ r(
956
- wt,
928
+ yt,
957
929
  {
958
930
  scope: e.__scopeToggleGroup,
959
931
  type: "multiple",
960
932
  value: i,
961
933
  onItemActivate: h,
962
- onItemDeactivate: u,
963
- children: /* @__PURE__ */ r(Et, { ...s, ref: t })
934
+ onItemDeactivate: m,
935
+ children: /* @__PURE__ */ r(Ct, { ...s, ref: t })
964
936
  }
965
937
  );
966
938
  });
967
- Be.displayName = oe;
968
- var [ur, mr] = Ct(oe), Et = x.forwardRef(
939
+ $e.displayName = Q;
940
+ var [cr, dr] = bt(Q), Ct = x.forwardRef(
969
941
  (e, t) => {
970
942
  const {
971
943
  __scopeToggleGroup: o,
@@ -973,45 +945,45 @@ var [ur, mr] = Ct(oe), Et = x.forwardRef(
973
945
  rovingFocus: n = !0,
974
946
  orientation: s,
975
947
  dir: i,
976
- loop: l = !0,
948
+ loop: c = !0,
977
949
  ...h
978
- } = e, u = Tt(o), m = ht(i), g = { role: "group", dir: m, ...h };
979
- return /* @__PURE__ */ r(ur, { scope: o, rovingFocus: n, disabled: a, children: n ? /* @__PURE__ */ r(
980
- sr,
950
+ } = e, m = vt(o), l = ct(i), g = { role: "group", dir: l, ...h };
951
+ return /* @__PURE__ */ r(cr, { scope: o, rovingFocus: n, disabled: a, children: n ? /* @__PURE__ */ r(
952
+ ar,
981
953
  {
982
954
  asChild: !0,
983
- ...u,
955
+ ...m,
984
956
  orientation: s,
985
- dir: m,
986
- loop: l,
987
- children: /* @__PURE__ */ r(ue.div, { ...g, ref: t })
957
+ dir: l,
958
+ loop: c,
959
+ children: /* @__PURE__ */ r(de.div, { ...g, ref: t })
988
960
  }
989
- ) : /* @__PURE__ */ r(ue.div, { ...g, ref: t }) });
961
+ ) : /* @__PURE__ */ r(de.div, { ...g, ref: t }) });
990
962
  }
991
- ), ve = "ToggleGroupItem", xt = x.forwardRef(
963
+ ), ye = "ToggleGroupItem", wt = x.forwardRef(
992
964
  (e, t) => {
993
- const o = Nt(ve, e.__scopeToggleGroup), a = mr(ve, e.__scopeToggleGroup), n = Tt(e.__scopeToggleGroup), s = o.value.includes(e.value), i = a.disabled || e.disabled, l = { ...e, pressed: s, disabled: i }, h = x.useRef(null);
965
+ const o = kt(ye, e.__scopeToggleGroup), a = dr(ye, e.__scopeToggleGroup), n = vt(e.__scopeToggleGroup), s = o.value.includes(e.value), i = a.disabled || e.disabled, c = { ...e, pressed: s, disabled: i }, h = x.useRef(null);
994
966
  return a.rovingFocus ? /* @__PURE__ */ r(
995
- ir,
967
+ nr,
996
968
  {
997
969
  asChild: !0,
998
970
  ...n,
999
971
  focusable: !i,
1000
972
  active: s,
1001
973
  ref: h,
1002
- children: /* @__PURE__ */ r(We, { ...l, ref: t })
974
+ children: /* @__PURE__ */ r(Ge, { ...c, ref: t })
1003
975
  }
1004
- ) : /* @__PURE__ */ r(We, { ...l, ref: t });
976
+ ) : /* @__PURE__ */ r(Ge, { ...c, ref: t });
1005
977
  }
1006
978
  );
1007
- xt.displayName = ve;
1008
- var We = x.forwardRef(
979
+ wt.displayName = ye;
980
+ var Ge = x.forwardRef(
1009
981
  (e, t) => {
1010
- const { __scopeToggleGroup: o, value: a, ...n } = e, s = Nt(ve, o), i = { role: "radio", "aria-checked": e.pressed, "aria-pressed": void 0 }, l = s.type === "single" ? i : void 0;
982
+ const { __scopeToggleGroup: o, value: a, ...n } = e, s = kt(ye, o), i = { role: "radio", "aria-checked": e.pressed, "aria-pressed": void 0 }, c = s.type === "single" ? i : void 0;
1011
983
  return /* @__PURE__ */ r(
1012
- kt,
984
+ ft,
1013
985
  {
1014
- ...l,
986
+ ...c,
1015
987
  ...n,
1016
988
  ref: t,
1017
989
  onPressedChange: (h) => {
@@ -1020,12 +992,12 @@ var We = x.forwardRef(
1020
992
  }
1021
993
  );
1022
994
  }
1023
- ), hr = Be, gr = xt;
1024
- const It = x.createContext({
995
+ ), ur = $e, mr = wt;
996
+ const Tt = x.createContext({
1025
997
  size: "medium",
1026
998
  focusMode: "system",
1027
999
  mode: "system"
1028
- }), pr = (e) => {
1000
+ }), hr = (e) => {
1029
1001
  let t = "";
1030
1002
  if (typeof e == "number" || typeof e == "string")
1031
1003
  t = "m-" + e;
@@ -1034,22 +1006,22 @@ const It = x.createContext({
1034
1006
  (e == null ? void 0 : e.t) !== void 0 && o.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && o.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && o.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && o.push(`ml-${e.l}`), t = o.join(" ");
1035
1007
  }
1036
1008
  return t;
1037
- }, fr = ({ focusMode: e }) => C("focus:outline", "focus:outline-2", "focus:outline-offset", {
1009
+ }, gr = ({ focusMode: e }) => w("focus:outline", "focus:outline-2", "focus:outline-offset", {
1038
1010
  "focus:outline-focus-light": e === "light",
1039
1011
  "focus:outline-focus-dark": e === "dark",
1040
1012
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
1041
1013
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
1042
- }), br = ({ mode: e }) => C({
1014
+ }), pr = ({ mode: e }) => w({
1043
1015
  "data-[state=on]:bg-surface-medium": e === "dark",
1044
1016
  "data-[state=on]:bg-surface-lightest": e === "light",
1045
1017
  "data-[state=on]:bg-surface-lightest dark:data-[state=on]:bg-surface-medium": e === "system",
1046
1018
  "data-[state=on]:bg-surface-medium dark:data-[state=on]:bg-surface-lightest": e === "alt-system"
1047
- }), vr = ({ size: e }) => C({
1019
+ }), fr = ({ size: e }) => w({
1048
1020
  "h-5 px-2": e === "small",
1049
1021
  "h-6 px-3": e === "medium",
1050
1022
  "h-7 px-4": e === "large"
1051
- }), yr = ({ mode: e }) => C(
1052
- Oo,
1023
+ }), br = ({ mode: e }) => w(
1024
+ Mo,
1053
1025
  "px-1",
1054
1026
  "relative",
1055
1027
  "border-r",
@@ -1062,27 +1034,27 @@ const It = x.createContext({
1062
1034
  "border-surface-light dark:border-surface-darker": e === "system",
1063
1035
  "border-surface-darker dark:border-surface-light": e === "alt-system"
1064
1036
  }
1065
- ), kr = ({
1037
+ ), vr = ({
1066
1038
  focusMode: e,
1067
1039
  mode: t,
1068
1040
  size: o
1069
1041
  }) => ({
1070
- wrapperClass: yr({ mode: t }),
1071
- itemClass: C(
1072
- Bo,
1042
+ wrapperClass: br({ mode: t }),
1043
+ itemClass: w(
1044
+ Lo,
1073
1045
  "flex items-center justify-center bg-transparent",
1074
1046
  "rounded-sm",
1075
1047
  "transition duration-200 ease",
1076
- vr({ size: o }),
1077
- fr({ focusMode: e }),
1078
- br({ mode: t })
1048
+ fr({ size: o }),
1049
+ gr({ focusMode: e }),
1050
+ pr({ mode: t })
1079
1051
  )
1080
- }), Cr = ({
1052
+ }), yr = ({
1081
1053
  mode: e,
1082
1054
  spacing: t
1083
- }) => C(
1084
- Lo,
1085
- pr(t),
1055
+ }) => w(
1056
+ Ao,
1057
+ hr(t),
1086
1058
  "inline-flex p-1",
1087
1059
  "rounded-sm",
1088
1060
  {
@@ -1091,7 +1063,7 @@ const It = x.createContext({
1091
1063
  "bg-surface-light text-copy-dark dark:bg-surface-darker dark:text-copy-lighter": e === "system",
1092
1064
  "bg-surface-darker text-copy-lighter dark:bg-surface-light dark:text-copy-dark": e === "alt-system"
1093
1065
  }
1094
- ), Tr = ({
1066
+ ), kr = ({
1095
1067
  children: e,
1096
1068
  value: t,
1097
1069
  onValueChange: o,
@@ -1099,32 +1071,32 @@ const It = x.createContext({
1099
1071
  mode: n = "system",
1100
1072
  focusMode: s = "system",
1101
1073
  size: i = "medium",
1102
- defaultValue: l,
1074
+ defaultValue: c,
1103
1075
  spacing: h,
1104
- ...u
1076
+ ...m
1105
1077
  }) => {
1106
- const m = Cr({ mode: n, spacing: h }), g = { size: i, focusMode: s, mode: n };
1107
- return /* @__PURE__ */ r(It.Provider, { value: g, children: /* @__PURE__ */ r(
1108
- hr,
1078
+ const l = yr({ mode: n, spacing: h }), g = { size: i, focusMode: s, mode: n };
1079
+ return /* @__PURE__ */ r(Tt.Provider, { value: g, children: /* @__PURE__ */ r(
1080
+ ur,
1109
1081
  {
1110
1082
  disabled: a,
1111
- className: m,
1083
+ className: l,
1112
1084
  value: t,
1113
- defaultValue: l,
1085
+ defaultValue: c,
1114
1086
  onValueChange: o,
1115
- ...u,
1087
+ ...m,
1116
1088
  type: "single",
1117
1089
  children: e
1118
1090
  }
1119
1091
  ) });
1120
- }, wr = ({ value: e, disabled: t }) => {
1121
- const { size: o, focusMode: a, mode: n } = $(It), { itemClass: s, wrapperClass: i } = kr({
1092
+ }, Cr = ({ value: e, disabled: t }) => {
1093
+ const { size: o, focusMode: a, mode: n } = z(Tt), { itemClass: s, wrapperClass: i } = vr({
1122
1094
  focusMode: a,
1123
1095
  mode: n,
1124
1096
  size: o
1125
1097
  });
1126
1098
  return /* @__PURE__ */ r("div", { className: i, children: /* @__PURE__ */ r(
1127
- gr,
1099
+ mr,
1128
1100
  {
1129
1101
  disabled: t,
1130
1102
  className: s,
@@ -1146,7 +1118,7 @@ try {
1146
1118
  });
1147
1119
  } catch {
1148
1120
  }
1149
- const Ye = "av-messagebox", Ze = "av-panel", qe = "av-button", Nr = (e) => {
1121
+ const Ue = "av-messagebox", je = "av-panel", Ke = "av-button", wr = (e) => {
1150
1122
  let t = "";
1151
1123
  if (typeof e == "number" || typeof e == "string")
1152
1124
  t = "m-" + e;
@@ -1155,29 +1127,29 @@ const Ye = "av-messagebox", Ze = "av-panel", qe = "av-button", Nr = (e) => {
1155
1127
  (e == null ? void 0 : e.t) !== void 0 && o.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && o.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && o.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && o.push(`ml-${e.l}`), t = o.join(" ");
1156
1128
  }
1157
1129
  return t;
1158
- }, Pe = "icon", Er = "button", xr = "link", Ir = ({
1130
+ }, Be = "icon", Tr = "button", Nr = "link", Er = ({
1159
1131
  type: e,
1160
1132
  size: t,
1161
1133
  labelRight: o,
1162
1134
  labelLeft: a,
1163
1135
  align: n
1164
1136
  }) => {
1165
- const s = "text-sm font-medium max-h-8 py-0", i = "text-base font-medium max-h-9 py-1", l = "text-lg font-medium max-h-12 py-2";
1137
+ const s = "text-sm font-medium max-h-8 py-0", i = "text-base font-medium max-h-9 py-1", c = "text-lg font-medium max-h-12 py-2";
1166
1138
  switch (e) {
1167
- case Er:
1168
- return C("px-4", {
1139
+ case Tr:
1140
+ return w("px-4", {
1169
1141
  [s]: t === "small",
1170
1142
  [i]: t === "medium",
1171
- [l]: t === "large"
1143
+ [c]: t === "large"
1172
1144
  });
1173
- case xr:
1174
- return C("px-4 text-center", {
1145
+ case Nr:
1146
+ return w("px-4 text-center", {
1175
1147
  [s]: t === "small",
1176
1148
  [i]: t === "medium",
1177
- [l]: t === "large"
1149
+ [c]: t === "large"
1178
1150
  });
1179
- case Pe:
1180
- return C("inline-flex items-center", {
1151
+ case Be:
1152
+ return w("inline-flex items-center", {
1181
1153
  "justify-center": n === "center",
1182
1154
  "justify-start": n === "left",
1183
1155
  "justify-end": n === "right",
@@ -1189,7 +1161,7 @@ const Ye = "av-messagebox", Ze = "av-panel", qe = "av-button", Nr = (e) => {
1189
1161
  "h-12 px-4 text-lg font-medium": t === "large" && (o || a)
1190
1162
  });
1191
1163
  }
1192
- }, Sr = ({
1164
+ }, xr = ({
1193
1165
  mode: e,
1194
1166
  noBackground: t,
1195
1167
  noTruncate: o,
@@ -1198,7 +1170,7 @@ const Ye = "av-messagebox", Ze = "av-panel", qe = "av-button", Nr = (e) => {
1198
1170
  if (t)
1199
1171
  return "not-prose rounded-full";
1200
1172
  if (a === "primary")
1201
- return C("not-prose rounded-full", {
1173
+ return w("not-prose rounded-full", {
1202
1174
  truncate: !o,
1203
1175
  "bg-action-dark text-copy-light": e === "dark",
1204
1176
  "bg-action-light text-copy-lighter": e === "light",
@@ -1206,7 +1178,7 @@ const Ye = "av-messagebox", Ze = "av-panel", qe = "av-button", Nr = (e) => {
1206
1178
  "bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "alt-system"
1207
1179
  });
1208
1180
  if (a === "secondary")
1209
- return C("not-prose rounded-full", {
1181
+ return w("not-prose rounded-full", {
1210
1182
  truncate: !o,
1211
1183
  "bg-action-dark text-copy-light": e === "light",
1212
1184
  "bg-action-light text-copy-lighter": e === "dark",
@@ -1214,14 +1186,14 @@ const Ye = "av-messagebox", Ze = "av-panel", qe = "av-button", Nr = (e) => {
1214
1186
  "bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "system"
1215
1187
  });
1216
1188
  if (a === "danger")
1217
- return C("not-prose rounded-full", {
1189
+ return w("not-prose rounded-full", {
1218
1190
  truncate: !o,
1219
1191
  "bg-action-danger-dark text-copy-light": e === "dark",
1220
1192
  "bg-action-danger-light text-copy-lighter": e === "light",
1221
1193
  "bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
1222
1194
  "bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
1223
1195
  });
1224
- }, _r = ({
1196
+ }, Ir = ({
1225
1197
  mode: e,
1226
1198
  disabled: t,
1227
1199
  variant: o
@@ -1229,27 +1201,27 @@ const Ye = "av-messagebox", Ze = "av-panel", qe = "av-button", Nr = (e) => {
1229
1201
  if (t)
1230
1202
  return "";
1231
1203
  if (o === "primary")
1232
- return C("hover:text-copy-light-hover", {
1204
+ return w("hover:text-copy-light-hover", {
1233
1205
  "hover:bg-action-dark-hover": e === "dark",
1234
1206
  "hover:bg-action-light-hover": e === "light",
1235
1207
  "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
1236
1208
  "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
1237
1209
  });
1238
1210
  if (o === "secondary")
1239
- return C("hover:text-copy-light-hover", {
1211
+ return w("hover:text-copy-light-hover", {
1240
1212
  "hover:bg-action-dark-hover": e === "light",
1241
1213
  "hover:bg-action-light-hover": e === "dark",
1242
1214
  "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
1243
1215
  "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
1244
1216
  });
1245
1217
  if (o === "danger")
1246
- return C("hover:text-copy-light-hover", {
1218
+ return w("hover:text-copy-light-hover", {
1247
1219
  "hover:bg-action-danger-dark-hover": e === "dark",
1248
1220
  "hover:bg-action-danger-light-hover": e === "light",
1249
1221
  "hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
1250
1222
  "hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
1251
1223
  });
1252
- }, Ar = ({
1224
+ }, Sr = ({
1253
1225
  mode: e,
1254
1226
  disabled: t,
1255
1227
  variant: o
@@ -1257,27 +1229,27 @@ const Ye = "av-messagebox", Ze = "av-panel", qe = "av-button", Nr = (e) => {
1257
1229
  if (t)
1258
1230
  return "";
1259
1231
  if (o === "primary")
1260
- return C("active:text-copy-light-active", {
1232
+ return w("active:text-copy-light-active", {
1261
1233
  "active:bg-action-dark-active": e === "dark",
1262
1234
  "active:bg-action-light-active": e === "light",
1263
1235
  "active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
1264
1236
  "active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
1265
1237
  });
1266
1238
  if (o === "secondary")
1267
- return C("active:text-copy-light-active", {
1239
+ return w("active:text-copy-light-active", {
1268
1240
  "active:bg-action-dark-active": e === "light",
1269
1241
  "active:bg-action-light-active": e === "dark",
1270
1242
  "active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
1271
1243
  "active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
1272
1244
  });
1273
1245
  if (o === "danger")
1274
- return C("active:text-copy-lighter-active", {
1246
+ return w("active:text-copy-lighter-active", {
1275
1247
  "active:bg-action-danger-dark-active": e === "dark",
1276
1248
  "active:bg-action-danger-light-active": e === "light",
1277
1249
  "active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
1278
1250
  "active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
1279
1251
  });
1280
- }, Rr = ({
1252
+ }, _r = ({
1281
1253
  mode: e,
1282
1254
  noBorder: t,
1283
1255
  variant: o
@@ -1285,32 +1257,32 @@ const Ye = "av-messagebox", Ze = "av-panel", qe = "av-button", Nr = (e) => {
1285
1257
  if (t)
1286
1258
  return "border border-transparent";
1287
1259
  if (o === "primary")
1288
- return C("border", {
1260
+ return w("border", {
1289
1261
  "border-border-dark": e === "dark",
1290
1262
  "border-border-accent": e === "light",
1291
1263
  "border-border-dark dark:border-border-accent": e === "system",
1292
1264
  "border-border-accent dark:border-border-dark": e === "alt-system"
1293
1265
  });
1294
1266
  if (o === "secondary")
1295
- return C("border", {
1267
+ return w("border", {
1296
1268
  "border-border-dark": e === "light",
1297
1269
  "border-border-accent": e === "dark",
1298
1270
  "border-border-dark dark:border-border-accent": e === "alt-system",
1299
1271
  "border-border-accent dark:border-border-dark": e === "system"
1300
1272
  });
1301
1273
  if (o === "danger")
1302
- return C("border", {
1274
+ return w("border", {
1303
1275
  "border-border-danger-dark": e === "dark",
1304
1276
  "border-border-danger-medium": e === "light",
1305
1277
  "border-border-danger-dark dark:border-border-danger-medium": e === "system",
1306
1278
  "border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
1307
1279
  });
1308
- }, Mr = ({ focusMode: e }) => C("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
1280
+ }, Rr = ({ focusMode: e }) => w("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
1309
1281
  "focus:outline-focus-dark": e === "dark",
1310
1282
  "focus:outline-focus-light": e === "light",
1311
1283
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
1312
1284
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
1313
- }), St = ({
1285
+ }), Nt = ({
1314
1286
  type: e,
1315
1287
  className: t,
1316
1288
  raw: o,
@@ -1318,47 +1290,47 @@ const Ye = "av-messagebox", Ze = "av-panel", qe = "av-button", Nr = (e) => {
1318
1290
  focusMode: n,
1319
1291
  disabled: s,
1320
1292
  fullWidth: i,
1321
- size: l,
1293
+ size: c,
1322
1294
  noBorder: h,
1323
- labelRight: u,
1324
- labelLeft: m,
1295
+ labelRight: m,
1296
+ labelLeft: l,
1325
1297
  spacing: g,
1326
1298
  noBackground: b,
1327
- variant: d,
1328
- noTruncate: c,
1299
+ variant: u,
1300
+ noTruncate: d,
1329
1301
  align: y
1330
- }) => (d || (d = "primary"), o ? C(qe, t) : C(
1331
- qe,
1302
+ }) => (u || (u = "primary"), o ? w(Ke, t) : w(
1303
+ Ke,
1332
1304
  t,
1333
- Nr(g),
1334
- Sr({ mode: a, variant: d, noBackground: b, noTruncate: c }),
1335
- Ir({ type: e, size: l, labelRight: u, labelLeft: m, align: y }),
1336
- Rr({ mode: a, variant: d, noBorder: h }),
1337
- Mr({ focusMode: n }),
1338
- _r({ mode: a, variant: d, disabled: s }),
1339
- Ar({ mode: a, variant: d, disabled: s }),
1305
+ wr(g),
1306
+ xr({ mode: a, variant: u, noBackground: b, noTruncate: d }),
1307
+ Er({ type: e, size: c, labelRight: m, labelLeft: l, align: y }),
1308
+ _r({ mode: a, variant: u, noBorder: h }),
1309
+ Rr({ focusMode: n }),
1310
+ Ir({ mode: a, variant: u, disabled: s }),
1311
+ Sr({ mode: a, variant: u, disabled: s }),
1340
1312
  {
1341
1313
  "w-full": i,
1342
1314
  "disabled:cursor-not-allowed disabled:opacity-50": s
1343
1315
  }
1344
- )), Lr = (e, t, o) => {
1316
+ )), Ar = (e, t, o) => {
1345
1317
  var a;
1346
1318
  !t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof o == "function" && o(e);
1347
- }, ze = x.forwardRef((e, t) => {
1319
+ }, Pe = x.forwardRef((e, t) => {
1348
1320
  const { onClick: o, noInternalClick: a = !1, ...n } = e;
1349
1321
  return /* @__PURE__ */ r(
1350
1322
  "button",
1351
1323
  {
1352
1324
  ref: t,
1353
1325
  onClick: (s) => {
1354
- Lr(s, a, o);
1326
+ Ar(s, a, o);
1355
1327
  },
1356
1328
  ...n
1357
1329
  }
1358
1330
  );
1359
1331
  });
1360
- ze.displayName = "BaseButton";
1361
- const _t = x.forwardRef(
1332
+ Pe.displayName = "BaseButton";
1333
+ const Et = x.forwardRef(
1362
1334
  ({
1363
1335
  children: e,
1364
1336
  disabled: t = !1,
@@ -1367,50 +1339,50 @@ const _t = x.forwardRef(
1367
1339
  fullWidth: n = !1,
1368
1340
  className: s,
1369
1341
  type: i = "button",
1370
- raw: l = !1,
1342
+ raw: c = !1,
1371
1343
  noBorder: h = !1,
1372
- "aria-label": u,
1373
- label: m,
1344
+ "aria-label": m,
1345
+ label: l,
1374
1346
  size: g = "medium",
1375
1347
  labelRight: b,
1376
- labelLeft: d,
1377
- spacing: c,
1348
+ labelLeft: u,
1349
+ spacing: d,
1378
1350
  noBackground: y = !1,
1379
- align: T = "center",
1351
+ align: C = "center",
1380
1352
  ...p
1381
1353
  }, k) => {
1382
- const N = St({
1383
- type: Pe,
1354
+ const T = Nt({
1355
+ type: Be,
1384
1356
  mode: o,
1385
1357
  focusMode: a,
1386
1358
  fullWidth: n,
1387
1359
  disabled: t,
1388
- raw: l,
1360
+ raw: c,
1389
1361
  className: s,
1390
1362
  noBorder: h,
1391
1363
  size: g,
1392
1364
  labelRight: b,
1393
- labelLeft: d,
1394
- spacing: c,
1365
+ labelLeft: u,
1366
+ spacing: d,
1395
1367
  noBackground: y,
1396
- align: T
1397
- }), I = C({
1398
- "text-copy-accent-dark": o === "light" && !l,
1399
- "text-copy-light": o === "dark" && !l,
1400
- "text-copy-accent-dark dark:text-copy-light": o === "alt-system" && !l,
1401
- "text-copy-light dark:text-copy-accent-dark": o === "system" && !l
1368
+ align: C
1369
+ }), I = w({
1370
+ "text-copy-accent-dark": o === "light" && !c,
1371
+ "text-copy-light": o === "dark" && !c,
1372
+ "text-copy-accent-dark dark:text-copy-light": o === "alt-system" && !c,
1373
+ "text-copy-light dark:text-copy-accent-dark": o === "system" && !c
1402
1374
  });
1403
1375
  return /* @__PURE__ */ v(
1404
- ze,
1376
+ Pe,
1405
1377
  {
1406
1378
  ref: k,
1407
- className: N,
1379
+ className: T,
1408
1380
  disabled: t,
1409
1381
  type: i,
1410
- "aria-label": u || m,
1382
+ "aria-label": m || l,
1411
1383
  ...p,
1412
1384
  children: [
1413
- d && /* @__PURE__ */ r("span", { className: "pr-2", children: d }),
1385
+ u && /* @__PURE__ */ r("span", { className: "pr-2", children: u }),
1414
1386
  /* @__PURE__ */ r("div", { className: I, children: e }),
1415
1387
  b && /* @__PURE__ */ r("span", { className: "pl-2", children: b })
1416
1388
  ]
@@ -1418,7 +1390,7 @@ const _t = x.forwardRef(
1418
1390
  );
1419
1391
  }
1420
1392
  );
1421
- _t.displayName = "ButtonIcon";
1393
+ Et.displayName = "ButtonIcon";
1422
1394
  /*!
1423
1395
  @versini/ui-button v1.1.11
1424
1396
  © 2024 gizmette.com
@@ -1432,7 +1404,7 @@ try {
1432
1404
  });
1433
1405
  } catch {
1434
1406
  }
1435
- const Or = x.forwardRef(
1407
+ const Mr = x.forwardRef(
1436
1408
  ({
1437
1409
  children: e,
1438
1410
  disabled: t = !1,
@@ -1441,40 +1413,40 @@ const Or = x.forwardRef(
1441
1413
  fullWidth: n = !1,
1442
1414
  className: s,
1443
1415
  type: i = "button",
1444
- raw: l = !1,
1416
+ raw: c = !1,
1445
1417
  noBorder: h = !1,
1446
- "aria-label": u,
1447
- label: m,
1418
+ "aria-label": m,
1419
+ label: l,
1448
1420
  size: g = "medium",
1449
1421
  labelRight: b,
1450
- labelLeft: d,
1451
- spacing: c,
1422
+ labelLeft: u,
1423
+ spacing: d,
1452
1424
  noBackground: y = !1,
1453
- align: T = "center",
1425
+ align: C = "center",
1454
1426
  active: p = !1,
1455
1427
  ...k
1456
- }, N) => {
1457
- const I = St({
1458
- type: Pe,
1428
+ }, T) => {
1429
+ const I = Nt({
1430
+ type: Be,
1459
1431
  mode: o,
1460
1432
  focusMode: a,
1461
1433
  fullWidth: n,
1462
1434
  disabled: t,
1463
- raw: l,
1435
+ raw: c,
1464
1436
  className: s,
1465
1437
  noBorder: h,
1466
1438
  size: g,
1467
1439
  labelRight: b,
1468
- labelLeft: d,
1469
- spacing: c,
1440
+ labelLeft: u,
1441
+ spacing: d,
1470
1442
  noBackground: y,
1471
- align: T
1472
- }), M = C({
1473
- "text-copy-accent-dark": o === "light" && !l,
1474
- "text-copy-light": o === "dark" && !l,
1475
- "text-copy-accent-dark dark:text-copy-light": o === "alt-system" && !l,
1476
- "text-copy-light dark:text-copy-accent-dark": o === "system" && !l
1477
- }), _ = p ? C(
1443
+ align: C
1444
+ }), M = w({
1445
+ "text-copy-accent-dark": o === "light" && !c,
1446
+ "text-copy-light": o === "dark" && !c,
1447
+ "text-copy-accent-dark dark:text-copy-light": o === "alt-system" && !c,
1448
+ "text-copy-light dark:text-copy-accent-dark": o === "system" && !c
1449
+ }), _ = p ? w(
1478
1450
  "relative",
1479
1451
  "focus-within:static",
1480
1452
  "focus-within:after:border-transparent",
@@ -1492,16 +1464,16 @@ const Or = x.forwardRef(
1492
1464
  }
1493
1465
  ) : "";
1494
1466
  return /* @__PURE__ */ r("div", { className: _, children: /* @__PURE__ */ v(
1495
- ze,
1467
+ Pe,
1496
1468
  {
1497
- ref: N,
1469
+ ref: T,
1498
1470
  className: I,
1499
1471
  disabled: t,
1500
1472
  type: i,
1501
- "aria-label": u || m,
1473
+ "aria-label": m || l,
1502
1474
  ...k,
1503
1475
  children: [
1504
- d && /* @__PURE__ */ r("span", { className: "pr-2", children: d }),
1476
+ u && /* @__PURE__ */ r("span", { className: "pr-2", children: u }),
1505
1477
  /* @__PURE__ */ r("div", { className: M, children: e }),
1506
1478
  b && /* @__PURE__ */ r("span", { className: "pl-2", children: b })
1507
1479
  ]
@@ -1509,8 +1481,8 @@ const Or = x.forwardRef(
1509
1481
  ) });
1510
1482
  }
1511
1483
  );
1512
- Or.displayName = "ButtonSort";
1513
- const Br = (e) => {
1484
+ Mr.displayName = "ButtonSort";
1485
+ const Lr = (e) => {
1514
1486
  let t = "";
1515
1487
  if (typeof e == "number" || typeof e == "string")
1516
1488
  t = "m-" + e;
@@ -1519,7 +1491,7 @@ const Br = (e) => {
1519
1491
  (e == null ? void 0 : e.t) !== void 0 && o.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && o.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && o.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && o.push(`ml-${e.l}`), t = o.join(" ");
1520
1492
  }
1521
1493
  return t;
1522
- }, Pr = ({
1494
+ }, $r = ({
1523
1495
  children: e,
1524
1496
  fill: t,
1525
1497
  viewBox: o,
@@ -1527,15 +1499,15 @@ const Br = (e) => {
1527
1499
  defaultViewBox: n,
1528
1500
  defaultClassName: s,
1529
1501
  spacing: i,
1530
- title: l,
1502
+ title: c,
1531
1503
  semantic: h = !1,
1532
- ...u
1504
+ ...m
1533
1505
  }) => {
1534
- const m = Br(i), g = C(
1535
- m,
1506
+ const l = Lr(i), g = w(
1507
+ l,
1536
1508
  a || s
1537
1509
  );
1538
- return /* @__PURE__ */ v(R, { children: [
1510
+ return /* @__PURE__ */ v(A, { children: [
1539
1511
  /* @__PURE__ */ r(
1540
1512
  "svg",
1541
1513
  {
@@ -1546,11 +1518,11 @@ const Br = (e) => {
1546
1518
  role: "img",
1547
1519
  "aria-hidden": !h,
1548
1520
  focusable: !1,
1549
- ...u,
1521
+ ...m,
1550
1522
  children: e
1551
1523
  }
1552
1524
  ),
1553
- l && h && /* @__PURE__ */ r("span", { className: "sr-only", children: l })
1525
+ c && h && /* @__PURE__ */ r("span", { className: "sr-only", children: c })
1554
1526
  ] });
1555
1527
  };
1556
1528
  /*!
@@ -1566,7 +1538,7 @@ try {
1566
1538
  });
1567
1539
  } catch {
1568
1540
  }
1569
- const zr = ({
1541
+ const Br = ({
1570
1542
  className: e,
1571
1543
  viewBox: t,
1572
1544
  spacing: o,
@@ -1574,7 +1546,7 @@ const zr = ({
1574
1546
  monotone: n,
1575
1547
  ...s
1576
1548
  }) => /* @__PURE__ */ r(
1577
- Pr,
1549
+ $r,
1578
1550
  {
1579
1551
  defaultViewBox: "0 0 384 512",
1580
1552
  defaultClassName: "size-5",
@@ -1599,184 +1571,184 @@ try {
1599
1571
  });
1600
1572
  } catch {
1601
1573
  }
1602
- const se = "panel", ge = "messagebox", Vr = ({
1574
+ const re = "panel", pe = "messagebox", Pr = ({
1603
1575
  className: e,
1604
1576
  kind: t,
1605
1577
  borderMode: o
1606
1578
  }) => ({
1607
- main: C("prose prose-lighter flex flex-col bg-surface-medium", {
1608
- [`${Ze} max-h-full sm:max-h-[95%] min-h-full sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: t === se,
1609
- [`${Ze} w-full sm:w-[95%] md:max-w-2xl`]: t === se && !e,
1610
- [`${Ye} rounded-lg border-2`]: t === ge,
1611
- [`${Ye} w-[95%] sm:w-[50%] md:max-w-2xl`]: t === ge && !e,
1579
+ main: w("prose prose-lighter flex flex-col bg-surface-medium", {
1580
+ [`${je} max-h-full sm:max-h-[95%] min-h-full sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: t === re,
1581
+ [`${je} w-full sm:w-[95%] md:max-w-2xl`]: t === re && !e,
1582
+ [`${Ue} rounded-lg border-2`]: t === pe,
1583
+ [`${Ue} w-[95%] sm:w-[50%] md:max-w-2xl`]: t === pe && !e,
1612
1584
  [`${e}`]: !!e,
1613
- "sm:border-border-dark": o === "dark" && t === se,
1614
- "sm:border-border-accent": o === "light" && t === se,
1615
- "border-border-dark": o === "dark" && t === ge,
1616
- "border-border-accent": o === "light" && t === ge
1585
+ "sm:border-border-dark": o === "dark" && t === re,
1586
+ "sm:border-border-accent": o === "light" && t === re,
1587
+ "border-border-dark": o === "dark" && t === pe,
1588
+ "border-border-accent": o === "light" && t === pe
1617
1589
  }),
1618
1590
  content: "flex flex-col py-2 sm:py-4 sm:px-4 px-2 overflow-y-auto",
1619
1591
  footer: "flex flex-grow flex-col sm:p-4 p-2",
1620
1592
  header: "sm:p-4 mb-0 p-2",
1621
1593
  close: "sm:p-4 p-2"
1622
- }), he = (e) => ao(
1594
+ }), ge = (e) => oo(
1623
1595
  () => import("./index.AUArUGH7.FZU7Bha5.js").then((t) => ({
1624
1596
  default: t[e]
1625
1597
  }))
1626
- ), $r = he("Modal"), Dr = he("ModalClose"), Hr = he("ModalContent"), Fr = he("ModalDescription"), Gr = he("ModalHeading"), X = ({
1598
+ ), zr = ge("Modal"), Or = ge("ModalClose"), Vr = ge("ModalContent"), Dr = ge("ModalDescription"), Fr = ge("ModalHeading"), Z = ({
1627
1599
  open: e,
1628
1600
  onOpenChange: t,
1629
1601
  title: o,
1630
1602
  children: a,
1631
1603
  footer: n,
1632
1604
  borderMode: s = "light",
1633
- kind: i = se,
1634
- className: l
1605
+ kind: i = re,
1606
+ className: c
1635
1607
  }) => {
1636
- const h = ce(""), u = Vr({ className: l, kind: i, borderMode: s });
1608
+ const h = le(""), m = Pr({ className: c, kind: i, borderMode: s });
1637
1609
  return U(() => (e && (h.current = document.title, document.title = `${o} | ${h.current}`), () => {
1638
1610
  e && (document.title = h.current);
1639
- }), [o, e]), /* @__PURE__ */ r(ro, { fallback: /* @__PURE__ */ r("div", {}), children: e && /* @__PURE__ */ r($r, { open: e, onOpenChange: t, children: /* @__PURE__ */ v(Hr, { className: u.main, children: [
1611
+ }), [o, e]), /* @__PURE__ */ r(to, { fallback: /* @__PURE__ */ r("div", {}), children: e && /* @__PURE__ */ r(zr, { open: e, onOpenChange: t, children: /* @__PURE__ */ v(Vr, { className: m.main, children: [
1640
1612
  /* @__PURE__ */ v("div", { className: "flex flex-row-reverse items-center justify-between", children: [
1641
1613
  /* @__PURE__ */ r(
1642
- Dr,
1614
+ Or,
1643
1615
  {
1644
- className: u.close,
1616
+ className: m.close,
1645
1617
  trigger: /* @__PURE__ */ r(
1646
- _t,
1618
+ Et,
1647
1619
  {
1648
1620
  mode: "dark",
1649
1621
  focusMode: "light",
1650
1622
  noBorder: !0,
1651
1623
  label: "Close",
1652
- children: /* @__PURE__ */ r(zr, {})
1624
+ children: /* @__PURE__ */ r(Br, {})
1653
1625
  }
1654
1626
  )
1655
1627
  }
1656
1628
  ),
1657
- /* @__PURE__ */ r(Gr, { className: u.header, children: o })
1629
+ /* @__PURE__ */ r(Fr, { className: m.header, children: o })
1658
1630
  ] }),
1659
- /* @__PURE__ */ r(Fr, { className: u.content, children: a }),
1660
- n && /* @__PURE__ */ r("div", { className: u.footer, children: n })
1631
+ /* @__PURE__ */ r(Dr, { className: m.content, children: a }),
1632
+ n && /* @__PURE__ */ r("div", { className: m.footer, children: n })
1661
1633
  ] }) }) });
1662
- }, Ur = ({ stats: e }) => {
1663
- const t = (e == null ? void 0 : e.plugins) || [], o = (e == null ? void 0 : e.version) || "", a = (e == null ? void 0 : e.models) || [], n = de(), s = de();
1664
- return /* @__PURE__ */ v(R, { children: [
1634
+ }, Hr = ({ stats: e }) => {
1635
+ const t = (e == null ? void 0 : e.plugins) || [], o = (e == null ? void 0 : e.version) || "", a = (e == null ? void 0 : e.models) || [], n = ce(), s = ce();
1636
+ return /* @__PURE__ */ v(A, { children: [
1665
1637
  /* @__PURE__ */ r("div", { className: "mb-4", children: /* @__PURE__ */ r(
1666
1638
  P,
1667
1639
  {
1668
- header: w.ABOUT.TITLE_CLIENT,
1640
+ header: N.ABOUT.TITLE_CLIENT,
1669
1641
  className: "prose-dark dark:prose-lighter",
1670
- children: le(n, {
1671
- [w.ABOUT.VERSION]: "5.5.0",
1672
- [w.ABOUT.BUILD_TIMESTAMP]: "11/24/2024 02:23 PM EST"
1642
+ children: se(n, {
1643
+ [N.ABOUT.VERSION]: "5.5.2",
1644
+ [N.ABOUT.BUILD_TIMESTAMP]: "11/28/2024 05:10 PM EST"
1673
1645
  })
1674
1646
  }
1675
1647
  ) }),
1676
1648
  /* @__PURE__ */ r(
1677
1649
  P,
1678
1650
  {
1679
- header: w.ABOUT.TITLE_SERVER,
1651
+ header: N.ABOUT.TITLE_SERVER,
1680
1652
  className: "prose-dark dark:prose-lighter",
1681
- children: le(s, {
1682
- [w.ABOUT.VERSION]: o,
1683
- [fe(w.ABOUT.ENGINE, a.length)]: /* @__PURE__ */ r(R, { children: a.map((i) => /* @__PURE__ */ r("div", { className: "text-right", children: i }, i)) }),
1684
- [fe(w.ABOUT.PLUGIN, t.length)]: /* @__PURE__ */ r(R, { children: t.map((i) => /* @__PURE__ */ r("div", { className: "text-right", children: i }, i)) })
1653
+ children: se(s, {
1654
+ [N.ABOUT.VERSION]: o,
1655
+ [be(N.ABOUT.ENGINE, a.length)]: /* @__PURE__ */ r(A, { children: a.map((i) => /* @__PURE__ */ r("div", { className: "text-right", children: i }, i)) }),
1656
+ [be(N.ABOUT.PLUGIN, t.length)]: /* @__PURE__ */ r(A, { children: t.map((i) => /* @__PURE__ */ r("div", { className: "text-right", children: i }, i)) })
1685
1657
  })
1686
1658
  }
1687
1659
  )
1688
1660
  ] });
1689
- }, jr = ({
1661
+ }, Gr = ({
1690
1662
  open: e,
1691
1663
  onOpenChange: t
1692
1664
  }) => {
1693
- const { serverStats: o } = $(me);
1694
- return /* @__PURE__ */ r(X, { open: e, onOpenChange: t, title: Ot, children: /* @__PURE__ */ r(Ur, { stats: o }) });
1695
- }, Kr = (e) => Qe(e), Wr = (e) => {
1665
+ const { serverStats: o } = z(ue);
1666
+ return /* @__PURE__ */ r(Z, { open: e, onOpenChange: t, title: Rt, children: /* @__PURE__ */ r(Hr, { stats: o }) });
1667
+ }, Ur = (e) => qe(e), jr = (e) => {
1696
1668
  if (!e || e.length === 0)
1697
- return Pt;
1669
+ return Mt;
1698
1670
  const t = e.filter(
1699
1671
  (o) => {
1700
1672
  var a, n;
1701
- return ((a = o == null ? void 0 : o.message) == null ? void 0 : a.role) === zt && typeof ((n = o == null ? void 0 : o.message) == null ? void 0 : n.processingTime) == "number";
1673
+ return ((a = o == null ? void 0 : o.message) == null ? void 0 : a.role) === Lt && typeof ((n = o == null ? void 0 : o.message) == null ? void 0 : n.processingTime) == "number";
1702
1674
  }
1703
1675
  ).map((o) => o.message.processingTime);
1704
- return Vt({
1676
+ return $t({
1705
1677
  data: t,
1706
- formatter: Kr
1678
+ formatter: Ur
1707
1679
  });
1708
- }, Yr = ({
1680
+ }, Kr = ({
1709
1681
  isAuthenticated: e,
1710
1682
  stats: t
1711
1683
  }) => {
1712
- const { state: o } = $(me), a = $t - Number(o == null ? void 0 : o.usage), n = de(), s = de();
1713
- return e ? /* @__PURE__ */ v(R, { children: [
1684
+ const { state: o } = z(ue), a = Bt - Number(o == null ? void 0 : o.usage), n = ce(), s = ce();
1685
+ return e ? /* @__PURE__ */ v(A, { children: [
1714
1686
  o && o.messages.length > 0 && /* @__PURE__ */ r("div", { className: "mb-4", children: /* @__PURE__ */ r(
1715
1687
  P,
1716
1688
  {
1717
- header: w.CURRENT_STATISTICS.TITLE,
1689
+ header: N.CURRENT_STATISTICS.TITLE,
1718
1690
  className: "prose-dark dark:prose-lighter",
1719
- children: le(n, {
1720
- [w.CURRENT_STATISTICS.MODEL_NAME]: (o == null ? void 0 : o.model) || ie,
1721
- [w.CURRENT_STATISTICS.TOKENS_USED]: o == null ? void 0 : o.usage,
1722
- [w.CURRENT_STATISTICS.REMAINING_TOKENS]: Bt.format(a),
1723
- [w.CURRENT_STATISTICS.PROCESSING_TIME]: Wr(o == null ? void 0 : o.messages)
1691
+ children: se(n, {
1692
+ [N.CURRENT_STATISTICS.MODEL_NAME]: (o == null ? void 0 : o.model) || ae,
1693
+ [N.CURRENT_STATISTICS.TOKENS_USED]: o == null ? void 0 : o.usage,
1694
+ [N.CURRENT_STATISTICS.REMAINING_TOKENS]: At.format(a),
1695
+ [N.CURRENT_STATISTICS.PROCESSING_TIME]: jr(o == null ? void 0 : o.messages)
1724
1696
  })
1725
1697
  }
1726
1698
  ) }),
1727
1699
  /* @__PURE__ */ r(
1728
1700
  P,
1729
1701
  {
1730
- header: w.MAIN_STATISTICS.TITLE,
1702
+ header: N.MAIN_STATISTICS.TITLE,
1731
1703
  className: "prose-dark dark:prose-lighter",
1732
- children: le(s, {
1733
- [fe(w.MAIN_STATISTICS.TOTAL, t.totalChats)]: t.totalChats,
1734
- [w.MAIN_STATISTICS.PROCESSING_TIME]: Qe(
1704
+ children: se(s, {
1705
+ [be(N.MAIN_STATISTICS.TOTAL, t.totalChats)]: t.totalChats,
1706
+ [N.MAIN_STATISTICS.PROCESSING_TIME]: qe(
1735
1707
  t.averageProcessingTimes
1736
1708
  )
1737
1709
  })
1738
1710
  }
1739
1711
  )
1740
1712
  ] }) : null;
1741
- }, Zr = ({
1713
+ }, Wr = ({
1742
1714
  open: e,
1743
1715
  onOpenChange: t
1744
1716
  }) => {
1745
1717
  const [o, a] = S({
1746
1718
  averageProcessingTimes: 0,
1747
1719
  totalChats: 0
1748
- }), { isAuthenticated: n, getAccessToken: s, user: i } = te();
1720
+ }), { isAuthenticated: n, getAccessToken: s, user: i } = X();
1749
1721
  return U(() => {
1750
1722
  !e || !i || (async () => {
1751
1723
  try {
1752
- const l = await H({
1724
+ const c = await F({
1753
1725
  accessToken: await s(),
1754
- type: F.GET_CHATS_STATS,
1726
+ type: H.GET_CHATS_STATS,
1755
1727
  params: {
1756
1728
  userId: i.username
1757
1729
  }
1758
1730
  });
1759
- l.status === 200 && a(l.data);
1731
+ c.status === 200 && a(c.data);
1760
1732
  } catch {
1761
1733
  }
1762
1734
  })();
1763
- }, [e, s, i]), /* @__PURE__ */ r(X, { open: e, onOpenChange: t, title: et, children: /* @__PURE__ */ r(Yr, { isAuthenticated: n, stats: o }) });
1764
- }, At = ({
1735
+ }, [e, s, i]), /* @__PURE__ */ r(Z, { open: e, onOpenChange: t, title: Xe, children: /* @__PURE__ */ r(Kr, { isAuthenticated: n, stats: o }) });
1736
+ }, xt = ({
1765
1737
  showConfirmation: e,
1766
1738
  setShowConfirmation: t,
1767
1739
  action: o,
1768
1740
  children: a,
1769
1741
  customStrings: n
1770
1742
  }) => /* @__PURE__ */ r(
1771
- X,
1743
+ Z,
1772
1744
  {
1773
1745
  kind: "messagebox",
1774
1746
  open: e,
1775
1747
  onOpenChange: t,
1776
1748
  title: n.title,
1777
- footer: /* @__PURE__ */ v(Me, { columnGap: 2, alignHorizontal: "flex-end", children: [
1778
- /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r(
1779
- Q,
1749
+ footer: /* @__PURE__ */ v(ie, { columnGap: 2, alignHorizontal: "flex-end", children: [
1750
+ /* @__PURE__ */ r(B, { children: /* @__PURE__ */ r(
1751
+ G,
1780
1752
  {
1781
1753
  mode: "dark",
1782
1754
  variant: "secondary",
@@ -1787,8 +1759,8 @@ const se = "panel", ge = "messagebox", Vr = ({
1787
1759
  children: n.cancelAction
1788
1760
  }
1789
1761
  ) }),
1790
- /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r(
1791
- Q,
1762
+ /* @__PURE__ */ r(B, { children: /* @__PURE__ */ r(
1763
+ G,
1792
1764
  {
1793
1765
  mode: "dark",
1794
1766
  variant: "danger",
@@ -1803,32 +1775,32 @@ const se = "panel", ge = "messagebox", Vr = ({
1803
1775
  children: a
1804
1776
  }
1805
1777
  );
1806
- var qr = typeof window < "u", Xr = function(e, t) {
1807
- return qr ? window.matchMedia(e).matches : (process.env.NODE_ENV !== "production" && console.warn("`useMedia` When server side rendering, defaultState should be defined to prevent a hydration mismatches."), !1);
1808
- }, Jr = function(e, t) {
1809
- var o = S(Xr(e)), a = o[0], n = o[1];
1778
+ var Yr = typeof window < "u", qr = function(e, t) {
1779
+ return Yr ? window.matchMedia(e).matches : (process.env.NODE_ENV !== "production" && console.warn("`useMedia` When server side rendering, defaultState should be defined to prevent a hydration mismatches."), !1);
1780
+ }, Xr = function(e, t) {
1781
+ var o = S(qr(e)), a = o[0], n = o[1];
1810
1782
  return U(function() {
1811
- var s = !0, i = window.matchMedia(e), l = function() {
1783
+ var s = !0, i = window.matchMedia(e), c = function() {
1812
1784
  s && n(!!i.matches);
1813
1785
  };
1814
- return i.addEventListener("change", l), n(i.matches), function() {
1815
- s = !1, i.removeEventListener("change", l);
1786
+ return i.addEventListener("change", c), n(i.matches), function() {
1787
+ s = !1, i.removeEventListener("change", c);
1816
1788
  };
1817
1789
  }, [e]), a;
1818
1790
  };
1819
- const Qr = async (e, t, o, a) => {
1791
+ const Zr = async (e, t, o, a) => {
1820
1792
  try {
1821
- const n = await H({
1793
+ const n = await F({
1822
1794
  accessToken: a,
1823
- type: F.GET_CHAT,
1795
+ type: H.GET_CHAT,
1824
1796
  params: {
1825
1797
  id: e.id
1826
1798
  }
1827
1799
  });
1828
1800
  n.status === 200 && (t({
1829
- type: ot
1801
+ type: Je
1830
1802
  }), t({
1831
- type: Ht,
1803
+ type: zt,
1832
1804
  payload: {
1833
1805
  id: e.id,
1834
1806
  model: n.data.model,
@@ -1838,80 +1810,80 @@ const Qr = async (e, t, o, a) => {
1838
1810
  }), o(!1));
1839
1811
  } catch {
1840
1812
  }
1841
- }, Xe = (e) => {
1813
+ }, We = (e) => {
1842
1814
  const t = e[0];
1843
- return Ft(t == null ? void 0 : t.content, 100);
1844
- }, ea = ({
1815
+ return Ot(t == null ? void 0 : t.content, 100);
1816
+ }, Jr = ({
1845
1817
  filteredHistory: e,
1846
1818
  setFilteredHistory: t,
1847
1819
  dispatch: o,
1848
1820
  onOpenChange: a
1849
1821
  }) => {
1850
- var T;
1851
- const { user: n, getAccessToken: s } = te(), i = ce({
1822
+ var C;
1823
+ const { user: n, getAccessToken: s } = X(), i = le({
1852
1824
  id: 0,
1853
1825
  timestamp: "",
1854
1826
  message: ""
1855
- }), [l, h] = S(!1), u = Jr("(min-width: 480px)"), { state: m, dispatch: g } = $(tt), [, b] = G({
1856
- key: D + Dt,
1857
- initialValue: m.sortDirection
1858
- }), d = e.data.sort(
1827
+ }), [c, h] = S(!1), m = Xr("(min-width: 480px)"), { state: l, dispatch: g } = z(Ze), [, b] = he({
1828
+ key: me + Pt,
1829
+ initialValue: l.sortDirection
1830
+ }), u = e.data.sort(
1859
1831
  (p, k) => {
1860
- switch (m.sortedCell) {
1832
+ switch (l.sortedCell) {
1861
1833
  case "timestamp":
1862
- if (m.sortDirection === V.ASC)
1863
- return new Date(p[m.sortedCell]).getTime() - new Date(k[m.sortedCell]).getTime();
1864
- if (m.sortDirection === V.DESC)
1865
- return new Date(k[m.sortedCell]).getTime() - new Date(p[m.sortedCell]).getTime();
1834
+ if (l.sortDirection === D.ASC)
1835
+ return new Date(p[l.sortedCell]).getTime() - new Date(k[l.sortedCell]).getTime();
1836
+ if (l.sortDirection === D.DESC)
1837
+ return new Date(k[l.sortedCell]).getTime() - new Date(p[l.sortedCell]).getTime();
1866
1838
  break;
1867
1839
  default:
1868
1840
  return 0;
1869
1841
  }
1870
1842
  return 0;
1871
1843
  }
1872
- ), c = (p) => {
1873
- switch (m.sortDirection) {
1844
+ ), d = (p) => {
1845
+ switch (l.sortDirection) {
1874
1846
  case !1:
1875
- b(V.ASC), g({
1876
- type: Ce,
1847
+ b(D.ASC), g({
1848
+ type: we,
1877
1849
  payload: {
1878
1850
  sortedCell: p,
1879
- sortDirection: V.ASC
1851
+ sortDirection: D.ASC
1880
1852
  }
1881
1853
  });
1882
1854
  break;
1883
- case V.ASC:
1884
- b(V.DESC), g({
1885
- type: Ce,
1855
+ case D.ASC:
1856
+ b(D.DESC), g({
1857
+ type: we,
1886
1858
  payload: {
1887
1859
  sortedCell: p,
1888
- sortDirection: V.DESC
1860
+ sortDirection: D.DESC
1889
1861
  }
1890
1862
  });
1891
1863
  break;
1892
1864
  default:
1893
- b(V.ASC), g({
1894
- type: Ce,
1865
+ b(D.ASC), g({
1866
+ type: we,
1895
1867
  payload: {
1896
1868
  sortedCell: p,
1897
- sortDirection: V.ASC
1869
+ sortDirection: D.ASC
1898
1870
  }
1899
1871
  });
1900
1872
  break;
1901
1873
  }
1902
1874
  };
1903
- return /* @__PURE__ */ v(R, { children: [
1875
+ return /* @__PURE__ */ v(A, { children: [
1904
1876
  /* @__PURE__ */ v(
1905
- At,
1877
+ xt,
1906
1878
  {
1907
- showConfirmation: l,
1879
+ showConfirmation: c,
1908
1880
  setShowConfirmation: h,
1909
1881
  action: async () => {
1910
1882
  const p = i.current;
1911
1883
  try {
1912
- const k = await H({
1884
+ const k = await F({
1913
1885
  accessToken: await s(),
1914
- type: F.DELETE_CHAT,
1886
+ type: H.DELETE_CHAT,
1915
1887
  params: {
1916
1888
  userId: (n == null ? void 0 : n.username) || "",
1917
1889
  id: p.id
@@ -1937,39 +1909,39 @@ const Qr = async (e, t, o, a) => {
1937
1909
  /* @__PURE__ */ v("li", { children: [
1938
1910
  "First message:",
1939
1911
  " ",
1940
- /* @__PURE__ */ r("span", { className: "text-lg", children: (T = i.current) == null ? void 0 : T.message })
1912
+ /* @__PURE__ */ r("span", { className: "text-lg", children: (C = i.current) == null ? void 0 : C.message })
1941
1913
  ] })
1942
1914
  ] })
1943
1915
  ]
1944
1916
  }
1945
1917
  ),
1946
- /* @__PURE__ */ v(Xt, { stickyHeader: !0, stickyFooter: !0, wrapperClassName: "max-h-[60vh]", children: [
1947
- /* @__PURE__ */ r(Jt, { children: /* @__PURE__ */ v(Ee, { children: [
1948
- u && /* @__PURE__ */ r(B, { className: "sr-only", children: "Row" }),
1918
+ /* @__PURE__ */ v(qt, { stickyHeader: !0, stickyFooter: !0, wrapperClassName: "max-h-[60vh]", children: [
1919
+ /* @__PURE__ */ r(Xt, { children: /* @__PURE__ */ v(Ne, { children: [
1920
+ m && /* @__PURE__ */ r($, { className: "sr-only", children: "Row" }),
1949
1921
  /* @__PURE__ */ r(
1950
- Qt,
1922
+ Zt,
1951
1923
  {
1952
1924
  buttonClassName: "text-xs sm:text-sm",
1953
1925
  cellId: "timestamp",
1954
1926
  align: "left",
1955
- sortDirection: m.sortDirection,
1956
- sortedCell: m.sortedCell,
1927
+ sortDirection: l.sortDirection,
1928
+ sortedCell: l.sortedCell,
1957
1929
  onClick: () => {
1958
- c("timestamp");
1930
+ d("timestamp");
1959
1931
  },
1960
1932
  children: "Date"
1961
1933
  }
1962
1934
  ),
1963
- /* @__PURE__ */ r(B, { className: "text-xs sm:text-sm", children: "First message" }),
1964
- /* @__PURE__ */ r(B, { className: "text-xs sm:text-sm", children: "Model" }),
1965
- /* @__PURE__ */ r(B, { className: "text-xs sm:text-sm text-right", children: "Actions" })
1935
+ /* @__PURE__ */ r($, { className: "text-xs sm:text-sm", children: "First message" }),
1936
+ /* @__PURE__ */ r($, { className: "text-xs sm:text-sm", children: "Model" }),
1937
+ /* @__PURE__ */ r($, { className: "text-xs sm:text-sm text-right", children: "Actions" })
1966
1938
  ] }) }),
1967
- /* @__PURE__ */ r(eo, { children: d.map((p, k) => {
1968
- var N;
1969
- return ((N = p == null ? void 0 : p.messages) == null ? void 0 : N.length) > 0 ? /* @__PURE__ */ v(Ee, { children: [
1970
- u && /* @__PURE__ */ r(B, { children: k + 1 }),
1939
+ /* @__PURE__ */ r(Jt, { children: u.map((p, k) => {
1940
+ var T;
1941
+ return ((T = p == null ? void 0 : p.messages) == null ? void 0 : T.length) > 0 ? /* @__PURE__ */ v(Ne, { children: [
1942
+ m && /* @__PURE__ */ r($, { children: k + 1 }),
1971
1943
  /* @__PURE__ */ r(
1972
- B,
1944
+ $,
1973
1945
  {
1974
1946
  component: "th",
1975
1947
  scope: "row",
@@ -1977,12 +1949,12 @@ const Qr = async (e, t, o, a) => {
1977
1949
  children: p.timestamp
1978
1950
  }
1979
1951
  ),
1980
- /* @__PURE__ */ r(B, { className: "max-w-[100px] text-white sm:max-w-full text-xs sm:text-sm", children: Xe(p.messages) }),
1981
- /* @__PURE__ */ v(B, { component: "th", scope: "row", className: "text-gray-400", children: [
1982
- p.model && p.model.startsWith("claude") && /* @__PURE__ */ r(ct, { className: "size-4 sm:size-5" }),
1983
- p.model && p.model.startsWith("gpt") && /* @__PURE__ */ r(dt, { className: "size-4 sm:size-5" })
1952
+ /* @__PURE__ */ r($, { className: "max-w-[100px] text-white sm:max-w-full text-xs sm:text-sm", children: We(p.messages) }),
1953
+ /* @__PURE__ */ v($, { component: "th", scope: "row", className: "text-gray-400", children: [
1954
+ p.model && p.model.startsWith("claude") && /* @__PURE__ */ r(nt, { className: "size-4 sm:size-5" }),
1955
+ p.model && p.model.startsWith("gpt") && /* @__PURE__ */ r(st, { className: "size-4 sm:size-5" })
1984
1956
  ] }),
1985
- /* @__PURE__ */ r(B, { className: "px-2", children: /* @__PURE__ */ v("div", { className: "flex justify-end gap-2", children: [
1957
+ /* @__PURE__ */ r($, { className: "px-2", children: /* @__PURE__ */ v("div", { className: "flex justify-end gap-2", children: [
1986
1958
  /* @__PURE__ */ r(
1987
1959
  Y,
1988
1960
  {
@@ -1991,14 +1963,14 @@ const Qr = async (e, t, o, a) => {
1991
1963
  label: "Restore chat",
1992
1964
  onClick: async () => {
1993
1965
  const I = await s();
1994
- Qr(
1966
+ Zr(
1995
1967
  p,
1996
1968
  o,
1997
1969
  a,
1998
1970
  I
1999
1971
  );
2000
1972
  },
2001
- children: /* @__PURE__ */ r(Ao, { className: "h-3 w-3", monotone: !0 })
1973
+ children: /* @__PURE__ */ r(So, { className: "h-3 w-3", monotone: !0 })
2002
1974
  }
2003
1975
  ),
2004
1976
  /* @__PURE__ */ r(
@@ -2011,62 +1983,62 @@ const Qr = async (e, t, o, a) => {
2011
1983
  i.current = {
2012
1984
  id: p.id,
2013
1985
  timestamp: p.timestamp,
2014
- message: Xe(p.messages)
2015
- }, h(!l);
1986
+ message: We(p.messages)
1987
+ }, h(!c);
2016
1988
  },
2017
- children: /* @__PURE__ */ r("div", { className: "text-red-400", children: /* @__PURE__ */ r(xo, { className: "h-3 w-3", monotone: !0 }) })
1989
+ children: /* @__PURE__ */ r("div", { className: "text-red-400", children: /* @__PURE__ */ r(No, { className: "h-3 w-3", monotone: !0 }) })
2018
1990
  }
2019
1991
  )
2020
1992
  ] }) })
2021
- ] }, `${w.HISTORY.TITLE}-${p.id}-${k}`) : null;
1993
+ ] }, `${N.HISTORY.TITLE}-${p.id}-${k}`) : null;
2022
1994
  }) }),
2023
- /* @__PURE__ */ r(to, { children: /* @__PURE__ */ r(Ee, { children: /* @__PURE__ */ r(B, { colSpan: 5, children: /* @__PURE__ */ r("div", { children: fe(
1995
+ /* @__PURE__ */ r(Qt, { children: /* @__PURE__ */ r(Ne, { children: /* @__PURE__ */ r($, { colSpan: 5, children: /* @__PURE__ */ r("div", { children: be(
2024
1996
  `${e.data.length} chat`,
2025
1997
  e.data.length
2026
1998
  ) }) }) }) })
2027
1999
  ] })
2028
2000
  ] });
2029
2001
  };
2030
- function Je(e, t) {
2002
+ function Ye(e, t) {
2031
2003
  return t ? e.filter(
2032
2004
  (o) => o.messages.some(
2033
2005
  (a) => a.content !== null && a.content.toLowerCase().includes(t.toLowerCase())
2034
2006
  )
2035
2007
  ) : e;
2036
2008
  }
2037
- const ta = ({
2009
+ const Qr = ({
2038
2010
  onOpenChange: e,
2039
2011
  historyData: t
2040
2012
  }) => {
2041
- const { isAuthenticated: o } = te(), a = ce(null), { dispatch: n } = $(me), { state: s, dispatch: i } = $(tt), [, l] = G({
2042
- key: D + Gt,
2013
+ const { isAuthenticated: o } = X(), a = le(null), { dispatch: n } = z(ue), { state: s, dispatch: i } = z(Ze), [, c] = he({
2014
+ key: me + Vt,
2043
2015
  initialValue: s.searchString
2044
- }), h = no(() => t, [t]), [u, m] = S({
2016
+ }), h = ro(() => t, [t]), [m, l] = S({
2045
2017
  data: h
2046
- }), g = (c) => {
2047
- const y = Je(h, c);
2048
- m({
2018
+ }), g = (d) => {
2019
+ const y = Ye(h, d);
2020
+ l({
2049
2021
  data: y
2050
- }), l(c), i({
2051
- type: jt,
2052
- payload: { searchString: c }
2022
+ }), c(d), i({
2023
+ type: Dt,
2024
+ payload: { searchString: d }
2053
2025
  });
2054
- }, b = (c) => {
2055
- g(c.target.value);
2056
- }, d = async (c) => {
2057
- c.preventDefault();
2026
+ }, b = (d) => {
2027
+ g(d.target.value);
2028
+ }, u = async (d) => {
2029
+ d.preventDefault();
2058
2030
  };
2059
2031
  return U(() => {
2060
- const c = Je(
2032
+ const d = Ye(
2061
2033
  t,
2062
2034
  s.searchString
2063
2035
  );
2064
- m({
2065
- data: c
2036
+ l({
2037
+ data: d
2066
2038
  });
2067
- }, [t, s.searchString]), o ? u && u.data && /* @__PURE__ */ v(R, { children: [
2068
- /* @__PURE__ */ r("form", { autoComplete: "off", onSubmit: d, children: /* @__PURE__ */ r(
2069
- Ut,
2039
+ }, [t, s.searchString]), o ? m && m.data && /* @__PURE__ */ v(A, { children: [
2040
+ /* @__PURE__ */ r("form", { autoComplete: "off", onSubmit: u, children: /* @__PURE__ */ r(
2041
+ xe,
2070
2042
  {
2071
2043
  autoComplete: "off",
2072
2044
  autoCorrect: "off",
@@ -2079,15 +2051,15 @@ const ta = ({
2079
2051
  spacing: { t: 2, b: 2 },
2080
2052
  ...s.searchString && {
2081
2053
  rightElement: /* @__PURE__ */ r(
2082
- Q,
2054
+ G,
2083
2055
  {
2084
2056
  disabled: !s.searchString,
2085
2057
  mode: "dark",
2086
2058
  noBorder: !0,
2087
2059
  size: "small",
2088
2060
  onClick: () => {
2089
- var c;
2090
- g(""), (c = a.current) != null && c.value && (a.current.value = "", a.current.focus());
2061
+ var d;
2062
+ g(""), (d = a.current) != null && d.value && (a.current.value = "", a.current.focus());
2091
2063
  },
2092
2064
  children: "Reset"
2093
2065
  }
@@ -2096,20 +2068,20 @@ const ta = ({
2096
2068
  }
2097
2069
  ) }),
2098
2070
  /* @__PURE__ */ r("div", { className: "flex flex-col gap-2 sm:flex-row", children: /* @__PURE__ */ r(
2099
- ea,
2071
+ Jr,
2100
2072
  {
2101
- filteredHistory: u,
2102
- setFilteredHistory: m,
2073
+ filteredHistory: m,
2074
+ setFilteredHistory: l,
2103
2075
  dispatch: n,
2104
2076
  onOpenChange: e
2105
2077
  }
2106
2078
  ) })
2107
2079
  ] }) : null;
2108
- }, oa = ({
2080
+ }, ea = ({
2109
2081
  open: e,
2110
2082
  onOpenChange: t,
2111
2083
  historyData: o
2112
- }) => /* @__PURE__ */ r(X, { open: e, onOpenChange: t, title: Kt, children: /* @__PURE__ */ r(ta, { onOpenChange: t, historyData: o }) });
2084
+ }) => /* @__PURE__ */ r(Z, { open: e, onOpenChange: t, title: Ft, children: /* @__PURE__ */ r(Qr, { onOpenChange: t, historyData: o }) });
2113
2085
  /*!
2114
2086
  @versini/ui-toggle v1.0.8
2115
2087
  © 2024 gizmette.com
@@ -2123,7 +2095,7 @@ try {
2123
2095
  });
2124
2096
  } catch {
2125
2097
  }
2126
- const ra = "av-toggle", aa = (e) => {
2098
+ const ta = "av-toggle", oa = (e) => {
2127
2099
  let t = "";
2128
2100
  if (typeof e == "number" || typeof e == "string")
2129
2101
  t = "m-" + e;
@@ -2132,9 +2104,9 @@ const ra = "av-toggle", aa = (e) => {
2132
2104
  (e == null ? void 0 : e.t) !== void 0 && o.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && o.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && o.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && o.push(`ml-${e.l}`), t = o.join(" ");
2133
2105
  }
2134
2106
  return t;
2135
- }, na = () => C("peer", "h-6", "w-11", "rounded-full"), sa = ({
2107
+ }, ra = () => w("peer", "h-6", "w-11", "rounded-full"), aa = ({
2136
2108
  focusMode: e
2137
- }) => C(
2109
+ }) => w(
2138
2110
  "peer-focus:outline",
2139
2111
  "peer-focus:outline-2",
2140
2112
  "peer-focus:outline-offset-2",
@@ -2144,14 +2116,14 @@ const ra = "av-toggle", aa = (e) => {
2144
2116
  "peer-focus:outline-focus-light dark:peer-focus:outline-focus-dark": e === "alt-system",
2145
2117
  "peer-focus:outline-focus-dark dark:peer-focus:outline-focus-light": e === "system"
2146
2118
  }
2147
- ), ia = () => C(
2119
+ ), na = () => w(
2148
2120
  "peer-checked:after:translate-x-full",
2149
2121
  // background color when checked
2150
2122
  "peer-checked:bg-violet-500",
2151
2123
  // knob circle and border color when checked
2152
2124
  "peer-checked:after:bg-white",
2153
2125
  "peer-checked:after:border-white"
2154
- ), la = () => C(
2126
+ ), sa = () => w(
2155
2127
  "after:left-[2px]",
2156
2128
  "after:top-[2px]",
2157
2129
  "after:border",
@@ -2163,45 +2135,45 @@ const ra = "av-toggle", aa = (e) => {
2163
2135
  "after:rounded-full",
2164
2136
  "after:transition-all",
2165
2137
  "after:content-['']"
2166
- ), ca = ({
2138
+ ), ia = ({
2167
2139
  mode: e,
2168
2140
  noBorder: t
2169
- }) => C({
2141
+ }) => w({
2170
2142
  border: !t,
2171
2143
  "border-border-dark bg-surface-medium": e === "light",
2172
2144
  "border-border-light bg-surface-darker": e === "dark",
2173
2145
  "border-border-light bg-surface-darker dark:border-border-dark dark:bg-surface-medium": e === "alt-system",
2174
2146
  "border-border-dark bg-surface-medium dark:border-border-light dark:bg-surface-darker": e === "system"
2175
- }), da = ({
2147
+ }), la = ({
2176
2148
  mode: e,
2177
2149
  labelHidden: t
2178
- }) => t ? "sr-only" : C("ml-2 text-sm", {
2150
+ }) => t ? "sr-only" : w("ml-2 text-sm", {
2179
2151
  "text-copy-dark": e === "light",
2180
2152
  "text-copy-lighter": e === "dark",
2181
2153
  "text-copy-lighter dark:text-copy-dark": e === "alt-system",
2182
2154
  "text-copy-dark dark:text-copy-lighter": e === "system"
2183
- }), ua = ({ spacing: e }) => C(
2184
- ra,
2155
+ }), ca = ({ spacing: e }) => w(
2156
+ ta,
2185
2157
  "relative flex cursor-pointer items-center",
2186
- aa(e)
2187
- ), ma = ({
2158
+ oa(e)
2159
+ ), da = ({
2188
2160
  mode: e,
2189
2161
  focusMode: t,
2190
2162
  labelHidden: o,
2191
2163
  spacing: a,
2192
2164
  noBorder: n
2193
2165
  }) => ({
2194
- toggle: C(
2195
- na(),
2196
- ca({ mode: e, noBorder: n }),
2197
- sa({ focusMode: t }),
2198
- la(),
2199
- ia()
2166
+ toggle: w(
2167
+ ra(),
2168
+ ia({ mode: e, noBorder: n }),
2169
+ aa({ focusMode: t }),
2170
+ sa(),
2171
+ na()
2200
2172
  ),
2201
- label: da({ mode: e, labelHidden: o }),
2173
+ label: la({ mode: e, labelHidden: o }),
2202
2174
  input: "peer sr-only",
2203
- wrapper: ua({ spacing: a })
2204
- }), q = ({
2175
+ wrapper: ca({ spacing: a })
2176
+ }), ne = ({
2205
2177
  checked: e = !1,
2206
2178
  onChange: t,
2207
2179
  label: o,
@@ -2209,51 +2181,51 @@ const ra = "av-toggle", aa = (e) => {
2209
2181
  name: n,
2210
2182
  mode: s = "system",
2211
2183
  focusMode: i = "system",
2212
- spacing: l,
2184
+ spacing: c,
2213
2185
  noBorder: h = !1
2214
2186
  }) => {
2215
- const u = ma({
2187
+ const m = da({
2216
2188
  mode: s,
2217
2189
  focusMode: i,
2218
2190
  labelHidden: a,
2219
- spacing: l,
2191
+ spacing: c,
2220
2192
  noBorder: h
2221
- }), m = (g) => {
2193
+ }), l = (g) => {
2222
2194
  t == null || t(g.target.checked);
2223
2195
  };
2224
- return /* @__PURE__ */ v("label", { className: u.wrapper, children: [
2196
+ return /* @__PURE__ */ v("label", { className: m.wrapper, children: [
2225
2197
  /* @__PURE__ */ r(
2226
2198
  "input",
2227
2199
  {
2228
2200
  name: n,
2229
2201
  checked: e,
2230
2202
  type: "checkbox",
2231
- className: u.input,
2232
- onChange: m
2203
+ className: m.input,
2204
+ onChange: l
2233
2205
  }
2234
2206
  ),
2235
- /* @__PURE__ */ r("div", { className: u.toggle }),
2236
- /* @__PURE__ */ r("span", { className: u.label, children: o })
2207
+ /* @__PURE__ */ r("div", { className: m.toggle }),
2208
+ /* @__PURE__ */ r("span", { className: m.label, children: o })
2237
2209
  ] });
2238
- }, ha = ({
2210
+ }, ua = ({
2239
2211
  open: e,
2240
2212
  onOpenChange: t
2241
2213
  }) => {
2242
- const { dispatch: o } = $(me), { getAccessToken: a, user: n } = te(), [s, i] = S({
2214
+ const { dispatch: o } = z(ue), { getAccessToken: a, user: n } = X(), [s, i] = S({
2243
2215
  loaded: !1,
2244
2216
  instructions: "",
2245
2217
  loadingLocation: !1,
2246
2218
  location: "",
2247
- engine: ie
2248
- }), [l, h] = G({
2249
- key: D + rt,
2219
+ engine: ae
2220
+ }), [c, h] = he({
2221
+ key: me + Qe,
2250
2222
  initialValue: !1
2251
- }), u = async (d) => {
2252
- d.preventDefault();
2223
+ }), m = async (u) => {
2224
+ u.preventDefault();
2253
2225
  try {
2254
- await H({
2226
+ await F({
2255
2227
  accessToken: await a(),
2256
- type: F.SET_USER_PREFERENCES,
2228
+ type: H.SET_USER_PREFERENCES,
2257
2229
  params: {
2258
2230
  user: n == null ? void 0 : n.username,
2259
2231
  instructions: s.instructions,
@@ -2261,32 +2233,32 @@ const ra = "av-toggle", aa = (e) => {
2261
2233
  engine: s.engine
2262
2234
  }
2263
2235
  }), o({
2264
- type: at,
2236
+ type: et,
2265
2237
  payload: {
2266
2238
  engine: s.engine
2267
2239
  }
2268
2240
  });
2269
2241
  } catch {
2270
2242
  }
2271
- }, m = async () => {
2272
- i((d) => ({
2273
- ...d,
2243
+ }, l = async () => {
2244
+ i((u) => ({
2245
+ ...u,
2274
2246
  location: "...",
2275
2247
  loadingLocation: !0
2276
2248
  }));
2277
2249
  try {
2278
- const d = Date.now(), c = await Wt(), y = await H({
2250
+ const u = Date.now(), d = await Ht(), y = await F({
2279
2251
  accessToken: await a(),
2280
- type: F.GET_LOCATION,
2252
+ type: H.GET_LOCATION,
2281
2253
  params: {
2282
- latitude: c.latitude,
2283
- longitude: c.longitude
2254
+ latitude: d.latitude,
2255
+ longitude: d.longitude
2284
2256
  }
2285
- }), p = Date.now() - d;
2257
+ }), p = Date.now() - u;
2286
2258
  if (p < 2e3 && await new Promise((k) => setTimeout(k, 2e3 - p)), y.status === 200) {
2287
- const { city: k, state: N, country: I, displayName: M } = y.data, _ = k && N && I ? `${k}, ${N}, ${I}` : M;
2288
- i((z) => ({
2289
- ...z,
2259
+ const { city: k, state: T, country: I, displayName: M } = y.data, _ = k && T && I ? `${k}, ${T}, ${I}` : M;
2260
+ i((V) => ({
2261
+ ...V,
2290
2262
  loaded: !0,
2291
2263
  location: _,
2292
2264
  loadingLocation: !1
@@ -2300,15 +2272,15 @@ const ra = "av-toggle", aa = (e) => {
2300
2272
  }));
2301
2273
  } catch {
2302
2274
  }
2303
- }, g = (d) => {
2304
- i((c) => ({
2305
- ...c,
2306
- engine: d ? Te : pe
2275
+ }, g = (u) => {
2276
+ i((d) => ({
2277
+ ...d,
2278
+ engine: u ? Te : fe
2307
2279
  }));
2308
- }, b = (d) => {
2309
- i((c) => ({
2310
- ...c,
2311
- engine: d ? pe : Te
2280
+ }, b = (u) => {
2281
+ i((d) => ({
2282
+ ...d,
2283
+ engine: u ? fe : Te
2312
2284
  }));
2313
2285
  };
2314
2286
  return U(() => {
@@ -2318,44 +2290,44 @@ const ra = "av-toggle", aa = (e) => {
2318
2290
  loadingLocation: !1,
2319
2291
  instructions: "",
2320
2292
  location: "",
2321
- engine: ie
2293
+ engine: ae
2322
2294
  });
2323
2295
  return;
2324
2296
  }
2325
2297
  (async () => {
2326
2298
  try {
2327
- const d = await H({
2299
+ const u = await F({
2328
2300
  accessToken: await a(),
2329
- type: F.GET_USER_PREFERENCES,
2301
+ type: H.GET_USER_PREFERENCES,
2330
2302
  params: {
2331
2303
  user: n.username
2332
2304
  }
2333
2305
  });
2334
- d.status === 200 && i((c) => ({
2335
- ...c,
2306
+ u.status === 200 && i((d) => ({
2307
+ ...d,
2336
2308
  loaded: !0,
2337
- instructions: d.data.instructions || "",
2338
- location: d.data.location || "",
2339
- engine: d.data.engine || ie
2309
+ instructions: u.data.instructions || "",
2310
+ location: u.data.location || "",
2311
+ engine: u.data.engine || ae
2340
2312
  }));
2341
2313
  } catch {
2342
2314
  }
2343
2315
  })();
2344
- }, [n, e]), /* @__PURE__ */ r(R, { children: s.loaded && /* @__PURE__ */ r(
2345
- X,
2316
+ }, [n, e]), /* @__PURE__ */ r(A, { children: s.loaded && /* @__PURE__ */ r(
2317
+ Z,
2346
2318
  {
2347
2319
  open: e,
2348
2320
  onOpenChange: t,
2349
2321
  title: "Engine Fine Tuning",
2350
2322
  footer: /* @__PURE__ */ v(
2351
- Me,
2323
+ ie,
2352
2324
  {
2353
2325
  columnGap: 2,
2354
2326
  alignHorizontal: "flex-end",
2355
2327
  className: "pb-8 sm:pb-0",
2356
2328
  children: [
2357
- /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r(
2358
- Q,
2329
+ /* @__PURE__ */ r(B, { children: /* @__PURE__ */ r(
2330
+ G,
2359
2331
  {
2360
2332
  mode: "dark",
2361
2333
  variant: "secondary",
@@ -2366,14 +2338,14 @@ const ra = "av-toggle", aa = (e) => {
2366
2338
  children: "Cancel"
2367
2339
  }
2368
2340
  ) }),
2369
- /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r(
2370
- Q,
2341
+ /* @__PURE__ */ r(B, { children: /* @__PURE__ */ r(
2342
+ G,
2371
2343
  {
2372
2344
  mode: "dark",
2373
2345
  variant: "danger",
2374
2346
  focusMode: "light",
2375
- onClick: async (d) => {
2376
- t(!1), await u(d);
2347
+ onClick: async (u) => {
2348
+ t(!1), await m(u);
2377
2349
  },
2378
2350
  children: "Save"
2379
2351
  }
@@ -2381,7 +2353,7 @@ const ra = "av-toggle", aa = (e) => {
2381
2353
  ]
2382
2354
  }
2383
2355
  ),
2384
- children: /* @__PURE__ */ v(R, { children: [
2356
+ children: /* @__PURE__ */ v(A, { children: [
2385
2357
  /* @__PURE__ */ v(
2386
2358
  P,
2387
2359
  {
@@ -2390,7 +2362,7 @@ const ra = "av-toggle", aa = (e) => {
2390
2362
  children: [
2391
2363
  /* @__PURE__ */ r("p", { children: "Select the AI engine that will be used to generate responses." }),
2392
2364
  /* @__PURE__ */ r(
2393
- q,
2365
+ ne,
2394
2366
  {
2395
2367
  noBorder: !0,
2396
2368
  label: "OpenAI",
@@ -2400,26 +2372,26 @@ const ra = "av-toggle", aa = (e) => {
2400
2372
  }
2401
2373
  ),
2402
2374
  /* @__PURE__ */ r(
2403
- q,
2375
+ ne,
2404
2376
  {
2405
2377
  spacing: { t: 2 },
2406
2378
  noBorder: !0,
2407
2379
  label: "Anthropic",
2408
2380
  name: "Anthropic",
2409
2381
  onChange: b,
2410
- checked: s.engine === pe
2382
+ checked: s.engine === fe
2411
2383
  }
2412
2384
  ),
2413
2385
  /* @__PURE__ */ r("p", { className: "text-xs", children: "NOTE: Anthropic is currently in beta and may not be as accurate as OpenAI." }),
2414
2386
  /* @__PURE__ */ r(
2415
- q,
2387
+ ne,
2416
2388
  {
2417
2389
  spacing: { t: 2 },
2418
2390
  noBorder: !0,
2419
2391
  label: "Show Quick Engine Toggle",
2420
2392
  name: "show-toggle-engine-menu",
2421
2393
  onChange: h,
2422
- checked: l
2394
+ checked: c
2423
2395
  }
2424
2396
  ),
2425
2397
  /* @__PURE__ */ r("p", { className: "text-xs", children: "This option introduces a new menu on the left side of the screen, enabling you to quickly switch between engines." })
@@ -2435,7 +2407,7 @@ const ra = "av-toggle", aa = (e) => {
2435
2407
  children: [
2436
2408
  /* @__PURE__ */ r("p", { children: "What would you like Sassy Saint to know about you to provide better responses?" }),
2437
2409
  /* @__PURE__ */ r(
2438
- Ue,
2410
+ De,
2439
2411
  {
2440
2412
  mode: "alt-system",
2441
2413
  autoCapitalize: "off",
@@ -2444,11 +2416,11 @@ const ra = "av-toggle", aa = (e) => {
2444
2416
  name: "customInstructions",
2445
2417
  label: "Custom Instructions",
2446
2418
  value: s.instructions,
2447
- onChange: (d) => {
2448
- i((c) => ({
2449
- ...c,
2419
+ onChange: (u) => {
2420
+ i((d) => ({
2421
+ ...d,
2450
2422
  loaded: !0,
2451
- instructions: d.target.value
2423
+ instructions: u.target.value
2452
2424
  }));
2453
2425
  },
2454
2426
  helperText: "Press ENTER to add a new line."
@@ -2466,30 +2438,30 @@ const ra = "av-toggle", aa = (e) => {
2466
2438
  children: [
2467
2439
  /* @__PURE__ */ r("p", { children: "You can share your location to receive customized responses based on your area." }),
2468
2440
  /* @__PURE__ */ r(
2469
- Ue,
2441
+ De,
2470
2442
  {
2471
2443
  mode: "alt-system",
2472
2444
  name: "location",
2473
2445
  label: "Location",
2474
2446
  value: s.location,
2475
- onChange: (d) => {
2476
- i((c) => ({
2477
- ...c,
2447
+ onChange: (u) => {
2448
+ i((d) => ({
2449
+ ...d,
2478
2450
  loaded: !0,
2479
- location: d.target.value
2451
+ location: u.target.value
2480
2452
  }));
2481
2453
  },
2482
2454
  helperText: "Enter your location or press auto-detect."
2483
2455
  }
2484
2456
  ),
2485
2457
  /* @__PURE__ */ r(
2486
- Q,
2458
+ G,
2487
2459
  {
2488
2460
  spacing: { t: 2 },
2489
2461
  size: "small",
2490
2462
  noBorder: !0,
2491
2463
  disabled: s.loadingLocation,
2492
- onClick: m,
2464
+ onClick: l,
2493
2465
  children: s.loadingLocation ? "Detecting..." : "Auto-detect"
2494
2466
  }
2495
2467
  )
@@ -2499,97 +2471,188 @@ const ra = "av-toggle", aa = (e) => {
2499
2471
  ] })
2500
2472
  }
2501
2473
  ) });
2502
- }, ga = ({
2474
+ }, ma = ({
2503
2475
  open: e,
2504
2476
  onOpenChange: t
2505
2477
  }) => {
2506
- const [o, a] = G({
2507
- key: D + $e,
2508
- initialValue: !1
2509
- }), [n, s] = G({
2510
- key: D + De,
2511
- initialValue: !1
2512
- }), [i, l] = G({
2513
- key: D + He,
2514
- initialValue: !1
2515
- }), h = (g) => {
2516
- a(g);
2517
- }, u = (g) => {
2518
- s(g);
2519
- }, m = (g) => {
2520
- l(g);
2478
+ const { state: o, dispatch: a } = z(Gt), { getAccessToken: n, user: s } = X(), [i, c] = S({
2479
+ tags: [...o.tags]
2480
+ }), h = ({
2481
+ slot: l,
2482
+ checked: g,
2483
+ label: b,
2484
+ content: u
2485
+ }) => {
2486
+ c((d) => {
2487
+ const y = d.tags, C = {
2488
+ slot: l,
2489
+ label: b,
2490
+ content: u,
2491
+ enabled: g
2492
+ }, p = y.findIndex((k) => k.slot === l);
2493
+ return p === -1 ? {
2494
+ ...d,
2495
+ tags: [...y, { ...C, slot: l }]
2496
+ } : (y[p] = C, {
2497
+ ...d,
2498
+ tags: [...y]
2499
+ });
2500
+ });
2501
+ }, m = async (l) => {
2502
+ l.preventDefault();
2503
+ try {
2504
+ await F({
2505
+ accessToken: await n(),
2506
+ type: H.SET_USER_PREFERENCES,
2507
+ params: {
2508
+ user: s == null ? void 0 : s.username,
2509
+ tags: i.tags
2510
+ }
2511
+ }), a({
2512
+ type: jt,
2513
+ payload: {
2514
+ tags: i.tags
2515
+ }
2516
+ });
2517
+ } catch {
2518
+ }
2521
2519
  };
2522
- return /* @__PURE__ */ r(X, { open: e, onOpenChange: t, title: "Tags", children: /* @__PURE__ */ v(P, { header: w.TAGS.TITLE, className: "prose-dark dark:prose-lighter", children: [
2523
- /* @__PURE__ */ r("p", { children: w.TAGS.DESCRIPTION }),
2524
- /* @__PURE__ */ r(
2525
- q,
2526
- {
2527
- noBorder: !0,
2528
- label: we[Ne.SUMMARIZE_ARTICLE].label,
2529
- name: $e,
2530
- onChange: h,
2531
- checked: o
2532
- }
2533
- ),
2534
- /* @__PURE__ */ r(
2535
- q,
2536
- {
2537
- spacing: { t: 2 },
2538
- noBorder: !0,
2539
- label: we[Ne.PROOFREAD_CONTENT].label,
2540
- name: De,
2541
- onChange: u,
2542
- checked: n
2543
- }
2544
- ),
2545
- /* @__PURE__ */ r(
2546
- q,
2547
- {
2548
- spacing: { t: 2 },
2549
- noBorder: !0,
2550
- label: we[Ne.REPHRASE_CONTENT].label,
2551
- name: He,
2552
- onChange: m,
2553
- checked: i
2554
- }
2555
- )
2556
- ] }) });
2557
- }, pa = () => {
2558
- const { isAuthenticated: e, user: t, registeringForPasskey: o, authenticationType: a } = te(), [n, s] = G({
2559
- key: D + Yt,
2520
+ return /* @__PURE__ */ v(
2521
+ Z,
2522
+ {
2523
+ open: e,
2524
+ onOpenChange: t,
2525
+ title: "Tags",
2526
+ footer: /* @__PURE__ */ v(ie, { columnGap: 2, alignHorizontal: "flex-end", children: [
2527
+ /* @__PURE__ */ r(B, { children: /* @__PURE__ */ r(
2528
+ G,
2529
+ {
2530
+ mode: "dark",
2531
+ variant: "secondary",
2532
+ focusMode: "light",
2533
+ onClick: () => {
2534
+ t(!1);
2535
+ },
2536
+ children: "Cancel"
2537
+ }
2538
+ ) }),
2539
+ /* @__PURE__ */ r(B, { children: /* @__PURE__ */ r(
2540
+ G,
2541
+ {
2542
+ mode: "dark",
2543
+ variant: "danger",
2544
+ focusMode: "light",
2545
+ onClick: async (l) => {
2546
+ t(!1), await m(l);
2547
+ },
2548
+ children: "Save"
2549
+ }
2550
+ ) })
2551
+ ] }),
2552
+ children: [
2553
+ /* @__PURE__ */ r("p", { children: Ut }),
2554
+ i.tags && i.tags.map((l) => /* @__PURE__ */ v(
2555
+ P,
2556
+ {
2557
+ header: l.label !== "" ? `Tag ${l.slot} - ${l.label}` : `Tag ${l.slot}`,
2558
+ className: "prose-dark dark:prose-lighter",
2559
+ spacing: { b: 2 },
2560
+ children: [
2561
+ /* @__PURE__ */ v(ie, { spacing: { t: 8, b: 6 }, columnGap: 2, rowGap: 6, children: [
2562
+ /* @__PURE__ */ r(B, { span: { fallback: 12, sm: 6 }, children: /* @__PURE__ */ r(
2563
+ xe,
2564
+ {
2565
+ label: "Label",
2566
+ name: `tag${l.slot}-label`,
2567
+ value: l.label,
2568
+ onChange: (g) => {
2569
+ h({
2570
+ slot: l.slot,
2571
+ checked: l.enabled,
2572
+ label: g.target.value,
2573
+ content: l.content
2574
+ });
2575
+ }
2576
+ }
2577
+ ) }),
2578
+ /* @__PURE__ */ r(B, { span: { fallback: 12, sm: 6 }, children: /* @__PURE__ */ r(
2579
+ xe,
2580
+ {
2581
+ label: "Content",
2582
+ name: `tag${l.slot}-content`,
2583
+ value: l.content,
2584
+ onChange: (g) => {
2585
+ h({
2586
+ slot: l.slot,
2587
+ checked: l.enabled,
2588
+ label: l.label,
2589
+ content: g.target.value
2590
+ });
2591
+ }
2592
+ }
2593
+ ) })
2594
+ ] }),
2595
+ /* @__PURE__ */ r(
2596
+ ne,
2597
+ {
2598
+ spacing: { t: 2 },
2599
+ noBorder: !0,
2600
+ label: "Enabled",
2601
+ name: l.slot.toString(),
2602
+ onChange: (g) => {
2603
+ h({
2604
+ slot: l.slot,
2605
+ checked: g,
2606
+ label: l.label,
2607
+ content: l.content
2608
+ });
2609
+ },
2610
+ checked: l.enabled
2611
+ }
2612
+ )
2613
+ ]
2614
+ },
2615
+ `tag-slot-${l.slot}`
2616
+ ))
2617
+ ]
2618
+ }
2619
+ );
2620
+ }, ha = () => {
2621
+ const { isAuthenticated: e, user: t, registeringForPasskey: o, authenticationType: a } = X(), [n, s] = he({
2622
+ key: me + Kt,
2560
2623
  initialValue: !1
2561
- }), [i, l] = S(!1), [h, u] = S(!1), m = de(), g = (t == null ? void 0 : t.username) || "", b = (y) => {
2624
+ }), [i, c] = S(!1), [h, m] = S(!1), l = ce(), g = (t == null ? void 0 : t.username) || "", b = (y) => {
2562
2625
  s(y);
2626
+ }, u = () => {
2627
+ c(!i);
2563
2628
  }, d = () => {
2564
- l(!i);
2565
- }, c = () => {
2566
- u(!h);
2629
+ m(!h);
2567
2630
  };
2568
- return e && g ? /* @__PURE__ */ v(R, { children: [
2631
+ return e && g ? /* @__PURE__ */ v(A, { children: [
2569
2632
  i && /* @__PURE__ */ r(
2570
- ha,
2633
+ ua,
2571
2634
  {
2572
2635
  open: i,
2573
- onOpenChange: l
2636
+ onOpenChange: c
2574
2637
  }
2575
2638
  ),
2576
- h && /* @__PURE__ */ r(ga, { open: h, onOpenChange: u }),
2639
+ h && /* @__PURE__ */ r(ma, { open: h, onOpenChange: m }),
2577
2640
  /* @__PURE__ */ v(
2578
2641
  P,
2579
2642
  {
2580
- header: w.PREFERENCES.TITLE,
2643
+ header: N.PREFERENCES.TITLE,
2581
2644
  className: "prose-dark dark:prose-lighter",
2582
2645
  children: [
2583
- le(m, {
2584
- [w.PREFERENCES.NAME]: g,
2585
- [w.PREFERENCES.EMAIL]: (t == null ? void 0 : t.email) || "",
2586
- [w.PREFERENCES.ENGINE_DETAILS]: /* @__PURE__ */ r(
2587
- q,
2646
+ se(l, {
2647
+ [N.PREFERENCES.NAME]: g,
2648
+ [N.PREFERENCES.EMAIL]: (t == null ? void 0 : t.email) || "",
2649
+ [N.PREFERENCES.ENGINE_DETAILS]: /* @__PURE__ */ r(
2650
+ ne,
2588
2651
  {
2589
2652
  noBorder: !0,
2590
2653
  labelHidden: !0,
2591
- label: w.PREFERENCES.ENGINE_DETAILS,
2592
- name: w.PREFERENCES.ENGINE_DETAILS,
2654
+ label: N.PREFERENCES.ENGINE_DETAILS,
2655
+ name: N.PREFERENCES.ENGINE_DETAILS,
2593
2656
  onChange: b,
2594
2657
  checked: n
2595
2658
  }
@@ -2600,9 +2663,9 @@ const ra = "av-toggle", aa = (e) => {
2600
2663
  {
2601
2664
  spacing: { t: 2 },
2602
2665
  size: "small",
2603
- onClick: d,
2666
+ onClick: u,
2604
2667
  labelLeft: "Engine Fine Tuning",
2605
- children: /* @__PURE__ */ r(je, { className: "size-3", monotone: !0 })
2668
+ children: /* @__PURE__ */ r(Fe, { className: "size-3", monotone: !0 })
2606
2669
  }
2607
2670
  ),
2608
2671
  /* @__PURE__ */ r(
@@ -2610,56 +2673,56 @@ const ra = "av-toggle", aa = (e) => {
2610
2673
  {
2611
2674
  spacing: { t: 2, l: 2 },
2612
2675
  size: "small",
2613
- onClick: c,
2676
+ onClick: d,
2614
2677
  labelLeft: "Tags",
2615
- children: /* @__PURE__ */ r(je, { className: "size-3", monotone: !0 })
2678
+ children: /* @__PURE__ */ r(Fe, { className: "size-3", monotone: !0 })
2616
2679
  }
2617
2680
  )
2618
2681
  ]
2619
2682
  }
2620
2683
  ),
2621
- a !== Zt.PASSKEY && /* @__PURE__ */ v(
2684
+ a !== Wt.PASSKEY && /* @__PURE__ */ v(
2622
2685
  P,
2623
2686
  {
2624
2687
  spacing: { t: 4 },
2625
2688
  className: "prose-dark dark:prose-lighter",
2626
- header: /* @__PURE__ */ r("h2", { className: "m-0", children: /* @__PURE__ */ v(Me, { columnGap: 3, alignVertical: "center", children: [
2627
- /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r(Fe, { className: "size-8" }) }),
2628
- /* @__PURE__ */ r(ee, { children: /* @__PURE__ */ r("div", { children: w.PREFERENCES.PASSKEY_TITLE }) })
2689
+ header: /* @__PURE__ */ r("h2", { className: "m-0", children: /* @__PURE__ */ v(ie, { columnGap: 3, alignVertical: "center", children: [
2690
+ /* @__PURE__ */ r(B, { children: /* @__PURE__ */ r(Oe, { className: "size-8" }) }),
2691
+ /* @__PURE__ */ r(B, { children: /* @__PURE__ */ r("div", { children: N.PREFERENCES.PASSKEY_TITLE }) })
2629
2692
  ] }) }),
2630
2693
  children: [
2631
- /* @__PURE__ */ r("p", { children: w.PREFERENCES.PASSKEY_INSTRUCTIONS }),
2694
+ /* @__PURE__ */ r("p", { children: N.PREFERENCES.PASSKEY_INSTRUCTIONS }),
2632
2695
  /* @__PURE__ */ r(
2633
2696
  Y,
2634
2697
  {
2635
2698
  size: "small",
2636
2699
  spacing: { t: 2 },
2637
2700
  onClick: o,
2638
- labelLeft: w.PREFERENCES.PASSKEY_BUTTON,
2639
- children: /* @__PURE__ */ r(Fe, { className: "size-5", monotone: !0 })
2701
+ labelLeft: N.PREFERENCES.PASSKEY_BUTTON,
2702
+ children: /* @__PURE__ */ r(Oe, { className: "size-5", monotone: !0 })
2640
2703
  }
2641
2704
  )
2642
2705
  ]
2643
2706
  }
2644
2707
  )
2645
2708
  ] }) : null;
2646
- }, fa = ({
2709
+ }, ga = ({
2647
2710
  open: e,
2648
2711
  onOpenChange: t
2649
- }) => /* @__PURE__ */ r(X, { open: e, onOpenChange: t, title: qt, children: /* @__PURE__ */ r(pa, {}) }), Na = () => {
2650
- const { state: e, dispatch: t, serverStats: o } = $(me), [a, n] = S((e == null ? void 0 : e.engine) || ie), [s, i] = S(!1), [l, h] = S(!1), [u, m] = S(!1), [g, b] = S(!1), [d, c] = S([]), [y, T] = S(!1), [p, k] = S({
2712
+ }) => /* @__PURE__ */ r(Z, { open: e, onOpenChange: t, title: Yt, children: /* @__PURE__ */ r(ha, {}) }), wa = () => {
2713
+ const { state: e, dispatch: t, serverStats: o } = z(ue), [a, n] = S((e == null ? void 0 : e.engine) || ae), [s, i] = S(!1), [c, h] = S(!1), [m, l] = S(!1), [g, b] = S(!1), [u, d] = S([]), [y, C] = S(!1), [p, k] = S({
2651
2714
  done: !1,
2652
2715
  progress: !1,
2653
2716
  timestamp: Date.now()
2654
- }), [N] = G({
2655
- key: D + rt,
2717
+ }), [T] = he({
2718
+ key: me + Qe,
2656
2719
  initialValue: !1
2657
- }), { logout: I, getAccessToken: M, user: _ } = te(), z = () => {
2720
+ }), { logout: I, getAccessToken: M, user: _ } = X(), V = () => {
2658
2721
  i(!s);
2659
2722
  }, E = () => {
2660
- h(!l);
2661
- }, re = () => {
2662
- m(!u);
2723
+ h(!c);
2724
+ }, ee = () => {
2725
+ l(!m);
2663
2726
  }, J = () => {
2664
2727
  b(!g);
2665
2728
  }, j = async (L) => {
@@ -2671,14 +2734,14 @@ const ra = "av-toggle", aa = (e) => {
2671
2734
  timestamp: K
2672
2735
  });
2673
2736
  try {
2674
- const A = await H({
2737
+ const R = await F({
2675
2738
  accessToken: await M(),
2676
- type: F.GET_CHATS,
2739
+ type: H.GET_CHATS,
2677
2740
  params: {
2678
2741
  userId: _.username
2679
2742
  }
2680
2743
  });
2681
- A.status === 200 && (c(A.data), k({
2744
+ R.status === 200 && (d(R.data), k({
2682
2745
  done: !0,
2683
2746
  progress: !1,
2684
2747
  timestamp: Date.now()
@@ -2691,47 +2754,47 @@ const ra = "av-toggle", aa = (e) => {
2691
2754
  });
2692
2755
  }
2693
2756
  }
2694
- }, ae = () => {
2695
- T(!y);
2757
+ }, te = () => {
2758
+ C(!y);
2696
2759
  };
2697
2760
  return U(() => {
2698
2761
  e && e.engine && e.engine !== a && n(e.engine);
2699
- }, [e, a]), /* @__PURE__ */ v(R, { children: [
2762
+ }, [e, a]), /* @__PURE__ */ v(A, { children: [
2700
2763
  /* @__PURE__ */ r(
2701
- At,
2764
+ xt,
2702
2765
  {
2703
2766
  showConfirmation: y,
2704
- setShowConfirmation: T,
2767
+ setShowConfirmation: C,
2705
2768
  action: I,
2706
2769
  customStrings: {
2707
- confirmAction: Ge,
2770
+ confirmAction: Ve,
2708
2771
  cancelAction: "Cancel",
2709
- title: Ge
2772
+ title: Ve
2710
2773
  },
2711
2774
  children: /* @__PURE__ */ r("p", { children: "Are you sure you want to log out?" })
2712
2775
  }
2713
2776
  ),
2714
- /* @__PURE__ */ r(fa, { open: s, onOpenChange: i }),
2715
- /* @__PURE__ */ r(Zr, { open: l, onOpenChange: h }),
2777
+ /* @__PURE__ */ r(ga, { open: s, onOpenChange: i }),
2778
+ /* @__PURE__ */ r(Wr, { open: c, onOpenChange: h }),
2716
2779
  /* @__PURE__ */ r(
2717
- oa,
2780
+ ea,
2718
2781
  {
2719
- open: u,
2720
- onOpenChange: m,
2721
- historyData: d
2782
+ open: m,
2783
+ onOpenChange: l,
2784
+ historyData: u
2722
2785
  }
2723
2786
  ),
2724
- /* @__PURE__ */ r(jr, { open: g, onOpenChange: b }),
2787
+ /* @__PURE__ */ r(Gr, { open: g, onOpenChange: b }),
2725
2788
  /* @__PURE__ */ v("div", { className: "relative", children: [
2726
- N && o && /* @__PURE__ */ r("div", { className: "absolute bottom-[-28px] left-[-7px]", children: /* @__PURE__ */ r(
2789
+ T && o && /* @__PURE__ */ r("div", { className: "absolute bottom-[-28px] left-[-7px]", children: /* @__PURE__ */ r(
2727
2790
  Se,
2728
2791
  {
2729
2792
  mode: "dark",
2730
2793
  focusMode: "light",
2731
- trigger: /* @__PURE__ */ r(Y, { children: e && e.engine === pe ? /* @__PURE__ */ r(ct, {}) : /* @__PURE__ */ r(dt, {}) }),
2794
+ trigger: /* @__PURE__ */ r(Y, { children: e && e.engine === fe ? /* @__PURE__ */ r(nt, {}) : /* @__PURE__ */ r(st, {}) }),
2732
2795
  defaultPlacement: "bottom-start",
2733
2796
  children: /* @__PURE__ */ r(W, { raw: !0, ignoreClick: !0, children: /* @__PURE__ */ r(
2734
- Tr,
2797
+ kr,
2735
2798
  {
2736
2799
  size: "small",
2737
2800
  mode: "dark",
@@ -2740,25 +2803,25 @@ const ra = "av-toggle", aa = (e) => {
2740
2803
  onValueChange: async (L) => {
2741
2804
  if (L)
2742
2805
  try {
2743
- await H({
2806
+ await F({
2744
2807
  accessToken: await M(),
2745
- type: F.SET_USER_PREFERENCES,
2808
+ type: H.SET_USER_PREFERENCES,
2746
2809
  params: {
2747
2810
  user: _ == null ? void 0 : _.username,
2748
2811
  engine: L
2749
2812
  }
2750
2813
  }), t({
2751
- type: at,
2814
+ type: et,
2752
2815
  payload: {
2753
2816
  engine: L
2754
2817
  }
2755
2818
  }), t({
2756
- type: ot
2819
+ type: Je
2757
2820
  });
2758
2821
  } catch {
2759
2822
  }
2760
2823
  },
2761
- children: o && o.engines.map((L) => /* @__PURE__ */ r(wr, { value: L }, L))
2824
+ children: o && o.engines.map((L) => /* @__PURE__ */ r(Cr, { value: L }, L))
2762
2825
  }
2763
2826
  ) })
2764
2827
  }
@@ -2768,7 +2831,7 @@ const ra = "av-toggle", aa = (e) => {
2768
2831
  {
2769
2832
  mode: "dark",
2770
2833
  focusMode: "light",
2771
- trigger: /* @__PURE__ */ r(Y, { children: /* @__PURE__ */ r(Ro, {}) }),
2834
+ trigger: /* @__PURE__ */ r(Y, { children: /* @__PURE__ */ r(_o, {}) }),
2772
2835
  defaultPlacement: "bottom-end",
2773
2836
  onOpenChange: j,
2774
2837
  children: [
@@ -2776,24 +2839,24 @@ const ra = "av-toggle", aa = (e) => {
2776
2839
  W,
2777
2840
  {
2778
2841
  label: "Profile",
2779
- onClick: z,
2780
- icon: /* @__PURE__ */ r(_o, {})
2842
+ onClick: V,
2843
+ icon: /* @__PURE__ */ r(Io, {})
2781
2844
  }
2782
2845
  ),
2783
2846
  /* @__PURE__ */ r(
2784
2847
  W,
2785
2848
  {
2786
- label: et,
2849
+ label: Xe,
2787
2850
  onClick: E,
2788
- icon: /* @__PURE__ */ r(Eo, {})
2851
+ icon: /* @__PURE__ */ r(To, {})
2789
2852
  }
2790
2853
  ),
2791
2854
  /* @__PURE__ */ r(
2792
2855
  W,
2793
2856
  {
2794
2857
  label: "History",
2795
- onClick: re,
2796
- icon: /* @__PURE__ */ r(Io, {})
2858
+ onClick: ee,
2859
+ icon: /* @__PURE__ */ r(Eo, {})
2797
2860
  }
2798
2861
  ),
2799
2862
  /* @__PURE__ */ r(
@@ -2801,17 +2864,17 @@ const ra = "av-toggle", aa = (e) => {
2801
2864
  {
2802
2865
  label: "About",
2803
2866
  onClick: J,
2804
- icon: /* @__PURE__ */ r(So, {})
2867
+ icon: /* @__PURE__ */ r(xo, {})
2805
2868
  }
2806
2869
  ),
2807
- e && e.id && !e.isComponent && /* @__PURE__ */ v(R, { children: [
2808
- /* @__PURE__ */ r(Mo, {}),
2870
+ e && e.id && !e.isComponent && /* @__PURE__ */ v(A, { children: [
2871
+ /* @__PURE__ */ r(Ro, {}),
2809
2872
  /* @__PURE__ */ r(
2810
2873
  W,
2811
2874
  {
2812
2875
  label: "Log out",
2813
- onClick: ae,
2814
- icon: /* @__PURE__ */ r("div", { className: "text-red-700", children: /* @__PURE__ */ r(No, { monotone: !0 }) })
2876
+ onClick: te,
2877
+ icon: /* @__PURE__ */ r("div", { className: "text-red-700", children: /* @__PURE__ */ r(wo, { monotone: !0 }) })
2815
2878
  }
2816
2879
  )
2817
2880
  ] })
@@ -2822,5 +2885,5 @@ const ra = "av-toggle", aa = (e) => {
2822
2885
  ] });
2823
2886
  };
2824
2887
  export {
2825
- Na as default
2888
+ wa as default
2826
2889
  };