@getmicdrop/venue-calendar 4.3.91 → 4.3.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AddOnCard-CoZxA8Ss.js → AddOnCard-DCKFn21s.js} +2 -2
- package/dist/{CalendarFoundryView-oPu-JKfY.js → CalendarFoundryView-C_j409DI.js} +1 -1
- package/dist/{CartView-Dzje7N6m.js → CartView-CKipFgsW.js} +5 -5
- package/dist/{ChartBlock-B-etyhMZ.js → ChartBlock-BmkCI-vc.js} +268 -267
- package/dist/{Checkout-D1De_3qe.js → Checkout-DEdXCYJd.js} +13 -13
- package/dist/{Checkout-BKEQIOYJ.js → Checkout-Dk2RtnG_.js} +7 -7
- package/dist/{CollectionView-KQcIi7Ov.js → CollectionView-B8UPI4kV.js} +3 -3
- package/dist/{Event-uaQkHUne.js → Event-DfLoC6EH.js} +6 -6
- package/dist/{EventPage-wvN2rQ7Z.js → EventPage-BXorHP0g.js} +8 -8
- package/dist/{RecommendationsRail-BUqK-9TQ.js → RecommendationsRail-DeiRJBX-.js} +2 -2
- package/dist/{ScarcityBadge-BKGJzuQn.js → ScarcityBadge-Bo7ILdv5.js} +1 -1
- package/dist/{SeriesPage-yn2TULyn.js → SeriesPage-Dimz6hR9.js} +2 -2
- package/dist/{Success-BiuvQueK.js → Success-Cxh6ocdz.js} +21 -21
- package/dist/{ViewTicketsEmbed-Bbtq90pG.js → ViewTicketsEmbed-CrPWLrcK.js} +3 -3
- package/dist/api/api.cjs +1 -1
- package/dist/api/api.mjs +94 -94
- package/dist/api/client.d.ts +29 -0
- package/dist/{api-c7gIPjjT.js → api-DAK-QNVZ.js} +112 -112
- package/dist/{defaults-Z_lKbqvf.js → defaults-D0DK9-0V.js} +1 -1
- package/dist/{event-transform-DnTfI9EZ.js → event-transform-2AkuKTGX.js} +1 -1
- package/dist/{eventStatusStream-BAx7uYiz.js → eventStatusStream-BpG0SCT-.js} +1 -1
- package/dist/{i18n-D7YN7gkj.js → i18n-Ba_Bqe_Y.js} +2 -2
- package/dist/{i18n-BpINnLyf.js → i18n-CCFiUzoX.js} +1 -1
- package/dist/{orders-2OEBLUMn.js → orders-2lTsorF-.js} +66 -66
- package/dist/{pixels-CZRDw2lY.js → pixels-X0-xsWmp.js} +1 -1
- package/dist/{utils-CttW5Ot0.js → utils-d34-d_aC.js} +59 -59
- package/dist/venue-calendar.es.js +765 -765
- package/dist/venue-calendar.iife.js +26 -26
- package/dist/venue-calendar.umd.js +51 -51
- package/package.json +2 -2
- /package/dist/locales/{4.3.91 → 4.3.93}/flow/de.js +0 -0
- /package/dist/locales/{4.3.91 → 4.3.93}/flow/es.js +0 -0
- /package/dist/locales/{4.3.91 → 4.3.93}/flow/fr.js +0 -0
- /package/dist/locales/{4.3.91 → 4.3.93}/flow/id.js +0 -0
- /package/dist/locales/{4.3.91 → 4.3.93}/flow/it.js +0 -0
- /package/dist/locales/{4.3.91 → 4.3.93}/flow/ja.js +0 -0
- /package/dist/locales/{4.3.91 → 4.3.93}/flow/ko.js +0 -0
- /package/dist/locales/{4.3.91 → 4.3.93}/flow/nl.js +0 -0
- /package/dist/locales/{4.3.91 → 4.3.93}/flow/pl.js +0 -0
- /package/dist/locales/{4.3.91 → 4.3.93}/flow/pt-br.js +0 -0
- /package/dist/locales/{4.3.91 → 4.3.93}/flow/tr.js +0 -0
- /package/dist/locales/{4.3.91 → 4.3.93}/flow/zh.js +0 -0
- /package/dist/locales/{4.3.91 → 4.3.93}/main/de.js +0 -0
- /package/dist/locales/{4.3.91 → 4.3.93}/main/es.js +0 -0
- /package/dist/locales/{4.3.91 → 4.3.93}/main/fr.js +0 -0
- /package/dist/locales/{4.3.91 → 4.3.93}/main/id.js +0 -0
- /package/dist/locales/{4.3.91 → 4.3.93}/main/it.js +0 -0
- /package/dist/locales/{4.3.91 → 4.3.93}/main/ja.js +0 -0
- /package/dist/locales/{4.3.91 → 4.3.93}/main/ko.js +0 -0
- /package/dist/locales/{4.3.91 → 4.3.93}/main/nl.js +0 -0
- /package/dist/locales/{4.3.91 → 4.3.93}/main/pl.js +0 -0
- /package/dist/locales/{4.3.91 → 4.3.93}/main/pt-br.js +0 -0
- /package/dist/locales/{4.3.91 → 4.3.93}/main/tr.js +0 -0
- /package/dist/locales/{4.3.91 → 4.3.93}/main/zh.js +0 -0
|
@@ -50,7 +50,7 @@ function d(e, t) {
|
|
|
50
50
|
return t;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function ee(e, t, n) {
|
|
54
54
|
if (!e) return n;
|
|
55
55
|
let r;
|
|
56
56
|
try {
|
|
@@ -60,7 +60,7 @@ function f(e, t, n) {
|
|
|
60
60
|
}
|
|
61
61
|
return d(r, n);
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function te(t, n, r) {
|
|
64
64
|
if (!t) return !1;
|
|
65
65
|
try {
|
|
66
66
|
return t.setItem(n, JSON.stringify(r)), !0;
|
|
@@ -68,85 +68,85 @@ function ee(t, n, r) {
|
|
|
68
68
|
return e.warn(`storage: failed to write "${n}"`, t), !1;
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function ne(e, t) {
|
|
72
72
|
if (e) try {
|
|
73
73
|
e.removeItem(t);
|
|
74
74
|
} catch {}
|
|
75
75
|
}
|
|
76
|
-
function
|
|
77
|
-
return f(u(e), t, n);
|
|
78
|
-
}
|
|
79
|
-
function ne(e, t, n) {
|
|
76
|
+
function f(e, t, n) {
|
|
80
77
|
return ee(u(e), t, n);
|
|
81
78
|
}
|
|
82
|
-
function re(e, t) {
|
|
83
|
-
te(u(e), t);
|
|
79
|
+
function re(e, t, n) {
|
|
80
|
+
return te(u(e), t, n);
|
|
84
81
|
}
|
|
85
|
-
function ie(e, t
|
|
86
|
-
|
|
82
|
+
function ie(e, t) {
|
|
83
|
+
ne(u(e), t);
|
|
87
84
|
}
|
|
88
|
-
function
|
|
89
|
-
return
|
|
85
|
+
function ae(e, t = null) {
|
|
86
|
+
return f("local", e, t);
|
|
90
87
|
}
|
|
91
|
-
function
|
|
92
|
-
re("local", e);
|
|
88
|
+
function p(e, t) {
|
|
89
|
+
return re("local", e, t);
|
|
93
90
|
}
|
|
94
|
-
function
|
|
95
|
-
|
|
91
|
+
function oe(e) {
|
|
92
|
+
ie("local", e);
|
|
96
93
|
}
|
|
97
|
-
function
|
|
98
|
-
return
|
|
94
|
+
function m(e, t = null) {
|
|
95
|
+
return f("session", e, t);
|
|
99
96
|
}
|
|
100
|
-
function
|
|
101
|
-
re("session", e);
|
|
97
|
+
function h(e, t) {
|
|
98
|
+
return re("session", e, t);
|
|
99
|
+
}
|
|
100
|
+
function se(e) {
|
|
101
|
+
ie("session", e);
|
|
102
102
|
}
|
|
103
103
|
//#endregion
|
|
104
104
|
//#region src/lib/config.js
|
|
105
|
-
var
|
|
106
|
-
function
|
|
105
|
+
var ce = t("VC:config", { enabled: !0 }), g = null;
|
|
106
|
+
function le(e) {
|
|
107
107
|
let t = e || null;
|
|
108
|
-
|
|
108
|
+
g && t && t !== g && ce.warn("[VC] setWidgetKey called again with a DIFFERENT key. The widget key is module-global, so every calendar on this page will now use the last one set — any element configured with the previous key will get 403s on its public reads and render empty. Give each element its own widget-key attribute (threaded per-instance) rather than calling setWidgetKey() more than once."), g = t;
|
|
109
109
|
}
|
|
110
|
-
function
|
|
111
|
-
if (
|
|
110
|
+
function _() {
|
|
111
|
+
if (g) return g;
|
|
112
112
|
}
|
|
113
|
-
var
|
|
114
|
-
function
|
|
115
|
-
|
|
113
|
+
var v = null;
|
|
114
|
+
function ue(e) {
|
|
115
|
+
v = typeof e == "string" && e.trim() ? e.trim() : null;
|
|
116
116
|
}
|
|
117
|
-
function
|
|
118
|
-
return (
|
|
117
|
+
function de() {
|
|
118
|
+
return (v || w().baseUrl || "").replace(/\/+$/, "");
|
|
119
119
|
}
|
|
120
|
-
function
|
|
121
|
-
var
|
|
120
|
+
function fe(e) {}
|
|
121
|
+
var y = {
|
|
122
122
|
postMessageOnSuccess: !1,
|
|
123
123
|
postMessageTargetOrigin: null
|
|
124
124
|
};
|
|
125
|
-
function
|
|
126
|
-
|
|
127
|
-
...
|
|
125
|
+
function pe(e = {}) {
|
|
126
|
+
y = {
|
|
127
|
+
...y,
|
|
128
128
|
...e
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
|
-
function
|
|
132
|
-
return { ...
|
|
131
|
+
function me() {
|
|
132
|
+
return { ...y };
|
|
133
133
|
}
|
|
134
134
|
//#endregion
|
|
135
135
|
//#region src/lib/api/client.ts
|
|
136
|
-
var
|
|
137
|
-
function
|
|
138
|
-
return
|
|
139
|
-
|
|
136
|
+
var b = t("VC"), x = /* @__PURE__ */ new Set();
|
|
137
|
+
function he(e) {
|
|
138
|
+
return x.add(e), () => {
|
|
139
|
+
x.delete(e);
|
|
140
140
|
};
|
|
141
141
|
}
|
|
142
|
-
function
|
|
143
|
-
if (e) for (let t of
|
|
142
|
+
function ge(e) {
|
|
143
|
+
if (e) for (let t of x) try {
|
|
144
144
|
t(e);
|
|
145
145
|
} catch {}
|
|
146
146
|
}
|
|
147
|
-
var
|
|
148
|
-
function
|
|
149
|
-
let n = t ||
|
|
147
|
+
var _e = "ABORTED";
|
|
148
|
+
function S(e, t) {
|
|
149
|
+
let n = t || _();
|
|
150
150
|
return n ? {
|
|
151
151
|
...e,
|
|
152
152
|
"X-Widget-Key": n
|
|
@@ -172,7 +172,7 @@ var ye = class extends Error {
|
|
|
172
172
|
timeout: 3e4,
|
|
173
173
|
retries: 2,
|
|
174
174
|
retryDelay: 500,
|
|
175
|
-
onError: (e) =>
|
|
175
|
+
onError: (e) => b.error("API Error:", e)
|
|
176
176
|
};
|
|
177
177
|
function be(e) {
|
|
178
178
|
C = {
|
|
@@ -227,7 +227,7 @@ async function A(e, t, n, r) {
|
|
|
227
227
|
try {
|
|
228
228
|
let t = await D(i, {
|
|
229
229
|
method: e,
|
|
230
|
-
headers:
|
|
230
|
+
headers: S({
|
|
231
231
|
"Content-Type": "application/json",
|
|
232
232
|
...s
|
|
233
233
|
}, a),
|
|
@@ -236,7 +236,7 @@ async function A(e, t, n, r) {
|
|
|
236
236
|
}, C);
|
|
237
237
|
if (!t.ok) {
|
|
238
238
|
let { message: e, code: n } = ve(await t.json().catch(() => ({})), t.status);
|
|
239
|
-
return l(new ye(e, n, t.status)),
|
|
239
|
+
return l(new ye(e, n, t.status)), ge(n), {
|
|
240
240
|
success: !1,
|
|
241
241
|
error: e,
|
|
242
242
|
errorCode: n,
|
|
@@ -252,7 +252,7 @@ async function A(e, t, n, r) {
|
|
|
252
252
|
if (r?.signal?.aborted) return {
|
|
253
253
|
success: !1,
|
|
254
254
|
error: "Request aborted",
|
|
255
|
-
errorCode:
|
|
255
|
+
errorCode: _e,
|
|
256
256
|
aborted: !0
|
|
257
257
|
};
|
|
258
258
|
let t = e instanceof Error ? e.name === "AbortError" ? "Request timed out" : e.message : "Unknown error";
|
|
@@ -272,15 +272,15 @@ async function we(e, t) {
|
|
|
272
272
|
try {
|
|
273
273
|
let n = e.startsWith(C.baseUrl), { widgetKey: r, ...i } = t ?? {}, a = await D(e, {
|
|
274
274
|
...i,
|
|
275
|
-
...n ? { headers:
|
|
275
|
+
...n ? { headers: S(i.headers, r) } : {}
|
|
276
276
|
}, C);
|
|
277
277
|
if (!a.ok) {
|
|
278
278
|
let e = await a.json().catch(() => ({}));
|
|
279
|
-
return
|
|
279
|
+
return b.error(`API request failed: ${a.status}`, e), null;
|
|
280
280
|
}
|
|
281
281
|
return a.json();
|
|
282
282
|
} catch (e) {
|
|
283
|
-
return
|
|
283
|
+
return b.error("API request error:", e), null;
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
286
|
//#endregion
|
|
@@ -418,11 +418,11 @@ function We() {
|
|
|
418
418
|
return `${n[0]}${n[1]}${n[2]}${n[3]}-${n[4]}${n[5]}-${n[6]}${n[7]}-${n[8]}${n[9]}-${n[10]}${n[11]}${n[12]}${n[13]}${n[14]}${n[15]}`;
|
|
419
419
|
}
|
|
420
420
|
function Ge() {
|
|
421
|
-
let e =
|
|
422
|
-
return e || (e = We(),
|
|
421
|
+
let e = m(Ve);
|
|
422
|
+
return e || (e = We(), h(Ve, e)), e;
|
|
423
423
|
}
|
|
424
424
|
function Ke(e) {
|
|
425
|
-
let t =
|
|
425
|
+
let t = ae(G);
|
|
426
426
|
if (Ue(t)) return {
|
|
427
427
|
id: t,
|
|
428
428
|
createdAt: e,
|
|
@@ -443,12 +443,12 @@ function Ke(e) {
|
|
|
443
443
|
function K() {
|
|
444
444
|
if (!W()) return null;
|
|
445
445
|
let e = Date.now(), t = Ke(e);
|
|
446
|
-
if (t && e - t.createdAt < 34128e6) return t.migrated &&
|
|
446
|
+
if (t && e - t.createdAt < 34128e6) return t.migrated && p(G, {
|
|
447
447
|
id: t.id,
|
|
448
448
|
createdAt: t.createdAt
|
|
449
449
|
}), t.id;
|
|
450
450
|
let n = We();
|
|
451
|
-
return
|
|
451
|
+
return p(G, {
|
|
452
452
|
id: n,
|
|
453
453
|
createdAt: e
|
|
454
454
|
}), n;
|
|
@@ -469,12 +469,12 @@ function Ye(e) {
|
|
|
469
469
|
return P(e.utm) || Je(e.referrer, e.pageUrl);
|
|
470
470
|
}
|
|
471
471
|
function Xe() {
|
|
472
|
-
let e =
|
|
472
|
+
let e = m(qe);
|
|
473
473
|
return !e || !e.utm || typeof e.utm.utmSource != "string" ? null : e;
|
|
474
474
|
}
|
|
475
475
|
function Ze(e = R()) {
|
|
476
476
|
let t = Ye(e), n = Xe();
|
|
477
|
-
!t && n ||
|
|
477
|
+
!t && n || h(qe, {
|
|
478
478
|
utm: e.utm,
|
|
479
479
|
referrer: e.referrer,
|
|
480
480
|
marketing: t
|
|
@@ -535,10 +535,10 @@ function ot(e) {
|
|
|
535
535
|
return Number.isFinite(t) ? t : null;
|
|
536
536
|
}
|
|
537
537
|
function st(e) {
|
|
538
|
-
let t =
|
|
538
|
+
let t = m(rt, []) ?? [];
|
|
539
539
|
if (t.includes(e)) return !0;
|
|
540
540
|
let n = [...t, e];
|
|
541
|
-
return
|
|
541
|
+
return h(rt, n.length > it ? n.slice(-300) : n), !1;
|
|
542
542
|
}
|
|
543
543
|
async function J(e, { eventId: t = null, widgetId: n, venueId: r, error: i, cartId: a } = {}) {
|
|
544
544
|
if (typeof window > "u" || Le()) return;
|
|
@@ -712,13 +712,13 @@ function St({ defaults: e, locales: t = {}, loaders: r = {} }) {
|
|
|
712
712
|
let n = t.split("-")[0];
|
|
713
713
|
return s(n) || r[n] ? c(n) : Promise.resolve(null);
|
|
714
714
|
}
|
|
715
|
-
function
|
|
715
|
+
function ee() {
|
|
716
716
|
return Array.from(/* @__PURE__ */ new Set([...Object.keys(t), ...Object.keys(r)]));
|
|
717
717
|
}
|
|
718
718
|
return {
|
|
719
719
|
resolveLocale: l,
|
|
720
720
|
getLabelsForLocale: u,
|
|
721
|
-
listLocales:
|
|
721
|
+
listLocales: ee,
|
|
722
722
|
loadLocale: d
|
|
723
723
|
};
|
|
724
724
|
}
|
|
@@ -977,4 +977,4 @@ async function Nt(e) {
|
|
|
977
977
|
}
|
|
978
978
|
}
|
|
979
979
|
//#endregion
|
|
980
|
-
export { oe as $, Oe as A,
|
|
980
|
+
export { oe as $, Oe as A, he as B, W as C, Ie as D, Pe as E, k as F, de as G, Ce as H, be as I, ue as J, _ as K, w as L, N as M, Se as N, Be as O, O as P, m as Q, E as R, K as S, Fe as T, S as U, we as V, me as W, le as X, fe as Y, ae as Z, mt as _, At as a, lt as b, jt as c, X as d, se as et, ft as f, ut as g, ct as h, Nt as i, M as j, ke as k, Z as l, dt as m, Mt as n, h as nt, Dt as o, pt as p, pe as q, Ot as r, l as rt, kt as s, Tt as t, p as tt, St as u, ht as v, Le as w, q as x, gt as y, T as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { g as e } from "./sizing-B7ixYndz.js";
|
|
2
2
|
import { r as t } from "./Button-VUB2WJ88.js";
|
|
3
|
-
import { C as n, O as r, w as i } from "./orders-
|
|
3
|
+
import { C as n, O as r, w as i } from "./orders-2lTsorF-.js";
|
|
4
4
|
//#region src/lib/embed-bridge.js
|
|
5
5
|
var a = e("embed-bridge"), o = "micdrop-calendar", s = Object.freeze({
|
|
6
6
|
NAVIGATION: "MICDROP_NAVIGATION",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { g as e } from "./sizing-B7ixYndz.js";
|
|
2
|
-
import {
|
|
3
|
-
import "./event-transform-
|
|
2
|
+
import { $ as t, F as n, M as r, P as i, Z as a, rt as o, tt as s, z as c } from "./orders-2lTsorF-.js";
|
|
3
|
+
import "./event-transform-2AkuKTGX.js";
|
|
4
4
|
//#region node_modules/js-cookie/dist/js.cookie.mjs
|
|
5
5
|
function l(e) {
|
|
6
6
|
for (var t = 1; t < arguments.length; t++) {
|
|
@@ -82,19 +82,19 @@ function E() {
|
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
84
|
function D(e) {
|
|
85
|
-
let
|
|
85
|
+
let n = {}, r = {}, i = [], o = "", c = 0, l = {};
|
|
86
86
|
if (typeof window > "u") return {
|
|
87
|
-
quantities:
|
|
88
|
-
donationAmounts:
|
|
87
|
+
quantities: n,
|
|
88
|
+
donationAmounts: r,
|
|
89
89
|
addOnQuantities: l,
|
|
90
|
-
promocode:
|
|
90
|
+
promocode: o,
|
|
91
91
|
promoDiscountAmount: c,
|
|
92
|
-
tickets:
|
|
92
|
+
tickets: i
|
|
93
93
|
};
|
|
94
94
|
let u = a(y(e), null);
|
|
95
95
|
if (!u) {
|
|
96
|
-
let
|
|
97
|
-
|
|
96
|
+
let n = a(b(e), null);
|
|
97
|
+
n && (u = n, s(y(e), n), t(b(e)));
|
|
98
98
|
}
|
|
99
99
|
if (u) return {
|
|
100
100
|
quantities: u.quantities || {},
|
|
@@ -105,40 +105,40 @@ function D(e) {
|
|
|
105
105
|
tickets: u.tickets || []
|
|
106
106
|
};
|
|
107
107
|
try {
|
|
108
|
-
|
|
108
|
+
n = JSON.parse(m(`checkout-quantities-${e}`) || "{}");
|
|
109
109
|
} catch (e) {
|
|
110
|
-
g.warn("Failed to parse checkout quantities cookie:", e),
|
|
110
|
+
g.warn("Failed to parse checkout quantities cookie:", e), n = {};
|
|
111
111
|
}
|
|
112
112
|
try {
|
|
113
|
-
|
|
113
|
+
i = JSON.parse(m(`checkout-tickets-${e}`) || "[]");
|
|
114
114
|
} catch (e) {
|
|
115
|
-
g.warn("Failed to parse checkout tickets cookie:", e),
|
|
115
|
+
g.warn("Failed to parse checkout tickets cookie:", e), i = [];
|
|
116
116
|
}
|
|
117
|
-
return
|
|
117
|
+
return o = m(`checkout-promocode-${e}`) || "", c = parseFloat(m(`checkout-promo-discount-${e}`) || "0"), (Object.keys(n).length > 0 || i.length > 0 || o) && (A({
|
|
118
118
|
eventID: e,
|
|
119
|
-
quantities:
|
|
120
|
-
donationAmounts:
|
|
121
|
-
promocode:
|
|
119
|
+
quantities: n,
|
|
120
|
+
donationAmounts: r,
|
|
121
|
+
promocode: o,
|
|
122
122
|
promoDiscountAmount: c,
|
|
123
|
-
tickets:
|
|
123
|
+
tickets: i
|
|
124
124
|
}), O(e)), {
|
|
125
|
-
quantities:
|
|
126
|
-
donationAmounts:
|
|
125
|
+
quantities: n,
|
|
126
|
+
donationAmounts: r,
|
|
127
127
|
addOnQuantities: l,
|
|
128
|
-
promocode:
|
|
128
|
+
promocode: o,
|
|
129
129
|
promoDiscountAmount: c,
|
|
130
|
-
tickets:
|
|
130
|
+
tickets: i
|
|
131
131
|
};
|
|
132
132
|
}
|
|
133
133
|
function O(e) {
|
|
134
134
|
h(`checkout-quantities-${e}`), h(`checkout-tickets-${e}`), h(`checkout-promocode-${e}`), h(`checkout-promo-discount-${e}`);
|
|
135
135
|
}
|
|
136
136
|
function k(e) {
|
|
137
|
-
|
|
137
|
+
t(y(e)), t(b(e)), O(e), h(`checkout-promo-discount-type-${e}`), h(`checkout-promo-reveal-${e}`), h(`checkout-promo-reveal-ids-${e}`), h(`checkout-promo-ticket-ids-${e}`);
|
|
138
138
|
}
|
|
139
|
-
function A({ eventID: e, quantities: t, donationAmounts: n, addOnQuantities: r, promocode: i, promoDiscountAmount: a, tickets:
|
|
139
|
+
function A({ eventID: e, quantities: t, donationAmounts: n, addOnQuantities: r, promocode: i, promoDiscountAmount: a, tickets: o }) {
|
|
140
140
|
if (typeof window > "u") return;
|
|
141
|
-
let c = (
|
|
141
|
+
let c = (o || []).map((e) => ({
|
|
142
142
|
ID: e.ID,
|
|
143
143
|
name: e.name,
|
|
144
144
|
price: e.price,
|
|
@@ -154,22 +154,22 @@ function A({ eventID: e, quantities: t, donationAmounts: n, addOnQuantities: r,
|
|
|
154
154
|
tickets: c,
|
|
155
155
|
updatedAt: Date.now()
|
|
156
156
|
};
|
|
157
|
-
|
|
157
|
+
s(y(e), l);
|
|
158
158
|
}
|
|
159
159
|
function j(e) {
|
|
160
160
|
if (!e) return null;
|
|
161
|
-
let
|
|
162
|
-
if (
|
|
163
|
-
let
|
|
164
|
-
if (
|
|
165
|
-
let
|
|
166
|
-
return
|
|
161
|
+
let n = a(x(e), null);
|
|
162
|
+
if (n != null) return P(n);
|
|
163
|
+
let r = a(S(e), null);
|
|
164
|
+
if (r == null) return null;
|
|
165
|
+
let i = P(r);
|
|
166
|
+
return i != null && (s(x(e), i), t(S(e))), i;
|
|
167
167
|
}
|
|
168
168
|
function M(e, t) {
|
|
169
|
-
!e || !Number.isFinite(t) ||
|
|
169
|
+
!e || !Number.isFinite(t) || s(x(e), t);
|
|
170
170
|
}
|
|
171
171
|
function N(e) {
|
|
172
|
-
e && (
|
|
172
|
+
e && (t(x(e)), t(S(e)));
|
|
173
173
|
}
|
|
174
174
|
function P(e) {
|
|
175
175
|
let t = typeof e == "number" ? e : parseInt(e, 10);
|
|
@@ -190,10 +190,10 @@ function I(e) {
|
|
|
190
190
|
return a(F(e), null);
|
|
191
191
|
}
|
|
192
192
|
function L(e, t) {
|
|
193
|
-
t &&
|
|
193
|
+
t && s(F(e), t);
|
|
194
194
|
}
|
|
195
195
|
function R(e) {
|
|
196
|
-
|
|
196
|
+
t(F(e));
|
|
197
197
|
}
|
|
198
198
|
//#endregion
|
|
199
199
|
//#region src/lib/api/surge-queue.ts
|
|
@@ -229,7 +229,7 @@ function J(e) {
|
|
|
229
229
|
}
|
|
230
230
|
async function Y(e) {
|
|
231
231
|
try {
|
|
232
|
-
let t = await
|
|
232
|
+
let t = await i(`/events/${e}/queue`);
|
|
233
233
|
return t.success ? {
|
|
234
234
|
armed: t.data?.armed === !0,
|
|
235
235
|
mode: G(t.data?.mode),
|
|
@@ -242,21 +242,21 @@ async function Y(e) {
|
|
|
242
242
|
}
|
|
243
243
|
async function X(e) {
|
|
244
244
|
try {
|
|
245
|
-
let
|
|
246
|
-
if (!
|
|
245
|
+
let t = await n(`/events/${e}/queue/join`, {});
|
|
246
|
+
if (!t.success) return {
|
|
247
247
|
success: !1,
|
|
248
|
-
errorCode:
|
|
249
|
-
statusCode:
|
|
248
|
+
errorCode: t.errorCode || "queue_unavailable",
|
|
249
|
+
statusCode: t.statusCode
|
|
250
250
|
};
|
|
251
|
-
let r = J(
|
|
251
|
+
let r = J(t.data);
|
|
252
252
|
return r ? {
|
|
253
253
|
success: !0,
|
|
254
254
|
entry: r,
|
|
255
|
-
statusCode:
|
|
255
|
+
statusCode: t.statusCode
|
|
256
256
|
} : {
|
|
257
257
|
success: !1,
|
|
258
258
|
errorCode: B,
|
|
259
|
-
statusCode:
|
|
259
|
+
statusCode: t.statusCode
|
|
260
260
|
};
|
|
261
261
|
} catch (e) {
|
|
262
262
|
return z.error("joinQueue error:", e), {
|
|
@@ -271,16 +271,16 @@ async function Z(e, t) {
|
|
|
271
271
|
errorCode: B
|
|
272
272
|
};
|
|
273
273
|
try {
|
|
274
|
-
let n = await
|
|
274
|
+
let n = await i(`/events/${e}/queue/status?token=${encodeURIComponent(t)}`);
|
|
275
275
|
if (!n.success) return {
|
|
276
276
|
success: !1,
|
|
277
277
|
errorCode: n.errorCode || "queue_unavailable",
|
|
278
278
|
statusCode: n.statusCode
|
|
279
279
|
};
|
|
280
|
-
let
|
|
281
|
-
return
|
|
280
|
+
let r = J(n.data);
|
|
281
|
+
return r ? {
|
|
282
282
|
success: !0,
|
|
283
|
-
entry:
|
|
283
|
+
entry: r,
|
|
284
284
|
statusCode: n.statusCode
|
|
285
285
|
} : {
|
|
286
286
|
success: !1,
|
|
@@ -294,10 +294,10 @@ async function Z(e, t) {
|
|
|
294
294
|
};
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
|
-
async function ne(e,
|
|
298
|
-
if (!
|
|
297
|
+
async function ne(e, t) {
|
|
298
|
+
if (!t) return { released: !1 };
|
|
299
299
|
try {
|
|
300
|
-
return { released: (await
|
|
300
|
+
return { released: (await n(`/events/${e}/queue/leave`, { token: t }, {
|
|
301
301
|
keepalive: !0,
|
|
302
302
|
suppressOnError: !0
|
|
303
303
|
})).data?.released === !0 };
|
|
@@ -330,8 +330,8 @@ async function ae() {
|
|
|
330
330
|
}
|
|
331
331
|
async function oe(e) {
|
|
332
332
|
try {
|
|
333
|
-
let t = await
|
|
334
|
-
if (!t.success) throw new
|
|
333
|
+
let t = await i(`/venues/${e}`);
|
|
334
|
+
if (!t.success) throw new o(t.error ?? `API error: ${t.statusCode}`, t.statusCode ?? 0, {
|
|
335
335
|
endpoint: `/venues/${e}`,
|
|
336
336
|
method: "GET"
|
|
337
337
|
});
|
|
@@ -340,7 +340,7 @@ async function oe(e) {
|
|
|
340
340
|
throw Q.error("getVenueDetails error:", e), e;
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
async function $(e = {},
|
|
343
|
+
async function $(e = {}, t) {
|
|
344
344
|
try {
|
|
345
345
|
let r = await ae(), { eventID: i, quantities: a, donationAmounts: o, ...s } = e, c = a ? Object.fromEntries(Object.entries(a).map(([e, t]) => [parseInt(e, 10), t])) : {}, l = o ? Object.fromEntries(Object.entries(o).filter(([, e]) => parseFloat(String(e)) > 0).map(([e, t]) => [parseInt(e, 10), parseFloat(String(t))])) : void 0, u = {
|
|
346
346
|
purchaserIP: r,
|
|
@@ -348,7 +348,7 @@ async function $(e = {}, n) {
|
|
|
348
348
|
quantities: c,
|
|
349
349
|
...l && Object.keys(l).length > 0 ? { donationAmounts: l } : {},
|
|
350
350
|
...s
|
|
351
|
-
}, d = await
|
|
351
|
+
}, d = await n("/orders/create", u, t ? { headers: { "X-Queue-Token": t } } : void 0), f = d.data ?? {};
|
|
352
352
|
if (!d.success || f.error) {
|
|
353
353
|
let e = re(f.error) || (typeof f.message == "string" ? f.message : "") || d.error || "Order creation failed";
|
|
354
354
|
if ((d.errorCode || ie(f.error)) === "QUEUE_REQUIRED") return {
|
|
@@ -380,10 +380,10 @@ async function $(e = {}, n) {
|
|
|
380
380
|
}
|
|
381
381
|
async function se(e) {
|
|
382
382
|
try {
|
|
383
|
-
let t = await
|
|
383
|
+
let t = await i(`/orders/${e}`);
|
|
384
384
|
if (!t.success) {
|
|
385
385
|
let n = t.error ?? `Failed to fetch order (${t.statusCode})`;
|
|
386
|
-
throw Q.error("getOrder error response:", n), new
|
|
386
|
+
throw Q.error("getOrder error response:", n), new o(n, t.statusCode ?? 0, {
|
|
387
387
|
endpoint: `/orders/${e}`,
|
|
388
388
|
method: "GET"
|
|
389
389
|
});
|
|
@@ -397,9 +397,9 @@ async function se(e) {
|
|
|
397
397
|
//#region src/lib/utils/utm.ts
|
|
398
398
|
var ce = e("utm");
|
|
399
399
|
async function le(e) {
|
|
400
|
-
let t = new URLSearchParams(window.location.search),
|
|
400
|
+
let t = new URLSearchParams(window.location.search), n = r(t.get("utm_source")) || "direct";
|
|
401
401
|
try {
|
|
402
|
-
await fetch(`${c()}/utm/${e}/${encodeURIComponent(
|
|
402
|
+
await fetch(`${c()}/utm/${e}/${encodeURIComponent(n)}`);
|
|
403
403
|
} catch (e) {
|
|
404
404
|
ce.error("UTM tracking failed:", e);
|
|
405
405
|
}
|