@zonetrix/viewer 2.11.0 → 2.11.2
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/components/SeatMapViewer.d.ts +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +782 -688
- package/dist/types/index.d.ts +7 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,97 +1,116 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Stage as pt, Layer as
|
|
4
|
-
import { ref as
|
|
1
|
+
import { jsx as f, jsxs as D } from "react/jsx-runtime";
|
|
2
|
+
import { useState as W, useCallback as T, useEffect as U, useRef as P, useMemo as B, memo as Q, useSyncExternalStore as gt } from "react";
|
|
3
|
+
import { Stage as pt, Layer as we, Group as bt, Text as Ne, Circle as $e, Rect as ke, Path as vt, RegularPolygon as yt } from "react-konva";
|
|
4
|
+
import { ref as Re, onValue as We, off as Xe, get as mt } from "firebase/database";
|
|
5
5
|
import { fromFirebaseSeatMap as St } from "@zonetrix/shared";
|
|
6
6
|
function xt(n) {
|
|
7
|
-
const [
|
|
7
|
+
const [o, t] = W(null), [r, d] = W(!1), [c, s] = W(null), v = T(async () => {
|
|
8
8
|
if (n) {
|
|
9
|
-
d(!0),
|
|
9
|
+
d(!0), s(null);
|
|
10
10
|
try {
|
|
11
|
-
const
|
|
12
|
-
if (!
|
|
13
|
-
throw new Error(`Failed to fetch config: ${
|
|
14
|
-
const
|
|
15
|
-
t(
|
|
16
|
-
} catch (
|
|
17
|
-
const
|
|
18
|
-
i
|
|
11
|
+
const h = await fetch(n);
|
|
12
|
+
if (!h.ok)
|
|
13
|
+
throw new Error(`Failed to fetch config: ${h.statusText}`);
|
|
14
|
+
const i = await h.json();
|
|
15
|
+
t(i);
|
|
16
|
+
} catch (h) {
|
|
17
|
+
const i = h instanceof Error ? h : new Error("Unknown error occurred");
|
|
18
|
+
s(i), console.error("Failed to fetch seat map config:", i);
|
|
19
19
|
} finally {
|
|
20
20
|
d(!1);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
};
|
|
24
|
-
return
|
|
25
|
-
|
|
26
|
-
}, [
|
|
27
|
-
config:
|
|
28
|
-
loading:
|
|
29
|
-
error:
|
|
30
|
-
refetch:
|
|
23
|
+
}, [n]);
|
|
24
|
+
return U(() => {
|
|
25
|
+
v();
|
|
26
|
+
}, [v]), {
|
|
27
|
+
config: o,
|
|
28
|
+
loading: r,
|
|
29
|
+
error: c,
|
|
30
|
+
refetch: v
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
function wt(n) {
|
|
34
|
-
const [
|
|
35
|
-
return
|
|
36
|
-
const
|
|
37
|
-
if (!
|
|
38
|
-
const { width: d, height:
|
|
39
|
-
d > 0 &&
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
if (!
|
|
43
|
-
const { width:
|
|
44
|
-
|
|
34
|
+
const [o, t] = W({ width: 0, height: 0 });
|
|
35
|
+
return U(() => {
|
|
36
|
+
const r = n.current;
|
|
37
|
+
if (!r) return;
|
|
38
|
+
const { width: d, height: c } = r.getBoundingClientRect();
|
|
39
|
+
d > 0 && c > 0 && t({ width: d, height: c });
|
|
40
|
+
const s = new ResizeObserver((v) => {
|
|
41
|
+
const h = v[0];
|
|
42
|
+
if (!h) return;
|
|
43
|
+
const { width: i, height: b } = h.contentRect;
|
|
44
|
+
i > 0 && b > 0 && t((y) => y.width === i && y.height === b ? y : { width: i, height: b });
|
|
45
45
|
});
|
|
46
|
-
return
|
|
47
|
-
|
|
46
|
+
return s.observe(r), () => {
|
|
47
|
+
s.disconnect();
|
|
48
48
|
};
|
|
49
|
-
}, [n]),
|
|
49
|
+
}, [n]), o;
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
return Math.sqrt(Math.pow(
|
|
51
|
+
function ze(n, o) {
|
|
52
|
+
return Math.sqrt(Math.pow(o.x - n.x, 2) + Math.pow(o.y - n.y, 2));
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function De(n, o) {
|
|
55
55
|
return {
|
|
56
|
-
x: (n.x +
|
|
57
|
-
y: (n.y +
|
|
56
|
+
x: (n.x + o.x) / 2,
|
|
57
|
+
y: (n.y + o.y) / 2
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
|
-
function Ct(n,
|
|
61
|
-
const t =
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
60
|
+
function Ct(n, o) {
|
|
61
|
+
const t = P(null), r = P(null), d = P(1), {
|
|
62
|
+
enabled: c,
|
|
63
|
+
minScale: s,
|
|
64
|
+
maxScale: v,
|
|
65
|
+
currentScale: h,
|
|
66
|
+
currentPosition: i,
|
|
67
|
+
onScaleChange: b
|
|
68
|
+
} = o;
|
|
69
|
+
U(() => {
|
|
70
|
+
const y = n.current;
|
|
71
|
+
if (!y || !c) return;
|
|
72
|
+
const u = y.container(), w = (g) => {
|
|
73
|
+
if (g.touches.length === 2) {
|
|
74
|
+
g.preventDefault();
|
|
75
|
+
const I = { x: g.touches[0].clientX, y: g.touches[0].clientY }, R = { x: g.touches[1].clientX, y: g.touches[1].clientY };
|
|
76
|
+
t.current = ze(I, R), r.current = De(I, R), d.current = h;
|
|
70
77
|
}
|
|
71
|
-
},
|
|
72
|
-
if (
|
|
73
|
-
|
|
74
|
-
const
|
|
75
|
-
if (t.current !== null &&
|
|
76
|
-
const
|
|
77
|
-
Math.max(
|
|
78
|
-
|
|
79
|
-
),
|
|
80
|
-
x: (
|
|
81
|
-
y: (
|
|
82
|
-
},
|
|
83
|
-
x:
|
|
84
|
-
y:
|
|
78
|
+
}, m = (g) => {
|
|
79
|
+
if (g.touches.length !== 2) return;
|
|
80
|
+
g.preventDefault();
|
|
81
|
+
const I = { x: g.touches[0].clientX, y: g.touches[0].clientY }, R = { x: g.touches[1].clientX, y: g.touches[1].clientY }, F = ze(I, R), E = De(I, R);
|
|
82
|
+
if (t.current !== null && r.current !== null) {
|
|
83
|
+
const L = F / t.current, N = Math.min(
|
|
84
|
+
Math.max(h * L, s),
|
|
85
|
+
v
|
|
86
|
+
), Y = u.getBoundingClientRect(), V = E.x - Y.left, se = E.y - Y.top, ae = h, ce = {
|
|
87
|
+
x: (V - i.x) / ae,
|
|
88
|
+
y: (se - i.y) / ae
|
|
89
|
+
}, le = E.x - r.current.x, A = E.y - r.current.y, _ = {
|
|
90
|
+
x: V - ce.x * N + le,
|
|
91
|
+
y: se - ce.y * N + A
|
|
85
92
|
};
|
|
86
|
-
|
|
93
|
+
b(N, _), t.current = F, r.current = E;
|
|
87
94
|
}
|
|
88
|
-
},
|
|
89
|
-
|
|
95
|
+
}, M = (g) => {
|
|
96
|
+
g.touches.length < 2 && (t.current = null, r.current = null);
|
|
90
97
|
};
|
|
91
|
-
return
|
|
92
|
-
|
|
98
|
+
return u.addEventListener("touchstart", w, {
|
|
99
|
+
passive: !1
|
|
100
|
+
}), u.addEventListener("touchmove", m, {
|
|
101
|
+
passive: !1
|
|
102
|
+
}), u.addEventListener("touchend", M), () => {
|
|
103
|
+
u.removeEventListener("touchstart", w), u.removeEventListener("touchmove", m), u.removeEventListener("touchend", M);
|
|
93
104
|
};
|
|
94
|
-
}, [
|
|
105
|
+
}, [
|
|
106
|
+
n,
|
|
107
|
+
c,
|
|
108
|
+
s,
|
|
109
|
+
v,
|
|
110
|
+
h,
|
|
111
|
+
i,
|
|
112
|
+
b
|
|
113
|
+
]);
|
|
95
114
|
}
|
|
96
115
|
const Rt = {
|
|
97
116
|
canvasBackground: "#1a1a1a",
|
|
@@ -103,99 +122,104 @@ const Rt = {
|
|
|
103
122
|
seatHidden: "#4a4a4a",
|
|
104
123
|
gridLines: "#404040",
|
|
105
124
|
currency: "KD"
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
125
|
+
}, Pe = Q(
|
|
126
|
+
({ seat: n, state: o, colors: t, onClick: r, onMouseEnter: d, onMouseLeave: c }) => {
|
|
127
|
+
const h = {
|
|
128
|
+
available: t.seatAvailable,
|
|
129
|
+
reserved: t.seatReserved,
|
|
130
|
+
selected: t.seatSelected,
|
|
131
|
+
unavailable: t.seatUnavailable,
|
|
132
|
+
hidden: t.seatHidden
|
|
133
|
+
// Hidden seats are filtered out, but included for type safety
|
|
134
|
+
}[o], i = o === "available" || o === "selected", b = T(() => {
|
|
135
|
+
i && r(n);
|
|
136
|
+
}, [n, r, i]), y = T(
|
|
137
|
+
(m) => {
|
|
138
|
+
d(n, m);
|
|
139
|
+
const M = m.target.getStage();
|
|
140
|
+
M && i && (M.container().style.cursor = "pointer");
|
|
141
|
+
},
|
|
142
|
+
[n, d, i]
|
|
143
|
+
), u = T(
|
|
144
|
+
(m) => {
|
|
145
|
+
c();
|
|
146
|
+
const M = m.target.getStage();
|
|
147
|
+
M && (M.container().style.cursor = "grab");
|
|
148
|
+
},
|
|
149
|
+
[c]
|
|
150
|
+
), w = {
|
|
151
|
+
x: n.position.x,
|
|
152
|
+
y: n.position.y,
|
|
153
|
+
fill: h,
|
|
154
|
+
stroke: "#ffffff",
|
|
155
|
+
strokeWidth: 1,
|
|
156
|
+
onClick: b,
|
|
157
|
+
onTap: b,
|
|
158
|
+
onMouseEnter: y,
|
|
159
|
+
onMouseLeave: u
|
|
160
|
+
};
|
|
161
|
+
return n.shape === "circle" ? /* @__PURE__ */ f($e, { ...w, radius: 12 }) : /* @__PURE__ */ f(
|
|
162
|
+
ke,
|
|
163
|
+
{
|
|
164
|
+
...w,
|
|
165
|
+
width: 24,
|
|
166
|
+
height: 24,
|
|
167
|
+
offsetX: 12,
|
|
168
|
+
offsetY: 12,
|
|
169
|
+
cornerRadius: n.shape === "square" ? 0 : 4
|
|
170
|
+
}
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
);
|
|
174
|
+
Pe.displayName = "ViewerSeat";
|
|
175
|
+
const Ye = Q(({ stage: n, stageColor: o }) => {
|
|
176
|
+
const t = n.config, r = t.shape || "rectangle", d = t.showLabel !== !1, c = t.color || o, s = t.width / t.height, v = s < 0.5, h = s > 2;
|
|
177
|
+
let i;
|
|
178
|
+
v ? i = t.width * 0.25 : h ? i = t.height * 0.35 : i = Math.min(t.width, t.height) * 0.25;
|
|
179
|
+
const b = t.label?.length || 6, w = t.width * 0.85 / b * 1.5, m = Math.max(
|
|
180
|
+
10,
|
|
181
|
+
Math.min(24, Math.min(i, w))
|
|
182
|
+
), M = 4, g = Math.max(20, t.width - M * 2), I = (t.width - g) / 2, R = {
|
|
183
|
+
fill: c + "80",
|
|
160
184
|
stroke: "#ffffff",
|
|
161
185
|
strokeWidth: 2,
|
|
162
186
|
perfectDrawEnabled: !1,
|
|
163
187
|
hitStrokeWidth: 0
|
|
164
|
-
},
|
|
165
|
-
switch (
|
|
188
|
+
}, F = () => {
|
|
189
|
+
switch (r) {
|
|
166
190
|
case "circle": {
|
|
167
|
-
const
|
|
168
|
-
return /* @__PURE__ */
|
|
169
|
-
|
|
191
|
+
const E = Math.min(t.width, t.height) / 2;
|
|
192
|
+
return /* @__PURE__ */ f(
|
|
193
|
+
$e,
|
|
170
194
|
{
|
|
171
195
|
x: t.width / 2,
|
|
172
196
|
y: t.height / 2,
|
|
173
|
-
radius:
|
|
197
|
+
radius: E,
|
|
174
198
|
...R
|
|
175
199
|
}
|
|
176
200
|
);
|
|
177
201
|
}
|
|
178
202
|
case "triangle": {
|
|
179
|
-
const
|
|
180
|
-
return /* @__PURE__ */
|
|
203
|
+
const E = Math.min(t.width, t.height) / 2;
|
|
204
|
+
return /* @__PURE__ */ f(
|
|
181
205
|
yt,
|
|
182
206
|
{
|
|
183
207
|
x: t.width / 2,
|
|
184
208
|
y: t.height / 2,
|
|
185
209
|
sides: 3,
|
|
186
|
-
radius:
|
|
210
|
+
radius: E,
|
|
187
211
|
rotation: -90,
|
|
188
212
|
...R
|
|
189
213
|
}
|
|
190
214
|
);
|
|
191
215
|
}
|
|
192
216
|
case "arrow": {
|
|
193
|
-
const
|
|
194
|
-
return /* @__PURE__ */
|
|
217
|
+
const E = t.width / 24, L = t.height / 24, N = `M${9 * E},${18 * L} v${-8 * L} H${5 * E} l${7 * E},${-7 * L} l${7 * E},${7 * L} h${-4 * E} v${8 * L} Z`;
|
|
218
|
+
return /* @__PURE__ */ f(vt, { data: N, ...R });
|
|
195
219
|
}
|
|
196
220
|
default:
|
|
197
|
-
return /* @__PURE__ */
|
|
198
|
-
|
|
221
|
+
return /* @__PURE__ */ f(
|
|
222
|
+
ke,
|
|
199
223
|
{
|
|
200
224
|
width: t.width,
|
|
201
225
|
height: t.height,
|
|
@@ -205,30 +229,38 @@ const We = J(({ stage: n, stageColor: r }) => {
|
|
|
205
229
|
);
|
|
206
230
|
}
|
|
207
231
|
};
|
|
208
|
-
return /* @__PURE__ */ D(
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
232
|
+
return /* @__PURE__ */ D(
|
|
233
|
+
bt,
|
|
234
|
+
{
|
|
235
|
+
x: n.position.x,
|
|
236
|
+
y: n.position.y,
|
|
237
|
+
rotation: t.rotation || 0,
|
|
238
|
+
children: [
|
|
239
|
+
F(),
|
|
240
|
+
d && /* @__PURE__ */ f(
|
|
241
|
+
Ne,
|
|
242
|
+
{
|
|
243
|
+
text: t.label,
|
|
244
|
+
x: I,
|
|
245
|
+
y: M,
|
|
246
|
+
width: g,
|
|
247
|
+
height: t.height - M * 2,
|
|
248
|
+
fontSize: m,
|
|
249
|
+
fontStyle: "bold",
|
|
250
|
+
fill: "#ffffff",
|
|
251
|
+
align: "center",
|
|
252
|
+
verticalAlign: "middle",
|
|
253
|
+
wrap: "word",
|
|
254
|
+
ellipsis: !0
|
|
255
|
+
}
|
|
256
|
+
)
|
|
257
|
+
]
|
|
258
|
+
}
|
|
259
|
+
);
|
|
228
260
|
});
|
|
229
|
-
|
|
230
|
-
const
|
|
231
|
-
|
|
261
|
+
Ye.displayName = "ViewerStage";
|
|
262
|
+
const Ae = Q(({ text: n }) => /* @__PURE__ */ f(
|
|
263
|
+
Ne,
|
|
232
264
|
{
|
|
233
265
|
x: n.position.x,
|
|
234
266
|
y: n.position.y,
|
|
@@ -239,448 +271,490 @@ const Pe = J(({ text: n }) => /* @__PURE__ */ u(
|
|
|
239
271
|
listening: !1
|
|
240
272
|
}
|
|
241
273
|
));
|
|
242
|
-
|
|
243
|
-
const
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
});
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
maxScale: t,
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
"
|
|
333
|
-
"
|
|
334
|
-
"
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
/* @__PURE__ */
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
/* @__PURE__ */ u("span", { style: s, children: "Price:" }),
|
|
433
|
-
/* @__PURE__ */ D("span", { style: f, children: [
|
|
434
|
-
d,
|
|
435
|
-
" ",
|
|
436
|
-
o.price.toFixed(2)
|
|
274
|
+
Ae.displayName = "ViewerText";
|
|
275
|
+
const Be = Q(
|
|
276
|
+
({
|
|
277
|
+
floors: n,
|
|
278
|
+
currentFloorId: o,
|
|
279
|
+
onFloorChange: t,
|
|
280
|
+
showAllOption: r,
|
|
281
|
+
allLabel: d,
|
|
282
|
+
position: c,
|
|
283
|
+
className: s
|
|
284
|
+
}) => {
|
|
285
|
+
const v = B(
|
|
286
|
+
() => [...n].sort((u, w) => u.order - w.order),
|
|
287
|
+
[n]
|
|
288
|
+
), i = {
|
|
289
|
+
position: "absolute",
|
|
290
|
+
display: "flex",
|
|
291
|
+
alignItems: "center",
|
|
292
|
+
gap: "8px",
|
|
293
|
+
padding: "8px 12px",
|
|
294
|
+
backgroundColor: "rgba(26, 26, 26, 0.95)",
|
|
295
|
+
borderRadius: "8px",
|
|
296
|
+
margin: "12px",
|
|
297
|
+
zIndex: 10,
|
|
298
|
+
...{
|
|
299
|
+
"top-left": { top: 0, left: 0 },
|
|
300
|
+
"top-right": { top: 0, right: 0 },
|
|
301
|
+
"bottom-left": { bottom: 0, left: 0 },
|
|
302
|
+
"bottom-right": { bottom: 0, right: 0 }
|
|
303
|
+
}[c]
|
|
304
|
+
}, b = {
|
|
305
|
+
padding: "10px 16px",
|
|
306
|
+
fontSize: "14px",
|
|
307
|
+
fontWeight: 500,
|
|
308
|
+
border: "1px solid #444",
|
|
309
|
+
borderRadius: "6px",
|
|
310
|
+
backgroundColor: "transparent",
|
|
311
|
+
color: "#fff",
|
|
312
|
+
cursor: "pointer",
|
|
313
|
+
transition: "all 0.2s ease",
|
|
314
|
+
minHeight: "44px",
|
|
315
|
+
touchAction: "manipulation"
|
|
316
|
+
}, y = {
|
|
317
|
+
...b,
|
|
318
|
+
backgroundColor: "#3A7DE5",
|
|
319
|
+
borderColor: "#3A7DE5"
|
|
320
|
+
};
|
|
321
|
+
return /* @__PURE__ */ D("div", { className: s, style: i, children: [
|
|
322
|
+
r && /* @__PURE__ */ f(
|
|
323
|
+
"button",
|
|
324
|
+
{
|
|
325
|
+
type: "button",
|
|
326
|
+
onClick: () => t(null),
|
|
327
|
+
style: o === null ? y : b,
|
|
328
|
+
children: d
|
|
329
|
+
}
|
|
330
|
+
),
|
|
331
|
+
v.map((u) => /* @__PURE__ */ f(
|
|
332
|
+
"button",
|
|
333
|
+
{
|
|
334
|
+
type: "button",
|
|
335
|
+
onClick: () => t(u.id),
|
|
336
|
+
style: o === u.id ? y : b,
|
|
337
|
+
children: u.name
|
|
338
|
+
},
|
|
339
|
+
u.id
|
|
340
|
+
))
|
|
341
|
+
] });
|
|
342
|
+
}
|
|
343
|
+
);
|
|
344
|
+
Be.displayName = "FloorSelectorBar";
|
|
345
|
+
const Ue = Q(
|
|
346
|
+
({ scale: n, minScale: o, maxScale: t, onZoomIn: r, onZoomOut: d, position: c, className: s }) => {
|
|
347
|
+
const h = {
|
|
348
|
+
position: "absolute",
|
|
349
|
+
display: "flex",
|
|
350
|
+
flexDirection: "column",
|
|
351
|
+
gap: "4px",
|
|
352
|
+
padding: "8px",
|
|
353
|
+
backgroundColor: "rgba(26, 26, 26, 0.95)",
|
|
354
|
+
borderRadius: "8px",
|
|
355
|
+
margin: "12px",
|
|
356
|
+
zIndex: 10,
|
|
357
|
+
...{
|
|
358
|
+
"top-left": { top: 0, left: 0 },
|
|
359
|
+
"top-right": { top: 0, right: 0 },
|
|
360
|
+
"bottom-left": { bottom: 0, left: 0 },
|
|
361
|
+
"bottom-right": { bottom: 0, right: 0 }
|
|
362
|
+
}[c]
|
|
363
|
+
}, i = {
|
|
364
|
+
width: "44px",
|
|
365
|
+
height: "44px",
|
|
366
|
+
minWidth: "44px",
|
|
367
|
+
minHeight: "44px",
|
|
368
|
+
fontSize: "22px",
|
|
369
|
+
fontWeight: "bold",
|
|
370
|
+
border: "1px solid #444",
|
|
371
|
+
borderRadius: "6px",
|
|
372
|
+
backgroundColor: "transparent",
|
|
373
|
+
color: "#fff",
|
|
374
|
+
cursor: "pointer",
|
|
375
|
+
display: "flex",
|
|
376
|
+
alignItems: "center",
|
|
377
|
+
justifyContent: "center",
|
|
378
|
+
transition: "all 0.2s ease",
|
|
379
|
+
touchAction: "manipulation"
|
|
380
|
+
}, b = {
|
|
381
|
+
...i,
|
|
382
|
+
opacity: 0.4,
|
|
383
|
+
cursor: "not-allowed"
|
|
384
|
+
}, y = n < t, u = n > o;
|
|
385
|
+
return /* @__PURE__ */ D("div", { className: s, style: h, children: [
|
|
386
|
+
/* @__PURE__ */ f(
|
|
387
|
+
"button",
|
|
388
|
+
{
|
|
389
|
+
type: "button",
|
|
390
|
+
onClick: r,
|
|
391
|
+
disabled: !y,
|
|
392
|
+
style: y ? i : b,
|
|
393
|
+
title: "Zoom In",
|
|
394
|
+
children: "+"
|
|
395
|
+
}
|
|
396
|
+
),
|
|
397
|
+
/* @__PURE__ */ f(
|
|
398
|
+
"button",
|
|
399
|
+
{
|
|
400
|
+
type: "button",
|
|
401
|
+
onClick: d,
|
|
402
|
+
disabled: !u,
|
|
403
|
+
style: u ? i : b,
|
|
404
|
+
title: "Zoom Out",
|
|
405
|
+
children: "−"
|
|
406
|
+
}
|
|
407
|
+
)
|
|
408
|
+
] });
|
|
409
|
+
}
|
|
410
|
+
);
|
|
411
|
+
Ue.displayName = "ZoomControls";
|
|
412
|
+
const He = Q(
|
|
413
|
+
({ visible: n, x: o, y: t, seat: r, currency: d, state: c }) => {
|
|
414
|
+
if (!n || !r) return null;
|
|
415
|
+
const s = r.seatNumber || (r.rowLabel && r.columnLabel ? `${r.rowLabel}-${r.columnLabel}` : "N/A"), v = {
|
|
416
|
+
position: "fixed",
|
|
417
|
+
left: `${o + 15}px`,
|
|
418
|
+
top: `${t + 15}px`,
|
|
419
|
+
zIndex: 1e3,
|
|
420
|
+
pointerEvents: "none"
|
|
421
|
+
}, h = {
|
|
422
|
+
backgroundColor: "rgba(26, 26, 26, 0.95)",
|
|
423
|
+
color: "#fff",
|
|
424
|
+
border: "1px solid #444",
|
|
425
|
+
borderRadius: "8px",
|
|
426
|
+
padding: "8px 12px",
|
|
427
|
+
fontSize: "13px",
|
|
428
|
+
boxShadow: "0 4px 12px rgba(0, 0, 0, 0.3)",
|
|
429
|
+
minWidth: "140px"
|
|
430
|
+
}, i = {
|
|
431
|
+
color: "#9ca3af",
|
|
432
|
+
marginRight: "4px"
|
|
433
|
+
}, b = {
|
|
434
|
+
fontWeight: 600
|
|
435
|
+
}, y = {
|
|
436
|
+
color: "#4ade80",
|
|
437
|
+
fontWeight: 600
|
|
438
|
+
}, u = {
|
|
439
|
+
fontSize: "11px",
|
|
440
|
+
color: "#6b7280",
|
|
441
|
+
textTransform: "capitalize",
|
|
442
|
+
marginTop: "4px"
|
|
443
|
+
};
|
|
444
|
+
return /* @__PURE__ */ f("div", { style: v, children: /* @__PURE__ */ D("div", { style: h, children: [
|
|
445
|
+
r.sectionName && /* @__PURE__ */ D("div", { style: { marginBottom: "4px" }, children: [
|
|
446
|
+
/* @__PURE__ */ f("span", { style: i, children: "Section:" }),
|
|
447
|
+
/* @__PURE__ */ f("span", { style: { ...b, color: "#3b82f6" }, children: r.sectionName })
|
|
448
|
+
] }),
|
|
449
|
+
/* @__PURE__ */ D("div", { style: { marginBottom: "4px" }, children: [
|
|
450
|
+
/* @__PURE__ */ f("span", { style: i, children: "Seat:" }),
|
|
451
|
+
/* @__PURE__ */ f("span", { style: b, children: s })
|
|
452
|
+
] }),
|
|
453
|
+
r.price !== void 0 && r.price > 0 && c === "available" && /* @__PURE__ */ D("div", { style: { marginBottom: "4px" }, children: [
|
|
454
|
+
/* @__PURE__ */ f("span", { style: i, children: "Price:" }),
|
|
455
|
+
/* @__PURE__ */ D("span", { style: y, children: [
|
|
456
|
+
d,
|
|
457
|
+
" ",
|
|
458
|
+
r.price.toFixed(2)
|
|
459
|
+
] })
|
|
460
|
+
] }),
|
|
461
|
+
/* @__PURE__ */ D("div", { style: u, children: [
|
|
462
|
+
"Status: ",
|
|
463
|
+
c
|
|
437
464
|
] })
|
|
438
|
-
] })
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
] })
|
|
443
|
-
] }) });
|
|
444
|
-
});
|
|
445
|
-
Ae.displayName = "SeatTooltip";
|
|
465
|
+
] }) });
|
|
466
|
+
}
|
|
467
|
+
);
|
|
468
|
+
He.displayName = "SeatTooltip";
|
|
446
469
|
const Nt = ({
|
|
447
470
|
config: n,
|
|
448
|
-
configUrl:
|
|
471
|
+
configUrl: o,
|
|
449
472
|
floorId: t,
|
|
450
|
-
onFloorChange:
|
|
473
|
+
onFloorChange: r,
|
|
451
474
|
reservedSeats: d = [],
|
|
452
|
-
otherReservedSeats:
|
|
475
|
+
otherReservedSeats: c,
|
|
453
476
|
// v2.4.0: New prop name (preferred)
|
|
454
|
-
unavailableSeats:
|
|
455
|
-
selectedSeats:
|
|
456
|
-
myReservedSeats:
|
|
457
|
-
onSeatSelect:
|
|
458
|
-
onSeatDeselect:
|
|
459
|
-
onSelectionChange:
|
|
460
|
-
colorOverrides:
|
|
461
|
-
showTooltip:
|
|
462
|
-
zoomEnabled:
|
|
463
|
-
className:
|
|
464
|
-
onConfigLoad:
|
|
465
|
-
onError:
|
|
477
|
+
unavailableSeats: s = [],
|
|
478
|
+
selectedSeats: v,
|
|
479
|
+
myReservedSeats: h = [],
|
|
480
|
+
onSeatSelect: i,
|
|
481
|
+
onSeatDeselect: b,
|
|
482
|
+
onSelectionChange: y,
|
|
483
|
+
colorOverrides: u,
|
|
484
|
+
showTooltip: w = !0,
|
|
485
|
+
zoomEnabled: m = !0,
|
|
486
|
+
className: M = "",
|
|
487
|
+
onConfigLoad: g,
|
|
488
|
+
onError: I,
|
|
466
489
|
// Floor selector props
|
|
467
490
|
showFloorSelector: R,
|
|
468
|
-
floorSelectorPosition:
|
|
469
|
-
floorSelectorClassName:
|
|
491
|
+
floorSelectorPosition: F = "top-left",
|
|
492
|
+
floorSelectorClassName: E,
|
|
470
493
|
showAllFloorsOption: L = !0,
|
|
471
|
-
allFloorsLabel:
|
|
494
|
+
allFloorsLabel: N = "All",
|
|
472
495
|
fitToView: Y = !0,
|
|
473
|
-
fitPadding:
|
|
496
|
+
fitPadding: V = 40,
|
|
474
497
|
// Zoom controls
|
|
475
|
-
showZoomControls:
|
|
476
|
-
zoomControlsPosition:
|
|
477
|
-
zoomControlsClassName:
|
|
478
|
-
minZoom:
|
|
479
|
-
maxZoom:
|
|
480
|
-
zoomStep:
|
|
498
|
+
showZoomControls: se = !0,
|
|
499
|
+
zoomControlsPosition: ae = "bottom-right",
|
|
500
|
+
zoomControlsClassName: ce,
|
|
501
|
+
minZoom: le,
|
|
502
|
+
maxZoom: A = 3,
|
|
503
|
+
zoomStep: _ = 0.25,
|
|
481
504
|
// Touch gestures
|
|
482
505
|
touchEnabled: Ve = !0
|
|
483
506
|
}) => {
|
|
484
|
-
const
|
|
485
|
-
|
|
486
|
-
}, [
|
|
487
|
-
() =>
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
507
|
+
const Ie = c !== void 0 ? c : d, ve = P(null), Fe = P(null), z = wt(Fe), [q, Le] = W(
|
|
508
|
+
/* @__PURE__ */ new Set()
|
|
509
|
+
), [$, ee] = W(1), [X, Z] = W({ x: 0, y: 0 }), [Oe, je] = W(null), [_e, qe] = W(1), de = P({ width: 0, height: 0 }), [te, Te] = W({ visible: !1, x: 0, y: 0, seat: null, state: "available" }), { config: Ze, loading: Ge, error: ne } = xt(o), l = n || Ze, ye = t !== void 0, k = ye ? t || null : Oe, he = v !== void 0, Ke = T(
|
|
510
|
+
(e) => {
|
|
511
|
+
ye || je(e), r?.(e);
|
|
512
|
+
},
|
|
513
|
+
[ye, r]
|
|
514
|
+
), me = l?.floors || [], Je = R !== void 0 ? R : me.length > 1, ue = B(
|
|
515
|
+
() => l ? { ...l.colors, ...u } : { ...Rt, ...u },
|
|
516
|
+
[l, u]
|
|
517
|
+
), G = B(() => {
|
|
518
|
+
if (!l) return [];
|
|
519
|
+
let e = l.seats.filter((a) => a.state !== "hidden");
|
|
520
|
+
return k && (e = e.filter(
|
|
521
|
+
(a) => a.floorId === k || !a.floorId && k === "floor_default"
|
|
494
522
|
)), e;
|
|
495
|
-
}, [
|
|
496
|
-
(e) => e.floorId ===
|
|
497
|
-
) :
|
|
498
|
-
(e) => e.floorId ===
|
|
499
|
-
) :
|
|
500
|
-
if (!
|
|
523
|
+
}, [l, k]), fe = B(() => l?.stages ? k ? l.stages.filter(
|
|
524
|
+
(e) => e.floorId === k || !e.floorId && k === "floor_default"
|
|
525
|
+
) : l.stages : [], [l, k]), ge = B(() => l?.texts ? k ? l.texts.filter(
|
|
526
|
+
(e) => e.floorId === k || !e.floorId && k === "floor_default"
|
|
527
|
+
) : l.texts : [], [l, k]), H = B(() => {
|
|
528
|
+
if (!l || G.length === 0 && fe.length === 0 && ge.length === 0)
|
|
501
529
|
return null;
|
|
502
530
|
const e = 12;
|
|
503
|
-
let
|
|
504
|
-
return
|
|
505
|
-
|
|
506
|
-
}),
|
|
507
|
-
|
|
508
|
-
}),
|
|
509
|
-
const j =
|
|
510
|
-
|
|
511
|
-
}), { minX:
|
|
512
|
-
}, [
|
|
513
|
-
|
|
514
|
-
if (!Y || !
|
|
515
|
-
const e = Math.abs(
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
const
|
|
523
|
-
|
|
524
|
-
}, [
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
}, [
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
const
|
|
553
|
-
|
|
554
|
-
|
|
531
|
+
let a = 1 / 0, p = 1 / 0, S = -1 / 0, C = -1 / 0;
|
|
532
|
+
return G.forEach((x) => {
|
|
533
|
+
a = Math.min(a, x.position.x - e), p = Math.min(p, x.position.y - e), S = Math.max(S, x.position.x + e), C = Math.max(C, x.position.y + e);
|
|
534
|
+
}), fe.forEach((x) => {
|
|
535
|
+
a = Math.min(a, x.position.x), p = Math.min(p, x.position.y), S = Math.max(S, x.position.x + (x.config?.width || 200)), C = Math.max(C, x.position.y + (x.config?.height || 100));
|
|
536
|
+
}), ge.forEach((x) => {
|
|
537
|
+
const j = x.config.text.length * x.config.fontSize * 0.6, J = x.config.fontSize;
|
|
538
|
+
a = Math.min(a, x.position.x), p = Math.min(p, x.position.y), S = Math.max(S, x.position.x + j), C = Math.max(C, x.position.y + J);
|
|
539
|
+
}), { minX: a, minY: p, maxX: S, maxY: C, width: S - a, height: C - p };
|
|
540
|
+
}, [l, G, fe, ge]);
|
|
541
|
+
U(() => {
|
|
542
|
+
if (!Y || !l || !H || z.width === 0 || z.height === 0) return;
|
|
543
|
+
const e = Math.abs(
|
|
544
|
+
z.width - de.current.width
|
|
545
|
+
), a = Math.abs(
|
|
546
|
+
z.height - de.current.height
|
|
547
|
+
);
|
|
548
|
+
if (!(de.current.width === 0) && e < 10 && a < 10) return;
|
|
549
|
+
de.current = z;
|
|
550
|
+
const S = z.width, C = z.height, x = S - V * 2, j = C - V * 2, J = x / H.width, xe = j / H.height, pe = Math.min(J, xe, A), ct = H.minX + H.width / 2, lt = H.minY + H.height / 2, dt = S / 2, ht = C / 2, ut = dt - ct * pe, ft = ht - lt * pe;
|
|
551
|
+
ee(pe), Z({ x: ut, y: ft }), qe(pe);
|
|
552
|
+
}, [
|
|
553
|
+
Y,
|
|
554
|
+
l,
|
|
555
|
+
H,
|
|
556
|
+
V,
|
|
557
|
+
A,
|
|
558
|
+
z,
|
|
559
|
+
k
|
|
560
|
+
]);
|
|
561
|
+
const O = B(() => {
|
|
562
|
+
const e = new Set(Ie), a = new Set(s), p = new Set(h);
|
|
563
|
+
return { reserved: e, unavailable: a, myReserved: p };
|
|
564
|
+
}, [Ie, s, h]), Se = B(() => v ? new Set(v) : null, [v]), re = T(
|
|
565
|
+
(e) => {
|
|
566
|
+
const a = e.id, p = e.seatNumber || "";
|
|
567
|
+
return O.unavailable.has(a) || O.unavailable.has(p) ? "unavailable" : O.reserved.has(a) || O.reserved.has(p) ? "reserved" : O.myReserved.has(a) || O.myReserved.has(p) || q.has(a) ? "selected" : e.state;
|
|
568
|
+
},
|
|
569
|
+
[O, q]
|
|
570
|
+
);
|
|
571
|
+
U(() => {
|
|
572
|
+
l && g && g(l);
|
|
573
|
+
}, [l, g]), U(() => {
|
|
574
|
+
ne && I && I(ne);
|
|
575
|
+
}, [ne, I]), U(() => {
|
|
576
|
+
he && Se && Le(Se);
|
|
577
|
+
}, [he, Se]);
|
|
578
|
+
const Qe = T(
|
|
579
|
+
(e) => {
|
|
580
|
+
const a = re(e);
|
|
581
|
+
if (a !== "available" && a !== "selected")
|
|
582
|
+
return;
|
|
583
|
+
const p = q.has(e.id);
|
|
584
|
+
he || Le((S) => {
|
|
585
|
+
const C = new Set(S);
|
|
586
|
+
return p ? C.delete(e.id) : C.add(e.id), C;
|
|
587
|
+
}), p ? b?.(e) : (i?.(e), i || console.log("Seat selected:", e));
|
|
588
|
+
},
|
|
589
|
+
[
|
|
590
|
+
re,
|
|
591
|
+
q,
|
|
592
|
+
he,
|
|
593
|
+
i,
|
|
594
|
+
b
|
|
595
|
+
]
|
|
596
|
+
), oe = B(() => l ? G.filter((e) => q.has(e.id)) : [], [l, G, q]);
|
|
597
|
+
U(() => {
|
|
598
|
+
y?.(oe);
|
|
599
|
+
}, [oe, y]);
|
|
600
|
+
const K = le !== void 0 ? le : _e, et = T(() => {
|
|
601
|
+
if (!m) return;
|
|
602
|
+
const e = Math.min($ + _, A);
|
|
603
|
+
if (e !== $) {
|
|
604
|
+
const a = z.width || l?.canvas.width || 800, p = z.height || l?.canvas.height || 600, S = a / 2, C = p / 2, x = {
|
|
605
|
+
x: (S - X.x) / $,
|
|
606
|
+
y: (C - X.y) / $
|
|
555
607
|
};
|
|
556
|
-
|
|
557
|
-
x:
|
|
558
|
-
y:
|
|
608
|
+
ee(e), Z({
|
|
609
|
+
x: S - x.x * e,
|
|
610
|
+
y: C - x.y * e
|
|
559
611
|
});
|
|
560
612
|
}
|
|
561
|
-
}, [
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
613
|
+
}, [
|
|
614
|
+
m,
|
|
615
|
+
$,
|
|
616
|
+
_,
|
|
617
|
+
A,
|
|
618
|
+
z,
|
|
619
|
+
l,
|
|
620
|
+
X
|
|
621
|
+
]), tt = T(() => {
|
|
622
|
+
if (!m) return;
|
|
623
|
+
const e = Math.max($ - _, K);
|
|
624
|
+
if (e !== $) {
|
|
625
|
+
const a = z.width || l?.canvas.width || 800, p = z.height || l?.canvas.height || 600, S = a / 2, C = p / 2, x = {
|
|
626
|
+
x: (S - X.x) / $,
|
|
627
|
+
y: (C - X.y) / $
|
|
568
628
|
};
|
|
569
|
-
|
|
570
|
-
x:
|
|
571
|
-
y:
|
|
629
|
+
ee(e), Z({
|
|
630
|
+
x: S - x.x * e,
|
|
631
|
+
y: C - x.y * e
|
|
572
632
|
});
|
|
573
633
|
}
|
|
574
|
-
}, [
|
|
575
|
-
|
|
634
|
+
}, [
|
|
635
|
+
m,
|
|
636
|
+
$,
|
|
637
|
+
_,
|
|
638
|
+
K,
|
|
639
|
+
z,
|
|
640
|
+
l,
|
|
641
|
+
X
|
|
642
|
+
]), nt = T((e) => {
|
|
643
|
+
Z({
|
|
576
644
|
x: e.target.x(),
|
|
577
645
|
y: e.target.y()
|
|
578
646
|
});
|
|
579
|
-
}, []), rt =
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
x: (
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
Ct(fe, {
|
|
596
|
-
enabled: Ve && g,
|
|
597
|
-
minScale: G,
|
|
598
|
-
maxScale: U,
|
|
599
|
-
currentScale: N,
|
|
600
|
-
currentPosition: P,
|
|
601
|
-
onScaleChange: (e, c) => {
|
|
602
|
-
Q(e), V(c);
|
|
647
|
+
}, []), rt = T(
|
|
648
|
+
(e) => {
|
|
649
|
+
if (!m) return;
|
|
650
|
+
e.evt.preventDefault();
|
|
651
|
+
const a = ve.current;
|
|
652
|
+
if (!a) return;
|
|
653
|
+
const p = a.scaleX(), S = a.getPointerPosition();
|
|
654
|
+
if (!S) return;
|
|
655
|
+
const C = 1.1, x = e.evt.deltaY > 0 ? p / C : p * C, j = Math.min(Math.max(x, K), A), J = {
|
|
656
|
+
x: (S.x - X.x) / p,
|
|
657
|
+
y: (S.y - X.y) / p
|
|
658
|
+
}, xe = {
|
|
659
|
+
x: S.x - J.x * j,
|
|
660
|
+
y: S.y - J.y * j
|
|
661
|
+
};
|
|
662
|
+
ee(j), Z(xe);
|
|
603
663
|
},
|
|
604
|
-
|
|
605
|
-
|
|
664
|
+
[m, X, K, A]
|
|
665
|
+
);
|
|
666
|
+
Ct(ve, {
|
|
667
|
+
enabled: Ve && m,
|
|
668
|
+
minScale: K,
|
|
669
|
+
maxScale: A,
|
|
670
|
+
currentScale: $,
|
|
671
|
+
currentPosition: X,
|
|
672
|
+
onScaleChange: (e, a) => {
|
|
673
|
+
ee(e), Z(a);
|
|
606
674
|
}
|
|
607
675
|
});
|
|
608
|
-
const ot =
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
676
|
+
const ot = T(
|
|
677
|
+
(e, a) => {
|
|
678
|
+
if (!w) return;
|
|
679
|
+
const p = a.target.getStage();
|
|
680
|
+
if (!p) return;
|
|
681
|
+
const S = p.getPointerPosition();
|
|
682
|
+
if (!S) return;
|
|
683
|
+
const C = p.container().getBoundingClientRect();
|
|
684
|
+
Te({
|
|
685
|
+
visible: !0,
|
|
686
|
+
x: C.left + S.x,
|
|
687
|
+
y: C.top + S.y,
|
|
688
|
+
seat: e,
|
|
689
|
+
state: re(e)
|
|
690
|
+
});
|
|
691
|
+
},
|
|
692
|
+
[w, re]
|
|
693
|
+
), it = T(() => {
|
|
694
|
+
Te((e) => ({ ...e, visible: !1 }));
|
|
624
695
|
}, []);
|
|
625
696
|
if (Ge)
|
|
626
|
-
return /* @__PURE__ */
|
|
627
|
-
if (
|
|
628
|
-
return /* @__PURE__ */
|
|
697
|
+
return /* @__PURE__ */ f("div", { className: `flex items-center justify-center h-full ${M}`, children: /* @__PURE__ */ f("p", { children: "Loading seat map..." }) });
|
|
698
|
+
if (ne)
|
|
699
|
+
return /* @__PURE__ */ f("div", { className: `flex items-center justify-center h-full ${M}`, children: /* @__PURE__ */ D("p", { className: "text-red-500", children: [
|
|
629
700
|
"Error loading seat map: ",
|
|
630
|
-
|
|
701
|
+
ne.message
|
|
631
702
|
] }) });
|
|
632
|
-
if (!
|
|
633
|
-
return /* @__PURE__ */
|
|
634
|
-
const st =
|
|
703
|
+
if (!l)
|
|
704
|
+
return /* @__PURE__ */ f("div", { className: `flex items-center justify-center h-full ${M}`, children: /* @__PURE__ */ f("p", { children: "No configuration provided" }) });
|
|
705
|
+
const st = z.width || l.canvas.width, at = z.height || l.canvas.height;
|
|
635
706
|
return /* @__PURE__ */ D(
|
|
636
707
|
"div",
|
|
637
708
|
{
|
|
638
|
-
ref:
|
|
639
|
-
className: `relative ${
|
|
709
|
+
ref: Fe,
|
|
710
|
+
className: `relative ${M}`,
|
|
640
711
|
style: { width: "100%", height: "100%" },
|
|
641
712
|
children: [
|
|
642
|
-
Je &&
|
|
643
|
-
|
|
713
|
+
Je && me.length > 0 && /* @__PURE__ */ f(
|
|
714
|
+
Be,
|
|
644
715
|
{
|
|
645
|
-
floors:
|
|
646
|
-
currentFloorId:
|
|
716
|
+
floors: me,
|
|
717
|
+
currentFloorId: k,
|
|
647
718
|
onFloorChange: Ke,
|
|
648
719
|
showAllOption: L,
|
|
649
|
-
allLabel:
|
|
650
|
-
position:
|
|
651
|
-
className:
|
|
720
|
+
allLabel: N,
|
|
721
|
+
position: F,
|
|
722
|
+
className: E
|
|
652
723
|
}
|
|
653
724
|
),
|
|
654
725
|
/* @__PURE__ */ D(
|
|
655
726
|
pt,
|
|
656
727
|
{
|
|
657
|
-
ref:
|
|
728
|
+
ref: ve,
|
|
658
729
|
width: st,
|
|
659
730
|
height: at,
|
|
660
|
-
scaleX:
|
|
661
|
-
scaleY:
|
|
662
|
-
x:
|
|
663
|
-
y:
|
|
731
|
+
scaleX: $,
|
|
732
|
+
scaleY: $,
|
|
733
|
+
x: X.x,
|
|
734
|
+
y: X.y,
|
|
664
735
|
draggable: !0,
|
|
665
736
|
onDragEnd: nt,
|
|
666
737
|
onWheel: rt,
|
|
667
|
-
style: {
|
|
738
|
+
style: {
|
|
739
|
+
backgroundColor: l.canvas.backgroundColor,
|
|
740
|
+
cursor: "grab"
|
|
741
|
+
},
|
|
668
742
|
children: [
|
|
669
|
-
/* @__PURE__ */
|
|
670
|
-
|
|
743
|
+
/* @__PURE__ */ f(we, { listening: !1, children: fe.map((e) => /* @__PURE__ */ f(
|
|
744
|
+
Ye,
|
|
671
745
|
{
|
|
672
746
|
stage: e,
|
|
673
|
-
stageColor:
|
|
747
|
+
stageColor: ue.stageColor
|
|
674
748
|
},
|
|
675
749
|
e.id
|
|
676
750
|
)) }),
|
|
677
|
-
/* @__PURE__ */
|
|
678
|
-
/* @__PURE__ */
|
|
679
|
-
|
|
751
|
+
/* @__PURE__ */ f(we, { listening: !1, children: ge.map((e) => /* @__PURE__ */ f(Ae, { text: e }, e.id)) }),
|
|
752
|
+
/* @__PURE__ */ f(we, { children: G.map((e) => /* @__PURE__ */ f(
|
|
753
|
+
Pe,
|
|
680
754
|
{
|
|
681
755
|
seat: e,
|
|
682
|
-
state:
|
|
683
|
-
colors:
|
|
756
|
+
state: re(e),
|
|
757
|
+
colors: ue,
|
|
684
758
|
onClick: Qe,
|
|
685
759
|
onMouseEnter: ot,
|
|
686
760
|
onMouseLeave: it
|
|
@@ -690,77 +764,77 @@ const Nt = ({
|
|
|
690
764
|
]
|
|
691
765
|
}
|
|
692
766
|
),
|
|
693
|
-
|
|
694
|
-
|
|
767
|
+
w && /* @__PURE__ */ f(
|
|
768
|
+
He,
|
|
695
769
|
{
|
|
696
|
-
visible:
|
|
697
|
-
x:
|
|
698
|
-
y:
|
|
699
|
-
seat:
|
|
700
|
-
currency:
|
|
701
|
-
state:
|
|
770
|
+
visible: te.visible,
|
|
771
|
+
x: te.x,
|
|
772
|
+
y: te.y,
|
|
773
|
+
seat: te.seat,
|
|
774
|
+
currency: ue.currency,
|
|
775
|
+
state: te.state
|
|
702
776
|
}
|
|
703
777
|
),
|
|
704
|
-
|
|
705
|
-
|
|
778
|
+
se && m && /* @__PURE__ */ f(
|
|
779
|
+
Ue,
|
|
706
780
|
{
|
|
707
|
-
scale:
|
|
708
|
-
minScale:
|
|
709
|
-
maxScale:
|
|
781
|
+
scale: $,
|
|
782
|
+
minScale: K,
|
|
783
|
+
maxScale: A,
|
|
710
784
|
onZoomIn: et,
|
|
711
785
|
onZoomOut: tt,
|
|
712
|
-
position:
|
|
713
|
-
className:
|
|
786
|
+
position: ae,
|
|
787
|
+
className: ce
|
|
714
788
|
}
|
|
715
789
|
),
|
|
716
|
-
|
|
790
|
+
oe.length > 0 && /* @__PURE__ */ D("div", { className: "absolute top-4 right-4 bg-white dark:bg-gray-800 p-4 rounded shadow-lg", children: [
|
|
717
791
|
/* @__PURE__ */ D("h3", { className: "font-semibold mb-2", children: [
|
|
718
792
|
"Selected Seats (",
|
|
719
|
-
|
|
793
|
+
oe.length,
|
|
720
794
|
")"
|
|
721
795
|
] }),
|
|
722
|
-
/* @__PURE__ */
|
|
796
|
+
/* @__PURE__ */ f("div", { className: "max-h-48 overflow-y-auto space-y-1", children: oe.map((e) => /* @__PURE__ */ D("div", { className: "text-sm", children: [
|
|
723
797
|
e.seatNumber,
|
|
724
|
-
e.price && ` - ${
|
|
798
|
+
e.price && ` - ${ue.currency} ${e.price.toFixed(2)}`
|
|
725
799
|
] }, e.id)) })
|
|
726
800
|
] })
|
|
727
801
|
]
|
|
728
802
|
}
|
|
729
803
|
);
|
|
730
804
|
};
|
|
731
|
-
let
|
|
805
|
+
let ie = null;
|
|
732
806
|
function $t(n) {
|
|
733
|
-
|
|
807
|
+
ie = n;
|
|
734
808
|
}
|
|
735
|
-
function
|
|
736
|
-
if (!
|
|
809
|
+
function Me() {
|
|
810
|
+
if (!ie)
|
|
737
811
|
throw new Error(
|
|
738
812
|
"Firebase database not initialized. Call initializeFirebaseForViewer(db) first."
|
|
739
813
|
);
|
|
740
|
-
return
|
|
814
|
+
return ie;
|
|
741
815
|
}
|
|
742
|
-
function
|
|
743
|
-
return
|
|
816
|
+
function Ee() {
|
|
817
|
+
return ie !== null;
|
|
744
818
|
}
|
|
745
819
|
function kt() {
|
|
746
|
-
|
|
820
|
+
ie = null;
|
|
747
821
|
}
|
|
748
|
-
function
|
|
749
|
-
if (n.length !==
|
|
750
|
-
const t = [...n].sort(),
|
|
751
|
-
return t.every((d,
|
|
822
|
+
function Ce(n, o) {
|
|
823
|
+
if (n.length !== o.length) return !1;
|
|
824
|
+
const t = [...n].sort(), r = [...o].sort();
|
|
825
|
+
return t.every((d, c) => d === r[c]);
|
|
752
826
|
}
|
|
753
|
-
function Mt(n,
|
|
754
|
-
const t = [],
|
|
755
|
-
return Object.entries(n).forEach(([
|
|
756
|
-
|
|
827
|
+
function Mt(n, o) {
|
|
828
|
+
const t = [], r = [], d = [];
|
|
829
|
+
return Object.entries(n).forEach(([c, s]) => {
|
|
830
|
+
s && typeof s == "object" && s.state && (s.state === "unavailable" ? d.push(c) : s.state === "reserved" && (o && s.userId === o ? t.push(c) : r.push(c)));
|
|
757
831
|
}), {
|
|
758
832
|
myReserved: t.sort(),
|
|
759
|
-
otherReserved:
|
|
833
|
+
otherReserved: r.sort(),
|
|
760
834
|
unavailable: d.sort()
|
|
761
835
|
};
|
|
762
836
|
}
|
|
763
|
-
const
|
|
837
|
+
const be = {
|
|
764
838
|
states: null,
|
|
765
839
|
loading: !0,
|
|
766
840
|
error: null,
|
|
@@ -770,163 +844,183 @@ const ue = {
|
|
|
770
844
|
unavailableSeats: []
|
|
771
845
|
};
|
|
772
846
|
function Et(n) {
|
|
773
|
-
const {
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
847
|
+
const {
|
|
848
|
+
seatMapId: o,
|
|
849
|
+
currentUserId: t,
|
|
850
|
+
enabled: r = !0,
|
|
851
|
+
onStateChange: d,
|
|
852
|
+
onError: c
|
|
853
|
+
} = n, s = P({ ...be }), v = P(d), h = P(c), i = P(t);
|
|
854
|
+
v.current = d, h.current = c, i.current = t;
|
|
855
|
+
const b = T(
|
|
856
|
+
(m) => {
|
|
857
|
+
if (!r || !o)
|
|
858
|
+
return (s.current.loading !== !1 || s.current.states !== null) && (s.current = { ...be, loading: !1 }, m()), () => {
|
|
779
859
|
};
|
|
780
|
-
if (!
|
|
781
|
-
const
|
|
782
|
-
return
|
|
783
|
-
...
|
|
860
|
+
if (!Ee()) {
|
|
861
|
+
const F = "Firebase not initialized. Call initializeFirebaseForViewer first.";
|
|
862
|
+
return s.current.error?.message !== F && (s.current = {
|
|
863
|
+
...be,
|
|
784
864
|
loading: !1,
|
|
785
|
-
error: new Error(
|
|
786
|
-
},
|
|
865
|
+
error: new Error(F)
|
|
866
|
+
}, m()), () => {
|
|
787
867
|
};
|
|
788
868
|
}
|
|
789
|
-
const
|
|
790
|
-
return
|
|
791
|
-
const L =
|
|
792
|
-
|
|
869
|
+
const M = Me(), g = Re(M, `seatmaps/${o}/seat_states`);
|
|
870
|
+
return We(g, (F) => {
|
|
871
|
+
const L = F.val() || {}, N = Mt(
|
|
872
|
+
L,
|
|
873
|
+
i.current
|
|
874
|
+
), Y = s.current;
|
|
875
|
+
(Y.loading || !Ce(Y.myReservedSeats, N.myReserved) || !Ce(
|
|
876
|
+
Y.otherReservedSeats,
|
|
877
|
+
N.otherReserved
|
|
878
|
+
) || !Ce(Y.unavailableSeats, N.unavailable)) && (s.current = {
|
|
793
879
|
states: L,
|
|
794
880
|
loading: !1,
|
|
795
881
|
error: null,
|
|
796
882
|
lastUpdated: Date.now(),
|
|
797
|
-
myReservedSeats:
|
|
798
|
-
otherReservedSeats:
|
|
799
|
-
unavailableSeats:
|
|
800
|
-
},
|
|
801
|
-
}, (
|
|
802
|
-
|
|
803
|
-
...
|
|
883
|
+
myReservedSeats: N.myReserved,
|
|
884
|
+
otherReservedSeats: N.otherReserved,
|
|
885
|
+
unavailableSeats: N.unavailable
|
|
886
|
+
}, v.current?.(L), m());
|
|
887
|
+
}, (F) => {
|
|
888
|
+
s.current = {
|
|
889
|
+
...s.current,
|
|
804
890
|
loading: !1,
|
|
805
|
-
error:
|
|
806
|
-
},
|
|
891
|
+
error: F
|
|
892
|
+
}, h.current?.(F), m();
|
|
807
893
|
}), () => {
|
|
808
|
-
|
|
894
|
+
Xe(g);
|
|
809
895
|
};
|
|
810
896
|
},
|
|
811
|
-
[
|
|
897
|
+
[o, r]
|
|
812
898
|
// Don't include currentUserId - we use currentUserIdRef.current which is always up-to-date
|
|
813
|
-
),
|
|
899
|
+
), y = T(() => s.current, []), u = T(() => be, []), w = gt(
|
|
900
|
+
b,
|
|
901
|
+
y,
|
|
902
|
+
u
|
|
903
|
+
);
|
|
814
904
|
return {
|
|
815
|
-
states:
|
|
816
|
-
loading:
|
|
817
|
-
error:
|
|
818
|
-
lastUpdated:
|
|
819
|
-
myReservedSeats:
|
|
820
|
-
otherReservedSeats:
|
|
821
|
-
unavailableSeats:
|
|
905
|
+
states: w.states,
|
|
906
|
+
loading: w.loading,
|
|
907
|
+
error: w.error,
|
|
908
|
+
lastUpdated: w.lastUpdated,
|
|
909
|
+
myReservedSeats: w.myReservedSeats,
|
|
910
|
+
otherReservedSeats: w.otherReservedSeats,
|
|
911
|
+
unavailableSeats: w.unavailableSeats,
|
|
822
912
|
// Legacy alias
|
|
823
|
-
reservedSeats:
|
|
913
|
+
reservedSeats: w.otherReservedSeats
|
|
824
914
|
};
|
|
825
915
|
}
|
|
826
916
|
function It(n) {
|
|
827
917
|
const {
|
|
828
|
-
seatMapId:
|
|
918
|
+
seatMapId: o,
|
|
829
919
|
enabled: t = !0,
|
|
830
|
-
subscribeToChanges:
|
|
920
|
+
subscribeToChanges: r = !1,
|
|
831
921
|
onConfigLoad: d,
|
|
832
|
-
onError:
|
|
833
|
-
} = n, [
|
|
834
|
-
|
|
835
|
-
const
|
|
836
|
-
if (!
|
|
837
|
-
if (!
|
|
838
|
-
|
|
922
|
+
onError: c
|
|
923
|
+
} = n, [s, v] = W(null), [h, i] = W(!0), [b, y] = W(null), u = P(d), w = P(c);
|
|
924
|
+
u.current = d, w.current = c;
|
|
925
|
+
const m = T(async () => {
|
|
926
|
+
if (!o) return;
|
|
927
|
+
if (!Ee()) {
|
|
928
|
+
y(
|
|
929
|
+
new Error(
|
|
930
|
+
"Firebase not initialized. Call initializeFirebaseForViewer first."
|
|
931
|
+
)
|
|
932
|
+
), i(!1);
|
|
839
933
|
return;
|
|
840
934
|
}
|
|
841
|
-
const
|
|
935
|
+
const M = Me(), g = Re(M, `seatmaps/${o}`);
|
|
842
936
|
try {
|
|
843
|
-
|
|
844
|
-
const R = (await mt(
|
|
937
|
+
i(!0), y(null);
|
|
938
|
+
const R = (await mt(g)).val();
|
|
845
939
|
if (R) {
|
|
846
|
-
const
|
|
847
|
-
|
|
940
|
+
const F = St(R);
|
|
941
|
+
v(F), u.current?.(F);
|
|
848
942
|
} else
|
|
849
|
-
|
|
850
|
-
} catch (
|
|
851
|
-
const R =
|
|
852
|
-
|
|
943
|
+
y(new Error(`Seat map ${o} not found in Firebase`));
|
|
944
|
+
} catch (I) {
|
|
945
|
+
const R = I instanceof Error ? I : new Error("Unknown error");
|
|
946
|
+
y(R), w.current?.(R);
|
|
853
947
|
} finally {
|
|
854
|
-
|
|
948
|
+
i(!1);
|
|
855
949
|
}
|
|
856
|
-
}, [
|
|
857
|
-
return
|
|
858
|
-
if (!t || !
|
|
859
|
-
|
|
950
|
+
}, [o]);
|
|
951
|
+
return U(() => {
|
|
952
|
+
if (!t || !o) {
|
|
953
|
+
i(!1);
|
|
860
954
|
return;
|
|
861
955
|
}
|
|
862
|
-
if (
|
|
863
|
-
const
|
|
864
|
-
let
|
|
865
|
-
return
|
|
866
|
-
if (
|
|
867
|
-
|
|
956
|
+
if (m(), r && Ee()) {
|
|
957
|
+
const M = Me(), g = Re(M, `seatmaps/${o}/meta/updated_at`);
|
|
958
|
+
let I = !0, R = null;
|
|
959
|
+
return We(g, (E) => {
|
|
960
|
+
if (I) {
|
|
961
|
+
I = !1, R = E.val();
|
|
868
962
|
return;
|
|
869
963
|
}
|
|
870
|
-
const L =
|
|
871
|
-
|
|
964
|
+
const L = E.val();
|
|
965
|
+
E.exists() && L !== R && (R = L, m());
|
|
872
966
|
}), () => {
|
|
873
|
-
|
|
967
|
+
Xe(g);
|
|
874
968
|
};
|
|
875
969
|
}
|
|
876
|
-
}, [
|
|
877
|
-
config:
|
|
878
|
-
loading:
|
|
879
|
-
error:
|
|
880
|
-
refetch:
|
|
970
|
+
}, [o, t, r]), {
|
|
971
|
+
config: s,
|
|
972
|
+
loading: h,
|
|
973
|
+
error: b,
|
|
974
|
+
refetch: m
|
|
881
975
|
};
|
|
882
976
|
}
|
|
883
977
|
function Wt(n) {
|
|
884
978
|
const {
|
|
885
|
-
seatMapId:
|
|
979
|
+
seatMapId: o,
|
|
886
980
|
userId: t,
|
|
887
|
-
enabled:
|
|
981
|
+
enabled: r = !0,
|
|
888
982
|
subscribeToDesignChanges: d = !1,
|
|
889
|
-
onConfigLoad:
|
|
890
|
-
onStateChange:
|
|
891
|
-
onError:
|
|
983
|
+
onConfigLoad: c,
|
|
984
|
+
onStateChange: s,
|
|
985
|
+
onError: v
|
|
892
986
|
} = n, {
|
|
893
|
-
config:
|
|
894
|
-
loading:
|
|
895
|
-
error:
|
|
896
|
-
refetch:
|
|
987
|
+
config: h,
|
|
988
|
+
loading: i,
|
|
989
|
+
error: b,
|
|
990
|
+
refetch: y
|
|
897
991
|
} = It({
|
|
898
|
-
seatMapId:
|
|
899
|
-
enabled:
|
|
992
|
+
seatMapId: o,
|
|
993
|
+
enabled: r,
|
|
900
994
|
subscribeToChanges: d,
|
|
901
|
-
onConfigLoad:
|
|
902
|
-
onError:
|
|
995
|
+
onConfigLoad: c,
|
|
996
|
+
onError: v
|
|
903
997
|
}), {
|
|
904
|
-
states:
|
|
905
|
-
loading:
|
|
906
|
-
error:
|
|
907
|
-
lastUpdated:
|
|
908
|
-
myReservedSeats:
|
|
909
|
-
otherReservedSeats:
|
|
998
|
+
states: u,
|
|
999
|
+
loading: w,
|
|
1000
|
+
error: m,
|
|
1001
|
+
lastUpdated: M,
|
|
1002
|
+
myReservedSeats: g,
|
|
1003
|
+
otherReservedSeats: I,
|
|
910
1004
|
unavailableSeats: R,
|
|
911
|
-
reservedSeats:
|
|
1005
|
+
reservedSeats: F
|
|
912
1006
|
} = Et({
|
|
913
|
-
seatMapId:
|
|
1007
|
+
seatMapId: o,
|
|
914
1008
|
currentUserId: t,
|
|
915
|
-
enabled:
|
|
916
|
-
onStateChange:
|
|
917
|
-
onError:
|
|
1009
|
+
enabled: r,
|
|
1010
|
+
onStateChange: s,
|
|
1011
|
+
onError: v
|
|
918
1012
|
});
|
|
919
1013
|
return {
|
|
920
|
-
config:
|
|
921
|
-
loading:
|
|
922
|
-
error:
|
|
923
|
-
myReservedSeats:
|
|
924
|
-
otherReservedSeats:
|
|
1014
|
+
config: h,
|
|
1015
|
+
loading: i || w,
|
|
1016
|
+
error: b || m,
|
|
1017
|
+
myReservedSeats: g,
|
|
1018
|
+
otherReservedSeats: I,
|
|
925
1019
|
unavailableSeats: R,
|
|
926
|
-
reservedSeats:
|
|
927
|
-
seatStates:
|
|
928
|
-
lastUpdated:
|
|
929
|
-
refetch:
|
|
1020
|
+
reservedSeats: F,
|
|
1021
|
+
seatStates: u,
|
|
1022
|
+
lastUpdated: M,
|
|
1023
|
+
refetch: y
|
|
930
1024
|
};
|
|
931
1025
|
}
|
|
932
1026
|
export {
|
|
@@ -934,7 +1028,7 @@ export {
|
|
|
934
1028
|
Nt as SeatMapViewer,
|
|
935
1029
|
kt as clearFirebaseInstance,
|
|
936
1030
|
$t as initializeFirebaseForViewer,
|
|
937
|
-
|
|
1031
|
+
Ee as isFirebaseInitialized,
|
|
938
1032
|
xt as useConfigFetcher,
|
|
939
1033
|
wt as useContainerSize,
|
|
940
1034
|
It as useFirebaseConfig,
|