@nice2dev/events 1.0.28 → 1.0.30
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/CHANGELOG.md +67 -0
- package/README.md +11 -14
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +43 -64
- package/dist/index.mjs +1072 -1098
- package/package.json +4 -1
package/dist/index.mjs
CHANGED
|
@@ -1,786 +1,696 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { jsxs as i, jsx as e, Fragment as nn } from "react/jsx-runtime";
|
|
2
|
+
import { NtdHeart as tn, NtdTrash as an, NtdPlay as ln, NtdImage as rn, NtdSparkle as fe, NtdCamera as Ne, NtdMicrophone as _e, NtdHelp as be, NtdMusic as q, NtdGamepad as ke, NtdThumbsUp as cn, NtdClipboardCheck as sn, NtdMedal as ue, NtdTrophy as on } from "@nice2dev/icons";
|
|
3
|
+
import { NiceUpload as dn, NiceTextInput as T, NiceCardGroup as mn, NiceAvatarGroup as he, NiceAvatar as Z, NiceBadge as W, NiceButton as B, NiceSelect as ve, NiceAmountBreakdown as pn, NiceToggle as ge, NiceTabs as un, NiceTextArea as hn } from "@nice2dev/ui";
|
|
4
|
+
import ne, { forwardRef as E, useState as f, useMemo as I, useCallback as O } from "react";
|
|
5
|
+
import { NiceIcon as L } from "@nice2dev/ui-core";
|
|
6
|
+
const vn = ({ item: z }) => {
|
|
7
|
+
const [N, C] = f(!1), t = z.thumbnailUrl ?? z.url;
|
|
8
|
+
return z.type === "video" ? /* @__PURE__ */ e("div", { className: "nice-event-media__video-thumb", children: /* @__PURE__ */ e(ln, { size: 26 }) }) : N || !t ? /* @__PURE__ */ e("div", { className: "nice-event-media__broken", title: "Image unavailable", children: /* @__PURE__ */ e(rn, { size: 24 }) }) : /* @__PURE__ */ e(
|
|
9
|
+
"img",
|
|
10
|
+
{
|
|
11
|
+
src: t,
|
|
12
|
+
alt: z.caption ?? "",
|
|
13
|
+
className: "nice-event-media__thumb",
|
|
14
|
+
loading: "lazy",
|
|
15
|
+
onError: () => C(!0)
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
}, wn = E(
|
|
19
|
+
function(N, C) {
|
|
5
20
|
const {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
className:
|
|
15
|
-
style:
|
|
16
|
-
} =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
!s.trim() || !m || (m(s.trim(), "text"), u(""));
|
|
22
|
-
}, [s, m]), p = (c) => {
|
|
23
|
-
c.key === "Enter" && !c.shiftKey && (c.preventDefault(), b());
|
|
24
|
-
};
|
|
25
|
-
return /* @__PURE__ */ t("div", { ref: A, className: `nice-event-chat ${f ?? ""}`, style: C, children: [
|
|
26
|
-
/* @__PURE__ */ t("div", { className: "nice-event-chat__messages", children: [
|
|
27
|
-
a.length === 0 && /* @__PURE__ */ e("p", { className: "nice-event-chat__empty", children: "No messages yet. Start the conversation!" }),
|
|
28
|
-
a.map((c) => {
|
|
29
|
-
const n = c.senderId === y;
|
|
30
|
-
return c.type === "system" || c.type === "announcement" ? /* @__PURE__ */ t(
|
|
31
|
-
"div",
|
|
32
|
-
{
|
|
33
|
-
className: `nice-event-chat__system nice-event-chat__${c.type}`,
|
|
34
|
-
children: [
|
|
35
|
-
/* @__PURE__ */ e("span", { children: c.content }),
|
|
36
|
-
/* @__PURE__ */ e("time", { children: c.timestamp })
|
|
37
|
-
]
|
|
38
|
-
},
|
|
39
|
-
c.id
|
|
40
|
-
) : /* @__PURE__ */ t(
|
|
41
|
-
"div",
|
|
42
|
-
{
|
|
43
|
-
className: `nice-event-chat__bubble ${n ? "nice-event-chat__bubble--own" : ""}`,
|
|
44
|
-
children: [
|
|
45
|
-
!n && /* @__PURE__ */ t("div", { className: "nice-event-chat__sender", children: [
|
|
46
|
-
c.senderAvatarUrl && /* @__PURE__ */ e("img", { src: c.senderAvatarUrl, alt: "", className: "nice-event-chat__avatar" }),
|
|
47
|
-
/* @__PURE__ */ e("strong", { children: c.senderName })
|
|
48
|
-
] }),
|
|
49
|
-
c.type === "image" ? /* @__PURE__ */ e("img", { src: c.content, alt: "Shared image", className: "nice-event-chat__image" }) : /* @__PURE__ */ e("p", { className: "nice-event-chat__text", children: c.content }),
|
|
50
|
-
/* @__PURE__ */ t("div", { className: "nice-event-chat__meta", children: [
|
|
51
|
-
/* @__PURE__ */ e("time", { children: c.timestamp }),
|
|
52
|
-
c.reactions && Object.keys(c.reactions).length > 0 && /* @__PURE__ */ e("span", { className: "nice-event-chat__reactions", children: Object.entries(c.reactions).map(([i, h]) => /* @__PURE__ */ t(
|
|
53
|
-
"button",
|
|
54
|
-
{
|
|
55
|
-
className: "nice-event-chat__reaction",
|
|
56
|
-
onClick: () => v == null ? void 0 : v(c.id, i),
|
|
57
|
-
children: [
|
|
58
|
-
i,
|
|
59
|
-
" ",
|
|
60
|
-
h
|
|
61
|
-
]
|
|
62
|
-
},
|
|
63
|
-
i
|
|
64
|
-
)) })
|
|
65
|
-
] }),
|
|
66
|
-
v && !g && /* @__PURE__ */ e("div", { className: "nice-event-chat__react-bar", children: _.map((i) => /* @__PURE__ */ e("button", { onClick: () => v(c.id, i), title: i, children: i }, i)) })
|
|
67
|
-
]
|
|
68
|
-
},
|
|
69
|
-
c.id
|
|
70
|
-
);
|
|
71
|
-
}),
|
|
72
|
-
/* @__PURE__ */ e("div", { ref: k })
|
|
73
|
-
] }),
|
|
74
|
-
!g && /* @__PURE__ */ t("div", { className: "nice-event-chat__input-bar", children: [
|
|
75
|
-
/* @__PURE__ */ e(
|
|
76
|
-
"textarea",
|
|
77
|
-
{
|
|
78
|
-
value: s,
|
|
79
|
-
onChange: (c) => u(c.target.value),
|
|
80
|
-
onKeyDown: p,
|
|
81
|
-
placeholder: S,
|
|
82
|
-
rows: 1
|
|
83
|
-
}
|
|
84
|
-
),
|
|
85
|
-
/* @__PURE__ */ e("button", { onClick: b, disabled: !s.trim(), children: "Send" })
|
|
86
|
-
] })
|
|
87
|
-
] });
|
|
88
|
-
}
|
|
89
|
-
), X = {
|
|
90
|
-
invited: "#3b82f6",
|
|
91
|
-
confirmed: "#22c55e",
|
|
92
|
-
declined: "#ef4444",
|
|
93
|
-
"checked-in": "#8b5cf6",
|
|
94
|
-
"no-show": "#9ca3af"
|
|
95
|
-
}, Z = {
|
|
96
|
-
host: "👑 Host",
|
|
97
|
-
"co-host": "🎯 Co-Host",
|
|
98
|
-
moderator: "🛡️ Moderator",
|
|
99
|
-
participant: "👤 Participant",
|
|
100
|
-
spectator: "👁️ Spectator",
|
|
101
|
-
vip: "⭐ VIP"
|
|
102
|
-
}, ke = P(
|
|
103
|
-
function(x, A) {
|
|
104
|
-
const {
|
|
105
|
-
participants: a,
|
|
106
|
-
currentParticipantId: y,
|
|
107
|
-
onInvite: m,
|
|
108
|
-
onRemove: v,
|
|
109
|
-
onRoleChange: _,
|
|
110
|
-
onCheckIn: g,
|
|
111
|
-
onParticipantClick: S,
|
|
112
|
-
showQR: N = !1,
|
|
113
|
-
editable: f = !1,
|
|
114
|
-
maxParticipants: C,
|
|
115
|
-
className: s,
|
|
116
|
-
style: u
|
|
117
|
-
} = x, [k, b] = w(""), [p, c] = w(""), n = R(() => {
|
|
118
|
-
let h = a;
|
|
119
|
-
if (p && (h = h.filter((l) => l.status === p)), k.trim()) {
|
|
120
|
-
const l = k.toLowerCase();
|
|
121
|
-
h = h.filter((o) => o.name.toLowerCase().includes(l));
|
|
122
|
-
}
|
|
123
|
-
return h;
|
|
124
|
-
}, [a, p, k]), d = R(() => {
|
|
125
|
-
const h = /* @__PURE__ */ new Map(), l = [
|
|
126
|
-
"host",
|
|
127
|
-
"co-host",
|
|
128
|
-
"moderator",
|
|
129
|
-
"vip",
|
|
130
|
-
"participant",
|
|
131
|
-
"spectator"
|
|
132
|
-
];
|
|
133
|
-
for (const o of l)
|
|
134
|
-
h.set(o, []);
|
|
135
|
-
for (const o of n)
|
|
136
|
-
h.has(o.role) || h.set(o.role, []), h.get(o.role).push(o);
|
|
137
|
-
return Array.from(h.entries()).filter(([, o]) => o.length > 0);
|
|
138
|
-
}, [n]), i = R(() => {
|
|
139
|
-
const h = {};
|
|
140
|
-
for (const l of a)
|
|
141
|
-
h[l.status] = (h[l.status] ?? 0) + 1;
|
|
142
|
-
return h;
|
|
143
|
-
}, [a]);
|
|
144
|
-
return /* @__PURE__ */ t("div", { ref: A, className: `nice-event-participants ${s ?? ""}`, style: u, children: [
|
|
145
|
-
/* @__PURE__ */ t("div", { className: "nice-event-participants__header", children: [
|
|
146
|
-
/* @__PURE__ */ t("h3", { children: [
|
|
147
|
-
"Participants (",
|
|
148
|
-
a.length,
|
|
149
|
-
C ? ` / ${C}` : "",
|
|
150
|
-
")"
|
|
151
|
-
] }),
|
|
152
|
-
f && m && /* @__PURE__ */ e(
|
|
153
|
-
"button",
|
|
154
|
-
{
|
|
155
|
-
onClick: m,
|
|
156
|
-
disabled: C ? a.length >= C : !1,
|
|
157
|
-
children: "+ Invite"
|
|
158
|
-
}
|
|
159
|
-
)
|
|
160
|
-
] }),
|
|
161
|
-
/* @__PURE__ */ e("div", { className: "nice-event-participants__summary", children: Object.entries(i).map(([h, l]) => /* @__PURE__ */ t("span", { className: "nice-event-participants__stat", children: [
|
|
162
|
-
/* @__PURE__ */ e(
|
|
163
|
-
"span",
|
|
164
|
-
{
|
|
165
|
-
className: "nice-event-participants__dot",
|
|
166
|
-
style: { backgroundColor: X[h] }
|
|
167
|
-
}
|
|
168
|
-
),
|
|
169
|
-
h,
|
|
170
|
-
": ",
|
|
171
|
-
l
|
|
172
|
-
] }, h)) }),
|
|
173
|
-
/* @__PURE__ */ t("div", { className: "nice-event-participants__toolbar", children: [
|
|
174
|
-
/* @__PURE__ */ e(
|
|
175
|
-
"input",
|
|
176
|
-
{
|
|
177
|
-
type: "text",
|
|
178
|
-
value: k,
|
|
179
|
-
onChange: (h) => b(h.target.value),
|
|
180
|
-
placeholder: "Search…"
|
|
181
|
-
}
|
|
182
|
-
),
|
|
183
|
-
/* @__PURE__ */ t(
|
|
184
|
-
"select",
|
|
185
|
-
{
|
|
186
|
-
value: p,
|
|
187
|
-
onChange: (h) => c(h.target.value),
|
|
188
|
-
children: [
|
|
189
|
-
/* @__PURE__ */ e("option", { value: "", children: "All" }),
|
|
190
|
-
/* @__PURE__ */ e("option", { value: "invited", children: "Invited" }),
|
|
191
|
-
/* @__PURE__ */ e("option", { value: "confirmed", children: "Confirmed" }),
|
|
192
|
-
/* @__PURE__ */ e("option", { value: "declined", children: "Declined" }),
|
|
193
|
-
/* @__PURE__ */ e("option", { value: "checked-in", children: "Checked In" }),
|
|
194
|
-
/* @__PURE__ */ e("option", { value: "no-show", children: "No Show" })
|
|
195
|
-
]
|
|
196
|
-
}
|
|
197
|
-
)
|
|
198
|
-
] }),
|
|
199
|
-
d.map(([h, l]) => /* @__PURE__ */ t("div", { className: "nice-event-participants__group", children: [
|
|
200
|
-
/* @__PURE__ */ t("h4", { className: "nice-event-participants__role-label", children: [
|
|
201
|
-
Z[h],
|
|
202
|
-
" (",
|
|
203
|
-
l.length,
|
|
204
|
-
")"
|
|
205
|
-
] }),
|
|
206
|
-
l.map((o) => /* @__PURE__ */ t(
|
|
207
|
-
"div",
|
|
208
|
-
{
|
|
209
|
-
className: `nice-event-participants__item ${o.id === y ? "nice-event-participants__item--self" : ""}`,
|
|
210
|
-
onClick: () => S == null ? void 0 : S(o),
|
|
211
|
-
children: [
|
|
212
|
-
o.avatarUrl ? /* @__PURE__ */ e("img", { src: o.avatarUrl, alt: "", className: "nice-event-participants__avatar" }) : /* @__PURE__ */ e("span", { className: "nice-event-participants__avatar-placeholder", children: o.name.charAt(0) }),
|
|
213
|
-
/* @__PURE__ */ t("div", { className: "nice-event-participants__info", children: [
|
|
214
|
-
/* @__PURE__ */ e("span", { className: "nice-event-participants__name", children: o.name }),
|
|
215
|
-
/* @__PURE__ */ e(
|
|
216
|
-
"span",
|
|
217
|
-
{
|
|
218
|
-
className: "nice-event-participants__status",
|
|
219
|
-
style: { color: X[o.status] },
|
|
220
|
-
children: o.status
|
|
221
|
-
}
|
|
222
|
-
),
|
|
223
|
-
o.score != null && /* @__PURE__ */ t("span", { className: "nice-event-participants__score", children: [
|
|
224
|
-
"Score: ",
|
|
225
|
-
o.score
|
|
226
|
-
] })
|
|
227
|
-
] }),
|
|
228
|
-
N && o.qrCode && /* @__PURE__ */ e("span", { className: "nice-event-participants__qr", title: "QR Code", children: "📱" }),
|
|
229
|
-
f && /* @__PURE__ */ t("div", { className: "nice-event-participants__actions", children: [
|
|
230
|
-
_ && /* @__PURE__ */ e(
|
|
231
|
-
"select",
|
|
232
|
-
{
|
|
233
|
-
value: o.role,
|
|
234
|
-
onChange: (I) => _(o.id, I.target.value),
|
|
235
|
-
onClick: (I) => I.stopPropagation(),
|
|
236
|
-
children: Object.entries(Z).map(([I, O]) => /* @__PURE__ */ e("option", { value: I, children: O }, I))
|
|
237
|
-
}
|
|
238
|
-
),
|
|
239
|
-
g && o.status === "confirmed" && /* @__PURE__ */ e(
|
|
240
|
-
"button",
|
|
241
|
-
{
|
|
242
|
-
onClick: (I) => {
|
|
243
|
-
I.stopPropagation(), g(o.id);
|
|
244
|
-
},
|
|
245
|
-
children: "Check In"
|
|
246
|
-
}
|
|
247
|
-
),
|
|
248
|
-
v && o.role !== "host" && /* @__PURE__ */ e(
|
|
249
|
-
"button",
|
|
250
|
-
{
|
|
251
|
-
onClick: (I) => {
|
|
252
|
-
I.stopPropagation(), v(o.id);
|
|
253
|
-
},
|
|
254
|
-
children: "Remove"
|
|
255
|
-
}
|
|
256
|
-
)
|
|
257
|
-
] })
|
|
258
|
-
]
|
|
259
|
-
},
|
|
260
|
-
o.id
|
|
261
|
-
))
|
|
262
|
-
] }, h))
|
|
263
|
-
] });
|
|
264
|
-
}
|
|
265
|
-
), Ce = P(
|
|
266
|
-
function(x, A) {
|
|
267
|
-
const {
|
|
268
|
-
items: a,
|
|
269
|
-
onUpload: y,
|
|
270
|
-
onDelete: m,
|
|
271
|
-
onLike: v,
|
|
272
|
-
onItemClick: _,
|
|
273
|
-
layout: g = "grid",
|
|
274
|
-
uploadEnabled: S = !0,
|
|
275
|
-
typeFilter: N = "all",
|
|
276
|
-
className: f,
|
|
277
|
-
style: C
|
|
278
|
-
} = x, [s, u] = w(""), k = R(() => N === "all" ? a : a.filter((p) => p.type === N), [a, N]), b = (p) => {
|
|
279
|
-
var n;
|
|
280
|
-
const c = (n = p.target.files) == null ? void 0 : n[0];
|
|
281
|
-
!c || !y || (y(c, s.trim() || void 0), u(""), p.target.value = "");
|
|
282
|
-
};
|
|
283
|
-
return /* @__PURE__ */ t(
|
|
21
|
+
items: t,
|
|
22
|
+
onUpload: p,
|
|
23
|
+
onDelete: u,
|
|
24
|
+
onLike: m,
|
|
25
|
+
onItemClick: h,
|
|
26
|
+
layout: v = "grid",
|
|
27
|
+
uploadEnabled: _ = !0,
|
|
28
|
+
typeFilter: g = "all",
|
|
29
|
+
className: S,
|
|
30
|
+
style: b
|
|
31
|
+
} = N, [l, o] = f(""), k = I(() => g === "all" ? t : t.filter((d) => d.type === g), [t, g]), y = (d) => {
|
|
32
|
+
const n = d[0];
|
|
33
|
+
!n || !p || (p(n, l.trim() || void 0), o(""));
|
|
34
|
+
}, x = v === "list";
|
|
35
|
+
return /* @__PURE__ */ i(
|
|
284
36
|
"div",
|
|
285
37
|
{
|
|
286
|
-
ref:
|
|
287
|
-
className: `nice-event-media nice-event-media--${
|
|
288
|
-
style:
|
|
38
|
+
ref: C,
|
|
39
|
+
className: `nice-event-media nice-event-media--${v} ${S ?? ""}`,
|
|
40
|
+
style: b,
|
|
289
41
|
children: [
|
|
290
|
-
/* @__PURE__ */ e("div", { className: "nice-event-media__header", children: /* @__PURE__ */
|
|
42
|
+
/* @__PURE__ */ e("div", { className: "nice-event-media__header", children: /* @__PURE__ */ i("h3", { children: [
|
|
291
43
|
"Media (",
|
|
292
44
|
k.length,
|
|
293
45
|
")"
|
|
294
46
|
] }) }),
|
|
295
|
-
|
|
296
|
-
/* @__PURE__ */ e("input", { type: "file", accept: "image/*,video/*", onChange: b }),
|
|
47
|
+
_ && p && /* @__PURE__ */ i("div", { className: "nice-event-media__upload", children: [
|
|
297
48
|
/* @__PURE__ */ e(
|
|
298
|
-
|
|
49
|
+
dn,
|
|
299
50
|
{
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
className: "nice-event-media__caption-input"
|
|
51
|
+
accept: "image/*,video/*",
|
|
52
|
+
multiple: !1,
|
|
53
|
+
imagePreview: !1,
|
|
54
|
+
onFilesSelected: y
|
|
305
55
|
}
|
|
306
|
-
)
|
|
56
|
+
),
|
|
57
|
+
/* @__PURE__ */ e(T, { value: l, onChange: o, placeholder: "Add a caption…" })
|
|
307
58
|
] }),
|
|
308
|
-
k.length === 0 ? /* @__PURE__ */ e("p", { className: "nice-event-media__empty", children: "No media yet." }) : /* @__PURE__ */ e(
|
|
309
|
-
|
|
59
|
+
k.length === 0 ? /* @__PURE__ */ e("p", { className: "nice-event-media__empty", children: "No media yet." }) : /* @__PURE__ */ e(
|
|
60
|
+
mn,
|
|
310
61
|
{
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
62
|
+
columns: x ? 1 : void 0,
|
|
63
|
+
minColumnWidth: 200,
|
|
64
|
+
gap: 12,
|
|
65
|
+
align: "stretch",
|
|
66
|
+
children: k.map((d) => /* @__PURE__ */ i(
|
|
67
|
+
"div",
|
|
68
|
+
{
|
|
69
|
+
className: `nice-event-media__card${x ? " nice-event-media__card--row" : ""}`,
|
|
70
|
+
onClick: () => h == null ? void 0 : h(d),
|
|
71
|
+
role: h ? "button" : void 0,
|
|
72
|
+
tabIndex: h ? 0 : void 0,
|
|
73
|
+
children: [
|
|
74
|
+
/* @__PURE__ */ e(vn, { item: d }),
|
|
75
|
+
/* @__PURE__ */ i("div", { className: "nice-event-media__body", children: [
|
|
76
|
+
d.caption && /* @__PURE__ */ e("span", { className: "nice-event-media__caption", children: d.caption }),
|
|
77
|
+
d.uploadedByName && /* @__PURE__ */ e("span", { className: "nice-event-media__uploader", children: d.uploadedByName }),
|
|
78
|
+
/* @__PURE__ */ i("div", { className: "nice-event-media__actions", children: [
|
|
79
|
+
m && /* @__PURE__ */ i(
|
|
80
|
+
"button",
|
|
81
|
+
{
|
|
82
|
+
type: "button",
|
|
83
|
+
className: "nice-event-media__action",
|
|
84
|
+
onClick: (n) => {
|
|
85
|
+
n.stopPropagation(), m(d.id);
|
|
86
|
+
},
|
|
87
|
+
"aria-label": "Like",
|
|
88
|
+
children: [
|
|
89
|
+
/* @__PURE__ */ e(tn, { size: 15 }),
|
|
90
|
+
" ",
|
|
91
|
+
d.likes ?? 0
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
u && /* @__PURE__ */ e(
|
|
96
|
+
"button",
|
|
97
|
+
{
|
|
98
|
+
type: "button",
|
|
99
|
+
className: "nice-event-media__action nice-event-media__action--danger",
|
|
100
|
+
onClick: (n) => {
|
|
101
|
+
n.stopPropagation(), u(d.id);
|
|
102
|
+
},
|
|
103
|
+
"aria-label": "Delete",
|
|
104
|
+
children: /* @__PURE__ */ e(an, { size: 15 })
|
|
105
|
+
}
|
|
106
|
+
)
|
|
107
|
+
] })
|
|
108
|
+
] })
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
d.id
|
|
112
|
+
))
|
|
113
|
+
}
|
|
114
|
+
)
|
|
354
115
|
]
|
|
355
116
|
}
|
|
356
117
|
);
|
|
357
118
|
}
|
|
358
|
-
)
|
|
359
|
-
|
|
360
|
-
|
|
119
|
+
);
|
|
120
|
+
function ee(z) {
|
|
121
|
+
const N = z.toLowerCase();
|
|
122
|
+
return ["active", "live", "published", "completed", "confirmed"].includes(N) ? "success" : ["cancelled", "canceled", "rejected", "failed"].includes(N) ? "error" : ["scheduled", "pending", "planning"].includes(N) ? "info" : ["draft", "archived"].includes(N) ? "secondary" : "warning";
|
|
123
|
+
}
|
|
124
|
+
const gn = {
|
|
125
|
+
micro: [],
|
|
126
|
+
compact: ["details", "location", "budget"],
|
|
127
|
+
normal: ["details", "location", "participants", "surveys", "budget"],
|
|
128
|
+
full: ["details", "location", "participants", "surveys", "budget", "settings"]
|
|
129
|
+
}, zn = E(
|
|
130
|
+
function(N, C) {
|
|
131
|
+
var ce, se, oe, de, me, pe;
|
|
361
132
|
const {
|
|
362
|
-
event:
|
|
363
|
-
|
|
133
|
+
event: t,
|
|
134
|
+
participants: p = [],
|
|
135
|
+
surveys: u = [],
|
|
364
136
|
billing: m = [],
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
137
|
+
displayMode: h = "normal",
|
|
138
|
+
tabs: v,
|
|
139
|
+
activeTab: _,
|
|
140
|
+
onTabChange: g,
|
|
141
|
+
tabsIconOnly: S = !0,
|
|
142
|
+
tabsCentered: b = "auto",
|
|
143
|
+
editable: l = !1,
|
|
144
|
+
onSave: o,
|
|
145
|
+
onPublish: k,
|
|
146
|
+
onShare: y,
|
|
147
|
+
onExport: x,
|
|
148
|
+
onUpdateEvent: d,
|
|
149
|
+
onUpdateLocation: n,
|
|
150
|
+
onAddSurvey: c,
|
|
151
|
+
onSurveyRespond: a,
|
|
152
|
+
onAddBilling: w,
|
|
153
|
+
className: s,
|
|
154
|
+
style: A
|
|
155
|
+
} = N, [P, V] = f(t.title), [M, Ce] = f(t.description ?? ""), [F, Se] = f(t.startDate ?? ""), [Q, xe] = f(t.endDate ?? ""), [j, we] = f(((ce = t.location) == null ? void 0 : ce.name) ?? ""), [G, ze] = f(((se = t.location) == null ? void 0 : se.address) ?? ""), [H, Ae] = f(((oe = t.location) == null ? void 0 : oe.virtualUrl) ?? ""), [U, Ie] = f(((de = t.location) == null ? void 0 : de.isVirtual) ?? !1), [$, ie] = f(""), [Y, Le] = f("single"), [K, te] = f(""), [D, ae] = f(""), [J, le] = f(""), [X, Te] = f("PLN"), re = v ?? gn[h], [Pe, Re] = f(re[0] ?? "details"), Be = _ ?? Pe, Ee = O(
|
|
156
|
+
(r) => {
|
|
157
|
+
const R = r;
|
|
158
|
+
_ === void 0 && Re(R), g == null || g(R);
|
|
159
|
+
},
|
|
160
|
+
[_, g]
|
|
161
|
+
), Oe = O(() => {
|
|
162
|
+
d == null || d({
|
|
163
|
+
title: P,
|
|
164
|
+
description: M || void 0,
|
|
165
|
+
startDate: F || void 0,
|
|
166
|
+
endDate: Q || void 0
|
|
379
167
|
});
|
|
380
|
-
}, [
|
|
381
|
-
|
|
382
|
-
name:
|
|
383
|
-
address:
|
|
384
|
-
virtualUrl:
|
|
385
|
-
isVirtual:
|
|
168
|
+
}, [P, M, F, Q, d]), $e = O(() => {
|
|
169
|
+
n == null || n({
|
|
170
|
+
name: j,
|
|
171
|
+
address: G || void 0,
|
|
172
|
+
virtualUrl: H || void 0,
|
|
173
|
+
isVirtual: U
|
|
386
174
|
});
|
|
387
|
-
}, [
|
|
388
|
-
if (
|
|
175
|
+
}, [j, G, H, U, n]), De = O(() => {
|
|
176
|
+
if (!$.trim() || !c)
|
|
389
177
|
return;
|
|
390
|
-
const r =
|
|
391
|
-
|
|
392
|
-
}, [
|
|
393
|
-
!
|
|
394
|
-
label:
|
|
395
|
-
amount: parseFloat(
|
|
396
|
-
currency:
|
|
397
|
-
}),
|
|
398
|
-
}, [
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
178
|
+
const r = K.split(",").map((R) => R.trim()).filter(Boolean);
|
|
179
|
+
c($.trim(), Y, r.length > 0 ? r : void 0), ie(""), te("");
|
|
180
|
+
}, [$, Y, K, c]), Ve = O(() => {
|
|
181
|
+
!D.trim() || !w || (w({
|
|
182
|
+
label: D.trim(),
|
|
183
|
+
amount: parseFloat(J) || 0,
|
|
184
|
+
currency: X
|
|
185
|
+
}), ae(""), le(""));
|
|
186
|
+
}, [D, J, X, w]), Me = I(
|
|
187
|
+
() => m.map((r) => ({
|
|
188
|
+
label: r.label,
|
|
189
|
+
amount: r.amount
|
|
190
|
+
})),
|
|
191
|
+
[m]
|
|
192
|
+
), Ue = I(() => m.reduce((r, R) => r + R.amount, 0), [m]), We = ((me = m[0]) == null ? void 0 : me.currency) ?? "PLN", qe = /* @__PURE__ */ i("div", { className: "nice-event-planning__form", children: [
|
|
193
|
+
/* @__PURE__ */ e(
|
|
194
|
+
T,
|
|
402
195
|
{
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
)
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
/* @__PURE__ */ t("label", { children: [
|
|
423
|
-
"Description",
|
|
424
|
-
/* @__PURE__ */ e(
|
|
425
|
-
"textarea",
|
|
426
|
-
{
|
|
427
|
-
value: c,
|
|
428
|
-
onChange: (r) => n(r.target.value),
|
|
429
|
-
readOnly: !f,
|
|
430
|
-
rows: 3
|
|
431
|
-
}
|
|
432
|
-
)
|
|
433
|
-
] }),
|
|
434
|
-
/* @__PURE__ */ t("label", { children: [
|
|
435
|
-
"Start",
|
|
196
|
+
label: "Title",
|
|
197
|
+
value: P,
|
|
198
|
+
onChange: V,
|
|
199
|
+
readOnly: !l
|
|
200
|
+
}
|
|
201
|
+
),
|
|
202
|
+
/* @__PURE__ */ e(
|
|
203
|
+
hn,
|
|
204
|
+
{
|
|
205
|
+
label: "Description",
|
|
206
|
+
value: M,
|
|
207
|
+
onChange: Ce,
|
|
208
|
+
readOnly: !l,
|
|
209
|
+
rows: 3
|
|
210
|
+
}
|
|
211
|
+
),
|
|
212
|
+
/* @__PURE__ */ i("div", { className: "nice-event-planning__row", children: [
|
|
213
|
+
/* @__PURE__ */ i("label", { className: "nice-field", children: [
|
|
214
|
+
/* @__PURE__ */ e("span", { className: "nice-field__label", children: "Start" }),
|
|
436
215
|
/* @__PURE__ */ e(
|
|
437
216
|
"input",
|
|
438
217
|
{
|
|
218
|
+
className: "nice-input",
|
|
439
219
|
type: "datetime-local",
|
|
440
|
-
value:
|
|
441
|
-
onChange: (r) =>
|
|
442
|
-
readOnly: !
|
|
220
|
+
value: F,
|
|
221
|
+
onChange: (r) => Se(r.target.value),
|
|
222
|
+
readOnly: !l
|
|
443
223
|
}
|
|
444
224
|
)
|
|
445
225
|
] }),
|
|
446
|
-
/* @__PURE__ */
|
|
447
|
-
"End",
|
|
226
|
+
/* @__PURE__ */ i("label", { className: "nice-field", children: [
|
|
227
|
+
/* @__PURE__ */ e("span", { className: "nice-field__label", children: "End" }),
|
|
448
228
|
/* @__PURE__ */ e(
|
|
449
229
|
"input",
|
|
450
230
|
{
|
|
231
|
+
className: "nice-input",
|
|
451
232
|
type: "datetime-local",
|
|
452
|
-
value:
|
|
453
|
-
onChange: (r) =>
|
|
454
|
-
readOnly: !
|
|
455
|
-
}
|
|
456
|
-
)
|
|
457
|
-
] }),
|
|
458
|
-
/* @__PURE__ */ t("div", { className: "nice-event-planning__status", children: [
|
|
459
|
-
"Status: ",
|
|
460
|
-
/* @__PURE__ */ e("strong", { children: a.status })
|
|
461
|
-
] }),
|
|
462
|
-
f && /* @__PURE__ */ e("button", { onClick: le, children: "Save Details" })
|
|
463
|
-
] }),
|
|
464
|
-
u === "location" && /* @__PURE__ */ t("div", { className: "nice-event-planning__section", children: [
|
|
465
|
-
/* @__PURE__ */ t("label", { children: [
|
|
466
|
-
/* @__PURE__ */ e(
|
|
467
|
-
"input",
|
|
468
|
-
{
|
|
469
|
-
type: "checkbox",
|
|
470
|
-
checked: B,
|
|
471
|
-
onChange: (r) => ie(r.target.checked),
|
|
472
|
-
disabled: !f
|
|
473
|
-
}
|
|
474
|
-
),
|
|
475
|
-
" ",
|
|
476
|
-
"Virtual event"
|
|
477
|
-
] }),
|
|
478
|
-
/* @__PURE__ */ t("label", { children: [
|
|
479
|
-
"Venue Name",
|
|
480
|
-
/* @__PURE__ */ e(
|
|
481
|
-
"input",
|
|
482
|
-
{
|
|
483
|
-
type: "text",
|
|
484
|
-
value: o,
|
|
485
|
-
onChange: (r) => I(r.target.value),
|
|
486
|
-
readOnly: !f
|
|
487
|
-
}
|
|
488
|
-
)
|
|
489
|
-
] }),
|
|
490
|
-
!B && /* @__PURE__ */ t("label", { children: [
|
|
491
|
-
"Address",
|
|
492
|
-
/* @__PURE__ */ e(
|
|
493
|
-
"input",
|
|
494
|
-
{
|
|
495
|
-
type: "text",
|
|
496
|
-
value: O,
|
|
497
|
-
onChange: (r) => te(r.target.value),
|
|
498
|
-
readOnly: !f
|
|
233
|
+
value: Q,
|
|
234
|
+
onChange: (r) => xe(r.target.value),
|
|
235
|
+
readOnly: !l
|
|
499
236
|
}
|
|
500
237
|
)
|
|
501
|
-
] })
|
|
502
|
-
B && /* @__PURE__ */ t("label", { children: [
|
|
503
|
-
"Virtual URL",
|
|
504
|
-
/* @__PURE__ */ e(
|
|
505
|
-
"input",
|
|
506
|
-
{
|
|
507
|
-
type: "url",
|
|
508
|
-
value: z,
|
|
509
|
-
onChange: (r) => ne(r.target.value),
|
|
510
|
-
readOnly: !f
|
|
511
|
-
}
|
|
512
|
-
)
|
|
513
|
-
] }),
|
|
514
|
-
f && /* @__PURE__ */ e("button", { onClick: re, children: "Save Location" })
|
|
238
|
+
] })
|
|
515
239
|
] }),
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
240
|
+
l && /* @__PURE__ */ e(
|
|
241
|
+
B,
|
|
242
|
+
{
|
|
243
|
+
variant: "primary",
|
|
244
|
+
leftIcon: /* @__PURE__ */ e(L, { name: "check", size: "sm" }),
|
|
245
|
+
onClick: Oe,
|
|
246
|
+
children: "Save details"
|
|
247
|
+
}
|
|
248
|
+
)
|
|
249
|
+
] }), Fe = /* @__PURE__ */ i("div", { className: "nice-event-planning__form", children: [
|
|
250
|
+
/* @__PURE__ */ e(
|
|
251
|
+
ge,
|
|
252
|
+
{
|
|
253
|
+
label: "Virtual event",
|
|
254
|
+
checked: U,
|
|
255
|
+
onChange: Ie,
|
|
256
|
+
disabled: !l
|
|
257
|
+
}
|
|
258
|
+
),
|
|
259
|
+
/* @__PURE__ */ e(
|
|
260
|
+
T,
|
|
261
|
+
{
|
|
262
|
+
label: "Venue name",
|
|
263
|
+
value: j,
|
|
264
|
+
onChange: we,
|
|
265
|
+
readOnly: !l
|
|
266
|
+
}
|
|
267
|
+
),
|
|
268
|
+
U ? /* @__PURE__ */ e(
|
|
269
|
+
T,
|
|
270
|
+
{
|
|
271
|
+
label: "Virtual URL",
|
|
272
|
+
value: H,
|
|
273
|
+
onChange: Ae,
|
|
274
|
+
readOnly: !l
|
|
275
|
+
}
|
|
276
|
+
) : /* @__PURE__ */ e(
|
|
277
|
+
T,
|
|
278
|
+
{
|
|
279
|
+
label: "Address",
|
|
280
|
+
value: G,
|
|
281
|
+
onChange: ze,
|
|
282
|
+
readOnly: !l
|
|
283
|
+
}
|
|
284
|
+
),
|
|
285
|
+
l && /* @__PURE__ */ e(
|
|
286
|
+
B,
|
|
287
|
+
{
|
|
288
|
+
variant: "primary",
|
|
289
|
+
leftIcon: /* @__PURE__ */ e(L, { name: "check", size: "sm" }),
|
|
290
|
+
onClick: $e,
|
|
291
|
+
children: "Save location"
|
|
292
|
+
}
|
|
293
|
+
)
|
|
294
|
+
] }), Qe = /* @__PURE__ */ e("div", { className: "nice-event-planning__participants", children: p.length === 0 ? /* @__PURE__ */ e("p", { className: "nice-event-planning__empty", children: "No participants yet." }) : /* @__PURE__ */ i(nn, { children: [
|
|
295
|
+
/* @__PURE__ */ e(he, { max: 8, children: p.map((r) => /* @__PURE__ */ e(Z, { name: r.name, src: r.avatarUrl }, r.id)) }),
|
|
296
|
+
/* @__PURE__ */ e("ul", { className: "nice-event-planning__participant-list", children: p.map((r) => /* @__PURE__ */ i("li", { className: "nice-event-planning__participant", children: [
|
|
297
|
+
/* @__PURE__ */ e(Z, { name: r.name, src: r.avatarUrl, size: "sm" }),
|
|
298
|
+
/* @__PURE__ */ e("span", { className: "nice-event-planning__participant-name", children: r.name }),
|
|
299
|
+
/* @__PURE__ */ e(W, { size: "xs", subtle: !0, variant: ee(r.status), children: r.status })
|
|
300
|
+
] }, r.id)) })
|
|
301
|
+
] }) }), je = /* @__PURE__ */ i("div", { className: "nice-event-planning__form", children: [
|
|
302
|
+
u.length === 0 ? /* @__PURE__ */ e("p", { className: "nice-event-planning__empty", children: "No surveys yet." }) : u.map((r) => /* @__PURE__ */ i("div", { className: "nice-event-planning__survey", children: [
|
|
303
|
+
/* @__PURE__ */ e("strong", { children: r.question }),
|
|
304
|
+
" ",
|
|
305
|
+
/* @__PURE__ */ e(W, { size: "xs", outline: !0, variant: "info", children: r.type }),
|
|
306
|
+
r.options && /* @__PURE__ */ e("div", { className: "nice-event-planning__survey-options", children: r.options.map((R, en) => /* @__PURE__ */ e(
|
|
307
|
+
B,
|
|
308
|
+
{
|
|
309
|
+
size: "sm",
|
|
310
|
+
variant: "outline",
|
|
311
|
+
onClick: () => a == null ? void 0 : a(r.id, R),
|
|
312
|
+
children: R
|
|
313
|
+
},
|
|
314
|
+
en
|
|
315
|
+
)) }),
|
|
316
|
+
r.responses && /* @__PURE__ */ i("span", { className: "nice-event-planning__muted", children: [
|
|
317
|
+
r.responses.length,
|
|
318
|
+
" responses"
|
|
564
319
|
] })
|
|
320
|
+
] }, r.id)),
|
|
321
|
+
l && c && /* @__PURE__ */ i("div", { className: "nice-event-planning__form", children: [
|
|
322
|
+
/* @__PURE__ */ e(
|
|
323
|
+
T,
|
|
324
|
+
{
|
|
325
|
+
label: "New survey question",
|
|
326
|
+
value: $,
|
|
327
|
+
onChange: ie,
|
|
328
|
+
placeholder: "Question"
|
|
329
|
+
}
|
|
330
|
+
),
|
|
331
|
+
/* @__PURE__ */ e(
|
|
332
|
+
ve,
|
|
333
|
+
{
|
|
334
|
+
label: "Type",
|
|
335
|
+
value: Y,
|
|
336
|
+
onChange: (r) => Le(r),
|
|
337
|
+
options: [
|
|
338
|
+
{ value: "single", label: "Single choice" },
|
|
339
|
+
{ value: "multiple", label: "Multiple choice" },
|
|
340
|
+
{ value: "text", label: "Free text" },
|
|
341
|
+
{ value: "rating", label: "Rating" }
|
|
342
|
+
]
|
|
343
|
+
}
|
|
344
|
+
),
|
|
345
|
+
/* @__PURE__ */ e(
|
|
346
|
+
T,
|
|
347
|
+
{
|
|
348
|
+
label: "Options (comma-separated)",
|
|
349
|
+
value: K,
|
|
350
|
+
onChange: te,
|
|
351
|
+
placeholder: "Yes, No, Maybe"
|
|
352
|
+
}
|
|
353
|
+
),
|
|
354
|
+
/* @__PURE__ */ e(
|
|
355
|
+
B,
|
|
356
|
+
{
|
|
357
|
+
variant: "primary",
|
|
358
|
+
leftIcon: /* @__PURE__ */ e(L, { name: "plus", size: "sm" }),
|
|
359
|
+
onClick: De,
|
|
360
|
+
disabled: !$.trim(),
|
|
361
|
+
children: "Add survey"
|
|
362
|
+
}
|
|
363
|
+
)
|
|
364
|
+
] })
|
|
365
|
+
] }), Ge = /* @__PURE__ */ i("div", { className: "nice-event-planning__form", children: [
|
|
366
|
+
m.length === 0 ? /* @__PURE__ */ e("p", { className: "nice-event-planning__empty", children: "No billing items yet." }) : /* @__PURE__ */ e(
|
|
367
|
+
pn,
|
|
368
|
+
{
|
|
369
|
+
lines: [...Me, { label: "Total", amount: Ue, isSummary: !0 }],
|
|
370
|
+
currency: We
|
|
371
|
+
}
|
|
372
|
+
),
|
|
373
|
+
l && w && /* @__PURE__ */ i("div", { className: "nice-event-planning__row", children: [
|
|
374
|
+
/* @__PURE__ */ e(
|
|
375
|
+
T,
|
|
376
|
+
{
|
|
377
|
+
label: "Item",
|
|
378
|
+
value: D,
|
|
379
|
+
onChange: ae,
|
|
380
|
+
placeholder: "Catering"
|
|
381
|
+
}
|
|
382
|
+
),
|
|
383
|
+
/* @__PURE__ */ e(
|
|
384
|
+
T,
|
|
385
|
+
{
|
|
386
|
+
label: "Amount",
|
|
387
|
+
value: J,
|
|
388
|
+
onChange: le,
|
|
389
|
+
placeholder: "0.00"
|
|
390
|
+
}
|
|
391
|
+
),
|
|
392
|
+
/* @__PURE__ */ e(
|
|
393
|
+
ve,
|
|
394
|
+
{
|
|
395
|
+
label: "Currency",
|
|
396
|
+
value: X,
|
|
397
|
+
onChange: (r) => Te(r),
|
|
398
|
+
options: ["PLN", "EUR", "USD", "GBP"]
|
|
399
|
+
}
|
|
400
|
+
),
|
|
401
|
+
/* @__PURE__ */ e(
|
|
402
|
+
B,
|
|
403
|
+
{
|
|
404
|
+
variant: "primary",
|
|
405
|
+
leftIcon: /* @__PURE__ */ e(L, { name: "plus", size: "sm" }),
|
|
406
|
+
onClick: Ve,
|
|
407
|
+
disabled: !D.trim(),
|
|
408
|
+
children: "Add"
|
|
409
|
+
}
|
|
410
|
+
)
|
|
411
|
+
] })
|
|
412
|
+
] }), He = /* @__PURE__ */ i("div", { className: "nice-event-planning__form", children: [
|
|
413
|
+
/* @__PURE__ */ e(ge, { label: "Public event", checked: t.isPublic ?? !1, disabled: !l }),
|
|
414
|
+
/* @__PURE__ */ e(
|
|
415
|
+
T,
|
|
416
|
+
{
|
|
417
|
+
label: "Max participants",
|
|
418
|
+
value: t.maxParticipants != null ? String(t.maxParticipants) : "",
|
|
419
|
+
onChange: () => {
|
|
420
|
+
},
|
|
421
|
+
readOnly: !l
|
|
422
|
+
}
|
|
423
|
+
),
|
|
424
|
+
/* @__PURE__ */ i("div", { className: "nice-event-planning__muted", children: [
|
|
425
|
+
"Host: ",
|
|
426
|
+
t.hostName,
|
|
427
|
+
" · Created ",
|
|
428
|
+
new Date(t.createdAt).toLocaleDateString()
|
|
429
|
+
] })
|
|
430
|
+
] }), Ye = {
|
|
431
|
+
details: qe,
|
|
432
|
+
location: Fe,
|
|
433
|
+
participants: Qe,
|
|
434
|
+
surveys: je,
|
|
435
|
+
budget: Ge,
|
|
436
|
+
settings: He
|
|
437
|
+
}, Ke = {
|
|
438
|
+
details: "file",
|
|
439
|
+
location: "home",
|
|
440
|
+
participants: "users",
|
|
441
|
+
surveys: "clipboard",
|
|
442
|
+
budget: "file",
|
|
443
|
+
settings: "settings"
|
|
444
|
+
}, Je = {
|
|
445
|
+
participants: p.length || void 0,
|
|
446
|
+
surveys: u.length || void 0,
|
|
447
|
+
budget: m.length || void 0
|
|
448
|
+
}, Xe = re.map((r) => ({
|
|
449
|
+
id: r,
|
|
450
|
+
label: r.charAt(0).toUpperCase() + r.slice(1),
|
|
451
|
+
icon: /* @__PURE__ */ e(L, { name: Ke[r], size: "sm" }),
|
|
452
|
+
badge: Je[r],
|
|
453
|
+
content: Ye[r]
|
|
454
|
+
})), Ze = /* @__PURE__ */ i("div", { className: "nice-event-planning__toolbar", children: [
|
|
455
|
+
/* @__PURE__ */ i("div", { className: "nice-event-planning__toolbar-title", children: [
|
|
456
|
+
/* @__PURE__ */ e(L, { name: "calendar", size: "md" }),
|
|
457
|
+
/* @__PURE__ */ e("span", { className: "nice-event-planning__title", children: t.title }),
|
|
458
|
+
/* @__PURE__ */ e(W, { size: "sm", variant: ee(t.status), children: t.status })
|
|
565
459
|
] }),
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
460
|
+
/* @__PURE__ */ e("span", { className: "nice-event-planning__toolbar-spacer" }),
|
|
461
|
+
/* @__PURE__ */ i("div", { className: "nice-event-planning__toolbar-actions", children: [
|
|
462
|
+
o && /* @__PURE__ */ e(
|
|
463
|
+
B,
|
|
464
|
+
{
|
|
465
|
+
size: "sm",
|
|
466
|
+
variant: "primary",
|
|
467
|
+
leftIcon: /* @__PURE__ */ e(L, { name: "check", size: "sm" }),
|
|
468
|
+
onClick: () => o({ title: P, description: M }),
|
|
469
|
+
children: "Save"
|
|
470
|
+
}
|
|
471
|
+
),
|
|
472
|
+
k && /* @__PURE__ */ e(
|
|
473
|
+
B,
|
|
474
|
+
{
|
|
475
|
+
size: "sm",
|
|
476
|
+
variant: "success",
|
|
477
|
+
leftIcon: /* @__PURE__ */ e(L, { name: "upload", size: "sm" }),
|
|
478
|
+
onClick: k,
|
|
479
|
+
children: "Publish"
|
|
480
|
+
}
|
|
481
|
+
),
|
|
482
|
+
y && /* @__PURE__ */ e(
|
|
483
|
+
B,
|
|
484
|
+
{
|
|
485
|
+
size: "sm",
|
|
486
|
+
variant: "ghost",
|
|
487
|
+
leftIcon: /* @__PURE__ */ e(L, { name: "link", size: "sm" }),
|
|
488
|
+
onClick: y,
|
|
489
|
+
children: "Share"
|
|
490
|
+
}
|
|
491
|
+
),
|
|
492
|
+
x && /* @__PURE__ */ e(
|
|
493
|
+
B,
|
|
494
|
+
{
|
|
495
|
+
size: "sm",
|
|
496
|
+
variant: "ghost",
|
|
497
|
+
leftIcon: /* @__PURE__ */ e(L, { name: "download", size: "sm" }),
|
|
498
|
+
onClick: x,
|
|
499
|
+
children: "Export"
|
|
500
|
+
}
|
|
501
|
+
)
|
|
502
|
+
] })
|
|
503
|
+
] });
|
|
504
|
+
return h === "micro" ? /* @__PURE__ */ e(
|
|
505
|
+
"div",
|
|
506
|
+
{
|
|
507
|
+
ref: C,
|
|
508
|
+
className: `nice-event-planning nice-event-planning--micro ${s ?? ""}`,
|
|
509
|
+
style: A,
|
|
510
|
+
children: /* @__PURE__ */ i("div", { className: "nice-event-planning__micro", children: [
|
|
511
|
+
/* @__PURE__ */ e(L, { name: "calendar", size: "md" }),
|
|
512
|
+
/* @__PURE__ */ i("div", { className: "nice-event-planning__micro-body", children: [
|
|
513
|
+
/* @__PURE__ */ e("span", { className: "nice-event-planning__title", children: t.title }),
|
|
514
|
+
/* @__PURE__ */ i("span", { className: "nice-event-planning__muted", children: [
|
|
515
|
+
t.startDate ? new Date(t.startDate).toLocaleString() : "No date",
|
|
516
|
+
(pe = t.location) != null && pe.name ? ` · ${t.location.name}` : ""
|
|
593
517
|
] })
|
|
594
|
-
] })
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
518
|
+
] }),
|
|
519
|
+
/* @__PURE__ */ e(W, { size: "sm", variant: ee(t.status), children: t.status }),
|
|
520
|
+
p.length > 0 && /* @__PURE__ */ e(he, { max: 4, size: "sm", children: p.map((r) => /* @__PURE__ */ e(Z, { name: r.name, src: r.avatarUrl, size: "sm" }, r.id)) })
|
|
521
|
+
] })
|
|
522
|
+
}
|
|
523
|
+
) : /* @__PURE__ */ i(
|
|
524
|
+
"div",
|
|
525
|
+
{
|
|
526
|
+
ref: C,
|
|
527
|
+
className: `nice-event-planning nice-event-planning--${h} ${s ?? ""}`,
|
|
528
|
+
style: A,
|
|
529
|
+
children: [
|
|
530
|
+
Ze,
|
|
606
531
|
/* @__PURE__ */ e(
|
|
607
|
-
|
|
532
|
+
un,
|
|
608
533
|
{
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
onChange:
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
step: 0.01
|
|
615
|
-
}
|
|
616
|
-
),
|
|
617
|
-
/* @__PURE__ */ t(
|
|
618
|
-
"select",
|
|
619
|
-
{
|
|
620
|
-
value: M,
|
|
621
|
-
onChange: (r) => ce(r.target.value),
|
|
622
|
-
children: [
|
|
623
|
-
/* @__PURE__ */ e("option", { value: "PLN", children: "PLN" }),
|
|
624
|
-
/* @__PURE__ */ e("option", { value: "EUR", children: "EUR" }),
|
|
625
|
-
/* @__PURE__ */ e("option", { value: "USD", children: "USD" }),
|
|
626
|
-
/* @__PURE__ */ e("option", { value: "GBP", children: "GBP" })
|
|
627
|
-
]
|
|
534
|
+
tabs: Xe,
|
|
535
|
+
activeTab: Be,
|
|
536
|
+
onChange: Ee,
|
|
537
|
+
iconOnly: S,
|
|
538
|
+
centered: b
|
|
628
539
|
}
|
|
629
|
-
)
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
] });
|
|
540
|
+
)
|
|
541
|
+
]
|
|
542
|
+
}
|
|
543
|
+
);
|
|
634
544
|
}
|
|
635
|
-
),
|
|
545
|
+
), yn = {
|
|
636
546
|
upcoming: "⏳",
|
|
637
547
|
active: "▶️",
|
|
638
548
|
voting: "🗳️",
|
|
639
549
|
scored: "📊",
|
|
640
550
|
completed: "✅",
|
|
641
551
|
skipped: "⏭️"
|
|
642
|
-
},
|
|
552
|
+
}, fn = {
|
|
643
553
|
upcoming: "#9ca3af",
|
|
644
554
|
active: "#22c55e",
|
|
645
555
|
voting: "#eab308",
|
|
646
556
|
scored: "#3b82f6",
|
|
647
557
|
completed: "#6b7280",
|
|
648
558
|
skipped: "#d1d5db"
|
|
649
|
-
},
|
|
650
|
-
function(
|
|
559
|
+
}, An = E(
|
|
560
|
+
function(N, C) {
|
|
651
561
|
const {
|
|
652
|
-
rounds:
|
|
653
|
-
activeRoundId:
|
|
654
|
-
onSelect:
|
|
655
|
-
onStart:
|
|
656
|
-
onEnd:
|
|
657
|
-
onCreate:
|
|
658
|
-
editable:
|
|
659
|
-
className:
|
|
660
|
-
style:
|
|
661
|
-
} =
|
|
662
|
-
return /* @__PURE__ */
|
|
663
|
-
/* @__PURE__ */
|
|
664
|
-
/* @__PURE__ */
|
|
562
|
+
rounds: t,
|
|
563
|
+
activeRoundId: p,
|
|
564
|
+
onSelect: u,
|
|
565
|
+
onStart: m,
|
|
566
|
+
onEnd: h,
|
|
567
|
+
onCreate: v,
|
|
568
|
+
editable: _ = !1,
|
|
569
|
+
className: g,
|
|
570
|
+
style: S
|
|
571
|
+
} = N, b = [...t].sort((l, o) => l.order - o.order);
|
|
572
|
+
return /* @__PURE__ */ i("div", { ref: C, className: `nice-round-list ${g ?? ""}`, style: S, children: [
|
|
573
|
+
/* @__PURE__ */ i("div", { className: "nice-round-list__header", children: [
|
|
574
|
+
/* @__PURE__ */ i("h3", { children: [
|
|
665
575
|
"Rounds (",
|
|
666
|
-
|
|
576
|
+
t.length,
|
|
667
577
|
")"
|
|
668
578
|
] }),
|
|
669
|
-
|
|
579
|
+
_ && v && /* @__PURE__ */ e("button", { onClick: v, children: "+ Add Round" })
|
|
670
580
|
] }),
|
|
671
|
-
|
|
672
|
-
const
|
|
673
|
-
return /* @__PURE__ */
|
|
581
|
+
b.length === 0 ? /* @__PURE__ */ e("p", { className: "nice-round-list__empty", children: "No rounds yet." }) : /* @__PURE__ */ e("div", { className: "nice-round-list__items", children: b.map((l) => {
|
|
582
|
+
const o = l.id === p;
|
|
583
|
+
return /* @__PURE__ */ i(
|
|
674
584
|
"div",
|
|
675
585
|
{
|
|
676
|
-
className: `nice-round-list__item ${
|
|
677
|
-
onClick: () =>
|
|
678
|
-
role:
|
|
679
|
-
tabIndex:
|
|
586
|
+
className: `nice-round-list__item ${o ? "nice-round-list__item--active" : ""}`,
|
|
587
|
+
onClick: () => u == null ? void 0 : u(l),
|
|
588
|
+
role: u ? "button" : void 0,
|
|
589
|
+
tabIndex: u ? 0 : void 0,
|
|
680
590
|
children: [
|
|
681
|
-
/* @__PURE__ */
|
|
591
|
+
/* @__PURE__ */ i("span", { className: "nice-round-list__order", children: [
|
|
682
592
|
"#",
|
|
683
|
-
|
|
593
|
+
l.order
|
|
684
594
|
] }),
|
|
685
|
-
/* @__PURE__ */ e("span", { className: "nice-round-list__icon", children:
|
|
686
|
-
/* @__PURE__ */
|
|
687
|
-
/* @__PURE__ */ e("strong", { className: "nice-round-list__name", children:
|
|
688
|
-
|
|
689
|
-
|
|
595
|
+
/* @__PURE__ */ e("span", { className: "nice-round-list__icon", children: yn[l.status] }),
|
|
596
|
+
/* @__PURE__ */ i("div", { className: "nice-round-list__info", children: [
|
|
597
|
+
/* @__PURE__ */ e("strong", { className: "nice-round-list__name", children: l.name }),
|
|
598
|
+
l.description && /* @__PURE__ */ e("small", { children: l.description }),
|
|
599
|
+
l.type && /* @__PURE__ */ e("span", { className: "nice-round-list__type", children: l.type })
|
|
690
600
|
] }),
|
|
691
601
|
/* @__PURE__ */ e(
|
|
692
602
|
"span",
|
|
693
603
|
{
|
|
694
604
|
className: "nice-round-list__status",
|
|
695
|
-
style: { color:
|
|
696
|
-
children:
|
|
605
|
+
style: { color: fn[l.status] },
|
|
606
|
+
children: l.status
|
|
697
607
|
}
|
|
698
608
|
),
|
|
699
|
-
|
|
700
|
-
|
|
609
|
+
l.durationMinutes && /* @__PURE__ */ i("span", { className: "nice-round-list__duration", children: [
|
|
610
|
+
l.durationMinutes,
|
|
701
611
|
"m"
|
|
702
612
|
] }),
|
|
703
|
-
|
|
613
|
+
l.winnerIds && l.winnerIds.length > 0 && /* @__PURE__ */ i("span", { className: "nice-round-list__winners", children: [
|
|
704
614
|
"🏆 ",
|
|
705
|
-
|
|
615
|
+
l.winnerIds.length
|
|
706
616
|
] }),
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
(
|
|
617
|
+
_ && /* @__PURE__ */ i("div", { className: "nice-round-list__actions", onClick: (k) => k.stopPropagation(), children: [
|
|
618
|
+
l.status === "upcoming" && m && /* @__PURE__ */ e("button", { onClick: () => m(l.id), children: "Start" }),
|
|
619
|
+
(l.status === "active" || l.status === "voting") && h && /* @__PURE__ */ e("button", { onClick: () => h(l.id), children: "End" })
|
|
710
620
|
] })
|
|
711
621
|
]
|
|
712
622
|
},
|
|
713
|
-
|
|
623
|
+
l.id
|
|
714
624
|
);
|
|
715
625
|
}) })
|
|
716
626
|
] });
|
|
717
627
|
}
|
|
718
|
-
),
|
|
719
|
-
function(
|
|
628
|
+
), In = E(
|
|
629
|
+
function(N, C) {
|
|
720
630
|
const {
|
|
721
|
-
round:
|
|
722
|
-
timerRunning:
|
|
723
|
-
remainingSeconds:
|
|
724
|
-
onSubmitScore:
|
|
725
|
-
onStart:
|
|
726
|
-
onEnd:
|
|
727
|
-
onSkip:
|
|
728
|
-
editable:
|
|
729
|
-
footerActions:
|
|
730
|
-
className:
|
|
731
|
-
style:
|
|
732
|
-
} =
|
|
631
|
+
round: t,
|
|
632
|
+
timerRunning: p = !1,
|
|
633
|
+
remainingSeconds: u,
|
|
634
|
+
onSubmitScore: m,
|
|
635
|
+
onStart: h,
|
|
636
|
+
onEnd: v,
|
|
637
|
+
onSkip: _,
|
|
638
|
+
editable: g = !1,
|
|
639
|
+
footerActions: S,
|
|
640
|
+
className: b,
|
|
641
|
+
style: l
|
|
642
|
+
} = N, [o, k] = f({}), y = O(
|
|
733
643
|
(n) => {
|
|
734
|
-
const
|
|
735
|
-
isNaN(
|
|
644
|
+
const c = parseFloat(o[n] ?? "");
|
|
645
|
+
isNaN(c) || !m || (m(n, c), k((a) => ({ ...a, [n]: "" })));
|
|
736
646
|
},
|
|
737
|
-
[
|
|
738
|
-
),
|
|
739
|
-
const
|
|
740
|
-
return `${
|
|
741
|
-
},
|
|
742
|
-
return /* @__PURE__ */
|
|
647
|
+
[o, m]
|
|
648
|
+
), x = (n) => {
|
|
649
|
+
const c = Math.floor(n / 60), a = n % 60;
|
|
650
|
+
return `${c}:${a.toString().padStart(2, "0")}`;
|
|
651
|
+
}, d = t.scores ? [...t.scores].sort((n, c) => c.score - n.score) : [];
|
|
652
|
+
return /* @__PURE__ */ i(
|
|
743
653
|
"div",
|
|
744
654
|
{
|
|
745
|
-
ref:
|
|
746
|
-
className: `nice-round-card nice-round-card--${
|
|
747
|
-
style:
|
|
655
|
+
ref: C,
|
|
656
|
+
className: `nice-round-card nice-round-card--${t.status} ${b ?? ""}`,
|
|
657
|
+
style: l,
|
|
748
658
|
children: [
|
|
749
|
-
/* @__PURE__ */
|
|
750
|
-
/* @__PURE__ */
|
|
659
|
+
/* @__PURE__ */ i("div", { className: "nice-round-card__header", children: [
|
|
660
|
+
/* @__PURE__ */ i("span", { className: "nice-round-card__order", children: [
|
|
751
661
|
"Round #",
|
|
752
|
-
|
|
662
|
+
t.order
|
|
753
663
|
] }),
|
|
754
|
-
/* @__PURE__ */ e("h3", { className: "nice-round-card__name", children:
|
|
755
|
-
/* @__PURE__ */ e("span", { className: "nice-round-card__status", children:
|
|
664
|
+
/* @__PURE__ */ e("h3", { className: "nice-round-card__name", children: t.name }),
|
|
665
|
+
/* @__PURE__ */ e("span", { className: "nice-round-card__status", children: t.status })
|
|
756
666
|
] }),
|
|
757
|
-
|
|
758
|
-
(
|
|
667
|
+
t.description && /* @__PURE__ */ e("p", { className: "nice-round-card__description", children: t.description }),
|
|
668
|
+
(p || u != null) && /* @__PURE__ */ i(
|
|
759
669
|
"div",
|
|
760
670
|
{
|
|
761
|
-
className: `nice-round-card__timer ${
|
|
671
|
+
className: `nice-round-card__timer ${p ? "nice-round-card__timer--running" : ""}`,
|
|
762
672
|
children: [
|
|
763
673
|
"⏱️ ",
|
|
764
|
-
|
|
674
|
+
u != null ? x(u) : "—"
|
|
765
675
|
]
|
|
766
676
|
}
|
|
767
677
|
),
|
|
768
|
-
|
|
678
|
+
d.length > 0 && /* @__PURE__ */ i("div", { className: "nice-round-card__scoreboard", children: [
|
|
769
679
|
/* @__PURE__ */ e("h4", { children: "Scoreboard" }),
|
|
770
|
-
/* @__PURE__ */
|
|
771
|
-
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */
|
|
680
|
+
/* @__PURE__ */ i("table", { className: "nice-round-card__scores-table", children: [
|
|
681
|
+
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ i("tr", { children: [
|
|
772
682
|
/* @__PURE__ */ e("th", { children: "Rank" }),
|
|
773
683
|
/* @__PURE__ */ e("th", { children: "Participant" }),
|
|
774
684
|
/* @__PURE__ */ e("th", { children: "Score" })
|
|
775
685
|
] }) }),
|
|
776
|
-
/* @__PURE__ */ e("tbody", { children:
|
|
686
|
+
/* @__PURE__ */ e("tbody", { children: d.map((n, c) => /* @__PURE__ */ i(
|
|
777
687
|
"tr",
|
|
778
688
|
{
|
|
779
|
-
className:
|
|
689
|
+
className: c < 3 ? `nice-round-card__top-${c + 1}` : "",
|
|
780
690
|
children: [
|
|
781
|
-
/* @__PURE__ */
|
|
782
|
-
n.rank ??
|
|
783
|
-
|
|
691
|
+
/* @__PURE__ */ i("td", { children: [
|
|
692
|
+
n.rank ?? c + 1,
|
|
693
|
+
c === 0 ? " 🥇" : c === 1 ? " 🥈" : c === 2 ? " 🥉" : ""
|
|
784
694
|
] }),
|
|
785
695
|
/* @__PURE__ */ e("td", { children: n.participantName }),
|
|
786
696
|
/* @__PURE__ */ e("td", { children: n.score })
|
|
@@ -790,123 +700,123 @@ const be = P(
|
|
|
790
700
|
)) })
|
|
791
701
|
] })
|
|
792
702
|
] }),
|
|
793
|
-
|
|
703
|
+
m && (t.status === "active" || t.status === "voting") && d.length > 0 && /* @__PURE__ */ i("div", { className: "nice-round-card__score-input", children: [
|
|
794
704
|
/* @__PURE__ */ e("h4", { children: "Submit Scores" }),
|
|
795
|
-
|
|
705
|
+
d.map((n) => /* @__PURE__ */ i("div", { className: "nice-round-card__score-row", children: [
|
|
796
706
|
/* @__PURE__ */ e("span", { children: n.participantName }),
|
|
797
707
|
/* @__PURE__ */ e(
|
|
798
708
|
"input",
|
|
799
709
|
{
|
|
800
710
|
type: "number",
|
|
801
|
-
value:
|
|
802
|
-
onChange: (
|
|
711
|
+
value: o[n.participantId] ?? "",
|
|
712
|
+
onChange: (c) => k((a) => ({ ...a, [n.participantId]: c.target.value })),
|
|
803
713
|
min: 0,
|
|
804
714
|
step: 1,
|
|
805
715
|
placeholder: "Score"
|
|
806
716
|
}
|
|
807
717
|
),
|
|
808
|
-
/* @__PURE__ */ e("button", { onClick: () =>
|
|
718
|
+
/* @__PURE__ */ e("button", { onClick: () => y(n.participantId), children: "Submit" })
|
|
809
719
|
] }, n.participantId))
|
|
810
720
|
] }),
|
|
811
|
-
/* @__PURE__ */
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
(
|
|
815
|
-
|
|
721
|
+
/* @__PURE__ */ i("div", { className: "nice-round-card__footer", children: [
|
|
722
|
+
g && /* @__PURE__ */ i("div", { className: "nice-round-card__actions", children: [
|
|
723
|
+
t.status === "upcoming" && h && /* @__PURE__ */ e("button", { onClick: h, children: "▶ Start Round" }),
|
|
724
|
+
(t.status === "active" || t.status === "voting") && v && /* @__PURE__ */ e("button", { onClick: v, children: "⏹ End Round" }),
|
|
725
|
+
t.status === "upcoming" && _ && /* @__PURE__ */ e("button", { onClick: _, children: "⏭ Skip" })
|
|
816
726
|
] }),
|
|
817
|
-
|
|
727
|
+
S
|
|
818
728
|
] }),
|
|
819
|
-
|
|
729
|
+
t.winnerIds && t.winnerIds.length > 0 && /* @__PURE__ */ i("div", { className: "nice-round-card__winners", children: [
|
|
820
730
|
"🏆 Winners: ",
|
|
821
|
-
|
|
731
|
+
t.winnerIds.length
|
|
822
732
|
] })
|
|
823
733
|
]
|
|
824
734
|
}
|
|
825
735
|
);
|
|
826
736
|
}
|
|
827
|
-
),
|
|
828
|
-
function(
|
|
737
|
+
), Ln = E(
|
|
738
|
+
function(N, C) {
|
|
829
739
|
const {
|
|
830
|
-
songs:
|
|
831
|
-
onAdd:
|
|
832
|
-
onRemove:
|
|
833
|
-
onVote:
|
|
834
|
-
onSearch:
|
|
835
|
-
showQueue:
|
|
836
|
-
readOnly:
|
|
837
|
-
className:
|
|
838
|
-
style:
|
|
839
|
-
} =
|
|
840
|
-
if (!
|
|
841
|
-
return
|
|
842
|
-
const n =
|
|
843
|
-
return
|
|
844
|
-
(
|
|
740
|
+
songs: t,
|
|
741
|
+
onAdd: p,
|
|
742
|
+
onRemove: u,
|
|
743
|
+
onVote: m,
|
|
744
|
+
onSearch: h,
|
|
745
|
+
showQueue: v = !0,
|
|
746
|
+
readOnly: _ = !1,
|
|
747
|
+
className: g,
|
|
748
|
+
style: S
|
|
749
|
+
} = N, [b, l] = f(""), o = I(() => {
|
|
750
|
+
if (!b.trim())
|
|
751
|
+
return t;
|
|
752
|
+
const n = b.toLowerCase();
|
|
753
|
+
return t.filter(
|
|
754
|
+
(c) => c.title.toLowerCase().includes(n) || c.artist.toLowerCase().includes(n)
|
|
845
755
|
);
|
|
846
|
-
}, [
|
|
847
|
-
|
|
848
|
-
},
|
|
756
|
+
}, [t, b]), k = I(() => t.filter((n) => n.isQueued), [t]), y = t.find((n) => n.isPlaying), x = (n) => {
|
|
757
|
+
l(n), h == null || h(n);
|
|
758
|
+
}, d = (n) => {
|
|
849
759
|
if (!n)
|
|
850
760
|
return "";
|
|
851
|
-
const
|
|
852
|
-
return `${
|
|
761
|
+
const c = Math.floor(n / 60), a = n % 60;
|
|
762
|
+
return `${c}:${a.toString().padStart(2, "0")}`;
|
|
853
763
|
};
|
|
854
|
-
return /* @__PURE__ */
|
|
855
|
-
|
|
764
|
+
return /* @__PURE__ */ i("div", { ref: C, className: `nice-song-picker ${g ?? ""}`, style: S, children: [
|
|
765
|
+
y && /* @__PURE__ */ i("div", { className: "nice-song-picker__now-playing", children: [
|
|
856
766
|
/* @__PURE__ */ e("span", { className: "nice-song-picker__np-label", children: "🎵 Now Playing" }),
|
|
857
|
-
|
|
858
|
-
/* @__PURE__ */ e("strong", { children:
|
|
859
|
-
/* @__PURE__ */ e("span", { children:
|
|
767
|
+
y.albumArt && /* @__PURE__ */ e("img", { src: y.albumArt, alt: "", className: "nice-song-picker__album-art" }),
|
|
768
|
+
/* @__PURE__ */ e("strong", { children: y.title }),
|
|
769
|
+
/* @__PURE__ */ e("span", { children: y.artist })
|
|
860
770
|
] }),
|
|
861
771
|
/* @__PURE__ */ e(
|
|
862
772
|
"input",
|
|
863
773
|
{
|
|
864
774
|
type: "text",
|
|
865
|
-
value:
|
|
866
|
-
onChange: (n) =>
|
|
775
|
+
value: b,
|
|
776
|
+
onChange: (n) => x(n.target.value),
|
|
867
777
|
placeholder: "Search songs…",
|
|
868
778
|
className: "nice-song-picker__search"
|
|
869
779
|
}
|
|
870
780
|
),
|
|
871
|
-
/* @__PURE__ */ e("div", { className: "nice-song-picker__list", children:
|
|
781
|
+
/* @__PURE__ */ e("div", { className: "nice-song-picker__list", children: o.length === 0 ? /* @__PURE__ */ e("p", { className: "nice-song-picker__empty", children: "No songs found." }) : o.map((n) => /* @__PURE__ */ i(
|
|
872
782
|
"div",
|
|
873
783
|
{
|
|
874
784
|
className: `nice-song-picker__item ${n.isPlaying ? "nice-song-picker__item--playing" : ""}`,
|
|
875
785
|
children: [
|
|
876
786
|
n.albumArt && /* @__PURE__ */ e("img", { src: n.albumArt, alt: "", className: "nice-song-picker__thumb" }),
|
|
877
|
-
/* @__PURE__ */
|
|
787
|
+
/* @__PURE__ */ i("div", { className: "nice-song-picker__info", children: [
|
|
878
788
|
/* @__PURE__ */ e("strong", { children: n.title }),
|
|
879
789
|
/* @__PURE__ */ e("span", { children: n.artist }),
|
|
880
|
-
n.duration && /* @__PURE__ */ e("span", { className: "nice-song-picker__duration", children:
|
|
881
|
-
n.addedByName && /* @__PURE__ */
|
|
790
|
+
n.duration && /* @__PURE__ */ e("span", { className: "nice-song-picker__duration", children: d(n.duration) }),
|
|
791
|
+
n.addedByName && /* @__PURE__ */ i("small", { children: [
|
|
882
792
|
"Added by ",
|
|
883
793
|
n.addedByName
|
|
884
794
|
] })
|
|
885
795
|
] }),
|
|
886
|
-
!
|
|
887
|
-
|
|
796
|
+
!_ && /* @__PURE__ */ i("div", { className: "nice-song-picker__actions", children: [
|
|
797
|
+
m && /* @__PURE__ */ i("button", { onClick: () => m(n.id), children: [
|
|
888
798
|
"👍 ",
|
|
889
799
|
n.votes ?? 0
|
|
890
800
|
] }),
|
|
891
|
-
|
|
892
|
-
|
|
801
|
+
p && !n.isQueued && /* @__PURE__ */ e("button", { onClick: () => p(n.id), children: "+ Queue" }),
|
|
802
|
+
u && n.isQueued && /* @__PURE__ */ e("button", { onClick: () => u(n.id), children: "Remove" })
|
|
893
803
|
] })
|
|
894
804
|
]
|
|
895
805
|
},
|
|
896
806
|
n.id
|
|
897
807
|
)) }),
|
|
898
|
-
|
|
899
|
-
/* @__PURE__ */
|
|
808
|
+
v && k.length > 0 && /* @__PURE__ */ i("div", { className: "nice-song-picker__queue", children: [
|
|
809
|
+
/* @__PURE__ */ i("h4", { children: [
|
|
900
810
|
"Queue (",
|
|
901
811
|
k.length,
|
|
902
812
|
")"
|
|
903
813
|
] }),
|
|
904
|
-
k.map((n,
|
|
905
|
-
/* @__PURE__ */
|
|
906
|
-
|
|
814
|
+
k.map((n, c) => /* @__PURE__ */ i("div", { className: "nice-song-picker__queue-item", children: [
|
|
815
|
+
/* @__PURE__ */ i("span", { className: "nice-song-picker__queue-pos", children: [
|
|
816
|
+
c + 1,
|
|
907
817
|
"."
|
|
908
818
|
] }),
|
|
909
|
-
/* @__PURE__ */
|
|
819
|
+
/* @__PURE__ */ i("span", { children: [
|
|
910
820
|
n.title,
|
|
911
821
|
" — ",
|
|
912
822
|
n.artist
|
|
@@ -915,29 +825,29 @@ const be = P(
|
|
|
915
825
|
] })
|
|
916
826
|
] });
|
|
917
827
|
}
|
|
918
|
-
),
|
|
919
|
-
function(
|
|
828
|
+
), Tn = E(
|
|
829
|
+
function(N, C) {
|
|
920
830
|
const {
|
|
921
|
-
songs:
|
|
922
|
-
queue:
|
|
923
|
-
onEnqueue:
|
|
924
|
-
onDequeue:
|
|
925
|
-
onNext:
|
|
926
|
-
nowPlayingId:
|
|
927
|
-
readOnly:
|
|
928
|
-
className:
|
|
929
|
-
style:
|
|
930
|
-
} =
|
|
931
|
-
let
|
|
932
|
-
if (
|
|
933
|
-
const
|
|
934
|
-
|
|
935
|
-
(
|
|
831
|
+
songs: t,
|
|
832
|
+
queue: p = [],
|
|
833
|
+
onEnqueue: u,
|
|
834
|
+
onDequeue: m,
|
|
835
|
+
onNext: h,
|
|
836
|
+
nowPlayingId: v,
|
|
837
|
+
readOnly: _ = !1,
|
|
838
|
+
className: g,
|
|
839
|
+
style: S
|
|
840
|
+
} = N, [b, l] = f(""), [o, k] = f(""), y = t.find((a) => a.id === v), x = I(() => {
|
|
841
|
+
let a = t;
|
|
842
|
+
if (b.trim()) {
|
|
843
|
+
const w = b.toLowerCase();
|
|
844
|
+
a = a.filter(
|
|
845
|
+
(s) => s.title.toLowerCase().includes(w) || s.artist.toLowerCase().includes(w)
|
|
936
846
|
);
|
|
937
847
|
}
|
|
938
|
-
return
|
|
939
|
-
}, [
|
|
940
|
-
switch (
|
|
848
|
+
return o && (a = a.filter((w) => w.difficulty === o)), a;
|
|
849
|
+
}, [t, b, o]), d = I(() => new Set(p.map((a) => a.id)), [p]), n = ["easy", "medium", "hard", "expert"], c = (a) => {
|
|
850
|
+
switch (a) {
|
|
941
851
|
case "easy":
|
|
942
852
|
return "#4caf50";
|
|
943
853
|
case "medium":
|
|
@@ -950,8 +860,8 @@ const be = P(
|
|
|
950
860
|
return "#999";
|
|
951
861
|
}
|
|
952
862
|
};
|
|
953
|
-
return /* @__PURE__ */
|
|
954
|
-
|
|
863
|
+
return /* @__PURE__ */ i("div", { ref: C, className: `nice-karaoke-picker ${g ?? ""}`, style: S, children: [
|
|
864
|
+
y && /* @__PURE__ */ i(
|
|
955
865
|
"div",
|
|
956
866
|
{
|
|
957
867
|
className: "nice-karaoke-picker__now-singing",
|
|
@@ -963,21 +873,21 @@ const be = P(
|
|
|
963
873
|
},
|
|
964
874
|
children: [
|
|
965
875
|
/* @__PURE__ */ e("span", { style: { fontWeight: 600 }, children: "🎤 Now Singing" }),
|
|
966
|
-
/* @__PURE__ */
|
|
967
|
-
/* @__PURE__ */ e("strong", { children:
|
|
876
|
+
/* @__PURE__ */ i("div", { children: [
|
|
877
|
+
/* @__PURE__ */ e("strong", { children: y.title }),
|
|
968
878
|
" — ",
|
|
969
|
-
|
|
970
|
-
|
|
879
|
+
y.artist,
|
|
880
|
+
y.performerName && /* @__PURE__ */ i("span", { children: [
|
|
971
881
|
" (by ",
|
|
972
|
-
|
|
882
|
+
y.performerName,
|
|
973
883
|
")"
|
|
974
884
|
] })
|
|
975
885
|
] }),
|
|
976
|
-
!
|
|
886
|
+
!_ && h && /* @__PURE__ */ e("button", { onClick: h, style: { marginTop: 8 }, children: "Skip / Next ⏭" })
|
|
977
887
|
]
|
|
978
888
|
}
|
|
979
889
|
),
|
|
980
|
-
/* @__PURE__ */
|
|
890
|
+
/* @__PURE__ */ i(
|
|
981
891
|
"div",
|
|
982
892
|
{
|
|
983
893
|
className: "nice-karaoke-picker__filters",
|
|
@@ -987,20 +897,20 @@ const be = P(
|
|
|
987
897
|
"input",
|
|
988
898
|
{
|
|
989
899
|
type: "text",
|
|
990
|
-
value:
|
|
991
|
-
onChange: (
|
|
900
|
+
value: b,
|
|
901
|
+
onChange: (a) => l(a.target.value),
|
|
992
902
|
placeholder: "Search songs or artists…",
|
|
993
903
|
style: { flex: 1 }
|
|
994
904
|
}
|
|
995
905
|
),
|
|
996
|
-
/* @__PURE__ */
|
|
906
|
+
/* @__PURE__ */ i("select", { value: o, onChange: (a) => k(a.target.value), children: [
|
|
997
907
|
/* @__PURE__ */ e("option", { value: "", children: "All Difficulties" }),
|
|
998
|
-
n.map((
|
|
908
|
+
n.map((a) => /* @__PURE__ */ e("option", { value: a, children: a }, a))
|
|
999
909
|
] })
|
|
1000
910
|
]
|
|
1001
911
|
}
|
|
1002
912
|
),
|
|
1003
|
-
/* @__PURE__ */ e("div", { className: "nice-karaoke-picker__catalog", children:
|
|
913
|
+
/* @__PURE__ */ e("div", { className: "nice-karaoke-picker__catalog", children: x.length === 0 ? /* @__PURE__ */ e("p", { children: "No songs match your search." }) : x.map((a) => /* @__PURE__ */ i(
|
|
1004
914
|
"div",
|
|
1005
915
|
{
|
|
1006
916
|
className: "nice-karaoke-picker__song",
|
|
@@ -1012,81 +922,81 @@ const be = P(
|
|
|
1012
922
|
borderBottom: "1px solid #eee"
|
|
1013
923
|
},
|
|
1014
924
|
children: [
|
|
1015
|
-
/* @__PURE__ */
|
|
1016
|
-
/* @__PURE__ */ e("strong", { children:
|
|
925
|
+
/* @__PURE__ */ i("div", { children: [
|
|
926
|
+
/* @__PURE__ */ e("strong", { children: a.title }),
|
|
1017
927
|
" — ",
|
|
1018
|
-
|
|
1019
|
-
|
|
928
|
+
a.artist,
|
|
929
|
+
a.difficulty && /* @__PURE__ */ i(
|
|
1020
930
|
"span",
|
|
1021
931
|
{
|
|
1022
932
|
style: {
|
|
1023
933
|
marginLeft: 8,
|
|
1024
934
|
fontSize: 12,
|
|
1025
|
-
color:
|
|
935
|
+
color: c(a.difficulty),
|
|
1026
936
|
fontWeight: 600
|
|
1027
937
|
},
|
|
1028
938
|
children: [
|
|
1029
939
|
"[",
|
|
1030
|
-
|
|
940
|
+
a.difficulty,
|
|
1031
941
|
"]"
|
|
1032
942
|
]
|
|
1033
943
|
}
|
|
1034
944
|
),
|
|
1035
|
-
|
|
1036
|
-
|
|
945
|
+
a.hasLyrics && /* @__PURE__ */ e("span", { style: { marginLeft: 6, fontSize: 12 }, title: "Lyrics available", children: "📝" }),
|
|
946
|
+
a.language && /* @__PURE__ */ i("span", { style: { marginLeft: 6, fontSize: 12, color: "#666" }, children: [
|
|
1037
947
|
"(",
|
|
1038
|
-
|
|
948
|
+
a.language,
|
|
1039
949
|
")"
|
|
1040
950
|
] })
|
|
1041
951
|
] }),
|
|
1042
|
-
!
|
|
952
|
+
!_ && /* @__PURE__ */ e("div", { children: d.has(a.id) ? /* @__PURE__ */ e("button", { onClick: () => m == null ? void 0 : m(a.id), style: { color: "#f44336" }, children: "Remove" }) : /* @__PURE__ */ e("button", { onClick: () => u == null ? void 0 : u(a.id), children: "🎤 Sing" }) })
|
|
1043
953
|
]
|
|
1044
954
|
},
|
|
1045
|
-
|
|
955
|
+
a.id
|
|
1046
956
|
)) }),
|
|
1047
|
-
|
|
1048
|
-
/* @__PURE__ */
|
|
957
|
+
p.length > 0 && /* @__PURE__ */ i("div", { className: "nice-karaoke-picker__queue", style: { marginTop: 16 }, children: [
|
|
958
|
+
/* @__PURE__ */ i("h4", { children: [
|
|
1049
959
|
"🎶 Queue (",
|
|
1050
|
-
|
|
960
|
+
p.length,
|
|
1051
961
|
")"
|
|
1052
962
|
] }),
|
|
1053
|
-
|
|
963
|
+
p.map((a, w) => /* @__PURE__ */ i(
|
|
1054
964
|
"div",
|
|
1055
965
|
{
|
|
1056
966
|
style: { display: "flex", justifyContent: "space-between", padding: "4px 0" },
|
|
1057
967
|
children: [
|
|
1058
|
-
/* @__PURE__ */
|
|
1059
|
-
/* @__PURE__ */
|
|
1060
|
-
|
|
968
|
+
/* @__PURE__ */ i("span", { children: [
|
|
969
|
+
/* @__PURE__ */ i("strong", { children: [
|
|
970
|
+
w + 1,
|
|
1061
971
|
"."
|
|
1062
972
|
] }),
|
|
1063
973
|
" ",
|
|
1064
|
-
|
|
974
|
+
a.title,
|
|
1065
975
|
" — ",
|
|
1066
|
-
|
|
1067
|
-
|
|
976
|
+
a.artist,
|
|
977
|
+
a.performerName && /* @__PURE__ */ i("em", { children: [
|
|
1068
978
|
" (",
|
|
1069
|
-
|
|
979
|
+
a.performerName,
|
|
1070
980
|
")"
|
|
1071
981
|
] })
|
|
1072
982
|
] }),
|
|
1073
|
-
!
|
|
983
|
+
!_ && m && /* @__PURE__ */ e("button", { onClick: () => m(a.id), style: { fontSize: 12 }, children: "✕" })
|
|
1074
984
|
]
|
|
1075
985
|
},
|
|
1076
|
-
|
|
986
|
+
a.id
|
|
1077
987
|
))
|
|
1078
988
|
] })
|
|
1079
989
|
] });
|
|
1080
990
|
}
|
|
1081
|
-
),
|
|
1082
|
-
game:
|
|
1083
|
-
music:
|
|
1084
|
-
dance:
|
|
1085
|
-
quiz:
|
|
1086
|
-
karaoke:
|
|
1087
|
-
photo:
|
|
1088
|
-
custom:
|
|
1089
|
-
},
|
|
991
|
+
), ye = {
|
|
992
|
+
game: ke,
|
|
993
|
+
music: q,
|
|
994
|
+
dance: q,
|
|
995
|
+
quiz: be,
|
|
996
|
+
karaoke: _e,
|
|
997
|
+
photo: Ne,
|
|
998
|
+
custom: fe
|
|
999
|
+
}, Nn = {
|
|
1090
1000
|
game: "Games",
|
|
1091
1001
|
music: "Music",
|
|
1092
1002
|
dance: "Dance",
|
|
@@ -1094,346 +1004,410 @@ const be = P(
|
|
|
1094
1004
|
karaoke: "Karaoke",
|
|
1095
1005
|
photo: "Photo",
|
|
1096
1006
|
custom: "Custom"
|
|
1097
|
-
},
|
|
1098
|
-
function(
|
|
1007
|
+
}, Pn = E(
|
|
1008
|
+
function(N, C) {
|
|
1099
1009
|
const {
|
|
1100
|
-
attractions:
|
|
1101
|
-
onSelect:
|
|
1102
|
-
onDeselect:
|
|
1103
|
-
onVote:
|
|
1104
|
-
selectedIds:
|
|
1105
|
-
maxSelections:
|
|
1106
|
-
showVotes:
|
|
1107
|
-
readOnly:
|
|
1108
|
-
layout:
|
|
1109
|
-
className:
|
|
1110
|
-
style:
|
|
1111
|
-
} =
|
|
1112
|
-
const
|
|
1113
|
-
return Array.from(
|
|
1114
|
-
}, [
|
|
1115
|
-
let
|
|
1116
|
-
if (
|
|
1117
|
-
const
|
|
1118
|
-
|
|
1119
|
-
(
|
|
1120
|
-
var
|
|
1121
|
-
return
|
|
1010
|
+
attractions: t,
|
|
1011
|
+
onSelect: p,
|
|
1012
|
+
onDeselect: u,
|
|
1013
|
+
onVote: m,
|
|
1014
|
+
selectedIds: h = [],
|
|
1015
|
+
maxSelections: v,
|
|
1016
|
+
showVotes: _ = !0,
|
|
1017
|
+
readOnly: g = !1,
|
|
1018
|
+
layout: S = "grid",
|
|
1019
|
+
className: b,
|
|
1020
|
+
style: l
|
|
1021
|
+
} = N, [o, k] = f(""), [y, x] = f(""), d = I(() => new Set(h), [h]), n = I(() => {
|
|
1022
|
+
const s = new Set(t.map((A) => A.category));
|
|
1023
|
+
return Array.from(s);
|
|
1024
|
+
}, [t]), c = I(() => {
|
|
1025
|
+
let s = t;
|
|
1026
|
+
if (o && (s = s.filter((A) => A.category === o)), y.trim()) {
|
|
1027
|
+
const A = y.toLowerCase();
|
|
1028
|
+
s = s.filter(
|
|
1029
|
+
(P) => {
|
|
1030
|
+
var V;
|
|
1031
|
+
return P.name.toLowerCase().includes(A) || ((V = P.description) == null ? void 0 : V.toLowerCase().includes(A));
|
|
1122
1032
|
}
|
|
1123
1033
|
);
|
|
1124
1034
|
}
|
|
1125
|
-
return
|
|
1126
|
-
}, [
|
|
1127
|
-
|
|
1035
|
+
return s;
|
|
1036
|
+
}, [t, o, y]), a = !v || d.size < v, w = (s) => {
|
|
1037
|
+
g || (d.has(s) ? u == null || u(s) : a && (p == null || p(s)));
|
|
1128
1038
|
};
|
|
1129
|
-
return /* @__PURE__ */
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
}
|
|
1160
|
-
),
|
|
1161
|
-
/* @__PURE__ */ e(
|
|
1162
|
-
"button",
|
|
1163
|
-
{
|
|
1164
|
-
onClick: () => k(""),
|
|
1165
|
-
style: { fontWeight: u ? 400 : 700 },
|
|
1166
|
-
children: "All"
|
|
1167
|
-
}
|
|
1168
|
-
),
|
|
1169
|
-
n.map((l) => /* @__PURE__ */ t(
|
|
1170
|
-
"button",
|
|
1171
|
-
{
|
|
1172
|
-
onClick: () => k(l === u ? "" : l),
|
|
1173
|
-
style: { fontWeight: l === u ? 700 : 400 },
|
|
1174
|
-
children: [
|
|
1175
|
-
ee[l],
|
|
1176
|
-
" ",
|
|
1177
|
-
_e[l]
|
|
1178
|
-
]
|
|
1179
|
-
},
|
|
1180
|
-
l
|
|
1181
|
-
))
|
|
1182
|
-
] }),
|
|
1183
|
-
/* @__PURE__ */ e(
|
|
1184
|
-
"div",
|
|
1185
|
-
{
|
|
1186
|
-
style: {
|
|
1187
|
-
display: f === "grid" ? "grid" : "flex",
|
|
1188
|
-
gridTemplateColumns: f === "grid" ? "repeat(auto-fill, minmax(200px, 1fr))" : void 0,
|
|
1189
|
-
gap: 12,
|
|
1190
|
-
flexDirection: f === "list" ? "column" : void 0
|
|
1191
|
-
},
|
|
1192
|
-
children: d.length === 0 ? /* @__PURE__ */ e("p", { children: "No attractions found." }) : d.map((l) => {
|
|
1193
|
-
const o = c.has(l.id);
|
|
1194
|
-
return /* @__PURE__ */ t(
|
|
1195
|
-
"div",
|
|
1039
|
+
return /* @__PURE__ */ i(
|
|
1040
|
+
"div",
|
|
1041
|
+
{
|
|
1042
|
+
ref: C,
|
|
1043
|
+
className: `nice-attraction-picker ${b ?? ""}`,
|
|
1044
|
+
style: { color: "var(--text-primary)", ...l },
|
|
1045
|
+
children: [
|
|
1046
|
+
/* @__PURE__ */ i(
|
|
1047
|
+
"div",
|
|
1048
|
+
{
|
|
1049
|
+
style: {
|
|
1050
|
+
display: "flex",
|
|
1051
|
+
justifyContent: "space-between",
|
|
1052
|
+
alignItems: "center",
|
|
1053
|
+
marginBottom: 12
|
|
1054
|
+
},
|
|
1055
|
+
children: [
|
|
1056
|
+
/* @__PURE__ */ e("h3", { style: { margin: 0 }, children: "Attractions" }),
|
|
1057
|
+
v && /* @__PURE__ */ i("span", { style: { color: "var(--text-secondary, #64748b)", fontSize: 14 }, children: [
|
|
1058
|
+
d.size,
|
|
1059
|
+
"/",
|
|
1060
|
+
v,
|
|
1061
|
+
" selected"
|
|
1062
|
+
] })
|
|
1063
|
+
]
|
|
1064
|
+
}
|
|
1065
|
+
),
|
|
1066
|
+
/* @__PURE__ */ i("div", { style: { display: "flex", gap: 8, marginBottom: 12, flexWrap: "wrap" }, children: [
|
|
1067
|
+
/* @__PURE__ */ e(
|
|
1068
|
+
"input",
|
|
1196
1069
|
{
|
|
1197
|
-
|
|
1070
|
+
type: "text",
|
|
1071
|
+
value: y,
|
|
1072
|
+
onChange: (s) => x(s.target.value),
|
|
1073
|
+
placeholder: "Search attractions…",
|
|
1074
|
+
style: { flex: 1, minWidth: 150 }
|
|
1075
|
+
}
|
|
1076
|
+
),
|
|
1077
|
+
/* @__PURE__ */ e(
|
|
1078
|
+
"button",
|
|
1079
|
+
{
|
|
1080
|
+
onClick: () => k(""),
|
|
1081
|
+
style: { fontWeight: o ? 400 : 700 },
|
|
1082
|
+
children: "All"
|
|
1083
|
+
}
|
|
1084
|
+
),
|
|
1085
|
+
n.map((s) => /* @__PURE__ */ i(
|
|
1086
|
+
"button",
|
|
1087
|
+
{
|
|
1088
|
+
onClick: () => k(s === o ? "" : s),
|
|
1198
1089
|
style: {
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
background: o ? "#e3f2fd" : "#fff",
|
|
1204
|
-
transition: "all 0.2s"
|
|
1090
|
+
fontWeight: s === o ? 700 : 400,
|
|
1091
|
+
display: "inline-flex",
|
|
1092
|
+
alignItems: "center",
|
|
1093
|
+
gap: 4
|
|
1205
1094
|
},
|
|
1206
|
-
onClick: () => h(l.id),
|
|
1207
1095
|
children: [
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
src: l.imageUrl,
|
|
1212
|
-
alt: l.name,
|
|
1213
|
-
style: {
|
|
1214
|
-
width: "100%",
|
|
1215
|
-
borderRadius: 6,
|
|
1216
|
-
marginBottom: 8,
|
|
1217
|
-
objectFit: "cover",
|
|
1218
|
-
maxHeight: 120
|
|
1219
|
-
}
|
|
1220
|
-
}
|
|
1221
|
-
),
|
|
1222
|
-
/* @__PURE__ */ t("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
|
|
1223
|
-
/* @__PURE__ */ e("span", { children: ee[l.category] }),
|
|
1224
|
-
/* @__PURE__ */ e("strong", { children: l.name })
|
|
1225
|
-
] }),
|
|
1226
|
-
l.description && /* @__PURE__ */ e("p", { style: { fontSize: 13, color: "#666", margin: "6px 0" }, children: l.description }),
|
|
1227
|
-
/* @__PURE__ */ t(
|
|
1228
|
-
"div",
|
|
1229
|
-
{
|
|
1230
|
-
style: {
|
|
1231
|
-
display: "flex",
|
|
1232
|
-
justifyContent: "space-between",
|
|
1233
|
-
alignItems: "center",
|
|
1234
|
-
marginTop: 8
|
|
1235
|
-
},
|
|
1236
|
-
children: [
|
|
1237
|
-
S && /* @__PURE__ */ t("span", { style: { fontSize: 13 }, children: [
|
|
1238
|
-
"👍 ",
|
|
1239
|
-
l.votes ?? 0
|
|
1240
|
-
] }),
|
|
1241
|
-
!N && v && /* @__PURE__ */ e(
|
|
1242
|
-
"button",
|
|
1243
|
-
{
|
|
1244
|
-
onClick: (I) => {
|
|
1245
|
-
I.stopPropagation(), v(l.id);
|
|
1246
|
-
},
|
|
1247
|
-
style: { fontSize: 12 },
|
|
1248
|
-
children: "Vote"
|
|
1249
|
-
}
|
|
1250
|
-
)
|
|
1251
|
-
]
|
|
1252
|
-
}
|
|
1253
|
-
)
|
|
1096
|
+
ne.createElement(ye[s], { size: 14 }),
|
|
1097
|
+
" ",
|
|
1098
|
+
Nn[s]
|
|
1254
1099
|
]
|
|
1255
1100
|
},
|
|
1256
|
-
|
|
1257
|
-
)
|
|
1258
|
-
})
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1101
|
+
s
|
|
1102
|
+
))
|
|
1103
|
+
] }),
|
|
1104
|
+
/* @__PURE__ */ e(
|
|
1105
|
+
"div",
|
|
1106
|
+
{
|
|
1107
|
+
style: {
|
|
1108
|
+
display: S === "grid" ? "grid" : "flex",
|
|
1109
|
+
gridTemplateColumns: S === "grid" ? "repeat(auto-fill, minmax(200px, 1fr))" : void 0,
|
|
1110
|
+
gap: 12,
|
|
1111
|
+
flexDirection: S === "list" ? "column" : void 0
|
|
1112
|
+
},
|
|
1113
|
+
children: c.length === 0 ? /* @__PURE__ */ e("p", { children: "No attractions found." }) : c.map((s) => {
|
|
1114
|
+
const A = d.has(s.id);
|
|
1115
|
+
return /* @__PURE__ */ i(
|
|
1116
|
+
"div",
|
|
1117
|
+
{
|
|
1118
|
+
className: "nice-attraction-picker__card",
|
|
1119
|
+
style: {
|
|
1120
|
+
border: A ? "2px solid var(--color-primary, #6366f1)" : "1px solid var(--border-color, #cbd5e1)",
|
|
1121
|
+
borderRadius: 8,
|
|
1122
|
+
padding: 12,
|
|
1123
|
+
cursor: g ? "default" : "pointer",
|
|
1124
|
+
background: A ? "color-mix(in srgb, var(--color-primary) 12%, transparent)" : "var(--bg-elevated, var(--bg-primary))",
|
|
1125
|
+
transition: "all 0.2s"
|
|
1126
|
+
},
|
|
1127
|
+
onClick: () => w(s.id),
|
|
1128
|
+
children: [
|
|
1129
|
+
s.imageUrl && /* @__PURE__ */ e(
|
|
1130
|
+
"img",
|
|
1131
|
+
{
|
|
1132
|
+
src: s.imageUrl,
|
|
1133
|
+
alt: s.name,
|
|
1134
|
+
style: {
|
|
1135
|
+
width: "100%",
|
|
1136
|
+
borderRadius: 6,
|
|
1137
|
+
marginBottom: 8,
|
|
1138
|
+
objectFit: "cover",
|
|
1139
|
+
maxHeight: 120
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
),
|
|
1143
|
+
/* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
|
|
1144
|
+
/* @__PURE__ */ e("span", { style: { display: "inline-flex" }, children: ne.createElement(ye[s.category], { size: 16 }) }),
|
|
1145
|
+
/* @__PURE__ */ e("strong", { children: s.name })
|
|
1146
|
+
] }),
|
|
1147
|
+
s.description && /* @__PURE__ */ e(
|
|
1148
|
+
"p",
|
|
1149
|
+
{
|
|
1150
|
+
style: {
|
|
1151
|
+
fontSize: 13,
|
|
1152
|
+
color: "var(--text-secondary, #64748b)",
|
|
1153
|
+
margin: "6px 0"
|
|
1154
|
+
},
|
|
1155
|
+
children: s.description
|
|
1156
|
+
}
|
|
1157
|
+
),
|
|
1158
|
+
/* @__PURE__ */ i(
|
|
1159
|
+
"div",
|
|
1160
|
+
{
|
|
1161
|
+
style: {
|
|
1162
|
+
display: "flex",
|
|
1163
|
+
justifyContent: "space-between",
|
|
1164
|
+
alignItems: "center",
|
|
1165
|
+
marginTop: 8
|
|
1166
|
+
},
|
|
1167
|
+
children: [
|
|
1168
|
+
_ && /* @__PURE__ */ i(
|
|
1169
|
+
"span",
|
|
1170
|
+
{
|
|
1171
|
+
style: {
|
|
1172
|
+
fontSize: 13,
|
|
1173
|
+
display: "inline-flex",
|
|
1174
|
+
alignItems: "center",
|
|
1175
|
+
gap: 4
|
|
1176
|
+
},
|
|
1177
|
+
children: [
|
|
1178
|
+
/* @__PURE__ */ e(cn, { size: 14 }),
|
|
1179
|
+
" ",
|
|
1180
|
+
s.votes ?? 0
|
|
1181
|
+
]
|
|
1182
|
+
}
|
|
1183
|
+
),
|
|
1184
|
+
!g && m && /* @__PURE__ */ e(
|
|
1185
|
+
"button",
|
|
1186
|
+
{
|
|
1187
|
+
onClick: (P) => {
|
|
1188
|
+
P.stopPropagation(), m(s.id);
|
|
1189
|
+
},
|
|
1190
|
+
style: { fontSize: 12 },
|
|
1191
|
+
children: "Vote"
|
|
1192
|
+
}
|
|
1193
|
+
)
|
|
1194
|
+
]
|
|
1195
|
+
}
|
|
1196
|
+
)
|
|
1197
|
+
]
|
|
1198
|
+
},
|
|
1199
|
+
s.id
|
|
1200
|
+
);
|
|
1201
|
+
})
|
|
1202
|
+
}
|
|
1203
|
+
)
|
|
1204
|
+
]
|
|
1205
|
+
}
|
|
1206
|
+
);
|
|
1262
1207
|
}
|
|
1263
|
-
),
|
|
1264
|
-
game:
|
|
1265
|
-
music:
|
|
1266
|
-
dance:
|
|
1267
|
-
quiz:
|
|
1268
|
-
karaoke:
|
|
1269
|
-
photo:
|
|
1270
|
-
custom:
|
|
1271
|
-
},
|
|
1272
|
-
function(
|
|
1208
|
+
), _n = {
|
|
1209
|
+
game: ke,
|
|
1210
|
+
music: q,
|
|
1211
|
+
dance: q,
|
|
1212
|
+
quiz: be,
|
|
1213
|
+
karaoke: _e,
|
|
1214
|
+
photo: Ne,
|
|
1215
|
+
custom: fe
|
|
1216
|
+
}, Rn = E(
|
|
1217
|
+
function(N, C) {
|
|
1273
1218
|
const {
|
|
1274
|
-
attractions:
|
|
1275
|
-
onVote:
|
|
1276
|
-
onUnvote:
|
|
1277
|
-
votedIds:
|
|
1278
|
-
maxVotes:
|
|
1279
|
-
closed:
|
|
1280
|
-
sortBy:
|
|
1281
|
-
showResults:
|
|
1282
|
-
className:
|
|
1283
|
-
style:
|
|
1284
|
-
} =
|
|
1285
|
-
const n = [...
|
|
1286
|
-
switch (
|
|
1219
|
+
attractions: t,
|
|
1220
|
+
onVote: p,
|
|
1221
|
+
onUnvote: u,
|
|
1222
|
+
votedIds: m = [],
|
|
1223
|
+
maxVotes: h,
|
|
1224
|
+
closed: v = !1,
|
|
1225
|
+
sortBy: _ = "votes",
|
|
1226
|
+
showResults: g = !0,
|
|
1227
|
+
className: S,
|
|
1228
|
+
style: b
|
|
1229
|
+
} = N, l = I(() => new Set(m), [m]), o = h ? h - l.size : void 0, k = I(() => {
|
|
1230
|
+
const n = [...t];
|
|
1231
|
+
switch (_) {
|
|
1287
1232
|
case "votes":
|
|
1288
|
-
n.sort((
|
|
1233
|
+
n.sort((c, a) => (a.votes ?? 0) - (c.votes ?? 0));
|
|
1289
1234
|
break;
|
|
1290
1235
|
case "name":
|
|
1291
|
-
n.sort((
|
|
1236
|
+
n.sort((c, a) => c.name.localeCompare(a.name));
|
|
1292
1237
|
break;
|
|
1293
1238
|
case "category":
|
|
1294
|
-
n.sort((
|
|
1239
|
+
n.sort((c, a) => c.category.localeCompare(a.category));
|
|
1295
1240
|
break;
|
|
1296
1241
|
}
|
|
1297
1242
|
return n;
|
|
1298
|
-
}, [
|
|
1299
|
-
() => Math.max(...
|
|
1300
|
-
[
|
|
1301
|
-
),
|
|
1302
|
-
|
|
1303
|
-
},
|
|
1243
|
+
}, [t, _]), y = I(
|
|
1244
|
+
() => Math.max(...t.map((n) => n.votes ?? 0), 1),
|
|
1245
|
+
[t]
|
|
1246
|
+
), x = (n) => {
|
|
1247
|
+
v || (l.has(n) ? u == null || u(n) : (!o || o > 0) && (p == null || p(n)));
|
|
1248
|
+
}, d = (n) => {
|
|
1304
1249
|
switch (n) {
|
|
1305
1250
|
case 0:
|
|
1306
|
-
return "
|
|
1251
|
+
return /* @__PURE__ */ e(on, { size: 18, primaryColor: "#f59e0b", title: "1st place" });
|
|
1307
1252
|
case 1:
|
|
1308
|
-
return "
|
|
1253
|
+
return /* @__PURE__ */ e(ue, { size: 18, primaryColor: "#94a3b8", title: "2nd place" });
|
|
1309
1254
|
case 2:
|
|
1310
|
-
return "
|
|
1255
|
+
return /* @__PURE__ */ e(ue, { size: 18, primaryColor: "#b45309", title: "3rd place" });
|
|
1311
1256
|
default:
|
|
1312
1257
|
return `${n + 1}.`;
|
|
1313
1258
|
}
|
|
1314
1259
|
};
|
|
1315
|
-
return /* @__PURE__ */
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
const i = s.has(n.id), h = n.votes ?? 0, l = N ? `${Math.round(h / b * 100)}%` : "0%";
|
|
1339
|
-
return /* @__PURE__ */ t(
|
|
1340
|
-
"div",
|
|
1341
|
-
{
|
|
1342
|
-
style: {
|
|
1343
|
-
display: "flex",
|
|
1344
|
-
alignItems: "center",
|
|
1345
|
-
gap: 12,
|
|
1346
|
-
padding: "10px 14px",
|
|
1347
|
-
borderRadius: 8,
|
|
1348
|
-
border: i ? "2px solid #1976d2" : "1px solid #e0e0e0",
|
|
1349
|
-
background: i ? "#e3f2fd" : "#fff",
|
|
1350
|
-
cursor: g ? "default" : "pointer",
|
|
1351
|
-
transition: "all 0.2s"
|
|
1352
|
-
},
|
|
1353
|
-
onClick: () => p(n.id),
|
|
1354
|
-
children: [
|
|
1355
|
-
N && /* @__PURE__ */ e("span", { style: { fontSize: 18, minWidth: 32, textAlign: "center" }, children: c(d) }),
|
|
1356
|
-
/* @__PURE__ */ e("span", { style: { fontSize: 20 }, children: fe[n.category] }),
|
|
1357
|
-
/* @__PURE__ */ t("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
1358
|
-
/* @__PURE__ */ e("div", { style: { fontWeight: 600 }, children: n.name }),
|
|
1359
|
-
n.description && /* @__PURE__ */ e(
|
|
1360
|
-
"div",
|
|
1260
|
+
return /* @__PURE__ */ i(
|
|
1261
|
+
"div",
|
|
1262
|
+
{
|
|
1263
|
+
ref: C,
|
|
1264
|
+
className: `nice-attraction-voting ${S ?? ""}`,
|
|
1265
|
+
style: { color: "var(--text-primary)", ...b },
|
|
1266
|
+
children: [
|
|
1267
|
+
/* @__PURE__ */ i(
|
|
1268
|
+
"div",
|
|
1269
|
+
{
|
|
1270
|
+
style: {
|
|
1271
|
+
display: "flex",
|
|
1272
|
+
justifyContent: "space-between",
|
|
1273
|
+
alignItems: "center",
|
|
1274
|
+
marginBottom: 16
|
|
1275
|
+
},
|
|
1276
|
+
children: [
|
|
1277
|
+
/* @__PURE__ */ i("h3", { style: { margin: 0, display: "inline-flex", alignItems: "center", gap: 8 }, children: [
|
|
1278
|
+
/* @__PURE__ */ e(sn, { size: 20 }),
|
|
1279
|
+
v ? "Voting Results" : "Vote for Attractions"
|
|
1280
|
+
] }),
|
|
1281
|
+
!v && o !== void 0 && /* @__PURE__ */ i(
|
|
1282
|
+
"span",
|
|
1361
1283
|
{
|
|
1362
1284
|
style: {
|
|
1363
|
-
fontSize:
|
|
1364
|
-
color: "#
|
|
1365
|
-
overflow: "hidden",
|
|
1366
|
-
textOverflow: "ellipsis",
|
|
1367
|
-
whiteSpace: "nowrap"
|
|
1285
|
+
fontSize: 14,
|
|
1286
|
+
color: o > 0 ? "var(--color-primary, #6366f1)" : "var(--color-error, #ef4444)"
|
|
1368
1287
|
},
|
|
1369
|
-
children:
|
|
1288
|
+
children: [
|
|
1289
|
+
o,
|
|
1290
|
+
" vote",
|
|
1291
|
+
o !== 1 ? "s" : "",
|
|
1292
|
+
" remaining"
|
|
1293
|
+
]
|
|
1370
1294
|
}
|
|
1371
|
-
)
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1295
|
+
)
|
|
1296
|
+
]
|
|
1297
|
+
}
|
|
1298
|
+
),
|
|
1299
|
+
v && /* @__PURE__ */ e("p", { style: { color: "var(--text-secondary, #64748b)", marginBottom: 12 }, children: "Voting is closed. Final results:" }),
|
|
1300
|
+
/* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: k.map((n, c) => {
|
|
1301
|
+
const a = l.has(n.id), w = n.votes ?? 0, s = g ? `${Math.round(w / y * 100)}%` : "0%";
|
|
1302
|
+
return /* @__PURE__ */ i(
|
|
1303
|
+
"div",
|
|
1304
|
+
{
|
|
1305
|
+
style: {
|
|
1306
|
+
display: "flex",
|
|
1307
|
+
alignItems: "center",
|
|
1308
|
+
gap: 12,
|
|
1309
|
+
padding: "10px 14px",
|
|
1310
|
+
borderRadius: 8,
|
|
1311
|
+
border: a ? "2px solid var(--color-primary, #6366f1)" : "1px solid var(--border-color, #cbd5e1)",
|
|
1312
|
+
background: a ? "color-mix(in srgb, var(--color-primary) 12%, transparent)" : "var(--bg-elevated, var(--bg-primary))",
|
|
1313
|
+
cursor: v ? "default" : "pointer",
|
|
1314
|
+
transition: "all 0.2s"
|
|
1315
|
+
},
|
|
1316
|
+
onClick: () => x(n.id),
|
|
1317
|
+
children: [
|
|
1318
|
+
g && /* @__PURE__ */ e("span", { style: { fontSize: 18, minWidth: 32, textAlign: "center" }, children: d(c) }),
|
|
1319
|
+
/* @__PURE__ */ e("span", { style: { display: "inline-flex", fontSize: 20 }, children: ne.createElement(_n[n.category], { size: 20 }) }),
|
|
1320
|
+
/* @__PURE__ */ i("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
1321
|
+
/* @__PURE__ */ e("div", { style: { fontWeight: 600 }, children: n.name }),
|
|
1322
|
+
n.description && /* @__PURE__ */ e(
|
|
1383
1323
|
"div",
|
|
1384
1324
|
{
|
|
1385
1325
|
style: {
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1326
|
+
fontSize: 13,
|
|
1327
|
+
color: "var(--text-secondary, #64748b)",
|
|
1328
|
+
overflow: "hidden",
|
|
1329
|
+
textOverflow: "ellipsis",
|
|
1330
|
+
whiteSpace: "nowrap"
|
|
1331
|
+
},
|
|
1332
|
+
children: n.description
|
|
1333
|
+
}
|
|
1334
|
+
),
|
|
1335
|
+
g && /* @__PURE__ */ e(
|
|
1336
|
+
"div",
|
|
1337
|
+
{
|
|
1338
|
+
style: {
|
|
1339
|
+
marginTop: 4,
|
|
1340
|
+
height: 6,
|
|
1389
1341
|
borderRadius: 3,
|
|
1390
|
-
|
|
1391
|
-
|
|
1342
|
+
background: "var(--bg-tertiary, #e2e8f0)",
|
|
1343
|
+
overflow: "hidden"
|
|
1344
|
+
},
|
|
1345
|
+
children: /* @__PURE__ */ e(
|
|
1346
|
+
"div",
|
|
1347
|
+
{
|
|
1348
|
+
style: {
|
|
1349
|
+
height: "100%",
|
|
1350
|
+
width: s,
|
|
1351
|
+
background: "var(--color-primary, #6366f1)",
|
|
1352
|
+
borderRadius: 3,
|
|
1353
|
+
transition: "width 0.3s"
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1356
|
+
)
|
|
1392
1357
|
}
|
|
1393
1358
|
)
|
|
1394
|
-
}
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1359
|
+
] }),
|
|
1360
|
+
g && /* @__PURE__ */ e("span", { style: { fontWeight: 600, fontSize: 16, minWidth: 40, textAlign: "right" }, children: w }),
|
|
1361
|
+
!v && /* @__PURE__ */ e(
|
|
1362
|
+
"button",
|
|
1363
|
+
{
|
|
1364
|
+
onClick: (A) => {
|
|
1365
|
+
A.stopPropagation(), x(n.id);
|
|
1366
|
+
},
|
|
1367
|
+
style: {
|
|
1368
|
+
padding: "4px 12px",
|
|
1369
|
+
borderRadius: 4,
|
|
1370
|
+
border: "none",
|
|
1371
|
+
background: a ? "var(--color-error, #ef4444)" : "var(--color-primary, #6366f1)",
|
|
1372
|
+
color: "#fff",
|
|
1373
|
+
cursor: "pointer",
|
|
1374
|
+
fontSize: 13
|
|
1375
|
+
},
|
|
1376
|
+
children: a ? "Unvote" : "Vote"
|
|
1377
|
+
}
|
|
1378
|
+
)
|
|
1379
|
+
]
|
|
1380
|
+
},
|
|
1381
|
+
n.id
|
|
1382
|
+
);
|
|
1383
|
+
}) }),
|
|
1384
|
+
g && /* @__PURE__ */ i(
|
|
1385
|
+
"div",
|
|
1386
|
+
{
|
|
1387
|
+
style: {
|
|
1388
|
+
marginTop: 12,
|
|
1389
|
+
textAlign: "right",
|
|
1390
|
+
fontSize: 13,
|
|
1391
|
+
color: "var(--text-secondary, #64748b)"
|
|
1392
|
+
},
|
|
1393
|
+
children: [
|
|
1394
|
+
"Total votes: ",
|
|
1395
|
+
t.reduce((n, c) => n + (c.votes ?? 0), 0)
|
|
1396
|
+
]
|
|
1397
|
+
}
|
|
1398
|
+
)
|
|
1399
|
+
]
|
|
1400
|
+
}
|
|
1401
|
+
);
|
|
1426
1402
|
}
|
|
1427
1403
|
);
|
|
1428
1404
|
export {
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
we as NiceRoundList,
|
|
1438
|
-
Ae as NiceSongPicker
|
|
1405
|
+
Pn as NiceAttractionPicker,
|
|
1406
|
+
Rn as NiceAttractionVoting,
|
|
1407
|
+
wn as NiceEventMedia,
|
|
1408
|
+
zn as NiceEventPlanning,
|
|
1409
|
+
Tn as NiceKaraokePicker,
|
|
1410
|
+
In as NiceRoundCard,
|
|
1411
|
+
An as NiceRoundList,
|
|
1412
|
+
Ln as NiceSongPicker
|
|
1439
1413
|
};
|