@nice2dev/events 1.1.6 → 1.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,30 +1,30 @@
1
- import { jsxs as a, jsx as e, Fragment as Ke } from "react/jsx-runtime";
2
- import { NtdMove as bn, NtdHeart as dt, NtdTrash as Te, NtdPlay as wn, NtdImage as xn, NtdPlus as kn, NtdCheck as He, NtdHelp as Qe, NtdClose as ut, NtdSearch as mt, NtdQrCode as ht, NtdMail as In, NtdWheelchair as Cn, NtdSend as pt, NtdGiftCard as gt, NtdStar as ft, NtdLink as vt, NtdReceipt as yt, NtdCoins as _t, NtdArrowRight as Nt, NtdSparkle as Sn, NtdCamera as zn, NtdMicrophone as $n, NtdMusic as Re, NtdGamepad as An, NtdThumbsUp as bt, NtdClipboardCheck as wt, NtdMedal as dn, NtdTrophy as xt } from "@nice2dev/icons";
3
- import { NiceUpload as qe, NiceTextInput as J, NiceCardGroup as Pn, NiceEmpty as kt, NiceButton as F, NiceSegmentedControl as Tn, NiceAvatarGroup as un, NiceAvatar as Be, NiceBadge as te, NiceSelect as Pe, NiceAmountBreakdown as It, NiceToggle as We, NiceTabs as Ct, NiceTextArea as Ze, NiceNumericInput as Je, NiceCollapse as St, NiceHtmlEditor as zt, NiceProgress as $t } from "@nice2dev/ui";
4
- import Ue, { useState as E, useRef as ve, useCallback as G, forwardRef as ee, useMemo as X, useEffect as Oe } from "react";
1
+ import { jsxs as i, jsx as e, Fragment as Ve } from "react/jsx-runtime";
2
+ import { NtdMove as In, NtdHeart as gt, NtdTrash as De, NtdPlay as We, NtdImage as Sn, NtdPlus as zn, NtdCheck as qe, NtdHelp as en, NtdClose as $n, NtdSearch as ft, NtdQrCode as vt, NtdMail as An, NtdWheelchair as Pn, NtdSend as yt, NtdGiftCard as _t, NtdStar as Nt, NtdLink as bt, NtdReceipt as wt, NtdCoins as xt, NtdArrowRight as kt, NtdSkipForward as nn, NtdBarChart as Ct, NtdThumbsUp as tn, NtdClock as Tn, NtdTrophy as an, NtdMedal as He, NtdStop as It, NtdMusic as ke, NtdMicrophone as Ye, NtdFileText as St, NtdSparkle as Mn, NtdCamera as Dn, NtdGamepad as En, NtdClipboardCheck as zt } from "@nice2dev/icons";
3
+ import { NiceUpload as Qe, NiceTextInput as J, NiceCardGroup as Ln, NiceEmpty as $t, NiceButton as V, NiceSegmentedControl as Bn, NiceAvatarGroup as fn, NiceAvatar as Oe, NiceBadge as te, NiceSelect as Te, NiceAmountBreakdown as At, NiceToggle as Ke, NiceTabs as Pt, NiceTextArea as sn, NiceNumericInput as rn, NiceCollapse as Tt, NiceHtmlEditor as Mt, NiceProgress as Dt } from "@nice2dev/ui";
4
+ import Me, { useState as E, useRef as ve, useCallback as G, forwardRef as ee, useMemo as X, useEffect as Ue } from "react";
5
5
  import { NiceIcon as ie } from "@nice2dev/ui-core";
6
- function At(s) {
7
- return s.map((t, r) => ({ item: t, index: r, key: t.order ?? r })).sort((t, r) => t.key - r.key || t.index - r.index).map((t) => t.item);
6
+ function Et(s) {
7
+ return s.map((t, c) => ({ item: t, index: c, key: t.order ?? c })).sort((t, c) => t.key - c.key || t.index - c.index).map((t) => t.item);
8
8
  }
9
- function mn(s, t, r) {
10
- if (t === r)
9
+ function vn(s, t, c) {
10
+ if (t === c)
11
11
  return [...s];
12
12
  if (t < 0 || t >= s.length)
13
13
  return [...s];
14
- if (r < 0 || r >= s.length)
14
+ if (c < 0 || c >= s.length)
15
15
  return [...s];
16
- const n = [...s], [c] = n.splice(t, 1);
17
- return n.splice(r, 0, c), n;
16
+ const n = [...s], [l] = n.splice(t, 1);
17
+ return n.splice(c, 0, l), n;
18
18
  }
19
- function Mn(s) {
20
- const { items: t, onReorder: r, disabled: n = !1 } = s, [c, o] = E(null), [d, m] = E(null), [h, i] = E(!1), u = ve(null), p = G((w) => t.findIndex((k) => k.id === w), [t]), b = G(
19
+ function Rn(s) {
20
+ const { items: t, onReorder: c, disabled: n = !1 } = s, [l, o] = E(null), [d, m] = E(null), [h, a] = E(!1), u = ve(null), p = G((w) => t.findIndex((k) => k.id === w), [t]), b = G(
21
21
  (w, k) => {
22
22
  const _ = p(w), $ = p(k);
23
- _ < 0 || $ < 0 || _ === $ || r == null || r(mn([...t], _, $).map((l) => l.id));
23
+ _ < 0 || $ < 0 || _ === $ || c == null || c(vn([...t], _, $).map((r) => r.id));
24
24
  },
25
- [t, p, r]
25
+ [t, p, c]
26
26
  ), f = G(() => {
27
- o(null), m(null), i(!1), u.current = null;
27
+ o(null), m(null), a(!1), u.current = null;
28
28
  }, []), g = G(
29
29
  (w, k) => ({
30
30
  role: "button",
@@ -32,93 +32,93 @@ function Mn(s) {
32
32
  // native HTML5 drag enabled would fight it on desktop.
33
33
  draggable: !1,
34
34
  tabIndex: n ? -1 : 0,
35
- "aria-grabbed": c === w,
35
+ "aria-grabbed": l === w,
36
36
  onPointerDown: (_) => {
37
37
  var y, v;
38
38
  if (n || _.button !== 0 && _.pointerType === "mouse")
39
39
  return;
40
- (v = (y = _.currentTarget).setPointerCapture) == null || v.call(y, _.pointerId), o(w), i(!0), u.current = t.map((A) => A.id);
40
+ (v = (y = _.currentTarget).setPointerCapture) == null || v.call(y, _.pointerId), o(w), a(!0), u.current = t.map((A) => A.id);
41
41
  const $ = () => {
42
- window.removeEventListener("pointerup", $), window.removeEventListener("pointercancel", l), i(!1), o(null), m(null);
43
- }, l = () => {
44
- window.removeEventListener("pointerup", $), window.removeEventListener("pointercancel", l), u.current && (r == null || r(u.current)), f();
42
+ window.removeEventListener("pointerup", $), window.removeEventListener("pointercancel", r), a(!1), o(null), m(null);
43
+ }, r = () => {
44
+ window.removeEventListener("pointerup", $), window.removeEventListener("pointercancel", r), u.current && (c == null || c(u.current)), f();
45
45
  };
46
- window.addEventListener("pointerup", $), window.addEventListener("pointercancel", l);
46
+ window.addEventListener("pointerup", $), window.addEventListener("pointercancel", r);
47
47
  },
48
48
  onPointerEnter: () => {
49
- n || !c || c === w || (m(w), b(c, w));
49
+ n || !l || l === w || (m(w), b(l, w));
50
50
  },
51
51
  onKeyDown: (_) => {
52
52
  if (n)
53
53
  return;
54
54
  if (_.key === " " || _.key === "Enter") {
55
- _.preventDefault(), c === w ? f() : (o(w), u.current = t.map((A) => A.id));
55
+ _.preventDefault(), l === w ? f() : (o(w), u.current = t.map((A) => A.id));
56
56
  return;
57
57
  }
58
- if (_.key === "Escape" && c === w) {
59
- _.preventDefault(), u.current && (r == null || r(u.current)), f();
58
+ if (_.key === "Escape" && l === w) {
59
+ _.preventDefault(), u.current && (c == null || c(u.current)), f();
60
60
  return;
61
61
  }
62
- if (c !== w)
62
+ if (l !== w)
63
63
  return;
64
- const l = _.key === "ArrowLeft" || _.key === "ArrowUp" ? -1 : _.key === "ArrowRight" || _.key === "ArrowDown" ? 1 : 0;
65
- if (l === 0)
64
+ const r = _.key === "ArrowLeft" || _.key === "ArrowUp" ? -1 : _.key === "ArrowRight" || _.key === "ArrowDown" ? 1 : 0;
65
+ if (r === 0)
66
66
  return;
67
67
  _.preventDefault();
68
- const y = p(w), v = y + l;
69
- v < 0 || v >= t.length || r == null || r(mn([...t], y, v).map((A) => A.id));
68
+ const y = p(w), v = y + r;
69
+ v < 0 || v >= t.length || c == null || c(vn([...t], y, v).map((A) => A.id));
70
70
  },
71
71
  ...k ? { "aria-label": k } : {}
72
72
  }),
73
- [c, b, n, f, p, t, r]
73
+ [l, b, n, f, p, t, c]
74
74
  );
75
- return { activeId: c, overId: d, getHandleProps: g, dragging: h };
75
+ return { activeId: l, overId: d, getHandleProps: g, dragging: h };
76
76
  }
77
- const Pt = ({ item: s }) => {
78
- const [t, r] = E(!1), n = s.thumbnailUrl ?? s.url;
79
- return s.type === "video" ? /* @__PURE__ */ e("div", { className: "nice-event-media__video-thumb", children: /* @__PURE__ */ e(wn, { size: 26 }) }) : t || !n ? /* @__PURE__ */ e("div", { className: "nice-event-media__broken", title: "Image unavailable", children: /* @__PURE__ */ e(xn, { size: 24 }) }) : /* @__PURE__ */ e(
77
+ const Lt = ({ item: s }) => {
78
+ const [t, c] = E(!1), n = s.thumbnailUrl ?? s.url;
79
+ return s.type === "video" ? /* @__PURE__ */ e("div", { className: "nice-event-media__video-thumb", children: /* @__PURE__ */ e(We, { size: 26 }) }) : t || !n ? /* @__PURE__ */ e("div", { className: "nice-event-media__broken", title: "Image unavailable", children: /* @__PURE__ */ e(Sn, { size: 24 }) }) : /* @__PURE__ */ e(
80
80
  "img",
81
81
  {
82
82
  src: n,
83
83
  alt: s.caption ?? "",
84
84
  className: "nice-event-media__thumb",
85
85
  loading: "lazy",
86
- onError: () => r(!0)
86
+ onError: () => c(!0)
87
87
  }
88
88
  );
89
- }, Si = ee(
90
- function(t, r) {
89
+ }, Mi = ee(
90
+ function(t, c) {
91
91
  const {
92
92
  items: n,
93
- onUpload: c,
93
+ onUpload: l,
94
94
  onDelete: o,
95
95
  onLike: d,
96
96
  onItemClick: m,
97
97
  layout: h = "grid",
98
- uploadEnabled: i = !0,
98
+ uploadEnabled: a = !0,
99
99
  typeFilter: u = "all",
100
100
  onReorder: p,
101
101
  className: b,
102
102
  style: f
103
- } = t, [g, w] = E(""), k = X(() => At(n), [n]), _ = X(() => u === "all" ? k : k.filter((A) => A.type === u), [k, u]), $ = !!p && u === "all", l = Mn({ items: k, onReorder: p, disabled: !$ }), y = (A) => {
104
- const I = A[0];
105
- !I || !c || (c(I, g.trim() || void 0), w(""));
103
+ } = t, [g, w] = E(""), k = X(() => Et(n), [n]), _ = X(() => u === "all" ? k : k.filter((A) => A.type === u), [k, u]), $ = !!p && u === "all", r = Rn({ items: k, onReorder: p, disabled: !$ }), y = (A) => {
104
+ const C = A[0];
105
+ !C || !l || (l(C, g.trim() || void 0), w(""));
106
106
  }, v = h === "list";
107
- return /* @__PURE__ */ a(
107
+ return /* @__PURE__ */ i(
108
108
  "div",
109
109
  {
110
- ref: r,
110
+ ref: c,
111
111
  className: `nice-event-media nice-event-media--${h} ${b ?? ""}`,
112
112
  style: f,
113
113
  children: [
114
- /* @__PURE__ */ e("div", { className: "nice-event-media__header", children: /* @__PURE__ */ a("h3", { children: [
114
+ /* @__PURE__ */ e("div", { className: "nice-event-media__header", children: /* @__PURE__ */ i("h3", { children: [
115
115
  "Media (",
116
116
  _.length,
117
117
  ")"
118
118
  ] }) }),
119
- i && c && /* @__PURE__ */ a("div", { className: "nice-event-media__upload", children: [
119
+ a && l && /* @__PURE__ */ i("div", { className: "nice-event-media__upload", children: [
120
120
  /* @__PURE__ */ e(
121
- qe,
121
+ Qe,
122
122
  {
123
123
  accept: "image/*,video/*",
124
124
  multiple: !1,
@@ -129,18 +129,18 @@ const Pt = ({ item: s }) => {
129
129
  /* @__PURE__ */ e(J, { value: g, onChange: w, placeholder: "Add a caption…" })
130
130
  ] }),
131
131
  _.length === 0 ? /* @__PURE__ */ e("p", { className: "nice-event-media__empty", children: "No media yet." }) : /* @__PURE__ */ e(
132
- Pn,
132
+ Ln,
133
133
  {
134
134
  columns: v ? 1 : void 0,
135
135
  minColumnWidth: 200,
136
136
  gap: 12,
137
137
  align: "stretch",
138
- children: _.map((A, I) => {
139
- const D = $ ? l.getHandleProps(A.id, `Move ${A.caption ?? `item ${I + 1}`}`) : null;
140
- return /* @__PURE__ */ a(
138
+ children: _.map((A, C) => {
139
+ const D = $ ? r.getHandleProps(A.id, `Move ${A.caption ?? `item ${C + 1}`}`) : null;
140
+ return /* @__PURE__ */ i(
141
141
  "div",
142
142
  {
143
- className: `nice-event-media__card${v ? " nice-event-media__card--row" : ""}${l.activeId === A.id ? " nice-event-media__card--dragging" : ""}`,
143
+ className: `nice-event-media__card${v ? " nice-event-media__card--row" : ""}${r.activeId === A.id ? " nice-event-media__card--dragging" : ""}`,
144
144
  onClick: () => m == null ? void 0 : m(A),
145
145
  onPointerEnter: D == null ? void 0 : D.onPointerEnter,
146
146
  role: m ? "button" : void 0,
@@ -158,15 +158,15 @@ const Pt = ({ item: s }) => {
158
158
  onPointerDown: D.onPointerDown,
159
159
  onKeyDown: D.onKeyDown,
160
160
  onClick: (N) => N.stopPropagation(),
161
- children: /* @__PURE__ */ e(bn, { size: 14 })
161
+ children: /* @__PURE__ */ e(In, { size: 14 })
162
162
  }
163
163
  ),
164
- /* @__PURE__ */ e(Pt, { item: A }),
165
- /* @__PURE__ */ a("div", { className: "nice-event-media__body", children: [
164
+ /* @__PURE__ */ e(Lt, { item: A }),
165
+ /* @__PURE__ */ i("div", { className: "nice-event-media__body", children: [
166
166
  A.caption && /* @__PURE__ */ e("span", { className: "nice-event-media__caption", children: A.caption }),
167
167
  A.uploadedByName && /* @__PURE__ */ e("span", { className: "nice-event-media__uploader", children: A.uploadedByName }),
168
- /* @__PURE__ */ a("div", { className: "nice-event-media__actions", children: [
169
- d && /* @__PURE__ */ a(
168
+ /* @__PURE__ */ i("div", { className: "nice-event-media__actions", children: [
169
+ d && /* @__PURE__ */ i(
170
170
  "button",
171
171
  {
172
172
  type: "button",
@@ -176,7 +176,7 @@ const Pt = ({ item: s }) => {
176
176
  },
177
177
  "aria-label": "Like",
178
178
  children: [
179
- /* @__PURE__ */ e(dt, { size: 15 }),
179
+ /* @__PURE__ */ e(gt, { size: 15 }),
180
180
  " ",
181
181
  A.likes ?? 0
182
182
  ]
@@ -191,7 +191,7 @@ const Pt = ({ item: s }) => {
191
191
  N.stopPropagation(), o(A.id);
192
192
  },
193
193
  "aria-label": "Delete",
194
- children: /* @__PURE__ */ e(Te, { size: 15 })
194
+ children: /* @__PURE__ */ e(De, { size: 15 })
195
195
  }
196
196
  )
197
197
  ] })
@@ -210,29 +210,29 @@ const Pt = ({ item: s }) => {
210
210
  ), ye = ({
211
211
  title: s,
212
212
  description: t,
213
- icon: r,
213
+ icon: c,
214
214
  action: n,
215
- className: c
215
+ className: l
216
216
  }) => /* @__PURE__ */ e(
217
- kt,
217
+ $t,
218
218
  {
219
219
  size: "sm",
220
220
  title: s,
221
221
  description: t,
222
- icon: r,
222
+ icon: c,
223
223
  action: n,
224
- className: c
224
+ className: l
225
225
  }
226
- ), zi = ee(
227
- function(t, r) {
226
+ ), Di = ee(
227
+ function(t, c) {
228
228
  const {
229
229
  items: n,
230
- layout: c = "grid",
230
+ layout: l = "grid",
231
231
  onReorder: o,
232
232
  onItemAdd: d,
233
233
  onItemRemove: m,
234
234
  onCaptionChange: h,
235
- onItemClick: i,
235
+ onItemClick: a,
236
236
  previewMode: u = !1,
237
237
  transition: p = "fade",
238
238
  defaultDurationMs: b = 3e3,
@@ -242,60 +242,60 @@ const Pt = ({ item: s }) => {
242
242
  size: k = "md",
243
243
  className: _,
244
244
  style: $
245
- } = t, [l, y] = E(0), [v, A] = E(null), [I, D] = E(""), N = g || w, L = !!o && !N, V = Mn({ items: n, onReorder: o, disabled: !L }), B = n.length > 0 ? Math.min(l, n.length - 1) : 0, C = n[B], O = (C == null ? void 0 : C.durationMs) ?? b;
246
- Oe(() => {
245
+ } = t, [r, y] = E(0), [v, A] = E(null), [C, D] = E(""), N = g || w, L = !!o && !N, F = Rn({ items: n, onReorder: o, disabled: !L }), B = n.length > 0 ? Math.min(r, n.length - 1) : 0, I = n[B], R = (I == null ? void 0 : I.durationMs) ?? b;
246
+ Ue(() => {
247
247
  if (!u || !f || n.length < 2)
248
248
  return;
249
249
  const M = window.setTimeout(
250
250
  () => y((j) => (j + 1) % n.length),
251
- Math.max(250, O)
251
+ Math.max(250, R)
252
252
  );
253
253
  return () => window.clearTimeout(M);
254
- }, [u, f, n.length, B, O]);
254
+ }, [u, f, n.length, B, R]);
255
255
  const z = X(
256
256
  () => n.reduce((M, j) => M + (j.durationMs ?? b), 0),
257
257
  [n, b]
258
258
  ), P = (M) => {
259
- h == null || h(M, I), A(null), D("");
259
+ h == null || h(M, C), A(null), D("");
260
260
  };
261
- return n.length === 0 ? /* @__PURE__ */ e("div", { ref: r, className: `nice-media-collage ${_ ?? ""}`, style: $, children: /* @__PURE__ */ e(
261
+ return n.length === 0 ? /* @__PURE__ */ e("div", { ref: c, className: `nice-media-collage ${_ ?? ""}`, style: $, children: /* @__PURE__ */ e(
262
262
  ye,
263
263
  {
264
- icon: /* @__PURE__ */ e(xn, { size: 28 }),
264
+ icon: /* @__PURE__ */ e(Sn, { size: 28 }),
265
265
  title: "Nothing in the collage yet",
266
266
  description: "Add photos or video to start arranging them.",
267
- action: d && !N ? /* @__PURE__ */ e(qe, { accept: "image/*,video/*", multiple: !0, onFilesSelected: d }) : void 0
267
+ action: d && !N ? /* @__PURE__ */ e(Qe, { accept: "image/*,video/*", multiple: !0, onFilesSelected: d }) : void 0
268
268
  }
269
- ) }) : u ? /* @__PURE__ */ a(
269
+ ) }) : u ? /* @__PURE__ */ i(
270
270
  "div",
271
271
  {
272
- ref: r,
272
+ ref: c,
273
273
  className: `nice-media-collage nice-media-collage--preview nice-media-collage--${p} ${_ ?? ""}`,
274
274
  style: $,
275
275
  children: [
276
- /* @__PURE__ */ a("div", { className: "nice-media-collage__stage", "aria-live": "polite", children: [
277
- (C == null ? void 0 : C.type) === "video" ? /* @__PURE__ */ e(
276
+ /* @__PURE__ */ i("div", { className: "nice-media-collage__stage", "aria-live": "polite", children: [
277
+ (I == null ? void 0 : I.type) === "video" ? /* @__PURE__ */ e(
278
278
  "video",
279
279
  {
280
280
  className: "nice-media-collage__slide",
281
- src: C.mediaUrl,
281
+ src: I.mediaUrl,
282
282
  controls: !0
283
283
  },
284
- C.id
284
+ I.id
285
285
  ) : /* @__PURE__ */ e(
286
286
  "img",
287
287
  {
288
288
  className: "nice-media-collage__slide",
289
- src: C == null ? void 0 : C.mediaUrl,
290
- alt: (C == null ? void 0 : C.caption) ?? ""
289
+ src: I == null ? void 0 : I.mediaUrl,
290
+ alt: (I == null ? void 0 : I.caption) ?? ""
291
291
  },
292
- C == null ? void 0 : C.id
292
+ I == null ? void 0 : I.id
293
293
  ),
294
- (C == null ? void 0 : C.caption) && /* @__PURE__ */ e("p", { className: "nice-media-collage__slide-caption", children: C.caption })
294
+ (I == null ? void 0 : I.caption) && /* @__PURE__ */ e("p", { className: "nice-media-collage__slide-caption", children: I.caption })
295
295
  ] }),
296
- /* @__PURE__ */ a("div", { className: "nice-media-collage__playbar", children: [
296
+ /* @__PURE__ */ i("div", { className: "nice-media-collage__playbar", children: [
297
297
  /* @__PURE__ */ e(
298
- F,
298
+ V,
299
299
  {
300
300
  size: "sm",
301
301
  variant: "ghost",
@@ -303,13 +303,13 @@ const Pt = ({ item: s }) => {
303
303
  children: "Previous"
304
304
  }
305
305
  ),
306
- /* @__PURE__ */ a("span", { className: "nice-media-collage__counter", children: [
306
+ /* @__PURE__ */ i("span", { className: "nice-media-collage__counter", children: [
307
307
  B + 1,
308
308
  " / ",
309
309
  n.length
310
310
  ] }),
311
311
  /* @__PURE__ */ e(
312
- F,
312
+ V,
313
313
  {
314
314
  size: "sm",
315
315
  variant: "ghost",
@@ -320,19 +320,19 @@ const Pt = ({ item: s }) => {
320
320
  ] })
321
321
  ]
322
322
  }
323
- ) : /* @__PURE__ */ a(
323
+ ) : /* @__PURE__ */ i(
324
324
  "div",
325
325
  {
326
- ref: r,
327
- className: `nice-media-collage nice-media-collage--${c} nice-media-collage--${k} ${_ ?? ""}`,
326
+ ref: c,
327
+ className: `nice-media-collage nice-media-collage--${l} nice-media-collage--${k} ${_ ?? ""}`,
328
328
  style: $,
329
329
  children: [
330
- /* @__PURE__ */ a("div", { className: "nice-media-collage__toolbar", children: [
330
+ /* @__PURE__ */ i("div", { className: "nice-media-collage__toolbar", children: [
331
331
  /* @__PURE__ */ e(
332
- Tn,
332
+ Bn,
333
333
  {
334
334
  size: "sm",
335
- value: c,
335
+ value: l,
336
336
  readOnly: !0,
337
337
  options: [
338
338
  { value: "sequence", label: "Sequence" },
@@ -341,7 +341,7 @@ const Pt = ({ item: s }) => {
341
341
  ]
342
342
  }
343
343
  ),
344
- /* @__PURE__ */ a("span", { className: "nice-media-collage__duration", children: [
344
+ /* @__PURE__ */ i("span", { className: "nice-media-collage__duration", children: [
345
345
  n.length,
346
346
  " item",
347
347
  n.length === 1 ? "" : "s",
@@ -350,7 +350,7 @@ const Pt = ({ item: s }) => {
350
350
  "s"
351
351
  ] }),
352
352
  d && !N && /* @__PURE__ */ e(
353
- qe,
353
+ Qe,
354
354
  {
355
355
  accept: "image/*,video/*",
356
356
  multiple: !0,
@@ -364,13 +364,13 @@ const Pt = ({ item: s }) => {
364
364
  {
365
365
  className: "nice-media-collage__tiles",
366
366
  "aria-label": "Collage order",
367
- "aria-busy": V.dragging,
367
+ "aria-busy": F.dragging,
368
368
  children: n.map((M, j) => {
369
- const W = L ? V.getHandleProps(M.id, `Move ${M.caption ?? `item ${j + 1}`}`) : null;
370
- return /* @__PURE__ */ a(
369
+ const W = L ? F.getHandleProps(M.id, `Move ${M.caption ?? `item ${j + 1}`}`) : null;
370
+ return /* @__PURE__ */ i(
371
371
  "li",
372
372
  {
373
- className: `nice-media-collage__tile${V.activeId === M.id ? " nice-media-collage__tile--active" : ""}${V.overId === M.id ? " nice-media-collage__tile--over" : ""}`,
373
+ className: `nice-media-collage__tile${F.activeId === M.id ? " nice-media-collage__tile--active" : ""}${F.overId === M.id ? " nice-media-collage__tile--over" : ""}`,
374
374
  onPointerEnter: W == null ? void 0 : W.onPointerEnter,
375
375
  children: [
376
376
  /* @__PURE__ */ e("span", { className: "nice-media-collage__index", "aria-hidden": "true", children: j + 1 }),
@@ -379,9 +379,9 @@ const Pt = ({ item: s }) => {
379
379
  {
380
380
  type: "button",
381
381
  className: "nice-media-collage__thumb-button",
382
- onClick: () => i == null ? void 0 : i(M),
383
- disabled: !i,
384
- children: M.type === "video" ? /* @__PURE__ */ e("span", { className: "nice-media-collage__video-thumb", children: /* @__PURE__ */ e(wn, { size: 22 }) }) : /* @__PURE__ */ e(
382
+ onClick: () => a == null ? void 0 : a(M),
383
+ disabled: !a,
384
+ children: M.type === "video" ? /* @__PURE__ */ e("span", { className: "nice-media-collage__video-thumb", children: /* @__PURE__ */ e(We, { size: 22 }) }) : /* @__PURE__ */ e(
385
385
  "img",
386
386
  {
387
387
  className: "nice-media-collage__thumb",
@@ -395,7 +395,7 @@ const Pt = ({ item: s }) => {
395
395
  v === M.id ? /* @__PURE__ */ e(
396
396
  J,
397
397
  {
398
- value: I,
398
+ value: C,
399
399
  onChange: D,
400
400
  placeholder: "Caption",
401
401
  autoFocus: !0,
@@ -417,7 +417,7 @@ const Pt = ({ item: s }) => {
417
417
  children: M.caption || /* @__PURE__ */ e("em", { children: "Add a caption" })
418
418
  }
419
419
  ),
420
- /* @__PURE__ */ a("div", { className: "nice-media-collage__tile-actions", children: [
420
+ /* @__PURE__ */ i("div", { className: "nice-media-collage__tile-actions", children: [
421
421
  W && /* @__PURE__ */ e(
422
422
  "span",
423
423
  {
@@ -429,18 +429,18 @@ const Pt = ({ item: s }) => {
429
429
  draggable: W.draggable,
430
430
  onPointerDown: W.onPointerDown,
431
431
  onKeyDown: W.onKeyDown,
432
- children: /* @__PURE__ */ e(bn, { size: 14 })
432
+ children: /* @__PURE__ */ e(In, { size: 14 })
433
433
  }
434
434
  ),
435
435
  m && !w && /* @__PURE__ */ e(
436
- F,
436
+ V,
437
437
  {
438
438
  size: "sm",
439
439
  variant: "ghost",
440
440
  ariaLabel: `Remove ${M.caption ?? `item ${j + 1}`}`,
441
441
  disabled: g,
442
442
  onClick: () => m(M.id),
443
- children: /* @__PURE__ */ e(Te, { size: 14 })
443
+ children: /* @__PURE__ */ e(De, { size: 14 })
444
444
  }
445
445
  )
446
446
  ] })
@@ -451,8 +451,8 @@ const Pt = ({ item: s }) => {
451
451
  })
452
452
  }
453
453
  ),
454
- d && !N && n.length > 0 && /* @__PURE__ */ a("p", { className: "nice-media-collage__hint", children: [
455
- /* @__PURE__ */ e(kn, { size: 12 }),
454
+ d && !N && n.length > 0 && /* @__PURE__ */ i("p", { className: "nice-media-collage__hint", children: [
455
+ /* @__PURE__ */ e(zn, { size: 12 }),
456
456
  " Drag a tile, or focus one and press Space then the arrow keys."
457
457
  ] })
458
458
  ]
@@ -460,11 +460,11 @@ const Pt = ({ item: s }) => {
460
460
  );
461
461
  }
462
462
  );
463
- function Ee(s) {
463
+ function Be(s) {
464
464
  const t = s.toLowerCase();
465
465
  return ["active", "live", "published", "completed", "confirmed"].includes(t) ? "success" : ["cancelled", "canceled", "rejected", "failed"].includes(t) ? "error" : ["scheduled", "pending", "planning"].includes(t) ? "info" : ["draft", "archived"].includes(t) ? "secondary" : "warning";
466
466
  }
467
- const Tt = {
467
+ const Bt = {
468
468
  micro: [],
469
469
  compact: ["details", "location", "budget"],
470
470
  normal: ["details", "location", "schedule", "participants", "tasks", "surveys", "budget"],
@@ -480,17 +480,17 @@ const Tt = {
480
480
  "documents",
481
481
  "settings"
482
482
  ]
483
- }, $i = ee(
484
- function(t, r) {
485
- var an, sn, rn, ln, cn, on;
483
+ }, Ei = ee(
484
+ function(t, c) {
485
+ var dn, un, mn, hn, pn, gn;
486
486
  const {
487
487
  event: n,
488
- participants: c = [],
488
+ participants: l = [],
489
489
  surveys: o = [],
490
490
  billing: d = [],
491
491
  scheduleItems: m = [],
492
492
  tasks: h = [],
493
- vendors: i = [],
493
+ vendors: a = [],
494
494
  documents: u = [],
495
495
  displayMode: p = "normal",
496
496
  tabs: b,
@@ -500,18 +500,18 @@ const Tt = {
500
500
  tabsCentered: k = "auto",
501
501
  countLocation: _ = "bottom",
502
502
  showDetails: $ = !0,
503
- showLocation: l = !0,
503
+ showLocation: r = !0,
504
504
  showSchedule: y = !0,
505
505
  showParticipants: v = !0,
506
506
  showTasks: A = !0,
507
- showSurveys: I = !0,
507
+ showSurveys: C = !0,
508
508
  showVendors: D = !0,
509
509
  showBudget: N = !0,
510
510
  showDocuments: L = !0,
511
- showSettings: V = !0,
511
+ showSettings: F = !0,
512
512
  editable: B = !1,
513
- onSave: C,
514
- onPublish: O,
513
+ onSave: I,
514
+ onPublish: R,
515
515
  onShare: z,
516
516
  onExport: P,
517
517
  onUpdateEvent: M,
@@ -521,66 +521,66 @@ const Tt = {
521
521
  onAddBilling: Y,
522
522
  className: q,
523
523
  style: Q
524
- } = t, [R, ne] = E(n.title), [H, _e] = E(n.description ?? ""), [le, me] = E(n.startDate ?? ""), [Ne, Me] = E(n.endDate ?? ""), [be, he] = E(((an = n.location) == null ? void 0 : an.name) ?? ""), [we, Ve] = E(((sn = n.location) == null ? void 0 : sn.address) ?? ""), [pe, oe] = E(((rn = n.location) == null ? void 0 : rn.virtualUrl) ?? ""), [re, Ie] = E(((ln = n.location) == null ? void 0 : ln.isVirtual) ?? !1), [ge, Ce] = E(""), [fe, Fe] = E("single"), [Se, ze] = E(""), [de, $e] = E(""), [xe, T] = E(""), [U, K] = E("PLN"), Z = {
524
+ } = t, [O, ne] = E(n.title), [H, _e] = E(n.description ?? ""), [ce, me] = E(n.startDate ?? ""), [Ne, Ee] = E(n.endDate ?? ""), [be, he] = E(((dn = n.location) == null ? void 0 : dn.name) ?? ""), [we, je] = E(((un = n.location) == null ? void 0 : un.address) ?? ""), [pe, oe] = E(((mn = n.location) == null ? void 0 : mn.virtualUrl) ?? ""), [re, Ie] = E(((hn = n.location) == null ? void 0 : hn.isVirtual) ?? !1), [ge, Se] = E(""), [fe, Ge] = E("single"), [ze, $e] = E(""), [de, Ae] = E(""), [xe, T] = E(""), [U, K] = E("PLN"), Z = {
525
525
  details: $,
526
- location: l,
526
+ location: r,
527
527
  schedule: y,
528
528
  participants: v,
529
529
  tasks: A,
530
- surveys: I,
530
+ surveys: C,
531
531
  vendors: D,
532
532
  budget: N,
533
533
  documents: L,
534
- settings: V
535
- }, ue = (b ?? Tt[p]).filter((x) => Z[x] !== !1), [De, On] = E(ue[0] ?? "details"), Rn = f ?? De, Un = G(
534
+ settings: F
535
+ }, ue = (b ?? Bt[p]).filter((x) => Z[x] !== !1), [Le, Fn] = E(ue[0] ?? "details"), Vn = f ?? Le, Wn = G(
536
536
  (x) => {
537
- const ce = x;
538
- f === void 0 && On(ce), g == null || g(ce);
537
+ const le = x;
538
+ f === void 0 && Fn(le), g == null || g(le);
539
539
  },
540
540
  [f, g]
541
- ), Yn = G(() => {
541
+ ), qn = G(() => {
542
542
  M == null || M({
543
- title: R,
543
+ title: O,
544
544
  description: H || void 0,
545
- startDate: le || void 0,
545
+ startDate: ce || void 0,
546
546
  endDate: Ne || void 0
547
547
  });
548
- }, [R, H, le, Ne, M]), Xn = G(() => {
548
+ }, [O, H, ce, Ne, M]), jn = G(() => {
549
549
  j == null || j({
550
550
  name: be,
551
551
  address: we || void 0,
552
552
  virtualUrl: pe || void 0,
553
553
  isVirtual: re
554
554
  });
555
- }, [be, we, pe, re, j]), Vn = G(() => {
555
+ }, [be, we, pe, re, j]), Gn = G(() => {
556
556
  if (!ge.trim() || !W)
557
557
  return;
558
- const x = Se.split(",").map((ce) => ce.trim()).filter(Boolean);
559
- W(ge.trim(), fe, x.length > 0 ? x : void 0), Ce(""), ze("");
560
- }, [ge, fe, Se, W]), Fn = G(() => {
558
+ const x = ze.split(",").map((le) => le.trim()).filter(Boolean);
559
+ W(ge.trim(), fe, x.length > 0 ? x : void 0), Se(""), $e("");
560
+ }, [ge, fe, ze, W]), Kn = G(() => {
561
561
  !de.trim() || !Y || (Y({
562
562
  label: de.trim(),
563
563
  amount: parseFloat(xe) || 0,
564
564
  currency: U
565
- }), $e(""), T(""));
566
- }, [de, xe, U, Y]), Wn = X(
565
+ }), Ae(""), T(""));
566
+ }, [de, xe, U, Y]), Hn = X(
567
567
  () => d.map((x) => ({
568
568
  label: x.label,
569
569
  amount: x.amount
570
570
  })),
571
571
  [d]
572
- ), qn = X(() => d.reduce((x, ce) => x + ce.amount, 0), [d]), jn = ((cn = d[0]) == null ? void 0 : cn.currency) ?? "PLN", Gn = /* @__PURE__ */ a("div", { className: "nice-event-planning__form", children: [
572
+ ), Qn = X(() => d.reduce((x, le) => x + le.amount, 0), [d]), Zn = ((pn = d[0]) == null ? void 0 : pn.currency) ?? "PLN", Jn = /* @__PURE__ */ i("div", { className: "nice-event-planning__form", children: [
573
573
  /* @__PURE__ */ e(
574
574
  J,
575
575
  {
576
576
  label: "Title",
577
- value: R,
577
+ value: O,
578
578
  onChange: ne,
579
579
  readOnly: !B
580
580
  }
581
581
  ),
582
582
  /* @__PURE__ */ e(
583
- Ze,
583
+ sn,
584
584
  {
585
585
  label: "Description",
586
586
  value: H,
@@ -589,21 +589,21 @@ const Tt = {
589
589
  rows: 3
590
590
  }
591
591
  ),
592
- /* @__PURE__ */ a("div", { className: "nice-event-planning__row", children: [
593
- /* @__PURE__ */ a("label", { className: "nice-field", children: [
592
+ /* @__PURE__ */ i("div", { className: "nice-event-planning__row", children: [
593
+ /* @__PURE__ */ i("label", { className: "nice-field", children: [
594
594
  /* @__PURE__ */ e("span", { className: "nice-field__label", children: "Start" }),
595
595
  /* @__PURE__ */ e(
596
596
  "input",
597
597
  {
598
598
  className: "nice-input",
599
599
  type: "datetime-local",
600
- value: le,
600
+ value: ce,
601
601
  onChange: (x) => me(x.target.value),
602
602
  readOnly: !B
603
603
  }
604
604
  )
605
605
  ] }),
606
- /* @__PURE__ */ a("label", { className: "nice-field", children: [
606
+ /* @__PURE__ */ i("label", { className: "nice-field", children: [
607
607
  /* @__PURE__ */ e("span", { className: "nice-field__label", children: "End" }),
608
608
  /* @__PURE__ */ e(
609
609
  "input",
@@ -611,24 +611,24 @@ const Tt = {
611
611
  className: "nice-input",
612
612
  type: "datetime-local",
613
613
  value: Ne,
614
- onChange: (x) => Me(x.target.value),
614
+ onChange: (x) => Ee(x.target.value),
615
615
  readOnly: !B
616
616
  }
617
617
  )
618
618
  ] })
619
619
  ] }),
620
620
  B && /* @__PURE__ */ e(
621
- F,
621
+ V,
622
622
  {
623
623
  variant: "primary",
624
624
  leftIcon: /* @__PURE__ */ e(ie, { name: "check", size: "sm" }),
625
- onClick: Yn,
625
+ onClick: qn,
626
626
  children: "Save details"
627
627
  }
628
628
  )
629
- ] }), Kn = /* @__PURE__ */ a("div", { className: "nice-event-planning__form", children: [
629
+ ] }), et = /* @__PURE__ */ i("div", { className: "nice-event-planning__form", children: [
630
630
  /* @__PURE__ */ e(
631
- We,
631
+ Ke,
632
632
  {
633
633
  label: "Virtual event",
634
634
  checked: re,
@@ -658,62 +658,62 @@ const Tt = {
658
658
  {
659
659
  label: "Address",
660
660
  value: we,
661
- onChange: Ve,
661
+ onChange: je,
662
662
  readOnly: !B
663
663
  }
664
664
  ),
665
665
  B && /* @__PURE__ */ e(
666
- F,
666
+ V,
667
667
  {
668
668
  variant: "primary",
669
669
  leftIcon: /* @__PURE__ */ e(ie, { name: "check", size: "sm" }),
670
- onClick: Xn,
670
+ onClick: jn,
671
671
  children: "Save location"
672
672
  }
673
673
  )
674
- ] }), Hn = /* @__PURE__ */ e("div", { className: "nice-event-planning__participants", children: c.length === 0 ? /* @__PURE__ */ e("p", { className: "nice-event-planning__empty", children: "No participants yet." }) : /* @__PURE__ */ a(Ke, { children: [
675
- /* @__PURE__ */ e(un, { max: 8, children: c.map((x) => /* @__PURE__ */ e(Be, { name: x.name, src: x.avatarUrl }, x.id)) }),
676
- /* @__PURE__ */ e("ul", { className: "nice-event-planning__participant-list", children: c.map((x) => /* @__PURE__ */ a("li", { className: "nice-event-planning__participant", children: [
677
- /* @__PURE__ */ e(Be, { name: x.name, src: x.avatarUrl, size: "sm" }),
674
+ ] }), nt = /* @__PURE__ */ e("div", { className: "nice-event-planning__participants", children: l.length === 0 ? /* @__PURE__ */ e("p", { className: "nice-event-planning__empty", children: "No participants yet." }) : /* @__PURE__ */ i(Ve, { children: [
675
+ /* @__PURE__ */ e(fn, { max: 8, children: l.map((x) => /* @__PURE__ */ e(Oe, { name: x.name, src: x.avatarUrl }, x.id)) }),
676
+ /* @__PURE__ */ e("ul", { className: "nice-event-planning__participant-list", children: l.map((x) => /* @__PURE__ */ i("li", { className: "nice-event-planning__participant", children: [
677
+ /* @__PURE__ */ e(Oe, { name: x.name, src: x.avatarUrl, size: "sm" }),
678
678
  /* @__PURE__ */ e("span", { className: "nice-event-planning__participant-name", children: x.name }),
679
- /* @__PURE__ */ e(te, { size: "xs", subtle: !0, variant: Ee(x.status), children: x.status })
679
+ /* @__PURE__ */ e(te, { size: "xs", subtle: !0, variant: Be(x.status), children: x.status })
680
680
  ] }, x.id)) })
681
- ] }) }), Qn = /* @__PURE__ */ a("div", { className: "nice-event-planning__form", children: [
682
- o.length === 0 ? /* @__PURE__ */ e("p", { className: "nice-event-planning__empty", children: "No surveys yet." }) : o.map((x) => /* @__PURE__ */ a("div", { className: "nice-event-planning__survey", children: [
681
+ ] }) }), tt = /* @__PURE__ */ i("div", { className: "nice-event-planning__form", children: [
682
+ o.length === 0 ? /* @__PURE__ */ e("p", { className: "nice-event-planning__empty", children: "No surveys yet." }) : o.map((x) => /* @__PURE__ */ i("div", { className: "nice-event-planning__survey", children: [
683
683
  /* @__PURE__ */ e("strong", { children: x.question }),
684
684
  " ",
685
685
  /* @__PURE__ */ e(te, { size: "xs", outline: !0, variant: "info", children: x.type }),
686
- x.options && /* @__PURE__ */ e("div", { className: "nice-event-planning__survey-options", children: x.options.map((ce, ot) => /* @__PURE__ */ e(
687
- F,
686
+ x.options && /* @__PURE__ */ e("div", { className: "nice-event-planning__survey-options", children: x.options.map((le, pt) => /* @__PURE__ */ e(
687
+ V,
688
688
  {
689
689
  size: "sm",
690
690
  variant: "outline",
691
- onClick: () => S == null ? void 0 : S(x.id, ce),
692
- children: ce
691
+ onClick: () => S == null ? void 0 : S(x.id, le),
692
+ children: le
693
693
  },
694
- ot
694
+ pt
695
695
  )) }),
696
- x.responses && /* @__PURE__ */ a("span", { className: "nice-event-planning__muted", children: [
696
+ x.responses && /* @__PURE__ */ i("span", { className: "nice-event-planning__muted", children: [
697
697
  x.responses.length,
698
698
  " responses"
699
699
  ] })
700
700
  ] }, x.id)),
701
- B && W && /* @__PURE__ */ a("div", { className: "nice-event-planning__form", children: [
701
+ B && W && /* @__PURE__ */ i("div", { className: "nice-event-planning__form", children: [
702
702
  /* @__PURE__ */ e(
703
703
  J,
704
704
  {
705
705
  label: "New survey question",
706
706
  value: ge,
707
- onChange: Ce,
707
+ onChange: Se,
708
708
  placeholder: "Question"
709
709
  }
710
710
  ),
711
711
  /* @__PURE__ */ e(
712
- Pe,
712
+ Te,
713
713
  {
714
714
  label: "Type",
715
715
  value: fe,
716
- onChange: (x) => Fe(x),
716
+ onChange: (x) => Ge(x),
717
717
  options: [
718
718
  { value: "single", label: "Single choice" },
719
719
  { value: "multiple", label: "Multiple choice" },
@@ -726,37 +726,37 @@ const Tt = {
726
726
  J,
727
727
  {
728
728
  label: "Options (comma-separated)",
729
- value: Se,
730
- onChange: ze,
729
+ value: ze,
730
+ onChange: $e,
731
731
  placeholder: "Yes, No, Maybe"
732
732
  }
733
733
  ),
734
734
  /* @__PURE__ */ e(
735
- F,
735
+ V,
736
736
  {
737
737
  variant: "primary",
738
738
  leftIcon: /* @__PURE__ */ e(ie, { name: "plus", size: "sm" }),
739
- onClick: Vn,
739
+ onClick: Gn,
740
740
  disabled: !ge.trim(),
741
741
  children: "Add survey"
742
742
  }
743
743
  )
744
744
  ] })
745
- ] }), Zn = /* @__PURE__ */ a("div", { className: "nice-event-planning__form", children: [
745
+ ] }), it = /* @__PURE__ */ i("div", { className: "nice-event-planning__form", children: [
746
746
  d.length === 0 ? /* @__PURE__ */ e("p", { className: "nice-event-planning__empty", children: "No billing items yet." }) : /* @__PURE__ */ e(
747
- It,
747
+ At,
748
748
  {
749
- lines: [...Wn, { label: "Total", amount: qn, isSummary: !0 }],
750
- currency: jn
749
+ lines: [...Hn, { label: "Total", amount: Qn, isSummary: !0 }],
750
+ currency: Zn
751
751
  }
752
752
  ),
753
- B && Y && /* @__PURE__ */ a("div", { className: "nice-event-planning__row", children: [
753
+ B && Y && /* @__PURE__ */ i("div", { className: "nice-event-planning__row", children: [
754
754
  /* @__PURE__ */ e(
755
755
  J,
756
756
  {
757
757
  label: "Item",
758
758
  value: de,
759
- onChange: $e,
759
+ onChange: Ae,
760
760
  placeholder: "Catering"
761
761
  }
762
762
  ),
@@ -770,7 +770,7 @@ const Tt = {
770
770
  }
771
771
  ),
772
772
  /* @__PURE__ */ e(
773
- Pe,
773
+ Te,
774
774
  {
775
775
  label: "Currency",
776
776
  value: U,
@@ -779,18 +779,18 @@ const Tt = {
779
779
  }
780
780
  ),
781
781
  /* @__PURE__ */ e(
782
- F,
782
+ V,
783
783
  {
784
784
  variant: "primary",
785
785
  leftIcon: /* @__PURE__ */ e(ie, { name: "plus", size: "sm" }),
786
- onClick: Fn,
786
+ onClick: Kn,
787
787
  disabled: !de.trim(),
788
788
  children: "Add"
789
789
  }
790
790
  )
791
791
  ] })
792
- ] }), Jn = /* @__PURE__ */ a("div", { className: "nice-event-planning__form", children: [
793
- /* @__PURE__ */ e(We, { label: "Public event", checked: n.isPublic ?? !1, disabled: !B }),
792
+ ] }), at = /* @__PURE__ */ i("div", { className: "nice-event-planning__form", children: [
793
+ /* @__PURE__ */ e(Ke, { label: "Public event", checked: n.isPublic ?? !1, disabled: !B }),
794
794
  /* @__PURE__ */ e(
795
795
  J,
796
796
  {
@@ -801,54 +801,54 @@ const Tt = {
801
801
  readOnly: !B
802
802
  }
803
803
  ),
804
- /* @__PURE__ */ a("div", { className: "nice-event-planning__muted", children: [
804
+ /* @__PURE__ */ i("div", { className: "nice-event-planning__muted", children: [
805
805
  "Host: ",
806
806
  n.hostName,
807
807
  " · Created ",
808
808
  new Date(n.createdAt).toLocaleDateString()
809
809
  ] })
810
- ] }), et = /* @__PURE__ */ e("div", { className: "nice-event-planning__list", children: m.length === 0 ? /* @__PURE__ */ e("p", { className: "nice-event-planning__empty", children: "No agenda items yet." }) : /* @__PURE__ */ e("ul", { className: "nice-event-planning__schedule", children: m.map((x) => /* @__PURE__ */ a("li", { className: "nice-event-planning__schedule-item", children: [
811
- /* @__PURE__ */ a("span", { className: "nice-event-planning__schedule-time", children: [
810
+ ] }), st = /* @__PURE__ */ e("div", { className: "nice-event-planning__list", children: m.length === 0 ? /* @__PURE__ */ e("p", { className: "nice-event-planning__empty", children: "No agenda items yet." }) : /* @__PURE__ */ e("ul", { className: "nice-event-planning__schedule", children: m.map((x) => /* @__PURE__ */ i("li", { className: "nice-event-planning__schedule-item", children: [
811
+ /* @__PURE__ */ i("span", { className: "nice-event-planning__schedule-time", children: [
812
812
  /* @__PURE__ */ e(ie, { name: "clock", size: "sm" }),
813
813
  x.startTime ?? "",
814
814
  x.endTime ? `–${x.endTime}` : ""
815
815
  ] }),
816
816
  /* @__PURE__ */ e("span", { className: "nice-event-planning__schedule-title", children: x.title }),
817
817
  x.location && /* @__PURE__ */ e("span", { className: "nice-event-planning__muted", children: x.location })
818
- ] }, x.id)) }) }), nt = /* @__PURE__ */ e("div", { className: "nice-event-planning__list", children: h.length === 0 ? /* @__PURE__ */ e("p", { className: "nice-event-planning__empty", children: "No tasks yet." }) : /* @__PURE__ */ e("ul", { className: "nice-event-planning__tasks", children: h.map((x) => /* @__PURE__ */ a("li", { className: "nice-event-planning__task", children: [
819
- /* @__PURE__ */ e(We, { label: x.title, checked: x.done ?? !1, disabled: !B }),
818
+ ] }, x.id)) }) }), rt = /* @__PURE__ */ e("div", { className: "nice-event-planning__list", children: h.length === 0 ? /* @__PURE__ */ e("p", { className: "nice-event-planning__empty", children: "No tasks yet." }) : /* @__PURE__ */ e("ul", { className: "nice-event-planning__tasks", children: h.map((x) => /* @__PURE__ */ i("li", { className: "nice-event-planning__task", children: [
819
+ /* @__PURE__ */ e(Ke, { label: x.title, checked: x.done ?? !1, disabled: !B }),
820
820
  x.assigneeName && /* @__PURE__ */ e(te, { size: "xs", subtle: !0, variant: "info", children: x.assigneeName }),
821
821
  x.dueDate && /* @__PURE__ */ e("span", { className: "nice-event-planning__muted", children: x.dueDate })
822
- ] }, x.id)) }) }), tt = /* @__PURE__ */ e("div", { className: "nice-event-planning__list", children: i.length === 0 ? /* @__PURE__ */ e("p", { className: "nice-event-planning__empty", children: "No vendors yet." }) : /* @__PURE__ */ e("ul", { className: "nice-event-planning__vendors", children: i.map((x) => /* @__PURE__ */ a("li", { className: "nice-event-planning__vendor", children: [
822
+ ] }, x.id)) }) }), ct = /* @__PURE__ */ e("div", { className: "nice-event-planning__list", children: a.length === 0 ? /* @__PURE__ */ e("p", { className: "nice-event-planning__empty", children: "No vendors yet." }) : /* @__PURE__ */ e("ul", { className: "nice-event-planning__vendors", children: a.map((x) => /* @__PURE__ */ i("li", { className: "nice-event-planning__vendor", children: [
823
823
  /* @__PURE__ */ e(ie, { name: "briefcase", size: "sm" }),
824
824
  /* @__PURE__ */ e("span", { className: "nice-event-planning__vendor-name", children: x.name }),
825
825
  x.category && /* @__PURE__ */ e("span", { className: "nice-event-planning__muted", children: x.category }),
826
- x.status && /* @__PURE__ */ e(te, { size: "xs", subtle: !0, variant: Ee(x.status), children: x.status }),
827
- x.cost != null && /* @__PURE__ */ a("span", { className: "nice-event-planning__vendor-cost", children: [
826
+ x.status && /* @__PURE__ */ e(te, { size: "xs", subtle: !0, variant: Be(x.status), children: x.status }),
827
+ x.cost != null && /* @__PURE__ */ i("span", { className: "nice-event-planning__vendor-cost", children: [
828
828
  x.cost,
829
829
  " ",
830
830
  x.currency ?? ""
831
831
  ] })
832
- ] }, x.id)) }) }), it = /* @__PURE__ */ e("div", { className: "nice-event-planning__list", children: u.length === 0 ? /* @__PURE__ */ e("p", { className: "nice-event-planning__empty", children: "No documents yet." }) : /* @__PURE__ */ e("ul", { className: "nice-event-planning__documents", children: u.map((x) => /* @__PURE__ */ a("li", { className: "nice-event-planning__document", children: [
832
+ ] }, x.id)) }) }), lt = /* @__PURE__ */ e("div", { className: "nice-event-planning__list", children: u.length === 0 ? /* @__PURE__ */ e("p", { className: "nice-event-planning__empty", children: "No documents yet." }) : /* @__PURE__ */ e("ul", { className: "nice-event-planning__documents", children: u.map((x) => /* @__PURE__ */ i("li", { className: "nice-event-planning__document", children: [
833
833
  /* @__PURE__ */ e(ie, { name: "file", size: "sm" }),
834
834
  /* @__PURE__ */ e("span", { className: "nice-event-planning__document-name", children: x.name }),
835
835
  x.fileType && /* @__PURE__ */ e(te, { size: "xs", outline: !0, variant: "secondary", children: x.fileType }),
836
- x.sizeKb != null && /* @__PURE__ */ a("span", { className: "nice-event-planning__muted", children: [
836
+ x.sizeKb != null && /* @__PURE__ */ i("span", { className: "nice-event-planning__muted", children: [
837
837
  x.sizeKb,
838
838
  " KB"
839
839
  ] })
840
- ] }, x.id)) }) }), at = {
841
- details: Gn,
842
- location: Kn,
843
- schedule: et,
844
- participants: Hn,
845
- tasks: nt,
846
- surveys: Qn,
847
- vendors: tt,
848
- budget: Zn,
849
- documents: it,
850
- settings: Jn
851
- }, st = {
840
+ ] }, x.id)) }) }), ot = {
841
+ details: Jn,
842
+ location: et,
843
+ schedule: st,
844
+ participants: nt,
845
+ tasks: rt,
846
+ surveys: tt,
847
+ vendors: ct,
848
+ budget: it,
849
+ documents: lt,
850
+ settings: at
851
+ }, dt = {
852
852
  details: "file",
853
853
  location: "home",
854
854
  schedule: "clock",
@@ -859,50 +859,50 @@ const Tt = {
859
859
  budget: "dollar",
860
860
  documents: "folder",
861
861
  settings: "settings"
862
- }, rt = {
862
+ }, ut = {
863
863
  schedule: m.length || void 0,
864
- participants: c.length || void 0,
864
+ participants: l.length || void 0,
865
865
  tasks: h.length || void 0,
866
866
  surveys: o.length || void 0,
867
- vendors: i.length || void 0,
867
+ vendors: a.length || void 0,
868
868
  budget: d.length || void 0,
869
869
  documents: u.length || void 0
870
- }, lt = ue.map((x) => ({
870
+ }, mt = ue.map((x) => ({
871
871
  id: x,
872
872
  label: x.charAt(0).toUpperCase() + x.slice(1),
873
- icon: /* @__PURE__ */ e(ie, { name: st[x], size: "sm" }),
874
- badge: rt[x],
875
- content: at[x]
876
- })), ct = /* @__PURE__ */ a("div", { className: "nice-event-planning__toolbar", children: [
877
- /* @__PURE__ */ a("div", { className: "nice-event-planning__toolbar-title", children: [
873
+ icon: /* @__PURE__ */ e(ie, { name: dt[x], size: "sm" }),
874
+ badge: ut[x],
875
+ content: ot[x]
876
+ })), ht = /* @__PURE__ */ i("div", { className: "nice-event-planning__toolbar", children: [
877
+ /* @__PURE__ */ i("div", { className: "nice-event-planning__toolbar-title", children: [
878
878
  /* @__PURE__ */ e(ie, { name: "calendar", size: "md" }),
879
879
  /* @__PURE__ */ e("span", { className: "nice-event-planning__title", children: n.title }),
880
- /* @__PURE__ */ e(te, { size: "sm", variant: Ee(n.status), children: n.status })
880
+ /* @__PURE__ */ e(te, { size: "sm", variant: Be(n.status), children: n.status })
881
881
  ] }),
882
882
  /* @__PURE__ */ e("span", { className: "nice-event-planning__toolbar-spacer" }),
883
- /* @__PURE__ */ a("div", { className: "nice-event-planning__toolbar-actions", children: [
884
- C && /* @__PURE__ */ e(
885
- F,
883
+ /* @__PURE__ */ i("div", { className: "nice-event-planning__toolbar-actions", children: [
884
+ I && /* @__PURE__ */ e(
885
+ V,
886
886
  {
887
887
  size: "sm",
888
888
  variant: "primary",
889
889
  leftIcon: /* @__PURE__ */ e(ie, { name: "check", size: "sm" }),
890
- onClick: () => C({ title: R, description: H }),
890
+ onClick: () => I({ title: O, description: H }),
891
891
  children: "Save"
892
892
  }
893
893
  ),
894
- O && /* @__PURE__ */ e(
895
- F,
894
+ R && /* @__PURE__ */ e(
895
+ V,
896
896
  {
897
897
  size: "sm",
898
898
  variant: "success",
899
899
  leftIcon: /* @__PURE__ */ e(ie, { name: "upload", size: "sm" }),
900
- onClick: O,
900
+ onClick: R,
901
901
  children: "Publish"
902
902
  }
903
903
  ),
904
904
  z && /* @__PURE__ */ e(
905
- F,
905
+ V,
906
906
  {
907
907
  size: "sm",
908
908
  variant: "ghost",
@@ -912,7 +912,7 @@ const Tt = {
912
912
  }
913
913
  ),
914
914
  P && /* @__PURE__ */ e(
915
- F,
915
+ V,
916
916
  {
917
917
  size: "sm",
918
918
  variant: "ghost",
@@ -926,36 +926,36 @@ const Tt = {
926
926
  return p === "micro" ? /* @__PURE__ */ e(
927
927
  "div",
928
928
  {
929
- ref: r,
929
+ ref: c,
930
930
  className: `nice-event-planning nice-event-planning--micro ${q ?? ""}`,
931
931
  style: Q,
932
- children: /* @__PURE__ */ a("div", { className: "nice-event-planning__micro", children: [
932
+ children: /* @__PURE__ */ i("div", { className: "nice-event-planning__micro", children: [
933
933
  /* @__PURE__ */ e(ie, { name: "calendar", size: "md" }),
934
- /* @__PURE__ */ a("div", { className: "nice-event-planning__micro-body", children: [
934
+ /* @__PURE__ */ i("div", { className: "nice-event-planning__micro-body", children: [
935
935
  /* @__PURE__ */ e("span", { className: "nice-event-planning__title", children: n.title }),
936
- /* @__PURE__ */ a("span", { className: "nice-event-planning__muted", children: [
936
+ /* @__PURE__ */ i("span", { className: "nice-event-planning__muted", children: [
937
937
  n.startDate ? new Date(n.startDate).toLocaleString() : "No date",
938
- (on = n.location) != null && on.name ? ` · ${n.location.name}` : ""
938
+ (gn = n.location) != null && gn.name ? ` · ${n.location.name}` : ""
939
939
  ] })
940
940
  ] }),
941
- /* @__PURE__ */ e(te, { size: "sm", variant: Ee(n.status), children: n.status }),
942
- c.length > 0 && /* @__PURE__ */ e(un, { max: 4, size: "sm", children: c.map((x) => /* @__PURE__ */ e(Be, { name: x.name, src: x.avatarUrl, size: "sm" }, x.id)) })
941
+ /* @__PURE__ */ e(te, { size: "sm", variant: Be(n.status), children: n.status }),
942
+ l.length > 0 && /* @__PURE__ */ e(fn, { max: 4, size: "sm", children: l.map((x) => /* @__PURE__ */ e(Oe, { name: x.name, src: x.avatarUrl, size: "sm" }, x.id)) })
943
943
  ] })
944
944
  }
945
- ) : /* @__PURE__ */ a(
945
+ ) : /* @__PURE__ */ i(
946
946
  "div",
947
947
  {
948
- ref: r,
948
+ ref: c,
949
949
  className: `nice-event-planning nice-event-planning--${p} ${q ?? ""}`,
950
950
  style: Q,
951
951
  children: [
952
- ct,
952
+ ht,
953
953
  /* @__PURE__ */ e(
954
- Ct,
954
+ Pt,
955
955
  {
956
- tabs: lt,
957
- activeTab: Rn,
958
- onChange: Un,
956
+ tabs: mt,
957
+ activeTab: Vn,
958
+ onChange: Wn,
959
959
  iconOnly: w,
960
960
  centered: k,
961
961
  countLocation: _
@@ -966,7 +966,7 @@ const Tt = {
966
966
  );
967
967
  }
968
968
  );
969
- function Mt(s) {
969
+ function Rt(s) {
970
970
  switch (s) {
971
971
  case "confirmed":
972
972
  return "success";
@@ -980,60 +980,60 @@ function Mt(s) {
980
980
  return "secondary";
981
981
  }
982
982
  }
983
- const je = ({
983
+ const Ze = ({
984
984
  participant: s,
985
985
  showRole: t = !0,
986
- showStatus: r = !0,
986
+ showStatus: c = !0,
987
987
  meta: n,
988
- children: c,
988
+ children: l,
989
989
  size: o = "md",
990
990
  className: d
991
- }) => /* @__PURE__ */ a("li", { className: `nice-participant-row nice-participant-row--${o} ${d ?? ""}`, children: [
992
- /* @__PURE__ */ e(Be, { name: s.name, src: s.avatarUrl, size: o }),
991
+ }) => /* @__PURE__ */ i("li", { className: `nice-participant-row nice-participant-row--${o} ${d ?? ""}`, children: [
992
+ /* @__PURE__ */ e(Oe, { name: s.name, src: s.avatarUrl, size: o }),
993
993
  /* @__PURE__ */ e("span", { className: "nice-participant-row__name", children: s.name }),
994
994
  t && s.role && /* @__PURE__ */ e(te, { size: "xs", outline: !0, variant: "info", children: s.role }),
995
- r && s.status && /* @__PURE__ */ e(te, { size: "xs", subtle: !0, variant: Mt(s.status), children: s.status }),
995
+ c && s.status && /* @__PURE__ */ e(te, { size: "xs", subtle: !0, variant: Rt(s.status), children: s.status }),
996
996
  n && /* @__PURE__ */ e("span", { className: "nice-participant-row__meta", children: n }),
997
- c && /* @__PURE__ */ e("span", { className: "nice-participant-row__trailing", children: c })
998
- ] }), Dt = /^[^\s@,;]+@[^\s@,;]+\.[^\s@,;]{2,}$/, hn = /^.*<\s*([^<>\s]+)\s*>$/;
999
- function Dn(s) {
997
+ l && /* @__PURE__ */ e("span", { className: "nice-participant-row__trailing", children: l })
998
+ ] }), Ot = /^[^\s@,;]+@[^\s@,;]+\.[^\s@,;]{2,}$/, yn = /^.*<\s*([^<>\s]+)\s*>$/;
999
+ function On(s) {
1000
1000
  var o, d;
1001
- const t = [], r = [], n = /* @__PURE__ */ new Set();
1002
- let c = 0;
1001
+ const t = [], c = [], n = /* @__PURE__ */ new Set();
1002
+ let l = 0;
1003
1003
  if (!s)
1004
- return { valid: t, invalid: r, duplicates: c };
1004
+ return { valid: t, invalid: c, duplicates: l };
1005
1005
  for (const m of s.split(/[,;\r\n\t]+/)) {
1006
1006
  const h = m.trim();
1007
1007
  if (!h)
1008
1008
  continue;
1009
- const i = ((d = (o = hn.exec(h)) == null ? void 0 : o[1]) == null ? void 0 : d.trim()) ?? h, u = hn.test(h) ? [i] : i.split(/\s+/);
1009
+ const a = ((d = (o = yn.exec(h)) == null ? void 0 : o[1]) == null ? void 0 : d.trim()) ?? h, u = yn.test(h) ? [a] : a.split(/\s+/);
1010
1010
  for (const p of u) {
1011
1011
  if (!p)
1012
1012
  continue;
1013
- if (!Dt.test(p)) {
1014
- r.push(p);
1013
+ if (!Ot.test(p)) {
1014
+ c.push(p);
1015
1015
  continue;
1016
1016
  }
1017
1017
  const b = p.toLowerCase();
1018
1018
  if (n.has(b)) {
1019
- c += 1;
1019
+ l += 1;
1020
1020
  continue;
1021
1021
  }
1022
1022
  n.add(b), t.push(p);
1023
1023
  }
1024
1024
  }
1025
- return { valid: t, invalid: r, duplicates: c };
1025
+ return { valid: t, invalid: c, duplicates: l };
1026
1026
  }
1027
- function Et(s, t) {
1028
- const r = new Set(s.map((c) => c.toLowerCase())), n = [...s];
1029
- for (const c of t) {
1030
- const o = c.toLowerCase();
1031
- r.has(o) || (r.add(o), n.push(c));
1027
+ function Ut(s, t) {
1028
+ const c = new Set(s.map((l) => l.toLowerCase())), n = [...s];
1029
+ for (const l of t) {
1030
+ const o = l.toLowerCase();
1031
+ c.has(o) || (c.add(o), n.push(l));
1032
1032
  }
1033
1033
  return n;
1034
1034
  }
1035
- function En(s = {}) {
1036
- const { currentUserId: t, currentUserName: r, requireIdentity: n = !0 } = s, [c, o] = E(""), d = !t, m = r ?? c, h = !n || m.trim().length > 0;
1035
+ function Un(s = {}) {
1036
+ const { currentUserId: t, currentUserName: c, requireIdentity: n = !0 } = s, [l, o] = E(""), d = !t, m = c ?? l, h = !n || m.trim().length > 0;
1037
1037
  return {
1038
1038
  isAnonymous: d,
1039
1039
  name: m,
@@ -1042,20 +1042,20 @@ function En(s = {}) {
1042
1042
  actor: { userId: t, userName: m.trim() }
1043
1043
  };
1044
1044
  }
1045
- const Lt = [
1046
- { answer: "yes", label: "Yes", variant: "success", Icon: He },
1047
- { answer: "maybe", label: "Maybe", variant: "warning", Icon: Qe },
1048
- { answer: "no", label: "No", variant: "error", Icon: ut }
1049
- ], pn = ee(
1050
- function(t, r) {
1045
+ const Yt = [
1046
+ { answer: "yes", label: "Yes", variant: "success", Icon: qe },
1047
+ { answer: "maybe", label: "Maybe", variant: "warning", Icon: en },
1048
+ { answer: "no", label: "No", variant: "error", Icon: $n }
1049
+ ], _n = ee(
1050
+ function(t, c) {
1051
1051
  const {
1052
1052
  value: n,
1053
- onRespond: c,
1053
+ onRespond: l,
1054
1054
  allowPlusOnes: o = !1,
1055
1055
  maxPlusOnes: d = 5,
1056
1056
  plusOnes: m = 0,
1057
1057
  allowNote: h = !1,
1058
- currentUserId: i,
1058
+ currentUserId: a,
1059
1059
  currentUserName: u,
1060
1060
  compact: p = !1,
1061
1061
  disabled: b = !1,
@@ -1063,8 +1063,8 @@ const Lt = [
1063
1063
  size: g = "md",
1064
1064
  className: w,
1065
1065
  style: k
1066
- } = t, _ = En({ currentUserId: i, currentUserName: u }), [$, l] = E(m), [y, v] = E(""), A = !p && _.isAnonymous && !_.canAct, I = b || f, D = (N) => {
1067
- I || !c || c({
1066
+ } = t, _ = Un({ currentUserId: a, currentUserName: u }), [$, r] = E(m), [y, v] = E(""), A = !p && _.isAnonymous && !_.canAct, C = b || f, D = (N) => {
1067
+ C || !l || l({
1068
1068
  answer: N,
1069
1069
  plusOnes: o && N !== "no" ? $ : void 0,
1070
1070
  note: h && y.trim() ? y.trim() : void 0,
@@ -1072,10 +1072,10 @@ const Lt = [
1072
1072
  userName: _.actor.userName || void 0
1073
1073
  });
1074
1074
  };
1075
- return /* @__PURE__ */ a(
1075
+ return /* @__PURE__ */ i(
1076
1076
  "div",
1077
1077
  {
1078
- ref: r,
1078
+ ref: c,
1079
1079
  className: `nice-rsvp-control nice-rsvp-control--${g}${p ? " nice-rsvp-control--compact" : ""} ${w ?? ""}`,
1080
1080
  style: k,
1081
1081
  children: [
@@ -1087,35 +1087,35 @@ const Lt = [
1087
1087
  onChange: _.setName,
1088
1088
  placeholder: "Who is replying?",
1089
1089
  required: !0,
1090
- disabled: I,
1090
+ disabled: C,
1091
1091
  size: g
1092
1092
  }
1093
1093
  ),
1094
- /* @__PURE__ */ e("div", { className: "nice-rsvp-control__answers", role: "group", "aria-label": "Your reply", children: Lt.map(({ answer: N, label: L, variant: V, Icon: B }) => /* @__PURE__ */ e(
1095
- F,
1094
+ /* @__PURE__ */ e("div", { className: "nice-rsvp-control__answers", role: "group", "aria-label": "Your reply", children: Yt.map(({ answer: N, label: L, variant: F, Icon: B }) => /* @__PURE__ */ e(
1095
+ V,
1096
1096
  {
1097
1097
  size: g,
1098
- variant: n === N ? V : "outline",
1098
+ variant: n === N ? F : "outline",
1099
1099
  leftIcon: /* @__PURE__ */ e(B, { size: 16 }),
1100
- disabled: I || A,
1100
+ disabled: C || A,
1101
1101
  "aria-pressed": n === N,
1102
1102
  onClick: () => D(N),
1103
1103
  children: L
1104
1104
  },
1105
1105
  N
1106
1106
  )) }),
1107
- !p && o && n !== "no" && /* @__PURE__ */ a("label", { className: "nice-rsvp-control__field", children: [
1107
+ !p && o && n !== "no" && /* @__PURE__ */ i("label", { className: "nice-rsvp-control__field", children: [
1108
1108
  /* @__PURE__ */ e("span", { className: "nice-rsvp-control__field-label", children: "Additional guests" }),
1109
1109
  /* @__PURE__ */ e(
1110
- Je,
1110
+ rn,
1111
1111
  {
1112
1112
  value: $,
1113
- onChange: (N) => l(Math.max(0, Math.min(d, N ?? 0))),
1113
+ onChange: (N) => r(Math.max(0, Math.min(d, N ?? 0))),
1114
1114
  min: 0,
1115
1115
  max: d,
1116
1116
  step: 1,
1117
1117
  size: "xs",
1118
- disabled: I
1118
+ disabled: C
1119
1119
  }
1120
1120
  )
1121
1121
  ] }),
@@ -1126,7 +1126,7 @@ const Lt = [
1126
1126
  value: y,
1127
1127
  onChange: v,
1128
1128
  placeholder: "Anything we should know?",
1129
- disabled: I,
1129
+ disabled: C,
1130
1130
  size: g
1131
1131
  }
1132
1132
  ),
@@ -1135,30 +1135,30 @@ const Lt = [
1135
1135
  }
1136
1136
  );
1137
1137
  }
1138
- ), Bt = {
1138
+ ), Xt = {
1139
1139
  yes: "confirmed",
1140
1140
  maybe: "invited",
1141
1141
  no: "declined"
1142
- }, gn = {
1142
+ }, Nn = {
1143
1143
  confirmed: "yes",
1144
1144
  "checked-in": "yes",
1145
1145
  declined: "no"
1146
- }, Le = [
1146
+ }, Re = [
1147
1147
  "confirmed",
1148
1148
  "checked-in",
1149
1149
  "invited",
1150
1150
  "declined",
1151
1151
  "no-show"
1152
- ], Ai = ee(
1153
- function(t, r) {
1152
+ ], Li = ee(
1153
+ function(t, c) {
1154
1154
  const {
1155
1155
  participants: n,
1156
- mode: c = "organizer",
1156
+ mode: l = "organizer",
1157
1157
  currentUserId: o,
1158
1158
  currentUserName: d,
1159
1159
  onRsvpChange: m,
1160
1160
  onCheckIn: h,
1161
- onScan: i,
1161
+ onScan: a,
1162
1162
  checkInSlot: u,
1163
1163
  onInvite: p,
1164
1164
  extraFields: b,
@@ -1168,61 +1168,61 @@ const Lt = [
1168
1168
  allowPlusOnes: k = !1,
1169
1169
  disabled: _ = !1,
1170
1170
  readOnly: $ = !1,
1171
- size: l = "md",
1171
+ size: r = "md",
1172
1172
  className: y,
1173
1173
  style: v
1174
- } = t, [A, I] = E(""), [D, N] = E("all"), [L, V] = E(""), B = _ || $, C = c === "guest", O = X(() => {
1174
+ } = t, [A, C] = E(""), [D, N] = E("all"), [L, F] = E(""), B = _ || $, I = l === "guest", R = X(() => {
1175
1175
  const S = { total: n.length };
1176
- for (const Y of Le)
1176
+ for (const Y of Re)
1177
1177
  S[Y] = 0;
1178
1178
  for (const Y of n)
1179
1179
  S[Y.status] = (S[Y.status] ?? 0) + 1;
1180
1180
  return S;
1181
1181
  }, [n]), z = X(() => {
1182
- if (C)
1182
+ if (I)
1183
1183
  return n.filter((Y) => Y.userId === o || Y.id === o);
1184
1184
  const S = A.trim().toLowerCase();
1185
1185
  return n.filter((Y) => D !== "all" && Y.status !== D ? !1 : !S || Y.name.toLowerCase().includes(S));
1186
- }, [n, C, o, A, D]), P = X(() => {
1187
- if (f === "none" || C)
1186
+ }, [n, I, o, A, D]), P = X(() => {
1187
+ if (f === "none" || I)
1188
1188
  return [{ key: "all", label: "", items: z }];
1189
1189
  const S = /* @__PURE__ */ new Map();
1190
1190
  for (const q of z) {
1191
- const Q = f === "status" ? q.status : q.role, R = S.get(Q);
1192
- R ? R.push(q) : S.set(Q, [q]);
1191
+ const Q = f === "status" ? q.status : q.role, O = S.get(Q);
1192
+ O ? O.push(q) : S.set(Q, [q]);
1193
1193
  }
1194
- return [...S.keys()].sort((q, Q) => f !== "status" ? q.localeCompare(Q) : Le.indexOf(q) - Le.indexOf(Q)).map((q) => ({ key: q, label: q, items: S.get(q) ?? [] }));
1195
- }, [z, f, C]), M = X(() => Dn(L), [L]), j = (S) => (Y) => {
1196
- m == null || m(S, Bt[Y.answer], Y);
1194
+ return [...S.keys()].sort((q, Q) => f !== "status" ? q.localeCompare(Q) : Re.indexOf(q) - Re.indexOf(Q)).map((q) => ({ key: q, label: q, items: S.get(q) ?? [] }));
1195
+ }, [z, f, I]), M = X(() => On(L), [L]), j = (S) => (Y) => {
1196
+ m == null || m(S, Xt[Y.answer], Y);
1197
1197
  }, W = () => {
1198
- !p || M.valid.length === 0 || (p(M.valid), V(""));
1198
+ !p || M.valid.length === 0 || (p(M.valid), F(""));
1199
1199
  };
1200
- if (C) {
1200
+ if (I) {
1201
1201
  const S = z[0];
1202
- return S ? /* @__PURE__ */ a(
1202
+ return S ? /* @__PURE__ */ i(
1203
1203
  "div",
1204
1204
  {
1205
- ref: r,
1205
+ ref: c,
1206
1206
  className: `nice-participant-list nice-participant-list--guest ${y ?? ""}`,
1207
1207
  style: v,
1208
1208
  children: [
1209
- /* @__PURE__ */ e("ul", { className: "nice-participant-list__rows", children: /* @__PURE__ */ e(je, { participant: S, size: l }) }),
1209
+ /* @__PURE__ */ e("ul", { className: "nice-participant-list__rows", children: /* @__PURE__ */ e(Ze, { participant: S, size: r }) }),
1210
1210
  /* @__PURE__ */ e(
1211
- pn,
1211
+ _n,
1212
1212
  {
1213
- value: gn[S.status],
1213
+ value: Nn[S.status],
1214
1214
  onRespond: j(S.id),
1215
1215
  allowPlusOnes: k,
1216
1216
  currentUserId: o ?? S.userId,
1217
1217
  currentUserName: d ?? S.name,
1218
1218
  disabled: _,
1219
1219
  readOnly: $,
1220
- size: l
1220
+ size: r
1221
1221
  }
1222
1222
  )
1223
1223
  ]
1224
1224
  }
1225
- ) : /* @__PURE__ */ e("div", { ref: r, className: `nice-participant-list ${y ?? ""}`, style: v, children: /* @__PURE__ */ e(
1225
+ ) : /* @__PURE__ */ e("div", { ref: c, className: `nice-participant-list ${y ?? ""}`, style: v, children: /* @__PURE__ */ e(
1226
1226
  ye,
1227
1227
  {
1228
1228
  title: "You are not on this guest list",
@@ -1230,57 +1230,57 @@ const Lt = [
1230
1230
  }
1231
1231
  ) });
1232
1232
  }
1233
- return /* @__PURE__ */ a("div", { ref: r, className: `nice-participant-list ${y ?? ""}`, style: v, children: [
1234
- g && /* @__PURE__ */ a("div", { className: "nice-participant-list__summary", children: [
1235
- /* @__PURE__ */ a("span", { className: "nice-participant-list__stat", children: [
1236
- /* @__PURE__ */ e("strong", { children: O.confirmed }),
1233
+ return /* @__PURE__ */ i("div", { ref: c, className: `nice-participant-list ${y ?? ""}`, style: v, children: [
1234
+ g && /* @__PURE__ */ i("div", { className: "nice-participant-list__summary", children: [
1235
+ /* @__PURE__ */ i("span", { className: "nice-participant-list__stat", children: [
1236
+ /* @__PURE__ */ e("strong", { children: R.confirmed }),
1237
1237
  " confirmed"
1238
1238
  ] }),
1239
- /* @__PURE__ */ a("span", { className: "nice-participant-list__stat", children: [
1240
- /* @__PURE__ */ e("strong", { children: O.invited }),
1239
+ /* @__PURE__ */ i("span", { className: "nice-participant-list__stat", children: [
1240
+ /* @__PURE__ */ e("strong", { children: R.invited }),
1241
1241
  " awaiting reply"
1242
1242
  ] }),
1243
- /* @__PURE__ */ a("span", { className: "nice-participant-list__stat", children: [
1244
- /* @__PURE__ */ e("strong", { children: O.declined }),
1243
+ /* @__PURE__ */ i("span", { className: "nice-participant-list__stat", children: [
1244
+ /* @__PURE__ */ e("strong", { children: R.declined }),
1245
1245
  " declined"
1246
1246
  ] }),
1247
- /* @__PURE__ */ a("span", { className: "nice-participant-list__stat", children: [
1248
- /* @__PURE__ */ e("strong", { children: O["checked-in"] }),
1247
+ /* @__PURE__ */ i("span", { className: "nice-participant-list__stat", children: [
1248
+ /* @__PURE__ */ e("strong", { children: R["checked-in"] }),
1249
1249
  " checked in"
1250
1250
  ] }),
1251
- /* @__PURE__ */ a("span", { className: "nice-participant-list__stat nice-participant-list__stat--total", children: [
1252
- /* @__PURE__ */ e("strong", { children: O.total }),
1251
+ /* @__PURE__ */ i("span", { className: "nice-participant-list__stat nice-participant-list__stat--total", children: [
1252
+ /* @__PURE__ */ e("strong", { children: R.total }),
1253
1253
  " total"
1254
1254
  ] })
1255
1255
  ] }),
1256
- (w || u || i) && /* @__PURE__ */ a("div", { className: "nice-participant-list__toolbar", children: [
1257
- w && /* @__PURE__ */ a(Ke, { children: [
1256
+ (w || u || a) && /* @__PURE__ */ i("div", { className: "nice-participant-list__toolbar", children: [
1257
+ w && /* @__PURE__ */ i(Ve, { children: [
1258
1258
  /* @__PURE__ */ e(
1259
1259
  J,
1260
1260
  {
1261
1261
  value: A,
1262
- onChange: I,
1262
+ onChange: C,
1263
1263
  placeholder: "Search guests…",
1264
- prefix: /* @__PURE__ */ e(mt, { size: 15 }),
1265
- size: l
1264
+ prefix: /* @__PURE__ */ e(ft, { size: 15 }),
1265
+ size: r
1266
1266
  }
1267
1267
  ),
1268
1268
  /* @__PURE__ */ e(
1269
- Pe,
1269
+ Te,
1270
1270
  {
1271
1271
  value: D,
1272
1272
  onChange: (S) => N(S),
1273
- size: l,
1273
+ size: r,
1274
1274
  options: [
1275
1275
  { value: "all", label: "All statuses" },
1276
- ...Le.map((S) => ({ value: S, label: S }))
1276
+ ...Re.map((S) => ({ value: S, label: S }))
1277
1277
  ]
1278
1278
  }
1279
1279
  )
1280
1280
  ] }),
1281
1281
  u,
1282
- i && !u && /* @__PURE__ */ a("span", { className: "nice-participant-list__scan-hint", children: [
1283
- /* @__PURE__ */ e(ht, { size: 15 }),
1282
+ a && !u && /* @__PURE__ */ i("span", { className: "nice-participant-list__scan-hint", children: [
1283
+ /* @__PURE__ */ e(vt, { size: 15 }),
1284
1284
  " Scanner ready"
1285
1285
  ] })
1286
1286
  ] }),
@@ -1290,30 +1290,30 @@ const Lt = [
1290
1290
  title: "No guests yet",
1291
1291
  description: n.length > 0 ? "No one matches the current filter." : "Invite people to see them here."
1292
1292
  }
1293
- ) : P.map((S) => /* @__PURE__ */ a("section", { className: "nice-participant-list__group", children: [
1294
- S.label && /* @__PURE__ */ a("h4", { className: "nice-participant-list__group-title", children: [
1293
+ ) : P.map((S) => /* @__PURE__ */ i("section", { className: "nice-participant-list__group", children: [
1294
+ S.label && /* @__PURE__ */ i("h4", { className: "nice-participant-list__group-title", children: [
1295
1295
  S.label,
1296
1296
  " ",
1297
- /* @__PURE__ */ a("span", { children: [
1297
+ /* @__PURE__ */ i("span", { children: [
1298
1298
  "(",
1299
1299
  S.items.length,
1300
1300
  ")"
1301
1301
  ] })
1302
1302
  ] }),
1303
- /* @__PURE__ */ e("ul", { className: "nice-participant-list__rows", children: S.items.map((Y) => /* @__PURE__ */ a(
1304
- je,
1303
+ /* @__PURE__ */ e("ul", { className: "nice-participant-list__rows", children: S.items.map((Y) => /* @__PURE__ */ i(
1304
+ Ze,
1305
1305
  {
1306
1306
  participant: Y,
1307
- size: l,
1307
+ size: r,
1308
1308
  meta: b == null ? void 0 : b.map((q) => /* @__PURE__ */ e("span", { className: "nice-participant-list__extra", children: q.render ? q.render(Y) : String(
1309
1309
  Y[q.key] ?? ""
1310
1310
  ) }, q.key)),
1311
1311
  children: [
1312
1312
  m && /* @__PURE__ */ e(
1313
- pn,
1313
+ _n,
1314
1314
  {
1315
1315
  compact: !0,
1316
- value: gn[Y.status],
1316
+ value: Nn[Y.status],
1317
1317
  onRespond: j(Y.id),
1318
1318
  currentUserId: Y.userId,
1319
1319
  currentUserName: Y.name,
@@ -1322,11 +1322,11 @@ const Lt = [
1322
1322
  }
1323
1323
  ),
1324
1324
  h && Y.status !== "checked-in" && /* @__PURE__ */ e(
1325
- F,
1325
+ V,
1326
1326
  {
1327
1327
  size: "sm",
1328
1328
  variant: "outline",
1329
- leftIcon: /* @__PURE__ */ e(He, { size: 14 }),
1329
+ leftIcon: /* @__PURE__ */ e(qe, { size: 14 }),
1330
1330
  disabled: B,
1331
1331
  onClick: () => h(Y.id),
1332
1332
  children: "Check in"
@@ -1337,25 +1337,25 @@ const Lt = [
1337
1337
  Y.id
1338
1338
  )) })
1339
1339
  ] }, S.key)),
1340
- p && !$ && /* @__PURE__ */ a("div", { className: "nice-participant-list__invite", children: [
1340
+ p && !$ && /* @__PURE__ */ i("div", { className: "nice-participant-list__invite", children: [
1341
1341
  /* @__PURE__ */ e(
1342
- Ze,
1342
+ sn,
1343
1343
  {
1344
1344
  label: "Invite by email",
1345
1345
  value: L,
1346
- onChange: V,
1346
+ onChange: F,
1347
1347
  placeholder: "Paste addresses — commas, semicolons or new lines",
1348
1348
  rows: 3,
1349
1349
  disabled: _,
1350
- size: l
1350
+ size: r
1351
1351
  }
1352
1352
  ),
1353
- /* @__PURE__ */ a(
1354
- F,
1353
+ /* @__PURE__ */ i(
1354
+ V,
1355
1355
  {
1356
1356
  variant: "primary",
1357
- size: l,
1358
- leftIcon: /* @__PURE__ */ e(In, { size: 15 }),
1357
+ size: r,
1358
+ leftIcon: /* @__PURE__ */ e(An, { size: 15 }),
1359
1359
  disabled: _ || M.valid.length === 0,
1360
1360
  onClick: W,
1361
1361
  children: [
@@ -1364,14 +1364,14 @@ const Lt = [
1364
1364
  ]
1365
1365
  }
1366
1366
  ),
1367
- (M.invalid.length > 0 || M.duplicates > 0) && /* @__PURE__ */ a("p", { className: "nice-participant-list__invite-hint", children: [
1367
+ (M.invalid.length > 0 || M.duplicates > 0) && /* @__PURE__ */ i("p", { className: "nice-participant-list__invite-hint", children: [
1368
1368
  M.duplicates > 0 && `${M.duplicates} duplicate(s) removed. `,
1369
1369
  M.invalid.length > 0 && `${M.invalid.length} entry(ies) not recognised.`
1370
1370
  ] })
1371
1371
  ] })
1372
1372
  ] });
1373
1373
  }
1374
- ), Ot = {
1374
+ ), Ft = {
1375
1375
  // No minor unit at all.
1376
1376
  BIF: 0,
1377
1377
  CLP: 0,
@@ -1399,42 +1399,42 @@ const Lt = [
1399
1399
  OMR: 3,
1400
1400
  TND: 3
1401
1401
  };
1402
- function en(s) {
1403
- return Ot[s == null ? void 0 : s.toUpperCase()] ?? 2;
1402
+ function cn(s) {
1403
+ return Ft[s == null ? void 0 : s.toUpperCase()] ?? 2;
1404
1404
  }
1405
- function nn(s, t) {
1406
- return Number.isFinite(s) ? Math.round(s * 10 ** en(t)) : 0;
1405
+ function ln(s, t) {
1406
+ return Number.isFinite(s) ? Math.round(s * 10 ** cn(t)) : 0;
1407
1407
  }
1408
- function Ye(s, t) {
1409
- const r = en(t);
1410
- return r === 0 ? s : s / 10 ** r;
1408
+ function Xe(s, t) {
1409
+ const c = cn(t);
1410
+ return c === 0 ? s : s / 10 ** c;
1411
1411
  }
1412
- function Rt(s, t, r) {
1413
- const n = en(t), c = Ye(s, t);
1412
+ function Vt(s, t, c) {
1413
+ const n = cn(t), l = Xe(s, t);
1414
1414
  try {
1415
- return new Intl.NumberFormat(r, {
1415
+ return new Intl.NumberFormat(c, {
1416
1416
  style: "currency",
1417
1417
  currency: t.toUpperCase(),
1418
1418
  minimumFractionDigits: n,
1419
1419
  maximumFractionDigits: n
1420
- }).format(c);
1420
+ }).format(l);
1421
1421
  } catch {
1422
- return `${c.toFixed(n)} ${t}`;
1422
+ return `${l.toFixed(n)} ${t}`;
1423
1423
  }
1424
1424
  }
1425
- function se(s, t, r) {
1426
- return Rt(nn(s, t), t, r);
1425
+ function se(s, t, c) {
1426
+ return Vt(ln(s, t), t, c);
1427
1427
  }
1428
- const Ge = { minX: 0, minY: 0, maxX: 0, maxY: 0 };
1429
- function Ut(s, t = 0) {
1428
+ const Je = { minX: 0, minY: 0, maxX: 0, maxY: 0 };
1429
+ function Wt(s, t = 0) {
1430
1430
  if (s.length === 0)
1431
- return { ...Ge };
1432
- let r = 1 / 0, n = 1 / 0, c = -1 / 0, o = -1 / 0;
1431
+ return { ...Je };
1432
+ let c = 1 / 0, n = 1 / 0, l = -1 / 0, o = -1 / 0;
1433
1433
  for (const d of s)
1434
- d.x < r && (r = d.x), d.y < n && (n = d.y), d.x > c && (c = d.x), d.y > o && (o = d.y);
1435
- return { minX: r - t, minY: n - t, maxX: c + t, maxY: o + t };
1434
+ d.x < c && (c = d.x), d.y < n && (n = d.y), d.x > l && (l = d.x), d.y > o && (o = d.y);
1435
+ return { minX: c - t, minY: n - t, maxX: l + t, maxY: o + t };
1436
1436
  }
1437
- function fn(s, t) {
1437
+ function bn(s, t) {
1438
1438
  return {
1439
1439
  minX: Math.min(s.minX, t.minX),
1440
1440
  minY: Math.min(s.minY, t.minY),
@@ -1442,134 +1442,134 @@ function fn(s, t) {
1442
1442
  maxY: Math.max(s.maxY, t.maxY)
1443
1443
  };
1444
1444
  }
1445
- function vn(s, t) {
1445
+ function wn(s, t) {
1446
1446
  return s.minX <= t.maxX && s.maxX >= t.minX && s.minY <= t.maxY && s.maxY >= t.minY;
1447
1447
  }
1448
- function Yt(s, t, r = 0) {
1449
- const n = s.zoom || 1, c = -s.pan.x / n - r, o = -s.pan.y / n - r;
1448
+ function qt(s, t, c = 0) {
1449
+ const n = s.zoom || 1, l = -s.pan.x / n - c, o = -s.pan.y / n - c;
1450
1450
  return {
1451
- minX: c,
1451
+ minX: l,
1452
1452
  minY: o,
1453
- maxX: c + t.width / n + r * 2,
1454
- maxY: o + t.height / n + r * 2
1453
+ maxX: l + t.width / n + c * 2,
1454
+ maxY: o + t.height / n + c * 2
1455
1455
  };
1456
1456
  }
1457
- function Xt(s, t = 12) {
1458
- const r = [], n = [], c = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
1457
+ function jt(s, t = 12) {
1458
+ const c = [], n = [], l = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
1459
1459
  let d = null, m = 0;
1460
1460
  for (const h of s.sections ?? []) {
1461
- let i = null, u = 0;
1461
+ let a = null, u = 0;
1462
1462
  (h.rows ?? []).forEach((b, f) => {
1463
- const g = Vt(b.seats ?? []);
1463
+ const g = Gt(b.seats ?? []);
1464
1464
  if (g.length === 0)
1465
1465
  return;
1466
- const w = Ut(g, t);
1466
+ const w = Wt(g, t);
1467
1467
  n.push({ sectionId: h.id, rowIndex: f, label: b.label, seats: g, bounds: w }), g.forEach((k, _) => {
1468
- c.set(k.id, k), o.set(k.id, { sectionId: h.id, rowIndex: f, seatIndex: _ });
1469
- }), u += g.length, i = i ? fn(i, w) : w;
1468
+ l.set(k.id, k), o.set(k.id, { sectionId: h.id, rowIndex: f, seatIndex: _ });
1469
+ }), u += g.length, a = a ? bn(a, w) : w;
1470
1470
  });
1471
- const p = i ?? { ...Ge };
1472
- r.push({ section: h, bounds: p, seatCount: u }), m += u, u > 0 && (d = d ? fn(d, p) : p);
1471
+ const p = a ?? { ...Je };
1472
+ c.push({ section: h, bounds: p, seatCount: u }), m += u, u > 0 && (d = d ? bn(d, p) : p);
1473
1473
  }
1474
1474
  return {
1475
- sections: r,
1475
+ sections: c,
1476
1476
  rows: n,
1477
- bounds: d ?? { ...Ge },
1477
+ bounds: d ?? { ...Je },
1478
1478
  totalSeats: m,
1479
- seatById: c,
1479
+ seatById: l,
1480
1480
  locationById: o
1481
1481
  };
1482
1482
  }
1483
- function Vt(s) {
1484
- return [...s].sort((t, r) => t.number - r.number || t.x - r.x);
1483
+ function Gt(s) {
1484
+ return [...s].sort((t, c) => t.number - c.number || t.x - c.x);
1485
1485
  }
1486
- function Ft(s, t) {
1486
+ function Kt(s, t) {
1487
1487
  return s > t * 4 ? "section" : s > t ? "row" : "seat";
1488
1488
  }
1489
- function Wt(s, t, r = 2500, n) {
1490
- const c = s.sections.filter((u) => vn(u.bounds, t)), o = new Set(c.map((u) => u.section.id)), d = s.rows.filter(
1491
- (u) => o.has(u.sectionId) && vn(u.bounds, t)
1489
+ function Ht(s, t, c = 2500, n) {
1490
+ const l = s.sections.filter((u) => wn(u.bounds, t)), o = new Set(l.map((u) => u.section.id)), d = s.rows.filter(
1491
+ (u) => o.has(u.sectionId) && wn(u.bounds, t)
1492
1492
  );
1493
1493
  let m = 0;
1494
1494
  for (const u of d)
1495
1495
  for (const p of u.seats)
1496
1496
  p.x >= t.minX && p.x <= t.maxX && p.y >= t.minY && p.y <= t.maxY && (m += 1);
1497
- const h = n ?? Ft(m, r);
1498
- let i = [];
1497
+ const h = n ?? Kt(m, c);
1498
+ let a = [];
1499
1499
  if (h === "seat") {
1500
- i = [];
1500
+ a = [];
1501
1501
  for (const u of d)
1502
1502
  for (const p of u.seats)
1503
- p.x >= t.minX && p.x <= t.maxX && p.y >= t.minY && p.y <= t.maxY && i.push(p);
1503
+ p.x >= t.minX && p.x <= t.maxX && p.y >= t.minY && p.y <= t.maxY && a.push(p);
1504
1504
  }
1505
- return { tier: h, sections: c, rows: h === "section" ? [] : d, seats: i, visibleSeatCount: m };
1505
+ return { tier: h, sections: l, rows: h === "section" ? [] : d, seats: a, visibleSeatCount: m };
1506
1506
  }
1507
- function tn(s) {
1507
+ function on(s) {
1508
1508
  if (s.accessType)
1509
1509
  return s.accessType;
1510
1510
  if (s.status === "wheelchair" || s.status === "companion")
1511
1511
  return s.status;
1512
1512
  }
1513
- function ke(s, t) {
1514
- const r = (t == null ? void 0 : t[s.id]) ?? s.status;
1515
- return r === "wheelchair" || r === "companion" ? "available" : r;
1513
+ function Ce(s, t) {
1514
+ const c = (t == null ? void 0 : t[s.id]) ?? s.status;
1515
+ return c === "wheelchair" || c === "companion" ? "available" : c;
1516
1516
  }
1517
- function yn(s, t, r) {
1518
- var c;
1519
- const n = (c = t.priceCategories) == null ? void 0 : c.find((o) => o.id === s.priceCategoryId);
1517
+ function xn(s, t, c) {
1518
+ var l;
1519
+ const n = (l = t.priceCategories) == null ? void 0 : l.find((o) => o.id === s.priceCategoryId);
1520
1520
  return {
1521
- amount: (n == null ? void 0 : n.price) ?? r.basePrice,
1522
- currency: r.currency
1521
+ amount: (n == null ? void 0 : n.price) ?? c.basePrice,
1522
+ currency: c.currency
1523
1523
  };
1524
1524
  }
1525
- function qt(s, t = {}, r) {
1526
- return !(ke(s, r) !== "available" || t.allowedCategories && !t.allowedCategories.includes(s.priceCategoryId));
1525
+ function Qt(s, t = {}, c) {
1526
+ return !(Ce(s, c) !== "available" || t.allowedCategories && !t.allowedCategories.includes(s.priceCategoryId));
1527
1527
  }
1528
- function Ln(s, t = {}, r) {
1528
+ function Yn(s, t = {}, c) {
1529
1529
  const n = [];
1530
- let c = null;
1530
+ let l = null;
1531
1531
  return s.forEach((o, d) => {
1532
- qt(o, t, r) ? c ? c.seats.push(o) : c = { start: d, seats: [o] } : c && (n.push(c), c = null);
1533
- }), c && n.push(c), n;
1532
+ Qt(o, t, c) ? l ? l.seats.push(o) : l = { start: d, seats: [o] } : l && (n.push(l), l = null);
1533
+ }), l && n.push(l), n;
1534
1534
  }
1535
- function jt(s, t, r = {}, n) {
1536
- const c = r.maxSeats ?? 8;
1537
- if (s.length > c)
1535
+ function Zt(s, t, c = {}, n) {
1536
+ const l = c.maxSeats ?? 8;
1537
+ if (s.length > l)
1538
1538
  return { ok: !1, reason: "max-seats" };
1539
1539
  for (const d of s) {
1540
1540
  const m = t.seatById.get(d);
1541
1541
  if (m) {
1542
- if (ke(m, n) !== "available")
1542
+ if (Ce(m, n) !== "available")
1543
1543
  return { ok: !1, reason: "unavailable", seatId: d };
1544
- if (r.allowedCategories && !r.allowedCategories.includes(m.priceCategoryId))
1544
+ if (c.allowedCategories && !c.allowedCategories.includes(m.priceCategoryId))
1545
1545
  return { ok: !1, reason: "category-not-allowed", seatId: d };
1546
1546
  }
1547
1547
  }
1548
- if (!r.adjacentOnly || s.length === 0)
1548
+ if (!c.adjacentOnly || s.length === 0)
1549
1549
  return { ok: !0 };
1550
1550
  const o = /* @__PURE__ */ new Map();
1551
1551
  for (const d of s) {
1552
1552
  const m = t.locationById.get(d);
1553
1553
  if (!m)
1554
1554
  continue;
1555
- const h = `${m.sectionId}::${m.rowIndex}`, i = o.get(h);
1556
- i ? i.push(d) : o.set(h, [d]);
1555
+ const h = `${m.sectionId}::${m.rowIndex}`, a = o.get(h);
1556
+ a ? a.push(d) : o.set(h, [d]);
1557
1557
  }
1558
1558
  for (const [d, m] of o) {
1559
- const [h, i] = d.split("::"), u = Number(i), p = t.rows.find((l) => l.sectionId === h && l.rowIndex === u);
1559
+ const [h, a] = d.split("::"), u = Number(a), p = t.rows.find((r) => r.sectionId === h && r.rowIndex === u);
1560
1560
  if (!p)
1561
1561
  continue;
1562
- const b = Ln(p.seats, r, n), f = new Set(m);
1562
+ const b = Yn(p.seats, c, n), f = new Set(m);
1563
1563
  let g = null;
1564
- for (const l of b)
1565
- if (l.seats.some((y) => f.has(y.id))) {
1564
+ for (const r of b)
1565
+ if (r.seats.some((y) => f.has(y.id))) {
1566
1566
  if (g)
1567
1567
  return { ok: !1, reason: "not-adjacent", seatId: m[0] };
1568
- g = l;
1568
+ g = r;
1569
1569
  }
1570
1570
  if (!g)
1571
1571
  continue;
1572
- const w = g.seats.map((l, y) => f.has(l.id) ? y : -1).filter((l) => l >= 0);
1572
+ const w = g.seats.map((r, y) => f.has(r.id) ? y : -1).filter((r) => r >= 0);
1573
1573
  if (w.length === 0)
1574
1574
  continue;
1575
1575
  const k = w[0], _ = w[w.length - 1];
@@ -1581,25 +1581,25 @@ function jt(s, t, r = {}, n) {
1581
1581
  }
1582
1582
  return { ok: !0 };
1583
1583
  }
1584
- function Gt(s, t, r, n = {}, c) {
1584
+ function Jt(s, t, c, n = {}, l) {
1585
1585
  if (s.includes(t))
1586
1586
  return { selected: s.filter((m) => m !== t) };
1587
- const o = [...s, t], d = jt(o, r, n, c);
1587
+ const o = [...s, t], d = Zt(o, c, n, l);
1588
1588
  return d.ok ? { selected: o } : { rejected: d.reason ?? "not-adjacent" };
1589
1589
  }
1590
- function Kt(s, t, r = {}, n = {}, c) {
1590
+ function ei(s, t, c = {}, n = {}, l) {
1591
1591
  if (t <= 0)
1592
1592
  return [];
1593
- const o = n.categoryId ? { ...r, allowedCategories: [n.categoryId] } : r;
1593
+ const o = n.categoryId ? { ...c, allowedCategories: [n.categoryId] } : c;
1594
1594
  let d = null;
1595
1595
  for (const m of s.rows)
1596
1596
  if (!(n.sectionId && m.sectionId !== n.sectionId))
1597
- for (const h of Ln(m.seats, o, c)) {
1598
- const i = h.seats.length;
1599
- if (!(i < t))
1600
- for (let u = 0; u + t <= i; u += 1) {
1597
+ for (const h of Yn(m.seats, o, l)) {
1598
+ const a = h.seats.length;
1599
+ if (!(a < t))
1600
+ for (let u = 0; u + t <= a; u += 1) {
1601
1601
  const p = u + t - 1;
1602
- if (i > t && (u === 1 || i - 1 - p === 1))
1602
+ if (a > t && (u === 1 || a - 1 - p === 1))
1603
1603
  continue;
1604
1604
  const b = h.seats.slice(u, p + 1), f = b.reduce((g, w) => g + (w.viewScore ?? 50), 0) / t;
1605
1605
  (!d || f > d.score) && (d = { ids: b.map((g) => g.id), score: f });
@@ -1607,59 +1607,59 @@ function Kt(s, t, r = {}, n = {}, c) {
1607
1607
  }
1608
1608
  return (d == null ? void 0 : d.ids) ?? [];
1609
1609
  }
1610
- function Ht(s, t, r) {
1610
+ function ni(s, t, c) {
1611
1611
  var u, p, b, f;
1612
1612
  const n = s.locationById.get(t);
1613
1613
  if (!n)
1614
1614
  return null;
1615
- const c = s.rows.findIndex(
1615
+ const l = s.rows.findIndex(
1616
1616
  (g) => g.sectionId === n.sectionId && g.rowIndex === n.rowIndex
1617
1617
  );
1618
- if (c < 0)
1618
+ if (l < 0)
1619
1619
  return null;
1620
- const o = s.rows[c];
1621
- if (r === "left")
1620
+ const o = s.rows[l];
1621
+ if (c === "left")
1622
1622
  return ((u = o.seats[n.seatIndex - 1]) == null ? void 0 : u.id) ?? null;
1623
- if (r === "right")
1623
+ if (c === "right")
1624
1624
  return ((p = o.seats[n.seatIndex + 1]) == null ? void 0 : p.id) ?? null;
1625
- if (r === "row-start")
1625
+ if (c === "row-start")
1626
1626
  return ((b = o.seats[0]) == null ? void 0 : b.id) ?? null;
1627
- if (r === "row-end")
1627
+ if (c === "row-end")
1628
1628
  return ((f = o.seats[o.seats.length - 1]) == null ? void 0 : f.id) ?? null;
1629
- const d = s.rows[r === "up" ? c - 1 : c + 1];
1629
+ const d = s.rows[c === "up" ? l - 1 : l + 1];
1630
1630
  if (!d)
1631
1631
  return null;
1632
1632
  const m = o.seats[n.seatIndex].x;
1633
- let h = null, i = 1 / 0;
1633
+ let h = null, a = 1 / 0;
1634
1634
  for (const g of d.seats) {
1635
1635
  const w = Math.abs(g.x - m);
1636
- w < i && (i = w, h = g);
1636
+ w < a && (a = w, h = g);
1637
1637
  }
1638
1638
  return (h == null ? void 0 : h.id) ?? null;
1639
1639
  }
1640
- function Qt(s, t, r) {
1641
- var h, i, u;
1640
+ function ti(s, t, c) {
1641
+ var h, a, u;
1642
1642
  const n = s.sections.filter((p) => p.seatCount > 0);
1643
1643
  if (n.length === 0)
1644
1644
  return null;
1645
- const c = t ? (h = s.locationById.get(t)) == null ? void 0 : h.sectionId : void 0, o = n.findIndex((p) => p.section.id === c), d = o < 0 ? 0 : r === "next" ? o + 1 : o - 1, m = n[d];
1646
- return m ? ((u = (i = s.rows.find((p) => p.sectionId === m.section.id)) == null ? void 0 : i.seats[0]) == null ? void 0 : u.id) ?? null : null;
1645
+ const l = t ? (h = s.locationById.get(t)) == null ? void 0 : h.sectionId : void 0, o = n.findIndex((p) => p.section.id === l), d = o < 0 ? 0 : c === "next" ? o + 1 : o - 1, m = n[d];
1646
+ return m ? ((u = (a = s.rows.find((p) => p.sectionId === m.section.id)) == null ? void 0 : a.seats[0]) == null ? void 0 : u.id) ?? null : null;
1647
1647
  }
1648
- const Ae = 8;
1649
- function Zt(s, t) {
1650
- return s.seats.length === 0 ? 0 : s.seats.filter((n) => ke(n, t) === "available").length / s.seats.length;
1648
+ const Pe = 8;
1649
+ function ii(s, t) {
1650
+ return s.seats.length === 0 ? 0 : s.seats.filter((n) => Ce(n, t) === "available").length / s.seats.length;
1651
1651
  }
1652
- const Jt = ({
1652
+ const ai = ({
1653
1653
  cull: s,
1654
1654
  selectedIds: t,
1655
- cursorId: r,
1655
+ cursorId: c,
1656
1656
  statusOverrides: n,
1657
- sectionColorById: c,
1657
+ sectionColorById: l,
1658
1658
  interactive: o,
1659
1659
  onSeatClick: d,
1660
1660
  onSectionClick: m,
1661
1661
  describeSeat: h
1662
- }) => s.tier === "section" ? /* @__PURE__ */ e("g", { className: "nice-seating-chart__sections", children: s.sections.map(({ section: i, bounds: u, seatCount: p }) => /* @__PURE__ */ a("g", { className: "nice-seating-chart__section", children: [
1662
+ }) => s.tier === "section" ? /* @__PURE__ */ e("g", { className: "nice-seating-chart__sections", children: s.sections.map(({ section: a, bounds: u, seatCount: p }) => /* @__PURE__ */ i("g", { className: "nice-seating-chart__section", children: [
1663
1663
  /* @__PURE__ */ e(
1664
1664
  "rect",
1665
1665
  {
@@ -1669,11 +1669,11 @@ const Jt = ({
1669
1669
  height: u.maxY - u.minY,
1670
1670
  rx: 12,
1671
1671
  className: "nice-seating-chart__section-shape",
1672
- style: { fill: c.get(i.id) },
1672
+ style: { fill: l.get(a.id) },
1673
1673
  role: m ? "button" : "img",
1674
- "aria-label": `${i.name}, ${p} seats`,
1674
+ "aria-label": `${a.name}, ${p} seats`,
1675
1675
  tabIndex: m ? 0 : void 0,
1676
- onClick: m ? () => m(i.id) : void 0
1676
+ onClick: m ? () => m(a.id) : void 0
1677
1677
  }
1678
1678
  ),
1679
1679
  /* @__PURE__ */ e(
@@ -1685,71 +1685,71 @@ const Jt = ({
1685
1685
  textAnchor: "middle",
1686
1686
  dominantBaseline: "middle",
1687
1687
  "aria-hidden": "true",
1688
- children: i.name
1688
+ children: a.name
1689
1689
  }
1690
1690
  )
1691
- ] }, i.id)) }) : s.tier === "row" ? /* @__PURE__ */ e("g", { className: "nice-seating-chart__rows", children: s.rows.map((i) => {
1692
- const u = Zt(i, n);
1693
- return /* @__PURE__ */ a("g", { children: [
1691
+ ] }, a.id)) }) : s.tier === "row" ? /* @__PURE__ */ e("g", { className: "nice-seating-chart__rows", children: s.rows.map((a) => {
1692
+ const u = ii(a, n);
1693
+ return /* @__PURE__ */ i("g", { children: [
1694
1694
  /* @__PURE__ */ e(
1695
1695
  "rect",
1696
1696
  {
1697
- x: i.bounds.minX,
1698
- y: i.bounds.minY,
1699
- width: i.bounds.maxX - i.bounds.minX,
1700
- height: i.bounds.maxY - i.bounds.minY,
1697
+ x: a.bounds.minX,
1698
+ y: a.bounds.minY,
1699
+ width: a.bounds.maxX - a.bounds.minX,
1700
+ height: a.bounds.maxY - a.bounds.minY,
1701
1701
  rx: 8,
1702
1702
  className: "nice-seating-chart__row-shape",
1703
1703
  style: {
1704
- fill: c.get(i.sectionId),
1704
+ fill: l.get(a.sectionId),
1705
1705
  fillOpacity: 0.25 + u * 0.65
1706
1706
  },
1707
1707
  role: "img",
1708
- "aria-label": `Row ${i.label}, ${i.seats.length} seats, ${Math.round(
1709
- u * i.seats.length
1708
+ "aria-label": `Row ${a.label}, ${a.seats.length} seats, ${Math.round(
1709
+ u * a.seats.length
1710
1710
  )} available`
1711
1711
  }
1712
1712
  ),
1713
1713
  /* @__PURE__ */ e(
1714
1714
  "text",
1715
1715
  {
1716
- x: i.bounds.minX - 6,
1717
- y: (i.bounds.minY + i.bounds.maxY) / 2,
1716
+ x: a.bounds.minX - 6,
1717
+ y: (a.bounds.minY + a.bounds.maxY) / 2,
1718
1718
  className: "nice-seating-chart__row-label",
1719
1719
  textAnchor: "end",
1720
1720
  dominantBaseline: "middle",
1721
1721
  "aria-hidden": "true",
1722
- children: i.label
1722
+ children: a.label
1723
1723
  }
1724
1724
  )
1725
- ] }, `${i.sectionId}-${i.rowIndex}`);
1726
- }) }) : /* @__PURE__ */ e("g", { className: "nice-seating-chart__seats", children: s.seats.map((i) => {
1727
- const u = ke(i, n), p = tn(i), b = t.has(i.id), f = r === i.id, g = { row: i.row, number: i.number }, w = [
1725
+ ] }, `${a.sectionId}-${a.rowIndex}`);
1726
+ }) }) : /* @__PURE__ */ e("g", { className: "nice-seating-chart__seats", children: s.seats.map((a) => {
1727
+ const u = Ce(a, n), p = on(a), b = t.has(a.id), f = c === a.id, g = { row: a.row, number: a.number }, w = [
1728
1728
  "nice-seating-chart__seat",
1729
1729
  `nice-seating-chart__seat--${u}`,
1730
1730
  b ? "nice-seating-chart__seat--selected" : "",
1731
1731
  p ? `nice-seating-chart__seat--${p}` : "",
1732
1732
  f ? "nice-seating-chart__seat--cursor" : ""
1733
1733
  ].filter(Boolean).join(" ");
1734
- return /* @__PURE__ */ a(
1734
+ return /* @__PURE__ */ i(
1735
1735
  "g",
1736
1736
  {
1737
1737
  className: w,
1738
- "data-seat-id": i.id,
1738
+ "data-seat-id": a.id,
1739
1739
  role: "gridcell",
1740
1740
  "aria-selected": b,
1741
1741
  "aria-disabled": u !== "available",
1742
- "aria-label": h(i),
1742
+ "aria-label": h(a),
1743
1743
  tabIndex: f ? 0 : -1,
1744
- onClick: o && d ? () => d(i) : void 0,
1744
+ onClick: o && d ? () => d(a) : void 0,
1745
1745
  children: [
1746
1746
  p ? /* @__PURE__ */ e(
1747
1747
  "rect",
1748
1748
  {
1749
- x: i.x - Ae,
1750
- y: i.y - Ae,
1751
- width: Ae * 2,
1752
- height: Ae * 2,
1749
+ x: a.x - Pe,
1750
+ y: a.y - Pe,
1751
+ width: Pe * 2,
1752
+ height: Pe * 2,
1753
1753
  rx: 3,
1754
1754
  className: "nice-seating-chart__seat-shape",
1755
1755
  fill: p === "companion" ? "url(#nice-seat-companion-hatch)" : void 0
@@ -1757,27 +1757,27 @@ const Jt = ({
1757
1757
  ) : /* @__PURE__ */ e(
1758
1758
  "circle",
1759
1759
  {
1760
- cx: i.x,
1761
- cy: i.y,
1762
- r: Ae,
1760
+ cx: a.x,
1761
+ cy: a.y,
1762
+ r: Pe,
1763
1763
  className: "nice-seating-chart__seat-shape"
1764
1764
  }
1765
1765
  ),
1766
1766
  p === "wheelchair" && /* @__PURE__ */ e(
1767
- Cn,
1767
+ Pn,
1768
1768
  {
1769
1769
  size: 10,
1770
- x: i.x - 5,
1771
- y: i.y - 5,
1770
+ x: a.x - 5,
1771
+ y: a.y - 5,
1772
1772
  className: "nice-seating-chart__seat-glyph"
1773
1773
  }
1774
1774
  ),
1775
- /* @__PURE__ */ e("title", { children: h(i) }),
1775
+ /* @__PURE__ */ e("title", { children: h(a) }),
1776
1776
  /* @__PURE__ */ e(
1777
1777
  "text",
1778
1778
  {
1779
- x: i.x,
1780
- y: i.y,
1779
+ x: a.x,
1780
+ y: a.y,
1781
1781
  className: "nice-seating-chart__seat-number",
1782
1782
  textAnchor: "middle",
1783
1783
  dominantBaseline: "middle",
@@ -1787,42 +1787,42 @@ const Jt = ({
1787
1787
  )
1788
1788
  ]
1789
1789
  },
1790
- i.id
1790
+ a.id
1791
1791
  );
1792
- }) }), ei = ({
1792
+ }) }), si = ({
1793
1793
  index: s,
1794
1794
  selectedIds: t,
1795
- statusOverrides: r,
1795
+ statusOverrides: c,
1796
1796
  maxSeats: n,
1797
- onSeatToggle: c,
1797
+ onSeatToggle: l,
1798
1798
  onBestAvailable: o,
1799
1799
  describeSeat: d,
1800
1800
  disabled: m = !1,
1801
1801
  defaultOpen: h = !1
1802
1802
  }) => {
1803
1803
  var $;
1804
- const i = X(
1805
- () => s.sections.filter((l) => l.seatCount > 0),
1804
+ const a = X(
1805
+ () => s.sections.filter((r) => r.seatCount > 0),
1806
1806
  [s.sections]
1807
- ), [u, p] = E((($ = i[0]) == null ? void 0 : $.section.id) ?? ""), [b, f] = E(0), [g, w] = E(2), k = X(
1808
- () => s.rows.filter((l) => l.sectionId === u),
1807
+ ), [u, p] = E((($ = a[0]) == null ? void 0 : $.section.id) ?? ""), [b, f] = E(0), [g, w] = E(2), k = X(
1808
+ () => s.rows.filter((r) => r.sectionId === u),
1809
1809
  [s.rows, u]
1810
- ), _ = k.find((l) => l.rowIndex === b) ?? k[0];
1811
- return /* @__PURE__ */ a(
1812
- St,
1810
+ ), _ = k.find((r) => r.rowIndex === b) ?? k[0];
1811
+ return /* @__PURE__ */ i(
1812
+ Tt,
1813
1813
  {
1814
1814
  trigger: "Choose seats without the map",
1815
1815
  defaultExpanded: h,
1816
1816
  className: "nice-seating-chart__list-panel",
1817
1817
  children: [
1818
- o && /* @__PURE__ */ a("div", { className: "nice-seating-chart__best", children: [
1819
- /* @__PURE__ */ a("label", { className: "nice-seating-chart__field", children: [
1818
+ o && /* @__PURE__ */ i("div", { className: "nice-seating-chart__best", children: [
1819
+ /* @__PURE__ */ i("label", { className: "nice-seating-chart__field", children: [
1820
1820
  /* @__PURE__ */ e("span", { children: "How many seats?" }),
1821
1821
  /* @__PURE__ */ e(
1822
- Je,
1822
+ rn,
1823
1823
  {
1824
1824
  value: g,
1825
- onChange: (l) => w(Math.max(1, Math.min(n, l ?? 1))),
1825
+ onChange: (r) => w(Math.max(1, Math.min(n, r ?? 1))),
1826
1826
  min: 1,
1827
1827
  max: n,
1828
1828
  size: "xs",
@@ -1831,7 +1831,7 @@ const Jt = ({
1831
1831
  )
1832
1832
  ] }),
1833
1833
  /* @__PURE__ */ e(
1834
- F,
1834
+ V,
1835
1835
  {
1836
1836
  size: "sm",
1837
1837
  variant: "primary",
@@ -1841,148 +1841,148 @@ const Jt = ({
1841
1841
  }
1842
1842
  )
1843
1843
  ] }),
1844
- /* @__PURE__ */ a("div", { className: "nice-seating-chart__pickers", children: [
1845
- /* @__PURE__ */ a("label", { className: "nice-seating-chart__field", children: [
1844
+ /* @__PURE__ */ i("div", { className: "nice-seating-chart__pickers", children: [
1845
+ /* @__PURE__ */ i("label", { className: "nice-seating-chart__field", children: [
1846
1846
  /* @__PURE__ */ e("span", { children: "Section" }),
1847
1847
  /* @__PURE__ */ e(
1848
- Pe,
1848
+ Te,
1849
1849
  {
1850
1850
  size: "sm",
1851
1851
  value: u,
1852
1852
  disabled: m,
1853
- onChange: (l) => {
1854
- p(l), f(0);
1853
+ onChange: (r) => {
1854
+ p(r), f(0);
1855
1855
  },
1856
- options: i.map((l) => ({
1857
- value: l.section.id,
1858
- label: `${l.section.name} (${l.seatCount})`
1856
+ options: a.map((r) => ({
1857
+ value: r.section.id,
1858
+ label: `${r.section.name} (${r.seatCount})`
1859
1859
  }))
1860
1860
  }
1861
1861
  )
1862
1862
  ] }),
1863
- /* @__PURE__ */ a("label", { className: "nice-seating-chart__field", children: [
1863
+ /* @__PURE__ */ i("label", { className: "nice-seating-chart__field", children: [
1864
1864
  /* @__PURE__ */ e("span", { children: "Row" }),
1865
1865
  /* @__PURE__ */ e(
1866
- Pe,
1866
+ Te,
1867
1867
  {
1868
1868
  size: "sm",
1869
1869
  value: String((_ == null ? void 0 : _.rowIndex) ?? 0),
1870
1870
  disabled: m || k.length === 0,
1871
- onChange: (l) => f(Number(l)),
1872
- options: k.map((l) => ({
1873
- value: String(l.rowIndex),
1874
- label: `${l.label} (${l.seats.length})`
1871
+ onChange: (r) => f(Number(r)),
1872
+ options: k.map((r) => ({
1873
+ value: String(r.rowIndex),
1874
+ label: `${r.label} (${r.seats.length})`
1875
1875
  }))
1876
1876
  }
1877
1877
  )
1878
1878
  ] })
1879
1879
  ] }),
1880
- _ && /* @__PURE__ */ e("ul", { className: "nice-seating-chart__seat-list", children: _.seats.map((l) => {
1881
- const y = ke(l, r), v = tn(l), A = t.has(l.id);
1882
- return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ a(
1883
- F,
1880
+ _ && /* @__PURE__ */ e("ul", { className: "nice-seating-chart__seat-list", children: _.seats.map((r) => {
1881
+ const y = Ce(r, c), v = on(r), A = t.has(r.id);
1882
+ return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(
1883
+ V,
1884
1884
  {
1885
1885
  size: "sm",
1886
1886
  variant: A ? "primary" : "outline",
1887
1887
  disabled: m || y !== "available",
1888
- ariaLabel: d(l),
1888
+ ariaLabel: d(r),
1889
1889
  "aria-pressed": A,
1890
- onClick: () => c(l),
1890
+ onClick: () => l(r),
1891
1891
  children: [
1892
- l.number,
1893
- v && /* @__PURE__ */ e(Cn, { size: 11 })
1892
+ r.number,
1893
+ v && /* @__PURE__ */ e(Pn, { size: 11 })
1894
1894
  ]
1895
1895
  }
1896
- ) }, l.id);
1896
+ ) }, r.id);
1897
1897
  }) })
1898
1898
  ]
1899
1899
  }
1900
1900
  );
1901
- }, ni = { zoom: 1, pan: { x: 0, y: 0 } };
1902
- function ti(s = {}) {
1901
+ }, ri = { zoom: 1, pan: { x: 0, y: 0 } };
1902
+ function ci(s = {}) {
1903
1903
  const {
1904
1904
  minZoom: t = 0.1,
1905
- maxZoom: r = 10,
1906
- initial: n = ni,
1907
- viewport: c,
1905
+ maxZoom: c = 10,
1906
+ initial: n = ri,
1907
+ viewport: l,
1908
1908
  onViewportChange: o,
1909
1909
  disabled: d = !1
1910
- } = s, [m, h] = E(n), i = c ?? m, [u, p] = E(!1), b = ve(/* @__PURE__ */ new Map()), f = ve(null), g = ve(null), w = G(
1910
+ } = s, [m, h] = E(n), a = l ?? m, [u, p] = E(!1), b = ve(/* @__PURE__ */ new Map()), f = ve(null), g = ve(null), w = G(
1911
1911
  (N) => {
1912
- c === void 0 && h(N), o == null || o(N);
1912
+ l === void 0 && h(N), o == null || o(N);
1913
1913
  },
1914
- [c, o]
1914
+ [l, o]
1915
1915
  ), k = G(
1916
- (N) => Math.min(r, Math.max(t, N)),
1917
- [t, r]
1916
+ (N) => Math.min(c, Math.max(t, N)),
1917
+ [t, c]
1918
1918
  ), _ = G(
1919
1919
  (N, L) => {
1920
- const V = k(i.zoom * N);
1921
- if (V === i.zoom)
1920
+ const F = k(a.zoom * N);
1921
+ if (F === a.zoom)
1922
1922
  return;
1923
- const B = V / i.zoom;
1923
+ const B = F / a.zoom;
1924
1924
  w({
1925
- zoom: V,
1925
+ zoom: F,
1926
1926
  pan: {
1927
- x: L.x - (L.x - i.pan.x) * B,
1928
- y: L.y - (L.y - i.pan.y) * B
1927
+ x: L.x - (L.x - a.pan.x) * B,
1928
+ y: L.y - (L.y - a.pan.y) * B
1929
1929
  }
1930
1930
  });
1931
1931
  },
1932
- [w, k, i]
1932
+ [w, k, a]
1933
1933
  ), $ = G(
1934
- (N, L, V) => {
1935
- const B = L ?? (V ? { x: V.width / 2, y: V.height / 2 } : { x: 0, y: 0 });
1934
+ (N, L, F) => {
1935
+ const B = L ?? (F ? { x: F.width / 2, y: F.height / 2 } : { x: 0, y: 0 });
1936
1936
  _(N, B);
1937
1937
  },
1938
1938
  [_]
1939
- ), l = G(
1940
- (N, L, V = 24) => {
1941
- const B = Math.max(1, N.maxX - N.minX), C = Math.max(1, N.maxY - N.minY), O = k(
1942
- Math.min((L.width - V * 2) / B, (L.height - V * 2) / C)
1939
+ ), r = G(
1940
+ (N, L, F = 24) => {
1941
+ const B = Math.max(1, N.maxX - N.minX), I = Math.max(1, N.maxY - N.minY), R = k(
1942
+ Math.min((L.width - F * 2) / B, (L.height - F * 2) / I)
1943
1943
  );
1944
1944
  w({
1945
- zoom: O,
1945
+ zoom: R,
1946
1946
  pan: {
1947
- x: (L.width - B * O) / 2 - N.minX * O,
1948
- y: (L.height - C * O) / 2 - N.minY * O
1947
+ x: (L.width - B * R) / 2 - N.minX * R,
1948
+ y: (L.height - I * R) / 2 - N.minY * R
1949
1949
  }
1950
1950
  });
1951
1951
  },
1952
1952
  [w, k]
1953
1953
  ), y = G(() => w(n), [w, n]), v = G(
1954
1954
  (N) => ({
1955
- x: (N.x - i.pan.x) / i.zoom,
1956
- y: (N.y - i.pan.y) / i.zoom
1955
+ x: (N.x - a.pan.x) / a.zoom,
1956
+ y: (N.y - a.pan.y) / a.zoom
1957
1957
  }),
1958
- [i]
1958
+ [a]
1959
1959
  ), A = G(
1960
1960
  (N) => ({
1961
- x: N.x * i.zoom + i.pan.x,
1962
- y: N.y * i.zoom + i.pan.y
1961
+ x: N.x * a.zoom + a.pan.x,
1962
+ y: N.y * a.zoom + a.pan.y
1963
1963
  }),
1964
- [i]
1965
- ), I = (N) => {
1964
+ [a]
1965
+ ), C = (N) => {
1966
1966
  const L = N.currentTarget.getBoundingClientRect();
1967
1967
  return { x: N.clientX - L.left, y: N.clientY - L.top };
1968
1968
  };
1969
1969
  return {
1970
- viewport: i,
1970
+ viewport: a,
1971
1971
  setViewport: w,
1972
1972
  containerProps: d ? {} : {
1973
1973
  onWheel: (N) => {
1974
1974
  N.preventDefault();
1975
1975
  const L = Math.exp(-N.deltaY * 2e-3);
1976
- _(Math.min(2, Math.max(0.5, L)), I(N));
1976
+ _(Math.min(2, Math.max(0.5, L)), C(N));
1977
1977
  },
1978
1978
  onPointerDown: (N) => {
1979
- var V, B;
1980
- const L = I(N);
1981
- if (b.current.set(N.pointerId, L), (B = (V = N.currentTarget).setPointerCapture) == null || B.call(V, N.pointerId), b.current.size === 2) {
1982
- const [C, O] = [...b.current.values()];
1979
+ var F, B;
1980
+ const L = C(N);
1981
+ if (b.current.set(N.pointerId, L), (B = (F = N.currentTarget).setPointerCapture) == null || B.call(F, N.pointerId), b.current.size === 2) {
1982
+ const [I, R] = [...b.current.values()];
1983
1983
  f.current = {
1984
- distance: Math.hypot(C.x - O.x, C.y - O.y) || 1,
1985
- zoom: i.zoom
1984
+ distance: Math.hypot(I.x - R.x, I.y - R.y) || 1,
1985
+ zoom: a.zoom
1986
1986
  };
1987
1987
  } else
1988
1988
  g.current = L, p(!0);
@@ -1990,16 +1990,16 @@ function ti(s = {}) {
1990
1990
  onPointerMove: (N) => {
1991
1991
  if (!b.current.has(N.pointerId))
1992
1992
  return;
1993
- const L = I(N);
1993
+ const L = C(N);
1994
1994
  if (b.current.set(N.pointerId, L), b.current.size === 2 && f.current) {
1995
- const [C, O] = [...b.current.values()], z = Math.hypot(C.x - O.x, C.y - O.y) || 1, P = k(f.current.zoom * (z / f.current.distance)), M = { x: (C.x + O.x) / 2, y: (C.y + O.y) / 2 };
1996
- P !== i.zoom && _(P / i.zoom, M);
1995
+ const [I, R] = [...b.current.values()], z = Math.hypot(I.x - R.x, I.y - R.y) || 1, P = k(f.current.zoom * (z / f.current.distance)), M = { x: (I.x + R.x) / 2, y: (I.y + R.y) / 2 };
1996
+ P !== a.zoom && _(P / a.zoom, M);
1997
1997
  return;
1998
1998
  }
1999
1999
  if (!g.current)
2000
2000
  return;
2001
- const V = L.x - g.current.x, B = L.y - g.current.y;
2002
- g.current = L, w({ zoom: i.zoom, pan: { x: i.pan.x + V, y: i.pan.y + B } });
2001
+ const F = L.x - g.current.x, B = L.y - g.current.y;
2002
+ g.current = L, w({ zoom: a.zoom, pan: { x: a.pan.x + F, y: a.pan.y + B } });
2003
2003
  },
2004
2004
  onPointerUp: (N) => {
2005
2005
  b.current.delete(N.pointerId), b.current.size < 2 && (f.current = null), b.current.size === 0 && (g.current = null, p(!1));
@@ -2009,30 +2009,30 @@ function ti(s = {}) {
2009
2009
  }
2010
2010
  },
2011
2011
  zoomBy: $,
2012
- fitTo: l,
2012
+ fitTo: r,
2013
2013
  reset: y,
2014
2014
  screenToWorld: v,
2015
2015
  worldToScreen: A,
2016
2016
  panning: u
2017
2017
  };
2018
2018
  }
2019
- const ii = {
2019
+ const li = {
2020
2020
  "orphan-seat": "That would leave a single empty seat. Pick a different seat.",
2021
2021
  "not-adjacent": "Seats must be next to each other.",
2022
2022
  "max-seats": "You have selected as many seats as this order allows.",
2023
2023
  "category-not-allowed": "That seat is not part of the selected ticket type.",
2024
2024
  unavailable: "That seat is not available."
2025
- }, ai = ee(
2026
- function(t, r) {
2027
- var de, $e, xe;
2025
+ }, oi = ee(
2026
+ function(t, c) {
2027
+ var de, Ae, xe;
2028
2028
  const {
2029
2029
  chart: n,
2030
- mode: c = "select",
2030
+ mode: l = "select",
2031
2031
  selection: o = {},
2032
2032
  selectedSeatIds: d,
2033
2033
  defaultSelectedSeatIds: m = [],
2034
2034
  onSelectionChange: h,
2035
- onSelectionRejected: i,
2035
+ onSelectionRejected: a,
2036
2036
  seatStatusOverrides: u,
2037
2037
  onSeatClick: p,
2038
2038
  onBestAvailable: b,
@@ -2042,34 +2042,34 @@ const ii = {
2042
2042
  containerSize: k,
2043
2043
  showLegend: _ = !0,
2044
2044
  showList: $ = !1,
2045
- zoomable: l = !0,
2045
+ zoomable: r = !0,
2046
2046
  locale: y,
2047
2047
  disabled: v = !1,
2048
2048
  readOnly: A = !1,
2049
- className: I,
2049
+ className: C,
2050
2050
  style: D
2051
- } = t, N = ve(null), [L, V] = E({ width: 800, height: 500 }), [B, C] = E(!1), [O, z] = E(m), [P, M] = E(null), [j, W] = E(""), S = d ?? O, Y = X(() => new Set(S), [S]), q = c === "select" && !v && !A && o.interactive !== !1, Q = o.maxSeats ?? 8, R = X(() => Xt(n), [n]), ne = k ?? L, H = !!k || B;
2052
- Oe(() => {
2051
+ } = t, N = ve(null), [L, F] = E({ width: 800, height: 500 }), [B, I] = E(!1), [R, z] = E(m), [P, M] = E(null), [j, W] = E(""), S = d ?? R, Y = X(() => new Set(S), [S]), q = l === "select" && !v && !A && o.interactive !== !1, Q = o.maxSeats ?? 8, O = X(() => jt(n), [n]), ne = k ?? L, H = !!k || B;
2052
+ Ue(() => {
2053
2053
  if (k || !N.current || typeof ResizeObserver > "u")
2054
2054
  return;
2055
2055
  const T = N.current, U = new ResizeObserver(([K]) => {
2056
2056
  const { width: Z, height: ae } = K.contentRect;
2057
- Z > 0 && ae > 0 && (V({ width: Z, height: ae }), C(!0));
2057
+ Z > 0 && ae > 0 && (F({ width: Z, height: ae }), I(!0));
2058
2058
  });
2059
2059
  return U.observe(T), () => U.disconnect();
2060
2060
  }, [k]);
2061
- const _e = ti({ disabled: !l || v }), { fitTo: le, viewport: me } = _e, Ne = ve(!1);
2062
- Oe(() => {
2063
- Ne.current || !H || R.totalSeats === 0 || ne.width <= 0 || (Ne.current = !0, le(R.bounds, ne));
2064
- }, [le, R, ne, H]);
2065
- const Me = X(() => Yt(me, ne, 40), [me, ne]), be = f !== "auto" ? f : P ? "seat" : void 0, he = X(
2066
- () => Wt(R, Me, w, be),
2067
- [R, Me, w, be]
2061
+ const _e = ci({ disabled: !r || v }), { fitTo: ce, viewport: me } = _e, Ne = ve(!1);
2062
+ Ue(() => {
2063
+ Ne.current || !H || O.totalSeats === 0 || ne.width <= 0 || (Ne.current = !0, ce(O.bounds, ne));
2064
+ }, [ce, O, ne, H]);
2065
+ const Ee = X(() => qt(me, ne, 40), [me, ne]), be = f !== "auto" ? f : P ? "seat" : void 0, he = X(
2066
+ () => Ht(O, Ee, w, be),
2067
+ [O, Ee, w, be]
2068
2068
  ), we = ve(null);
2069
- Oe(() => {
2069
+ Ue(() => {
2070
2070
  we.current !== he.tier && (we.current = he.tier, g == null || g(he.tier));
2071
2071
  }, [he.tier, g]);
2072
- const Ve = X(
2072
+ const je = X(
2073
2073
  () => {
2074
2074
  var T;
2075
2075
  return new Map(((T = n.sections) == null ? void 0 : T.map((U) => [U.id, U.color])) ?? []);
@@ -2083,13 +2083,13 @@ const ii = {
2083
2083
  [n.sections]
2084
2084
  ), oe = G(
2085
2085
  (T) => {
2086
- const U = pe.get(T.sectorId), K = ke(T, u), Z = tn(T), ae = [
2086
+ const U = pe.get(T.sectorId), K = Ce(T, u), Z = on(T), ae = [
2087
2087
  U ? U.name : "",
2088
2088
  `row ${T.row}`,
2089
2089
  `seat ${T.number}`
2090
2090
  ].filter(Boolean);
2091
2091
  if (U && o.showPrices !== !1) {
2092
- const ue = yn(T, n, U);
2092
+ const ue = xn(T, n, U);
2093
2093
  ae.push(se(ue.amount, ue.currency, y));
2094
2094
  }
2095
2095
  return ae.push(K), Z === "wheelchair" && ae.push("wheelchair accessible"), Z === "companion" && ae.push("companion seat"), ae.join(", ");
@@ -2104,9 +2104,9 @@ const ii = {
2104
2104
  (T) => {
2105
2105
  if (p == null || p(T), !q)
2106
2106
  return;
2107
- const U = Gt(S, T.id, R, o, u);
2107
+ const U = Jt(S, T.id, O, o, u);
2108
2108
  if ("rejected" in U) {
2109
- i == null || i({ reason: U.rejected, seatId: T.id }), W(ii[U.rejected]);
2109
+ a == null || a({ reason: U.rejected, seatId: T.id }), W(li[U.rejected]);
2110
2110
  return;
2111
2111
  }
2112
2112
  re(U.selected), W(`${oe(T)}. ${U.selected.length} of ${Q} selected.`);
@@ -2114,11 +2114,11 @@ const ii = {
2114
2114
  [
2115
2115
  re,
2116
2116
  oe,
2117
- R,
2117
+ O,
2118
2118
  q,
2119
2119
  Q,
2120
2120
  p,
2121
- i,
2121
+ a,
2122
2122
  u,
2123
2123
  S,
2124
2124
  o
@@ -2129,37 +2129,37 @@ const ii = {
2129
2129
  b(T, U);
2130
2130
  return;
2131
2131
  }
2132
- const K = Kt(R, T, o, U, u);
2132
+ const K = ei(O, T, o, U, u);
2133
2133
  if (K.length === 0) {
2134
2134
  W(`No block of ${T} seats together is available.`);
2135
2135
  return;
2136
2136
  }
2137
2137
  re(K), M(K[0]), W(`Selected ${K.length} seats together.`);
2138
2138
  },
2139
- [re, R, b, u, o]
2140
- ), Ce = G(
2139
+ [re, O, b, u, o]
2140
+ ), Se = G(
2141
2141
  (T) => {
2142
- const U = R.locationById.get(T);
2142
+ const U = O.locationById.get(T);
2143
2143
  if (!U)
2144
2144
  return;
2145
- const K = R.rows.find(
2145
+ const K = O.rows.find(
2146
2146
  (Z) => Z.sectionId === U.sectionId && Z.rowIndex === U.rowIndex
2147
2147
  );
2148
- K && le(K.bounds, ne, 80);
2148
+ K && ce(K.bounds, ne, 80);
2149
2149
  },
2150
- [le, R, ne]
2150
+ [ce, O, ne]
2151
2151
  ), fe = G(
2152
2152
  (T) => {
2153
2153
  if (!T)
2154
2154
  return;
2155
- M(T), Ce(T);
2156
- const U = R.seatById.get(T);
2155
+ M(T), Se(T);
2156
+ const U = O.seatById.get(T);
2157
2157
  U && W(oe(U));
2158
2158
  },
2159
- [oe, R.seatById, Ce]
2160
- ), Fe = (T) => {
2159
+ [oe, O.seatById, Se]
2160
+ ), Ge = (T) => {
2161
2161
  var ae, ue;
2162
- const U = P ?? ((ue = (ae = R.rows[0]) == null ? void 0 : ae.seats[0]) == null ? void 0 : ue.id) ?? null;
2162
+ const U = P ?? ((ue = (ae = O.rows[0]) == null ? void 0 : ae.seats[0]) == null ? void 0 : ue.id) ?? null;
2163
2163
  if (!U)
2164
2164
  return;
2165
2165
  const Z = {
@@ -2171,54 +2171,54 @@ const ii = {
2171
2171
  End: "row-end"
2172
2172
  }[T.key];
2173
2173
  if (Z) {
2174
- T.preventDefault(), fe(P ? Ht(R, U, Z) : U);
2174
+ T.preventDefault(), fe(P ? ni(O, U, Z) : U);
2175
2175
  return;
2176
2176
  }
2177
2177
  if (T.key === "PageDown" || T.key === "PageUp") {
2178
- T.preventDefault(), fe(Qt(R, P, T.key === "PageDown" ? "next" : "prev"));
2178
+ T.preventDefault(), fe(ti(O, P, T.key === "PageDown" ? "next" : "prev"));
2179
2179
  return;
2180
2180
  }
2181
2181
  if (T.key === "Enter" || T.key === " ") {
2182
2182
  T.preventDefault();
2183
- const De = R.seatById.get(U);
2184
- De && Ie(De);
2183
+ const Le = O.seatById.get(U);
2184
+ Le && Ie(Le);
2185
2185
  return;
2186
2186
  }
2187
2187
  T.key === "Escape" && S.length > 0 && (T.preventDefault(), re([]), W("Selection cleared."));
2188
2188
  };
2189
- if (R.totalSeats === 0)
2190
- return /* @__PURE__ */ e("div", { ref: r, className: `nice-seating-chart ${I ?? ""}`, style: D, children: /* @__PURE__ */ e(
2189
+ if (O.totalSeats === 0)
2190
+ return /* @__PURE__ */ e("div", { ref: c, className: `nice-seating-chart ${C ?? ""}`, style: D, children: /* @__PURE__ */ e(
2191
2191
  ye,
2192
2192
  {
2193
2193
  title: "This chart has no seats",
2194
2194
  description: "Add sections and rows to the seating chart to see it here."
2195
2195
  }
2196
2196
  ) });
2197
- const Se = S.reduce((T, U) => {
2198
- const K = R.seatById.get(U), Z = K ? pe.get(K.sectorId) : void 0;
2199
- return !K || !Z ? T : T + yn(K, n, Z).amount;
2200
- }, 0), ze = (($e = (de = n.sections) == null ? void 0 : de[0]) == null ? void 0 : $e.currency) ?? "PLN";
2201
- return /* @__PURE__ */ a(
2197
+ const ze = S.reduce((T, U) => {
2198
+ const K = O.seatById.get(U), Z = K ? pe.get(K.sectorId) : void 0;
2199
+ return !K || !Z ? T : T + xn(K, n, Z).amount;
2200
+ }, 0), $e = ((Ae = (de = n.sections) == null ? void 0 : de[0]) == null ? void 0 : Ae.currency) ?? "PLN";
2201
+ return /* @__PURE__ */ i(
2202
2202
  "div",
2203
2203
  {
2204
- ref: r,
2205
- className: `nice-seating-chart nice-seating-chart--${c} ${I ?? ""}`,
2204
+ ref: c,
2205
+ className: `nice-seating-chart nice-seating-chart--${l} ${C ?? ""}`,
2206
2206
  style: D,
2207
2207
  children: [
2208
- /* @__PURE__ */ a(
2208
+ /* @__PURE__ */ i(
2209
2209
  "div",
2210
2210
  {
2211
2211
  ref: N,
2212
2212
  className: "nice-seating-chart__canvas-host",
2213
2213
  role: "grid",
2214
2214
  "aria-label": `${n.name} seating chart`,
2215
- "aria-rowcount": R.rows.length,
2216
- "aria-colcount": R.totalSeats,
2215
+ "aria-rowcount": O.rows.length,
2216
+ "aria-colcount": O.totalSeats,
2217
2217
  tabIndex: P ? -1 : 0,
2218
- onKeyDown: Fe,
2218
+ onKeyDown: Ge,
2219
2219
  ..._e.containerProps,
2220
2220
  children: [
2221
- /* @__PURE__ */ a(
2221
+ /* @__PURE__ */ i(
2222
2222
  "svg",
2223
2223
  {
2224
2224
  className: "nice-seating-chart__canvas",
@@ -2238,18 +2238,18 @@ const ii = {
2238
2238
  }
2239
2239
  ) }),
2240
2240
  /* @__PURE__ */ e("g", { transform: `translate(${me.pan.x} ${me.pan.y}) scale(${me.zoom})`, children: /* @__PURE__ */ e(
2241
- Jt,
2241
+ ai,
2242
2242
  {
2243
2243
  cull: he,
2244
2244
  selectedIds: Y,
2245
2245
  cursorId: P,
2246
2246
  statusOverrides: u,
2247
- sectionColorById: Ve,
2247
+ sectionColorById: je,
2248
2248
  interactive: q,
2249
2249
  onSeatClick: Ie,
2250
2250
  onSectionClick: o.sectionSelect ? (T) => {
2251
2251
  var K;
2252
- const U = (K = R.rows.find((Z) => Z.sectionId === T)) == null ? void 0 : K.seats[0];
2252
+ const U = (K = O.rows.find((Z) => Z.sectionId === T)) == null ? void 0 : K.seats[0];
2253
2253
  U && fe(U.id);
2254
2254
  } : void 0,
2255
2255
  describeSeat: oe
@@ -2258,9 +2258,9 @@ const ii = {
2258
2258
  ]
2259
2259
  }
2260
2260
  ),
2261
- l && /* @__PURE__ */ a("div", { className: "nice-seating-chart__zoom", children: [
2261
+ r && /* @__PURE__ */ i("div", { className: "nice-seating-chart__zoom", children: [
2262
2262
  /* @__PURE__ */ e(
2263
- F,
2263
+ V,
2264
2264
  {
2265
2265
  size: "sm",
2266
2266
  variant: "ghost",
@@ -2270,7 +2270,7 @@ const ii = {
2270
2270
  }
2271
2271
  ),
2272
2272
  /* @__PURE__ */ e(
2273
- F,
2273
+ V,
2274
2274
  {
2275
2275
  size: "sm",
2276
2276
  variant: "ghost",
@@ -2280,12 +2280,12 @@ const ii = {
2280
2280
  }
2281
2281
  ),
2282
2282
  /* @__PURE__ */ e(
2283
- F,
2283
+ V,
2284
2284
  {
2285
2285
  size: "sm",
2286
2286
  variant: "ghost",
2287
2287
  ariaLabel: "Fit to view",
2288
- onClick: () => le(R.bounds, ne),
2288
+ onClick: () => ce(O.bounds, ne),
2289
2289
  children: "Fit"
2290
2290
  }
2291
2291
  )
@@ -2294,8 +2294,8 @@ const ii = {
2294
2294
  }
2295
2295
  ),
2296
2296
  /* @__PURE__ */ e("p", { className: "nice-seating-chart__status", role: "status", "aria-live": "polite", children: j }),
2297
- _ && /* @__PURE__ */ a("ul", { className: "nice-seating-chart__legend", children: [
2298
- (xe = n.priceCategories) == null ? void 0 : xe.map((T) => /* @__PURE__ */ a("li", { className: "nice-seating-chart__legend-item", children: [
2297
+ _ && /* @__PURE__ */ i("ul", { className: "nice-seating-chart__legend", children: [
2298
+ (xe = n.priceCategories) == null ? void 0 : xe.map((T) => /* @__PURE__ */ i("li", { className: "nice-seating-chart__legend-item", children: [
2299
2299
  /* @__PURE__ */ e(
2300
2300
  "span",
2301
2301
  {
@@ -2306,25 +2306,25 @@ const ii = {
2306
2306
  ),
2307
2307
  T.name,
2308
2308
  " · ",
2309
- se(T.price, ze, y)
2309
+ se(T.price, $e, y)
2310
2310
  ] }, T.id)),
2311
- /* @__PURE__ */ a("li", { className: "nice-seating-chart__legend-item nice-seating-chart__legend-item--sold", children: [
2311
+ /* @__PURE__ */ i("li", { className: "nice-seating-chart__legend-item nice-seating-chart__legend-item--sold", children: [
2312
2312
  /* @__PURE__ */ e("span", { className: "nice-seating-chart__legend-swatch", "aria-hidden": "true" }),
2313
2313
  " Sold"
2314
2314
  ] })
2315
2315
  ] }),
2316
- c === "select" && S.length > 0 && /* @__PURE__ */ a("p", { className: "nice-seating-chart__total", children: [
2316
+ l === "select" && S.length > 0 && /* @__PURE__ */ i("p", { className: "nice-seating-chart__total", children: [
2317
2317
  S.length,
2318
2318
  " seat",
2319
2319
  S.length === 1 ? "" : "s",
2320
2320
  " ·",
2321
2321
  " ",
2322
- se(Se, ze, y)
2322
+ se(ze, $e, y)
2323
2323
  ] }),
2324
2324
  $ && /* @__PURE__ */ e(
2325
- ei,
2325
+ si,
2326
2326
  {
2327
- index: R,
2327
+ index: O,
2328
2328
  selectedIds: Y,
2329
2329
  statusOverrides: u,
2330
2330
  maxSeats: Q,
@@ -2332,58 +2332,58 @@ const ii = {
2332
2332
  onBestAvailable: ge,
2333
2333
  describeSeat: oe,
2334
2334
  disabled: !q,
2335
- defaultOpen: c === "select" && $
2335
+ defaultOpen: l === "select" && $
2336
2336
  }
2337
2337
  )
2338
2338
  ]
2339
2339
  }
2340
2340
  );
2341
2341
  }
2342
- ), Pi = ee(
2343
- function({ showList: t = !0, className: r, ...n }, c) {
2342
+ ), Bi = ee(
2343
+ function({ showList: t = !0, className: c, ...n }, l) {
2344
2344
  return /* @__PURE__ */ e(
2345
- ai,
2345
+ oi,
2346
2346
  {
2347
- ref: c,
2347
+ ref: l,
2348
2348
  mode: "select",
2349
2349
  showList: t,
2350
- className: `nice-seat-picker ${r ?? ""}`,
2350
+ className: `nice-seat-picker ${c ?? ""}`,
2351
2351
  ...n
2352
2352
  }
2353
2353
  );
2354
2354
  }
2355
- ), Bn = /\{\{\s*([\w.-]+)\s*\}\}/g, si = {
2355
+ ), Xn = /\{\{\s*([\w.-]+)\s*\}\}/g, di = {
2356
2356
  "&": "&amp;",
2357
2357
  "<": "&lt;",
2358
2358
  ">": "&gt;",
2359
2359
  '"': "&quot;",
2360
2360
  "'": "&#39;"
2361
2361
  };
2362
- function ri(s) {
2363
- return s.replace(/[&<>"']/g, (t) => si[t] ?? t);
2362
+ function ui(s) {
2363
+ return s.replace(/[&<>"']/g, (t) => di[t] ?? t);
2364
2364
  }
2365
- function li(s) {
2366
- const t = [], r = /* @__PURE__ */ new Set();
2367
- for (const n of s.matchAll(Bn)) {
2368
- const c = n[1];
2369
- r.has(c) || (r.add(c), t.push(c));
2365
+ function mi(s) {
2366
+ const t = [], c = /* @__PURE__ */ new Set();
2367
+ for (const n of s.matchAll(Xn)) {
2368
+ const l = n[1];
2369
+ c.has(l) || (c.add(l), t.push(l));
2370
2370
  }
2371
2371
  return t;
2372
2372
  }
2373
- function ci(s, t = {}, r = {}) {
2374
- const { escape: n = !0, missing: c = "keep" } = r;
2375
- return s.replace(Bn, (o, d) => {
2373
+ function hi(s, t = {}, c = {}) {
2374
+ const { escape: n = !0, missing: l = "keep" } = c;
2375
+ return s.replace(Xn, (o, d) => {
2376
2376
  const m = t[d];
2377
- return m == null ? c === "blank" ? "" : o : n ? ri(String(m)) : String(m);
2377
+ return m == null ? l === "blank" ? "" : o : n ? ui(String(m)) : String(m);
2378
2378
  });
2379
2379
  }
2380
- function _n(s) {
2380
+ function kn(s) {
2381
2381
  return `{{${s}}}`;
2382
2382
  }
2383
- function oi(s, t = {}) {
2384
- return li(s).filter((r) => t[r] === void 0 || t[r] === null);
2383
+ function pi(s, t = {}) {
2384
+ return mi(s).filter((c) => t[c] === void 0 || t[c] === null);
2385
2385
  }
2386
- const di = [
2386
+ const gi = [
2387
2387
  "bold",
2388
2388
  "italic",
2389
2389
  "underline",
@@ -2397,79 +2397,79 @@ const di = [
2397
2397
  "alignCenter",
2398
2398
  "undo",
2399
2399
  "redo"
2400
- ], Ti = ee(
2401
- function(t, r) {
2400
+ ], Ri = ee(
2401
+ function(t, c) {
2402
2402
  const {
2403
2403
  template: n,
2404
- onTemplateChange: c,
2404
+ onTemplateChange: l,
2405
2405
  tokens: o = [],
2406
2406
  previewData: d = {},
2407
2407
  recipients: m = [],
2408
2408
  onRecipientsChange: h,
2409
- onSend: i,
2409
+ onSend: a,
2410
2410
  sending: u = !1,
2411
- toolbar: p = di,
2411
+ toolbar: p = gi,
2412
2412
  disabled: b = !1,
2413
2413
  readOnly: f = !1,
2414
2414
  size: g = "md",
2415
2415
  className: w,
2416
2416
  style: k
2417
- } = t, [_, $] = E(""), l = b || f || u, y = X(() => Dn(_), [_]), v = X(() => {
2418
- const C = {};
2419
- for (const O of o)
2420
- O.sample !== void 0 && (C[O.key] = O.sample);
2421
- return { ...C, ...d };
2417
+ } = t, [_, $] = E(""), r = b || f || u, y = X(() => On(_), [_]), v = X(() => {
2418
+ const I = {};
2419
+ for (const R of o)
2420
+ R.sample !== void 0 && (I[R.key] = R.sample);
2421
+ return { ...I, ...d };
2422
2422
  }, [o, d]), A = X(
2423
- () => ci(n.body ?? "", v),
2423
+ () => hi(n.body ?? "", v),
2424
2424
  [n.body, v]
2425
- ), I = X(
2426
- () => oi(n.body ?? "", v),
2425
+ ), C = X(
2426
+ () => pi(n.body ?? "", v),
2427
2427
  [n.body, v]
2428
- ), D = m.map((C) => C.email), N = (C) => c == null ? void 0 : c({ ...n, ...C }), L = (C) => {
2429
- N({ body: `${n.body ?? ""}${_n(C)}` });
2430
- }, V = () => {
2431
- !h || y.valid.length === 0 || (h(Et(D, y.valid)), $(""));
2432
- }, B = (C) => {
2433
- h == null || h(D.filter((O) => O !== C));
2428
+ ), D = m.map((I) => I.email), N = (I) => l == null ? void 0 : l({ ...n, ...I }), L = (I) => {
2429
+ N({ body: `${n.body ?? ""}${kn(I)}` });
2430
+ }, F = () => {
2431
+ !h || y.valid.length === 0 || (h(Ut(D, y.valid)), $(""));
2432
+ }, B = (I) => {
2433
+ h == null || h(D.filter((R) => R !== I));
2434
2434
  };
2435
- return /* @__PURE__ */ a(
2435
+ return /* @__PURE__ */ i(
2436
2436
  "div",
2437
2437
  {
2438
- ref: r,
2438
+ ref: c,
2439
2439
  className: `nice-invitation-designer nice-invitation-designer--${g} ${w ?? ""}`,
2440
2440
  style: k,
2441
2441
  children: [
2442
- /* @__PURE__ */ a("section", { className: "nice-invitation-designer__editor", children: [
2442
+ /* @__PURE__ */ i("section", { className: "nice-invitation-designer__editor", children: [
2443
2443
  /* @__PURE__ */ e(
2444
2444
  J,
2445
2445
  {
2446
2446
  label: "Template name",
2447
2447
  value: n.name,
2448
- onChange: (C) => N({ name: C }),
2448
+ onChange: (I) => N({ name: I }),
2449
2449
  placeholder: "Birthday invitation",
2450
- disabled: l,
2450
+ disabled: r,
2451
2451
  size: g
2452
2452
  }
2453
2453
  ),
2454
- o.length > 0 && !f && /* @__PURE__ */ a("div", { className: "nice-invitation-designer__tokens", children: [
2454
+ o.length > 0 && !f && /* @__PURE__ */ i("div", { className: "nice-invitation-designer__tokens", children: [
2455
2455
  /* @__PURE__ */ e("span", { className: "nice-invitation-designer__tokens-label", children: "Insert:" }),
2456
- o.map((C) => /* @__PURE__ */ e(
2457
- F,
2456
+ o.map((I) => /* @__PURE__ */ e(
2457
+ V,
2458
2458
  {
2459
2459
  size: "sm",
2460
2460
  variant: "outline",
2461
- disabled: l,
2462
- onClick: () => L(C.key),
2463
- children: C.label
2461
+ disabled: r,
2462
+ onClick: () => L(I.key),
2463
+ children: I.label
2464
2464
  },
2465
- C.key
2465
+ I.key
2466
2466
  ))
2467
2467
  ] }),
2468
2468
  /* @__PURE__ */ e(
2469
- zt,
2469
+ Mt,
2470
2470
  {
2471
2471
  value: n.body ?? "",
2472
- onChange: (C) => N({ body: C }),
2472
+ onChange: (I) => N({ body: I }),
2473
2473
  toolbar: p,
2474
2474
  height: 280,
2475
2475
  readOnly: f || u,
@@ -2477,11 +2477,11 @@ const di = [
2477
2477
  }
2478
2478
  )
2479
2479
  ] }),
2480
- /* @__PURE__ */ a("section", { className: "nice-invitation-designer__preview", "aria-label": "Invitation preview", children: [
2481
- /* @__PURE__ */ a("header", { className: "nice-invitation-designer__preview-header", children: [
2480
+ /* @__PURE__ */ i("section", { className: "nice-invitation-designer__preview", "aria-label": "Invitation preview", children: [
2481
+ /* @__PURE__ */ i("header", { className: "nice-invitation-designer__preview-header", children: [
2482
2482
  /* @__PURE__ */ e("h4", { children: "Preview" }),
2483
- I.length > 0 && /* @__PURE__ */ a(te, { size: "xs", subtle: !0, variant: "warning", children: [
2484
- I.length,
2483
+ C.length > 0 && /* @__PURE__ */ i(te, { size: "xs", subtle: !0, variant: "warning", children: [
2484
+ C.length,
2485
2485
  " unresolved"
2486
2486
  ] })
2487
2487
  ] }),
@@ -2493,87 +2493,87 @@ const di = [
2493
2493
  dangerouslySetInnerHTML: { __html: A }
2494
2494
  }
2495
2495
  ),
2496
- I.length > 0 && /* @__PURE__ */ a("p", { className: "nice-invitation-designer__unresolved", children: [
2496
+ C.length > 0 && /* @__PURE__ */ i("p", { className: "nice-invitation-designer__unresolved", children: [
2497
2497
  "No preview value for: ",
2498
- I.map((C) => _n(C)).join(", ")
2498
+ C.map((I) => kn(I)).join(", ")
2499
2499
  ] })
2500
2500
  ] }),
2501
- /* @__PURE__ */ a("section", { className: "nice-invitation-designer__recipients", children: [
2502
- /* @__PURE__ */ e("header", { className: "nice-invitation-designer__recipients-header", children: /* @__PURE__ */ a("h4", { children: [
2501
+ /* @__PURE__ */ i("section", { className: "nice-invitation-designer__recipients", children: [
2502
+ /* @__PURE__ */ e("header", { className: "nice-invitation-designer__recipients-header", children: /* @__PURE__ */ i("h4", { children: [
2503
2503
  "Recipients ",
2504
- /* @__PURE__ */ a("span", { children: [
2504
+ /* @__PURE__ */ i("span", { children: [
2505
2505
  "(",
2506
2506
  m.length,
2507
2507
  ")"
2508
2508
  ] })
2509
2509
  ] }) }),
2510
- h && !f && /* @__PURE__ */ a(Ke, { children: [
2510
+ h && !f && /* @__PURE__ */ i(Ve, { children: [
2511
2511
  /* @__PURE__ */ e(
2512
- Ze,
2512
+ sn,
2513
2513
  {
2514
2514
  label: "Add addresses",
2515
2515
  value: _,
2516
2516
  onChange: $,
2517
2517
  placeholder: "Paste a list — commas, semicolons or new lines",
2518
2518
  rows: 3,
2519
- disabled: l,
2519
+ disabled: r,
2520
2520
  size: g
2521
2521
  }
2522
2522
  ),
2523
- /* @__PURE__ */ a("div", { className: "nice-invitation-designer__paste-actions", children: [
2524
- /* @__PURE__ */ a(
2525
- F,
2523
+ /* @__PURE__ */ i("div", { className: "nice-invitation-designer__paste-actions", children: [
2524
+ /* @__PURE__ */ i(
2525
+ V,
2526
2526
  {
2527
2527
  size: g,
2528
2528
  variant: "outline",
2529
- leftIcon: /* @__PURE__ */ e(In, { size: 15 }),
2530
- disabled: l || y.valid.length === 0,
2531
- onClick: V,
2529
+ leftIcon: /* @__PURE__ */ e(An, { size: 15 }),
2530
+ disabled: r || y.valid.length === 0,
2531
+ onClick: F,
2532
2532
  children: [
2533
2533
  "Add ",
2534
2534
  y.valid.length > 0 ? `(${y.valid.length})` : ""
2535
2535
  ]
2536
2536
  }
2537
2537
  ),
2538
- (y.invalid.length > 0 || y.duplicates > 0) && /* @__PURE__ */ a("span", { className: "nice-invitation-designer__paste-hint", children: [
2538
+ (y.invalid.length > 0 || y.duplicates > 0) && /* @__PURE__ */ i("span", { className: "nice-invitation-designer__paste-hint", children: [
2539
2539
  y.duplicates > 0 && `${y.duplicates} duplicate(s). `,
2540
2540
  y.invalid.length > 0 && `${y.invalid.length} not recognised: ${y.invalid.slice(0, 3).join(", ")}`
2541
2541
  ] })
2542
2542
  ] })
2543
2543
  ] }),
2544
- m.length > 0 && /* @__PURE__ */ e("ul", { className: "nice-invitation-designer__recipient-list", children: m.map((C) => /* @__PURE__ */ a("li", { className: "nice-invitation-designer__recipient", children: [
2545
- /* @__PURE__ */ e("span", { children: C.name ? `${C.name} <${C.email}>` : C.email }),
2546
- C.status && C.status !== "pending" && /* @__PURE__ */ e(
2544
+ m.length > 0 && /* @__PURE__ */ e("ul", { className: "nice-invitation-designer__recipient-list", children: m.map((I) => /* @__PURE__ */ i("li", { className: "nice-invitation-designer__recipient", children: [
2545
+ /* @__PURE__ */ e("span", { children: I.name ? `${I.name} <${I.email}>` : I.email }),
2546
+ I.status && I.status !== "pending" && /* @__PURE__ */ e(
2547
2547
  te,
2548
2548
  {
2549
2549
  size: "xs",
2550
2550
  subtle: !0,
2551
- variant: C.status === "sent" ? "success" : "error",
2552
- children: C.status
2551
+ variant: I.status === "sent" ? "success" : "error",
2552
+ children: I.status
2553
2553
  }
2554
2554
  ),
2555
2555
  h && !f && /* @__PURE__ */ e(
2556
- F,
2556
+ V,
2557
2557
  {
2558
2558
  size: "sm",
2559
2559
  variant: "ghost",
2560
- ariaLabel: `Remove ${C.email}`,
2561
- disabled: l,
2562
- onClick: () => B(C.email),
2563
- children: /* @__PURE__ */ e(Te, { size: 13 })
2560
+ ariaLabel: `Remove ${I.email}`,
2561
+ disabled: r,
2562
+ onClick: () => B(I.email),
2563
+ children: /* @__PURE__ */ e(De, { size: 13 })
2564
2564
  }
2565
2565
  )
2566
- ] }, C.email)) }),
2567
- i && !f && /* @__PURE__ */ e(
2568
- F,
2566
+ ] }, I.email)) }),
2567
+ a && !f && /* @__PURE__ */ e(
2568
+ V,
2569
2569
  {
2570
2570
  variant: "primary",
2571
2571
  size: g,
2572
- leftIcon: /* @__PURE__ */ e(pt, { size: 15 }),
2572
+ leftIcon: /* @__PURE__ */ e(yt, { size: 15 }),
2573
2573
  loading: u,
2574
2574
  ariaLabel: "Send invitations",
2575
2575
  disabled: b || u || m.length === 0,
2576
- onClick: () => i({ templateId: n.id, emails: D }),
2576
+ onClick: () => a({ templateId: n.id, emails: D }),
2577
2577
  children: u ? "Sending…" : `Send to ${m.length}`
2578
2578
  }
2579
2579
  )
@@ -2582,17 +2582,17 @@ const di = [
2582
2582
  }
2583
2583
  );
2584
2584
  }
2585
- ), ui = ({
2585
+ ), fi = ({
2586
2586
  value: s,
2587
2587
  max: t,
2588
- currency: r,
2588
+ currency: c,
2589
2589
  locale: n,
2590
- label: c,
2590
+ label: l,
2591
2591
  className: o
2592
2592
  }) => {
2593
- const d = t > 0 ? t : 1, m = s >= t && t > 0, h = (i, u) => r ? `${se(i, r, n)} / ${se(u, r, n)}` : `${i} / ${u}`;
2593
+ const d = t > 0 ? t : 1, m = s >= t && t > 0, h = (a, u) => c ? `${se(a, c, n)} / ${se(u, c, n)}` : `${a} / ${u}`;
2594
2594
  return /* @__PURE__ */ e(
2595
- $t,
2595
+ Dt,
2596
2596
  {
2597
2597
  className: o,
2598
2598
  value: Math.min(s, d),
@@ -2601,26 +2601,26 @@ const di = [
2601
2601
  size: "sm",
2602
2602
  showValue: !0,
2603
2603
  formatValue: () => h(s, t),
2604
- "aria-label": c
2604
+ "aria-label": l
2605
2605
  }
2606
2606
  );
2607
2607
  };
2608
- function mi(s, t) {
2608
+ function vi(s, t) {
2609
2609
  if (t === "wishlist")
2610
2610
  return { value: s.isPurchased ? 1 : 0, max: 1, complete: !!s.isPurchased };
2611
- const r = s.quantityNeeded ?? 1, n = s.quantityContributed ?? 0;
2612
- return { value: n, max: r, complete: r > 0 && n >= r };
2611
+ const c = s.quantityNeeded ?? 1, n = s.quantityContributed ?? 0;
2612
+ return { value: n, max: c, complete: c > 0 && n >= c };
2613
2613
  }
2614
- const Mi = ee(
2615
- function(t, r) {
2614
+ const Oi = ee(
2615
+ function(t, c) {
2616
2616
  const {
2617
2617
  items: n,
2618
- kind: c = "registry",
2618
+ kind: l = "registry",
2619
2619
  mode: o = "owner",
2620
2620
  currency: d = "PLN",
2621
2621
  locale: m,
2622
2622
  hideContributors: h = !1,
2623
- currentUserId: i,
2623
+ currentUserId: a,
2624
2624
  currentUserName: u,
2625
2625
  onContribute: p,
2626
2626
  onClaim: b,
@@ -2630,51 +2630,51 @@ const Mi = ee(
2630
2630
  onItemClick: k,
2631
2631
  layout: _ = "grid",
2632
2632
  disabled: $ = !1,
2633
- readOnly: l = !1,
2633
+ readOnly: r = !1,
2634
2634
  size: y = "md",
2635
2635
  className: v,
2636
2636
  style: A
2637
- } = t, I = En({ currentUserId: i, currentUserName: u }), [D, N] = E(null), [L, V] = E(0), [B, C] = E(""), O = o === "owner", z = $ || l, P = c === "wishlist", M = X(() => P ? [...n].sort(
2637
+ } = t, C = Un({ currentUserId: a, currentUserName: u }), [D, N] = E(null), [L, F] = E(0), [B, I] = E(""), R = o === "owner", z = $ || r, P = l === "wishlist", M = X(() => P ? [...n].sort(
2638
2638
  (S, Y) => Number(S.isPurchased ?? !1) - Number(Y.isPurchased ?? !1) || (Y.priority ?? 0) - (S.priority ?? 0)
2639
2639
  ) : n, [n, P]), j = () => {
2640
- N(null), V(0);
2640
+ N(null), F(0);
2641
2641
  }, W = (S) => {
2642
- !p || !I.canAct || (p(S.id, {
2642
+ !p || !C.canAct || (p(S.id, {
2643
2643
  amount: L > 0 ? L : void 0,
2644
2644
  quantity: L > 0 ? void 0 : 1,
2645
- userName: I.actor.userName,
2646
- userId: I.actor.userId
2645
+ userName: C.actor.userName,
2646
+ userId: C.actor.userId
2647
2647
  }), j());
2648
2648
  };
2649
- return n.length === 0 ? /* @__PURE__ */ e("div", { ref: r, className: `nice-gift-registry ${v ?? ""}`, style: A, children: /* @__PURE__ */ e(
2649
+ return n.length === 0 ? /* @__PURE__ */ e("div", { ref: c, className: `nice-gift-registry ${v ?? ""}`, style: A, children: /* @__PURE__ */ e(
2650
2650
  ye,
2651
2651
  {
2652
- icon: /* @__PURE__ */ e(gt, { size: 28 }),
2652
+ icon: /* @__PURE__ */ e(_t, { size: 28 }),
2653
2653
  title: P ? "Nothing on the wishlist yet" : "No gifts on the registry yet",
2654
- description: O ? "Add what you would like and share the link." : "The host has not added anything yet."
2654
+ description: R ? "Add what you would like and share the link." : "The host has not added anything yet."
2655
2655
  }
2656
- ) }) : /* @__PURE__ */ a(
2656
+ ) }) : /* @__PURE__ */ i(
2657
2657
  "div",
2658
2658
  {
2659
- ref: r,
2660
- className: `nice-gift-registry nice-gift-registry--${c} nice-gift-registry--${_} nice-gift-registry--${y} ${v ?? ""}`,
2659
+ ref: c,
2660
+ className: `nice-gift-registry nice-gift-registry--${l} nice-gift-registry--${_} nice-gift-registry--${y} ${v ?? ""}`,
2661
2661
  style: A,
2662
2662
  children: [
2663
- !O && I.isAnonymous && (p || b) && /* @__PURE__ */ e(
2663
+ !R && C.isAnonymous && (p || b) && /* @__PURE__ */ e(
2664
2664
  J,
2665
2665
  {
2666
2666
  label: "Your name",
2667
- value: I.name,
2668
- onChange: I.setName,
2667
+ value: C.name,
2668
+ onChange: C.setName,
2669
2669
  placeholder: "So the host knows who to thank",
2670
2670
  required: !0,
2671
2671
  disabled: z,
2672
2672
  size: y
2673
2673
  }
2674
2674
  ),
2675
- /* @__PURE__ */ e(Pn, { columns: _ === "list" ? 1 : void 0, minColumnWidth: 240, gap: 12, children: M.map((S) => {
2676
- const { value: Y, max: q, complete: Q } = mi(S, c), R = S.price, ne = S.contributions ?? [];
2677
- return /* @__PURE__ */ a(
2675
+ /* @__PURE__ */ e(Ln, { columns: _ === "list" ? 1 : void 0, minColumnWidth: 240, gap: 12, children: M.map((S) => {
2676
+ const { value: Y, max: q, complete: Q } = vi(S, l), O = S.price, ne = S.contributions ?? [];
2677
+ return /* @__PURE__ */ i(
2678
2678
  "div",
2679
2679
  {
2680
2680
  className: `nice-gift-registry__item${Q ? " nice-gift-registry__item--complete" : ""}`,
@@ -2688,7 +2688,7 @@ const Mi = ee(
2688
2688
  loading: "lazy"
2689
2689
  }
2690
2690
  ),
2691
- /* @__PURE__ */ a("div", { className: "nice-gift-registry__body", children: [
2691
+ /* @__PURE__ */ i("div", { className: "nice-gift-registry__body", children: [
2692
2692
  /* @__PURE__ */ e(
2693
2693
  "button",
2694
2694
  {
@@ -2700,15 +2700,15 @@ const Mi = ee(
2700
2700
  }
2701
2701
  ),
2702
2702
  S.description && /* @__PURE__ */ e("p", { className: "nice-gift-registry__description", children: S.description }),
2703
- /* @__PURE__ */ a("div", { className: "nice-gift-registry__facts", children: [
2704
- R && /* @__PURE__ */ e("span", { className: "nice-gift-registry__price", children: se(R.amount, R.currency || d, m) }),
2705
- P && (S.priority ?? 0) > 0 && /* @__PURE__ */ a(te, { size: "xs", subtle: !0, variant: "warning", children: [
2706
- /* @__PURE__ */ e(ft, { size: 11 }),
2703
+ /* @__PURE__ */ i("div", { className: "nice-gift-registry__facts", children: [
2704
+ O && /* @__PURE__ */ e("span", { className: "nice-gift-registry__price", children: se(O.amount, O.currency || d, m) }),
2705
+ P && (S.priority ?? 0) > 0 && /* @__PURE__ */ i(te, { size: "xs", subtle: !0, variant: "warning", children: [
2706
+ /* @__PURE__ */ e(Nt, { size: 11 }),
2707
2707
  " ",
2708
2708
  S.priority
2709
2709
  ] }),
2710
2710
  Q && /* @__PURE__ */ e(te, { size: "xs", subtle: !0, variant: "success", children: P ? "bought" : "fully covered" }),
2711
- S.url && /* @__PURE__ */ a(
2711
+ S.url && /* @__PURE__ */ i(
2712
2712
  "a",
2713
2713
  {
2714
2714
  className: "nice-gift-registry__link",
@@ -2716,44 +2716,44 @@ const Mi = ee(
2716
2716
  target: "_blank",
2717
2717
  rel: "noopener noreferrer",
2718
2718
  children: [
2719
- /* @__PURE__ */ e(vt, { size: 13 }),
2719
+ /* @__PURE__ */ e(bt, { size: 13 }),
2720
2720
  " Shop"
2721
2721
  ]
2722
2722
  }
2723
2723
  )
2724
2724
  ] }),
2725
2725
  !P && /* @__PURE__ */ e(
2726
- ui,
2726
+ fi,
2727
2727
  {
2728
2728
  value: Y,
2729
2729
  max: q,
2730
2730
  label: `${S.title}: ${Y} of ${q} covered`
2731
2731
  }
2732
2732
  ),
2733
- !h && ne.length > 0 && /* @__PURE__ */ e("ul", { className: "nice-gift-registry__contributors", children: ne.map((H) => /* @__PURE__ */ a("li", { className: "nice-gift-registry__contributor", children: [
2733
+ !h && ne.length > 0 && /* @__PURE__ */ e("ul", { className: "nice-gift-registry__contributors", children: ne.map((H) => /* @__PURE__ */ i("li", { className: "nice-gift-registry__contributor", children: [
2734
2734
  /* @__PURE__ */ e("strong", { children: H.contributorName }),
2735
- H.amount !== void 0 && ` — ${se(H.amount, (R == null ? void 0 : R.currency) || d, m)}`,
2735
+ H.amount !== void 0 && ` — ${se(H.amount, (O == null ? void 0 : O.currency) || d, m)}`,
2736
2736
  H.amount === void 0 && H.quantity ? ` — ${H.quantity}×` : "",
2737
- H.message && /* @__PURE__ */ a("em", { children: [
2737
+ H.message && /* @__PURE__ */ i("em", { children: [
2738
2738
  " “",
2739
2739
  H.message,
2740
2740
  "”"
2741
2741
  ] })
2742
2742
  ] }, H.id)) }),
2743
- /* @__PURE__ */ a("div", { className: "nice-gift-registry__actions", children: [
2744
- !O && !Q && b && /* @__PURE__ */ e(
2745
- F,
2743
+ /* @__PURE__ */ i("div", { className: "nice-gift-registry__actions", children: [
2744
+ !R && !Q && b && /* @__PURE__ */ e(
2745
+ V,
2746
2746
  {
2747
2747
  size: "sm",
2748
2748
  variant: "primary",
2749
- disabled: z || !I.canAct,
2750
- leftIcon: /* @__PURE__ */ e(He, { size: 14 }),
2751
- onClick: () => b(S.id, { ...I.actor, quantity: 1 }),
2749
+ disabled: z || !C.canAct,
2750
+ leftIcon: /* @__PURE__ */ e(qe, { size: 14 }),
2751
+ onClick: () => b(S.id, { ...C.actor, quantity: 1 }),
2752
2752
  children: "I'll take this"
2753
2753
  }
2754
2754
  ),
2755
- !O && Q && f && /* @__PURE__ */ e(
2756
- F,
2755
+ !R && Q && f && /* @__PURE__ */ e(
2756
+ V,
2757
2757
  {
2758
2758
  size: "sm",
2759
2759
  variant: "ghost",
@@ -2762,40 +2762,40 @@ const Mi = ee(
2762
2762
  children: "Release"
2763
2763
  }
2764
2764
  ),
2765
- !O && !Q && !P && p && /* @__PURE__ */ e(
2766
- F,
2765
+ !R && !Q && !P && p && /* @__PURE__ */ e(
2766
+ V,
2767
2767
  {
2768
2768
  size: "sm",
2769
2769
  variant: "outline",
2770
- disabled: z || !I.canAct,
2770
+ disabled: z || !C.canAct,
2771
2771
  onClick: () => N(D === S.id ? null : S.id),
2772
2772
  children: "Chip in"
2773
2773
  }
2774
2774
  ),
2775
- O && w && !l && /* @__PURE__ */ e(
2776
- F,
2775
+ R && w && !r && /* @__PURE__ */ e(
2776
+ V,
2777
2777
  {
2778
2778
  size: "sm",
2779
2779
  variant: "ghost",
2780
2780
  ariaLabel: `Delete ${S.title}`,
2781
2781
  disabled: $,
2782
2782
  onClick: () => w(S.id),
2783
- children: /* @__PURE__ */ e(Te, { size: 14 })
2783
+ children: /* @__PURE__ */ e(De, { size: 14 })
2784
2784
  }
2785
2785
  )
2786
2786
  ] }),
2787
- D === S.id && /* @__PURE__ */ a("div", { className: "nice-gift-registry__pledge", children: [
2788
- /* @__PURE__ */ a("label", { className: "nice-gift-registry__pledge-field", children: [
2789
- /* @__PURE__ */ a("span", { children: [
2787
+ D === S.id && /* @__PURE__ */ i("div", { className: "nice-gift-registry__pledge", children: [
2788
+ /* @__PURE__ */ i("label", { className: "nice-gift-registry__pledge-field", children: [
2789
+ /* @__PURE__ */ i("span", { children: [
2790
2790
  "Amount (",
2791
- (R == null ? void 0 : R.currency) || d,
2791
+ (O == null ? void 0 : O.currency) || d,
2792
2792
  ")"
2793
2793
  ] }),
2794
2794
  /* @__PURE__ */ e(
2795
- Je,
2795
+ rn,
2796
2796
  {
2797
2797
  value: L,
2798
- onChange: (H) => V(Math.max(0, H ?? 0)),
2798
+ onChange: (H) => F(Math.max(0, H ?? 0)),
2799
2799
  min: 0,
2800
2800
  size: "xs",
2801
2801
  disabled: z
@@ -2803,16 +2803,16 @@ const Mi = ee(
2803
2803
  )
2804
2804
  ] }),
2805
2805
  /* @__PURE__ */ e(
2806
- F,
2806
+ V,
2807
2807
  {
2808
2808
  size: "sm",
2809
2809
  variant: "primary",
2810
- disabled: z || !I.canAct,
2810
+ disabled: z || !C.canAct,
2811
2811
  onClick: () => W(S),
2812
2812
  children: "Confirm"
2813
2813
  }
2814
2814
  ),
2815
- /* @__PURE__ */ e(F, { size: "sm", variant: "ghost", onClick: j, children: "Cancel" })
2815
+ /* @__PURE__ */ e(V, { size: "sm", variant: "ghost", onClick: j, children: "Cancel" })
2816
2816
  ] })
2817
2817
  ] })
2818
2818
  ]
@@ -2820,27 +2820,27 @@ const Mi = ee(
2820
2820
  S.id
2821
2821
  );
2822
2822
  }) }),
2823
- O && g && !l && /* @__PURE__ */ a("div", { className: "nice-gift-registry__add", children: [
2823
+ R && g && !r && /* @__PURE__ */ i("div", { className: "nice-gift-registry__add", children: [
2824
2824
  /* @__PURE__ */ e(
2825
2825
  J,
2826
2826
  {
2827
2827
  label: P ? "Add a wish" : "Add a gift",
2828
2828
  value: B,
2829
- onChange: C,
2829
+ onChange: I,
2830
2830
  placeholder: "What would you like?",
2831
2831
  disabled: $,
2832
2832
  size: y
2833
2833
  }
2834
2834
  ),
2835
2835
  /* @__PURE__ */ e(
2836
- F,
2836
+ V,
2837
2837
  {
2838
2838
  variant: "primary",
2839
2839
  size: y,
2840
- leftIcon: /* @__PURE__ */ e(kn, { size: 15 }),
2840
+ leftIcon: /* @__PURE__ */ e(zn, { size: 15 }),
2841
2841
  disabled: $ || !B.trim(),
2842
2842
  onClick: () => {
2843
- g({ title: B.trim(), quantityNeeded: 1 }), C("");
2843
+ g({ title: B.trim(), quantityNeeded: 1 }), I("");
2844
2844
  },
2845
2845
  children: "Add"
2846
2846
  }
@@ -2851,46 +2851,46 @@ const Mi = ee(
2851
2851
  );
2852
2852
  }
2853
2853
  );
2854
- function hi(s) {
2854
+ function yi(s) {
2855
2855
  const t = /* @__PURE__ */ new Map();
2856
- for (const r of s) {
2857
- const n = (r.currency || "").toUpperCase(), c = t.get(n);
2858
- c ? c.push(r) : t.set(n, [r]);
2856
+ for (const c of s) {
2857
+ const n = (c.currency || "").toUpperCase(), l = t.get(n);
2858
+ l ? l.push(c) : t.set(n, [c]);
2859
2859
  }
2860
2860
  return t;
2861
2861
  }
2862
- function pi(s, t, r) {
2862
+ function _i(s, t, c) {
2863
2863
  var h;
2864
- const n = new Set(t.map((i) => i.id)), c = t.map((i) => i.id), o = new Map(c.map((i) => [i, 0])), d = [];
2864
+ const n = new Set(t.map((a) => a.id)), l = t.map((a) => a.id), o = new Map(l.map((a) => [a, 0])), d = [];
2865
2865
  let m = 0;
2866
- if (c.length === 0)
2866
+ if (l.length === 0)
2867
2867
  return {
2868
2868
  balances: o,
2869
- issues: s.map((i) => ({ itemId: i.id, reason: "no-participants" })),
2869
+ issues: s.map((a) => ({ itemId: a.id, reason: "no-participants" })),
2870
2870
  totalMinor: 0
2871
2871
  };
2872
- for (const i of s) {
2873
- const u = i.paidById;
2872
+ for (const a of s) {
2873
+ const u = a.paidById;
2874
2874
  if (!u) {
2875
- d.push({ itemId: i.id, reason: "no-payer" });
2875
+ d.push({ itemId: a.id, reason: "no-payer" });
2876
2876
  continue;
2877
2877
  }
2878
2878
  if (!n.has(u)) {
2879
- d.push({ itemId: i.id, reason: "unknown-payer" });
2879
+ d.push({ itemId: a.id, reason: "unknown-payer" });
2880
2880
  continue;
2881
2881
  }
2882
- let p = (h = i.splitAmong) != null && h.length ? i.splitAmong.filter((_) => n.has(_)) : c;
2883
- p.length === 0 && (p = c);
2884
- const b = nn(i.amount, r);
2882
+ let p = (h = a.splitAmong) != null && h.length ? a.splitAmong.filter((_) => n.has(_)) : l;
2883
+ p.length === 0 && (p = l);
2884
+ const b = ln(a.amount, c);
2885
2885
  m += b;
2886
2886
  const f = p.length, g = Math.floor(b / f), w = b - g * f, k = new Map(p.map((_) => [_, g]));
2887
2887
  if (w !== 0)
2888
2888
  if (k.has(u))
2889
2889
  k.set(u, (k.get(u) ?? 0) + w);
2890
2890
  else {
2891
- const _ = [...p].sort(Xe), $ = w > 0 ? 1 : -1;
2892
- for (let l = 0; l < Math.abs(w); l += 1) {
2893
- const y = _[l % _.length];
2891
+ const _ = [...p].sort(Fe), $ = w > 0 ? 1 : -1;
2892
+ for (let r = 0; r < Math.abs(w); r += 1) {
2893
+ const y = _[r % _.length];
2894
2894
  k.set(y, (k.get(y) ?? 0) + $);
2895
2895
  }
2896
2896
  }
@@ -2900,61 +2900,61 @@ function pi(s, t, r) {
2900
2900
  }
2901
2901
  return { balances: o, issues: d, totalMinor: m };
2902
2902
  }
2903
- function gi(s, t, r) {
2903
+ function Ni(s, t, c) {
2904
2904
  for (const n of t) {
2905
- if ((n.currency || "").toUpperCase() !== r || !s.has(n.fromId) || !s.has(n.toId))
2905
+ if ((n.currency || "").toUpperCase() !== c || !s.has(n.fromId) || !s.has(n.toId))
2906
2906
  continue;
2907
- const c = nn(n.amount, r);
2908
- s.set(n.fromId, (s.get(n.fromId) ?? 0) + c), s.set(n.toId, (s.get(n.toId) ?? 0) - c);
2907
+ const l = ln(n.amount, c);
2908
+ s.set(n.fromId, (s.get(n.fromId) ?? 0) + l), s.set(n.toId, (s.get(n.toId) ?? 0) - l);
2909
2909
  }
2910
2910
  }
2911
- function fi(s, t, r) {
2912
- const n = new Map(t.map((i) => [i.id, i.name])), c = [...s.entries()].filter(([, i]) => i > 0).map(([i, u]) => ({ id: i, v: u })).sort((i, u) => u.v - i.v || Xe(i.id, u.id)), o = [...s.entries()].filter(([, i]) => i < 0).map(([i, u]) => ({ id: i, v: u })).sort((i, u) => i.v - u.v || Xe(i.id, u.id)), d = [];
2911
+ function bi(s, t, c) {
2912
+ const n = new Map(t.map((a) => [a.id, a.name])), l = [...s.entries()].filter(([, a]) => a > 0).map(([a, u]) => ({ id: a, v: u })).sort((a, u) => u.v - a.v || Fe(a.id, u.id)), o = [...s.entries()].filter(([, a]) => a < 0).map(([a, u]) => ({ id: a, v: u })).sort((a, u) => a.v - u.v || Fe(a.id, u.id)), d = [];
2913
2913
  let m = 0, h = 0;
2914
- for (; m < o.length && h < c.length; ) {
2915
- const i = Math.min(-o[m].v, c[h].v);
2916
- i > 0 && d.push({
2914
+ for (; m < o.length && h < l.length; ) {
2915
+ const a = Math.min(-o[m].v, l[h].v);
2916
+ a > 0 && d.push({
2917
2917
  fromId: o[m].id,
2918
2918
  fromName: n.get(o[m].id) ?? o[m].id,
2919
- toId: c[h].id,
2920
- toName: n.get(c[h].id) ?? c[h].id,
2921
- amount: Ye(i, r),
2922
- currency: r
2923
- }), o[m].v += i, c[h].v -= i, o[m].v === 0 && (m += 1), c[h].v === 0 && (h += 1);
2919
+ toId: l[h].id,
2920
+ toName: n.get(l[h].id) ?? l[h].id,
2921
+ amount: Xe(a, c),
2922
+ currency: c
2923
+ }), o[m].v += a, l[h].v -= a, o[m].v === 0 && (m += 1), l[h].v === 0 && (h += 1);
2924
2924
  }
2925
2925
  return d;
2926
2926
  }
2927
- function vi(s, t, r = []) {
2928
- const n = [], c = [], o = [...hi(s).entries()].sort(([d], [m]) => Xe(d, m));
2927
+ function wi(s, t, c = []) {
2928
+ const n = [], l = [], o = [...yi(s).entries()].sort(([d], [m]) => Fe(d, m));
2929
2929
  for (const [d, m] of o) {
2930
- const h = pi(m, t, d);
2931
- c.push(...h.issues), gi(h.balances, r, d), n.push({
2930
+ const h = _i(m, t, d);
2931
+ l.push(...h.issues), Ni(h.balances, c, d), n.push({
2932
2932
  currency: d,
2933
- total: Ye(h.totalMinor, d),
2934
- balances: t.map((i) => ({
2935
- participantId: i.id,
2936
- participantName: i.name,
2937
- amount: Ye(h.balances.get(i.id) ?? 0, d),
2933
+ total: Xe(h.totalMinor, d),
2934
+ balances: t.map((a) => ({
2935
+ participantId: a.id,
2936
+ participantName: a.name,
2937
+ amount: Xe(h.balances.get(a.id) ?? 0, d),
2938
2938
  currency: d
2939
2939
  })),
2940
- transfers: fi(h.balances, t, d)
2940
+ transfers: bi(h.balances, t, d)
2941
2941
  });
2942
2942
  }
2943
- return { groups: n, issues: c };
2943
+ return { groups: n, issues: l };
2944
2944
  }
2945
- function Xe(s, t) {
2945
+ function Fe(s, t) {
2946
2946
  return s < t ? -1 : s > t ? 1 : 0;
2947
2947
  }
2948
- const Di = ee(
2949
- function(t, r) {
2948
+ const Ui = ee(
2949
+ function(t, c) {
2950
2950
  const {
2951
2951
  items: n,
2952
- participants: c,
2952
+ participants: l,
2953
2953
  settlements: o = [],
2954
2954
  view: d,
2955
2955
  defaultView: m = "expenses",
2956
2956
  onViewChange: h,
2957
- onSettle: i,
2957
+ onSettle: a,
2958
2958
  onItemDelete: u,
2959
2959
  onItemClick: p,
2960
2960
  onValidationChange: b,
@@ -2964,48 +2964,48 @@ const Di = ee(
2964
2964
  readOnly: k = !1,
2965
2965
  size: _ = "md",
2966
2966
  className: $,
2967
- style: l
2968
- } = t, [y, v] = E(m), A = d ?? y, I = w || k, D = X(
2969
- () => c.map((z) => ({ id: z.id, name: z.name })),
2970
- [c]
2971
- ), N = X(() => vi(n, D, o), [n, D, o]), L = X(() => f === "none" ? n : n.map((z, P) => ({ item: z, index: P })).sort((z, P) => {
2967
+ style: r
2968
+ } = t, [y, v] = E(m), A = d ?? y, C = w || k, D = X(
2969
+ () => l.map((z) => ({ id: z.id, name: z.name })),
2970
+ [l]
2971
+ ), N = X(() => wi(n, D, o), [n, D, o]), L = X(() => f === "none" ? n : n.map((z, P) => ({ item: z, index: P })).sort((z, P) => {
2972
2972
  if (f === "amount")
2973
2973
  return P.item.amount - z.item.amount || z.index - P.index;
2974
2974
  const M = z.item.incurredAt, j = P.item.incurredAt;
2975
2975
  return M && j ? M.localeCompare(j) || z.index - P.index : M ? -1 : j ? 1 : z.index - P.index;
2976
- }).map((z) => z.item), [n, f]), V = N.issues.map((z) => `${z.itemId}:${z.reason}`).join("|");
2977
- Ue.useEffect(() => {
2976
+ }).map((z) => z.item), [n, f]), F = N.issues.map((z) => `${z.itemId}:${z.reason}`).join("|");
2977
+ Me.useEffect(() => {
2978
2978
  b == null || b(N.issues);
2979
- }, [V]);
2979
+ }, [F]);
2980
2980
  const B = X(
2981
- () => new Map(c.map((z) => [z.id, z.avatarUrl])),
2982
- [c]
2983
- ), C = X(
2981
+ () => new Map(l.map((z) => [z.id, z.avatarUrl])),
2982
+ [l]
2983
+ ), I = X(
2984
2984
  () => new Map(N.issues.map((z) => [z.itemId, z.reason])),
2985
2985
  [N.issues]
2986
- ), O = (z) => {
2986
+ ), R = (z) => {
2987
2987
  d === void 0 && v(z), h == null || h(z);
2988
2988
  };
2989
- return n.length === 0 ? /* @__PURE__ */ e("div", { ref: r, className: `nice-expense-split ${$ ?? ""}`, style: l, children: /* @__PURE__ */ e(
2989
+ return n.length === 0 ? /* @__PURE__ */ e("div", { ref: c, className: `nice-expense-split ${$ ?? ""}`, style: r, children: /* @__PURE__ */ e(
2990
2990
  ye,
2991
2991
  {
2992
- icon: /* @__PURE__ */ e(yt, { size: 28 }),
2992
+ icon: /* @__PURE__ */ e(wt, { size: 28 }),
2993
2993
  title: "No expenses yet",
2994
2994
  description: "Add what people paid for and this will work out who owes whom."
2995
2995
  }
2996
- ) }) : /* @__PURE__ */ a(
2996
+ ) }) : /* @__PURE__ */ i(
2997
2997
  "div",
2998
2998
  {
2999
- ref: r,
2999
+ ref: c,
3000
3000
  className: `nice-expense-split nice-expense-split--${_} ${$ ?? ""}`,
3001
- style: l,
3001
+ style: r,
3002
3002
  children: [
3003
3003
  /* @__PURE__ */ e(
3004
- Tn,
3004
+ Bn,
3005
3005
  {
3006
3006
  size: _,
3007
3007
  value: A,
3008
- onChange: (z) => O(z),
3008
+ onChange: (z) => R(z),
3009
3009
  options: [
3010
3010
  { value: "expenses", label: "Expenses" },
3011
3011
  { value: "balances", label: "Balances" },
@@ -3014,13 +3014,13 @@ const Di = ee(
3014
3014
  }
3015
3015
  ),
3016
3016
  A === "expenses" && /* @__PURE__ */ e("ul", { className: "nice-expense-split__items", children: L.map((z) => {
3017
- const P = C.get(z.id);
3018
- return /* @__PURE__ */ a(
3017
+ const P = I.get(z.id);
3018
+ return /* @__PURE__ */ i(
3019
3019
  "li",
3020
3020
  {
3021
3021
  className: `nice-expense-split__item${P ? " nice-expense-split__item--excluded" : ""}`,
3022
3022
  children: [
3023
- /* @__PURE__ */ a(
3023
+ /* @__PURE__ */ i(
3024
3024
  "button",
3025
3025
  {
3026
3026
  type: "button",
@@ -3029,7 +3029,7 @@ const Di = ee(
3029
3029
  disabled: !p,
3030
3030
  children: [
3031
3031
  /* @__PURE__ */ e("span", { className: "nice-expense-split__item-label", children: z.label }),
3032
- /* @__PURE__ */ a("span", { className: "nice-expense-split__item-payer", children: [
3032
+ /* @__PURE__ */ i("span", { className: "nice-expense-split__item-payer", children: [
3033
3033
  z.paidByName ?? z.paidById ?? "nobody",
3034
3034
  " paid"
3035
3035
  ] })
@@ -3040,14 +3040,14 @@ const Di = ee(
3040
3040
  z.isPaid && /* @__PURE__ */ e(te, { size: "xs", subtle: !0, variant: "success", children: "paid" }),
3041
3041
  P && /* @__PURE__ */ e(te, { size: "xs", subtle: !0, variant: "warning", children: P === "no-payer" ? "no payer" : "unknown payer" }),
3042
3042
  u && !k && /* @__PURE__ */ e(
3043
- F,
3043
+ V,
3044
3044
  {
3045
3045
  size: "sm",
3046
3046
  variant: "ghost",
3047
3047
  ariaLabel: `Delete ${z.label}`,
3048
3048
  disabled: w,
3049
3049
  onClick: () => u(z.id),
3050
- children: /* @__PURE__ */ e(Te, { size: 14 })
3050
+ children: /* @__PURE__ */ e(De, { size: 14 })
3051
3051
  }
3052
3052
  )
3053
3053
  ]
@@ -3055,16 +3055,16 @@ const Di = ee(
3055
3055
  z.id
3056
3056
  );
3057
3057
  }) }),
3058
- A === "balances" && N.groups.map((z) => /* @__PURE__ */ a("section", { className: "nice-expense-split__group", children: [
3059
- /* @__PURE__ */ a("h4", { className: "nice-expense-split__group-title", children: [
3058
+ A === "balances" && N.groups.map((z) => /* @__PURE__ */ i("section", { className: "nice-expense-split__group", children: [
3059
+ /* @__PURE__ */ i("h4", { className: "nice-expense-split__group-title", children: [
3060
3060
  z.currency,
3061
- /* @__PURE__ */ a("span", { className: "nice-expense-split__group-total", children: [
3061
+ /* @__PURE__ */ i("span", { className: "nice-expense-split__group-total", children: [
3062
3062
  se(z.total, z.currency, g),
3063
3063
  " total"
3064
3064
  ] })
3065
3065
  ] }),
3066
3066
  /* @__PURE__ */ e("ul", { className: "nice-participant-list__rows", children: z.balances.map((P) => /* @__PURE__ */ e(
3067
- je,
3067
+ Ze,
3068
3068
  {
3069
3069
  participant: {
3070
3070
  id: P.participantId,
@@ -3074,7 +3074,7 @@ const Di = ee(
3074
3074
  showRole: !1,
3075
3075
  showStatus: !1,
3076
3076
  size: _,
3077
- children: /* @__PURE__ */ a(
3077
+ children: /* @__PURE__ */ i(
3078
3078
  "span",
3079
3079
  {
3080
3080
  className: `nice-expense-split__balance nice-expense-split__balance--${P.amount > 0 ? "owed" : P.amount < 0 ? "owes" : "settled"}`,
@@ -3092,35 +3092,35 @@ const Di = ee(
3092
3092
  A === "settlement" && (N.groups.every((z) => z.transfers.length === 0) ? /* @__PURE__ */ e(
3093
3093
  ye,
3094
3094
  {
3095
- icon: /* @__PURE__ */ e(_t, { size: 28 }),
3095
+ icon: /* @__PURE__ */ e(xt, { size: 28 }),
3096
3096
  title: "All settled up",
3097
3097
  description: "Nobody owes anybody anything."
3098
3098
  }
3099
- ) : N.groups.filter((z) => z.transfers.length > 0).map((z) => /* @__PURE__ */ a("section", { className: "nice-expense-split__group", children: [
3100
- /* @__PURE__ */ a("h4", { className: "nice-expense-split__group-title", children: [
3099
+ ) : N.groups.filter((z) => z.transfers.length > 0).map((z) => /* @__PURE__ */ i("section", { className: "nice-expense-split__group", children: [
3100
+ /* @__PURE__ */ i("h4", { className: "nice-expense-split__group-title", children: [
3101
3101
  z.currency,
3102
- /* @__PURE__ */ a("span", { className: "nice-expense-split__group-total", children: [
3102
+ /* @__PURE__ */ i("span", { className: "nice-expense-split__group-total", children: [
3103
3103
  z.transfers.length,
3104
3104
  " transfer",
3105
3105
  z.transfers.length === 1 ? "" : "s"
3106
3106
  ] })
3107
3107
  ] }),
3108
- /* @__PURE__ */ e("ul", { className: "nice-expense-split__transfers", children: z.transfers.map((P) => /* @__PURE__ */ a(
3108
+ /* @__PURE__ */ e("ul", { className: "nice-expense-split__transfers", children: z.transfers.map((P) => /* @__PURE__ */ i(
3109
3109
  "li",
3110
3110
  {
3111
3111
  className: "nice-expense-split__transfer",
3112
3112
  children: [
3113
3113
  /* @__PURE__ */ e("span", { className: "nice-expense-split__transfer-from", children: P.fromName }),
3114
- /* @__PURE__ */ e(Nt, { size: 15 }),
3114
+ /* @__PURE__ */ e(kt, { size: 15 }),
3115
3115
  /* @__PURE__ */ e("span", { className: "nice-expense-split__transfer-to", children: P.toName }),
3116
3116
  /* @__PURE__ */ e("span", { className: "nice-expense-split__transfer-amount", children: se(P.amount, P.currency, g) }),
3117
- i && !k && /* @__PURE__ */ e(
3118
- F,
3117
+ a && !k && /* @__PURE__ */ e(
3118
+ V,
3119
3119
  {
3120
3120
  size: "sm",
3121
3121
  variant: "outline",
3122
- disabled: I,
3123
- onClick: () => i(P),
3122
+ disabled: C,
3123
+ onClick: () => a(P),
3124
3124
  children: "Mark paid"
3125
3125
  }
3126
3126
  )
@@ -3133,45 +3133,45 @@ const Di = ee(
3133
3133
  }
3134
3134
  );
3135
3135
  }
3136
- ), yi = {
3137
- upcoming: "⏳",
3138
- active: "▶️",
3139
- voting: "🗳️",
3140
- scored: "📊",
3141
- completed: "✅",
3142
- skipped: "⏭️"
3143
- }, _i = {
3136
+ ), xi = {
3137
+ upcoming: Tn,
3138
+ active: We,
3139
+ voting: tn,
3140
+ scored: Ct,
3141
+ completed: qe,
3142
+ skipped: nn
3143
+ }, ki = {
3144
3144
  upcoming: "#9ca3af",
3145
3145
  active: "#22c55e",
3146
3146
  voting: "#eab308",
3147
3147
  scored: "#3b82f6",
3148
3148
  completed: "#6b7280",
3149
3149
  skipped: "#d1d5db"
3150
- }, Ei = ee(
3151
- function(t, r) {
3150
+ }, Yi = ee(
3151
+ function(t, c) {
3152
3152
  const {
3153
3153
  rounds: n,
3154
- activeRoundId: c,
3154
+ activeRoundId: l,
3155
3155
  onSelect: o,
3156
3156
  onStart: d,
3157
3157
  onEnd: m,
3158
3158
  onCreate: h,
3159
- editable: i = !1,
3159
+ editable: a = !1,
3160
3160
  className: u,
3161
3161
  style: p
3162
3162
  } = t, b = [...n].sort((f, g) => f.order - g.order);
3163
- return /* @__PURE__ */ a("div", { ref: r, className: `nice-round-list ${u ?? ""}`, style: p, children: [
3164
- /* @__PURE__ */ a("div", { className: "nice-round-list__header", children: [
3165
- /* @__PURE__ */ a("h3", { children: [
3163
+ return /* @__PURE__ */ i("div", { ref: c, className: `nice-round-list ${u ?? ""}`, style: p, children: [
3164
+ /* @__PURE__ */ i("div", { className: "nice-round-list__header", children: [
3165
+ /* @__PURE__ */ i("h3", { children: [
3166
3166
  "Rounds (",
3167
3167
  n.length,
3168
3168
  ")"
3169
3169
  ] }),
3170
- i && h && /* @__PURE__ */ e("button", { onClick: h, children: "+ Add Round" })
3170
+ a && h && /* @__PURE__ */ e("button", { onClick: h, children: "+ Add Round" })
3171
3171
  ] }),
3172
3172
  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((f) => {
3173
- const g = f.id === c;
3174
- return /* @__PURE__ */ a(
3173
+ const g = f.id === l;
3174
+ return /* @__PURE__ */ i(
3175
3175
  "div",
3176
3176
  {
3177
3177
  className: `nice-round-list__item ${g ? "nice-round-list__item--active" : ""}`,
@@ -3179,12 +3179,12 @@ const Di = ee(
3179
3179
  role: o ? "button" : void 0,
3180
3180
  tabIndex: o ? 0 : void 0,
3181
3181
  children: [
3182
- /* @__PURE__ */ a("span", { className: "nice-round-list__order", children: [
3182
+ /* @__PURE__ */ i("span", { className: "nice-round-list__order", children: [
3183
3183
  "#",
3184
3184
  f.order
3185
3185
  ] }),
3186
- /* @__PURE__ */ e("span", { className: "nice-round-list__icon", children: yi[f.status] }),
3187
- /* @__PURE__ */ a("div", { className: "nice-round-list__info", children: [
3186
+ /* @__PURE__ */ e("span", { className: "nice-round-list__icon", title: f.status, children: Me.createElement(xi[f.status], { size: 16 }) }),
3187
+ /* @__PURE__ */ i("div", { className: "nice-round-list__info", children: [
3188
3188
  /* @__PURE__ */ e("strong", { className: "nice-round-list__name", children: f.name }),
3189
3189
  f.description && /* @__PURE__ */ e("small", { children: f.description }),
3190
3190
  f.type && /* @__PURE__ */ e("span", { className: "nice-round-list__type", children: f.type })
@@ -3193,19 +3193,20 @@ const Di = ee(
3193
3193
  "span",
3194
3194
  {
3195
3195
  className: "nice-round-list__status",
3196
- style: { color: _i[f.status] },
3196
+ style: { color: ki[f.status] },
3197
3197
  children: f.status
3198
3198
  }
3199
3199
  ),
3200
- f.durationMinutes && /* @__PURE__ */ a("span", { className: "nice-round-list__duration", children: [
3200
+ f.durationMinutes && /* @__PURE__ */ i("span", { className: "nice-round-list__duration", children: [
3201
3201
  f.durationMinutes,
3202
3202
  "m"
3203
3203
  ] }),
3204
- f.winnerIds && f.winnerIds.length > 0 && /* @__PURE__ */ a("span", { className: "nice-round-list__winners", children: [
3205
- "🏆 ",
3204
+ f.winnerIds && f.winnerIds.length > 0 && /* @__PURE__ */ i("span", { className: "nice-round-list__winners", children: [
3205
+ /* @__PURE__ */ e(an, { size: 14 }),
3206
+ " ",
3206
3207
  f.winnerIds.length
3207
3208
  ] }),
3208
- i && /* @__PURE__ */ a("div", { className: "nice-round-list__actions", onClick: (w) => w.stopPropagation(), children: [
3209
+ a && /* @__PURE__ */ i("div", { className: "nice-round-list__actions", onClick: (w) => w.stopPropagation(), children: [
3209
3210
  f.status === "upcoming" && d && /* @__PURE__ */ e("button", { onClick: () => d(f.id), children: "Start" }),
3210
3211
  (f.status === "active" || f.status === "voting") && m && /* @__PURE__ */ e("button", { onClick: () => m(f.id), children: "End" })
3211
3212
  ] })
@@ -3216,39 +3217,43 @@ const Di = ee(
3216
3217
  }) })
3217
3218
  ] });
3218
3219
  }
3219
- ), Li = ee(
3220
- function(t, r) {
3220
+ ), Ci = [
3221
+ "var(--nice-lb-gold, #facc15)",
3222
+ "var(--nice-lb-silver, #cbd5e1)",
3223
+ "var(--nice-lb-bronze, #d97706)"
3224
+ ], Xi = ee(
3225
+ function(t, c) {
3221
3226
  const {
3222
3227
  round: n,
3223
- timerRunning: c = !1,
3228
+ timerRunning: l = !1,
3224
3229
  remainingSeconds: o,
3225
3230
  onSubmitScore: d,
3226
3231
  onStart: m,
3227
3232
  onEnd: h,
3228
- onSkip: i,
3233
+ onSkip: a,
3229
3234
  editable: u = !1,
3230
3235
  footerActions: p,
3231
3236
  className: b,
3232
3237
  style: f
3233
3238
  } = t, [g, w] = E({}), k = G(
3234
- (l) => {
3235
- const y = parseFloat(g[l] ?? "");
3236
- isNaN(y) || !d || (d(l, y), w((v) => ({ ...v, [l]: "" })));
3239
+ (r) => {
3240
+ const y = parseFloat(g[r] ?? "");
3241
+ isNaN(y) || !d || (d(r, y), w((v) => ({ ...v, [r]: "" })));
3237
3242
  },
3238
3243
  [g, d]
3239
- ), _ = (l) => {
3240
- const y = Math.floor(l / 60), v = l % 60;
3244
+ ), _ = (r) => {
3245
+ const y = Math.floor(r / 60), v = r % 60;
3241
3246
  return `${y}:${v.toString().padStart(2, "0")}`;
3242
- }, $ = n.scores ? [...n.scores].sort((l, y) => y.score - l.score) : [];
3243
- return /* @__PURE__ */ a(
3247
+ }, $ = n.scores ? [...n.scores].sort((r, y) => y.score - r.score) : [];
3248
+ return /* @__PURE__ */ i(
3244
3249
  "div",
3245
3250
  {
3246
- ref: r,
3251
+ ref: c,
3247
3252
  className: `nice-round-card nice-round-card--${n.status} ${b ?? ""}`,
3248
3253
  style: f,
3249
3254
  children: [
3250
- /* @__PURE__ */ a("div", { className: "nice-round-card__header", children: [
3251
- /* @__PURE__ */ a("span", { className: "nice-round-card__order", children: [
3255
+ /* @__PURE__ */ i("div", { className: "nice-round-card__header", children: [
3256
+ /* @__PURE__ */ i("span", { className: "nice-round-card__order", children: [
3252
3257
  "Round #",
3253
3258
  n.order
3254
3259
  ] }),
@@ -3256,105 +3261,129 @@ const Di = ee(
3256
3261
  /* @__PURE__ */ e("span", { className: "nice-round-card__status", children: n.status })
3257
3262
  ] }),
3258
3263
  n.description && /* @__PURE__ */ e("p", { className: "nice-round-card__description", children: n.description }),
3259
- (c || o != null) && /* @__PURE__ */ a(
3264
+ (l || o != null) && /* @__PURE__ */ i(
3260
3265
  "div",
3261
3266
  {
3262
- className: `nice-round-card__timer ${c ? "nice-round-card__timer--running" : ""}`,
3267
+ className: `nice-round-card__timer ${l ? "nice-round-card__timer--running" : ""}`,
3263
3268
  children: [
3264
- "⏱️ ",
3269
+ /* @__PURE__ */ e(Tn, { size: 14 }),
3270
+ " ",
3265
3271
  o != null ? _(o) : "—"
3266
3272
  ]
3267
3273
  }
3268
3274
  ),
3269
- $.length > 0 && /* @__PURE__ */ a("div", { className: "nice-round-card__scoreboard", children: [
3275
+ $.length > 0 && /* @__PURE__ */ i("div", { className: "nice-round-card__scoreboard", children: [
3270
3276
  /* @__PURE__ */ e("h4", { children: "Scoreboard" }),
3271
- /* @__PURE__ */ a("table", { className: "nice-round-card__scores-table", children: [
3272
- /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ a("tr", { children: [
3277
+ /* @__PURE__ */ i("table", { className: "nice-round-card__scores-table", children: [
3278
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ i("tr", { children: [
3273
3279
  /* @__PURE__ */ e("th", { children: "Rank" }),
3274
3280
  /* @__PURE__ */ e("th", { children: "Participant" }),
3275
3281
  /* @__PURE__ */ e("th", { children: "Score" })
3276
3282
  ] }) }),
3277
- /* @__PURE__ */ e("tbody", { children: $.map((l, y) => /* @__PURE__ */ a(
3283
+ /* @__PURE__ */ e("tbody", { children: $.map((r, y) => /* @__PURE__ */ i(
3278
3284
  "tr",
3279
3285
  {
3280
3286
  className: y < 3 ? `nice-round-card__top-${y + 1}` : "",
3281
3287
  children: [
3282
- /* @__PURE__ */ a("td", { children: [
3283
- l.rank ?? y + 1,
3284
- y === 0 ? " 🥇" : y === 1 ? " 🥈" : y === 2 ? " 🥉" : ""
3288
+ /* @__PURE__ */ i("td", { children: [
3289
+ r.rank ?? y + 1,
3290
+ y < 3 && /* @__PURE__ */ i(Ve, { children: [
3291
+ " ",
3292
+ /* @__PURE__ */ e(
3293
+ He,
3294
+ {
3295
+ size: 14,
3296
+ primaryColor: Ci[y],
3297
+ "aria-label": `Place ${y + 1}`
3298
+ }
3299
+ )
3300
+ ] })
3285
3301
  ] }),
3286
- /* @__PURE__ */ e("td", { children: l.participantName }),
3287
- /* @__PURE__ */ e("td", { children: l.score })
3302
+ /* @__PURE__ */ e("td", { children: r.participantName }),
3303
+ /* @__PURE__ */ e("td", { children: r.score })
3288
3304
  ]
3289
3305
  },
3290
- l.participantId
3306
+ r.participantId
3291
3307
  )) })
3292
3308
  ] })
3293
3309
  ] }),
3294
- d && (n.status === "active" || n.status === "voting") && $.length > 0 && /* @__PURE__ */ a("div", { className: "nice-round-card__score-input", children: [
3310
+ d && (n.status === "active" || n.status === "voting") && $.length > 0 && /* @__PURE__ */ i("div", { className: "nice-round-card__score-input", children: [
3295
3311
  /* @__PURE__ */ e("h4", { children: "Submit Scores" }),
3296
- $.map((l) => /* @__PURE__ */ a("div", { className: "nice-round-card__score-row", children: [
3297
- /* @__PURE__ */ e("span", { children: l.participantName }),
3312
+ $.map((r) => /* @__PURE__ */ i("div", { className: "nice-round-card__score-row", children: [
3313
+ /* @__PURE__ */ e("span", { children: r.participantName }),
3298
3314
  /* @__PURE__ */ e(
3299
3315
  "input",
3300
3316
  {
3301
3317
  type: "number",
3302
- value: g[l.participantId] ?? "",
3303
- onChange: (y) => w((v) => ({ ...v, [l.participantId]: y.target.value })),
3318
+ value: g[r.participantId] ?? "",
3319
+ onChange: (y) => w((v) => ({ ...v, [r.participantId]: y.target.value })),
3304
3320
  min: 0,
3305
3321
  step: 1,
3306
3322
  placeholder: "Score"
3307
3323
  }
3308
3324
  ),
3309
- /* @__PURE__ */ e("button", { onClick: () => k(l.participantId), children: "Submit" })
3310
- ] }, l.participantId))
3325
+ /* @__PURE__ */ e("button", { onClick: () => k(r.participantId), children: "Submit" })
3326
+ ] }, r.participantId))
3311
3327
  ] }),
3312
- /* @__PURE__ */ a("div", { className: "nice-round-card__footer", children: [
3313
- u && /* @__PURE__ */ a("div", { className: "nice-round-card__actions", children: [
3314
- n.status === "upcoming" && m && /* @__PURE__ */ e("button", { onClick: m, children: "▶ Start Round" }),
3315
- (n.status === "active" || n.status === "voting") && h && /* @__PURE__ */ e("button", { onClick: h, children: "⏹ End Round" }),
3316
- n.status === "upcoming" && i && /* @__PURE__ */ e("button", { onClick: i, children: "⏭ Skip" })
3328
+ /* @__PURE__ */ i("div", { className: "nice-round-card__footer", children: [
3329
+ u && /* @__PURE__ */ i("div", { className: "nice-round-card__actions", children: [
3330
+ n.status === "upcoming" && m && /* @__PURE__ */ i("button", { onClick: m, children: [
3331
+ /* @__PURE__ */ e(We, { size: 14 }),
3332
+ " Start Round"
3333
+ ] }),
3334
+ (n.status === "active" || n.status === "voting") && h && /* @__PURE__ */ i("button", { onClick: h, children: [
3335
+ /* @__PURE__ */ e(It, { size: 14 }),
3336
+ " End Round"
3337
+ ] }),
3338
+ n.status === "upcoming" && a && /* @__PURE__ */ i("button", { onClick: a, children: [
3339
+ /* @__PURE__ */ e(nn, { size: 14 }),
3340
+ " Skip"
3341
+ ] })
3317
3342
  ] }),
3318
3343
  p
3319
3344
  ] }),
3320
- n.winnerIds && n.winnerIds.length > 0 && /* @__PURE__ */ a("div", { className: "nice-round-card__winners", children: [
3321
- "🏆 Winners: ",
3345
+ n.winnerIds && n.winnerIds.length > 0 && /* @__PURE__ */ i("div", { className: "nice-round-card__winners", children: [
3346
+ /* @__PURE__ */ e(an, { size: 14 }),
3347
+ " Winners: ",
3322
3348
  n.winnerIds.length
3323
3349
  ] })
3324
3350
  ]
3325
3351
  }
3326
3352
  );
3327
3353
  }
3328
- ), Bi = ee(
3329
- function(t, r) {
3354
+ ), Fi = ee(
3355
+ function(t, c) {
3330
3356
  const {
3331
3357
  songs: n,
3332
- onAdd: c,
3358
+ onAdd: l,
3333
3359
  onRemove: o,
3334
3360
  onVote: d,
3335
3361
  onSearch: m,
3336
3362
  showQueue: h = !0,
3337
- readOnly: i = !1,
3363
+ readOnly: a = !1,
3338
3364
  className: u,
3339
3365
  style: p
3340
3366
  } = t, [b, f] = E(""), g = X(() => {
3341
3367
  if (!b.trim())
3342
3368
  return n;
3343
- const l = b.toLowerCase();
3369
+ const r = b.toLowerCase();
3344
3370
  return n.filter(
3345
- (y) => y.title.toLowerCase().includes(l) || y.artist.toLowerCase().includes(l)
3371
+ (y) => y.title.toLowerCase().includes(r) || y.artist.toLowerCase().includes(r)
3346
3372
  );
3347
- }, [n, b]), w = X(() => n.filter((l) => l.isQueued), [n]), k = n.find((l) => l.isPlaying), _ = (l) => {
3348
- f(l), m == null || m(l);
3349
- }, $ = (l) => {
3350
- if (!l)
3373
+ }, [n, b]), w = X(() => n.filter((r) => r.isQueued), [n]), k = n.find((r) => r.isPlaying), _ = (r) => {
3374
+ f(r), m == null || m(r);
3375
+ }, $ = (r) => {
3376
+ if (!r)
3351
3377
  return "";
3352
- const y = Math.floor(l / 60), v = l % 60;
3378
+ const y = Math.floor(r / 60), v = r % 60;
3353
3379
  return `${y}:${v.toString().padStart(2, "0")}`;
3354
3380
  };
3355
- return /* @__PURE__ */ a("div", { ref: r, className: `nice-song-picker ${u ?? ""}`, style: p, children: [
3356
- k && /* @__PURE__ */ a("div", { className: "nice-song-picker__now-playing", children: [
3357
- /* @__PURE__ */ e("span", { className: "nice-song-picker__np-label", children: "🎵 Now Playing" }),
3381
+ return /* @__PURE__ */ i("div", { ref: c, className: `nice-song-picker ${u ?? ""}`, style: p, children: [
3382
+ k && /* @__PURE__ */ i("div", { className: "nice-song-picker__now-playing", children: [
3383
+ /* @__PURE__ */ i("span", { className: "nice-song-picker__np-label", children: [
3384
+ /* @__PURE__ */ e(ke, { size: 14 }),
3385
+ " Now Playing"
3386
+ ] }),
3358
3387
  k.albumArt && /* @__PURE__ */ e("img", { src: k.albumArt, alt: "", className: "nice-song-picker__album-art" }),
3359
3388
  /* @__PURE__ */ e("strong", { children: k.title }),
3360
3389
  /* @__PURE__ */ e("span", { children: k.artist })
@@ -3364,68 +3393,69 @@ const Di = ee(
3364
3393
  {
3365
3394
  type: "text",
3366
3395
  value: b,
3367
- onChange: (l) => _(l.target.value),
3396
+ onChange: (r) => _(r.target.value),
3368
3397
  placeholder: "Search songs…",
3369
3398
  className: "nice-song-picker__search"
3370
3399
  }
3371
3400
  ),
3372
- /* @__PURE__ */ e("div", { className: "nice-song-picker__list", children: g.length === 0 ? /* @__PURE__ */ e("p", { className: "nice-song-picker__empty", children: "No songs found." }) : g.map((l) => /* @__PURE__ */ a(
3401
+ /* @__PURE__ */ e("div", { className: "nice-song-picker__list", children: g.length === 0 ? /* @__PURE__ */ e("p", { className: "nice-song-picker__empty", children: "No songs found." }) : g.map((r) => /* @__PURE__ */ i(
3373
3402
  "div",
3374
3403
  {
3375
- className: `nice-song-picker__item ${l.isPlaying ? "nice-song-picker__item--playing" : ""}`,
3404
+ className: `nice-song-picker__item ${r.isPlaying ? "nice-song-picker__item--playing" : ""}`,
3376
3405
  children: [
3377
- l.albumArt && /* @__PURE__ */ e("img", { src: l.albumArt, alt: "", className: "nice-song-picker__thumb" }),
3378
- /* @__PURE__ */ a("div", { className: "nice-song-picker__info", children: [
3379
- /* @__PURE__ */ e("strong", { children: l.title }),
3380
- /* @__PURE__ */ e("span", { children: l.artist }),
3381
- l.duration && /* @__PURE__ */ e("span", { className: "nice-song-picker__duration", children: $(l.duration) }),
3382
- l.addedByName && /* @__PURE__ */ a("small", { children: [
3406
+ r.albumArt && /* @__PURE__ */ e("img", { src: r.albumArt, alt: "", className: "nice-song-picker__thumb" }),
3407
+ /* @__PURE__ */ i("div", { className: "nice-song-picker__info", children: [
3408
+ /* @__PURE__ */ e("strong", { children: r.title }),
3409
+ /* @__PURE__ */ e("span", { children: r.artist }),
3410
+ r.duration && /* @__PURE__ */ e("span", { className: "nice-song-picker__duration", children: $(r.duration) }),
3411
+ r.addedByName && /* @__PURE__ */ i("small", { children: [
3383
3412
  "Added by ",
3384
- l.addedByName
3413
+ r.addedByName
3385
3414
  ] })
3386
3415
  ] }),
3387
- !i && /* @__PURE__ */ a("div", { className: "nice-song-picker__actions", children: [
3388
- d && /* @__PURE__ */ a("button", { onClick: () => d(l.id), children: [
3389
- "👍 ",
3390
- l.votes ?? 0
3416
+ !a && /* @__PURE__ */ i("div", { className: "nice-song-picker__actions", children: [
3417
+ d && /* @__PURE__ */ i("button", { onClick: () => d(r.id), "aria-label": `Vote for ${r.title}`, children: [
3418
+ /* @__PURE__ */ e(tn, { size: 14 }),
3419
+ " ",
3420
+ r.votes ?? 0
3391
3421
  ] }),
3392
- c && !l.isQueued && /* @__PURE__ */ e("button", { onClick: () => c(l.id), children: "+ Queue" }),
3393
- o && l.isQueued && /* @__PURE__ */ e("button", { onClick: () => o(l.id), children: "Remove" })
3422
+ l && !r.isQueued && /* @__PURE__ */ e("button", { onClick: () => l(r.id), children: "+ Queue" }),
3423
+ o && r.isQueued && /* @__PURE__ */ e("button", { onClick: () => o(r.id), children: "Remove" })
3394
3424
  ] })
3395
3425
  ]
3396
3426
  },
3397
- l.id
3427
+ r.id
3398
3428
  )) }),
3399
- h && w.length > 0 && /* @__PURE__ */ a("div", { className: "nice-song-picker__queue", children: [
3400
- /* @__PURE__ */ a("h4", { children: [
3429
+ h && w.length > 0 && /* @__PURE__ */ i("div", { className: "nice-song-picker__queue", children: [
3430
+ /* @__PURE__ */ i("h4", { children: [
3401
3431
  "Queue (",
3402
3432
  w.length,
3403
3433
  ")"
3404
3434
  ] }),
3405
- w.map((l, y) => /* @__PURE__ */ a("div", { className: "nice-song-picker__queue-item", children: [
3406
- /* @__PURE__ */ a("span", { className: "nice-song-picker__queue-pos", children: [
3435
+ w.map((r, y) => /* @__PURE__ */ i("div", { className: "nice-song-picker__queue-item", children: [
3436
+ /* @__PURE__ */ i("span", { className: "nice-song-picker__queue-pos", children: [
3407
3437
  y + 1,
3408
3438
  "."
3409
3439
  ] }),
3410
- /* @__PURE__ */ a("span", { children: [
3411
- l.title,
3440
+ /* @__PURE__ */ i("span", { children: [
3441
+ r.title,
3412
3442
  " — ",
3413
- l.artist
3443
+ r.artist
3414
3444
  ] })
3415
- ] }, l.id))
3445
+ ] }, r.id))
3416
3446
  ] })
3417
3447
  ] });
3418
3448
  }
3419
- ), Oi = ee(
3420
- function(t, r) {
3449
+ ), Vi = ee(
3450
+ function(t, c) {
3421
3451
  const {
3422
3452
  songs: n,
3423
- queue: c = [],
3453
+ queue: l = [],
3424
3454
  onEnqueue: o,
3425
3455
  onDequeue: d,
3426
3456
  onNext: m,
3427
3457
  nowPlayingId: h,
3428
- readOnly: i = !1,
3458
+ readOnly: a = !1,
3429
3459
  className: u,
3430
3460
  style: p
3431
3461
  } = t, [b, f] = E(""), [g, w] = E(""), k = n.find((v) => v.id === h), _ = X(() => {
@@ -3433,11 +3463,11 @@ const Di = ee(
3433
3463
  if (b.trim()) {
3434
3464
  const A = b.toLowerCase();
3435
3465
  v = v.filter(
3436
- (I) => I.title.toLowerCase().includes(A) || I.artist.toLowerCase().includes(A)
3466
+ (C) => C.title.toLowerCase().includes(A) || C.artist.toLowerCase().includes(A)
3437
3467
  );
3438
3468
  }
3439
3469
  return g && (v = v.filter((A) => A.difficulty === g)), v;
3440
- }, [n, b, g]), $ = X(() => new Set(c.map((v) => v.id)), [c]), l = ["easy", "medium", "hard", "expert"], y = (v) => {
3470
+ }, [n, b, g]), $ = X(() => new Set(l.map((v) => v.id)), [l]), r = ["easy", "medium", "hard", "expert"], y = (v) => {
3441
3471
  switch (v) {
3442
3472
  case "easy":
3443
3473
  return "#4caf50";
@@ -3451,8 +3481,8 @@ const Di = ee(
3451
3481
  return "#999";
3452
3482
  }
3453
3483
  };
3454
- return /* @__PURE__ */ a("div", { ref: r, className: `nice-karaoke-picker ${u ?? ""}`, style: p, children: [
3455
- k && /* @__PURE__ */ a(
3484
+ return /* @__PURE__ */ i("div", { ref: c, className: `nice-karaoke-picker ${u ?? ""}`, style: p, children: [
3485
+ k && /* @__PURE__ */ i(
3456
3486
  "div",
3457
3487
  {
3458
3488
  className: "nice-karaoke-picker__now-singing",
@@ -3460,25 +3490,33 @@ const Di = ee(
3460
3490
  borderLeft: "4px solid #e91e63",
3461
3491
  padding: "12px",
3462
3492
  marginBottom: 12,
3463
- background: "#fce4ec"
3493
+ // A pink tint of the theme surface: the fixed #fce4ec carried the inherited
3494
+ // (white) text in dark themes.
3495
+ background: "color-mix(in srgb, #e91e63 12%, var(--nice-bg-primary, #ffffff))"
3464
3496
  },
3465
3497
  children: [
3466
- /* @__PURE__ */ e("span", { style: { fontWeight: 600 }, children: "🎤 Now Singing" }),
3467
- /* @__PURE__ */ a("div", { children: [
3498
+ /* @__PURE__ */ i("span", { style: { fontWeight: 600 }, children: [
3499
+ /* @__PURE__ */ e(Ye, { size: 14 }),
3500
+ " Now Singing"
3501
+ ] }),
3502
+ /* @__PURE__ */ i("div", { children: [
3468
3503
  /* @__PURE__ */ e("strong", { children: k.title }),
3469
3504
  " — ",
3470
3505
  k.artist,
3471
- k.performerName && /* @__PURE__ */ a("span", { children: [
3506
+ k.performerName && /* @__PURE__ */ i("span", { children: [
3472
3507
  " (by ",
3473
3508
  k.performerName,
3474
3509
  ")"
3475
3510
  ] })
3476
3511
  ] }),
3477
- !i && m && /* @__PURE__ */ e("button", { onClick: m, style: { marginTop: 8 }, children: "Skip / Next ⏭" })
3512
+ !a && m && /* @__PURE__ */ i("button", { onClick: m, style: { marginTop: 8 }, children: [
3513
+ "Skip / Next ",
3514
+ /* @__PURE__ */ e(nn, { size: 14 })
3515
+ ] })
3478
3516
  ]
3479
3517
  }
3480
3518
  ),
3481
- /* @__PURE__ */ a(
3519
+ /* @__PURE__ */ i(
3482
3520
  "div",
3483
3521
  {
3484
3522
  className: "nice-karaoke-picker__filters",
@@ -3494,14 +3532,14 @@ const Di = ee(
3494
3532
  style: { flex: 1 }
3495
3533
  }
3496
3534
  ),
3497
- /* @__PURE__ */ a("select", { value: g, onChange: (v) => w(v.target.value), children: [
3535
+ /* @__PURE__ */ i("select", { value: g, onChange: (v) => w(v.target.value), children: [
3498
3536
  /* @__PURE__ */ e("option", { value: "", children: "All Difficulties" }),
3499
- l.map((v) => /* @__PURE__ */ e("option", { value: v, children: v }, v))
3537
+ r.map((v) => /* @__PURE__ */ e("option", { value: v, children: v }, v))
3500
3538
  ] })
3501
3539
  ]
3502
3540
  }
3503
3541
  ),
3504
- /* @__PURE__ */ e("div", { className: "nice-karaoke-picker__catalog", children: _.length === 0 ? /* @__PURE__ */ e("p", { children: "No songs match your search." }) : _.map((v) => /* @__PURE__ */ a(
3542
+ /* @__PURE__ */ e("div", { className: "nice-karaoke-picker__catalog", children: _.length === 0 ? /* @__PURE__ */ e("p", { children: "No songs match your search." }) : _.map((v) => /* @__PURE__ */ i(
3505
3543
  "div",
3506
3544
  {
3507
3545
  className: "nice-karaoke-picker__song",
@@ -3513,11 +3551,11 @@ const Di = ee(
3513
3551
  borderBottom: "1px solid #eee"
3514
3552
  },
3515
3553
  children: [
3516
- /* @__PURE__ */ a("div", { children: [
3554
+ /* @__PURE__ */ i("div", { children: [
3517
3555
  /* @__PURE__ */ e("strong", { children: v.title }),
3518
3556
  " — ",
3519
3557
  v.artist,
3520
- v.difficulty && /* @__PURE__ */ a(
3558
+ v.difficulty && /* @__PURE__ */ i(
3521
3559
  "span",
3522
3560
  {
3523
3561
  style: {
@@ -3533,31 +3571,55 @@ const Di = ee(
3533
3571
  ]
3534
3572
  }
3535
3573
  ),
3536
- v.hasLyrics && /* @__PURE__ */ e("span", { style: { marginLeft: 6, fontSize: 12 }, title: "Lyrics available", children: "📝" }),
3537
- v.language && /* @__PURE__ */ a("span", { style: { marginLeft: 6, fontSize: 12, color: "#666" }, children: [
3574
+ v.hasLyrics && /* @__PURE__ */ e(
3575
+ "span",
3576
+ {
3577
+ style: { marginLeft: 6, fontSize: 12 },
3578
+ title: "Lyrics available",
3579
+ "aria-label": "Lyrics available",
3580
+ children: /* @__PURE__ */ e(St, { size: 12 })
3581
+ }
3582
+ ),
3583
+ v.language && /* @__PURE__ */ i("span", { style: { marginLeft: 6, fontSize: 12, color: "#666" }, children: [
3538
3584
  "(",
3539
3585
  v.language,
3540
3586
  ")"
3541
3587
  ] })
3542
3588
  ] }),
3543
- !i && /* @__PURE__ */ e("div", { children: $.has(v.id) ? /* @__PURE__ */ e("button", { onClick: () => d == null ? void 0 : d(v.id), style: { color: "#f44336" }, children: "Remove" }) : /* @__PURE__ */ e("button", { onClick: () => o == null ? void 0 : o(v.id), children: "🎤 Sing" }) })
3589
+ !a && /* @__PURE__ */ e("div", { children: $.has(v.id) ? /* @__PURE__ */ e(
3590
+ "button",
3591
+ {
3592
+ onClick: () => d == null ? void 0 : d(v.id),
3593
+ style: {
3594
+ color: "#f44336",
3595
+ background: "transparent",
3596
+ border: "1px solid currentColor",
3597
+ borderRadius: 4
3598
+ },
3599
+ children: "Remove"
3600
+ }
3601
+ ) : /* @__PURE__ */ i("button", { onClick: () => o == null ? void 0 : o(v.id), children: [
3602
+ /* @__PURE__ */ e(Ye, { size: 14 }),
3603
+ " Sing"
3604
+ ] }) })
3544
3605
  ]
3545
3606
  },
3546
3607
  v.id
3547
3608
  )) }),
3548
- c.length > 0 && /* @__PURE__ */ a("div", { className: "nice-karaoke-picker__queue", style: { marginTop: 16 }, children: [
3549
- /* @__PURE__ */ a("h4", { children: [
3550
- "🎶 Queue (",
3551
- c.length,
3609
+ l.length > 0 && /* @__PURE__ */ i("div", { className: "nice-karaoke-picker__queue", style: { marginTop: 16 }, children: [
3610
+ /* @__PURE__ */ i("h4", { children: [
3611
+ /* @__PURE__ */ e(ke, { size: 14 }),
3612
+ " Queue (",
3613
+ l.length,
3552
3614
  ")"
3553
3615
  ] }),
3554
- c.map((v, A) => /* @__PURE__ */ a(
3616
+ l.map((v, A) => /* @__PURE__ */ i(
3555
3617
  "div",
3556
3618
  {
3557
3619
  style: { display: "flex", justifyContent: "space-between", padding: "4px 0" },
3558
3620
  children: [
3559
- /* @__PURE__ */ a("span", { children: [
3560
- /* @__PURE__ */ a("strong", { children: [
3621
+ /* @__PURE__ */ i("span", { children: [
3622
+ /* @__PURE__ */ i("strong", { children: [
3561
3623
  A + 1,
3562
3624
  "."
3563
3625
  ] }),
@@ -3565,13 +3627,21 @@ const Di = ee(
3565
3627
  v.title,
3566
3628
  " — ",
3567
3629
  v.artist,
3568
- v.performerName && /* @__PURE__ */ a("em", { children: [
3630
+ v.performerName && /* @__PURE__ */ i("em", { children: [
3569
3631
  " (",
3570
3632
  v.performerName,
3571
3633
  ")"
3572
3634
  ] })
3573
3635
  ] }),
3574
- !i && d && /* @__PURE__ */ e("button", { onClick: () => d(v.id), style: { fontSize: 12 }, children: "✕" })
3636
+ !a && d && /* @__PURE__ */ e(
3637
+ "button",
3638
+ {
3639
+ onClick: () => d(v.id),
3640
+ style: { fontSize: 12 },
3641
+ "aria-label": `Remove ${v.title}`,
3642
+ children: /* @__PURE__ */ e($n, { size: 12 })
3643
+ }
3644
+ )
3575
3645
  ]
3576
3646
  },
3577
3647
  v.id
@@ -3579,15 +3649,15 @@ const Di = ee(
3579
3649
  ] })
3580
3650
  ] });
3581
3651
  }
3582
- ), Nn = {
3583
- game: An,
3584
- music: Re,
3585
- dance: Re,
3586
- quiz: Qe,
3587
- karaoke: $n,
3588
- photo: zn,
3589
- custom: Sn
3590
- }, Ni = {
3652
+ ), Cn = {
3653
+ game: En,
3654
+ music: ke,
3655
+ dance: ke,
3656
+ quiz: en,
3657
+ karaoke: Ye,
3658
+ photo: Dn,
3659
+ custom: Mn
3660
+ }, Ii = {
3591
3661
  game: "Games",
3592
3662
  music: "Music",
3593
3663
  dance: "Dance",
@@ -3595,46 +3665,46 @@ const Di = ee(
3595
3665
  karaoke: "Karaoke",
3596
3666
  photo: "Photo",
3597
3667
  custom: "Custom"
3598
- }, Ri = ee(
3599
- function(t, r) {
3668
+ }, Wi = ee(
3669
+ function(t, c) {
3600
3670
  const {
3601
3671
  attractions: n,
3602
- onSelect: c,
3672
+ onSelect: l,
3603
3673
  onDeselect: o,
3604
3674
  onVote: d,
3605
3675
  selectedIds: m = [],
3606
3676
  maxSelections: h,
3607
- showVotes: i = !0,
3677
+ showVotes: a = !0,
3608
3678
  readOnly: u = !1,
3609
3679
  layout: p = "grid",
3610
3680
  className: b,
3611
3681
  style: f
3612
- } = t, [g, w] = E(""), [k, _] = E(""), $ = X(() => new Set(m), [m]), l = X(() => {
3613
- const I = new Set(n.map((D) => D.category));
3614
- return Array.from(I);
3682
+ } = t, [g, w] = E(""), [k, _] = E(""), $ = X(() => new Set(m), [m]), r = X(() => {
3683
+ const C = new Set(n.map((D) => D.category));
3684
+ return Array.from(C);
3615
3685
  }, [n]), y = X(() => {
3616
- let I = n;
3617
- if (g && (I = I.filter((D) => D.category === g)), k.trim()) {
3686
+ let C = n;
3687
+ if (g && (C = C.filter((D) => D.category === g)), k.trim()) {
3618
3688
  const D = k.toLowerCase();
3619
- I = I.filter(
3689
+ C = C.filter(
3620
3690
  (N) => {
3621
3691
  var L;
3622
3692
  return N.name.toLowerCase().includes(D) || ((L = N.description) == null ? void 0 : L.toLowerCase().includes(D));
3623
3693
  }
3624
3694
  );
3625
3695
  }
3626
- return I;
3627
- }, [n, g, k]), v = !h || $.size < h, A = (I) => {
3628
- u || ($.has(I) ? o == null || o(I) : v && (c == null || c(I)));
3696
+ return C;
3697
+ }, [n, g, k]), v = !h || $.size < h, A = (C) => {
3698
+ u || ($.has(C) ? o == null || o(C) : v && (l == null || l(C)));
3629
3699
  };
3630
- return /* @__PURE__ */ a(
3700
+ return /* @__PURE__ */ i(
3631
3701
  "div",
3632
3702
  {
3633
- ref: r,
3703
+ ref: c,
3634
3704
  className: `nice-attraction-picker ${b ?? ""}`,
3635
- style: { color: "var(--text-primary)", ...f },
3705
+ style: { color: "var(--nice-text-primary)", ...f },
3636
3706
  children: [
3637
- /* @__PURE__ */ a(
3707
+ /* @__PURE__ */ i(
3638
3708
  "div",
3639
3709
  {
3640
3710
  style: {
@@ -3645,7 +3715,7 @@ const Di = ee(
3645
3715
  },
3646
3716
  children: [
3647
3717
  /* @__PURE__ */ e("h3", { style: { margin: 0 }, children: "Attractions" }),
3648
- h && /* @__PURE__ */ a("span", { style: { color: "var(--text-secondary, #64748b)", fontSize: 14 }, children: [
3718
+ h && /* @__PURE__ */ i("span", { style: { color: "var(--nice-text-secondary, #64748b)", fontSize: 14 }, children: [
3649
3719
  $.size,
3650
3720
  "/",
3651
3721
  h,
@@ -3654,13 +3724,13 @@ const Di = ee(
3654
3724
  ]
3655
3725
  }
3656
3726
  ),
3657
- /* @__PURE__ */ a("div", { style: { display: "flex", gap: 8, marginBottom: 12, flexWrap: "wrap" }, children: [
3727
+ /* @__PURE__ */ i("div", { style: { display: "flex", gap: 8, marginBottom: 12, flexWrap: "wrap" }, children: [
3658
3728
  /* @__PURE__ */ e(
3659
3729
  "input",
3660
3730
  {
3661
3731
  type: "text",
3662
3732
  value: k,
3663
- onChange: (I) => _(I.target.value),
3733
+ onChange: (C) => _(C.target.value),
3664
3734
  placeholder: "Search attractions…",
3665
3735
  style: { flex: 1, minWidth: 150 }
3666
3736
  }
@@ -3673,23 +3743,23 @@ const Di = ee(
3673
3743
  children: "All"
3674
3744
  }
3675
3745
  ),
3676
- l.map((I) => /* @__PURE__ */ a(
3746
+ r.map((C) => /* @__PURE__ */ i(
3677
3747
  "button",
3678
3748
  {
3679
- onClick: () => w(I === g ? "" : I),
3749
+ onClick: () => w(C === g ? "" : C),
3680
3750
  style: {
3681
- fontWeight: I === g ? 700 : 400,
3751
+ fontWeight: C === g ? 700 : 400,
3682
3752
  display: "inline-flex",
3683
3753
  alignItems: "center",
3684
3754
  gap: 4
3685
3755
  },
3686
3756
  children: [
3687
- Ue.createElement(Nn[I], { size: 14 }),
3757
+ Me.createElement(Cn[C], { size: 14 }),
3688
3758
  " ",
3689
- Ni[I]
3759
+ Ii[C]
3690
3760
  ]
3691
3761
  },
3692
- I
3762
+ C
3693
3763
  ))
3694
3764
  ] }),
3695
3765
  /* @__PURE__ */ e(
@@ -3701,27 +3771,27 @@ const Di = ee(
3701
3771
  gap: 12,
3702
3772
  flexDirection: p === "list" ? "column" : void 0
3703
3773
  },
3704
- children: y.length === 0 ? /* @__PURE__ */ e("p", { children: "No attractions found." }) : y.map((I) => {
3705
- const D = $.has(I.id);
3706
- return /* @__PURE__ */ a(
3774
+ children: y.length === 0 ? /* @__PURE__ */ e("p", { children: "No attractions found." }) : y.map((C) => {
3775
+ const D = $.has(C.id);
3776
+ return /* @__PURE__ */ i(
3707
3777
  "div",
3708
3778
  {
3709
3779
  className: "nice-attraction-picker__card",
3710
3780
  style: {
3711
- border: D ? "2px solid var(--color-primary, #6366f1)" : "1px solid var(--border-color, #cbd5e1)",
3781
+ border: D ? "2px solid var(--nice-color-primary, #6366f1)" : "1px solid var(--nice-border-color, #cbd5e1)",
3712
3782
  borderRadius: 8,
3713
3783
  padding: 12,
3714
3784
  cursor: u ? "default" : "pointer",
3715
- background: D ? "color-mix(in srgb, var(--color-primary) 12%, transparent)" : "var(--bg-elevated, var(--bg-primary))",
3785
+ background: D ? "color-mix(in srgb, var(--nice-color-primary) 12%, transparent)" : "var(--nice-bg-elevated, var(--nice-bg-primary))",
3716
3786
  transition: "all 0.2s"
3717
3787
  },
3718
- onClick: () => A(I.id),
3788
+ onClick: () => A(C.id),
3719
3789
  children: [
3720
- I.imageUrl && /* @__PURE__ */ e(
3790
+ C.imageUrl && /* @__PURE__ */ e(
3721
3791
  "img",
3722
3792
  {
3723
- src: I.imageUrl,
3724
- alt: I.name,
3793
+ src: C.imageUrl,
3794
+ alt: C.name,
3725
3795
  style: {
3726
3796
  width: "100%",
3727
3797
  borderRadius: 6,
@@ -3731,22 +3801,22 @@ const Di = ee(
3731
3801
  }
3732
3802
  }
3733
3803
  ),
3734
- /* @__PURE__ */ a("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
3735
- /* @__PURE__ */ e("span", { style: { display: "inline-flex" }, children: Ue.createElement(Nn[I.category], { size: 16 }) }),
3736
- /* @__PURE__ */ e("strong", { children: I.name })
3804
+ /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
3805
+ /* @__PURE__ */ e("span", { style: { display: "inline-flex" }, children: Me.createElement(Cn[C.category], { size: 16 }) }),
3806
+ /* @__PURE__ */ e("strong", { children: C.name })
3737
3807
  ] }),
3738
- I.description && /* @__PURE__ */ e(
3808
+ C.description && /* @__PURE__ */ e(
3739
3809
  "p",
3740
3810
  {
3741
3811
  style: {
3742
3812
  fontSize: 13,
3743
- color: "var(--text-secondary, #64748b)",
3813
+ color: "var(--nice-text-secondary, #64748b)",
3744
3814
  margin: "6px 0"
3745
3815
  },
3746
- children: I.description
3816
+ children: C.description
3747
3817
  }
3748
3818
  ),
3749
- /* @__PURE__ */ a(
3819
+ /* @__PURE__ */ i(
3750
3820
  "div",
3751
3821
  {
3752
3822
  style: {
@@ -3756,7 +3826,7 @@ const Di = ee(
3756
3826
  marginTop: 8
3757
3827
  },
3758
3828
  children: [
3759
- i && /* @__PURE__ */ a(
3829
+ a && /* @__PURE__ */ i(
3760
3830
  "span",
3761
3831
  {
3762
3832
  style: {
@@ -3766,9 +3836,9 @@ const Di = ee(
3766
3836
  gap: 4
3767
3837
  },
3768
3838
  children: [
3769
- /* @__PURE__ */ e(bt, { size: 14 }),
3839
+ /* @__PURE__ */ e(tn, { size: 14 }),
3770
3840
  " ",
3771
- I.votes ?? 0
3841
+ C.votes ?? 0
3772
3842
  ]
3773
3843
  }
3774
3844
  ),
@@ -3776,7 +3846,7 @@ const Di = ee(
3776
3846
  "button",
3777
3847
  {
3778
3848
  onClick: (N) => {
3779
- N.stopPropagation(), d(I.id);
3849
+ N.stopPropagation(), d(C.id);
3780
3850
  },
3781
3851
  style: { fontSize: 12 },
3782
3852
  children: "Vote"
@@ -3787,7 +3857,7 @@ const Di = ee(
3787
3857
  )
3788
3858
  ]
3789
3859
  },
3790
- I.id
3860
+ C.id
3791
3861
  );
3792
3862
  })
3793
3863
  }
@@ -3796,66 +3866,66 @@ const Di = ee(
3796
3866
  }
3797
3867
  );
3798
3868
  }
3799
- ), bi = {
3800
- game: An,
3801
- music: Re,
3802
- dance: Re,
3803
- quiz: Qe,
3804
- karaoke: $n,
3805
- photo: zn,
3806
- custom: Sn
3807
- }, Ui = ee(
3808
- function(t, r) {
3869
+ ), Si = {
3870
+ game: En,
3871
+ music: ke,
3872
+ dance: ke,
3873
+ quiz: en,
3874
+ karaoke: Ye,
3875
+ photo: Dn,
3876
+ custom: Mn
3877
+ }, qi = ee(
3878
+ function(t, c) {
3809
3879
  const {
3810
3880
  attractions: n,
3811
- onVote: c,
3881
+ onVote: l,
3812
3882
  onUnvote: o,
3813
3883
  votedIds: d = [],
3814
3884
  maxVotes: m,
3815
3885
  closed: h = !1,
3816
- sortBy: i = "votes",
3886
+ sortBy: a = "votes",
3817
3887
  showResults: u = !0,
3818
3888
  className: p,
3819
3889
  style: b
3820
3890
  } = t, f = X(() => new Set(d), [d]), g = m ? m - f.size : void 0, w = X(() => {
3821
- const l = [...n];
3822
- switch (i) {
3891
+ const r = [...n];
3892
+ switch (a) {
3823
3893
  case "votes":
3824
- l.sort((y, v) => (v.votes ?? 0) - (y.votes ?? 0));
3894
+ r.sort((y, v) => (v.votes ?? 0) - (y.votes ?? 0));
3825
3895
  break;
3826
3896
  case "name":
3827
- l.sort((y, v) => y.name.localeCompare(v.name));
3897
+ r.sort((y, v) => y.name.localeCompare(v.name));
3828
3898
  break;
3829
3899
  case "category":
3830
- l.sort((y, v) => y.category.localeCompare(v.category));
3900
+ r.sort((y, v) => y.category.localeCompare(v.category));
3831
3901
  break;
3832
3902
  }
3833
- return l;
3834
- }, [n, i]), k = X(
3835
- () => Math.max(...n.map((l) => l.votes ?? 0), 1),
3903
+ return r;
3904
+ }, [n, a]), k = X(
3905
+ () => Math.max(...n.map((r) => r.votes ?? 0), 1),
3836
3906
  [n]
3837
- ), _ = (l) => {
3838
- h || (f.has(l) ? o == null || o(l) : (!g || g > 0) && (c == null || c(l)));
3839
- }, $ = (l) => {
3840
- switch (l) {
3907
+ ), _ = (r) => {
3908
+ h || (f.has(r) ? o == null || o(r) : (!g || g > 0) && (l == null || l(r)));
3909
+ }, $ = (r) => {
3910
+ switch (r) {
3841
3911
  case 0:
3842
- return /* @__PURE__ */ e(xt, { size: 18, primaryColor: "#f59e0b", title: "1st place" });
3912
+ return /* @__PURE__ */ e(an, { size: 18, primaryColor: "#f59e0b", title: "1st place" });
3843
3913
  case 1:
3844
- return /* @__PURE__ */ e(dn, { size: 18, primaryColor: "#94a3b8", title: "2nd place" });
3914
+ return /* @__PURE__ */ e(He, { size: 18, primaryColor: "#94a3b8", title: "2nd place" });
3845
3915
  case 2:
3846
- return /* @__PURE__ */ e(dn, { size: 18, primaryColor: "#b45309", title: "3rd place" });
3916
+ return /* @__PURE__ */ e(He, { size: 18, primaryColor: "#b45309", title: "3rd place" });
3847
3917
  default:
3848
- return `${l + 1}.`;
3918
+ return `${r + 1}.`;
3849
3919
  }
3850
3920
  };
3851
- return /* @__PURE__ */ a(
3921
+ return /* @__PURE__ */ i(
3852
3922
  "div",
3853
3923
  {
3854
- ref: r,
3924
+ ref: c,
3855
3925
  className: `nice-attraction-voting ${p ?? ""}`,
3856
- style: { color: "var(--text-primary)", ...b },
3926
+ style: { color: "var(--nice-text-primary)", ...b },
3857
3927
  children: [
3858
- /* @__PURE__ */ a(
3928
+ /* @__PURE__ */ i(
3859
3929
  "div",
3860
3930
  {
3861
3931
  style: {
@@ -3865,16 +3935,16 @@ const Di = ee(
3865
3935
  marginBottom: 16
3866
3936
  },
3867
3937
  children: [
3868
- /* @__PURE__ */ a("h3", { style: { margin: 0, display: "inline-flex", alignItems: "center", gap: 8 }, children: [
3869
- /* @__PURE__ */ e(wt, { size: 20 }),
3938
+ /* @__PURE__ */ i("h3", { style: { margin: 0, display: "inline-flex", alignItems: "center", gap: 8 }, children: [
3939
+ /* @__PURE__ */ e(zt, { size: 20 }),
3870
3940
  h ? "Voting Results" : "Vote for Attractions"
3871
3941
  ] }),
3872
- !h && g !== void 0 && /* @__PURE__ */ a(
3942
+ !h && g !== void 0 && /* @__PURE__ */ i(
3873
3943
  "span",
3874
3944
  {
3875
3945
  style: {
3876
3946
  fontSize: 14,
3877
- color: g > 0 ? "var(--color-primary, #6366f1)" : "var(--color-error, #ef4444)"
3947
+ color: g > 0 ? "var(--nice-color-primary, #6366f1)" : "var(--nice-color-error, #ef4444)"
3878
3948
  },
3879
3949
  children: [
3880
3950
  g,
@@ -3887,10 +3957,10 @@ const Di = ee(
3887
3957
  ]
3888
3958
  }
3889
3959
  ),
3890
- h && /* @__PURE__ */ e("p", { style: { color: "var(--text-secondary, #64748b)", marginBottom: 12 }, children: "Voting is closed. Final results:" }),
3891
- /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: w.map((l, y) => {
3892
- const v = f.has(l.id), A = l.votes ?? 0, I = u ? `${Math.round(A / k * 100)}%` : "0%";
3893
- return /* @__PURE__ */ a(
3960
+ h && /* @__PURE__ */ e("p", { style: { color: "var(--nice-text-secondary, #64748b)", marginBottom: 12 }, children: "Voting is closed. Final results:" }),
3961
+ /* @__PURE__ */ e("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: w.map((r, y) => {
3962
+ const v = f.has(r.id), A = r.votes ?? 0, C = u ? `${Math.round(A / k * 100)}%` : "0%";
3963
+ return /* @__PURE__ */ i(
3894
3964
  "div",
3895
3965
  {
3896
3966
  style: {
@@ -3899,28 +3969,28 @@ const Di = ee(
3899
3969
  gap: 12,
3900
3970
  padding: "10px 14px",
3901
3971
  borderRadius: 8,
3902
- border: v ? "2px solid var(--color-primary, #6366f1)" : "1px solid var(--border-color, #cbd5e1)",
3903
- background: v ? "color-mix(in srgb, var(--color-primary) 12%, transparent)" : "var(--bg-elevated, var(--bg-primary))",
3972
+ border: v ? "2px solid var(--nice-color-primary, #6366f1)" : "1px solid var(--nice-border-color, #cbd5e1)",
3973
+ background: v ? "color-mix(in srgb, var(--nice-color-primary) 12%, transparent)" : "var(--nice-bg-elevated, var(--nice-bg-primary))",
3904
3974
  cursor: h ? "default" : "pointer",
3905
3975
  transition: "all 0.2s"
3906
3976
  },
3907
- onClick: () => _(l.id),
3977
+ onClick: () => _(r.id),
3908
3978
  children: [
3909
3979
  u && /* @__PURE__ */ e("span", { style: { fontSize: 18, minWidth: 32, textAlign: "center" }, children: $(y) }),
3910
- /* @__PURE__ */ e("span", { style: { display: "inline-flex", fontSize: 20 }, children: Ue.createElement(bi[l.category], { size: 20 }) }),
3911
- /* @__PURE__ */ a("div", { style: { flex: 1, minWidth: 0 }, children: [
3912
- /* @__PURE__ */ e("div", { style: { fontWeight: 600 }, children: l.name }),
3913
- l.description && /* @__PURE__ */ e(
3980
+ /* @__PURE__ */ e("span", { style: { display: "inline-flex", fontSize: 20 }, children: Me.createElement(Si[r.category], { size: 20 }) }),
3981
+ /* @__PURE__ */ i("div", { style: { flex: 1, minWidth: 0 }, children: [
3982
+ /* @__PURE__ */ e("div", { style: { fontWeight: 600 }, children: r.name }),
3983
+ r.description && /* @__PURE__ */ e(
3914
3984
  "div",
3915
3985
  {
3916
3986
  style: {
3917
3987
  fontSize: 13,
3918
- color: "var(--text-secondary, #64748b)",
3988
+ color: "var(--nice-text-secondary, #64748b)",
3919
3989
  overflow: "hidden",
3920
3990
  textOverflow: "ellipsis",
3921
3991
  whiteSpace: "nowrap"
3922
3992
  },
3923
- children: l.description
3993
+ children: r.description
3924
3994
  }
3925
3995
  ),
3926
3996
  u && /* @__PURE__ */ e(
@@ -3930,7 +4000,7 @@ const Di = ee(
3930
4000
  marginTop: 4,
3931
4001
  height: 6,
3932
4002
  borderRadius: 3,
3933
- background: "var(--bg-tertiary, #e2e8f0)",
4003
+ background: "var(--nice-bg-tertiary, #e2e8f0)",
3934
4004
  overflow: "hidden"
3935
4005
  },
3936
4006
  children: /* @__PURE__ */ e(
@@ -3938,8 +4008,8 @@ const Di = ee(
3938
4008
  {
3939
4009
  style: {
3940
4010
  height: "100%",
3941
- width: I,
3942
- background: "var(--color-primary, #6366f1)",
4011
+ width: C,
4012
+ background: "var(--nice-color-primary, #6366f1)",
3943
4013
  borderRadius: 3,
3944
4014
  transition: "width 0.3s"
3945
4015
  }
@@ -3953,13 +4023,13 @@ const Di = ee(
3953
4023
  "button",
3954
4024
  {
3955
4025
  onClick: (D) => {
3956
- D.stopPropagation(), _(l.id);
4026
+ D.stopPropagation(), _(r.id);
3957
4027
  },
3958
4028
  style: {
3959
4029
  padding: "4px 12px",
3960
4030
  borderRadius: 4,
3961
4031
  border: "none",
3962
- background: v ? "var(--color-error, #ef4444)" : "var(--color-primary, #6366f1)",
4032
+ background: v ? "var(--nice-color-error, #ef4444)" : "var(--nice-color-primary, #6366f1)",
3963
4033
  color: "#fff",
3964
4034
  cursor: "pointer",
3965
4035
  fontSize: 13
@@ -3969,21 +4039,21 @@ const Di = ee(
3969
4039
  )
3970
4040
  ]
3971
4041
  },
3972
- l.id
4042
+ r.id
3973
4043
  );
3974
4044
  }) }),
3975
- u && /* @__PURE__ */ a(
4045
+ u && /* @__PURE__ */ i(
3976
4046
  "div",
3977
4047
  {
3978
4048
  style: {
3979
4049
  marginTop: 12,
3980
4050
  textAlign: "right",
3981
4051
  fontSize: 13,
3982
- color: "var(--text-secondary, #64748b)"
4052
+ color: "var(--nice-text-secondary, #64748b)"
3983
4053
  },
3984
4054
  children: [
3985
4055
  "Total votes: ",
3986
- n.reduce((l, y) => l + (y.votes ?? 0), 0)
4056
+ n.reduce((r, y) => r + (y.votes ?? 0), 0)
3987
4057
  ]
3988
4058
  }
3989
4059
  )
@@ -3993,20 +4063,20 @@ const Di = ee(
3993
4063
  }
3994
4064
  );
3995
4065
  export {
3996
- Ri as NiceAttractionPicker,
3997
- Ui as NiceAttractionVoting,
3998
- Si as NiceEventMedia,
3999
- $i as NiceEventPlanning,
4000
- Di as NiceExpenseSplit,
4001
- Mi as NiceGiftRegistry,
4002
- Ti as NiceInvitationDesigner,
4003
- Oi as NiceKaraokePicker,
4004
- zi as NiceMediaCollage,
4005
- Ai as NiceParticipantList,
4006
- Li as NiceRoundCard,
4007
- Ei as NiceRoundList,
4008
- pn as NiceRsvpControl,
4009
- Pi as NiceSeatPicker,
4010
- ai as NiceSeatingChart,
4011
- Bi as NiceSongPicker
4066
+ Wi as NiceAttractionPicker,
4067
+ qi as NiceAttractionVoting,
4068
+ Mi as NiceEventMedia,
4069
+ Ei as NiceEventPlanning,
4070
+ Ui as NiceExpenseSplit,
4071
+ Oi as NiceGiftRegistry,
4072
+ Ri as NiceInvitationDesigner,
4073
+ Vi as NiceKaraokePicker,
4074
+ Di as NiceMediaCollage,
4075
+ Li as NiceParticipantList,
4076
+ Xi as NiceRoundCard,
4077
+ Yi as NiceRoundList,
4078
+ _n as NiceRsvpControl,
4079
+ Bi as NiceSeatPicker,
4080
+ oi as NiceSeatingChart,
4081
+ Fi as NiceSongPicker
4012
4082
  };