@getmicdrop/venue-calendar 4.0.94 → 4.0.96

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