@getmicdrop/venue-calendar 4.0.108 → 4.0.110

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 (98) hide show
  1. package/README.md +740 -740
  2. package/dist/CartView-bMHSoj75.js +2475 -0
  3. package/dist/CartView-bMHSoj75.js.map +1 -0
  4. package/dist/{Checkout-C4zUFYYG.js → Checkout-DDXZc-yj.js} +266 -276
  5. package/dist/Checkout-DDXZc-yj.js.map +1 -0
  6. package/dist/{Checkout-CACB_Qvi.js → Checkout-DG2iHmHC.js} +215 -214
  7. package/dist/Checkout-DG2iHmHC.js.map +1 -0
  8. package/dist/{CheckoutTimer-D5llSBPs.js → CheckoutTimer-Bwq6a_Hl.js} +5 -5
  9. package/dist/CheckoutTimer-Bwq6a_Hl.js.map +1 -0
  10. package/dist/{ClockIcon-BJnxLZ4f.js → ClockIcon-ZgeMNNI1.js} +2 -2
  11. package/dist/ClockIcon-ZgeMNNI1.js.map +1 -0
  12. package/dist/{CollectionView-BLpwWRcN.js → CollectionView-1pf2C4kX.js} +85 -84
  13. package/dist/CollectionView-1pf2C4kX.js.map +1 -0
  14. package/dist/{Event-DXp4Ypv4.js → Event-D3o0fguY.js} +1693 -1611
  15. package/dist/Event-D3o0fguY.js.map +1 -0
  16. package/dist/EventPage-DqO-AV8i.js +995 -0
  17. package/dist/EventPage-DqO-AV8i.js.map +1 -0
  18. package/dist/{Heading-C_Pc_j8f.js → Heading-pURRwiIC.js} +5 -5
  19. package/dist/Heading-pURRwiIC.js.map +1 -0
  20. package/dist/{ScarcityBadge-CSi-i0-w.js → ScarcityBadge-ykz32KS9.js} +25 -25
  21. package/dist/ScarcityBadge-ykz32KS9.js.map +1 -0
  22. package/dist/SeriesPage-BmNk80cF.js +34 -0
  23. package/dist/SeriesPage-BmNk80cF.js.map +1 -0
  24. package/dist/{Spinner-BFIjCOTb.js → Spinner-OGA1hrc5.js} +2 -2
  25. package/dist/Spinner-OGA1hrc5.js.map +1 -0
  26. package/dist/Success-DLlQ54_-.js +896 -0
  27. package/dist/Success-DLlQ54_-.js.map +1 -0
  28. package/dist/{Text-tWGKQJab.js → Text-DMpMLgcU.js} +27 -27
  29. package/dist/Text-DMpMLgcU.js.map +1 -0
  30. package/dist/{VenueCalendar-Dhoi9hF5.js → VenueCalendar-ClSRsS6u.js} +8133 -8270
  31. package/dist/VenueCalendar-ClSRsS6u.js.map +1 -0
  32. package/dist/{ViewTicketsEmbed-BrXae6cK.js → ViewTicketsEmbed-5LMG2xwn.js} +151 -150
  33. package/dist/ViewTicketsEmbed-5LMG2xwn.js.map +1 -0
  34. package/dist/__SKIP_PATHS__-BtJ0tS93.js +10 -0
  35. package/dist/__SKIP_PATHS__-BtJ0tS93.js.map +1 -0
  36. package/dist/api/api/events.d.ts +28 -12
  37. package/dist/api/api/index.d.ts +1 -1
  38. package/dist/api/api/route-manifest.d.ts +179 -0
  39. package/dist/api/api.cjs +1 -1
  40. package/dist/api/api.cjs.map +1 -1
  41. package/dist/api/api.mjs +388 -385
  42. package/dist/api/api.mjs.map +1 -1
  43. package/dist/api/types.d.ts +483 -483
  44. package/dist/{labels-CGndTgO9.js → labels-Ws4MJjH5.js} +141 -136
  45. package/dist/labels-Ws4MJjH5.js.map +1 -0
  46. package/dist/{modalManager.svelte-BgW5Xd6y.js → modalManager.svelte-BPA2JF6c.js} +2 -2
  47. package/dist/modalManager.svelte-BPA2JF6c.js.map +1 -0
  48. package/dist/navigation--gZASiSa.js +19 -0
  49. package/dist/navigation--gZASiSa.js.map +1 -0
  50. package/dist/promo-vXx1bxQm.js +29 -0
  51. package/dist/promo-vXx1bxQm.js.map +1 -0
  52. package/dist/seo/helpers.d.ts +11 -0
  53. package/dist/seo/seo.cjs +1 -1
  54. package/dist/seo/seo.cjs.map +1 -1
  55. package/dist/seo/seo.mjs +463 -325
  56. package/dist/seo/seo.mjs.map +1 -1
  57. package/dist/seo/types.d.ts +0 -1
  58. package/dist/{showcase-state-options-BxLP2R1L.js → showcase-state-options-9SoS5WuT.js} +21 -21
  59. package/dist/showcase-state-options-9SoS5WuT.js.map +1 -0
  60. package/dist/{transform-CVOgA-Ky.js → transform-BD9xXAq7.js} +83 -79
  61. package/dist/transform-BD9xXAq7.js.map +1 -0
  62. package/dist/types/index.d.ts +459 -455
  63. package/dist/utm-rT0TPh8G.js +288 -0
  64. package/dist/utm-rT0TPh8G.js.map +1 -0
  65. package/dist/venue-calendar.css +1 -1
  66. package/dist/venue-calendar.es.js +4 -4
  67. package/dist/venue-calendar.iife.js +49 -49
  68. package/dist/venue-calendar.iife.js.map +1 -1
  69. package/dist/venue-calendar.umd.js +44 -44
  70. package/dist/venue-calendar.umd.js.map +1 -1
  71. package/package.json +199 -195
  72. package/src/lib/theme.js +222 -222
  73. package/dist/CartView-eQNOdQSz.js +0 -2354
  74. package/dist/CartView-eQNOdQSz.js.map +0 -1
  75. package/dist/Checkout-C4zUFYYG.js.map +0 -1
  76. package/dist/Checkout-CACB_Qvi.js.map +0 -1
  77. package/dist/CheckoutTimer-D5llSBPs.js.map +0 -1
  78. package/dist/ClockIcon-BJnxLZ4f.js.map +0 -1
  79. package/dist/CollectionView-BLpwWRcN.js.map +0 -1
  80. package/dist/Event-DXp4Ypv4.js.map +0 -1
  81. package/dist/EventPage-Dfxyzfg2.js +0 -949
  82. package/dist/EventPage-Dfxyzfg2.js.map +0 -1
  83. package/dist/Heading-C_Pc_j8f.js.map +0 -1
  84. package/dist/ScarcityBadge-CSi-i0-w.js.map +0 -1
  85. package/dist/SeriesPage-bPZlyzQ6.js +0 -33
  86. package/dist/SeriesPage-bPZlyzQ6.js.map +0 -1
  87. package/dist/Spinner-BFIjCOTb.js.map +0 -1
  88. package/dist/Success-Cv8d2syu.js +0 -886
  89. package/dist/Success-Cv8d2syu.js.map +0 -1
  90. package/dist/Text-tWGKQJab.js.map +0 -1
  91. package/dist/VenueCalendar-Dhoi9hF5.js.map +0 -1
  92. package/dist/ViewTicketsEmbed-BrXae6cK.js.map +0 -1
  93. package/dist/labels-CGndTgO9.js.map +0 -1
  94. package/dist/modalManager.svelte-BgW5Xd6y.js.map +0 -1
  95. package/dist/promo-WWbp2OWI.js +0 -12
  96. package/dist/promo-WWbp2OWI.js.map +0 -1
  97. package/dist/showcase-state-options-BxLP2R1L.js.map +0 -1
  98. package/dist/transform-CVOgA-Ky.js.map +0 -1
package/dist/api/api.mjs CHANGED
@@ -1,43 +1,52 @@
1
- import { createLogger as C } from "@getmicdrop/svelte-components/utils/logger";
2
- import { ApiError as K, NotFoundError as M } from "@getmicdrop/svelte-components/errors";
3
- import { getLocalStorage as de, setLocalStorage as fe, getSessionStorage as Z, setSessionStorage as me, createLogger as pe, formatFullName as ye, formatCurrency as ge, asUSD as ve, resolveImageUrl as X } from "@getmicdrop/svelte-components";
4
- import { formatLocal as L } from "@getmicdrop/svelte-components/datetime";
5
- import { isHiddenTicketPurchasable as he } from "@getmicdrop/svelte-components/transforms";
1
+ import { createLogger as T } from "@getmicdrop/svelte-components/utils/logger";
2
+ import { ApiError as Q, NotFoundError as Y } from "@getmicdrop/svelte-components/errors";
3
+ import { getLocalStorage as fe, setLocalStorage as me, getSessionStorage as X, setSessionStorage as pe, createLogger as ye, formatFullName as ge, formatCurrency as ve, asUSD as he, resolveImageUrl as Z } from "@getmicdrop/svelte-components";
4
+ import { browserNow as _e, toInstantOrNull as F, compareInstants as U, formatLocal as M } from "@getmicdrop/svelte-components/datetime";
5
+ import { isHiddenTicketPurchasable as we } from "@getmicdrop/svelte-components/transforms";
6
6
  import "@getmicdrop/svelte-components/utils/timezones";
7
- const q = C("VC"), _e = {
7
+ const ke = {};
8
+ function be() {
9
+ typeof import.meta < "u" && ke?.VITE_WIDGET_KEY;
10
+ }
11
+ const G = T("VC");
12
+ function ee(t) {
13
+ const e = be();
14
+ return e ? { ...t, "X-Widget-Key": e } : t;
15
+ }
16
+ const $e = {
8
17
  baseUrl: "https://get-micdrop.com",
9
18
  timeout: 3e4,
10
19
  retries: 2,
11
20
  retryDelay: 500,
12
- onError: (t) => q.error("API Error:", t)
21
+ onError: (t) => G.error("API Error:", t)
13
22
  };
14
- let p = { ..._e };
15
- function ft(t) {
23
+ let p = { ...$e };
24
+ function gt(t) {
16
25
  p = { ...p, ...t };
17
26
  }
18
- function mt() {
27
+ function vt() {
19
28
  return { ...p };
20
29
  }
21
30
  function c() {
22
31
  return `${p.baseUrl}/api/v2/public`;
23
32
  }
24
- function pt() {
33
+ function ht() {
25
34
  return `${p.baseUrl}/api/public`;
26
35
  }
27
- function $() {
36
+ function _() {
28
37
  return `${p.baseUrl}/api/orders/v2/public`;
29
38
  }
30
- async function yt() {
39
+ async function _t() {
31
40
  return "";
32
41
  }
33
- const we = (t) => new Promise((e) => setTimeout(e, t));
34
- async function ee(t, e, r) {
42
+ const Ce = (t) => new Promise((e) => setTimeout(e, t));
43
+ async function te(t, e, r) {
35
44
  const n = (e.method || "GET").toUpperCase(), s = n === "GET" || n === "HEAD" ? r.retries + 1 : 1;
36
45
  let o;
37
46
  for (let i = 1; i <= s; i++) {
38
- const u = new AbortController(), P = setTimeout(() => u.abort(), r.timeout), y = e.signal;
39
- let k;
40
- y && (y.aborted ? u.abort() : (k = () => u.abort(), y.addEventListener("abort", k, { once: !0 })));
47
+ const u = new AbortController(), I = setTimeout(() => u.abort(), r.timeout), y = e.signal;
48
+ let b;
49
+ y && (y.aborted ? u.abort() : (b = () => u.abort(), y.addEventListener("abort", b, { once: !0 })));
41
50
  try {
42
51
  const g = await fetch(t, { ...e, signal: u.signal });
43
52
  if (g.status >= 500 && i < s)
@@ -47,35 +56,35 @@ async function ee(t, e, r) {
47
56
  } catch (g) {
48
57
  if (o = g, y?.aborted) throw g;
49
58
  } finally {
50
- clearTimeout(P), y && k && y.removeEventListener("abort", k);
59
+ clearTimeout(I), y && b && y.removeEventListener("abort", b);
51
60
  }
52
- i < s && await we(r.retryDelay * Math.pow(2, i - 1));
61
+ i < s && await Ce(r.retryDelay * Math.pow(2, i - 1));
53
62
  }
54
63
  throw o;
55
64
  }
56
- async function T(t, e) {
57
- return F("GET", t, void 0, e);
65
+ async function S(t, e) {
66
+ return q("GET", t, void 0, e);
58
67
  }
59
68
  async function f(t, e, r) {
60
- return F("POST", t, e, r);
69
+ return q("POST", t, e, r);
61
70
  }
62
- async function gt(t, e, r) {
63
- return F("PUT", t, e, r);
71
+ async function wt(t, e, r) {
72
+ return q("PUT", t, e, r);
64
73
  }
65
- async function ke(t, e) {
66
- return F("DELETE", t, void 0, e);
74
+ async function Te(t, e) {
75
+ return q("DELETE", t, void 0, e);
67
76
  }
68
- async function F(t, e, r, n) {
77
+ async function q(t, e, r, n) {
69
78
  const a = e.startsWith("http") ? e : `${c()}${e}`;
70
79
  try {
71
- const s = await ee(
80
+ const s = await te(
72
81
  a,
73
82
  {
74
83
  method: t,
75
- headers: {
84
+ headers: ee({
76
85
  "Content-Type": "application/json",
77
86
  ...n?.headers
78
- },
87
+ }),
79
88
  body: r !== void 0 ? JSON.stringify(r) : void 0,
80
89
  credentials: "include",
81
90
  ...n
@@ -94,23 +103,27 @@ async function F(t, e, r, n) {
94
103
  ), { success: !1, error: o };
95
104
  }
96
105
  }
97
- async function S(t, e) {
106
+ async function A(t, e) {
98
107
  try {
99
- const r = await ee(
108
+ const r = t.startsWith(p.baseUrl), n = await te(
100
109
  t,
101
- { credentials: "include", ...e },
110
+ {
111
+ credentials: "include",
112
+ ...e,
113
+ ...r ? { headers: ee(e?.headers) } : {}
114
+ },
102
115
  p
103
116
  );
104
- if (!r.ok) {
105
- const n = await r.json().catch(() => ({}));
106
- return q.error(`API request failed: ${r.status}`, n), null;
117
+ if (!n.ok) {
118
+ const a = await n.json().catch(() => ({}));
119
+ return G.error(`API request failed: ${n.status}`, a), null;
107
120
  }
108
- return r.json();
121
+ return n.json();
109
122
  } catch (r) {
110
- return q.error("API request error:", r), null;
123
+ return G.error("API request error:", r), null;
111
124
  }
112
125
  }
113
- function $e(t) {
126
+ function Se(t) {
114
127
  const e = t ?? {};
115
128
  return {
116
129
  ticketID: Number(e.TicketID ?? e.ticketID ?? 0),
@@ -121,39 +134,39 @@ function $e(t) {
121
134
  status: String(e.Status ?? e.status ?? "")
122
135
  };
123
136
  }
124
- function be(t) {
125
- 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);
137
+ function Ie(t) {
138
+ 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(Se);
126
139
  return { uuid: r, eventID: n, status: a, expiresAt: s, reservations: i };
127
140
  }
128
- const te = [
141
+ const re = [
129
142
  "utmSource",
130
143
  "utmMedium",
131
144
  "utmCampaign",
132
145
  "utmContent",
133
146
  "utmTerm"
134
- ], Ce = {
147
+ ], Pe = {
135
148
  utmSource: "utm_source",
136
149
  utmMedium: "utm_medium",
137
150
  utmCampaign: "utm_campaign",
138
151
  utmContent: "utm_content",
139
152
  utmTerm: "utm_term"
140
- }, re = "direct";
141
- function ne(t) {
153
+ }, ne = "direct";
154
+ function ae(t) {
142
155
  return t ? t.trim().toLowerCase().replace(/\s+/g, "_") : "";
143
156
  }
144
- function Te(t) {
157
+ function Ee(t) {
145
158
  const e = {};
146
- for (const r of te)
147
- e[r] = ne(t[r]);
148
- return e.utmSource || (e.utmSource = re), e;
159
+ for (const r of re)
160
+ e[r] = ae(t[r]);
161
+ return e.utmSource || (e.utmSource = ne), e;
149
162
  }
150
- function Se(t) {
163
+ function Ne(t) {
151
164
  const e = {};
152
- for (const r of te)
153
- e[r] = t.get(Ce[r]);
154
- return Te(e);
165
+ for (const r of re)
166
+ e[r] = t.get(Pe[r]);
167
+ return Ee(e);
155
168
  }
156
- function Pe() {
169
+ function Ae() {
157
170
  if (typeof window > "u") return !0;
158
171
  try {
159
172
  return window.self === window.top;
@@ -161,29 +174,29 @@ function Pe() {
161
174
  return !1;
162
175
  }
163
176
  }
164
- function Ie() {
165
- const t = typeof window < "u", e = Pe(), r = t ? window.location.search : "", n = (typeof document < "u" ? document.referrer : "") ?? "", a = t && e ? window.location.href : "";
177
+ function Re() {
178
+ const t = typeof window < "u", e = Ae(), r = t ? window.location.search : "", n = (typeof document < "u" ? document.referrer : "") ?? "", a = t && e ? window.location.href : "";
166
179
  return {
167
- utm: Se(new URLSearchParams(r)),
180
+ utm: Ne(new URLSearchParams(r)),
168
181
  referrer: n || "",
169
182
  pageUrl: a || ""
170
183
  };
171
184
  }
172
- let Ee = !1;
173
- function Re() {
185
+ let Ue = !1;
186
+ function xe() {
174
187
  return typeof window < "u" && typeof window.__tcfapi == "function";
175
188
  }
176
- function Ae() {
177
- return Re();
189
+ function De() {
190
+ return xe();
178
191
  }
179
- function Ne() {
180
- return Ae() ? Ee : !0;
192
+ function Oe() {
193
+ return De() ? Ue : !0;
181
194
  }
182
- const H = "micdrop_session_id", W = "micdrop_visitor_id", De = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
183
- function Ue(t) {
184
- return typeof t == "string" && De.test(t);
195
+ const z = "micdrop_session_id", B = "micdrop_visitor_id", Fe = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
196
+ function Ve(t) {
197
+ return typeof t == "string" && Fe.test(t);
185
198
  }
186
- function ae() {
199
+ function se() {
187
200
  const t = typeof crypto < "u" ? crypto : void 0;
188
201
  if (t?.randomUUID) return t.randomUUID();
189
202
  const e = new Uint8Array(16);
@@ -196,27 +209,27 @@ function ae() {
196
209
  for (let n = 0; n < 16; n++) r.push(e[n].toString(16).padStart(2, "0"));
197
210
  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]}`;
198
211
  }
199
- function xe() {
200
- let t = Z(H);
201
- return t || (t = ae(), me(H, t)), t;
212
+ function qe() {
213
+ let t = X(z);
214
+ return t || (t = se(), pe(z, t)), t;
202
215
  }
203
- function Oe() {
204
- if (!Ne()) return null;
205
- const t = de(W);
206
- if (Ue(t)) return t;
207
- const e = ae();
208
- return fe(W, e), e;
209
- }
210
- const Fe = "micdrop_attribution";
211
- function Ve() {
212
- const t = Z(Fe);
216
+ function Le() {
217
+ if (!Oe()) return null;
218
+ const t = fe(B);
219
+ if (Ve(t)) return t;
220
+ const e = se();
221
+ return me(B, e), e;
222
+ }
223
+ const Me = "micdrop_attribution";
224
+ function Ge() {
225
+ const t = X(Me);
213
226
  return !t || !t.utm || typeof t.utm.utmSource != "string" ? null : t;
214
227
  }
215
- function D() {
216
- const e = Ve() ?? Ie();
228
+ function x() {
229
+ const e = Ge() ?? Re();
217
230
  return {
218
- sessionId: xe(),
219
- visitorId: Oe(),
231
+ sessionId: qe(),
232
+ visitorId: Le(),
220
233
  utmSource: e.utm.utmSource,
221
234
  utmMedium: e.utm.utmMedium,
222
235
  utmCampaign: e.utm.utmCampaign,
@@ -225,27 +238,27 @@ function D() {
225
238
  referrer: e.referrer || ""
226
239
  };
227
240
  }
228
- pe("tracking");
229
- const d = C("VC");
230
- async function vt(t, e, r) {
241
+ ye("tracking");
242
+ const d = T("VC");
243
+ async function kt(t, e, r) {
231
244
  try {
232
245
  const n = await f(
233
- `${$()}/cart/${t}/payment-intent`,
246
+ `${_()}/cart/${t}/payment-intent`,
234
247
  {
235
248
  productQuantities: e,
236
249
  ...r && Object.keys(r).length > 0 ? { donationAmounts: r } : {},
237
250
  // Order attribution (MISSION-TRUTH C2) — additive; ignored by a backend
238
251
  // that hasn't shipped MIC-1255 yet. Free orders finalize via this
239
252
  // payment-intent pre-submit, so this covers the free-order path too.
240
- attribution: D()
253
+ attribution: x()
241
254
  }
242
255
  );
243
256
  if (!n.success)
244
- throw d.error("Payment intent creation failed:", n.error), new K(
257
+ throw d.error("Payment intent creation failed:", n.error), new Q(
245
258
  n.error || "Failed to create payment intent",
246
259
  n.statusCode ?? 0,
247
260
  {
248
- endpoint: `${$()}/cart/${t}/payment-intent`,
261
+ endpoint: `${_()}/cart/${t}/payment-intent`,
249
262
  method: "POST"
250
263
  }
251
264
  );
@@ -254,15 +267,15 @@ async function vt(t, e, r) {
254
267
  return d.error("createPaymentIntent error:", n), null;
255
268
  }
256
269
  }
257
- async function ht(t, e) {
270
+ async function bt(t, e) {
258
271
  if (!t) return null;
259
272
  try {
260
- const r = await T(
261
- `${$()}/cart/${t}`
273
+ const r = await S(
274
+ `${_()}/cart/${t}`
262
275
  );
263
276
  if (!r.success)
264
277
  return null;
265
- const { uuid: n, eventID: a, status: s, expiresAt: o, reservations: i } = be(
278
+ const { uuid: n, eventID: a, status: s, expiresAt: o, reservations: i } = Ie(
266
279
  r.data
267
280
  );
268
281
  return s !== "reserved" && s !== "active" || e !== void 0 && a !== Number(e) ? null : { uuid: n, eventID: a, status: s, expiresAt: o, reservations: i };
@@ -270,7 +283,7 @@ async function ht(t, e) {
270
283
  return d.error("getCartByUUID error:", r), null;
271
284
  }
272
285
  }
273
- async function _t(t, e, r) {
286
+ async function $t(t, e, r) {
274
287
  try {
275
288
  const n = {};
276
289
  for (const [o, i] of Object.entries(e)) {
@@ -283,7 +296,7 @@ async function _t(t, e, r) {
283
296
  const u = typeof o == "number" ? o : parseInt(o, 10);
284
297
  !Number.isNaN(u) && i > 0 && (a[u] = i);
285
298
  }
286
- const s = await fetch(`${$()}/cart/${t}`, {
299
+ const s = await fetch(`${_()}/cart/${t}`, {
287
300
  method: "PUT",
288
301
  headers: { "Content-Type": "application/json" },
289
302
  credentials: "include",
@@ -301,7 +314,7 @@ async function _t(t, e, r) {
301
314
  return d.error("updateCartQuantities error:", n), !1;
302
315
  }
303
316
  }
304
- async function wt(t) {
317
+ async function Ct(t) {
305
318
  try {
306
319
  const e = await f(
307
320
  `${c()}/orders/complete/${t}`
@@ -317,7 +330,7 @@ async function wt(t) {
317
330
  return d.error("Error completing reservation:", e), { success: !1, error: "Network error completing reservation" };
318
331
  }
319
332
  }
320
- async function kt(t) {
333
+ async function Tt(t) {
321
334
  try {
322
335
  const e = await f(
323
336
  `${c()}/orders/cancel/${t}`
@@ -333,26 +346,26 @@ async function kt(t) {
333
346
  return d.error("Error cancelling reservation:", e), { success: !1, error: "Network error cancelling reservation" };
334
347
  }
335
348
  }
336
- async function $t(t, e) {
349
+ async function St(t, e) {
337
350
  try {
338
351
  const r = await f(
339
352
  `${c()}/orders/create`,
340
353
  // attribution (MISSION-TRUTH C2) rides on cart-create additively.
341
- { eventID: t, promoCode: e, attribution: D() }
354
+ { eventID: t, promoCode: e, attribution: x() }
342
355
  );
343
356
  return r.success ? r.data : (d.error("Create order failed:", r.error), null);
344
357
  } catch (r) {
345
358
  return d.error("createOrder error:", r), null;
346
359
  }
347
360
  }
348
- async function bt(t) {
349
- return S(`${c()}/orders/${t}`);
361
+ async function It(t) {
362
+ return A(`${c()}/orders/${t}`);
350
363
  }
351
- async function Ct(t, e) {
364
+ async function Pt(t, e) {
352
365
  try {
353
- const r = await f(`${$()}/validatePaymentIntent/${t}`, {
366
+ const r = await f(`${_()}/validatePaymentIntent/${t}`, {
354
367
  ...e,
355
- attribution: D()
368
+ attribution: x()
356
369
  });
357
370
  if (!r.success)
358
371
  return d.error("Payment validation failed:", r.error), {
@@ -375,7 +388,7 @@ async function Ct(t, e) {
375
388
  return d.error("validatePaymentIntent error:", r), null;
376
389
  }
377
390
  }
378
- async function Tt(t) {
391
+ async function Et(t) {
379
392
  try {
380
393
  const e = await f(`${c()}/orders/extend-session`, { orderUuid: t });
381
394
  if (!e.success)
@@ -394,9 +407,9 @@ async function Tt(t) {
394
407
  return d.error("Error extending checkout session:", e), { success: !1, error: "Network error extending session" };
395
408
  }
396
409
  }
397
- async function St(t) {
410
+ async function Nt(t) {
398
411
  try {
399
- const e = await T(
412
+ const e = await S(
400
413
  `${c()}/orders/session/${t}`
401
414
  );
402
415
  if (!e.success)
@@ -417,21 +430,21 @@ async function St(t) {
417
430
  return d.error("Error getting session status:", e), { error: "Network error getting session status" };
418
431
  }
419
432
  }
420
- async function Pt(t = { eventID: "" }) {
433
+ async function At(t = { eventID: "" }) {
421
434
  try {
422
435
  const e = await f(
423
436
  `${c()}/orders/create`,
424
437
  // attribution (MISSION-TRUTH C2) rides on cart-create additively.
425
- { ...t, attribution: D() }
438
+ { ...t, attribution: x() }
426
439
  );
427
440
  return e.success ? e.data?.uuid ?? null : (d.error("Order initiation failed:", e.error), null);
428
441
  } catch (e) {
429
442
  return d.error("initiateOrder error:", e), null;
430
443
  }
431
444
  }
432
- async function It(t) {
445
+ async function Rt(t) {
433
446
  if (typeof window > "u") return;
434
- const e = new URLSearchParams(window.location.search), r = ne(e.get("utm_source")) || re;
447
+ const e = new URLSearchParams(window.location.search), r = ae(e.get("utm_source")) || ne;
435
448
  try {
436
449
  await fetch(
437
450
  `${c()}/utm/${t}/${encodeURIComponent(r)}`
@@ -440,12 +453,12 @@ async function It(t) {
440
453
  d.error("UTM tracking failed:", n);
441
454
  }
442
455
  }
443
- const V = C("VC"), Le = () => $();
444
- async function Et(t, e) {
456
+ const L = T("VC");
457
+ async function Ut(t, e) {
445
458
  try {
446
459
  if (!e || !e.trim())
447
460
  return { valid: !1, error: "Promo code is required" };
448
- const r = encodeURIComponent(e.trim()), n = await T(
461
+ const r = encodeURIComponent(e.trim()), n = await S(
449
462
  `/promo-codes/validate/${t}/${r}`
450
463
  );
451
464
  if (!n.success)
@@ -465,23 +478,23 @@ async function Et(t, e) {
465
478
  code: a.name || a.code || e
466
479
  };
467
480
  } catch (r) {
468
- return V.error("Error validating promo code:", r), { valid: !1, error: "Network error validating code" };
481
+ return L.error("Error validating promo code:", r), { valid: !1, error: "Network error validating code" };
469
482
  }
470
483
  }
471
- async function Rt(t) {
484
+ async function xt(t) {
472
485
  try {
473
- const e = await T(
486
+ const e = await S(
474
487
  `/promo-codes/check/${t}`
475
488
  );
476
489
  return e.success ? e.data.hasPromoCodes === !0 : !0;
477
490
  } catch (e) {
478
- return V.error("Error checking promo codes availability:", e), !0;
491
+ return L.error("Error checking promo codes availability:", e), !0;
479
492
  }
480
493
  }
481
- async function At(t, e) {
494
+ async function Dt(t, e) {
482
495
  try {
483
496
  const r = await f(
484
- `${Le()}/cart/${t}/apply-promo`,
497
+ `${_()}/cart/${t}/apply-promo`,
485
498
  { promoCode: e }
486
499
  );
487
500
  return r.success ? { success: !0 } : {
@@ -489,10 +502,10 @@ async function At(t, e) {
489
502
  error: r.error || "Failed to apply promo code"
490
503
  };
491
504
  } catch (r) {
492
- return V.error("Error applying promo code:", r), { success: !1, error: "Network error applying code" };
505
+ return L.error("Error applying promo code:", r), { success: !1, error: "Network error applying code" };
493
506
  }
494
507
  }
495
- async function Nt(t) {
508
+ async function Ot(t) {
496
509
  try {
497
510
  const e = await f(`/orders/${t}/remove-promo`);
498
511
  return e.success ? { success: !0 } : {
@@ -500,194 +513,182 @@ async function Nt(t) {
500
513
  error: e.error || "Failed to remove promo code"
501
514
  };
502
515
  } catch (e) {
503
- return V.error("Error removing promo code:", e), { success: !1, error: "Network error removing code" };
516
+ return L.error("Error removing promo code:", e), { success: !1, error: "Network error removing code" };
504
517
  }
505
518
  }
506
- function qe(t) {
519
+ function je(t) {
507
520
  const e = t ?? {};
508
521
  return {
509
522
  performers: Array.isArray(e.performers) ? e.performers : [],
510
523
  showPerformers: e.showPerformers === !0
511
524
  };
512
525
  }
513
- function se(t) {
526
+ function oe(t) {
514
527
  return { ok: !0, data: t };
515
528
  }
516
- function b(t) {
529
+ function C(t) {
517
530
  return { ok: !1, error: t };
518
531
  }
519
- function J(t) {
532
+ function H(t) {
520
533
  return { ok: !1, error: t, notFound: !0 };
521
534
  }
522
- function Dt(t) {
535
+ function Ft(t) {
523
536
  return t.ok;
524
537
  }
525
- function Ut(t) {
538
+ function Vt(t) {
526
539
  return !t.ok;
527
540
  }
528
- function N(t, e) {
541
+ function R(t, e) {
529
542
  return t.ok ? t.data : e;
530
543
  }
531
- const m = C("VC"), x = /* @__PURE__ */ new Map();
532
- async function Me(t, e = fetch, r) {
544
+ const We = "00000000-0000-0000-0000-000000000000", m = T("VC"), O = /* @__PURE__ */ new Map();
545
+ async function ze(t, e = fetch, r) {
533
546
  const n = r ? `${t}:pw` : String(t);
534
547
  if (e === fetch) {
535
- const s = x.get(n);
548
+ const s = O.get(n);
536
549
  if (s) return s;
537
550
  }
538
551
  const a = (async () => {
539
552
  try {
540
553
  const s = r ? `${c()}/events/${t}?password=${encodeURIComponent(r)}` : `${c()}/events/${t}`, o = await e(s);
541
554
  if (!o.ok)
542
- return o.status === 404 ? J("event_not_found") : (m.error(`Failed to fetch event details: ${o.status}`), b("event_fetch_failed"));
555
+ return o.status === 404 ? H("event_not_found") : (m.error(`Failed to fetch event details: ${o.status}`), C("event_fetch_failed"));
543
556
  const i = await o.json();
544
- return i ? se(i) : J("event_not_found");
557
+ return i ? oe(i) : H("event_not_found");
545
558
  } catch (s) {
546
- return m.error("Error fetching event details:", s), b("event_fetch_failed");
559
+ return m.error("Error fetching event details:", s), C("event_fetch_failed");
547
560
  }
548
561
  })();
549
- return e === fetch && (x.set(n, a), a.finally(() => {
550
- x.get(n) === a && x.delete(n);
562
+ return e === fetch && (O.set(n, a), a.finally(() => {
563
+ O.get(n) === a && O.delete(n);
551
564
  })), a;
552
565
  }
553
- async function xt(t, e = fetch, r) {
554
- const n = await Me(t, e, r);
566
+ async function qt(t, e = fetch, r) {
567
+ const n = await ze(t, e, r);
555
568
  return n.ok ? n.data : null;
556
569
  }
557
- async function w(t, e, r = (n) => n) {
570
+ async function k(t, e, r = (n) => n) {
558
571
  try {
559
- const n = await S(t);
560
- return n ? se(r(n)) : (m.error(`Failed to load (${e}): network or server error`), b(e));
572
+ const n = await A(t);
573
+ return n ? oe(r(n)) : (m.error(`Failed to load (${e}): network or server error`), C(e));
561
574
  } catch (n) {
562
- return m.error(`Error loading (${e}):`, n), b(e);
575
+ return m.error(`Error loading (${e}):`, n), C(e);
563
576
  }
564
577
  }
565
- function G(t) {
578
+ function j(t) {
566
579
  return Array.isArray(t) ? t : [];
567
580
  }
568
- async function Ge(t) {
569
- return w(
581
+ async function Be(t) {
582
+ return k(
570
583
  `${c()}/tickets/event/${t}`,
571
584
  "tickets_fetch_failed",
572
- G
585
+ j
573
586
  );
574
587
  }
575
- async function Ot(t) {
576
- return N(await Ge(t), []);
588
+ async function Lt(t) {
589
+ return R(await Be(t), []);
577
590
  }
578
- async function je(t) {
579
- return t ? w(
591
+ async function He(t) {
592
+ return t ? k(
580
593
  `${c()}/events/${t}/performers`,
581
594
  "performers_fetch_failed",
582
- (e) => qe(e)
583
- ) : (m.warn("fetchEventPerformers called without eventId"), b("performers_missing_event_id"));
595
+ (e) => je(e)
596
+ ) : (m.warn("fetchEventPerformers called without eventId"), C("performers_missing_event_id"));
584
597
  }
585
- async function Ft(t) {
586
- return N(await je(t), {
598
+ async function Mt(t) {
599
+ return R(await He(t), {
587
600
  performers: [],
588
601
  showPerformers: !1
589
602
  });
590
603
  }
591
- async function ze(t) {
592
- return t ? w(
604
+ async function Ke(t) {
605
+ return t ? k(
593
606
  `${c()}/venues/organization/${t}`,
594
607
  "venues_fetch_failed",
595
- G
596
- ) : (m.warn("fetchAllVenues called without orgId"), b("venues_missing_org_id"));
608
+ j
609
+ ) : (m.warn("fetchAllVenues called without orgId"), C("venues_missing_org_id"));
597
610
  }
598
- async function Vt(t) {
599
- return N(await ze(t), []);
611
+ async function Gt(t) {
612
+ return R(await Ke(t), []);
600
613
  }
601
- async function Be(t) {
602
- return t ? w(
614
+ async function Je(t) {
615
+ return t ? k(
603
616
  `${c()}/events/venue/${t}`,
604
617
  "venue_events_fetch_failed",
605
- G
606
- ) : (m.warn("fetchVenueEvents called without venueId"), b("venue_events_missing_venue_id"));
618
+ j
619
+ ) : (m.warn("fetchVenueEvents called without venueId"), C("venue_events_missing_venue_id"));
607
620
  }
608
- async function Lt(t) {
609
- return N(await Be(t), []);
621
+ async function jt(t) {
622
+ return R(await Je(t), []);
610
623
  }
611
- function oe(t) {
624
+ function ie(t) {
612
625
  return Array.isArray(t) ? t : Array.isArray(t.events) ? t.events : [];
613
626
  }
614
- async function He(t, e, r) {
615
- return w(
627
+ async function Qe(t, e, r) {
628
+ return k(
616
629
  `${c()}/events/venue/${t}/month/${e}/${r}`,
617
630
  "month_events_fetch_failed",
618
- (n) => oe(n)
631
+ (n) => ie(n)
619
632
  );
620
633
  }
621
- async function qt(t, e, r) {
622
- return N(await He(t, e, r), []);
634
+ async function Wt(t, e, r) {
635
+ return R(await Qe(t, e, r), []);
623
636
  }
624
- async function We(t, e, r) {
625
- return w(
637
+ async function Ye(t, e, r) {
638
+ return k(
626
639
  `${c()}/events/organization/${t}/month/${e}/${r}`,
627
640
  "org_month_events_fetch_failed",
628
- (n) => oe(n)
641
+ (n) => ie(n)
629
642
  );
630
643
  }
631
- async function Mt(t, e, r) {
632
- return N(await We(t, e, r), []);
644
+ async function zt(t, e, r) {
645
+ return R(await Ye(t, e, r), []);
633
646
  }
634
- async function Je(t) {
635
- return w(
647
+ async function Xe(t) {
648
+ return k(
636
649
  `${c()}/series/${t}/occurrences`,
637
650
  "series_occurrences_fetch_failed"
638
651
  );
639
652
  }
640
- async function Gt(t) {
641
- const e = await Je(t);
653
+ async function Bt(t) {
654
+ const e = await Xe(t);
642
655
  return e.ok ? e.data : null;
643
656
  }
644
- async function Qe(t, e) {
645
- return w(
657
+ async function Ze(t, e) {
658
+ return k(
646
659
  `${c()}/series/${t}/occurrences?venueId=${e}`,
647
660
  "series_cta_fetch_failed"
648
661
  );
649
662
  }
650
- async function jt(t, e) {
651
- const r = await Qe(t, e);
663
+ async function Ht(t, e) {
664
+ const r = await Ze(t, e);
652
665
  return r.ok ? r.data : null;
653
666
  }
654
- async function zt(t, e) {
667
+ async function Kt(t, e) {
655
668
  try {
656
- const r = e ? `?slug=${encodeURIComponent(e)}` : "", n = await S(
669
+ const r = e ? `?slug=${encodeURIComponent(e)}` : "", n = await A(
657
670
  `${c()}/resolve/${encodeURIComponent(String(t))}${r}`
658
671
  );
659
672
  if (!n || !n.type)
660
- throw new M("entity", String(t));
673
+ throw new Y("entity", String(t));
661
674
  return n;
662
675
  } catch (r) {
663
676
  return m.error("Error resolving public entity:", r), null;
664
677
  }
665
678
  }
666
- async function Bt(t) {
667
- try {
668
- const e = await S(
669
- `${c()}/series/${t}/page`
670
- );
671
- if (!e)
672
- throw new M("series", String(t));
673
- return e;
674
- } catch (e) {
675
- return m.error("Error fetching series page:", e), null;
676
- }
677
- }
678
- async function Ht(t, e) {
679
+ async function Jt(t, e) {
679
680
  try {
680
- const r = e ? `${c()}/collections/${t}?password=${encodeURIComponent(e)}` : `${c()}/collections/${t}`, n = await S(r);
681
+ const r = e ? `${c()}/collections/${t}?password=${encodeURIComponent(e)}` : `${c()}/collections/${t}`, n = await A(r);
681
682
  if (!n)
682
- throw new M("collection", String(t));
683
+ throw new Y("collection", String(t));
683
684
  return n;
684
685
  } catch (r) {
685
686
  return m.error("Error fetching collection:", r), null;
686
687
  }
687
688
  }
688
- async function Wt(t, e) {
689
+ async function Qt(t, e) {
689
690
  try {
690
- return (await S(
691
+ return (await A(
691
692
  `${c()}/collections/${t}/check-password`,
692
693
  {
693
694
  method: "POST",
@@ -699,9 +700,9 @@ async function Wt(t, e) {
699
700
  return m.error("Error checking collection password:", r), !1;
700
701
  }
701
702
  }
702
- async function Jt(t, e) {
703
+ async function Yt(t, e) {
703
704
  try {
704
- const r = await S(
705
+ const r = await A(
705
706
  `${c()}/events/${t}/check-password`,
706
707
  {
707
708
  method: "POST",
@@ -714,46 +715,46 @@ async function Jt(t, e) {
714
715
  return m.error("Error checking event password:", r), { valid: !1 };
715
716
  }
716
717
  }
717
- async function Qt(t, e) {
718
+ async function Xt(t, e) {
718
719
  try {
719
- const r = e ? `${c()}/events/venue/${e}` : t ? `${c()}/venues/organization/${t}` : `${c()}/health`;
720
+ const r = e ? `${c()}/events/venue/${e}` : t ? `${c()}/venues/organization/${t}` : `${c()}/venues/${We}`;
720
721
  return (await fetch(r, {
721
722
  method: "HEAD"
722
- })).ok;
723
+ })).status < 500;
723
724
  } catch (r) {
724
725
  return m.error("Network connection test failed:", r), !1;
725
726
  }
726
727
  }
727
- const A = C("VC");
728
- async function Ye(t) {
728
+ const N = T("VC");
729
+ async function et(t) {
729
730
  try {
730
731
  if (!t)
731
- return A.warn("getVenue called without venueId"), null;
732
- const e = await T(`/venues/${t}`);
733
- return e.success ? e.data ?? null : (A.error(`Failed to fetch venue: ${e.statusCode}`), null);
732
+ return N.warn("getVenue called without venueId"), null;
733
+ const e = await S(`/venues/${t}`);
734
+ return e.success ? e.data ?? null : (N.error(`Failed to fetch venue: ${e.statusCode}`), null);
734
735
  } catch (e) {
735
- return A.error("Error fetching venue:", e), null;
736
+ return N.error("Error fetching venue:", e), null;
736
737
  }
737
738
  }
738
- async function Yt(t) {
739
- const e = await Ye(t);
739
+ async function Zt(t) {
740
+ const e = await et(t);
740
741
  return e ? {
741
742
  serviceFeePercentage: e.serviceFeePercentage ?? 0,
742
743
  serviceFeeCents: e.serviceFeeCents ?? 0,
743
744
  taxPercentage: e.taxPercentage ?? 0
744
745
  } : null;
745
746
  }
746
- async function Kt(t) {
747
+ async function er(t) {
747
748
  try {
748
749
  if (!t)
749
- return A.warn("getVenueBySlug called without slug"), null;
750
- const e = encodeURIComponent(t), r = await T(`/venues/slug/${e}`);
751
- return r.success ? r.data ?? null : (A.error(`Failed to fetch venue by slug: ${r.statusCode}`), null);
750
+ return N.warn("getVenueBySlug called without slug"), null;
751
+ const e = encodeURIComponent(t), r = await S(`/venues/slug/${e}`);
752
+ return r.success ? r.data ?? null : (N.error(`Failed to fetch venue by slug: ${r.statusCode}`), null);
752
753
  } catch (e) {
753
- return A.error("Error fetching venue by slug:", e), null;
754
+ return N.error("Error fetching venue by slug:", e), null;
754
755
  }
755
756
  }
756
- function Ke(t) {
757
+ function tt(t) {
757
758
  const e = t ?? {}, r = (e.appliedAmount ?? 0) / 100, n = e.remainingTotal ?? 0, a = e.fullyCoveredByCard ?? n <= 0, s = !a;
758
759
  return {
759
760
  valid: !0,
@@ -766,31 +767,31 @@ function Ke(t) {
766
767
  requiresStripe: s
767
768
  };
768
769
  }
769
- const h = C("VC"), Ze = "https://get-micdrop.com", Q = `${Ze}/api/orders/v2`, j = () => $();
770
- async function Zt(t) {
770
+ const h = T("VC"), rt = "https://get-micdrop.com", K = `${rt}/api/orders/v2`;
771
+ async function tr(t) {
771
772
  try {
772
773
  const e = await f(
773
- `${Q}/gift-cards`,
774
+ `${K}/gift-cards`,
774
775
  t
775
776
  );
776
777
  if (!e.success)
777
- throw h.error("Gift card purchase creation failed:", e.error), new K(
778
+ throw h.error("Gift card purchase creation failed:", e.error), new Q(
778
779
  e.error || "Failed to create gift card purchase",
779
780
  e.statusCode ?? 0,
780
- { endpoint: `${Q}/gift-cards`, method: "POST" }
781
+ { endpoint: `${K}/gift-cards`, method: "POST" }
781
782
  );
782
783
  return h.debug("Gift card purchase created:", e.data), e.data;
783
784
  } catch (e) {
784
785
  return h.error("Gift card purchase creation error:", e), null;
785
786
  }
786
787
  }
787
- async function Xt(t, e) {
788
+ async function rr(t, e) {
788
789
  try {
789
790
  const r = await f(
790
- `${j()}/cart/${t}/apply-gift-card`,
791
+ `${_()}/cart/${t}/apply-gift-card`,
791
792
  { giftCardCode: e }
792
793
  );
793
- return r.success ? Ke(r.data) : r.statusCode === 429 ? {
794
+ return r.success ? tt(r.data) : r.statusCode === 429 ? {
794
795
  valid: !1,
795
796
  error: "Too many attempts. Please wait a moment and try again."
796
797
  } : (h.error("Apply gift card failed:", r.error), {
@@ -804,10 +805,10 @@ async function Xt(t, e) {
804
805
  };
805
806
  }
806
807
  }
807
- async function er(t, e) {
808
+ async function nr(t, e) {
808
809
  try {
809
- const r = await ke(
810
- `${j()}/cart/${t}/gift-card`,
810
+ const r = await Te(
811
+ `${_()}/cart/${t}/gift-card`,
811
812
  e ? { body: JSON.stringify({ giftCardCode: e }) } : void 0
812
813
  );
813
814
  return r.success ? { success: !0 } : (h.error("Remove gift card failed:", r.error), {
@@ -821,10 +822,10 @@ async function er(t, e) {
821
822
  };
822
823
  }
823
824
  }
824
- async function tr(t, e) {
825
+ async function ar(t, e) {
825
826
  try {
826
- const r = await f(`${j()}/cart/${t}/complete-gift-card-payment`, {
827
- customerName: ye(
827
+ const r = await f(`${_()}/cart/${t}/complete-gift-card-payment`, {
828
+ customerName: ge(
828
829
  e.firstName,
829
830
  e.lastName
830
831
  ),
@@ -836,7 +837,7 @@ async function tr(t, e) {
836
837
  mailingList: e.mailingList || !1,
837
838
  // Order attribution (MISSION-TRUTH C2) — gift-card-only orders take this
838
839
  // finalize endpoint, so attribution must ride here too; additive.
839
- attribution: D()
840
+ attribution: x()
840
841
  });
841
842
  return r.success ? {
842
843
  success: !0,
@@ -853,14 +854,14 @@ async function tr(t, e) {
853
854
  };
854
855
  }
855
856
  }
856
- const O = C("VC"), Xe = {
857
+ const V = T("VC"), nt = {
857
858
  waitlist_not_enabled: "Waitlist is not available for this event",
858
859
  event_not_found: "Event not found",
859
860
  invalid_phone: "Please enter a valid phone number",
860
861
  already_purchased: "You have already purchased tickets for this event",
861
862
  phone_already_registered: "This phone number is already on the waitlist"
862
863
  };
863
- async function rr(t, e, r = null, n = !1) {
864
+ async function sr(t, e, r = null, n = !1) {
864
865
  try {
865
866
  const a = { email: e };
866
867
  r && n && (a.phone = r, a.smsOptIn = !0);
@@ -871,18 +872,18 @@ async function rr(t, e, r = null, n = !1) {
871
872
  return s.success ? {
872
873
  success: !0,
873
874
  updated: s.data?.updated
874
- } : (O.error("Join waitlist failed:", s.error), {
875
+ } : (V.error("Join waitlist failed:", s.error), {
875
876
  success: !1,
876
- error: Xe[s.error ?? ""] || "Failed to join waitlist. Please try again."
877
+ error: nt[s.error ?? ""] || "Failed to join waitlist. Please try again."
877
878
  });
878
879
  } catch (a) {
879
- return O.error("joinWaitlist error:", a), {
880
+ return V.error("joinWaitlist error:", a), {
880
881
  success: !1,
881
882
  error: "Network error. Please check your connection and try again."
882
883
  };
883
884
  }
884
885
  }
885
- async function nr(t, e) {
886
+ async function or(t, e) {
886
887
  try {
887
888
  const r = await f(
888
889
  `/checkout/validate-token/${t}`,
@@ -897,17 +898,17 @@ async function nr(t, e) {
897
898
  errorCode: r.error
898
899
  };
899
900
  } catch (r) {
900
- return O.error("validateWaitlistToken error:", r), { valid: !1, eventId: 0, errorCode: "invalid_token" };
901
+ return V.error("validateWaitlistToken error:", r), { valid: !1, eventId: 0, errorCode: "invalid_token" };
901
902
  }
902
903
  }
903
- async function ar(t) {
904
+ async function ir(t) {
904
905
  const e = {
905
906
  waitlistEnabled: !1,
906
907
  soldOut: !1,
907
908
  gated: !1
908
909
  };
909
910
  try {
910
- const r = await T(
911
+ const r = await S(
911
912
  `/events/${t}/waitlist/status`
912
913
  );
913
914
  return r.success ? {
@@ -916,24 +917,24 @@ async function ar(t) {
916
917
  gated: !!r.data?.gated
917
918
  } : e;
918
919
  } catch (r) {
919
- return O.error("getWaitlistStatus error:", r), e;
920
+ return V.error("getWaitlistStatus error:", r), e;
920
921
  }
921
922
  }
922
- function sr(t, e, r = {}) {
923
+ function cr(t, e, r = {}) {
923
924
  const {
924
925
  cancelled: n = !1,
925
926
  isRegistration: a = !1,
926
927
  waitlistEnabled: s = !1
927
- } = r, o = /* @__PURE__ */ new Date();
928
+ } = r, o = _e();
928
929
  if (n)
929
930
  return { text: "Cancelled", disabled: !0, reason: "cancelled" };
930
- const i = t.endDateTime || t.startDateTime;
931
- if (i && new Date(i) < o)
931
+ const i = F(t.endDateTime || t.startDateTime);
932
+ if (i && U(i, o) < 0)
932
933
  return { text: "Sales ended", disabled: !0, reason: "event_past" };
933
- const u = t?.hasPurchasableHiddenTickets === !0 || Array.isArray(e) && e.some(he), P = (e || []).filter(
934
+ const u = t?.hasPurchasableHiddenTickets === !0 || Array.isArray(e) && e.some(we), I = (e || []).filter(
934
935
  (l) => l.salesChannel !== 2 && !l.isHidden && !(typeof l.visibility == "number" && l.visibility >= 2)
935
936
  );
936
- if (P.length === 0)
937
+ if (I.length === 0)
937
938
  return u ? {
938
939
  text: a ? "Reserve a spot" : "Get tickets",
939
940
  disabled: !1,
@@ -943,13 +944,14 @@ function sr(t, e, r = {}) {
943
944
  disabled: !0,
944
945
  reason: "no_tickets"
945
946
  };
946
- let y = !1, k = !0, g = !0, v = null;
947
- for (const l of P) {
948
- const I = l.salesBegin || l.salesStart || l.saleBegin || l.onSaleStart, U = l.salesEnd || l.saleEnd || l.onSaleEnd, E = l.remainingCapacity ?? l.quantityRemaining ?? l.quantity, _ = l.soldOut || E != null && E <= 0, R = I ? new Date(I) > o : !1, z = U ? new Date(U) < o : !1;
949
- if (!_ && !R && !z && (y = !0), _ || (k = !1), R || (g = !1), R && I && !_ && !z) {
950
- const B = new Date(I);
951
- (!v || B < v) && (v = B);
952
- }
947
+ let y = !1, b = !0, g = !0, v = null;
948
+ for (const l of I) {
949
+ const $ = F(
950
+ l.salesBegin || l.salesStart || l.saleBegin || l.onSaleStart
951
+ ), D = F(
952
+ l.salesEnd || l.saleEnd || l.onSaleEnd
953
+ ), P = l.remainingCapacity ?? l.quantityRemaining ?? l.quantity, w = l.soldOut || P != null && P <= 0, E = $ ? U($, o) > 0 : !1, W = D ? U(D, o) < 0 : !1;
954
+ !w && !E && !W && (y = !0), w || (b = !1), E || (g = !1), E && $ && !w && !W && (!v || U($, v) < 0) && (v = $);
953
955
  }
954
956
  if (y)
955
957
  return {
@@ -964,27 +966,27 @@ function sr(t, e, r = {}) {
964
966
  disabled: !1,
965
967
  reason: "hidden_only"
966
968
  };
967
- const l = v.getTime() - o.getTime(), I = l / (1e3 * 60 * 60), U = l / (1e3 * 60 * 60 * 24), E = (R) => L(
968
- R,
969
+ const l = U(v, o), $ = l / (1e3 * 60 * 60), D = l / (1e3 * 60 * 60 * 24), P = (E) => M(
970
+ E,
969
971
  { hour: "numeric", minute: "2-digit", hour12: !0 },
970
972
  "en-US"
971
973
  );
972
- let _;
973
- return I < 24 ? _ = E(v) : U <= 7 ? _ = L(
974
+ let w;
975
+ return $ < 24 ? w = P(v) : D <= 7 ? w = M(
974
976
  v,
975
977
  { weekday: "short", hour: "numeric", minute: "2-digit", hour12: !0 },
976
978
  "en-US"
977
- ) : _ = `${L(
979
+ ) : w = `${M(
978
980
  v,
979
981
  { month: "short", day: "numeric" },
980
982
  "en-US"
981
- )} ${E(v)}`, {
982
- text: `On sale ${_}`,
983
+ )} ${P(v)}`, {
984
+ text: `On sale ${w}`,
983
985
  disabled: !0,
984
986
  reason: "coming_soon"
985
987
  };
986
988
  }
987
- return k ? u ? {
989
+ return b ? u ? {
988
990
  text: a ? "Reserve a spot" : "Get tickets",
989
991
  disabled: !1,
990
992
  reason: "hidden_only"
@@ -998,7 +1000,7 @@ function sr(t, e, r = {}) {
998
1000
  reason: "hidden_only"
999
1001
  } : { text: "Sales ended", disabled: !0, reason: "sales_ended" };
1000
1002
  }
1001
- function ie(t) {
1003
+ function ce(t) {
1002
1004
  const e = t;
1003
1005
  return {
1004
1006
  uuid: e.uuid || String(e.id || e.ID || ""),
@@ -1016,7 +1018,7 @@ function ie(t) {
1016
1018
  checkedInAt: e.checkedInAt || e.checked_in_at
1017
1019
  };
1018
1020
  }
1019
- function ce(t) {
1021
+ function ue(t) {
1020
1022
  const e = t, r = e.purchasedTickets || e.tickets || e.purchased_tickets || [];
1021
1023
  return {
1022
1024
  uuid: e.uuid || String(e.id || e.ID || ""),
@@ -1032,33 +1034,33 @@ function ce(t) {
1032
1034
  discount: e.discount || 0,
1033
1035
  paymentIntentId: e.paymentIntentId || e.payment_intent_id,
1034
1036
  paymentMethod: e.paymentMethod || e.payment_method,
1035
- purchasedTickets: r.map(ie),
1037
+ purchasedTickets: r.map(ce),
1036
1038
  createdAt: e.createdAt || e.created_at,
1037
1039
  updatedAt: e.updatedAt || e.updated_at
1038
1040
  };
1039
1041
  }
1040
- const or = ie, ir = ce;
1041
- function cr(t) {
1042
- const e = ce(t), r = e.uuid.split("-")[0] || e.uuid, n = Number(e.totalAmount);
1042
+ const ur = ce, lr = ue;
1043
+ function dr(t) {
1044
+ const e = ue(t), r = e.uuid.split("-")[0] || e.uuid, n = Number(e.totalAmount);
1043
1045
  return {
1044
1046
  orderId: e.uuid,
1045
1047
  displayOrderId: r,
1046
1048
  email: e.customerEmail,
1047
1049
  customerName: [e.customerFirstName, e.customerLastName].filter(Boolean).join(" "),
1048
1050
  total: e.totalAmount,
1049
- formattedTotal: `${ge(ve(Number.isFinite(n) ? n / 100 : 0))}`,
1051
+ formattedTotal: `${ve(he(Number.isFinite(n) ? n / 100 : 0))}`,
1050
1052
  ticketCount: e.purchasedTickets.length,
1051
1053
  status: e.status
1052
1054
  };
1053
1055
  }
1054
- function et(t) {
1055
- return X(t, { cdn: !0 });
1056
+ function at(t) {
1057
+ return Z(t, { cdn: !0 });
1056
1058
  }
1057
- function Y(t) {
1059
+ function J(t) {
1058
1060
  const e = t.imageUrl || t.imageURL || t.image_url || t.image || "";
1059
- return et(e);
1061
+ return at(e);
1060
1062
  }
1061
- function tt(t) {
1063
+ function st(t) {
1062
1064
  switch (t) {
1063
1065
  case "available":
1064
1066
  case "sold_out":
@@ -1069,19 +1071,21 @@ function tt(t) {
1069
1071
  return null;
1070
1072
  }
1071
1073
  }
1072
- function rt(t) {
1074
+ function ot(t) {
1073
1075
  const e = t.ctaState || t.cta_state;
1074
1076
  if (e) {
1075
- const o = tt(e);
1077
+ const o = st(e);
1076
1078
  if (o)
1077
1079
  return o;
1078
1080
  }
1079
1081
  if (t.isCancelled || t.is_cancelled)
1080
1082
  return "ended";
1081
- const r = t.startDateTime || t.start_date_time || t.date;
1083
+ const r = F(
1084
+ t.startDateTime || t.start_date_time || t.date
1085
+ );
1082
1086
  if (r) {
1083
- const o = new Date(r).getTime(), i = Date.now();
1084
- if (o < i)
1087
+ const o = Date.now();
1088
+ if (r.getTime() < o)
1085
1089
  return "ended";
1086
1090
  }
1087
1091
  const n = t.ticketsAvailable ?? t.tickets_available;
@@ -1089,11 +1093,11 @@ function rt(t) {
1089
1093
  return n <= 0 ? "sold_out" : "available";
1090
1094
  const a = t.availableTickets || t.available_tickets || t.tickets || [];
1091
1095
  return a.length === 0 ? "coming_soon" : a.reduce((o, i) => {
1092
- const u = i.quantityAvailable ?? i.quantity_available ?? i.quantity ?? 0, P = i.quantitySold ?? i.quantity_sold ?? 0;
1093
- return o + Math.max(0, u - P);
1096
+ const u = i.quantityAvailable ?? i.quantity_available ?? i.quantity ?? 0, I = i.quantitySold ?? i.quantity_sold ?? 0;
1097
+ return o + Math.max(0, u - I);
1094
1098
  }, 0) <= 0 ? "sold_out" : "available";
1095
1099
  }
1096
- function ue(t) {
1100
+ function le(t) {
1097
1101
  const e = t;
1098
1102
  return {
1099
1103
  id: e.id || e.ID,
@@ -1114,8 +1118,8 @@ function ue(t) {
1114
1118
  sortOrder: e.sortOrder || e.sort_order || 0
1115
1119
  };
1116
1120
  }
1117
- function le(t) {
1118
- const e = t, n = (e.availableTickets || e.available_tickets || e.tickets || []).map(ue), 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;
1121
+ function de(t) {
1122
+ const e = t, n = (e.availableTickets || e.available_tickets || e.tickets || []).map(le), 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;
1119
1123
  return {
1120
1124
  eventID: e.eventID || e.id || e.ID || 0,
1121
1125
  id: e.id || e.ID,
@@ -1132,8 +1136,8 @@ function le(t) {
1132
1136
  venueName: e.venueName || e.venue_name,
1133
1137
  venueAddress: e.venueAddress || e.venue_address,
1134
1138
  location: e.location || e.venueAddress || e.venue_address,
1135
- imageUrl: Y(e),
1136
- imageURL: Y(e),
1139
+ imageUrl: J(e),
1140
+ imageURL: J(e),
1137
1141
  status: e.status,
1138
1142
  isPublished: e.isPublished ?? e.is_published,
1139
1143
  isCancelled: e.isCancelled ?? e.is_cancelled,
@@ -1143,7 +1147,7 @@ function le(t) {
1143
1147
  minPrice: e.minPrice ?? e.min_price ?? s,
1144
1148
  maxPrice: e.maxPrice ?? e.max_price ?? o,
1145
1149
  ctaText: e.ctaText || e.cta_text,
1146
- ctaState: rt(e),
1150
+ ctaState: ot(e),
1147
1151
  showPerformers: e.showPerformers ?? e.show_performers,
1148
1152
  eventSeriesId: e.eventSeriesId || e.event_series_id,
1149
1153
  seriesInstanceNumber: e.seriesInstanceNumber || e.series_instance_number,
@@ -1177,11 +1181,11 @@ function le(t) {
1177
1181
  purchasedTickets: e.purchasedTickets
1178
1182
  };
1179
1183
  }
1180
- const ur = ue, lr = le, dr = le;
1181
- function nt(t) {
1182
- return X(t, { cdn: !0 });
1184
+ const fr = le, mr = de, pr = de;
1185
+ function it(t) {
1186
+ return Z(t, { cdn: !0 });
1183
1187
  }
1184
- function at(t) {
1188
+ function ct(t) {
1185
1189
  const e = t, r = e.logoUrl || e.logo_url || e.logo;
1186
1190
  return {
1187
1191
  id: e.id || e.ID || 0,
@@ -1194,15 +1198,15 @@ function at(t) {
1194
1198
  zipCode: e.zipCode || e.zip_code,
1195
1199
  country: e.country,
1196
1200
  timezone: e.timezone || e.time_zone,
1197
- logoUrl: nt(r),
1201
+ logoUrl: it(r),
1198
1202
  serviceFeePercentage: e.serviceFeePercentage ?? e.service_fee_percentage ?? 0,
1199
1203
  serviceFeeCents: e.serviceFeeCents ?? e.service_fee_cents ?? 0,
1200
1204
  taxPercentage: e.taxPercentage ?? e.tax_percentage ?? 0,
1201
1205
  organizationId: e.organizationId || e.organization_id
1202
1206
  };
1203
1207
  }
1204
- const fr = at;
1205
- function mr(t) {
1208
+ const yr = ct;
1209
+ function gr(t) {
1206
1210
  const e = t;
1207
1211
  return {
1208
1212
  serviceFeePercentage: e.serviceFeePercentage ?? e.service_fee_percentage ?? 0,
@@ -1210,90 +1214,89 @@ function mr(t) {
1210
1214
  taxPercentage: e.taxPercentage ?? e.tax_percentage ?? 0
1211
1215
  };
1212
1216
  }
1213
- function pr(t) {
1217
+ function vr(t) {
1214
1218
  return [t.address, t.city, t.state, t.zipCode].filter(
1215
1219
  Boolean
1216
1220
  ).join(", ");
1217
1221
  }
1218
1222
  export {
1219
- ke as apiDelete,
1220
- T as apiGet,
1223
+ Te as apiDelete,
1224
+ S as apiGet,
1221
1225
  f as apiPost,
1222
- gt as apiPut,
1223
- Xt as applyGiftCard,
1224
- At as applyPromoCode,
1225
- rt as calculateCtaState,
1226
- kt as cancelReservation,
1227
- Wt as checkCollectionPassword,
1228
- Jt as checkEventPassword,
1229
- tr as completeGiftCardPayment,
1230
- wt as completeReservation,
1231
- sr as computeCtaState,
1232
- ft as configureApi,
1233
- Zt as createGiftCardPurchase,
1234
- $t as createOrder,
1235
- vt as createPaymentIntent,
1236
- b as err,
1237
- J as errNotFound,
1238
- Tt as extendCheckoutSession,
1239
- mr as extractVenueFees,
1240
- Vt as fetchAllVenues,
1241
- ze as fetchAllVenuesResult,
1242
- xt as fetchEventDetails,
1243
- Me as fetchEventDetailsResult,
1244
- Ft as fetchEventPerformers,
1245
- je as fetchEventPerformersResult,
1246
- Ot as fetchEventTickets,
1247
- Ge as fetchEventTicketsResult,
1248
- Ht as fetchPublicCollection,
1249
- jt as fetchSeriesOccurrences,
1250
- Qe as fetchSeriesOccurrencesResult,
1251
- Bt as fetchSeriesPage,
1252
- Lt as fetchVenueEvents,
1253
- Be as fetchVenueEventsResult,
1254
- pr as formatVenueAddress,
1255
- mt as getApiConfig,
1256
- et as getCDNImageUrl,
1257
- ht as getCartByUUID,
1258
- yt as getClientIP,
1259
- Y as getEventImageUrl,
1260
- pt as getLegacyPublicUrl,
1261
- qt as getMonthEvents,
1262
- He as getMonthEventsResult,
1263
- bt as getOrder,
1264
- $ as getOrdersV2Url,
1265
- Mt as getOrgMonthEvents,
1266
- We as getOrgMonthEventsResult,
1226
+ wt as apiPut,
1227
+ rr as applyGiftCard,
1228
+ Dt as applyPromoCode,
1229
+ ot as calculateCtaState,
1230
+ Tt as cancelReservation,
1231
+ Qt as checkCollectionPassword,
1232
+ Yt as checkEventPassword,
1233
+ ar as completeGiftCardPayment,
1234
+ Ct as completeReservation,
1235
+ cr as computeCtaState,
1236
+ gt as configureApi,
1237
+ tr as createGiftCardPurchase,
1238
+ St as createOrder,
1239
+ kt as createPaymentIntent,
1240
+ C as err,
1241
+ H as errNotFound,
1242
+ Et as extendCheckoutSession,
1243
+ gr as extractVenueFees,
1244
+ Gt as fetchAllVenues,
1245
+ Ke as fetchAllVenuesResult,
1246
+ qt as fetchEventDetails,
1247
+ ze as fetchEventDetailsResult,
1248
+ Mt as fetchEventPerformers,
1249
+ He as fetchEventPerformersResult,
1250
+ Lt as fetchEventTickets,
1251
+ Be as fetchEventTicketsResult,
1252
+ Jt as fetchPublicCollection,
1253
+ Ht as fetchSeriesOccurrences,
1254
+ Ze as fetchSeriesOccurrencesResult,
1255
+ jt as fetchVenueEvents,
1256
+ Je as fetchVenueEventsResult,
1257
+ vr as formatVenueAddress,
1258
+ vt as getApiConfig,
1259
+ at as getCDNImageUrl,
1260
+ bt as getCartByUUID,
1261
+ _t as getClientIP,
1262
+ J as getEventImageUrl,
1263
+ ht as getLegacyPublicUrl,
1264
+ Wt as getMonthEvents,
1265
+ Qe as getMonthEventsResult,
1266
+ It as getOrder,
1267
+ _ as getOrdersV2Url,
1268
+ zt as getOrgMonthEvents,
1269
+ Ye as getOrgMonthEventsResult,
1267
1270
  c as getPublicBaseUrl,
1268
- Gt as getSeriesOccurrences,
1269
- Je as getSeriesOccurrencesResult,
1270
- St as getSessionStatus,
1271
- Ye as getVenue,
1272
- Kt as getVenueBySlug,
1273
- Yt as getVenueFees,
1274
- ar as getWaitlistStatus,
1275
- Rt as hasPromoCodes,
1276
- Pt as initiateOrder,
1277
- Ut as isErr,
1278
- Dt as isOk,
1279
- rr as joinWaitlist,
1280
- se as ok,
1281
- er as removeGiftCard,
1282
- Nt as removePromoCode,
1283
- zt as resolvePublicEntity,
1284
- Qt as testNetworkConnection,
1285
- It as trackUTMSource,
1286
- ur as transformAvailableTicket,
1287
- lr as transformEvent,
1288
- dr as transformEventData,
1289
- ir as transformOrder,
1290
- cr as transformOrderForDisplay,
1291
- or as transformTicket,
1292
- fr as transformVenue,
1293
- N as unwrapOr,
1294
- _t as updateCartQuantities,
1295
- Ct as validatePaymentIntent,
1296
- Et as validatePromoCode,
1297
- nr as validateWaitlistToken
1271
+ Bt as getSeriesOccurrences,
1272
+ Xe as getSeriesOccurrencesResult,
1273
+ Nt as getSessionStatus,
1274
+ et as getVenue,
1275
+ er as getVenueBySlug,
1276
+ Zt as getVenueFees,
1277
+ ir as getWaitlistStatus,
1278
+ xt as hasPromoCodes,
1279
+ At as initiateOrder,
1280
+ Vt as isErr,
1281
+ Ft as isOk,
1282
+ sr as joinWaitlist,
1283
+ oe as ok,
1284
+ nr as removeGiftCard,
1285
+ Ot as removePromoCode,
1286
+ Kt as resolvePublicEntity,
1287
+ Xt as testNetworkConnection,
1288
+ Rt as trackUTMSource,
1289
+ fr as transformAvailableTicket,
1290
+ mr as transformEvent,
1291
+ pr as transformEventData,
1292
+ lr as transformOrder,
1293
+ dr as transformOrderForDisplay,
1294
+ ur as transformTicket,
1295
+ yr as transformVenue,
1296
+ R as unwrapOr,
1297
+ $t as updateCartQuantities,
1298
+ Pt as validatePaymentIntent,
1299
+ Ut as validatePromoCode,
1300
+ or as validateWaitlistToken
1298
1301
  };
1299
1302
  //# sourceMappingURL=api.mjs.map