tguikit 0.2.0 → 0.3.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/index.d.ts +278 -3
- package/dist/index.js +1773 -476
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,13 +1,101 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Children as e, Fragment as t, createContext as n, isValidElement as r, useCallback as i, useContext as a, useEffect as o,
|
|
3
|
-
import { clsx as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { Children as e, Fragment as t, createContext as n, isValidElement as r, useCallback as i, useContext as a, useEffect as o, useId as s, useLayoutEffect as c, useMemo as l, useRef as u, useState as d, useSyncExternalStore as f } from "react";
|
|
3
|
+
import { clsx as p } from "clsx";
|
|
4
|
+
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
5
|
+
import { cva as _ } from "class-variance-authority";
|
|
6
|
+
import { createPortal as v } from "react-dom";
|
|
6
7
|
//#region src/shared/lib/cn.ts
|
|
7
|
-
function
|
|
8
|
-
return
|
|
8
|
+
function y(...e) {
|
|
9
|
+
return p(e);
|
|
9
10
|
}
|
|
10
|
-
var
|
|
11
|
+
var b = {
|
|
12
|
+
accordion: "_accordion_1bhfn_1",
|
|
13
|
+
item: "_item_1bhfn_6",
|
|
14
|
+
header: "_header_1bhfn_14",
|
|
15
|
+
title: "_title_1bhfn_31",
|
|
16
|
+
chevron: "_chevron_1bhfn_36",
|
|
17
|
+
panel: "_panel_1bhfn_59",
|
|
18
|
+
"panel--open": "_panel--open_1bhfn_70",
|
|
19
|
+
panelInner: "_panelInner_1bhfn_74",
|
|
20
|
+
panelContent: "_panelContent_1bhfn_78"
|
|
21
|
+
}, x = n(null);
|
|
22
|
+
x.displayName = "AccordionContext";
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/components/Accordion/Accordion.tsx
|
|
25
|
+
var S = (e) => e == null ? [] : Array.isArray(e) ? e : [e];
|
|
26
|
+
function C({ ref: e, multiple: t = !1, value: n, defaultValue: r, onChange: a, className: o, children: s, ...c }) {
|
|
27
|
+
let [u, f] = d(() => S(r)), p = n == null ? u : S(n), m = i((e) => {
|
|
28
|
+
let r = p.includes(e) ? p.filter((t) => t !== e) : t ? [...p, e] : [e];
|
|
29
|
+
n ?? f(r), a?.(r);
|
|
30
|
+
}, [
|
|
31
|
+
p,
|
|
32
|
+
t,
|
|
33
|
+
n,
|
|
34
|
+
a
|
|
35
|
+
]), g = l(() => ({
|
|
36
|
+
open: p,
|
|
37
|
+
toggle: m
|
|
38
|
+
}), [p, m]);
|
|
39
|
+
return /* @__PURE__ */ h(x.Provider, {
|
|
40
|
+
value: g,
|
|
41
|
+
children: /* @__PURE__ */ h("div", {
|
|
42
|
+
ref: e,
|
|
43
|
+
className: y(b.accordion, o),
|
|
44
|
+
...c,
|
|
45
|
+
children: s
|
|
46
|
+
})
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
C.displayName = "Accordion";
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/components/Accordion/AccordionItem.tsx
|
|
52
|
+
function w({ ref: e, value: t, header: n, className: r, children: i, ...o }) {
|
|
53
|
+
let c = a(x);
|
|
54
|
+
if (!c) throw Error("AccordionItem must be used within an <Accordion>.");
|
|
55
|
+
let l = s(), u = c.open.includes(t);
|
|
56
|
+
return /* @__PURE__ */ g("div", {
|
|
57
|
+
ref: e,
|
|
58
|
+
className: y(b.item, r),
|
|
59
|
+
...o,
|
|
60
|
+
children: [/* @__PURE__ */ g("button", {
|
|
61
|
+
type: "button",
|
|
62
|
+
className: b.header,
|
|
63
|
+
"aria-expanded": u,
|
|
64
|
+
"aria-controls": l,
|
|
65
|
+
onClick: () => c.toggle(t),
|
|
66
|
+
children: [/* @__PURE__ */ h("span", {
|
|
67
|
+
className: b.title,
|
|
68
|
+
children: n
|
|
69
|
+
}), /* @__PURE__ */ h("svg", {
|
|
70
|
+
className: b.chevron,
|
|
71
|
+
viewBox: "0 0 18 18",
|
|
72
|
+
fill: "none",
|
|
73
|
+
"aria-hidden": !0,
|
|
74
|
+
children: /* @__PURE__ */ h("path", {
|
|
75
|
+
d: "M4.5 7l4.5 4.5L13.5 7",
|
|
76
|
+
stroke: "currentColor",
|
|
77
|
+
strokeWidth: "1.8",
|
|
78
|
+
strokeLinecap: "round",
|
|
79
|
+
strokeLinejoin: "round"
|
|
80
|
+
})
|
|
81
|
+
})]
|
|
82
|
+
}), /* @__PURE__ */ h("div", {
|
|
83
|
+
className: y(b.panel, u && b["panel--open"]),
|
|
84
|
+
children: /* @__PURE__ */ h("div", {
|
|
85
|
+
className: b.panelInner,
|
|
86
|
+
children: /* @__PURE__ */ h("div", {
|
|
87
|
+
id: l,
|
|
88
|
+
className: b.panelContent,
|
|
89
|
+
inert: !u,
|
|
90
|
+
"aria-hidden": !u,
|
|
91
|
+
children: i
|
|
92
|
+
})
|
|
93
|
+
})
|
|
94
|
+
})]
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
w.displayName = "AccordionItem";
|
|
98
|
+
var T = {
|
|
11
99
|
avatar: "_avatar_lii18_1",
|
|
12
100
|
s20: "_s20_lii18_18",
|
|
13
101
|
s24: "_s24_lii18_24",
|
|
@@ -18,50 +106,65 @@ var g = {
|
|
|
18
106
|
img: "_img_lii18_54",
|
|
19
107
|
acronym: "_acronym_lii18_61",
|
|
20
108
|
icon: "_icon_lii18_65"
|
|
21
|
-
},
|
|
109
|
+
}, E = _(T.avatar, {
|
|
22
110
|
variants: { size: {
|
|
23
|
-
20:
|
|
24
|
-
24:
|
|
25
|
-
28:
|
|
26
|
-
40:
|
|
27
|
-
48:
|
|
28
|
-
96:
|
|
111
|
+
20: T.s20,
|
|
112
|
+
24: T.s24,
|
|
113
|
+
28: T.s28,
|
|
114
|
+
40: T.s40,
|
|
115
|
+
48: T.s48,
|
|
116
|
+
96: T.s96
|
|
29
117
|
} },
|
|
30
118
|
defaultVariants: { size: 40 }
|
|
31
119
|
});
|
|
32
120
|
//#endregion
|
|
33
121
|
//#region src/components/Avatar/Avatar.tsx
|
|
34
|
-
function
|
|
35
|
-
return /* @__PURE__ */
|
|
122
|
+
function D() {
|
|
123
|
+
return /* @__PURE__ */ h("svg", {
|
|
36
124
|
viewBox: "0 0 24 24",
|
|
37
125
|
fill: "currentColor",
|
|
38
126
|
"aria-hidden": !0,
|
|
39
|
-
children: /* @__PURE__ */
|
|
127
|
+
children: /* @__PURE__ */ h("path", { d: "M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm0 2c-4.2 0-7 2.4-7 4.5V20h14v-1.5c0-2.1-2.8-4.5-7-4.5Z" })
|
|
40
128
|
});
|
|
41
129
|
}
|
|
42
|
-
function
|
|
43
|
-
let [
|
|
44
|
-
return /* @__PURE__ */
|
|
130
|
+
function O({ ref: e, size: t = 40, src: n, alt: r = "", acronym: i, fallbackIcon: a, className: o, children: s, ...c }) {
|
|
131
|
+
let [l, u] = d(null), f = n != null && n !== "" && n !== l;
|
|
132
|
+
return /* @__PURE__ */ g("span", {
|
|
45
133
|
ref: e,
|
|
46
|
-
className:
|
|
134
|
+
className: y(E({ size: t }), o),
|
|
47
135
|
...c,
|
|
48
|
-
children: [f ? /* @__PURE__ */
|
|
49
|
-
className:
|
|
136
|
+
children: [f ? /* @__PURE__ */ h("img", {
|
|
137
|
+
className: T.img,
|
|
50
138
|
src: n,
|
|
51
139
|
alt: r,
|
|
52
140
|
loading: "lazy",
|
|
53
|
-
onError: () =>
|
|
54
|
-
}) : i ? /* @__PURE__ */
|
|
55
|
-
className:
|
|
141
|
+
onError: () => u(n)
|
|
142
|
+
}) : i ? /* @__PURE__ */ h("span", {
|
|
143
|
+
className: T.acronym,
|
|
56
144
|
children: i
|
|
57
|
-
}) : /* @__PURE__ */
|
|
58
|
-
className:
|
|
59
|
-
children: a ?? /* @__PURE__ */
|
|
145
|
+
}) : /* @__PURE__ */ h("span", {
|
|
146
|
+
className: T.icon,
|
|
147
|
+
children: a ?? /* @__PURE__ */ h(D, {})
|
|
60
148
|
}), s]
|
|
61
149
|
});
|
|
62
150
|
}
|
|
63
|
-
|
|
64
|
-
var
|
|
151
|
+
O.displayName = "Avatar";
|
|
152
|
+
var k = { stack: "_stack_gi9bj_1" };
|
|
153
|
+
//#endregion
|
|
154
|
+
//#region src/components/AvatarStack/AvatarStack.tsx
|
|
155
|
+
function A({ ref: e, overlap: t, className: n, style: r, ...i }) {
|
|
156
|
+
return /* @__PURE__ */ h("div", {
|
|
157
|
+
ref: e,
|
|
158
|
+
className: y(k.stack, n),
|
|
159
|
+
style: t == null ? r : {
|
|
160
|
+
...r,
|
|
161
|
+
"--tgui--avatar-stack--overlap": `${t}px`
|
|
162
|
+
},
|
|
163
|
+
...i
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
A.displayName = "AvatarStack";
|
|
167
|
+
var j = {
|
|
65
168
|
badge: "_badge_76m5w_1",
|
|
66
169
|
number: "_number_76m5w_11",
|
|
67
170
|
large: "_large_76m5w_20",
|
|
@@ -71,20 +174,20 @@ var b = {
|
|
|
71
174
|
"mode-secondary": "_mode-secondary_76m5w_49",
|
|
72
175
|
"mode-gray": "_mode-gray_76m5w_54",
|
|
73
176
|
"mode-white": "_mode-white_76m5w_59"
|
|
74
|
-
}, ee =
|
|
177
|
+
}, ee = _(j.badge, {
|
|
75
178
|
variants: {
|
|
76
179
|
type: {
|
|
77
|
-
number:
|
|
78
|
-
dot:
|
|
180
|
+
number: j.number,
|
|
181
|
+
dot: j.dot
|
|
79
182
|
},
|
|
80
183
|
mode: {
|
|
81
|
-
primary:
|
|
82
|
-
critical:
|
|
83
|
-
secondary:
|
|
84
|
-
gray:
|
|
85
|
-
white:
|
|
184
|
+
primary: j["mode-primary"],
|
|
185
|
+
critical: j["mode-critical"],
|
|
186
|
+
secondary: j["mode-secondary"],
|
|
187
|
+
gray: j["mode-gray"],
|
|
188
|
+
white: j["mode-white"]
|
|
86
189
|
},
|
|
87
|
-
large: { true:
|
|
190
|
+
large: { true: j.large }
|
|
88
191
|
},
|
|
89
192
|
defaultVariants: {
|
|
90
193
|
type: "number",
|
|
@@ -93,10 +196,10 @@ var b = {
|
|
|
93
196
|
});
|
|
94
197
|
//#endregion
|
|
95
198
|
//#region src/components/Badge/Badge.tsx
|
|
96
|
-
function
|
|
97
|
-
return /* @__PURE__ */
|
|
199
|
+
function te({ ref: e, type: t = "number", mode: n = "primary", large: r = !1, className: i, children: a, ...o }) {
|
|
200
|
+
return /* @__PURE__ */ h("span", {
|
|
98
201
|
ref: e,
|
|
99
|
-
className:
|
|
202
|
+
className: y(ee({
|
|
100
203
|
type: t,
|
|
101
204
|
mode: n,
|
|
102
205
|
large: r
|
|
@@ -105,110 +208,213 @@ function x({ ref: e, type: t = "number", mode: n = "primary", large: r = !1, cla
|
|
|
105
208
|
children: t === "number" ? a : null
|
|
106
209
|
});
|
|
107
210
|
}
|
|
108
|
-
|
|
109
|
-
var
|
|
211
|
+
te.displayName = "Badge";
|
|
212
|
+
var M = {
|
|
213
|
+
banner: "_banner_1sxll_1",
|
|
214
|
+
"type-section": "_type-section_1sxll_12",
|
|
215
|
+
"type-image": "_type-image_1sxll_17",
|
|
216
|
+
background: "_background_1sxll_21",
|
|
217
|
+
before: "_before_1sxll_41",
|
|
218
|
+
body: "_body_1sxll_47",
|
|
219
|
+
callout: "_callout_1sxll_57",
|
|
220
|
+
header: "_header_1sxll_66",
|
|
221
|
+
subheader: "_subheader_1sxll_72",
|
|
222
|
+
description: "_description_1sxll_78",
|
|
223
|
+
actions: "_actions_1sxll_84",
|
|
224
|
+
close: "_close_1sxll_91"
|
|
225
|
+
}, ne = _(M.banner, {
|
|
226
|
+
variants: { type: {
|
|
227
|
+
section: M["type-section"],
|
|
228
|
+
image: M["type-image"]
|
|
229
|
+
} },
|
|
230
|
+
defaultVariants: { type: "section" }
|
|
231
|
+
});
|
|
232
|
+
//#endregion
|
|
233
|
+
//#region src/components/Banner/Banner.tsx
|
|
234
|
+
function re({ ref: e, type: t = "section", before: n, callout: r, header: i, subheader: a, description: o, actions: s, background: c, onClose: l, closeLabel: u = "Close", className: d, children: f, ...p }) {
|
|
235
|
+
return /* @__PURE__ */ g("section", {
|
|
236
|
+
ref: e,
|
|
237
|
+
className: y(ne({ type: t }), d),
|
|
238
|
+
...p,
|
|
239
|
+
children: [
|
|
240
|
+
t === "image" && c != null ? /* @__PURE__ */ h("div", {
|
|
241
|
+
className: M.background,
|
|
242
|
+
"aria-hidden": !0,
|
|
243
|
+
children: c
|
|
244
|
+
}) : null,
|
|
245
|
+
n == null ? null : /* @__PURE__ */ h("div", {
|
|
246
|
+
className: M.before,
|
|
247
|
+
children: n
|
|
248
|
+
}),
|
|
249
|
+
/* @__PURE__ */ g("div", {
|
|
250
|
+
className: M.body,
|
|
251
|
+
children: [
|
|
252
|
+
r == null ? null : /* @__PURE__ */ h("span", {
|
|
253
|
+
className: M.callout,
|
|
254
|
+
children: r
|
|
255
|
+
}),
|
|
256
|
+
i == null ? null : /* @__PURE__ */ h("span", {
|
|
257
|
+
className: M.header,
|
|
258
|
+
children: i
|
|
259
|
+
}),
|
|
260
|
+
a == null ? null : /* @__PURE__ */ h("span", {
|
|
261
|
+
className: M.subheader,
|
|
262
|
+
children: a
|
|
263
|
+
}),
|
|
264
|
+
o == null ? null : /* @__PURE__ */ h("p", {
|
|
265
|
+
className: M.description,
|
|
266
|
+
children: o
|
|
267
|
+
}),
|
|
268
|
+
f,
|
|
269
|
+
s == null ? null : /* @__PURE__ */ h("div", {
|
|
270
|
+
className: M.actions,
|
|
271
|
+
children: s
|
|
272
|
+
})
|
|
273
|
+
]
|
|
274
|
+
}),
|
|
275
|
+
l == null ? null : /* @__PURE__ */ h("button", {
|
|
276
|
+
type: "button",
|
|
277
|
+
className: M.close,
|
|
278
|
+
"aria-label": u,
|
|
279
|
+
onClick: l,
|
|
280
|
+
children: /* @__PURE__ */ h("svg", {
|
|
281
|
+
width: "14",
|
|
282
|
+
height: "14",
|
|
283
|
+
viewBox: "0 0 14 14",
|
|
284
|
+
"aria-hidden": !0,
|
|
285
|
+
children: /* @__PURE__ */ h("path", {
|
|
286
|
+
d: "M3.5 3.5l7 7M10.5 3.5l-7 7",
|
|
287
|
+
stroke: "currentColor",
|
|
288
|
+
strokeWidth: "1.5",
|
|
289
|
+
strokeLinecap: "round"
|
|
290
|
+
})
|
|
291
|
+
})
|
|
292
|
+
})
|
|
293
|
+
]
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
re.displayName = "Banner";
|
|
297
|
+
var ie = {
|
|
298
|
+
blockquote: "_blockquote_mub25_1",
|
|
299
|
+
cite: "_cite_mub25_13"
|
|
300
|
+
};
|
|
301
|
+
//#endregion
|
|
302
|
+
//#region src/components/Blockquote/Blockquote.tsx
|
|
303
|
+
function ae({ ref: e, author: t, className: n, children: r, ...i }) {
|
|
304
|
+
return /* @__PURE__ */ g("blockquote", {
|
|
305
|
+
ref: e,
|
|
306
|
+
className: y(ie.blockquote, n),
|
|
307
|
+
...i,
|
|
308
|
+
children: [r, t == null ? null : /* @__PURE__ */ h("cite", {
|
|
309
|
+
className: ie.cite,
|
|
310
|
+
children: t
|
|
311
|
+
})]
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
ae.displayName = "Blockquote";
|
|
315
|
+
var oe = {
|
|
110
316
|
spinner: "_spinner_1kqa4_1",
|
|
111
317
|
"tgui-spinner": "_tgui-spinner_1kqa4_1",
|
|
112
318
|
s: "_s_1kqa4_1",
|
|
113
319
|
m: "_m_1kqa4_17",
|
|
114
320
|
l: "_l_1kqa4_23"
|
|
115
|
-
},
|
|
321
|
+
}, se = _(oe.spinner, {
|
|
116
322
|
variants: { size: {
|
|
117
|
-
s:
|
|
118
|
-
m:
|
|
119
|
-
l:
|
|
323
|
+
s: oe.s,
|
|
324
|
+
m: oe.m,
|
|
325
|
+
l: oe.l
|
|
120
326
|
} },
|
|
121
327
|
defaultVariants: { size: "m" }
|
|
122
328
|
});
|
|
123
329
|
//#endregion
|
|
124
330
|
//#region src/components/Spinner/Spinner.tsx
|
|
125
|
-
function
|
|
126
|
-
return /* @__PURE__ */
|
|
331
|
+
function ce({ ref: e, size: t = "m", className: n, ...r }) {
|
|
332
|
+
return /* @__PURE__ */ h("span", {
|
|
127
333
|
ref: e,
|
|
128
334
|
role: "status",
|
|
129
335
|
"aria-label": "Loading",
|
|
130
|
-
className:
|
|
336
|
+
className: y(se({ size: t }), n),
|
|
131
337
|
...r
|
|
132
338
|
});
|
|
133
339
|
}
|
|
134
|
-
|
|
135
|
-
var
|
|
340
|
+
ce.displayName = "Spinner";
|
|
341
|
+
var le = {
|
|
136
342
|
typography: "_typography_1uxpm_1",
|
|
137
343
|
"weight-1": "_weight-1_1uxpm_6",
|
|
138
344
|
"weight-2": "_weight-2_1uxpm_10",
|
|
139
345
|
"weight-3": "_weight-3_1uxpm_14",
|
|
140
346
|
caps: "_caps_1uxpm_18"
|
|
141
|
-
},
|
|
347
|
+
}, ue = _(le.typography, {
|
|
142
348
|
variants: {
|
|
143
349
|
weight: {
|
|
144
|
-
1:
|
|
145
|
-
2:
|
|
146
|
-
3:
|
|
350
|
+
1: le["weight-1"],
|
|
351
|
+
2: le["weight-2"],
|
|
352
|
+
3: le["weight-3"]
|
|
147
353
|
},
|
|
148
|
-
caps: { true:
|
|
354
|
+
caps: { true: le.caps }
|
|
149
355
|
},
|
|
150
356
|
defaultVariants: { weight: "3" }
|
|
151
357
|
});
|
|
152
358
|
//#endregion
|
|
153
359
|
//#region src/components/Typography/Typography.tsx
|
|
154
|
-
function
|
|
155
|
-
return /* @__PURE__ */
|
|
360
|
+
function N({ ref: e, weight: t, caps: n, Component: r = "span", className: i, ...a }) {
|
|
361
|
+
return /* @__PURE__ */ h(r, {
|
|
156
362
|
ref: e,
|
|
157
|
-
className:
|
|
363
|
+
className: y(ue({
|
|
158
364
|
weight: t,
|
|
159
365
|
caps: n
|
|
160
366
|
}), i),
|
|
161
367
|
...a
|
|
162
368
|
});
|
|
163
369
|
}
|
|
164
|
-
|
|
370
|
+
N.displayName = "Typography";
|
|
165
371
|
//#endregion
|
|
166
372
|
//#region src/components/Subheadline/Subheadline.module.css
|
|
167
|
-
var
|
|
373
|
+
var de = {
|
|
168
374
|
"level-1": "_level-1_1azf3_1",
|
|
169
375
|
"level-2": "_level-2_1azf3_6"
|
|
170
|
-
},
|
|
376
|
+
}, fe = _("", {
|
|
171
377
|
variants: { level: {
|
|
172
|
-
1:
|
|
173
|
-
2:
|
|
378
|
+
1: de["level-1"],
|
|
379
|
+
2: de["level-2"]
|
|
174
380
|
} },
|
|
175
381
|
defaultVariants: { level: "1" }
|
|
176
382
|
});
|
|
177
383
|
//#endregion
|
|
178
384
|
//#region src/components/Subheadline/Subheadline.tsx
|
|
179
|
-
function
|
|
180
|
-
return /* @__PURE__ */
|
|
385
|
+
function P({ ref: e, level: t, Component: n = "h6", className: r, ...i }) {
|
|
386
|
+
return /* @__PURE__ */ h(N, {
|
|
181
387
|
ref: e,
|
|
182
388
|
Component: n,
|
|
183
|
-
className:
|
|
389
|
+
className: y(fe({ level: t }), r),
|
|
184
390
|
...i
|
|
185
391
|
});
|
|
186
392
|
}
|
|
187
|
-
|
|
393
|
+
P.displayName = "Subheadline";
|
|
188
394
|
//#endregion
|
|
189
395
|
//#region src/components/TguiProvider/context.ts
|
|
190
|
-
var
|
|
191
|
-
|
|
396
|
+
var pe = n(null);
|
|
397
|
+
pe.displayName = "TguiContext";
|
|
192
398
|
//#endregion
|
|
193
399
|
//#region src/components/TguiProvider/useTgui.ts
|
|
194
|
-
function
|
|
195
|
-
let e = a(
|
|
400
|
+
function F() {
|
|
401
|
+
let e = a(pe);
|
|
196
402
|
if (e === null) throw Error("useTgui must be used within a <TguiProvider>.");
|
|
197
403
|
return e;
|
|
198
404
|
}
|
|
199
|
-
var
|
|
405
|
+
var me = {
|
|
200
406
|
ripple: "_ripple_1cc3x_1",
|
|
201
407
|
wave: "_wave_1cc3x_9",
|
|
202
408
|
"wave-rise": "_wave-rise_1cc3x_1"
|
|
203
409
|
};
|
|
204
410
|
//#endregion
|
|
205
411
|
//#region src/components/Tappable/Ripple.tsx
|
|
206
|
-
function
|
|
207
|
-
return /* @__PURE__ */
|
|
412
|
+
function he({ waves: e, onWaveEnd: t }) {
|
|
413
|
+
return /* @__PURE__ */ h("span", {
|
|
208
414
|
"aria-hidden": !0,
|
|
209
|
-
className:
|
|
210
|
-
children: e.map((e) => /* @__PURE__ */
|
|
211
|
-
className:
|
|
415
|
+
className: me.ripple,
|
|
416
|
+
children: e.map((e) => /* @__PURE__ */ h("span", {
|
|
417
|
+
className: me.wave,
|
|
212
418
|
style: {
|
|
213
419
|
top: e.y,
|
|
214
420
|
left: e.x
|
|
@@ -217,13 +423,13 @@ function oe({ waves: e, onWaveEnd: t }) {
|
|
|
217
423
|
}, e.id))
|
|
218
424
|
});
|
|
219
425
|
}
|
|
220
|
-
var
|
|
426
|
+
var ge = {
|
|
221
427
|
tappable: "_tappable_10au7_1",
|
|
222
428
|
"tappable--ios": "_tappable--ios_10au7_17",
|
|
223
429
|
"tappable--opacity": "_tappable--opacity_10au7_18"
|
|
224
|
-
},
|
|
225
|
-
function
|
|
226
|
-
let [e, t] =
|
|
430
|
+
}, _e = 70, ve = 600;
|
|
431
|
+
function ye() {
|
|
432
|
+
let [e, t] = d([]), n = u(0), r = u(/* @__PURE__ */ new Map()), a = u(/* @__PURE__ */ new Set());
|
|
227
433
|
o(() => {
|
|
228
434
|
let e = r.current, t = a.current;
|
|
229
435
|
return () => {
|
|
@@ -247,9 +453,9 @@ function le() {
|
|
|
247
453
|
}]);
|
|
248
454
|
let i = setTimeout(() => {
|
|
249
455
|
a.current.delete(i), s(e);
|
|
250
|
-
},
|
|
456
|
+
}, ve);
|
|
251
457
|
a.current.add(i);
|
|
252
|
-
},
|
|
458
|
+
}, _e);
|
|
253
459
|
r.current.set(u, d);
|
|
254
460
|
}, [s]),
|
|
255
461
|
onPointerCancel: i((e) => {
|
|
@@ -261,11 +467,11 @@ function le() {
|
|
|
261
467
|
}
|
|
262
468
|
//#endregion
|
|
263
469
|
//#region src/components/Tappable/Tappable.tsx
|
|
264
|
-
function
|
|
265
|
-
let { platform: c } =
|
|
266
|
-
return /* @__PURE__ */
|
|
470
|
+
function be({ ref: e, Component: t = "div", interactiveAnimation: n = "background", className: r, children: i, onPointerDown: a, onPointerCancel: o, ...s }) {
|
|
471
|
+
let { platform: c } = F(), l = ye(), u = !!s.disabled, d = !!s.readOnly, f = c === "base" && n === "background" && !d && !u && (t !== "div" && t !== "span" || s.onClick != null);
|
|
472
|
+
return /* @__PURE__ */ g(t, {
|
|
267
473
|
ref: e,
|
|
268
|
-
className:
|
|
474
|
+
className: y(ge.tappable, c === "ios" && ge["tappable--ios"], n === "opacity" && ge["tappable--opacity"], r),
|
|
269
475
|
"data-readonly": d || void 0,
|
|
270
476
|
"data-disabled": u || void 0,
|
|
271
477
|
"aria-disabled": u || void 0,
|
|
@@ -276,123 +482,123 @@ function A({ ref: e, Component: t = "div", interactiveAnimation: n = "background
|
|
|
276
482
|
f && l.onPointerCancel(e), o?.(e);
|
|
277
483
|
},
|
|
278
484
|
...s,
|
|
279
|
-
children: [f && /* @__PURE__ */
|
|
485
|
+
children: [f && /* @__PURE__ */ h(he, {
|
|
280
486
|
waves: l.waves,
|
|
281
487
|
onWaveEnd: l.removeWave
|
|
282
488
|
}), i]
|
|
283
489
|
});
|
|
284
490
|
}
|
|
285
|
-
|
|
286
|
-
var
|
|
491
|
+
be.displayName = "Tappable";
|
|
492
|
+
var xe = { text: "_text_5v0x0_1" };
|
|
287
493
|
//#endregion
|
|
288
494
|
//#region src/components/Text/Text.tsx
|
|
289
|
-
function
|
|
290
|
-
return /* @__PURE__ */
|
|
495
|
+
function I({ ref: e, className: t, Component: n = "span", ...r }) {
|
|
496
|
+
return /* @__PURE__ */ h(N, {
|
|
291
497
|
ref: e,
|
|
292
498
|
Component: n,
|
|
293
|
-
className:
|
|
499
|
+
className: y(xe.text, t),
|
|
294
500
|
...r
|
|
295
501
|
});
|
|
296
502
|
}
|
|
297
|
-
|
|
503
|
+
I.displayName = "Text";
|
|
298
504
|
//#endregion
|
|
299
505
|
//#region src/shared/lib/telegram.ts
|
|
300
|
-
function
|
|
506
|
+
function Se() {
|
|
301
507
|
if (!(typeof window > "u")) return window.Telegram?.WebApp;
|
|
302
508
|
}
|
|
303
509
|
//#endregion
|
|
304
510
|
//#region src/shared/lib/appearance.ts
|
|
305
|
-
var
|
|
306
|
-
function
|
|
511
|
+
var Ce = "(prefers-color-scheme: dark)";
|
|
512
|
+
function we() {
|
|
307
513
|
return typeof window < "u" && typeof window.matchMedia == "function";
|
|
308
514
|
}
|
|
309
|
-
function
|
|
310
|
-
let e =
|
|
311
|
-
return e ? e.colorScheme === "dark" ? "dark" : "light" :
|
|
515
|
+
function Te() {
|
|
516
|
+
let e = Se();
|
|
517
|
+
return e ? e.colorScheme === "dark" ? "dark" : "light" : we() && window.matchMedia(Ce).matches ? "dark" : "light";
|
|
312
518
|
}
|
|
313
|
-
function
|
|
314
|
-
let t =
|
|
519
|
+
function Ee(e) {
|
|
520
|
+
let t = Se();
|
|
315
521
|
if (t) return t.onEvent("themeChanged", e), () => t.offEvent("themeChanged", e);
|
|
316
|
-
if (!
|
|
317
|
-
let n = window.matchMedia(
|
|
522
|
+
if (!we()) return () => {};
|
|
523
|
+
let n = window.matchMedia(Ce);
|
|
318
524
|
return n.addEventListener("change", e), () => n.removeEventListener("change", e);
|
|
319
525
|
}
|
|
320
526
|
//#endregion
|
|
321
527
|
//#region src/shared/lib/platform.ts
|
|
322
|
-
var
|
|
323
|
-
function
|
|
324
|
-
let e =
|
|
325
|
-
if (e) return
|
|
528
|
+
var De = /* @__PURE__ */ new Set(["ios", "macos"]);
|
|
529
|
+
function Oe() {
|
|
530
|
+
let e = Se();
|
|
531
|
+
if (e) return De.has(e.platform) ? "ios" : "base";
|
|
326
532
|
if (typeof navigator > "u") return "base";
|
|
327
533
|
let t = navigator.userAgent, n = t.includes("Macintosh") && navigator.maxTouchPoints > 1;
|
|
328
534
|
return /iphone|ipad|ipod/i.test(t) || n ? "ios" : "base";
|
|
329
535
|
}
|
|
330
|
-
var
|
|
331
|
-
wrapper: "
|
|
332
|
-
"wrapper--ios": "_wrapper--
|
|
333
|
-
"wrapper--dark": "_wrapper--
|
|
334
|
-
},
|
|
335
|
-
function
|
|
336
|
-
let
|
|
337
|
-
|
|
338
|
-
}, [e]),
|
|
339
|
-
platform:
|
|
340
|
-
appearance:
|
|
341
|
-
portalContainer: r ??
|
|
536
|
+
var ke = {
|
|
537
|
+
wrapper: "_wrapper_mqlq3_1",
|
|
538
|
+
"wrapper--ios": "_wrapper--ios_mqlq3_89",
|
|
539
|
+
"wrapper--dark": "_wrapper--dark_mqlq3_102"
|
|
540
|
+
}, Ae = () => "light";
|
|
541
|
+
function je({ ref: e, platform: t, appearance: n, portalContainer: r, className: a, children: o, ...s }) {
|
|
542
|
+
let c = l(() => t ?? Oe(), [t]), u = f(Ee, Te, Ae), p = n ?? u, [m, g] = d(null), _ = i((t) => {
|
|
543
|
+
g(t), typeof e == "function" ? e(t) : e && (e.current = t);
|
|
544
|
+
}, [e]), v = l(() => ({
|
|
545
|
+
platform: c,
|
|
546
|
+
appearance: p,
|
|
547
|
+
portalContainer: r ?? m
|
|
342
548
|
}), [
|
|
343
|
-
|
|
344
|
-
|
|
549
|
+
c,
|
|
550
|
+
p,
|
|
345
551
|
r,
|
|
346
|
-
|
|
552
|
+
m
|
|
347
553
|
]);
|
|
348
|
-
return /* @__PURE__ */
|
|
349
|
-
ref:
|
|
350
|
-
className:
|
|
351
|
-
...
|
|
352
|
-
children: /* @__PURE__ */
|
|
353
|
-
value:
|
|
554
|
+
return /* @__PURE__ */ h("div", {
|
|
555
|
+
ref: _,
|
|
556
|
+
className: y(ke.wrapper, c === "ios" && ke["wrapper--ios"], p === "dark" && ke["wrapper--dark"], a),
|
|
557
|
+
...s,
|
|
558
|
+
children: /* @__PURE__ */ h(pe.Provider, {
|
|
559
|
+
value: v,
|
|
354
560
|
children: o
|
|
355
561
|
})
|
|
356
562
|
});
|
|
357
563
|
}
|
|
358
|
-
|
|
359
|
-
var
|
|
360
|
-
button: "
|
|
361
|
-
stretched: "
|
|
362
|
-
before: "
|
|
363
|
-
after: "
|
|
364
|
-
content: "
|
|
365
|
-
label: "
|
|
366
|
-
loading: "
|
|
367
|
-
spinner: "
|
|
368
|
-
"size-s": "_size-
|
|
369
|
-
"size-m": "_size-
|
|
370
|
-
"size-l": "_size-
|
|
371
|
-
ios: "
|
|
372
|
-
"mode-filled": "_mode-
|
|
373
|
-
"mode-bezeled": "_mode-
|
|
374
|
-
"mode-plain": "_mode-
|
|
375
|
-
"mode-gray": "_mode-
|
|
376
|
-
"mode-outline": "_mode-
|
|
377
|
-
"mode-white": "_mode-
|
|
378
|
-
},
|
|
564
|
+
je.displayName = "TguiProvider";
|
|
565
|
+
var L = {
|
|
566
|
+
button: "_button_6vql2_1",
|
|
567
|
+
stretched: "_stretched_6vql2_13",
|
|
568
|
+
before: "_before_6vql2_34",
|
|
569
|
+
after: "_after_6vql2_35",
|
|
570
|
+
content: "_content_6vql2_41",
|
|
571
|
+
label: "_label_6vql2_50",
|
|
572
|
+
loading: "_loading_6vql2_61",
|
|
573
|
+
spinner: "_spinner_6vql2_71",
|
|
574
|
+
"size-s": "_size-s_6vql2_76",
|
|
575
|
+
"size-m": "_size-m_6vql2_84",
|
|
576
|
+
"size-l": "_size-l_6vql2_91",
|
|
577
|
+
ios: "_ios_6vql2_97",
|
|
578
|
+
"mode-filled": "_mode-filled_6vql2_105",
|
|
579
|
+
"mode-bezeled": "_mode-bezeled_6vql2_112",
|
|
580
|
+
"mode-plain": "_mode-plain_6vql2_119",
|
|
581
|
+
"mode-gray": "_mode-gray_6vql2_126",
|
|
582
|
+
"mode-outline": "_mode-outline_6vql2_133",
|
|
583
|
+
"mode-white": "_mode-white_6vql2_141"
|
|
584
|
+
}, Me = _(L.button, {
|
|
379
585
|
variants: {
|
|
380
586
|
mode: {
|
|
381
|
-
filled:
|
|
382
|
-
bezeled:
|
|
383
|
-
plain:
|
|
384
|
-
gray:
|
|
385
|
-
outline:
|
|
386
|
-
white:
|
|
587
|
+
filled: L["mode-filled"],
|
|
588
|
+
bezeled: L["mode-bezeled"],
|
|
589
|
+
plain: L["mode-plain"],
|
|
590
|
+
gray: L["mode-gray"],
|
|
591
|
+
outline: L["mode-outline"],
|
|
592
|
+
white: L["mode-white"]
|
|
387
593
|
},
|
|
388
594
|
size: {
|
|
389
|
-
s:
|
|
390
|
-
m:
|
|
391
|
-
l:
|
|
595
|
+
s: L["size-s"],
|
|
596
|
+
m: L["size-m"],
|
|
597
|
+
l: L["size-l"]
|
|
392
598
|
},
|
|
393
|
-
stretched: { true:
|
|
599
|
+
stretched: { true: L.stretched },
|
|
394
600
|
platform: {
|
|
395
|
-
ios:
|
|
601
|
+
ios: L.ios,
|
|
396
602
|
base: null
|
|
397
603
|
}
|
|
398
604
|
},
|
|
@@ -403,92 +609,92 @@ var N = {
|
|
|
403
609
|
});
|
|
404
610
|
//#endregion
|
|
405
611
|
//#region src/components/Button/Button.tsx
|
|
406
|
-
function
|
|
612
|
+
function Ne({ size: e, children: t }) {
|
|
407
613
|
let n = {
|
|
408
614
|
weight: "2",
|
|
409
|
-
className:
|
|
410
|
-
}, r = /* @__PURE__ */
|
|
411
|
-
className:
|
|
615
|
+
className: L.content
|
|
616
|
+
}, r = /* @__PURE__ */ h("span", {
|
|
617
|
+
className: L.label,
|
|
412
618
|
children: t
|
|
413
619
|
});
|
|
414
|
-
return e === "l" ? /* @__PURE__ */
|
|
620
|
+
return e === "l" ? /* @__PURE__ */ h(I, {
|
|
415
621
|
...n,
|
|
416
622
|
children: r
|
|
417
|
-
}) : /* @__PURE__ */
|
|
623
|
+
}) : /* @__PURE__ */ h(P, {
|
|
418
624
|
level: "2",
|
|
419
625
|
...n,
|
|
420
626
|
children: r
|
|
421
627
|
});
|
|
422
628
|
}
|
|
423
|
-
function
|
|
424
|
-
let { platform: f } =
|
|
425
|
-
return /* @__PURE__ */
|
|
629
|
+
function Pe({ ref: e, Component: t = "button", mode: n = "filled", size: r = "m", stretched: i = !1, loading: a = !1, type: o, before: s, after: c, children: l, className: u, ...d }) {
|
|
630
|
+
let { platform: f } = F();
|
|
631
|
+
return /* @__PURE__ */ g(be, {
|
|
426
632
|
ref: e,
|
|
427
633
|
Component: t,
|
|
428
634
|
type: t === "button" ? o ?? "button" : o,
|
|
429
635
|
"aria-busy": a || void 0,
|
|
430
|
-
className:
|
|
636
|
+
className: y(Me({
|
|
431
637
|
mode: n,
|
|
432
638
|
size: r,
|
|
433
639
|
stretched: i,
|
|
434
640
|
platform: f
|
|
435
|
-
}), a &&
|
|
641
|
+
}), a && L.loading, u),
|
|
436
642
|
...d,
|
|
437
643
|
children: [
|
|
438
|
-
a ? /* @__PURE__ */
|
|
644
|
+
a ? /* @__PURE__ */ h(ce, {
|
|
439
645
|
size: "s",
|
|
440
|
-
className:
|
|
646
|
+
className: L.spinner,
|
|
441
647
|
"aria-hidden": !0
|
|
442
648
|
}) : null,
|
|
443
|
-
s ? /* @__PURE__ */
|
|
444
|
-
className:
|
|
649
|
+
s ? /* @__PURE__ */ h("span", {
|
|
650
|
+
className: L.before,
|
|
445
651
|
children: s
|
|
446
652
|
}) : null,
|
|
447
|
-
/* @__PURE__ */
|
|
653
|
+
/* @__PURE__ */ h(Ne, {
|
|
448
654
|
size: r,
|
|
449
655
|
children: l
|
|
450
656
|
}),
|
|
451
|
-
c ? /* @__PURE__ */
|
|
452
|
-
className:
|
|
657
|
+
c ? /* @__PURE__ */ h("span", {
|
|
658
|
+
className: L.after,
|
|
453
659
|
children: c
|
|
454
660
|
}) : null
|
|
455
661
|
]
|
|
456
662
|
});
|
|
457
663
|
}
|
|
458
|
-
|
|
664
|
+
Pe.displayName = "Button";
|
|
459
665
|
//#endregion
|
|
460
666
|
//#region src/components/Caption/Caption.module.css
|
|
461
|
-
var
|
|
667
|
+
var Fe = {
|
|
462
668
|
"level-1": "_level-1_1fkm7_1",
|
|
463
669
|
"level-2": "_level-2_1fkm7_6"
|
|
464
|
-
},
|
|
670
|
+
}, Ie = _("", {
|
|
465
671
|
variants: { level: {
|
|
466
|
-
1:
|
|
467
|
-
2:
|
|
672
|
+
1: Fe["level-1"],
|
|
673
|
+
2: Fe["level-2"]
|
|
468
674
|
} },
|
|
469
675
|
defaultVariants: { level: "1" }
|
|
470
676
|
});
|
|
471
677
|
//#endregion
|
|
472
678
|
//#region src/components/Caption/Caption.tsx
|
|
473
|
-
function
|
|
474
|
-
return /* @__PURE__ */
|
|
679
|
+
function R({ ref: e, level: t, Component: n = "span", className: r, ...i }) {
|
|
680
|
+
return /* @__PURE__ */ h(N, {
|
|
475
681
|
ref: e,
|
|
476
682
|
Component: n,
|
|
477
|
-
className:
|
|
683
|
+
className: y(Ie({ level: t }), r),
|
|
478
684
|
...i
|
|
479
685
|
});
|
|
480
686
|
}
|
|
481
|
-
|
|
687
|
+
R.displayName = "Caption";
|
|
482
688
|
//#endregion
|
|
483
689
|
//#region src/components/Card/Card.context.ts
|
|
484
|
-
var
|
|
690
|
+
var Le = n({ type: "plain" }), Re = {
|
|
485
691
|
card: "_card_1maup_1",
|
|
486
692
|
cardAmbient: "_cardAmbient_1maup_17",
|
|
487
693
|
cell: "_cell_1maup_21",
|
|
488
694
|
cellAmbient: "_cellAmbient_1maup_26",
|
|
489
695
|
cellHeader: "_cellHeader_1maup_43",
|
|
490
696
|
cellSubtitle: "_cellSubtitle_1maup_47"
|
|
491
|
-
},
|
|
697
|
+
}, z = {
|
|
492
698
|
cell: "_cell_1w7p5_1",
|
|
493
699
|
before: "_before_1w7p5_10",
|
|
494
700
|
after: "_after_1w7p5_11",
|
|
@@ -503,200 +709,266 @@ var Te = n({ type: "plain" }), F = {
|
|
|
503
709
|
hovered: "_hovered_1w7p5_56",
|
|
504
710
|
ios: "_ios_1w7p5_60",
|
|
505
711
|
interactive: "_interactive_1w7p5_67"
|
|
506
|
-
},
|
|
712
|
+
}, ze = _(z.cell, { variants: {
|
|
507
713
|
platform: {
|
|
508
|
-
ios:
|
|
714
|
+
ios: z.ios,
|
|
509
715
|
base: null
|
|
510
716
|
},
|
|
511
|
-
hovered: { true:
|
|
512
|
-
interactive: { true:
|
|
513
|
-
multiline: { true:
|
|
717
|
+
hovered: { true: z.hovered },
|
|
718
|
+
interactive: { true: z.interactive },
|
|
719
|
+
multiline: { true: z.multiline }
|
|
514
720
|
} });
|
|
515
721
|
//#endregion
|
|
516
722
|
//#region src/components/Cell/Cell.tsx
|
|
517
|
-
function
|
|
518
|
-
return e ? /* @__PURE__ */
|
|
519
|
-
className:
|
|
723
|
+
function Be({ ios: e, children: t }) {
|
|
724
|
+
return e ? /* @__PURE__ */ h(I, {
|
|
725
|
+
className: z.head,
|
|
520
726
|
children: t
|
|
521
|
-
}) : /* @__PURE__ */
|
|
727
|
+
}) : /* @__PURE__ */ h(P, {
|
|
522
728
|
level: "1",
|
|
523
|
-
className:
|
|
729
|
+
className: z.head,
|
|
524
730
|
children: t
|
|
525
731
|
});
|
|
526
732
|
}
|
|
527
|
-
function
|
|
528
|
-
return e ? /* @__PURE__ */
|
|
529
|
-
className:
|
|
733
|
+
function Ve({ ios: e, children: t }) {
|
|
734
|
+
return e ? /* @__PURE__ */ h(R, {
|
|
735
|
+
className: z.description,
|
|
530
736
|
children: t
|
|
531
|
-
}) : /* @__PURE__ */
|
|
737
|
+
}) : /* @__PURE__ */ h(P, {
|
|
532
738
|
level: "2",
|
|
533
|
-
className:
|
|
739
|
+
className: z.description,
|
|
534
740
|
children: t
|
|
535
741
|
});
|
|
536
742
|
}
|
|
537
|
-
function
|
|
538
|
-
let { platform:
|
|
539
|
-
return /* @__PURE__ */
|
|
743
|
+
function He({ ref: e, Component: t = "div", subhead: n, children: r, hint: i, titleBadge: a, subtitle: o, description: s, before: c, after: l, hovered: u, multiline: d, className: f, ...p }) {
|
|
744
|
+
let { platform: m } = F(), _ = m === "ios", v = r != null || i != null || a != null, b = p.onClick != null || p.href != null || t === "a" || t === "button" || t === "label";
|
|
745
|
+
return /* @__PURE__ */ g(be, {
|
|
540
746
|
ref: e,
|
|
541
747
|
Component: t,
|
|
542
|
-
className:
|
|
543
|
-
platform:
|
|
748
|
+
className: y(ze({
|
|
749
|
+
platform: m,
|
|
544
750
|
hovered: u,
|
|
545
751
|
multiline: d,
|
|
546
752
|
interactive: b
|
|
547
753
|
}), f),
|
|
548
|
-
...
|
|
754
|
+
...p,
|
|
549
755
|
children: [
|
|
550
|
-
c == null ? null : /* @__PURE__ */
|
|
551
|
-
className:
|
|
756
|
+
c == null ? null : /* @__PURE__ */ h("div", {
|
|
757
|
+
className: z.before,
|
|
552
758
|
children: c
|
|
553
759
|
}),
|
|
554
|
-
/* @__PURE__ */
|
|
555
|
-
className:
|
|
760
|
+
/* @__PURE__ */ g("div", {
|
|
761
|
+
className: z.middle,
|
|
556
762
|
children: [
|
|
557
|
-
n == null ? null : /* @__PURE__ */
|
|
763
|
+
n == null ? null : /* @__PURE__ */ h(P, {
|
|
558
764
|
level: "2",
|
|
559
|
-
className:
|
|
765
|
+
className: z.subhead,
|
|
560
766
|
children: n
|
|
561
767
|
}),
|
|
562
|
-
|
|
563
|
-
ios:
|
|
768
|
+
v ? /* @__PURE__ */ g(Be, {
|
|
769
|
+
ios: _,
|
|
564
770
|
children: [
|
|
565
|
-
r == null ? null : /* @__PURE__ */
|
|
566
|
-
className:
|
|
771
|
+
r == null ? null : /* @__PURE__ */ h("span", {
|
|
772
|
+
className: z.title,
|
|
567
773
|
children: r
|
|
568
774
|
}),
|
|
569
|
-
i == null ? null : /* @__PURE__ */
|
|
570
|
-
className:
|
|
775
|
+
i == null ? null : /* @__PURE__ */ h("span", {
|
|
776
|
+
className: z.hint,
|
|
571
777
|
children: i
|
|
572
778
|
}),
|
|
573
779
|
a
|
|
574
780
|
]
|
|
575
781
|
}) : null,
|
|
576
|
-
o == null ? null : /* @__PURE__ */
|
|
782
|
+
o == null ? null : /* @__PURE__ */ h(P, {
|
|
577
783
|
level: "2",
|
|
578
|
-
className:
|
|
784
|
+
className: z.subtitle,
|
|
579
785
|
children: o
|
|
580
786
|
}),
|
|
581
|
-
s == null ? null : /* @__PURE__ */
|
|
582
|
-
ios:
|
|
787
|
+
s == null ? null : /* @__PURE__ */ h(Ve, {
|
|
788
|
+
ios: _,
|
|
583
789
|
children: s
|
|
584
790
|
})
|
|
585
791
|
]
|
|
586
792
|
}),
|
|
587
|
-
l == null ? null : /* @__PURE__ */
|
|
588
|
-
className:
|
|
793
|
+
l == null ? null : /* @__PURE__ */ h("div", {
|
|
794
|
+
className: z.after,
|
|
589
795
|
children: l
|
|
590
796
|
})
|
|
591
797
|
]
|
|
592
798
|
});
|
|
593
799
|
}
|
|
594
|
-
|
|
800
|
+
He.displayName = "Cell";
|
|
595
801
|
//#endregion
|
|
596
802
|
//#region src/components/Card/CardCell.tsx
|
|
597
|
-
function
|
|
598
|
-
let { type: o } = a(
|
|
599
|
-
return /* @__PURE__ */
|
|
803
|
+
function Ue({ ref: e, children: t, subtitle: n, className: r, ...i }) {
|
|
804
|
+
let { type: o } = a(Le), s = o === "ambient";
|
|
805
|
+
return /* @__PURE__ */ h(He, {
|
|
600
806
|
ref: e,
|
|
601
|
-
className:
|
|
602
|
-
subtitle: n == null ? void 0 : /* @__PURE__ */
|
|
603
|
-
className:
|
|
807
|
+
className: y(Re.cell, s && Re.cellAmbient, r),
|
|
808
|
+
subtitle: n == null ? void 0 : /* @__PURE__ */ h("span", {
|
|
809
|
+
className: Re.cellSubtitle,
|
|
604
810
|
children: n
|
|
605
811
|
}),
|
|
606
812
|
...i,
|
|
607
|
-
children: t == null ? null : /* @__PURE__ */
|
|
608
|
-
className:
|
|
813
|
+
children: t == null ? null : /* @__PURE__ */ h("span", {
|
|
814
|
+
className: Re.cellHeader,
|
|
609
815
|
children: t
|
|
610
816
|
})
|
|
611
817
|
});
|
|
612
818
|
}
|
|
613
|
-
|
|
819
|
+
Ue.displayName = "CardCell";
|
|
614
820
|
//#endregion
|
|
615
821
|
//#region src/components/Card/Card.tsx
|
|
616
|
-
function
|
|
617
|
-
let a =
|
|
618
|
-
return /* @__PURE__ */
|
|
822
|
+
function We({ ref: e, type: t = "plain", className: n, children: r, ...i }) {
|
|
823
|
+
let a = l(() => ({ type: t }), [t]);
|
|
824
|
+
return /* @__PURE__ */ h(Le.Provider, {
|
|
619
825
|
value: a,
|
|
620
|
-
children: /* @__PURE__ */
|
|
826
|
+
children: /* @__PURE__ */ h("article", {
|
|
621
827
|
ref: e,
|
|
622
|
-
className:
|
|
828
|
+
className: y(Re.card, t === "ambient" && Re.cardAmbient, n),
|
|
623
829
|
...i,
|
|
624
830
|
children: r
|
|
625
831
|
})
|
|
626
832
|
});
|
|
627
833
|
}
|
|
628
|
-
|
|
629
|
-
var
|
|
834
|
+
We.displayName = "Card", We.Cell = Ue;
|
|
835
|
+
var Ge = {
|
|
630
836
|
checkbox: "_checkbox_yjw6v_1",
|
|
631
837
|
input: "_input_yjw6v_12",
|
|
632
838
|
box: "_box_yjw6v_22"
|
|
633
839
|
};
|
|
634
840
|
//#endregion
|
|
635
841
|
//#region src/components/Checkbox/Checkbox.tsx
|
|
636
|
-
function
|
|
637
|
-
let s =
|
|
842
|
+
function Ke({ ref: e, indeterminate: t = !1, disabled: n, className: r, style: i, ...a }) {
|
|
843
|
+
let s = u(null);
|
|
638
844
|
return o(() => {
|
|
639
845
|
s.current && (s.current.indeterminate = t);
|
|
640
|
-
}, [t]), /* @__PURE__ */
|
|
641
|
-
className:
|
|
846
|
+
}, [t]), /* @__PURE__ */ g("span", {
|
|
847
|
+
className: y(Ge.checkbox, r),
|
|
642
848
|
style: i,
|
|
643
849
|
"data-disabled": n || void 0,
|
|
644
|
-
children: [/* @__PURE__ */
|
|
850
|
+
children: [/* @__PURE__ */ h("input", {
|
|
645
851
|
ref: (t) => {
|
|
646
852
|
s.current = t, typeof e == "function" ? e(t) : e && (e.current = t);
|
|
647
853
|
},
|
|
648
854
|
type: "checkbox",
|
|
649
|
-
className:
|
|
855
|
+
className: Ge.input,
|
|
650
856
|
disabled: n,
|
|
651
857
|
...a
|
|
652
|
-
}), /* @__PURE__ */
|
|
653
|
-
className:
|
|
858
|
+
}), /* @__PURE__ */ h("span", {
|
|
859
|
+
className: Ge.box,
|
|
654
860
|
"aria-hidden": !0
|
|
655
861
|
})]
|
|
656
862
|
});
|
|
657
863
|
}
|
|
658
|
-
|
|
659
|
-
var
|
|
864
|
+
Ke.displayName = "Checkbox";
|
|
865
|
+
var B = {
|
|
866
|
+
chip: "_chip_13v10_1",
|
|
867
|
+
"mode-elevated": "_mode-elevated_13v10_16",
|
|
868
|
+
"mode-outline": "_mode-outline_13v10_21",
|
|
869
|
+
clickable: "_clickable_13v10_26",
|
|
870
|
+
before: "_before_13v10_37",
|
|
871
|
+
after: "_after_13v10_38",
|
|
872
|
+
label: "_label_13v10_49",
|
|
873
|
+
remove: "_remove_13v10_56"
|
|
874
|
+
}, qe = _(B.chip, {
|
|
875
|
+
variants: {
|
|
876
|
+
mode: {
|
|
877
|
+
elevated: B["mode-elevated"],
|
|
878
|
+
outline: B["mode-outline"]
|
|
879
|
+
},
|
|
880
|
+
clickable: { true: B.clickable }
|
|
881
|
+
},
|
|
882
|
+
defaultVariants: { mode: "elevated" }
|
|
883
|
+
});
|
|
884
|
+
//#endregion
|
|
885
|
+
//#region src/components/Chip/Chip.tsx
|
|
886
|
+
function Je({ ref: e, Component: t = "div", mode: n = "elevated", before: r, after: i, onClick: a, onRemove: o, removeLabel: s = "Remove", className: c, children: l, ...u }) {
|
|
887
|
+
return /* @__PURE__ */ g(t, {
|
|
888
|
+
ref: e,
|
|
889
|
+
className: y(qe({
|
|
890
|
+
mode: n,
|
|
891
|
+
clickable: a != null
|
|
892
|
+
}), c),
|
|
893
|
+
onClick: a,
|
|
894
|
+
...u,
|
|
895
|
+
children: [
|
|
896
|
+
r == null ? null : /* @__PURE__ */ h("span", {
|
|
897
|
+
className: B.before,
|
|
898
|
+
children: r
|
|
899
|
+
}),
|
|
900
|
+
/* @__PURE__ */ h("span", {
|
|
901
|
+
className: B.label,
|
|
902
|
+
children: l
|
|
903
|
+
}),
|
|
904
|
+
o == null ? i == null ? null : /* @__PURE__ */ h("span", {
|
|
905
|
+
className: B.after,
|
|
906
|
+
children: i
|
|
907
|
+
}) : /* @__PURE__ */ h("button", {
|
|
908
|
+
type: "button",
|
|
909
|
+
className: B.remove,
|
|
910
|
+
"aria-label": s,
|
|
911
|
+
onClick: (e) => {
|
|
912
|
+
e.stopPropagation(), o();
|
|
913
|
+
},
|
|
914
|
+
children: /* @__PURE__ */ h("svg", {
|
|
915
|
+
width: "12",
|
|
916
|
+
height: "12",
|
|
917
|
+
viewBox: "0 0 12 12",
|
|
918
|
+
"aria-hidden": !0,
|
|
919
|
+
children: /* @__PURE__ */ h("path", {
|
|
920
|
+
d: "M3 3l6 6M9 3l-6 6",
|
|
921
|
+
stroke: "currentColor",
|
|
922
|
+
strokeWidth: "1.5",
|
|
923
|
+
strokeLinecap: "round"
|
|
924
|
+
})
|
|
925
|
+
})
|
|
926
|
+
})
|
|
927
|
+
]
|
|
928
|
+
});
|
|
929
|
+
}
|
|
930
|
+
Je.displayName = "Chip";
|
|
931
|
+
var Ye = {
|
|
660
932
|
root: "_root_hheo5_1",
|
|
661
933
|
svg: "_svg_hheo5_6",
|
|
662
934
|
track: "_track_hheo5_10",
|
|
663
935
|
indicator: "_indicator_hheo5_14"
|
|
664
|
-
},
|
|
936
|
+
}, Xe = {
|
|
665
937
|
s: 20,
|
|
666
938
|
m: 28,
|
|
667
939
|
l: 36
|
|
668
|
-
},
|
|
940
|
+
}, Ze = {
|
|
669
941
|
s: 2,
|
|
670
942
|
m: 2.5,
|
|
671
943
|
l: 3
|
|
672
944
|
};
|
|
673
945
|
//#endregion
|
|
674
946
|
//#region src/components/CircularProgress/CircularProgress.tsx
|
|
675
|
-
function
|
|
676
|
-
let a = Math.max(0, Math.min(100, t)), o =
|
|
677
|
-
return /* @__PURE__ */
|
|
947
|
+
function Qe({ ref: e, value: t = 0, size: n = "m", className: r, ...i }) {
|
|
948
|
+
let a = Math.max(0, Math.min(100, t)), o = Xe[n], s = Ze[n], c = (o - s) / 2, l = 2 * Math.PI * c, u = o / 2;
|
|
949
|
+
return /* @__PURE__ */ h("span", {
|
|
678
950
|
ref: e,
|
|
679
951
|
role: "progressbar",
|
|
680
952
|
"aria-valuemin": 0,
|
|
681
953
|
"aria-valuemax": 100,
|
|
682
954
|
"aria-valuenow": Math.round(a),
|
|
683
|
-
className:
|
|
955
|
+
className: y(Ye.root, r),
|
|
684
956
|
...i,
|
|
685
|
-
children: /* @__PURE__ */
|
|
686
|
-
className:
|
|
957
|
+
children: /* @__PURE__ */ g("svg", {
|
|
958
|
+
className: Ye.svg,
|
|
687
959
|
width: o,
|
|
688
960
|
height: o,
|
|
689
961
|
viewBox: `0 0 ${o} ${o}`,
|
|
690
962
|
"aria-hidden": !0,
|
|
691
|
-
children: [/* @__PURE__ */
|
|
692
|
-
className:
|
|
963
|
+
children: [/* @__PURE__ */ h("circle", {
|
|
964
|
+
className: Ye.track,
|
|
693
965
|
cx: u,
|
|
694
966
|
cy: u,
|
|
695
967
|
r: c,
|
|
696
968
|
strokeWidth: s,
|
|
697
969
|
fill: "none"
|
|
698
|
-
}), /* @__PURE__ */
|
|
699
|
-
className:
|
|
970
|
+
}), /* @__PURE__ */ h("circle", {
|
|
971
|
+
className: Ye.indicator,
|
|
700
972
|
cx: u,
|
|
701
973
|
cy: u,
|
|
702
974
|
r: c,
|
|
@@ -709,32 +981,133 @@ function Fe({ ref: e, value: t = 0, size: n = "m", className: r, ...i }) {
|
|
|
709
981
|
})
|
|
710
982
|
});
|
|
711
983
|
}
|
|
712
|
-
|
|
713
|
-
var
|
|
984
|
+
Qe.displayName = "CircularProgress";
|
|
985
|
+
var $e = { divider: "_divider_fq1ux_1" };
|
|
714
986
|
//#endregion
|
|
715
987
|
//#region src/components/Divider/Divider.tsx
|
|
716
|
-
function
|
|
717
|
-
return /* @__PURE__ */
|
|
988
|
+
function et({ ref: e, className: t, ...n }) {
|
|
989
|
+
return /* @__PURE__ */ h("hr", {
|
|
718
990
|
ref: e,
|
|
719
|
-
className:
|
|
991
|
+
className: y($e.divider, t),
|
|
720
992
|
...n
|
|
721
993
|
});
|
|
722
994
|
}
|
|
723
|
-
|
|
724
|
-
var
|
|
995
|
+
et.displayName = "Divider";
|
|
996
|
+
var tt = {
|
|
997
|
+
fixedLayout: "_fixedLayout_1b5hq_1",
|
|
998
|
+
top: "_top_1b5hq_9",
|
|
999
|
+
bottom: "_bottom_1b5hq_14"
|
|
1000
|
+
};
|
|
1001
|
+
//#endregion
|
|
1002
|
+
//#region src/components/FixedLayout/FixedLayout.tsx
|
|
1003
|
+
function nt({ ref: e, vertical: t = "bottom", className: n, ...r }) {
|
|
1004
|
+
return /* @__PURE__ */ h("div", {
|
|
1005
|
+
ref: e,
|
|
1006
|
+
className: y(tt.fixedLayout, tt[t], n),
|
|
1007
|
+
...r
|
|
1008
|
+
});
|
|
1009
|
+
}
|
|
1010
|
+
nt.displayName = "FixedLayout";
|
|
1011
|
+
var rt = { headline: "_headline_17ihj_1" };
|
|
725
1012
|
//#endregion
|
|
726
1013
|
//#region src/components/Headline/Headline.tsx
|
|
727
|
-
function
|
|
728
|
-
return /* @__PURE__ */
|
|
1014
|
+
function it({ ref: e, weight: t = "2", className: n, Component: r = "h5", ...i }) {
|
|
1015
|
+
return /* @__PURE__ */ h(N, {
|
|
729
1016
|
ref: e,
|
|
730
1017
|
weight: t,
|
|
731
1018
|
Component: r,
|
|
732
|
-
className:
|
|
1019
|
+
className: y(rt.headline, n),
|
|
733
1020
|
...i
|
|
734
1021
|
});
|
|
735
1022
|
}
|
|
736
|
-
|
|
737
|
-
var
|
|
1023
|
+
it.displayName = "Headline";
|
|
1024
|
+
var V = {
|
|
1025
|
+
root: "_root_ykq8r_1",
|
|
1026
|
+
edge: "_edge_ykq8r_9",
|
|
1027
|
+
visible: "_visible_ykq8r_25",
|
|
1028
|
+
"edge--start": "_edge--start_ykq8r_29",
|
|
1029
|
+
"edge--end": "_edge--end_ykq8r_34",
|
|
1030
|
+
scroller: "_scroller_ykq8r_39",
|
|
1031
|
+
snap: "_snap_ykq8r_72"
|
|
1032
|
+
}, at = 4;
|
|
1033
|
+
function ot({ ref: e, snap: t = !1, fade: n = !0, className: r, children: a, ...s }) {
|
|
1034
|
+
let c = u(null), [l, f] = d({
|
|
1035
|
+
start: !1,
|
|
1036
|
+
end: !1
|
|
1037
|
+
}), p = u({
|
|
1038
|
+
down: !1,
|
|
1039
|
+
moved: !1,
|
|
1040
|
+
startX: 0,
|
|
1041
|
+
startScroll: 0
|
|
1042
|
+
}), _ = i(() => {
|
|
1043
|
+
let e = c.current;
|
|
1044
|
+
if (!e) return;
|
|
1045
|
+
let t = e.scrollLeft > 1, n = e.scrollLeft < e.scrollWidth - e.clientWidth - 1;
|
|
1046
|
+
f((e) => e.start === t && e.end === n ? e : {
|
|
1047
|
+
start: t,
|
|
1048
|
+
end: n
|
|
1049
|
+
});
|
|
1050
|
+
}, []);
|
|
1051
|
+
o(() => {
|
|
1052
|
+
let e = c.current;
|
|
1053
|
+
if (!e) return;
|
|
1054
|
+
_(), e.addEventListener("scroll", _, { passive: !0 });
|
|
1055
|
+
let t = typeof ResizeObserver < "u" ? new ResizeObserver(_) : null;
|
|
1056
|
+
return t?.observe(e), () => {
|
|
1057
|
+
e.removeEventListener("scroll", _), t?.disconnect();
|
|
1058
|
+
};
|
|
1059
|
+
}, [_]);
|
|
1060
|
+
let v = (e) => {
|
|
1061
|
+
if (e.pointerType !== "mouse" || e.button !== 0) return;
|
|
1062
|
+
let t = c.current;
|
|
1063
|
+
t && (p.current = {
|
|
1064
|
+
down: !0,
|
|
1065
|
+
moved: !1,
|
|
1066
|
+
startX: e.clientX,
|
|
1067
|
+
startScroll: t.scrollLeft
|
|
1068
|
+
});
|
|
1069
|
+
}, b = (e) => {
|
|
1070
|
+
let t = p.current, n = c.current;
|
|
1071
|
+
if (!t.down || !n) return;
|
|
1072
|
+
let r = e.clientX - t.startX;
|
|
1073
|
+
if (!t.moved) {
|
|
1074
|
+
if (Math.abs(r) < at) return;
|
|
1075
|
+
t.moved = !0, n.setPointerCapture(e.pointerId), n.dataset.grabbing = "true", n.style.scrollBehavior = "auto";
|
|
1076
|
+
}
|
|
1077
|
+
e.preventDefault(), n.scrollLeft = t.startScroll - r;
|
|
1078
|
+
}, x = (e) => {
|
|
1079
|
+
let t = c.current;
|
|
1080
|
+
t && p.current.moved && (t.releasePointerCapture?.(e.pointerId), delete t.dataset.grabbing, t.style.scrollBehavior = ""), p.current.down = !1;
|
|
1081
|
+
};
|
|
1082
|
+
return /* @__PURE__ */ g("div", {
|
|
1083
|
+
ref: e,
|
|
1084
|
+
className: y(V.root, r),
|
|
1085
|
+
"data-start": n ? String(l.start) : void 0,
|
|
1086
|
+
"data-end": n ? String(l.end) : void 0,
|
|
1087
|
+
...s,
|
|
1088
|
+
children: [n ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("span", {
|
|
1089
|
+
className: y(V.edge, V["edge--start"], l.start && V.visible),
|
|
1090
|
+
"aria-hidden": !0
|
|
1091
|
+
}), /* @__PURE__ */ h("span", {
|
|
1092
|
+
className: y(V.edge, V["edge--end"], l.end && V.visible),
|
|
1093
|
+
"aria-hidden": !0
|
|
1094
|
+
})] }) : null, /* @__PURE__ */ h("div", {
|
|
1095
|
+
ref: c,
|
|
1096
|
+
className: y(V.scroller, t && V.snap),
|
|
1097
|
+
onPointerDown: v,
|
|
1098
|
+
onPointerMove: b,
|
|
1099
|
+
onPointerUp: x,
|
|
1100
|
+
onPointerCancel: x,
|
|
1101
|
+
onDragStart: (e) => e.preventDefault(),
|
|
1102
|
+
onClickCapture: (e) => {
|
|
1103
|
+
p.current.moved && (e.stopPropagation(), p.current.moved = !1);
|
|
1104
|
+
},
|
|
1105
|
+
children: a
|
|
1106
|
+
})]
|
|
1107
|
+
});
|
|
1108
|
+
}
|
|
1109
|
+
ot.displayName = "HorizontalScroll";
|
|
1110
|
+
var H = {
|
|
738
1111
|
iconButton: "_iconButton_1ifh1_1",
|
|
739
1112
|
circle: "_circle_1ifh1_15",
|
|
740
1113
|
s: "_s_1ifh1_19",
|
|
@@ -746,22 +1119,22 @@ var B = {
|
|
|
746
1119
|
"mode-plain": "_mode-plain_1ifh1_72",
|
|
747
1120
|
"mode-gray": "_mode-gray_1ifh1_76",
|
|
748
1121
|
"mode-outline": "_mode-outline_1ifh1_81"
|
|
749
|
-
},
|
|
1122
|
+
}, st = _(H.iconButton, {
|
|
750
1123
|
variants: {
|
|
751
1124
|
mode: {
|
|
752
|
-
bezeled:
|
|
753
|
-
plain:
|
|
754
|
-
gray:
|
|
755
|
-
outline:
|
|
1125
|
+
bezeled: H["mode-bezeled"],
|
|
1126
|
+
plain: H["mode-plain"],
|
|
1127
|
+
gray: H["mode-gray"],
|
|
1128
|
+
outline: H["mode-outline"]
|
|
756
1129
|
},
|
|
757
1130
|
size: {
|
|
758
|
-
s:
|
|
759
|
-
m:
|
|
760
|
-
l:
|
|
1131
|
+
s: H.s,
|
|
1132
|
+
m: H.m,
|
|
1133
|
+
l: H.l
|
|
761
1134
|
},
|
|
762
|
-
circle: { true:
|
|
1135
|
+
circle: { true: H.circle },
|
|
763
1136
|
platform: {
|
|
764
|
-
ios:
|
|
1137
|
+
ios: H.ios,
|
|
765
1138
|
base: null
|
|
766
1139
|
}
|
|
767
1140
|
},
|
|
@@ -772,27 +1145,86 @@ var B = {
|
|
|
772
1145
|
});
|
|
773
1146
|
//#endregion
|
|
774
1147
|
//#region src/components/IconButton/IconButton.tsx
|
|
775
|
-
function
|
|
776
|
-
let { platform: l } =
|
|
777
|
-
return /* @__PURE__ */
|
|
1148
|
+
function ct({ ref: e, Component: t = "button", mode: n = "plain", size: r = "m", circle: i = !1, type: a, className: o, children: s, ...c }) {
|
|
1149
|
+
let { platform: l } = F();
|
|
1150
|
+
return /* @__PURE__ */ h(be, {
|
|
778
1151
|
ref: e,
|
|
779
1152
|
Component: t,
|
|
780
1153
|
type: t === "button" ? a ?? "button" : a,
|
|
781
|
-
className:
|
|
1154
|
+
className: y(st({
|
|
782
1155
|
mode: n,
|
|
783
1156
|
size: r,
|
|
784
1157
|
circle: i,
|
|
785
1158
|
platform: l
|
|
786
1159
|
}), o),
|
|
787
1160
|
...c,
|
|
788
|
-
children: /* @__PURE__ */
|
|
789
|
-
className:
|
|
1161
|
+
children: /* @__PURE__ */ h("span", {
|
|
1162
|
+
className: H.icon,
|
|
790
1163
|
children: s
|
|
791
1164
|
})
|
|
792
1165
|
});
|
|
793
1166
|
}
|
|
794
|
-
|
|
795
|
-
var
|
|
1167
|
+
ct.displayName = "IconButton";
|
|
1168
|
+
var lt = {
|
|
1169
|
+
frame: "_frame_1q5rs_1",
|
|
1170
|
+
bordered: "_bordered_1q5rs_10",
|
|
1171
|
+
img: "_img_1q5rs_14",
|
|
1172
|
+
loading: "_loading_1q5rs_21",
|
|
1173
|
+
placeholder: "_placeholder_1q5rs_25",
|
|
1174
|
+
fallback: "_fallback_1q5rs_26",
|
|
1175
|
+
"tgui-image-shimmer": "_tgui-image-shimmer_1q5rs_1"
|
|
1176
|
+
}, ut = /* @__PURE__ */ h("svg", {
|
|
1177
|
+
viewBox: "0 0 24 24",
|
|
1178
|
+
fill: "none",
|
|
1179
|
+
"aria-hidden": !0,
|
|
1180
|
+
children: /* @__PURE__ */ h("path", {
|
|
1181
|
+
d: "M3 5h18v14H3zM3 15l5-5 4 4 3-3 6 6",
|
|
1182
|
+
stroke: "currentColor",
|
|
1183
|
+
strokeWidth: "1.6",
|
|
1184
|
+
strokeLinejoin: "round"
|
|
1185
|
+
})
|
|
1186
|
+
});
|
|
1187
|
+
function dt({ ref: e, size: t, width: n, height: r, aspectRatio: i, fit: a = "cover", radius: o, bordered: s = !1, fallback: c = ut, src: l, alt: u = "", className: f, style: p, onLoad: m, onError: _, ...v }) {
|
|
1188
|
+
let [b, x] = d(null), [S, C] = d(!1), w = l != null && l === b, T = {
|
|
1189
|
+
...p,
|
|
1190
|
+
width: t ?? n,
|
|
1191
|
+
height: t ?? r,
|
|
1192
|
+
aspectRatio: i,
|
|
1193
|
+
borderRadius: o === "full" ? "50%" : o,
|
|
1194
|
+
"--tgui--image--fit": a
|
|
1195
|
+
};
|
|
1196
|
+
return /* @__PURE__ */ g("div", {
|
|
1197
|
+
className: y(lt.frame, s && lt.bordered, !S && lt.loading, f),
|
|
1198
|
+
style: T,
|
|
1199
|
+
children: [
|
|
1200
|
+
l != null && !w ? /* @__PURE__ */ h("img", {
|
|
1201
|
+
ref: e,
|
|
1202
|
+
className: lt.img,
|
|
1203
|
+
src: l,
|
|
1204
|
+
alt: u,
|
|
1205
|
+
draggable: !1,
|
|
1206
|
+
onLoad: (e) => {
|
|
1207
|
+
C(!0), m?.(e);
|
|
1208
|
+
},
|
|
1209
|
+
onError: (e) => {
|
|
1210
|
+
x(l), _?.(e);
|
|
1211
|
+
},
|
|
1212
|
+
...v
|
|
1213
|
+
}) : null,
|
|
1214
|
+
!S && !w ? /* @__PURE__ */ h("div", {
|
|
1215
|
+
className: lt.placeholder,
|
|
1216
|
+
"aria-hidden": !0
|
|
1217
|
+
}) : null,
|
|
1218
|
+
w ? /* @__PURE__ */ h("div", {
|
|
1219
|
+
className: lt.fallback,
|
|
1220
|
+
"aria-hidden": !0,
|
|
1221
|
+
children: c
|
|
1222
|
+
}) : null
|
|
1223
|
+
]
|
|
1224
|
+
});
|
|
1225
|
+
}
|
|
1226
|
+
dt.displayName = "Image";
|
|
1227
|
+
var U = {
|
|
796
1228
|
base: "_base_1k0ze_1",
|
|
797
1229
|
body: "_body_1k0ze_7",
|
|
798
1230
|
ios: "_ios_1k0ze_23",
|
|
@@ -806,148 +1238,242 @@ var V = {
|
|
|
806
1238
|
};
|
|
807
1239
|
//#endregion
|
|
808
1240
|
//#region src/components/FormField/FormField.tsx
|
|
809
|
-
function
|
|
810
|
-
return /* @__PURE__ */
|
|
1241
|
+
function ft({ ref: e, ios: t = !1, status: n = "default", disabled: r = !1, alignStart: i = !1, header: a, before: o, after: s, className: c, children: l }) {
|
|
1242
|
+
return /* @__PURE__ */ g("div", {
|
|
811
1243
|
ref: e,
|
|
812
|
-
className:
|
|
1244
|
+
className: y(t ? U.ios : U.base, n === "error" && U.error, n === "focused" && U.focused, r && U.disabled, i && U["align-start"], c),
|
|
813
1245
|
"aria-disabled": r || void 0,
|
|
814
|
-
children: [/* @__PURE__ */
|
|
815
|
-
className:
|
|
1246
|
+
children: [/* @__PURE__ */ g("label", {
|
|
1247
|
+
className: U.body,
|
|
816
1248
|
children: [
|
|
817
|
-
o == null ? null : /* @__PURE__ */
|
|
818
|
-
className:
|
|
1249
|
+
o == null ? null : /* @__PURE__ */ h("span", {
|
|
1250
|
+
className: U.before,
|
|
819
1251
|
children: o
|
|
820
1252
|
}),
|
|
821
1253
|
l,
|
|
822
|
-
s == null ? null : /* @__PURE__ */
|
|
823
|
-
className:
|
|
1254
|
+
s == null ? null : /* @__PURE__ */ h("span", {
|
|
1255
|
+
className: U.after,
|
|
824
1256
|
children: s
|
|
825
1257
|
})
|
|
826
1258
|
]
|
|
827
|
-
}), a != null && !t ? /* @__PURE__ */
|
|
828
|
-
className:
|
|
1259
|
+
}), a != null && !t ? /* @__PURE__ */ h("span", {
|
|
1260
|
+
className: U.header,
|
|
829
1261
|
children: a
|
|
830
1262
|
}) : null]
|
|
831
1263
|
});
|
|
832
1264
|
}
|
|
833
|
-
|
|
834
|
-
var
|
|
1265
|
+
ft.displayName = "FormField";
|
|
1266
|
+
var pt = { field: "_field_11zrf_1" };
|
|
835
1267
|
//#endregion
|
|
836
1268
|
//#region src/components/Input/Input.tsx
|
|
837
|
-
function
|
|
838
|
-
let { platform: f } =
|
|
839
|
-
return /* @__PURE__ */
|
|
840
|
-
ios:
|
|
841
|
-
status: a ?? (
|
|
1269
|
+
function mt({ ref: e, type: t = "text", header: n, before: r, after: i, status: a, disabled: o, className: s, onFocus: c, onBlur: l, ...u }) {
|
|
1270
|
+
let { platform: f } = F(), p = f === "ios", [m, g] = d(!1);
|
|
1271
|
+
return /* @__PURE__ */ h(ft, {
|
|
1272
|
+
ios: p,
|
|
1273
|
+
status: a ?? (m ? "focused" : "default"),
|
|
842
1274
|
disabled: o,
|
|
843
1275
|
header: n,
|
|
844
1276
|
before: r,
|
|
845
1277
|
after: i,
|
|
846
1278
|
className: s,
|
|
847
|
-
children: /* @__PURE__ */ p
|
|
1279
|
+
children: /* @__PURE__ */ h(p ? I : P, {
|
|
848
1280
|
ref: e,
|
|
849
1281
|
Component: "input",
|
|
850
|
-
className:
|
|
1282
|
+
className: pt.field,
|
|
851
1283
|
type: t,
|
|
852
1284
|
disabled: o,
|
|
853
1285
|
onFocus: (e) => {
|
|
854
1286
|
o || g(!0), c?.(e);
|
|
855
1287
|
},
|
|
856
1288
|
onBlur: (e) => {
|
|
857
|
-
g(!1),
|
|
1289
|
+
g(!1), l?.(e);
|
|
858
1290
|
},
|
|
859
|
-
...
|
|
1291
|
+
...u
|
|
860
1292
|
})
|
|
861
1293
|
});
|
|
862
1294
|
}
|
|
863
|
-
|
|
1295
|
+
mt.displayName = "Input";
|
|
864
1296
|
//#endregion
|
|
865
1297
|
//#region src/components/LargeTitle/LargeTitle.module.css
|
|
866
|
-
var
|
|
1298
|
+
var ht = { "large-title": "_large-title_15hug_1" };
|
|
867
1299
|
//#endregion
|
|
868
1300
|
//#region src/components/LargeTitle/LargeTitle.tsx
|
|
869
|
-
function
|
|
870
|
-
return /* @__PURE__ */
|
|
1301
|
+
function gt({ ref: e, weight: t = "1", className: n, Component: r = "h1", ...i }) {
|
|
1302
|
+
return /* @__PURE__ */ h(N, {
|
|
871
1303
|
ref: e,
|
|
872
1304
|
weight: t,
|
|
873
1305
|
Component: r,
|
|
874
|
-
className:
|
|
1306
|
+
className: y(ht["large-title"], n),
|
|
875
1307
|
...i
|
|
876
1308
|
});
|
|
877
1309
|
}
|
|
878
|
-
|
|
879
|
-
var
|
|
1310
|
+
gt.displayName = "LargeTitle";
|
|
1311
|
+
var _t = {
|
|
1312
|
+
link: "_link_1ylyy_1",
|
|
1313
|
+
icon: "_icon_1ylyy_18"
|
|
1314
|
+
};
|
|
1315
|
+
//#endregion
|
|
1316
|
+
//#region src/components/Link/Link.tsx
|
|
1317
|
+
function vt({ ref: e, target: t, rel: n, className: r, children: i, ...a }) {
|
|
1318
|
+
let o = t === "_blank";
|
|
1319
|
+
return /* @__PURE__ */ g("a", {
|
|
1320
|
+
ref: e,
|
|
1321
|
+
target: t,
|
|
1322
|
+
rel: o ? n ?? "noopener noreferrer" : n,
|
|
1323
|
+
className: y(_t.link, r),
|
|
1324
|
+
...a,
|
|
1325
|
+
children: [i, o ? /* @__PURE__ */ h("svg", {
|
|
1326
|
+
className: _t.icon,
|
|
1327
|
+
viewBox: "0 0 16 16",
|
|
1328
|
+
fill: "none",
|
|
1329
|
+
"aria-hidden": !0,
|
|
1330
|
+
children: /* @__PURE__ */ h("path", {
|
|
1331
|
+
d: "M6 3h7v7M13 3l-8 8",
|
|
1332
|
+
stroke: "currentColor",
|
|
1333
|
+
strokeWidth: "1.6",
|
|
1334
|
+
strokeLinecap: "round",
|
|
1335
|
+
strokeLinejoin: "round"
|
|
1336
|
+
})
|
|
1337
|
+
}) : null]
|
|
1338
|
+
});
|
|
1339
|
+
}
|
|
1340
|
+
vt.displayName = "Link";
|
|
1341
|
+
var yt = {
|
|
880
1342
|
list: "_list_1rhgw_1",
|
|
881
1343
|
ios: "_ios_1rhgw_5"
|
|
882
1344
|
};
|
|
883
1345
|
//#endregion
|
|
884
1346
|
//#region src/components/List/List.tsx
|
|
885
|
-
function
|
|
886
|
-
let { platform: a } =
|
|
887
|
-
return /* @__PURE__ */
|
|
1347
|
+
function bt({ ref: e, Component: t = "div", className: n, children: r, ...i }) {
|
|
1348
|
+
let { platform: a } = F();
|
|
1349
|
+
return /* @__PURE__ */ h(t, {
|
|
888
1350
|
ref: e,
|
|
889
|
-
className:
|
|
1351
|
+
className: y(yt.list, a === "ios" && yt.ios, n),
|
|
890
1352
|
...i,
|
|
891
1353
|
children: r
|
|
892
1354
|
});
|
|
893
1355
|
}
|
|
894
|
-
|
|
1356
|
+
bt.displayName = "List";
|
|
1357
|
+
var xt = {
|
|
1358
|
+
pinInput: "_pinInput_fn21m_1",
|
|
1359
|
+
cell: "_cell_fn21m_6"
|
|
1360
|
+
}, St = {
|
|
1361
|
+
numeric: /[0-9]/,
|
|
1362
|
+
alphanumeric: /[a-z0-9]/i
|
|
1363
|
+
};
|
|
1364
|
+
function Ct({ ref: e, length: t = 4, value: n, defaultValue: r = "", onChange: i, onComplete: a, type: o = "numeric", mask: s = !1, disabled: c = !1, invalid: f = !1, name: p, "aria-label": m = "Verification code", className: g }) {
|
|
1365
|
+
let [_, v] = d(r.slice(0, t)), b = n ?? _, x = l(() => {
|
|
1366
|
+
let e = b.split("").slice(0, t);
|
|
1367
|
+
for (; e.length < t;) e.push("");
|
|
1368
|
+
return e;
|
|
1369
|
+
}, [b, t]), S = u([]), C = St[o], w = (e) => {
|
|
1370
|
+
let r = e.join("");
|
|
1371
|
+
n ?? v(r), i?.(r), r.length === t && e.every(Boolean) && a?.(r);
|
|
1372
|
+
}, T = (e) => {
|
|
1373
|
+
let n = Math.max(0, Math.min(t - 1, e));
|
|
1374
|
+
S.current[n]?.focus(), S.current[n]?.select();
|
|
1375
|
+
}, E = (e, t) => {
|
|
1376
|
+
let n = t.split("").reverse().find((e) => C.test(e));
|
|
1377
|
+
if (!n) return;
|
|
1378
|
+
let r = [...x];
|
|
1379
|
+
r[e] = n, w(r), T(e + 1);
|
|
1380
|
+
}, D = (e, t) => {
|
|
1381
|
+
if (t.key === "Backspace") {
|
|
1382
|
+
t.preventDefault();
|
|
1383
|
+
let n = [...x];
|
|
1384
|
+
n[e] ? (n[e] = "", w(n)) : e > 0 && (n[e - 1] = "", w(n), T(e - 1));
|
|
1385
|
+
} else t.key === "ArrowLeft" ? (t.preventDefault(), T(e - 1)) : t.key === "ArrowRight" && (t.preventDefault(), T(e + 1));
|
|
1386
|
+
}, O = (e, n) => {
|
|
1387
|
+
n.preventDefault();
|
|
1388
|
+
let r = n.clipboardData.getData("text").split("").filter((e) => C.test(e));
|
|
1389
|
+
if (r.length === 0) return;
|
|
1390
|
+
let i = [...x];
|
|
1391
|
+
for (let n = 0; n < r.length && e + n < t; n += 1) i[e + n] = r[n];
|
|
1392
|
+
w(i), T(e + r.length);
|
|
1393
|
+
};
|
|
1394
|
+
return /* @__PURE__ */ h("div", {
|
|
1395
|
+
ref: e,
|
|
1396
|
+
className: y(xt.pinInput, g),
|
|
1397
|
+
role: "group",
|
|
1398
|
+
"aria-label": m,
|
|
1399
|
+
"data-invalid": f || void 0,
|
|
1400
|
+
children: x.map((e, t) => /* @__PURE__ */ h("input", {
|
|
1401
|
+
ref: (e) => {
|
|
1402
|
+
S.current[t] = e;
|
|
1403
|
+
},
|
|
1404
|
+
className: xt.cell,
|
|
1405
|
+
type: s ? "password" : "text",
|
|
1406
|
+
inputMode: o === "numeric" ? "numeric" : "text",
|
|
1407
|
+
autoComplete: t === 0 ? "one-time-code" : "off",
|
|
1408
|
+
name: p ? `${p}-${t}` : void 0,
|
|
1409
|
+
"aria-label": `${m}, digit ${t + 1}`,
|
|
1410
|
+
maxLength: 1,
|
|
1411
|
+
value: e,
|
|
1412
|
+
disabled: c,
|
|
1413
|
+
onChange: (e) => E(t, e.target.value),
|
|
1414
|
+
onKeyDown: (e) => D(t, e),
|
|
1415
|
+
onPaste: (e) => O(t, e),
|
|
1416
|
+
onFocus: (e) => e.target.select()
|
|
1417
|
+
}, t))
|
|
1418
|
+
});
|
|
1419
|
+
}
|
|
1420
|
+
Ct.displayName = "PinInput";
|
|
895
1421
|
//#endregion
|
|
896
1422
|
//#region src/components/Title/Title.module.css
|
|
897
|
-
var
|
|
1423
|
+
var wt = {
|
|
898
1424
|
"level-1": "_level-1_rosk9_1",
|
|
899
1425
|
"level-2": "_level-2_rosk9_6",
|
|
900
1426
|
"level-3": "_level-3_rosk9_11"
|
|
901
|
-
},
|
|
1427
|
+
}, Tt = {
|
|
902
1428
|
1: {
|
|
903
1429
|
tag: "h2",
|
|
904
|
-
className:
|
|
1430
|
+
className: wt["level-1"]
|
|
905
1431
|
},
|
|
906
1432
|
2: {
|
|
907
1433
|
tag: "h3",
|
|
908
|
-
className:
|
|
1434
|
+
className: wt["level-2"]
|
|
909
1435
|
},
|
|
910
1436
|
3: {
|
|
911
1437
|
tag: "h4",
|
|
912
|
-
className:
|
|
1438
|
+
className: wt["level-3"]
|
|
913
1439
|
}
|
|
914
1440
|
};
|
|
915
1441
|
//#endregion
|
|
916
1442
|
//#region src/components/Title/Title.tsx
|
|
917
|
-
function
|
|
918
|
-
let { tag: a, className: o } =
|
|
919
|
-
return /* @__PURE__ */
|
|
1443
|
+
function Et({ ref: e, level: t = "2", Component: n, className: r, ...i }) {
|
|
1444
|
+
let { tag: a, className: o } = Tt[t];
|
|
1445
|
+
return /* @__PURE__ */ h(N, {
|
|
920
1446
|
ref: e,
|
|
921
1447
|
Component: n ?? a,
|
|
922
|
-
className:
|
|
1448
|
+
className: y(o, r),
|
|
923
1449
|
...i
|
|
924
1450
|
});
|
|
925
1451
|
}
|
|
926
|
-
|
|
927
|
-
var
|
|
1452
|
+
Et.displayName = "Title";
|
|
1453
|
+
var Dt = {
|
|
928
1454
|
placeholder: "_placeholder_4t5fq_1",
|
|
929
1455
|
fields: "_fields_4t5fq_13",
|
|
930
1456
|
description: "_description_4t5fq_19"
|
|
931
1457
|
};
|
|
932
1458
|
//#endregion
|
|
933
1459
|
//#region src/components/Placeholder/Placeholder.tsx
|
|
934
|
-
function
|
|
935
|
-
return /* @__PURE__ */
|
|
1460
|
+
function Ot({ ref: e, children: t, header: n, description: r, action: i, className: a, ...o }) {
|
|
1461
|
+
return /* @__PURE__ */ g("section", {
|
|
936
1462
|
ref: e,
|
|
937
|
-
className:
|
|
1463
|
+
className: y(Dt.placeholder, a),
|
|
938
1464
|
...o,
|
|
939
1465
|
children: [
|
|
940
1466
|
t,
|
|
941
|
-
n != null || r != null ? /* @__PURE__ */
|
|
942
|
-
className:
|
|
943
|
-
children: [n == null ? null : /* @__PURE__ */
|
|
1467
|
+
n != null || r != null ? /* @__PURE__ */ g("dl", {
|
|
1468
|
+
className: Dt.fields,
|
|
1469
|
+
children: [n == null ? null : /* @__PURE__ */ h(Et, {
|
|
944
1470
|
Component: "dt",
|
|
945
1471
|
level: "3",
|
|
946
1472
|
weight: "2",
|
|
947
1473
|
children: n
|
|
948
|
-
}), r == null ? null : /* @__PURE__ */
|
|
1474
|
+
}), r == null ? null : /* @__PURE__ */ h(I, {
|
|
949
1475
|
Component: "dd",
|
|
950
|
-
className:
|
|
1476
|
+
className: Dt.description,
|
|
951
1477
|
children: r
|
|
952
1478
|
})]
|
|
953
1479
|
}) : null,
|
|
@@ -955,56 +1481,127 @@ function Je({ ref: e, children: t, header: n, description: r, action: i, classNa
|
|
|
955
1481
|
]
|
|
956
1482
|
});
|
|
957
1483
|
}
|
|
958
|
-
|
|
959
|
-
|
|
1484
|
+
Ot.displayName = "Placeholder";
|
|
1485
|
+
//#endregion
|
|
1486
|
+
//#region src/components/Portal/Portal.tsx
|
|
1487
|
+
function kt({ children: e, container: t }) {
|
|
1488
|
+
let { portalContainer: n } = F(), r = t ?? n;
|
|
1489
|
+
return r ? v(e, r) : null;
|
|
1490
|
+
}
|
|
1491
|
+
kt.displayName = "Portal";
|
|
1492
|
+
var At = {
|
|
960
1493
|
track: "_track_5w1vs_1",
|
|
961
1494
|
bar: "_bar_5w1vs_9"
|
|
962
1495
|
};
|
|
963
1496
|
//#endregion
|
|
964
1497
|
//#region src/components/Progress/Progress.tsx
|
|
965
|
-
function
|
|
1498
|
+
function jt({ ref: e, value: t = 0, className: n, ...r }) {
|
|
966
1499
|
let i = Math.max(0, Math.min(100, t));
|
|
967
|
-
return /* @__PURE__ */
|
|
1500
|
+
return /* @__PURE__ */ h("div", {
|
|
968
1501
|
ref: e,
|
|
969
1502
|
role: "progressbar",
|
|
970
1503
|
"aria-valuemin": 0,
|
|
971
1504
|
"aria-valuemax": 100,
|
|
972
1505
|
"aria-valuenow": Math.round(i),
|
|
973
|
-
className:
|
|
1506
|
+
className: y(At.track, n),
|
|
974
1507
|
...r,
|
|
975
|
-
children: /* @__PURE__ */
|
|
976
|
-
className:
|
|
1508
|
+
children: /* @__PURE__ */ h("div", {
|
|
1509
|
+
className: At.bar,
|
|
977
1510
|
style: { width: `${i}%` }
|
|
978
1511
|
})
|
|
979
1512
|
});
|
|
980
1513
|
}
|
|
981
|
-
|
|
982
|
-
var
|
|
1514
|
+
jt.displayName = "Progress";
|
|
1515
|
+
var Mt = {
|
|
983
1516
|
radio: "_radio_czv9z_1",
|
|
984
1517
|
input: "_input_czv9z_12",
|
|
985
1518
|
dot: "_dot_czv9z_22"
|
|
986
1519
|
};
|
|
987
1520
|
//#endregion
|
|
988
1521
|
//#region src/components/Radio/Radio.tsx
|
|
989
|
-
function
|
|
990
|
-
return /* @__PURE__ */
|
|
991
|
-
className:
|
|
1522
|
+
function Nt({ ref: e, disabled: t, className: n, style: r, ...i }) {
|
|
1523
|
+
return /* @__PURE__ */ g("span", {
|
|
1524
|
+
className: y(Mt.radio, n),
|
|
992
1525
|
style: r,
|
|
993
1526
|
"data-disabled": t || void 0,
|
|
994
|
-
children: [/* @__PURE__ */
|
|
1527
|
+
children: [/* @__PURE__ */ h("input", {
|
|
995
1528
|
ref: e,
|
|
996
1529
|
type: "radio",
|
|
997
|
-
className:
|
|
1530
|
+
className: Mt.input,
|
|
998
1531
|
disabled: t,
|
|
999
1532
|
...i
|
|
1000
|
-
}), /* @__PURE__ */
|
|
1001
|
-
className:
|
|
1533
|
+
}), /* @__PURE__ */ h("span", {
|
|
1534
|
+
className: Mt.dot,
|
|
1002
1535
|
"aria-hidden": !0
|
|
1003
1536
|
})]
|
|
1004
1537
|
});
|
|
1005
1538
|
}
|
|
1006
|
-
|
|
1007
|
-
var
|
|
1539
|
+
Nt.displayName = "Radio";
|
|
1540
|
+
var W = {
|
|
1541
|
+
rating: "_rating_pfqty_1",
|
|
1542
|
+
row: "_row_pfqty_7",
|
|
1543
|
+
empty: "_empty_pfqty_12",
|
|
1544
|
+
fill: "_fill_pfqty_16",
|
|
1545
|
+
star: "_star_pfqty_29",
|
|
1546
|
+
interactive: "_interactive_pfqty_41"
|
|
1547
|
+
}, Pt = /* @__PURE__ */ h("svg", {
|
|
1548
|
+
viewBox: "0 0 24 24",
|
|
1549
|
+
fill: "currentColor",
|
|
1550
|
+
"aria-hidden": !0,
|
|
1551
|
+
children: /* @__PURE__ */ h("path", { d: "M12 2l2.9 6.3 6.9.8-5.1 4.7 1.4 6.8L12 17.8 5.9 20.4l1.4-6.8L2.2 9.1l6.9-.8z" })
|
|
1552
|
+
});
|
|
1553
|
+
function Ft({ ref: e, value: t, defaultValue: n = 0, onChange: r, count: i = 5, readOnly: a = !1, disabled: o = !1, icon: s = Pt, name: c, "aria-label": l = "Rating", className: u }) {
|
|
1554
|
+
let [f, p] = d(n), m = t ?? f, [_, v] = d(null), b = !a && !o, x = Math.max(0, Math.min(1, (_ ?? m) / i)) * 100, S = (e) => {
|
|
1555
|
+
b && (t ?? p(e), r?.(e));
|
|
1556
|
+
}, C = (e) => {
|
|
1557
|
+
b && (e.key === "ArrowRight" || e.key === "ArrowUp" ? (e.preventDefault(), S(Math.min(i, Math.round(m) + 1))) : (e.key === "ArrowLeft" || e.key === "ArrowDown") && (e.preventDefault(), S(Math.max(0, Math.round(m) - 1))));
|
|
1558
|
+
}, w = Array.from({ length: i }, (e, t) => t + 1), T = b ? {
|
|
1559
|
+
onKeyDown: C,
|
|
1560
|
+
onMouseLeave: () => v(null)
|
|
1561
|
+
} : {}, E = b ? "radiogroup" : "img", D = b ? l : `${l}: ${m} out of ${i}`;
|
|
1562
|
+
return /* @__PURE__ */ g("div", {
|
|
1563
|
+
ref: e,
|
|
1564
|
+
className: y(W.rating, b && W.interactive, u),
|
|
1565
|
+
"data-disabled": o || void 0,
|
|
1566
|
+
role: E,
|
|
1567
|
+
"aria-label": D,
|
|
1568
|
+
...T,
|
|
1569
|
+
children: [/* @__PURE__ */ h("div", {
|
|
1570
|
+
className: y(W.row, W.empty),
|
|
1571
|
+
"aria-hidden": !b,
|
|
1572
|
+
children: w.map((e) => b ? /* @__PURE__ */ h("button", {
|
|
1573
|
+
type: "button",
|
|
1574
|
+
role: "radio",
|
|
1575
|
+
"aria-checked": Math.round(m) === e,
|
|
1576
|
+
"aria-label": `${e}`,
|
|
1577
|
+
tabIndex: e === (Math.round(m) || 1) ? 0 : -1,
|
|
1578
|
+
name: c,
|
|
1579
|
+
className: W.star,
|
|
1580
|
+
onClick: () => S(e),
|
|
1581
|
+
onMouseEnter: () => v(e),
|
|
1582
|
+
onFocus: () => v(e),
|
|
1583
|
+
onBlur: () => v(null),
|
|
1584
|
+
children: s
|
|
1585
|
+
}, e) : /* @__PURE__ */ h("span", {
|
|
1586
|
+
className: W.star,
|
|
1587
|
+
children: s
|
|
1588
|
+
}, e))
|
|
1589
|
+
}), /* @__PURE__ */ h("div", {
|
|
1590
|
+
className: W.fill,
|
|
1591
|
+
style: { clipPath: `inset(0 ${100 - x}% 0 0)` },
|
|
1592
|
+
"aria-hidden": !0,
|
|
1593
|
+
children: /* @__PURE__ */ h("div", {
|
|
1594
|
+
className: W.row,
|
|
1595
|
+
children: w.map((e) => /* @__PURE__ */ h("span", {
|
|
1596
|
+
className: W.star,
|
|
1597
|
+
children: s
|
|
1598
|
+
}, e))
|
|
1599
|
+
})
|
|
1600
|
+
})]
|
|
1601
|
+
});
|
|
1602
|
+
}
|
|
1603
|
+
Ft.displayName = "Rating";
|
|
1604
|
+
var G = {
|
|
1008
1605
|
body: "_body_1o4ef_1",
|
|
1009
1606
|
sectionBase: "_sectionBase_1o4ef_6",
|
|
1010
1607
|
bodyWithHeader: "_bodyWithHeader_1o4ef_6",
|
|
@@ -1019,86 +1616,153 @@ var q = {
|
|
|
1019
1616
|
};
|
|
1020
1617
|
//#endregion
|
|
1021
1618
|
//#region src/components/Section/SectionFooter.tsx
|
|
1022
|
-
function
|
|
1023
|
-
return e ? /* @__PURE__ */
|
|
1024
|
-
className:
|
|
1619
|
+
function It({ ios: e, children: t }) {
|
|
1620
|
+
return e ? /* @__PURE__ */ h(R, {
|
|
1621
|
+
className: G.footerText,
|
|
1025
1622
|
children: t
|
|
1026
|
-
}) : /* @__PURE__ */
|
|
1623
|
+
}) : /* @__PURE__ */ h(P, {
|
|
1027
1624
|
level: "2",
|
|
1028
|
-
className:
|
|
1625
|
+
className: G.footerText,
|
|
1029
1626
|
children: t
|
|
1030
1627
|
});
|
|
1031
1628
|
}
|
|
1032
|
-
function
|
|
1033
|
-
let { platform: a } =
|
|
1034
|
-
return /* @__PURE__ */
|
|
1629
|
+
function Lt({ ref: e, centered: t = !1, className: n, children: r, ...i }) {
|
|
1630
|
+
let { platform: a } = F(), o = a === "ios";
|
|
1631
|
+
return /* @__PURE__ */ h("footer", {
|
|
1035
1632
|
ref: e,
|
|
1036
|
-
className:
|
|
1633
|
+
className: y(G.footer, o && G.footerIos, t && G.footerCentered, n),
|
|
1037
1634
|
...i,
|
|
1038
|
-
children: /* @__PURE__ */
|
|
1635
|
+
children: /* @__PURE__ */ h(It, {
|
|
1039
1636
|
ios: o,
|
|
1040
1637
|
children: r
|
|
1041
1638
|
})
|
|
1042
1639
|
});
|
|
1043
1640
|
}
|
|
1044
|
-
|
|
1641
|
+
Lt.displayName = "SectionFooter";
|
|
1045
1642
|
//#endregion
|
|
1046
1643
|
//#region src/components/Section/SectionHeader.tsx
|
|
1047
|
-
function
|
|
1048
|
-
return t ? e ? /* @__PURE__ */
|
|
1644
|
+
function Rt({ ios: e, large: t, children: n }) {
|
|
1645
|
+
return t ? e ? /* @__PURE__ */ h(P, {
|
|
1049
1646
|
Component: "h2",
|
|
1050
1647
|
level: "1",
|
|
1051
1648
|
weight: "2",
|
|
1052
1649
|
children: n
|
|
1053
|
-
}) : /* @__PURE__ */
|
|
1650
|
+
}) : /* @__PURE__ */ h(I, {
|
|
1054
1651
|
Component: "h2",
|
|
1055
1652
|
weight: "2",
|
|
1056
1653
|
children: n
|
|
1057
|
-
}) : e ? /* @__PURE__ */
|
|
1654
|
+
}) : e ? /* @__PURE__ */ h(R, {
|
|
1058
1655
|
Component: "h2",
|
|
1059
1656
|
caps: !0,
|
|
1060
1657
|
children: n
|
|
1061
|
-
}) : /* @__PURE__ */
|
|
1658
|
+
}) : /* @__PURE__ */ h(P, {
|
|
1062
1659
|
Component: "h2",
|
|
1063
1660
|
level: "2",
|
|
1064
1661
|
weight: "2",
|
|
1065
1662
|
children: n
|
|
1066
1663
|
});
|
|
1067
1664
|
}
|
|
1068
|
-
function
|
|
1069
|
-
let { platform: a } =
|
|
1070
|
-
return /* @__PURE__ */
|
|
1665
|
+
function zt({ ref: e, large: t = !1, className: n, children: r, ...i }) {
|
|
1666
|
+
let { platform: a } = F(), o = a === "ios";
|
|
1667
|
+
return /* @__PURE__ */ h("header", {
|
|
1071
1668
|
ref: e,
|
|
1072
|
-
className:
|
|
1669
|
+
className: y(G.header, o && G.headerIos, t && G.headerLarge, n),
|
|
1073
1670
|
...i,
|
|
1074
|
-
children: /* @__PURE__ */
|
|
1671
|
+
children: /* @__PURE__ */ h(Rt, {
|
|
1075
1672
|
ios: o,
|
|
1076
1673
|
large: t,
|
|
1077
1674
|
children: r
|
|
1078
1675
|
})
|
|
1079
1676
|
});
|
|
1080
1677
|
}
|
|
1081
|
-
|
|
1678
|
+
zt.displayName = "SectionHeader";
|
|
1082
1679
|
//#endregion
|
|
1083
1680
|
//#region src/components/Section/Section.tsx
|
|
1084
|
-
var
|
|
1085
|
-
function
|
|
1086
|
-
let { platform: l } =
|
|
1087
|
-
return /* @__PURE__ */
|
|
1681
|
+
var Bt = (e) => typeof e == "string" || typeof e == "number";
|
|
1682
|
+
function Vt({ ref: n, header: i, footer: a, className: o, children: s, ...c }) {
|
|
1683
|
+
let { platform: l } = F(), u = e.toArray(s);
|
|
1684
|
+
return /* @__PURE__ */ g("section", {
|
|
1088
1685
|
ref: n,
|
|
1089
|
-
className:
|
|
1686
|
+
className: y(l === "ios" ? G.sectionIos : G.sectionBase, o),
|
|
1090
1687
|
...c,
|
|
1091
|
-
children: [/* @__PURE__ */
|
|
1092
|
-
className:
|
|
1093
|
-
children: [
|
|
1094
|
-
className:
|
|
1095
|
-
children: u.map((e, n) => /* @__PURE__ */
|
|
1688
|
+
children: [/* @__PURE__ */ g("div", {
|
|
1689
|
+
className: G.bodyWithHeader,
|
|
1690
|
+
children: [Bt(i) ? /* @__PURE__ */ h(zt, { children: i }) : i, /* @__PURE__ */ h("div", {
|
|
1691
|
+
className: G.body,
|
|
1692
|
+
children: u.map((e, n) => /* @__PURE__ */ g(t, { children: [e, n < u.length - 1 ? /* @__PURE__ */ h(et, {}) : null] }, r(e) ? e.key : n))
|
|
1096
1693
|
})]
|
|
1097
|
-
}),
|
|
1694
|
+
}), Bt(a) ? /* @__PURE__ */ h(Lt, { children: a }) : a]
|
|
1695
|
+
});
|
|
1696
|
+
}
|
|
1697
|
+
Vt.displayName = "Section", Vt.Header = zt, Vt.Footer = Lt;
|
|
1698
|
+
var Ht = {
|
|
1699
|
+
control: "_control_1uo8p_1",
|
|
1700
|
+
pill: "_pill_1uo8p_10",
|
|
1701
|
+
item: "_item_1uo8p_28"
|
|
1702
|
+
};
|
|
1703
|
+
//#endregion
|
|
1704
|
+
//#region src/components/SegmentedControl/SegmentedControl.tsx
|
|
1705
|
+
function Ut({ ref: e, className: t, children: n, onKeyDown: r, ...a }) {
|
|
1706
|
+
let s = u(null), [l, f] = d(null), p = i(() => {
|
|
1707
|
+
let e = s.current;
|
|
1708
|
+
if (!e) return;
|
|
1709
|
+
let t = e.querySelector("[role=\"radio\"][data-selected]"), n = t ? {
|
|
1710
|
+
left: t.offsetLeft,
|
|
1711
|
+
width: t.offsetWidth
|
|
1712
|
+
} : null;
|
|
1713
|
+
f((e) => e === n || e && n && e.left === n.left && e.width === n.width ? e : n);
|
|
1714
|
+
}, []);
|
|
1715
|
+
c(p), o(() => {
|
|
1716
|
+
let e = s.current;
|
|
1717
|
+
if (!e || typeof ResizeObserver > "u") return;
|
|
1718
|
+
let t = new ResizeObserver(p);
|
|
1719
|
+
return t.observe(e), () => t.disconnect();
|
|
1720
|
+
}, [p]);
|
|
1721
|
+
let m = i((t) => {
|
|
1722
|
+
s.current = t, typeof e == "function" ? e(t) : e && (e.current = t);
|
|
1723
|
+
}, [e]);
|
|
1724
|
+
return /* @__PURE__ */ g("div", {
|
|
1725
|
+
ref: m,
|
|
1726
|
+
role: "radiogroup",
|
|
1727
|
+
className: y(Ht.control, t),
|
|
1728
|
+
onKeyDown: (e) => {
|
|
1729
|
+
if (r?.(e), e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
|
|
1730
|
+
let t = s.current;
|
|
1731
|
+
if (!t) return;
|
|
1732
|
+
let n = Array.from(t.querySelectorAll("[role=\"radio\"]:not(:disabled)")), i = n.indexOf(document.activeElement);
|
|
1733
|
+
if (i < 0) return;
|
|
1734
|
+
e.preventDefault();
|
|
1735
|
+
let a = n[(i + (e.key === "ArrowRight" ? 1 : -1) + n.length) % n.length];
|
|
1736
|
+
a.focus(), a.click();
|
|
1737
|
+
},
|
|
1738
|
+
...a,
|
|
1739
|
+
children: [/* @__PURE__ */ h("div", {
|
|
1740
|
+
className: Ht.pill,
|
|
1741
|
+
style: l ? {
|
|
1742
|
+
transform: `translateX(${l.left}px)`,
|
|
1743
|
+
width: l.width
|
|
1744
|
+
} : { opacity: 0 },
|
|
1745
|
+
"aria-hidden": !0
|
|
1746
|
+
}), n]
|
|
1098
1747
|
});
|
|
1099
1748
|
}
|
|
1100
|
-
|
|
1101
|
-
|
|
1749
|
+
Ut.displayName = "SegmentedControl";
|
|
1750
|
+
//#endregion
|
|
1751
|
+
//#region src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
1752
|
+
function Wt({ ref: e, selected: t = !1, className: n, ...r }) {
|
|
1753
|
+
return /* @__PURE__ */ h("button", {
|
|
1754
|
+
ref: e,
|
|
1755
|
+
type: "button",
|
|
1756
|
+
role: "radio",
|
|
1757
|
+
"aria-checked": t,
|
|
1758
|
+
tabIndex: t ? 0 : -1,
|
|
1759
|
+
"data-selected": t || void 0,
|
|
1760
|
+
className: y(Ht.item, n),
|
|
1761
|
+
...r
|
|
1762
|
+
});
|
|
1763
|
+
}
|
|
1764
|
+
Wt.displayName = "SegmentedControlItem";
|
|
1765
|
+
var K = {
|
|
1102
1766
|
base: "_base_yxki5_1",
|
|
1103
1767
|
row: "_row_yxki5_7",
|
|
1104
1768
|
ios: "_ios_yxki5_17",
|
|
@@ -1111,55 +1775,593 @@ var Z = {
|
|
|
1111
1775
|
};
|
|
1112
1776
|
//#endregion
|
|
1113
1777
|
//#region src/components/Select/Select.tsx
|
|
1114
|
-
function
|
|
1115
|
-
let { platform:
|
|
1116
|
-
return /* @__PURE__ */
|
|
1117
|
-
className:
|
|
1778
|
+
function Gt({ ref: e, header: t, status: n, disabled: r, className: i, onFocus: a, onBlur: o, children: s, ...c }) {
|
|
1779
|
+
let { platform: l } = F(), u = l === "ios", [f, p] = d(!1), m = n ?? (f ? "focused" : "default"), _ = u ? I : P;
|
|
1780
|
+
return /* @__PURE__ */ g("div", {
|
|
1781
|
+
className: y(u ? K.ios : K.base, m === "error" && K.error, m === "focused" && K.focused, r && K.disabled, i),
|
|
1118
1782
|
"aria-disabled": r || void 0,
|
|
1119
|
-
children: [/* @__PURE__ */
|
|
1120
|
-
className:
|
|
1121
|
-
children: [/* @__PURE__ */
|
|
1783
|
+
children: [/* @__PURE__ */ g("div", {
|
|
1784
|
+
className: K.row,
|
|
1785
|
+
children: [/* @__PURE__ */ h(_, {
|
|
1122
1786
|
ref: e,
|
|
1123
1787
|
Component: "select",
|
|
1124
|
-
className:
|
|
1788
|
+
className: K.select,
|
|
1125
1789
|
disabled: r,
|
|
1126
1790
|
onFocus: (e) => {
|
|
1127
|
-
r ||
|
|
1791
|
+
r || p(!0), a?.(e);
|
|
1128
1792
|
},
|
|
1129
1793
|
onBlur: (e) => {
|
|
1130
|
-
|
|
1794
|
+
p(!1), o?.(e);
|
|
1131
1795
|
},
|
|
1132
1796
|
...c,
|
|
1133
1797
|
children: s
|
|
1134
|
-
}), /* @__PURE__ */
|
|
1798
|
+
}), /* @__PURE__ */ h("span", {
|
|
1135
1799
|
"aria-hidden": !0,
|
|
1136
|
-
className:
|
|
1800
|
+
className: K.chevron
|
|
1137
1801
|
})]
|
|
1138
|
-
}), t != null && !
|
|
1139
|
-
className:
|
|
1802
|
+
}), t != null && !u ? /* @__PURE__ */ h("span", {
|
|
1803
|
+
className: K.header,
|
|
1140
1804
|
children: t
|
|
1141
1805
|
}) : null]
|
|
1142
1806
|
});
|
|
1143
1807
|
}
|
|
1144
|
-
|
|
1145
|
-
|
|
1808
|
+
Gt.displayName = "Select";
|
|
1809
|
+
//#endregion
|
|
1810
|
+
//#region src/shared/lib/useReducedMotion.ts
|
|
1811
|
+
var Kt = "(prefers-reduced-motion: reduce)";
|
|
1812
|
+
function qt(e) {
|
|
1813
|
+
if (typeof window > "u" || !window.matchMedia) return () => {};
|
|
1814
|
+
let t = window.matchMedia(Kt);
|
|
1815
|
+
return t.addEventListener("change", e), () => t.removeEventListener("change", e);
|
|
1816
|
+
}
|
|
1817
|
+
function Jt() {
|
|
1818
|
+
return typeof window > "u" || !window.matchMedia ? !1 : window.matchMedia(Kt).matches;
|
|
1819
|
+
}
|
|
1820
|
+
function Yt() {
|
|
1821
|
+
return f(qt, Jt, () => !1);
|
|
1822
|
+
}
|
|
1823
|
+
var q = {
|
|
1824
|
+
backdrop: "_backdrop_a10cl_1",
|
|
1825
|
+
"backdrop--contained": "_backdrop--contained_a10cl_12",
|
|
1826
|
+
"backdrop--visible": "_backdrop--visible_a10cl_16",
|
|
1827
|
+
panel: "_panel_a10cl_20",
|
|
1828
|
+
"panel--visible": "_panel--visible_a10cl_37",
|
|
1829
|
+
grip: "_grip_a10cl_67",
|
|
1830
|
+
handle: "_handle_a10cl_76",
|
|
1831
|
+
header: "_header_a10cl_84",
|
|
1832
|
+
title: "_title_a10cl_95",
|
|
1833
|
+
close: "_close_a10cl_100",
|
|
1834
|
+
body: "_body_a10cl_105"
|
|
1835
|
+
}, Xt = 340, Zt = 6, Qt = 96, $t = .5;
|
|
1836
|
+
function en(e) {
|
|
1837
|
+
return Array.from(e.querySelectorAll("a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex=\"-1\"])")).filter((e) => e.offsetParent !== null || e === document.activeElement);
|
|
1838
|
+
}
|
|
1839
|
+
function tn({ ref: e, open: t, onClose: n, header: r, children: a, dismissable: s = !0, closeLabel: c = "Close", className: l, container: f }) {
|
|
1840
|
+
let p = Yt(), m = f != null, [_, v] = d(t), [b, x] = d(!1), S = u(null), C = u(null), w = u({
|
|
1841
|
+
id: -1,
|
|
1842
|
+
active: !1,
|
|
1843
|
+
startY: 0,
|
|
1844
|
+
lastY: 0,
|
|
1845
|
+
lastT: 0,
|
|
1846
|
+
velocity: 0
|
|
1847
|
+
});
|
|
1848
|
+
o(() => {
|
|
1849
|
+
if (t) {
|
|
1850
|
+
v(!0);
|
|
1851
|
+
return;
|
|
1852
|
+
}
|
|
1853
|
+
if (x(!1), p) {
|
|
1854
|
+
v(!1);
|
|
1855
|
+
return;
|
|
1856
|
+
}
|
|
1857
|
+
let e = setTimeout(() => v(!1), Xt);
|
|
1858
|
+
return () => clearTimeout(e);
|
|
1859
|
+
}, [t, p]), o(() => {
|
|
1860
|
+
if (!_ || !t) return;
|
|
1861
|
+
let e = S.current;
|
|
1862
|
+
e && (e.offsetHeight, x(!0));
|
|
1863
|
+
}, [_, t]), o(() => {
|
|
1864
|
+
if (!_) return;
|
|
1865
|
+
C.current = document.activeElement;
|
|
1866
|
+
let { body: e, documentElement: t } = document, n = {
|
|
1867
|
+
overflow: e.style.overflow,
|
|
1868
|
+
paddingRight: e.style.paddingRight
|
|
1869
|
+
};
|
|
1870
|
+
if (!m) {
|
|
1871
|
+
let n = window.innerWidth - t.clientWidth;
|
|
1872
|
+
e.style.overflow = "hidden", n > 0 && (e.style.paddingRight = `${n}px`);
|
|
1873
|
+
}
|
|
1874
|
+
let r = requestAnimationFrame(() => S.current?.focus({ preventScroll: !0 }));
|
|
1875
|
+
return () => {
|
|
1876
|
+
cancelAnimationFrame(r), e.style.overflow = n.overflow, e.style.paddingRight = n.paddingRight, C.current?.focus?.({ preventScroll: !0 });
|
|
1877
|
+
};
|
|
1878
|
+
}, [_, m]), o(() => {
|
|
1879
|
+
if (!_) return;
|
|
1880
|
+
let e = (e) => {
|
|
1881
|
+
e.key === "Escape" && s && (e.stopPropagation(), n());
|
|
1882
|
+
};
|
|
1883
|
+
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
1884
|
+
}, [
|
|
1885
|
+
_,
|
|
1886
|
+
s,
|
|
1887
|
+
n
|
|
1888
|
+
]);
|
|
1889
|
+
let T = i((e) => {
|
|
1890
|
+
if (e.key !== "Tab" || !S.current) return;
|
|
1891
|
+
let t = en(S.current);
|
|
1892
|
+
if (t.length === 0) {
|
|
1893
|
+
e.preventDefault(), S.current.focus();
|
|
1894
|
+
return;
|
|
1895
|
+
}
|
|
1896
|
+
let n = t[0], r = t[t.length - 1], i = document.activeElement;
|
|
1897
|
+
e.shiftKey && (i === n || i === S.current) ? (e.preventDefault(), r.focus()) : !e.shiftKey && i === r && (e.preventDefault(), n.focus());
|
|
1898
|
+
}, []), E = (e) => {
|
|
1899
|
+
!s || e.button !== 0 || p || e.target.closest("button") || (w.current = {
|
|
1900
|
+
id: e.pointerId,
|
|
1901
|
+
active: !1,
|
|
1902
|
+
startY: e.clientY,
|
|
1903
|
+
lastY: e.clientY,
|
|
1904
|
+
lastT: e.timeStamp,
|
|
1905
|
+
velocity: 0
|
|
1906
|
+
});
|
|
1907
|
+
}, D = (e) => {
|
|
1908
|
+
let t = w.current;
|
|
1909
|
+
if (t.id !== e.pointerId) return;
|
|
1910
|
+
let n = e.clientY - t.startY;
|
|
1911
|
+
if (!t.active) {
|
|
1912
|
+
if (n < Zt) return;
|
|
1913
|
+
t.active = !0, e.currentTarget.setPointerCapture(e.pointerId), S.current && (S.current.style.transition = "none");
|
|
1914
|
+
}
|
|
1915
|
+
let r = e.timeStamp - t.lastT;
|
|
1916
|
+
if (r >= 1) {
|
|
1917
|
+
let n = (e.clientY - t.lastY) / r;
|
|
1918
|
+
t.velocity = t.velocity * .6 + n * .4, t.lastY = e.clientY, t.lastT = e.timeStamp;
|
|
1919
|
+
}
|
|
1920
|
+
S.current && (S.current.style.transform = `translateY(${Math.max(0, n)}px)`);
|
|
1921
|
+
}, O = (e) => {
|
|
1922
|
+
let t = w.current;
|
|
1923
|
+
if (t.id !== e.pointerId || (w.current = {
|
|
1924
|
+
...t,
|
|
1925
|
+
id: -1,
|
|
1926
|
+
active: !1
|
|
1927
|
+
}, !t.active)) return;
|
|
1928
|
+
e.currentTarget.releasePointerCapture?.(e.pointerId);
|
|
1929
|
+
let r = S.current, i = e.clientY - t.startY > Qt || t.velocity > $t;
|
|
1930
|
+
r && (r.style.transition = "", r.getBoundingClientRect(), r.style.transform = ""), i && (x(!1), n());
|
|
1931
|
+
};
|
|
1932
|
+
if (!_) return null;
|
|
1933
|
+
let k = b && t;
|
|
1934
|
+
return /* @__PURE__ */ h(kt, {
|
|
1935
|
+
container: f,
|
|
1936
|
+
children: /* @__PURE__ */ h("div", {
|
|
1937
|
+
ref: e,
|
|
1938
|
+
className: y(q.backdrop, m && q["backdrop--contained"], k && q["backdrop--visible"]),
|
|
1939
|
+
onPointerDown: (e) => {
|
|
1940
|
+
e.target === e.currentTarget && s && n();
|
|
1941
|
+
},
|
|
1942
|
+
children: /* @__PURE__ */ g("div", {
|
|
1943
|
+
ref: S,
|
|
1944
|
+
role: "dialog",
|
|
1945
|
+
"aria-modal": "true",
|
|
1946
|
+
tabIndex: -1,
|
|
1947
|
+
className: y(q.panel, k && q["panel--visible"], l),
|
|
1948
|
+
onKeyDown: T,
|
|
1949
|
+
children: [/* @__PURE__ */ g("div", {
|
|
1950
|
+
className: q.grip,
|
|
1951
|
+
onPointerDown: E,
|
|
1952
|
+
onPointerMove: D,
|
|
1953
|
+
onPointerUp: O,
|
|
1954
|
+
onPointerCancel: O,
|
|
1955
|
+
children: [s ? /* @__PURE__ */ h("span", {
|
|
1956
|
+
className: q.handle,
|
|
1957
|
+
"aria-hidden": !0
|
|
1958
|
+
}) : null, r == null ? null : /* @__PURE__ */ g("div", {
|
|
1959
|
+
className: q.header,
|
|
1960
|
+
children: [/* @__PURE__ */ h("div", {
|
|
1961
|
+
className: q.title,
|
|
1962
|
+
children: r
|
|
1963
|
+
}), s ? /* @__PURE__ */ h(ct, {
|
|
1964
|
+
mode: "gray",
|
|
1965
|
+
size: "s",
|
|
1966
|
+
circle: !0,
|
|
1967
|
+
className: q.close,
|
|
1968
|
+
"aria-label": c,
|
|
1969
|
+
onClick: n,
|
|
1970
|
+
children: /* @__PURE__ */ h("svg", {
|
|
1971
|
+
width: "16",
|
|
1972
|
+
height: "16",
|
|
1973
|
+
viewBox: "0 0 16 16",
|
|
1974
|
+
"aria-hidden": !0,
|
|
1975
|
+
children: /* @__PURE__ */ h("path", {
|
|
1976
|
+
d: "M4 4l8 8M12 4l-8 8",
|
|
1977
|
+
stroke: "currentColor",
|
|
1978
|
+
strokeWidth: "1.6",
|
|
1979
|
+
strokeLinecap: "round"
|
|
1980
|
+
})
|
|
1981
|
+
})
|
|
1982
|
+
}) : null]
|
|
1983
|
+
})]
|
|
1984
|
+
}), /* @__PURE__ */ h("div", {
|
|
1985
|
+
className: q.body,
|
|
1986
|
+
children: a
|
|
1987
|
+
})]
|
|
1988
|
+
})
|
|
1989
|
+
})
|
|
1990
|
+
});
|
|
1991
|
+
}
|
|
1992
|
+
tn.displayName = "Sheet";
|
|
1993
|
+
var nn = {
|
|
1146
1994
|
skeleton: "_skeleton_197j4_1",
|
|
1147
1995
|
visible: "_visible_197j4_5",
|
|
1148
1996
|
"tgui-skeleton": "_tgui-skeleton_197j4_1"
|
|
1149
1997
|
};
|
|
1150
1998
|
//#endregion
|
|
1151
1999
|
//#region src/components/Skeleton/Skeleton.tsx
|
|
1152
|
-
function
|
|
1153
|
-
return /* @__PURE__ */
|
|
2000
|
+
function rn({ ref: e, visible: t = !0, className: n, children: r, ...i }) {
|
|
2001
|
+
return /* @__PURE__ */ h("div", {
|
|
1154
2002
|
ref: e,
|
|
1155
2003
|
"aria-hidden": t || void 0,
|
|
1156
|
-
className:
|
|
2004
|
+
className: y(nn.skeleton, t && nn.visible, n),
|
|
1157
2005
|
...i,
|
|
1158
2006
|
children: r
|
|
1159
2007
|
});
|
|
1160
2008
|
}
|
|
1161
|
-
|
|
1162
|
-
var
|
|
2009
|
+
rn.displayName = "Skeleton";
|
|
2010
|
+
var J = {
|
|
2011
|
+
slider: "_slider_avyl5_1",
|
|
2012
|
+
track: "_track_avyl5_8",
|
|
2013
|
+
rail: "_rail_avyl5_16",
|
|
2014
|
+
fill: "_fill_avyl5_25",
|
|
2015
|
+
input: "_input_avyl5_39",
|
|
2016
|
+
side: "_side_avyl5_98"
|
|
2017
|
+
};
|
|
2018
|
+
//#endregion
|
|
2019
|
+
//#region src/components/Slider/Slider.tsx
|
|
2020
|
+
function an({ ref: e, value: t, defaultValue: n, onChange: r, min: i = 0, max: a = 100, step: o = 1, before: s, after: c, disabled: l, className: u, ...f }) {
|
|
2021
|
+
let [p, m] = d(n ?? i), _ = t ?? p, v = a > i ? (_ - i) / (a - i) * 100 : 0;
|
|
2022
|
+
return /* @__PURE__ */ g("div", {
|
|
2023
|
+
className: y(J.slider, u),
|
|
2024
|
+
"data-disabled": l || void 0,
|
|
2025
|
+
children: [
|
|
2026
|
+
s == null ? null : /* @__PURE__ */ h("span", {
|
|
2027
|
+
className: J.side,
|
|
2028
|
+
children: s
|
|
2029
|
+
}),
|
|
2030
|
+
/* @__PURE__ */ g("span", {
|
|
2031
|
+
className: J.track,
|
|
2032
|
+
children: [
|
|
2033
|
+
/* @__PURE__ */ h("span", { className: J.rail }),
|
|
2034
|
+
/* @__PURE__ */ h("span", {
|
|
2035
|
+
className: J.fill,
|
|
2036
|
+
style: { width: `${Math.max(0, Math.min(100, v))}%` }
|
|
2037
|
+
}),
|
|
2038
|
+
/* @__PURE__ */ h("input", {
|
|
2039
|
+
ref: e,
|
|
2040
|
+
type: "range",
|
|
2041
|
+
className: J.input,
|
|
2042
|
+
min: i,
|
|
2043
|
+
max: a,
|
|
2044
|
+
step: o,
|
|
2045
|
+
value: _,
|
|
2046
|
+
disabled: l,
|
|
2047
|
+
onChange: (e) => {
|
|
2048
|
+
let n = Number(e.target.value);
|
|
2049
|
+
t ?? m(n), r?.(n);
|
|
2050
|
+
},
|
|
2051
|
+
...f
|
|
2052
|
+
})
|
|
2053
|
+
]
|
|
2054
|
+
}),
|
|
2055
|
+
c == null ? null : /* @__PURE__ */ h("span", {
|
|
2056
|
+
className: J.side,
|
|
2057
|
+
children: c
|
|
2058
|
+
})
|
|
2059
|
+
]
|
|
2060
|
+
});
|
|
2061
|
+
}
|
|
2062
|
+
an.displayName = "Slider";
|
|
2063
|
+
//#endregion
|
|
2064
|
+
//#region src/components/Snackbar/context.ts
|
|
2065
|
+
var on = n(null);
|
|
2066
|
+
on.displayName = "SnackbarContext";
|
|
2067
|
+
var Y = {
|
|
2068
|
+
viewport: "_viewport_1rbuf_1",
|
|
2069
|
+
snackbar: "_snackbar_1rbuf_19",
|
|
2070
|
+
"snackbar--visible": "_snackbar--visible_1rbuf_37",
|
|
2071
|
+
"snackbar--dragging": "_snackbar--dragging_1rbuf_50",
|
|
2072
|
+
before: "_before_1rbuf_54",
|
|
2073
|
+
body: "_body_1rbuf_60",
|
|
2074
|
+
message: "_message_1rbuf_69",
|
|
2075
|
+
description: "_description_1rbuf_74",
|
|
2076
|
+
action: "_action_1rbuf_80"
|
|
2077
|
+
}, sn = 240, cn = 80;
|
|
2078
|
+
function ln({ children: e, duration: t = 4e3, max: n = 3 }) {
|
|
2079
|
+
let [r, a] = d([]), o = u(0), s = i((e) => {
|
|
2080
|
+
a((t) => t.filter((t) => t.id !== e));
|
|
2081
|
+
}, []), c = i((e) => {
|
|
2082
|
+
let t = `snackbar-${o.current++}`;
|
|
2083
|
+
return a((r) => [...r, {
|
|
2084
|
+
...e,
|
|
2085
|
+
id: t
|
|
2086
|
+
}].slice(-n)), t;
|
|
2087
|
+
}, [n]), f = l(() => ({
|
|
2088
|
+
show: c,
|
|
2089
|
+
dismiss: s
|
|
2090
|
+
}), [c, s]);
|
|
2091
|
+
return /* @__PURE__ */ g(on.Provider, {
|
|
2092
|
+
value: f,
|
|
2093
|
+
children: [e, r.length > 0 ? /* @__PURE__ */ h(kt, { children: /* @__PURE__ */ h("div", {
|
|
2094
|
+
className: Y.viewport,
|
|
2095
|
+
children: r.map((e) => /* @__PURE__ */ h(un, {
|
|
2096
|
+
item: e,
|
|
2097
|
+
defaultDuration: t,
|
|
2098
|
+
onDismiss: () => s(e.id)
|
|
2099
|
+
}, e.id))
|
|
2100
|
+
}) }) : null]
|
|
2101
|
+
});
|
|
2102
|
+
}
|
|
2103
|
+
ln.displayName = "SnackbarProvider";
|
|
2104
|
+
function un({ item: e, defaultDuration: t, onDismiss: n }) {
|
|
2105
|
+
let r = Yt(), [a, s] = d(!1), [l, f] = d(!1), p = u(null), m = e.duration ?? t, _ = u(m), v = u(0), b = u(null), x = u({
|
|
2106
|
+
id: -1,
|
|
2107
|
+
startX: 0,
|
|
2108
|
+
active: !1
|
|
2109
|
+
});
|
|
2110
|
+
c(() => {
|
|
2111
|
+
let e = p.current;
|
|
2112
|
+
e && e.offsetHeight, s(!0);
|
|
2113
|
+
}, []);
|
|
2114
|
+
let S = i(() => {
|
|
2115
|
+
if (f(!0), s(!1), r) {
|
|
2116
|
+
n();
|
|
2117
|
+
return;
|
|
2118
|
+
}
|
|
2119
|
+
let e = setTimeout(n, sn);
|
|
2120
|
+
return () => clearTimeout(e);
|
|
2121
|
+
}, [r, n]), C = i(() => {
|
|
2122
|
+
b.current && (clearTimeout(b.current), b.current = null, _.current -= Date.now() - v.current);
|
|
2123
|
+
}, []), w = i(() => {
|
|
2124
|
+
m <= 0 || l || b.current || (v.current = Date.now(), b.current = setTimeout(() => S(), Math.max(0, _.current)));
|
|
2125
|
+
}, [
|
|
2126
|
+
m,
|
|
2127
|
+
l,
|
|
2128
|
+
S
|
|
2129
|
+
]);
|
|
2130
|
+
o(() => (w(), C), [w, C]);
|
|
2131
|
+
let T = (e) => {
|
|
2132
|
+
e.button === 0 && (x.current = {
|
|
2133
|
+
id: e.pointerId,
|
|
2134
|
+
startX: e.clientX,
|
|
2135
|
+
active: !1
|
|
2136
|
+
}, C());
|
|
2137
|
+
}, E = (e) => {
|
|
2138
|
+
let t = x.current;
|
|
2139
|
+
if (t.id !== e.pointerId) return;
|
|
2140
|
+
let n = e.clientX - t.startX;
|
|
2141
|
+
if (!t.active) {
|
|
2142
|
+
if (Math.abs(n) < 6) return;
|
|
2143
|
+
t.active = !0, e.currentTarget.setPointerCapture(e.pointerId), p.current?.classList.add(Y["snackbar--dragging"]);
|
|
2144
|
+
}
|
|
2145
|
+
p.current && (p.current.style.transform = `translateX(${n}px)`, p.current.style.opacity = `${Math.max(0, 1 - Math.abs(n) / 240)}`);
|
|
2146
|
+
}, D = (e) => {
|
|
2147
|
+
let t = x.current;
|
|
2148
|
+
if (t.id !== e.pointerId) return;
|
|
2149
|
+
x.current = {
|
|
2150
|
+
id: -1,
|
|
2151
|
+
startX: 0,
|
|
2152
|
+
active: !1
|
|
2153
|
+
};
|
|
2154
|
+
let i = p.current;
|
|
2155
|
+
if (!i) return;
|
|
2156
|
+
i.classList.remove(Y["snackbar--dragging"]);
|
|
2157
|
+
let a = e.clientX - t.startX;
|
|
2158
|
+
if (t.active && Math.abs(a) > cn) {
|
|
2159
|
+
if (r) {
|
|
2160
|
+
n();
|
|
2161
|
+
return;
|
|
2162
|
+
}
|
|
2163
|
+
i.style.transition = "transform 0.2s ease-out, opacity 0.2s ease-out", i.style.transform = `translateX(${Math.sign(a) * (window.innerWidth || 400)}px)`, i.style.opacity = "0", setTimeout(n, 190);
|
|
2164
|
+
return;
|
|
2165
|
+
}
|
|
2166
|
+
i.style.transform = "", i.style.opacity = "", w();
|
|
2167
|
+
};
|
|
2168
|
+
return /* @__PURE__ */ g("div", {
|
|
2169
|
+
ref: p,
|
|
2170
|
+
className: y(Y.snackbar, a && !l && Y["snackbar--visible"]),
|
|
2171
|
+
role: "status",
|
|
2172
|
+
onMouseEnter: C,
|
|
2173
|
+
onMouseLeave: w,
|
|
2174
|
+
onFocus: C,
|
|
2175
|
+
onBlur: w,
|
|
2176
|
+
onPointerDown: T,
|
|
2177
|
+
onPointerMove: E,
|
|
2178
|
+
onPointerUp: D,
|
|
2179
|
+
onPointerCancel: D,
|
|
2180
|
+
children: [
|
|
2181
|
+
e.before == null ? null : /* @__PURE__ */ h("span", {
|
|
2182
|
+
className: Y.before,
|
|
2183
|
+
children: e.before
|
|
2184
|
+
}),
|
|
2185
|
+
/* @__PURE__ */ g("div", {
|
|
2186
|
+
className: Y.body,
|
|
2187
|
+
children: [/* @__PURE__ */ h("span", {
|
|
2188
|
+
className: Y.message,
|
|
2189
|
+
children: e.message
|
|
2190
|
+
}), e.description == null ? null : /* @__PURE__ */ h("span", {
|
|
2191
|
+
className: Y.description,
|
|
2192
|
+
children: e.description
|
|
2193
|
+
})]
|
|
2194
|
+
}),
|
|
2195
|
+
e.action == null ? null : /* @__PURE__ */ h("button", {
|
|
2196
|
+
type: "button",
|
|
2197
|
+
className: Y.action,
|
|
2198
|
+
onClick: () => {
|
|
2199
|
+
e.action?.onClick(), S();
|
|
2200
|
+
},
|
|
2201
|
+
children: e.action.label
|
|
2202
|
+
})
|
|
2203
|
+
]
|
|
2204
|
+
});
|
|
2205
|
+
}
|
|
2206
|
+
//#endregion
|
|
2207
|
+
//#region src/components/Snackbar/useSnackbar.ts
|
|
2208
|
+
function dn() {
|
|
2209
|
+
let e = a(on);
|
|
2210
|
+
if (!e) throw Error("useSnackbar must be used within a <SnackbarProvider>.");
|
|
2211
|
+
return e;
|
|
2212
|
+
}
|
|
2213
|
+
//#endregion
|
|
2214
|
+
//#region src/components/Spoiler/particles.ts
|
|
2215
|
+
var fn = Math.PI * 2, pn = (e) => Math.max(0, Math.min(1, e)), mn = (e) => 1 - (1 - e) ** 3;
|
|
2216
|
+
function hn(e, t, n, r) {
|
|
2217
|
+
let i = Math.max(t, e - n);
|
|
2218
|
+
return r < t ? Math.max(0, r / t) : r > i ? Math.max(0, 1 - (r - i) / (e - i)) : 1;
|
|
2219
|
+
}
|
|
2220
|
+
function gn(e, t, n) {
|
|
2221
|
+
let r = Math.round(Math.min(1800, Math.max(12, n * e * t))), i = [];
|
|
2222
|
+
for (let n = 0; n < r; n += 1) {
|
|
2223
|
+
let n = 2 + Math.random() * 10, r = Math.random() * fn, a = .3 + Math.random() * 1.2, o = Math.random();
|
|
2224
|
+
i.push({
|
|
2225
|
+
x0: Math.random() * e,
|
|
2226
|
+
y0: Math.random() * t,
|
|
2227
|
+
vx: n * Math.cos(r),
|
|
2228
|
+
vy: n * Math.sin(r),
|
|
2229
|
+
life: a,
|
|
2230
|
+
respawn: o,
|
|
2231
|
+
phase: Math.random() * (a + o),
|
|
2232
|
+
size: 1 + Math.random() * .7,
|
|
2233
|
+
square: Math.random() > .5
|
|
2234
|
+
});
|
|
2235
|
+
}
|
|
2236
|
+
return i;
|
|
2237
|
+
}
|
|
2238
|
+
function _n(e, t, n, r, i, a, o, s, c) {
|
|
2239
|
+
e.clearRect(0, 0, t, n);
|
|
2240
|
+
let l = t / r, u = n / r, [d, f, p] = a, m = i.length;
|
|
2241
|
+
for (let t = 0; t < m; t += 1) {
|
|
2242
|
+
let n = i[t], a = n.life + n.respawn;
|
|
2243
|
+
if (s != null && Math.floor((o + n.phase) / a) > Math.floor((s + n.phase) / a)) continue;
|
|
2244
|
+
let h = (o + n.phase) % a;
|
|
2245
|
+
if (h >= n.life) continue;
|
|
2246
|
+
let g = (n.x0 + n.vx * h) % l;
|
|
2247
|
+
g < 0 && (g += l);
|
|
2248
|
+
let _ = (n.y0 + n.vy * h) % u;
|
|
2249
|
+
_ < 0 && (_ += u);
|
|
2250
|
+
let v = hn(n.life, .15, .3, h), y = v * (.45 + .55 * (1 - h / n.life));
|
|
2251
|
+
if (s != null && c > 0) {
|
|
2252
|
+
let e = pn((o - (s + 2 / 3 * c * t / m)) / (1 / 3 * c));
|
|
2253
|
+
y *= mn(1 - e);
|
|
2254
|
+
}
|
|
2255
|
+
if (y <= .01) continue;
|
|
2256
|
+
let b = Math.max(.5, n.size * v) * r;
|
|
2257
|
+
e.fillStyle = `rgba(${d}, ${f}, ${p}, ${y.toFixed(3)})`, e.beginPath(), n.square ? e.rect(g * r, _ * r, b, b) : e.arc(g * r, _ * r, b / 2, 0, fn), e.fill();
|
|
2258
|
+
}
|
|
2259
|
+
}
|
|
2260
|
+
var vn = {
|
|
2261
|
+
spoiler: "_spoiler_15ysm_1",
|
|
2262
|
+
revealed: "_revealed_15ysm_15",
|
|
2263
|
+
canvas: "_canvas_15ysm_20",
|
|
2264
|
+
content: "_content_15ysm_67"
|
|
2265
|
+
}, yn = .5;
|
|
2266
|
+
function bn(e) {
|
|
2267
|
+
let t = e.match(/-?\d*\.?\d+/g);
|
|
2268
|
+
return !t || t.length < 3 ? [
|
|
2269
|
+
128,
|
|
2270
|
+
128,
|
|
2271
|
+
128
|
|
2272
|
+
] : [
|
|
2273
|
+
Number(t[0]),
|
|
2274
|
+
Number(t[1]),
|
|
2275
|
+
Number(t[2])
|
|
2276
|
+
];
|
|
2277
|
+
}
|
|
2278
|
+
function xn({ ref: e, revealed: t, defaultRevealed: n = !1, onRevealedChange: r, revealOn: i = "click", accentColor: a, density: s = .1, fps: c = 40, revealLabel: l = "Reveal hidden text", className: f, style: p, children: m, onClick: _, onKeyDown: v, onMouseEnter: b, onMouseLeave: x, ...S }) {
|
|
2279
|
+
let [C, w] = d(n), T = t ?? C, E = Yt(), D = i === "click", O = u(null), k = u(null), A = u([]), j = u([
|
|
2280
|
+
128,
|
|
2281
|
+
128,
|
|
2282
|
+
128
|
|
2283
|
+
]), ee = u(!0), te = u(T ? 0 : null), M = u(0), [ne, re] = d(!T), ie = (e) => {
|
|
2284
|
+
e ? te.current = M.current : (te.current = null, re(!0)), t ?? w(e), r?.(e);
|
|
2285
|
+
};
|
|
2286
|
+
o(() => {
|
|
2287
|
+
if (!ne) return;
|
|
2288
|
+
let e = O.current, t = k.current, n = t?.getContext("2d");
|
|
2289
|
+
if (!e || !t || !n) return;
|
|
2290
|
+
let r = Math.min(2, window.devicePixelRatio || 1), i = () => {
|
|
2291
|
+
let n = t.getBoundingClientRect(), i = Math.max(1, Math.round(n.width * r)), o = Math.max(1, Math.round(n.height * r));
|
|
2292
|
+
(t.width !== i || t.height !== o) && (t.width = i, t.height = o, A.current = gn(i / r, o / r, s)), j.current = bn(a ?? getComputedStyle(e).color);
|
|
2293
|
+
};
|
|
2294
|
+
if (i(), E) {
|
|
2295
|
+
_n(n, t.width, t.height, r, A.current, j.current, .6, null, 0);
|
|
2296
|
+
return;
|
|
2297
|
+
}
|
|
2298
|
+
let o = 0, l = 0, u = -1, d = 1e3 / Math.max(8, c), f = (e) => {
|
|
2299
|
+
l ||= e;
|
|
2300
|
+
let i = (e - l) / 1e3;
|
|
2301
|
+
M.current = i;
|
|
2302
|
+
let a = te.current;
|
|
2303
|
+
if (a != null && i > a + yn + .06) {
|
|
2304
|
+
n.clearRect(0, 0, t.width, t.height), re(!1);
|
|
2305
|
+
return;
|
|
2306
|
+
}
|
|
2307
|
+
o = requestAnimationFrame(f), !(!ee.current || e - u < d) && (u = e, _n(n, t.width, t.height, r, A.current, j.current, i, a, yn));
|
|
2308
|
+
};
|
|
2309
|
+
o = requestAnimationFrame(f);
|
|
2310
|
+
let p = typeof ResizeObserver < "u" ? new ResizeObserver(i) : null;
|
|
2311
|
+
p?.observe(e);
|
|
2312
|
+
let m = typeof IntersectionObserver < "u" ? new IntersectionObserver(([e]) => {
|
|
2313
|
+
ee.current = e.isIntersecting;
|
|
2314
|
+
}) : null;
|
|
2315
|
+
return m?.observe(e), () => {
|
|
2316
|
+
cancelAnimationFrame(o), p?.disconnect(), m?.disconnect();
|
|
2317
|
+
};
|
|
2318
|
+
}, [
|
|
2319
|
+
ne,
|
|
2320
|
+
E,
|
|
2321
|
+
s,
|
|
2322
|
+
c,
|
|
2323
|
+
a
|
|
2324
|
+
]);
|
|
2325
|
+
let ae = () => ie(!T);
|
|
2326
|
+
return /* @__PURE__ */ g("span", {
|
|
2327
|
+
ref: (t) => {
|
|
2328
|
+
O.current = t, typeof e == "function" ? e(t) : e && (e.current = t);
|
|
2329
|
+
},
|
|
2330
|
+
className: y(vn.spoiler, T && vn.revealed, f),
|
|
2331
|
+
role: "button",
|
|
2332
|
+
tabIndex: 0,
|
|
2333
|
+
"aria-pressed": T,
|
|
2334
|
+
"aria-label": T ? void 0 : l,
|
|
2335
|
+
style: {
|
|
2336
|
+
...p,
|
|
2337
|
+
"--tgui--spoiler--p": +!!T
|
|
2338
|
+
},
|
|
2339
|
+
onClick: (e) => {
|
|
2340
|
+
_?.(e), D && ae();
|
|
2341
|
+
},
|
|
2342
|
+
onKeyDown: (e) => {
|
|
2343
|
+
v?.(e), (e.key === "Enter" || e.key === " ") && (e.preventDefault(), ae());
|
|
2344
|
+
},
|
|
2345
|
+
onMouseEnter: (e) => {
|
|
2346
|
+
b?.(e), !D && !T && ie(!0);
|
|
2347
|
+
},
|
|
2348
|
+
onMouseLeave: (e) => {
|
|
2349
|
+
x?.(e), !D && T && ie(!1);
|
|
2350
|
+
},
|
|
2351
|
+
...S,
|
|
2352
|
+
children: [/* @__PURE__ */ h("span", {
|
|
2353
|
+
className: vn.content,
|
|
2354
|
+
"aria-hidden": !T,
|
|
2355
|
+
children: m
|
|
2356
|
+
}), ne ? /* @__PURE__ */ h("canvas", {
|
|
2357
|
+
ref: k,
|
|
2358
|
+
className: vn.canvas,
|
|
2359
|
+
"aria-hidden": !0
|
|
2360
|
+
}) : null]
|
|
2361
|
+
});
|
|
2362
|
+
}
|
|
2363
|
+
xn.displayName = "Spoiler";
|
|
2364
|
+
var Sn = {
|
|
1163
2365
|
switch: "_switch_s4zd1_1",
|
|
1164
2366
|
input: "_input_s4zd1_18",
|
|
1165
2367
|
control: "_control_s4zd1_28",
|
|
@@ -1168,26 +2370,26 @@ var Q = {
|
|
|
1168
2370
|
};
|
|
1169
2371
|
//#endregion
|
|
1170
2372
|
//#region src/components/Switch/Switch.tsx
|
|
1171
|
-
function
|
|
1172
|
-
let { platform: a } =
|
|
1173
|
-
return /* @__PURE__ */
|
|
1174
|
-
className:
|
|
2373
|
+
function Cn({ ref: e, disabled: t, className: n, style: r, ...i }) {
|
|
2374
|
+
let { platform: a } = F();
|
|
2375
|
+
return /* @__PURE__ */ g("label", {
|
|
2376
|
+
className: y(Sn.switch, a === "ios" ? Sn.ios : Sn.base, n),
|
|
1175
2377
|
style: r,
|
|
1176
2378
|
"data-disabled": t || void 0,
|
|
1177
|
-
children: [/* @__PURE__ */
|
|
2379
|
+
children: [/* @__PURE__ */ h("input", {
|
|
1178
2380
|
ref: e,
|
|
1179
2381
|
type: "checkbox",
|
|
1180
|
-
className:
|
|
2382
|
+
className: Sn.input,
|
|
1181
2383
|
disabled: t,
|
|
1182
2384
|
...i
|
|
1183
|
-
}), /* @__PURE__ */
|
|
2385
|
+
}), /* @__PURE__ */ h("span", {
|
|
1184
2386
|
"aria-hidden": !0,
|
|
1185
|
-
className:
|
|
2387
|
+
className: Sn.control
|
|
1186
2388
|
})]
|
|
1187
2389
|
});
|
|
1188
2390
|
}
|
|
1189
|
-
|
|
1190
|
-
var
|
|
2391
|
+
Cn.displayName = "Switch";
|
|
2392
|
+
var X = {
|
|
1191
2393
|
bar: "_bar_muj3n_1",
|
|
1192
2394
|
barIos: "_barIos_muj3n_10",
|
|
1193
2395
|
item: "_item_muj3n_15",
|
|
@@ -1198,86 +2400,181 @@ var $ = {
|
|
|
1198
2400
|
};
|
|
1199
2401
|
//#endregion
|
|
1200
2402
|
//#region src/components/TabBar/TabBarItem.tsx
|
|
1201
|
-
function
|
|
1202
|
-
let { platform: o } =
|
|
1203
|
-
return /* @__PURE__ */
|
|
2403
|
+
function wn({ ref: e, selected: t, text: n, children: r, className: i, ...a }) {
|
|
2404
|
+
let { platform: o } = F(), s = o === "ios";
|
|
2405
|
+
return /* @__PURE__ */ g(be, {
|
|
1204
2406
|
ref: e,
|
|
1205
2407
|
Component: "button",
|
|
1206
2408
|
interactiveAnimation: "opacity",
|
|
1207
2409
|
"aria-current": t ? "page" : void 0,
|
|
1208
|
-
className:
|
|
2410
|
+
className: y(X.item, s && X.itemIos, t && X.itemSelected, i),
|
|
1209
2411
|
...a,
|
|
1210
|
-
children: [r == null ? null : /* @__PURE__ */
|
|
1211
|
-
className:
|
|
2412
|
+
children: [r == null ? null : /* @__PURE__ */ h("span", {
|
|
2413
|
+
className: X.icon,
|
|
1212
2414
|
children: r
|
|
1213
|
-
}), n == null ? null : /* @__PURE__ */
|
|
1214
|
-
className:
|
|
2415
|
+
}), n == null ? null : /* @__PURE__ */ h(R, {
|
|
2416
|
+
className: X.text,
|
|
1215
2417
|
weight: "2",
|
|
1216
2418
|
level: s ? "2" : "1",
|
|
1217
2419
|
children: n
|
|
1218
2420
|
})]
|
|
1219
2421
|
});
|
|
1220
2422
|
}
|
|
1221
|
-
|
|
2423
|
+
wn.displayName = "TabBarItem";
|
|
1222
2424
|
//#endregion
|
|
1223
2425
|
//#region src/components/TabBar/TabBar.tsx
|
|
1224
|
-
function
|
|
1225
|
-
let { platform: i } =
|
|
1226
|
-
return /* @__PURE__ */
|
|
2426
|
+
function Tn({ ref: e, className: t, children: n, ...r }) {
|
|
2427
|
+
let { platform: i } = F();
|
|
2428
|
+
return /* @__PURE__ */ h("nav", {
|
|
1227
2429
|
ref: e,
|
|
1228
|
-
className:
|
|
2430
|
+
className: y(X.bar, i === "ios" && X.barIos, t),
|
|
1229
2431
|
...r,
|
|
1230
2432
|
children: n
|
|
1231
2433
|
});
|
|
1232
2434
|
}
|
|
1233
|
-
|
|
1234
|
-
var
|
|
2435
|
+
Tn.displayName = "TabBar", Tn.Item = wn;
|
|
2436
|
+
var En = { field: "_field_1crg0_1" };
|
|
1235
2437
|
//#endregion
|
|
1236
2438
|
//#region src/components/Textarea/Textarea.tsx
|
|
1237
|
-
function
|
|
1238
|
-
let { platform: y } =
|
|
1239
|
-
|
|
1240
|
-
}, [e]),
|
|
1241
|
-
let e =
|
|
2439
|
+
function Dn({ ref: e, header: t, status: n, autoGrow: r = !1, maxRows: a, rows: s = 3, disabled: c, className: l, value: f, defaultValue: p, onFocus: m, onBlur: g, onChange: _, ...v }) {
|
|
2440
|
+
let { platform: y } = F(), b = y === "ios", [x, S] = d(!1), C = n ?? (x ? "focused" : "default"), w = b ? I : P, T = u(null), E = i((t) => {
|
|
2441
|
+
T.current = t, typeof e == "function" ? e(t) : e && (e.current = t);
|
|
2442
|
+
}, [e]), D = i(() => {
|
|
2443
|
+
let e = T.current;
|
|
1242
2444
|
if (!e || !r) return;
|
|
1243
2445
|
e.style.height = "auto";
|
|
1244
2446
|
let t = getComputedStyle(e), n = Number.parseFloat(t.lineHeight) || 20, i = a ? n * a : Infinity;
|
|
1245
2447
|
e.style.height = `${Math.min(e.scrollHeight, i)}px`, e.style.overflowY = e.scrollHeight > i ? "auto" : "hidden";
|
|
1246
2448
|
}, [r, a]);
|
|
1247
|
-
return o(
|
|
1248
|
-
|
|
2449
|
+
return o(D, [
|
|
2450
|
+
D,
|
|
1249
2451
|
f,
|
|
1250
|
-
|
|
1251
|
-
]), /* @__PURE__ */
|
|
2452
|
+
p
|
|
2453
|
+
]), /* @__PURE__ */ h(ft, {
|
|
1252
2454
|
ios: b,
|
|
1253
|
-
status:
|
|
1254
|
-
disabled:
|
|
2455
|
+
status: C,
|
|
2456
|
+
disabled: c,
|
|
1255
2457
|
alignStart: !0,
|
|
1256
2458
|
header: t,
|
|
1257
|
-
className:
|
|
1258
|
-
children: /* @__PURE__ */
|
|
1259
|
-
ref:
|
|
2459
|
+
className: l,
|
|
2460
|
+
children: /* @__PURE__ */ h(w, {
|
|
2461
|
+
ref: E,
|
|
1260
2462
|
Component: "textarea",
|
|
1261
|
-
className:
|
|
2463
|
+
className: En.field,
|
|
1262
2464
|
rows: s,
|
|
1263
|
-
disabled:
|
|
2465
|
+
disabled: c,
|
|
1264
2466
|
value: f,
|
|
1265
|
-
defaultValue:
|
|
2467
|
+
defaultValue: p,
|
|
1266
2468
|
onFocus: (e) => {
|
|
1267
|
-
|
|
2469
|
+
c || S(!0), m?.(e);
|
|
1268
2470
|
},
|
|
1269
2471
|
onBlur: (e) => {
|
|
1270
|
-
|
|
2472
|
+
S(!1), g?.(e);
|
|
1271
2473
|
},
|
|
1272
2474
|
onChange: (e) => {
|
|
1273
|
-
|
|
2475
|
+
D(), _?.(e);
|
|
1274
2476
|
},
|
|
1275
2477
|
...v
|
|
1276
2478
|
})
|
|
1277
2479
|
});
|
|
1278
2480
|
}
|
|
1279
|
-
|
|
2481
|
+
Dn.displayName = "Textarea";
|
|
2482
|
+
var On = {
|
|
2483
|
+
trigger: "_trigger_83ipz_1",
|
|
2484
|
+
tooltip: "_tooltip_83ipz_5",
|
|
2485
|
+
"tooltip--visible": "_tooltip--visible_83ipz_25",
|
|
2486
|
+
arrow: "_arrow_83ipz_44"
|
|
2487
|
+
}, Z = 8, Q = 8, $ = (e, t, n) => Math.max(t, Math.min(n, e));
|
|
2488
|
+
function kn(e, t, n) {
|
|
2489
|
+
let r = window.innerWidth, i = window.innerHeight, a = n;
|
|
2490
|
+
a === "top" && e.top - t.height - Z < Q ? a = "bottom" : a === "bottom" && e.bottom + t.height + Z > i - Q ? a = "top" : a === "left" && e.left - t.width - Z < Q ? a = "right" : a === "right" && e.right + t.width + Z > r - Q && (a = "left");
|
|
2491
|
+
let o = 0, s = 0;
|
|
2492
|
+
a === "top" || a === "bottom" ? (s = e.left + e.width / 2 - t.width / 2, o = a === "top" ? e.top - t.height - Z : e.bottom + Z) : (o = e.top + e.height / 2 - t.height / 2, s = a === "left" ? e.left - t.width - Z : e.right + Z), s = $(s, Q, r - t.width - Q), o = $(o, Q, i - t.height - Q);
|
|
2493
|
+
let c = e.left + e.width / 2 - s, l = e.top + e.height / 2 - o, u = {};
|
|
2494
|
+
return a === "top" ? (u.left = $(c, 10, t.width - 10) - 4, u.bottom = -4) : a === "bottom" ? (u.left = $(c, 10, t.width - 10) - 4, u.top = -4) : a === "left" ? (u.top = $(l, 10, t.height - 10) - 4, u.right = -4) : (u.top = $(l, 10, t.height - 10) - 4, u.left = -4), {
|
|
2495
|
+
top: o,
|
|
2496
|
+
left: s,
|
|
2497
|
+
placement: a,
|
|
2498
|
+
originX: $(c, 0, t.width),
|
|
2499
|
+
originY: $(l, 0, t.height),
|
|
2500
|
+
arrow: u
|
|
2501
|
+
};
|
|
2502
|
+
}
|
|
2503
|
+
function An({ ref: e, children: t, content: n, placement: r = "top", open: a, onOpenChange: l, className: f }) {
|
|
2504
|
+
let [p, _] = d(!1), v = a ?? p, b = u(null), x = u(null), S = u(null), [C, w] = d(null), [T, E] = d(!1), D = s(), O = i((e) => {
|
|
2505
|
+
a ?? _(e), l?.(e);
|
|
2506
|
+
}, [a, l]), k = i(() => {
|
|
2507
|
+
let e = b.current, t = x.current;
|
|
2508
|
+
!e || !t || w(kn(e.getBoundingClientRect(), t.getBoundingClientRect(), r));
|
|
2509
|
+
}, [r]);
|
|
2510
|
+
c(() => {
|
|
2511
|
+
if (!v) {
|
|
2512
|
+
E(!1), w(null);
|
|
2513
|
+
return;
|
|
2514
|
+
}
|
|
2515
|
+
k();
|
|
2516
|
+
}, [v, k]), o(() => {
|
|
2517
|
+
if (!v || !C) return;
|
|
2518
|
+
let e = requestAnimationFrame(() => E(!0)), t = () => O(!1);
|
|
2519
|
+
return window.addEventListener("scroll", t, !0), window.addEventListener("resize", k), () => {
|
|
2520
|
+
cancelAnimationFrame(e), window.removeEventListener("scroll", t, !0), window.removeEventListener("resize", k);
|
|
2521
|
+
};
|
|
2522
|
+
}, [
|
|
2523
|
+
v,
|
|
2524
|
+
C,
|
|
2525
|
+
k,
|
|
2526
|
+
O
|
|
2527
|
+
]), o(() => {
|
|
2528
|
+
if (!v) return;
|
|
2529
|
+
let e = (e) => {
|
|
2530
|
+
e.key === "Escape" && O(!1);
|
|
2531
|
+
};
|
|
2532
|
+
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
2533
|
+
}, [v, O]);
|
|
2534
|
+
let A = i(() => {
|
|
2535
|
+
S.current &&= (clearTimeout(S.current), null);
|
|
2536
|
+
}, []);
|
|
2537
|
+
return o(() => A, [A]), /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("span", {
|
|
2538
|
+
ref: (t) => {
|
|
2539
|
+
b.current = t, typeof e == "function" ? e(t) : e && (e.current = t);
|
|
2540
|
+
},
|
|
2541
|
+
className: y(On.trigger, f),
|
|
2542
|
+
"aria-describedby": v ? D : void 0,
|
|
2543
|
+
onPointerEnter: (e) => {
|
|
2544
|
+
e.pointerType !== "touch" && O(!0);
|
|
2545
|
+
},
|
|
2546
|
+
onPointerLeave: (e) => {
|
|
2547
|
+
e.pointerType !== "touch" && O(!1), A();
|
|
2548
|
+
},
|
|
2549
|
+
onPointerDown: (e) => {
|
|
2550
|
+
e.pointerType === "touch" && (S.current = setTimeout(() => O(!0), 450));
|
|
2551
|
+
},
|
|
2552
|
+
onPointerUp: A,
|
|
2553
|
+
onPointerCancel: A,
|
|
2554
|
+
onFocus: () => O(!0),
|
|
2555
|
+
onBlur: () => O(!1),
|
|
2556
|
+
children: t
|
|
2557
|
+
}), v ? /* @__PURE__ */ h(kt, { children: /* @__PURE__ */ g("div", {
|
|
2558
|
+
ref: x,
|
|
2559
|
+
id: D,
|
|
2560
|
+
role: "tooltip",
|
|
2561
|
+
className: y(On.tooltip, T && On["tooltip--visible"]),
|
|
2562
|
+
style: C ? {
|
|
2563
|
+
top: C.top,
|
|
2564
|
+
left: C.left,
|
|
2565
|
+
"--tgui--tooltip--origin-x": `${C.originX}px`,
|
|
2566
|
+
"--tgui--tooltip--origin-y": `${C.originY}px`
|
|
2567
|
+
} : void 0,
|
|
2568
|
+
"data-placement": C?.placement,
|
|
2569
|
+
children: [n, C ? /* @__PURE__ */ h("span", {
|
|
2570
|
+
className: On.arrow,
|
|
2571
|
+
style: C.arrow,
|
|
2572
|
+
"aria-hidden": !0
|
|
2573
|
+
}) : null]
|
|
2574
|
+
}) }) : null] });
|
|
2575
|
+
}
|
|
2576
|
+
An.displayName = "Tooltip";
|
|
1280
2577
|
//#endregion
|
|
1281
|
-
export {
|
|
2578
|
+
export { C as Accordion, w as AccordionItem, O as Avatar, A as AvatarStack, te as Badge, re as Banner, ae as Blockquote, Pe as Button, R as Caption, We as Card, Ue as CardCell, He as Cell, Ke as Checkbox, Je as Chip, Qe as CircularProgress, et as Divider, nt as FixedLayout, it as Headline, ot as HorizontalScroll, ct as IconButton, dt as Image, mt as Input, gt as LargeTitle, vt as Link, bt as List, Ct as PinInput, Ot as Placeholder, kt as Portal, jt as Progress, Nt as Radio, Ft as Rating, Vt as Section, Lt as SectionFooter, zt as SectionHeader, Ut as SegmentedControl, Wt as SegmentedControlItem, Gt as Select, tn as Sheet, rn as Skeleton, an as Slider, ln as SnackbarProvider, ce as Spinner, xn as Spoiler, P as Subheadline, Cn as Switch, Tn as TabBar, wn as TabBarItem, be as Tappable, I as Text, Dn as Textarea, je as TguiProvider, Et as Title, An as Tooltip, N as Typography, dn as useSnackbar, F as useTgui };
|
|
1282
2579
|
|
|
1283
2580
|
//# sourceMappingURL=index.js.map
|