@versini/sassysaint 8.37.1 → 8.37.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.
@@ -1,21 +1,21 @@
1
- import { jsxs as h, jsx as e, Fragment as ee } from "react/jsx-runtime";
2
- import { I, INFINITE_SCROLL_THRESHOLD as $, CARDS as te, pluralize as se, isProbablyMobile as B, ue as w, numberFormatter as re, n as F, INFINITE_SCROLL_LIMIT as b, LOCAL_STORAGE_PREFIX as G, LOCAL_STORAGE_SORT as ae, APP_CLASSNAME as ne, ACTION_SORT as z, TOAST_CHAT_DELETED as oe, TOAST_PROVIDER_CHANGED as ce, LOCAL_STORAGE_SEARCH as ie, HISTORY_TITLE as le, pe as me, debounce as de, ACTION_SEARCH as he } from "./index.DDwdbGlq.js";
3
- import { De as ue, He as pe, qe as O, Ge as Ce, Fe as Se, Pe as p, Ye as H, st as L, Ee as ge, a as Te, p as fe, p$1 as xe, y as ye, a$1 as Ee, i$1 as Ae, HistoryContext as Y, ChatContext as W, useAiChat as Re, E as K, useUserPreferences as Ne, ConfirmationPanel as De, LazyToastContainerWrapper as ve, mutateCall as P, SERVICE_TYPES as U, showErrorToast as Oe, setNewProvider as we, CHAT_SET_PROVIDER as Me, showSuccessToast as ke, CHAT_SET_STATUS as Ie, E$1 as A, useChatsHistory as _e, tt as be, a$2 as ze } from "./App.CtCPYlbl.js";
4
- import { Fragment as He, useRef as M, useState as N, useContext as D, useCallback as Le, useEffect as k } from "react";
5
- const Pe = ({
1
+ import { jsxs as m, jsx as e, Fragment as Q } from "react/jsx-runtime";
2
+ import { I, INFINITE_SCROLL_THRESHOLD as V, CARDS as Z, pluralize as ee, ue as w, numberFormatter as te, isProbablyMobile as se, n as B, INFINITE_SCROLL_LIMIT as b, LOCAL_STORAGE_PREFIX as $, LOCAL_STORAGE_SORT as re, APP_CLASSNAME as ae, ACTION_SORT as z, TOAST_CHAT_DELETED as oe, TOAST_PROVIDER_CHANGED as ne, LOCAL_STORAGE_SEARCH as ce, HISTORY_TITLE as ie, pe as le, debounce as de, ACTION_SEARCH as me } from "./index.BcfpTkrB.js";
3
+ import { De as he, He as ue, qe as O, Ge as pe, Fe as Ce, Pe as u, Ye as L, st as H, Ee as Se, a as Te, p as ge, p$1 as xe, y as fe, a$1 as ye, i$1 as Ee, HistoryContext as F, ChatContext as G, useAiChat as Ae, E as Y, useUserPreferences as Ne, ConfirmationPanel as Re, LazyToastContainerWrapper as ve, mutateCall as P, SERVICE_TYPES as U, showErrorToast as De, setNewProvider as Oe, CHAT_SET_PROVIDER as we, showSuccessToast as Me, CHAT_SET_STATUS as ke, E$1 as N, useChatsHistory as Ie, tt as _e, a$2 as be } from "./App.DUfwsVPe.js";
4
+ import { Fragment as ze, useRef as M, useState as R, useContext as v, useCallback as Le, useEffect as k } from "react";
5
+ const He = ({
6
6
  className: c,
7
7
  viewBox: a,
8
- title: m,
8
+ title: l,
9
9
  monotone: d,
10
10
  ...i
11
- }) => /* @__PURE__ */ h(
11
+ }) => /* @__PURE__ */ m(
12
12
  I,
13
13
  {
14
14
  defaultViewBox: "0 0 448 512",
15
15
  size: "size-5",
16
16
  viewBox: a,
17
17
  className: c,
18
- title: m || "Delete",
18
+ title: l || "Delete",
19
19
  ...i,
20
20
  children: [
21
21
  /* @__PURE__ */ e(
@@ -28,20 +28,20 @@ const Pe = ({
28
28
  /* @__PURE__ */ e("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" })
29
29
  ]
30
30
  }
31
- ), Ue = ({
31
+ ), Pe = ({
32
32
  className: c,
33
33
  viewBox: a,
34
- title: m,
34
+ title: l,
35
35
  monotone: d,
36
36
  ...i
37
- }) => /* @__PURE__ */ h(
37
+ }) => /* @__PURE__ */ m(
38
38
  I,
39
39
  {
40
40
  defaultViewBox: "0 0 512 512",
41
41
  size: "size-5",
42
42
  viewBox: a,
43
43
  className: c,
44
- title: m || "Restore",
44
+ title: l || "Restore",
45
45
  ...i,
46
46
  children: [
47
47
  /* @__PURE__ */ e(
@@ -54,20 +54,20 @@ const Pe = ({
54
54
  /* @__PURE__ */ e("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" })
55
55
  ]
56
56
  }
57
- ), Ve = ({
57
+ ), Ue = ({
58
58
  className: c,
59
59
  viewBox: a,
60
- title: m,
60
+ title: l,
61
61
  monotone: d,
62
62
  ...i
63
- }) => /* @__PURE__ */ h(
63
+ }) => /* @__PURE__ */ m(
64
64
  I,
65
65
  {
66
66
  defaultViewBox: "0 0 512 512",
67
67
  size: "size-5",
68
68
  viewBox: a,
69
69
  className: c,
70
- title: m || "Search",
70
+ title: l || "Search",
71
71
  ...i,
72
72
  children: [
73
73
  /* @__PURE__ */ e(
@@ -80,46 +80,45 @@ const Pe = ({
80
80
  /* @__PURE__ */ e("path", { d: "m330.7 376 126.7 126.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L376 330.7c-12.7 17.3-28 32.6-45.3 45.3" })
81
81
  ]
82
82
  }
83
- ), $e = {
84
- [Ae]: xe,
85
- [Ee]: fe,
86
- [ye]: Te
87
- }, s = {
83
+ ), Ve = {
84
+ [Ee]: xe,
85
+ [ye]: ge,
86
+ [fe]: Te
87
+ }, r = {
88
88
  ROW: "row",
89
89
  TIMESTAMP: "timestamp",
90
90
  SUMMARY: "summary",
91
91
  PROVIDER: "provider",
92
92
  TOKEN_USAGE: "tokenUsage",
93
93
  ACTIONS: "actions"
94
- }, V = B() ? [
95
- s.ROW,
96
- s.TIMESTAMP,
97
- s.SUMMARY,
98
- s.PROVIDER,
99
- s.ACTIONS
100
- ] : [
101
- s.ROW,
102
- s.SUMMARY,
103
- s.TIMESTAMP,
104
- s.TOKEN_USAGE,
105
- s.PROVIDER,
106
- s.ACTIONS
107
- ], Be = ({
94
+ }, Be = [
95
+ r.ROW,
96
+ r.TIMESTAMP,
97
+ r.SUMMARY,
98
+ r.ACTIONS
99
+ ], $e = [
100
+ r.ROW,
101
+ r.SUMMARY,
102
+ r.TIMESTAMP,
103
+ r.TOKEN_USAGE,
104
+ r.PROVIDER,
105
+ r.ACTIONS
106
+ ], Fe = ({
108
107
  filteredHistory: c,
109
108
  historyState: a,
110
- lastEntryToLoad: m,
109
+ lastEntryToLoad: l,
111
110
  onClickSort: d,
112
111
  onClickRestore: i,
113
- onClickDelete: T,
114
- infinityScrollMarkerRef: f
112
+ onClickDelete: g,
113
+ infinityScrollMarkerRef: x
115
114
  }) => {
116
- const l = B(), o = (t) => {
115
+ const o = se() ? Be : $e, A = (t) => {
117
116
  switch (t) {
118
- case s.ROW:
119
- return /* @__PURE__ */ e(p, { className: "sr-only", children: "Row" }, t);
120
- case s.TIMESTAMP:
117
+ case r.ROW:
118
+ return /* @__PURE__ */ e(u, { className: "sr-only", children: "Row" }, t);
119
+ case r.TIMESTAMP:
121
120
  return /* @__PURE__ */ e(
122
- H,
121
+ L,
123
122
  {
124
123
  buttonClassName: "text-xs sm:text-sm",
125
124
  cellId: "timestamp",
@@ -133,13 +132,13 @@ const Pe = ({
133
132
  },
134
133
  t
135
134
  );
136
- case s.SUMMARY:
137
- return /* @__PURE__ */ e(p, { className: "text-xs sm:text-sm", children: "Summary" }, t);
138
- case s.PROVIDER:
139
- return /* @__PURE__ */ e(p, { className: "text-xs sm:text-sm", children: "Provider" }, t);
140
- case s.TOKEN_USAGE:
141
- return l ? null : /* @__PURE__ */ e(
142
- H,
135
+ case r.SUMMARY:
136
+ return /* @__PURE__ */ e(u, { className: "text-xs sm:text-sm", children: "Summary" }, t);
137
+ case r.PROVIDER:
138
+ return /* @__PURE__ */ e(u, { className: "text-xs sm:text-sm", children: "Provider" }, t);
139
+ case r.TOKEN_USAGE:
140
+ return /* @__PURE__ */ e(
141
+ L,
143
142
  {
144
143
  buttonClassName: "text-xs sm:text-sm",
145
144
  cellId: "tokenUsage",
@@ -153,30 +152,30 @@ const Pe = ({
153
152
  },
154
153
  t
155
154
  );
156
- case s.ACTIONS:
157
- return /* @__PURE__ */ e(p, { className: "text-xs sm:text-sm text-right", children: "Actions" }, t);
155
+ case r.ACTIONS:
156
+ return /* @__PURE__ */ e(u, { className: "text-xs sm:text-sm text-right", children: "Actions" }, t);
158
157
  default:
159
158
  return null;
160
159
  }
161
- }, y = (t, r, u) => {
160
+ }, f = (t, s, T) => {
162
161
  switch (t) {
163
- case s.ROW:
164
- return /* @__PURE__ */ e(p, { children: u + 1 }, t);
165
- case s.TIMESTAMP:
162
+ case r.ROW:
163
+ return /* @__PURE__ */ e(u, { children: T + 1 }, t);
164
+ case r.TIMESTAMP:
166
165
  return /* @__PURE__ */ e(
167
- p,
166
+ u,
168
167
  {
169
168
  component: "th",
170
169
  scope: "row",
171
170
  className: "text-gray-400 sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none",
172
- children: r.timestamp.split(",")[0]
171
+ children: s.timestamp.split(",")[0]
173
172
  },
174
173
  t
175
174
  );
176
- case s.SUMMARY: {
177
- const C = r.summary || (r.messages.length > 0 ? r.messages[0]?.content : "");
175
+ case r.SUMMARY: {
176
+ const C = s.summary || (s.messages.length > 0 ? s.messages[0]?.content : "");
178
177
  return /* @__PURE__ */ e(
179
- p,
178
+ u,
180
179
  {
181
180
  className: "max-w-[100px] text-white sm:max-w-full text-xs sm:text-sm",
182
181
  style: {
@@ -187,41 +186,41 @@ const Pe = ({
187
186
  t
188
187
  );
189
188
  }
190
- case s.PROVIDER: {
191
- const C = r.model ? ge(r.model) : null, E = C ? $e[C] : null;
189
+ case r.PROVIDER: {
190
+ const C = s.model ? Se(s.model) : null, y = C ? Ve[C] : null;
192
191
  return /* @__PURE__ */ e(
193
- p,
192
+ u,
194
193
  {
195
194
  component: "th",
196
195
  scope: "row",
197
196
  className: "text-gray-400",
198
197
  align: "center",
199
- children: E ? /* @__PURE__ */ e(
200
- E,
198
+ children: y ? /* @__PURE__ */ e(
199
+ y,
201
200
  {
202
201
  size: "size-4 sm:size-5",
203
202
  semantic: !0,
204
- title: r.model || C
203
+ title: s.model || C
205
204
  }
206
205
  ) : null
207
206
  },
208
207
  t
209
208
  );
210
209
  }
211
- case s.TOKEN_USAGE:
212
- return l ? null : /* @__PURE__ */ e(
213
- p,
210
+ case r.TOKEN_USAGE:
211
+ return /* @__PURE__ */ e(
212
+ u,
214
213
  {
215
214
  className: "text-gray-400 text-xs sm:text-sm",
216
215
  align: "right",
217
- children: r.tokenUsage ? re.format(r.tokenUsage) : "0"
216
+ children: s.tokenUsage ? te.format(s.tokenUsage) : "0"
218
217
  },
219
218
  t
220
219
  );
221
- case s.ACTIONS:
222
- return /* @__PURE__ */ h(p, { align: "right", children: [
220
+ case r.ACTIONS:
221
+ return /* @__PURE__ */ e(u, { children: /* @__PURE__ */ m("div", { className: "flex flex-col items-end sm:flex-row gap-2", children: [
223
222
  /* @__PURE__ */ e(
224
- L,
223
+ H,
225
224
  {
226
225
  label: "Restore chat",
227
226
  mode: "alt-system",
@@ -229,22 +228,21 @@ const Pe = ({
229
228
  trigger: /* @__PURE__ */ e(
230
229
  w,
231
230
  {
232
- className: "mr-2",
233
231
  focusMode: "alt-system",
234
232
  noBorder: !0,
235
233
  label: "Restore chat",
236
234
  variant: "primary",
237
235
  iconClassName: "text-green-800 dark:text-green-500",
238
236
  onClick: async () => {
239
- await i(r);
237
+ await i(s);
240
238
  },
241
- children: /* @__PURE__ */ e(Ue, { size: "size-3", monotone: !0 })
239
+ children: /* @__PURE__ */ e(Pe, { size: "size-3", monotone: !0 })
242
240
  }
243
241
  )
244
242
  }
245
243
  ),
246
244
  /* @__PURE__ */ e(
247
- L,
245
+ H,
248
246
  {
249
247
  label: "Delete chat",
250
248
  mode: "alt-system",
@@ -258,145 +256,145 @@ const Pe = ({
258
256
  variant: "primary",
259
257
  iconClassName: "text-red-700 dark:text-red-500",
260
258
  onClick: () => {
261
- T(r);
259
+ g(s);
262
260
  },
263
- children: /* @__PURE__ */ e(Pe, { size: "size-3", monotone: !0 })
261
+ children: /* @__PURE__ */ e(He, { size: "size-3", monotone: !0 })
264
262
  }
265
263
  )
266
264
  }
267
265
  )
268
- ] }, t);
266
+ ] }) }, t);
269
267
  default:
270
268
  return null;
271
269
  }
272
270
  };
273
- return /* @__PURE__ */ h(ue, { stickyHeader: !0, stickyFooter: !0, compact: !0, children: [
274
- /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(O, { children: V.map((t) => o(t)) }) }),
275
- /* @__PURE__ */ e(Ce, { children: c.slice(0, m).map((t, r) => t?.messages?.length > 0 ? /* @__PURE__ */ h(He, { children: [
276
- r === m - $ && /* @__PURE__ */ e("tr", { ref: f }),
277
- /* @__PURE__ */ e(O, { children: V.map(
278
- (u) => y(u, t, r)
271
+ return /* @__PURE__ */ m(he, { stickyHeader: !0, stickyFooter: !0, compact: !0, children: [
272
+ /* @__PURE__ */ e(ue, { children: /* @__PURE__ */ e(O, { children: o.map((t) => A(t)) }) }),
273
+ /* @__PURE__ */ e(pe, { children: c.slice(0, l).map((t, s) => t?.messages?.length > 0 ? /* @__PURE__ */ m(ze, { children: [
274
+ s === l - V && /* @__PURE__ */ e("tr", { ref: x }),
275
+ /* @__PURE__ */ e(O, { children: o.map(
276
+ (T) => f(T, t, s)
279
277
  ) })
280
- ] }, `${te.HISTORY.TITLE}-${t.id}-${r}`) : null) }),
281
- /* @__PURE__ */ e(Se, { children: /* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(p, { colSpan: 1e3, children: /* @__PURE__ */ e("div", { children: se(
278
+ ] }, `${Z.HISTORY.TITLE}-${t.id}-${s}`) : null) }),
279
+ /* @__PURE__ */ e(Ce, { children: /* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(u, { colSpan: 1e3, children: /* @__PURE__ */ e("div", { children: ee(
282
280
  `${c.length} chat`,
283
281
  c.length
284
282
  ) }) }) }) })
285
283
  ] });
286
- }, Fe = ({
284
+ }, Ge = ({
287
285
  filteredHistory: c,
288
286
  dispatch: a,
289
- onOpenChange: m,
287
+ onOpenChange: l,
290
288
  mutate: d
291
289
  }) => {
292
- const { user: i, getAccessToken: T } = F(), f = M(null), l = M({
290
+ const { user: i, getAccessToken: g } = B(), x = M(null), h = M({
293
291
  id: "",
294
292
  timestamp: "",
295
293
  message: ""
296
- }), [o, y] = N(!1), [t, r] = N(
297
- b + $
298
- ), { state: u, dispatch: C } = D(Y), {
299
- state: { provider: E },
300
- setChatId: R,
301
- setInitialMessages: v
302
- } = D(W), { setInput: _ } = Re(), [, g] = K({
303
- key: G + ae,
304
- initialValue: u.sortDirection
305
- }), { refetch: j } = Ne({
294
+ }), [o, A] = R(!1), [f, t] = R(
295
+ b + V
296
+ ), { state: s, dispatch: T } = v(F), {
297
+ state: { provider: C },
298
+ setChatId: y,
299
+ setInitialMessages: D
300
+ } = v(G), { setInput: _ } = Ae(), [, S] = Y({
301
+ key: $ + re,
302
+ initialValue: s.sortDirection
303
+ }), { refetch: W } = Ne({
306
304
  user: i?.username,
307
- getAccessToken: T
308
- }), q = (n) => {
309
- switch (u.sortDirection) {
310
- case A.ASC:
311
- g(A.DESC), C({
305
+ getAccessToken: g
306
+ }), K = (n) => {
307
+ switch (s.sortDirection) {
308
+ case N.ASC:
309
+ S(N.DESC), T({
312
310
  type: z,
313
311
  payload: {
314
312
  sortedCell: n,
315
- sortDirection: A.DESC
313
+ sortDirection: N.DESC
316
314
  }
317
315
  });
318
316
  break;
319
317
  default:
320
- g(A.ASC), C({
318
+ S(N.ASC), T({
321
319
  type: z,
322
320
  payload: {
323
321
  sortedCell: n,
324
- sortDirection: A.ASC
322
+ sortDirection: N.ASC
325
323
  }
326
324
  });
327
325
  break;
328
326
  }
329
- }, X = async () => {
330
- const n = l.current;
327
+ }, j = async () => {
328
+ const n = h.current;
331
329
  try {
332
330
  await P({
333
- accessToken: await T(),
331
+ accessToken: await g(),
334
332
  type: U.DELETE_CHAT,
335
333
  params: {
336
334
  userId: i?.username || "",
337
335
  id: n.id
338
336
  }
339
- }), d(""), await Oe(oe, {
337
+ }), d(""), await De(oe, {
340
338
  autoClose: 2e3,
341
339
  containerId: "history-table"
342
340
  });
343
341
  } catch {
344
342
  }
345
- }, J = async (n) => {
343
+ }, q = async (n) => {
346
344
  try {
347
- const x = await T(), S = await P({
348
- accessToken: x,
345
+ const E = await g(), p = await P({
346
+ accessToken: E,
349
347
  type: U.GET_CHAT,
350
348
  params: {
351
349
  id: n.id
352
350
  }
353
351
  });
354
- S.status === 200 && (S.data.provider !== E && (await we({
355
- provider: S.data.provider,
356
- accessToken: x,
352
+ p.status === 200 && (p.data.provider !== C && (await Oe({
353
+ provider: p.data.provider,
354
+ accessToken: E,
357
355
  username: i?.username || ""
358
356
  }), a({
359
- type: Me,
357
+ type: we,
360
358
  payload: {
361
- provider: S.data.provider
359
+ provider: p.data.provider
362
360
  }
363
- }), j(), await ke(
364
- `${ce} ${S.data.provider}`,
361
+ }), W(), await Me(
362
+ `${ne} ${p.data.provider}`,
365
363
  {
366
364
  containerId: "toggle-provider"
367
365
  }
368
366
  )), a({
369
- type: Ie,
367
+ type: ke,
370
368
  payload: {
371
369
  restoring: !0,
372
- restoredModel: S.data?.model || "",
373
- restoredUsage: S.data?.tokenUsage || 0
370
+ restoredModel: p.data?.model || "",
371
+ restoredUsage: p.data?.tokenUsage || 0
374
372
  }
375
- }), _(""), R(n.id), v(S.data.messages), m(!1));
373
+ }), _(""), y(n.id), D(p.data.messages), l(!1));
376
374
  } catch {
377
375
  }
378
- }, Q = (n) => {
379
- l.current = {
376
+ }, X = (n) => {
377
+ h.current = {
380
378
  id: n.id,
381
379
  timestamp: n.timestamp,
382
380
  message: n.messages.length > 0 ? n.messages[0]?.content : ""
383
- }, y(!o);
384
- }, Z = Le((n) => {
385
- n[0].isIntersecting && r((S) => S + b);
381
+ }, A(!o);
382
+ }, J = Le((n) => {
383
+ n[0].isIntersecting && t((p) => p + b);
386
384
  }, []);
387
385
  return k(() => {
388
386
  const n = {
389
387
  // root: null,
390
388
  rootMargin: "20px"
391
- }, x = new IntersectionObserver(Z, n);
392
- f.current && x.observe(f.current);
393
- }), /* @__PURE__ */ h(ee, { children: [
394
- /* @__PURE__ */ h(
395
- De,
389
+ }, E = new IntersectionObserver(J, n);
390
+ x.current && E.observe(x.current);
391
+ }), /* @__PURE__ */ m(Q, { children: [
392
+ /* @__PURE__ */ m(
393
+ Re,
396
394
  {
397
395
  showConfirmation: o,
398
- setShowConfirmation: y,
399
- action: X,
396
+ setShowConfirmation: A,
397
+ action: j,
400
398
  customStrings: {
401
399
  confirmAction: "Delete",
402
400
  cancelAction: "Cancel",
@@ -404,78 +402,78 @@ const Pe = ({
404
402
  },
405
403
  children: [
406
404
  /* @__PURE__ */ e("p", { className: "m-0", children: "Are you sure you want to delete the following chat:" }),
407
- /* @__PURE__ */ h("ul", { className: "m-0", children: [
408
- /* @__PURE__ */ h("li", { children: [
405
+ /* @__PURE__ */ m("ul", { className: "m-0", children: [
406
+ /* @__PURE__ */ m("li", { children: [
409
407
  "Timestamp:",
410
408
  " ",
411
- /* @__PURE__ */ e("span", { className: "text-lg", children: l.current && l.current.timestamp })
409
+ /* @__PURE__ */ e("span", { className: "text-lg", children: h.current && h.current.timestamp })
412
410
  ] }),
413
- /* @__PURE__ */ h("li", { children: [
411
+ /* @__PURE__ */ m("li", { children: [
414
412
  "First message:",
415
413
  " ",
416
- /* @__PURE__ */ e("span", { className: "text-lg", children: l.current?.message })
414
+ /* @__PURE__ */ e("span", { className: "text-lg", children: h.current?.message })
417
415
  ] })
418
416
  ] })
419
417
  ]
420
418
  }
421
419
  ),
422
- /* @__PURE__ */ e("div", { className: ne, children: /* @__PURE__ */ e(ve, { containerId: "history-table" }) }),
420
+ /* @__PURE__ */ e("div", { className: ae, children: /* @__PURE__ */ e(ve, { containerId: "history-table" }) }),
423
421
  /* @__PURE__ */ e(
424
- Be,
422
+ Fe,
425
423
  {
426
424
  filteredHistory: c,
427
- historyState: u,
428
- lastEntryToLoad: t,
429
- onClickSort: q,
430
- onClickRestore: J,
431
- onClickDelete: Q,
432
- infinityScrollMarkerRef: f
425
+ historyState: s,
426
+ lastEntryToLoad: f,
427
+ onClickSort: K,
428
+ onClickRestore: q,
429
+ onClickDelete: X,
430
+ infinityScrollMarkerRef: x
433
431
  }
434
432
  )
435
433
  ] });
436
- }, je = ({
434
+ }, qe = ({
437
435
  open: c,
438
436
  onOpenChange: a
439
437
  }) => {
440
- const { getAccessToken: m, user: d } = F(), { dispatch: i } = D(W), [T, f] = N([]), l = M(null), { state: o, dispatch: y } = D(Y), [t, r] = N(
438
+ const { getAccessToken: l, user: d } = B(), { dispatch: i } = v(G), [g, x] = R([]), h = M(null), { state: o, dispatch: A } = v(F), [f, t] = R(
441
439
  o.sortDirection
442
- ), { data: u, refetch: C } = _e({
440
+ ), { data: s, refetch: T } = Ie({
443
441
  enabled: c,
444
442
  user: d?.username || "",
445
443
  searchString: o.searchString,
446
- sortDirection: t,
444
+ sortDirection: f,
447
445
  sortedCell: o.sortedCell,
448
- getAccessToken: m
449
- }), [, E] = K({
450
- key: G + ie,
446
+ getAccessToken: l
447
+ }), [, C] = Y({
448
+ key: $ + ce,
451
449
  initialValue: o.searchString
452
450
  });
453
451
  k(() => {
454
- o.sortDirection !== t && r(o.sortDirection);
455
- }, [o, t]), k(() => {
456
- u && f(u);
457
- }, [u]);
458
- const R = async (g) => {
459
- E(g), y({
460
- type: he,
461
- payload: { searchString: g }
452
+ o.sortDirection !== f && t(o.sortDirection);
453
+ }, [o, f]), k(() => {
454
+ s && x(s);
455
+ }, [s]);
456
+ const y = async (S) => {
457
+ C(S), A({
458
+ type: me,
459
+ payload: { searchString: S }
462
460
  });
463
- }, v = de((g) => {
464
- R(g.target.value.trim());
461
+ }, D = de((S) => {
462
+ y(S.target.value.trim());
465
463
  }, 500);
466
- return /* @__PURE__ */ h(
467
- be,
464
+ return /* @__PURE__ */ m(
465
+ _e,
468
466
  {
469
467
  open: c,
470
468
  onOpenChange: a,
471
- title: le,
469
+ title: ie,
472
470
  animation: !0,
473
471
  animationType: "fade",
474
472
  children: [
475
- /* @__PURE__ */ e("form", { autoComplete: "off", onSubmit: async (g) => {
476
- g.preventDefault();
473
+ /* @__PURE__ */ e("form", { autoComplete: "off", onSubmit: async (S) => {
474
+ S.preventDefault();
477
475
  }, children: /* @__PURE__ */ e(
478
- me,
476
+ le,
479
477
  {
480
478
  placeholder: "Search",
481
479
  labelHidden: !0,
@@ -483,13 +481,13 @@ const Pe = ({
483
481
  autoCapitalize: "off",
484
482
  autoComplete: "off",
485
483
  autoCorrect: "off",
486
- ref: l,
484
+ ref: h,
487
485
  defaultValue: o.searchString,
488
486
  focusMode: "light",
489
487
  mode: "light",
490
488
  name: "Search",
491
489
  label: "Search",
492
- onChange: v,
490
+ onChange: D,
493
491
  className: "my-2",
494
492
  rightElement: /* @__PURE__ */ e("div", { className: "text-copy-dark", children: /* @__PURE__ */ e(
495
493
  w,
@@ -499,19 +497,19 @@ const Pe = ({
499
497
  label: "Search",
500
498
  size: "small",
501
499
  onClick: () => {
502
- R(""), l.current?.value && (l.current.value = "", l.current.focus());
500
+ y(""), h.current?.value && (h.current.value = "", h.current.focus());
503
501
  },
504
502
  disabled: o.searchString === "",
505
- children: o.searchString !== "" ? /* @__PURE__ */ e(ze, { monotone: !0, size: "size-3" }) : /* @__PURE__ */ e(Ve, { monotone: !0, size: "size-3" })
503
+ children: o.searchString !== "" ? /* @__PURE__ */ e(be, { monotone: !0, size: "size-3" }) : /* @__PURE__ */ e(Ue, { monotone: !0, size: "size-3" })
506
504
  }
507
505
  ) })
508
506
  }
509
507
  ) }),
510
508
  /* @__PURE__ */ e("div", { className: "flex flex-col sm:flex-row max-h-[75vh] min-h-[60vh]", children: /* @__PURE__ */ e(
511
- Fe,
509
+ Ge,
512
510
  {
513
- mutate: C,
514
- filteredHistory: T,
511
+ mutate: T,
512
+ filteredHistory: g,
515
513
  dispatch: i,
516
514
  onOpenChange: a
517
515
  }
@@ -521,5 +519,5 @@ const Pe = ({
521
519
  );
522
520
  };
523
521
  export {
524
- je as HistoryPanel
522
+ qe as HistoryPanel
525
523
  };