@versini/sassysaint 8.44.2 → 8.44.3

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.
Files changed (24) hide show
  1. package/dist/chunks/{AboutChangelog.BLHJq-Bx.js → AboutChangelog.BdZzSUba.js} +2 -2
  2. package/dist/chunks/{AboutEntry.BItg_Z_k.js → AboutEntry.DzSi7ibC.js} +6 -6
  3. package/dist/chunks/{App.BZtIT_71.js → App.DDTKqerX.js} +4137 -5868
  4. package/dist/chunks/{Chart.CjYL0_xH.js → Chart.PHloGZi7.js} +2 -2
  5. package/dist/chunks/ChatBubbleAssistant.DxGv-_Rb.js +76 -0
  6. package/dist/chunks/ChatHistoryTable.DnkLt1Je.js +1205 -0
  7. package/dist/chunks/HistoryEntry.De2vGpPR.js +282 -0
  8. package/dist/chunks/{LNWAZHJI.BFyrX4cF.js → LNWAZHJI.DBPRjK8f.js} +1 -1
  9. package/dist/chunks/{ProfileEntry.Cjd0chWx.js → ProfileEntry.B9ur9Dzf.js} +2 -2
  10. package/dist/chunks/{SettingsEntry.Bf_QHI_c.js → SettingsEntry.DeQAT_-t.js} +2 -2
  11. package/dist/chunks/{UsageEntry.uYJ25BOH.js → UsageEntry.BmEHDYHp.js} +3 -3
  12. package/dist/chunks/{index.CUG5oJCp.js → index.C1S2cFkO.js} +2 -2
  13. package/dist/chunks/{index.B6WNuA8u.js → index.CrwhT53o.js} +3 -3
  14. package/dist/chunks/{index.DrjLpZAY.js → index.CsbwtA6h.js} +1 -1
  15. package/dist/chunks/{index.DNDMcWAX.js → index.CvN58Fp8.js} +1 -1
  16. package/dist/chunks/index.CyMvgyLB.js +804 -0
  17. package/dist/chunks/{index.1P1jSZep.js → index.DI9PexVP.js} +1 -1
  18. package/dist/chunks/{index.BcjsrdyX.js → index.DNSGhajh.js} +2 -2
  19. package/dist/chunks/{useMarkdown.C0LVyK9z.js → useMarkdown.CujEnDtN.js} +8 -8
  20. package/dist/components/SassySaint/SassySaint.js +1 -1
  21. package/dist/index.js +4 -4
  22. package/package.json +3 -3
  23. package/dist/chunks/ChatBubbleAssistant.CcLVLe6h.js +0 -75
  24. package/dist/chunks/HistoryEntry.CXmbpyvN.js +0 -538
@@ -0,0 +1,1205 @@
1
+ import { jsxs as k, jsx as s, Fragment as pe } from "react/jsx-runtime";
2
+ import { I as se, ue$1 as F, pe as P, INFINITE_SCROLL_THRESHOLD as ke, CARDS as ve, pluralize as fe, ue as X, numberFormatter as xe, Ae as _e, isProbablyMobile as we, E as Ne, a as Ce, i as Me } from "./index.DNSGhajh.js";
3
+ import { e as E, st as Z, p$1 as Re, z as Ie, p$2 as Se } from "./App.DDTKqerX.js";
4
+ import A, { useContext as T, useRef as I, useLayoutEffect as ee, useEffect as j, useState as Te, useMemo as le, useCallback as ze, Fragment as Be } from "react";
5
+ import i from "clsx";
6
+ const Ee = ({
7
+ className: e,
8
+ viewBox: r,
9
+ title: t,
10
+ monotone: a,
11
+ ...l
12
+ }) => /* @__PURE__ */ k(
13
+ se,
14
+ {
15
+ defaultViewBox: "0 0 448 512",
16
+ size: "size-5",
17
+ viewBox: r,
18
+ className: e,
19
+ title: t || "Delete",
20
+ ...l,
21
+ children: [
22
+ /* @__PURE__ */ s(
23
+ "path",
24
+ {
25
+ d: "M32 96v352c0 35.3 28.7 64 64 64h256c35.3 0 64-28.7 64-64V96zm80 80c0-8.8 7.2-16 16-16s16 7.2 16 16v224c0 8.8-7.2 16-16 16s-16-7.2-16-16zm96 0c0-8.8 7.2-16 16-16s16 7.2 16 16v224c0 8.8-7.2 16-16 16s-16-7.2-16-16zm96 0c0-8.8 7.2-16 16-16s16 7.2 16 16v224c0 8.8-7.2 16-16 16s-16-7.2-16-16z",
26
+ opacity: a ? "1" : "0.4"
27
+ }
28
+ ),
29
+ /* @__PURE__ */ s("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 32 32 32h384c17.7 0 32-14.3 32-32s-14.3-32-32-32h-96l-7.2-14.3C307.4 6.8 296.3 0 284.2 0z" })
30
+ ]
31
+ }
32
+ ), Oe = ({
33
+ className: e,
34
+ viewBox: r,
35
+ title: t,
36
+ monotone: a,
37
+ ...l
38
+ }) => /* @__PURE__ */ k(
39
+ se,
40
+ {
41
+ defaultViewBox: "0 0 512 512",
42
+ size: "size-5",
43
+ viewBox: r,
44
+ className: e,
45
+ title: t || "Restore",
46
+ ...l,
47
+ children: [
48
+ /* @__PURE__ */ s(
49
+ "path",
50
+ {
51
+ d: "M128 80v16h64V80c0-8.8 7.2-16 16-16h224c8.8 0 16 7.2 16 16v224c0 8.8-7.2 16-16 16h-16v64h16c44.2 0 80-35.8 80-80V80c0-44.2-35.8-80-80-80H208c-44.2 0-80 35.8-80 80",
52
+ opacity: a ? "1" : "0.4"
53
+ }
54
+ ),
55
+ /* @__PURE__ */ s("path", { d: "M64 128c-35.3 0-64 28.7-64 64v256c0 35.3 28.7 64 64 64h256c35.3 0 64-28.7 64-64V192c0-35.3-28.7-64-64-64zm32 64h192c17.7 0 32 14.3 32 32s-14.3 32-32 32H96c-17.7 0-32-14.3-32-32s14.3-32 32-32" })
56
+ ]
57
+ }
58
+ ), te = "av-button", G = "icon", oe = "button", $ = "link", Ae = ({
59
+ type: e,
60
+ size: r,
61
+ labelRight: t,
62
+ labelLeft: a,
63
+ align: l,
64
+ animated: o
65
+ }) => {
66
+ const d = "max-h-8 py-0 px-2", g = "max-h-9 h-8 px-3", m = "max-h-12 py-2 px-4";
67
+ switch (e) {
68
+ case oe:
69
+ case $:
70
+ return i({
71
+ [d]: r === "small",
72
+ [g]: r === "medium",
73
+ [m]: r === "large"
74
+ });
75
+ case G:
76
+ return i("flex items-center", {
77
+ "justify-center": l === "center",
78
+ "justify-start": l === "left",
79
+ "justify-end": l === "right",
80
+ "h-6 w-6 p-0": r === "small" && !o && !(t || a),
81
+ "h-6 px-1 sm:px-2": r === "small" && !o && (t || a),
82
+ "h-8 w-8 p-1": r === "medium" && !o && !(t || a),
83
+ "h-8 px-3": r === "medium" && !o && (t || a),
84
+ "h-12 w-12 p-2": r === "large" && !o && !(t || a),
85
+ "h-12 px-4": r === "large" && !o && (t || a),
86
+ "h-6 py-0": r === "small" && o && !(t || a),
87
+ "h-6": r === "small" && o && (t || a),
88
+ "h-8 py-1": r === "medium" && o && !(t || a),
89
+ "h-8": r === "medium" && o && (t || a),
90
+ "h-12 py-2": r === "large" && o && !(t || a),
91
+ "h-12": r === "large" && o && (t || a)
92
+ });
93
+ }
94
+ }, Ve = ({
95
+ type: e,
96
+ size: r,
97
+ labelRight: t,
98
+ labelLeft: a
99
+ }) => {
100
+ const l = "text-sm font-medium", o = "text-base font-medium", d = "text-lg font-medium";
101
+ switch (e) {
102
+ case oe:
103
+ case $:
104
+ return i({
105
+ "text-center": e === $,
106
+ [l]: r === "small",
107
+ [o]: r === "medium",
108
+ [d]: r === "large"
109
+ });
110
+ case G:
111
+ return i({
112
+ [l]: r === "small" && (t || a),
113
+ [o]: r === "medium" && (t || a),
114
+ [d]: r === "large" && (t || a)
115
+ });
116
+ }
117
+ }, He = ({
118
+ mode: e,
119
+ noBackground: r,
120
+ truncate: t,
121
+ variant: a
122
+ }) => {
123
+ if (r)
124
+ return "not-prose";
125
+ if (a === "primary")
126
+ return i("not-prose", {
127
+ truncate: t,
128
+ "text-copy-dark": e === "dark" || e === "system",
129
+ "text-copy-light": e === "light" || e === "alt-system",
130
+ "dark:text-copy-light": e === "system",
131
+ "dark:text-copy-dark": e === "alt-system"
132
+ });
133
+ if (a === "secondary")
134
+ return i("not-prose", {
135
+ truncate: t,
136
+ "text-copy-light": e === "dark" || e === "system",
137
+ "text-copy-dark": e === "light" || e === "alt-system",
138
+ "dark:text-copy-dark": e === "system",
139
+ "dark:text-copy-light": e === "alt-system"
140
+ });
141
+ if (a === "danger")
142
+ return i("not-prose", {
143
+ truncate: t,
144
+ "text-copy-light": e === "dark" || e === "system",
145
+ "text-copy-lighter": e === "light" || e === "alt-system",
146
+ "dark:text-copy-lighter": e === "system",
147
+ "dark:text-copy-light": e === "alt-system"
148
+ });
149
+ if (a === "selected")
150
+ return i("not-prose text-copy-lighter", {
151
+ truncate: t
152
+ });
153
+ }, Ue = ({
154
+ mode: e,
155
+ noBackground: r,
156
+ variant: t
157
+ }) => {
158
+ if (!r) {
159
+ if (t === "primary")
160
+ return i({
161
+ "bg-action-light": e === "dark",
162
+ "bg-action-dark": e === "light",
163
+ "bg-action-light dark:bg-action-dark": e === "system",
164
+ "bg-action-dark dark:bg-action-light": e === "alt-system"
165
+ });
166
+ if (t === "secondary")
167
+ return i({
168
+ "bg-action-light": e === "light",
169
+ "bg-action-dark": e === "dark",
170
+ "bg-action-light dark:bg-action-dark": e === "alt-system",
171
+ "bg-action-dark dark:bg-action-light": e === "system"
172
+ });
173
+ if (t === "danger")
174
+ return i({
175
+ "bg-action-danger-dark": e === "dark",
176
+ "bg-action-danger-light": e === "light",
177
+ "bg-action-danger-dark dark:bg-action-danger-light": e === "system",
178
+ "bg-action-danger-light dark:bg-action-danger-dark": e === "alt-system"
179
+ });
180
+ if (t === "selected")
181
+ return "bg-action-selected-dark";
182
+ }
183
+ }, De = ({
184
+ radius: e
185
+ }) => i({
186
+ "rounded-full": e === "large",
187
+ "rounded-md": e === "medium",
188
+ "rounded-xs": e === "small"
189
+ }), We = ({
190
+ mode: e,
191
+ disabled: r,
192
+ variant: t
193
+ }) => {
194
+ if (r)
195
+ return "";
196
+ if (t === "primary")
197
+ return i({
198
+ "hover:text-copy-dark-hover": e === "dark" || e === "system",
199
+ "hover:text-copy-light-hover": e === "light" || e === "alt-system",
200
+ "dark:hover:text-copy-light-hover": e === "system",
201
+ "dark:hover:text-copy-dark-hover": e === "alt-system",
202
+ "hover:bg-action-light-hover": e === "dark",
203
+ "hover:bg-action-dark-hover": e === "light",
204
+ "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system",
205
+ "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system"
206
+ });
207
+ if (t === "secondary")
208
+ return i({
209
+ "hover:text-copy-light-hover": e === "dark" || e === "system",
210
+ "hover:text-copy-dark-hover": e === "light" || e === "alt-system",
211
+ "dark:hover:text-copy-dark-hover": e === "system",
212
+ "dark:hover:text-copy-light-hover": e === "alt-system",
213
+ "hover:bg-action-light-hover": e === "light",
214
+ "hover:bg-action-dark-hover": e === "dark",
215
+ "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system",
216
+ "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system"
217
+ });
218
+ if (t === "danger")
219
+ return i("hover:text-copy-light-hover", {
220
+ "hover:bg-action-danger-dark-hover": e === "dark",
221
+ "hover:bg-action-danger-light-hover": e === "light",
222
+ "hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
223
+ "hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
224
+ });
225
+ if (t === "selected")
226
+ return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
227
+ }, Le = ({
228
+ mode: e,
229
+ disabled: r,
230
+ variant: t
231
+ }) => {
232
+ if (r)
233
+ return "";
234
+ if (t === "primary")
235
+ return i({
236
+ "active:text-copy-dark-active": e === "dark" || e === "system",
237
+ "active:text-copy-light-active": e === "light" || e === "alt-system",
238
+ "dark:active:text-copy-light-active": e === "system",
239
+ "dark:active:text-copy-dark-active": e === "alt-system",
240
+ "active:bg-action-light-active": e === "dark",
241
+ "active:bg-action-dark-active": e === "light",
242
+ "active:bg-action-light-active dark:active:bg-action-dark-active": e === "system",
243
+ "active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system"
244
+ });
245
+ if (t === "secondary")
246
+ return i({
247
+ "active:text-copy-light-active": e === "dark" || e === "system",
248
+ "active:text-copy-dark-active": e === "light" || e === "alt-system",
249
+ "dark:active:text-copy-dark-active": e === "system",
250
+ "dark:active:text-copy-light-active": e === "alt-system",
251
+ "active:bg-action-light-active": e === "light",
252
+ "active:bg-action-dark-active": e === "dark",
253
+ "active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system",
254
+ "active:bg-action-dark-active dark:active:bg-action-light-active": e === "system"
255
+ });
256
+ if (t === "danger")
257
+ return i("active:text-copy-lighter-active", {
258
+ "active:bg-action-danger-dark-active": e === "dark",
259
+ "active:bg-action-danger-light-active": e === "light",
260
+ "active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
261
+ "active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
262
+ });
263
+ if (t === "selected")
264
+ return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
265
+ }, Fe = ({
266
+ mode: e,
267
+ noBorder: r,
268
+ variant: t
269
+ }) => {
270
+ if (r)
271
+ return "border border-transparent";
272
+ if (t === "primary")
273
+ return i("border", {
274
+ "border-border-medium": e === "dark",
275
+ "border-border-accent": e === "light",
276
+ "border-border-medium dark:border-border-accent": e === "system",
277
+ "border-border-accent dark:border-border-medium": e === "alt-system"
278
+ });
279
+ if (t === "secondary")
280
+ return i("border", {
281
+ "border-border-medium": e === "light",
282
+ "border-border-accent": e === "dark",
283
+ "border-border-medium dark:border-border-accent": e === "alt-system",
284
+ "border-border-accent dark:border-border-medium": e === "system"
285
+ });
286
+ if (t === "danger")
287
+ return i("border", {
288
+ "border-border-danger-dark": e === "dark",
289
+ "border-border-danger-medium": e === "light",
290
+ "border-border-danger-dark dark:border-border-danger-medium": e === "system",
291
+ "border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
292
+ });
293
+ if (t === "selected")
294
+ return "border border-border-selected-dark";
295
+ }, Pe = ({
296
+ focusMode: e
297
+ }) => i("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
298
+ "focus:outline-focus-dark": e === "dark",
299
+ "focus:outline-focus-light": e === "light",
300
+ "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
301
+ "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
302
+ }), $e = ({
303
+ mode: e,
304
+ raw: r,
305
+ iconClassName: t,
306
+ variant: a = "primary"
307
+ }) => {
308
+ if (r)
309
+ return "";
310
+ let l = {};
311
+ return a === "primary" ? l = {
312
+ "text-copy-dark": e === "dark" || e === "system",
313
+ "text-copy-light": e === "light" || e === "alt-system",
314
+ "dark:text-copy-light": e === "system",
315
+ "dark:text-copy-dark": e === "alt-system"
316
+ } : a === "secondary" ? l = {
317
+ "text-copy-light": e === "dark" || e === "system",
318
+ "text-copy-dark": e === "light" || e === "alt-system",
319
+ "dark:text-copy-dark": e === "system",
320
+ "dark:text-copy-light": e === "alt-system"
321
+ } : a === "danger" ? l = {
322
+ "text-copy-light": e === "dark" || e === "system",
323
+ "text-copy-lighter": e === "light" || e === "alt-system",
324
+ "dark:text-copy-lighter": e === "system",
325
+ "dark:text-copy-light": e === "alt-system"
326
+ } : a === "selected" && (l = {
327
+ "text-copy-lighter": !0
328
+ }), i(l, t);
329
+ }, je = ({
330
+ animated: e
331
+ }) => i({
332
+ "transition-opacity duration-300 ease-in-out": e
333
+ }), Ge = ({
334
+ type: e,
335
+ className: r,
336
+ raw: t,
337
+ mode: a,
338
+ focusMode: l,
339
+ disabled: o,
340
+ fullWidth: d,
341
+ size: g,
342
+ noBorder: m,
343
+ labelRight: u,
344
+ labelLeft: y,
345
+ noBackground: c,
346
+ variant: n,
347
+ truncate: p,
348
+ align: v,
349
+ radius: N,
350
+ animated: z
351
+ }) => (n || (n = "primary"), t ? i(te, r) : i(
352
+ te,
353
+ He({
354
+ mode: a,
355
+ variant: n,
356
+ noBackground: c,
357
+ truncate: p
358
+ }),
359
+ Ue({ mode: a, noBackground: c, variant: n }),
360
+ De({ radius: N }),
361
+ Ae({
362
+ type: e,
363
+ size: g,
364
+ labelRight: u,
365
+ labelLeft: y,
366
+ align: v,
367
+ animated: z
368
+ }),
369
+ Ve({ type: e, size: g, labelRight: u, labelLeft: y }),
370
+ Fe({ mode: a, variant: n, noBorder: m }),
371
+ Pe({ focusMode: l }),
372
+ We({ mode: a, variant: n, disabled: o }),
373
+ Le({ mode: a, variant: n, disabled: o }),
374
+ {
375
+ "w-full": d,
376
+ "disabled:cursor-not-allowed disabled:opacity-50": o
377
+ },
378
+ i({
379
+ "transition-[width] duration-300 ease-in": z
380
+ }),
381
+ r
382
+ )), Ye = (e, r, t) => {
383
+ !r && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof e?.currentTarget?.focus == "function" && e.currentTarget.focus(), typeof t == "function" && t(e);
384
+ }, ce = A.forwardRef((e, r) => {
385
+ const { onClick: t, noInternalClick: a = !1, ...l } = e;
386
+ return /* @__PURE__ */ s(
387
+ "button",
388
+ {
389
+ ref: r,
390
+ onClick: (o) => {
391
+ Ye(o, a, t);
392
+ },
393
+ ...l
394
+ }
395
+ );
396
+ });
397
+ ce.displayName = "BaseButton";
398
+ function Ke() {
399
+ const e = I(!1);
400
+ return j(() => (e.current = !0, () => {
401
+ e.current = !1;
402
+ }), []), ze(() => e.current, []);
403
+ }
404
+ function qe(e) {
405
+ return le(() => e.every((r) => r == null) ? () => {
406
+ } : (r) => {
407
+ e.forEach((t) => {
408
+ typeof t == "function" ? t(r) : t != null && (t.current = r);
409
+ });
410
+ }, [...e]);
411
+ }
412
+ const Je = {
413
+ x: 0,
414
+ y: 0,
415
+ width: 0,
416
+ height: 0,
417
+ top: 0,
418
+ left: 0,
419
+ bottom: 0,
420
+ right: 0
421
+ };
422
+ function W(e) {
423
+ const r = Ke(), t = I(0), a = I(null), [l, o] = Te(Je), d = le(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((g) => {
424
+ const m = g[0];
425
+ m && (cancelAnimationFrame(t.current), t.current = requestAnimationFrame(() => {
426
+ a.current && r() && o(m.contentRect);
427
+ }));
428
+ }), [r]);
429
+ return j(() => (a.current && d?.observe(a.current, e), () => {
430
+ d?.disconnect(), t.current && cancelAnimationFrame(t.current);
431
+ }), [d, e]), [a, l];
432
+ }
433
+ const O = {
434
+ small: 24,
435
+ // w-6
436
+ medium: 32,
437
+ // w-8
438
+ large: 48
439
+ // w-12
440
+ }, Qe = {
441
+ small: 16,
442
+ // px-2 x 2
443
+ medium: 24,
444
+ // px-3 x 2
445
+ large: 32
446
+ // px-4 x 2
447
+ }, Xe = 2, Ze = 300, ie = A.forwardRef(
448
+ ({
449
+ children: e,
450
+ disabled: r = !1,
451
+ mode: t = "system",
452
+ focusMode: a = "system",
453
+ fullWidth: l = !1,
454
+ className: o,
455
+ type: d = "button",
456
+ raw: g = !1,
457
+ noBorder: m = !1,
458
+ "aria-label": u,
459
+ label: y,
460
+ size: c = "medium",
461
+ labelRight: n,
462
+ labelLeft: p,
463
+ noBackground: v = !1,
464
+ align: N = "center",
465
+ radius: z = "large",
466
+ variant: q = "secondary",
467
+ iconClassName: de,
468
+ animated: _ = !1,
469
+ ...me
470
+ }, he) => {
471
+ const ge = Ge({
472
+ type: G,
473
+ mode: t,
474
+ focusMode: a,
475
+ fullWidth: l,
476
+ disabled: r,
477
+ raw: g,
478
+ className: o,
479
+ noBorder: m,
480
+ size: c,
481
+ labelRight: n,
482
+ labelLeft: p,
483
+ noBackground: v,
484
+ align: N,
485
+ radius: z,
486
+ variant: q,
487
+ animated: _
488
+ }), ue = $e({ mode: t, raw: g, iconClassName: de, variant: q }), J = je({ animated: _ }), ye = "flex items-center justify-center relative w-full h-full overflow-hidden", [f, H] = W(), [x, U] = W(), [B, Q] = W(), D = I(0), w = I(null), C = I(null), be = qe([he, w]);
489
+ return ee(() => {
490
+ B && B.current && _ && (D.current = Q.width + Qe[c] + (m ? 0 : Xe), w.current && !w.current.style.width && (w.current.style.width = `${O[c]}px`));
491
+ }, [Q, B, c, m, _]), ee(() => {
492
+ if (w && w.current && _) {
493
+ let M = O[c];
494
+ n && f && H.width > 0 ? M = H.width + D.current : p && x && U.width > 0 && (M = U.width + D.current), C.current && clearTimeout(C.current), M !== parseInt(w.current.style.width || "0", 10) && (f.current && (f.current.style.opacity = "0"), x.current && (x.current.style.opacity = "0"), w.current.style.width = `${M}px`, M > O[c] && (C.current = setTimeout(() => {
495
+ f.current && n && (f.current.style.opacity = "1"), x.current && p && (x.current.style.opacity = "1"), C.current = null;
496
+ }, Ze * 0.8))), M === O[c] && (f.current && (f.current.style.opacity = "0"), x.current && (x.current.style.opacity = "0"));
497
+ }
498
+ }, [
499
+ H,
500
+ n,
501
+ f,
502
+ U,
503
+ p,
504
+ x,
505
+ c,
506
+ _
507
+ ]), j(() => () => {
508
+ C.current && clearTimeout(C.current);
509
+ }, []), /* @__PURE__ */ s(
510
+ ce,
511
+ {
512
+ ref: be,
513
+ className: ge,
514
+ disabled: r,
515
+ type: d,
516
+ "aria-label": u || y,
517
+ ...me,
518
+ children: /* @__PURE__ */ k("div", { className: ye, children: [
519
+ /* @__PURE__ */ s(
520
+ re,
521
+ {
522
+ label: p,
523
+ labelRef: x,
524
+ labelClass: J,
525
+ labelInnerClass: "pr-2",
526
+ initiallyHidden: _
527
+ }
528
+ ),
529
+ /* @__PURE__ */ s("span", { ref: B, className: ue, children: e }),
530
+ /* @__PURE__ */ s(
531
+ re,
532
+ {
533
+ label: n,
534
+ labelRef: f,
535
+ labelClass: J,
536
+ labelInnerClass: "pl-2",
537
+ initiallyHidden: _
538
+ }
539
+ )
540
+ ] })
541
+ }
542
+ );
543
+ }
544
+ ), re = ({
545
+ labelRef: e,
546
+ labelClass: r,
547
+ label: t,
548
+ labelInnerClass: a,
549
+ initiallyHidden: l = !1
550
+ }) => /* @__PURE__ */ s(
551
+ "span",
552
+ {
553
+ ref: e,
554
+ className: r,
555
+ style: l ? { opacity: 0 } : void 0,
556
+ children: t && /* @__PURE__ */ s("span", { className: a, children: t })
557
+ }
558
+ );
559
+ ie.displayName = "ButtonIcon";
560
+ /*!
561
+ @versini/ui-button v7.1.5
562
+ © 2025 gizmette.com
563
+ */
564
+ try {
565
+ window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
566
+ version: "7.1.5",
567
+ buildTime: "08/30/2025 02:56 PM EDT",
568
+ homepage: "https://github.com/aversini/ui-components",
569
+ license: "MIT"
570
+ });
571
+ } catch {
572
+ }
573
+ const ne = A.forwardRef(
574
+ ({
575
+ children: e,
576
+ mode: r = "system",
577
+ className: t,
578
+ active: a = !1,
579
+ ...l
580
+ }, o) => {
581
+ const d = a ? i(
582
+ "relative",
583
+ "focus-within:static",
584
+ "focus-within:after:border-transparent",
585
+ "after:absolute",
586
+ "after:content-['']",
587
+ "after:border-b-2",
588
+ "after:bottom-[-4px]",
589
+ "after:left-0",
590
+ "after:right-0",
591
+ {
592
+ "after:border-table-dark": r === "dark",
593
+ "after:border-table-light": r === "light",
594
+ "after:border-table-dark dark:after:border-table-light": r === "system",
595
+ "after:border-table-light dark:after:border-table-dark": r === "alt-system"
596
+ }
597
+ ) : "";
598
+ return /* @__PURE__ */ s("div", { className: d, children: /* @__PURE__ */ s(
599
+ ie,
600
+ {
601
+ className: t,
602
+ ref: o,
603
+ mode: r,
604
+ radius: "small",
605
+ size: "small",
606
+ align: "center",
607
+ ...l,
608
+ children: e
609
+ }
610
+ ) });
611
+ }
612
+ );
613
+ ne.displayName = "ButtonSort";
614
+ const Y = ({
615
+ children: e,
616
+ fill: r,
617
+ viewBox: t,
618
+ className: a,
619
+ defaultViewBox: l,
620
+ size: o,
621
+ title: d,
622
+ semantic: g = !1,
623
+ ...m
624
+ }) => {
625
+ const u = i(o, a);
626
+ return /* @__PURE__ */ s(pe, { children: /* @__PURE__ */ k(
627
+ "svg",
628
+ {
629
+ xmlns: "http://www.w3.org/2000/svg",
630
+ className: u,
631
+ viewBox: t || l,
632
+ fill: r || "currentColor",
633
+ role: "img",
634
+ "aria-hidden": !g,
635
+ focusable: !1,
636
+ ...m,
637
+ children: [
638
+ d && g && /* @__PURE__ */ s("title", { children: d }),
639
+ e
640
+ ]
641
+ }
642
+ ) });
643
+ };
644
+ /*!
645
+ @versini/ui-svgicon v4.2.0
646
+ © 2025 gizmette.com
647
+ */
648
+ try {
649
+ window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
650
+ version: "4.2.0",
651
+ buildTime: "05/17/2025 06:18 PM EDT",
652
+ homepage: "https://github.com/aversini/ui-components",
653
+ license: "MIT"
654
+ });
655
+ } catch {
656
+ }
657
+ const et = ({
658
+ className: e,
659
+ viewBox: r,
660
+ title: t,
661
+ monotone: a,
662
+ ...l
663
+ }) => /* @__PURE__ */ k(
664
+ Y,
665
+ {
666
+ defaultViewBox: "0 0 576 512",
667
+ size: "size-5",
668
+ viewBox: r,
669
+ className: e,
670
+ title: t || "Sort",
671
+ ...l,
672
+ children: [
673
+ /* @__PURE__ */ s(
674
+ "path",
675
+ {
676
+ d: "M297.4 137.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l41.3-41.4V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.3l41.4 41.4c12.5 12.5 32.8 12.5 45.3 0 6.2-6.2 9.4-14.4 9.4-22.6s-3.1-16.4-9.4-22.6l-96-96c-6.3-6.4-14.5-9.5-22.7-9.5s-16.4 3.1-22.6 9.4z",
677
+ opacity: a ? "1" : "0.4"
678
+ }
679
+ ),
680
+ /* @__PURE__ */ s("path", { d: "M137.4 470.6c12.5 12.5 32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 370.7V64c0-17.7-14.3-32-32-32s-32 14.3-32 32v306.7l-41.4-41.3c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96z" })
681
+ ]
682
+ }
683
+ ), tt = ({
684
+ className: e,
685
+ viewBox: r,
686
+ title: t,
687
+ monotone: a,
688
+ ...l
689
+ }) => /* @__PURE__ */ k(
690
+ Y,
691
+ {
692
+ defaultViewBox: "0 0 576 512",
693
+ size: "size-5",
694
+ viewBox: r,
695
+ className: e,
696
+ title: t || "Sort Down",
697
+ ...l,
698
+ children: [
699
+ /* @__PURE__ */ s(
700
+ "path",
701
+ {
702
+ d: "M288 64c0-17.7 14.3-32 32-32h224c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32m0 128c0-17.7 14.3-32 32-32h160c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32m0 128c0-17.7 14.3-32 32-32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32h-96c-17.7 0-32-14.3-32-32m0 128c0-17.7 14.3-32 32-32h32c17.7 0 32 14.3 32 32s-14.3 32-32 32h-32c-17.7 0-32-14.3-32-32",
703
+ opacity: a ? "1" : "0.4"
704
+ }
705
+ ),
706
+ /* @__PURE__ */ s("path", { d: "M128 480c9 0 17.5-3.8 23.6-10.4l88-96c11.9-13 11.1-33.3-2-45.2s-33.3-11.1-45.2 2L160 365.7V64c0-17.7-14.3-32-32-32S96 46.3 96 64v301.7l-32.4-35.3c-11.9-13-32.2-13.9-45.2-2s-13.9 32.2-2 45.2l88 96c6.1 6.6 14.6 10.4 23.6 10.4" })
707
+ ]
708
+ }
709
+ ), rt = ({
710
+ className: e,
711
+ viewBox: r,
712
+ title: t,
713
+ monotone: a,
714
+ ...l
715
+ }) => /* @__PURE__ */ k(
716
+ Y,
717
+ {
718
+ defaultViewBox: "0 0 576 512",
719
+ size: "size-5",
720
+ viewBox: r,
721
+ className: e,
722
+ title: t || "Sort Up",
723
+ ...l,
724
+ children: [
725
+ /* @__PURE__ */ s(
726
+ "path",
727
+ {
728
+ d: "M288 64c0-17.7 14.3-32 32-32h32c17.7 0 32 14.3 32 32s-14.3 32-32 32h-32c-17.7 0-32-14.3-32-32m0 128c0-17.7 14.3-32 32-32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32h-96c-17.7 0-32-14.3-32-32m0 128c0-17.7 14.3-32 32-32h160c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32m0 128c0-17.7 14.3-32 32-32h224c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32",
729
+ opacity: a ? "1" : "0.4"
730
+ }
731
+ ),
732
+ /* @__PURE__ */ s("path", { d: "M128 32c9 0 17.5 3.8 23.6 10.4l88 96c11.9 13 11.1 33.3-2 45.2s-33.3 11.1-45.2-2L160 146.3V448c0 17.7-14.3 32-32 32s-32-14.3-32-32V146.3l-32.4 35.3c-11.9 13-32.2 13.9-45.2 2s-13.9-32.2-2-45.2l88-96C110.5 35.8 119 32 128 32" })
733
+ ]
734
+ }
735
+ );
736
+ /*!
737
+ @versini/ui-icons v4.10.0
738
+ © 2025 gizmette.com
739
+ */
740
+ try {
741
+ window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
742
+ version: "4.10.0",
743
+ buildTime: "05/17/2025 06:18 PM EDT",
744
+ homepage: "https://github.com/aversini/ui-components",
745
+ license: "MIT"
746
+ });
747
+ } catch {
748
+ }
749
+ const S = A.createContext({
750
+ mode: "light",
751
+ cellWrapper: "thead",
752
+ stickyHeader: !1,
753
+ stickyFooter: !1,
754
+ compact: !1
755
+ }), V = "thead", K = "tfoot", R = "tbody", at = ({
756
+ mode: e,
757
+ className: r,
758
+ wrapperClassName: t,
759
+ stickyHeader: a,
760
+ stickyFooter: l
761
+ }) => ({
762
+ wrapper: i(
763
+ "not-prose relative w-full rounded-lg shadow-md",
764
+ {
765
+ "overflow-x-auto": !a && !l,
766
+ "overflow-y-scroll": a || l,
767
+ "bg-surface-darker": e === "dark" || e === "system",
768
+ "bg-surface-light": e === "light" || e === "alt-system",
769
+ "dark:bg-surface-light": e === "system",
770
+ "dark:bg-surface-darker": e === "alt-system",
771
+ "text-copy-light": e === "dark",
772
+ "text-copy-dark": e === "light",
773
+ "text-copy-light dark:text-copy-dark": e === "system",
774
+ "text-copy-dark dark:text-copy-light": e === "alt-system"
775
+ },
776
+ t
777
+ ),
778
+ table: i("my-0 w-full text-left text-sm", r, {
779
+ "text-copy-light": e === "dark",
780
+ "text-copy-dark": e === "light",
781
+ "text-copy-light dark:text-copy-dark": e === "system",
782
+ "text-copy-dark dark:text-copy-light": e === "alt-system"
783
+ }),
784
+ caption: i("py-2 text-sm font-bold", {
785
+ "text-copy-light": e === "dark",
786
+ "text-copy-dark": e === "light",
787
+ "text-copy-light dark:text-copy-dark": e === "system",
788
+ "text-copy-dark dark:text-copy-light": e === "alt-system"
789
+ })
790
+ }), st = ({
791
+ className: e,
792
+ stickyHeader: r,
793
+ mode: t
794
+ }) => i(
795
+ {
796
+ "sticky top-0 z-10": r,
797
+ "shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]": r && t === "dark",
798
+ "shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem] dark:shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem]": r && t === "system",
799
+ "shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem]": r && t === "light",
800
+ "shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]": r && t === "alt-system"
801
+ },
802
+ e
803
+ ), lt = ({
804
+ className: e,
805
+ stickyFooter: r,
806
+ mode: t
807
+ }) => i(
808
+ {
809
+ "sticky bottom-0 z-10": r,
810
+ "shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]": r && t === "dark",
811
+ "shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem] dark:shadow-[rgb(65_65_65_/30%)_0_-0.5rem_1rem]": r && t === "system",
812
+ "shadow-[rgb(65_65_65_/30%)_0_-0.5rem_1rem]": r && t === "light",
813
+ "shadow-[rgb(65_65_65_/30%)_-0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]": r && t === "alt-system"
814
+ },
815
+ e
816
+ ), ot = ({
817
+ mode: e,
818
+ className: r,
819
+ cellWrapper: t
820
+ }) => t === V || t === K ? i(
821
+ {
822
+ "bg-table-head-dark": e === "dark" || e === "system",
823
+ "bg-table-head-light": e === "light" || e === "alt-system",
824
+ "dark:bg-table-head-light": e === "system",
825
+ "dark:bg-table-head-dark": e === "alt-system"
826
+ },
827
+ r
828
+ ) : i(
829
+ "border-b last:border-0",
830
+ {
831
+ "border-table-dark": e === "dark" || e === "system",
832
+ "odd:bg-table-dark-odd even:bg-table-dark-even": t === R && e === "dark",
833
+ "border-table-light": e === "light" || e === "alt-system",
834
+ "odd:bg-table-light-odd even:bg-table-light-even": t === R && e === "light",
835
+ "dark:border-table-light": e === "system",
836
+ "odd:bg-table-dark-odd even:bg-table-dark-even dark:odd:bg-table-light-odd dark:even:bg-table-light-even": t === R && e === "system",
837
+ "dark:border-table-dark": e === "alt-system",
838
+ "odd:bg-table-light-odd even:bg-table-light-even dark:odd:bg-table-dark-odd dark:even:bg-table-dark-even": t === R && e === "alt-system"
839
+ },
840
+ r
841
+ ), ct = ({
842
+ cellWrapper: e,
843
+ className: r,
844
+ compact: t,
845
+ mode: a,
846
+ align: l
847
+ }) => ({
848
+ alignClasses: i({
849
+ "flex justify-start text-left": l === "left",
850
+ "flex justify-center text-center": l === "center",
851
+ "flex justify-end text-right": l === "right"
852
+ }),
853
+ mainClasses: i(
854
+ {
855
+ "text-copy-light": a === "dark" || a === "system",
856
+ "text-copy-dark": a === "light" || a === "alt-system",
857
+ "dark:text-copy-dark": a === "system",
858
+ "dark:text-copy-light": a === "alt-system",
859
+ "px-4 py-3": !t && (e === V || e === K),
860
+ "p-4": !t && e === R,
861
+ "px-2 py-1.5": t
862
+ },
863
+ r
864
+ )
865
+ }), it = ({
866
+ buttonClassName: e
867
+ }) => i("rounded-none text-sm", e), nt = ({
868
+ children: e,
869
+ mode: r = "system",
870
+ caption: t,
871
+ compact: a,
872
+ summary: l,
873
+ className: o,
874
+ wrapperClassName: d,
875
+ maxHeight: g,
876
+ stickyHeader: m,
877
+ stickyFooter: u,
878
+ ...y
879
+ }) => {
880
+ const c = at({
881
+ mode: r,
882
+ className: o,
883
+ wrapperClassName: d,
884
+ stickyHeader: m,
885
+ stickyFooter: u
886
+ });
887
+ return /* @__PURE__ */ s(
888
+ S.Provider,
889
+ {
890
+ value: { mode: r, stickyHeader: m, stickyFooter: u, compact: a },
891
+ children: /* @__PURE__ */ s(
892
+ "div",
893
+ {
894
+ className: c.wrapper,
895
+ ...g && {
896
+ style: { maxHeight: g }
897
+ },
898
+ children: /* @__PURE__ */ k("table", { className: c.table, summary: l, ...y, children: [
899
+ t && /* @__PURE__ */ s("caption", { className: c.caption, children: t }),
900
+ e
901
+ ] })
902
+ }
903
+ )
904
+ }
905
+ );
906
+ }, dt = ({
907
+ children: e,
908
+ className: r,
909
+ ...t
910
+ }) => {
911
+ const a = T(S);
912
+ a.cellWrapper = V;
913
+ const l = st({
914
+ className: r,
915
+ mode: a.mode,
916
+ stickyHeader: a.stickyHeader
917
+ });
918
+ return /* @__PURE__ */ s("thead", { className: l, ...t, children: e });
919
+ }, mt = ({
920
+ children: e,
921
+ className: r,
922
+ ...t
923
+ }) => {
924
+ const a = T(S);
925
+ a.cellWrapper = K;
926
+ const l = lt({
927
+ className: r,
928
+ mode: a.mode,
929
+ stickyFooter: a.stickyFooter
930
+ });
931
+ return /* @__PURE__ */ s("tfoot", { className: l, ...t, children: e });
932
+ }, ht = ({ children: e, ...r }) => {
933
+ const t = T(S);
934
+ return t.cellWrapper = R, /* @__PURE__ */ s("tbody", { ...r, children: e });
935
+ }, L = ({
936
+ children: e,
937
+ className: r,
938
+ ...t
939
+ }) => {
940
+ const a = T(S), l = ot({
941
+ mode: a.mode,
942
+ cellWrapper: a.cellWrapper,
943
+ className: r
944
+ });
945
+ return /* @__PURE__ */ s("tr", { className: l, ...t, children: e });
946
+ }, b = ({
947
+ children: e,
948
+ component: r,
949
+ className: t,
950
+ align: a,
951
+ ...l
952
+ }) => {
953
+ const o = T(S), d = r || (o.cellWrapper === V ? "th" : "td"), { mainClasses: g, alignClasses: m } = ct({
954
+ cellWrapper: o.cellWrapper,
955
+ className: t,
956
+ mode: o.mode,
957
+ compact: o.compact,
958
+ align: a
959
+ });
960
+ return a ? /* @__PURE__ */ s(d, { className: g, ...l, children: /* @__PURE__ */ s("div", { className: m, children: e }) }) : /* @__PURE__ */ s(d, { className: g, ...l, children: e });
961
+ }, ae = ({
962
+ align: e,
963
+ children: r,
964
+ buttonClassName: t,
965
+ className: a,
966
+ component: l,
967
+ focusMode: o = "alt-system",
968
+ mode: d = "alt-system",
969
+ onClick: g,
970
+ sortDirection: m,
971
+ sortedCell: u,
972
+ cellId: y,
973
+ ...c
974
+ }) => {
975
+ const n = it({ buttonClassName: t });
976
+ return /* @__PURE__ */ s(
977
+ b,
978
+ {
979
+ component: l,
980
+ className: a,
981
+ role: "columnheader",
982
+ "aria-sort": m === E.ASC && u === y ? "ascending" : m === E.DESC && u === y ? "descending" : "other",
983
+ ...c,
984
+ children: /* @__PURE__ */ s(
985
+ ne,
986
+ {
987
+ active: u === y,
988
+ className: n,
989
+ onClick: g,
990
+ align: e,
991
+ noBorder: !0,
992
+ focusMode: o,
993
+ mode: d,
994
+ fullWidth: !0,
995
+ labelRight: r,
996
+ children: m === E.ASC && u === y ? /* @__PURE__ */ s(rt, { className: "size-4", monotone: !0 }) : m === E.DESC && u === y ? /* @__PURE__ */ s(tt, { className: "size-4", monotone: !0 }) : /* @__PURE__ */ s(et, { className: "size-4", monotone: !0 })
997
+ }
998
+ )
999
+ }
1000
+ );
1001
+ }, gt = {
1002
+ [Me]: Se,
1003
+ [Ce]: Ie,
1004
+ [Ne]: Re
1005
+ }, h = {
1006
+ ROW: "row",
1007
+ TIMESTAMP: F,
1008
+ SUMMARY: "summary",
1009
+ PROVIDER: "provider",
1010
+ TOKEN_USAGE: P,
1011
+ ACTIONS: "actions"
1012
+ }, ut = [
1013
+ h.ROW,
1014
+ h.TIMESTAMP,
1015
+ h.SUMMARY,
1016
+ h.ACTIONS
1017
+ ], yt = [
1018
+ h.ROW,
1019
+ h.SUMMARY,
1020
+ h.TIMESTAMP,
1021
+ h.TOKEN_USAGE,
1022
+ h.PROVIDER,
1023
+ h.ACTIONS
1024
+ ], xt = ({
1025
+ filteredHistory: e,
1026
+ historyState: r,
1027
+ lastEntryToLoad: t,
1028
+ onClickSort: a,
1029
+ onClickRestore: l,
1030
+ onClickDelete: o,
1031
+ infinityScrollMarkerRef: d
1032
+ }) => {
1033
+ const m = we() ? ut : yt, u = (c) => {
1034
+ switch (c) {
1035
+ case h.ROW:
1036
+ return /* @__PURE__ */ s(b, { className: "sr-only", children: "Row" }, c);
1037
+ case h.TIMESTAMP:
1038
+ return /* @__PURE__ */ s(
1039
+ ae,
1040
+ {
1041
+ buttonClassName: "text-xs sm:text-sm",
1042
+ cellId: F,
1043
+ align: "left",
1044
+ sortDirection: r.sortDirection,
1045
+ sortedCell: r.sortedCell,
1046
+ onClick: () => {
1047
+ a(F);
1048
+ },
1049
+ children: "Date"
1050
+ },
1051
+ c
1052
+ );
1053
+ case h.SUMMARY:
1054
+ return /* @__PURE__ */ s(b, { className: "text-xs sm:text-sm", children: "Summary" }, c);
1055
+ case h.PROVIDER:
1056
+ return /* @__PURE__ */ s(b, { className: "text-xs sm:text-sm", children: "Provider" }, c);
1057
+ case h.TOKEN_USAGE:
1058
+ return /* @__PURE__ */ s(
1059
+ ae,
1060
+ {
1061
+ buttonClassName: "text-xs sm:text-sm",
1062
+ cellId: P,
1063
+ align: "right",
1064
+ sortDirection: r.sortDirection,
1065
+ sortedCell: r.sortedCell,
1066
+ onClick: () => {
1067
+ a(P);
1068
+ },
1069
+ children: "Tokens"
1070
+ },
1071
+ c
1072
+ );
1073
+ case h.ACTIONS:
1074
+ return /* @__PURE__ */ s(b, { className: "text-xs sm:text-sm text-right", children: "Actions" }, c);
1075
+ default:
1076
+ return null;
1077
+ }
1078
+ }, y = (c, n, p) => {
1079
+ switch (c) {
1080
+ case h.ROW:
1081
+ return /* @__PURE__ */ s(b, { children: p + 1 }, c);
1082
+ case h.TIMESTAMP:
1083
+ return /* @__PURE__ */ s(
1084
+ b,
1085
+ {
1086
+ component: "th",
1087
+ scope: "row",
1088
+ className: "text-gray-400 sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none",
1089
+ children: n.timestamp.split(",")[0]
1090
+ },
1091
+ c
1092
+ );
1093
+ case h.SUMMARY: {
1094
+ const v = n.summary || (n.messages.length > 0 ? n.messages[0]?.content : "");
1095
+ return /* @__PURE__ */ s(
1096
+ b,
1097
+ {
1098
+ className: "max-w-[100px] text-white sm:max-w-full text-xs sm:text-sm",
1099
+ style: {
1100
+ wordBreak: "break-word"
1101
+ },
1102
+ children: v
1103
+ },
1104
+ c
1105
+ );
1106
+ }
1107
+ case h.PROVIDER: {
1108
+ const v = n.model ? _e(n.model) : null, N = v ? gt[v] : null;
1109
+ return /* @__PURE__ */ s(
1110
+ b,
1111
+ {
1112
+ component: "th",
1113
+ scope: "row",
1114
+ className: "text-gray-400",
1115
+ align: "center",
1116
+ children: N ? /* @__PURE__ */ s(
1117
+ N,
1118
+ {
1119
+ size: "size-4 sm:size-5",
1120
+ semantic: !0,
1121
+ title: n.model || v
1122
+ }
1123
+ ) : null
1124
+ },
1125
+ c
1126
+ );
1127
+ }
1128
+ case h.TOKEN_USAGE:
1129
+ return /* @__PURE__ */ s(
1130
+ b,
1131
+ {
1132
+ className: "text-gray-400 text-xs sm:text-sm",
1133
+ align: "right",
1134
+ children: n.tokenUsage ? xe.format(n.tokenUsage) : "0"
1135
+ },
1136
+ c
1137
+ );
1138
+ case h.ACTIONS:
1139
+ return /* @__PURE__ */ s(b, { children: /* @__PURE__ */ k("div", { className: "flex flex-col items-end sm:flex-row gap-2", children: [
1140
+ /* @__PURE__ */ s(
1141
+ Z,
1142
+ {
1143
+ label: "Restore chat",
1144
+ mode: "alt-system",
1145
+ placement: "top",
1146
+ trigger: /* @__PURE__ */ s(
1147
+ X,
1148
+ {
1149
+ focusMode: "alt-system",
1150
+ noBorder: !0,
1151
+ label: "Restore chat",
1152
+ variant: "primary",
1153
+ iconClassName: "text-green-800 dark:text-green-500",
1154
+ onClick: async () => {
1155
+ await l(n);
1156
+ },
1157
+ children: /* @__PURE__ */ s(Oe, { size: "size-3", monotone: !0 })
1158
+ }
1159
+ )
1160
+ }
1161
+ ),
1162
+ /* @__PURE__ */ s(
1163
+ Z,
1164
+ {
1165
+ label: "Delete chat",
1166
+ mode: "alt-system",
1167
+ placement: "top",
1168
+ trigger: /* @__PURE__ */ s(
1169
+ X,
1170
+ {
1171
+ focusMode: "alt-system",
1172
+ noBorder: !0,
1173
+ label: "Delete chat",
1174
+ variant: "primary",
1175
+ iconClassName: "text-red-700 dark:text-red-500",
1176
+ onClick: () => {
1177
+ o(n);
1178
+ },
1179
+ children: /* @__PURE__ */ s(Ee, { size: "size-3", monotone: !0 })
1180
+ }
1181
+ )
1182
+ }
1183
+ )
1184
+ ] }) }, c);
1185
+ default:
1186
+ return null;
1187
+ }
1188
+ };
1189
+ return /* @__PURE__ */ k(nt, { stickyHeader: !0, stickyFooter: !0, compact: !0, children: [
1190
+ /* @__PURE__ */ s(dt, { children: /* @__PURE__ */ s(L, { children: m.map((c) => u(c)) }) }),
1191
+ /* @__PURE__ */ s(ht, { children: e.slice(0, t).map((c, n) => c?.messages?.length > 0 ? /* @__PURE__ */ k(Be, { children: [
1192
+ n === t - ke && /* @__PURE__ */ s("tr", { ref: d }),
1193
+ /* @__PURE__ */ s(L, { children: m.map(
1194
+ (p) => y(p, c, n)
1195
+ ) })
1196
+ ] }, `${ve.HISTORY.TITLE}-${c.id}-${n}`) : null) }),
1197
+ /* @__PURE__ */ s(mt, { children: /* @__PURE__ */ s(L, { children: /* @__PURE__ */ s(b, { colSpan: 1e3, children: /* @__PURE__ */ s("div", { children: fe(
1198
+ `${e.length} chat`,
1199
+ e.length
1200
+ ) }) }) }) })
1201
+ ] });
1202
+ };
1203
+ export {
1204
+ xt as ChatHistoryTable
1205
+ };