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