@versini/sassysaint 5.4.15 → 5.5.1

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,27 +1,9 @@
1
- import { jsx as s, jsxs as v, Fragment as O } from "react/jsx-runtime";
2
- import { g as we, ACTION_RESTORE as Ne, ACTION_MESSAGE as S, ROLE_ASSISTANT as E, ACTION_RESET as ie, ACTION_MODEL as de, ACTION_ENGINE as se, ACTION_STREAMING as ne, ACTION_SORT as Ie, ACTION_SEARCH as Ee, ACTION_SET_TAGS as le, ACTION_RESET_TAGS as ce, ACTION_TOGGLE_TAG as ge, ROLE_INTERNAL as H, ROLE_USER as G, isLastMessageFromRole as me, un as z, getMessageContaintWrapperClass as Ce, MessagesContainerHeader as Se, ROLE_SYSTEM as Re, ROLE_HIDDEN as Be, DEFAULT_AI_ENGINE as M, STATS_SEPARATOR as Y, CLIPBOARD_TAG as q, TYPE_QUESTION as Ae, C as ue, SEND as Me, ERROR_MESSAGE as Le, L as Oe, j as ze, O as Ue, TOOLBOX as X, _ as Ve, LOCAL_STORAGE_PREFIX as J, LOCAL_STORAGE_SEARCH as De, LOCAL_STORAGE_SORT as $e } from "./index.D8QVMbN9.js";
3
- import { AppContext as U, TagsContext as j, restCall as Ge, Le as He, serviceCall as he, SERVICE_TYPES as be, h as je, E as Q, HistoryContext as Pe, f as We } from "./index.Dn9p043U.js";
4
- import C, { useState as A, useEffect as _, lazy as Fe, useContext as R, Suspense as Z, useRef as B, useReducer as D } from "react";
1
+ import { jsx as s, jsxs as f, Fragment as R } from "react/jsx-runtime";
2
+ import { ACTION_RESTORE as xe, ACTION_MESSAGE as C, ROLE_ASSISTANT as S, ACTION_RESET as Te, ACTION_MODEL as oe, ACTION_ENGINE as ie, ACTION_STREAMING as de, ACTION_SORT as _e, ACTION_SEARCH as we, ACTION_SET_TAGS as se, ACTION_RESET_TAGS as ne, ACTION_TOGGLE_TAG as le, ROLE_INTERNAL as G, ROLE_USER as D, isLastMessageFromRole as Ne, un as O, getMessageContaintWrapperClass as Ee, MessagesContainerHeader as Ie, ROLE_SYSTEM as Ce, ROLE_HIDDEN as Se, DEFAULT_AI_ENGINE as A, STATS_SEPARATOR as Y, CLIPBOARD_TAG as q, TYPE_QUESTION as Re, C as ce, SEND as Be, ERROR_MESSAGE as Ae, L as Me, j as Le, _ as Oe, LOCAL_STORAGE_PREFIX as J, LOCAL_STORAGE_SEARCH as ze, LOCAL_STORAGE_SORT as Ue } from "./index.DiAX0KiN.js";
3
+ import { AppContext as H, TagsContext as j, restCall as Ve, m as De, Fe as $e, NewChatButton as Ge, serviceCall as ge, SERVICE_TYPES as me, E as Q, HistoryContext as He, f as je } from "./index.Du-zwZIx.js";
4
+ import I, { useState as B, useEffect as E, lazy as Pe, useContext as L, Suspense as X, useRef as $, useReducer as U } from "react";
5
5
  import d from "clsx";
6
- const Ke = ({
7
- className: e,
8
- viewBox: t,
9
- title: r,
10
- monotone: a,
11
- ...o
12
- }) => /* @__PURE__ */ s(
13
- we,
14
- {
15
- defaultViewBox: "0 0 384 512",
16
- size: "size-5",
17
- viewBox: t,
18
- className: e,
19
- title: r || "Close",
20
- ...o,
21
- children: /* @__PURE__ */ s("path", { d: "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3l105.4 105.3c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256l105.3-105.4z" })
22
- }
23
- );
24
- function Ye(e) {
6
+ function We(e) {
25
7
  const t = e.toLowerCase().split("+").map((i) => i.trim()), r = {
26
8
  alt: t.includes("alt"),
27
9
  ctrl: t.includes("ctrl"),
@@ -34,54 +16,54 @@ function Ye(e) {
34
16
  key: o
35
17
  };
36
18
  }
37
- function qe(e, t) {
38
- const { alt: r, ctrl: a, meta: o, mod: i, shift: g, key: l } = e, { altKey: m, ctrlKey: u, metaKey: b, shiftKey: h, key: c } = t;
39
- if (r !== m)
19
+ function Fe(e, t) {
20
+ const { alt: r, ctrl: a, meta: o, mod: i, shift: g, key: n } = e, { altKey: l, ctrlKey: m, metaKey: b, shiftKey: h, key: c } = t;
21
+ if (r !== l)
40
22
  return !1;
41
23
  if (i) {
42
- if (!u && !b)
24
+ if (!m && !b)
43
25
  return !1;
44
- } else if (a !== u || o !== b)
26
+ } else if (a !== m || o !== b)
45
27
  return !1;
46
- return g !== h ? !1 : !!(l && (c.toLowerCase() === l.toLowerCase() || t.code.replace("Key", "").toLowerCase() === l.toLowerCase()));
28
+ return g !== h ? !1 : !!(n && (c.toLowerCase() === n.toLowerCase() || t.code.replace("Key", "").toLowerCase() === n.toLowerCase()));
47
29
  }
48
- function Xe(e) {
49
- return (t) => qe(Ye(e), t);
30
+ function Ke(e) {
31
+ return (t) => Fe(We(e), t);
50
32
  }
51
- function Je(e) {
33
+ function Ye(e) {
52
34
  return (t) => {
53
35
  const r = "nativeEvent" in t ? t.nativeEvent : t;
54
36
  e.forEach(([a, o, i = { preventDefault: !0 }]) => {
55
- Xe(a)(r) && (i.preventDefault && t.preventDefault(), o(r));
37
+ Ke(a)(r) && (i.preventDefault && t.preventDefault(), o(r));
56
38
  });
57
39
  };
58
40
  }
59
41
  const y = [];
60
42
  for (let e = 0; e < 256; ++e)
61
43
  y.push((e + 256).toString(16).slice(1));
62
- function Qe(e, t = 0) {
44
+ function qe(e, t = 0) {
63
45
  return (y[e[t + 0]] + y[e[t + 1]] + y[e[t + 2]] + y[e[t + 3]] + "-" + y[e[t + 4]] + y[e[t + 5]] + "-" + y[e[t + 6]] + y[e[t + 7]] + "-" + y[e[t + 8]] + y[e[t + 9]] + "-" + y[e[t + 10]] + y[e[t + 11]] + y[e[t + 12]] + y[e[t + 13]] + y[e[t + 14]] + y[e[t + 15]]).toLowerCase();
64
46
  }
65
- let $;
66
- const Ze = new Uint8Array(16);
67
- function et() {
68
- if (!$) {
47
+ let V;
48
+ const Je = new Uint8Array(16);
49
+ function Qe() {
50
+ if (!V) {
69
51
  if (typeof crypto > "u" || !crypto.getRandomValues)
70
52
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
71
- $ = crypto.getRandomValues.bind(crypto);
53
+ V = crypto.getRandomValues.bind(crypto);
72
54
  }
73
- return $(Ze);
55
+ return V(Je);
74
56
  }
75
- const tt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ee = { randomUUID: tt };
57
+ const Xe = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Z = { randomUUID: Xe };
76
58
  function P(e, t, r) {
77
- if (ee.randomUUID && !t && !e)
78
- return ee.randomUUID();
59
+ if (Z.randomUUID && !t && !e)
60
+ return Z.randomUUID();
79
61
  e = e || {};
80
- const a = e.random || (e.rng || et)();
81
- return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Qe(a);
62
+ const a = e.random || (e.rng || Qe)();
63
+ return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, qe(a);
82
64
  }
83
- const rt = (e, t) => {
84
- if ((t == null ? void 0 : t.type) === Ne) {
65
+ const Ze = (e, t) => {
66
+ if ((t == null ? void 0 : t.type) === xe) {
85
67
  const r = t.payload.messages.map((a) => ({
86
68
  message: {
87
69
  role: a.role,
@@ -100,22 +82,22 @@ const rt = (e, t) => {
100
82
  tags: e.tags
101
83
  };
102
84
  }
103
- if ((t == null ? void 0 : t.type) === S) {
85
+ if ((t == null ? void 0 : t.type) === C) {
104
86
  const r = t.payload.message.role, a = t.payload.message.content, o = t.payload.message.name, i = t.payload.message.processingTime, g = t.payload.message.messageId;
105
87
  if (r !== "") {
106
- const l = {
88
+ const n = {
107
89
  role: r,
108
90
  content: a,
109
91
  name: o,
110
92
  processingTime: i,
111
93
  messageId: g
112
94
  };
113
- if (r === E) {
114
- const m = e.messages.findIndex(
115
- (u) => u.message.messageId === g
95
+ if (r === S) {
96
+ const l = e.messages.findIndex(
97
+ (m) => m.message.messageId === g
116
98
  );
117
- if (m !== -1) {
118
- const u = e.messages.map((b, h) => h === m ? {
99
+ if (l !== -1) {
100
+ const m = e.messages.map((b, h) => h === l ? {
119
101
  message: {
120
102
  ...b.message,
121
103
  content: `${b.message.content}${a}`,
@@ -128,7 +110,7 @@ const rt = (e, t) => {
128
110
  model: e.model,
129
111
  usage: e.usage,
130
112
  isComponent: e.isComponent,
131
- messages: u,
113
+ messages: m,
132
114
  engine: e.engine,
133
115
  tags: e.tags
134
116
  };
@@ -144,13 +126,13 @@ const rt = (e, t) => {
144
126
  messages: [
145
127
  ...e.messages,
146
128
  {
147
- message: l
129
+ message: n
148
130
  }
149
131
  ]
150
132
  };
151
133
  }
152
134
  }
153
- return (t == null ? void 0 : t.type) === ie ? {
135
+ return (t == null ? void 0 : t.type) === Te ? {
154
136
  id: P(),
155
137
  model: e.model,
156
138
  engine: e.engine,
@@ -158,7 +140,7 @@ const rt = (e, t) => {
158
140
  messages: [],
159
141
  isComponent: e.isComponent,
160
142
  tags: e.tags
161
- } : (t == null ? void 0 : t.type) === de ? {
143
+ } : (t == null ? void 0 : t.type) === oe ? {
162
144
  id: e.id,
163
145
  model: t.payload.model,
164
146
  engine: e.engine,
@@ -166,22 +148,22 @@ const rt = (e, t) => {
166
148
  usage: t.payload.usage,
167
149
  messages: e.messages,
168
150
  isComponent: e.isComponent
169
- } : (t == null ? void 0 : t.type) === se ? {
151
+ } : (t == null ? void 0 : t.type) === ie ? {
170
152
  ...e,
171
153
  engine: t.payload.engine
172
- } : (t == null ? void 0 : t.type) === ne ? {
154
+ } : (t == null ? void 0 : t.type) === de ? {
173
155
  ...e,
174
156
  streaming: t.payload.streaming
175
157
  } : e;
176
- }, at = (e, t) => {
158
+ }, et = (e, t) => {
177
159
  switch (t == null ? void 0 : t.type) {
178
- case Ee:
160
+ case we:
179
161
  return {
180
162
  searchString: t.payload.searchString,
181
163
  sortedCell: e.sortedCell,
182
164
  sortDirection: e.sortDirection
183
165
  };
184
- case Ie:
166
+ case _e:
185
167
  return {
186
168
  searchString: e.searchString,
187
169
  sortedCell: t.payload.sortedCell,
@@ -190,19 +172,19 @@ const rt = (e, t) => {
190
172
  default:
191
173
  return e;
192
174
  }
193
- }, ot = (e, t) => {
175
+ }, tt = (e, t) => {
194
176
  switch (t == null ? void 0 : t.type) {
195
- case ge:
177
+ case le:
196
178
  return {
197
179
  tags: e.tags,
198
180
  tag: t.payload.tag
199
181
  };
200
- case ce:
182
+ case ne:
201
183
  return {
202
184
  tags: e.tags,
203
185
  tag: ""
204
186
  };
205
- case le:
187
+ case se:
206
188
  return {
207
189
  tags: t.payload.tags,
208
190
  tag: ""
@@ -224,26 +206,26 @@ try {
224
206
  });
225
207
  } catch {
226
208
  }
227
- const it = "av-bubble", te = "av-button", W = "icon", dt = "button", st = "link", nt = ({
209
+ const rt = "av-bubble", ee = "av-button", W = "icon", at = "button", ot = "link", it = ({
228
210
  type: e,
229
211
  size: t,
230
212
  labelRight: r,
231
213
  labelLeft: a,
232
214
  align: o
233
215
  }) => {
234
- const i = "text-sm font-medium max-h-8 py-0 px-2", g = "text-base font-medium max-h-9 py-1 px-3", l = "text-lg font-medium max-h-12 py-2 px-4";
216
+ const i = "text-sm font-medium max-h-8 py-0 px-2", g = "text-base font-medium max-h-9 py-1 px-3", n = "text-lg font-medium max-h-12 py-2 px-4";
235
217
  switch (e) {
236
- case dt:
218
+ case at:
237
219
  return d({
238
220
  [i]: t === "small",
239
221
  [g]: t === "medium",
240
- [l]: t === "large"
222
+ [n]: t === "large"
241
223
  });
242
- case st:
224
+ case ot:
243
225
  return d("text-center", {
244
226
  [i]: t === "small",
245
227
  [g]: t === "medium",
246
- [l]: t === "large"
228
+ [n]: t === "large"
247
229
  });
248
230
  case W:
249
231
  return d("inline-flex items-center", {
@@ -258,7 +240,7 @@ const it = "av-bubble", te = "av-button", W = "icon", dt = "button", st = "link"
258
240
  "h-12 px-4 text-lg font-medium": t === "large" && (r || a)
259
241
  });
260
242
  }
261
- }, lt = ({
243
+ }, dt = ({
262
244
  mode: e,
263
245
  noBackground: t,
264
246
  noTruncate: r,
@@ -315,7 +297,7 @@ const it = "av-bubble", te = "av-button", W = "icon", dt = "button", st = "link"
315
297
  "bg-action-selected-dark text-copy-light dark:bg-action-selected-light dark:text-copy-lighter": e === "system",
316
298
  "bg-action-selected-light text-copy-lighter dark:bg-action-selected-dark dark:text-copy-light": e === "alt-system"
317
299
  });
318
- }, ct = ({
300
+ }, st = ({
319
301
  mode: e,
320
302
  disabled: t,
321
303
  variant: r
@@ -350,7 +332,7 @@ const it = "av-bubble", te = "av-button", W = "icon", dt = "button", st = "link"
350
332
  "hover:bg-action-selected-dark-hover dark:hover:bg-action-selected-light-hover": e === "system",
351
333
  "hover:bg-action-selected-light-hover dark:hover:bg-action-selected-dark-hover": e === "alt-system"
352
334
  });
353
- }, gt = ({
335
+ }, nt = ({
354
336
  mode: e,
355
337
  disabled: t,
356
338
  variant: r
@@ -385,7 +367,7 @@ const it = "av-bubble", te = "av-button", W = "icon", dt = "button", st = "link"
385
367
  "active:bg-action-selected-dark-active dark:active:bg-action-selected-light-active": e === "system",
386
368
  "active:bg-action-selected-light-active dark:active:bg-action-selected-dark-active": e === "alt-system"
387
369
  });
388
- }, mt = ({
370
+ }, lt = ({
389
371
  mode: e,
390
372
  noBorder: t,
391
373
  variant: r
@@ -420,14 +402,14 @@ const it = "av-bubble", te = "av-button", W = "icon", dt = "button", st = "link"
420
402
  "border-border-selected-dark dark:border-border-selected-medium": e === "system",
421
403
  "border-border-selected-medium dark:border-border-selected-dark": e === "alt-system"
422
404
  });
423
- }, ut = ({
405
+ }, ct = ({
424
406
  focusMode: e
425
407
  }) => d("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
426
408
  "focus:outline-focus-dark": e === "dark",
427
409
  "focus:outline-focus-light": e === "light",
428
410
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
429
411
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
430
- }), pe = ({
412
+ }), ue = ({
431
413
  type: e,
432
414
  className: t,
433
415
  raw: r,
@@ -435,58 +417,58 @@ const it = "av-bubble", te = "av-button", W = "icon", dt = "button", st = "link"
435
417
  focusMode: o,
436
418
  disabled: i,
437
419
  fullWidth: g,
438
- size: l,
439
- noBorder: m,
440
- labelRight: u,
420
+ size: n,
421
+ noBorder: l,
422
+ labelRight: m,
441
423
  labelLeft: b,
442
424
  noBackground: h,
443
425
  variant: c,
444
- noTruncate: n,
426
+ noTruncate: u,
445
427
  align: p,
446
- radius: f
447
- }) => (c || (c = "primary"), r ? d(te, t) : d(
448
- te,
449
- lt({
428
+ radius: v
429
+ }) => (c || (c = "primary"), r ? d(ee, t) : d(
430
+ ee,
431
+ dt({
450
432
  mode: a,
451
433
  variant: c,
452
434
  noBackground: h,
453
- noTruncate: n,
454
- radius: f
435
+ noTruncate: u,
436
+ radius: v
455
437
  }),
456
- nt({
438
+ it({
457
439
  type: e,
458
- size: l,
459
- labelRight: u,
440
+ size: n,
441
+ labelRight: m,
460
442
  labelLeft: b,
461
443
  align: p
462
444
  }),
463
- mt({ mode: a, variant: c, noBorder: m }),
464
- ut({ focusMode: o }),
465
- ct({ mode: a, variant: c, disabled: i }),
466
- gt({ mode: a, variant: c, disabled: i }),
445
+ lt({ mode: a, variant: c, noBorder: l }),
446
+ ct({ focusMode: o }),
447
+ st({ mode: a, variant: c, disabled: i }),
448
+ nt({ mode: a, variant: c, disabled: i }),
467
449
  {
468
450
  "w-full": g,
469
451
  "disabled:cursor-not-allowed disabled:opacity-50": i
470
452
  },
471
453
  t
472
- )), ht = (e, t, r) => {
454
+ )), gt = (e, t, r) => {
473
455
  var a;
474
456
  !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 r == "function" && r(e);
475
- }, F = C.forwardRef((e, t) => {
457
+ }, F = I.forwardRef((e, t) => {
476
458
  const { onClick: r, noInternalClick: a = !1, ...o } = e;
477
459
  return /* @__PURE__ */ s(
478
460
  "button",
479
461
  {
480
462
  ref: t,
481
463
  onClick: (i) => {
482
- ht(i, a, r);
464
+ gt(i, a, r);
483
465
  },
484
466
  ...o
485
467
  }
486
468
  );
487
469
  });
488
470
  F.displayName = "BaseButton";
489
- const ye = C.forwardRef(
471
+ const he = I.forwardRef(
490
472
  ({
491
473
  children: e,
492
474
  disabled: t = !1,
@@ -495,58 +477,58 @@ const ye = C.forwardRef(
495
477
  fullWidth: o = !1,
496
478
  className: i,
497
479
  type: g = "button",
498
- raw: l = !1,
499
- noBorder: m = !1,
500
- "aria-label": u,
480
+ raw: n = !1,
481
+ noBorder: l = !1,
482
+ "aria-label": m,
501
483
  label: b,
502
484
  size: h = "medium",
503
485
  labelRight: c,
504
- labelLeft: n,
486
+ labelLeft: u,
505
487
  noBackground: p = !1,
506
- align: f = "center",
507
- radius: w = "large",
508
- ...N
488
+ align: v = "center",
489
+ radius: _ = "large",
490
+ ...w
509
491
  }, k) => {
510
- const x = pe({
492
+ const x = ue({
511
493
  type: W,
512
494
  mode: r,
513
495
  focusMode: a,
514
496
  fullWidth: o,
515
497
  disabled: t,
516
- raw: l,
498
+ raw: n,
517
499
  className: i,
518
- noBorder: m,
500
+ noBorder: l,
519
501
  size: h,
520
502
  labelRight: c,
521
- labelLeft: n,
503
+ labelLeft: u,
522
504
  noBackground: p,
523
- align: f,
524
- radius: w
525
- }), I = d({
526
- "text-copy-accent-dark": r === "light" && !l,
527
- "text-copy-light": r === "dark" && !l,
528
- "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !l,
529
- "text-copy-light dark:text-copy-accent-dark": r === "system" && !l
505
+ align: v,
506
+ radius: _
507
+ }), N = d({
508
+ "text-copy-accent-dark": r === "light" && !n,
509
+ "text-copy-light": r === "dark" && !n,
510
+ "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !n,
511
+ "text-copy-light dark:text-copy-accent-dark": r === "system" && !n
530
512
  });
531
- return /* @__PURE__ */ v(
513
+ return /* @__PURE__ */ f(
532
514
  F,
533
515
  {
534
516
  ref: k,
535
517
  className: x,
536
518
  disabled: t,
537
519
  type: g,
538
- "aria-label": u || b,
539
- ...N,
520
+ "aria-label": m || b,
521
+ ...w,
540
522
  children: [
541
- n && /* @__PURE__ */ s("span", { className: "pr-2", children: n }),
542
- /* @__PURE__ */ s("div", { className: I, children: e }),
523
+ u && /* @__PURE__ */ s("span", { className: "pr-2", children: u }),
524
+ /* @__PURE__ */ s("div", { className: N, children: e }),
543
525
  c && /* @__PURE__ */ s("span", { className: "pl-2", children: c })
544
526
  ]
545
527
  }
546
528
  );
547
529
  }
548
530
  );
549
- ye.displayName = "ButtonIcon";
531
+ he.displayName = "ButtonIcon";
550
532
  /*!
551
533
  @versini/ui-button v3.2.0
552
534
  © 2024 gizmette.com
@@ -560,7 +542,7 @@ try {
560
542
  });
561
543
  } catch {
562
544
  }
563
- const bt = C.forwardRef(
545
+ const mt = I.forwardRef(
564
546
  ({
565
547
  children: e,
566
548
  disabled: t = !1,
@@ -569,40 +551,40 @@ const bt = C.forwardRef(
569
551
  fullWidth: o = !1,
570
552
  className: i,
571
553
  type: g = "button",
572
- raw: l = !1,
573
- noBorder: m = !1,
574
- "aria-label": u,
554
+ raw: n = !1,
555
+ noBorder: l = !1,
556
+ "aria-label": m,
575
557
  label: b,
576
558
  size: h = "medium",
577
559
  labelRight: c,
578
- labelLeft: n,
560
+ labelLeft: u,
579
561
  noBackground: p = !1,
580
- align: f = "center",
581
- active: w = !1,
582
- radius: N = "large",
562
+ align: v = "center",
563
+ active: _ = !1,
564
+ radius: w = "large",
583
565
  ...k
584
566
  }, x) => {
585
- const I = pe({
567
+ const N = ue({
586
568
  type: W,
587
569
  mode: r,
588
570
  focusMode: a,
589
571
  fullWidth: o,
590
572
  disabled: t,
591
- raw: l,
573
+ raw: n,
592
574
  className: i,
593
- noBorder: m,
575
+ noBorder: l,
594
576
  size: h,
595
577
  labelRight: c,
596
- labelLeft: n,
578
+ labelLeft: u,
597
579
  noBackground: p,
598
- align: f,
599
- radius: N
580
+ align: v,
581
+ radius: w
600
582
  }), T = d({
601
- "text-copy-accent-dark": r === "light" && !l,
602
- "text-copy-light": r === "dark" && !l,
603
- "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !l,
604
- "text-copy-light dark:text-copy-accent-dark": r === "system" && !l
605
- }), V = w ? d(
583
+ "text-copy-accent-dark": r === "light" && !n,
584
+ "text-copy-light": r === "dark" && !n,
585
+ "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !n,
586
+ "text-copy-light dark:text-copy-accent-dark": r === "system" && !n
587
+ }), z = _ ? d(
606
588
  "relative",
607
589
  "focus-within:static",
608
590
  "focus-within:after:border-transparent",
@@ -619,17 +601,17 @@ const bt = C.forwardRef(
619
601
  "after:border-table-light dark:after:border-table-dark": r === "alt-system"
620
602
  }
621
603
  ) : "";
622
- return /* @__PURE__ */ s("div", { className: V, children: /* @__PURE__ */ v(
604
+ return /* @__PURE__ */ s("div", { className: z, children: /* @__PURE__ */ f(
623
605
  F,
624
606
  {
625
607
  ref: x,
626
- className: I,
608
+ className: N,
627
609
  disabled: t,
628
610
  type: g,
629
- "aria-label": u || b,
611
+ "aria-label": m || b,
630
612
  ...k,
631
613
  children: [
632
- n && /* @__PURE__ */ s("span", { className: "pr-2", children: n }),
614
+ u && /* @__PURE__ */ s("span", { className: "pr-2", children: u }),
633
615
  /* @__PURE__ */ s("div", { className: T, children: e }),
634
616
  c && /* @__PURE__ */ s("span", { className: "pl-2", children: c })
635
617
  ]
@@ -637,8 +619,8 @@ const bt = C.forwardRef(
637
619
  ) });
638
620
  }
639
621
  );
640
- bt.displayName = "ButtonSort";
641
- const fe = ({
622
+ mt.displayName = "ButtonSort";
623
+ const be = ({
642
624
  children: e,
643
625
  fill: t,
644
626
  viewBox: r,
@@ -646,26 +628,26 @@ const fe = ({
646
628
  defaultViewBox: o,
647
629
  size: i,
648
630
  title: g,
649
- semantic: l = !1,
650
- ...m
631
+ semantic: n = !1,
632
+ ...l
651
633
  }) => {
652
- const u = d(i, a);
653
- return /* @__PURE__ */ v(O, { children: [
634
+ const m = d(i, a);
635
+ return /* @__PURE__ */ f(R, { children: [
654
636
  /* @__PURE__ */ s(
655
637
  "svg",
656
638
  {
657
639
  xmlns: "http://www.w3.org/2000/svg",
658
- className: u,
640
+ className: m,
659
641
  viewBox: r || o,
660
642
  fill: t || "currentColor",
661
643
  role: "img",
662
- "aria-hidden": !l,
644
+ "aria-hidden": !n,
663
645
  focusable: !1,
664
- ...m,
646
+ ...l,
665
647
  children: e
666
648
  }
667
649
  ),
668
- g && l && /* @__PURE__ */ s("span", { className: "sr-only", children: g })
650
+ g && n && /* @__PURE__ */ s("span", { className: "sr-only", children: g })
669
651
  ] });
670
652
  };
671
653
  /*!
@@ -681,14 +663,14 @@ try {
681
663
  });
682
664
  } catch {
683
665
  }
684
- const pt = ({
666
+ const ut = ({
685
667
  className: e,
686
668
  viewBox: t,
687
669
  title: r,
688
670
  monotone: a,
689
671
  ...o
690
- }) => /* @__PURE__ */ v(
691
- fe,
672
+ }) => /* @__PURE__ */ f(
673
+ be,
692
674
  {
693
675
  defaultViewBox: "0 0 448 512",
694
676
  size: "size-5",
@@ -707,14 +689,14 @@ const pt = ({
707
689
  /* @__PURE__ */ s("path", { d: "M337 175c9.4 9.4 9.4 24.6 0 33.9L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0z" })
708
690
  ]
709
691
  }
710
- ), yt = ({
692
+ ), ht = ({
711
693
  className: e,
712
694
  viewBox: t,
713
695
  title: r,
714
696
  monotone: a,
715
697
  ...o
716
698
  }) => /* @__PURE__ */ s(
717
- fe,
699
+ be,
718
700
  {
719
701
  defaultViewBox: "0 0 512 512",
720
702
  size: "size-5",
@@ -738,23 +720,23 @@ try {
738
720
  });
739
721
  } catch {
740
722
  }
741
- const ft = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", vt = ({ kind: e }) => d({
723
+ const bt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", pt = ({ kind: e }) => d({
742
724
  "bg-surface-lighter dark:bg-surface-dark": e === "left",
743
725
  "bg-surface-accent": e === "right"
744
- }), kt = ({ kind: e }) => d(
726
+ }), yt = ({ kind: e }) => d(
745
727
  "prose prose-dark dark:prose-lighter prose-p:my-3 prose-blockquote:my-3 prose-ol:my-3 prose-ul:my-3 prose-ul:prose-li:marker:text-black",
746
728
  {
747
729
  "text-copy-lighter": e === "right"
748
730
  }
749
- ), xt = ({ kind: e }) => d("rounded-b-xl", {
731
+ ), vt = ({ kind: e }) => d("rounded-b-xl", {
750
732
  "rounded-tr-xl": e === "left",
751
733
  "rounded-tl-xl": e === "right"
752
- }), Tt = ({
734
+ }), ft = ({
753
735
  kind: e,
754
736
  className: t
755
737
  }) => {
756
738
  const r = d(
757
- it,
739
+ rt,
758
740
  "flex items-start",
759
741
  {
760
742
  "flex-row-reverse": e === "right"
@@ -762,10 +744,10 @@ const ft = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", vt = ({ kind: e }) =>
762
744
  t
763
745
  ), a = d(
764
746
  "flex flex-col empty:hidden",
765
- ft(),
766
- kt({ kind: e }),
767
- vt({ kind: e }),
768
- xt({ kind: e })
747
+ bt(),
748
+ yt({ kind: e }),
749
+ pt({ kind: e }),
750
+ vt({ kind: e })
769
751
  ), o = "pr-2 pt-1 text-end text-xs text-copy-light", i = d("flex flex-col-reverse gap-2 sm:flex-row", {
770
752
  "ml-2": e === "left",
771
753
  "mr-2": e === "right"
@@ -776,7 +758,7 @@ const ft = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", vt = ({ kind: e }) =>
776
758
  footer: o,
777
759
  copyButton: i
778
760
  };
779
- }, _t = ({
761
+ }, kt = ({
780
762
  children: e,
781
763
  kind: t = "left",
782
764
  className: r,
@@ -784,65 +766,65 @@ const ft = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", vt = ({ kind: e }) =>
784
766
  rawFooter: o,
785
767
  copyToClipboard: i,
786
768
  copyToClipboardFocusMode: g = "system",
787
- copyToClipboardMode: l = "system"
769
+ copyToClipboardMode: n = "system"
788
770
  }) => {
789
- const [m, u] = A(!1), b = Tt({ kind: t, className: r }), h = !!i && (typeof i == "function" || typeof i == "string" || typeof e == "string"), c = () => {
790
- u(!0), typeof i == "function" ? i(e) : typeof i == "string" ? navigator.clipboard.writeText(i) : typeof e == "string" && navigator.clipboard.writeText(e);
771
+ const [l, m] = B(!1), b = ft({ kind: t, className: r }), h = !!i && (typeof i == "function" || typeof i == "string" || typeof e == "string"), c = () => {
772
+ m(!0), typeof i == "function" ? i(e) : typeof i == "string" ? navigator.clipboard.writeText(i) : typeof e == "string" && navigator.clipboard.writeText(e);
791
773
  };
792
- return _(() => {
793
- let n;
794
- return m && (n = window.setTimeout(() => {
795
- u(!1);
774
+ return E(() => {
775
+ let u;
776
+ return l && (u = window.setTimeout(() => {
777
+ m(!1);
796
778
  }, 3e3)), () => {
797
- clearTimeout(n);
779
+ clearTimeout(u);
798
780
  };
799
- }, [m]), /* @__PURE__ */ v("div", { className: b.wrapper, children: [
800
- /* @__PURE__ */ v("div", { children: [
781
+ }, [l]), /* @__PURE__ */ f("div", { className: b.wrapper, children: [
782
+ /* @__PURE__ */ f("div", { children: [
801
783
  /* @__PURE__ */ s("div", { className: b.main, children: e }),
802
- a && Object.keys(a).map((n) => a[n] ? /* @__PURE__ */ s("div", { className: "prose-p:m-0", children: /* @__PURE__ */ v("p", { className: b.footer, children: [
803
- n,
784
+ a && Object.keys(a).map((u) => a[u] ? /* @__PURE__ */ s("div", { className: "prose-p:m-0", children: /* @__PURE__ */ f("p", { className: b.footer, children: [
785
+ u,
804
786
  ": ",
805
- a[n]
806
- ] }) }, `-${n}`) : null),
787
+ a[u]
788
+ ] }) }, `-${u}`) : null),
807
789
  o && o
808
790
  ] }),
809
791
  h && /* @__PURE__ */ s("div", { className: b.copyButton, children: /* @__PURE__ */ s(
810
- ye,
792
+ he,
811
793
  {
812
794
  noBorder: !0,
813
795
  noBackground: !0,
814
796
  size: "small",
815
- mode: l,
797
+ mode: n,
816
798
  focusMode: g,
817
- label: m ? "Copied to clipboard" : "Copy to clipboard",
799
+ label: l ? "Copied to clipboard" : "Copy to clipboard",
818
800
  onClick: c,
819
- disabled: m,
820
- children: m ? /* @__PURE__ */ s(pt, { size: "size-3" }) : /* @__PURE__ */ s(yt, { size: "size-3" })
801
+ disabled: l,
802
+ children: l ? /* @__PURE__ */ s(ut, { size: "size-3" }) : /* @__PURE__ */ s(ht, { size: "size-3" })
821
803
  }
822
804
  ) })
823
805
  ] });
824
- }, re = "av-button", ve = "icon", ke = "button", wt = "link", Nt = ({
806
+ }, te = "av-button", pe = "icon", ye = "button", xt = "link", Tt = ({
825
807
  type: e,
826
808
  size: t,
827
809
  labelRight: r,
828
810
  labelLeft: a,
829
811
  align: o
830
812
  }) => {
831
- const i = "text-sm font-medium max-h-8 py-0 px-2", g = "text-base font-medium max-h-9 py-1 px-3", l = "text-lg font-medium max-h-12 py-2 px-4";
813
+ const i = "text-sm font-medium max-h-8 py-0 px-2", g = "text-base font-medium max-h-9 py-1 px-3", n = "text-lg font-medium max-h-12 py-2 px-4";
832
814
  switch (e) {
833
- case ke:
815
+ case ye:
834
816
  return d({
835
817
  [i]: t === "small",
836
818
  [g]: t === "medium",
837
- [l]: t === "large"
819
+ [n]: t === "large"
838
820
  });
839
- case wt:
821
+ case xt:
840
822
  return d("text-center", {
841
823
  [i]: t === "small",
842
824
  [g]: t === "medium",
843
- [l]: t === "large"
825
+ [n]: t === "large"
844
826
  });
845
- case ve:
827
+ case pe:
846
828
  return d("inline-flex items-center", {
847
829
  "justify-center": o === "center",
848
830
  "justify-start": o === "left",
@@ -855,7 +837,7 @@ const ft = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", vt = ({ kind: e }) =>
855
837
  "h-12 px-4 text-lg font-medium": t === "large" && (r || a)
856
838
  });
857
839
  }
858
- }, It = ({
840
+ }, _t = ({
859
841
  mode: e,
860
842
  noBackground: t,
861
843
  noTruncate: r,
@@ -912,7 +894,7 @@ const ft = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", vt = ({ kind: e }) =>
912
894
  "bg-action-selected-dark text-copy-light dark:bg-action-selected-light dark:text-copy-lighter": e === "system",
913
895
  "bg-action-selected-light text-copy-lighter dark:bg-action-selected-dark dark:text-copy-light": e === "alt-system"
914
896
  });
915
- }, Et = ({
897
+ }, wt = ({
916
898
  mode: e,
917
899
  disabled: t,
918
900
  variant: r
@@ -947,7 +929,7 @@ const ft = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", vt = ({ kind: e }) =>
947
929
  "hover:bg-action-selected-dark-hover dark:hover:bg-action-selected-light-hover": e === "system",
948
930
  "hover:bg-action-selected-light-hover dark:hover:bg-action-selected-dark-hover": e === "alt-system"
949
931
  });
950
- }, Ct = ({
932
+ }, Nt = ({
951
933
  mode: e,
952
934
  disabled: t,
953
935
  variant: r
@@ -982,7 +964,7 @@ const ft = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", vt = ({ kind: e }) =>
982
964
  "active:bg-action-selected-dark-active dark:active:bg-action-selected-light-active": e === "system",
983
965
  "active:bg-action-selected-light-active dark:active:bg-action-selected-dark-active": e === "alt-system"
984
966
  });
985
- }, St = ({
967
+ }, Et = ({
986
968
  mode: e,
987
969
  noBorder: t,
988
970
  variant: r
@@ -1017,14 +999,14 @@ const ft = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", vt = ({ kind: e }) =>
1017
999
  "border-border-selected-dark dark:border-border-selected-medium": e === "system",
1018
1000
  "border-border-selected-medium dark:border-border-selected-dark": e === "alt-system"
1019
1001
  });
1020
- }, Rt = ({
1002
+ }, It = ({
1021
1003
  focusMode: e
1022
1004
  }) => d("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
1023
1005
  "focus:outline-focus-dark": e === "dark",
1024
1006
  "focus:outline-focus-light": e === "light",
1025
1007
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
1026
1008
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
1027
- }), xe = ({
1009
+ }), ve = ({
1028
1010
  type: e,
1029
1011
  className: t,
1030
1012
  raw: r,
@@ -1032,58 +1014,58 @@ const ft = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", vt = ({ kind: e }) =>
1032
1014
  focusMode: o,
1033
1015
  disabled: i,
1034
1016
  fullWidth: g,
1035
- size: l,
1036
- noBorder: m,
1037
- labelRight: u,
1017
+ size: n,
1018
+ noBorder: l,
1019
+ labelRight: m,
1038
1020
  labelLeft: b,
1039
1021
  noBackground: h,
1040
1022
  variant: c,
1041
- noTruncate: n,
1023
+ noTruncate: u,
1042
1024
  align: p,
1043
- radius: f
1044
- }) => (c || (c = "primary"), r ? d(re, t) : d(
1045
- re,
1046
- It({
1025
+ radius: v
1026
+ }) => (c || (c = "primary"), r ? d(te, t) : d(
1027
+ te,
1028
+ _t({
1047
1029
  mode: a,
1048
1030
  variant: c,
1049
1031
  noBackground: h,
1050
- noTruncate: n,
1051
- radius: f
1032
+ noTruncate: u,
1033
+ radius: v
1052
1034
  }),
1053
- Nt({
1035
+ Tt({
1054
1036
  type: e,
1055
- size: l,
1056
- labelRight: u,
1037
+ size: n,
1038
+ labelRight: m,
1057
1039
  labelLeft: b,
1058
1040
  align: p
1059
1041
  }),
1060
- St({ mode: a, variant: c, noBorder: m }),
1061
- Rt({ focusMode: o }),
1062
- Et({ mode: a, variant: c, disabled: i }),
1063
- Ct({ mode: a, variant: c, disabled: i }),
1042
+ Et({ mode: a, variant: c, noBorder: l }),
1043
+ It({ focusMode: o }),
1044
+ wt({ mode: a, variant: c, disabled: i }),
1045
+ Nt({ mode: a, variant: c, disabled: i }),
1064
1046
  {
1065
1047
  "w-full": g,
1066
1048
  "disabled:cursor-not-allowed disabled:opacity-50": i
1067
1049
  },
1068
1050
  t
1069
- )), Bt = (e, t, r) => {
1051
+ )), Ct = (e, t, r) => {
1070
1052
  var a;
1071
1053
  !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 r == "function" && r(e);
1072
- }, K = C.forwardRef((e, t) => {
1054
+ }, K = I.forwardRef((e, t) => {
1073
1055
  const { onClick: r, noInternalClick: a = !1, ...o } = e;
1074
1056
  return /* @__PURE__ */ s(
1075
1057
  "button",
1076
1058
  {
1077
1059
  ref: t,
1078
1060
  onClick: (i) => {
1079
- Bt(i, a, r);
1061
+ Ct(i, a, r);
1080
1062
  },
1081
1063
  ...o
1082
1064
  }
1083
1065
  );
1084
1066
  });
1085
1067
  K.displayName = "BaseButton";
1086
- const Te = C.forwardRef(
1068
+ const fe = I.forwardRef(
1087
1069
  ({
1088
1070
  children: e,
1089
1071
  disabled: t = !1,
@@ -1092,31 +1074,31 @@ const Te = C.forwardRef(
1092
1074
  fullWidth: o = !1,
1093
1075
  className: i,
1094
1076
  size: g = "medium",
1095
- raw: l = !1,
1096
- noBorder: m = !1,
1097
- variant: u = "primary",
1077
+ raw: n = !1,
1078
+ noBorder: l = !1,
1079
+ variant: m = "primary",
1098
1080
  noTruncate: b = !1,
1099
1081
  radius: h = "large",
1100
1082
  ...c
1101
- }, n) => {
1102
- const p = xe({
1103
- type: ke,
1083
+ }, u) => {
1084
+ const p = ve({
1085
+ type: ye,
1104
1086
  mode: r,
1105
1087
  focusMode: a,
1106
1088
  fullWidth: o,
1107
1089
  disabled: t,
1108
- raw: l,
1090
+ raw: n,
1109
1091
  className: i,
1110
1092
  size: g,
1111
- noBorder: m,
1112
- variant: u,
1093
+ noBorder: l,
1094
+ variant: m,
1113
1095
  noTruncate: b,
1114
1096
  radius: h
1115
1097
  });
1116
1098
  return /* @__PURE__ */ s(
1117
1099
  K,
1118
1100
  {
1119
- ref: n,
1101
+ ref: u,
1120
1102
  className: p,
1121
1103
  disabled: t,
1122
1104
  ...c,
@@ -1125,7 +1107,7 @@ const Te = C.forwardRef(
1125
1107
  );
1126
1108
  }
1127
1109
  );
1128
- Te.displayName = "Button";
1110
+ fe.displayName = "Button";
1129
1111
  /*!
1130
1112
  @versini/ui-button v3.2.0
1131
1113
  © 2024 gizmette.com
@@ -1139,7 +1121,7 @@ try {
1139
1121
  });
1140
1122
  } catch {
1141
1123
  }
1142
- const At = C.forwardRef(
1124
+ const St = I.forwardRef(
1143
1125
  ({
1144
1126
  children: e,
1145
1127
  disabled: t = !1,
@@ -1148,40 +1130,40 @@ const At = C.forwardRef(
1148
1130
  fullWidth: o = !1,
1149
1131
  className: i,
1150
1132
  type: g = "button",
1151
- raw: l = !1,
1152
- noBorder: m = !1,
1153
- "aria-label": u,
1133
+ raw: n = !1,
1134
+ noBorder: l = !1,
1135
+ "aria-label": m,
1154
1136
  label: b,
1155
1137
  size: h = "medium",
1156
1138
  labelRight: c,
1157
- labelLeft: n,
1139
+ labelLeft: u,
1158
1140
  noBackground: p = !1,
1159
- align: f = "center",
1160
- active: w = !1,
1161
- radius: N = "large",
1141
+ align: v = "center",
1142
+ active: _ = !1,
1143
+ radius: w = "large",
1162
1144
  ...k
1163
1145
  }, x) => {
1164
- const I = xe({
1165
- type: ve,
1146
+ const N = ve({
1147
+ type: pe,
1166
1148
  mode: r,
1167
1149
  focusMode: a,
1168
1150
  fullWidth: o,
1169
1151
  disabled: t,
1170
- raw: l,
1152
+ raw: n,
1171
1153
  className: i,
1172
- noBorder: m,
1154
+ noBorder: l,
1173
1155
  size: h,
1174
1156
  labelRight: c,
1175
- labelLeft: n,
1157
+ labelLeft: u,
1176
1158
  noBackground: p,
1177
- align: f,
1178
- radius: N
1159
+ align: v,
1160
+ radius: w
1179
1161
  }), T = d({
1180
- "text-copy-accent-dark": r === "light" && !l,
1181
- "text-copy-light": r === "dark" && !l,
1182
- "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !l,
1183
- "text-copy-light dark:text-copy-accent-dark": r === "system" && !l
1184
- }), V = w ? d(
1162
+ "text-copy-accent-dark": r === "light" && !n,
1163
+ "text-copy-light": r === "dark" && !n,
1164
+ "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !n,
1165
+ "text-copy-light dark:text-copy-accent-dark": r === "system" && !n
1166
+ }), z = _ ? d(
1185
1167
  "relative",
1186
1168
  "focus-within:static",
1187
1169
  "focus-within:after:border-transparent",
@@ -1198,17 +1180,17 @@ const At = C.forwardRef(
1198
1180
  "after:border-table-light dark:after:border-table-dark": r === "alt-system"
1199
1181
  }
1200
1182
  ) : "";
1201
- return /* @__PURE__ */ s("div", { className: V, children: /* @__PURE__ */ v(
1183
+ return /* @__PURE__ */ s("div", { className: z, children: /* @__PURE__ */ f(
1202
1184
  K,
1203
1185
  {
1204
1186
  ref: x,
1205
- className: I,
1187
+ className: N,
1206
1188
  disabled: t,
1207
1189
  type: g,
1208
- "aria-label": u || b,
1190
+ "aria-label": m || b,
1209
1191
  ...k,
1210
1192
  children: [
1211
- n && /* @__PURE__ */ s("span", { className: "pr-2", children: n }),
1193
+ u && /* @__PURE__ */ s("span", { className: "pr-2", children: u }),
1212
1194
  /* @__PURE__ */ s("div", { className: T, children: e }),
1213
1195
  c && /* @__PURE__ */ s("span", { className: "pl-2", children: c })
1214
1196
  ]
@@ -1216,10 +1198,10 @@ const At = C.forwardRef(
1216
1198
  ) });
1217
1199
  }
1218
1200
  );
1219
- At.displayName = "ButtonSort";
1220
- const Mt = 200, Lt = ({
1201
+ St.displayName = "ButtonSort";
1202
+ const Rt = 200, Bt = ({
1221
1203
  string: e,
1222
- idealLength: t = Mt
1204
+ idealLength: t = Rt
1223
1205
  }) => {
1224
1206
  if (e.length <= t)
1225
1207
  return { string: e, isTruncated: !1 };
@@ -1230,30 +1212,30 @@ const Mt = 200, Lt = ({
1230
1212
  string: e.slice(0, t + r),
1231
1213
  isTruncated: !0
1232
1214
  };
1233
- }, Ot = ({
1215
+ }, At = ({
1234
1216
  children: e,
1235
1217
  length: t = 200,
1236
1218
  mode: r = "system",
1237
1219
  focusMode: a = "system"
1238
1220
  }) => {
1239
- const [o, i] = A(!1);
1221
+ const [o, i] = B(!1);
1240
1222
  if (typeof e != "string")
1241
1223
  return e;
1242
- const { string: g, isTruncated: l } = Lt({
1224
+ const { string: g, isTruncated: n } = Bt({
1243
1225
  string: e,
1244
1226
  idealLength: t
1245
1227
  });
1246
- return /* @__PURE__ */ v("span", { style: { wordBreak: "break-word" }, children: [
1228
+ return /* @__PURE__ */ f("span", { style: { wordBreak: "break-word" }, children: [
1247
1229
  o ? e : g,
1248
- l && /* @__PURE__ */ s(
1249
- Te,
1230
+ n && /* @__PURE__ */ s(
1231
+ fe,
1250
1232
  {
1251
1233
  mode: r,
1252
1234
  focusMode: a,
1253
1235
  className: "ml-2",
1254
1236
  size: "small",
1255
- onClick: (m) => {
1256
- m.preventDefault(), i(!o);
1237
+ onClick: (l) => {
1238
+ l.preventDefault(), i(!o);
1257
1239
  },
1258
1240
  children: o ? "less..." : "more..."
1259
1241
  }
@@ -1273,302 +1255,283 @@ try {
1273
1255
  });
1274
1256
  } catch {
1275
1257
  }
1276
- const ae = Fe(
1258
+ const re = Pe(
1277
1259
  () => import(
1278
1260
  /* webpackChunkName: "LazyMessageAssistant" */
1279
- "./LazyMessageAssistant.BkIqe55j.js"
1261
+ "./LazyMessageAssistant.O9mWlBe_.js"
1280
1262
  ).then((e) => e.LazyMessageAssistant)
1281
- ), zt = () => {
1282
- const { state: e } = R(U);
1283
- return /* @__PURE__ */ v(O, { children: [
1263
+ ), Mt = () => {
1264
+ const { state: e } = L(H);
1265
+ return /* @__PURE__ */ f(R, { children: [
1284
1266
  e && e.messages.length > 0 && e.messages.map((t, r) => {
1285
1267
  const { role: a, content: o, name: i, processingTime: g } = t.message;
1286
- return (a === E || a === H) && o ? /* @__PURE__ */ s(Z, { fallback: /* @__PURE__ */ s("span", {}), children: /* @__PURE__ */ s(
1287
- ae,
1268
+ return (a === S || a === G) && o ? /* @__PURE__ */ s(X, { fallback: /* @__PURE__ */ s("span", {}), children: /* @__PURE__ */ s(
1269
+ re,
1288
1270
  {
1289
1271
  name: i,
1290
1272
  processingTime: g,
1291
1273
  children: o
1292
1274
  }
1293
- ) }, `${r}-${a}`) : a === G && o ? /* @__PURE__ */ s(
1294
- _t,
1275
+ ) }, `${r}-${a}`) : a === D && o ? /* @__PURE__ */ s(
1276
+ kt,
1295
1277
  {
1296
1278
  kind: "right",
1297
1279
  copyToClipboard: o,
1298
1280
  copyToClipboardFocusMode: "light",
1299
- children: /* @__PURE__ */ s(Ot, { mode: "light", focusMode: "light", children: o })
1281
+ children: /* @__PURE__ */ s(At, { mode: "light", focusMode: "light", children: o })
1300
1282
  },
1301
1283
  `${r}-${a}`
1302
1284
  ) : null;
1303
1285
  }),
1304
- me(G, e) && /* @__PURE__ */ s(Z, { fallback: /* @__PURE__ */ s("span", {}), children: /* @__PURE__ */ s(ae, { loading: !0 }) })
1286
+ Ne(D, e) && /* @__PURE__ */ s(X, { fallback: /* @__PURE__ */ s("span", {}), children: /* @__PURE__ */ s(re, { loading: !0 }) })
1305
1287
  ] });
1306
- }, Ut = () => {
1307
- const { isAuthenticated: e } = z(), t = Ce(e);
1308
- return /* @__PURE__ */ s(O, { children: /* @__PURE__ */ v("div", { className: t, children: [
1309
- /* @__PURE__ */ s(Se, {}),
1310
- /* @__PURE__ */ s(zt, {})
1288
+ }, Lt = () => {
1289
+ const { isAuthenticated: e } = O(), t = Ee(e);
1290
+ return /* @__PURE__ */ s(R, { children: /* @__PURE__ */ f("div", { className: t, children: [
1291
+ /* @__PURE__ */ s(Ie, {}),
1292
+ /* @__PURE__ */ s(Mt, {})
1311
1293
  ] }) });
1312
- }, L = (e, t) => {
1294
+ }, M = (e, t) => {
1313
1295
  e({
1314
- type: ne,
1296
+ type: de,
1315
1297
  payload: {
1316
1298
  streaming: t
1317
1299
  }
1318
1300
  });
1319
- }, oe = (e) => {
1320
- L(e, !1), e({
1321
- type: S,
1301
+ }, ae = (e) => {
1302
+ M(e, !1), e({
1303
+ type: C,
1322
1304
  payload: {
1323
1305
  message: {
1324
- role: H,
1325
- content: Le
1306
+ role: G,
1307
+ content: Ae
1326
1308
  }
1327
1309
  }
1328
1310
  });
1329
- }, Vt = () => {
1330
- const { state: e, dispatch: t } = R(U), { state: r, dispatch: a } = R(j), [o, i] = A(""), { getAccessToken: g, user: l } = z(), m = B(null), u = B(
1311
+ }, Ot = () => {
1312
+ const { state: e, dispatch: t } = L(H), { state: r, dispatch: a } = L(j), [o, i] = B(""), { getAccessToken: g, user: n } = O(), l = $(null), m = $(
1331
1313
  null
1332
1314
  );
1333
- _(() => {
1315
+ E(() => {
1334
1316
  (async () => {
1335
1317
  var c;
1336
1318
  if (!e || e.messages.length === 0) {
1337
- (c = u == null ? void 0 : u.current) == null || c.cancel();
1319
+ (c = m == null ? void 0 : m.current) == null || c.cancel();
1338
1320
  return;
1339
1321
  }
1340
1322
  const h = e.messages[e.messages.length - 1];
1341
- if (!(e.messages.length === 0 || h.message.role === E || h.message.role === Re || h.message.role === H || h.message.role === Be))
1323
+ if (!(e.messages.length === 0 || h.message.role === S || h.message.role === Ce || h.message.role === G || h.message.role === Se))
1342
1324
  try {
1343
- const n = await Ge({
1325
+ const u = await Ve({
1344
1326
  accessToken: await g(),
1345
1327
  name: "generate",
1346
1328
  data: {
1347
1329
  messages: e.messages,
1348
- model: e.engine || M,
1349
- user: (l == null ? void 0 : l.username) || "",
1330
+ model: e.engine || A,
1331
+ user: (n == null ? void 0 : n.username) || "",
1350
1332
  id: e.id,
1351
1333
  usage: e.usage
1352
1334
  }
1353
1335
  });
1354
- if (n && n.ok) {
1336
+ if (u && u.ok) {
1355
1337
  const p = P();
1356
- u.current = n.body.getReader();
1357
- const f = new TextDecoder();
1338
+ m.current = u.body.getReader();
1339
+ const v = new TextDecoder();
1358
1340
  for (; ; ) {
1359
- L(t, !0);
1360
- const { done: w, value: N } = await u.current.read();
1361
- if (w) {
1362
- L(t, !1);
1341
+ M(t, !0);
1342
+ const { done: _, value: w } = await m.current.read();
1343
+ if (_) {
1344
+ M(t, !1);
1363
1345
  break;
1364
1346
  }
1365
- const k = f.decode(N, { stream: !0 }), x = k.indexOf(Y);
1347
+ const k = v.decode(w, { stream: !0 }), x = k.indexOf(Y);
1366
1348
  if (x !== -1) {
1367
- const I = k.substring(0, x), T = JSON.parse(
1349
+ const N = k.substring(0, x), T = JSON.parse(
1368
1350
  k.substring(x + Y.length)
1369
1351
  );
1370
1352
  t({
1371
- type: de,
1353
+ type: oe,
1372
1354
  payload: {
1373
1355
  model: T.model,
1374
1356
  usage: T.usage
1375
1357
  }
1376
1358
  }), t({
1377
- type: S,
1359
+ type: C,
1378
1360
  payload: {
1379
1361
  message: {
1380
- content: I,
1381
- role: E,
1362
+ content: N,
1363
+ role: S,
1382
1364
  messageId: p,
1383
1365
  processingTime: T.processingTime,
1384
1366
  name: T.name
1385
1367
  }
1386
1368
  }
1387
- }), L(t, !1);
1369
+ }), M(t, !1);
1388
1370
  break;
1389
1371
  } else
1390
1372
  t({
1391
- type: S,
1373
+ type: C,
1392
1374
  payload: {
1393
1375
  message: {
1394
1376
  content: k,
1395
- role: E,
1377
+ role: S,
1396
1378
  messageId: p
1397
1379
  }
1398
1380
  }
1399
1381
  });
1400
1382
  }
1401
1383
  } else
1402
- oe(t);
1403
- } catch (n) {
1404
- console.error(n), oe(t);
1384
+ ae(t);
1385
+ } catch (u) {
1386
+ console.error(u), ae(t);
1405
1387
  }
1406
1388
  })();
1407
1389
  }, [e == null ? void 0 : e.messages]);
1408
1390
  const b = async (h) => {
1409
1391
  h.preventDefault(), t({
1410
- type: S,
1392
+ type: C,
1411
1393
  payload: {
1412
1394
  message: {
1413
- role: G,
1395
+ role: D,
1414
1396
  content: o
1415
1397
  }
1416
1398
  }
1417
1399
  }), i("");
1418
1400
  };
1419
- return _(() => {
1401
+ return E(() => {
1420
1402
  if (r.tag !== "") {
1421
1403
  const h = r.tag.endsWith(":") && !r.tag.endsWith(": ") ? r.tag + " " : r.tag;
1422
- h.indexOf(q) !== -1 ? navigator.clipboard.readText().then((n) => {
1423
- i(h.replace(q, n));
1424
- }) : i(h), m.current && m.current.focus(), a({
1425
- type: ce
1404
+ h.indexOf(q) !== -1 ? navigator.clipboard.readText().then((u) => {
1405
+ i(h.replace(q, u));
1406
+ }) : i(h), l.current && l.current.focus(), a({
1407
+ type: ne
1426
1408
  });
1427
1409
  }
1428
- }, [r, a]), _(() => {
1429
- e && e.usage === 0 && e.messages.length === 0 && m.current && m.current.focus();
1430
- }, [e]), /* @__PURE__ */ s("form", { className: "mt-2", onSubmit: b, children: /* @__PURE__ */ s(
1431
- He,
1432
- {
1433
- mode: "dark",
1434
- focusMode: "light",
1435
- ref: m,
1436
- name: "chat-input",
1437
- label: Ae,
1438
- helperText: "Press ENTER to add a new line",
1439
- helperTextOnFocus: !0,
1440
- required: !0,
1441
- value: o,
1442
- onChange: (h) => i(h.target.value),
1443
- onKeyDown: Je([["mod+Enter", b]]),
1444
- rightElement: /* @__PURE__ */ s(
1445
- ue,
1446
- {
1447
- disabled: e == null ? void 0 : e.streaming,
1448
- noBorder: !0,
1449
- type: "submit",
1450
- mode: "light",
1451
- focusMode: "light",
1452
- children: Me
1453
- }
1454
- )
1455
- }
1456
- ) });
1457
- }, Dt = () => {
1458
- const { dispatch: e, state: t } = R(U), { dispatch: r, state: a } = R(j), { getAccessToken: o, user: i } = z(), [g, l] = A({
1410
+ }, [r, a]), E(() => {
1411
+ e && e.usage === 0 && e.messages.length === 0 && l.current && l.current.focus();
1412
+ }, [e]), /* @__PURE__ */ f(R, { children: [
1413
+ e != null && e.streaming ? /* @__PURE__ */ s(De, { size: "size-4" }) : null,
1414
+ /* @__PURE__ */ s("form", { className: "mt-2", onSubmit: b, children: /* @__PURE__ */ s(
1415
+ $e,
1416
+ {
1417
+ mode: "dark",
1418
+ focusMode: "light",
1419
+ ref: l,
1420
+ name: "chat-input",
1421
+ label: Re,
1422
+ helperText: "Press ENTER to add a new line",
1423
+ helperTextOnFocus: !0,
1424
+ required: !0,
1425
+ value: o,
1426
+ onChange: (h) => i(h.target.value),
1427
+ onKeyDown: Ye([["mod+Enter", b]]),
1428
+ leftElement: /* @__PURE__ */ s(Ge, {}),
1429
+ rightElement: /* @__PURE__ */ s(
1430
+ ce,
1431
+ {
1432
+ disabled: e == null ? void 0 : e.streaming,
1433
+ noBorder: !0,
1434
+ type: "submit",
1435
+ mode: "light",
1436
+ focusMode: "light",
1437
+ children: Be
1438
+ }
1439
+ )
1440
+ }
1441
+ ) })
1442
+ ] });
1443
+ }, zt = () => {
1444
+ const { dispatch: e, state: t } = L(j), { getAccessToken: r, user: a } = O(), [o, i] = B({
1459
1445
  loaded: !1
1460
- }), m = "mt-2 flex justify-center rounded-md", u = B(null), b = B(!1), h = (n) => {
1461
- n.preventDefault(), e({
1462
- type: ie
1463
- });
1464
- };
1465
- _(() => {
1466
- var n;
1467
- (t == null ? void 0 : t.streaming) === !0 && !b.current && u.current && (b.current = !0, u.current.focus()), (t == null ? void 0 : t.streaming) === !1 && (b.current = !1, (n = u.current) == null || n.blur());
1468
- }, [t]);
1469
- const c = (n, p) => {
1470
- n.preventDefault(), r({
1471
- type: ge,
1446
+ }), g = "mt-2 flex justify-center rounded-md", n = (l, m) => {
1447
+ l.preventDefault(), e({
1448
+ type: le,
1472
1449
  payload: {
1473
- tag: p
1450
+ tag: m
1474
1451
  }
1475
1452
  });
1476
1453
  };
1477
- return _(() => {
1478
- if (!i) {
1479
- l({
1454
+ return E(() => {
1455
+ if (!a) {
1456
+ i({
1480
1457
  loaded: !1
1481
1458
  });
1482
1459
  return;
1483
1460
  }
1484
- g.loaded || (async () => {
1461
+ o.loaded || (async () => {
1485
1462
  try {
1486
- const n = await he({
1487
- accessToken: await o(),
1488
- type: be.GET_USER_PREFERENCES,
1463
+ const l = await ge({
1464
+ accessToken: await r(),
1465
+ type: me.GET_USER_PREFERENCES,
1489
1466
  params: {
1490
- user: i.username
1467
+ user: a.username
1491
1468
  }
1492
1469
  });
1493
- n.status === 200 && (r({
1494
- type: le,
1470
+ l.status === 200 && (e({
1471
+ type: se,
1495
1472
  payload: {
1496
- tags: n.data.tags || []
1473
+ tags: l.data.tags || []
1497
1474
  }
1498
- }), l({
1475
+ }), i({
1499
1476
  loaded: !0
1500
1477
  }));
1501
1478
  } catch {
1502
1479
  }
1503
1480
  })();
1504
- }, [i]), /* @__PURE__ */ v(O, { children: [
1505
- /* @__PURE__ */ s(Oe, { alignHorizontal: "center", columnGap: 2, children: g && g.loaded && a.tags && a.tags.map((n) => n.enabled && n.label && n.content && /* @__PURE__ */ s(ze, { children: /* @__PURE__ */ s("div", { className: m, children: /* @__PURE__ */ s(
1506
- ue,
1507
- {
1508
- noBorder: !0,
1509
- mode: "dark",
1510
- focusMode: "light",
1511
- size: "small",
1512
- onClick: (p) => c(p, n.content),
1513
- children: n.label
1514
- }
1515
- ) }) }, `tag-button-${n.slot}`)) }),
1516
- me(E, t) && /* @__PURE__ */ s("div", { className: m, children: /* @__PURE__ */ s(
1517
- Ue,
1518
- {
1519
- noBorder: !0,
1520
- mode: "dark",
1521
- focusMode: "light",
1522
- ref: u,
1523
- onClick: h,
1524
- labelRight: t != null && t.streaming ? X.ACTION_WHILE_STREAMING.content : X.ACTION_WHILE_NOT_STREAMING.content,
1525
- children: t != null && t.streaming ? /* @__PURE__ */ s(Ke, { size: "size-4" }) : /* @__PURE__ */ s(je, { size: "size-4" })
1526
- }
1527
- ) })
1528
- ] });
1481
+ }, [a]), /* @__PURE__ */ s(R, { children: /* @__PURE__ */ s(Me, { alignHorizontal: "center", columnGap: 2, children: o && o.loaded && t.tags && t.tags.map((l) => l.enabled && l.label && l.content && /* @__PURE__ */ s(Le, { children: /* @__PURE__ */ s("div", { className: g, children: /* @__PURE__ */ s(
1482
+ ce,
1483
+ {
1484
+ noBorder: !0,
1485
+ mode: "dark",
1486
+ focusMode: "light",
1487
+ size: "small",
1488
+ onClick: (m) => n(m, l.content),
1489
+ children: l.label
1490
+ }
1491
+ ) }) }, `tag-button-${l.slot}`)) }) });
1529
1492
  };
1530
- function _e({ isComponent: e = !1 }) {
1531
- const t = B(!1), { getAccessToken: r, user: a } = z(), [o] = Q({
1532
- key: J + De,
1493
+ function ke({ isComponent: e = !1 }) {
1494
+ const t = $(!1), { getAccessToken: r, user: a } = O(), [o] = Q({
1495
+ key: J + ze,
1533
1496
  initialValue: ""
1534
1497
  }), [i] = Q({
1535
- key: J + $e,
1536
- initialValue: We.ASC
1537
- }), [g, l] = D(rt, {
1498
+ key: J + Ue,
1499
+ initialValue: je.ASC
1500
+ }), [g, n] = U(Ze, {
1538
1501
  id: P(),
1539
- model: M,
1540
- engine: M,
1502
+ model: A,
1503
+ engine: A,
1541
1504
  usage: 0,
1542
1505
  messages: [],
1543
1506
  tags: [],
1544
1507
  isComponent: e
1545
- }), [m, u] = D(at, {
1508
+ }), [l, m] = U(et, {
1546
1509
  searchString: o,
1547
1510
  sortedCell: "timestamp",
1548
1511
  sortDirection: i
1549
- }), [b, h] = D(ot, {
1512
+ }), [b, h] = U(tt, {
1550
1513
  tag: "",
1551
1514
  tags: []
1552
- }), [c, n] = A({
1515
+ }), [c, u] = B({
1553
1516
  version: "",
1554
1517
  models: [],
1555
1518
  plugins: [],
1556
- engine: M,
1519
+ engine: A,
1557
1520
  engines: []
1558
1521
  });
1559
- return _(() => {
1522
+ return E(() => {
1560
1523
  c.version !== "" || t.current || (async () => {
1561
1524
  try {
1562
1525
  t.current = !0;
1563
- const p = await he({
1526
+ const p = await ge({
1564
1527
  accessToken: await r(),
1565
- type: be.ABOUT,
1528
+ type: me.ABOUT,
1566
1529
  params: {
1567
1530
  user: a == null ? void 0 : a.username
1568
1531
  }
1569
1532
  });
1570
- t.current = !1, p.status === 200 && (n(p.data), l({
1571
- type: se,
1533
+ t.current = !1, p.status === 200 && (u(p.data), n({
1534
+ type: ie,
1572
1535
  payload: {
1573
1536
  engine: p.data.engine
1574
1537
  }
@@ -1576,28 +1539,28 @@ function _e({ isComponent: e = !1 }) {
1576
1539
  } catch {
1577
1540
  }
1578
1541
  })();
1579
- }, [c, r, a]), _(() => {
1542
+ }, [c, r, a]), E(() => {
1580
1543
  var p;
1581
1544
  (p = document.getElementById("logo")) == null || p.classList.add("fadeOut"), setTimeout(() => {
1582
- var f;
1583
- (f = document.getElementById("root")) == null || f.classList.replace("app-hidden", "fadeIn");
1545
+ var v;
1546
+ (v = document.getElementById("root")) == null || v.classList.replace("app-hidden", "fadeIn");
1584
1547
  }, 500);
1585
- }), /* @__PURE__ */ s(U.Provider, { value: { state: g, dispatch: l, serverStats: c }, children: /* @__PURE__ */ s(
1586
- Pe.Provider,
1548
+ }), /* @__PURE__ */ s(H.Provider, { value: { state: g, dispatch: n, serverStats: c }, children: /* @__PURE__ */ s(
1549
+ He.Provider,
1587
1550
  {
1588
1551
  value: {
1589
- state: m,
1590
- dispatch: u
1552
+ state: l,
1553
+ dispatch: m
1591
1554
  },
1592
- children: /* @__PURE__ */ v(
1555
+ children: /* @__PURE__ */ f(
1593
1556
  j.Provider,
1594
1557
  {
1595
1558
  value: { state: b, dispatch: h },
1596
1559
  children: [
1597
- /* @__PURE__ */ s(Ve, { className: "max-h-[calc(100svh_-_203px)]", children: /* @__PURE__ */ s(Ut, {}) }),
1598
- /* @__PURE__ */ v("div", { className: "md:mx-auto md:max-w-4xl w-11/12 fixed bottom-10 left-1/2 transform -translate-x-1/2 z-1000", children: [
1599
- /* @__PURE__ */ s(Dt, {}),
1600
- /* @__PURE__ */ s(Vt, {})
1560
+ /* @__PURE__ */ s(Oe, { className: "max-h-[calc(100svh_-_163px)]", children: /* @__PURE__ */ s(Lt, {}) }),
1561
+ /* @__PURE__ */ f("div", { className: "md:mx-auto md:max-w-4xl w-11/12 fixed bottom-10 left-1/2 transform -translate-x-1/2 z-1000", children: [
1562
+ /* @__PURE__ */ s(zt, {}),
1563
+ /* @__PURE__ */ s(Ot, {})
1601
1564
  ] })
1602
1565
  ]
1603
1566
  }
@@ -1605,9 +1568,9 @@ function _e({ isComponent: e = !1 }) {
1605
1568
  }
1606
1569
  ) });
1607
1570
  }
1608
- _e.displayName = "App";
1609
- const Wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: _e }, Symbol.toStringTag, { value: "Module" }));
1571
+ ke.displayName = "App";
1572
+ const Ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: ke }, Symbol.toStringTag, { value: "Module" }));
1610
1573
  export {
1611
- Wt as LazyApp,
1612
- _t as ae
1574
+ Ht as LazyApp,
1575
+ kt as ae
1613
1576
  };