@getmicdrop/venue-calendar 4.0.93 → 4.0.95
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-Cq0DU1Cy.js +2385 -0
- package/dist/CartView-Cq0DU1Cy.js.map +1 -0
- package/dist/Checkout-BA43iGDc.js +1745 -0
- package/dist/Checkout-BA43iGDc.js.map +1 -0
- package/dist/{Checkout-BUwdMMjA.js → Checkout-BV5f49vY.js} +268 -268
- package/dist/Checkout-BV5f49vY.js.map +1 -0
- package/dist/{CheckoutTimer-C_ax1Uo2.js → CheckoutTimer-KyKyInco.js} +5 -5
- package/dist/CheckoutTimer-KyKyInco.js.map +1 -0
- package/dist/{ClockIcon-C5muTIYL.js → ClockIcon-BD24dBol.js} +2 -2
- package/dist/ClockIcon-BD24dBol.js.map +1 -0
- package/dist/{CollectionView-3MHrh5Zm.js → CollectionView-CKIxku9-.js} +18 -18
- package/dist/CollectionView-CKIxku9-.js.map +1 -0
- package/dist/{Event-vR1aE543.js → Event-BPdt1Io5.js} +1051 -1052
- package/dist/Event-BPdt1Io5.js.map +1 -0
- package/dist/EventPage-DRnTMGTK.js +575 -0
- package/dist/EventPage-DRnTMGTK.js.map +1 -0
- package/dist/{Heading-ZcvybCi8.js → Heading-pQuVpBrL.js} +2 -2
- package/dist/Heading-pQuVpBrL.js.map +1 -0
- package/dist/{ScarcityBadge-CjTFAhat.js → ScarcityBadge-DoYdujCs.js} +10 -10
- package/dist/ScarcityBadge-DoYdujCs.js.map +1 -0
- package/dist/{SeriesPage-DTEY83yR.js → SeriesPage-vw7Hva9F.js} +7 -7
- package/dist/SeriesPage-vw7Hva9F.js.map +1 -0
- package/dist/{Spinner--YBVljiP.js → Spinner-BfFZMaDP.js} +5 -5
- package/dist/Spinner-BfFZMaDP.js.map +1 -0
- package/dist/Success-Cjj6CC4w.js +862 -0
- package/dist/Success-Cjj6CC4w.js.map +1 -0
- package/dist/{Text-SlV9H-GU.js → Text-CT79Zi5n.js} +2 -2
- package/dist/Text-CT79Zi5n.js.map +1 -0
- package/dist/{VenueCalendar-Bth_j-Wp.js → VenueCalendar-Cz7_VBC6.js} +2548 -2563
- package/dist/VenueCalendar-Cz7_VBC6.js.map +1 -0
- package/dist/{ViewTicketsEmbed-D7g7RYZI.js → ViewTicketsEmbed-BvCfoKY3.js} +116 -128
- package/dist/ViewTicketsEmbed-BvCfoKY3.js.map +1 -0
- package/dist/api/api/events.d.ts +18 -0
- package/dist/api/api/gift-cards.d.ts +19 -0
- package/dist/api/api/index.d.ts +2 -2
- package/dist/api/api/result.d.ts +31 -1
- package/dist/api/api.cjs +1 -1
- package/dist/api/api.cjs.map +1 -1
- package/dist/api/api.mjs +312 -304
- package/dist/api/api.mjs.map +1 -1
- package/dist/api/types.d.ts +447 -447
- package/dist/{data-toggle-store.svelte-CFAVM8I0.js → data-toggle-store.svelte-BHwbM34q.js} +2 -2
- package/dist/data-toggle-store.svelte-BHwbM34q.js.map +1 -0
- package/dist/{labels-CnpAWtkz.js → labels-_x9WkVuZ.js} +151 -152
- package/dist/labels-_x9WkVuZ.js.map +1 -0
- package/dist/{modalManager.svelte-T2RGHhZH.js → modalManager.svelte-Csm1WlvP.js} +2 -2
- package/dist/modalManager.svelte-Csm1WlvP.js.map +1 -0
- package/dist/seo/seo.cjs.map +1 -1
- package/dist/seo/seo.mjs.map +1 -1
- package/dist/transform-WRPgSKLN.js +360 -0
- package/dist/transform-WRPgSKLN.js.map +1 -0
- package/dist/types/index.d.ts +454 -454
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +11 -11
- package/dist/venue-calendar.iife.js +44 -44
- package/dist/venue-calendar.iife.js.map +1 -1
- package/dist/venue-calendar.umd.js +42 -42
- package/dist/venue-calendar.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/lib/theme.js +222 -222
- package/dist/CartView-R5Z2q4Hy.js +0 -2380
- package/dist/CartView-R5Z2q4Hy.js.map +0 -1
- package/dist/Checkout-BUwdMMjA.js.map +0 -1
- package/dist/Checkout-avoTg_Zw.js +0 -1742
- package/dist/Checkout-avoTg_Zw.js.map +0 -1
- package/dist/CheckoutTimer-C_ax1Uo2.js.map +0 -1
- package/dist/ClockIcon-C5muTIYL.js.map +0 -1
- package/dist/CollectionView-3MHrh5Zm.js.map +0 -1
- package/dist/Event-vR1aE543.js.map +0 -1
- package/dist/EventPage-Bhg-8-5x.js +0 -566
- package/dist/EventPage-Bhg-8-5x.js.map +0 -1
- package/dist/Heading-ZcvybCi8.js.map +0 -1
- package/dist/ScarcityBadge-CjTFAhat.js.map +0 -1
- package/dist/SeriesPage-DTEY83yR.js.map +0 -1
- package/dist/Spinner--YBVljiP.js.map +0 -1
- package/dist/Success-ClCvTxTH.js +0 -848
- package/dist/Success-ClCvTxTH.js.map +0 -1
- package/dist/Text-SlV9H-GU.js.map +0 -1
- package/dist/VenueCalendar-Bth_j-Wp.js.map +0 -1
- package/dist/ViewTicketsEmbed-D7g7RYZI.js.map +0 -1
- package/dist/data-toggle-store.svelte-CFAVM8I0.js.map +0 -1
- package/dist/labels-CnpAWtkz.js.map +0 -1
- package/dist/modalManager.svelte-T2RGHhZH.js.map +0 -1
- package/dist/transform-C3TwZSH6.js +0 -349
- package/dist/transform-C3TwZSH6.js.map +0 -1
package/dist/api/api.mjs
CHANGED
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
import { createLogger as
|
|
2
|
-
import { getLocalStorage as
|
|
3
|
-
import {
|
|
4
|
-
import { isHiddenTicketPurchasable as
|
|
5
|
-
|
|
1
|
+
import { createLogger as $ } from "@getmicdrop/svelte-components/utils/logger";
|
|
2
|
+
import { getLocalStorage as ue, setLocalStorage as le, getSessionStorage as Y, setSessionStorage as de, createLogger as fe, AppError as N, formatCurrency as me, resolveImageUrl as K } from "@getmicdrop/svelte-components";
|
|
3
|
+
import { formatLocal as L } from "@getmicdrop/svelte-components/datetime";
|
|
4
|
+
import { isHiddenTicketPurchasable as pe } from "@getmicdrop/svelte-components/transforms";
|
|
5
|
+
import "@getmicdrop/svelte-components/utils/timezones";
|
|
6
|
+
const q = $("VC"), ye = {
|
|
6
7
|
baseUrl: "https://get-micdrop.com",
|
|
7
8
|
timeout: 3e4,
|
|
8
9
|
retries: 2,
|
|
9
10
|
retryDelay: 500,
|
|
10
11
|
onError: (t) => q.error("API Error:", t)
|
|
11
12
|
};
|
|
12
|
-
let p = { ...
|
|
13
|
-
function
|
|
13
|
+
let p = { ...ye };
|
|
14
|
+
function ct(t) {
|
|
14
15
|
p = { ...p, ...t };
|
|
15
16
|
}
|
|
16
|
-
function
|
|
17
|
+
function ut() {
|
|
17
18
|
return { ...p };
|
|
18
19
|
}
|
|
19
20
|
function c() {
|
|
20
21
|
return `${p.baseUrl}/api/v2/public`;
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
+
function lt() {
|
|
23
24
|
return `${p.baseUrl}/api/public`;
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
+
function R() {
|
|
26
27
|
return `${p.baseUrl}/api/orders/v2/public`;
|
|
27
28
|
}
|
|
28
|
-
async function
|
|
29
|
+
async function dt() {
|
|
29
30
|
return "";
|
|
30
31
|
}
|
|
31
|
-
const
|
|
32
|
+
const ge = (t) => new Promise((e) => setTimeout(e, t));
|
|
32
33
|
async function Z(t, e, r) {
|
|
33
34
|
const n = (e.method || "GET").toUpperCase(), s = n === "GET" || n === "HEAD" ? r.retries + 1 : 1;
|
|
34
35
|
let o;
|
|
35
36
|
for (let i = 1; i <= s; i++) {
|
|
36
|
-
const u = new AbortController(),
|
|
37
|
+
const u = new AbortController(), T = setTimeout(() => u.abort(), r.timeout), y = e.signal;
|
|
37
38
|
let k;
|
|
38
39
|
y && (y.aborted ? u.abort() : (k = () => u.abort(), y.addEventListener("abort", k, { once: !0 })));
|
|
39
40
|
try {
|
|
@@ -45,22 +46,22 @@ async function Z(t, e, r) {
|
|
|
45
46
|
} catch (g) {
|
|
46
47
|
if (o = g, y?.aborted) throw g;
|
|
47
48
|
} finally {
|
|
48
|
-
clearTimeout(
|
|
49
|
+
clearTimeout(T), y && k && y.removeEventListener("abort", k);
|
|
49
50
|
}
|
|
50
|
-
i < s && await
|
|
51
|
+
i < s && await ge(r.retryDelay * Math.pow(2, i - 1));
|
|
51
52
|
}
|
|
52
53
|
throw o;
|
|
53
54
|
}
|
|
54
|
-
async function
|
|
55
|
+
async function C(t, e) {
|
|
55
56
|
return F("GET", t, void 0, e);
|
|
56
57
|
}
|
|
57
58
|
async function f(t, e, r) {
|
|
58
59
|
return F("POST", t, e, r);
|
|
59
60
|
}
|
|
60
|
-
async function
|
|
61
|
+
async function ft(t, e, r) {
|
|
61
62
|
return F("PUT", t, e, r);
|
|
62
63
|
}
|
|
63
|
-
async function
|
|
64
|
+
async function ve(t, e) {
|
|
64
65
|
return F("DELETE", t, void 0, e);
|
|
65
66
|
}
|
|
66
67
|
async function F(t, e, r, n) {
|
|
@@ -92,7 +93,7 @@ async function F(t, e, r, n) {
|
|
|
92
93
|
), { success: !1, error: o };
|
|
93
94
|
}
|
|
94
95
|
}
|
|
95
|
-
async function
|
|
96
|
+
async function A(t, e) {
|
|
96
97
|
try {
|
|
97
98
|
const r = await Z(
|
|
98
99
|
t,
|
|
@@ -108,7 +109,7 @@ async function E(t, e) {
|
|
|
108
109
|
return q.error("API request error:", r), null;
|
|
109
110
|
}
|
|
110
111
|
}
|
|
111
|
-
function
|
|
112
|
+
function he(t) {
|
|
112
113
|
const e = t ?? {};
|
|
113
114
|
return {
|
|
114
115
|
ticketID: Number(e.TicketID ?? e.ticketID ?? 0),
|
|
@@ -119,8 +120,8 @@ function ve(t) {
|
|
|
119
120
|
status: String(e.Status ?? e.status ?? "")
|
|
120
121
|
};
|
|
121
122
|
}
|
|
122
|
-
function
|
|
123
|
-
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(
|
|
123
|
+
function _e(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(he);
|
|
124
125
|
return { uuid: r, eventID: n, status: a, expiresAt: s, reservations: i };
|
|
125
126
|
}
|
|
126
127
|
const X = [
|
|
@@ -129,7 +130,7 @@ const X = [
|
|
|
129
130
|
"utmCampaign",
|
|
130
131
|
"utmContent",
|
|
131
132
|
"utmTerm"
|
|
132
|
-
],
|
|
133
|
+
], we = {
|
|
133
134
|
utmSource: "utm_source",
|
|
134
135
|
utmMedium: "utm_medium",
|
|
135
136
|
utmCampaign: "utm_campaign",
|
|
@@ -139,19 +140,19 @@ const X = [
|
|
|
139
140
|
function te(t) {
|
|
140
141
|
return t ? t.trim().toLowerCase().replace(/\s+/g, "_") : "";
|
|
141
142
|
}
|
|
142
|
-
function
|
|
143
|
+
function ke(t) {
|
|
143
144
|
const e = {};
|
|
144
145
|
for (const r of X)
|
|
145
146
|
e[r] = te(t[r]);
|
|
146
147
|
return e.utmSource || (e.utmSource = ee), e;
|
|
147
148
|
}
|
|
148
|
-
function
|
|
149
|
+
function be(t) {
|
|
149
150
|
const e = {};
|
|
150
151
|
for (const r of X)
|
|
151
|
-
e[r] = t.get(
|
|
152
|
-
return
|
|
152
|
+
e[r] = t.get(we[r]);
|
|
153
|
+
return ke(e);
|
|
153
154
|
}
|
|
154
|
-
function
|
|
155
|
+
function $e() {
|
|
155
156
|
if (typeof window > "u") return !0;
|
|
156
157
|
try {
|
|
157
158
|
return window.self === window.top;
|
|
@@ -159,27 +160,27 @@ function be() {
|
|
|
159
160
|
return !1;
|
|
160
161
|
}
|
|
161
162
|
}
|
|
162
|
-
function
|
|
163
|
-
const t = typeof window < "u", e =
|
|
163
|
+
function Ce() {
|
|
164
|
+
const t = typeof window < "u", e = $e(), r = t ? window.location.search : "", n = (typeof document < "u" ? document.referrer : "") ?? "", a = t && e ? window.location.href : "";
|
|
164
165
|
return {
|
|
165
|
-
utm:
|
|
166
|
+
utm: be(new URLSearchParams(r)),
|
|
166
167
|
referrer: n || "",
|
|
167
168
|
pageUrl: a || ""
|
|
168
169
|
};
|
|
169
170
|
}
|
|
170
|
-
let
|
|
171
|
-
function Te() {
|
|
172
|
-
return typeof window < "u" && typeof window.__tcfapi == "function";
|
|
173
|
-
}
|
|
171
|
+
let Te = !1;
|
|
174
172
|
function Pe() {
|
|
175
|
-
return
|
|
173
|
+
return typeof window < "u" && typeof window.__tcfapi == "function";
|
|
176
174
|
}
|
|
177
175
|
function Se() {
|
|
178
|
-
return Pe()
|
|
176
|
+
return Pe();
|
|
177
|
+
}
|
|
178
|
+
function Ie() {
|
|
179
|
+
return Se() ? Te : !0;
|
|
179
180
|
}
|
|
180
|
-
const
|
|
181
|
-
function
|
|
182
|
-
return typeof t == "string" &&
|
|
181
|
+
const H = "micdrop_session_id", W = "micdrop_visitor_id", Ee = /^[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 Re(t) {
|
|
183
|
+
return typeof t == "string" && Ee.test(t);
|
|
183
184
|
}
|
|
184
185
|
function re() {
|
|
185
186
|
const t = typeof crypto < "u" ? crypto : void 0;
|
|
@@ -194,27 +195,27 @@ function re() {
|
|
|
194
195
|
for (let n = 0; n < 16; n++) r.push(e[n].toString(16).padStart(2, "0"));
|
|
195
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]}`;
|
|
196
197
|
}
|
|
197
|
-
function Re() {
|
|
198
|
-
let t = Y(W);
|
|
199
|
-
return t || (t = re(), le(W, t)), t;
|
|
200
|
-
}
|
|
201
198
|
function Ae() {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
199
|
+
let t = Y(H);
|
|
200
|
+
return t || (t = re(), de(H, t)), t;
|
|
201
|
+
}
|
|
202
|
+
function De() {
|
|
203
|
+
if (!Ie()) return null;
|
|
204
|
+
const t = ue(W);
|
|
205
|
+
if (Re(t)) return t;
|
|
205
206
|
const e = re();
|
|
206
|
-
return
|
|
207
|
+
return le(W, e), e;
|
|
207
208
|
}
|
|
208
|
-
const
|
|
209
|
-
function
|
|
210
|
-
const t = Y(
|
|
209
|
+
const Ne = "micdrop_attribution";
|
|
210
|
+
function Ue() {
|
|
211
|
+
const t = Y(Ne);
|
|
211
212
|
return !t || !t.utm || typeof t.utm.utmSource != "string" ? null : t;
|
|
212
213
|
}
|
|
213
214
|
function U() {
|
|
214
|
-
const e =
|
|
215
|
+
const e = Ue() ?? Ce();
|
|
215
216
|
return {
|
|
216
|
-
sessionId:
|
|
217
|
-
visitorId:
|
|
217
|
+
sessionId: Ae(),
|
|
218
|
+
visitorId: De(),
|
|
218
219
|
utmSource: e.utm.utmSource,
|
|
219
220
|
utmMedium: e.utm.utmMedium,
|
|
220
221
|
utmCampaign: e.utm.utmCampaign,
|
|
@@ -223,12 +224,12 @@ function U() {
|
|
|
223
224
|
referrer: e.referrer || ""
|
|
224
225
|
};
|
|
225
226
|
}
|
|
226
|
-
|
|
227
|
-
const d =
|
|
228
|
-
async function
|
|
227
|
+
fe("tracking");
|
|
228
|
+
const d = $("VC");
|
|
229
|
+
async function mt(t, e, r) {
|
|
229
230
|
try {
|
|
230
231
|
const n = await f(
|
|
231
|
-
`${
|
|
232
|
+
`${R()}/cart/${t}/payment-intent`,
|
|
232
233
|
{
|
|
233
234
|
productQuantities: e,
|
|
234
235
|
...r && Object.keys(r).length > 0 ? { donationAmounts: r } : {},
|
|
@@ -239,7 +240,7 @@ async function dt(t, e, r) {
|
|
|
239
240
|
}
|
|
240
241
|
);
|
|
241
242
|
if (!n.success)
|
|
242
|
-
throw d.error("Payment intent creation failed:", n.error), new
|
|
243
|
+
throw d.error("Payment intent creation failed:", n.error), new N(
|
|
243
244
|
n.error || "Failed to create payment intent",
|
|
244
245
|
"lib/api/orders/createPaymentIntent"
|
|
245
246
|
);
|
|
@@ -248,15 +249,15 @@ async function dt(t, e, r) {
|
|
|
248
249
|
return d.error("createPaymentIntent error:", n), null;
|
|
249
250
|
}
|
|
250
251
|
}
|
|
251
|
-
async function
|
|
252
|
+
async function pt(t, e) {
|
|
252
253
|
if (!t) return null;
|
|
253
254
|
try {
|
|
254
|
-
const r = await
|
|
255
|
-
`${
|
|
255
|
+
const r = await C(
|
|
256
|
+
`${R()}/cart/${t}`
|
|
256
257
|
);
|
|
257
258
|
if (!r.success)
|
|
258
259
|
return null;
|
|
259
|
-
const { uuid: n, eventID: a, status: s, expiresAt: o, reservations: i } =
|
|
260
|
+
const { uuid: n, eventID: a, status: s, expiresAt: o, reservations: i } = _e(
|
|
260
261
|
r.data
|
|
261
262
|
);
|
|
262
263
|
return s !== "reserved" && s !== "active" || e !== void 0 && a !== Number(e) ? null : { uuid: n, eventID: a, status: s, expiresAt: o, reservations: i };
|
|
@@ -264,7 +265,7 @@ async function ft(t, e) {
|
|
|
264
265
|
return d.error("getCartByUUID error:", r), null;
|
|
265
266
|
}
|
|
266
267
|
}
|
|
267
|
-
async function
|
|
268
|
+
async function yt(t, e, r) {
|
|
268
269
|
try {
|
|
269
270
|
const n = {};
|
|
270
271
|
for (const [o, i] of Object.entries(e)) {
|
|
@@ -277,7 +278,7 @@ async function mt(t, e, r) {
|
|
|
277
278
|
const u = typeof o == "number" ? o : parseInt(o, 10);
|
|
278
279
|
!Number.isNaN(u) && i > 0 && (a[u] = i);
|
|
279
280
|
}
|
|
280
|
-
const s = await fetch(`${
|
|
281
|
+
const s = await fetch(`${R()}/cart/${t}`, {
|
|
281
282
|
method: "PUT",
|
|
282
283
|
headers: { "Content-Type": "application/json" },
|
|
283
284
|
credentials: "include",
|
|
@@ -295,7 +296,7 @@ async function mt(t, e, r) {
|
|
|
295
296
|
return d.error("updateCartQuantities error:", n), !1;
|
|
296
297
|
}
|
|
297
298
|
}
|
|
298
|
-
async function
|
|
299
|
+
async function gt(t) {
|
|
299
300
|
try {
|
|
300
301
|
const e = await f(
|
|
301
302
|
`${c()}/orders/complete/${t}`
|
|
@@ -311,7 +312,7 @@ async function pt(t) {
|
|
|
311
312
|
return d.error("Error completing reservation:", e), { success: !1, error: "Network error completing reservation" };
|
|
312
313
|
}
|
|
313
314
|
}
|
|
314
|
-
async function
|
|
315
|
+
async function vt(t) {
|
|
315
316
|
try {
|
|
316
317
|
const e = await f(
|
|
317
318
|
`${c()}/orders/cancel/${t}`
|
|
@@ -327,7 +328,7 @@ async function yt(t) {
|
|
|
327
328
|
return d.error("Error cancelling reservation:", e), { success: !1, error: "Network error cancelling reservation" };
|
|
328
329
|
}
|
|
329
330
|
}
|
|
330
|
-
async function
|
|
331
|
+
async function ht(t, e) {
|
|
331
332
|
try {
|
|
332
333
|
const r = await f(
|
|
333
334
|
`${c()}/orders/create`,
|
|
@@ -339,12 +340,12 @@ async function gt(t, e) {
|
|
|
339
340
|
return d.error("createOrder error:", r), null;
|
|
340
341
|
}
|
|
341
342
|
}
|
|
342
|
-
async function
|
|
343
|
-
return
|
|
343
|
+
async function _t(t) {
|
|
344
|
+
return A(`${c()}/orders/${t}`);
|
|
344
345
|
}
|
|
345
|
-
async function
|
|
346
|
+
async function wt(t, e) {
|
|
346
347
|
try {
|
|
347
|
-
const r = await f(`${
|
|
348
|
+
const r = await f(`${R()}/validatePaymentIntent/${t}`, {
|
|
348
349
|
...e,
|
|
349
350
|
attribution: U()
|
|
350
351
|
});
|
|
@@ -369,7 +370,7 @@ async function ht(t, e) {
|
|
|
369
370
|
return d.error("validatePaymentIntent error:", r), null;
|
|
370
371
|
}
|
|
371
372
|
}
|
|
372
|
-
async function
|
|
373
|
+
async function kt(t) {
|
|
373
374
|
try {
|
|
374
375
|
const e = await f(`${c()}/orders/extend-session`, { orderUuid: t });
|
|
375
376
|
if (!e.success)
|
|
@@ -388,9 +389,9 @@ async function _t(t) {
|
|
|
388
389
|
return d.error("Error extending checkout session:", e), { success: !1, error: "Network error extending session" };
|
|
389
390
|
}
|
|
390
391
|
}
|
|
391
|
-
async function
|
|
392
|
+
async function bt(t) {
|
|
392
393
|
try {
|
|
393
|
-
const e = await
|
|
394
|
+
const e = await C(
|
|
394
395
|
`${c()}/orders/session/${t}`
|
|
395
396
|
);
|
|
396
397
|
if (!e.success)
|
|
@@ -411,7 +412,7 @@ async function wt(t) {
|
|
|
411
412
|
return d.error("Error getting session status:", e), { error: "Network error getting session status" };
|
|
412
413
|
}
|
|
413
414
|
}
|
|
414
|
-
async function
|
|
415
|
+
async function $t(t = { eventID: "" }) {
|
|
415
416
|
try {
|
|
416
417
|
const e = await f(
|
|
417
418
|
`${c()}/orders/create`,
|
|
@@ -423,7 +424,7 @@ async function kt(t = { eventID: "" }) {
|
|
|
423
424
|
return d.error("initiateOrder error:", e), null;
|
|
424
425
|
}
|
|
425
426
|
}
|
|
426
|
-
async function
|
|
427
|
+
async function Ct(t) {
|
|
427
428
|
if (typeof window > "u") return;
|
|
428
429
|
const e = new URLSearchParams(window.location.search), r = te(e.get("utm_source")) || ee;
|
|
429
430
|
try {
|
|
@@ -434,12 +435,12 @@ async function bt(t) {
|
|
|
434
435
|
d.error("UTM tracking failed:", n);
|
|
435
436
|
}
|
|
436
437
|
}
|
|
437
|
-
const V =
|
|
438
|
-
async function
|
|
438
|
+
const V = $("VC"), xe = () => R();
|
|
439
|
+
async function Tt(t, e) {
|
|
439
440
|
try {
|
|
440
441
|
if (!e || !e.trim())
|
|
441
442
|
return { valid: !1, error: "Promo code is required" };
|
|
442
|
-
const r = encodeURIComponent(e.trim()), n = await
|
|
443
|
+
const r = encodeURIComponent(e.trim()), n = await C(
|
|
443
444
|
`/promo-codes/validate/${t}/${r}`
|
|
444
445
|
);
|
|
445
446
|
if (!n.success)
|
|
@@ -458,9 +459,9 @@ async function $t(t, e) {
|
|
|
458
459
|
return V.error("Error validating promo code:", r), { valid: !1, error: "Network error validating code" };
|
|
459
460
|
}
|
|
460
461
|
}
|
|
461
|
-
async function
|
|
462
|
+
async function Pt(t) {
|
|
462
463
|
try {
|
|
463
|
-
const e = await
|
|
464
|
+
const e = await C(
|
|
464
465
|
`/promo-codes/check/${t}`
|
|
465
466
|
);
|
|
466
467
|
return e.success ? e.data.hasPromoCodes === !0 : !0;
|
|
@@ -468,10 +469,10 @@ async function Ct(t) {
|
|
|
468
469
|
return V.error("Error checking promo codes availability:", e), !0;
|
|
469
470
|
}
|
|
470
471
|
}
|
|
471
|
-
async function
|
|
472
|
+
async function St(t, e) {
|
|
472
473
|
try {
|
|
473
474
|
const r = await f(
|
|
474
|
-
`${
|
|
475
|
+
`${xe()}/cart/${t}/apply-promo`,
|
|
475
476
|
{ promoCode: e }
|
|
476
477
|
);
|
|
477
478
|
return r.success ? { success: !0 } : {
|
|
@@ -482,7 +483,7 @@ async function Tt(t, e) {
|
|
|
482
483
|
return V.error("Error applying promo code:", r), { success: !1, error: "Network error applying code" };
|
|
483
484
|
}
|
|
484
485
|
}
|
|
485
|
-
async function
|
|
486
|
+
async function It(t) {
|
|
486
487
|
try {
|
|
487
488
|
const e = await f(`/orders/${t}/remove-promo`);
|
|
488
489
|
return e.success ? { success: !0 } : {
|
|
@@ -493,27 +494,33 @@ async function Pt(t) {
|
|
|
493
494
|
return V.error("Error removing promo code:", e), { success: !1, error: "Network error removing code" };
|
|
494
495
|
}
|
|
495
496
|
}
|
|
496
|
-
function
|
|
497
|
+
function Oe(t) {
|
|
497
498
|
const e = t ?? {};
|
|
498
499
|
return {
|
|
499
500
|
performers: Array.isArray(e.performers) ? e.performers : [],
|
|
500
501
|
showPerformers: e.showPerformers === !0
|
|
501
502
|
};
|
|
502
503
|
}
|
|
503
|
-
function
|
|
504
|
+
function ne(t) {
|
|
504
505
|
return { ok: !0, data: t };
|
|
505
506
|
}
|
|
506
|
-
function
|
|
507
|
+
function b(t) {
|
|
507
508
|
return { ok: !1, error: t };
|
|
508
509
|
}
|
|
509
|
-
function
|
|
510
|
+
function Q(t) {
|
|
511
|
+
return { ok: !1, error: t, notFound: !0 };
|
|
512
|
+
}
|
|
513
|
+
function Et(t) {
|
|
510
514
|
return t.ok;
|
|
511
515
|
}
|
|
512
|
-
function
|
|
516
|
+
function Rt(t) {
|
|
517
|
+
return !t.ok;
|
|
518
|
+
}
|
|
519
|
+
function D(t, e) {
|
|
513
520
|
return t.ok ? t.data : e;
|
|
514
521
|
}
|
|
515
|
-
const m =
|
|
516
|
-
async function
|
|
522
|
+
const m = $("VC"), O = /* @__PURE__ */ new Map();
|
|
523
|
+
async function Fe(t, e = fetch, r) {
|
|
517
524
|
const n = r ? `${t}:pw` : String(t);
|
|
518
525
|
if (e === fetch) {
|
|
519
526
|
const s = O.get(n);
|
|
@@ -523,49 +530,51 @@ async function It(t, e = fetch, r) {
|
|
|
523
530
|
try {
|
|
524
531
|
const s = r ? `${c()}/events/${t}?password=${encodeURIComponent(r)}` : `${c()}/events/${t}`, o = await e(s);
|
|
525
532
|
if (!o.ok)
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
);
|
|
530
|
-
return await o.json();
|
|
533
|
+
return o.status === 404 ? Q("event_not_found") : (m.error(`Failed to fetch event details: ${o.status}`), b("event_fetch_failed"));
|
|
534
|
+
const i = await o.json();
|
|
535
|
+
return i ? ne(i) : Q("event_not_found");
|
|
531
536
|
} catch (s) {
|
|
532
|
-
return m.error("Error fetching event details:", s),
|
|
537
|
+
return m.error("Error fetching event details:", s), b("event_fetch_failed");
|
|
533
538
|
}
|
|
534
539
|
})();
|
|
535
540
|
return e === fetch && (O.set(n, a), a.finally(() => {
|
|
536
541
|
O.get(n) === a && O.delete(n);
|
|
537
542
|
})), a;
|
|
538
543
|
}
|
|
544
|
+
async function At(t, e = fetch, r) {
|
|
545
|
+
const n = await Fe(t, e, r);
|
|
546
|
+
return n.ok ? n.data : null;
|
|
547
|
+
}
|
|
539
548
|
async function w(t, e, r = (n) => n) {
|
|
540
549
|
try {
|
|
541
|
-
const n = await
|
|
542
|
-
return n ?
|
|
550
|
+
const n = await A(t);
|
|
551
|
+
return n ? ne(r(n)) : (m.error(`Failed to load (${e}): network or server error`), b(e));
|
|
543
552
|
} catch (n) {
|
|
544
|
-
return m.error(`Error loading (${e}):`, n),
|
|
553
|
+
return m.error(`Error loading (${e}):`, n), b(e);
|
|
545
554
|
}
|
|
546
555
|
}
|
|
547
|
-
function
|
|
556
|
+
function G(t) {
|
|
548
557
|
return Array.isArray(t) ? t : [];
|
|
549
558
|
}
|
|
550
|
-
async function
|
|
559
|
+
async function Ve(t) {
|
|
551
560
|
return w(
|
|
552
561
|
`${c()}/tickets/event/${t}`,
|
|
553
562
|
"tickets_fetch_failed",
|
|
554
|
-
|
|
563
|
+
G
|
|
555
564
|
);
|
|
556
565
|
}
|
|
557
|
-
async function
|
|
558
|
-
return
|
|
566
|
+
async function Dt(t) {
|
|
567
|
+
return D(await Ve(t), []);
|
|
559
568
|
}
|
|
560
|
-
async function
|
|
569
|
+
async function Le(t) {
|
|
561
570
|
return t ? w(
|
|
562
571
|
`${c()}/events/${t}/performers`,
|
|
563
572
|
"performers_fetch_failed",
|
|
564
|
-
(e) =>
|
|
565
|
-
) : (m.warn("fetchEventPerformers called without eventId"),
|
|
573
|
+
(e) => Oe(e)
|
|
574
|
+
) : (m.warn("fetchEventPerformers called without eventId"), b("performers_missing_event_id"));
|
|
566
575
|
}
|
|
567
|
-
async function
|
|
568
|
-
return
|
|
576
|
+
async function Nt(t) {
|
|
577
|
+
return D(await Le(t), {
|
|
569
578
|
performers: [],
|
|
570
579
|
showPerformers: !1
|
|
571
580
|
});
|
|
@@ -574,72 +583,72 @@ async function qe(t) {
|
|
|
574
583
|
return t ? w(
|
|
575
584
|
`${c()}/venues/organization/${t}`,
|
|
576
585
|
"venues_fetch_failed",
|
|
577
|
-
|
|
578
|
-
) : (m.warn("fetchAllVenues called without orgId"),
|
|
586
|
+
G
|
|
587
|
+
) : (m.warn("fetchAllVenues called without orgId"), b("venues_missing_org_id"));
|
|
579
588
|
}
|
|
580
|
-
async function
|
|
581
|
-
return
|
|
589
|
+
async function Ut(t) {
|
|
590
|
+
return D(await qe(t), []);
|
|
582
591
|
}
|
|
583
|
-
async function
|
|
592
|
+
async function Me(t) {
|
|
584
593
|
return t ? w(
|
|
585
594
|
`${c()}/events/venue/${t}`,
|
|
586
595
|
"venue_events_fetch_failed",
|
|
587
|
-
|
|
588
|
-
) : (m.warn("fetchVenueEvents called without venueId"),
|
|
596
|
+
G
|
|
597
|
+
) : (m.warn("fetchVenueEvents called without venueId"), b("venue_events_missing_venue_id"));
|
|
589
598
|
}
|
|
590
|
-
async function
|
|
591
|
-
return
|
|
599
|
+
async function xt(t) {
|
|
600
|
+
return D(await Me(t), []);
|
|
592
601
|
}
|
|
593
|
-
function
|
|
602
|
+
function ae(t) {
|
|
594
603
|
return Array.isArray(t) ? t : Array.isArray(t.events) ? t.events : [];
|
|
595
604
|
}
|
|
596
|
-
async function
|
|
605
|
+
async function Ge(t, e, r) {
|
|
597
606
|
return w(
|
|
598
607
|
`${c()}/events/venue/${t}/month/${e}/${r}`,
|
|
599
608
|
"month_events_fetch_failed",
|
|
600
|
-
(n) =>
|
|
609
|
+
(n) => ae(n)
|
|
601
610
|
);
|
|
602
611
|
}
|
|
603
|
-
async function
|
|
604
|
-
return
|
|
612
|
+
async function Ot(t, e, r) {
|
|
613
|
+
return D(await Ge(t, e, r), []);
|
|
605
614
|
}
|
|
606
|
-
async function
|
|
615
|
+
async function je(t, e, r) {
|
|
607
616
|
return w(
|
|
608
617
|
`${c()}/events/organization/${t}/month/${e}/${r}`,
|
|
609
618
|
"org_month_events_fetch_failed",
|
|
610
|
-
(n) =>
|
|
619
|
+
(n) => ae(n)
|
|
611
620
|
);
|
|
612
621
|
}
|
|
613
|
-
async function
|
|
614
|
-
return
|
|
622
|
+
async function Ft(t, e, r) {
|
|
623
|
+
return D(await je(t, e, r), []);
|
|
615
624
|
}
|
|
616
|
-
async function
|
|
625
|
+
async function ze(t) {
|
|
617
626
|
return w(
|
|
618
627
|
`${c()}/series/${t}/occurrences`,
|
|
619
628
|
"series_occurrences_fetch_failed"
|
|
620
629
|
);
|
|
621
630
|
}
|
|
622
|
-
async function
|
|
623
|
-
const e = await
|
|
631
|
+
async function Vt(t) {
|
|
632
|
+
const e = await ze(t);
|
|
624
633
|
return e.ok ? e.data : null;
|
|
625
634
|
}
|
|
626
|
-
async function
|
|
635
|
+
async function Be(t, e) {
|
|
627
636
|
return w(
|
|
628
637
|
`${c()}/series/${t}/occurrences?venueId=${e}`,
|
|
629
638
|
"series_cta_fetch_failed"
|
|
630
639
|
);
|
|
631
640
|
}
|
|
632
|
-
async function
|
|
633
|
-
const r = await
|
|
641
|
+
async function Lt(t, e) {
|
|
642
|
+
const r = await Be(t, e);
|
|
634
643
|
return r.ok ? r.data : null;
|
|
635
644
|
}
|
|
636
|
-
async function
|
|
645
|
+
async function qt(t, e) {
|
|
637
646
|
try {
|
|
638
|
-
const r = e ? `?slug=${encodeURIComponent(e)}` : "", n = await
|
|
647
|
+
const r = e ? `?slug=${encodeURIComponent(e)}` : "", n = await A(
|
|
639
648
|
`${c()}/resolve/${encodeURIComponent(String(t))}${r}`
|
|
640
649
|
);
|
|
641
650
|
if (!n || !n.type)
|
|
642
|
-
throw new
|
|
651
|
+
throw new N(
|
|
643
652
|
"Failed to resolve entity",
|
|
644
653
|
"lib/api/events/resolvePublicEntity"
|
|
645
654
|
);
|
|
@@ -648,13 +657,13 @@ async function Ft(t, e) {
|
|
|
648
657
|
return m.error("Error resolving public entity:", r), null;
|
|
649
658
|
}
|
|
650
659
|
}
|
|
651
|
-
async function
|
|
660
|
+
async function Mt(t) {
|
|
652
661
|
try {
|
|
653
|
-
const e = await
|
|
662
|
+
const e = await A(
|
|
654
663
|
`${c()}/series/${t}/page`
|
|
655
664
|
);
|
|
656
665
|
if (!e)
|
|
657
|
-
throw new
|
|
666
|
+
throw new N(
|
|
658
667
|
"Failed to fetch series page",
|
|
659
668
|
"lib/api/events/fetchSeriesPage"
|
|
660
669
|
);
|
|
@@ -663,11 +672,11 @@ async function Vt(t) {
|
|
|
663
672
|
return m.error("Error fetching series page:", e), null;
|
|
664
673
|
}
|
|
665
674
|
}
|
|
666
|
-
async function
|
|
675
|
+
async function Gt(t, e) {
|
|
667
676
|
try {
|
|
668
|
-
const r = e ? `${c()}/collections/${t}?password=${encodeURIComponent(e)}` : `${c()}/collections/${t}`, n = await
|
|
677
|
+
const r = e ? `${c()}/collections/${t}?password=${encodeURIComponent(e)}` : `${c()}/collections/${t}`, n = await A(r);
|
|
669
678
|
if (!n)
|
|
670
|
-
throw new
|
|
679
|
+
throw new N(
|
|
671
680
|
"Failed to fetch collection",
|
|
672
681
|
"lib/api/events/fetchPublicCollection"
|
|
673
682
|
);
|
|
@@ -676,17 +685,17 @@ async function qt(t, e) {
|
|
|
676
685
|
return m.error("Error fetching collection:", r), null;
|
|
677
686
|
}
|
|
678
687
|
}
|
|
679
|
-
async function
|
|
688
|
+
async function jt(t, e) {
|
|
680
689
|
try {
|
|
681
690
|
const r = encodeURIComponent(e);
|
|
682
|
-
return (await
|
|
691
|
+
return (await A(
|
|
683
692
|
`${c()}/collections/${t}/check-password/${r}`
|
|
684
693
|
))?.valid === !0;
|
|
685
694
|
} catch (r) {
|
|
686
695
|
return m.error("Error checking collection password:", r), !1;
|
|
687
696
|
}
|
|
688
697
|
}
|
|
689
|
-
async function
|
|
698
|
+
async function zt(t, e) {
|
|
690
699
|
try {
|
|
691
700
|
const r = await f(
|
|
692
701
|
`${c()}/events/${t}/check-password`,
|
|
@@ -699,7 +708,7 @@ async function Mt(t, e) {
|
|
|
699
708
|
return m.error("Error checking event password:", r), { valid: !1 };
|
|
700
709
|
}
|
|
701
710
|
}
|
|
702
|
-
async function
|
|
711
|
+
async function Bt(t, e) {
|
|
703
712
|
try {
|
|
704
713
|
const r = e ? `${c()}/events/venue/${e}` : t ? `${c()}/venues/organization/${t}` : `${c()}/health`;
|
|
705
714
|
return (await fetch(r, {
|
|
@@ -709,36 +718,36 @@ async function Gt(t, e) {
|
|
|
709
718
|
return m.error("Network connection test failed:", r), !1;
|
|
710
719
|
}
|
|
711
720
|
}
|
|
712
|
-
const
|
|
713
|
-
async function
|
|
721
|
+
const E = $("VC");
|
|
722
|
+
async function He(t) {
|
|
714
723
|
try {
|
|
715
724
|
if (!t)
|
|
716
|
-
return
|
|
717
|
-
const e = await
|
|
718
|
-
return e.success ? e.data ?? null : (
|
|
725
|
+
return E.warn("getVenue called without venueId"), null;
|
|
726
|
+
const e = await C(`/venues/${t}`);
|
|
727
|
+
return e.success ? e.data ?? null : (E.error(`Failed to fetch venue: ${e.statusCode}`), null);
|
|
719
728
|
} catch (e) {
|
|
720
|
-
return
|
|
729
|
+
return E.error("Error fetching venue:", e), null;
|
|
721
730
|
}
|
|
722
731
|
}
|
|
723
|
-
async function
|
|
724
|
-
const e = await
|
|
732
|
+
async function Ht(t) {
|
|
733
|
+
const e = await He(t);
|
|
725
734
|
return e ? {
|
|
726
735
|
serviceFeePercentage: e.serviceFeePercentage ?? 0,
|
|
727
736
|
serviceFeeCents: e.serviceFeeCents ?? 0,
|
|
728
737
|
taxPercentage: e.taxPercentage ?? 0
|
|
729
738
|
} : null;
|
|
730
739
|
}
|
|
731
|
-
async function
|
|
740
|
+
async function Wt(t) {
|
|
732
741
|
try {
|
|
733
742
|
if (!t)
|
|
734
|
-
return
|
|
735
|
-
const e = encodeURIComponent(t), r = await
|
|
736
|
-
return r.success ? r.data ?? null : (
|
|
743
|
+
return E.warn("getVenueBySlug called without slug"), null;
|
|
744
|
+
const e = encodeURIComponent(t), r = await C(`/venues/slug/${e}`);
|
|
745
|
+
return r.success ? r.data ?? null : (E.error(`Failed to fetch venue by slug: ${r.statusCode}`), null);
|
|
737
746
|
} catch (e) {
|
|
738
|
-
return
|
|
747
|
+
return E.error("Error fetching venue by slug:", e), null;
|
|
739
748
|
}
|
|
740
749
|
}
|
|
741
|
-
function
|
|
750
|
+
function We(t) {
|
|
742
751
|
const e = t ?? {}, r = (e.appliedAmount ?? 0) / 100, n = e.remainingTotal ?? 0, a = e.fullyCoveredByCard ?? n <= 0, s = !a;
|
|
743
752
|
return {
|
|
744
753
|
valid: !0,
|
|
@@ -751,15 +760,15 @@ function He(t) {
|
|
|
751
760
|
requiresStripe: s
|
|
752
761
|
};
|
|
753
762
|
}
|
|
754
|
-
const h =
|
|
755
|
-
async function
|
|
763
|
+
const h = $("VC"), Qe = "https://get-micdrop.com", Je = `${Qe}/api/orders/v2`, j = () => R();
|
|
764
|
+
async function Qt(t) {
|
|
756
765
|
try {
|
|
757
766
|
const e = await f(
|
|
758
|
-
`${
|
|
767
|
+
`${Je}/gift-cards`,
|
|
759
768
|
t
|
|
760
769
|
);
|
|
761
770
|
if (!e.success)
|
|
762
|
-
throw h.error("Gift card purchase creation failed:", e.error), new
|
|
771
|
+
throw h.error("Gift card purchase creation failed:", e.error), new N(
|
|
763
772
|
e.error || "Failed to create gift card purchase",
|
|
764
773
|
"lib/api/gift-cards/createGiftCardPurchase"
|
|
765
774
|
);
|
|
@@ -768,13 +777,13 @@ async function Bt(t) {
|
|
|
768
777
|
return h.error("Gift card purchase creation error:", e), null;
|
|
769
778
|
}
|
|
770
779
|
}
|
|
771
|
-
async function
|
|
780
|
+
async function Jt(t, e) {
|
|
772
781
|
try {
|
|
773
782
|
const r = await f(
|
|
774
|
-
`${
|
|
783
|
+
`${j()}/cart/${t}/apply-gift-card`,
|
|
775
784
|
{ giftCardCode: e }
|
|
776
785
|
);
|
|
777
|
-
return r.success ?
|
|
786
|
+
return r.success ? We(r.data) : r.statusCode === 429 ? {
|
|
778
787
|
valid: !1,
|
|
779
788
|
error: "Too many attempts. Please wait a moment and try again."
|
|
780
789
|
} : (h.error("Apply gift card failed:", r.error), {
|
|
@@ -788,10 +797,10 @@ async function Ht(t, e) {
|
|
|
788
797
|
};
|
|
789
798
|
}
|
|
790
799
|
}
|
|
791
|
-
async function
|
|
800
|
+
async function Yt(t, e) {
|
|
792
801
|
try {
|
|
793
|
-
const r = await
|
|
794
|
-
`${
|
|
802
|
+
const r = await ve(
|
|
803
|
+
`${j()}/cart/${t}/gift-card`,
|
|
795
804
|
e ? { body: JSON.stringify({ giftCardCode: e }) } : void 0
|
|
796
805
|
);
|
|
797
806
|
return r.success ? { success: !0 } : (h.error("Remove gift card failed:", r.error), {
|
|
@@ -805,9 +814,9 @@ async function Wt(t, e) {
|
|
|
805
814
|
};
|
|
806
815
|
}
|
|
807
816
|
}
|
|
808
|
-
async function
|
|
817
|
+
async function Kt(t, e) {
|
|
809
818
|
try {
|
|
810
|
-
const r = await f(`${
|
|
819
|
+
const r = await f(`${j()}/cart/${t}/complete-gift-card-payment`, {
|
|
811
820
|
firstName: e.firstName,
|
|
812
821
|
lastName: e.lastName,
|
|
813
822
|
email: e.email,
|
|
@@ -832,14 +841,14 @@ async function Qt(t, e) {
|
|
|
832
841
|
};
|
|
833
842
|
}
|
|
834
843
|
}
|
|
835
|
-
const
|
|
844
|
+
const M = $("VC"), Ye = {
|
|
836
845
|
waitlist_not_enabled: "Waitlist is not available for this event",
|
|
837
846
|
event_not_found: "Event not found",
|
|
838
847
|
invalid_phone: "Please enter a valid phone number",
|
|
839
848
|
already_purchased: "You have already purchased tickets for this event",
|
|
840
849
|
phone_already_registered: "This phone number is already on the waitlist"
|
|
841
850
|
};
|
|
842
|
-
async function
|
|
851
|
+
async function Zt(t, e, r = null, n = !1) {
|
|
843
852
|
try {
|
|
844
853
|
const a = { email: e };
|
|
845
854
|
r && n && (a.phone = r, a.smsOptIn = !0);
|
|
@@ -850,25 +859,25 @@ async function Jt(t, e, r = null, n = !1) {
|
|
|
850
859
|
return s.success ? {
|
|
851
860
|
success: !0,
|
|
852
861
|
updated: s.data?.updated
|
|
853
|
-
} : (
|
|
862
|
+
} : (M.error("Join waitlist failed:", s.error), {
|
|
854
863
|
success: !1,
|
|
855
|
-
error:
|
|
864
|
+
error: Ye[s.error ?? ""] || "Failed to join waitlist. Please try again."
|
|
856
865
|
});
|
|
857
866
|
} catch (a) {
|
|
858
|
-
return
|
|
867
|
+
return M.error("joinWaitlist error:", a), {
|
|
859
868
|
success: !1,
|
|
860
869
|
error: "Network error. Please check your connection and try again."
|
|
861
870
|
};
|
|
862
871
|
}
|
|
863
872
|
}
|
|
864
|
-
async function
|
|
873
|
+
async function Xt(t) {
|
|
865
874
|
const e = {
|
|
866
875
|
waitlistEnabled: !1,
|
|
867
876
|
soldOut: !1,
|
|
868
877
|
gated: !1
|
|
869
878
|
};
|
|
870
879
|
try {
|
|
871
|
-
const r = await
|
|
880
|
+
const r = await C(
|
|
872
881
|
`/events/${t}/waitlist/status`
|
|
873
882
|
);
|
|
874
883
|
return r.success ? {
|
|
@@ -877,10 +886,10 @@ async function Yt(t) {
|
|
|
877
886
|
gated: !!r.data?.gated
|
|
878
887
|
} : e;
|
|
879
888
|
} catch (r) {
|
|
880
|
-
return
|
|
889
|
+
return M.error("getWaitlistStatus error:", r), e;
|
|
881
890
|
}
|
|
882
891
|
}
|
|
883
|
-
function
|
|
892
|
+
function er(t, e, r = {}) {
|
|
884
893
|
const {
|
|
885
894
|
cancelled: n = !1,
|
|
886
895
|
isRegistration: a = !1,
|
|
@@ -891,10 +900,10 @@ function Kt(t, e, r = {}) {
|
|
|
891
900
|
const i = t.endDateTime || t.startDateTime;
|
|
892
901
|
if (i && new Date(i) < o)
|
|
893
902
|
return { text: "Sales ended", disabled: !0, reason: "event_past" };
|
|
894
|
-
const u = t?.hasPurchasableHiddenTickets === !0 || Array.isArray(e) && e.some(
|
|
903
|
+
const u = t?.hasPurchasableHiddenTickets === !0 || Array.isArray(e) && e.some(pe), T = (e || []).filter(
|
|
895
904
|
(l) => l.salesChannel !== 2 && !l.isHidden && !(typeof l.visibility == "number" && l.visibility >= 2)
|
|
896
905
|
);
|
|
897
|
-
if (
|
|
906
|
+
if (T.length === 0)
|
|
898
907
|
return u ? {
|
|
899
908
|
text: a ? "Reserve a spot" : "Get tickets",
|
|
900
909
|
disabled: !1,
|
|
@@ -905,11 +914,11 @@ function Kt(t, e, r = {}) {
|
|
|
905
914
|
reason: "no_tickets"
|
|
906
915
|
};
|
|
907
916
|
let y = !1, k = !0, g = !0, v = null;
|
|
908
|
-
for (const l of
|
|
909
|
-
const
|
|
910
|
-
if (!
|
|
911
|
-
const
|
|
912
|
-
(!v ||
|
|
917
|
+
for (const l of T) {
|
|
918
|
+
const P = l.salesBegin || l.salesStart || l.saleBegin || l.onSaleStart, x = l.salesEnd || l.saleEnd || l.onSaleEnd, S = l.remainingCapacity ?? l.quantityRemaining ?? l.quantity, _ = l.soldOut || S != null && S <= 0, I = P ? new Date(P) > o : !1, z = x ? new Date(x) < o : !1;
|
|
919
|
+
if (!_ && !I && !z && (y = !0), _ || (k = !1), I || (g = !1), I && P && !_ && !z) {
|
|
920
|
+
const B = new Date(P);
|
|
921
|
+
(!v || B < v) && (v = B);
|
|
913
922
|
}
|
|
914
923
|
}
|
|
915
924
|
if (y)
|
|
@@ -925,25 +934,21 @@ function Kt(t, e, r = {}) {
|
|
|
925
934
|
disabled: !1,
|
|
926
935
|
reason: "hidden_only"
|
|
927
936
|
};
|
|
928
|
-
const l = v.getTime() - o.getTime(),
|
|
937
|
+
const l = v.getTime() - o.getTime(), P = l / (1e3 * 60 * 60), x = l / (1e3 * 60 * 60 * 24), S = (I) => L(
|
|
938
|
+
I,
|
|
939
|
+
{ hour: "numeric", minute: "2-digit", hour12: !0 },
|
|
940
|
+
"en-US"
|
|
941
|
+
);
|
|
929
942
|
let _;
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
const A = H(
|
|
940
|
-
v,
|
|
941
|
-
{ month: "short", day: "numeric" },
|
|
942
|
-
"en-US"
|
|
943
|
-
), D = B(v, { hour12: !0 }, "en-US");
|
|
944
|
-
_ = `${A} ${D}`;
|
|
945
|
-
}
|
|
946
|
-
return {
|
|
943
|
+
return P < 24 ? _ = S(v) : x <= 7 ? _ = L(
|
|
944
|
+
v,
|
|
945
|
+
{ weekday: "short", hour: "numeric", minute: "2-digit", hour12: !0 },
|
|
946
|
+
"en-US"
|
|
947
|
+
) : _ = `${L(
|
|
948
|
+
v,
|
|
949
|
+
{ month: "short", day: "numeric" },
|
|
950
|
+
"en-US"
|
|
951
|
+
)} ${S(v)}`, {
|
|
947
952
|
text: `On sale ${_}`,
|
|
948
953
|
disabled: !0,
|
|
949
954
|
reason: "coming_soon"
|
|
@@ -963,7 +968,7 @@ function Kt(t, e, r = {}) {
|
|
|
963
968
|
reason: "hidden_only"
|
|
964
969
|
} : { text: "Sales ended", disabled: !0, reason: "sales_ended" };
|
|
965
970
|
}
|
|
966
|
-
function
|
|
971
|
+
function se(t) {
|
|
967
972
|
const e = t;
|
|
968
973
|
return {
|
|
969
974
|
uuid: e.uuid || String(e.id || e.ID || ""),
|
|
@@ -981,7 +986,7 @@ function ae(t) {
|
|
|
981
986
|
checkedInAt: e.checkedInAt || e.checked_in_at
|
|
982
987
|
};
|
|
983
988
|
}
|
|
984
|
-
function
|
|
989
|
+
function oe(t) {
|
|
985
990
|
const e = t, r = e.purchasedTickets || e.tickets || e.purchased_tickets || [];
|
|
986
991
|
return {
|
|
987
992
|
uuid: e.uuid || String(e.id || e.ID || ""),
|
|
@@ -997,21 +1002,21 @@ function se(t) {
|
|
|
997
1002
|
discount: e.discount || 0,
|
|
998
1003
|
paymentIntentId: e.paymentIntentId || e.payment_intent_id,
|
|
999
1004
|
paymentMethod: e.paymentMethod || e.payment_method,
|
|
1000
|
-
purchasedTickets: r.map(
|
|
1005
|
+
purchasedTickets: r.map(se),
|
|
1001
1006
|
createdAt: e.createdAt || e.created_at,
|
|
1002
1007
|
updatedAt: e.updatedAt || e.updated_at
|
|
1003
1008
|
};
|
|
1004
1009
|
}
|
|
1005
|
-
const
|
|
1006
|
-
function
|
|
1007
|
-
const e =
|
|
1010
|
+
const tr = se, rr = oe;
|
|
1011
|
+
function nr(t) {
|
|
1012
|
+
const e = oe(t), r = e.uuid.split("-")[0] || e.uuid;
|
|
1008
1013
|
return {
|
|
1009
1014
|
orderId: e.uuid,
|
|
1010
1015
|
displayOrderId: r,
|
|
1011
1016
|
email: e.customerEmail,
|
|
1012
1017
|
customerName: [e.customerFirstName, e.customerLastName].filter(Boolean).join(" "),
|
|
1013
1018
|
total: e.totalAmount,
|
|
1014
|
-
formattedTotal: `${
|
|
1019
|
+
formattedTotal: `${me(
|
|
1015
1020
|
e.totalAmount / 100
|
|
1016
1021
|
/* FIXME(canonical-cleanup:toFixed): this cast bypasses the brand boundary; replace with toCents/toUSD at the API-response-transform layer. */
|
|
1017
1022
|
)}`,
|
|
@@ -1019,14 +1024,14 @@ function er(t) {
|
|
|
1019
1024
|
status: e.status
|
|
1020
1025
|
};
|
|
1021
1026
|
}
|
|
1022
|
-
function
|
|
1027
|
+
function Ke(t) {
|
|
1023
1028
|
return K(t, { cdn: !0 });
|
|
1024
1029
|
}
|
|
1025
1030
|
function J(t) {
|
|
1026
1031
|
const e = t.imageUrl || t.imageURL || t.image_url || t.image || "";
|
|
1027
|
-
return
|
|
1032
|
+
return Ke(e);
|
|
1028
1033
|
}
|
|
1029
|
-
function
|
|
1034
|
+
function Ze(t) {
|
|
1030
1035
|
switch (t) {
|
|
1031
1036
|
case "available":
|
|
1032
1037
|
case "sold_out":
|
|
@@ -1037,10 +1042,10 @@ function Ke(t) {
|
|
|
1037
1042
|
return null;
|
|
1038
1043
|
}
|
|
1039
1044
|
}
|
|
1040
|
-
function
|
|
1045
|
+
function Xe(t) {
|
|
1041
1046
|
const e = t.ctaState || t.cta_state;
|
|
1042
1047
|
if (e) {
|
|
1043
|
-
const o =
|
|
1048
|
+
const o = Ze(e);
|
|
1044
1049
|
if (o)
|
|
1045
1050
|
return o;
|
|
1046
1051
|
}
|
|
@@ -1057,11 +1062,11 @@ function Ze(t) {
|
|
|
1057
1062
|
return n <= 0 ? "sold_out" : "available";
|
|
1058
1063
|
const a = t.availableTickets || t.available_tickets || t.tickets || [];
|
|
1059
1064
|
return a.length === 0 ? "coming_soon" : a.reduce((o, i) => {
|
|
1060
|
-
const u = i.quantityAvailable ?? i.quantity_available ?? i.quantity ?? 0,
|
|
1061
|
-
return o + Math.max(0, u -
|
|
1065
|
+
const u = i.quantityAvailable ?? i.quantity_available ?? i.quantity ?? 0, T = i.quantitySold ?? i.quantity_sold ?? 0;
|
|
1066
|
+
return o + Math.max(0, u - T);
|
|
1062
1067
|
}, 0) <= 0 ? "sold_out" : "available";
|
|
1063
1068
|
}
|
|
1064
|
-
function
|
|
1069
|
+
function ie(t) {
|
|
1065
1070
|
const e = t;
|
|
1066
1071
|
return {
|
|
1067
1072
|
id: e.id || e.ID,
|
|
@@ -1082,8 +1087,8 @@ function oe(t) {
|
|
|
1082
1087
|
sortOrder: e.sortOrder || e.sort_order || 0
|
|
1083
1088
|
};
|
|
1084
1089
|
}
|
|
1085
|
-
function
|
|
1086
|
-
const e = t, n = (e.availableTickets || e.available_tickets || e.tickets || []).map(
|
|
1090
|
+
function ce(t) {
|
|
1091
|
+
const e = t, n = (e.availableTickets || e.available_tickets || e.tickets || []).map(ie), 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;
|
|
1087
1092
|
return {
|
|
1088
1093
|
eventID: e.eventID || e.id || e.ID || 0,
|
|
1089
1094
|
id: e.id || e.ID,
|
|
@@ -1111,7 +1116,7 @@ function ie(t) {
|
|
|
1111
1116
|
minPrice: e.minPrice ?? e.min_price ?? s,
|
|
1112
1117
|
maxPrice: e.maxPrice ?? e.max_price ?? o,
|
|
1113
1118
|
ctaText: e.ctaText || e.cta_text,
|
|
1114
|
-
ctaState:
|
|
1119
|
+
ctaState: Xe(e),
|
|
1115
1120
|
showPerformers: e.showPerformers ?? e.show_performers,
|
|
1116
1121
|
eventSeriesId: e.eventSeriesId || e.event_series_id,
|
|
1117
1122
|
seriesInstanceNumber: e.seriesInstanceNumber || e.series_instance_number,
|
|
@@ -1145,11 +1150,11 @@ function ie(t) {
|
|
|
1145
1150
|
purchasedTickets: e.purchasedTickets
|
|
1146
1151
|
};
|
|
1147
1152
|
}
|
|
1148
|
-
const
|
|
1149
|
-
function
|
|
1153
|
+
const ar = ie, sr = ce, or = ce;
|
|
1154
|
+
function et(t) {
|
|
1150
1155
|
return K(t, { cdn: !0 });
|
|
1151
1156
|
}
|
|
1152
|
-
function
|
|
1157
|
+
function tt(t) {
|
|
1153
1158
|
const e = t, r = e.logoUrl || e.logo_url || e.logo;
|
|
1154
1159
|
return {
|
|
1155
1160
|
id: e.id || e.ID || 0,
|
|
@@ -1162,15 +1167,15 @@ function et(t) {
|
|
|
1162
1167
|
zipCode: e.zipCode || e.zip_code,
|
|
1163
1168
|
country: e.country,
|
|
1164
1169
|
timezone: e.timezone || e.time_zone,
|
|
1165
|
-
logoUrl:
|
|
1170
|
+
logoUrl: et(r),
|
|
1166
1171
|
serviceFeePercentage: e.serviceFeePercentage ?? e.service_fee_percentage ?? 0,
|
|
1167
1172
|
serviceFeeCents: e.serviceFeeCents ?? e.service_fee_cents ?? 0,
|
|
1168
1173
|
taxPercentage: e.taxPercentage ?? e.tax_percentage ?? 0,
|
|
1169
1174
|
organizationId: e.organizationId || e.organization_id
|
|
1170
1175
|
};
|
|
1171
1176
|
}
|
|
1172
|
-
const
|
|
1173
|
-
function
|
|
1177
|
+
const ir = tt;
|
|
1178
|
+
function cr(t) {
|
|
1174
1179
|
const e = t;
|
|
1175
1180
|
return {
|
|
1176
1181
|
serviceFeePercentage: e.serviceFeePercentage ?? e.service_fee_percentage ?? 0,
|
|
@@ -1178,86 +1183,89 @@ function sr(t) {
|
|
|
1178
1183
|
taxPercentage: e.taxPercentage ?? e.tax_percentage ?? 0
|
|
1179
1184
|
};
|
|
1180
1185
|
}
|
|
1181
|
-
function
|
|
1186
|
+
function ur(t) {
|
|
1182
1187
|
return [t.address, t.city, t.state, t.zipCode].filter(
|
|
1183
1188
|
Boolean
|
|
1184
1189
|
).join(", ");
|
|
1185
1190
|
}
|
|
1186
1191
|
export {
|
|
1187
|
-
|
|
1188
|
-
|
|
1192
|
+
ve as apiDelete,
|
|
1193
|
+
C as apiGet,
|
|
1189
1194
|
f as apiPost,
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1195
|
+
ft as apiPut,
|
|
1196
|
+
Jt as applyGiftCard,
|
|
1197
|
+
St as applyPromoCode,
|
|
1198
|
+
Xe as calculateCtaState,
|
|
1199
|
+
vt as cancelReservation,
|
|
1200
|
+
jt as checkCollectionPassword,
|
|
1201
|
+
zt as checkEventPassword,
|
|
1202
|
+
Kt as completeGiftCardPayment,
|
|
1203
|
+
gt as completeReservation,
|
|
1204
|
+
er as computeCtaState,
|
|
1205
|
+
ct as configureApi,
|
|
1206
|
+
Qt as createGiftCardPurchase,
|
|
1207
|
+
ht as createOrder,
|
|
1208
|
+
mt as createPaymentIntent,
|
|
1209
|
+
b as err,
|
|
1210
|
+
Q as errNotFound,
|
|
1211
|
+
kt as extendCheckoutSession,
|
|
1212
|
+
cr as extractVenueFees,
|
|
1213
|
+
Ut as fetchAllVenues,
|
|
1208
1214
|
qe as fetchAllVenuesResult,
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1215
|
+
At as fetchEventDetails,
|
|
1216
|
+
Fe as fetchEventDetailsResult,
|
|
1217
|
+
Nt as fetchEventPerformers,
|
|
1218
|
+
Le as fetchEventPerformersResult,
|
|
1219
|
+
Dt as fetchEventTickets,
|
|
1220
|
+
Ve as fetchEventTicketsResult,
|
|
1221
|
+
Gt as fetchPublicCollection,
|
|
1222
|
+
Lt as fetchSeriesOccurrences,
|
|
1223
|
+
Be as fetchSeriesOccurrencesResult,
|
|
1224
|
+
Mt as fetchSeriesPage,
|
|
1225
|
+
xt as fetchVenueEvents,
|
|
1226
|
+
Me as fetchVenueEventsResult,
|
|
1227
|
+
ur as formatVenueAddress,
|
|
1228
|
+
ut as getApiConfig,
|
|
1229
|
+
Ke as getCDNImageUrl,
|
|
1230
|
+
pt as getCartByUUID,
|
|
1231
|
+
dt as getClientIP,
|
|
1225
1232
|
J as getEventImageUrl,
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
+
lt as getLegacyPublicUrl,
|
|
1234
|
+
Ot as getMonthEvents,
|
|
1235
|
+
Ge as getMonthEventsResult,
|
|
1236
|
+
_t as getOrder,
|
|
1237
|
+
R as getOrdersV2Url,
|
|
1238
|
+
Ft as getOrgMonthEvents,
|
|
1239
|
+
je as getOrgMonthEventsResult,
|
|
1233
1240
|
c as getPublicBaseUrl,
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1241
|
+
Vt as getSeriesOccurrences,
|
|
1242
|
+
ze as getSeriesOccurrencesResult,
|
|
1243
|
+
bt as getSessionStatus,
|
|
1244
|
+
He as getVenue,
|
|
1245
|
+
Wt as getVenueBySlug,
|
|
1246
|
+
Ht as getVenueFees,
|
|
1247
|
+
Xt as getWaitlistStatus,
|
|
1248
|
+
Pt as hasPromoCodes,
|
|
1249
|
+
$t as initiateOrder,
|
|
1250
|
+
Rt as isErr,
|
|
1251
|
+
Et as isOk,
|
|
1252
|
+
Zt as joinWaitlist,
|
|
1253
|
+
ne as ok,
|
|
1254
|
+
Yt as removeGiftCard,
|
|
1255
|
+
It as removePromoCode,
|
|
1256
|
+
qt as resolvePublicEntity,
|
|
1257
|
+
Bt as testNetworkConnection,
|
|
1258
|
+
Ct as trackUTMSource,
|
|
1259
|
+
ar as transformAvailableTicket,
|
|
1260
|
+
sr as transformEvent,
|
|
1261
|
+
or as transformEventData,
|
|
1262
|
+
rr as transformOrder,
|
|
1263
|
+
nr as transformOrderForDisplay,
|
|
1264
|
+
tr as transformTicket,
|
|
1265
|
+
ir as transformVenue,
|
|
1266
|
+
D as unwrapOr,
|
|
1267
|
+
yt as updateCartQuantities,
|
|
1268
|
+
wt as validatePaymentIntent,
|
|
1269
|
+
Tt as validatePromoCode
|
|
1262
1270
|
};
|
|
1263
1271
|
//# sourceMappingURL=api.mjs.map
|