@getmicdrop/venue-calendar 4.2.3 → 4.2.5

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 (102) hide show
  1. package/dist/{ArrowLeftIcon-CxZXP_IT.js → ArrowLeftIcon-BxKUPFOE.js} +1 -1
  2. package/dist/{Badge-Bv_MT-Vt.js → Badge-M6qZyfTF.js} +9 -10
  3. package/dist/BlockPlaceholder-CLdS2Y-c.js +62 -0
  4. package/dist/{Calendar-BKefLfIt.js → Calendar-DwNhbEQY.js} +290 -292
  5. package/dist/CalendarFoundryView-BX5mT6NY.js +23561 -0
  6. package/dist/{CalendarIcon-CLGR_zlO.js → CalendarIcon-jLckZ_4N.js} +1 -1
  7. package/dist/{CartView-CHFlfWS9.js → CartView-B61KRyFq.js} +644 -651
  8. package/dist/Checkout-CoExiUba.js +1809 -0
  9. package/dist/{Checkout-C-A4t1eE.js → Checkout-DlQ2x3L6.js} +97 -97
  10. package/dist/{CheckoutTimer-d3KUbevy.js → CheckoutTimer-Cv9iQj2d.js} +5 -5
  11. package/dist/{ChevronDownIcon-YtBeSqjf.js → ChevronDownIcon-DiZxxS3e.js} +1 -1
  12. package/dist/{ClockIcon-a9tJQ5El.js → ClockIcon-BrWavNGl.js} +1 -1
  13. package/dist/{CloseIcon-DSURK5co.js → CloseIcon-Cmddp2PA.js} +1 -1
  14. package/dist/{CollectionView-BiBMllyw.js → CollectionView-DpkF55yD.js} +12 -13
  15. package/dist/Event-CzNN2jRR.js +3040 -0
  16. package/dist/{EventPage-C7K2yA4v.js → EventPage-DnKNNWk8.js} +167 -168
  17. package/dist/{Heading-Dfo3bjyn.js → Heading-B7VYbbfJ.js} +3 -4
  18. package/dist/Image-DBJAfLYe.js +81 -0
  19. package/dist/{phoneUtils-FnBDCqO0.js → Input-DsWjpYtc.js} +1132 -694
  20. package/dist/{MailIcon-DIrQpcGo.js → MailIcon-gpZMGdBK.js} +1 -1
  21. package/dist/{Modal-DrA1swbF.js → Modal-D4AUdrz8.js} +2 -2
  22. package/dist/{ModalFooter-r1NQNG9P.js → ModalFooter-8Di4-qKC.js} +57 -59
  23. package/dist/{PasswordInput-DB4qa7kS.js → PasswordInput-Buk60yEf.js} +4 -4
  24. package/dist/{ScarcityBadge-BJOm7_Ho.js → ScarcityBadge-DgrS89hq.js} +4 -4
  25. package/dist/{SeriesPage-JVmqUSax.js → SeriesPage-BCovOJ6a.js} +5 -5
  26. package/dist/{Spinner-BwiDys7C.js → Spinner-ChTN7t75.js} +3 -3
  27. package/dist/{Success-DAE6gPZM.js → Success-BRufJqwQ.js} +80 -81
  28. package/dist/{TagIcon-CrTNd8qE.js → TagIcon-C0uTQgU8.js} +1 -1
  29. package/dist/{ViewTicketsEmbed-Zx-mvP2p.js → ViewTicketsEmbed-CfagtvVL.js} +66 -67
  30. package/dist/{WarningCircleIcon-C5-op3Cy.js → WarningCircleIcon-B2hkUrvV.js} +1 -1
  31. package/dist/{WarningTriIcon-BxIQn7c2.js → WarningTriIcon-Boy4IW6-.js} +1 -1
  32. package/dist/{__SKIP_PATHS__-DyyiXBgB.js → __SKIP_PATHS__-DPK-YB-V.js} +1 -1
  33. package/dist/{href-C8WGnROy.js → allowlist-Cu2kP6jt.js} +4 -21
  34. package/dist/api/api.cjs +1 -1
  35. package/dist/api/api.mjs +182 -165
  36. package/dist/api/client.d.ts +16 -0
  37. package/dist/api/events.d.ts +21 -2
  38. package/dist/api/types.d.ts +17 -0
  39. package/dist/{browser-Um8Y6K99.js → browser-25hnscei.js} +7 -7
  40. package/dist/cancel-gqtaw6SK.js +59 -0
  41. package/dist/{colors-MuuDk6KF.js → colors-B9hMXv8l.js} +118 -108
  42. package/dist/{constants-CqrJv6nM.js → constants-DBwdjnEU.js} +77 -74
  43. package/dist/{copyToClipboard-CTS9Wtmo.js → copyToClipboard-BDa2_uNf.js} +1 -1
  44. package/dist/{createI18n-DBUVdZra.js → createI18n-08XGDh1_.js} +1 -1
  45. package/dist/{event-BrptLro8.js → event-Cp5D4ctZ.js} +1 -1
  46. package/dist/{event-transform-jFmHl0Qp.js → event-transform-BFJTgtU9.js} +4 -4
  47. package/dist/{eventStatusStream-D04pcbuu.js → eventStatusStream-SyvhRCtk.js} +6 -6
  48. package/dist/{i18n-CcJmTGJP.js → i18n-4ZGOM8hY.js} +11 -11
  49. package/dist/{labels-Q4CaHsVM.js → labels-99RC9gAv.js} +1 -1
  50. package/dist/{modalManager.svelte-qcVxl7C5.js → modalManager.svelte-BdNsCq6n.js} +2 -2
  51. package/dist/{order-totals-BImtvmoh.js → order-totals-CQ0V7Fdc.js} +13 -15
  52. package/dist/{orders-C8kt6c-E.js → orders-oRqSQXSf.js} +209 -199
  53. package/dist/{pixels-MEc7WYiV.js → pixels-DycN_8bu.js} +7 -8
  54. package/dist/{promo-DtLZRskK.js → promo-BrMcoTYh.js} +3 -3
  55. package/dist/{serverTotals-BO126TTd.js → serverTotals-CpRaEe9K.js} +1 -1
  56. package/dist/{shareCopyFeedback.svelte-Dko8NIbm.js → shareCopyFeedback.svelte-D314p5oA.js} +25 -25
  57. package/dist/{showcase-state-options-BoJxiEsg.js → showcase-state-options-B2XfybZq.js} +1 -1
  58. package/dist/timezones-Cq1mLtfM.js +4170 -0
  59. package/dist/{to-event-card-props-BAHzloEA.js → to-event-card-props-BNBWYYPo.js} +23 -24
  60. package/dist/{utils-Ts4-U13Y.js → utils-CrlClQxc.js} +30 -30
  61. package/dist/venue-calendar.css +1 -1
  62. package/dist/venue-calendar.es.js +1292 -1154
  63. package/dist/venue-calendar.iife.js +63 -64
  64. package/dist/venue-calendar.umd.js +59 -60
  65. package/package.json +220 -220
  66. package/dist/BlockPlaceholder-HZ6Coko5.js +0 -52
  67. package/dist/Button-C4uFgl7L.js +0 -2141
  68. package/dist/CalendarFoundryView-tDmFCrJ3.js +0 -22292
  69. package/dist/Checkout-CRX7dcRr.js +0 -1807
  70. package/dist/CloseOutline-qpVa62mu.js +0 -13
  71. package/dist/CropImage-B0tj2_uN.js +0 -404
  72. package/dist/Event-1ZJVzqFN.js +0 -3034
  73. package/dist/Image-B3cEndLZ.js +0 -87
  74. package/dist/Input-DkYIFK4J.js +0 -487
  75. package/dist/imageOptimizer-CB3wKJU8.js +0 -47
  76. package/dist/sortable.esm--ZtTTTPp.js +0 -1451
  77. package/dist/timezones-C5l0SSHK.js +0 -2030
  78. package/dist/z-index-B0Vk_Mp1.js +0 -27
  79. /package/dist/locales/{4.2.3 → 4.2.5}/flow/de.js +0 -0
  80. /package/dist/locales/{4.2.3 → 4.2.5}/flow/es.js +0 -0
  81. /package/dist/locales/{4.2.3 → 4.2.5}/flow/fr.js +0 -0
  82. /package/dist/locales/{4.2.3 → 4.2.5}/flow/id.js +0 -0
  83. /package/dist/locales/{4.2.3 → 4.2.5}/flow/it.js +0 -0
  84. /package/dist/locales/{4.2.3 → 4.2.5}/flow/ja.js +0 -0
  85. /package/dist/locales/{4.2.3 → 4.2.5}/flow/ko.js +0 -0
  86. /package/dist/locales/{4.2.3 → 4.2.5}/flow/nl.js +0 -0
  87. /package/dist/locales/{4.2.3 → 4.2.5}/flow/pl.js +0 -0
  88. /package/dist/locales/{4.2.3 → 4.2.5}/flow/pt-br.js +0 -0
  89. /package/dist/locales/{4.2.3 → 4.2.5}/flow/tr.js +0 -0
  90. /package/dist/locales/{4.2.3 → 4.2.5}/flow/zh.js +0 -0
  91. /package/dist/locales/{4.2.3 → 4.2.5}/main/de.js +0 -0
  92. /package/dist/locales/{4.2.3 → 4.2.5}/main/es.js +0 -0
  93. /package/dist/locales/{4.2.3 → 4.2.5}/main/fr.js +0 -0
  94. /package/dist/locales/{4.2.3 → 4.2.5}/main/id.js +0 -0
  95. /package/dist/locales/{4.2.3 → 4.2.5}/main/it.js +0 -0
  96. /package/dist/locales/{4.2.3 → 4.2.5}/main/ja.js +0 -0
  97. /package/dist/locales/{4.2.3 → 4.2.5}/main/ko.js +0 -0
  98. /package/dist/locales/{4.2.3 → 4.2.5}/main/nl.js +0 -0
  99. /package/dist/locales/{4.2.3 → 4.2.5}/main/pl.js +0 -0
  100. /package/dist/locales/{4.2.3 → 4.2.5}/main/pt-br.js +0 -0
  101. /package/dist/locales/{4.2.3 → 4.2.5}/main/tr.js +0 -0
  102. /package/dist/locales/{4.2.3 → 4.2.5}/main/zh.js +0 -0
@@ -1,1807 +0,0 @@
1
- import { v as e, x as t } from "./Button-C4uFgl7L.js";
2
- import { A as n, D as r, E as i, L as a, R as o, r as s, v as c } from "./timezones-C5l0SSHK.js";
3
- import { t as l } from "./Input-DkYIFK4J.js";
4
- import { C as u, J as d, O as f, i as p, t as m, u as h } from "./constants-CqrJv6nM.js";
5
- import { t as g } from "./CalendarIcon-CLGR_zlO.js";
6
- import { t as _ } from "./ClockIcon-a9tJQ5El.js";
7
- import { t as v } from "./WarningTriIcon-BxIQn7c2.js";
8
- import { t as y } from "./Image-B3cEndLZ.js";
9
- import { G as b, V as x, q as S, r as C } from "./orders-C8kt6c-E.js";
10
- import { t as w } from "./LiveRegion-D9Me4kBs.js";
11
- import { t as T } from "./z-index-B0Vk_Mp1.js";
12
- import { n as E, t as D } from "./Heading-Dfo3bjyn.js";
13
- import { t as ee } from "./Checkbox-BexPyTGk.js";
14
- import { t as O } from "./modalManager.svelte-qcVxl7C5.js";
15
- import { t as k } from "./Modal-DrA1swbF.js";
16
- import { t as A } from "./Text-CqjLjIF8.js";
17
- import "./colors-MuuDk6KF.js";
18
- import { i as te, n as ne, t as re } from "./i18n-CcJmTGJP.js";
19
- import { t as ie } from "./eventStatusStream-D04pcbuu.js";
20
- import { n as j, t as ae } from "./CheckoutTimer-d3KUbevy.js";
21
- import { t as M } from "./labels-Q4CaHsVM.js";
22
- import { a as N, i as oe, o as se, r as P, s as ce, t as le } from "./showcase-state-options-BoJxiEsg.js";
23
- import { n as ue } from "./order-totals-BImtvmoh.js";
24
- import "svelte/internal/disclose-version";
25
- import * as F from "svelte/internal/client";
26
- import { onDestroy as de, onMount as I, untrack as fe } from "svelte";
27
- //#region node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/phosphor/ChevronLeftIcon.svelte
28
- var pe = F.from_svg("<path d=\"M163.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,168,208V48A8,8,0,0,0,163.06,40.61Z\"></path>"), L = F.from_svg("<polyline points=\"160 208 80 128 160 48\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"></polyline>"), R = F.from_svg("<svg aria-hidden=\"true\" viewBox=\"0 0 256 256\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><!></svg>");
29
- function me(e, t) {
30
- F.push(t, !0);
31
- let n = F.prop(t, "size", 3, "24"), r = F.prop(t, "color", 3, "currentColor"), i = F.prop(t, "class", 3, ""), a = d(), o = F.derived(() => t.weight ?? a?.weight ?? "regular");
32
- var s = R();
33
- let c;
34
- var l = F.child(s), u = (e) => {
35
- var t = pe();
36
- F.append(e, t);
37
- }, f = (e) => {
38
- var t = L();
39
- F.append(e, t);
40
- };
41
- F.if(l, (e) => {
42
- F.get(o) === "fill" ? e(u) : e(f, -1);
43
- }), F.reset(s), F.template_effect(() => {
44
- F.set_class(s, 0, F.clsx(i())), F.set_attribute(s, "width", n()), F.set_attribute(s, "height", n()), c = F.set_style(s, "", c, { color: r() === "currentColor" ? void 0 : r() });
45
- }), F.append(e, s), F.pop();
46
- }
47
- t("cookies");
48
- var he = {
49
- OPERATOR_TOKEN: r("operator_token"),
50
- REFRESH_TOKEN: r("refresh_token"),
51
- TOKEN_EXPIRY: r("token_expiry"),
52
- ACTIVE_CONTEXT_ID: r("active_context_id"),
53
- PERFORMER_TOKEN: r("performer_token"),
54
- PERFORMER_REFRESH_TOKEN: r("performer_refresh_token"),
55
- PERFORMER_TOKEN_EXPIRY: r("performer_token_expiry"),
56
- USER_DETAILS: r("userDetails"),
57
- SUPPRESSED_ALERTS: r("suppressedAlerts"),
58
- SESSION_ID: r("session_id"),
59
- CHECKOUT_CARTID: r("checkout-cartid"),
60
- USER_TZ: r("user_tz"),
61
- EXP: r("exp")
62
- };
63
- he.OPERATOR_TOKEN, he.REFRESH_TOKEN;
64
- function z() {
65
- return typeof document > "u" ? {} : document.cookie.split("; ").reduce((e, t) => {
66
- if (!t) return e;
67
- let [n, ...r] = t.split("=");
68
- return e[n] = decodeURIComponent(r.join("=")), e;
69
- }, {});
70
- }
71
- function ge(e) {
72
- return z()[e] || null;
73
- }
74
- //#endregion
75
- //#region node_modules/@getmicdrop/svelte-components/dist/utils/storage/registry.js
76
- var B = /* @__PURE__ */ new Map(), V = 0, H = /* @__PURE__ */ new WeakMap();
77
- function U(e) {
78
- if (!e) return "";
79
- let t = H.get(e);
80
- return t === void 0 && (V += 1, t = `#${V}`, H.set(e, t)), t;
81
- }
82
- function _e(e) {
83
- let t = `${e.kind}:${e.key}`, n = U(e.storage), r = B.get(t);
84
- r || (r = /* @__PURE__ */ new Map(), B.set(t, r));
85
- let i = r.get(n);
86
- return r.set(n, i ? {
87
- ...e,
88
- clearOnLogout: i.clearOnLogout || e.clearOnLogout,
89
- containsPII: i.containsPII || e.containsPII
90
- } : e), e.key;
91
- }
92
- //#endregion
93
- //#region node_modules/@getmicdrop/svelte-components/dist/utils/storage/themeStorage.js
94
- var W = _e({
95
- key: "micdrop:ui:theme",
96
- kind: "local"
97
- }), G = "theme";
98
- function K() {
99
- if (typeof window > "u") return null;
100
- let e;
101
- try {
102
- e = window.localStorage.getItem(G);
103
- } catch {
104
- return null;
105
- }
106
- return e === "dark" || e === "light" ? e : null;
107
- }
108
- function q() {
109
- if (!(typeof window > "u")) try {
110
- window.localStorage.removeItem(G);
111
- } catch {}
112
- }
113
- function ve() {
114
- let e = x(W), t = K();
115
- return e === "dark" || e === "light" ? (t && q(), e) : t ? (b(W, t), q(), t) : null;
116
- }
117
- //#endregion
118
- //#region __SKIP_ENVIRONMENT__
119
- var J = typeof window < "u";
120
- //#endregion
121
- //#region node_modules/@getmicdrop/svelte-components/dist/stripe/useStripeTheme.svelte.js
122
- function Y(e) {
123
- if (typeof window > "u") return !1;
124
- try {
125
- let t = ve();
126
- if (t === "dark") return !0;
127
- if (t === "light") return !1;
128
- let n = e || "[data-theme=\"dark\"], [data-theme=\"light\"], .micdrop, [data-theme]", r = document.querySelectorAll(n);
129
- for (let e of r) if (e.getAttribute("data-theme") === "dark") return !0;
130
- return document.documentElement.getAttribute("data-theme") === "dark" ? !0 : window.matchMedia?.("(prefers-color-scheme: dark)")?.matches ?? !1;
131
- } catch {
132
- return !1;
133
- }
134
- }
135
- function X(e) {
136
- return e ? "night" : "stripe";
137
- }
138
- function ye(e = {}) {
139
- let { containerSelector: t = "[data-theme=\"dark\"], [data-theme=\"light\"], .micdrop, [data-theme]", watchChanges: n = !0, fallback: r = "stripe" } = e, i = F.state(F.proxy(r)), a = null, o = null;
140
- function s() {
141
- F.set(i, X(Y(t)), !0);
142
- }
143
- return I(() => {
144
- if (s(), n && typeof MutationObserver < "u") {
145
- let e = document.querySelectorAll(t), n = document.documentElement;
146
- a = new MutationObserver(() => {
147
- s();
148
- }), a.observe(n, {
149
- attributes: !0,
150
- attributeFilter: ["class", "data-theme"]
151
- }), e.forEach((e) => {
152
- a?.observe(e, {
153
- attributes: !0,
154
- attributeFilter: ["class", "data-theme"]
155
- });
156
- }), o = window.matchMedia("(prefers-color-scheme: dark)"), o.addEventListener("change", s);
157
- }
158
- }), de(() => {
159
- a &&= (a.disconnect(), null), o &&= (o.removeEventListener("change", s), null);
160
- }), {
161
- get current() {
162
- return F.get(i);
163
- },
164
- refresh: s
165
- };
166
- }
167
- //#endregion
168
- //#region src/lib/public-calendar-flow/CheckoutForm.svelte
169
- var be = F.from_html("<div class=\"attendee-card border-default bg-surface-secondary svelte-12l1urf\"><div class=\"flex items-center justify-between mb-3\"><!> <!></div> <div class=\"space-y-3\"><div class=\"grid grid-cols-1 sm:grid-cols-2 gap-3\"><!> <!></div> <!></div></div>"), xe = F.from_html("<section class=\"space-y-5\"><!> <!></section>"), Se = F.from_html("<p class=\"type-body text-color-muted mt-1\"> </p>"), Ce = F.from_html("<p class=\"type-body text-accent-danger mt-2\"> </p> <!>", 1), Z = F.from_html("<div class=\"free-order-notice border-default bg-surface-secondary svelte-12l1urf\"><!> <div class=\"mt-1\"><!></div></div> <!>", 1), we = F.from_html("<p class=\"type-body text-color-muted py-2\"> </p>"), Q = F.from_html("<div></div> <!>", 1), Te = F.from_html("<!> <!> <!>", 1), $ = F.from_html("<!> <p class=\"type-body text-accent-danger mt-2\"> </p> <!>", 1);
170
- F.from_html("<!> <!> <div class=\"grid grid-cols-2 gap-4\"><!> <!></div>", 1);
171
- var Ee = F.from_html("<!> <p class=\"type-body text-accent-danger mt-2\"> </p>", 1), De = F.from_html("<div class=\"checkout-form-panel space-y-6 bg-surface-secondary border-default svelte-12l1urf\" data-testid=\"checkout-form\"><div class=\"timer-header border-default bg-surface-secondary svelte-12l1urf\"><!> <!></div> <section class=\"space-y-4\"><!> <div class=\"grid grid-cols-1 sm:grid-cols-2 gap-4\"><!> <!></div> <!> <!> <!> <!></section> <!> <section class=\"space-y-4\"><!> <!></section></div>");
172
- function Oe(e, t) {
173
- F.push(t, !0);
174
- let r = F.prop(t, "stripe", 3, void 0), i = F.prop(t, "paymentIntent", 3, void 0), a = F.prop(t, "elements", 15, void 0), o = F.prop(t, "paymentError", 3, null), c = F.prop(t, "labels", 3, M), u = F.prop(t, "giftCard", 3, void 0), d = J ? ye() : { current: "stripe" }, f = F.state(null), p = null, m = F.state(null);
175
- function h() {
176
- if (!(!J || !r() || !i() || !F.get(f))) {
177
- if (p) {
178
- try {
179
- p.destroy();
180
- } catch {}
181
- p = null;
182
- }
183
- a(r().elements({
184
- clientSecret: i(),
185
- appearance: { theme: d.current }
186
- })), p = a().create("payment"), p.mount(F.get(f)), F.set(m, i());
187
- }
188
- }
189
- function g() {
190
- if (p) {
191
- try {
192
- p.destroy();
193
- } catch {}
194
- p = null;
195
- }
196
- F.set(m, null);
197
- }
198
- F.user_effect(() => {
199
- r() && i() && F.get(f) && i() !== F.get(m) ? h() : (!r() || !i()) && F.get(m) && g();
200
- }), F.user_effect(() => {
201
- if (F.get(m) && a() && d.current) try {
202
- a().update({ appearance: { theme: d.current } });
203
- } catch {}
204
- }), de(() => {
205
- p &&= (p.destroy(), null), F.set(m, null);
206
- });
207
- let _ = F.state(""), v = F.state(""), y = F.state(""), b = F.state(""), x = F.state(""), S = F.state(!1);
208
- F.state(""), F.state(""), F.state("");
209
- let C = F.state(F.proxy([])), w = F.derived(() => t.isFreeOrder || t.orderTotals.total === 0), T = F.state(!1), E = F.derived(() => (() => {
210
- if (!F.get(T)) return {};
211
- let e = {};
212
- if (F.get(_).trim() || (e.firstName = c().firstNameRequired || "First name is required"), F.get(v).trim() || (e.lastName = c().lastNameRequired || "Last name is required"), F.get(y).trim() ? n(F.get(y)) || (e.email = c().emailInvalid || "Enter a valid email address") : e.email = c().emailRequired || "Email is required", t.isRegistration) for (let t = 0; t < F.get(C).length; t++) {
213
- let r = F.get(C)[t];
214
- r.sameAsPurchaser || (r.firstName.trim() || (e[`attendee_${t}_firstName`] = "First name is required"), r.lastName.trim() || (e[`attendee_${t}_lastName`] = "Last name is required"), r.email.trim() ? n(r.email) || (e[`attendee_${t}_email`] = c().emailInvalidShort || "Enter a valid email") : e[`attendee_${t}_email`] = c().emailRequired || "Email is required");
215
- }
216
- return e;
217
- })()), O = F.derived(() => Object.keys(F.get(E)).length > 0), k = F.derived(() => (() => {
218
- let e = t.event.venue?.name?.trim();
219
- return e ? (c().keepMeUpdatedByVenue || "Keep me updated about {venue} events and news").replace("{venue}", e) : c().keepMeUpdated || "Keep me updated about this event and similar events";
220
- })()), te = F.derived(() => t.timerSeconds > 0 && t.timerSeconds <= 120);
221
- F.user_effect(() => {
222
- if (t.isRegistration) {
223
- let e = t.orderTotals.lines.reduce((e, t) => e + t.quantity, 0);
224
- F.get(C).length !== e && F.set(C, Array.from({ length: e }, (e, t) => ({
225
- firstName: "",
226
- lastName: "",
227
- email: "",
228
- sameAsPurchaser: t === 0
229
- })), !0);
230
- }
231
- });
232
- let ne = F.state(F.proxy(fe(() => t.submitRequested)));
233
- F.user_effect(() => {
234
- t.submitRequested > F.get(ne) && (F.set(ne, t.submitRequested, !0), ie());
235
- });
236
- function re(e, t) {
237
- F.set(C, F.get(C).map((n, r) => r === e ? {
238
- ...n,
239
- sameAsPurchaser: t,
240
- firstName: t ? F.get(_) : n.firstName,
241
- lastName: t ? F.get(v) : n.lastName,
242
- email: t ? F.get(y) : n.email
243
- } : n), !0);
244
- }
245
- function ie() {
246
- F.set(T, !0), !F.get(O) && (o() && !F.get(w) || !F.get(w) && !r() || t.onPlaceOrder({
247
- firstName: F.get(_),
248
- lastName: F.get(v),
249
- email: F.get(y),
250
- phone: F.get(b),
251
- questionAnswer: t.event.questionPrompt ? F.get(x) : void 0,
252
- keepMeUpdated: F.get(S),
253
- attendees: t.isRegistration ? F.get(C).map((e) => ({
254
- firstName: e.sameAsPurchaser ? F.get(_) : e.firstName,
255
- lastName: e.sameAsPurchaser ? F.get(v) : e.lastName,
256
- email: e.sameAsPurchaser ? F.get(y) : e.email,
257
- sameAsPurchaser: e.sameAsPurchaser
258
- })) : void 0
259
- }));
260
- }
261
- var j = De(), N = F.child(j), oe = F.child(N);
262
- {
263
- let e = F.derived(() => c().goBack || "Go back");
264
- s(oe, {
265
- variant: "icon",
266
- size: "icon-sm",
267
- get onclick() {
268
- return t.onBack;
269
- },
270
- get "aria-label"() {
271
- return F.get(e);
272
- },
273
- "data-testid": "checkout-back",
274
- children: (e, t) => {
275
- me(e, { size: "20" });
276
- },
277
- $$slots: { default: !0 }
278
- });
279
- }
280
- var se = F.sibling(oe, 2);
281
- ae(se, {
282
- get seconds() {
283
- return t.timerSeconds;
284
- },
285
- get isUrgent() {
286
- return F.get(te);
287
- },
288
- get labels() {
289
- return c();
290
- }
291
- }), F.reset(N);
292
- var P = F.sibling(N, 2), ce = F.child(P);
293
- D(ce, {
294
- level: 2,
295
- size: "lg",
296
- weight: "semibold",
297
- children: (e, t) => {
298
- F.next();
299
- var n = F.text();
300
- F.template_effect(() => F.set_text(n, c().yourDetails || "Your details")), F.append(e, n);
301
- },
302
- $$slots: { default: !0 }
303
- });
304
- var le = F.sibling(ce, 2), ue = F.child(le);
305
- {
306
- let e = F.derived(() => c().firstName || "First name"), t = F.derived(() => c().firstName || "First name"), n = F.derived(() => F.get(E).firstName ?? ""), r = F.derived(() => F.get(E).firstName ? "red" : "base");
307
- l(ue, {
308
- get label() {
309
- return F.get(e);
310
- },
311
- get placeholder() {
312
- return F.get(t);
313
- },
314
- required: !0,
315
- get errorText() {
316
- return F.get(n);
317
- },
318
- get color() {
319
- return F.get(r);
320
- },
321
- "data-testid": "checkout-first-name",
322
- get value() {
323
- return F.get(_);
324
- },
325
- set value(e) {
326
- F.set(_, e, !0);
327
- }
328
- });
329
- }
330
- var I = F.sibling(ue, 2);
331
- {
332
- let e = F.derived(() => c().lastName || "Last name"), t = F.derived(() => c().lastName || "Last name"), n = F.derived(() => F.get(E).lastName ?? ""), r = F.derived(() => F.get(E).lastName ? "red" : "base");
333
- l(I, {
334
- get label() {
335
- return F.get(e);
336
- },
337
- get placeholder() {
338
- return F.get(t);
339
- },
340
- required: !0,
341
- get errorText() {
342
- return F.get(n);
343
- },
344
- get color() {
345
- return F.get(r);
346
- },
347
- "data-testid": "checkout-last-name",
348
- get value() {
349
- return F.get(v);
350
- },
351
- set value(e) {
352
- F.set(v, e, !0);
353
- }
354
- });
355
- }
356
- F.reset(le);
357
- var pe = F.sibling(le, 2);
358
- {
359
- let e = F.derived(() => c().emailAddress || "Email address"), t = F.derived(() => c().emailPlaceholder || "you@example.com"), n = F.derived(() => F.get(E).email ?? ""), r = F.derived(() => F.get(E).email ? "red" : "base");
360
- l(pe, {
361
- get label() {
362
- return F.get(e);
363
- },
364
- type: "email",
365
- get placeholder() {
366
- return F.get(t);
367
- },
368
- required: !0,
369
- get errorText() {
370
- return F.get(n);
371
- },
372
- get color() {
373
- return F.get(r);
374
- },
375
- "data-testid": "checkout-email",
376
- get value() {
377
- return F.get(y);
378
- },
379
- set value(e) {
380
- F.set(y, e, !0);
381
- }
382
- });
383
- }
384
- var L = F.sibling(pe, 2);
385
- {
386
- let e = F.derived(() => c().phone || "Phone number"), t = F.derived(() => c().phonePlaceholder || "(555) 555-5555");
387
- l(L, {
388
- get label() {
389
- return F.get(e);
390
- },
391
- type: "tel",
392
- get placeholder() {
393
- return F.get(t);
394
- },
395
- "data-testid": "checkout-phone",
396
- get value() {
397
- return F.get(b);
398
- },
399
- set value(e) {
400
- F.set(b, e, !0);
401
- }
402
- });
403
- }
404
- var R = F.sibling(L, 2), he = (e) => {
405
- l(e, {
406
- get label() {
407
- return t.event.questionPrompt;
408
- },
409
- get value() {
410
- return F.get(x);
411
- },
412
- set value(e) {
413
- F.set(x, e, !0);
414
- }
415
- });
416
- };
417
- F.if(R, (e) => {
418
- t.event.questionPrompt && e(he);
419
- });
420
- var z = F.sibling(R, 2);
421
- ee(z, {
422
- get checked() {
423
- return F.get(S);
424
- },
425
- set checked(e) {
426
- F.set(S, e, !0);
427
- },
428
- children: (e, t) => {
429
- F.next();
430
- var n = F.text();
431
- F.template_effect(() => F.set_text(n, F.get(k))), F.append(e, n);
432
- },
433
- $$slots: { default: !0 }
434
- }), F.reset(P);
435
- var ge = F.sibling(P, 2), B = (e) => {
436
- var t = xe(), n = F.child(t);
437
- D(n, {
438
- level: 2,
439
- size: "lg",
440
- weight: "semibold",
441
- children: (e, t) => {
442
- F.next();
443
- var n = F.text();
444
- F.template_effect(() => F.set_text(n, c().attendeeDetails || "Attendee details")), F.append(e, n);
445
- },
446
- $$slots: { default: !0 }
447
- });
448
- var r = F.sibling(n, 2);
449
- F.each(r, 17, () => F.get(C), F.index, (e, t, n) => {
450
- var r = be(), i = F.child(r), a = F.child(i);
451
- A(a, {
452
- size: "sm",
453
- weight: "semibold",
454
- children: (e, t) => {
455
- F.next();
456
- var r = F.text();
457
- F.template_effect(() => F.set_text(r, `${(c().attendee || "Attendee") ?? ""}
458
- ${n + 1}`)), F.append(e, r);
459
- },
460
- $$slots: { default: !0 }
461
- });
462
- var o = F.sibling(a, 2);
463
- ee(o, {
464
- get checked() {
465
- return F.get(t).sameAsPurchaser;
466
- },
467
- onchange: ({ checked: e }) => re(n, e),
468
- children: (e, t) => {
469
- F.next();
470
- var n = F.text();
471
- F.template_effect(() => F.set_text(n, c().sameAsPurchaser || "Same as purchaser")), F.append(e, n);
472
- },
473
- $$slots: { default: !0 }
474
- }), F.reset(i);
475
- var s = F.sibling(i, 2), u = F.child(s), d = F.child(u);
476
- {
477
- let e = F.derived(() => c().firstName || "First name"), r = F.derived(() => c().firstName || "First name"), i = F.derived(() => F.get(t).sameAsPurchaser ? "" : F.get(E)[`attendee_${n}_firstName`] ?? ""), a = F.derived(() => !F.get(t).sameAsPurchaser && F.get(E)[`attendee_${n}_firstName`] ? "red" : "base");
478
- l(d, {
479
- get label() {
480
- return F.get(e);
481
- },
482
- get placeholder() {
483
- return F.get(r);
484
- },
485
- required: !0,
486
- get disabled() {
487
- return F.get(t).sameAsPurchaser;
488
- },
489
- get errorText() {
490
- return F.get(i);
491
- },
492
- get color() {
493
- return F.get(a);
494
- },
495
- get value() {
496
- return F.get(t).firstName;
497
- },
498
- set value(e) {
499
- F.get(t).firstName = e;
500
- }
501
- });
502
- }
503
- var f = F.sibling(d, 2);
504
- {
505
- let e = F.derived(() => c().lastName || "Last name"), r = F.derived(() => c().lastName || "Last name"), i = F.derived(() => F.get(t).sameAsPurchaser ? "" : F.get(E)[`attendee_${n}_lastName`] ?? ""), a = F.derived(() => !F.get(t).sameAsPurchaser && F.get(E)[`attendee_${n}_lastName`] ? "red" : "base");
506
- l(f, {
507
- get label() {
508
- return F.get(e);
509
- },
510
- get placeholder() {
511
- return F.get(r);
512
- },
513
- required: !0,
514
- get disabled() {
515
- return F.get(t).sameAsPurchaser;
516
- },
517
- get errorText() {
518
- return F.get(i);
519
- },
520
- get color() {
521
- return F.get(a);
522
- },
523
- get value() {
524
- return F.get(t).lastName;
525
- },
526
- set value(e) {
527
- F.get(t).lastName = e;
528
- }
529
- });
530
- }
531
- F.reset(u);
532
- var p = F.sibling(u, 2);
533
- {
534
- let e = F.derived(() => c().email || "Email"), r = F.derived(() => c().attendeeEmailPlaceholder || "attendee@example.com"), i = F.derived(() => F.get(t).sameAsPurchaser ? "" : F.get(E)[`attendee_${n}_email`] ?? ""), a = F.derived(() => !F.get(t).sameAsPurchaser && F.get(E)[`attendee_${n}_email`] ? "red" : "base");
535
- l(p, {
536
- get label() {
537
- return F.get(e);
538
- },
539
- type: "email",
540
- get placeholder() {
541
- return F.get(r);
542
- },
543
- required: !0,
544
- get disabled() {
545
- return F.get(t).sameAsPurchaser;
546
- },
547
- get errorText() {
548
- return F.get(i);
549
- },
550
- get color() {
551
- return F.get(a);
552
- },
553
- get value() {
554
- return F.get(t).email;
555
- },
556
- set value(e) {
557
- F.get(t).email = e;
558
- }
559
- });
560
- }
561
- F.reset(s), F.reset(r), F.append(e, r);
562
- }), F.reset(t), F.append(e, t);
563
- };
564
- F.if(ge, (e) => {
565
- t.isRegistration && F.get(C).length > 0 && e(B);
566
- });
567
- var V = F.sibling(ge, 2), H = F.child(V), U = (e) => {
568
- var t = Z(), n = F.first_child(t), r = F.child(n);
569
- A(r, {
570
- size: "sm",
571
- color: "secondary",
572
- weight: "medium",
573
- class: "block",
574
- children: (e, t) => {
575
- F.next();
576
- var n = F.text();
577
- F.template_effect(() => F.set_text(n, c().noPaymentRequired || "No payment required")), F.append(e, n);
578
- },
579
- $$slots: { default: !0 }
580
- });
581
- var i = F.sibling(r, 2), a = F.child(i);
582
- A(a, {
583
- size: "xs",
584
- color: "muted",
585
- class: "block",
586
- children: (e, t) => {
587
- F.next();
588
- var n = F.text();
589
- F.template_effect(() => F.set_text(n, c().freeEventMessage || "This is a free event. Complete the form above to reserve your spot")), F.append(e, n);
590
- },
591
- $$slots: { default: !0 }
592
- }), F.reset(i), F.reset(n);
593
- var s = F.sibling(n, 2), l = (e) => {
594
- var t = Ce(), n = F.first_child(t), r = F.child(n, !0);
595
- F.reset(n);
596
- var i = F.sibling(n, 2), a = (e) => {
597
- var t = Se(), n = F.child(t, !0);
598
- F.reset(t), F.template_effect(() => F.set_text(n, o().suggestion)), F.append(e, t);
599
- };
600
- F.if(i, (e) => {
601
- o().suggestion && e(a);
602
- }), F.template_effect(() => F.set_text(r, o().message)), F.append(e, t);
603
- };
604
- F.if(s, (e) => {
605
- o() && e(l);
606
- }), F.append(e, t);
607
- }, _e = (e) => {
608
- var t = Te(), n = F.first_child(t);
609
- D(n, {
610
- level: 2,
611
- size: "lg",
612
- weight: "semibold",
613
- children: (e, t) => {
614
- F.next();
615
- var n = F.text();
616
- F.template_effect(() => F.set_text(n, c().payment || "Payment")), F.append(e, n);
617
- },
618
- $$slots: { default: !0 }
619
- });
620
- var r = F.sibling(n, 2), i = (e) => {
621
- var t = Q(), n = F.first_child(t);
622
- F.bind_this(n, (e) => F.set(f, e), () => F.get(f));
623
- var r = F.sibling(n, 2), i = (e) => {
624
- var t = we(), n = F.child(t, !0);
625
- F.reset(t), F.template_effect(() => F.set_text(n, c().loadingPaymentForm || "Loading secure payment form...")), F.append(e, t);
626
- };
627
- F.if(r, (e) => {
628
- F.get(m) || e(i);
629
- }), F.append(e, t);
630
- }, a = (e) => {
631
- var t = we(), n = F.child(t, !0);
632
- F.reset(t), F.template_effect(() => F.set_text(n, c().loadingPaymentForm || "Loading secure payment form...")), F.append(e, t);
633
- };
634
- F.if(r, (e) => {
635
- J ? e(i) : e(a, -1);
636
- });
637
- var s = F.sibling(r, 2), l = (e) => {
638
- var t = Ce(), n = F.first_child(t), r = F.child(n, !0);
639
- F.reset(n);
640
- var i = F.sibling(n, 2), a = (e) => {
641
- var t = Se(), n = F.child(t, !0);
642
- F.reset(t), F.template_effect(() => F.set_text(n, o().suggestion)), F.append(e, t);
643
- };
644
- F.if(i, (e) => {
645
- o().suggestion && e(a);
646
- }), F.template_effect(() => F.set_text(r, o().message)), F.append(e, t);
647
- };
648
- F.if(s, (e) => {
649
- o() && e(l);
650
- }), F.append(e, t);
651
- }, W = (e) => {
652
- var t = $(), n = F.first_child(t);
653
- D(n, {
654
- level: 2,
655
- size: "lg",
656
- weight: "semibold",
657
- children: (e, t) => {
658
- F.next();
659
- var n = F.text();
660
- F.template_effect(() => F.set_text(n, c().payment || "Payment")), F.append(e, n);
661
- },
662
- $$slots: { default: !0 }
663
- });
664
- var r = F.sibling(n, 2), i = F.child(r, !0);
665
- F.reset(r);
666
- var a = F.sibling(r, 2), s = (e) => {
667
- var t = Se(), n = F.child(t, !0);
668
- F.reset(t), F.template_effect(() => F.set_text(n, o().suggestion)), F.append(e, t);
669
- };
670
- F.if(a, (e) => {
671
- o().suggestion && e(s);
672
- }), F.template_effect(() => F.set_text(i, o().message)), F.append(e, t);
673
- }, G = (e) => {
674
- var t = Ee(), n = F.first_child(t);
675
- D(n, {
676
- level: 2,
677
- size: "lg",
678
- weight: "semibold",
679
- children: (e, t) => {
680
- F.next();
681
- var n = F.text();
682
- F.template_effect(() => F.set_text(n, c().payment || "Payment")), F.append(e, n);
683
- },
684
- $$slots: { default: !0 }
685
- });
686
- var r = F.sibling(n, 2), i = F.child(r, !0);
687
- F.reset(r), F.template_effect(() => F.set_text(i, c().paymentUnavailable || "Payment can't be taken for this order right now — refresh the page or contact the venue")), F.append(e, t);
688
- };
689
- F.if(H, (e) => {
690
- F.get(w) ? e(U) : r() && i() ? e(_e, 1) : o() ? e(W, 2) : e(G, -1);
691
- });
692
- var K = F.sibling(H, 2), q = (e) => {
693
- var t = F.comment(), n = F.first_child(t);
694
- F.snippet(n, u), F.append(e, t);
695
- };
696
- F.if(K, (e) => {
697
- u() && !t.isFreeOrder && e(q);
698
- }), F.reset(V), F.reset(j), F.append(e, j), F.pop();
699
- }
700
- //#endregion
701
- //#region src/lib/public-calendar-flow/CheckoutTermsCheckbox.svelte
702
- var ke = F.from_html(" <a target=\"_blank\" rel=\"external noopener noreferrer\" class=\"link underline\"> <span class=\"sr-only\">&nbsp;(opens in new tab)</span></a>", 1), Ae = F.from_html("<a target=\"_blank\" rel=\"external noopener noreferrer\" class=\"link underline\"> <span class=\"sr-only\">&nbsp;(opens in new tab)</span></a>"), je = F.from_html("<div class=\"flex items-center gap-1.5\"><!> <!></div>"), Me = F.from_html("<div class=\"space-y-2\"><!> <!> <!></div>");
703
- function Ne(e, t) {
704
- F.push(t, !0);
705
- let n = F.prop(t, "agreeTerms", 15, !1), r = F.prop(t, "showError", 3, !1), i = F.prop(t, "termsUrl", 3, "https://get-micdrop.com/tos"), a = F.prop(t, "privacyUrl", 3, "https://get-micdrop.com/privacy"), o = F.prop(t, "labels", 3, M);
706
- var s = Me(), c = F.child(s);
707
- ee(c, {
708
- get checked() {
709
- return n();
710
- },
711
- set checked(e) {
712
- n(e);
713
- },
714
- children: (e, t) => {
715
- F.next();
716
- var n = ke(), r = F.first_child(n), a = F.sibling(r), s = F.child(a, !0);
717
- F.next(), F.reset(a), F.template_effect(() => {
718
- F.set_text(r, `${(o().agreeToTerms || "I agree to the") ?? ""} `), F.set_attribute(a, "href", i()), F.set_text(s, o().termsAndConditionsLink || "terms and conditions");
719
- }), F.append(e, n);
720
- },
721
- $$slots: { default: !0 }
722
- });
723
- var l = F.sibling(c, 2);
724
- A(l, {
725
- size: "xs",
726
- color: "muted",
727
- class: "block",
728
- children: (e, t) => {
729
- var n = Ae(), r = F.child(n, !0);
730
- F.next(), F.reset(n), F.template_effect(() => {
731
- F.set_attribute(n, "href", a()), F.set_text(r, o().privacyPolicyLink || "Privacy policy");
732
- }), F.append(e, n);
733
- },
734
- $$slots: { default: !0 }
735
- });
736
- var u = F.sibling(l, 2), d = (e) => {
737
- var t = je(), n = F.child(t);
738
- v(n, {
739
- size: "16",
740
- class: "text-accent-danger shrink-0"
741
- });
742
- var r = F.sibling(n, 2);
743
- A(r, {
744
- size: "xs",
745
- class: "text-accent-danger",
746
- children: (e, t) => {
747
- F.next();
748
- var n = F.text();
749
- F.template_effect(() => F.set_text(n, o().mustAgreeTerms || "You must agree to the terms")), F.append(e, n);
750
- },
751
- $$slots: { default: !0 }
752
- }), F.reset(t), F.append(e, t);
753
- };
754
- F.if(u, (e) => {
755
- r() && e(d);
756
- }), F.reset(s), F.append(e, s), F.pop();
757
- }
758
- //#endregion
759
- //#region src/lib/public-calendar-flow/CheckoutSidebar.svelte
760
- var Pe = F.from_html(" <!>", 1), Fe = F.from_html("<div class=\"p-5 shrink-0\"><div class=\"flex gap-3\"><div class=\"shrink-0 w-20 h-14 rounded-lg overflow-hidden bg-surface-tertiary\"><!></div> <div class=\"flex-1 min-w-0\"><!> <div class=\"flex items-center gap-1.5 mt-1\"><!> <!></div> <div class=\"mt-0.5\"><!></div></div></div></div> <div class=\"px-5 pb-3 flex-1 overflow-y-auto min-h-0 border-t border-default pt-3\"><!></div> <div class=\"px-5 pt-3 pb-5 shrink-0 border-t border-default space-y-3\" data-testid=\"checkout-summary\"><!> <div data-testid=\"checkout-terms\"><!></div> <!> <!></div>", 1);
761
- function Ie(e, t) {
762
- F.push(t, !0);
763
- let n = F.prop(t, "saleClosed", 3, !1), r = F.prop(t, "priceUnavailable", 3, !1), i = F.prop(t, "labels", 3, M), a = F.prop(t, "locale", 3, void 0), c = F.prop(t, "agreeTerms", 15, !1), l = F.prop(t, "termsError", 3, !1);
764
- E(e, {
765
- border: !0,
766
- padding: !1,
767
- class: "flex flex-col max-h-[calc(100vh-1.5rem)] rounded-xl shadow-lg overflow-hidden bg-surface-secondary",
768
- children: (e, d) => {
769
- var f = Fe(), _ = F.first_child(f), v = F.child(_), b = F.child(v), x = F.child(b);
770
- y(x, {
771
- get src() {
772
- return t.event.imageUrl;
773
- },
774
- get alt() {
775
- return t.event.title;
776
- },
777
- get fallback() {
778
- return m;
779
- },
780
- fit: "cover",
781
- class: "w-full h-full"
782
- }), F.reset(b);
783
- var S = F.sibling(b, 2), C = F.child(S);
784
- A(C, {
785
- size: "sm",
786
- weight: "semibold",
787
- leading: "tight",
788
- class: "block line-clamp-2",
789
- children: (e, n) => {
790
- F.next();
791
- var r = F.text();
792
- F.template_effect(() => F.set_text(r, t.event.title)), F.append(e, r);
793
- },
794
- $$slots: { default: !0 }
795
- });
796
- var w = F.sibling(C, 2), T = F.child(w);
797
- g(T, {
798
- size: "16",
799
- class: "shrink-0 icon-muted"
800
- });
801
- var E = F.sibling(T, 2);
802
- A(E, {
803
- size: "xs",
804
- color: "muted",
805
- children: (e, n) => {
806
- F.next();
807
- var r = Pe(), i = F.first_child(r), o = F.sibling(i), s = (e) => {
808
- var n = F.text();
809
- F.template_effect((e) => F.set_text(n, `· ${e ?? ""}`), [() => h(t.event.startDateTime, t.event.timezone, a())]), F.append(e, n);
810
- };
811
- F.if(o, (e) => {
812
- t.event.displayStartTime !== !1 && e(s);
813
- }), F.template_effect((e) => F.set_text(i, `${e ?? ""} `), [() => p(t.event.startDateTime, t.event.timezone, a())]), F.append(e, r);
814
- },
815
- $$slots: { default: !0 }
816
- }), F.reset(w);
817
- var D = F.sibling(w, 2), ee = F.child(D);
818
- A(ee, {
819
- size: "xs",
820
- color: "muted",
821
- class: "block",
822
- children: (e, n) => {
823
- F.next();
824
- var r = F.text();
825
- F.template_effect(() => F.set_text(r, t.event.venue.name)), F.append(e, r);
826
- },
827
- $$slots: { default: !0 }
828
- }), F.reset(D), F.reset(S), F.reset(v), F.reset(_);
829
- var O = F.sibling(_, 2), k = F.child(O);
830
- ne(k, {
831
- get orderTotals() {
832
- return t.orderTotals;
833
- },
834
- mode: "lines",
835
- get labels() {
836
- return i();
837
- }
838
- }), F.reset(O);
839
- var te = F.sibling(O, 2), re = F.child(te);
840
- ne(re, {
841
- get orderTotals() {
842
- return t.orderTotals;
843
- },
844
- mode: "totals",
845
- get labels() {
846
- return i();
847
- }
848
- });
849
- var ie = F.sibling(re, 2);
850
- Ne(F.child(ie), {
851
- get showError() {
852
- return l();
853
- },
854
- get labels() {
855
- return i();
856
- },
857
- get agreeTerms() {
858
- return c();
859
- },
860
- set agreeTerms(e) {
861
- c(e);
862
- }
863
- }), F.reset(ie);
864
- var j = F.sibling(ie, 2);
865
- {
866
- let e = F.derived(() => t.processing || n() || r()), a = F.derived(() => t.processing && !n() && !r());
867
- s(j, {
868
- variant: "default",
869
- size: "lg",
870
- class: "w-full",
871
- get disabled() {
872
- return F.get(e);
873
- },
874
- get loading() {
875
- return F.get(a);
876
- },
877
- get onclick() {
878
- return t.onPlaceOrder;
879
- },
880
- "data-testid": "checkout-place-order",
881
- children: (e, a) => {
882
- var s = F.comment(), c = F.first_child(s), l = (e) => {
883
- var t = F.text();
884
- F.template_effect(() => F.set_text(t, i().salesClosed || "Sales closed")), F.append(e, t);
885
- }, d = (e) => {
886
- var t = F.text();
887
- F.template_effect(() => F.set_text(t, i().placeOrder || "Place order")), F.append(e, t);
888
- }, f = (e) => {
889
- var t = F.text();
890
- F.template_effect(() => F.set_text(t, i().placingOrder || "Placing order...")), F.append(e, t);
891
- }, p = (e) => {
892
- var t = F.text();
893
- F.template_effect(() => F.set_text(t, `${(i().completeOrder || "Complete order") ?? ""} · ${(i().free || "Free") ?? ""}`)), F.append(e, t);
894
- }, m = (e) => {
895
- var n = F.text();
896
- F.template_effect((e) => F.set_text(n, `${(i().placeOrder || "Place order") ?? ""} · ${e ?? ""}`), [() => t.orderTotals.total == null ? "—" : u(o(t.orderTotals.total))]), F.append(e, n);
897
- };
898
- F.if(c, (e) => {
899
- n() ? e(l) : r() ? e(d, 1) : t.processing ? e(f, 2) : t.isFreeOrder ? e(p, 3) : e(m, -1);
900
- }), F.append(e, s);
901
- },
902
- $$slots: { default: !0 }
903
- });
904
- }
905
- var ae = F.sibling(j, 2), M = (e) => {
906
- A(e, {
907
- size: "sm",
908
- color: "muted",
909
- children: (e, t) => {
910
- F.next();
911
- var n = F.text();
912
- F.template_effect(() => F.set_text(n, i().priceUnavailable || "We couldn't load the price for this order — refresh the page or contact the venue")), F.append(e, n);
913
- },
914
- $$slots: { default: !0 }
915
- });
916
- };
917
- F.if(ae, (e) => {
918
- r() && e(M);
919
- }), F.reset(te), F.append(e, f);
920
- },
921
- $$slots: { default: !0 }
922
- }), F.pop();
923
- }
924
- //#endregion
925
- //#region src/lib/public-calendar-flow/CheckoutMobileFooter.svelte
926
- var Le = F.from_html("<div class=\"px-4 pb-3 -mt-1\"><!></div>"), Re = F.from_html("<div class=\"fixed bottom-0 left-0 right-0 md:hidden bg-surface-primary border-t border-default shadow-lg\"><div class=\"px-4 pt-3\"><!></div> <div class=\"flex items-center justify-between gap-3 px-4 py-3\"><div class=\"flex-1 min-w-0\"><!></div> <!></div> <!></div>");
927
- function ze(e, t) {
928
- F.push(t, !0);
929
- let n = F.prop(t, "saleClosed", 3, !1), r = F.prop(t, "priceUnavailable", 3, !1), i = F.prop(t, "labels", 3, M), a = F.prop(t, "agreeTerms", 15, !1), c = F.prop(t, "termsError", 3, !1), l = F.prop(t, "termsUrl", 3, void 0), d = F.prop(t, "privacyUrl", 3, void 0), f = F.derived(() => t.orderTotals.lines.reduce((e, t) => e + t.quantity, 0));
930
- var p = Re();
931
- let m;
932
- var h = F.child(p);
933
- Ne(F.child(h), {
934
- get showError() {
935
- return c();
936
- },
937
- get termsUrl() {
938
- return l();
939
- },
940
- get privacyUrl() {
941
- return d();
942
- },
943
- get labels() {
944
- return i();
945
- },
946
- get agreeTerms() {
947
- return a();
948
- },
949
- set agreeTerms(e) {
950
- a(e);
951
- }
952
- }), F.reset(h);
953
- var g = F.sibling(h, 2), _ = F.child(g), v = F.child(_);
954
- A(v, {
955
- size: "sm",
956
- weight: "semibold",
957
- class: "tabular-nums block",
958
- children: (e, n) => {
959
- var r = F.comment(), a = F.first_child(r), s = (e) => {
960
- var t = F.text();
961
- F.template_effect(() => F.set_text(t, `${F.get(f) ?? ""}
962
- ${(F.get(f) === 1 ? i().ticket || "ticket" : i().tickets || "tickets") ?? ""} · Free`)), F.append(e, t);
963
- }, c = (e) => {
964
- var t = F.text("—");
965
- F.append(e, t);
966
- }, l = (e) => {
967
- var n = F.text();
968
- F.template_effect((e) => F.set_text(n, e), [() => u(o(t.orderTotals.total))]), F.append(e, n);
969
- };
970
- F.if(a, (e) => {
971
- t.isFreeOrder ? e(s) : t.orderTotals.total == null ? e(c, 1) : e(l, -1);
972
- }), F.append(e, r);
973
- },
974
- $$slots: { default: !0 }
975
- }), F.reset(_);
976
- var y = F.sibling(_, 2);
977
- {
978
- let e = F.derived(() => t.processing || n() || r()), a = F.derived(() => t.processing && !n() && !r());
979
- s(y, {
980
- variant: "default",
981
- size: "lg",
982
- get disabled() {
983
- return F.get(e);
984
- },
985
- get loading() {
986
- return F.get(a);
987
- },
988
- get onclick() {
989
- return t.onPlaceOrder;
990
- },
991
- class: "shrink-0 min-w-36",
992
- "data-testid": "checkout-place-order",
993
- children: (e, a) => {
994
- var o = F.comment(), s = F.first_child(o), c = (e) => {
995
- var t = F.text();
996
- F.template_effect(() => F.set_text(t, i().salesClosed || "Sales closed")), F.append(e, t);
997
- }, l = (e) => {
998
- var t = F.text();
999
- F.template_effect(() => F.set_text(t, i().placeOrder || "Place order")), F.append(e, t);
1000
- }, u = (e) => {
1001
- var t = F.text();
1002
- F.template_effect(() => F.set_text(t, i().placingOrder || "Placing order...")), F.append(e, t);
1003
- }, d = (e) => {
1004
- var t = F.text();
1005
- F.template_effect(() => F.set_text(t, i().completeOrder || "Complete order")), F.append(e, t);
1006
- }, f = (e) => {
1007
- var t = F.text();
1008
- F.template_effect(() => F.set_text(t, i().placeOrder || "Place order")), F.append(e, t);
1009
- };
1010
- F.if(s, (e) => {
1011
- n() ? e(c) : r() ? e(l, 1) : t.processing ? e(u, 2) : t.isFreeOrder ? e(d, 3) : e(f, -1);
1012
- }), F.append(e, o);
1013
- },
1014
- $$slots: { default: !0 }
1015
- });
1016
- }
1017
- F.reset(g);
1018
- var b = F.sibling(g, 2), x = (e) => {
1019
- var t = Le(), n = F.child(t);
1020
- A(n, {
1021
- size: "sm",
1022
- color: "muted",
1023
- children: (e, t) => {
1024
- F.next();
1025
- var n = F.text();
1026
- F.template_effect(() => F.set_text(n, i().priceUnavailable || "We couldn't load the price for this order — refresh the page or contact the venue")), F.append(e, n);
1027
- },
1028
- $$slots: { default: !0 }
1029
- }), F.reset(t), F.append(e, t);
1030
- };
1031
- F.if(b, (e) => {
1032
- r() && e(x);
1033
- }), F.reset(p), F.template_effect(() => m = F.set_style(p, "padding-bottom: env(safe-area-inset-bottom, 0);", m, { "z-index": T.overlay })), F.append(e, p), F.pop();
1034
- }
1035
- //#endregion
1036
- //#region src/lib/public-calendar-flow/Checkout.svelte
1037
- var Be = t("CheckoutMain"), Ve = F.from_html("<p> </p> <p class=\"tone-secondary mb-6\"> </p> <!>", 1), He = F.from_html(" <!>", 1), Ue = F.from_html("<div class=\"max-w-6xl\"><div class=\"md:grid md:grid-cols-booking-split gap-8 items-start\"><div class=\"pb-24 md:pb-0\"><!> <section class=\"md:hidden mobile-order-summary border-default bg-surface-secondary mt-6 svelte-1opgb11\"><div class=\"flex gap-3 pb-3 mb-3 border-b border-default\"><div class=\"shrink-0 w-20 h-14 rounded-lg overflow-hidden bg-surface-tertiary\"><!></div> <div class=\"flex-1 min-w-0\"><!> <div class=\"flex items-center gap-1.5 mt-1\"><!> <!></div> <div class=\"mt-0.5\"><!></div></div></div> <!></section></div> <div class=\"hidden md:block sticky top-6\"><!></div></div></div> <div class=\"md:hidden\"><!></div>", 1), We = F.from_html("<p class=\"timer-modal-hint type-caption svelte-1opgb11\"> </p>"), Ge = F.from_html("<div class=\"timer-modal svelte-1opgb11\" id=\"warning-modal-description\"><div class=\"timer-modal-icon warning svelte-1opgb11\"><!></div> <h3 id=\"warning-modal-title\" class=\"timer-modal-title type-subheading svelte-1opgb11\"> </h3> <p class=\"timer-modal-text type-body svelte-1opgb11\"> </p> <!></div>"), Ke = F.from_html("<!> <p class=\"timer-modal-hint type-caption svelte-1opgb11\"> </p>", 1), qe = F.from_html("<div class=\"timer-modal-actions svelte-1opgb11\"><!></div>"), Je = F.from_html("<div class=\"timer-modal svelte-1opgb11\" id=\"expired-modal-description\"><div class=\"timer-modal-icon expired svelte-1opgb11\"><!></div> <h3 id=\"expired-modal-title\" class=\"timer-modal-title type-subheading svelte-1opgb11\"> </h3> <p class=\"timer-modal-text type-body svelte-1opgb11\"> </p></div>"), Ye = F.from_html("<!> <!>", 1), Xe = F.from_html("<div class=\"timer-modal svelte-1opgb11\" id=\"sale-closed-modal-description\"><div class=\"timer-modal-icon expired svelte-1opgb11\"><!></div> <h3 id=\"sale-closed-modal-title\" class=\"timer-modal-title type-subheading svelte-1opgb11\"><!></h3> <p class=\"timer-modal-text type-body svelte-1opgb11\"><!></p></div>"), Ze = F.from_html("<div class=\"w-full min-h-screen bg-surface-primary text-color-primary\"><div class=\"max-w-6xl mx-auto px-4 py-6 md:px-6 md:py-8\"><!></div> <!> <!> <!></div>");
1038
- function Qe(t, n) {
1039
- F.push(n, !0);
1040
- let r = le(), o = F.derived(() => P.current), l = F.prop(n, "config", 3, void 0), u = F.prop(n, "onPlaceOrder", 3, void 0), d = F.prop(n, "onBack", 3, void 0), b = F.prop(n, "onRetryExpired", 3, void 0), x = F.prop(n, "onExtendSession", 3, void 0), T = F.prop(n, "stripe", 3, void 0), E = F.prop(n, "paymentIntent", 3, void 0), D = F.prop(n, "elements", 15, void 0), ee = F.prop(n, "paymentError", 3, null), ae = F.prop(n, "eventEnded", 15, !1), M = F.prop(n, "serverTotalsUnavailable", 3, !1), de = F.prop(n, "labels", 19, () => ({})), I = F.prop(n, "locale", 3, void 0), pe = F.prop(n, "giftCard", 3, void 0), L = F.derived(() => re(I(), de())), R = F.derived(() => !l());
1041
- F.user_effect(() => {
1042
- if (F.get(R)) return P.options = r, P.current = "default", P.isActive = !0, () => {
1043
- P.isActive = !1, P.options = [];
1044
- };
1045
- });
1046
- function me(e) {
1047
- switch (e) {
1048
- case "free": return {
1049
- event: se,
1050
- lines: [{
1051
- ticketId: a(201),
1052
- ticketName: "Free Entry",
1053
- quantity: 2,
1054
- unitPrice: 0,
1055
- fee: 0,
1056
- subtotal: 0
1057
- }],
1058
- timerStart: 900,
1059
- promoApplied: !1,
1060
- promoDiscount: 0,
1061
- forceExpired: !1
1062
- };
1063
- case "donation": return {
1064
- event: oe,
1065
- lines: [{
1066
- ticketId: a(401),
1067
- ticketName: "Donation",
1068
- quantity: 1,
1069
- unitPrice: 25,
1070
- fee: 0,
1071
- subtotal: 25
1072
- }, {
1073
- ticketId: a(402),
1074
- ticketName: "Standard Admission",
1075
- quantity: 1,
1076
- unitPrice: 30,
1077
- fee: 3,
1078
- subtotal: 30
1079
- }],
1080
- timerStart: 900,
1081
- promoApplied: !1,
1082
- promoDiscount: 0,
1083
- forceExpired: !1
1084
- };
1085
- case "registration": return {
1086
- event: ce,
1087
- lines: [{
1088
- ticketId: a(301),
1089
- ticketName: "Workshop Seat",
1090
- quantity: 1,
1091
- unitPrice: 75,
1092
- fee: 7.5,
1093
- subtotal: 75
1094
- }],
1095
- timerStart: 900,
1096
- promoApplied: !1,
1097
- promoDiscount: 0,
1098
- forceExpired: !1
1099
- };
1100
- case "timer_warning": return {
1101
- event: N,
1102
- lines: [{
1103
- ticketId: a(101),
1104
- ticketName: "General Admission",
1105
- quantity: 2,
1106
- unitPrice: 25,
1107
- fee: 2.5,
1108
- subtotal: 50
1109
- }, {
1110
- ticketId: a(102),
1111
- ticketName: "VIP Front Row",
1112
- quantity: 1,
1113
- unitPrice: 55,
1114
- fee: 5.5,
1115
- subtotal: 55
1116
- }],
1117
- timerStart: 33,
1118
- promoApplied: !1,
1119
- promoDiscount: 0,
1120
- forceExpired: !1
1121
- };
1122
- case "expired": return {
1123
- event: N,
1124
- lines: [{
1125
- ticketId: a(101),
1126
- ticketName: "General Admission",
1127
- quantity: 2,
1128
- unitPrice: 25,
1129
- fee: 2.5,
1130
- subtotal: 50
1131
- }, {
1132
- ticketId: a(102),
1133
- ticketName: "VIP Front Row",
1134
- quantity: 1,
1135
- unitPrice: 55,
1136
- fee: 5.5,
1137
- subtotal: 55
1138
- }],
1139
- timerStart: 0,
1140
- promoApplied: !1,
1141
- promoDiscount: 0,
1142
- forceExpired: !0
1143
- };
1144
- case "promo": return {
1145
- event: N,
1146
- lines: [{
1147
- ticketId: a(101),
1148
- ticketName: "General Admission",
1149
- quantity: 2,
1150
- unitPrice: 25,
1151
- fee: 2.5,
1152
- subtotal: 50
1153
- }, {
1154
- ticketId: a(102),
1155
- ticketName: "VIP Front Row",
1156
- quantity: 1,
1157
- unitPrice: 55,
1158
- fee: 5.5,
1159
- subtotal: 55
1160
- }],
1161
- timerStart: 900,
1162
- promoApplied: !0,
1163
- promoDiscount: 10,
1164
- forceExpired: !1
1165
- };
1166
- default: return {
1167
- event: N,
1168
- lines: [{
1169
- ticketId: a(101),
1170
- ticketName: "General Admission",
1171
- quantity: 2,
1172
- unitPrice: 25,
1173
- fee: 2.5,
1174
- subtotal: 50
1175
- }, {
1176
- ticketId: a(102),
1177
- ticketName: "VIP Front Row",
1178
- quantity: 1,
1179
- unitPrice: 55,
1180
- fee: 5.5,
1181
- subtotal: 55
1182
- }],
1183
- timerStart: 900,
1184
- promoApplied: !1,
1185
- promoDiscount: 0,
1186
- forceExpired: !1
1187
- };
1188
- }
1189
- }
1190
- let z = F.derived(() => F.get(R) ? me(F.get(o)) : l()), B = F.state(null), V = F.state(900), H = F.state(!1), U = F.state(!1), _e = F.state(0), W = F.state(!1), G = F.state(!1);
1191
- F.user_effect(() => {
1192
- F.get(W) && F.set(G, !1);
1193
- });
1194
- let K = O(), q = O(), ve = F.state(!1), J = F.state(!1), Y = F.state(3), X = F.state(!0), ye = F.state(null), be = O(), xe = F.derived(() => F.get(R) ? 0 : F.get(z).event?.id ?? 0);
1195
- F.user_effect(() => {
1196
- let e = F.get(xe);
1197
- if (e) return ie(e, {
1198
- onUnavailable: (e) => {
1199
- F.get(ye) || (F.set(ye, e === "postponed" ? "postponed" : "canceled", !0), be.open());
1200
- },
1201
- onAvailable: () => {
1202
- F.set(ye, null), be.close();
1203
- }
1204
- });
1205
- });
1206
- let Se = F.state(F.proxy(i()));
1207
- F.user_effect(() => {
1208
- let e = setInterval(() => {
1209
- F.set(Se, i(), !0);
1210
- }, 1e3);
1211
- return () => clearInterval(e);
1212
- });
1213
- let Ce = F.derived(() => j(F.get(z).event, F.get(Se)));
1214
- F.user_effect(() => {
1215
- ae(F.get(Ce));
1216
- });
1217
- let Z = F.derived(() => F.get(ye) ?? (F.get(Ce) ? "ended" : null)), we = F.derived(() => (() => {
1218
- let e = Math.floor(F.get(V) / 60), t = F.get(V) % 60;
1219
- return `${e.toString().padStart(2, "0")}:${t.toString().padStart(2, "0")}`;
1220
- })()), Q = F.derived(() => (() => {
1221
- let e = F.get(z).lines;
1222
- if (e.some((e) => e.subtotal == null)) return {
1223
- lines: e,
1224
- subtotal: null,
1225
- fees: null,
1226
- taxes: 0,
1227
- total: null,
1228
- promoDiscount: 0,
1229
- giftCardAmount: 0
1230
- };
1231
- if (F.get(z).serverTotals) return {
1232
- lines: e,
1233
- subtotal: F.get(z).serverTotals.subtotal,
1234
- fees: F.get(z).serverTotals.fees,
1235
- taxes: F.get(z).serverTotals.taxes,
1236
- total: F.get(z).serverTotals.total,
1237
- promoDiscount: F.get(z).serverTotals.promoDiscount,
1238
- giftCardAmount: F.get(z).serverTotals.giftCardAmount
1239
- };
1240
- let t = f(e.reduce((e, t) => e + (t.subtotal == null ? 0 : t.subtotal), 0)), n = F.get(z).promoApplied ? F.get(z).promoDiscount : 0;
1241
- if (F.get(R)) {
1242
- let r = ue(e, F.get(z).event.venue), i = f(Math.max(0, t - n)), a = te(i + r, F.get(z).event.venue.taxPercentage);
1243
- return {
1244
- lines: e,
1245
- subtotal: t,
1246
- fees: r,
1247
- taxes: a,
1248
- total: f(i + r + a),
1249
- promoDiscount: n,
1250
- giftCardAmount: 0
1251
- };
1252
- }
1253
- return t === 0 ? {
1254
- lines: e,
1255
- subtotal: 0,
1256
- fees: 0,
1257
- taxes: 0,
1258
- total: 0,
1259
- promoDiscount: n,
1260
- giftCardAmount: 0
1261
- } : {
1262
- lines: e,
1263
- subtotal: t,
1264
- fees: null,
1265
- taxes: 0,
1266
- total: null,
1267
- promoDiscount: n,
1268
- giftCardAmount: 0
1269
- };
1270
- })()), Te = F.derived(() => F.get(R) || !!F.get(z).serverTotals && F.get(Q).total !== null), $ = F.derived(() => F.get(Q).total === 0 && F.get(Q).subtotal === 0), Ee = F.derived(() => F.get(z).event.isRegistrationEvent), De = F.derived(() => !F.get(R) && !F.get($) && (M() || F.get(Q).total === null)), ke = !1;
1271
- F.user_effect(() => {
1272
- let e = F.get(z);
1273
- ke || (ke = !0, F.set(B, Date.now() + e.timerStart * 1e3), F.set(V, e.timerStart, !0), F.set(H, e.forceExpired, !0));
1274
- });
1275
- function Ae() {
1276
- return typeof document > "u" ? null : ge(he.CHECKOUT_CARTID);
1277
- }
1278
- function je() {
1279
- return F.get(B) == null ? F.get(V) : Math.max(0, Math.floor((F.get(B) - Date.now()) / 1e3));
1280
- }
1281
- async function Me() {
1282
- let e = Ae();
1283
- if (e) try {
1284
- let t = await C(e);
1285
- if (t.notFound) {
1286
- F.set(B, Date.now(), !0), F.set(V, 0), F.set(H, !0), K.close(), q.open();
1287
- return;
1288
- }
1289
- t.expiresAt && (F.set(B, c(t.expiresAt).getTime(), !0), F.set(V, je(), !0));
1290
- } catch {}
1291
- }
1292
- F.user_effect(() => {
1293
- if (F.get(H)) return;
1294
- if (fe(() => F.get(V)) <= 0) {
1295
- F.set(H, !0), K.close(), q.open();
1296
- return;
1297
- }
1298
- let e = () => {
1299
- let e = je();
1300
- if (F.set(V, e, !0), e % 10 == 0 && F.get(B) != null && typeof localStorage < "u") try {
1301
- let e = Ae();
1302
- e && localStorage.setItem(`checkout-expiry-${e}`, String(F.get(B)));
1303
- } catch {}
1304
- e > 0 && e % 30 == 0 && Me(), e <= 30 && e > 0 && !F.get(ve) && (K.open(), F.set(ve, !0)), e <= 0 && (F.set(H, !0), K.close(), q.open(), clearInterval(t));
1305
- }, t = setInterval(e, 1e3), n = (t) => {
1306
- t?.type === "pageshow" && t.persisted && F.set(U, !1), typeof document < "u" && document.visibilityState === "visible" && (e(), Me());
1307
- };
1308
- return typeof document < "u" && document.addEventListener("visibilitychange", n), typeof window < "u" && window.addEventListener("pageshow", n), Me(), () => {
1309
- clearInterval(t), typeof document < "u" && document.removeEventListener("visibilitychange", n), typeof window < "u" && window.removeEventListener("pageshow", n);
1310
- };
1311
- });
1312
- function Ne() {
1313
- d() && d()();
1314
- }
1315
- function Pe() {
1316
- if (!F.get(Z)) {
1317
- if (!F.get(W)) {
1318
- F.set(G, !0);
1319
- return;
1320
- }
1321
- F.set(_e, F.get(_e) + 1);
1322
- }
1323
- }
1324
- function Fe(e) {
1325
- if (!F.get(U) && !F.get(Z)) {
1326
- if (F.set(U, !0), u()) {
1327
- u()(e).catch(() => {}).finally(() => {
1328
- F.set(U, !1);
1329
- });
1330
- return;
1331
- }
1332
- setTimeout(() => {
1333
- F.set(U, !1);
1334
- }, 1500);
1335
- }
1336
- }
1337
- function Le() {
1338
- q.close(), b() && b()();
1339
- }
1340
- async function Re() {
1341
- if (!(!F.get(X) || F.get(J))) {
1342
- F.set(J, !0);
1343
- try {
1344
- if (x()) {
1345
- let e = await x()();
1346
- if (e == null) throw new S("Extension request returned no result", 0, {
1347
- endpoint: "extend-session",
1348
- method: "POST"
1349
- });
1350
- typeof e == "object" ? (e.newExpiryTime ? F.set(B, c(e.newExpiryTime).getTime(), !0) : F.set(B, Date.now() + 9e5), F.set(V, je(), !0), e.remainingExtensions !== void 0 && (F.set(Y, e.remainingExtensions, !0), F.set(X, F.get(Y) > 0))) : (F.set(B, Date.now() + 9e5), F.set(V, je(), !0));
1351
- } else F.set(B, Date.now() + 9e5), F.set(V, je(), !0);
1352
- F.set(H, !1), F.set(ve, !1), K.close(), q.close();
1353
- } catch (e) {
1354
- Be.error("Failed to extend session:", e), K.close(), F.set(X, !1), F.get(V) <= 0 && (F.set(H, !0), q.open());
1355
- } finally {
1356
- F.set(J, !1);
1357
- }
1358
- }
1359
- }
1360
- function Qe() {
1361
- K.close();
1362
- }
1363
- var $e = Ze(), et = F.child($e), tt = F.child(et), nt = (t) => {
1364
- w(t, {
1365
- visible: !0,
1366
- politeness: "assertive",
1367
- class: "text-center py-12",
1368
- children: (t, n) => {
1369
- var r = Ve(), i = F.first_child(r), a = F.child(i, !0);
1370
- F.reset(i);
1371
- var o = F.sibling(i, 2), c = F.child(o, !0);
1372
- F.reset(o);
1373
- var l = F.sibling(o, 2);
1374
- {
1375
- let e = F.derived(() => F.get(L).goBackToEventDetails || "Go back to event details");
1376
- s(l, {
1377
- variant: "default",
1378
- onclick: Ne,
1379
- get "aria-label"() {
1380
- return F.get(e);
1381
- },
1382
- children: (e, t) => {
1383
- F.next();
1384
- var n = F.text();
1385
- F.template_effect(() => F.set_text(n, F.get(L).goBack || "Go back")), F.append(e, n);
1386
- },
1387
- $$slots: { default: !0 }
1388
- });
1389
- }
1390
- F.template_effect(() => {
1391
- F.set_class(i, 1, `mb-2 ${e.h2 ?? ""}`, "svelte-1opgb11"), F.set_text(a, F.get(L).thisEventHasEnded || "This event has ended"), F.set_text(c, F.get(L).ticketsNoLongerAvailable || "Tickets are no longer available for this event");
1392
- }), F.append(t, r);
1393
- },
1394
- $$slots: { default: !0 }
1395
- });
1396
- }, rt = (e) => {
1397
- var t = Ue(), n = F.first_child(t), r = F.child(n), i = F.child(r), a = F.child(i);
1398
- Oe(a, {
1399
- get event() {
1400
- return F.get(z).event;
1401
- },
1402
- get orderTotals() {
1403
- return F.get(Q);
1404
- },
1405
- get timerSeconds() {
1406
- return F.get(V);
1407
- },
1408
- get isExpired() {
1409
- return F.get(H);
1410
- },
1411
- get isRegistration() {
1412
- return F.get(Ee);
1413
- },
1414
- get isFreeOrder() {
1415
- return F.get($);
1416
- },
1417
- get promoApplied() {
1418
- return F.get(z).promoApplied;
1419
- },
1420
- get promoDiscount() {
1421
- return F.get(z).promoDiscount;
1422
- },
1423
- onBack: Ne,
1424
- onPlaceOrder: Fe,
1425
- get processing() {
1426
- return F.get(U);
1427
- },
1428
- get submitRequested() {
1429
- return F.get(_e);
1430
- },
1431
- get stripe() {
1432
- return T();
1433
- },
1434
- get paymentIntent() {
1435
- return E();
1436
- },
1437
- get paymentError() {
1438
- return ee();
1439
- },
1440
- get labels() {
1441
- return F.get(L);
1442
- },
1443
- get giftCard() {
1444
- return pe();
1445
- },
1446
- get elements() {
1447
- return D();
1448
- },
1449
- set elements(e) {
1450
- D(e);
1451
- }
1452
- });
1453
- var o = F.sibling(a, 2), s = F.child(o), c = F.child(s), l = F.child(c);
1454
- y(l, {
1455
- get src() {
1456
- return F.get(z).event.imageUrl;
1457
- },
1458
- get fallback() {
1459
- return m;
1460
- },
1461
- get alt() {
1462
- return F.get(z).event.title;
1463
- },
1464
- class: "w-full h-full"
1465
- }), F.reset(c);
1466
- var u = F.sibling(c, 2), d = F.child(u);
1467
- A(d, {
1468
- size: "sm",
1469
- weight: "semibold",
1470
- leading: "tight",
1471
- class: "block line-clamp-2",
1472
- children: (e, t) => {
1473
- F.next();
1474
- var n = F.text();
1475
- F.template_effect(() => F.set_text(n, F.get(z).event.title)), F.append(e, n);
1476
- },
1477
- $$slots: { default: !0 }
1478
- });
1479
- var f = F.sibling(d, 2), _ = F.child(f);
1480
- g(_, {
1481
- size: "16",
1482
- class: "shrink-0 icon-muted"
1483
- });
1484
- var v = F.sibling(_, 2);
1485
- A(v, {
1486
- size: "xs",
1487
- color: "muted",
1488
- children: (e, t) => {
1489
- F.next();
1490
- var n = He(), r = F.first_child(n), i = F.sibling(r), a = (e) => {
1491
- var t = F.text();
1492
- F.template_effect((e) => F.set_text(t, `· ${e ?? ""}`), [() => h(F.get(z).event.startDateTime, F.get(z).event.timezone, I())]), F.append(e, t);
1493
- };
1494
- F.if(i, (e) => {
1495
- F.get(z).event.displayStartTime !== !1 && e(a);
1496
- }), F.template_effect((e) => F.set_text(r, `${e ?? ""} `), [() => p(F.get(z).event.startDateTime, F.get(z).event.timezone, I())]), F.append(e, n);
1497
- },
1498
- $$slots: { default: !0 }
1499
- }), F.reset(f);
1500
- var b = F.sibling(f, 2), x = F.child(b);
1501
- A(x, {
1502
- size: "xs",
1503
- color: "muted",
1504
- class: "block",
1505
- children: (e, t) => {
1506
- F.next();
1507
- var n = F.text();
1508
- F.template_effect(() => F.set_text(n, F.get(z).event.venue.name)), F.append(e, n);
1509
- },
1510
- $$slots: { default: !0 }
1511
- }), F.reset(b), F.reset(u), F.reset(s);
1512
- var S = F.sibling(s, 2);
1513
- ne(S, {
1514
- get orderTotals() {
1515
- return F.get(Q);
1516
- },
1517
- get labels() {
1518
- return F.get(L);
1519
- }
1520
- }), F.reset(o), F.reset(i);
1521
- var C = F.sibling(i, 2), w = F.child(C);
1522
- {
1523
- let e = F.derived(() => F.get(U) || !F.get($) && !F.get(Te)), t = F.derived(() => !!F.get(Z));
1524
- Ie(w, {
1525
- get event() {
1526
- return F.get(z).event;
1527
- },
1528
- get orderTotals() {
1529
- return F.get(Q);
1530
- },
1531
- get isFreeOrder() {
1532
- return F.get($);
1533
- },
1534
- get priceUnavailable() {
1535
- return F.get(De);
1536
- },
1537
- onPlaceOrder: Pe,
1538
- get processing() {
1539
- return F.get(e);
1540
- },
1541
- get saleClosed() {
1542
- return F.get(t);
1543
- },
1544
- get labels() {
1545
- return F.get(L);
1546
- },
1547
- get locale() {
1548
- return I();
1549
- },
1550
- get termsError() {
1551
- return F.get(G);
1552
- },
1553
- get agreeTerms() {
1554
- return F.get(W);
1555
- },
1556
- set agreeTerms(e) {
1557
- F.set(W, e, !0);
1558
- }
1559
- });
1560
- }
1561
- F.reset(C), F.reset(r), F.reset(n);
1562
- var O = F.sibling(n, 2), k = F.child(O);
1563
- {
1564
- let e = F.derived(() => F.get(U) || !F.get($) && !F.get(Te)), t = F.derived(() => !!F.get(Z));
1565
- ze(k, {
1566
- get orderTotals() {
1567
- return F.get(Q);
1568
- },
1569
- get isFreeOrder() {
1570
- return F.get($);
1571
- },
1572
- get priceUnavailable() {
1573
- return F.get(De);
1574
- },
1575
- onPlaceOrder: Pe,
1576
- get processing() {
1577
- return F.get(e);
1578
- },
1579
- get saleClosed() {
1580
- return F.get(t);
1581
- },
1582
- get labels() {
1583
- return F.get(L);
1584
- },
1585
- get termsError() {
1586
- return F.get(G);
1587
- },
1588
- get agreeTerms() {
1589
- return F.get(W);
1590
- },
1591
- set agreeTerms(e) {
1592
- F.set(W, e, !0);
1593
- }
1594
- });
1595
- }
1596
- F.reset(O), F.append(e, t);
1597
- };
1598
- F.if(tt, (e) => {
1599
- F.get(Ce) ? e(nt) : e(rt, -1);
1600
- }), F.reset(et);
1601
- var it = F.sibling(et, 2), at = (e) => {
1602
- k(e, {
1603
- open: !0,
1604
- oncancel: () => K.close(),
1605
- size: "sm",
1606
- "aria-labelledby": "warning-modal-title",
1607
- body: (e) => {
1608
- var t = Ge(), n = F.child(t), r = F.child(n);
1609
- v(r, { size: "32" }), F.reset(n);
1610
- var i = F.sibling(n, 2), a = F.child(i, !0);
1611
- F.reset(i);
1612
- var o = F.sibling(i, 2), s = F.child(o, !0);
1613
- F.reset(o);
1614
- var c = F.sibling(o, 2), l = (e) => {
1615
- var t = We(), n = F.child(t, !0);
1616
- F.reset(t), F.template_effect((e) => F.set_text(n, e), [() => (F.get(L).extensionsRemaining || "{count} extension{plural} remaining").replaceAll("{count}", String(F.get(Y))).replaceAll("{plural}", F.get(Y) === 1 ? "" : "s")]), F.append(e, t);
1617
- };
1618
- F.if(c, (e) => {
1619
- F.get(X) && F.get(Y) > 0 && e(l);
1620
- }), F.reset(t), F.template_effect((e) => {
1621
- F.set_text(a, F.get(L).sessionExpiringSoon || "Session expiring soon"), F.set_text(s, e);
1622
- }, [() => (F.get(L).sessionExpiringSoonMessage || "Your checkout session will expire in {time}. Your selected tickets will be released back to inventory").replaceAll("{time}", F.get(we))]), F.append(e, t);
1623
- },
1624
- footer: (e) => {
1625
- var t = qe(), n = F.child(t), r = (e) => {
1626
- s(e, {
1627
- variant: "default",
1628
- size: "lg",
1629
- class: "w-full",
1630
- onclick: Re,
1631
- get disabled() {
1632
- return F.get(J);
1633
- },
1634
- get loading() {
1635
- return F.get(J);
1636
- },
1637
- children: (e, t) => {
1638
- F.next();
1639
- var n = F.text();
1640
- F.template_effect(() => F.set_text(n, F.get(J) ? F.get(L).extendingSession || "Extending..." : F.get(L).continueCheckout || "Continue checkout")), F.append(e, n);
1641
- },
1642
- $$slots: { default: !0 }
1643
- });
1644
- }, i = (e) => {
1645
- var t = Ke(), n = F.first_child(t);
1646
- s(n, {
1647
- variant: "default",
1648
- size: "lg",
1649
- class: "w-full",
1650
- onclick: Qe,
1651
- children: (e, t) => {
1652
- F.next();
1653
- var n = F.text();
1654
- F.template_effect(() => F.set_text(n, F.get(L).okIllHurry || "OK, I'll hurry")), F.append(e, n);
1655
- },
1656
- $$slots: { default: !0 }
1657
- });
1658
- var r = F.sibling(n, 2), i = F.child(r, !0);
1659
- F.reset(r), F.template_effect(() => F.set_text(i, F.get(L).maxExtensionsReached || "Maximum extensions reached")), F.append(e, t);
1660
- };
1661
- F.if(n, (e) => {
1662
- F.get(X) ? e(r) : e(i, -1);
1663
- }), F.reset(t), F.append(e, t);
1664
- },
1665
- $$slots: {
1666
- body: !0,
1667
- footer: !0
1668
- }
1669
- });
1670
- };
1671
- F.if(it, (e) => {
1672
- K.isOpen && e(at);
1673
- });
1674
- var ot = F.sibling(it, 2), st = (e) => {
1675
- k(e, {
1676
- open: !0,
1677
- oncancel: () => q.close(),
1678
- size: "sm",
1679
- "aria-labelledby": "expired-modal-title",
1680
- body: (e) => {
1681
- var t = Je(), n = F.child(t), r = F.child(n);
1682
- _(r, { size: "32" }), F.reset(n);
1683
- var i = F.sibling(n, 2), a = F.child(i, !0);
1684
- F.reset(i);
1685
- var o = F.sibling(i, 2), s = F.child(o, !0);
1686
- F.reset(o), F.reset(t), F.template_effect(() => {
1687
- F.set_text(a, F.get(X) ? F.get(L).wantToKeepTickets || "Want to keep your tickets?" : F.get(L).sessionExpired || "Session expired"), F.set_text(s, F.get(X) ? F.get(L).sessionExpiredMessage || "Your checkout session has expired and your selected tickets have been released" : F.get(L).reservationTimedOut || "Your reservation has timed out. Please select your tickets again to continue");
1688
- }), F.append(e, t);
1689
- },
1690
- footer: (e) => {
1691
- var t = qe(), n = F.child(t), r = (e) => {
1692
- var t = Ye(), n = F.first_child(t);
1693
- s(n, {
1694
- variant: "default",
1695
- size: "lg",
1696
- class: "w-full",
1697
- onclick: Re,
1698
- get disabled() {
1699
- return F.get(J);
1700
- },
1701
- get loading() {
1702
- return F.get(J);
1703
- },
1704
- children: (e, t) => {
1705
- F.next();
1706
- var n = F.text();
1707
- F.template_effect(() => F.set_text(n, F.get(J) ? F.get(L).extendingSession || "Extending..." : F.get(L).keepMyTickets || "Keep my tickets")), F.append(e, n);
1708
- },
1709
- $$slots: { default: !0 }
1710
- });
1711
- var r = F.sibling(n, 2);
1712
- s(r, {
1713
- variant: "alternative",
1714
- size: "lg",
1715
- class: "w-full",
1716
- onclick: Le,
1717
- children: (e, t) => {
1718
- F.next();
1719
- var n = F.text();
1720
- F.template_effect(() => F.set_text(n, F.get(L).selectTicketsAgain || "Select tickets again")), F.append(e, n);
1721
- },
1722
- $$slots: { default: !0 }
1723
- }), F.append(e, t);
1724
- }, i = (e) => {
1725
- s(e, {
1726
- variant: "default",
1727
- size: "lg",
1728
- class: "w-full",
1729
- onclick: Le,
1730
- children: (e, t) => {
1731
- F.next();
1732
- var n = F.text();
1733
- F.template_effect(() => F.set_text(n, F.get(L).selectTicketsAgain || "Select tickets again")), F.append(e, n);
1734
- },
1735
- $$slots: { default: !0 }
1736
- });
1737
- };
1738
- F.if(n, (e) => {
1739
- F.get(X) ? e(r) : e(i, -1);
1740
- }), F.reset(t), F.append(e, t);
1741
- },
1742
- $$slots: {
1743
- body: !0,
1744
- footer: !0
1745
- }
1746
- });
1747
- };
1748
- F.if(ot, (e) => {
1749
- q.isOpen && e(st);
1750
- });
1751
- var ct = F.sibling(ot, 2), lt = (e) => {
1752
- k(e, {
1753
- open: !0,
1754
- oncancel: () => be.close(),
1755
- size: "sm",
1756
- "aria-labelledby": "sale-closed-modal-title",
1757
- body: (e) => {
1758
- var t = Xe(), n = F.child(t), r = F.child(n);
1759
- v(r, { size: "32" }), F.reset(n);
1760
- var i = F.sibling(n, 2), a = F.child(i), o = (e) => {
1761
- var t = F.text();
1762
- F.template_effect(() => F.set_text(t, F.get(L).eventCanceledTitle || "This event was cancelled")), F.append(e, t);
1763
- }, s = (e) => {
1764
- var t = F.text();
1765
- F.template_effect(() => F.set_text(t, F.get(L).eventPostponedTitle || "Ticket sales are paused")), F.append(e, t);
1766
- };
1767
- F.if(a, (e) => {
1768
- F.get(Z) === "canceled" ? e(o) : e(s, -1);
1769
- }), F.reset(i);
1770
- var c = F.sibling(i, 2), l = F.child(c), u = (e) => {
1771
- var t = F.text();
1772
- F.template_effect(() => F.set_text(t, F.get(L).eventCanceledMessage || "This event has been cancelled, so tickets are no longer for sale. You have not been charged")), F.append(e, t);
1773
- }, d = (e) => {
1774
- var t = F.text();
1775
- F.template_effect(() => F.set_text(t, F.get(L).eventPostponedMessage || "Ticket sales for this event have been paused. You have not been charged. Check back soon or contact the organizer")), F.append(e, t);
1776
- };
1777
- F.if(l, (e) => {
1778
- F.get(Z) === "canceled" ? e(u) : e(d, -1);
1779
- }), F.reset(c), F.reset(t), F.append(e, t);
1780
- },
1781
- footer: (e) => {
1782
- var t = qe(), n = F.child(t);
1783
- s(n, {
1784
- variant: "default",
1785
- size: "lg",
1786
- class: "w-full",
1787
- onclick: Le,
1788
- children: (e, t) => {
1789
- F.next();
1790
- var n = F.text();
1791
- F.template_effect(() => F.set_text(n, F.get(L).backToEvents || "Back to events")), F.append(e, n);
1792
- },
1793
- $$slots: { default: !0 }
1794
- }), F.reset(t), F.append(e, t);
1795
- },
1796
- $$slots: {
1797
- body: !0,
1798
- footer: !0
1799
- }
1800
- });
1801
- };
1802
- F.if(ct, (e) => {
1803
- be.isOpen && e(lt);
1804
- }), F.reset($e), F.append(t, $e), F.pop();
1805
- }
1806
- //#endregion
1807
- export { Qe as default, ge as n, he as t };