@getmicdrop/venue-calendar 4.2.16 → 4.2.19
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/README.md +809 -809
- package/dist/{CartView-DP5TuBgM.js → CartView-cHL2n0fE.js} +5 -5
- package/dist/{Checkout-Dch9xOAn.js → Checkout-Blc7IuZ2.js} +4 -4
- package/dist/{Checkout-C7S--vSV.js → Checkout-DNVyBcrm.js} +4 -4
- package/dist/{CheckoutTimer-C9tJJZC8.js → CheckoutTimer-D5i2F8al.js} +1 -1
- package/dist/{CollectionView-D9utYlT8.js → CollectionView-DzoCBduF.js} +2 -2
- package/dist/{Event-CYWGeRe-.js → Event-D5u7y0w3.js} +223 -217
- package/dist/EventPage-Ddslq4xC.js +931 -0
- package/dist/{SeriesPage-mjiTHFQ6.js → SeriesPage-BPm7CNzY.js} +1 -1
- package/dist/{Success-DgUD_STB.js → Success-CXI2Xtdz.js} +4 -4
- package/dist/api/api.cjs +1 -1
- package/dist/api/api.mjs +2 -1
- package/dist/api/types.d.ts +545 -545
- package/dist/api/waitlist.d.ts +6 -0
- package/dist/{colors-Dk53YuNz.js → colors-5g6cmoXX.js} +2 -1
- package/dist/{event-transform-DUqXNcXz.js → event-transform-0VCBk_zn.js} +1 -1
- package/dist/{i18n-nPKgIP_8.js → i18n-D7pvVga7.js} +2 -2
- package/dist/{labels-YAwDbsF8.js → labels-7f_yKBtq.js} +1 -1
- package/dist/seo/types.d.ts +156 -156
- package/dist/types/index.d.ts +509 -509
- package/dist/{utils-CcxQIxOO.js → utils-DLfxcnPk.js} +1 -1
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +14 -14
- package/dist/venue-calendar.iife.js +34 -34
- package/dist/venue-calendar.umd.js +31 -31
- package/package.json +1 -1
- package/src/lib/theme.js +222 -222
- package/dist/EventPage-it5cJwjg.js +0 -880
- /package/dist/locales/{4.2.16 → 4.2.19}/flow/de.js +0 -0
- /package/dist/locales/{4.2.16 → 4.2.19}/flow/es.js +0 -0
- /package/dist/locales/{4.2.16 → 4.2.19}/flow/fr.js +0 -0
- /package/dist/locales/{4.2.16 → 4.2.19}/flow/id.js +0 -0
- /package/dist/locales/{4.2.16 → 4.2.19}/flow/it.js +0 -0
- /package/dist/locales/{4.2.16 → 4.2.19}/flow/ja.js +0 -0
- /package/dist/locales/{4.2.16 → 4.2.19}/flow/ko.js +0 -0
- /package/dist/locales/{4.2.16 → 4.2.19}/flow/nl.js +0 -0
- /package/dist/locales/{4.2.16 → 4.2.19}/flow/pl.js +0 -0
- /package/dist/locales/{4.2.16 → 4.2.19}/flow/pt-br.js +0 -0
- /package/dist/locales/{4.2.16 → 4.2.19}/flow/tr.js +0 -0
- /package/dist/locales/{4.2.16 → 4.2.19}/flow/zh.js +0 -0
- /package/dist/locales/{4.2.16 → 4.2.19}/main/de.js +0 -0
- /package/dist/locales/{4.2.16 → 4.2.19}/main/es.js +0 -0
- /package/dist/locales/{4.2.16 → 4.2.19}/main/fr.js +0 -0
- /package/dist/locales/{4.2.16 → 4.2.19}/main/id.js +0 -0
- /package/dist/locales/{4.2.16 → 4.2.19}/main/it.js +0 -0
- /package/dist/locales/{4.2.16 → 4.2.19}/main/ja.js +0 -0
- /package/dist/locales/{4.2.16 → 4.2.19}/main/ko.js +0 -0
- /package/dist/locales/{4.2.16 → 4.2.19}/main/nl.js +0 -0
- /package/dist/locales/{4.2.16 → 4.2.19}/main/pl.js +0 -0
- /package/dist/locales/{4.2.16 → 4.2.19}/main/pt-br.js +0 -0
- /package/dist/locales/{4.2.16 → 4.2.19}/main/tr.js +0 -0
- /package/dist/locales/{4.2.16 → 4.2.19}/main/zh.js +0 -0
|
@@ -0,0 +1,931 @@
|
|
|
1
|
+
import { C as e, h as t, t as n, v as r, x as i } from "./Button-C4uFgl7L.js";
|
|
2
|
+
import { A as a, M as o, r as s } from "./timezones-C5l0SSHK.js";
|
|
3
|
+
import { t as c } from "./Event-D5u7y0w3.js";
|
|
4
|
+
import { n as l, t as u } from "./Input-BvutquC_.js";
|
|
5
|
+
import { a as d, c as f, n as p, o as m, s as h } from "./phoneUtils-PJqYw0dJ.js";
|
|
6
|
+
import { y as g } from "./constants-BWfNecCz.js";
|
|
7
|
+
import { t as _ } from "./ClockIcon-DNJWLc1C.js";
|
|
8
|
+
import { n as v } from "./shareCopyFeedback.svelte-DZMLGA3y.js";
|
|
9
|
+
import { n as y } from "./ScarcityBadge-R32tzjFi.js";
|
|
10
|
+
import { i as b } from "./Badge-Bv_MT-Vt.js";
|
|
11
|
+
import { c as x, g as S, u as C } from "./orders-xGH8-IQn.js";
|
|
12
|
+
import { i as w, n as T, s as E, t as D } from "./__SKIP_PATHS__-DmdRxELE.js";
|
|
13
|
+
import { a as O, i as k, n as A, r as j, t as M } from "./ModalFooter-DMxM0E8Y.js";
|
|
14
|
+
import { n as N, t as ee } from "./modalManager.svelte-DDWCrGed.js";
|
|
15
|
+
import { c as te, h as ne, m as P, o as F, p as re, s as I, v as ie, w as ae } from "./colors-5g6cmoXX.js";
|
|
16
|
+
import { t as oe } from "./eventStatusStream-C5KadkMh.js";
|
|
17
|
+
import { d as L, i as se, t as R } from "./utils-DLfxcnPk.js";
|
|
18
|
+
import { r as z } from "./promo-DtLZRskK.js";
|
|
19
|
+
import { a as ce, r as le } from "./gate-password-cache-oOcDm9Ki.js";
|
|
20
|
+
import "svelte/internal/disclose-version";
|
|
21
|
+
import * as B from "svelte/internal/client";
|
|
22
|
+
import { onMount as ue } from "svelte";
|
|
23
|
+
//#region node_modules/@getmicdrop/svelte-components/dist/recipes/modals/InputModal.svelte
|
|
24
|
+
var V = B.from_html("<img class=\"w-5 h-5\"/>"), H = B.from_html("<div class=\"flex justify-end -mt-2 -mr-2 mb-2\"><!></div>"), U = B.from_html("<h3> </h3>"), W = B.from_html("<div class=\"text-left\"><!> <!></div>"), de = B.from_html("<p> </p>"), fe = B.from_html("<label for=\"modal-input\"> </label>"), G = B.from_html("<textarea id=\"modal-input\" name=\"value\"></textarea>"), K = B.from_html("<div class=\"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none\"><!></div>"), pe = B.from_html("<div class=\"relative\"><!> <input id=\"modal-input\" name=\"value\"/></div>"), q = B.from_html("<p><!> </p>"), J = B.from_html("<div class=\"text-left mt-4\"><!> <div><!> <!> <!></div></div>"), me = B.from_html("<div class=\"flex gap-3\"><!> <!></div>"), he = B.from_html("<!> <!> <!>", 1), ge = B.from_html("<!> <!>", 1);
|
|
25
|
+
function _e(i, o) {
|
|
26
|
+
B.push(o, !0);
|
|
27
|
+
let s = {
|
|
28
|
+
confirm: "Confirm",
|
|
29
|
+
cancel: "Cancel",
|
|
30
|
+
close: "Close",
|
|
31
|
+
invalidEmail: "Please enter a valid email address"
|
|
32
|
+
}, c = B.prop(o, "open", 15, !1), l = B.prop(o, "size", 3, "md"), u = B.prop(o, "title", 3, ""), p = B.prop(o, "description", 3, ""), m = B.prop(o, "closeBtn", 3, !1), h = B.prop(o, "persistent", 3, !1), g = B.prop(o, "inputLabel", 3, ""), _ = B.prop(o, "inputPlaceholder", 3, ""), v = B.prop(o, "inputType", 3, "text"), y = B.prop(o, "inputValue", 15, ""), x = B.prop(o, "inputRequired", 3, !1), S = B.prop(o, "inputRows", 3, 4), C = B.prop(o, "inputIcon", 3, null), w = B.prop(o, "helpText", 3, ""), T = B.prop(o, "errorMessage", 3, ""), E = B.prop(o, "showError", 3, !1), D = B.prop(o, "validateEmail", 3, !1), ee = B.prop(o, "primaryButtonText", 3, void 0), te = B.prop(o, "secondaryButtonText", 3, void 0), ne = B.prop(o, "primaryButtonVariant", 3, "default"), P = B.prop(o, "disabled", 3, !1), F = B.prop(o, "loading", 3, !1), re = B.prop(o, "labels", 19, () => ({})), I = B.derived(() => e(s, re())), ie = B.derived(() => ee() ?? B.get(I).confirm), ae = B.derived(() => te() ?? B.get(I).cancel), oe = (e) => a(e), L = B.derived(() => !!(D() && y() && !oe(y()))), se = B.derived(() => !!(x() && (!y() || y().trim() === ""))), R = B.derived(() => E() || B.get(L)), z = B.derived(() => P() || F() || B.get(se) || B.get(L)), ce = () => {
|
|
33
|
+
B.get(z) || o.onconfirm?.({ value: y() });
|
|
34
|
+
}, le = (e) => {
|
|
35
|
+
if (!(e.isComposing || e.keyCode === 229) && b(e)) {
|
|
36
|
+
if (v() === "textarea") {
|
|
37
|
+
if (!(e.metaKey || e.ctrlKey)) return;
|
|
38
|
+
} else if (e.shiftKey) return;
|
|
39
|
+
e.preventDefault(), ce();
|
|
40
|
+
}
|
|
41
|
+
}, ue = () => {
|
|
42
|
+
!P() && !F() && (o.oncancel?.(), _e());
|
|
43
|
+
}, _e = () => {
|
|
44
|
+
c(!1), o.onclose?.();
|
|
45
|
+
}, ve = () => {
|
|
46
|
+
P() || F() || _e();
|
|
47
|
+
};
|
|
48
|
+
O(i, {
|
|
49
|
+
get size() {
|
|
50
|
+
return l();
|
|
51
|
+
},
|
|
52
|
+
get persistent() {
|
|
53
|
+
return h();
|
|
54
|
+
},
|
|
55
|
+
get open() {
|
|
56
|
+
return c();
|
|
57
|
+
},
|
|
58
|
+
set open(e) {
|
|
59
|
+
c(e);
|
|
60
|
+
},
|
|
61
|
+
children: (e, i) => {
|
|
62
|
+
var a = ge(), o = B.first_child(a);
|
|
63
|
+
k(o, {});
|
|
64
|
+
var s = B.sibling(o, 2);
|
|
65
|
+
j(s, {
|
|
66
|
+
children: (e, i) => {
|
|
67
|
+
var a = he(), o = B.first_child(a);
|
|
68
|
+
N(o, {
|
|
69
|
+
children: (e, t) => {
|
|
70
|
+
var i = W(), a = B.child(i), o = (e) => {
|
|
71
|
+
var t = H(), r = B.child(t);
|
|
72
|
+
n(r, {
|
|
73
|
+
variant: "icon",
|
|
74
|
+
size: "xs",
|
|
75
|
+
onclick: ve,
|
|
76
|
+
get disabled() {
|
|
77
|
+
return P();
|
|
78
|
+
},
|
|
79
|
+
children: (e, t) => {
|
|
80
|
+
var n = V();
|
|
81
|
+
B.template_effect(() => {
|
|
82
|
+
B.set_attribute(n, "src", d), B.set_attribute(n, "alt", B.get(I).close);
|
|
83
|
+
}), B.append(e, n);
|
|
84
|
+
},
|
|
85
|
+
$$slots: { default: !0 }
|
|
86
|
+
}), B.reset(t), B.append(e, t);
|
|
87
|
+
};
|
|
88
|
+
B.if(a, (e) => {
|
|
89
|
+
m() && e(o);
|
|
90
|
+
});
|
|
91
|
+
var s = B.sibling(a, 2), c = (e) => {
|
|
92
|
+
var t = U(), n = B.child(t, !0);
|
|
93
|
+
B.reset(t), B.template_effect(() => {
|
|
94
|
+
B.set_class(t, 1, B.clsx(r.h2)), B.set_text(n, u());
|
|
95
|
+
}), B.append(e, t);
|
|
96
|
+
};
|
|
97
|
+
B.if(s, (e) => {
|
|
98
|
+
u() && e(c);
|
|
99
|
+
}), B.reset(i), B.append(e, i);
|
|
100
|
+
},
|
|
101
|
+
$$slots: { default: !0 }
|
|
102
|
+
});
|
|
103
|
+
var s = B.sibling(o, 2);
|
|
104
|
+
A(s, {
|
|
105
|
+
children: (e, n) => {
|
|
106
|
+
var i = J(), a = B.child(i), o = (e) => {
|
|
107
|
+
var n = de(), i = B.child(n, !0);
|
|
108
|
+
B.reset(n), B.template_effect(() => {
|
|
109
|
+
B.set_class(n, 1, `${r.smMuted} ${t.relaxed} mb-4`), B.set_text(i, p());
|
|
110
|
+
}), B.append(e, n);
|
|
111
|
+
};
|
|
112
|
+
B.if(a, (e) => {
|
|
113
|
+
p() && e(o);
|
|
114
|
+
});
|
|
115
|
+
var s = B.sibling(a, 2), c = B.child(s), l = (e) => {
|
|
116
|
+
var t = fe(), n = B.child(t, !0);
|
|
117
|
+
B.reset(t), B.template_effect(() => {
|
|
118
|
+
B.set_class(t, 1, `${r.label} block mb-2`), B.set_text(n, g());
|
|
119
|
+
}), B.append(e, t);
|
|
120
|
+
};
|
|
121
|
+
B.if(c, (e) => {
|
|
122
|
+
g() && e(l);
|
|
123
|
+
});
|
|
124
|
+
var u = B.sibling(c, 2), d = (e) => {
|
|
125
|
+
var t = G();
|
|
126
|
+
B.remove_textarea_child(t), B.template_effect(() => {
|
|
127
|
+
B.set_attribute(t, "placeholder", _()), B.set_attribute(t, "rows", S()), B.set_class(t, 1, `w-full px-3 py-2 border ${B.get(R) ? "border-status-error-border" : "border-stroke-primary"} bg-bg-secondary ${r.body ?? ""} rounded-lg focus:outline-hidden focus:ring-2 focus:ring-focus-ring focus:border-transparent resize-none`), t.disabled = P() || F();
|
|
128
|
+
}), B.delegated("keydown", t, le), B.bind_value(t, y), B.append(e, t);
|
|
129
|
+
}, m = (e) => {
|
|
130
|
+
var t = pe(), n = B.child(t), i = (e) => {
|
|
131
|
+
let t = B.derived(C);
|
|
132
|
+
var n = K(), i = B.child(n);
|
|
133
|
+
{
|
|
134
|
+
let e = B.derived(() => `w-5 h-5 ${r.iconMuted}`);
|
|
135
|
+
B.component(i, () => B.get(t), (t, n) => {
|
|
136
|
+
n(t, { get class() {
|
|
137
|
+
return B.get(e);
|
|
138
|
+
} });
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
B.reset(n), B.append(e, n);
|
|
142
|
+
};
|
|
143
|
+
B.if(n, (e) => {
|
|
144
|
+
C() && e(i);
|
|
145
|
+
});
|
|
146
|
+
var a = B.sibling(n, 2);
|
|
147
|
+
B.remove_input_defaults(a), B.reset(t), B.template_effect(() => {
|
|
148
|
+
B.set_attribute(a, "type", v()), B.set_attribute(a, "placeholder", _()), a.required = x(), a.disabled = P() || F(), B.set_class(a, 1, `w-full ${C() ? "pl-10" : "px-3"} py-2 border ${B.get(R) ? "border-status-error-border" : "border-stroke-primary"} rounded-lg ${r.body ?? ""} bg-card focus:ring-2 focus:ring-focus-ring focus:border-transparent disabled:opacity-50 disabled:cursor-not-allowed`);
|
|
149
|
+
}), B.delegated("keydown", a, le), B.bind_value(a, y), B.append(e, t);
|
|
150
|
+
};
|
|
151
|
+
B.if(u, (e) => {
|
|
152
|
+
v() === "textarea" ? e(d) : e(m, -1);
|
|
153
|
+
});
|
|
154
|
+
var h = B.sibling(u, 2), b = (e) => {
|
|
155
|
+
var t = q(), n = B.child(t);
|
|
156
|
+
f(n, { class: "w-4 h-4" });
|
|
157
|
+
var i = B.sibling(n);
|
|
158
|
+
B.reset(t), B.template_effect(() => {
|
|
159
|
+
B.set_class(t, 1, `${r.label} text-accent-danger mt-2 flex items-center gap-1`), B.set_text(i, ` ${(B.get(L) ? B.get(I).invalidEmail : T()) ?? ""}`);
|
|
160
|
+
}), B.append(e, t);
|
|
161
|
+
}, E = (e) => {
|
|
162
|
+
var t = de(), n = B.child(t, !0);
|
|
163
|
+
B.reset(t), B.template_effect(() => {
|
|
164
|
+
B.set_class(t, 1, `${r.xsMuted} pt-2`), B.set_text(n, w());
|
|
165
|
+
}), B.append(e, t);
|
|
166
|
+
};
|
|
167
|
+
B.if(h, (e) => {
|
|
168
|
+
B.get(R) && (T() || B.get(L)) ? e(b) : w() && !B.get(R) && e(E, 1);
|
|
169
|
+
}), B.reset(s), B.reset(i), B.append(e, i);
|
|
170
|
+
},
|
|
171
|
+
$$slots: { default: !0 }
|
|
172
|
+
});
|
|
173
|
+
var c = B.sibling(s, 2);
|
|
174
|
+
M(c, {
|
|
175
|
+
children: (e, t) => {
|
|
176
|
+
var r = me(), i = B.child(r), a = (e) => {
|
|
177
|
+
{
|
|
178
|
+
let t = B.derived(() => P() || F());
|
|
179
|
+
n(e, {
|
|
180
|
+
size: "full",
|
|
181
|
+
variant: "alternative",
|
|
182
|
+
onclick: ue,
|
|
183
|
+
get disabled() {
|
|
184
|
+
return B.get(t);
|
|
185
|
+
},
|
|
186
|
+
children: (e, t) => {
|
|
187
|
+
B.next();
|
|
188
|
+
var n = B.text();
|
|
189
|
+
B.template_effect(() => B.set_text(n, B.get(ae))), B.append(e, n);
|
|
190
|
+
},
|
|
191
|
+
$$slots: { default: !0 }
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
B.if(i, (e) => {
|
|
196
|
+
B.get(ae) && e(a);
|
|
197
|
+
});
|
|
198
|
+
var o = B.sibling(i, 2);
|
|
199
|
+
n(o, {
|
|
200
|
+
size: "full",
|
|
201
|
+
get variant() {
|
|
202
|
+
return ne();
|
|
203
|
+
},
|
|
204
|
+
onclick: ce,
|
|
205
|
+
get disabled() {
|
|
206
|
+
return B.get(z);
|
|
207
|
+
},
|
|
208
|
+
get loading() {
|
|
209
|
+
return F();
|
|
210
|
+
},
|
|
211
|
+
children: (e, t) => {
|
|
212
|
+
B.next();
|
|
213
|
+
var n = B.text();
|
|
214
|
+
B.template_effect(() => B.set_text(n, B.get(ie))), B.append(e, n);
|
|
215
|
+
},
|
|
216
|
+
$$slots: { default: !0 }
|
|
217
|
+
}), B.reset(r), B.append(e, r);
|
|
218
|
+
},
|
|
219
|
+
$$slots: { default: !0 }
|
|
220
|
+
}), B.append(e, a);
|
|
221
|
+
},
|
|
222
|
+
$$slots: { default: !0 }
|
|
223
|
+
}), B.append(e, a);
|
|
224
|
+
},
|
|
225
|
+
$$slots: { default: !0 }
|
|
226
|
+
}), B.pop();
|
|
227
|
+
}
|
|
228
|
+
B.delegate(["keydown"]);
|
|
229
|
+
//#endregion
|
|
230
|
+
//#region src/lib/public-calendar-flow/promo-state.ts
|
|
231
|
+
function ve(e, t) {
|
|
232
|
+
if (!e.valid) return {
|
|
233
|
+
code: t,
|
|
234
|
+
isApplied: !1,
|
|
235
|
+
isValidating: !1,
|
|
236
|
+
error: e.error || "Invalid promo code",
|
|
237
|
+
hint: "",
|
|
238
|
+
discountAmount: 0,
|
|
239
|
+
discountType: "",
|
|
240
|
+
discountTicketIds: [],
|
|
241
|
+
revealHiddenTickets: !1,
|
|
242
|
+
revealTicketIds: []
|
|
243
|
+
};
|
|
244
|
+
let n = e.code || t;
|
|
245
|
+
return {
|
|
246
|
+
code: n,
|
|
247
|
+
isApplied: !0,
|
|
248
|
+
isValidating: !1,
|
|
249
|
+
error: "",
|
|
250
|
+
hint: `${n.toUpperCase()} applied`,
|
|
251
|
+
discountAmount: e.amount == null ? 0 : e.amount,
|
|
252
|
+
discountType: e.discountType === "percentage" ? "%" : e.discountType === "fixed" ? "$" : "",
|
|
253
|
+
discountTicketIds: z(e),
|
|
254
|
+
revealHiddenTickets: e.revealHiddenTickets || !1,
|
|
255
|
+
revealTicketIds: e.revealTicketIds || []
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
//#endregion
|
|
259
|
+
//#region src/components/Modals/WaitlistModal.svelte
|
|
260
|
+
var ye = B.from_html("<p> </p>"), be = B.from_html("<div class=\"flex flex-col items-center text-center pt-6 px-4 pb-4\"><div class=\"w-16 h-16 rounded-full flex items-center justify-center mb-4 bg-accent-success/10 text-accent-success\" aria-hidden=\"true\"><!></div> <h3 id=\"waitlist-title\"> </h3> <p id=\"waitlist-description\" class=\"type-body tone-secondary max-w-72\"> </p> <!></div>"), xe = B.from_html("<p class=\"type-caption text-accent-danger mt-1\"> </p>"), Se = B.from_html("<div class=\"ml-7\"><!> <!> <p> </p></div>"), Y = B.from_html("<div class=\"p-3 bg-status-error-bg border border-status-error-border rounded-lg\"><p> </p></div>"), Ce = B.from_html("<div class=\"flex flex-col pt-6 px-4 pb-4\"><div class=\"flex items-center justify-center mb-4\"><div class=\"w-12 h-12 rounded-full flex items-center justify-center bg-brand-primary/10 text-brand-primary\" aria-hidden=\"true\"><!></div></div> <h3 id=\"waitlist-title\"> </h3> <p id=\"waitlist-description\" class=\"type-body tone-secondary text-center mb-6\"> </p> <form class=\"space-y-4\"><div><label for=\"waitlist-email\" class=\"block type-label tone-secondary mb-1\"> </label> <div class=\"relative\"><!></div> <!></div> <div class=\"space-y-2\"><label class=\"flex items-start gap-3 cursor-pointer\"><input type=\"checkbox\" name=\"smsOptIn\" class=\"mt-0.5 w-4 h-4 text-brand-primary border-stroke-primary rounded focus-ring\"/> <span class=\"type-body tone-secondary\"> </span></label> <!></div> <!></form></div>"), X = B.from_html("<!> <!>", 1), we = B.from_html("<div class=\"flex gap-3 w-full\" role=\"group\"><!></div>");
|
|
261
|
+
function Te(e, t) {
|
|
262
|
+
B.push(t, !0);
|
|
263
|
+
let n = B.prop(t, "show", 15, !1);
|
|
264
|
+
B.prop(t, "eventName", 3, "this event");
|
|
265
|
+
let i = B.prop(t, "onClose", 3, () => {}), o = B.prop(t, "labels", 3, g), c = B.state(""), d = B.state(""), f = B.state(!1), m = B.state(!1), v = B.state(""), y = B.state(!1), b = B.derived(() => B.get(c) && !S(B.get(c)) ? o().pleaseEnterValidEmail || "Please enter a valid email" : ""), x = B.derived(() => B.get(d) && B.get(f) && !C(B.get(d)) ? o().pleaseEnterValidPhone || "Please enter a valid phone number" : "");
|
|
266
|
+
function S(e) {
|
|
267
|
+
return a(e);
|
|
268
|
+
}
|
|
269
|
+
function C(e) {
|
|
270
|
+
return p(l(e));
|
|
271
|
+
}
|
|
272
|
+
async function w() {
|
|
273
|
+
if (B.set(v, ""), !B.get(c) || !S(B.get(c))) {
|
|
274
|
+
B.set(v, o().pleaseEnterValidEmailAddress || "Please enter a valid email address", !0);
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
if (B.get(f) && B.get(d) && !C(B.get(d))) {
|
|
278
|
+
B.set(v, o().pleaseEnterValidPhone || "Please enter a valid phone number", !0);
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
B.set(m, !0);
|
|
282
|
+
let e = await I(t.eventId, B.get(c), B.get(f) ? B.get(d) : null, B.get(f));
|
|
283
|
+
B.set(m, !1), e.success ? B.set(y, !0) : B.set(v, e.error, !0);
|
|
284
|
+
}
|
|
285
|
+
function T() {
|
|
286
|
+
B.set(c, ""), B.set(d, ""), B.set(f, !1), B.set(v, ""), B.set(y, !1), n(!1), i()();
|
|
287
|
+
}
|
|
288
|
+
O(e, {
|
|
289
|
+
size: "sm",
|
|
290
|
+
class: "micdrop",
|
|
291
|
+
get open() {
|
|
292
|
+
return n();
|
|
293
|
+
},
|
|
294
|
+
set open(e) {
|
|
295
|
+
n(e);
|
|
296
|
+
},
|
|
297
|
+
children: (e, t) => {
|
|
298
|
+
var n = X(), i = B.first_child(n);
|
|
299
|
+
k(i, {});
|
|
300
|
+
var a = B.sibling(i, 2);
|
|
301
|
+
j(a, {
|
|
302
|
+
children: (e, t) => {
|
|
303
|
+
var n = X(), i = B.first_child(n);
|
|
304
|
+
A(i, {
|
|
305
|
+
children: (e, t) => {
|
|
306
|
+
var n = B.comment(), i = B.first_child(n), a = (e) => {
|
|
307
|
+
var t = be(), n = B.child(t), i = B.child(n);
|
|
308
|
+
h(i, { size: "32" }), B.reset(n);
|
|
309
|
+
var a = B.sibling(n, 2), s = B.child(a, !0);
|
|
310
|
+
B.reset(a);
|
|
311
|
+
var c = B.sibling(a, 2), l = B.child(c, !0);
|
|
312
|
+
B.reset(c);
|
|
313
|
+
var u = B.sibling(c, 2), p = (e) => {
|
|
314
|
+
var t = ye(), n = B.child(t, !0);
|
|
315
|
+
B.reset(t), B.template_effect(() => {
|
|
316
|
+
B.set_class(t, 1, `mt-2 ${r.xsMuted ?? ""}`), B.set_text(n, o().waitlistSmsAlerts || "You'll also receive SMS alerts");
|
|
317
|
+
}), B.append(e, t);
|
|
318
|
+
};
|
|
319
|
+
B.if(u, (e) => {
|
|
320
|
+
B.get(f) && B.get(d) && e(p);
|
|
321
|
+
}), B.reset(t), B.template_effect(() => {
|
|
322
|
+
B.set_class(a, 1, `mb-2 ${r.heading ?? ""}`), B.set_text(s, o().youreOnTheList || "You're on the waitlist"), B.set_text(l, o().waitlistNotifyByEmail || "We'll let you know if tickets become available");
|
|
323
|
+
}), B.append(e, t);
|
|
324
|
+
}, s = (e) => {
|
|
325
|
+
var t = Ce(), n = B.child(t), i = B.child(n), a = B.child(i);
|
|
326
|
+
_(a, { size: "24" }), B.reset(i), B.reset(n);
|
|
327
|
+
var s = B.sibling(n, 2), l = B.child(s, !0);
|
|
328
|
+
B.reset(s);
|
|
329
|
+
var p = B.sibling(s, 2), h = B.child(p, !0);
|
|
330
|
+
B.reset(p);
|
|
331
|
+
var g = B.sibling(p, 2), y = B.child(g), S = B.child(y), C = B.child(S, !0);
|
|
332
|
+
B.reset(S);
|
|
333
|
+
var T = B.sibling(S, 2), E = B.child(T);
|
|
334
|
+
{
|
|
335
|
+
let e = B.derived(() => o().waitlistEmailPlaceholder || "you@example.com"), t = B.derived(() => B.get(b) ? "border-status-error-border" : "");
|
|
336
|
+
u(E, {
|
|
337
|
+
id: "waitlist-email",
|
|
338
|
+
type: "email",
|
|
339
|
+
get placeholder() {
|
|
340
|
+
return B.get(e);
|
|
341
|
+
},
|
|
342
|
+
required: !0,
|
|
343
|
+
get disabled() {
|
|
344
|
+
return B.get(m);
|
|
345
|
+
},
|
|
346
|
+
get class() {
|
|
347
|
+
return B.get(t);
|
|
348
|
+
},
|
|
349
|
+
get value() {
|
|
350
|
+
return B.get(c);
|
|
351
|
+
},
|
|
352
|
+
set value(e) {
|
|
353
|
+
B.set(c, e, !0);
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
B.reset(T);
|
|
358
|
+
var D = B.sibling(T, 2), O = (e) => {
|
|
359
|
+
var t = xe(), n = B.child(t, !0);
|
|
360
|
+
B.reset(t), B.template_effect(() => B.set_text(n, B.get(b))), B.append(e, t);
|
|
361
|
+
};
|
|
362
|
+
B.if(D, (e) => {
|
|
363
|
+
B.get(b) && e(O);
|
|
364
|
+
}), B.reset(y);
|
|
365
|
+
var k = B.sibling(y, 2), A = B.child(k), j = B.child(A);
|
|
366
|
+
B.remove_input_defaults(j);
|
|
367
|
+
var M = B.sibling(j, 2), N = B.child(M, !0);
|
|
368
|
+
B.reset(M), B.reset(A);
|
|
369
|
+
var ee = B.sibling(A, 2), te = (e) => {
|
|
370
|
+
var t = Se(), n = B.child(t);
|
|
371
|
+
{
|
|
372
|
+
let e = B.derived(() => o().waitlistPhonePlaceholder || "(555) 123-4567"), t = B.derived(() => B.get(x) ? "border-status-error-border" : "");
|
|
373
|
+
u(n, {
|
|
374
|
+
id: "waitlist-phone",
|
|
375
|
+
type: "tel",
|
|
376
|
+
get placeholder() {
|
|
377
|
+
return B.get(e);
|
|
378
|
+
},
|
|
379
|
+
get disabled() {
|
|
380
|
+
return B.get(m);
|
|
381
|
+
},
|
|
382
|
+
get class() {
|
|
383
|
+
return B.get(t);
|
|
384
|
+
},
|
|
385
|
+
get value() {
|
|
386
|
+
return B.get(d);
|
|
387
|
+
},
|
|
388
|
+
set value(e) {
|
|
389
|
+
B.set(d, e, !0);
|
|
390
|
+
}
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
var i = B.sibling(n, 2), a = (e) => {
|
|
394
|
+
var t = xe(), n = B.child(t, !0);
|
|
395
|
+
B.reset(t), B.template_effect(() => B.set_text(n, B.get(x))), B.append(e, t);
|
|
396
|
+
};
|
|
397
|
+
B.if(i, (e) => {
|
|
398
|
+
B.get(x) && e(a);
|
|
399
|
+
});
|
|
400
|
+
var s = B.sibling(i, 2), c = B.child(s, !0);
|
|
401
|
+
B.reset(s), B.reset(t), B.template_effect(() => {
|
|
402
|
+
B.set_class(s, 1, `mt-1 ${r.xsMuted ?? ""}`), B.set_text(c, o().smsDisclaimer || "Message & data rates may apply. Reply STOP to unsubscribe");
|
|
403
|
+
}), B.append(e, t);
|
|
404
|
+
};
|
|
405
|
+
B.if(ee, (e) => {
|
|
406
|
+
B.get(f) && e(te);
|
|
407
|
+
}), B.reset(k);
|
|
408
|
+
var ne = B.sibling(k, 2), P = (e) => {
|
|
409
|
+
var t = Y(), n = B.child(t), i = B.child(n, !0);
|
|
410
|
+
B.reset(n), B.reset(t), B.template_effect(() => {
|
|
411
|
+
B.set_class(n, 1, B.clsx(r.error)), B.set_text(i, B.get(v));
|
|
412
|
+
}), B.append(e, t);
|
|
413
|
+
};
|
|
414
|
+
B.if(ne, (e) => {
|
|
415
|
+
B.get(v) && e(P);
|
|
416
|
+
}), B.reset(g), B.reset(t), B.template_effect(() => {
|
|
417
|
+
B.set_class(s, 1, `mb-2 text-center ${r.heading ?? ""}`), B.set_text(l, o().waitlistTitle || "This show is sold out"), B.set_text(h, o().waitlistDescription || "Want to be notified if tickets become available?"), B.set_text(C, o().waitlistEmailLabel || "Email address"), B.set_attribute(j, "aria-label", o().smsOptIn || "Text me when tickets are available"), j.disabled = B.get(m), B.set_text(N, o().smsOptIn || "Text me when tickets are available");
|
|
418
|
+
}), B.event("submit", g, (e) => {
|
|
419
|
+
e.preventDefault(), w();
|
|
420
|
+
}), B.bind_checked(j, () => B.get(f), (e) => B.set(f, e)), B.append(e, t);
|
|
421
|
+
};
|
|
422
|
+
B.if(i, (e) => {
|
|
423
|
+
B.get(y) ? e(a) : e(s, -1);
|
|
424
|
+
}), B.append(e, n);
|
|
425
|
+
},
|
|
426
|
+
$$slots: { default: !0 }
|
|
427
|
+
});
|
|
428
|
+
var a = B.sibling(i, 2);
|
|
429
|
+
M(a, {
|
|
430
|
+
children: (e, t) => {
|
|
431
|
+
var n = we(), r = B.child(n), i = (e) => {
|
|
432
|
+
s(e, {
|
|
433
|
+
size: "full",
|
|
434
|
+
variant: "default",
|
|
435
|
+
onclick: T,
|
|
436
|
+
children: (e, t) => {
|
|
437
|
+
B.next();
|
|
438
|
+
var n = B.text();
|
|
439
|
+
B.template_effect(() => B.set_text(n, o().done || "Done")), B.append(e, n);
|
|
440
|
+
},
|
|
441
|
+
$$slots: { default: !0 }
|
|
442
|
+
});
|
|
443
|
+
}, a = (e) => {
|
|
444
|
+
var t = X(), n = B.first_child(t);
|
|
445
|
+
s(n, {
|
|
446
|
+
size: "full",
|
|
447
|
+
variant: "alternative",
|
|
448
|
+
onclick: T,
|
|
449
|
+
get disabled() {
|
|
450
|
+
return B.get(m);
|
|
451
|
+
},
|
|
452
|
+
children: (e, t) => {
|
|
453
|
+
B.next();
|
|
454
|
+
var n = B.text();
|
|
455
|
+
B.template_effect(() => B.set_text(n, o().cancel || "Cancel")), B.append(e, n);
|
|
456
|
+
},
|
|
457
|
+
$$slots: { default: !0 }
|
|
458
|
+
});
|
|
459
|
+
var r = B.sibling(n, 2);
|
|
460
|
+
{
|
|
461
|
+
let e = B.derived(() => !B.get(c) || !!B.get(b) || B.get(f) && B.get(d) && !!B.get(x));
|
|
462
|
+
s(r, {
|
|
463
|
+
size: "full",
|
|
464
|
+
variant: "default",
|
|
465
|
+
onclick: w,
|
|
466
|
+
get loading() {
|
|
467
|
+
return B.get(m);
|
|
468
|
+
},
|
|
469
|
+
get disabled() {
|
|
470
|
+
return B.get(e);
|
|
471
|
+
},
|
|
472
|
+
children: (e, t) => {
|
|
473
|
+
B.next();
|
|
474
|
+
var n = B.text();
|
|
475
|
+
B.template_effect(() => B.set_text(n, B.get(m) ? o().joining || "Joining..." : o().notifyMe || "Notify me")), B.append(e, n);
|
|
476
|
+
},
|
|
477
|
+
$$slots: { default: !0 }
|
|
478
|
+
});
|
|
479
|
+
}
|
|
480
|
+
B.append(e, t);
|
|
481
|
+
};
|
|
482
|
+
B.if(r, (e) => {
|
|
483
|
+
B.get(y) ? e(i) : e(a, -1);
|
|
484
|
+
}), B.reset(n), B.template_effect(() => B.set_attribute(n, "aria-label", o().dialogActions || "Dialog actions")), B.append(e, n);
|
|
485
|
+
},
|
|
486
|
+
$$slots: { default: !0 }
|
|
487
|
+
}), B.append(e, n);
|
|
488
|
+
},
|
|
489
|
+
$$slots: { default: !0 }
|
|
490
|
+
}), B.append(e, n);
|
|
491
|
+
},
|
|
492
|
+
$$slots: { default: !0 }
|
|
493
|
+
}), B.pop();
|
|
494
|
+
}
|
|
495
|
+
//#endregion
|
|
496
|
+
//#region src/components/Views/EventPage.svelte
|
|
497
|
+
var Ee = i("EventPage"), De = B.from_html("<div class=\"flex items-center justify-center py-12 text-center loading-container svelte-1dk5n3m\"><p> </p></div>"), Oe = B.from_html("<div class=\"flex flex-col items-center justify-center py-12 text-center gap-4\"><p class=\"error-text svelte-1dk5n3m\"> </p> <!></div>"), ke = B.from_html("<div class=\"locked-wrapper svelte-1dk5n3m\"><div class=\"locked-overlay absolute inset-0 z-navigation flex flex-col items-center justify-center min-h-96 svelte-1dk5n3m\"><div class=\"text-center p-8\"><div class=\"locked-icon-wrapper w-20 h-20 mx-auto mb-4 rounded-full flex items-center justify-center svelte-1dk5n3m\"><!></div> <h2 class=\"locked-title type-heading mb-2 svelte-1dk5n3m\"> </h2> <p class=\"locked-description type-body max-w-xs mx-auto mb-6 svelte-1dk5n3m\"> </p> <!></div></div> <div class=\"blur-content svelte-1dk5n3m\"><!></div></div>"), Ae = B.from_html("<div class=\"waitlist-window-banner svelte-1dk5n3m\"><span class=\"type-body\"> <strong class=\"waitlist-window-time svelte-1dk5n3m\"> </strong> </span></div>"), je = B.from_html("<!> <!>", 1), Me = B.from_html("<!> <!> <!>", 1);
|
|
498
|
+
function Ne(e, t) {
|
|
499
|
+
B.push(t, !0);
|
|
500
|
+
let n = B.prop(t, "rawEvent", 3, void 0), r = B.prop(t, "eventId", 3, void 0), i = B.prop(t, "slug", 3, "");
|
|
501
|
+
B.prop(t, "currentEventId", 3, void 0);
|
|
502
|
+
let a = B.prop(t, "onNavigateBack", 3, void 0), l = B.prop(t, "onBuyTickets", 3, void 0), u = B.prop(t, "onNavigateToCart", 3, void 0), d = B.prop(t, "onCollectionEventClick", 3, void 0);
|
|
503
|
+
B.prop(t, "organizationId", 3, "");
|
|
504
|
+
let f = B.prop(t, "widgetId", 3, null), p = B.prop(t, "venueId", 3, null), h = B.prop(t, "waitlistToken", 3, void 0), _ = B.prop(t, "waitlistEmail", 3, void 0), b = B.prop(t, "labels", 3, g), O = B.prop(t, "locale", 3, void 0), k = () => p() || B.get(A)?.venueID || B.get(A)?.venueId || null, A = B.state(B.proxy(n() ?? null)), j = B.state(B.proxy(!n() && !!r()));
|
|
505
|
+
B.user_effect(() => {
|
|
506
|
+
n() && B.set(A, n());
|
|
507
|
+
});
|
|
508
|
+
let M = B.state(null), N = B.state(""), I = B.state(null), z = B.derived(() => {
|
|
509
|
+
if (!B.get(A) || !B.get(I)?.length) return B.get(A);
|
|
510
|
+
let e = B.get(A).availableTickets || [], t = new Set(e.map((e) => String(e.id ?? e.ID))), n = B.get(I).filter((e) => !t.has(String(e.id ?? e.ID)));
|
|
511
|
+
return n.length === 0 ? B.get(A) : {
|
|
512
|
+
...B.get(A),
|
|
513
|
+
availableTickets: [...e, ...n]
|
|
514
|
+
};
|
|
515
|
+
}), V = B.derived(() => B.get(z) ? v(B.get(z)) : null), H = B.derived(() => r() || B.get(V)?.id || ""), U = B.state(!1), W = B.state("");
|
|
516
|
+
B.user_effect(() => {
|
|
517
|
+
let e = B.get(H);
|
|
518
|
+
if (e) return oe(e, {
|
|
519
|
+
onUnavailable: (e) => {
|
|
520
|
+
B.set(U, !0), B.set(W, e, !0);
|
|
521
|
+
},
|
|
522
|
+
onAvailable: () => {
|
|
523
|
+
B.set(U, !1), B.set(W, "");
|
|
524
|
+
}
|
|
525
|
+
});
|
|
526
|
+
});
|
|
527
|
+
let de = B.derived(() => i() || B.get(V)?.slug || ""), fe = B.state(B.proxy([])), G = B.derived(() => B.get(V) ? {
|
|
528
|
+
...B.get(V),
|
|
529
|
+
seriesOccurrences: B.get(fe).length > 0 ? B.get(fe) : B.get(V).seriesOccurrences || []
|
|
530
|
+
} : null), K = ee(), pe = B.state(!1), q = B.state(""), J = B.state(""), me = B.state(!1), he = B.derived(() => B.get(V)?.isPasswordProtected === !0 || B.get(A)?.hasPassword === !0), ge = B.derived(() => B.get(he) && !B.get(pe) && (B.get(A)?.passwordRequired === !0 || !ye(B.get(H))));
|
|
531
|
+
function ye(e) {
|
|
532
|
+
return le("event", e);
|
|
533
|
+
}
|
|
534
|
+
function be(e) {
|
|
535
|
+
ce("event", e);
|
|
536
|
+
}
|
|
537
|
+
async function xe(e) {
|
|
538
|
+
let t = e.detail?.value || B.get(q);
|
|
539
|
+
if (!(!t || !B.get(H))) {
|
|
540
|
+
B.set(me, !0), B.set(J, "");
|
|
541
|
+
try {
|
|
542
|
+
if ((await re(String(B.get(H)), t)).valid) {
|
|
543
|
+
try {
|
|
544
|
+
let e = await P(B.get(H), fetch, t);
|
|
545
|
+
e && B.set(A, e, !0);
|
|
546
|
+
} catch {}
|
|
547
|
+
be(B.get(H)), B.set(pe, !0), K.close(), B.set(q, "");
|
|
548
|
+
} else B.set(J, b().incorrectPassword || "Incorrect password. Please try again", !0);
|
|
549
|
+
} catch {
|
|
550
|
+
B.set(J, b().unableToVerifyPassword || "Unable to verify password. Please try again", !0);
|
|
551
|
+
} finally {
|
|
552
|
+
B.set(me, !1);
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
function Se() {
|
|
557
|
+
K.close(), a() && a()();
|
|
558
|
+
}
|
|
559
|
+
let Y = B.state(""), Ce = B.state(0), X = 0;
|
|
560
|
+
async function we(e) {
|
|
561
|
+
let t = ++X, n = await ae(String(B.get(H)), e), r = ve(n, e);
|
|
562
|
+
if (r.isApplied && t === X && (B.set(Y, r.code, !0), B.set(Ce, r.discountAmount, !0), n.revealHiddenTickets || n.revealTicketIds?.length)) {
|
|
563
|
+
let n = await ne(String(B.get(H)), e);
|
|
564
|
+
t === X && n.length > 0 && B.set(I, n, !0);
|
|
565
|
+
}
|
|
566
|
+
return r;
|
|
567
|
+
}
|
|
568
|
+
function Ne() {
|
|
569
|
+
X++, B.set(Y, ""), B.set(Ce, 0), B.set(I, null);
|
|
570
|
+
}
|
|
571
|
+
let Pe = B.state(!1), Fe = B.state(!1), Z = B.state(!1), Q = B.state(""), $ = ee(), Ie = B.derived(() => B.get(Fe) && !B.get(Z)), Le = B.state(null), Re = B.state(null);
|
|
572
|
+
B.user_effect(() => {
|
|
573
|
+
let e = B.get(Le);
|
|
574
|
+
if (e === null) return;
|
|
575
|
+
let t = () => {
|
|
576
|
+
let t = e - Date.now();
|
|
577
|
+
if (t <= 0) {
|
|
578
|
+
B.set(Re, null), B.set(Le, null), B.set(Z, !1), B.set(Q, Be("token_expired"), !0);
|
|
579
|
+
return;
|
|
580
|
+
}
|
|
581
|
+
B.set(Re, t);
|
|
582
|
+
};
|
|
583
|
+
t();
|
|
584
|
+
let n = setInterval(t, 1e3);
|
|
585
|
+
return () => clearInterval(n);
|
|
586
|
+
});
|
|
587
|
+
let ze = B.derived(() => {
|
|
588
|
+
if (B.get(Re) === null) return "";
|
|
589
|
+
let e = Math.max(0, Math.floor(B.get(Re) / 1e3));
|
|
590
|
+
return `${Math.floor(e / 60)}:${String(e % 60).padStart(2, "0")}`;
|
|
591
|
+
});
|
|
592
|
+
function Be(e) {
|
|
593
|
+
switch (e) {
|
|
594
|
+
case "token_expired": return b().waitlistLinkExpired || "This link has expired. You're still on the waitlist";
|
|
595
|
+
case "token_used": return b().waitlistLinkUsed || "This link has already been used. You're still on the waitlist";
|
|
596
|
+
case "email_mismatch": return b().waitlistLinkEmailMismatch || "This link was sent to a different email address. You're still on the waitlist";
|
|
597
|
+
case "inventory_exhausted": return b().waitlistLinkInventoryExhausted || "Those tickets were just claimed. You're still on the waitlist — we'll email you if more free up";
|
|
598
|
+
default: return b().waitlistLinkInvalid || "This link isn't valid. You're still on the waitlist — we'll email you if tickets free up";
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
function Ve() {
|
|
602
|
+
$.open();
|
|
603
|
+
}
|
|
604
|
+
function He() {
|
|
605
|
+
B.set(Q, "");
|
|
606
|
+
}
|
|
607
|
+
async function Ue(e) {
|
|
608
|
+
if (!B.get(G)) return;
|
|
609
|
+
if (B.set(N, ""), e.total === null) {
|
|
610
|
+
B.set(N, b().priceUnavailable || "We couldn't load the price for this order — refresh the page or contact the venue", !0);
|
|
611
|
+
return;
|
|
612
|
+
}
|
|
613
|
+
let t = {}, n = {};
|
|
614
|
+
for (let r of e.lines) t[r.ticketId] = r.quantity, B.get(G).tickets.find((e) => e.id === r.ticketId)?.isDonation && (n[r.ticketId] = r.unitPrice);
|
|
615
|
+
L({
|
|
616
|
+
eventID: String(B.get(H)),
|
|
617
|
+
quantities: t,
|
|
618
|
+
donationAmounts: n,
|
|
619
|
+
promocode: B.get(Y),
|
|
620
|
+
promoDiscountAmount: B.get(Ce),
|
|
621
|
+
tickets: B.get(G).tickets.map((e) => ({
|
|
622
|
+
ID: e.id,
|
|
623
|
+
name: e.name,
|
|
624
|
+
price: e.price,
|
|
625
|
+
type: String(e.ticketType || 0),
|
|
626
|
+
visibility: String(+!!e.isHidden),
|
|
627
|
+
salesChannel: "0"
|
|
628
|
+
}))
|
|
629
|
+
});
|
|
630
|
+
let r = await se({
|
|
631
|
+
eventID: B.get(H),
|
|
632
|
+
quantities: t,
|
|
633
|
+
promoCode: B.get(Y) || void 0,
|
|
634
|
+
attribution: S(),
|
|
635
|
+
...B.get(Z) && h() && _() ? {
|
|
636
|
+
waitlistToken: h(),
|
|
637
|
+
customerEmail: _()
|
|
638
|
+
} : {}
|
|
639
|
+
});
|
|
640
|
+
if (!r?.success) {
|
|
641
|
+
B.set(N, r?.error || b().failedToCompleteOrder || "Failed to complete order. Please try again", !0);
|
|
642
|
+
return;
|
|
643
|
+
}
|
|
644
|
+
x(B.get(H), f(), k()), u() ? u()(B.get(H), B.get(de), B.get(A)) : y(D(T(B.get(H), B.get(de)), {}));
|
|
645
|
+
}
|
|
646
|
+
function We(e) {
|
|
647
|
+
if (d()) {
|
|
648
|
+
d()(e);
|
|
649
|
+
return;
|
|
650
|
+
}
|
|
651
|
+
e.id ? y(D(E(e.id, e.slug), {})) : (Ee.warn("Collection event missing id, navigating by slug only"), y(D(w(e.slug), {})));
|
|
652
|
+
}
|
|
653
|
+
function Ge(e) {
|
|
654
|
+
l() ? l()(o(e.id), e.slug) : y(D(E(e.id, e.slug), {}));
|
|
655
|
+
}
|
|
656
|
+
ue(async () => {
|
|
657
|
+
if (!B.get(A) && r()) {
|
|
658
|
+
try {
|
|
659
|
+
let e = await P(r());
|
|
660
|
+
B.set(A, e, !0);
|
|
661
|
+
} catch (e) {
|
|
662
|
+
B.set(M, e.message || b().failedToLoadEvent || "Failed to load event", !0), B.set(j, !1);
|
|
663
|
+
return;
|
|
664
|
+
}
|
|
665
|
+
B.set(j, !1);
|
|
666
|
+
}
|
|
667
|
+
if (!B.get(A)) return;
|
|
668
|
+
let e = B.get(A).ID || B.get(A).id;
|
|
669
|
+
e && (R(e), C(e, f(), k()));
|
|
670
|
+
let t = B.get(A).eventSeriesId || 0, n = B.get(A).venueID || B.get(A).venueId || 0;
|
|
671
|
+
if (t > 0 && n > 0) try {
|
|
672
|
+
let e = await ie(t, n);
|
|
673
|
+
if (Array.isArray(e) && e.length > 0) {
|
|
674
|
+
let t = B.get(A).stageId ?? B.get(A).stageID ?? 0;
|
|
675
|
+
B.set(fe, e.map((e) => {
|
|
676
|
+
let r = e.venue || {}, i = r.id && r.id !== n || e.stageId && e.stageId !== t, a = i ? [r.name, e.stage?.name].filter(Boolean).join(" — ") : "", o = i ? r.googleLocationNameCache || [
|
|
677
|
+
r.address,
|
|
678
|
+
r.city,
|
|
679
|
+
r.state
|
|
680
|
+
].filter(Boolean).join(", ") : "";
|
|
681
|
+
return {
|
|
682
|
+
id: e.id,
|
|
683
|
+
slug: e.slug || "",
|
|
684
|
+
startDateTime: e.startDateTime,
|
|
685
|
+
endDateTime: e.endDateTime || "",
|
|
686
|
+
status: e.ctaState?.reason === "sold_out" ? "sold_out" : "on_sale",
|
|
687
|
+
ctaText: e.ctaState?.text || "Get tickets",
|
|
688
|
+
ctaDisabled: e.ctaState?.disabled || !1,
|
|
689
|
+
...a ? { venueName: a } : {},
|
|
690
|
+
...o ? { venueAddress: o } : {}
|
|
691
|
+
};
|
|
692
|
+
}), !0);
|
|
693
|
+
}
|
|
694
|
+
} catch {}
|
|
695
|
+
if (B.get(he) && !ye(B.get(H)) && K.open(), B.get(H)) {
|
|
696
|
+
let e = await F(B.get(H));
|
|
697
|
+
B.set(Pe, e.waitlistEnabled, !0), B.set(Fe, e.gated, !0);
|
|
698
|
+
}
|
|
699
|
+
if (h() && _()) {
|
|
700
|
+
let e = await te(h(), _());
|
|
701
|
+
if (e.valid) {
|
|
702
|
+
if (B.set(Z, !0), e.expiresAt) {
|
|
703
|
+
let t = Date.parse(e.expiresAt);
|
|
704
|
+
Number.isFinite(t) && B.set(Le, t, !0);
|
|
705
|
+
}
|
|
706
|
+
} else B.set(Q, Be(e.errorCode), !0);
|
|
707
|
+
}
|
|
708
|
+
});
|
|
709
|
+
var Ke = Me(), qe = B.first_child(Ke), Je = (e) => {
|
|
710
|
+
var t = De(), n = B.child(t), r = B.child(n, !0);
|
|
711
|
+
B.reset(n), B.reset(t), B.template_effect(() => B.set_text(r, b().loadingEvent || "Loading event...")), B.append(e, t);
|
|
712
|
+
}, Ye = (e) => {
|
|
713
|
+
var t = Oe(), n = B.child(t), r = B.child(n);
|
|
714
|
+
B.reset(n);
|
|
715
|
+
var i = B.sibling(n, 2), o = (e) => {
|
|
716
|
+
s(e, {
|
|
717
|
+
variant: "default",
|
|
718
|
+
get onclick() {
|
|
719
|
+
return a();
|
|
720
|
+
},
|
|
721
|
+
children: (e, t) => {
|
|
722
|
+
B.next();
|
|
723
|
+
var n = B.text();
|
|
724
|
+
B.template_effect(() => B.set_text(n, b().goBack || "Go back")), B.append(e, n);
|
|
725
|
+
},
|
|
726
|
+
$$slots: { default: !0 }
|
|
727
|
+
});
|
|
728
|
+
};
|
|
729
|
+
B.if(i, (e) => {
|
|
730
|
+
a() && e(o);
|
|
731
|
+
}), B.reset(t), B.template_effect(() => B.set_text(r, `${(b().errorPrefix || "Error:") ?? ""} ${B.get(M) ?? ""}`)), B.append(e, t);
|
|
732
|
+
}, Xe = (e) => {
|
|
733
|
+
var t = B.comment(), n = B.first_child(t), r = (e) => {
|
|
734
|
+
var t = ke(), n = B.child(t), r = B.child(n), i = B.child(r), a = B.child(i);
|
|
735
|
+
m(a, { size: "32" }), B.reset(i);
|
|
736
|
+
var o = B.sibling(i, 2), l = B.child(o, !0);
|
|
737
|
+
B.reset(o);
|
|
738
|
+
var u = B.sibling(o, 2), d = B.child(u, !0);
|
|
739
|
+
B.reset(u);
|
|
740
|
+
var f = B.sibling(u, 2);
|
|
741
|
+
s(f, {
|
|
742
|
+
variant: "default",
|
|
743
|
+
size: "lg",
|
|
744
|
+
onclick: () => K.open(),
|
|
745
|
+
children: (e, t) => {
|
|
746
|
+
B.next();
|
|
747
|
+
var n = B.text();
|
|
748
|
+
B.template_effect(() => B.set_text(n, b().enterPassword || "Enter password")), B.append(e, n);
|
|
749
|
+
},
|
|
750
|
+
$$slots: { default: !0 }
|
|
751
|
+
}), B.reset(r), B.reset(n);
|
|
752
|
+
var p = B.sibling(n, 2), h = B.child(p);
|
|
753
|
+
c(h, {
|
|
754
|
+
get event() {
|
|
755
|
+
return B.get(G);
|
|
756
|
+
},
|
|
757
|
+
onCheckout: Ue,
|
|
758
|
+
get checkoutError() {
|
|
759
|
+
return B.get(N);
|
|
760
|
+
},
|
|
761
|
+
onPromoApply: we,
|
|
762
|
+
onPromoRemove: Ne,
|
|
763
|
+
onCollectionEventClick: We,
|
|
764
|
+
onShowtimeClick: Ge,
|
|
765
|
+
get gated() {
|
|
766
|
+
return B.get(Ie);
|
|
767
|
+
},
|
|
768
|
+
get unavailable() {
|
|
769
|
+
return B.get(U);
|
|
770
|
+
},
|
|
771
|
+
get unavailableReason() {
|
|
772
|
+
return B.get(W);
|
|
773
|
+
},
|
|
774
|
+
get waitlistEnabled() {
|
|
775
|
+
return B.get(Pe);
|
|
776
|
+
},
|
|
777
|
+
onJoinWaitlist: Ve,
|
|
778
|
+
get waitlistLinkError() {
|
|
779
|
+
return B.get(Q);
|
|
780
|
+
},
|
|
781
|
+
onDismissWaitlistLinkError: He,
|
|
782
|
+
get labels() {
|
|
783
|
+
return b();
|
|
784
|
+
},
|
|
785
|
+
get locale() {
|
|
786
|
+
return O();
|
|
787
|
+
}
|
|
788
|
+
}), B.reset(p), B.reset(t), B.template_effect(() => {
|
|
789
|
+
B.set_text(l, b().passwordProtectedTitle || "This event is password protected"), B.set_text(d, b().passwordProtectedDescription || "Enter the event password to view details and purchase tickets");
|
|
790
|
+
}), B.append(e, t);
|
|
791
|
+
}, i = (e) => {
|
|
792
|
+
var t = je(), n = B.first_child(t), r = (e) => {
|
|
793
|
+
var t = Ae(), n = B.child(t), r = B.child(n), i = B.sibling(r), a = B.child(i, !0);
|
|
794
|
+
B.reset(i);
|
|
795
|
+
var o = B.sibling(i);
|
|
796
|
+
B.reset(n), B.reset(t), B.template_effect(() => {
|
|
797
|
+
B.set_text(r, `${(b().waitlistWindowNotice || "These tickets are being held for you for") ?? ""} `), B.set_text(a, B.get(ze)), B.set_text(o, ` ${(b().waitlistWindowSuffix || "— after that, your spot passes to the next person in line") ?? ""}`);
|
|
798
|
+
}), B.append(e, t);
|
|
799
|
+
};
|
|
800
|
+
B.if(n, (e) => {
|
|
801
|
+
B.get(Z) && B.get(ze) && e(r);
|
|
802
|
+
});
|
|
803
|
+
var i = B.sibling(n, 2);
|
|
804
|
+
{
|
|
805
|
+
let e = B.derived(() => B.get(Z) ? h() : ""), t = B.derived(() => B.get(Z) ? _() : "");
|
|
806
|
+
c(i, {
|
|
807
|
+
get event() {
|
|
808
|
+
return B.get(G);
|
|
809
|
+
},
|
|
810
|
+
onCheckout: Ue,
|
|
811
|
+
get checkoutError() {
|
|
812
|
+
return B.get(N);
|
|
813
|
+
},
|
|
814
|
+
onPromoApply: we,
|
|
815
|
+
onPromoRemove: Ne,
|
|
816
|
+
onCollectionEventClick: We,
|
|
817
|
+
onShowtimeClick: Ge,
|
|
818
|
+
get gated() {
|
|
819
|
+
return B.get(Ie);
|
|
820
|
+
},
|
|
821
|
+
get unavailable() {
|
|
822
|
+
return B.get(U);
|
|
823
|
+
},
|
|
824
|
+
get unavailableReason() {
|
|
825
|
+
return B.get(W);
|
|
826
|
+
},
|
|
827
|
+
get waitlistEnabled() {
|
|
828
|
+
return B.get(Pe);
|
|
829
|
+
},
|
|
830
|
+
onJoinWaitlist: Ve,
|
|
831
|
+
get waitlistLinkError() {
|
|
832
|
+
return B.get(Q);
|
|
833
|
+
},
|
|
834
|
+
onDismissWaitlistLinkError: He,
|
|
835
|
+
get waitlistToken() {
|
|
836
|
+
return B.get(e);
|
|
837
|
+
},
|
|
838
|
+
get waitlistEmail() {
|
|
839
|
+
return B.get(t);
|
|
840
|
+
},
|
|
841
|
+
get labels() {
|
|
842
|
+
return b();
|
|
843
|
+
},
|
|
844
|
+
get locale() {
|
|
845
|
+
return O();
|
|
846
|
+
}
|
|
847
|
+
});
|
|
848
|
+
}
|
|
849
|
+
B.append(e, t);
|
|
850
|
+
};
|
|
851
|
+
B.if(n, (e) => {
|
|
852
|
+
B.get(ge) ? e(r) : e(i, -1);
|
|
853
|
+
}), B.append(e, t);
|
|
854
|
+
};
|
|
855
|
+
B.if(qe, (e) => {
|
|
856
|
+
B.get(j) ? e(Je) : B.get(M) ? e(Ye, 1) : B.get(G) && e(Xe, 2);
|
|
857
|
+
});
|
|
858
|
+
var Ze = B.sibling(qe, 2), Qe = () => K.isOpen, $e = (e) => e ? K.open() : K.close();
|
|
859
|
+
{
|
|
860
|
+
let e = B.derived(() => b().enterEventPassword || "Enter event password"), t = B.derived(() => b().passwordModalDescription || "This event requires a password to view. Please enter the password provided by the event organizer"), n = B.derived(() => b().passwordLabel || "Password"), r = B.derived(() => !!B.get(J)), i = B.derived(() => b().unlockEvent || "Unlock event"), a = B.derived(() => b().goBack || "Go back");
|
|
861
|
+
_e(Ze, {
|
|
862
|
+
get open() {
|
|
863
|
+
return Qe();
|
|
864
|
+
},
|
|
865
|
+
set open(e) {
|
|
866
|
+
$e(e);
|
|
867
|
+
},
|
|
868
|
+
size: "md",
|
|
869
|
+
get title() {
|
|
870
|
+
return B.get(e);
|
|
871
|
+
},
|
|
872
|
+
get description() {
|
|
873
|
+
return B.get(t);
|
|
874
|
+
},
|
|
875
|
+
get inputLabel() {
|
|
876
|
+
return B.get(n);
|
|
877
|
+
},
|
|
878
|
+
inputType: "password",
|
|
879
|
+
inputRequired: !0,
|
|
880
|
+
get errorMessage() {
|
|
881
|
+
return B.get(J);
|
|
882
|
+
},
|
|
883
|
+
get showError() {
|
|
884
|
+
return B.get(r);
|
|
885
|
+
},
|
|
886
|
+
get primaryButtonText() {
|
|
887
|
+
return B.get(i);
|
|
888
|
+
},
|
|
889
|
+
get secondaryButtonText() {
|
|
890
|
+
return B.get(a);
|
|
891
|
+
},
|
|
892
|
+
get loading() {
|
|
893
|
+
return B.get(me);
|
|
894
|
+
},
|
|
895
|
+
onconfirm: xe,
|
|
896
|
+
oncancel: Se,
|
|
897
|
+
onclose: Se,
|
|
898
|
+
get inputValue() {
|
|
899
|
+
return B.get(q);
|
|
900
|
+
},
|
|
901
|
+
set inputValue(e) {
|
|
902
|
+
B.set(q, e, !0);
|
|
903
|
+
}
|
|
904
|
+
});
|
|
905
|
+
}
|
|
906
|
+
var et = B.sibling(Ze, 2), tt = () => $.isOpen, nt = (e) => e ? $.open() : $.close();
|
|
907
|
+
{
|
|
908
|
+
let e = B.derived(() => B.get(G)?.title || "this event");
|
|
909
|
+
Te(et, {
|
|
910
|
+
get show() {
|
|
911
|
+
return tt();
|
|
912
|
+
},
|
|
913
|
+
set show(e) {
|
|
914
|
+
nt(e);
|
|
915
|
+
},
|
|
916
|
+
get eventId() {
|
|
917
|
+
return B.get(H);
|
|
918
|
+
},
|
|
919
|
+
get eventName() {
|
|
920
|
+
return B.get(e);
|
|
921
|
+
},
|
|
922
|
+
onClose: () => $.close(),
|
|
923
|
+
get labels() {
|
|
924
|
+
return b();
|
|
925
|
+
}
|
|
926
|
+
});
|
|
927
|
+
}
|
|
928
|
+
B.append(e, Ke), B.pop();
|
|
929
|
+
}
|
|
930
|
+
//#endregion
|
|
931
|
+
export { Ne as default };
|