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