@getmicdrop/venue-calendar 4.0.92 → 4.0.94
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 +740 -740
- package/dist/CartView-hnrXbE_O.js +2385 -0
- package/dist/CartView-hnrXbE_O.js.map +1 -0
- package/dist/Checkout-Bvre3lYs.js +1745 -0
- package/dist/Checkout-Bvre3lYs.js.map +1 -0
- package/dist/Checkout-C4Kr5pVp.js +1040 -0
- package/dist/Checkout-C4Kr5pVp.js.map +1 -0
- package/dist/{CheckoutTimer-CF6emJxC.js → CheckoutTimer-D2HnWYm7.js} +37 -37
- package/dist/CheckoutTimer-D2HnWYm7.js.map +1 -0
- package/dist/ClockIcon-DA4wXK5Q.js +32 -0
- package/dist/ClockIcon-DA4wXK5Q.js.map +1 -0
- package/dist/CollectionView-DU1lTGU_.js +299 -0
- package/dist/CollectionView-DU1lTGU_.js.map +1 -0
- package/dist/{Event-BzBZmp6N.js → Event-BuOnGjPB.js} +1569 -1491
- package/dist/Event-BuOnGjPB.js.map +1 -0
- package/dist/EventPage-vBSbuSaG.js +566 -0
- package/dist/EventPage-vBSbuSaG.js.map +1 -0
- package/dist/{Heading-BswFTsr3.js → Heading-D4iOOm-C.js} +26 -26
- package/dist/Heading-D4iOOm-C.js.map +1 -0
- package/dist/ScarcityBadge-D37JY-BJ.js +167 -0
- package/dist/ScarcityBadge-D37JY-BJ.js.map +1 -0
- package/dist/{SeriesPage-CbmuRofu.js → SeriesPage-CZdi_-a4.js} +5 -5
- package/dist/SeriesPage-CZdi_-a4.js.map +1 -0
- package/dist/{Spinner-CAxL7NK0.js → Spinner-BZYln43S.js} +10 -10
- package/dist/Spinner-BZYln43S.js.map +1 -0
- package/dist/Success-CQYI5SZO.js +866 -0
- package/dist/Success-CQYI5SZO.js.map +1 -0
- package/dist/Text-C-6sDfH2.js +171 -0
- package/dist/Text-C-6sDfH2.js.map +1 -0
- package/dist/VenueCalendar-Um0PQCVy.js +15645 -0
- package/dist/VenueCalendar-Um0PQCVy.js.map +1 -0
- package/dist/{ViewTicketsEmbed-C7GPK33F.js → ViewTicketsEmbed-D2jQ8AMb.js} +386 -387
- package/dist/ViewTicketsEmbed-D2jQ8AMb.js.map +1 -0
- package/dist/api/{events.d.ts → api/events.d.ts} +9 -10
- package/dist/api/{index.d.ts → api/index.d.ts} +2 -1
- package/dist/api/api/result.d.ts +48 -0
- package/dist/api/{transformers → api/transformers}/event.d.ts +19 -10
- package/dist/api/api.cjs +1 -1
- package/dist/api/api.cjs.map +1 -1
- package/dist/api/api.mjs +690 -599
- package/dist/api/api.mjs.map +1 -1
- package/dist/api/types.d.ts +9 -0
- package/dist/{data-toggle-store.svelte-BUOQgWTH.js → data-toggle-store.svelte-CyXPU9Oq.js} +2 -2
- package/dist/data-toggle-store.svelte-CyXPU9Oq.js.map +1 -0
- package/dist/labels-BNiV89mT.js +636 -0
- package/dist/labels-BNiV89mT.js.map +1 -0
- package/dist/{modalManager.svelte-C8L8XPBi.js → modalManager.svelte-D_9E6W5P.js} +2 -2
- package/dist/modalManager.svelte-D_9E6W5P.js.map +1 -0
- package/dist/seo/seo.cjs +1 -1
- package/dist/seo/seo.cjs.map +1 -1
- package/dist/seo/seo.mjs +78 -74
- package/dist/seo/seo.mjs.map +1 -1
- package/dist/transform-HKz55B2D.js +360 -0
- package/dist/transform-HKz55B2D.js.map +1 -0
- package/dist/types/index.d.ts +454 -442
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +12 -12
- package/dist/venue-calendar.iife.js +44 -30
- package/dist/venue-calendar.iife.js.map +1 -1
- package/dist/venue-calendar.umd.js +45 -31
- package/dist/venue-calendar.umd.js.map +1 -1
- package/package.json +7 -5
- package/src/lib/theme.js +222 -222
- package/dist/CartView-IiXG4UTa.js +0 -2366
- package/dist/CartView-IiXG4UTa.js.map +0 -1
- package/dist/Checkout-BscK0fmI.js +0 -1717
- package/dist/Checkout-BscK0fmI.js.map +0 -1
- package/dist/Checkout-Dx7QWFn9.js +0 -916
- package/dist/Checkout-Dx7QWFn9.js.map +0 -1
- package/dist/CheckoutTimer-CF6emJxC.js.map +0 -1
- package/dist/CollectionView-BAy5mYKg.js +0 -299
- package/dist/CollectionView-BAy5mYKg.js.map +0 -1
- package/dist/Event-BzBZmp6N.js.map +0 -1
- package/dist/EventPage-TNjZq1ls.js +0 -532
- package/dist/EventPage-TNjZq1ls.js.map +0 -1
- package/dist/Heading-BswFTsr3.js.map +0 -1
- package/dist/ScarcityBadge-DEzS1qXs.js +0 -90
- package/dist/ScarcityBadge-DEzS1qXs.js.map +0 -1
- package/dist/SeriesPage-CbmuRofu.js.map +0 -1
- package/dist/Spinner-CAxL7NK0.js.map +0 -1
- package/dist/Success-DdWMiFHS.js +0 -729
- package/dist/Success-DdWMiFHS.js.map +0 -1
- package/dist/Text-HvIEXENM.js +0 -167
- package/dist/Text-HvIEXENM.js.map +0 -1
- package/dist/VenueCalendar-DhxkKfli.js +0 -18400
- package/dist/VenueCalendar-DhxkKfli.js.map +0 -1
- package/dist/ViewTicketsEmbed-C7GPK33F.js.map +0 -1
- package/dist/data-toggle-store.svelte-BUOQgWTH.js.map +0 -1
- package/dist/labels-Bwet5rDx.js +0 -965
- package/dist/labels-Bwet5rDx.js.map +0 -1
- package/dist/modalManager.svelte-C8L8XPBi.js.map +0 -1
- package/dist/transform-5AH-sRWT.js +0 -274
- package/dist/transform-5AH-sRWT.js.map +0 -1
- /package/dist/api/{client.d.ts → api/client.d.ts} +0 -0
- /package/dist/api/{cta.d.ts → api/cta.d.ts} +0 -0
- /package/dist/api/{gift-cards.d.ts → api/gift-cards.d.ts} +0 -0
- /package/dist/api/{orders.d.ts → api/orders.d.ts} +0 -0
- /package/dist/api/{promo.d.ts → api/promo.d.ts} +0 -0
- /package/dist/api/{transformers → api/transformers}/address.d.ts +0 -0
- /package/dist/api/{transformers → api/transformers}/cart.d.ts +0 -0
- /package/dist/api/{transformers → api/transformers}/collection.d.ts +0 -0
- /package/dist/api/{transformers → api/transformers}/giftCard.d.ts +0 -0
- /package/dist/api/{transformers → api/transformers}/index.d.ts +0 -0
- /package/dist/api/{transformers → api/transformers}/order.d.ts +0 -0
- /package/dist/api/{transformers → api/transformers}/performer.d.ts +0 -0
- /package/dist/api/{transformers → api/transformers}/series.d.ts +0 -0
- /package/dist/api/{transformers → api/transformers}/venue.d.ts +0 -0
- /package/dist/api/{venues.d.ts → api/venues.d.ts} +0 -0
- /package/dist/api/{waitlist.d.ts → api/waitlist.d.ts} +0 -0
package/dist/api/api.mjs
CHANGED
|
@@ -1,116 +1,116 @@
|
|
|
1
1
|
import { createLogger as b } from "@getmicdrop/svelte-components/utils/logger";
|
|
2
|
-
import { AppError as E, formatCurrency as
|
|
3
|
-
import {
|
|
4
|
-
import { isHiddenTicketPurchasable as
|
|
2
|
+
import { getLocalStorage as ie, setLocalStorage as ce, getSessionStorage as J, setSessionStorage as ue, createLogger as le, AppError as E, formatCurrency as de, resolveImageUrl as Y } from "@getmicdrop/svelte-components";
|
|
3
|
+
import { formatLocal as L } from "@getmicdrop/svelte-components/datetime";
|
|
4
|
+
import { isHiddenTicketPurchasable as fe } from "@getmicdrop/svelte-components/transforms";
|
|
5
5
|
import "@getmicdrop/svelte-components/utils/timezones";
|
|
6
|
-
const
|
|
6
|
+
const q = b("VC"), me = {
|
|
7
7
|
baseUrl: "https://get-micdrop.com",
|
|
8
8
|
timeout: 3e4,
|
|
9
9
|
retries: 2,
|
|
10
10
|
retryDelay: 500,
|
|
11
|
-
onError: (
|
|
11
|
+
onError: (t) => q.error("API Error:", t)
|
|
12
12
|
};
|
|
13
|
-
let
|
|
14
|
-
function
|
|
15
|
-
|
|
13
|
+
let p = { ...me };
|
|
14
|
+
function ot(t) {
|
|
15
|
+
p = { ...p, ...t };
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
return { ...
|
|
17
|
+
function it() {
|
|
18
|
+
return { ...p };
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
return `${
|
|
20
|
+
function c() {
|
|
21
|
+
return `${p.baseUrl}/api/v2/public`;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
return `${
|
|
23
|
+
function ct() {
|
|
24
|
+
return `${p.baseUrl}/api/public`;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
return `${
|
|
26
|
+
function R() {
|
|
27
|
+
return `${p.baseUrl}/api/orders/v2/public`;
|
|
28
28
|
}
|
|
29
|
-
async function
|
|
29
|
+
async function ut() {
|
|
30
30
|
return "";
|
|
31
31
|
}
|
|
32
|
-
const
|
|
33
|
-
async function
|
|
34
|
-
const n = (e.method || "GET").toUpperCase(),
|
|
35
|
-
let
|
|
36
|
-
for (let i = 1; i <=
|
|
37
|
-
const
|
|
32
|
+
const pe = (t) => new Promise((e) => setTimeout(e, t));
|
|
33
|
+
async function K(t, e, r) {
|
|
34
|
+
const n = (e.method || "GET").toUpperCase(), s = n === "GET" || n === "HEAD" ? r.retries + 1 : 1;
|
|
35
|
+
let o;
|
|
36
|
+
for (let i = 1; i <= s; i++) {
|
|
37
|
+
const u = new AbortController(), C = setTimeout(() => u.abort(), r.timeout), y = e.signal;
|
|
38
38
|
let k;
|
|
39
|
-
|
|
39
|
+
y && (y.aborted ? u.abort() : (k = () => u.abort(), y.addEventListener("abort", k, { once: !0 })));
|
|
40
40
|
try {
|
|
41
|
-
const g = await fetch(
|
|
42
|
-
if (g.status >= 500 && i <
|
|
43
|
-
|
|
41
|
+
const g = await fetch(t, { ...e, signal: u.signal });
|
|
42
|
+
if (g.status >= 500 && i < s)
|
|
43
|
+
o = new Error(`HTTP ${g.status}`);
|
|
44
44
|
else
|
|
45
45
|
return g;
|
|
46
46
|
} catch (g) {
|
|
47
|
-
if (
|
|
47
|
+
if (o = g, y?.aborted) throw g;
|
|
48
48
|
} finally {
|
|
49
|
-
clearTimeout(
|
|
49
|
+
clearTimeout(C), y && k && y.removeEventListener("abort", k);
|
|
50
50
|
}
|
|
51
|
-
i <
|
|
51
|
+
i < s && await pe(r.retryDelay * Math.pow(2, i - 1));
|
|
52
52
|
}
|
|
53
|
-
throw
|
|
53
|
+
throw o;
|
|
54
54
|
}
|
|
55
|
-
async function $(
|
|
56
|
-
return
|
|
55
|
+
async function $(t, e) {
|
|
56
|
+
return F("GET", t, void 0, e);
|
|
57
57
|
}
|
|
58
|
-
async function
|
|
59
|
-
return
|
|
58
|
+
async function f(t, e, r) {
|
|
59
|
+
return F("POST", t, e, r);
|
|
60
60
|
}
|
|
61
|
-
async function
|
|
62
|
-
return
|
|
61
|
+
async function lt(t, e, r) {
|
|
62
|
+
return F("PUT", t, e, r);
|
|
63
63
|
}
|
|
64
|
-
async function
|
|
65
|
-
return
|
|
64
|
+
async function ye(t, e) {
|
|
65
|
+
return F("DELETE", t, void 0, e);
|
|
66
66
|
}
|
|
67
|
-
async function
|
|
68
|
-
const a = e.startsWith("http") ? e : `${
|
|
67
|
+
async function F(t, e, r, n) {
|
|
68
|
+
const a = e.startsWith("http") ? e : `${c()}${e}`;
|
|
69
69
|
try {
|
|
70
|
-
const
|
|
70
|
+
const s = await K(
|
|
71
71
|
a,
|
|
72
72
|
{
|
|
73
|
-
method:
|
|
73
|
+
method: t,
|
|
74
74
|
headers: {
|
|
75
75
|
"Content-Type": "application/json",
|
|
76
76
|
...n?.headers
|
|
77
77
|
},
|
|
78
|
-
body:
|
|
78
|
+
body: r !== void 0 ? JSON.stringify(r) : void 0,
|
|
79
79
|
credentials: "include",
|
|
80
80
|
...n
|
|
81
81
|
},
|
|
82
|
-
|
|
82
|
+
p
|
|
83
83
|
);
|
|
84
|
-
if (!
|
|
85
|
-
const i = await
|
|
86
|
-
return
|
|
84
|
+
if (!s.ok) {
|
|
85
|
+
const i = await s.json().catch(() => ({})), u = i.error || i.message || `HTTP ${s.status}`;
|
|
86
|
+
return p.onError(new Error(u)), { success: !1, error: u, statusCode: s.status };
|
|
87
87
|
}
|
|
88
|
-
return { success: !0, data: await
|
|
89
|
-
} catch (
|
|
90
|
-
const
|
|
91
|
-
return
|
|
92
|
-
|
|
93
|
-
), { success: !1, error:
|
|
88
|
+
return { success: !0, data: await s.json(), statusCode: s.status };
|
|
89
|
+
} catch (s) {
|
|
90
|
+
const o = s instanceof Error ? s.name === "AbortError" ? "Request timed out" : s.message : "Unknown error";
|
|
91
|
+
return p.onError(
|
|
92
|
+
s instanceof Error ? s : new Error(o)
|
|
93
|
+
), { success: !1, error: o };
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
async function
|
|
96
|
+
async function A(t, e) {
|
|
97
97
|
try {
|
|
98
|
-
const
|
|
99
|
-
|
|
98
|
+
const r = await K(
|
|
99
|
+
t,
|
|
100
100
|
{ credentials: "include", ...e },
|
|
101
|
-
|
|
101
|
+
p
|
|
102
102
|
);
|
|
103
|
-
if (!
|
|
104
|
-
const n = await
|
|
105
|
-
return
|
|
103
|
+
if (!r.ok) {
|
|
104
|
+
const n = await r.json().catch(() => ({}));
|
|
105
|
+
return q.error(`API request failed: ${r.status}`, n), null;
|
|
106
106
|
}
|
|
107
|
-
return
|
|
108
|
-
} catch (
|
|
109
|
-
return
|
|
107
|
+
return r.json();
|
|
108
|
+
} catch (r) {
|
|
109
|
+
return q.error("API request error:", r), null;
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
function
|
|
113
|
-
const e =
|
|
112
|
+
function ge(t) {
|
|
113
|
+
const e = t ?? {};
|
|
114
114
|
return {
|
|
115
115
|
ticketID: Number(e.TicketID ?? e.ticketID ?? 0),
|
|
116
116
|
quantity: Number(e.Quantity ?? e.quantity ?? 0),
|
|
@@ -120,60 +120,165 @@ function te(r) {
|
|
|
120
120
|
status: String(e.Status ?? e.status ?? "")
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
|
-
function
|
|
124
|
-
const e =
|
|
125
|
-
return { uuid:
|
|
123
|
+
function ve(t) {
|
|
124
|
+
const e = t ?? {}, r = e.UUID ?? e.uuid ?? "", n = Number(e.EventID ?? e.eventID ?? 0), a = e.Status ?? e.status ?? "", s = e.ExpiresAt ?? e.expiresAt ?? "", i = (e.Reservations ?? e.reservations ?? []).map(ge);
|
|
125
|
+
return { uuid: r, eventID: n, status: a, expiresAt: s, reservations: i };
|
|
126
|
+
}
|
|
127
|
+
const Z = [
|
|
128
|
+
"utmSource",
|
|
129
|
+
"utmMedium",
|
|
130
|
+
"utmCampaign",
|
|
131
|
+
"utmContent",
|
|
132
|
+
"utmTerm"
|
|
133
|
+
], he = {
|
|
134
|
+
utmSource: "utm_source",
|
|
135
|
+
utmMedium: "utm_medium",
|
|
136
|
+
utmCampaign: "utm_campaign",
|
|
137
|
+
utmContent: "utm_content",
|
|
138
|
+
utmTerm: "utm_term"
|
|
139
|
+
}, X = "direct";
|
|
140
|
+
function ee(t) {
|
|
141
|
+
return t ? t.trim().toLowerCase().replace(/\s+/g, "_") : "";
|
|
142
|
+
}
|
|
143
|
+
function _e(t) {
|
|
144
|
+
const e = {};
|
|
145
|
+
for (const r of Z)
|
|
146
|
+
e[r] = ee(t[r]);
|
|
147
|
+
return e.utmSource || (e.utmSource = X), e;
|
|
148
|
+
}
|
|
149
|
+
function we(t) {
|
|
150
|
+
const e = {};
|
|
151
|
+
for (const r of Z)
|
|
152
|
+
e[r] = t.get(he[r]);
|
|
153
|
+
return _e(e);
|
|
154
|
+
}
|
|
155
|
+
function ke() {
|
|
156
|
+
if (typeof window > "u") return !0;
|
|
157
|
+
try {
|
|
158
|
+
return window.self === window.top;
|
|
159
|
+
} catch {
|
|
160
|
+
return !1;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
function be() {
|
|
164
|
+
const t = typeof window < "u", e = ke(), r = t ? window.location.search : "", n = (typeof document < "u" ? document.referrer : "") ?? "", a = t && e ? window.location.href : "";
|
|
165
|
+
return {
|
|
166
|
+
utm: we(new URLSearchParams(r)),
|
|
167
|
+
referrer: n || "",
|
|
168
|
+
pageUrl: a || ""
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
let $e = !1;
|
|
172
|
+
function Ce() {
|
|
173
|
+
return typeof window < "u" && typeof window.__tcfapi == "function";
|
|
174
|
+
}
|
|
175
|
+
function Te() {
|
|
176
|
+
return Ce();
|
|
177
|
+
}
|
|
178
|
+
function Pe() {
|
|
179
|
+
return Te() ? $e : !0;
|
|
180
|
+
}
|
|
181
|
+
const H = "micdrop_session_id", W = "micdrop_visitor_id", Se = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
182
|
+
function Ie(t) {
|
|
183
|
+
return typeof t == "string" && Se.test(t);
|
|
184
|
+
}
|
|
185
|
+
function te() {
|
|
186
|
+
const t = typeof crypto < "u" ? crypto : void 0;
|
|
187
|
+
if (t?.randomUUID) return t.randomUUID();
|
|
188
|
+
const e = new Uint8Array(16);
|
|
189
|
+
if (t?.getRandomValues)
|
|
190
|
+
t.getRandomValues(e);
|
|
191
|
+
else
|
|
192
|
+
for (let n = 0; n < 16; n++) e[n] = Math.floor(Math.random() * 256);
|
|
193
|
+
e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128;
|
|
194
|
+
const r = [];
|
|
195
|
+
for (let n = 0; n < 16; n++) r.push(e[n].toString(16).padStart(2, "0"));
|
|
196
|
+
return `${r[0]}${r[1]}${r[2]}${r[3]}-${r[4]}${r[5]}-${r[6]}${r[7]}-${r[8]}${r[9]}-${r[10]}${r[11]}${r[12]}${r[13]}${r[14]}${r[15]}`;
|
|
197
|
+
}
|
|
198
|
+
function Ee() {
|
|
199
|
+
let t = J(H);
|
|
200
|
+
return t || (t = te(), ue(H, t)), t;
|
|
201
|
+
}
|
|
202
|
+
function Re() {
|
|
203
|
+
if (!Pe()) return null;
|
|
204
|
+
const t = ie(W);
|
|
205
|
+
if (Ie(t)) return t;
|
|
206
|
+
const e = te();
|
|
207
|
+
return ce(W, e), e;
|
|
208
|
+
}
|
|
209
|
+
const Ae = "micdrop_attribution";
|
|
210
|
+
function De() {
|
|
211
|
+
const t = J(Ae);
|
|
212
|
+
return !t || !t.utm || typeof t.utm.utmSource != "string" ? null : t;
|
|
213
|
+
}
|
|
214
|
+
function U() {
|
|
215
|
+
const e = De() ?? be();
|
|
216
|
+
return {
|
|
217
|
+
sessionId: Ee(),
|
|
218
|
+
visitorId: Re(),
|
|
219
|
+
utmSource: e.utm.utmSource,
|
|
220
|
+
utmMedium: e.utm.utmMedium,
|
|
221
|
+
utmCampaign: e.utm.utmCampaign,
|
|
222
|
+
utmContent: e.utm.utmContent,
|
|
223
|
+
utmTerm: e.utm.utmTerm,
|
|
224
|
+
referrer: e.referrer || ""
|
|
225
|
+
};
|
|
126
226
|
}
|
|
127
|
-
|
|
128
|
-
|
|
227
|
+
le("tracking");
|
|
228
|
+
const d = b("VC");
|
|
229
|
+
async function dt(t, e, r) {
|
|
129
230
|
try {
|
|
130
|
-
const n = await
|
|
131
|
-
`${
|
|
231
|
+
const n = await f(
|
|
232
|
+
`${R()}/cart/${t}/payment-intent`,
|
|
132
233
|
{
|
|
133
234
|
productQuantities: e,
|
|
134
|
-
...
|
|
235
|
+
...r && Object.keys(r).length > 0 ? { donationAmounts: r } : {},
|
|
236
|
+
// Order attribution (MISSION-TRUTH C2) — additive; ignored by a backend
|
|
237
|
+
// that hasn't shipped MIC-1255 yet. Free orders finalize via this
|
|
238
|
+
// payment-intent pre-submit, so this covers the free-order path too.
|
|
239
|
+
attribution: U()
|
|
135
240
|
}
|
|
136
241
|
);
|
|
137
242
|
if (!n.success)
|
|
138
|
-
throw
|
|
243
|
+
throw d.error("Payment intent creation failed:", n.error), new E(
|
|
139
244
|
n.error || "Failed to create payment intent",
|
|
140
245
|
"lib/api/orders/createPaymentIntent"
|
|
141
246
|
);
|
|
142
|
-
return
|
|
247
|
+
return d.debug("Payment intent created:", n.data), n.data;
|
|
143
248
|
} catch (n) {
|
|
144
|
-
return
|
|
249
|
+
return d.error("createPaymentIntent error:", n), null;
|
|
145
250
|
}
|
|
146
251
|
}
|
|
147
|
-
async function
|
|
148
|
-
if (!
|
|
252
|
+
async function ft(t, e) {
|
|
253
|
+
if (!t) return null;
|
|
149
254
|
try {
|
|
150
|
-
const
|
|
151
|
-
`${
|
|
255
|
+
const r = await $(
|
|
256
|
+
`${R()}/cart/${t}`
|
|
152
257
|
);
|
|
153
|
-
if (!
|
|
258
|
+
if (!r.success)
|
|
154
259
|
return null;
|
|
155
|
-
const { uuid: n, eventID: a, status:
|
|
156
|
-
|
|
260
|
+
const { uuid: n, eventID: a, status: s, expiresAt: o, reservations: i } = ve(
|
|
261
|
+
r.data
|
|
157
262
|
);
|
|
158
|
-
return
|
|
159
|
-
} catch (
|
|
160
|
-
return
|
|
263
|
+
return s !== "reserved" && s !== "active" || e !== void 0 && a !== Number(e) ? null : { uuid: n, eventID: a, status: s, expiresAt: o, reservations: i };
|
|
264
|
+
} catch (r) {
|
|
265
|
+
return d.error("getCartByUUID error:", r), null;
|
|
161
266
|
}
|
|
162
267
|
}
|
|
163
|
-
async function
|
|
268
|
+
async function mt(t, e, r) {
|
|
164
269
|
try {
|
|
165
270
|
const n = {};
|
|
166
|
-
for (const [
|
|
167
|
-
const
|
|
168
|
-
!Number.isNaN(
|
|
271
|
+
for (const [o, i] of Object.entries(e)) {
|
|
272
|
+
const u = typeof o == "number" ? o : parseInt(o, 10);
|
|
273
|
+
!Number.isNaN(u) && i > 0 && (n[u] = i);
|
|
169
274
|
}
|
|
170
275
|
const a = {};
|
|
171
|
-
if (
|
|
172
|
-
for (const [
|
|
173
|
-
const
|
|
174
|
-
!Number.isNaN(
|
|
276
|
+
if (r)
|
|
277
|
+
for (const [o, i] of Object.entries(r)) {
|
|
278
|
+
const u = typeof o == "number" ? o : parseInt(o, 10);
|
|
279
|
+
!Number.isNaN(u) && i > 0 && (a[u] = i);
|
|
175
280
|
}
|
|
176
|
-
const
|
|
281
|
+
const s = await fetch(`${R()}/cart/${t}`, {
|
|
177
282
|
method: "PUT",
|
|
178
283
|
headers: { "Content-Type": "application/json" },
|
|
179
284
|
credentials: "include",
|
|
@@ -182,19 +287,19 @@ async function Re(r, e, t) {
|
|
|
182
287
|
...Object.keys(a).length > 0 ? { donationAmounts: a } : {}
|
|
183
288
|
})
|
|
184
289
|
});
|
|
185
|
-
if (!
|
|
186
|
-
const
|
|
187
|
-
return
|
|
290
|
+
if (!s.ok) {
|
|
291
|
+
const o = await s.json().catch(() => ({}));
|
|
292
|
+
return d.error("Cart update failed:", o), !1;
|
|
188
293
|
}
|
|
189
294
|
return !0;
|
|
190
295
|
} catch (n) {
|
|
191
|
-
return
|
|
296
|
+
return d.error("updateCartQuantities error:", n), !1;
|
|
192
297
|
}
|
|
193
298
|
}
|
|
194
|
-
async function
|
|
299
|
+
async function pt(t) {
|
|
195
300
|
try {
|
|
196
|
-
const e = await
|
|
197
|
-
`${
|
|
301
|
+
const e = await f(
|
|
302
|
+
`${c()}/orders/complete/${t}`
|
|
198
303
|
);
|
|
199
304
|
return e.success ? {
|
|
200
305
|
success: !0,
|
|
@@ -204,13 +309,13 @@ async function De(r) {
|
|
|
204
309
|
error: e.error || "Failed to complete reservation"
|
|
205
310
|
};
|
|
206
311
|
} catch (e) {
|
|
207
|
-
return
|
|
312
|
+
return d.error("Error completing reservation:", e), { success: !1, error: "Network error completing reservation" };
|
|
208
313
|
}
|
|
209
314
|
}
|
|
210
|
-
async function
|
|
315
|
+
async function yt(t) {
|
|
211
316
|
try {
|
|
212
|
-
const e = await
|
|
213
|
-
`${
|
|
317
|
+
const e = await f(
|
|
318
|
+
`${c()}/orders/cancel/${t}`
|
|
214
319
|
);
|
|
215
320
|
return e.success ? {
|
|
216
321
|
success: !0,
|
|
@@ -220,33 +325,37 @@ async function xe(r) {
|
|
|
220
325
|
error: e.error || "Failed to cancel reservation"
|
|
221
326
|
};
|
|
222
327
|
} catch (e) {
|
|
223
|
-
return
|
|
328
|
+
return d.error("Error cancelling reservation:", e), { success: !1, error: "Network error cancelling reservation" };
|
|
224
329
|
}
|
|
225
330
|
}
|
|
226
|
-
async function
|
|
331
|
+
async function gt(t, e) {
|
|
227
332
|
try {
|
|
228
|
-
const
|
|
229
|
-
`${
|
|
230
|
-
|
|
333
|
+
const r = await f(
|
|
334
|
+
`${c()}/orders/create`,
|
|
335
|
+
// attribution (MISSION-TRUTH C2) rides on cart-create additively.
|
|
336
|
+
{ eventID: t, promoCode: e, attribution: U() }
|
|
231
337
|
);
|
|
232
|
-
return
|
|
233
|
-
} catch (
|
|
234
|
-
return
|
|
338
|
+
return r.success ? r.data : (d.error("Create order failed:", r.error), null);
|
|
339
|
+
} catch (r) {
|
|
340
|
+
return d.error("createOrder error:", r), null;
|
|
235
341
|
}
|
|
236
342
|
}
|
|
237
|
-
async function
|
|
238
|
-
return
|
|
343
|
+
async function vt(t) {
|
|
344
|
+
return A(`${c()}/orders/${t}`);
|
|
239
345
|
}
|
|
240
|
-
async function
|
|
346
|
+
async function ht(t, e) {
|
|
241
347
|
try {
|
|
242
|
-
const
|
|
243
|
-
|
|
244
|
-
|
|
348
|
+
const r = await f(`${R()}/validatePaymentIntent/${t}`, {
|
|
349
|
+
...e,
|
|
350
|
+
attribution: U()
|
|
351
|
+
});
|
|
352
|
+
if (!r.success)
|
|
353
|
+
return d.error("Payment validation failed:", r.error), {
|
|
245
354
|
success: !1,
|
|
246
355
|
status: "failed",
|
|
247
|
-
error:
|
|
356
|
+
error: r.error || "Payment validation failed"
|
|
248
357
|
};
|
|
249
|
-
const n =
|
|
358
|
+
const n = r.data;
|
|
250
359
|
return n.eventCanceled || n.eventPostponed ? {
|
|
251
360
|
success: !1,
|
|
252
361
|
status: "failed",
|
|
@@ -257,81 +366,82 @@ async function Fe(r, e) {
|
|
|
257
366
|
status: n.status || "Payment succeeded",
|
|
258
367
|
orderUUID: n.orderUUID || n.uuid
|
|
259
368
|
};
|
|
260
|
-
} catch (
|
|
261
|
-
return
|
|
369
|
+
} catch (r) {
|
|
370
|
+
return d.error("validatePaymentIntent error:", r), null;
|
|
262
371
|
}
|
|
263
372
|
}
|
|
264
|
-
async function
|
|
373
|
+
async function _t(t) {
|
|
265
374
|
try {
|
|
266
|
-
const e = await
|
|
375
|
+
const e = await f(`${c()}/orders/extend-session`, { orderUuid: t });
|
|
267
376
|
if (!e.success)
|
|
268
377
|
return {
|
|
269
378
|
success: !1,
|
|
270
379
|
error: e.error || "Failed to extend session",
|
|
271
380
|
statusCode: e.statusCode
|
|
272
381
|
};
|
|
273
|
-
const
|
|
382
|
+
const r = e.data;
|
|
274
383
|
return {
|
|
275
384
|
success: !0,
|
|
276
|
-
newExpiryTime:
|
|
277
|
-
remainingExtensions:
|
|
385
|
+
newExpiryTime: r.newExpiryTime,
|
|
386
|
+
remainingExtensions: r.remainingExtensions
|
|
278
387
|
};
|
|
279
388
|
} catch (e) {
|
|
280
|
-
return
|
|
389
|
+
return d.error("Error extending checkout session:", e), { success: !1, error: "Network error extending session" };
|
|
281
390
|
}
|
|
282
391
|
}
|
|
283
|
-
async function
|
|
392
|
+
async function wt(t) {
|
|
284
393
|
try {
|
|
285
394
|
const e = await $(
|
|
286
|
-
`${
|
|
395
|
+
`${c()}/orders/session/${t}`
|
|
287
396
|
);
|
|
288
397
|
if (!e.success)
|
|
289
398
|
return {
|
|
290
399
|
error: e.error || "No active session found",
|
|
291
400
|
notFound: e.statusCode === 404
|
|
292
401
|
};
|
|
293
|
-
const
|
|
402
|
+
const r = e.data;
|
|
294
403
|
return {
|
|
295
|
-
expiresAt:
|
|
296
|
-
extensionCount:
|
|
297
|
-
remainingExtensions:
|
|
298
|
-
canExtend:
|
|
299
|
-
reservationCount:
|
|
300
|
-
eventStatus:
|
|
404
|
+
expiresAt: r.expiresAt,
|
|
405
|
+
extensionCount: r.extensionCount,
|
|
406
|
+
remainingExtensions: r.remainingExtensions,
|
|
407
|
+
canExtend: r.canExtend,
|
|
408
|
+
reservationCount: r.reservationCount,
|
|
409
|
+
eventStatus: r.eventStatus
|
|
301
410
|
};
|
|
302
411
|
} catch (e) {
|
|
303
|
-
return
|
|
412
|
+
return d.error("Error getting session status:", e), { error: "Network error getting session status" };
|
|
304
413
|
}
|
|
305
414
|
}
|
|
306
|
-
async function
|
|
415
|
+
async function kt(t = { eventID: "" }) {
|
|
307
416
|
try {
|
|
308
|
-
const e = await
|
|
309
|
-
`${
|
|
310
|
-
|
|
417
|
+
const e = await f(
|
|
418
|
+
`${c()}/orders/create`,
|
|
419
|
+
// attribution (MISSION-TRUTH C2) rides on cart-create additively.
|
|
420
|
+
{ ...t, attribution: U() }
|
|
311
421
|
);
|
|
312
|
-
return e.success ? e.data?.uuid ?? null : (
|
|
422
|
+
return e.success ? e.data?.uuid ?? null : (d.error("Order initiation failed:", e.error), null);
|
|
313
423
|
} catch (e) {
|
|
314
|
-
return
|
|
424
|
+
return d.error("initiateOrder error:", e), null;
|
|
315
425
|
}
|
|
316
426
|
}
|
|
317
|
-
async function
|
|
427
|
+
async function bt(t) {
|
|
318
428
|
if (typeof window > "u") return;
|
|
319
|
-
const
|
|
429
|
+
const e = new URLSearchParams(window.location.search), r = ee(e.get("utm_source")) || X;
|
|
320
430
|
try {
|
|
321
431
|
await fetch(
|
|
322
|
-
`${
|
|
432
|
+
`${c()}/utm/${t}/${encodeURIComponent(r)}`
|
|
323
433
|
);
|
|
324
434
|
} catch (n) {
|
|
325
|
-
|
|
435
|
+
d.error("UTM tracking failed:", n);
|
|
326
436
|
}
|
|
327
437
|
}
|
|
328
|
-
const
|
|
329
|
-
async function
|
|
438
|
+
const V = b("VC"), Ne = () => R();
|
|
439
|
+
async function $t(t, e) {
|
|
330
440
|
try {
|
|
331
441
|
if (!e || !e.trim())
|
|
332
442
|
return { valid: !1, error: "Promo code is required" };
|
|
333
|
-
const
|
|
334
|
-
`/promo-codes/validate/${
|
|
443
|
+
const r = encodeURIComponent(e.trim()), n = await $(
|
|
444
|
+
`/promo-codes/validate/${t}/${r}`
|
|
335
445
|
);
|
|
336
446
|
if (!n.success)
|
|
337
447
|
return n.statusCode === 404 ? { valid: !1, error: "Invalid promo code" } : { valid: !1, error: "Failed to validate code" };
|
|
@@ -345,168 +455,189 @@ async function Ge(r, e) {
|
|
|
345
455
|
amount: a.amount,
|
|
346
456
|
code: a.code || e
|
|
347
457
|
};
|
|
348
|
-
} catch (
|
|
349
|
-
return
|
|
458
|
+
} catch (r) {
|
|
459
|
+
return V.error("Error validating promo code:", r), { valid: !1, error: "Network error validating code" };
|
|
350
460
|
}
|
|
351
461
|
}
|
|
352
|
-
async function
|
|
462
|
+
async function Ct(t) {
|
|
353
463
|
try {
|
|
354
464
|
const e = await $(
|
|
355
|
-
`/promo-codes/check/${
|
|
465
|
+
`/promo-codes/check/${t}`
|
|
356
466
|
);
|
|
357
467
|
return e.success ? e.data.hasPromoCodes === !0 : !0;
|
|
358
468
|
} catch (e) {
|
|
359
|
-
return
|
|
469
|
+
return V.error("Error checking promo codes availability:", e), !0;
|
|
360
470
|
}
|
|
361
471
|
}
|
|
362
|
-
async function
|
|
472
|
+
async function Tt(t, e) {
|
|
363
473
|
try {
|
|
364
|
-
const
|
|
365
|
-
`${
|
|
474
|
+
const r = await f(
|
|
475
|
+
`${Ne()}/cart/${t}/apply-promo`,
|
|
366
476
|
{ promoCode: e }
|
|
367
477
|
);
|
|
368
|
-
return
|
|
478
|
+
return r.success ? { success: !0 } : {
|
|
369
479
|
success: !1,
|
|
370
|
-
error:
|
|
480
|
+
error: r.error || "Failed to apply promo code"
|
|
371
481
|
};
|
|
372
|
-
} catch (
|
|
373
|
-
return
|
|
482
|
+
} catch (r) {
|
|
483
|
+
return V.error("Error applying promo code:", r), { success: !1, error: "Network error applying code" };
|
|
374
484
|
}
|
|
375
485
|
}
|
|
376
|
-
async function
|
|
486
|
+
async function Pt(t) {
|
|
377
487
|
try {
|
|
378
|
-
const e = await
|
|
488
|
+
const e = await f(`/orders/${t}/remove-promo`);
|
|
379
489
|
return e.success ? { success: !0 } : {
|
|
380
490
|
success: !1,
|
|
381
491
|
error: e.error || "Failed to remove promo code"
|
|
382
492
|
};
|
|
383
493
|
} catch (e) {
|
|
384
|
-
return
|
|
494
|
+
return V.error("Error removing promo code:", e), { success: !1, error: "Network error removing code" };
|
|
385
495
|
}
|
|
386
496
|
}
|
|
387
|
-
function
|
|
388
|
-
const e =
|
|
497
|
+
function Ue(t) {
|
|
498
|
+
const e = t ?? {};
|
|
389
499
|
return {
|
|
390
500
|
performers: Array.isArray(e.performers) ? e.performers : [],
|
|
391
501
|
showPerformers: e.showPerformers === !0
|
|
392
502
|
};
|
|
393
503
|
}
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
504
|
+
function xe(t) {
|
|
505
|
+
return { ok: !0, data: t };
|
|
506
|
+
}
|
|
507
|
+
function N(t) {
|
|
508
|
+
return { ok: !1, error: t };
|
|
509
|
+
}
|
|
510
|
+
function St(t) {
|
|
511
|
+
return t.ok;
|
|
512
|
+
}
|
|
513
|
+
function D(t, e) {
|
|
514
|
+
return t.ok ? t.data : e;
|
|
515
|
+
}
|
|
516
|
+
const m = b("VC"), O = /* @__PURE__ */ new Map();
|
|
517
|
+
async function It(t, e = fetch, r) {
|
|
518
|
+
const n = r ? `${t}:pw` : String(t);
|
|
397
519
|
if (e === fetch) {
|
|
398
|
-
const
|
|
399
|
-
if (
|
|
520
|
+
const s = O.get(n);
|
|
521
|
+
if (s) return s;
|
|
400
522
|
}
|
|
401
523
|
const a = (async () => {
|
|
402
524
|
try {
|
|
403
|
-
const
|
|
404
|
-
if (!
|
|
525
|
+
const s = r ? `${c()}/events/${t}?password=${encodeURIComponent(r)}` : `${c()}/events/${t}`, o = await e(s);
|
|
526
|
+
if (!o.ok)
|
|
405
527
|
throw new E(
|
|
406
|
-
`Failed to fetch event details: ${
|
|
528
|
+
`Failed to fetch event details: ${o.status}`,
|
|
407
529
|
"lib/api/events/fetchEventDetails"
|
|
408
530
|
);
|
|
409
|
-
return await
|
|
410
|
-
} catch (
|
|
411
|
-
return
|
|
531
|
+
return await o.json();
|
|
532
|
+
} catch (s) {
|
|
533
|
+
return m.error("Error fetching event details:", s), null;
|
|
412
534
|
}
|
|
413
535
|
})();
|
|
414
|
-
return e === fetch && (
|
|
415
|
-
|
|
536
|
+
return e === fetch && (O.set(n, a), a.finally(() => {
|
|
537
|
+
O.get(n) === a && O.delete(n);
|
|
416
538
|
})), a;
|
|
417
539
|
}
|
|
418
|
-
async function
|
|
540
|
+
async function w(t, e, r = (n) => n) {
|
|
419
541
|
try {
|
|
420
|
-
const
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
return
|
|
424
|
-
} catch (e) {
|
|
425
|
-
return l.error("Error fetching tickets:", e), [];
|
|
542
|
+
const n = await A(t);
|
|
543
|
+
return n ? xe(r(n)) : (m.error(`Failed to load (${e}): network or server error`), N(e));
|
|
544
|
+
} catch (n) {
|
|
545
|
+
return m.error(`Error loading (${e}):`, n), N(e);
|
|
426
546
|
}
|
|
427
547
|
}
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
if (!r)
|
|
431
|
-
return l.warn("fetchEventPerformers called without eventId"), { performers: [], showPerformers: !1 };
|
|
432
|
-
const e = await y(
|
|
433
|
-
`${u()}/events/${r}/performers`
|
|
434
|
-
);
|
|
435
|
-
return e ? se(e) : (l.error("Failed to fetch performers: network or server error"), { performers: [], showPerformers: !1 });
|
|
436
|
-
} catch (e) {
|
|
437
|
-
return l.error("Error fetching event performers:", e), { performers: [], showPerformers: !1 };
|
|
438
|
-
}
|
|
548
|
+
function G(t) {
|
|
549
|
+
return Array.isArray(t) ? t : [];
|
|
439
550
|
}
|
|
440
|
-
async function
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
);
|
|
447
|
-
return e ? Array.isArray(e) ? e : [] : (l.error("Failed to fetch venues: network or server error"), []);
|
|
448
|
-
} catch (e) {
|
|
449
|
-
return l.error("Error fetching venues:", e), [];
|
|
450
|
-
}
|
|
551
|
+
async function Oe(t) {
|
|
552
|
+
return w(
|
|
553
|
+
`${c()}/tickets/event/${t}`,
|
|
554
|
+
"tickets_fetch_failed",
|
|
555
|
+
G
|
|
556
|
+
);
|
|
451
557
|
}
|
|
452
|
-
async function
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
558
|
+
async function Et(t) {
|
|
559
|
+
return D(await Oe(t), []);
|
|
560
|
+
}
|
|
561
|
+
async function Fe(t) {
|
|
562
|
+
return t ? w(
|
|
563
|
+
`${c()}/events/${t}/performers`,
|
|
564
|
+
"performers_fetch_failed",
|
|
565
|
+
(e) => Ue(e)
|
|
566
|
+
) : (m.warn("fetchEventPerformers called without eventId"), N("performers_missing_event_id"));
|
|
567
|
+
}
|
|
568
|
+
async function Rt(t) {
|
|
569
|
+
return D(await Fe(t), {
|
|
570
|
+
performers: [],
|
|
571
|
+
showPerformers: !1
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
async function Ve(t) {
|
|
575
|
+
return t ? w(
|
|
576
|
+
`${c()}/venues/organization/${t}`,
|
|
577
|
+
"venues_fetch_failed",
|
|
578
|
+
G
|
|
579
|
+
) : (m.warn("fetchAllVenues called without orgId"), N("venues_missing_org_id"));
|
|
580
|
+
}
|
|
581
|
+
async function At(t) {
|
|
582
|
+
return D(await Ve(t), []);
|
|
583
|
+
}
|
|
584
|
+
async function Le(t) {
|
|
585
|
+
return t ? w(
|
|
586
|
+
`${c()}/events/venue/${t}`,
|
|
587
|
+
"venue_events_fetch_failed",
|
|
588
|
+
G
|
|
589
|
+
) : (m.warn("fetchVenueEvents called without venueId"), N("venue_events_missing_venue_id"));
|
|
590
|
+
}
|
|
591
|
+
async function Dt(t) {
|
|
592
|
+
return D(await Le(t), []);
|
|
593
|
+
}
|
|
594
|
+
function re(t) {
|
|
595
|
+
return Array.isArray(t) ? t : Array.isArray(t.events) ? t.events : [];
|
|
596
|
+
}
|
|
597
|
+
async function qe(t, e, r) {
|
|
598
|
+
return w(
|
|
599
|
+
`${c()}/events/venue/${t}/month/${e}/${r}`,
|
|
600
|
+
"month_events_fetch_failed",
|
|
601
|
+
(n) => re(n)
|
|
602
|
+
);
|
|
463
603
|
}
|
|
464
|
-
async function
|
|
465
|
-
|
|
466
|
-
const n = await y(
|
|
467
|
-
`${u()}/events/venue/${r}/month/${e}/${t}`
|
|
468
|
-
);
|
|
469
|
-
return n ? Array.isArray(n) ? n : Array.isArray(n.events) ? n.events : [] : (l.error("Failed to fetch month events: network or server error"), []);
|
|
470
|
-
} catch (n) {
|
|
471
|
-
return l.error("Error fetching month events:", n), [];
|
|
472
|
-
}
|
|
604
|
+
async function Nt(t, e, r) {
|
|
605
|
+
return D(await qe(t, e, r), []);
|
|
473
606
|
}
|
|
474
|
-
async function
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
)
|
|
479
|
-
|
|
480
|
-
} catch (n) {
|
|
481
|
-
return l.error("Error fetching org month events:", n), [];
|
|
482
|
-
}
|
|
607
|
+
async function Me(t, e, r) {
|
|
608
|
+
return w(
|
|
609
|
+
`${c()}/events/organization/${t}/month/${e}/${r}`,
|
|
610
|
+
"org_month_events_fetch_failed",
|
|
611
|
+
(n) => re(n)
|
|
612
|
+
);
|
|
483
613
|
}
|
|
484
|
-
async function
|
|
485
|
-
|
|
486
|
-
const e = await y(
|
|
487
|
-
`${u()}/series/${r}/occurrences`
|
|
488
|
-
);
|
|
489
|
-
return e || (l.error(
|
|
490
|
-
"Failed to fetch series occurrences: network or server error"
|
|
491
|
-
), null);
|
|
492
|
-
} catch (e) {
|
|
493
|
-
return l.error("Error fetching series occurrences:", e), null;
|
|
494
|
-
}
|
|
614
|
+
async function Ut(t, e, r) {
|
|
615
|
+
return D(await Me(t, e, r), []);
|
|
495
616
|
}
|
|
496
|
-
async function
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
return t || (l.error("Failed to fetch series with CTA: network or server error"), null);
|
|
502
|
-
} catch (t) {
|
|
503
|
-
return l.error("Error fetching series occurrences:", t), null;
|
|
504
|
-
}
|
|
617
|
+
async function Ge(t) {
|
|
618
|
+
return w(
|
|
619
|
+
`${c()}/series/${t}/occurrences`,
|
|
620
|
+
"series_occurrences_fetch_failed"
|
|
621
|
+
);
|
|
505
622
|
}
|
|
506
|
-
async function
|
|
623
|
+
async function xt(t) {
|
|
624
|
+
const e = await Ge(t);
|
|
625
|
+
return e.ok ? e.data : null;
|
|
626
|
+
}
|
|
627
|
+
async function je(t, e) {
|
|
628
|
+
return w(
|
|
629
|
+
`${c()}/series/${t}/occurrences?venueId=${e}`,
|
|
630
|
+
"series_cta_fetch_failed"
|
|
631
|
+
);
|
|
632
|
+
}
|
|
633
|
+
async function Ot(t, e) {
|
|
634
|
+
const r = await je(t, e);
|
|
635
|
+
return r.ok ? r.data : null;
|
|
636
|
+
}
|
|
637
|
+
async function Ft(t, e) {
|
|
507
638
|
try {
|
|
508
|
-
const
|
|
509
|
-
`${
|
|
639
|
+
const r = e ? `?slug=${encodeURIComponent(e)}` : "", n = await A(
|
|
640
|
+
`${c()}/resolve/${encodeURIComponent(String(t))}${r}`
|
|
510
641
|
);
|
|
511
642
|
if (!n || !n.type)
|
|
512
643
|
throw new E(
|
|
@@ -514,14 +645,14 @@ async function er(r, e) {
|
|
|
514
645
|
"lib/api/events/resolvePublicEntity"
|
|
515
646
|
);
|
|
516
647
|
return n;
|
|
517
|
-
} catch (
|
|
518
|
-
return
|
|
648
|
+
} catch (r) {
|
|
649
|
+
return m.error("Error resolving public entity:", r), null;
|
|
519
650
|
}
|
|
520
651
|
}
|
|
521
|
-
async function
|
|
652
|
+
async function Vt(t) {
|
|
522
653
|
try {
|
|
523
|
-
const e = await
|
|
524
|
-
`${
|
|
654
|
+
const e = await A(
|
|
655
|
+
`${c()}/series/${t}/page`
|
|
525
656
|
);
|
|
526
657
|
if (!e)
|
|
527
658
|
throw new E(
|
|
@@ -530,230 +661,242 @@ async function rr(r) {
|
|
|
530
661
|
);
|
|
531
662
|
return e;
|
|
532
663
|
} catch (e) {
|
|
533
|
-
return
|
|
664
|
+
return m.error("Error fetching series page:", e), null;
|
|
534
665
|
}
|
|
535
666
|
}
|
|
536
|
-
async function
|
|
667
|
+
async function Lt(t, e) {
|
|
537
668
|
try {
|
|
538
|
-
const
|
|
669
|
+
const r = e ? `${c()}/collections/${t}?password=${encodeURIComponent(e)}` : `${c()}/collections/${t}`, n = await A(r);
|
|
539
670
|
if (!n)
|
|
540
671
|
throw new E(
|
|
541
672
|
"Failed to fetch collection",
|
|
542
673
|
"lib/api/events/fetchPublicCollection"
|
|
543
674
|
);
|
|
544
675
|
return n;
|
|
545
|
-
} catch (
|
|
546
|
-
return
|
|
676
|
+
} catch (r) {
|
|
677
|
+
return m.error("Error fetching collection:", r), null;
|
|
547
678
|
}
|
|
548
679
|
}
|
|
549
|
-
async function
|
|
680
|
+
async function qt(t, e) {
|
|
550
681
|
try {
|
|
551
|
-
const
|
|
552
|
-
return (await
|
|
553
|
-
`${
|
|
682
|
+
const r = encodeURIComponent(e);
|
|
683
|
+
return (await A(
|
|
684
|
+
`${c()}/collections/${t}/check-password/${r}`
|
|
554
685
|
))?.valid === !0;
|
|
555
|
-
} catch (
|
|
556
|
-
return
|
|
686
|
+
} catch (r) {
|
|
687
|
+
return m.error("Error checking collection password:", r), !1;
|
|
557
688
|
}
|
|
558
689
|
}
|
|
559
|
-
async function
|
|
690
|
+
async function Mt(t, e) {
|
|
560
691
|
try {
|
|
561
|
-
const
|
|
562
|
-
`${
|
|
692
|
+
const r = await f(
|
|
693
|
+
`${c()}/events/${t}/check-password`,
|
|
563
694
|
{ password: e }
|
|
564
695
|
);
|
|
565
|
-
if (!
|
|
566
|
-
const n =
|
|
696
|
+
if (!r.success) return { valid: !1 };
|
|
697
|
+
const n = r.data;
|
|
567
698
|
return typeof n == "boolean" ? { valid: n } : { valid: n.valid === !0 };
|
|
568
|
-
} catch (
|
|
569
|
-
return
|
|
699
|
+
} catch (r) {
|
|
700
|
+
return m.error("Error checking event password:", r), { valid: !1 };
|
|
570
701
|
}
|
|
571
702
|
}
|
|
572
|
-
async function
|
|
703
|
+
async function Gt(t, e) {
|
|
573
704
|
try {
|
|
574
|
-
const
|
|
575
|
-
return (await fetch(
|
|
705
|
+
const r = e ? `${c()}/events/venue/${e}` : t ? `${c()}/venues/organization/${t}` : `${c()}/health`;
|
|
706
|
+
return (await fetch(r, {
|
|
576
707
|
method: "HEAD"
|
|
577
708
|
})).ok;
|
|
578
|
-
} catch (
|
|
579
|
-
return
|
|
709
|
+
} catch (r) {
|
|
710
|
+
return m.error("Network connection test failed:", r), !1;
|
|
580
711
|
}
|
|
581
712
|
}
|
|
582
|
-
const
|
|
583
|
-
async function
|
|
713
|
+
const I = b("VC");
|
|
714
|
+
async function ze(t) {
|
|
584
715
|
try {
|
|
585
|
-
if (!
|
|
586
|
-
return
|
|
587
|
-
const e = await $(`/venues/${
|
|
588
|
-
return e.success ? e.data ?? null : (
|
|
716
|
+
if (!t)
|
|
717
|
+
return I.warn("getVenue called without venueId"), null;
|
|
718
|
+
const e = await $(`/venues/${t}`);
|
|
719
|
+
return e.success ? e.data ?? null : (I.error(`Failed to fetch venue: ${e.statusCode}`), null);
|
|
589
720
|
} catch (e) {
|
|
590
|
-
return
|
|
721
|
+
return I.error("Error fetching venue:", e), null;
|
|
591
722
|
}
|
|
592
723
|
}
|
|
593
|
-
async function
|
|
594
|
-
const e = await
|
|
724
|
+
async function jt(t) {
|
|
725
|
+
const e = await ze(t);
|
|
595
726
|
return e ? {
|
|
596
727
|
serviceFeePercentage: e.serviceFeePercentage ?? 0,
|
|
597
728
|
serviceFeeCents: e.serviceFeeCents ?? 0,
|
|
598
729
|
taxPercentage: e.taxPercentage ?? 0
|
|
599
730
|
} : null;
|
|
600
731
|
}
|
|
601
|
-
async function
|
|
732
|
+
async function zt(t) {
|
|
602
733
|
try {
|
|
603
|
-
if (!
|
|
604
|
-
return
|
|
605
|
-
const e = encodeURIComponent(
|
|
606
|
-
return
|
|
734
|
+
if (!t)
|
|
735
|
+
return I.warn("getVenueBySlug called without slug"), null;
|
|
736
|
+
const e = encodeURIComponent(t), r = await $(`/venues/slug/${e}`);
|
|
737
|
+
return r.success ? r.data ?? null : (I.error(`Failed to fetch venue by slug: ${r.statusCode}`), null);
|
|
607
738
|
} catch (e) {
|
|
608
|
-
return
|
|
739
|
+
return I.error("Error fetching venue by slug:", e), null;
|
|
609
740
|
}
|
|
610
741
|
}
|
|
611
|
-
function
|
|
612
|
-
const e =
|
|
742
|
+
function Be(t) {
|
|
743
|
+
const e = t ?? {}, r = (e.appliedAmount ?? 0) / 100, n = e.remainingTotal ?? 0, a = e.fullyCoveredByCard ?? n <= 0, s = !a;
|
|
613
744
|
return {
|
|
614
745
|
valid: !0,
|
|
615
746
|
giftCardCode: e.giftCardCode,
|
|
616
|
-
giftCardAmount:
|
|
747
|
+
giftCardAmount: r,
|
|
617
748
|
giftCardBalance: e.giftCardBalance,
|
|
618
749
|
paymentType: a ? "gift_card_only" : "split",
|
|
619
750
|
stripeAmount: n,
|
|
620
|
-
orderTotal:
|
|
621
|
-
requiresStripe:
|
|
751
|
+
orderTotal: r + n,
|
|
752
|
+
requiresStripe: s
|
|
622
753
|
};
|
|
623
754
|
}
|
|
624
|
-
const
|
|
625
|
-
async function
|
|
755
|
+
const h = b("VC"), He = "https://get-micdrop.com", We = `${He}/api/orders/v2`, j = () => R();
|
|
756
|
+
async function Bt(t) {
|
|
626
757
|
try {
|
|
627
|
-
const e = await
|
|
628
|
-
`${
|
|
629
|
-
|
|
758
|
+
const e = await f(
|
|
759
|
+
`${We}/gift-cards`,
|
|
760
|
+
t
|
|
630
761
|
);
|
|
631
762
|
if (!e.success)
|
|
632
|
-
throw
|
|
633
|
-
|
|
763
|
+
throw h.error("Gift card purchase creation failed:", e.error), new E(
|
|
764
|
+
e.error || "Failed to create gift card purchase",
|
|
765
|
+
"lib/api/gift-cards/createGiftCardPurchase"
|
|
766
|
+
);
|
|
767
|
+
return h.debug("Gift card purchase created:", e.data), e.data;
|
|
634
768
|
} catch (e) {
|
|
635
|
-
return
|
|
769
|
+
return h.error("Gift card purchase creation error:", e), null;
|
|
636
770
|
}
|
|
637
771
|
}
|
|
638
|
-
async function
|
|
772
|
+
async function Ht(t, e) {
|
|
639
773
|
try {
|
|
640
|
-
const
|
|
641
|
-
`${
|
|
774
|
+
const r = await f(
|
|
775
|
+
`${j()}/cart/${t}/apply-gift-card`,
|
|
642
776
|
{ giftCardCode: e }
|
|
643
777
|
);
|
|
644
|
-
return
|
|
778
|
+
return r.success ? Be(r.data) : r.statusCode === 429 ? {
|
|
645
779
|
valid: !1,
|
|
646
780
|
error: "Too many attempts. Please wait a moment and try again."
|
|
647
|
-
} : (
|
|
648
|
-
|
|
649
|
-
|
|
781
|
+
} : (h.error("Apply gift card failed:", r.error), {
|
|
782
|
+
valid: !1,
|
|
783
|
+
error: r.error || "Invalid gift card code"
|
|
784
|
+
});
|
|
785
|
+
} catch (r) {
|
|
786
|
+
return h.error("applyGiftCard error:", r), {
|
|
650
787
|
valid: !1,
|
|
651
788
|
error: "Network error. Please check your connection and try again."
|
|
652
789
|
};
|
|
653
790
|
}
|
|
654
791
|
}
|
|
655
|
-
async function
|
|
792
|
+
async function Wt(t, e) {
|
|
656
793
|
try {
|
|
657
|
-
const
|
|
658
|
-
`${
|
|
794
|
+
const r = await ye(
|
|
795
|
+
`${j()}/cart/${t}/gift-card`,
|
|
659
796
|
e ? { body: JSON.stringify({ giftCardCode: e }) } : void 0
|
|
660
797
|
);
|
|
661
|
-
return
|
|
662
|
-
|
|
663
|
-
|
|
798
|
+
return r.success ? { success: !0 } : (h.error("Remove gift card failed:", r.error), {
|
|
799
|
+
success: !1,
|
|
800
|
+
error: r.error || "Failed to remove gift card"
|
|
801
|
+
});
|
|
802
|
+
} catch (r) {
|
|
803
|
+
return h.error("removeGiftCard error:", r), {
|
|
664
804
|
success: !1,
|
|
665
805
|
error: "Network error. Please check your connection and try again."
|
|
666
806
|
};
|
|
667
807
|
}
|
|
668
808
|
}
|
|
669
|
-
async function
|
|
809
|
+
async function Qt(t, e) {
|
|
670
810
|
try {
|
|
671
|
-
const
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
);
|
|
681
|
-
return
|
|
811
|
+
const r = await f(`${j()}/cart/${t}/complete-gift-card-payment`, {
|
|
812
|
+
firstName: e.firstName,
|
|
813
|
+
lastName: e.lastName,
|
|
814
|
+
email: e.email,
|
|
815
|
+
phoneNumber: e.phoneNumber || null,
|
|
816
|
+
mailingList: e.mailingList || !1,
|
|
817
|
+
// Order attribution (MISSION-TRUTH C2) — gift-card-only orders take this
|
|
818
|
+
// finalize endpoint, so attribution must ride here too; additive.
|
|
819
|
+
attribution: U()
|
|
820
|
+
});
|
|
821
|
+
return r.success ? {
|
|
682
822
|
success: !0,
|
|
683
|
-
orderId:
|
|
684
|
-
confirmationNumber:
|
|
685
|
-
} : (
|
|
686
|
-
|
|
687
|
-
|
|
823
|
+
orderId: r.data?.orderId,
|
|
824
|
+
confirmationNumber: r.data?.confirmationNumber
|
|
825
|
+
} : (h.error("Complete gift card payment failed:", r.error), {
|
|
826
|
+
success: !1,
|
|
827
|
+
error: r.error || "Failed to complete payment"
|
|
828
|
+
});
|
|
829
|
+
} catch (r) {
|
|
830
|
+
return h.error("completeGiftCardPayment error:", r), {
|
|
688
831
|
success: !1,
|
|
689
832
|
error: "Network error. Please check your connection and try again."
|
|
690
833
|
};
|
|
691
834
|
}
|
|
692
835
|
}
|
|
693
|
-
const
|
|
836
|
+
const M = b("VC"), Qe = {
|
|
694
837
|
waitlist_not_enabled: "Waitlist is not available for this event",
|
|
695
838
|
event_not_found: "Event not found",
|
|
696
839
|
invalid_phone: "Please enter a valid phone number",
|
|
697
840
|
already_purchased: "You have already purchased tickets for this event",
|
|
698
841
|
phone_already_registered: "This phone number is already on the waitlist"
|
|
699
842
|
};
|
|
700
|
-
async function
|
|
843
|
+
async function Jt(t, e, r = null, n = !1) {
|
|
701
844
|
try {
|
|
702
845
|
const a = { email: e };
|
|
703
|
-
|
|
704
|
-
const
|
|
705
|
-
`/events/${
|
|
846
|
+
r && n && (a.phone = r, a.smsOptIn = !0);
|
|
847
|
+
const s = await f(
|
|
848
|
+
`/events/${t}/waitlist`,
|
|
706
849
|
a
|
|
707
850
|
);
|
|
708
|
-
return
|
|
851
|
+
return s.success ? {
|
|
709
852
|
success: !0,
|
|
710
|
-
updated:
|
|
711
|
-
} : (
|
|
853
|
+
updated: s.data?.updated
|
|
854
|
+
} : (M.error("Join waitlist failed:", s.error), {
|
|
712
855
|
success: !1,
|
|
713
|
-
error:
|
|
856
|
+
error: Qe[s.error ?? ""] || "Failed to join waitlist. Please try again."
|
|
714
857
|
});
|
|
715
858
|
} catch (a) {
|
|
716
|
-
return
|
|
859
|
+
return M.error("joinWaitlist error:", a), {
|
|
717
860
|
success: !1,
|
|
718
861
|
error: "Network error. Please check your connection and try again."
|
|
719
862
|
};
|
|
720
863
|
}
|
|
721
864
|
}
|
|
722
|
-
async function
|
|
865
|
+
async function Yt(t) {
|
|
723
866
|
const e = {
|
|
724
867
|
waitlistEnabled: !1,
|
|
725
868
|
soldOut: !1,
|
|
726
869
|
gated: !1
|
|
727
870
|
};
|
|
728
871
|
try {
|
|
729
|
-
const
|
|
730
|
-
`/events/${
|
|
872
|
+
const r = await $(
|
|
873
|
+
`/events/${t}/waitlist/status`
|
|
731
874
|
);
|
|
732
|
-
return
|
|
733
|
-
waitlistEnabled: !!
|
|
734
|
-
soldOut: !!
|
|
735
|
-
gated: !!
|
|
875
|
+
return r.success ? {
|
|
876
|
+
waitlistEnabled: !!r.data?.waitlistEnabled,
|
|
877
|
+
soldOut: !!r.data?.soldOut,
|
|
878
|
+
gated: !!r.data?.gated
|
|
736
879
|
} : e;
|
|
737
|
-
} catch (
|
|
738
|
-
return
|
|
880
|
+
} catch (r) {
|
|
881
|
+
return M.error("getWaitlistStatus error:", r), e;
|
|
739
882
|
}
|
|
740
883
|
}
|
|
741
|
-
function
|
|
884
|
+
function Kt(t, e, r = {}) {
|
|
742
885
|
const {
|
|
743
886
|
cancelled: n = !1,
|
|
744
887
|
isRegistration: a = !1,
|
|
745
|
-
waitlistEnabled:
|
|
746
|
-
} =
|
|
888
|
+
waitlistEnabled: s = !1
|
|
889
|
+
} = r, o = /* @__PURE__ */ new Date();
|
|
747
890
|
if (n)
|
|
748
891
|
return { text: "Cancelled", disabled: !0, reason: "cancelled" };
|
|
749
|
-
const i =
|
|
750
|
-
if (i && new Date(i) <
|
|
892
|
+
const i = t.endDateTime || t.startDateTime;
|
|
893
|
+
if (i && new Date(i) < o)
|
|
751
894
|
return { text: "Sales ended", disabled: !0, reason: "event_past" };
|
|
752
|
-
const
|
|
753
|
-
(
|
|
895
|
+
const u = t?.hasPurchasableHiddenTickets === !0 || Array.isArray(e) && e.some(fe), C = (e || []).filter(
|
|
896
|
+
(l) => l.salesChannel !== 2 && !l.isHidden && !(typeof l.visibility == "number" && l.visibility >= 2)
|
|
754
897
|
);
|
|
755
|
-
if (
|
|
756
|
-
return
|
|
898
|
+
if (C.length === 0)
|
|
899
|
+
return u ? {
|
|
757
900
|
text: a ? "Reserve a spot" : "Get tickets",
|
|
758
901
|
disabled: !1,
|
|
759
902
|
reason: "hidden_only"
|
|
@@ -762,67 +905,63 @@ function pr(r, e, t = {}) {
|
|
|
762
905
|
disabled: !0,
|
|
763
906
|
reason: "no_tickets"
|
|
764
907
|
};
|
|
765
|
-
let
|
|
766
|
-
for (const
|
|
767
|
-
const
|
|
768
|
-
if (!
|
|
769
|
-
const
|
|
770
|
-
(!
|
|
908
|
+
let y = !1, k = !0, g = !0, v = null;
|
|
909
|
+
for (const l of C) {
|
|
910
|
+
const T = l.salesBegin || l.salesStart || l.saleBegin || l.onSaleStart, x = l.salesEnd || l.saleEnd || l.onSaleEnd, P = l.remainingCapacity ?? l.quantityRemaining ?? l.quantity, _ = l.soldOut || P != null && P <= 0, S = T ? new Date(T) > o : !1, z = x ? new Date(x) < o : !1;
|
|
911
|
+
if (!_ && !S && !z && (y = !0), _ || (k = !1), S || (g = !1), S && T && !_ && !z) {
|
|
912
|
+
const B = new Date(T);
|
|
913
|
+
(!v || B < v) && (v = B);
|
|
771
914
|
}
|
|
772
915
|
}
|
|
773
|
-
if (
|
|
916
|
+
if (y)
|
|
774
917
|
return {
|
|
775
918
|
text: a ? "Reserve a spot" : "Get tickets",
|
|
776
919
|
disabled: !1,
|
|
777
920
|
reason: "available"
|
|
778
921
|
};
|
|
779
|
-
if (g &&
|
|
780
|
-
if (
|
|
922
|
+
if (g && v) {
|
|
923
|
+
if (u)
|
|
781
924
|
return {
|
|
782
925
|
text: a ? "Reserve a spot" : "Get tickets",
|
|
783
926
|
disabled: !1,
|
|
784
927
|
reason: "hidden_only"
|
|
785
928
|
};
|
|
786
|
-
const
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
C = `${A} ${S}`;
|
|
803
|
-
}
|
|
804
|
-
return {
|
|
805
|
-
text: `On sale ${C}`,
|
|
929
|
+
const l = v.getTime() - o.getTime(), T = l / (1e3 * 60 * 60), x = l / (1e3 * 60 * 60 * 24), P = (S) => L(
|
|
930
|
+
S,
|
|
931
|
+
{ hour: "numeric", minute: "2-digit", hour12: !0 },
|
|
932
|
+
"en-US"
|
|
933
|
+
);
|
|
934
|
+
let _;
|
|
935
|
+
return T < 24 ? _ = P(v) : x <= 7 ? _ = L(
|
|
936
|
+
v,
|
|
937
|
+
{ weekday: "short", hour: "numeric", minute: "2-digit", hour12: !0 },
|
|
938
|
+
"en-US"
|
|
939
|
+
) : _ = `${L(
|
|
940
|
+
v,
|
|
941
|
+
{ month: "short", day: "numeric" },
|
|
942
|
+
"en-US"
|
|
943
|
+
)} ${P(v)}`, {
|
|
944
|
+
text: `On sale ${_}`,
|
|
806
945
|
disabled: !0,
|
|
807
946
|
reason: "coming_soon"
|
|
808
947
|
};
|
|
809
948
|
}
|
|
810
|
-
return k ?
|
|
949
|
+
return k ? u ? {
|
|
811
950
|
text: a ? "Reserve a spot" : "Get tickets",
|
|
812
951
|
disabled: !1,
|
|
813
952
|
reason: "hidden_only"
|
|
814
|
-
} :
|
|
953
|
+
} : s ? {
|
|
815
954
|
text: "Join Waitlist",
|
|
816
955
|
disabled: !1,
|
|
817
956
|
reason: "sold_out_waitlist"
|
|
818
|
-
} : { text: "Sold out", disabled: !0, reason: "sold_out" } :
|
|
957
|
+
} : { text: "Sold out", disabled: !0, reason: "sold_out" } : u ? {
|
|
819
958
|
text: a ? "Reserve a spot" : "Get tickets",
|
|
820
959
|
disabled: !1,
|
|
821
960
|
reason: "hidden_only"
|
|
822
961
|
} : { text: "Sales ended", disabled: !0, reason: "sales_ended" };
|
|
823
962
|
}
|
|
824
|
-
function
|
|
825
|
-
const e =
|
|
963
|
+
function ne(t) {
|
|
964
|
+
const e = t;
|
|
826
965
|
return {
|
|
827
966
|
uuid: e.uuid || String(e.id || e.ID || ""),
|
|
828
967
|
id: e.id || e.ID,
|
|
@@ -839,8 +978,8 @@ function W(r) {
|
|
|
839
978
|
checkedInAt: e.checkedInAt || e.checked_in_at
|
|
840
979
|
};
|
|
841
980
|
}
|
|
842
|
-
function
|
|
843
|
-
const e =
|
|
981
|
+
function ae(t) {
|
|
982
|
+
const e = t, r = e.purchasedTickets || e.tickets || e.purchased_tickets || [];
|
|
844
983
|
return {
|
|
845
984
|
uuid: e.uuid || String(e.id || e.ID || ""),
|
|
846
985
|
id: e.id || e.ID,
|
|
@@ -855,21 +994,21 @@ function Q(r) {
|
|
|
855
994
|
discount: e.discount || 0,
|
|
856
995
|
paymentIntentId: e.paymentIntentId || e.payment_intent_id,
|
|
857
996
|
paymentMethod: e.paymentMethod || e.payment_method,
|
|
858
|
-
purchasedTickets:
|
|
997
|
+
purchasedTickets: r.map(ne),
|
|
859
998
|
createdAt: e.createdAt || e.created_at,
|
|
860
999
|
updatedAt: e.updatedAt || e.updated_at
|
|
861
1000
|
};
|
|
862
1001
|
}
|
|
863
|
-
const
|
|
864
|
-
function
|
|
865
|
-
const e =
|
|
1002
|
+
const Zt = ne, Xt = ae;
|
|
1003
|
+
function er(t) {
|
|
1004
|
+
const e = ae(t), r = e.uuid.split("-")[0] || e.uuid;
|
|
866
1005
|
return {
|
|
867
1006
|
orderId: e.uuid,
|
|
868
|
-
displayOrderId:
|
|
1007
|
+
displayOrderId: r,
|
|
869
1008
|
email: e.customerEmail,
|
|
870
1009
|
customerName: [e.customerFirstName, e.customerLastName].filter(Boolean).join(" "),
|
|
871
1010
|
total: e.totalAmount,
|
|
872
|
-
formattedTotal: `${
|
|
1011
|
+
formattedTotal: `${de(
|
|
873
1012
|
e.totalAmount / 100
|
|
874
1013
|
/* FIXME(canonical-cleanup:toFixed): this cast bypasses the brand boundary; replace with toCents/toUSD at the API-response-transform layer. */
|
|
875
1014
|
)}`,
|
|
@@ -877,37 +1016,50 @@ function gr(r) {
|
|
|
877
1016
|
status: e.status
|
|
878
1017
|
};
|
|
879
1018
|
}
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
1019
|
+
function Je(t) {
|
|
1020
|
+
return Y(t, { cdn: !0 });
|
|
1021
|
+
}
|
|
1022
|
+
function Q(t) {
|
|
1023
|
+
const e = t.imageUrl || t.imageURL || t.image_url || t.image || "";
|
|
1024
|
+
return Je(e);
|
|
1025
|
+
}
|
|
1026
|
+
function Ye(t) {
|
|
1027
|
+
switch (t) {
|
|
1028
|
+
case "available":
|
|
1029
|
+
case "sold_out":
|
|
1030
|
+
case "coming_soon":
|
|
1031
|
+
case "ended":
|
|
1032
|
+
return t;
|
|
1033
|
+
default:
|
|
1034
|
+
return null;
|
|
1035
|
+
}
|
|
887
1036
|
}
|
|
888
|
-
function
|
|
889
|
-
const e =
|
|
890
|
-
if (e)
|
|
891
|
-
|
|
892
|
-
|
|
1037
|
+
function Ke(t) {
|
|
1038
|
+
const e = t.ctaState || t.cta_state;
|
|
1039
|
+
if (e) {
|
|
1040
|
+
const o = Ye(e);
|
|
1041
|
+
if (o)
|
|
1042
|
+
return o;
|
|
1043
|
+
}
|
|
1044
|
+
if (t.isCancelled || t.is_cancelled)
|
|
893
1045
|
return "ended";
|
|
894
|
-
const
|
|
895
|
-
if (
|
|
896
|
-
const
|
|
897
|
-
if (
|
|
1046
|
+
const r = t.startDateTime || t.start_date_time || t.date;
|
|
1047
|
+
if (r) {
|
|
1048
|
+
const o = new Date(r).getTime(), i = Date.now();
|
|
1049
|
+
if (o < i)
|
|
898
1050
|
return "ended";
|
|
899
1051
|
}
|
|
900
|
-
const n =
|
|
1052
|
+
const n = t.ticketsAvailable ?? t.tickets_available;
|
|
901
1053
|
if (n !== void 0)
|
|
902
1054
|
return n <= 0 ? "sold_out" : "available";
|
|
903
|
-
const a =
|
|
904
|
-
return a.length === 0 ? "coming_soon" : a.reduce((
|
|
905
|
-
const
|
|
906
|
-
return
|
|
1055
|
+
const a = t.availableTickets || t.available_tickets || t.tickets || [];
|
|
1056
|
+
return a.length === 0 ? "coming_soon" : a.reduce((o, i) => {
|
|
1057
|
+
const u = i.quantityAvailable ?? i.quantity_available ?? i.quantity ?? 0, C = i.quantitySold ?? i.quantity_sold ?? 0;
|
|
1058
|
+
return o + Math.max(0, u - C);
|
|
907
1059
|
}, 0) <= 0 ? "sold_out" : "available";
|
|
908
1060
|
}
|
|
909
|
-
function
|
|
910
|
-
const e =
|
|
1061
|
+
function se(t) {
|
|
1062
|
+
const e = t;
|
|
911
1063
|
return {
|
|
912
1064
|
id: e.id || e.ID,
|
|
913
1065
|
name: e.name || e.ticketName || "",
|
|
@@ -927,8 +1079,8 @@ function J(r) {
|
|
|
927
1079
|
sortOrder: e.sortOrder || e.sort_order || 0
|
|
928
1080
|
};
|
|
929
1081
|
}
|
|
930
|
-
function
|
|
931
|
-
const e =
|
|
1082
|
+
function oe(t) {
|
|
1083
|
+
const e = t, n = (e.availableTickets || e.available_tickets || e.tickets || []).map(se), a = n.map((i) => i.price).filter((i) => i > 0), s = a.length > 0 ? Math.min(...a) : void 0, o = a.length > 0 ? Math.max(...a) : void 0;
|
|
932
1084
|
return {
|
|
933
1085
|
eventID: e.eventID || e.id || e.ID || 0,
|
|
934
1086
|
id: e.id || e.ID,
|
|
@@ -945,18 +1097,18 @@ function Z(r) {
|
|
|
945
1097
|
venueName: e.venueName || e.venue_name,
|
|
946
1098
|
venueAddress: e.venueAddress || e.venue_address,
|
|
947
1099
|
location: e.location || e.venueAddress || e.venue_address,
|
|
948
|
-
imageUrl:
|
|
949
|
-
imageURL:
|
|
1100
|
+
imageUrl: Q(e),
|
|
1101
|
+
imageURL: Q(e),
|
|
950
1102
|
status: e.status,
|
|
951
1103
|
isPublished: e.isPublished ?? e.is_published,
|
|
952
1104
|
isCancelled: e.isCancelled ?? e.is_cancelled,
|
|
953
1105
|
availableTickets: n,
|
|
954
|
-
ticketsAvailable: e.ticketsAvailable ?? e.tickets_available ?? n.reduce((i,
|
|
1106
|
+
ticketsAvailable: e.ticketsAvailable ?? e.tickets_available ?? n.reduce((i, u) => i + (u.quantityAvailable || 0), 0),
|
|
955
1107
|
ticketsSold: e.ticketsSold ?? e.tickets_sold,
|
|
956
|
-
minPrice: e.minPrice ?? e.min_price ??
|
|
957
|
-
maxPrice: e.maxPrice ?? e.max_price ??
|
|
1108
|
+
minPrice: e.minPrice ?? e.min_price ?? s,
|
|
1109
|
+
maxPrice: e.maxPrice ?? e.max_price ?? o,
|
|
958
1110
|
ctaText: e.ctaText || e.cta_text,
|
|
959
|
-
ctaState:
|
|
1111
|
+
ctaState: Ke(e),
|
|
960
1112
|
showPerformers: e.showPerformers ?? e.show_performers,
|
|
961
1113
|
eventSeriesId: e.eventSeriesId || e.event_series_id,
|
|
962
1114
|
seriesInstanceNumber: e.seriesInstanceNumber || e.series_instance_number,
|
|
@@ -990,12 +1142,12 @@ function Z(r) {
|
|
|
990
1142
|
purchasedTickets: e.purchasedTickets
|
|
991
1143
|
};
|
|
992
1144
|
}
|
|
993
|
-
const
|
|
994
|
-
function
|
|
995
|
-
return
|
|
1145
|
+
const tr = se, rr = oe, nr = oe;
|
|
1146
|
+
function Ze(t) {
|
|
1147
|
+
return Y(t, { cdn: !0 });
|
|
996
1148
|
}
|
|
997
|
-
function
|
|
998
|
-
const e =
|
|
1149
|
+
function Xe(t) {
|
|
1150
|
+
const e = t, r = e.logoUrl || e.logo_url || e.logo;
|
|
999
1151
|
return {
|
|
1000
1152
|
id: e.id || e.ID || 0,
|
|
1001
1153
|
name: e.name || "",
|
|
@@ -1007,163 +1159,102 @@ function ve(r) {
|
|
|
1007
1159
|
zipCode: e.zipCode || e.zip_code,
|
|
1008
1160
|
country: e.country,
|
|
1009
1161
|
timezone: e.timezone || e.time_zone,
|
|
1010
|
-
logoUrl:
|
|
1162
|
+
logoUrl: Ze(r),
|
|
1011
1163
|
serviceFeePercentage: e.serviceFeePercentage ?? e.service_fee_percentage ?? 0,
|
|
1012
1164
|
serviceFeeCents: e.serviceFeeCents ?? e.service_fee_cents ?? 0,
|
|
1013
1165
|
taxPercentage: e.taxPercentage ?? e.tax_percentage ?? 0,
|
|
1014
1166
|
organizationId: e.organizationId || e.organization_id
|
|
1015
1167
|
};
|
|
1016
1168
|
}
|
|
1017
|
-
const
|
|
1018
|
-
function
|
|
1019
|
-
const e =
|
|
1169
|
+
const ar = Xe;
|
|
1170
|
+
function sr(t) {
|
|
1171
|
+
const e = t;
|
|
1020
1172
|
return {
|
|
1021
1173
|
serviceFeePercentage: e.serviceFeePercentage ?? e.service_fee_percentage ?? 0,
|
|
1022
1174
|
serviceFeeCents: e.serviceFeeCents ?? e.service_fee_cents ?? 0,
|
|
1023
1175
|
taxPercentage: e.taxPercentage ?? e.tax_percentage ?? 0
|
|
1024
1176
|
};
|
|
1025
1177
|
}
|
|
1026
|
-
function
|
|
1027
|
-
return [
|
|
1178
|
+
function or(t) {
|
|
1179
|
+
return [t.address, t.city, t.state, t.zipCode].filter(
|
|
1028
1180
|
Boolean
|
|
1029
1181
|
).join(", ");
|
|
1030
1182
|
}
|
|
1031
|
-
function x(r) {
|
|
1032
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
1033
|
-
var t = arguments[e];
|
|
1034
|
-
for (var n in t)
|
|
1035
|
-
n !== "__proto__" && (r[n] = t[n]);
|
|
1036
|
-
}
|
|
1037
|
-
return r;
|
|
1038
|
-
}
|
|
1039
|
-
var ge = {
|
|
1040
|
-
read: function(r) {
|
|
1041
|
-
return r[0] === '"' && (r = r.slice(1, -1)), r.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
1042
|
-
},
|
|
1043
|
-
write: function(r) {
|
|
1044
|
-
return encodeURIComponent(r).replace(
|
|
1045
|
-
/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
|
|
1046
|
-
decodeURIComponent
|
|
1047
|
-
);
|
|
1048
|
-
}
|
|
1049
|
-
};
|
|
1050
|
-
function q(r, e) {
|
|
1051
|
-
function t(a, o, s) {
|
|
1052
|
-
if (!(typeof document > "u")) {
|
|
1053
|
-
s = x({}, e, s), typeof s.expires == "number" && (s.expires = new Date(Date.now() + s.expires * 864e5)), s.expires && (s.expires = s.expires.toUTCString()), a = encodeURIComponent(a).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
1054
|
-
var i = "";
|
|
1055
|
-
for (var c in s)
|
|
1056
|
-
s[c] && (i += "; " + c, s[c] !== !0 && (i += "=" + s[c].split(";")[0]));
|
|
1057
|
-
return document.cookie = a + "=" + r.write(o, a) + i;
|
|
1058
|
-
}
|
|
1059
|
-
}
|
|
1060
|
-
function n(a) {
|
|
1061
|
-
if (!(typeof document > "u" || arguments.length && !a)) {
|
|
1062
|
-
for (var o = document.cookie ? document.cookie.split("; ") : [], s = {}, i = 0; i < o.length; i++) {
|
|
1063
|
-
var c = o[i].split("="), _ = c.slice(1).join("=");
|
|
1064
|
-
try {
|
|
1065
|
-
var m = decodeURIComponent(c[0]);
|
|
1066
|
-
if (m in s || (s[m] = r.read(_, m)), a === m)
|
|
1067
|
-
break;
|
|
1068
|
-
} catch {
|
|
1069
|
-
}
|
|
1070
|
-
}
|
|
1071
|
-
return a ? s[a] : s;
|
|
1072
|
-
}
|
|
1073
|
-
}
|
|
1074
|
-
return Object.create(
|
|
1075
|
-
{
|
|
1076
|
-
set: t,
|
|
1077
|
-
get: n,
|
|
1078
|
-
remove: function(a, o) {
|
|
1079
|
-
t(
|
|
1080
|
-
a,
|
|
1081
|
-
"",
|
|
1082
|
-
x({}, o, {
|
|
1083
|
-
expires: -1
|
|
1084
|
-
})
|
|
1085
|
-
);
|
|
1086
|
-
},
|
|
1087
|
-
withAttributes: function(a) {
|
|
1088
|
-
return q(this.converter, x({}, this.attributes, a));
|
|
1089
|
-
},
|
|
1090
|
-
withConverter: function(a) {
|
|
1091
|
-
return q(x({}, this.converter, a), this.attributes);
|
|
1092
|
-
}
|
|
1093
|
-
},
|
|
1094
|
-
{
|
|
1095
|
-
attributes: { value: Object.freeze(e) },
|
|
1096
|
-
converter: { value: Object.freeze(r) }
|
|
1097
|
-
}
|
|
1098
|
-
);
|
|
1099
|
-
}
|
|
1100
|
-
q(ge, { path: "/" });
|
|
1101
|
-
L("checkoutState");
|
|
1102
|
-
L("orderApi");
|
|
1103
|
-
L("utm");
|
|
1104
1183
|
export {
|
|
1105
|
-
|
|
1184
|
+
ye as apiDelete,
|
|
1106
1185
|
$ as apiGet,
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1186
|
+
f as apiPost,
|
|
1187
|
+
lt as apiPut,
|
|
1188
|
+
Ht as applyGiftCard,
|
|
1189
|
+
Tt as applyPromoCode,
|
|
1190
|
+
Ke as calculateCtaState,
|
|
1191
|
+
yt as cancelReservation,
|
|
1192
|
+
qt as checkCollectionPassword,
|
|
1193
|
+
Mt as checkEventPassword,
|
|
1194
|
+
Qt as completeGiftCardPayment,
|
|
1195
|
+
pt as completeReservation,
|
|
1196
|
+
Kt as computeCtaState,
|
|
1197
|
+
ot as configureApi,
|
|
1198
|
+
Bt as createGiftCardPurchase,
|
|
1199
|
+
gt as createOrder,
|
|
1200
|
+
dt as createPaymentIntent,
|
|
1201
|
+
N as err,
|
|
1202
|
+
_t as extendCheckoutSession,
|
|
1203
|
+
sr as extractVenueFees,
|
|
1204
|
+
At as fetchAllVenues,
|
|
1205
|
+
Ve as fetchAllVenuesResult,
|
|
1206
|
+
It as fetchEventDetails,
|
|
1207
|
+
Rt as fetchEventPerformers,
|
|
1208
|
+
Fe as fetchEventPerformersResult,
|
|
1209
|
+
Et as fetchEventTickets,
|
|
1210
|
+
Oe as fetchEventTicketsResult,
|
|
1211
|
+
Lt as fetchPublicCollection,
|
|
1212
|
+
Ot as fetchSeriesOccurrences,
|
|
1213
|
+
je as fetchSeriesOccurrencesResult,
|
|
1214
|
+
Vt as fetchSeriesPage,
|
|
1215
|
+
Dt as fetchVenueEvents,
|
|
1216
|
+
Le as fetchVenueEventsResult,
|
|
1217
|
+
or as formatVenueAddress,
|
|
1218
|
+
it as getApiConfig,
|
|
1219
|
+
Je as getCDNImageUrl,
|
|
1220
|
+
ft as getCartByUUID,
|
|
1221
|
+
ut as getClientIP,
|
|
1222
|
+
Q as getEventImageUrl,
|
|
1223
|
+
ct as getLegacyPublicUrl,
|
|
1224
|
+
Nt as getMonthEvents,
|
|
1225
|
+
qe as getMonthEventsResult,
|
|
1226
|
+
vt as getOrder,
|
|
1227
|
+
R as getOrdersV2Url,
|
|
1228
|
+
Ut as getOrgMonthEvents,
|
|
1229
|
+
Me as getOrgMonthEventsResult,
|
|
1230
|
+
c as getPublicBaseUrl,
|
|
1231
|
+
xt as getSeriesOccurrences,
|
|
1232
|
+
Ge as getSeriesOccurrencesResult,
|
|
1233
|
+
wt as getSessionStatus,
|
|
1234
|
+
ze as getVenue,
|
|
1235
|
+
zt as getVenueBySlug,
|
|
1236
|
+
jt as getVenueFees,
|
|
1237
|
+
Yt as getWaitlistStatus,
|
|
1238
|
+
Ct as hasPromoCodes,
|
|
1239
|
+
kt as initiateOrder,
|
|
1240
|
+
St as isOk,
|
|
1241
|
+
Jt as joinWaitlist,
|
|
1242
|
+
xe as ok,
|
|
1243
|
+
Wt as removeGiftCard,
|
|
1244
|
+
Pt as removePromoCode,
|
|
1245
|
+
Ft as resolvePublicEntity,
|
|
1246
|
+
Gt as testNetworkConnection,
|
|
1247
|
+
bt as trackUTMSource,
|
|
1248
|
+
tr as transformAvailableTicket,
|
|
1249
|
+
rr as transformEvent,
|
|
1250
|
+
nr as transformEventData,
|
|
1251
|
+
Xt as transformOrder,
|
|
1252
|
+
er as transformOrderForDisplay,
|
|
1253
|
+
Zt as transformTicket,
|
|
1254
|
+
ar as transformVenue,
|
|
1255
|
+
D as unwrapOr,
|
|
1256
|
+
mt as updateCartQuantities,
|
|
1257
|
+
ht as validatePaymentIntent,
|
|
1258
|
+
$t as validatePromoCode
|
|
1168
1259
|
};
|
|
1169
1260
|
//# sourceMappingURL=api.mjs.map
|