@versini/sassysaint 5.3.8 → 5.3.9
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/{App.DlhiXCoz.js → App.CiWR0jbo.js} +563 -555
- package/dist/chunks/{LazyHeader.DqDJRIjX.js → LazyHeader.C3UmEKkw.js} +1076 -985
- package/dist/chunks/{LazyMarkdownWithExtra.DdI965fc.js → LazyMarkdownWithExtra.CA4l-kCG.js} +1 -1
- package/dist/chunks/{LazyMessageAssistant.CI97mVOI.js → LazyMessageAssistant.Bq--JTre.js} +4 -4
- package/dist/chunks/{index.BsmLg4en.js → index.BiQ5lu6V.js} +522 -542
- package/dist/chunks/{index.C8-dCwmB.js → index.DbhB3Iku.js} +101 -93
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
|
@@ -1,136 +1,133 @@
|
|
|
1
|
-
import { jsxs as v, Fragment as
|
|
2
|
-
import { AppContext as
|
|
3
|
-
import {
|
|
4
|
-
import S, { useContext as
|
|
5
|
-
import
|
|
6
|
-
function
|
|
1
|
+
import { jsxs as v, Fragment as $, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { AppContext as U, TagsContext as G, rn as V, ACTION_SET_TAGS as oe, b as Te, j as _e, R as j, isLastMessageFromRole as ne, CANCEL as Ne, CLEAR as we, ACTION_RESET as ie, ACTION_TOGGLE_TAG as se, ROLE_ASSISTANT as C, ROLE_INTERNAL as P, ROLE_USER as H, ROLE_SYSTEM as Ee, ROLE_HIDDEN as Ce, DEFAULT_AI_ENGINE as L, STATS_SEPARATOR as q, ACTION_MODEL as de, ACTION_MESSAGE as B, ACTION_RESET_TAGS as le, TYPE_QUESTION as Ie, SEND as Se, ACTION_STREAMING as ce, ERROR_MESSAGE as Re, getMessageContaintWrapperClass as Be, MessagesContainerHeader as Ae, ACTION_SEARCH as Me, ACTION_SORT as Le, ACTION_RESTORE as Oe, ACTION_ENGINE as ge, HistoryContext as $e, d as Ue, AppFooter as Ve, LOCAL_STORAGE_PREFIX as J, LOCAL_STORAGE_SEARCH as ze, LOCAL_STORAGE_SORT as De } from "./index.BiQ5lu6V.js";
|
|
3
|
+
import { serviceCall as ue, SERVICE_TYPES as me, restCall as je, we as He, E as Q, f as Ge } from "./index.DbhB3Iku.js";
|
|
4
|
+
import S, { useContext as A, useState as M, useRef as I, useEffect as _, lazy as Pe, Suspense as X, useReducer as z } from "react";
|
|
5
|
+
import l from "clsx";
|
|
6
|
+
function Fe(e) {
|
|
7
7
|
const t = e.toLowerCase().split("+").map((o) => o.trim()), r = {
|
|
8
8
|
alt: t.includes("alt"),
|
|
9
9
|
ctrl: t.includes("ctrl"),
|
|
10
10
|
meta: t.includes("meta"),
|
|
11
11
|
mod: t.includes("mod"),
|
|
12
12
|
shift: t.includes("shift")
|
|
13
|
-
}, a = ["alt", "ctrl", "meta", "shift", "mod"],
|
|
13
|
+
}, a = ["alt", "ctrl", "meta", "shift", "mod"], n = t.find((o) => !a.includes(o));
|
|
14
14
|
return {
|
|
15
15
|
...r,
|
|
16
|
-
key:
|
|
16
|
+
key: n
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
const { alt: r, ctrl: a, meta:
|
|
21
|
-
if (r !==
|
|
19
|
+
function We(e, t) {
|
|
20
|
+
const { alt: r, ctrl: a, meta: n, mod: o, shift: c, key: s } = e, { altKey: p, ctrlKey: g, metaKey: h, shiftKey: b, key: u } = t;
|
|
21
|
+
if (r !== p)
|
|
22
22
|
return !1;
|
|
23
23
|
if (o) {
|
|
24
|
-
if (!
|
|
24
|
+
if (!g && !h)
|
|
25
25
|
return !1;
|
|
26
|
-
} else if (a !==
|
|
26
|
+
} else if (a !== g || n !== h)
|
|
27
27
|
return !1;
|
|
28
|
-
return
|
|
28
|
+
return c !== b ? !1 : !!(s && (u.toLowerCase() === s.toLowerCase() || t.code.replace("Key", "").toLowerCase() === s.toLowerCase()));
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
return (t) =>
|
|
30
|
+
function Ke(e) {
|
|
31
|
+
return (t) => We(Fe(e), t);
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function Ye(e) {
|
|
34
34
|
return (t) => {
|
|
35
35
|
const r = "nativeEvent" in t ? t.nativeEvent : t;
|
|
36
|
-
e.forEach(([a,
|
|
37
|
-
|
|
36
|
+
e.forEach(([a, n, o = { preventDefault: !0 }]) => {
|
|
37
|
+
Ke(a)(r) && (o.preventDefault && t.preventDefault(), n(r));
|
|
38
38
|
});
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
for (
|
|
43
|
-
f.push((
|
|
44
|
-
function
|
|
41
|
+
const f = [];
|
|
42
|
+
for (let e = 0; e < 256; ++e)
|
|
43
|
+
f.push((e + 256).toString(16).slice(1));
|
|
44
|
+
function qe(e, t = 0) {
|
|
45
45
|
return (f[e[t + 0]] + f[e[t + 1]] + f[e[t + 2]] + f[e[t + 3]] + "-" + f[e[t + 4]] + f[e[t + 5]] + "-" + f[e[t + 6]] + f[e[t + 7]] + "-" + f[e[t + 8]] + f[e[t + 9]] + "-" + f[e[t + 10]] + f[e[t + 11]] + f[e[t + 12]] + f[e[t + 13]] + f[e[t + 14]] + f[e[t + 15]]).toLowerCase();
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
let D;
|
|
48
|
+
const Je = new Uint8Array(16);
|
|
49
|
+
function Qe() {
|
|
50
|
+
if (!D) {
|
|
51
|
+
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
52
|
+
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
53
|
+
D = crypto.getRandomValues.bind(crypto);
|
|
54
|
+
}
|
|
55
|
+
return D(Je);
|
|
52
56
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
randomUUID
|
|
56
|
-
|
|
57
|
-
function J(e, t, r) {
|
|
58
|
-
if (ae.randomUUID && !t && !e)
|
|
59
|
-
return ae.randomUUID();
|
|
57
|
+
const Xe = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Z = { randomUUID: Xe };
|
|
58
|
+
function F(e, t, r) {
|
|
59
|
+
if (Z.randomUUID && !t && !e)
|
|
60
|
+
return Z.randomUUID();
|
|
60
61
|
e = e || {};
|
|
61
|
-
|
|
62
|
-
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128,
|
|
62
|
+
const a = e.random || (e.rng || Qe)();
|
|
63
|
+
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, qe(a);
|
|
63
64
|
}
|
|
64
|
-
const
|
|
65
|
-
const { dispatch: e, state: t } = U
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
initialValue: !1
|
|
71
|
-
}), [b] = $({
|
|
72
|
-
key: M + "rephrase-content",
|
|
73
|
-
initialValue: !1
|
|
74
|
-
}), u = (c) => {
|
|
75
|
-
c.preventDefault(), e({
|
|
76
|
-
type: le
|
|
65
|
+
const Ze = () => {
|
|
66
|
+
const { dispatch: e, state: t } = A(U), { dispatch: r, state: a } = A(G), { getAccessToken: n, user: o } = V(), [c, s] = M({
|
|
67
|
+
loaded: !1
|
|
68
|
+
}), p = "mt-2 flex justify-center rounded-md", g = I(null), h = I(!1), b = (d) => {
|
|
69
|
+
d.preventDefault(), e({
|
|
70
|
+
type: ie
|
|
77
71
|
});
|
|
78
72
|
};
|
|
79
|
-
|
|
80
|
-
(t == null ? void 0 : t.streaming) === !0 && !
|
|
73
|
+
_(() => {
|
|
74
|
+
(t == null ? void 0 : t.streaming) === !0 && !h.current && g.current && (h.current = !0, g.current.focus()), (t == null ? void 0 : t.streaming) === !1 && (h.current = !1);
|
|
81
75
|
}, [t]);
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
type:
|
|
76
|
+
const u = (d, m) => {
|
|
77
|
+
d.preventDefault(), r({
|
|
78
|
+
type: se,
|
|
85
79
|
payload: {
|
|
86
|
-
tag:
|
|
80
|
+
tag: m
|
|
87
81
|
}
|
|
88
82
|
});
|
|
89
83
|
};
|
|
90
|
-
return
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
size: "small",
|
|
121
|
-
onClick: (c) => m(c, C.REPHRASE_CONTENT),
|
|
122
|
-
children: O[C.REPHRASE_CONTENT].label
|
|
123
|
-
}
|
|
124
|
-
) }) })
|
|
125
|
-
] }),
|
|
126
|
-
de(I, t) && /* @__PURE__ */ n("div", { className: a, children: /* @__PURE__ */ n(
|
|
127
|
-
B,
|
|
84
|
+
return _(() => {
|
|
85
|
+
if (!o) {
|
|
86
|
+
s({
|
|
87
|
+
loaded: !1
|
|
88
|
+
});
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
c.loaded || (async () => {
|
|
92
|
+
try {
|
|
93
|
+
const d = await ue({
|
|
94
|
+
accessToken: await n(),
|
|
95
|
+
type: me.GET_USER_PREFERENCES,
|
|
96
|
+
params: {
|
|
97
|
+
user: o.username
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
d.status === 200 && (r({
|
|
101
|
+
type: oe,
|
|
102
|
+
payload: {
|
|
103
|
+
tags: d.data.tags || []
|
|
104
|
+
}
|
|
105
|
+
}), s({
|
|
106
|
+
loaded: !0
|
|
107
|
+
}));
|
|
108
|
+
} catch {
|
|
109
|
+
}
|
|
110
|
+
})();
|
|
111
|
+
}, [o]), /* @__PURE__ */ v($, { children: [
|
|
112
|
+
/* @__PURE__ */ i(Te, { alignHorizontal: "center", columnGap: 2, children: c && c.loaded && a.tags && a.tags.map((d) => d.enabled && d.label && d.content && /* @__PURE__ */ i(_e, { children: /* @__PURE__ */ i("div", { className: p, children: /* @__PURE__ */ i(
|
|
113
|
+
j,
|
|
128
114
|
{
|
|
129
115
|
noBorder: !0,
|
|
130
116
|
mode: "dark",
|
|
131
117
|
focusMode: "light",
|
|
132
|
-
|
|
133
|
-
onClick: u,
|
|
118
|
+
size: "small",
|
|
119
|
+
onClick: (m) => u(m, d.content),
|
|
120
|
+
children: d.label
|
|
121
|
+
}
|
|
122
|
+
) }) }, `tag-button-${d.slot}`)) }),
|
|
123
|
+
ne(C, t) && /* @__PURE__ */ i("div", { className: p, children: /* @__PURE__ */ i(
|
|
124
|
+
j,
|
|
125
|
+
{
|
|
126
|
+
noBorder: !0,
|
|
127
|
+
mode: "dark",
|
|
128
|
+
focusMode: "light",
|
|
129
|
+
ref: g,
|
|
130
|
+
onClick: b,
|
|
134
131
|
children: t != null && t.streaming ? Ne : we
|
|
135
132
|
}
|
|
136
133
|
) })
|
|
@@ -149,7 +146,7 @@ try {
|
|
|
149
146
|
});
|
|
150
147
|
} catch {
|
|
151
148
|
}
|
|
152
|
-
const
|
|
149
|
+
const et = "av-bubble", ee = "av-button", tt = (e) => {
|
|
153
150
|
let t = "";
|
|
154
151
|
if (typeof e == "number" || typeof e == "string")
|
|
155
152
|
t = "m-" + e;
|
|
@@ -158,32 +155,32 @@ const rt = "av-bubble", oe = "av-button", at = (e) => {
|
|
|
158
155
|
(e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
|
|
159
156
|
}
|
|
160
157
|
return t;
|
|
161
|
-
},
|
|
158
|
+
}, W = "icon", rt = "button", at = "link", ot = ({
|
|
162
159
|
type: e,
|
|
163
160
|
size: t,
|
|
164
161
|
labelRight: r,
|
|
165
162
|
labelLeft: a,
|
|
166
|
-
align:
|
|
163
|
+
align: n
|
|
167
164
|
}) => {
|
|
168
|
-
const o = "text-sm font-medium max-h-8 py-0",
|
|
165
|
+
const o = "text-sm font-medium max-h-8 py-0", c = "text-base font-medium max-h-9 py-1", s = "text-lg font-medium max-h-12 py-2";
|
|
169
166
|
switch (e) {
|
|
170
|
-
case
|
|
171
|
-
return
|
|
167
|
+
case rt:
|
|
168
|
+
return l("px-4", {
|
|
172
169
|
[o]: t === "small",
|
|
173
|
-
[
|
|
170
|
+
[c]: t === "medium",
|
|
174
171
|
[s]: t === "large"
|
|
175
172
|
});
|
|
176
|
-
case
|
|
177
|
-
return
|
|
173
|
+
case at:
|
|
174
|
+
return l("px-4 text-center", {
|
|
178
175
|
[o]: t === "small",
|
|
179
|
-
[
|
|
176
|
+
[c]: t === "medium",
|
|
180
177
|
[s]: t === "large"
|
|
181
178
|
});
|
|
182
|
-
case
|
|
183
|
-
return
|
|
184
|
-
"justify-center":
|
|
185
|
-
"justify-start":
|
|
186
|
-
"justify-end":
|
|
179
|
+
case W:
|
|
180
|
+
return l("inline-flex items-center", {
|
|
181
|
+
"justify-center": n === "center",
|
|
182
|
+
"justify-start": n === "left",
|
|
183
|
+
"justify-end": n === "right",
|
|
187
184
|
"h-6 w-6 p-0": t === "small" && !(r || a),
|
|
188
185
|
"h-6 px-4 text-sm font-medium": t === "small" && (r || a),
|
|
189
186
|
"h-8 w-8 p-1": t === "medium" && !(r || a),
|
|
@@ -192,7 +189,7 @@ const rt = "av-bubble", oe = "av-button", at = (e) => {
|
|
|
192
189
|
"h-12 px-4 text-lg font-medium": t === "large" && (r || a)
|
|
193
190
|
});
|
|
194
191
|
}
|
|
195
|
-
},
|
|
192
|
+
}, nt = ({
|
|
196
193
|
mode: e,
|
|
197
194
|
noBackground: t,
|
|
198
195
|
noTruncate: r,
|
|
@@ -201,7 +198,7 @@ const rt = "av-bubble", oe = "av-button", at = (e) => {
|
|
|
201
198
|
if (t)
|
|
202
199
|
return "not-prose rounded-full";
|
|
203
200
|
if (a === "primary")
|
|
204
|
-
return
|
|
201
|
+
return l("not-prose rounded-full", {
|
|
205
202
|
truncate: !r,
|
|
206
203
|
"bg-action-dark text-copy-light": e === "dark",
|
|
207
204
|
"bg-action-light text-copy-lighter": e === "light",
|
|
@@ -209,7 +206,7 @@ const rt = "av-bubble", oe = "av-button", at = (e) => {
|
|
|
209
206
|
"bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "alt-system"
|
|
210
207
|
});
|
|
211
208
|
if (a === "secondary")
|
|
212
|
-
return
|
|
209
|
+
return l("not-prose rounded-full", {
|
|
213
210
|
truncate: !r,
|
|
214
211
|
"bg-action-dark text-copy-light": e === "light",
|
|
215
212
|
"bg-action-light text-copy-lighter": e === "dark",
|
|
@@ -217,14 +214,14 @@ const rt = "av-bubble", oe = "av-button", at = (e) => {
|
|
|
217
214
|
"bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "system"
|
|
218
215
|
});
|
|
219
216
|
if (a === "danger")
|
|
220
|
-
return
|
|
217
|
+
return l("not-prose rounded-full", {
|
|
221
218
|
truncate: !r,
|
|
222
219
|
"bg-action-danger-dark text-copy-light": e === "dark",
|
|
223
220
|
"bg-action-danger-light text-copy-lighter": e === "light",
|
|
224
221
|
"bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
|
|
225
222
|
"bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
|
|
226
223
|
});
|
|
227
|
-
},
|
|
224
|
+
}, it = ({
|
|
228
225
|
mode: e,
|
|
229
226
|
disabled: t,
|
|
230
227
|
variant: r
|
|
@@ -232,27 +229,27 @@ const rt = "av-bubble", oe = "av-button", at = (e) => {
|
|
|
232
229
|
if (t)
|
|
233
230
|
return "";
|
|
234
231
|
if (r === "primary")
|
|
235
|
-
return
|
|
232
|
+
return l("hover:text-copy-light-hover", {
|
|
236
233
|
"hover:bg-action-dark-hover": e === "dark",
|
|
237
234
|
"hover:bg-action-light-hover": e === "light",
|
|
238
235
|
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
|
|
239
236
|
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
|
|
240
237
|
});
|
|
241
238
|
if (r === "secondary")
|
|
242
|
-
return
|
|
239
|
+
return l("hover:text-copy-light-hover", {
|
|
243
240
|
"hover:bg-action-dark-hover": e === "light",
|
|
244
241
|
"hover:bg-action-light-hover": e === "dark",
|
|
245
242
|
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
|
|
246
243
|
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
|
|
247
244
|
});
|
|
248
245
|
if (r === "danger")
|
|
249
|
-
return
|
|
246
|
+
return l("hover:text-copy-light-hover", {
|
|
250
247
|
"hover:bg-action-danger-dark-hover": e === "dark",
|
|
251
248
|
"hover:bg-action-danger-light-hover": e === "light",
|
|
252
249
|
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
253
250
|
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
254
251
|
});
|
|
255
|
-
},
|
|
252
|
+
}, st = ({
|
|
256
253
|
mode: e,
|
|
257
254
|
disabled: t,
|
|
258
255
|
variant: r
|
|
@@ -260,27 +257,27 @@ const rt = "av-bubble", oe = "av-button", at = (e) => {
|
|
|
260
257
|
if (t)
|
|
261
258
|
return "";
|
|
262
259
|
if (r === "primary")
|
|
263
|
-
return
|
|
260
|
+
return l("active:text-copy-light-active", {
|
|
264
261
|
"active:bg-action-dark-active": e === "dark",
|
|
265
262
|
"active:bg-action-light-active": e === "light",
|
|
266
263
|
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
|
|
267
264
|
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
|
|
268
265
|
});
|
|
269
266
|
if (r === "secondary")
|
|
270
|
-
return
|
|
267
|
+
return l("active:text-copy-light-active", {
|
|
271
268
|
"active:bg-action-dark-active": e === "light",
|
|
272
269
|
"active:bg-action-light-active": e === "dark",
|
|
273
270
|
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
|
|
274
271
|
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
|
|
275
272
|
});
|
|
276
273
|
if (r === "danger")
|
|
277
|
-
return
|
|
274
|
+
return l("active:text-copy-lighter-active", {
|
|
278
275
|
"active:bg-action-danger-dark-active": e === "dark",
|
|
279
276
|
"active:bg-action-danger-light-active": e === "light",
|
|
280
277
|
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
281
278
|
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
282
279
|
});
|
|
283
|
-
},
|
|
280
|
+
}, dt = ({
|
|
284
281
|
mode: e,
|
|
285
282
|
noBorder: t,
|
|
286
283
|
variant: r
|
|
@@ -288,140 +285,140 @@ const rt = "av-bubble", oe = "av-button", at = (e) => {
|
|
|
288
285
|
if (t)
|
|
289
286
|
return "border border-transparent";
|
|
290
287
|
if (r === "primary")
|
|
291
|
-
return
|
|
288
|
+
return l("border", {
|
|
292
289
|
"border-border-dark": e === "dark",
|
|
293
290
|
"border-border-accent": e === "light",
|
|
294
291
|
"border-border-dark dark:border-border-accent": e === "system",
|
|
295
292
|
"border-border-accent dark:border-border-dark": e === "alt-system"
|
|
296
293
|
});
|
|
297
294
|
if (r === "secondary")
|
|
298
|
-
return
|
|
295
|
+
return l("border", {
|
|
299
296
|
"border-border-dark": e === "light",
|
|
300
297
|
"border-border-accent": e === "dark",
|
|
301
298
|
"border-border-dark dark:border-border-accent": e === "alt-system",
|
|
302
299
|
"border-border-accent dark:border-border-dark": e === "system"
|
|
303
300
|
});
|
|
304
301
|
if (r === "danger")
|
|
305
|
-
return
|
|
302
|
+
return l("border", {
|
|
306
303
|
"border-border-danger-dark": e === "dark",
|
|
307
304
|
"border-border-danger-medium": e === "light",
|
|
308
305
|
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
309
306
|
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
310
307
|
});
|
|
311
|
-
},
|
|
308
|
+
}, lt = ({ focusMode: e }) => l("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
312
309
|
"focus:outline-focus-dark": e === "dark",
|
|
313
310
|
"focus:outline-focus-light": e === "light",
|
|
314
311
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
315
312
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
316
|
-
}),
|
|
313
|
+
}), he = ({
|
|
317
314
|
type: e,
|
|
318
315
|
className: t,
|
|
319
316
|
raw: r,
|
|
320
317
|
mode: a,
|
|
321
|
-
focusMode:
|
|
318
|
+
focusMode: n,
|
|
322
319
|
disabled: o,
|
|
323
|
-
fullWidth:
|
|
320
|
+
fullWidth: c,
|
|
324
321
|
size: s,
|
|
325
|
-
noBorder:
|
|
326
|
-
labelRight:
|
|
327
|
-
labelLeft:
|
|
328
|
-
spacing:
|
|
329
|
-
noBackground:
|
|
330
|
-
variant:
|
|
331
|
-
noTruncate:
|
|
322
|
+
noBorder: p,
|
|
323
|
+
labelRight: g,
|
|
324
|
+
labelLeft: h,
|
|
325
|
+
spacing: b,
|
|
326
|
+
noBackground: u,
|
|
327
|
+
variant: d,
|
|
328
|
+
noTruncate: m,
|
|
332
329
|
align: y
|
|
333
|
-
}) => (
|
|
334
|
-
|
|
330
|
+
}) => (d || (d = "primary"), r ? l(ee, t) : l(
|
|
331
|
+
ee,
|
|
335
332
|
t,
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
333
|
+
tt(b),
|
|
334
|
+
nt({ mode: a, variant: d, noBackground: u, noTruncate: m }),
|
|
335
|
+
ot({ type: e, size: s, labelRight: g, labelLeft: h, align: y }),
|
|
336
|
+
dt({ mode: a, variant: d, noBorder: p }),
|
|
337
|
+
lt({ focusMode: n }),
|
|
338
|
+
it({ mode: a, variant: d, disabled: o }),
|
|
339
|
+
st({ mode: a, variant: d, disabled: o }),
|
|
343
340
|
{
|
|
344
|
-
"w-full":
|
|
341
|
+
"w-full": c,
|
|
345
342
|
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
346
343
|
}
|
|
347
|
-
)),
|
|
344
|
+
)), ct = (e, t, r) => {
|
|
348
345
|
var a;
|
|
349
346
|
!t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
|
|
350
|
-
},
|
|
351
|
-
const { onClick: r, noInternalClick: a = !1, ...
|
|
352
|
-
return /* @__PURE__ */
|
|
347
|
+
}, K = S.forwardRef((e, t) => {
|
|
348
|
+
const { onClick: r, noInternalClick: a = !1, ...n } = e;
|
|
349
|
+
return /* @__PURE__ */ i(
|
|
353
350
|
"button",
|
|
354
351
|
{
|
|
355
352
|
ref: t,
|
|
356
353
|
onClick: (o) => {
|
|
357
|
-
|
|
354
|
+
ct(o, a, r);
|
|
358
355
|
},
|
|
359
|
-
...
|
|
356
|
+
...n
|
|
360
357
|
}
|
|
361
358
|
);
|
|
362
359
|
});
|
|
363
|
-
|
|
364
|
-
const
|
|
360
|
+
K.displayName = "BaseButton";
|
|
361
|
+
const pe = S.forwardRef(
|
|
365
362
|
({
|
|
366
363
|
children: e,
|
|
367
364
|
disabled: t = !1,
|
|
368
365
|
mode: r = "system",
|
|
369
366
|
focusMode: a = "system",
|
|
370
|
-
fullWidth:
|
|
367
|
+
fullWidth: n = !1,
|
|
371
368
|
className: o,
|
|
372
|
-
type:
|
|
369
|
+
type: c = "button",
|
|
373
370
|
raw: s = !1,
|
|
374
|
-
noBorder:
|
|
375
|
-
"aria-label":
|
|
376
|
-
label:
|
|
377
|
-
size:
|
|
378
|
-
labelRight:
|
|
379
|
-
labelLeft:
|
|
380
|
-
spacing:
|
|
371
|
+
noBorder: p = !1,
|
|
372
|
+
"aria-label": g,
|
|
373
|
+
label: h,
|
|
374
|
+
size: b = "medium",
|
|
375
|
+
labelRight: u,
|
|
376
|
+
labelLeft: d,
|
|
377
|
+
spacing: m,
|
|
381
378
|
noBackground: y = !1,
|
|
382
|
-
align:
|
|
383
|
-
...
|
|
384
|
-
},
|
|
385
|
-
const k =
|
|
386
|
-
type:
|
|
379
|
+
align: N = "center",
|
|
380
|
+
...w
|
|
381
|
+
}, E) => {
|
|
382
|
+
const k = he({
|
|
383
|
+
type: W,
|
|
387
384
|
mode: r,
|
|
388
385
|
focusMode: a,
|
|
389
|
-
fullWidth:
|
|
386
|
+
fullWidth: n,
|
|
390
387
|
disabled: t,
|
|
391
388
|
raw: s,
|
|
392
389
|
className: o,
|
|
393
|
-
noBorder:
|
|
394
|
-
size:
|
|
395
|
-
labelRight:
|
|
396
|
-
labelLeft:
|
|
397
|
-
spacing:
|
|
390
|
+
noBorder: p,
|
|
391
|
+
size: b,
|
|
392
|
+
labelRight: u,
|
|
393
|
+
labelLeft: d,
|
|
394
|
+
spacing: m,
|
|
398
395
|
noBackground: y,
|
|
399
|
-
align:
|
|
400
|
-
}), x =
|
|
396
|
+
align: N
|
|
397
|
+
}), x = l({
|
|
401
398
|
"text-copy-accent-dark": r === "light" && !s,
|
|
402
399
|
"text-copy-light": r === "dark" && !s,
|
|
403
400
|
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !s,
|
|
404
401
|
"text-copy-light dark:text-copy-accent-dark": r === "system" && !s
|
|
405
402
|
});
|
|
406
403
|
return /* @__PURE__ */ v(
|
|
407
|
-
|
|
404
|
+
K,
|
|
408
405
|
{
|
|
409
|
-
ref:
|
|
406
|
+
ref: E,
|
|
410
407
|
className: k,
|
|
411
408
|
disabled: t,
|
|
412
|
-
type:
|
|
413
|
-
"aria-label":
|
|
414
|
-
...
|
|
409
|
+
type: c,
|
|
410
|
+
"aria-label": g || h,
|
|
411
|
+
...w,
|
|
415
412
|
children: [
|
|
416
|
-
|
|
417
|
-
/* @__PURE__ */
|
|
418
|
-
|
|
413
|
+
d && /* @__PURE__ */ i("span", { className: "pr-2", children: d }),
|
|
414
|
+
/* @__PURE__ */ i("div", { className: x, children: e }),
|
|
415
|
+
u && /* @__PURE__ */ i("span", { className: "pl-2", children: u })
|
|
419
416
|
]
|
|
420
417
|
}
|
|
421
418
|
);
|
|
422
419
|
}
|
|
423
420
|
);
|
|
424
|
-
|
|
421
|
+
pe.displayName = "ButtonIcon";
|
|
425
422
|
/*!
|
|
426
423
|
@versini/ui-button v1.1.11
|
|
427
424
|
© 2024 gizmette.com
|
|
@@ -435,49 +432,49 @@ try {
|
|
|
435
432
|
});
|
|
436
433
|
} catch {
|
|
437
434
|
}
|
|
438
|
-
const
|
|
435
|
+
const gt = S.forwardRef(
|
|
439
436
|
({
|
|
440
437
|
children: e,
|
|
441
438
|
disabled: t = !1,
|
|
442
439
|
mode: r = "system",
|
|
443
440
|
focusMode: a = "system",
|
|
444
|
-
fullWidth:
|
|
441
|
+
fullWidth: n = !1,
|
|
445
442
|
className: o,
|
|
446
|
-
type:
|
|
443
|
+
type: c = "button",
|
|
447
444
|
raw: s = !1,
|
|
448
|
-
noBorder:
|
|
449
|
-
"aria-label":
|
|
450
|
-
label:
|
|
451
|
-
size:
|
|
452
|
-
labelRight:
|
|
453
|
-
labelLeft:
|
|
454
|
-
spacing:
|
|
445
|
+
noBorder: p = !1,
|
|
446
|
+
"aria-label": g,
|
|
447
|
+
label: h,
|
|
448
|
+
size: b = "medium",
|
|
449
|
+
labelRight: u,
|
|
450
|
+
labelLeft: d,
|
|
451
|
+
spacing: m,
|
|
455
452
|
noBackground: y = !1,
|
|
456
|
-
align:
|
|
457
|
-
active:
|
|
458
|
-
...
|
|
453
|
+
align: N = "center",
|
|
454
|
+
active: w = !1,
|
|
455
|
+
...E
|
|
459
456
|
}, k) => {
|
|
460
|
-
const x =
|
|
461
|
-
type:
|
|
457
|
+
const x = he({
|
|
458
|
+
type: W,
|
|
462
459
|
mode: r,
|
|
463
460
|
focusMode: a,
|
|
464
|
-
fullWidth:
|
|
461
|
+
fullWidth: n,
|
|
465
462
|
disabled: t,
|
|
466
463
|
raw: s,
|
|
467
464
|
className: o,
|
|
468
|
-
noBorder:
|
|
469
|
-
size:
|
|
470
|
-
labelRight:
|
|
471
|
-
labelLeft:
|
|
472
|
-
spacing:
|
|
465
|
+
noBorder: p,
|
|
466
|
+
size: b,
|
|
467
|
+
labelRight: u,
|
|
468
|
+
labelLeft: d,
|
|
469
|
+
spacing: m,
|
|
473
470
|
noBackground: y,
|
|
474
|
-
align:
|
|
475
|
-
}),
|
|
471
|
+
align: N
|
|
472
|
+
}), R = l({
|
|
476
473
|
"text-copy-accent-dark": r === "light" && !s,
|
|
477
474
|
"text-copy-light": r === "dark" && !s,
|
|
478
475
|
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !s,
|
|
479
476
|
"text-copy-light dark:text-copy-accent-dark": r === "system" && !s
|
|
480
|
-
}), T =
|
|
477
|
+
}), T = w ? l(
|
|
481
478
|
"relative",
|
|
482
479
|
"focus-within:static",
|
|
483
480
|
"focus-within:after:border-transparent",
|
|
@@ -494,26 +491,26 @@ const mt = S.forwardRef(
|
|
|
494
491
|
"after:border-table-light dark:after:border-table-dark": r === "alt-system"
|
|
495
492
|
}
|
|
496
493
|
) : "";
|
|
497
|
-
return /* @__PURE__ */
|
|
498
|
-
|
|
494
|
+
return /* @__PURE__ */ i("div", { className: T, children: /* @__PURE__ */ v(
|
|
495
|
+
K,
|
|
499
496
|
{
|
|
500
497
|
ref: k,
|
|
501
498
|
className: x,
|
|
502
499
|
disabled: t,
|
|
503
|
-
type:
|
|
504
|
-
"aria-label":
|
|
505
|
-
...
|
|
500
|
+
type: c,
|
|
501
|
+
"aria-label": g || h,
|
|
502
|
+
...E,
|
|
506
503
|
children: [
|
|
507
|
-
|
|
508
|
-
/* @__PURE__ */
|
|
509
|
-
|
|
504
|
+
d && /* @__PURE__ */ i("span", { className: "pr-2", children: d }),
|
|
505
|
+
/* @__PURE__ */ i("div", { className: R, children: e }),
|
|
506
|
+
u && /* @__PURE__ */ i("span", { className: "pl-2", children: u })
|
|
510
507
|
]
|
|
511
508
|
}
|
|
512
509
|
) });
|
|
513
510
|
}
|
|
514
511
|
);
|
|
515
|
-
|
|
516
|
-
const
|
|
512
|
+
gt.displayName = "ButtonSort";
|
|
513
|
+
const ut = (e) => {
|
|
517
514
|
let t = "";
|
|
518
515
|
if (typeof e == "number" || typeof e == "string")
|
|
519
516
|
t = "m-" + e;
|
|
@@ -522,38 +519,38 @@ const ht = (e) => {
|
|
|
522
519
|
(e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
|
|
523
520
|
}
|
|
524
521
|
return t;
|
|
525
|
-
},
|
|
522
|
+
}, be = ({
|
|
526
523
|
children: e,
|
|
527
524
|
fill: t,
|
|
528
525
|
viewBox: r,
|
|
529
526
|
className: a,
|
|
530
|
-
defaultViewBox:
|
|
527
|
+
defaultViewBox: n,
|
|
531
528
|
defaultClassName: o,
|
|
532
|
-
spacing:
|
|
529
|
+
spacing: c,
|
|
533
530
|
title: s,
|
|
534
|
-
semantic:
|
|
535
|
-
...
|
|
531
|
+
semantic: p = !1,
|
|
532
|
+
...g
|
|
536
533
|
}) => {
|
|
537
|
-
const
|
|
538
|
-
|
|
534
|
+
const h = ut(c), b = l(
|
|
535
|
+
h,
|
|
539
536
|
a || o
|
|
540
537
|
);
|
|
541
|
-
return /* @__PURE__ */ v(
|
|
542
|
-
/* @__PURE__ */
|
|
538
|
+
return /* @__PURE__ */ v($, { children: [
|
|
539
|
+
/* @__PURE__ */ i(
|
|
543
540
|
"svg",
|
|
544
541
|
{
|
|
545
542
|
xmlns: "http://www.w3.org/2000/svg",
|
|
546
|
-
className:
|
|
547
|
-
viewBox: r ||
|
|
543
|
+
className: b,
|
|
544
|
+
viewBox: r || n,
|
|
548
545
|
fill: t || "currentColor",
|
|
549
546
|
role: "img",
|
|
550
|
-
"aria-hidden": !
|
|
547
|
+
"aria-hidden": !p,
|
|
551
548
|
focusable: !1,
|
|
552
|
-
...
|
|
549
|
+
...g,
|
|
553
550
|
children: e
|
|
554
551
|
}
|
|
555
552
|
),
|
|
556
|
-
s &&
|
|
553
|
+
s && p && /* @__PURE__ */ i("span", { className: "sr-only", children: s })
|
|
557
554
|
] });
|
|
558
555
|
};
|
|
559
556
|
/*!
|
|
@@ -569,15 +566,15 @@ try {
|
|
|
569
566
|
});
|
|
570
567
|
} catch {
|
|
571
568
|
}
|
|
572
|
-
const
|
|
569
|
+
const mt = ({
|
|
573
570
|
className: e,
|
|
574
571
|
viewBox: t,
|
|
575
572
|
spacing: r,
|
|
576
573
|
title: a,
|
|
577
|
-
monotone:
|
|
574
|
+
monotone: n,
|
|
578
575
|
...o
|
|
579
576
|
}) => /* @__PURE__ */ v(
|
|
580
|
-
|
|
577
|
+
be,
|
|
581
578
|
{
|
|
582
579
|
defaultViewBox: "0 0 448 512",
|
|
583
580
|
defaultClassName: "size-5",
|
|
@@ -587,25 +584,25 @@ const pt = ({
|
|
|
587
584
|
title: a || "Copied",
|
|
588
585
|
...o,
|
|
589
586
|
children: [
|
|
590
|
-
/* @__PURE__ */
|
|
587
|
+
/* @__PURE__ */ i(
|
|
591
588
|
"path",
|
|
592
589
|
{
|
|
593
590
|
opacity: "0.4",
|
|
594
591
|
d: "M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zM337 209L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"
|
|
595
592
|
}
|
|
596
593
|
),
|
|
597
|
-
/* @__PURE__ */
|
|
594
|
+
/* @__PURE__ */ i("path", { d: "M337 175c9.4 9.4 9.4 24.6 0 33.9L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0z" })
|
|
598
595
|
]
|
|
599
596
|
}
|
|
600
|
-
),
|
|
597
|
+
), ht = ({
|
|
601
598
|
className: e,
|
|
602
599
|
viewBox: t,
|
|
603
600
|
spacing: r,
|
|
604
601
|
title: a,
|
|
605
|
-
monotone:
|
|
602
|
+
monotone: n,
|
|
606
603
|
...o
|
|
607
|
-
}) => /* @__PURE__ */
|
|
608
|
-
|
|
604
|
+
}) => /* @__PURE__ */ i(
|
|
605
|
+
be,
|
|
609
606
|
{
|
|
610
607
|
defaultViewBox: "0 0 512 512",
|
|
611
608
|
defaultClassName: "size-5",
|
|
@@ -614,7 +611,7 @@ const pt = ({
|
|
|
614
611
|
spacing: r,
|
|
615
612
|
title: a || "Copy",
|
|
616
613
|
...o,
|
|
617
|
-
children: /* @__PURE__ */
|
|
614
|
+
children: /* @__PURE__ */ i("path", { d: "M64 464H288c8.8 0 16-7.2 16-16V384h48v64c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V224c0-35.3 28.7-64 64-64h64v48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16zM224 304H448c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H224c-8.8 0-16 7.2-16 16V288c0 8.8 7.2 16 16 16zm-64-16V64c0-35.3 28.7-64 64-64H448c35.3 0 64 28.7 64 64V288c0 35.3-28.7 64-64 64H224c-35.3 0-64-28.7-64-64z" })
|
|
618
615
|
}
|
|
619
616
|
);
|
|
620
617
|
/*!
|
|
@@ -630,7 +627,7 @@ try {
|
|
|
630
627
|
});
|
|
631
628
|
} catch {
|
|
632
629
|
}
|
|
633
|
-
const
|
|
630
|
+
const pt = (e) => {
|
|
634
631
|
let t = "";
|
|
635
632
|
if (typeof e == "number" || typeof e == "string")
|
|
636
633
|
t = "m-" + e;
|
|
@@ -639,93 +636,93 @@ const ft = (e) => {
|
|
|
639
636
|
(e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
|
|
640
637
|
}
|
|
641
638
|
return t;
|
|
642
|
-
},
|
|
639
|
+
}, bt = () => "p-4 sm:max-w-md md:max-w-2xl", ft = ({ kind: e }) => l({
|
|
643
640
|
"bg-surface-lighter dark:bg-surface-dark": e === "left",
|
|
644
641
|
"bg-surface-accent": e === "right"
|
|
645
|
-
}),
|
|
642
|
+
}), yt = ({ kind: e }) => l(
|
|
646
643
|
"prose prose-dark dark:prose-lighter prose-p:my-3 prose-blockquote:my-3 prose-ol:my-3 prose-ul:my-3 prose-ul:prose-li:marker:text-black",
|
|
647
644
|
{
|
|
648
645
|
"text-copy-lighter": e === "right"
|
|
649
646
|
}
|
|
650
|
-
),
|
|
647
|
+
), vt = ({ kind: e }) => l("rounded-b-xl", {
|
|
651
648
|
"rounded-tr-xl": e === "left",
|
|
652
649
|
"rounded-tl-xl": e === "right"
|
|
653
|
-
}),
|
|
650
|
+
}), kt = ({
|
|
654
651
|
kind: e,
|
|
655
652
|
className: t,
|
|
656
653
|
spacing: r
|
|
657
654
|
}) => {
|
|
658
|
-
const a =
|
|
655
|
+
const a = l(
|
|
659
656
|
t,
|
|
660
|
-
|
|
657
|
+
et,
|
|
661
658
|
"flex items-start",
|
|
662
|
-
|
|
659
|
+
pt(r),
|
|
663
660
|
{
|
|
664
661
|
"flex-row-reverse": e === "right"
|
|
665
662
|
}
|
|
666
|
-
),
|
|
663
|
+
), n = l(
|
|
667
664
|
"flex flex-col empty:hidden",
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
), o = "pr-2 pt-1 text-end text-xs text-copy-light",
|
|
665
|
+
bt(),
|
|
666
|
+
yt({ kind: e }),
|
|
667
|
+
ft({ kind: e }),
|
|
668
|
+
vt({ kind: e })
|
|
669
|
+
), o = "pr-2 pt-1 text-end text-xs text-copy-light", c = l("flex flex-col-reverse gap-2 sm:flex-row", {
|
|
673
670
|
"ml-2": e === "left",
|
|
674
671
|
"mr-2": e === "right"
|
|
675
672
|
});
|
|
676
673
|
return {
|
|
677
674
|
wrapper: a,
|
|
678
|
-
main:
|
|
675
|
+
main: n,
|
|
679
676
|
footer: o,
|
|
680
|
-
copyButton:
|
|
677
|
+
copyButton: c
|
|
681
678
|
};
|
|
682
|
-
},
|
|
679
|
+
}, xt = ({
|
|
683
680
|
children: e,
|
|
684
681
|
kind: t = "left",
|
|
685
682
|
className: r,
|
|
686
683
|
footer: a,
|
|
687
|
-
rawFooter:
|
|
684
|
+
rawFooter: n,
|
|
688
685
|
copyToClipboard: o,
|
|
689
|
-
copyToClipboardFocusMode:
|
|
686
|
+
copyToClipboardFocusMode: c = "system",
|
|
690
687
|
copyToClipboardMode: s = "system",
|
|
691
|
-
spacing:
|
|
688
|
+
spacing: p
|
|
692
689
|
}) => {
|
|
693
|
-
const [
|
|
694
|
-
|
|
690
|
+
const [g, h] = M(!1), b = kt({ kind: t, className: r, spacing: p }), u = !!o && (typeof o == "function" || typeof o == "string" || typeof e == "string"), d = () => {
|
|
691
|
+
h(!0), typeof o == "function" ? o(e) : typeof o == "string" ? navigator.clipboard.writeText(o) : typeof e == "string" && navigator.clipboard.writeText(e);
|
|
695
692
|
};
|
|
696
|
-
return
|
|
697
|
-
let
|
|
698
|
-
return
|
|
699
|
-
|
|
693
|
+
return _(() => {
|
|
694
|
+
let m;
|
|
695
|
+
return g && (m = window.setTimeout(() => {
|
|
696
|
+
h(!1);
|
|
700
697
|
}, 3e3)), () => {
|
|
701
|
-
clearTimeout(
|
|
698
|
+
clearTimeout(m);
|
|
702
699
|
};
|
|
703
|
-
}, [
|
|
700
|
+
}, [g]), /* @__PURE__ */ v("div", { className: b.wrapper, children: [
|
|
704
701
|
/* @__PURE__ */ v("div", { children: [
|
|
705
|
-
/* @__PURE__ */
|
|
706
|
-
a && Object.keys(a).map((
|
|
707
|
-
|
|
702
|
+
/* @__PURE__ */ i("div", { className: b.main, children: e }),
|
|
703
|
+
a && Object.keys(a).map((m) => a[m] ? /* @__PURE__ */ i("div", { className: "prose-p:m-0", children: /* @__PURE__ */ v("p", { className: b.footer, children: [
|
|
704
|
+
m,
|
|
708
705
|
": ",
|
|
709
|
-
a[
|
|
710
|
-
] }) }, `-${
|
|
711
|
-
|
|
706
|
+
a[m]
|
|
707
|
+
] }) }, `-${m}`) : null),
|
|
708
|
+
n && n
|
|
712
709
|
] }),
|
|
713
|
-
|
|
714
|
-
|
|
710
|
+
u && /* @__PURE__ */ i("div", { className: b.copyButton, children: /* @__PURE__ */ i(
|
|
711
|
+
pe,
|
|
715
712
|
{
|
|
716
713
|
noBorder: !0,
|
|
717
714
|
noBackground: !0,
|
|
718
715
|
size: "small",
|
|
719
716
|
mode: s,
|
|
720
|
-
focusMode:
|
|
721
|
-
label:
|
|
722
|
-
onClick:
|
|
723
|
-
disabled:
|
|
724
|
-
children:
|
|
717
|
+
focusMode: c,
|
|
718
|
+
label: g ? "Copied to clipboard" : "Copy to clipboard",
|
|
719
|
+
onClick: d,
|
|
720
|
+
disabled: g,
|
|
721
|
+
children: g ? /* @__PURE__ */ i(mt, { className: "size-3" }) : /* @__PURE__ */ i(ht, { className: "size-3" })
|
|
725
722
|
}
|
|
726
723
|
) })
|
|
727
724
|
] });
|
|
728
|
-
},
|
|
725
|
+
}, te = "av-button", Tt = (e) => {
|
|
729
726
|
let t = "";
|
|
730
727
|
if (typeof e == "number" || typeof e == "string")
|
|
731
728
|
t = "m-" + e;
|
|
@@ -734,32 +731,32 @@ const ft = (e) => {
|
|
|
734
731
|
(e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
|
|
735
732
|
}
|
|
736
733
|
return t;
|
|
737
|
-
},
|
|
734
|
+
}, fe = "icon", ye = "button", _t = "link", Nt = ({
|
|
738
735
|
type: e,
|
|
739
736
|
size: t,
|
|
740
737
|
labelRight: r,
|
|
741
738
|
labelLeft: a,
|
|
742
|
-
align:
|
|
739
|
+
align: n
|
|
743
740
|
}) => {
|
|
744
|
-
const o = "text-sm font-medium max-h-8 py-0",
|
|
741
|
+
const o = "text-sm font-medium max-h-8 py-0", c = "text-base font-medium max-h-9 py-1", s = "text-lg font-medium max-h-12 py-2";
|
|
745
742
|
switch (e) {
|
|
746
|
-
case
|
|
747
|
-
return
|
|
743
|
+
case ye:
|
|
744
|
+
return l("px-4", {
|
|
748
745
|
[o]: t === "small",
|
|
749
|
-
[
|
|
746
|
+
[c]: t === "medium",
|
|
750
747
|
[s]: t === "large"
|
|
751
748
|
});
|
|
752
|
-
case
|
|
753
|
-
return
|
|
749
|
+
case _t:
|
|
750
|
+
return l("px-4 text-center", {
|
|
754
751
|
[o]: t === "small",
|
|
755
|
-
[
|
|
752
|
+
[c]: t === "medium",
|
|
756
753
|
[s]: t === "large"
|
|
757
754
|
});
|
|
758
|
-
case
|
|
759
|
-
return
|
|
760
|
-
"justify-center":
|
|
761
|
-
"justify-start":
|
|
762
|
-
"justify-end":
|
|
755
|
+
case fe:
|
|
756
|
+
return l("inline-flex items-center", {
|
|
757
|
+
"justify-center": n === "center",
|
|
758
|
+
"justify-start": n === "left",
|
|
759
|
+
"justify-end": n === "right",
|
|
763
760
|
"h-6 w-6 p-0": t === "small" && !(r || a),
|
|
764
761
|
"h-6 px-4 text-sm font-medium": t === "small" && (r || a),
|
|
765
762
|
"h-8 w-8 p-1": t === "medium" && !(r || a),
|
|
@@ -768,7 +765,7 @@ const ft = (e) => {
|
|
|
768
765
|
"h-12 px-4 text-lg font-medium": t === "large" && (r || a)
|
|
769
766
|
});
|
|
770
767
|
}
|
|
771
|
-
},
|
|
768
|
+
}, wt = ({
|
|
772
769
|
mode: e,
|
|
773
770
|
noBackground: t,
|
|
774
771
|
noTruncate: r,
|
|
@@ -777,7 +774,7 @@ const ft = (e) => {
|
|
|
777
774
|
if (t)
|
|
778
775
|
return "not-prose rounded-full";
|
|
779
776
|
if (a === "primary")
|
|
780
|
-
return
|
|
777
|
+
return l("not-prose rounded-full", {
|
|
781
778
|
truncate: !r,
|
|
782
779
|
"bg-action-dark text-copy-light": e === "dark",
|
|
783
780
|
"bg-action-light text-copy-lighter": e === "light",
|
|
@@ -785,7 +782,7 @@ const ft = (e) => {
|
|
|
785
782
|
"bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "alt-system"
|
|
786
783
|
});
|
|
787
784
|
if (a === "secondary")
|
|
788
|
-
return
|
|
785
|
+
return l("not-prose rounded-full", {
|
|
789
786
|
truncate: !r,
|
|
790
787
|
"bg-action-dark text-copy-light": e === "light",
|
|
791
788
|
"bg-action-light text-copy-lighter": e === "dark",
|
|
@@ -793,14 +790,14 @@ const ft = (e) => {
|
|
|
793
790
|
"bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "system"
|
|
794
791
|
});
|
|
795
792
|
if (a === "danger")
|
|
796
|
-
return
|
|
793
|
+
return l("not-prose rounded-full", {
|
|
797
794
|
truncate: !r,
|
|
798
795
|
"bg-action-danger-dark text-copy-light": e === "dark",
|
|
799
796
|
"bg-action-danger-light text-copy-lighter": e === "light",
|
|
800
797
|
"bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
|
|
801
798
|
"bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
|
|
802
799
|
});
|
|
803
|
-
},
|
|
800
|
+
}, Et = ({
|
|
804
801
|
mode: e,
|
|
805
802
|
disabled: t,
|
|
806
803
|
variant: r
|
|
@@ -808,27 +805,27 @@ const ft = (e) => {
|
|
|
808
805
|
if (t)
|
|
809
806
|
return "";
|
|
810
807
|
if (r === "primary")
|
|
811
|
-
return
|
|
808
|
+
return l("hover:text-copy-light-hover", {
|
|
812
809
|
"hover:bg-action-dark-hover": e === "dark",
|
|
813
810
|
"hover:bg-action-light-hover": e === "light",
|
|
814
811
|
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
|
|
815
812
|
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
|
|
816
813
|
});
|
|
817
814
|
if (r === "secondary")
|
|
818
|
-
return
|
|
815
|
+
return l("hover:text-copy-light-hover", {
|
|
819
816
|
"hover:bg-action-dark-hover": e === "light",
|
|
820
817
|
"hover:bg-action-light-hover": e === "dark",
|
|
821
818
|
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
|
|
822
819
|
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
|
|
823
820
|
});
|
|
824
821
|
if (r === "danger")
|
|
825
|
-
return
|
|
822
|
+
return l("hover:text-copy-light-hover", {
|
|
826
823
|
"hover:bg-action-danger-dark-hover": e === "dark",
|
|
827
824
|
"hover:bg-action-danger-light-hover": e === "light",
|
|
828
825
|
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
829
826
|
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
830
827
|
});
|
|
831
|
-
},
|
|
828
|
+
}, Ct = ({
|
|
832
829
|
mode: e,
|
|
833
830
|
disabled: t,
|
|
834
831
|
variant: r
|
|
@@ -836,27 +833,27 @@ const ft = (e) => {
|
|
|
836
833
|
if (t)
|
|
837
834
|
return "";
|
|
838
835
|
if (r === "primary")
|
|
839
|
-
return
|
|
836
|
+
return l("active:text-copy-light-active", {
|
|
840
837
|
"active:bg-action-dark-active": e === "dark",
|
|
841
838
|
"active:bg-action-light-active": e === "light",
|
|
842
839
|
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
|
|
843
840
|
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
|
|
844
841
|
});
|
|
845
842
|
if (r === "secondary")
|
|
846
|
-
return
|
|
843
|
+
return l("active:text-copy-light-active", {
|
|
847
844
|
"active:bg-action-dark-active": e === "light",
|
|
848
845
|
"active:bg-action-light-active": e === "dark",
|
|
849
846
|
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
|
|
850
847
|
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
|
|
851
848
|
});
|
|
852
849
|
if (r === "danger")
|
|
853
|
-
return
|
|
850
|
+
return l("active:text-copy-lighter-active", {
|
|
854
851
|
"active:bg-action-danger-dark-active": e === "dark",
|
|
855
852
|
"active:bg-action-danger-light-active": e === "light",
|
|
856
853
|
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
857
854
|
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
858
855
|
});
|
|
859
|
-
},
|
|
856
|
+
}, It = ({
|
|
860
857
|
mode: e,
|
|
861
858
|
noBorder: t,
|
|
862
859
|
variant: r
|
|
@@ -864,122 +861,122 @@ const ft = (e) => {
|
|
|
864
861
|
if (t)
|
|
865
862
|
return "border border-transparent";
|
|
866
863
|
if (r === "primary")
|
|
867
|
-
return
|
|
864
|
+
return l("border", {
|
|
868
865
|
"border-border-dark": e === "dark",
|
|
869
866
|
"border-border-accent": e === "light",
|
|
870
867
|
"border-border-dark dark:border-border-accent": e === "system",
|
|
871
868
|
"border-border-accent dark:border-border-dark": e === "alt-system"
|
|
872
869
|
});
|
|
873
870
|
if (r === "secondary")
|
|
874
|
-
return
|
|
871
|
+
return l("border", {
|
|
875
872
|
"border-border-dark": e === "light",
|
|
876
873
|
"border-border-accent": e === "dark",
|
|
877
874
|
"border-border-dark dark:border-border-accent": e === "alt-system",
|
|
878
875
|
"border-border-accent dark:border-border-dark": e === "system"
|
|
879
876
|
});
|
|
880
877
|
if (r === "danger")
|
|
881
|
-
return
|
|
878
|
+
return l("border", {
|
|
882
879
|
"border-border-danger-dark": e === "dark",
|
|
883
880
|
"border-border-danger-medium": e === "light",
|
|
884
881
|
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
885
882
|
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
886
883
|
});
|
|
887
|
-
},
|
|
884
|
+
}, St = ({ focusMode: e }) => l("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
888
885
|
"focus:outline-focus-dark": e === "dark",
|
|
889
886
|
"focus:outline-focus-light": e === "light",
|
|
890
887
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
891
888
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
892
|
-
}),
|
|
889
|
+
}), ve = ({
|
|
893
890
|
type: e,
|
|
894
891
|
className: t,
|
|
895
892
|
raw: r,
|
|
896
893
|
mode: a,
|
|
897
|
-
focusMode:
|
|
894
|
+
focusMode: n,
|
|
898
895
|
disabled: o,
|
|
899
|
-
fullWidth:
|
|
896
|
+
fullWidth: c,
|
|
900
897
|
size: s,
|
|
901
|
-
noBorder:
|
|
902
|
-
labelRight:
|
|
903
|
-
labelLeft:
|
|
904
|
-
spacing:
|
|
905
|
-
noBackground:
|
|
906
|
-
variant:
|
|
907
|
-
noTruncate:
|
|
898
|
+
noBorder: p,
|
|
899
|
+
labelRight: g,
|
|
900
|
+
labelLeft: h,
|
|
901
|
+
spacing: b,
|
|
902
|
+
noBackground: u,
|
|
903
|
+
variant: d,
|
|
904
|
+
noTruncate: m,
|
|
908
905
|
align: y
|
|
909
|
-
}) => (
|
|
910
|
-
|
|
906
|
+
}) => (d || (d = "primary"), r ? l(te, t) : l(
|
|
907
|
+
te,
|
|
911
908
|
t,
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
909
|
+
Tt(b),
|
|
910
|
+
wt({ mode: a, variant: d, noBackground: u, noTruncate: m }),
|
|
911
|
+
Nt({ type: e, size: s, labelRight: g, labelLeft: h, align: y }),
|
|
912
|
+
It({ mode: a, variant: d, noBorder: p }),
|
|
913
|
+
St({ focusMode: n }),
|
|
914
|
+
Et({ mode: a, variant: d, disabled: o }),
|
|
915
|
+
Ct({ mode: a, variant: d, disabled: o }),
|
|
919
916
|
{
|
|
920
|
-
"w-full":
|
|
917
|
+
"w-full": c,
|
|
921
918
|
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
922
919
|
}
|
|
923
|
-
)),
|
|
920
|
+
)), Rt = (e, t, r) => {
|
|
924
921
|
var a;
|
|
925
922
|
!t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
|
|
926
|
-
},
|
|
927
|
-
const { onClick: r, noInternalClick: a = !1, ...
|
|
928
|
-
return /* @__PURE__ */
|
|
923
|
+
}, Y = S.forwardRef((e, t) => {
|
|
924
|
+
const { onClick: r, noInternalClick: a = !1, ...n } = e;
|
|
925
|
+
return /* @__PURE__ */ i(
|
|
929
926
|
"button",
|
|
930
927
|
{
|
|
931
928
|
ref: t,
|
|
932
929
|
onClick: (o) => {
|
|
933
|
-
|
|
930
|
+
Rt(o, a, r);
|
|
934
931
|
},
|
|
935
|
-
...
|
|
932
|
+
...n
|
|
936
933
|
}
|
|
937
934
|
);
|
|
938
935
|
});
|
|
939
|
-
|
|
940
|
-
const
|
|
936
|
+
Y.displayName = "BaseButton";
|
|
937
|
+
const ke = S.forwardRef(
|
|
941
938
|
({
|
|
942
939
|
children: e,
|
|
943
940
|
disabled: t = !1,
|
|
944
941
|
mode: r = "system",
|
|
945
942
|
focusMode: a = "system",
|
|
946
|
-
fullWidth:
|
|
943
|
+
fullWidth: n = !1,
|
|
947
944
|
className: o,
|
|
948
|
-
size:
|
|
945
|
+
size: c = "medium",
|
|
949
946
|
raw: s = !1,
|
|
950
|
-
noBorder:
|
|
951
|
-
spacing:
|
|
952
|
-
variant:
|
|
953
|
-
noTruncate:
|
|
954
|
-
...
|
|
955
|
-
},
|
|
956
|
-
const
|
|
957
|
-
type:
|
|
947
|
+
noBorder: p = !1,
|
|
948
|
+
spacing: g,
|
|
949
|
+
variant: h = "primary",
|
|
950
|
+
noTruncate: b = !1,
|
|
951
|
+
...u
|
|
952
|
+
}, d) => {
|
|
953
|
+
const m = ve({
|
|
954
|
+
type: ye,
|
|
958
955
|
mode: r,
|
|
959
956
|
focusMode: a,
|
|
960
|
-
fullWidth:
|
|
957
|
+
fullWidth: n,
|
|
961
958
|
disabled: t,
|
|
962
959
|
raw: s,
|
|
963
960
|
className: o,
|
|
964
|
-
size:
|
|
965
|
-
noBorder:
|
|
966
|
-
spacing:
|
|
967
|
-
variant:
|
|
968
|
-
noTruncate:
|
|
961
|
+
size: c,
|
|
962
|
+
noBorder: p,
|
|
963
|
+
spacing: g,
|
|
964
|
+
variant: h,
|
|
965
|
+
noTruncate: b
|
|
969
966
|
});
|
|
970
|
-
return /* @__PURE__ */
|
|
971
|
-
|
|
967
|
+
return /* @__PURE__ */ i(
|
|
968
|
+
Y,
|
|
972
969
|
{
|
|
973
|
-
ref:
|
|
974
|
-
className:
|
|
970
|
+
ref: d,
|
|
971
|
+
className: m,
|
|
975
972
|
disabled: t,
|
|
976
|
-
...
|
|
973
|
+
...u,
|
|
977
974
|
children: e
|
|
978
975
|
}
|
|
979
976
|
);
|
|
980
977
|
}
|
|
981
978
|
);
|
|
982
|
-
|
|
979
|
+
ke.displayName = "Button";
|
|
983
980
|
/*!
|
|
984
981
|
@versini/ui-button v1.1.11
|
|
985
982
|
© 2024 gizmette.com
|
|
@@ -993,49 +990,49 @@ try {
|
|
|
993
990
|
});
|
|
994
991
|
} catch {
|
|
995
992
|
}
|
|
996
|
-
const
|
|
993
|
+
const Bt = S.forwardRef(
|
|
997
994
|
({
|
|
998
995
|
children: e,
|
|
999
996
|
disabled: t = !1,
|
|
1000
997
|
mode: r = "system",
|
|
1001
998
|
focusMode: a = "system",
|
|
1002
|
-
fullWidth:
|
|
999
|
+
fullWidth: n = !1,
|
|
1003
1000
|
className: o,
|
|
1004
|
-
type:
|
|
1001
|
+
type: c = "button",
|
|
1005
1002
|
raw: s = !1,
|
|
1006
|
-
noBorder:
|
|
1007
|
-
"aria-label":
|
|
1008
|
-
label:
|
|
1009
|
-
size:
|
|
1010
|
-
labelRight:
|
|
1011
|
-
labelLeft:
|
|
1012
|
-
spacing:
|
|
1003
|
+
noBorder: p = !1,
|
|
1004
|
+
"aria-label": g,
|
|
1005
|
+
label: h,
|
|
1006
|
+
size: b = "medium",
|
|
1007
|
+
labelRight: u,
|
|
1008
|
+
labelLeft: d,
|
|
1009
|
+
spacing: m,
|
|
1013
1010
|
noBackground: y = !1,
|
|
1014
|
-
align:
|
|
1015
|
-
active:
|
|
1016
|
-
...
|
|
1011
|
+
align: N = "center",
|
|
1012
|
+
active: w = !1,
|
|
1013
|
+
...E
|
|
1017
1014
|
}, k) => {
|
|
1018
|
-
const x =
|
|
1019
|
-
type:
|
|
1015
|
+
const x = ve({
|
|
1016
|
+
type: fe,
|
|
1020
1017
|
mode: r,
|
|
1021
1018
|
focusMode: a,
|
|
1022
|
-
fullWidth:
|
|
1019
|
+
fullWidth: n,
|
|
1023
1020
|
disabled: t,
|
|
1024
1021
|
raw: s,
|
|
1025
1022
|
className: o,
|
|
1026
|
-
noBorder:
|
|
1027
|
-
size:
|
|
1028
|
-
labelRight:
|
|
1029
|
-
labelLeft:
|
|
1030
|
-
spacing:
|
|
1023
|
+
noBorder: p,
|
|
1024
|
+
size: b,
|
|
1025
|
+
labelRight: u,
|
|
1026
|
+
labelLeft: d,
|
|
1027
|
+
spacing: m,
|
|
1031
1028
|
noBackground: y,
|
|
1032
|
-
align:
|
|
1033
|
-
}),
|
|
1029
|
+
align: N
|
|
1030
|
+
}), R = l({
|
|
1034
1031
|
"text-copy-accent-dark": r === "light" && !s,
|
|
1035
1032
|
"text-copy-light": r === "dark" && !s,
|
|
1036
1033
|
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !s,
|
|
1037
1034
|
"text-copy-light dark:text-copy-accent-dark": r === "system" && !s
|
|
1038
|
-
}), T =
|
|
1035
|
+
}), T = w ? l(
|
|
1039
1036
|
"relative",
|
|
1040
1037
|
"focus-within:static",
|
|
1041
1038
|
"focus-within:after:border-transparent",
|
|
@@ -1052,28 +1049,28 @@ const Mt = S.forwardRef(
|
|
|
1052
1049
|
"after:border-table-light dark:after:border-table-dark": r === "alt-system"
|
|
1053
1050
|
}
|
|
1054
1051
|
) : "";
|
|
1055
|
-
return /* @__PURE__ */
|
|
1056
|
-
|
|
1052
|
+
return /* @__PURE__ */ i("div", { className: T, children: /* @__PURE__ */ v(
|
|
1053
|
+
Y,
|
|
1057
1054
|
{
|
|
1058
1055
|
ref: k,
|
|
1059
1056
|
className: x,
|
|
1060
1057
|
disabled: t,
|
|
1061
|
-
type:
|
|
1062
|
-
"aria-label":
|
|
1063
|
-
...
|
|
1058
|
+
type: c,
|
|
1059
|
+
"aria-label": g || h,
|
|
1060
|
+
...E,
|
|
1064
1061
|
children: [
|
|
1065
|
-
|
|
1066
|
-
/* @__PURE__ */
|
|
1067
|
-
|
|
1062
|
+
d && /* @__PURE__ */ i("span", { className: "pr-2", children: d }),
|
|
1063
|
+
/* @__PURE__ */ i("div", { className: R, children: e }),
|
|
1064
|
+
u && /* @__PURE__ */ i("span", { className: "pl-2", children: u })
|
|
1068
1065
|
]
|
|
1069
1066
|
}
|
|
1070
1067
|
) });
|
|
1071
1068
|
}
|
|
1072
1069
|
);
|
|
1073
|
-
|
|
1074
|
-
const
|
|
1070
|
+
Bt.displayName = "ButtonSort";
|
|
1071
|
+
const At = 200, Mt = ({
|
|
1075
1072
|
string: e,
|
|
1076
|
-
idealLength: t =
|
|
1073
|
+
idealLength: t = At
|
|
1077
1074
|
}) => {
|
|
1078
1075
|
if (e.length <= t)
|
|
1079
1076
|
return { string: e, isTruncated: !1 };
|
|
@@ -1084,32 +1081,32 @@ const Ot = 200, Lt = ({
|
|
|
1084
1081
|
string: e.slice(0, t + r),
|
|
1085
1082
|
isTruncated: !0
|
|
1086
1083
|
};
|
|
1087
|
-
},
|
|
1084
|
+
}, Lt = ({
|
|
1088
1085
|
children: e,
|
|
1089
1086
|
length: t = 200,
|
|
1090
1087
|
mode: r = "system",
|
|
1091
1088
|
focusMode: a = "system"
|
|
1092
1089
|
}) => {
|
|
1093
|
-
const [
|
|
1090
|
+
const [n, o] = M(!1);
|
|
1094
1091
|
if (typeof e != "string")
|
|
1095
1092
|
return e;
|
|
1096
|
-
const { string:
|
|
1093
|
+
const { string: c, isTruncated: s } = Mt({
|
|
1097
1094
|
string: e,
|
|
1098
1095
|
idealLength: t
|
|
1099
1096
|
});
|
|
1100
1097
|
return /* @__PURE__ */ v("span", { children: [
|
|
1101
|
-
|
|
1102
|
-
s && /* @__PURE__ */
|
|
1103
|
-
|
|
1098
|
+
n ? e : c,
|
|
1099
|
+
s && /* @__PURE__ */ i(
|
|
1100
|
+
ke,
|
|
1104
1101
|
{
|
|
1105
1102
|
mode: r,
|
|
1106
1103
|
focusMode: a,
|
|
1107
1104
|
spacing: { l: 2 },
|
|
1108
1105
|
size: "small",
|
|
1109
|
-
onClick: (
|
|
1110
|
-
|
|
1106
|
+
onClick: (p) => {
|
|
1107
|
+
p.preventDefault(), o(!n);
|
|
1111
1108
|
},
|
|
1112
|
-
children:
|
|
1109
|
+
children: n ? "less..." : "more..."
|
|
1113
1110
|
}
|
|
1114
1111
|
)
|
|
1115
1112
|
] });
|
|
@@ -1127,200 +1124,205 @@ try {
|
|
|
1127
1124
|
});
|
|
1128
1125
|
} catch {
|
|
1129
1126
|
}
|
|
1130
|
-
const
|
|
1127
|
+
const re = Pe(
|
|
1131
1128
|
() => import(
|
|
1132
1129
|
/* webpackChunkName: "LazyMessageAssistant" */
|
|
1133
|
-
"./LazyMessageAssistant.
|
|
1130
|
+
"./LazyMessageAssistant.Bq--JTre.js"
|
|
1134
1131
|
).then((e) => e.LazyMessageAssistant)
|
|
1135
|
-
),
|
|
1136
|
-
const { state: e } = U
|
|
1137
|
-
return /* @__PURE__ */ v(
|
|
1132
|
+
), Ot = () => {
|
|
1133
|
+
const { state: e } = A(U);
|
|
1134
|
+
return /* @__PURE__ */ v($, { children: [
|
|
1138
1135
|
e && e.messages.length > 0 && e.messages.map((t, r) => {
|
|
1139
|
-
const { role: a, content:
|
|
1140
|
-
return (a ===
|
|
1141
|
-
|
|
1136
|
+
const { role: a, content: n, name: o, processingTime: c } = t.message;
|
|
1137
|
+
return (a === C || a === P) && n ? /* @__PURE__ */ i(X, { fallback: /* @__PURE__ */ i("span", {}), children: /* @__PURE__ */ i(
|
|
1138
|
+
re,
|
|
1142
1139
|
{
|
|
1143
1140
|
name: o,
|
|
1144
|
-
processingTime:
|
|
1145
|
-
children:
|
|
1141
|
+
processingTime: c,
|
|
1142
|
+
children: n
|
|
1146
1143
|
}
|
|
1147
|
-
) }, `${r}-${a}`) : a ===
|
|
1148
|
-
|
|
1144
|
+
) }, `${r}-${a}`) : a === H && n ? /* @__PURE__ */ i(
|
|
1145
|
+
xt,
|
|
1149
1146
|
{
|
|
1150
1147
|
kind: "right",
|
|
1151
|
-
copyToClipboard:
|
|
1148
|
+
copyToClipboard: n,
|
|
1152
1149
|
copyToClipboardFocusMode: "light",
|
|
1153
|
-
children: /* @__PURE__ */
|
|
1150
|
+
children: /* @__PURE__ */ i(Lt, { mode: "light", focusMode: "light", children: n })
|
|
1154
1151
|
},
|
|
1155
1152
|
`${r}-${a}`
|
|
1156
1153
|
) : null;
|
|
1157
1154
|
}),
|
|
1158
|
-
|
|
1155
|
+
ne(H, e) && /* @__PURE__ */ i(X, { fallback: /* @__PURE__ */ i("span", {}), children: /* @__PURE__ */ i(re, { loading: !0 }) })
|
|
1159
1156
|
] });
|
|
1160
|
-
},
|
|
1157
|
+
}, O = (e, t) => {
|
|
1161
1158
|
e({
|
|
1162
|
-
type:
|
|
1159
|
+
type: ce,
|
|
1163
1160
|
payload: {
|
|
1164
1161
|
streaming: t
|
|
1165
1162
|
}
|
|
1166
1163
|
});
|
|
1167
|
-
},
|
|
1168
|
-
|
|
1169
|
-
type:
|
|
1164
|
+
}, ae = (e) => {
|
|
1165
|
+
O(e, !1), e({
|
|
1166
|
+
type: B,
|
|
1170
1167
|
payload: {
|
|
1171
1168
|
message: {
|
|
1172
|
-
role:
|
|
1173
|
-
content:
|
|
1169
|
+
role: P,
|
|
1170
|
+
content: Re
|
|
1174
1171
|
}
|
|
1175
1172
|
}
|
|
1176
1173
|
});
|
|
1177
|
-
},
|
|
1178
|
-
const { state: e, dispatch: t } = U
|
|
1174
|
+
}, $t = () => {
|
|
1175
|
+
const { state: e, dispatch: t } = A(U), { state: r, dispatch: a } = A(G), [n, o] = M(""), { getAccessToken: c, user: s } = V(), p = I(!1), g = I(null), h = I(
|
|
1179
1176
|
null
|
|
1180
1177
|
);
|
|
1181
|
-
|
|
1178
|
+
_(() => {
|
|
1182
1179
|
(async () => {
|
|
1183
|
-
var
|
|
1180
|
+
var d;
|
|
1184
1181
|
if (!e || e.messages.length === 0) {
|
|
1185
|
-
(
|
|
1182
|
+
(d = h == null ? void 0 : h.current) == null || d.cancel();
|
|
1186
1183
|
return;
|
|
1187
1184
|
}
|
|
1188
|
-
const
|
|
1189
|
-
if (!(e.messages.length === 0 ||
|
|
1185
|
+
const u = e.messages[e.messages.length - 1];
|
|
1186
|
+
if (!(e.messages.length === 0 || u.message.role === C || u.message.role === Ee || u.message.role === P || u.message.role === Ce))
|
|
1190
1187
|
try {
|
|
1191
|
-
const
|
|
1192
|
-
accessToken: await
|
|
1188
|
+
const m = await je({
|
|
1189
|
+
accessToken: await c(),
|
|
1193
1190
|
name: "generate",
|
|
1194
1191
|
data: {
|
|
1195
1192
|
messages: e.messages,
|
|
1196
|
-
model: e.engine ||
|
|
1193
|
+
model: e.engine || L,
|
|
1197
1194
|
user: (s == null ? void 0 : s.username) || "",
|
|
1198
1195
|
id: e.id,
|
|
1199
1196
|
usage: e.usage
|
|
1200
1197
|
}
|
|
1201
1198
|
});
|
|
1202
|
-
if (
|
|
1203
|
-
const y =
|
|
1204
|
-
|
|
1205
|
-
const
|
|
1199
|
+
if (m && m.ok) {
|
|
1200
|
+
const y = F();
|
|
1201
|
+
h.current = m.body.getReader();
|
|
1202
|
+
const N = new TextDecoder();
|
|
1206
1203
|
for (; ; ) {
|
|
1207
|
-
|
|
1208
|
-
const { done:
|
|
1209
|
-
if (
|
|
1210
|
-
|
|
1204
|
+
O(t, !0);
|
|
1205
|
+
const { done: w, value: E } = await h.current.read();
|
|
1206
|
+
if (w) {
|
|
1207
|
+
O(t, !1);
|
|
1211
1208
|
break;
|
|
1212
1209
|
}
|
|
1213
|
-
const k =
|
|
1210
|
+
const k = N.decode(E, { stream: !0 }), x = k.indexOf(q);
|
|
1214
1211
|
if (x !== -1) {
|
|
1215
|
-
const
|
|
1216
|
-
k.substring(x +
|
|
1212
|
+
const R = k.substring(0, x), T = JSON.parse(
|
|
1213
|
+
k.substring(x + q.length)
|
|
1217
1214
|
);
|
|
1218
1215
|
t({
|
|
1219
|
-
type:
|
|
1216
|
+
type: de,
|
|
1220
1217
|
payload: {
|
|
1221
1218
|
model: T.model,
|
|
1222
1219
|
usage: T.usage
|
|
1223
1220
|
}
|
|
1224
1221
|
}), t({
|
|
1225
|
-
type:
|
|
1222
|
+
type: B,
|
|
1226
1223
|
payload: {
|
|
1227
1224
|
message: {
|
|
1228
|
-
content:
|
|
1229
|
-
role:
|
|
1225
|
+
content: R,
|
|
1226
|
+
role: C,
|
|
1230
1227
|
messageId: y,
|
|
1231
1228
|
processingTime: T.processingTime,
|
|
1232
1229
|
name: T.name
|
|
1233
1230
|
}
|
|
1234
1231
|
}
|
|
1235
|
-
}),
|
|
1232
|
+
}), O(t, !1);
|
|
1236
1233
|
break;
|
|
1237
1234
|
} else
|
|
1238
1235
|
t({
|
|
1239
|
-
type:
|
|
1236
|
+
type: B,
|
|
1240
1237
|
payload: {
|
|
1241
1238
|
message: {
|
|
1242
1239
|
content: k,
|
|
1243
|
-
role:
|
|
1240
|
+
role: C,
|
|
1244
1241
|
messageId: y
|
|
1245
1242
|
}
|
|
1246
1243
|
}
|
|
1247
1244
|
});
|
|
1248
1245
|
}
|
|
1249
1246
|
} else
|
|
1250
|
-
|
|
1251
|
-
} catch (
|
|
1252
|
-
console.error(
|
|
1247
|
+
ae(t);
|
|
1248
|
+
} catch (m) {
|
|
1249
|
+
console.error(m), ae(t);
|
|
1253
1250
|
}
|
|
1254
1251
|
})();
|
|
1255
1252
|
}, [e == null ? void 0 : e.messages]);
|
|
1256
|
-
const
|
|
1257
|
-
|
|
1258
|
-
type:
|
|
1253
|
+
const b = async (u) => {
|
|
1254
|
+
u.preventDefault(), t({
|
|
1255
|
+
type: B,
|
|
1259
1256
|
payload: {
|
|
1260
1257
|
message: {
|
|
1261
|
-
role:
|
|
1262
|
-
content:
|
|
1258
|
+
role: H,
|
|
1259
|
+
content: n
|
|
1263
1260
|
}
|
|
1264
1261
|
}
|
|
1265
1262
|
}), o("");
|
|
1266
1263
|
};
|
|
1267
|
-
return
|
|
1268
|
-
(e == null ? void 0 : e.streaming) === !1 && !
|
|
1269
|
-
}, [e]),
|
|
1270
|
-
r.tag !== "" &&
|
|
1271
|
-
type:
|
|
1264
|
+
return _(() => {
|
|
1265
|
+
(e == null ? void 0 : e.streaming) === !1 && !p.current && g.current && (p.current = !0, g.current.focus()), (e == null ? void 0 : e.streaming) === !0 && p.current === !0 && (p.current = !1);
|
|
1266
|
+
}, [e]), _(() => {
|
|
1267
|
+
r.tag !== "" && (o(r.tag), g.current && g.current.focus(), a({
|
|
1268
|
+
type: le
|
|
1272
1269
|
}));
|
|
1273
|
-
}, [r, a]), /* @__PURE__ */
|
|
1274
|
-
|
|
1270
|
+
}, [r, a]), /* @__PURE__ */ i("form", { className: "mt-2", onSubmit: b, children: /* @__PURE__ */ i(
|
|
1271
|
+
He,
|
|
1275
1272
|
{
|
|
1276
1273
|
mode: "dark",
|
|
1277
1274
|
focusMode: "light",
|
|
1278
|
-
ref:
|
|
1275
|
+
ref: g,
|
|
1279
1276
|
name: "chat-input",
|
|
1280
1277
|
label: Ie,
|
|
1281
1278
|
helperText: "Press ENTER to add a new line",
|
|
1282
1279
|
helperTextOnFocus: !0,
|
|
1283
1280
|
required: !0,
|
|
1284
|
-
value:
|
|
1285
|
-
onChange: (
|
|
1286
|
-
onKeyDown:
|
|
1287
|
-
rightElement: /* @__PURE__ */
|
|
1288
|
-
|
|
1281
|
+
value: n,
|
|
1282
|
+
onChange: (u) => o(u.target.value),
|
|
1283
|
+
onKeyDown: Ye([["mod+Enter", b]]),
|
|
1284
|
+
rightElement: /* @__PURE__ */ i(
|
|
1285
|
+
j,
|
|
1289
1286
|
{
|
|
1290
1287
|
disabled: e == null ? void 0 : e.streaming,
|
|
1291
1288
|
noBorder: !0,
|
|
1292
1289
|
type: "submit",
|
|
1293
1290
|
mode: "light",
|
|
1294
1291
|
focusMode: "light",
|
|
1295
|
-
children:
|
|
1292
|
+
children: Se
|
|
1296
1293
|
}
|
|
1297
1294
|
)
|
|
1298
1295
|
}
|
|
1299
1296
|
) });
|
|
1300
|
-
},
|
|
1301
|
-
const { isAuthenticated: e } =
|
|
1302
|
-
return /* @__PURE__ */ v(
|
|
1297
|
+
}, Ut = () => {
|
|
1298
|
+
const { isAuthenticated: e } = V(), t = Be(e);
|
|
1299
|
+
return /* @__PURE__ */ v($, { children: [
|
|
1303
1300
|
/* @__PURE__ */ v("div", { className: t, children: [
|
|
1304
|
-
/* @__PURE__ */
|
|
1305
|
-
/* @__PURE__ */
|
|
1301
|
+
/* @__PURE__ */ i(Ae, {}),
|
|
1302
|
+
/* @__PURE__ */ i(Ot, {})
|
|
1306
1303
|
] }),
|
|
1307
|
-
/* @__PURE__ */
|
|
1308
|
-
/* @__PURE__ */
|
|
1304
|
+
/* @__PURE__ */ i(Ze, {}),
|
|
1305
|
+
/* @__PURE__ */ i($t, {})
|
|
1309
1306
|
] });
|
|
1310
|
-
},
|
|
1307
|
+
}, Vt = (e, t) => (t == null ? void 0 : t.type) === se ? {
|
|
1308
|
+
tags: e.tags,
|
|
1311
1309
|
tag: t.payload.tag
|
|
1312
|
-
} : (t == null ? void 0 : t.type) ===
|
|
1310
|
+
} : (t == null ? void 0 : t.type) === le ? {
|
|
1311
|
+
tags: e.tags,
|
|
1313
1312
|
tag: ""
|
|
1314
|
-
} :
|
|
1313
|
+
} : (t == null ? void 0 : t.type) === oe ? {
|
|
1314
|
+
tags: t.payload.tags,
|
|
1315
|
+
tag: ""
|
|
1316
|
+
} : e, zt = (e, t) => (t == null ? void 0 : t.type) === Me ? {
|
|
1315
1317
|
searchString: t.payload.searchString,
|
|
1316
1318
|
sortedCell: e.sortedCell,
|
|
1317
1319
|
sortDirection: e.sortDirection
|
|
1318
|
-
} : (t == null ? void 0 : t.type) ===
|
|
1320
|
+
} : (t == null ? void 0 : t.type) === Le ? {
|
|
1319
1321
|
searchString: e.searchString,
|
|
1320
1322
|
sortedCell: t.payload.sortedCell,
|
|
1321
1323
|
sortDirection: t.payload.sortDirection
|
|
1322
|
-
} : e,
|
|
1323
|
-
if ((t == null ? void 0 : t.type) ===
|
|
1324
|
+
} : e, Dt = (e, t) => {
|
|
1325
|
+
if ((t == null ? void 0 : t.type) === Oe) {
|
|
1324
1326
|
const r = t.payload.messages.map((a) => ({
|
|
1325
1327
|
message: {
|
|
1326
1328
|
role: a.role,
|
|
@@ -1335,39 +1337,41 @@ const ne = We(
|
|
|
1335
1337
|
usage: t.payload.usage,
|
|
1336
1338
|
isComponent: e.isComponent,
|
|
1337
1339
|
messages: r,
|
|
1338
|
-
engine: e.engine
|
|
1340
|
+
engine: e.engine,
|
|
1341
|
+
tags: e.tags
|
|
1339
1342
|
};
|
|
1340
1343
|
}
|
|
1341
|
-
if ((t == null ? void 0 : t.type) ===
|
|
1342
|
-
const r = t.payload.message.role, a = t.payload.message.content,
|
|
1344
|
+
if ((t == null ? void 0 : t.type) === B) {
|
|
1345
|
+
const r = t.payload.message.role, a = t.payload.message.content, n = t.payload.message.name, o = t.payload.message.processingTime, c = t.payload.message.messageId;
|
|
1343
1346
|
if (r !== "") {
|
|
1344
1347
|
const s = {
|
|
1345
1348
|
role: r,
|
|
1346
1349
|
content: a,
|
|
1347
|
-
name:
|
|
1350
|
+
name: n,
|
|
1348
1351
|
processingTime: o,
|
|
1349
|
-
messageId:
|
|
1352
|
+
messageId: c
|
|
1350
1353
|
};
|
|
1351
|
-
if (r ===
|
|
1352
|
-
const
|
|
1353
|
-
(
|
|
1354
|
+
if (r === C) {
|
|
1355
|
+
const p = e.messages.findIndex(
|
|
1356
|
+
(g) => g.message.messageId === c
|
|
1354
1357
|
);
|
|
1355
|
-
if (
|
|
1356
|
-
const
|
|
1358
|
+
if (p !== -1) {
|
|
1359
|
+
const g = e.messages.map((h, b) => b === p ? {
|
|
1357
1360
|
message: {
|
|
1358
|
-
...
|
|
1359
|
-
content: `${
|
|
1361
|
+
...h.message,
|
|
1362
|
+
content: `${h.message.content}${a}`,
|
|
1360
1363
|
processingTime: o,
|
|
1361
|
-
name:
|
|
1364
|
+
name: n
|
|
1362
1365
|
}
|
|
1363
|
-
} :
|
|
1366
|
+
} : h);
|
|
1364
1367
|
return {
|
|
1365
1368
|
id: e.id,
|
|
1366
1369
|
model: e.model,
|
|
1367
1370
|
usage: e.usage,
|
|
1368
1371
|
isComponent: e.isComponent,
|
|
1369
|
-
messages:
|
|
1370
|
-
engine: e.engine
|
|
1372
|
+
messages: g,
|
|
1373
|
+
engine: e.engine,
|
|
1374
|
+
tags: e.tags
|
|
1371
1375
|
};
|
|
1372
1376
|
}
|
|
1373
1377
|
}
|
|
@@ -1375,6 +1379,7 @@ const ne = We(
|
|
|
1375
1379
|
id: e.id,
|
|
1376
1380
|
model: e.model,
|
|
1377
1381
|
engine: e.engine,
|
|
1382
|
+
tags: e.tags,
|
|
1378
1383
|
usage: e.usage,
|
|
1379
1384
|
isComponent: e.isComponent,
|
|
1380
1385
|
messages: [
|
|
@@ -1386,104 +1391,107 @@ const ne = We(
|
|
|
1386
1391
|
};
|
|
1387
1392
|
}
|
|
1388
1393
|
}
|
|
1389
|
-
return (t == null ? void 0 : t.type) ===
|
|
1390
|
-
id:
|
|
1394
|
+
return (t == null ? void 0 : t.type) === ie ? {
|
|
1395
|
+
id: F(),
|
|
1391
1396
|
model: e.model,
|
|
1392
1397
|
engine: e.engine,
|
|
1393
1398
|
usage: 0,
|
|
1394
1399
|
messages: [],
|
|
1395
|
-
isComponent: e.isComponent
|
|
1396
|
-
|
|
1400
|
+
isComponent: e.isComponent,
|
|
1401
|
+
tags: e.tags
|
|
1402
|
+
} : (t == null ? void 0 : t.type) === de ? {
|
|
1397
1403
|
id: e.id,
|
|
1398
1404
|
model: t.payload.model,
|
|
1399
1405
|
engine: e.engine,
|
|
1406
|
+
tags: e.tags,
|
|
1400
1407
|
usage: t.payload.usage,
|
|
1401
1408
|
messages: e.messages,
|
|
1402
1409
|
isComponent: e.isComponent
|
|
1403
|
-
} : (t == null ? void 0 : t.type) ===
|
|
1410
|
+
} : (t == null ? void 0 : t.type) === ge ? {
|
|
1404
1411
|
...e,
|
|
1405
1412
|
engine: t.payload.engine
|
|
1406
|
-
} : (t == null ? void 0 : t.type) ===
|
|
1413
|
+
} : (t == null ? void 0 : t.type) === ce ? {
|
|
1407
1414
|
...e,
|
|
1408
1415
|
streaming: t.payload.streaming
|
|
1409
1416
|
} : e;
|
|
1410
1417
|
};
|
|
1411
|
-
function
|
|
1412
|
-
const t =
|
|
1413
|
-
key:
|
|
1418
|
+
function xe({ isComponent: e = !1 }) {
|
|
1419
|
+
const t = I(!1), { getAccessToken: r, user: a } = V(), [n] = Q({
|
|
1420
|
+
key: J + ze,
|
|
1414
1421
|
initialValue: ""
|
|
1415
|
-
}), [o] =
|
|
1416
|
-
key:
|
|
1417
|
-
initialValue:
|
|
1418
|
-
}), [
|
|
1419
|
-
id:
|
|
1420
|
-
model:
|
|
1421
|
-
engine:
|
|
1422
|
+
}), [o] = Q({
|
|
1423
|
+
key: J + De,
|
|
1424
|
+
initialValue: Ge.ASC
|
|
1425
|
+
}), [c, s] = z(Dt, {
|
|
1426
|
+
id: F(),
|
|
1427
|
+
model: L,
|
|
1428
|
+
engine: L,
|
|
1422
1429
|
usage: 0,
|
|
1423
1430
|
messages: [],
|
|
1431
|
+
tags: [],
|
|
1424
1432
|
isComponent: e
|
|
1425
|
-
}), [
|
|
1426
|
-
searchString:
|
|
1433
|
+
}), [p, g] = z(zt, {
|
|
1434
|
+
searchString: n,
|
|
1427
1435
|
sortedCell: "timestamp",
|
|
1428
1436
|
sortDirection: o
|
|
1429
|
-
}), [
|
|
1437
|
+
}), [h, b] = z(Vt, {
|
|
1430
1438
|
tag: ""
|
|
1431
|
-
}), [
|
|
1439
|
+
}), [u, d] = M({
|
|
1432
1440
|
version: "",
|
|
1433
1441
|
models: [],
|
|
1434
1442
|
plugins: [],
|
|
1435
|
-
engine:
|
|
1443
|
+
engine: L,
|
|
1436
1444
|
engines: []
|
|
1437
1445
|
});
|
|
1438
|
-
return
|
|
1439
|
-
|
|
1446
|
+
return _(() => {
|
|
1447
|
+
u.version !== "" || t.current || (async () => {
|
|
1440
1448
|
try {
|
|
1441
1449
|
t.current = !0;
|
|
1442
|
-
const
|
|
1450
|
+
const m = await ue({
|
|
1443
1451
|
accessToken: await r(),
|
|
1444
|
-
type:
|
|
1452
|
+
type: me.ABOUT,
|
|
1445
1453
|
params: {
|
|
1446
1454
|
user: a == null ? void 0 : a.username
|
|
1447
1455
|
}
|
|
1448
1456
|
});
|
|
1449
|
-
t.current = !1,
|
|
1450
|
-
type:
|
|
1457
|
+
t.current = !1, m.status === 200 && (d(m.data), s({
|
|
1458
|
+
type: ge,
|
|
1451
1459
|
payload: {
|
|
1452
|
-
engine:
|
|
1460
|
+
engine: m.data.engine
|
|
1453
1461
|
}
|
|
1454
1462
|
}));
|
|
1455
1463
|
} catch {
|
|
1456
1464
|
}
|
|
1457
1465
|
})();
|
|
1458
|
-
}, [
|
|
1459
|
-
var
|
|
1460
|
-
(
|
|
1466
|
+
}, [u, r, a]), _(() => {
|
|
1467
|
+
var m;
|
|
1468
|
+
(m = document.getElementById("logo")) == null || m.classList.add("fadeOut"), setTimeout(() => {
|
|
1461
1469
|
var y;
|
|
1462
1470
|
(y = document.getElementById("root")) == null || y.classList.replace("app-hidden", "fadeIn");
|
|
1463
1471
|
}, 500);
|
|
1464
|
-
}), /* @__PURE__ */
|
|
1472
|
+
}), /* @__PURE__ */ i(U.Provider, { value: { state: c, dispatch: s, serverStats: u }, children: /* @__PURE__ */ i(
|
|
1465
1473
|
$e.Provider,
|
|
1466
1474
|
{
|
|
1467
1475
|
value: {
|
|
1468
|
-
state:
|
|
1469
|
-
dispatch:
|
|
1476
|
+
state: p,
|
|
1477
|
+
dispatch: g
|
|
1470
1478
|
},
|
|
1471
1479
|
children: /* @__PURE__ */ v(
|
|
1472
|
-
|
|
1480
|
+
G.Provider,
|
|
1473
1481
|
{
|
|
1474
|
-
value: { state:
|
|
1482
|
+
value: { state: h, dispatch: b },
|
|
1475
1483
|
children: [
|
|
1476
|
-
/* @__PURE__ */
|
|
1477
|
-
/* @__PURE__ */
|
|
1484
|
+
/* @__PURE__ */ i(Ue, { children: /* @__PURE__ */ i(Ut, {}) }),
|
|
1485
|
+
/* @__PURE__ */ i(Ve, { serverStats: u })
|
|
1478
1486
|
]
|
|
1479
1487
|
}
|
|
1480
1488
|
)
|
|
1481
1489
|
}
|
|
1482
1490
|
) });
|
|
1483
1491
|
}
|
|
1484
|
-
|
|
1485
|
-
const
|
|
1492
|
+
xe.displayName = "App";
|
|
1493
|
+
const Wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: xe }, Symbol.toStringTag, { value: "Module" }));
|
|
1486
1494
|
export {
|
|
1487
|
-
|
|
1488
|
-
|
|
1495
|
+
Wt as App,
|
|
1496
|
+
xt as le
|
|
1489
1497
|
};
|