@getmicdrop/venue-calendar 4.3.18 → 4.3.20
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/{ArrowLeftIcon-BYu_Qbkb.js → ArrowLeftIcon-B6XUGpop.js} +1 -1
- package/dist/{Badge-DCHGGod2.js → Badge-n7TfNjln.js} +1 -1
- package/dist/{BlockPlaceholder-BoPMt_9Z.js → BlockPlaceholder-hsdlaBnA.js} +2 -2
- package/dist/{Button-vmWb6wKc.js → Button-klwKgfhG.js} +91 -68
- package/dist/{Calendar-V0u5h9jS.js → Calendar-mTCyUfCM.js} +5 -5
- package/dist/{CalendarFoundryView-8W0A4tl0.js → CalendarFoundryView-D55nnNNn.js} +30 -30
- package/dist/{CalendarIcon-C8-UVSje.js → CalendarIcon-DxSu-1DJ.js} +1 -1
- package/dist/{CartView-Ce0yKXNh.js → CartView-CebO-Th3.js} +126 -125
- package/dist/{Checkout-C0lQ0AwV.js → Checkout-Cc_aU50W.js} +18 -18
- package/dist/{Checkout-ByQsDGg3.js → Checkout-DYF-ES2Q.js} +171 -166
- package/dist/{CheckoutTimer-B0E9KnHc.js → CheckoutTimer-DiVoyBfw.js} +3 -3
- package/dist/{ChevronDownIcon-C1uJ2yvz.js → ChevronDownIcon-BDgtb-f-.js} +1 -1
- package/dist/{ClockIcon-Dk9q65sX.js → ClockIcon-DWPagxrA.js} +1 -1
- package/dist/{CloseIcon-CyR73vpD.js → CloseIcon-BVaXYU7Q.js} +1 -1
- package/dist/{CollectionView-BxpZehV9.js → CollectionView-Bt-mwGkJ.js} +8 -8
- package/dist/{CropImage-BOT2Fojj.js → CropImage-B9d215n1.js} +4 -4
- package/dist/{Event-BhfnEP7c.js → Event-omuqSNCd.js} +71 -70
- package/dist/EventPage-0Yel6tyg.js +1155 -0
- package/dist/{Heading-Br1Yqnvg.js → Heading-D6bWtGZA.js} +1 -1
- package/dist/{Image-M5RaWbKU.js → Image-GWt4S2Xa.js} +1 -1
- package/dist/{Input-Bk8lP6TX.js → Input-CdSv8k7C.js} +2 -2
- package/dist/{MailIcon-Ic2SruY-.js → MailIcon-D1kB8YIm.js} +1 -1
- package/dist/{Modal-CLeZUJ_i.js → Modal-gEHiBqWZ.js} +2 -2
- package/dist/{ModalFooter-CSoG_uic.js → ModalFooter-D21lJobf.js} +1 -1
- package/dist/{ModalHeader-DpKxDJT_.js → ModalHeader-fa2P2o57.js} +2 -2
- package/dist/{PasswordInput-BHj_lokg.js → PasswordInput-ClW4V5aJ.js} +2 -2
- package/dist/{RecommendationsRail-8AVZ0aLE.js → RecommendationsRail-B1psK9wy.js} +7 -7
- package/dist/{ScarcityBadge-nK2AQY3W.js → ScarcityBadge-Bp5PeXnY.js} +5 -5
- package/dist/{SeriesPage-DynN1IWH.js → SeriesPage-CQQM8yM4.js} +5 -5
- package/dist/{Spinner-a1KCKWxZ.js → Spinner-D8dOJe6O.js} +2 -2
- package/dist/{Success-Cd3KhNfN.js → Success-B-dMRrrQ.js} +73 -72
- package/dist/{TagIcon-BiYfs6T7.js → TagIcon-C5Pftz3x.js} +1 -1
- package/dist/{ViewTicketsEmbed-Lxg7n02-.js → ViewTicketsEmbed-BB0RnYzO.js} +9 -9
- package/dist/{WarningCircleIcon-AuYbQdPU.js → WarningCircleIcon-DSEX92MS.js} +1 -1
- package/dist/{WarningTriIcon-BzI-tSDG.js → WarningTriIcon-BZ0Vypl3.js} +1 -1
- package/dist/__SKIP_PATHS__-BQgiZG5h.js +37 -0
- package/dist/{api-C1M2t6HU.js → api-shjFa9FF.js} +4 -4
- package/dist/{browser-DrfMvEfn.js → browser-B_8qS4Bh.js} +1 -1
- package/dist/{constants-YG4UeBdR.js → constants-DYUMWpub.js} +1 -1
- package/dist/{copyToClipboard-3SejVveg.js → copyToClipboard-CXm6ykbn.js} +1 -1
- package/dist/{defaultLabels-CXCsTwix.js → defaultLabels-O0WBww33.js} +1 -1
- package/dist/{event-transform-DNqGTQhp.js → event-transform-Dc-1uKqG.js} +15 -15
- package/dist/{eventStatusStream-CLLN-Rvf.js → eventStatusStream-DV25oAL5.js} +2 -2
- package/dist/{href-DuxMJt4c.js → href-B9gyMxPK.js} +3 -3
- package/dist/{i18n-Ct9Bo-Vp.js → i18n-CzZfkIsL.js} +5 -5
- package/dist/{i18n-KdVjJUV5.js → i18n-DmBGDLUG.js} +2 -2
- package/dist/{imageOptimizer-Ba8P7ZEJ.js → imageOptimizer-CXtAyNGI.js} +2 -2
- package/dist/{event-DAjJ01GM.js → navigation-B4lnLFo1.js} +57 -24
- package/dist/{order-totals-DyVkHVqG.js → order-totals-CJBxOV1W.js} +3 -3
- package/dist/{orders-rH0WZYOW.js → orders-B22egWyB.js} +2 -2
- package/dist/{phoneUtils-BFrVEwkQ.js → phoneUtils-sFYidfQ9.js} +1 -1
- package/dist/{pixels-mdd6C3Bk.js → pixels-f66b9MW0.js} +3 -3
- package/dist/{promo-CTRn_F4t.js → promo-C05OA-90.js} +1 -1
- package/dist/{scarcity-Ccj5RlrR.js → scarcity-BvvpXH8o.js} +1 -1
- package/dist/seo/HostSeoController.d.ts +9 -7
- package/dist/seo/seo.cjs +1 -1
- package/dist/seo/seo.mjs +13 -1
- package/dist/{serverTotals-Dk3z9sIA.js → serverTotals-BCfUAcv0.js} +1 -1
- package/dist/{showcase-state-options-8-egiV5-.js → showcase-state-options-BKJejE2a.js} +1 -1
- package/dist/{to-event-card-props-a4k6D100.js → to-event-card-props-CqOnItRm.js} +54 -47
- package/dist/types/index.d.ts +7 -0
- package/dist/{utils-BseYYrbn.js → utils-silGk-bs.js} +3 -3
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +1313 -1278
- package/dist/venue-calendar.iife.js +60 -60
- package/dist/venue-calendar.umd.js +51 -51
- package/package.json +2 -2
- package/dist/EventPage-DMeqzHxR.js +0 -1154
- package/dist/__SKIP_PATHS__-CnJ51yD_.js +0 -64
- /package/dist/locales/{4.3.18 → 4.3.20}/flow/de.js +0 -0
- /package/dist/locales/{4.3.18 → 4.3.20}/flow/es.js +0 -0
- /package/dist/locales/{4.3.18 → 4.3.20}/flow/fr.js +0 -0
- /package/dist/locales/{4.3.18 → 4.3.20}/flow/id.js +0 -0
- /package/dist/locales/{4.3.18 → 4.3.20}/flow/it.js +0 -0
- /package/dist/locales/{4.3.18 → 4.3.20}/flow/ja.js +0 -0
- /package/dist/locales/{4.3.18 → 4.3.20}/flow/ko.js +0 -0
- /package/dist/locales/{4.3.18 → 4.3.20}/flow/nl.js +0 -0
- /package/dist/locales/{4.3.18 → 4.3.20}/flow/pl.js +0 -0
- /package/dist/locales/{4.3.18 → 4.3.20}/flow/pt-br.js +0 -0
- /package/dist/locales/{4.3.18 → 4.3.20}/flow/tr.js +0 -0
- /package/dist/locales/{4.3.18 → 4.3.20}/flow/zh.js +0 -0
- /package/dist/locales/{4.3.18 → 4.3.20}/main/de.js +0 -0
- /package/dist/locales/{4.3.18 → 4.3.20}/main/es.js +0 -0
- /package/dist/locales/{4.3.18 → 4.3.20}/main/fr.js +0 -0
- /package/dist/locales/{4.3.18 → 4.3.20}/main/id.js +0 -0
- /package/dist/locales/{4.3.18 → 4.3.20}/main/it.js +0 -0
- /package/dist/locales/{4.3.18 → 4.3.20}/main/ja.js +0 -0
- /package/dist/locales/{4.3.18 → 4.3.20}/main/ko.js +0 -0
- /package/dist/locales/{4.3.18 → 4.3.20}/main/nl.js +0 -0
- /package/dist/locales/{4.3.18 → 4.3.20}/main/pl.js +0 -0
- /package/dist/locales/{4.3.18 → 4.3.20}/main/pt-br.js +0 -0
- /package/dist/locales/{4.3.18 → 4.3.20}/main/tr.js +0 -0
- /package/dist/locales/{4.3.18 → 4.3.20}/main/zh.js +0 -0
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import { C as e, E as t, S as n } from "./Button-
|
|
2
|
-
import { n as r, r as i, t as a } from "./CloseIcon-
|
|
3
|
-
import { i as o } from "./Input-
|
|
4
|
-
import { D as s, S as c, p as l } from "./scarcity-
|
|
5
|
-
import { t as u } from "./TagIcon-
|
|
6
|
-
import { t as d } from "./WarningTriIcon-
|
|
1
|
+
import { C as e, E as t, S as n } from "./Button-klwKgfhG.js";
|
|
2
|
+
import { n as r, r as i, t as a } from "./CloseIcon-BVaXYU7Q.js";
|
|
3
|
+
import { i as o } from "./Input-CdSv8k7C.js";
|
|
4
|
+
import { D as s, S as c, p as l } from "./scarcity-BvvpXH8o.js";
|
|
5
|
+
import { t as u } from "./TagIcon-C5Pftz3x.js";
|
|
6
|
+
import { t as d } from "./WarningTriIcon-BZ0Vypl3.js";
|
|
7
7
|
import { d as f, n as p } from "./z-index-BgKs9X9U.js";
|
|
8
|
-
import { I as m, i as h, k as ee, n as g, t as _, y as v } from "./defaultLabels-
|
|
9
|
-
import {
|
|
10
|
-
import { n as T, t as
|
|
11
|
-
import { a as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { t as oe } from "./
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import
|
|
19
|
-
import { n as ge } from "./
|
|
8
|
+
import { I as m, i as h, k as ee, n as g, t as _, y as v } from "./defaultLabels-O0WBww33.js";
|
|
9
|
+
import { V as y, f as b, i as x, n as S, r as te, s as C, t as w } from "./orders-B22egWyB.js";
|
|
10
|
+
import { n as T, t as ne } from "./serverTotals-BCfUAcv0.js";
|
|
11
|
+
import { a as E, i as D, n as O, r as k, t as A } from "./ModalFooter-D21lJobf.js";
|
|
12
|
+
import { t as j } from "./navigation-B4lnLFo1.js";
|
|
13
|
+
import { a as re, o as ie, s as M, v as ae } from "./api-shjFa9FF.js";
|
|
14
|
+
import { t as oe } from "./venue-CBos8YTa.js";
|
|
15
|
+
import { t as N } from "./event-transform-Dc-1uKqG.js";
|
|
16
|
+
import { _ as se, h as ce, l as le, r as ue, y as de } from "./utils-silGk-bs.js";
|
|
17
|
+
import { a as fe, n as pe } from "./promo-C05OA-90.js";
|
|
18
|
+
import { r as me } from "./order-totals-CJBxOV1W.js";
|
|
19
|
+
import he, { n as ge, t as _e } from "./Checkout-Cc_aU50W.js";
|
|
20
|
+
import { n as ve } from "./buyerEmail-BfCq-gDt.js";
|
|
20
21
|
import "svelte/internal/disclose-version";
|
|
21
22
|
import * as P from "svelte/internal/client";
|
|
22
|
-
import { onMount as
|
|
23
|
+
import { onMount as ye } from "svelte";
|
|
23
24
|
//#region node_modules/@stripe/stripe-js/dist/index.mjs
|
|
24
25
|
function F(e) {
|
|
25
26
|
"@babel/helpers - typeof";
|
|
@@ -31,21 +32,21 @@ function F(e) {
|
|
|
31
32
|
}
|
|
32
33
|
var I = "dahlia", L = function(e) {
|
|
33
34
|
return e === 3 ? "v3" : e;
|
|
34
|
-
},
|
|
35
|
+
}, be = "https://js.stripe.com", R = `${be}/${I}/stripe.js`, z = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/, B = /^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/, V = "loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used", H = function(e) {
|
|
35
36
|
return z.test(e) || B.test(e);
|
|
36
37
|
}, U = function() {
|
|
37
|
-
for (var e = document.querySelectorAll(`script[src^="${
|
|
38
|
+
for (var e = document.querySelectorAll(`script[src^="${be}"]`), t = 0; t < e.length; t++) {
|
|
38
39
|
var n = e[t];
|
|
39
40
|
if (H(n.src)) return n;
|
|
40
41
|
}
|
|
41
42
|
return null;
|
|
42
|
-
},
|
|
43
|
+
}, xe = function(e) {
|
|
43
44
|
var t = e && !e.advancedFraudSignals ? "?advancedFraudSignals=false" : "", n = document.createElement("script");
|
|
44
45
|
n.src = `${R}${t}`;
|
|
45
46
|
var r = document.head || document.body;
|
|
46
47
|
if (!r) throw Error("Expected document.body not to be null. Stripe.js requires a <body> element.");
|
|
47
48
|
return r.appendChild(n), n;
|
|
48
|
-
},
|
|
49
|
+
}, Se = function(e, t) {
|
|
49
50
|
!e || !e._registerWrapper || e._registerWrapper({
|
|
50
51
|
name: "stripe-js",
|
|
51
52
|
version: "9.13.0",
|
|
@@ -59,7 +60,7 @@ var I = "dahlia", L = function(e) {
|
|
|
59
60
|
return function() {
|
|
60
61
|
window.Stripe ? e(window.Stripe) : t(/* @__PURE__ */ Error("Stripe.js not available"));
|
|
61
62
|
};
|
|
62
|
-
},
|
|
63
|
+
}, Ce = function(e) {
|
|
63
64
|
return W === null ? (W = new Promise(function(t, n) {
|
|
64
65
|
if (typeof window > "u" || typeof document > "u") {
|
|
65
66
|
t(null);
|
|
@@ -72,10 +73,10 @@ var I = "dahlia", L = function(e) {
|
|
|
72
73
|
try {
|
|
73
74
|
var r = U();
|
|
74
75
|
if (r && e) console.warn(V);
|
|
75
|
-
else if (!r) r =
|
|
76
|
+
else if (!r) r = xe(e);
|
|
76
77
|
else if (r && K !== null && G !== null) {
|
|
77
78
|
var i;
|
|
78
|
-
r.removeEventListener("load", K), r.removeEventListener("error", G), (i = r.parentNode) == null || i.removeChild(r), r =
|
|
79
|
+
r.removeEventListener("load", K), r.removeEventListener("error", G), (i = r.parentNode) == null || i.removeChild(r), r = xe(e);
|
|
79
80
|
}
|
|
80
81
|
K = J(t, n), G = q(n), r.addEventListener("load", K), r.addEventListener("error", G);
|
|
81
82
|
} catch (e) {
|
|
@@ -85,30 +86,30 @@ var I = "dahlia", L = function(e) {
|
|
|
85
86
|
}), W.catch(function(e) {
|
|
86
87
|
return W = null, Promise.reject(e);
|
|
87
88
|
})) : W;
|
|
88
|
-
},
|
|
89
|
+
}, we = function(e, t, n) {
|
|
89
90
|
if (e === null) return null;
|
|
90
91
|
var r = t[0];
|
|
91
92
|
if (typeof r != "string") throw Error(`Expected publishable key to be of type string, got type ${F(r)} instead.`);
|
|
92
93
|
var i = r.match(/^pk_test/), a = L(e.version), o = I;
|
|
93
94
|
i && a !== o && console.warn(`Stripe.js@${a} was loaded on the page, but @stripe/stripe-js@9.13.0 expected Stripe.js@${o}. This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning`);
|
|
94
95
|
var s = e.apply(void 0, t);
|
|
95
|
-
return
|
|
96
|
-
}, Y, X = !1,
|
|
97
|
-
return Y || (Y =
|
|
96
|
+
return Se(s, n), s;
|
|
97
|
+
}, Y, X = !1, Te = function() {
|
|
98
|
+
return Y || (Y = Ce(null).catch(function(e) {
|
|
98
99
|
return Y = null, Promise.reject(e);
|
|
99
100
|
}), Y);
|
|
100
101
|
};
|
|
101
102
|
Promise.resolve().then(function() {
|
|
102
|
-
return
|
|
103
|
+
return Te();
|
|
103
104
|
}).catch(function(e) {
|
|
104
105
|
X || console.warn(e);
|
|
105
106
|
});
|
|
106
|
-
var
|
|
107
|
+
var Ee = function() {
|
|
107
108
|
var e = [...arguments];
|
|
108
109
|
X = !0;
|
|
109
110
|
var t = Date.now();
|
|
110
|
-
return
|
|
111
|
-
return
|
|
111
|
+
return Te().then(function(n) {
|
|
112
|
+
return we(n, e, t);
|
|
112
113
|
});
|
|
113
114
|
};
|
|
114
115
|
//#endregion
|
|
@@ -183,41 +184,41 @@ function Z(e, t = _) {
|
|
|
183
184
|
}
|
|
184
185
|
//#endregion
|
|
185
186
|
//#region src/components/Events/Checkout/GiftCardInput.svelte
|
|
186
|
-
var Q = t("GiftCardInput"),
|
|
187
|
-
function
|
|
187
|
+
var Q = t("GiftCardInput"), De = P.from_html("<div class=\"applied-card mb-2 svelte-emw0hd\"><div class=\"flex items-center gap-3\"><div class=\"applied-icon svelte-emw0hd\"><!></div> <div class=\"flex flex-col flex-1\"><span class=\"type-caption text-status-success-text\"> </span> <span class=\"type-body font-mono text-text-primary\"> </span></div> <span class=\"type-label text-accent-success\"> </span> <!></div></div>"), Oe = P.from_html("<div class=\"applied-card mb-3 svelte-emw0hd\"><div><!> <span> </span></div></div>"), ke = P.from_html("<div class=\"flex items-center gap-1.5 mt-2 type-body text-accent-danger\"><!> <span> </span></div>"), Ae = P.from_html("<div class=\"input-section svelte-emw0hd\"><div class=\"flex gap-2\"><input type=\"text\" name=\"giftCardCode\" autocomplete=\"off\" autocapitalize=\"characters\"/> <!></div> <!></div>"), je = P.from_html("<div class=\"mb-4\"><!> <!> <button type=\"button\"><!> <span> </span> <span class=\"toggle-indicator svelte-emw0hd\"> </span></button> <!></div>");
|
|
188
|
+
function Me(t, i) {
|
|
188
189
|
P.push(i, !0);
|
|
189
|
-
let o = P.prop(i, "onApplied", 3, () => {}), s = P.prop(i, "onRemoved", 3, () => {}), l = P.prop(i, "disabled", 3, !1), m = P.prop(i, "labels", 3, _), ee = P.prop(i, "owedTotal", 3, 0), g = P.prop(i, "serverGiftCardAmount", 3, null), v = P.state(""), y = P.state(!1), b = P.state(""), x = P.state(P.proxy([])),
|
|
190
|
+
let o = P.prop(i, "onApplied", 3, () => {}), s = P.prop(i, "onRemoved", 3, () => {}), l = P.prop(i, "disabled", 3, !1), m = P.prop(i, "labels", 3, _), ee = P.prop(i, "owedTotal", 3, 0), g = P.prop(i, "serverGiftCardAmount", 3, null), v = P.state(""), y = P.state(!1), b = P.state(""), x = P.state(P.proxy([])), S = P.state(!1), C = P.state(0);
|
|
190
191
|
P.user_effect(() => {
|
|
191
192
|
if (!i.cartId || P.get(x).length > 0 || g() === 0) return;
|
|
192
193
|
let e = !1;
|
|
193
|
-
return
|
|
194
|
+
return te(i.cartId).then((t) => {
|
|
194
195
|
if (e || !t?.giftCards?.length) return;
|
|
195
196
|
let n = t.giftCards.filter((e) => typeof e.amount == "number");
|
|
196
197
|
n.length !== t.giftCards.length && Q.error("Ignored applied gift card(s) with an unusable amount while restoring the panel"), n.length !== 0 && (P.set(x, n.map((e) => ({
|
|
197
198
|
giftCardId: e.giftCardId,
|
|
198
199
|
code: e.maskedCode,
|
|
199
200
|
giftCardAmount: e.amount
|
|
200
|
-
})), !0), P.set(
|
|
201
|
+
})), !0), P.set(C, P.get(x).reduce((e, t) => e + (t.giftCardAmount || 0), 0) + (ee() || 0)));
|
|
201
202
|
}).catch((e) => Q.error("Could not restore applied gift cards:", e)), () => {
|
|
202
203
|
e = !0;
|
|
203
204
|
};
|
|
204
205
|
});
|
|
205
|
-
let
|
|
206
|
-
function
|
|
206
|
+
let w = P.derived(() => P.get(x).reduce((e, t) => e + (t.giftCardAmount || 0), 0)), T = P.derived(() => Math.max(0, P.get(C) - P.get(w))), ne = P.derived(() => P.get(x).length > 0 && P.get(T) <= 0);
|
|
207
|
+
function E() {
|
|
207
208
|
if (P.get(x).length === 0) {
|
|
208
209
|
s()();
|
|
209
210
|
return;
|
|
210
211
|
}
|
|
211
212
|
o()({
|
|
212
213
|
code: P.get(x).map((e) => e.code).join(", "),
|
|
213
|
-
giftCardAmount: P.get(
|
|
214
|
-
stripeAmount: P.get(
|
|
215
|
-
requiresStripe: P.get(
|
|
216
|
-
paymentType: P.get(
|
|
217
|
-
orderTotal: P.get(
|
|
214
|
+
giftCardAmount: P.get(w),
|
|
215
|
+
stripeAmount: P.get(T),
|
|
216
|
+
requiresStripe: P.get(T) > 0,
|
|
217
|
+
paymentType: P.get(T) > 0 ? "split" : "gift_card_only",
|
|
218
|
+
orderTotal: P.get(C)
|
|
218
219
|
});
|
|
219
220
|
}
|
|
220
|
-
async function
|
|
221
|
+
async function D() {
|
|
221
222
|
let e = P.get(v).trim().toUpperCase();
|
|
222
223
|
if (!(!e || P.get(y) || !i.cartId)) {
|
|
223
224
|
if (P.get(x).some((t) => t.code === e)) {
|
|
@@ -226,11 +227,11 @@ function Ae(t, i) {
|
|
|
226
227
|
}
|
|
227
228
|
P.set(y, !0), P.set(b, "");
|
|
228
229
|
try {
|
|
229
|
-
let t = await
|
|
230
|
+
let t = await re(i.cartId, e);
|
|
230
231
|
t.valid ? (P.set(x, [...P.get(x), {
|
|
231
232
|
code: t.giftCardCode || e,
|
|
232
233
|
giftCardAmount: t.giftCardAmount || 0
|
|
233
|
-
}], !0), P.set(
|
|
234
|
+
}], !0), P.set(C, P.get(w) + (t.stripeAmount || 0)), P.set(v, ""), P.set(S, !1), E()) : P.set(b, t.error || m().invalidGiftCardCode || "Invalid gift card code", !0);
|
|
234
235
|
} catch (e) {
|
|
235
236
|
Q.error("Error applying gift card:", e);
|
|
236
237
|
let t = e && typeof e == "object" && typeof e.message == "string" ? e.message : "";
|
|
@@ -239,27 +240,27 @@ function Ae(t, i) {
|
|
|
239
240
|
P.set(y, !1);
|
|
240
241
|
}
|
|
241
242
|
}
|
|
242
|
-
async function
|
|
243
|
+
async function O(e) {
|
|
243
244
|
if (!(P.get(y) || !i.cartId)) {
|
|
244
245
|
P.set(y, !0), P.set(b, "");
|
|
245
246
|
try {
|
|
246
|
-
let t = P.get(x).find((t) => t.code === e), n = await
|
|
247
|
-
n.success !== !1 && !n.error ? (P.set(x, P.get(x).filter((t) => t.code !== e), !0), typeof n.remainingTotal == "number" && P.set(
|
|
247
|
+
let t = P.get(x).find((t) => t.code === e), n = await M(i.cartId, t?.giftCardId ? { giftCardId: t.giftCardId } : { code: e });
|
|
248
|
+
n.success !== !1 && !n.error ? (P.set(x, P.get(x).filter((t) => t.code !== e), !0), typeof n.remainingTotal == "number" && P.set(C, P.get(w) + n.remainingTotal), E()) : P.set(b, n.error || m().failedToRemoveGiftCard || "Failed to remove gift card. Please try again", !0);
|
|
248
249
|
} catch (e) {
|
|
249
250
|
Q.error("Error removing gift card:", e), P.set(b, m().failedToRemoveGiftCard || "Failed to remove gift card. Please try again", !0);
|
|
250
251
|
}
|
|
251
252
|
P.set(y, !1);
|
|
252
253
|
}
|
|
253
254
|
}
|
|
254
|
-
function
|
|
255
|
-
e.key === "Enter" && !P.get(y) &&
|
|
255
|
+
function k(e) {
|
|
256
|
+
e.key === "Enter" && !P.get(y) && D();
|
|
256
257
|
}
|
|
257
|
-
function
|
|
258
|
-
P.set(
|
|
258
|
+
function A() {
|
|
259
|
+
P.set(S, !P.get(S)), P.get(S) || (P.set(v, ""), P.set(b, ""));
|
|
259
260
|
}
|
|
260
|
-
var
|
|
261
|
-
P.each(
|
|
262
|
-
var n =
|
|
261
|
+
var j = je(), ie = P.child(j);
|
|
262
|
+
P.each(ie, 17, () => P.get(x), (e) => e.code, (e, t) => {
|
|
263
|
+
var n = De(), i = P.child(n), o = P.child(i), s = P.child(o);
|
|
263
264
|
r(s, { size: "16" }), P.reset(o);
|
|
264
265
|
var u = P.sibling(o, 2), d = P.child(u), ee = P.child(d, !0);
|
|
265
266
|
P.reset(d);
|
|
@@ -274,7 +275,7 @@ function Ae(t, i) {
|
|
|
274
275
|
variant: "icon",
|
|
275
276
|
size: "icon-sm",
|
|
276
277
|
class: "rounded-full hover:bg-status-error-bg hover:text-accent-danger",
|
|
277
|
-
onclick: () =>
|
|
278
|
+
onclick: () => O(P.get(t).code),
|
|
278
279
|
get loading() {
|
|
279
280
|
return P.get(y);
|
|
280
281
|
},
|
|
@@ -294,28 +295,28 @@ function Ae(t, i) {
|
|
|
294
295
|
P.set_text(ee, m().giftCardApplied || "Gift card applied"), P.set_text(_, P.get(t).code), P.set_text(b, `-${e ?? ""}`);
|
|
295
296
|
}, [() => c(P.get(t).giftCardAmount)]), P.transition(3, n, () => f, () => ({ duration: p.fast })), P.append(e, n);
|
|
296
297
|
});
|
|
297
|
-
var
|
|
298
|
-
var i =
|
|
298
|
+
var ae = P.sibling(ie, 2), oe = (t) => {
|
|
299
|
+
var i = Oe(), a = P.child(i), o = P.child(a);
|
|
299
300
|
r(o, { size: "16" });
|
|
300
301
|
var s = P.sibling(o, 2), c = P.child(s, !0);
|
|
301
302
|
P.reset(s), P.reset(a), P.reset(i), P.template_effect(() => {
|
|
302
303
|
P.set_class(a, 1, `full-coverage-badge ${e.caption ?? ""} ${n.emphasis ?? ""}`, "svelte-emw0hd"), P.set_text(c, m().fullyCoveredByGiftCard || "Fully covered by gift card");
|
|
303
304
|
}), P.append(t, i);
|
|
304
305
|
};
|
|
305
|
-
P.if(
|
|
306
|
-
P.get(
|
|
306
|
+
P.if(ae, (e) => {
|
|
307
|
+
P.get(ne) && e(oe);
|
|
307
308
|
});
|
|
308
|
-
var
|
|
309
|
-
u(
|
|
309
|
+
var N = P.sibling(ae, 2), se = P.child(N);
|
|
310
|
+
u(se, {
|
|
310
311
|
size: "20",
|
|
311
312
|
class: "gift-icon"
|
|
312
313
|
});
|
|
313
|
-
var
|
|
314
|
-
P.reset(
|
|
315
|
-
var
|
|
316
|
-
P.reset(
|
|
317
|
-
var
|
|
318
|
-
var n =
|
|
314
|
+
var ce = P.sibling(se, 2), le = P.child(ce, !0);
|
|
315
|
+
P.reset(ce);
|
|
316
|
+
var ue = P.sibling(ce, 2), de = P.child(ue, !0);
|
|
317
|
+
P.reset(ue), P.reset(N);
|
|
318
|
+
var fe = P.sibling(N, 2), pe = (t) => {
|
|
319
|
+
var n = Ae(), r = P.child(n), i = P.child(r);
|
|
319
320
|
P.remove_input_defaults(i);
|
|
320
321
|
let a;
|
|
321
322
|
var o = P.sibling(i, 2);
|
|
@@ -325,7 +326,7 @@ function Ae(t, i) {
|
|
|
325
326
|
variant: "default",
|
|
326
327
|
size: "sm",
|
|
327
328
|
class: "min-w-16 shrink-0",
|
|
328
|
-
onclick:
|
|
329
|
+
onclick: D,
|
|
329
330
|
get loading() {
|
|
330
331
|
return P.get(y);
|
|
331
332
|
},
|
|
@@ -342,7 +343,7 @@ function Ae(t, i) {
|
|
|
342
343
|
}
|
|
343
344
|
P.reset(r);
|
|
344
345
|
var s = P.sibling(r, 2), c = (e) => {
|
|
345
|
-
var t =
|
|
346
|
+
var t = ke(), n = P.child(t);
|
|
346
347
|
d(n, { size: "16" });
|
|
347
348
|
var r = P.sibling(n, 2), i = P.child(r, !0);
|
|
348
349
|
P.reset(r), P.reset(t), P.template_effect(() => P.set_text(i, P.get(b))), P.transition(3, t, () => f, () => ({ duration: p.micro })), P.append(e, t);
|
|
@@ -351,22 +352,22 @@ function Ae(t, i) {
|
|
|
351
352
|
P.get(b) && e(c);
|
|
352
353
|
}), P.reset(n), P.template_effect(() => {
|
|
353
354
|
P.set_attribute(i, "aria-label", m().enterGiftCardCode || "Enter gift card code"), P.set_attribute(i, "placeholder", m().enterGiftCardCode || "Enter gift card code"), i.disabled = P.get(y) || l(), a = P.set_class(i, 1, `gift-input ${e.body ?? ""}`, "svelte-emw0hd", a, { "has-error": !!P.get(b) });
|
|
354
|
-
}), P.delegated("keydown", i,
|
|
355
|
+
}), P.delegated("keydown", i, k), P.bind_value(i, () => P.get(v), (e) => P.set(v, e)), P.transition(3, n, () => f, () => ({ duration: p.fast })), P.append(t, n);
|
|
355
356
|
};
|
|
356
|
-
P.if(
|
|
357
|
-
P.get(
|
|
358
|
-
}), P.reset(
|
|
359
|
-
P.set_class(
|
|
360
|
-
}), P.delegated("click",
|
|
357
|
+
P.if(fe, (e) => {
|
|
358
|
+
P.get(S) && e(pe);
|
|
359
|
+
}), P.reset(j), P.template_effect(() => {
|
|
360
|
+
P.set_class(N, 1, `gift-card-toggle ${e.label ?? ""}`, "svelte-emw0hd"), N.disabled = l(), P.set_attribute(N, "aria-expanded", P.get(S)), P.set_text(le, P.get(x).length > 0 ? m().addAnotherGiftCard || "Add another gift card" : m().haveAGiftCard || "Have a gift card?"), P.set_text(de, P.get(S) ? "-" : "+");
|
|
361
|
+
}), P.delegated("click", N, A), P.append(t, j), P.pop();
|
|
361
362
|
}
|
|
362
363
|
P.delegate(["click", "keydown"]);
|
|
363
364
|
//#endregion
|
|
364
365
|
//#region src/components/Modals/EventUnavailableModal.svelte
|
|
365
|
-
var
|
|
366
|
-
function
|
|
366
|
+
var Ne = P.from_html("<div class=\"flex flex-col items-center text-center pt-6 px-4 pb-4\"><div aria-hidden=\"true\"><!></div> <h3 id=\"event-unavailable-title\"> </h3> <p id=\"event-unavailable-body\" class=\"type-body tone-secondary max-w-72\"> </p></div>"), Pe = P.from_html("<!> <!>", 1);
|
|
367
|
+
function Fe(t, n) {
|
|
367
368
|
P.push(n, !0);
|
|
368
369
|
let r = P.prop(n, "open", 15, !1), a = P.prop(n, "onBackToEvents", 3, () => {}), s = P.prop(n, "labels", 3, _), c = P.derived(() => n.reason === "canceled"), l = P.derived(() => P.get(c) ? s().eventCanceledTitle || "Event cancelled" : s().eventPostponedTitle || "Event postponed"), u = P.derived(() => P.get(c) ? s().eventCanceledBody || "This event was cancelled — you weren't charged" : s().eventPostponedBody || "Sales are paused while this show is rescheduled — you weren't charged"), d = P.derived(() => s().backToEvents || "Back to events");
|
|
369
|
-
|
|
370
|
+
E(t, {
|
|
370
371
|
size: "sm",
|
|
371
372
|
role: "alertdialog",
|
|
372
373
|
class: "micdrop",
|
|
@@ -377,15 +378,15 @@ function Ne(t, n) {
|
|
|
377
378
|
r(e);
|
|
378
379
|
},
|
|
379
380
|
children: (t, n) => {
|
|
380
|
-
var r =
|
|
381
|
+
var r = Pe(), s = P.first_child(r);
|
|
381
382
|
D(s, {});
|
|
382
383
|
var f = P.sibling(s, 2);
|
|
383
384
|
k(f, {
|
|
384
385
|
children: (t, n) => {
|
|
385
|
-
var r =
|
|
386
|
+
var r = Pe(), s = P.first_child(r);
|
|
386
387
|
O(s, {
|
|
387
388
|
children: (t, n) => {
|
|
388
|
-
var r =
|
|
389
|
+
var r = Ne(), a = P.child(r), s = P.child(a), d = (e) => {
|
|
389
390
|
o(e, { size: "32" });
|
|
390
391
|
}, f = (e) => {
|
|
391
392
|
i(e, { size: "32" });
|
|
@@ -433,8 +434,8 @@ function Ne(t, n) {
|
|
|
433
434
|
}
|
|
434
435
|
//#endregion
|
|
435
436
|
//#region src/components/Views/Checkout.svelte
|
|
436
|
-
var $ = t("Checkout"),
|
|
437
|
-
function
|
|
437
|
+
var $ = t("Checkout"), Ie = P.from_html("<div class=\"p-8 text-center\"><p class=\"text-accent-danger\"> </p></div>"), Le = P.from_html("<div class=\"p-8 text-center\"><p class=\"tone-muted\"> </p></div>"), Re = P.from_html("<!> <!>", 1);
|
|
438
|
+
function ze(e, t) {
|
|
438
439
|
P.push(t, !0);
|
|
439
440
|
let n = P.prop(t, "availableTickets", 23, () => []);
|
|
440
441
|
P.prop(t, "value", 3, "");
|
|
@@ -452,9 +453,9 @@ function Le(e, t) {
|
|
|
452
453
|
}
|
|
453
454
|
let p = P.derived(() => (t.data || {}).id);
|
|
454
455
|
P.derived(() => (t.data || {}).orgSlug);
|
|
455
|
-
let h = P.derived(() => (t.data || {}).slug),
|
|
456
|
-
...
|
|
457
|
-
...P.get(
|
|
456
|
+
let h = P.derived(() => (t.data || {}).slug), te = P.derived(() => (t.data || {}).event), E = P.derived(() => oe(f(P.get(te)))), D = P.derived(() => P.get(te) ? {
|
|
457
|
+
...N(P.get(te)),
|
|
458
|
+
...P.get(E)
|
|
458
459
|
} : t.data && (t.data.id || P.get(p)) ? {
|
|
459
460
|
id: t.data.id || P.get(p),
|
|
460
461
|
eventID: t.data.id || P.get(p),
|
|
@@ -463,27 +464,27 @@ function Le(e, t) {
|
|
|
463
464
|
eventTicketingType: 0,
|
|
464
465
|
ticketType: 0,
|
|
465
466
|
availableTickets: []
|
|
466
|
-
} : null), O = P.state(""), k = P.state(P.proxy({})), A = P.state(P.proxy({})),
|
|
467
|
-
function
|
|
467
|
+
} : null), O = P.state(""), k = P.state(P.proxy({})), A = P.state(P.proxy({})), re = P.state(P.proxy({})), M = P.state(P.proxy([])), F = P.state(""), I = P.state(0), L = P.state(!1), be = P.state(!1), R = P.state(!1), z = P.state(null), B = P.state(""), V = P.state(void 0), H = P.state(null), U = P.state(""), xe = P.state(!1), Se = P.state(""), W = P.state(null), G = P.derived(() => P.get(W) !== null), K = P.state(null), q = P.state(null), J = null, Ce = P.state(!1);
|
|
468
|
+
function we() {
|
|
468
469
|
return {
|
|
469
470
|
value: J?.total ?? null,
|
|
470
471
|
currency: J?.currency || "USD"
|
|
471
472
|
};
|
|
472
473
|
}
|
|
473
|
-
|
|
474
|
-
if (P.set(O,
|
|
475
|
-
P.set(
|
|
474
|
+
ye(async () => {
|
|
475
|
+
if (P.set(O, ge(le) || ge(_e.CHECKOUT_CARTID), !0), !P.get(O)) {
|
|
476
|
+
P.set(xe, !0), P.set(Se, u().noCheckoutSession || "No checkout session found. Please select tickets first", !0);
|
|
476
477
|
return;
|
|
477
478
|
}
|
|
478
|
-
|
|
479
|
+
b(P.get(D)?.eventID || P.get(D)?.id || P.get(p), c(), r() || P.get(D)?.venueID || P.get(D)?.venueId || null);
|
|
479
480
|
let e = P.get(D)?.eventID || P.get(D)?.id || P.get(p);
|
|
480
481
|
try {
|
|
481
|
-
let t =
|
|
482
|
-
P.set(k, t.quantities || {}, !0), P.set(A, t.donationAmounts || {}, !0), P.set(
|
|
482
|
+
let t = ce(e);
|
|
483
|
+
P.set(k, t.quantities || {}, !0), P.set(A, t.donationAmounts || {}, !0), P.set(re, t.addOnQuantities || {}, !0), P.set(F, t.promocode || "", !0), P.set(I, t.promoDiscountAmount || 0, !0), P.set(M, t.tickets || [], !0);
|
|
483
484
|
} catch (e) {
|
|
484
|
-
$.error("Error loading checkout state:", e), P.set(k, {}, !0), P.set(
|
|
485
|
+
$.error("Error loading checkout state:", e), P.set(k, {}, !0), P.set(re, {}, !0), P.set(M, [], !0);
|
|
485
486
|
}
|
|
486
|
-
P.get(
|
|
487
|
+
P.get(M).length > 0 && P.get(D) && (P.get(D).availableTickets = P.get(M), n(P.get(M)));
|
|
487
488
|
let t = {
|
|
488
489
|
serviceFeeCents: 0,
|
|
489
490
|
serviceFeePercentage: 0,
|
|
@@ -493,7 +494,7 @@ function Le(e, t) {
|
|
|
493
494
|
taxPercentage: 0
|
|
494
495
|
};
|
|
495
496
|
try {
|
|
496
|
-
let e = await
|
|
497
|
+
let e = await ue(P.get(D)?.venueID || P.get(D)?.venueId || r());
|
|
497
498
|
t = {
|
|
498
499
|
serviceFeeCents: Number(e?.serviceFeeCents == null ? 0 : e.serviceFeeCents),
|
|
499
500
|
serviceFeePercentage: Number(e?.serviceFeePercentage ?? 0),
|
|
@@ -505,7 +506,7 @@ function Le(e, t) {
|
|
|
505
506
|
} catch (e) {
|
|
506
507
|
$.error("Error fetching venue data:", e);
|
|
507
508
|
}
|
|
508
|
-
let i = [...Q(P.get(k), P.get(
|
|
509
|
+
let i = [...Q(P.get(k), P.get(M), t), ...De(P.get(re), P.get(D)?.addOns)];
|
|
509
510
|
Object.keys(P.get(k)).length > 0 && await X();
|
|
510
511
|
let a = 900, l = "";
|
|
511
512
|
if (P.get(O)) {
|
|
@@ -515,23 +516,23 @@ function Le(e, t) {
|
|
|
515
516
|
t > 0 && (a = t);
|
|
516
517
|
}
|
|
517
518
|
try {
|
|
518
|
-
let e = await
|
|
519
|
+
let e = await x(P.get(O));
|
|
519
520
|
if (!e.error && e.expiresAt) {
|
|
520
521
|
let t = v(e.expiresAt).getTime();
|
|
521
|
-
a = Math.max(0, Math.floor((t - Date.now()) / 1e3)), l = e.expiresAt,
|
|
522
|
+
a = Math.max(0, Math.floor((t - Date.now()) / 1e3)), l = e.expiresAt, de(P.get(O), t);
|
|
522
523
|
}
|
|
523
524
|
} catch {}
|
|
524
525
|
}
|
|
525
|
-
let d =
|
|
526
|
+
let d = ge(`checkout-promo-discount-type-${e}`), f = [];
|
|
526
527
|
try {
|
|
527
|
-
let t =
|
|
528
|
+
let t = ge(`checkout-promo-ticket-ids-${e}`), n = t ? JSON.parse(t) : [];
|
|
528
529
|
Array.isArray(n) && (f = n);
|
|
529
530
|
} catch {
|
|
530
531
|
f = [];
|
|
531
532
|
}
|
|
532
|
-
let m = s(i.filter((e) =>
|
|
533
|
+
let m = s(i.filter((e) => pe(f, e.ticketId)).reduce((e, t) => e + (t.subtotal == null ? 0 : t.subtotal), 0)), h = fe(m, P.get(I), d);
|
|
533
534
|
if (P.set(q, {
|
|
534
|
-
event:
|
|
535
|
+
event: Te(P.get(D), t),
|
|
535
536
|
lines: i,
|
|
536
537
|
timerStart: a,
|
|
537
538
|
...l ? { deadlineAt: l } : {},
|
|
@@ -561,7 +562,7 @@ function Le(e, t) {
|
|
|
561
562
|
try {
|
|
562
563
|
let n = Object.fromEntries(Object.entries(P.get(A)).filter(([, e]) => parseFloat(String(e)) > 0).map(([e, t]) => [parseInt(e, 10), parseFloat(String(t))]));
|
|
563
564
|
if (P.get(F)) {
|
|
564
|
-
let t = await
|
|
565
|
+
let t = await ae(P.get(O), P.get(F));
|
|
565
566
|
if (e !== Y) return;
|
|
566
567
|
t.success ? P.set(U, "") : ($.error("Failed to apply promo code to cart:", t.error), P.set(U, (u().promoCodeNotApplied || "We couldn't apply promo code {code}. It isn't included in this total — go back to re-enter it, or continue at the full price").replace("{code}", P.get(F)), !0));
|
|
567
568
|
}
|
|
@@ -571,7 +572,7 @@ function Le(e, t) {
|
|
|
571
572
|
P.set(H, { message: u().failedToCreatePaymentIntent || "Failed to create payment intent. Please try again" }, !0);
|
|
572
573
|
return;
|
|
573
574
|
}
|
|
574
|
-
P.set(
|
|
575
|
+
P.set(Ce, !1), J = ne(r), P.get(q) && P.set(q, {
|
|
575
576
|
...P.get(q),
|
|
576
577
|
serverTotals: J
|
|
577
578
|
}, !0);
|
|
@@ -580,13 +581,13 @@ function Le(e, t) {
|
|
|
580
581
|
P.set(B, "free");
|
|
581
582
|
return;
|
|
582
583
|
}
|
|
583
|
-
P.set(
|
|
584
|
+
P.set(Ce, J === null);
|
|
584
585
|
let a = r.stripe_publishable_key;
|
|
585
586
|
if (!a) {
|
|
586
587
|
$.error("No Stripe publishable key in payment intent response"), P.set(H, { message: u().paymentConfigError || "Payment configuration error. Please try again" }, !0);
|
|
587
588
|
return;
|
|
588
589
|
}
|
|
589
|
-
let o = await
|
|
590
|
+
let o = await Ee(a);
|
|
590
591
|
if (e !== Y) return;
|
|
591
592
|
P.set(z, o, !0), r.client_secret ? P.set(B, r.client_secret, !0) : P.set(H, { message: u().failedToInitPayment || "Failed to initialize payment. Please try again" }, !0);
|
|
592
593
|
} catch (t) {
|
|
@@ -594,7 +595,7 @@ function Le(e, t) {
|
|
|
594
595
|
P.set(H, { message: t.message || u().failedToInitPayment || "Failed to initialize payment. Please try again" }, !0);
|
|
595
596
|
}
|
|
596
597
|
}
|
|
597
|
-
function
|
|
598
|
+
function Te(e, t) {
|
|
598
599
|
return e ? {
|
|
599
600
|
id: e.id || e.eventID,
|
|
600
601
|
title: e.name || e.title || "",
|
|
@@ -606,7 +607,7 @@ function Le(e, t) {
|
|
|
606
607
|
doorsOpenTime: e.doorsOpenTime || "",
|
|
607
608
|
timezone: e.timeZone || e.timezone || g(),
|
|
608
609
|
imageUrl: e.imageUrl || e.image || "",
|
|
609
|
-
...P.get(
|
|
610
|
+
...P.get(E),
|
|
610
611
|
venue: {
|
|
611
612
|
id: e.venueID || e.venueId || 0,
|
|
612
613
|
name: e.venueName || "",
|
|
@@ -662,7 +663,7 @@ function Le(e, t) {
|
|
|
662
663
|
});
|
|
663
664
|
continue;
|
|
664
665
|
}
|
|
665
|
-
let l = c ?? 0, u =
|
|
666
|
+
let l = c ?? 0, u = me(l, n, o);
|
|
666
667
|
r.push({
|
|
667
668
|
ticketId: parseInt(i),
|
|
668
669
|
ticketName: e.name || "",
|
|
@@ -675,7 +676,7 @@ function Le(e, t) {
|
|
|
675
676
|
}
|
|
676
677
|
return r;
|
|
677
678
|
}
|
|
678
|
-
function
|
|
679
|
+
function De(e, t) {
|
|
679
680
|
let n = t || [], r = [];
|
|
680
681
|
for (let [t, i] of Object.entries(e || {})) {
|
|
681
682
|
if (!(i > 0)) continue;
|
|
@@ -696,8 +697,8 @@ function Le(e, t) {
|
|
|
696
697
|
}
|
|
697
698
|
return r;
|
|
698
699
|
}
|
|
699
|
-
let
|
|
700
|
-
async function
|
|
700
|
+
let Oe = P.derived(() => Object.values(P.get(A)).some((e) => (Number(e) || 0) > 0)), ke = P.derived(() => !P.get(Oe) && (!P.get(q) || P.get(q).lines.every((e) => e.unitPrice === 0)));
|
|
701
|
+
async function Ae(e) {
|
|
701
702
|
if (!P.get(L)) {
|
|
702
703
|
P.set(L, !0), P.set(H, null);
|
|
703
704
|
try {
|
|
@@ -706,11 +707,11 @@ function Le(e, t) {
|
|
|
706
707
|
return;
|
|
707
708
|
}
|
|
708
709
|
if (P.get(K) && !P.get(K).requiresStripe) {
|
|
709
|
-
await
|
|
710
|
+
await je(e);
|
|
710
711
|
return;
|
|
711
712
|
}
|
|
712
|
-
if (P.get(
|
|
713
|
-
await
|
|
713
|
+
if (P.get(ke) || P.get(B) === "free" || J?.total === 0) {
|
|
714
|
+
await Ne(e);
|
|
714
715
|
return;
|
|
715
716
|
}
|
|
716
717
|
if (!P.get(V)) {
|
|
@@ -738,7 +739,11 @@ function Le(e, t) {
|
|
|
738
739
|
}
|
|
739
740
|
let a = await P.get(z).confirmPayment({
|
|
740
741
|
elements: P.get(V),
|
|
741
|
-
redirect: "if_required"
|
|
742
|
+
redirect: "if_required",
|
|
743
|
+
confirmParams: { return_url: `${y()}${j(P.get(D)?.id || P.get(D)?.eventID || P.get(p), P.get(D)?.slug || P.get(h) || "", {
|
|
744
|
+
orderId: P.get(O),
|
|
745
|
+
ticketCount: Object.values(P.get(k)).reduce((e, t) => e + (Number(t) || 0), 0)
|
|
746
|
+
})}` }
|
|
742
747
|
});
|
|
743
748
|
if (a.error) {
|
|
744
749
|
let e = Z(a.error, u());
|
|
@@ -766,14 +771,14 @@ function Le(e, t) {
|
|
|
766
771
|
return;
|
|
767
772
|
}
|
|
768
773
|
if (s?.status === "Payment succeeded") {
|
|
769
|
-
|
|
774
|
+
ve(P.get(O), e.email);
|
|
770
775
|
let n = {
|
|
771
776
|
orderId: P.get(O),
|
|
772
777
|
eventId: P.get(D)?.id || P.get(D)?.eventID || null,
|
|
773
778
|
event: P.get(D) || null,
|
|
774
779
|
venueId: r() || P.get(D)?.venueId || null,
|
|
775
780
|
organizationId: i() || P.get(D)?.organizationId || null,
|
|
776
|
-
...
|
|
781
|
+
...we()
|
|
777
782
|
};
|
|
778
783
|
t.onNavigateToSuccess && t.onNavigateToSuccess(n);
|
|
779
784
|
} else s?.status === "Payment amount does not match the total price" ? P.set(H, { message: u().paymentAmountMismatch || "Payment amount mismatch. Please refresh and try again" }, !0) : P.set(H, { message: u().paymentValidationFailed || "Payment validation failed. Please try again" }, !0);
|
|
@@ -789,9 +794,9 @@ function Le(e, t) {
|
|
|
789
794
|
}
|
|
790
795
|
}
|
|
791
796
|
}
|
|
792
|
-
async function
|
|
797
|
+
async function je(e) {
|
|
793
798
|
try {
|
|
794
|
-
let n = await
|
|
799
|
+
let n = await ie(P.get(O), {
|
|
795
800
|
firstName: e.firstName,
|
|
796
801
|
lastName: e.lastName,
|
|
797
802
|
email: e.email,
|
|
@@ -800,7 +805,7 @@ function Le(e, t) {
|
|
|
800
805
|
mailingList: e.keepMeUpdated
|
|
801
806
|
}, d());
|
|
802
807
|
if (n?.success) {
|
|
803
|
-
|
|
808
|
+
ve(n.orderId || P.get(O), e.email);
|
|
804
809
|
let a = {
|
|
805
810
|
orderId: n.orderId || P.get(O),
|
|
806
811
|
eventId: P.get(D)?.id || P.get(D)?.eventID || null,
|
|
@@ -808,7 +813,7 @@ function Le(e, t) {
|
|
|
808
813
|
venueId: r() || P.get(D)?.venueId || null,
|
|
809
814
|
organizationId: i() || P.get(D)?.organizationId || null,
|
|
810
815
|
paymentType: "gift_card_only",
|
|
811
|
-
...
|
|
816
|
+
...we()
|
|
812
817
|
};
|
|
813
818
|
t.onNavigateToSuccess && t.onNavigateToSuccess(a);
|
|
814
819
|
} else P.set(H, { message: n?.error || u().failedToCompleteOrder || "Failed to complete order. Please try again" }, !0);
|
|
@@ -823,7 +828,7 @@ function Le(e, t) {
|
|
|
823
828
|
P.set(L, !1);
|
|
824
829
|
}
|
|
825
830
|
}
|
|
826
|
-
async function
|
|
831
|
+
async function Ne(e) {
|
|
827
832
|
try {
|
|
828
833
|
let n = Object.fromEntries(Object.entries(P.get(k)).filter(([e, t]) => t > 0)), a = Object.fromEntries(Object.entries(P.get(A)).filter(([, e]) => parseFloat(String(e)) > 0).map(([e, t]) => [parseInt(e, 10), parseFloat(String(t))])), o = await w(P.get(O), n, Object.keys(a).length > 0 ? a : void 0, {
|
|
829
834
|
firstName: e.firstName,
|
|
@@ -837,7 +842,7 @@ function Le(e, t) {
|
|
|
837
842
|
P.set(H, { message: u().failedToCompleteOrder || "Failed to complete order. Please try again" }, !0);
|
|
838
843
|
return;
|
|
839
844
|
}
|
|
840
|
-
P.set(B, "free"),
|
|
845
|
+
P.set(B, "free"), ve(P.get(O), e.email);
|
|
841
846
|
let s = {
|
|
842
847
|
orderId: P.get(O),
|
|
843
848
|
eventId: P.get(D)?.id || P.get(D)?.eventID || null,
|
|
@@ -845,7 +850,7 @@ function Le(e, t) {
|
|
|
845
850
|
venueId: r() || P.get(D)?.venueId || null,
|
|
846
851
|
organizationId: i() || P.get(D)?.organizationId || null,
|
|
847
852
|
paymentType: "free",
|
|
848
|
-
...
|
|
853
|
+
...we()
|
|
849
854
|
};
|
|
850
855
|
t.onNavigateToSuccess && t.onNavigateToSuccess(s);
|
|
851
856
|
} catch (e) {
|
|
@@ -859,7 +864,7 @@ function Le(e, t) {
|
|
|
859
864
|
P.set(L, !1);
|
|
860
865
|
}
|
|
861
866
|
}
|
|
862
|
-
async function
|
|
867
|
+
async function Pe(e) {
|
|
863
868
|
if (P.set(K, e, !0), P.get(q) && J && P.set(q, {
|
|
864
869
|
...P.get(q),
|
|
865
870
|
serverTotals: T(J, e)
|
|
@@ -873,7 +878,7 @@ function Le(e, t) {
|
|
|
873
878
|
}
|
|
874
879
|
}
|
|
875
880
|
}
|
|
876
|
-
async function
|
|
881
|
+
async function ze() {
|
|
877
882
|
if (P.set(K, null), P.get(q) && J && P.set(q, {
|
|
878
883
|
...P.get(q),
|
|
879
884
|
serverTotals: J
|
|
@@ -886,19 +891,19 @@ function Le(e, t) {
|
|
|
886
891
|
}
|
|
887
892
|
}
|
|
888
893
|
}
|
|
889
|
-
function
|
|
894
|
+
function Be() {
|
|
890
895
|
a() ? a()() : window.history.back();
|
|
891
896
|
}
|
|
892
|
-
function
|
|
897
|
+
function Ve() {
|
|
893
898
|
a() ? a()() : window.history.back();
|
|
894
899
|
}
|
|
895
|
-
function
|
|
896
|
-
P.set(W, null),
|
|
900
|
+
function He() {
|
|
901
|
+
P.set(W, null), Be();
|
|
897
902
|
}
|
|
898
|
-
async function
|
|
903
|
+
async function Ue() {
|
|
899
904
|
if (!P.get(O)) return null;
|
|
900
905
|
try {
|
|
901
|
-
let e = await
|
|
906
|
+
let e = await S(P.get(O));
|
|
902
907
|
return e.success ? {
|
|
903
908
|
newExpiryTime: e.newExpiryTime,
|
|
904
909
|
remainingExtensions: e.remainingExtensions
|
|
@@ -907,17 +912,17 @@ function Le(e, t) {
|
|
|
907
912
|
return $.error("Error extending checkout session:", e), null;
|
|
908
913
|
}
|
|
909
914
|
}
|
|
910
|
-
var
|
|
915
|
+
var We = Re(), Ge = P.first_child(We), Ke = (e) => {
|
|
911
916
|
{
|
|
912
917
|
let t = (e) => {
|
|
913
918
|
{
|
|
914
919
|
let t = P.derived(() => P.get(L) || P.get(R)), n = P.derived(() => P.get(q)?.serverTotals?.total ?? 0), r = P.derived(() => P.get(q)?.serverTotals?.giftCardAmount ?? null);
|
|
915
|
-
|
|
920
|
+
Me(e, {
|
|
916
921
|
get cartId() {
|
|
917
922
|
return P.get(O);
|
|
918
923
|
},
|
|
919
|
-
onApplied:
|
|
920
|
-
onRemoved:
|
|
924
|
+
onApplied: Pe,
|
|
925
|
+
onRemoved: ze,
|
|
921
926
|
get disabled() {
|
|
922
927
|
return P.get(t);
|
|
923
928
|
},
|
|
@@ -933,14 +938,14 @@ function Le(e, t) {
|
|
|
933
938
|
});
|
|
934
939
|
}
|
|
935
940
|
}, n = P.derived(() => P.get(H) ?? (P.get(U) ? { message: P.get(U) } : null));
|
|
936
|
-
|
|
941
|
+
he(e, {
|
|
937
942
|
get config() {
|
|
938
943
|
return P.get(q);
|
|
939
944
|
},
|
|
940
|
-
onPlaceOrder:
|
|
941
|
-
onBack:
|
|
942
|
-
onRetryExpired:
|
|
943
|
-
onExtendSession:
|
|
945
|
+
onPlaceOrder: Ae,
|
|
946
|
+
onBack: Be,
|
|
947
|
+
onRetryExpired: Ve,
|
|
948
|
+
onExtendSession: Ue,
|
|
944
949
|
get stripe() {
|
|
945
950
|
return P.get(z);
|
|
946
951
|
},
|
|
@@ -948,7 +953,7 @@ function Le(e, t) {
|
|
|
948
953
|
return P.get(B);
|
|
949
954
|
},
|
|
950
955
|
get serverTotalsUnavailable() {
|
|
951
|
-
return P.get(
|
|
956
|
+
return P.get(Ce);
|
|
952
957
|
},
|
|
953
958
|
get paymentError() {
|
|
954
959
|
return P.get(n);
|
|
@@ -966,40 +971,40 @@ function Le(e, t) {
|
|
|
966
971
|
P.set(V, e, !0);
|
|
967
972
|
},
|
|
968
973
|
get eventEnded() {
|
|
969
|
-
return P.get(
|
|
974
|
+
return P.get(be);
|
|
970
975
|
},
|
|
971
976
|
set eventEnded(e) {
|
|
972
|
-
P.set(
|
|
977
|
+
P.set(be, e, !0);
|
|
973
978
|
},
|
|
974
979
|
giftCard: t,
|
|
975
980
|
$$slots: { giftCard: !0 }
|
|
976
981
|
});
|
|
977
982
|
}
|
|
978
|
-
},
|
|
979
|
-
var t =
|
|
980
|
-
P.reset(n), P.reset(t), P.template_effect(() => P.set_text(r, P.get(
|
|
981
|
-
},
|
|
982
|
-
var t =
|
|
983
|
+
}, qe = (e) => {
|
|
984
|
+
var t = Ie(), n = P.child(t), r = P.child(n, !0);
|
|
985
|
+
P.reset(n), P.reset(t), P.template_effect(() => P.set_text(r, P.get(Se))), P.append(e, t);
|
|
986
|
+
}, Je = (e) => {
|
|
987
|
+
var t = Le(), n = P.child(t), r = P.child(n, !0);
|
|
983
988
|
P.reset(n), P.reset(t), P.template_effect(() => P.set_text(r, u().loadingSecurePaymentForm || "Loading secure payment form...")), P.append(e, t);
|
|
984
989
|
};
|
|
985
|
-
P.if(
|
|
986
|
-
P.get(q) ? e(
|
|
990
|
+
P.if(Ge, (e) => {
|
|
991
|
+
P.get(q) ? e(Ke) : P.get(xe) ? e(qe, 1) : e(Je, -1);
|
|
987
992
|
});
|
|
988
|
-
var
|
|
989
|
-
|
|
993
|
+
var Ye = P.sibling(Ge, 2), Xe = (e) => {
|
|
994
|
+
Fe(e, {
|
|
990
995
|
open: !0,
|
|
991
996
|
get reason() {
|
|
992
997
|
return P.get(W);
|
|
993
998
|
},
|
|
994
|
-
onBackToEvents:
|
|
999
|
+
onBackToEvents: He,
|
|
995
1000
|
get labels() {
|
|
996
1001
|
return u();
|
|
997
1002
|
}
|
|
998
1003
|
});
|
|
999
1004
|
};
|
|
1000
|
-
P.if(
|
|
1001
|
-
P.get(G) && e(
|
|
1002
|
-
}), P.append(e,
|
|
1005
|
+
P.if(Ye, (e) => {
|
|
1006
|
+
P.get(G) && e(Xe);
|
|
1007
|
+
}), P.append(e, We), P.pop();
|
|
1003
1008
|
}
|
|
1004
1009
|
//#endregion
|
|
1005
|
-
export {
|
|
1010
|
+
export { ze as default };
|