@bigz-app/booking-widget 1.4.1 → 1.4.3
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/booking-widget.js +177 -130
- package/dist/booking-widget.js.map +1 -1
- package/dist/components/UniversalBookingWidget.d.ts.map +1 -1
- package/dist/components/booking/GiftCardOnlyBooking.d.ts.map +1 -1
- package/dist/components/booking/StripePaymentForm.d.ts.map +1 -1
- package/dist/components/booking/VoucherInput.d.ts.map +1 -1
- package/dist/components/events/EventTypeSelection.d.ts.map +1 -1
- package/dist/components/events/NextEventsPreview.d.ts.map +1 -1
- package/dist/components/shared/payment-logos-strip.d.ts.map +1 -1
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/index.cjs +177 -130
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +177 -130
- package/dist/index.esm.js.map +1 -1
- package/dist/utils.d.ts +2 -2
- package/dist/utils.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/booking-widget.js
CHANGED
|
@@ -271,6 +271,7 @@
|
|
|
271
271
|
// Buttons
|
|
272
272
|
"button.bookNow": "Jetzt buchen",
|
|
273
273
|
"button.selectDate": "Jetzt Termin auswählen",
|
|
274
|
+
"button.viewDates": "Termine ansehen",
|
|
274
275
|
"button.moreDetails": "Mehr Details",
|
|
275
276
|
"button.toPayment": "Zur Zahlung ↓",
|
|
276
277
|
"button.redeem": "Einlösen",
|
|
@@ -309,7 +310,7 @@
|
|
|
309
310
|
"nextEvents.subtitle": "Wähle einen Termin aus oder zeige alle verfügbaren Termine an",
|
|
310
311
|
"nextEvents.noUpcoming": "Keine bevorstehenden Termine",
|
|
311
312
|
"nextEvents.noUpcomingMessage": "Aktuell sind keine Termine verfügbar. Bitte schaue später noch einmal vorbei oder kontaktiere uns direkt.",
|
|
312
|
-
"nextEvents.showAll": "
|
|
313
|
+
"nextEvents.showAll": "Weitere Termine ansehen...",
|
|
313
314
|
"nextEvents.priceOnRequest": "Preis auf Anfrage",
|
|
314
315
|
// Specials view
|
|
315
316
|
"specials.title": "Sonderangebote",
|
|
@@ -560,6 +561,7 @@
|
|
|
560
561
|
// Buttons
|
|
561
562
|
"button.bookNow": "Book now",
|
|
562
563
|
"button.selectDate": "Select a date",
|
|
564
|
+
"button.viewDates": "View dates",
|
|
563
565
|
"button.moreDetails": "More details",
|
|
564
566
|
"button.toPayment": "To payment ↓",
|
|
565
567
|
"button.redeem": "Redeem",
|
|
@@ -598,7 +600,7 @@
|
|
|
598
600
|
"nextEvents.subtitle": "Select a date or view all available dates",
|
|
599
601
|
"nextEvents.noUpcoming": "No upcoming dates",
|
|
600
602
|
"nextEvents.noUpcomingMessage": "There are currently no dates available. Please check back later or contact us directly.",
|
|
601
|
-
"nextEvents.showAll": "
|
|
603
|
+
"nextEvents.showAll": "See more dates...",
|
|
602
604
|
"nextEvents.priceOnRequest": "Price on request",
|
|
603
605
|
// Specials view
|
|
604
606
|
"specials.title": "Special Offers",
|
|
@@ -849,6 +851,7 @@
|
|
|
849
851
|
// Buttons
|
|
850
852
|
"button.bookNow": "Reservar ahora",
|
|
851
853
|
"button.selectDate": "Seleccionar fecha",
|
|
854
|
+
"button.viewDates": "Ver fechas",
|
|
852
855
|
"button.moreDetails": "Más detalles",
|
|
853
856
|
"button.toPayment": "Al pago ↓",
|
|
854
857
|
"button.redeem": "Canjear",
|
|
@@ -887,7 +890,7 @@
|
|
|
887
890
|
"nextEvents.subtitle": "Selecciona una fecha o consulta todas las fechas disponibles",
|
|
888
891
|
"nextEvents.noUpcoming": "Sin próximas fechas",
|
|
889
892
|
"nextEvents.noUpcomingMessage": "Actualmente no hay fechas disponibles. Por favor, vuelve más tarde o contáctanos directamente.",
|
|
890
|
-
"nextEvents.showAll": "
|
|
893
|
+
"nextEvents.showAll": "Ver más fechas...",
|
|
891
894
|
"nextEvents.priceOnRequest": "Precio bajo consulta",
|
|
892
895
|
// Specials view
|
|
893
896
|
"specials.title": "Ofertas especiales",
|
|
@@ -1138,6 +1141,7 @@
|
|
|
1138
1141
|
// Buttons
|
|
1139
1142
|
"button.bookNow": "Reservar agora",
|
|
1140
1143
|
"button.selectDate": "Selecionar data",
|
|
1144
|
+
"button.viewDates": "Ver datas",
|
|
1141
1145
|
"button.moreDetails": "Mais detalhes",
|
|
1142
1146
|
"button.toPayment": "Para pagamento ↓",
|
|
1143
1147
|
"button.redeem": "Resgatar",
|
|
@@ -1176,7 +1180,7 @@
|
|
|
1176
1180
|
"nextEvents.subtitle": "Selecione uma data ou veja todas as datas disponíveis",
|
|
1177
1181
|
"nextEvents.noUpcoming": "Sem próximas datas",
|
|
1178
1182
|
"nextEvents.noUpcomingMessage": "Atualmente não há datas disponíveis. Por favor, volte mais tarde ou contacte-nos diretamente.",
|
|
1179
|
-
"nextEvents.showAll": "
|
|
1183
|
+
"nextEvents.showAll": "Ver mais datas...",
|
|
1180
1184
|
"nextEvents.priceOnRequest": "Preço sob consulta",
|
|
1181
1185
|
// Specials view
|
|
1182
1186
|
"specials.title": "Ofertas especiais",
|
|
@@ -1427,6 +1431,7 @@
|
|
|
1427
1431
|
// Buttons
|
|
1428
1432
|
"button.bookNow": "Boka nu",
|
|
1429
1433
|
"button.selectDate": "Välj datum",
|
|
1434
|
+
"button.viewDates": "Visa datum",
|
|
1430
1435
|
"button.moreDetails": "Mer information",
|
|
1431
1436
|
"button.toPayment": "Till betalning ↓",
|
|
1432
1437
|
"button.redeem": "Lös in",
|
|
@@ -1465,7 +1470,7 @@
|
|
|
1465
1470
|
"nextEvents.subtitle": "Välj ett datum eller visa alla tillgängliga datum",
|
|
1466
1471
|
"nextEvents.noUpcoming": "Inga kommande datum",
|
|
1467
1472
|
"nextEvents.noUpcomingMessage": "Det finns för närvarande inga datum tillgängliga. Kom tillbaka senare eller kontakta oss direkt.",
|
|
1468
|
-
"nextEvents.showAll": "
|
|
1473
|
+
"nextEvents.showAll": "Se fler datum...",
|
|
1469
1474
|
"nextEvents.priceOnRequest": "Pris på förfrågan",
|
|
1470
1475
|
// Specials view
|
|
1471
1476
|
"specials.title": "Specialerbjudanden",
|
|
@@ -2353,7 +2358,7 @@
|
|
|
2353
2358
|
return {
|
|
2354
2359
|
"Content-Type": "application/json",
|
|
2355
2360
|
"X-Origin-Url": window.location.href,
|
|
2356
|
-
"X-Language": locale
|
|
2361
|
+
"X-Language": locale,
|
|
2357
2362
|
"X-User-Agent": navigator.userAgent,
|
|
2358
2363
|
};
|
|
2359
2364
|
};
|
|
@@ -6408,6 +6413,7 @@
|
|
|
6408
6413
|
|
|
6409
6414
|
function GiftCardOnlyBooking({ config, eventDetails, formData, discountCode, giftCards, onSuccess, onError, upsellSelections = [], }) {
|
|
6410
6415
|
const t = useTranslations();
|
|
6416
|
+
const { locale } = useLocale();
|
|
6411
6417
|
const [isLoading, setIsLoading] = d$1(false);
|
|
6412
6418
|
const [error, setError] = d$1(null);
|
|
6413
6419
|
const handleBooking = async () => {
|
|
@@ -6429,7 +6435,7 @@
|
|
|
6429
6435
|
};
|
|
6430
6436
|
const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/create-gift-card-booking"), {
|
|
6431
6437
|
method: "POST",
|
|
6432
|
-
headers: createApiHeaders(config),
|
|
6438
|
+
headers: createApiHeaders(config, locale),
|
|
6433
6439
|
body: JSON.stringify(createRequestBody(config, requestData)),
|
|
6434
6440
|
});
|
|
6435
6441
|
const data = await response.json();
|
|
@@ -6580,7 +6586,7 @@
|
|
|
6580
6586
|
try {
|
|
6581
6587
|
const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/mollie-methods"), {
|
|
6582
6588
|
method: "POST",
|
|
6583
|
-
headers: createApiHeaders(config),
|
|
6589
|
+
headers: createApiHeaders(config, locale),
|
|
6584
6590
|
body: JSON.stringify(createRequestBody(config, {
|
|
6585
6591
|
organizationId: config.organizationId,
|
|
6586
6592
|
amount: Math.round(totalAmount),
|
|
@@ -6723,7 +6729,7 @@
|
|
|
6723
6729
|
}
|
|
6724
6730
|
const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/create-mollie-payment"), {
|
|
6725
6731
|
method: "POST",
|
|
6726
|
-
headers: createApiHeaders(config),
|
|
6732
|
+
headers: createApiHeaders(config, locale),
|
|
6727
6733
|
body: JSON.stringify(createRequestBody(config, buildRequestData(token))),
|
|
6728
6734
|
});
|
|
6729
6735
|
const data = await response.json();
|
|
@@ -6759,7 +6765,7 @@
|
|
|
6759
6765
|
}
|
|
6760
6766
|
const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/create-mollie-payment"), {
|
|
6761
6767
|
method: "POST",
|
|
6762
|
-
headers: createApiHeaders(config),
|
|
6768
|
+
headers: createApiHeaders(config, locale),
|
|
6763
6769
|
body: JSON.stringify(createRequestBody(config, buildRequestData())),
|
|
6764
6770
|
});
|
|
6765
6771
|
const data = await response.json();
|
|
@@ -6957,6 +6963,7 @@
|
|
|
6957
6963
|
}
|
|
6958
6964
|
function StripePaymentForm({ config, eventDetails, formData, totalAmount, discountCode, giftCards, onSuccess, onError, systemConfig, stripePromise, stripeAppearance, upsellSelections = [], }) {
|
|
6959
6965
|
const t = useTranslations();
|
|
6966
|
+
const { locale } = useLocale();
|
|
6960
6967
|
const [clientSecret, setClientSecret] = d$1(null);
|
|
6961
6968
|
const [paymentIntentId, setPaymentIntentId] = d$1(null);
|
|
6962
6969
|
const [isCreatingPaymentIntent, setIsCreatingPaymentIntent] = d$1(false);
|
|
@@ -7059,7 +7066,7 @@
|
|
|
7059
7066
|
}
|
|
7060
7067
|
const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/create-stripe-payment"), {
|
|
7061
7068
|
method: "POST",
|
|
7062
|
-
headers: createApiHeaders(config),
|
|
7069
|
+
headers: createApiHeaders(config, locale),
|
|
7063
7070
|
body: JSON.stringify(createRequestBody(config, requestData)),
|
|
7064
7071
|
});
|
|
7065
7072
|
const data = await response.json();
|
|
@@ -7488,6 +7495,7 @@
|
|
|
7488
7495
|
const IconSpinner = ({ size = 16, color = "currentColor" }) => (u$2("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", style: { animation: "spin 1s linear infinite" }, children: u$2("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }) }));
|
|
7489
7496
|
function VoucherInput({ config, orderValue, eventInstanceId, customerEmail, onVoucherValidated, appliedVouchers, onRemoveVoucher, disabled = false, }) {
|
|
7490
7497
|
const t = useTranslations();
|
|
7498
|
+
const { locale } = useLocale();
|
|
7491
7499
|
const [inputValue, setInputValue] = d$1("");
|
|
7492
7500
|
const [isLoading, setIsLoading] = d$1(false);
|
|
7493
7501
|
const [error, setError] = d$1(null);
|
|
@@ -7507,7 +7515,7 @@
|
|
|
7507
7515
|
try {
|
|
7508
7516
|
const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/validate-voucher"), {
|
|
7509
7517
|
method: "POST",
|
|
7510
|
-
headers: createApiHeaders(config),
|
|
7518
|
+
headers: createApiHeaders(config, locale),
|
|
7511
7519
|
body: JSON.stringify(createRequestBody(config, {
|
|
7512
7520
|
code: code.trim(),
|
|
7513
7521
|
orderValue: orderValue,
|
|
@@ -13112,37 +13120,28 @@
|
|
|
13112
13120
|
};
|
|
13113
13121
|
|
|
13114
13122
|
function PaymentLogosStrip() {
|
|
13115
|
-
const logoHeight =
|
|
13123
|
+
const logoHeight = 34;
|
|
13116
13124
|
const logoCellStyle = {
|
|
13117
13125
|
display: "inline-flex",
|
|
13118
13126
|
alignItems: "center",
|
|
13119
13127
|
justifyContent: "center",
|
|
13120
|
-
padding: "0px
|
|
13121
|
-
minHeight: "
|
|
13128
|
+
padding: "0px 1px",
|
|
13129
|
+
minHeight: "36px",
|
|
13122
13130
|
borderRadius: "6px",
|
|
13123
13131
|
};
|
|
13124
13132
|
return (u$2("div", { style: {
|
|
13125
|
-
padding: "
|
|
13126
|
-
backgroundColor: "
|
|
13133
|
+
padding: "8px 5px",
|
|
13134
|
+
backgroundColor: "var(--bw-background-color)",
|
|
13135
|
+
border: "1px solid var(--bw-border-color)",
|
|
13127
13136
|
display: "flex",
|
|
13128
13137
|
alignItems: "center",
|
|
13129
13138
|
justifyContent: "center",
|
|
13130
13139
|
borderRadius: "var(--bw-border-radius)",
|
|
13131
|
-
gap: "
|
|
13140
|
+
gap: "0px",
|
|
13132
13141
|
flexWrap: "wrap",
|
|
13133
13142
|
width: "fit-content",
|
|
13134
13143
|
margin: "20px auto",
|
|
13135
|
-
}, children: [u$2("span", { style: logoCellStyle, children: [u$2("span", { style: { color: "#003087", fontSize: "14px", fontWeight: 800, fontFamily: "Arial, sans-serif", lineHeight: 1 }, children: "Pay" }), u$2("span", { style: { color: "#009cde", fontSize: "14px", fontWeight: 800, fontFamily: "Arial, sans-serif", lineHeight: 1 }, children: "Pal" })] }), u$2("span", { style: logoCellStyle, children: u$2("svg", { width: "34", height: logoHeight, viewBox: "0 0 34 20", "aria-label": "Maestro", children: [u$2("circle", { cx: "13", cy: "10", r: "8", fill: "#eb001b" }), u$2("circle", { cx: "21", cy: "10", r: "8", fill: "#00a2e5", fillOpacity: "0.92" })] }) }), u$2("span", { style: logoCellStyle, children: u$2("span", { style: { color: "#1434CB", fontSize: "14px", fontStyle: "italic", fontWeight: 800, fontFamily: "Arial, sans-serif", lineHeight: 1 }, children: "VISA" }) }), u$2("span", { style: logoCellStyle, children: u$2("span", { style: { color: "purple", fontSize: "14px", fontWeight: 800, fontFamily: "Arial, sans-serif", lineHeight: 1 }, children: "Klarna" }) }), u$2("span", { style: logoCellStyle, children: u$2("svg", { width: "74", height: logoHeight, viewBox: "0 0 74 20", "aria-label": "Amazon Pay", children: [u$2("text", { x: "0", y: "14", fontSize: "12", fill: "#111827", fontFamily: "Arial, sans-serif", children: "amazon" }), u$2("text", { x: "45", y: "14", fontSize: "12", fill: "#111827", fontFamily: "Arial, sans-serif", children: "pay" }), u$2("path", { d: "M5 15 C17 20, 35 20, 48 15", stroke: "#f59e0b", strokeWidth: "1.6", fill: "none", strokeLinecap: "round" })] }) }), u$2("span", { style: logoCellStyle, children: [u$2("span", { style: {
|
|
13136
|
-
fontSize: "16px",
|
|
13137
|
-
fontWeight: 800,
|
|
13138
|
-
fontFamily: "Arial, sans-serif",
|
|
13139
|
-
lineHeight: 1,
|
|
13140
|
-
background: "conic-gradient(from 25deg, #4285F4 0 24%, #DB4437 24% 48%, #F4B400 48% 73%, #0F9D58 73% 100%)",
|
|
13141
|
-
WebkitBackgroundClip: "text",
|
|
13142
|
-
backgroundClip: "text",
|
|
13143
|
-
color: "transparent",
|
|
13144
|
-
WebkitTextFillColor: "transparent",
|
|
13145
|
-
}, children: "G" }), u$2("span", { style: { color: "#5f6368", fontSize: "14px", fontWeight: 600, fontFamily: "Arial, sans-serif", marginLeft: "3px", lineHeight: 1 }, children: "Pay" })] }), u$2("span", { style: logoCellStyle, children: u$2("svg", { width: "60", height: logoHeight, viewBox: "0 0 60 20", "aria-label": "Apple Pay", children: [u$2("text", { x: "0", y: "14.5", fontSize: "14.5", fill: "#111827", fontFamily: "-apple-system, BlinkMacSystemFont, Arial, sans-serif", children: "\uF8FF" }), u$2("text", { x: "14", y: "14.5", fontSize: "14.5", fill: "#111827", fontFamily: "-apple-system, BlinkMacSystemFont, Arial, sans-serif", children: "Pay" })] }) })] }));
|
|
13144
|
+
}, children: [u$2("span", { style: logoCellStyle, children: u$2("svg", { width: logoHeight, height: logoHeight, viewBox: "0 0 48 48", fill: "none", "aria-label": "PayPal", children: [u$2("circle", { cx: "24", cy: "24", r: "20", fill: "#0070BA" }), u$2("path", { d: "M32.3305 18.0977C32.3082 18.24 32.2828 18.3856 32.2542 18.5351C31.2704 23.5861 27.9046 25.331 23.606 25.331H21.4173C20.8916 25.331 20.4486 25.7127 20.3667 26.2313L19.2461 33.3381L18.9288 35.3527C18.8755 35.693 19.1379 36 19.4815 36H23.3634C23.8231 36 24.2136 35.666 24.286 35.2127L24.3241 35.0154L25.055 30.3772L25.1019 30.1227C25.1735 29.6678 25.5648 29.3338 26.0245 29.3338H26.6051C30.3661 29.3338 33.3103 27.8068 34.1708 23.388C34.5303 21.5421 34.3442 20.0008 33.393 18.9168C33.1051 18.59 32.748 18.3188 32.3305 18.0977Z", fill: "white", fillOpacity: "0.6" }), u$2("path", { d: "M31.3009 17.6871C31.1506 17.6434 30.9955 17.6036 30.8364 17.5678C30.6766 17.5328 30.5127 17.5018 30.3441 17.4748C29.754 17.3793 29.1074 17.334 28.4147 17.334H22.5676C22.4237 17.334 22.2869 17.3666 22.1644 17.4254C21.8948 17.5551 21.6944 17.8104 21.6459 18.1229L20.402 26.0013L20.3662 26.2311C20.4481 25.7126 20.8911 25.3308 21.4168 25.3308H23.6055C27.9041 25.3308 31.2699 23.5851 32.2537 18.5349C32.2831 18.3854 32.3078 18.2398 32.33 18.0975C32.0811 17.9655 31.8115 17.8525 31.5212 17.7563C31.4496 17.7324 31.3757 17.7094 31.3009 17.6871Z", fill: "white", fillOpacity: "0.8" }), u$2("path", { d: "M21.6461 18.1231C21.6946 17.8105 21.895 17.5552 22.1646 17.4264C22.2879 17.3675 22.4239 17.3349 22.5678 17.3349H28.4149C29.1077 17.3349 29.7542 17.3803 30.3444 17.4757C30.513 17.5027 30.6768 17.5338 30.8367 17.5687C30.9957 17.6045 31.1508 17.6443 31.3011 17.688C31.3759 17.7103 31.4498 17.7334 31.5222 17.7564C31.8125 17.8527 32.0821 17.9664 32.331 18.0976C32.6237 16.231 32.3287 14.9601 31.3194 13.8093C30.2068 12.5424 28.1986 12 25.629 12H18.169C17.6441 12 17.1963 12.3817 17.1152 12.9011L14.0079 32.5969C13.9467 32.9866 14.2473 33.3381 14.6402 33.3381H19.2458L20.4022 26.0014L21.6461 18.1231Z", fill: "white" })] }) }), u$2("span", { style: logoCellStyle, children: u$2("svg", { width: logoHeight * 2.2, height: logoHeight, viewBox: "0 -139.5 750 750", fill: "none", "aria-label": "Mastercard", children: [u$2("rect", { fill: "#000000", x: "0", y: "0", width: "750", height: "471", rx: "40" }), u$2("path", { d: "M434.008334,235.5 C434.008334,334.641668 353.6375,415.004169 254.499999,415.004169 C155.362498,415.004169 74.9999973,334.641668 74.9999973,235.5 C74.9999973,136.366666 155.362498,55.9958324 254.499999,55.9958324 C353.6375,55.9958324 434.008334,136.366666 434.008334,235.5", fill: "#D9222A" }), u$2("path", { d: "M495.491667,55.9958324 C449.1125,55.9958324 406.85,73.5916658 374.991666,102.462499 C368.504166,108.345833 362.445833,114.7 356.866666,121.458333 L393.133333,121.458333 C398.091667,127.4875 402.658333,133.829166 406.816667,140.470833 L343.183333,140.470833 C339.370833,146.575 335.908333,152.916666 332.841666,159.479167 L417.154167,159.479167 C420.033333,165.6375 422.575,171.975 424.754167,178.483333 L325.241666,178.483333 C323.166666,184.675 321.420833,191.0125 320.024999,197.491667 L429.966667,197.491667 C432.604167,209.741667 434.008334,222.458334 434.008334,235.5 C434.008334,255.433334 430.754167,274.612501 424.754167,292.520834 L325.241666,292.520834 C327.416666,299.033334 329.958333,305.375001 332.837499,311.529168 L417.154167,311.529168 C414.079167,318.091668 410.625,324.433335 406.808333,330.541668 L343.183333,330.541668 C347.3375,337.170835 351.9125,343.520835 356.866666,349.537501 L393.125,349.537501 C387.554167,356.308335 381.491666,362.670835 374.995833,368.550002 C406.854167,397.416668 449.1125,415.004169 495.491667,415.004169 C594.629168,415.004169 675.000002,334.641668 675.000002,235.5 C675.000002,136.370833 594.629168,55.9958324 495.491667,55.9958324", fill: "#EE9F2D" })] }) }), u$2("span", { style: logoCellStyle, children: u$2("svg", { width: logoHeight * 1.1, height: logoHeight, viewBox: "0 0 750 471", fill: "none", "aria-label": "Visa", children: [u$2("rect", { fill: "#0E4595", x: "0", y: "0", width: "750", height: "471", rx: "40" }), u$2("polygon", { fill: "#FFFFFF", points: "278.1975 334.2275 311.5585 138.4655 364.9175 138.4655 331.5335 334.2275" }), u$2("path", { d: "M524.3075,142.6875 C513.7355,138.7215 497.1715,134.4655 476.4845,134.4655 C423.7605,134.4655 386.6205,161.0165 386.3045,199.0695 C386.0075,227.1985 412.8185,242.8905 433.0585,252.2545 C453.8275,261.8495 460.8105,267.9695 460.7115,276.5375 C460.5795,289.6595 444.1255,295.6545 428.7885,295.6545 C407.4315,295.6545 396.0855,292.6875 378.5625,285.3785 L371.6865,282.2665 L364.1975,326.0905 C376.6605,331.5545 399.7065,336.2895 423.6355,336.5345 C479.7245,336.5345 516.1365,310.2875 516.5505,269.6525 C516.7515,247.3835 502.5355,230.4355 471.7515,216.4645 C453.1005,207.4085 441.6785,201.3655 441.7995,192.1955 C441.7995,184.0585 451.4675,175.3575 472.3565,175.3575 C489.8055,175.0865 502.4445,178.8915 512.2925,182.8575 L517.0745,185.1165 L524.3075,142.6875", fill: "#FFFFFF" }), u$2("path", { d: "M661.6145,138.4655 L620.3835,138.4655 C607.6105,138.4655 598.0525,141.9515 592.4425,154.6995 L513.1975,334.1025 L569.2285,334.1025 C569.2285,334.1025 578.3905,309.9805 580.4625,304.6845 C586.5855,304.6845 641.0165,304.7685 648.7985,304.7685 C650.3945,311.6215 655.2905,334.1025 655.2905,334.1025 L704.8025,334.1025 L661.6145,138.4655 Z M596.1975,264.8725 C600.6105,253.5935 617.4565,210.1495 617.4565,210.1495 C617.1415,210.6705 621.8365,198.8155 624.5315,191.4655 L628.1385,208.3435 C628.1385,208.3435 638.3555,255.0725 640.4905,264.8715 L596.1975,264.8715 L596.1975,264.8725 Z", fill: "#FFFFFF" }), u$2("path", { d: "M45.878906 138.46484L45.197266 142.53906C66.288263 147.64458 85.126465 155.03257 101.61914 164.22461L148.96484 333.91602L205.41992 333.84961L289.42383 138.46484L232.90234 138.46484L180.66211 271.96094L175.0957 244.83203C174.83824 244.00408 174.55942 243.17304 174.27344 242.3418L156.10742 154.99219C152.87742 142.59619 143.50892 138.89684 131.91992 138.46484L45.878906 138.46484Z", fill: "#FFFFFF" })] }) }), u$2("span", { style: logoCellStyle, children: u$2("svg", { width: logoHeight * 2, height: logoHeight, viewBox: "0 -9 58 58", fill: "none", "aria-label": "Klarna", children: [u$2("rect", { x: "0.5", y: "0.5", width: "57", height: "39", rx: "3.5", fill: "#F4B6C7", stroke: "#F3F3F3" }), u$2("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.41299 25.7963H5V15H7.41299V25.7963ZM13.4398 15H11.0784C11.0784 16.9868 10.1885 18.8104 8.63709 20.0034L7.70155 20.7226L11.3264 25.7967H14.3068L10.9714 21.1277C12.5525 19.5116 13.4398 17.3373 13.4398 15ZM17.289 25.7933H15.0102V15.0021H17.289V25.7933ZM24.1766 18.3286V18.8061C23.5616 18.3754 22.8192 18.1223 22.0185 18.1223C19.8993 18.1223 18.1815 19.8857 18.1815 22.0611C18.1815 24.2365 19.8993 26 22.0185 26C22.8192 26 23.5616 25.7469 24.1766 25.3163V25.7933H26.3539V18.3286H24.1766ZM24.1694 22.0611C24.1694 23.1218 23.2861 23.9818 22.1966 23.9818C21.1071 23.9818 20.2238 23.1218 20.2238 22.0611C20.2238 21.0004 21.1071 20.1407 22.1966 20.1407C23.2861 20.1407 24.1694 21.0004 24.1694 22.0611ZM47.1454 18.8061V18.3286H49.3226V25.7933H47.1454V25.3163C46.5304 25.7469 45.788 26 44.9872 26C42.868 26 41.1502 24.2365 41.1502 22.0611C41.1502 19.8857 42.868 18.1223 44.9872 18.1223C45.788 18.1223 46.5304 18.3754 47.1454 18.8061ZM45.1654 23.9818C46.255 23.9818 47.1381 23.1218 47.1381 22.0611C47.1381 21.0004 46.255 20.1407 45.1654 20.1407C44.0758 20.1407 43.1926 21.0004 43.1926 22.0611C43.1926 23.1218 44.0758 23.9818 45.1654 23.9818ZM50.2675 24.5482C50.2675 23.7736 50.8792 23.1457 51.6337 23.1457C52.3882 23.1457 53 23.7736 53 24.5482C53 25.3227 52.3882 25.9507 51.6337 25.9507C50.8792 25.9507 50.2675 25.3227 50.2675 24.5482ZM37.2814 18.1278C36.4117 18.1278 35.5887 18.405 35.0384 19.1697V18.329H32.8706V25.7933H35.065V21.8706C35.065 20.7354 35.8065 20.1796 36.6993 20.1796C37.6562 20.1796 38.2063 20.7663 38.2063 21.8551V25.7933H40.3809V21.0463C40.3809 19.3092 39.0354 18.1278 37.2814 18.1278ZM29.7219 18.3287V19.3009C30.1583 18.7177 30.9715 18.3291 31.8557 18.3291V20.5013L31.8298 20.5003C30.9684 20.5003 29.7269 21.1323 29.7269 22.3082V25.7933H27.4928V18.3287H29.7219Z", fill: "#17120F" })] }) }), u$2("span", { style: { ...logoCellStyle, marginLeft: "-10px" }, children: u$2("svg", { width: logoHeight * 1.9, height: logoHeight, viewBox: "0 -11 70 70", fill: "none", "aria-label": "Google Pay", children: [u$2("rect", { x: "0.5", y: "0.5", width: "69", height: "47", rx: "5.5", fill: "white", stroke: "#D9D9D9" }), u$2("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M33.0603 31.5161V25.4741H36.1786C37.4564 25.4741 38.535 25.046 39.4142 24.2015L39.6252 23.9875C41.2313 22.2391 41.1258 19.5155 39.4142 17.898C38.5584 17.0416 37.3861 16.5778 36.1786 16.6016H31.1729V31.5161H33.0603ZM33.0605 23.6425V18.4332H36.2262C36.9063 18.4332 37.5512 18.6948 38.0319 19.1706C39.052 20.1696 39.0754 21.8347 38.0905 22.8694C37.6098 23.3809 36.9297 23.6663 36.2262 23.6425H33.0605ZM48.4293 22.1083C47.6204 21.359 46.5185 20.9784 45.1234 20.9784C43.3298 20.9784 41.9816 21.6444 41.0906 22.9646L42.7553 24.0231C43.3649 23.1192 44.1973 22.6673 45.2524 22.6673C45.9206 22.6673 46.5653 22.9171 47.0694 23.369C47.5618 23.7972 47.8432 24.4156 47.8432 25.0698V25.5098C47.1163 25.1055 46.2019 24.8914 45.0765 24.8914C43.7635 24.8914 42.7084 25.2006 41.923 25.831C41.1375 26.4613 40.739 27.2939 40.739 28.3524C40.7155 29.3158 41.1258 30.2316 41.8527 30.85C42.5912 31.5161 43.5291 31.8491 44.631 31.8491C45.9323 31.8491 46.9639 31.2663 47.7494 30.1007H47.8314V31.5161H49.6368V25.2244C49.6368 23.9042 49.2382 22.8576 48.4293 22.1083ZM43.3066 29.6369C42.9197 29.3514 42.6852 28.8876 42.6852 28.3881C42.6852 27.8291 42.9432 27.3652 43.4473 26.9965C43.9632 26.6278 44.6081 26.4375 45.3702 26.4375C46.4255 26.4256 47.2462 26.6635 47.8325 27.1392C47.8325 27.948 47.5159 28.6497 46.8945 29.2444C46.3317 29.8153 45.5696 30.1364 44.7723 30.1364C44.2446 30.1483 43.7287 29.9699 43.3066 29.6369ZM53.693 35.9999L60.0001 21.3114H57.9485L55.0295 28.6378H54.9943L52.0049 21.3114H49.9534L54.0916 30.8619L51.747 35.9999H53.693Z", fill: "#3C4043" }), u$2("path", { d: "M26.544 24.1659C26.544 23.5831 26.4971 23.0003 26.4034 22.4294H18.4434V25.7239H23.0037C22.8161 26.7825 22.2065 27.734 21.3155 28.3286V30.4695H24.0353C25.6296 28.9828 26.544 26.7825 26.544 24.1659Z", fill: "#4285F4" }), u$2("path", { d: "M18.4442 32.539C20.7185 32.539 22.6411 31.7778 24.0361 30.4695L21.3164 28.3287C20.5544 28.852 19.5814 29.1493 18.4442 29.1493C16.2403 29.1493 14.3763 27.6388 13.7081 25.6169H10.9062V27.8291C12.3365 30.7193 15.2555 32.539 18.4442 32.539Z", fill: "#34A853" }), u$2("path", { d: "M13.708 25.6169C13.3563 24.5584 13.3563 23.4048 13.708 22.3343V20.134H10.9058C9.69808 22.5484 9.69808 25.4029 10.9058 27.8172L13.708 25.6169Z", fill: "#FBBC04" }), u$2("path", { d: "M18.4442 18.8019C19.6517 18.7781 20.8123 19.242 21.6798 20.0864L24.0948 17.6363C22.559 16.1853 20.5427 15.3885 18.4442 15.4123C15.2555 15.4123 12.3365 17.2439 10.9062 20.134L13.7081 22.3462C14.3763 20.3124 16.2403 18.8019 18.4442 18.8019Z", fill: "#EA4335" })] }) }), u$2("span", { style: { ...logoCellStyle, marginLeft: "10px" }, children: u$2("svg", { width: logoHeight * 1, height: logoHeight, viewBox: "0 0 70 48", fill: "none", "aria-label": "Apple Pay", children: [u$2("rect", { x: "0.5", y: "0.5", width: "69", height: "47", rx: "5.5", fill: "white", stroke: "#D9D9D9" }), u$2("g", { transform: "translate(12,8)", children: u$2("path", { d: "M31.099 17.255a4.646 4.646 0 0 1 1.421-3.315c.437-.43.95-.764 1.51-.983-.27-.715-.669-1.375-1.177-1.946a5.4 5.4 0 0 0-1.773-1.3 4.975 4.975 0 0 0-2.119-.464c-.786.011-1.562.185-2.276.512-.598.286-1.25.453-1.91.488a4.495 4.495 0 0 1-1.75-.488 5.5 5.5 0 0 0-2.346-.536 5.66 5.66 0 0 0-3.047.887 6.168 6.168 0 0 0-2.229 2.412 7.501 7.501 0 0 0-.839 3.498c.024 1.224.289 2.434.78 3.556a20.964 20.964 0 0 0 2.019 3.854c.444.664.95 1.284 1.515 1.853a3.045 3.045 0 0 0 2.041.948c.579-.006 1.149-.147 1.665-.41a4.928 4.928 0 0 1 2.217-.538c.795 0 1.58.184 2.292.538.53.261 1.11.402 1.7.41.696-.013 1.365-.265 1.9-.715.67-.545 1.252-1.192 1.724-1.92a12.29 12.29 0 0 0 1.197-2.246 4.95 4.95 0 0 1-2.113-1.852 4.573 4.573 0 0 1-.76-2.668M29.42 5.207a4.252 4.252 0 0 0 .98-2.697 3.76 3.76 0 0 0-.026-.51 4.359 4.359 0 0 0-2.79 1.424 4.124 4.124 0 0 0-1.05 2.63c-.005.171.005.343.032.513.157.021.315.03.474.024a3.67 3.67 0 0 0 2.38-1.384", fill: "#000000" }) })] }) })] }));
|
|
13146
13145
|
}
|
|
13147
13146
|
|
|
13148
13147
|
function VoucherPurchaseCard({ config, minEventPrice, fallbackImages = [], onClick, standalone = false, }) {
|
|
@@ -14259,7 +14258,7 @@
|
|
|
14259
14258
|
padding: "2px 8px",
|
|
14260
14259
|
borderRadius: "var(--bw-border-radius)",
|
|
14261
14260
|
fontFamily: "var(--bw-font-family)",
|
|
14262
|
-
}, children: eventType.category.name }) }), u$2("div", { className: "event-type-img", style: { position: "relative", width: "100%", height: "300px" }, children: u$2(ImageCarousel, { images: eventType.images, eventName: eventType.name }) }), u$2("div", { className: "event-type-content", style: {
|
|
14261
|
+
}, children: eventType.category.name }) }), eventType.images && eventType.images.length > 0 && (u$2("div", { className: "event-type-img", style: { position: "relative", width: "100%", height: "300px" }, children: u$2(ImageCarousel, { images: eventType.images, eventName: eventType.name }) })), u$2("div", { className: "event-type-content", style: {
|
|
14263
14262
|
padding: "12px 18px",
|
|
14264
14263
|
display: "flex",
|
|
14265
14264
|
flexDirection: "column",
|
|
@@ -14402,8 +14401,7 @@
|
|
|
14402
14401
|
alignItems: "center",
|
|
14403
14402
|
marginTop: "10px",
|
|
14404
14403
|
gap: "12px",
|
|
14405
|
-
}, children: [
|
|
14406
|
-
(eventType.highlights && eventType.highlights.length > 0)) && (u$2("button", { onClick: (e) => {
|
|
14404
|
+
}, children: [eventType.description && (u$2("button", { onClick: (e) => {
|
|
14407
14405
|
e.stopPropagation();
|
|
14408
14406
|
handleShowDetails(eventType);
|
|
14409
14407
|
}, style: {
|
|
@@ -14864,6 +14862,47 @@
|
|
|
14864
14862
|
const { locale } = useLocale();
|
|
14865
14863
|
const timezone = useTimezone();
|
|
14866
14864
|
const [selectedEventInstanceId, setSelectedEventInstanceId] = d$1(null);
|
|
14865
|
+
const normalizedShowAllButtonText = showAllButtonText.trim() || t("nextEvents.showAll");
|
|
14866
|
+
function InfoBadge({ text }) {
|
|
14867
|
+
const [open, setOpen] = d$1(false);
|
|
14868
|
+
return (u$2("span", { onClick: (event) => {
|
|
14869
|
+
event.stopPropagation();
|
|
14870
|
+
setOpen((current) => !current);
|
|
14871
|
+
}, style: {
|
|
14872
|
+
position: "relative",
|
|
14873
|
+
display: "inline-flex",
|
|
14874
|
+
alignItems: "center",
|
|
14875
|
+
justifyContent: "center",
|
|
14876
|
+
width: "16px",
|
|
14877
|
+
height: "16px",
|
|
14878
|
+
borderRadius: "50%",
|
|
14879
|
+
border: "1px solid var(--bw-highlight-color)",
|
|
14880
|
+
color: "var(--bw-highlight-color)",
|
|
14881
|
+
fontSize: "9px",
|
|
14882
|
+
fontWeight: 700,
|
|
14883
|
+
cursor: "pointer",
|
|
14884
|
+
flexShrink: 0,
|
|
14885
|
+
userSelect: "none",
|
|
14886
|
+
}, children: ["i", open && (u$2("span", { style: {
|
|
14887
|
+
position: "absolute",
|
|
14888
|
+
bottom: "calc(100% + 6px)",
|
|
14889
|
+
right: 0,
|
|
14890
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
14891
|
+
border: "1px solid var(--bw-border-color)",
|
|
14892
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
14893
|
+
boxShadow: "var(--bw-shadow-md)",
|
|
14894
|
+
padding: "6px 10px",
|
|
14895
|
+
fontSize: "13px",
|
|
14896
|
+
color: "var(--bw-text-color)",
|
|
14897
|
+
fontWeight: 400,
|
|
14898
|
+
whiteSpace: "normal",
|
|
14899
|
+
width: "180px",
|
|
14900
|
+
lineHeight: 1.4,
|
|
14901
|
+
zIndex: 100,
|
|
14902
|
+
textAlign: "left",
|
|
14903
|
+
pointerEvents: "none",
|
|
14904
|
+
}, children: text }))] }));
|
|
14905
|
+
}
|
|
14867
14906
|
const handleEventSelect = (eventInstanceId) => {
|
|
14868
14907
|
setSelectedEventInstanceId(eventInstanceId);
|
|
14869
14908
|
onEventSelect(eventInstanceId);
|
|
@@ -14926,54 +14965,39 @@
|
|
|
14926
14965
|
gap: "8px",
|
|
14927
14966
|
}, children: [u$2("span", { style: { fontSize: "16px" }, children: "\uD83D\uDD04" }), t("common.reload")] })] }) }));
|
|
14928
14967
|
}
|
|
14968
|
+
const today = new Date();
|
|
14929
14969
|
return (u$2("div", { style: {
|
|
14930
14970
|
maxWidth: "500px",
|
|
14931
14971
|
margin: "0 auto",
|
|
14932
|
-
padding: "16px",
|
|
14972
|
+
padding: "12px 16px",
|
|
14933
14973
|
fontFamily: "var(--bw-font-family)",
|
|
14934
|
-
}, children: [u$2("div", { style: {
|
|
14935
|
-
fontWeight: 600,
|
|
14936
|
-
margin: "0 0 8px 0",
|
|
14937
|
-
fontSize: "18px",
|
|
14938
|
-
color: "var(--bw-text-color)",
|
|
14939
|
-
fontFamily: "var(--bw-font-family)",
|
|
14940
|
-
}, children: t("nextEvents.title") }), u$2("p", { style: {
|
|
14941
|
-
margin: 0,
|
|
14942
|
-
fontSize: "16px",
|
|
14943
|
-
color: "var(--bw-text-muted)",
|
|
14944
|
-
fontFamily: "var(--bw-font-family)",
|
|
14945
|
-
}, children: t("nextEvents.subtitle") })] }), u$2("div", { style: { display: "flex", flexDirection: "column", gap: "12px", marginBottom: "24px" }, children: events.map((event) => {
|
|
14974
|
+
}, children: [u$2("div", { style: { display: "flex", flexDirection: "column", gap: "12px", marginBottom: "10px" }, children: events.map((event) => {
|
|
14946
14975
|
const availableSpots = event.maxParticipants - event.participantCount;
|
|
14947
14976
|
const isFullyBooked = availableSpots === 0;
|
|
14948
14977
|
const startDate = new Date(event.startTime);
|
|
14949
|
-
const today = new Date();
|
|
14950
14978
|
const isPastEvent = today.toISOString() >= startDate.toISOString();
|
|
14951
|
-
const isFullAvailability = availableSpots / event.maxParticipants >= 0.8;
|
|
14952
|
-
const isHighAvailability = availableSpots / event.maxParticipants >= 0.5;
|
|
14953
|
-
const isMediumAvailability = availableSpots / event.maxParticipants >= 0.3;
|
|
14954
|
-
const isLowAvailability = availableSpots / event.maxParticipants >= 0.15;
|
|
14955
|
-
const getAvailabilityColor = () => {
|
|
14956
|
-
if (isFullAvailability)
|
|
14957
|
-
return "var(--bw-success-color)";
|
|
14958
|
-
if (isHighAvailability)
|
|
14959
|
-
return "var(--bw-warning-color)";
|
|
14960
|
-
if (isMediumAvailability)
|
|
14961
|
-
return "var(--bw-availability-medium-color, #f97316)";
|
|
14962
|
-
if (isLowAvailability)
|
|
14963
|
-
return "var(--bw-availability-low-color, #8b5cf6)";
|
|
14964
|
-
return "var(--bw-highlight-color)";
|
|
14965
|
-
};
|
|
14966
14979
|
const isDisabled = isFullyBooked || isPastEvent || !event.bookingOpen;
|
|
14980
|
+
const availabilityRatio = availableSpots / event.maxParticipants;
|
|
14981
|
+
const allocationBadge = (() => {
|
|
14982
|
+
if (availabilityRatio >= 0.6)
|
|
14983
|
+
return null;
|
|
14984
|
+
if (availabilityRatio === 0)
|
|
14985
|
+
return { text: t("events.soldOut"), backgroundColor: "#7f1d1d", textColor: "#fca5a5" };
|
|
14986
|
+
if (availabilityRatio <= 0.3)
|
|
14987
|
+
return { text: t("instances.almostSoldOut"), backgroundColor: "#7f1d1d", textColor: "#fca5a5" };
|
|
14988
|
+
return { text: t("instances.popularDate"), backgroundColor: "#b45309", textColor: "#fbbf24" };
|
|
14989
|
+
})();
|
|
14990
|
+
const sameDay = formatWeekday(event.startTime, timezone, locale) === formatWeekday(event.endTime, timezone, locale);
|
|
14967
14991
|
return (u$2("div", { style: {
|
|
14968
14992
|
position: "relative",
|
|
14993
|
+
border: "1px solid var(--bw-border-color)",
|
|
14969
14994
|
backgroundColor: "var(--bw-surface-color)",
|
|
14970
14995
|
borderRadius: "var(--bw-border-radius)",
|
|
14971
|
-
padding: "
|
|
14996
|
+
padding: "16px 10px",
|
|
14972
14997
|
transition: "all 0.2s ease",
|
|
14973
|
-
border: `1px solid ${getAvailabilityColor()}`,
|
|
14974
14998
|
fontFamily: "var(--bw-font-family)",
|
|
14975
14999
|
opacity: isDisabled ? 0.3 : 1,
|
|
14976
|
-
filter: isDisabled ? "grayscale(
|
|
15000
|
+
filter: isDisabled ? "grayscale(40%)" : "none",
|
|
14977
15001
|
cursor: isDisabled ? "not-allowed" : "pointer",
|
|
14978
15002
|
}, onClick: () => {
|
|
14979
15003
|
if (!isDisabled) {
|
|
@@ -14987,13 +15011,22 @@
|
|
|
14987
15011
|
justifyContent: "center",
|
|
14988
15012
|
backgroundColor: "rgba(15, 23, 42, 0.8)",
|
|
14989
15013
|
borderRadius: "var(--bw-border-radius)",
|
|
14990
|
-
}, children: u$2("div", { style: {
|
|
14991
|
-
|
|
14992
|
-
|
|
14993
|
-
|
|
14994
|
-
|
|
14995
|
-
|
|
14996
|
-
|
|
15014
|
+
}, children: u$2("div", { style: { width: "32px", height: "32px", color: "var(--bw-highlight-color)", opacity: 0.8, fontSize: "32px" }, children: "\u27F3" }) })), u$2("div", { style: {
|
|
15015
|
+
display: "flex",
|
|
15016
|
+
marginLeft: "auto",
|
|
15017
|
+
marginTop: "-20px",
|
|
15018
|
+
marginBottom: "4px",
|
|
15019
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
15020
|
+
fontFamily: "var(--bw-font-family)",
|
|
15021
|
+
zIndex: 50,
|
|
15022
|
+
whiteSpace: "nowrap",
|
|
15023
|
+
width: "fit-content",
|
|
15024
|
+
fontSize: "11px",
|
|
15025
|
+
fontWeight: 700,
|
|
15026
|
+
padding: "2px 8px",
|
|
15027
|
+
backgroundColor: allocationBadge?.backgroundColor || "transparent",
|
|
15028
|
+
color: allocationBadge?.textColor || "transparent",
|
|
15029
|
+
}, children: allocationBadge?.text || " - " }), u$2("div", { style: {
|
|
14997
15030
|
display: "flex",
|
|
14998
15031
|
justifyContent: "space-between",
|
|
14999
15032
|
width: "100%",
|
|
@@ -15001,73 +15034,59 @@
|
|
|
15001
15034
|
gap: "12px",
|
|
15002
15035
|
marginBottom: "4px",
|
|
15003
15036
|
}, children: [u$2("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [u$2("div", { style: {
|
|
15004
|
-
display: "flex",
|
|
15005
|
-
alignItems: "center",
|
|
15006
|
-
justifyContent: "center",
|
|
15007
|
-
fontWeight: 700,
|
|
15008
15037
|
fontSize: "16px",
|
|
15038
|
+
transition: "all 0.2s ease",
|
|
15009
15039
|
borderRadius: "var(--bw-border-radius-small)",
|
|
15040
|
+
borderTop: "4px solid var(--bw-border-color)",
|
|
15041
|
+
border: "1px solid var(--bw-border-color)",
|
|
15010
15042
|
width: "40px",
|
|
15011
15043
|
height: "40px",
|
|
15044
|
+
display: "flex",
|
|
15045
|
+
alignItems: "center",
|
|
15046
|
+
justifyContent: "center",
|
|
15047
|
+
fontWeight: 700,
|
|
15012
15048
|
color: "var(--bw-text-color)",
|
|
15013
15049
|
backgroundColor: "var(--bw-background-color)",
|
|
15014
|
-
border: "1px solid var(--bw-border-color)",
|
|
15015
|
-
borderTopWidth: "4px",
|
|
15016
|
-
borderTopColor: getAvailabilityColor(),
|
|
15017
|
-
transition: "all 0.2s ease",
|
|
15018
15050
|
}, children: startDate.getDate() }), u$2("div", { style: {
|
|
15051
|
+
fontSize: "16px",
|
|
15052
|
+
color: "var(--bw-text-color)",
|
|
15019
15053
|
display: "flex",
|
|
15020
15054
|
flexDirection: "column",
|
|
15021
15055
|
alignItems: "flex-start",
|
|
15022
15056
|
justifyContent: "flex-start",
|
|
15057
|
+
lineHeight: 1.25,
|
|
15058
|
+
}, children: [u$2("div", { children: [u$2("span", { style: { fontWeight: 600, marginBottom: "2px", textTransform: "capitalize" }, children: formatWeekday(event.startTime, timezone, locale) }), !sameDay && (u$2(k$3, { children: [u$2("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: " - " }), u$2("span", { style: { fontWeight: 600, marginBottom: "2px", textTransform: "capitalize" }, children: formatWeekday(event.endTime, timezone, locale) })] }))] }), u$2("div", { children: sameDay ? (u$2(k$3, { children: [u$2("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: formatTime(event.startTime, timezone, locale) }), u$2("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: " - " }), u$2("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: formatTime(event.endTime, timezone, locale) })] })) : (u$2("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: [formatTime(event.startTime, timezone, locale), " ", t("instances.oclock")] })) })] }), u$2("span", { style: {
|
|
15059
|
+
fontSize: "12px",
|
|
15060
|
+
fontWeight: 400,
|
|
15061
|
+
color: "var(--bw-text-muted)",
|
|
15062
|
+
marginLeft: "6px",
|
|
15063
|
+
backgroundColor: "rgba(0, 0, 0, 0.05)",
|
|
15064
|
+
whiteSpace: "nowrap",
|
|
15065
|
+
padding: "2px 6px",
|
|
15066
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
15067
|
+
}, children: [event.durationDays, " ", event.durationDays > 1 ? t("common.days") : t("common.day")] })] }), u$2("div", { style: { textAlign: "right", display: "flex", flexDirection: "column", alignItems: "flex-end", gap: "4px" }, children: [u$2("span", { style: {
|
|
15068
|
+
display: "inline-flex",
|
|
15069
|
+
alignItems: "center",
|
|
15023
15070
|
fontSize: "16px",
|
|
15071
|
+
fontWeight: 600,
|
|
15072
|
+
padding: "2px 8px",
|
|
15073
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
15074
|
+
fontFamily: "var(--bw-font-family)",
|
|
15075
|
+
backgroundColor: "var(--bw-background-color)",
|
|
15024
15076
|
color: "var(--bw-text-color)",
|
|
15025
|
-
|
|
15026
|
-
}, children:
|
|
15027
|
-
display: "flex",
|
|
15028
|
-
flexDirection: "column",
|
|
15029
|
-
alignItems: "flex-end",
|
|
15030
|
-
textAlign: "right",
|
|
15031
|
-
}, children: [u$2("div", { style: {
|
|
15032
|
-
fontWeight: 700,
|
|
15033
|
-
color: "var(--bw-highlight-color)",
|
|
15034
|
-
fontSize: "18px",
|
|
15035
|
-
}, children: event.price !== null ? formatCurrency(event.price) : t("nextEvents.priceOnRequest") }), event.deposit && event.deposit > 0 && (u$2("div", { style: { fontSize: "12px", color: "var(--bw-text-muted)" }, children: [t("common.from"), " ", formatCurrency(event.deposit)] }))] })] }), u$2("h4", { style: {
|
|
15036
|
-
display: "flex",
|
|
15037
|
-
alignItems: "center",
|
|
15038
|
-
fontWeight: 600,
|
|
15039
|
-
margin: "0 0 2px 0",
|
|
15040
|
-
fontSize: "16px",
|
|
15041
|
-
color: "var(--bw-text-color)",
|
|
15042
|
-
lineHeight: 1.25,
|
|
15043
|
-
gap: "8px",
|
|
15044
|
-
}, children: [event.name, u$2("span", { style: {
|
|
15045
|
-
fontSize: "12px",
|
|
15046
|
-
fontWeight: 400,
|
|
15047
|
-
color: "var(--bw-text-muted)",
|
|
15048
|
-
marginLeft: "6px",
|
|
15049
|
-
backgroundColor: "rgba(0, 0, 0, 0.05)",
|
|
15050
|
-
borderRadius: "16px",
|
|
15051
|
-
padding: "2px 8px",
|
|
15052
|
-
}, children: [event.durationDays, " ", event.durationDays > 1 ? t("common.days") : t("common.day")] })] }), event.notes && (u$2("p", { style: {
|
|
15053
|
-
margin: "8px 0 0 0",
|
|
15054
|
-
fontSize: "12px",
|
|
15055
|
-
color: "var(--bw-text-muted)",
|
|
15056
|
-
overflow: "hidden",
|
|
15057
|
-
lineHeight: 1.375,
|
|
15058
|
-
display: "-webkit-box",
|
|
15059
|
-
WebkitBoxOrient: "vertical",
|
|
15060
|
-
WebkitLineClamp: 2,
|
|
15061
|
-
}, children: event.notes }))] }, event.id));
|
|
15077
|
+
border: "1px solid var(--bw-border-color)",
|
|
15078
|
+
}, children: event.price !== null ? formatCurrency(event.price) : t("nextEvents.priceOnRequest") }), event.notes && u$2(InfoBadge, { text: event.notes })] })] })] }, event.id));
|
|
15062
15079
|
}) }), showAllButton && (u$2("div", { style: { textAlign: "center" }, children: u$2("button", { type: "button", disabled: isLoadingShowAll, style: {
|
|
15063
|
-
|
|
15080
|
+
display: "inline-flex",
|
|
15081
|
+
alignItems: "center",
|
|
15082
|
+
justifyContent: "center",
|
|
15064
15083
|
backgroundColor: "var(--bw-surface-color)",
|
|
15065
15084
|
color: "var(--bw-highlight-color)",
|
|
15066
15085
|
border: "1px solid var(--bw-highlight-color)",
|
|
15067
|
-
padding: "
|
|
15068
|
-
borderRadius: "var(--bw-border-radius)",
|
|
15069
|
-
fontSize: "
|
|
15070
|
-
fontWeight:
|
|
15086
|
+
padding: "6px 10px",
|
|
15087
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
15088
|
+
fontSize: "13px",
|
|
15089
|
+
fontWeight: 600,
|
|
15071
15090
|
fontFamily: "var(--bw-font-family)",
|
|
15072
15091
|
transition: "all 0.2s ease",
|
|
15073
15092
|
cursor: isLoadingShowAll ? "not-allowed" : "pointer",
|
|
@@ -15078,7 +15097,7 @@
|
|
|
15078
15097
|
color: "var(--bw-highlight-color)",
|
|
15079
15098
|
fontSize: "16px",
|
|
15080
15099
|
animation: "spin 1s linear infinite",
|
|
15081
|
-
}, children: "\u27F3" }), t("common.loading")] })) : (
|
|
15100
|
+
}, children: "\u27F3" }), t("common.loading")] })) : (normalizedShowAllButtonText) }) }))] }));
|
|
15082
15101
|
}
|
|
15083
15102
|
|
|
15084
15103
|
function SpecialsView({ specials, onEventSelect, isLoading = false, showSavingsAmount = true, showSavingsPercent = false, emptyStateText, isLoadingEventDetails = false, }) {
|
|
@@ -15877,6 +15896,8 @@
|
|
|
15877
15896
|
const [isSuccess, setIsSuccess] = d$1(false);
|
|
15878
15897
|
const [successPaymentId, setSuccessPaymentId] = d$1(null);
|
|
15879
15898
|
const [systemConfig, setSystemConfig] = d$1(null);
|
|
15899
|
+
// When true, loadEventInstances skips the single-instance auto-select (used by handleShowAllEvents)
|
|
15900
|
+
const skipInstanceAutoSelectRef = A$2(false);
|
|
15880
15901
|
// PERFORMANCE OPTIMIZATION: Lazy component loading
|
|
15881
15902
|
const [shouldRenderInstanceSelection, setShouldRenderInstanceSelection] = d$1(false);
|
|
15882
15903
|
const [shouldRenderUpsells, setShouldRenderUpsells] = d$1(false);
|
|
@@ -16372,7 +16393,7 @@
|
|
|
16372
16393
|
}
|
|
16373
16394
|
setStripePromise(loadStripe(data.stripePublishableKey, stripeOptions));
|
|
16374
16395
|
}
|
|
16375
|
-
if (data.eventInstances.length === 1) {
|
|
16396
|
+
if (!skipInstanceAutoSelectRef.current && data.eventInstances.length === 1) {
|
|
16376
16397
|
setSelectedEventInstance(data.eventInstances[0]);
|
|
16377
16398
|
setCurrentStep("booking");
|
|
16378
16399
|
await loadEventDetails(data.eventInstances[0].id);
|
|
@@ -16767,12 +16788,30 @@
|
|
|
16767
16788
|
const handleShowAllEvents = async () => {
|
|
16768
16789
|
setIsLoadingShowAll(true);
|
|
16769
16790
|
try {
|
|
16770
|
-
if (isSingleEventTypeMode
|
|
16791
|
+
if (isSingleEventTypeMode) {
|
|
16792
|
+
// Lock in the correct render branch before any async work so no
|
|
16793
|
+
// intermediate state can accidentally show the cards view.
|
|
16771
16794
|
setShouldRenderInstanceSelection(true);
|
|
16772
|
-
setIsLoadingEventInstances(true);
|
|
16773
|
-
await loadEventInstances(selectedEventType.id);
|
|
16774
16795
|
setCurrentStep("eventInstances");
|
|
16775
16796
|
setShowingPreview(false);
|
|
16797
|
+
setIsLoadingEventInstances(true);
|
|
16798
|
+
// Suppress the single-instance auto-select inside loadEventInstances
|
|
16799
|
+
// so it doesn't override currentStep to "booking" mid-flight.
|
|
16800
|
+
skipInstanceAutoSelectRef.current = true;
|
|
16801
|
+
try {
|
|
16802
|
+
if (selectedEventType) {
|
|
16803
|
+
await loadEventInstances(selectedEventType.id);
|
|
16804
|
+
}
|
|
16805
|
+
else {
|
|
16806
|
+
// next-events mode skips event type loading on init.
|
|
16807
|
+
// loadEventTypes sets selectedEventType (for the sidebar title)
|
|
16808
|
+
// and internally calls loadEventInstances (auto-select suppressed).
|
|
16809
|
+
await loadEventTypes();
|
|
16810
|
+
}
|
|
16811
|
+
}
|
|
16812
|
+
finally {
|
|
16813
|
+
skipInstanceAutoSelectRef.current = false;
|
|
16814
|
+
}
|
|
16776
16815
|
setIsLoadingEventInstances(false);
|
|
16777
16816
|
}
|
|
16778
16817
|
else {
|
|
@@ -16935,12 +16974,17 @@
|
|
|
16935
16974
|
}, config: config, googleAdsConfig: googleAdsConfig, onError: setError, paymentIntentId: successPaymentId })] }), showPromoDialog && config.promo && (u$2(PromoDialog, { config: config.promo, onClose: handlePromoDialogClose, onCtaClick: handlePromoCtaClick }))] }));
|
|
16936
16975
|
}
|
|
16937
16976
|
if (viewMode === "button" && (isSingleEventTypeMode || isDirectInstanceMode)) {
|
|
16977
|
+
const isButtonBusy = (isDirectInstanceMode && isLoadingEventDetails) ||
|
|
16978
|
+
(!isDirectInstanceMode && (isLoadingEventInstances || (shouldRenderInstanceSelection && !sidebarOpen)));
|
|
16938
16979
|
return (u$2(StyleProvider, { config: config, children: [u$2("div", { ref: setWidgetContainerRef, style: {
|
|
16939
16980
|
display: "flex",
|
|
16940
16981
|
justifyContent: "center",
|
|
16941
16982
|
alignItems: "center",
|
|
16942
16983
|
minHeight: "120px",
|
|
16943
|
-
}, children: [u$2("button", { type: "button", style: {
|
|
16984
|
+
}, children: [u$2("button", { type: "button", disabled: isButtonBusy, style: {
|
|
16985
|
+
display: "inline-flex",
|
|
16986
|
+
alignItems: "center",
|
|
16987
|
+
gap: "10px",
|
|
16944
16988
|
backgroundColor: "var(--bw-highlight-color)",
|
|
16945
16989
|
color: "white",
|
|
16946
16990
|
padding: "16px 32px",
|
|
@@ -16950,18 +16994,21 @@
|
|
|
16950
16994
|
fontWeight: 600,
|
|
16951
16995
|
fontFamily: "var(--bw-font-family)",
|
|
16952
16996
|
boxShadow: "var(--bw-shadow-md)",
|
|
16953
|
-
cursor: "pointer",
|
|
16997
|
+
cursor: isButtonBusy ? "default" : "pointer",
|
|
16998
|
+
opacity: isButtonBusy ? 0.85 : 1,
|
|
16999
|
+
transition: "opacity 0.2s ease",
|
|
16954
17000
|
}, onClick: () => {
|
|
16955
17001
|
if (isDirectInstanceMode) {
|
|
16956
17002
|
setCurrentStep("booking");
|
|
16957
17003
|
setShouldRenderBookingForm(true);
|
|
16958
17004
|
}
|
|
16959
17005
|
else {
|
|
17006
|
+
setCurrentStep("eventInstances");
|
|
16960
17007
|
setSidebarOpen(true);
|
|
16961
17008
|
setShouldRenderInstanceSelection(true);
|
|
16962
17009
|
}
|
|
16963
|
-
}, children: config.buttonText ||
|
|
16964
|
-
|
|
17010
|
+
}, children: [isButtonBusy && u$2(Spinner, { size: 20, borderColor: "white" }), config.buttonText ||
|
|
17011
|
+
(isDirectInstanceMode ? t("button.bookNow") : t("button.viewDates"))] }), shouldRenderInstanceSelection && (u$2(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => setSidebarOpen(false), isOpen: sidebarOpen && currentStep === "eventInstances", onClose: () => setSidebarOpen(false), isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails, hasUpsellsStep: hasUpsellsFlowStep })), shouldRenderUpsells && (u$2(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (u$2(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, isOpen: currentStep === "booking" && !!eventDetails, onClose: handleBackFromBooking, systemConfig: systemConfig, selectedUpsells: selectedUpsells, upsells: upsells, persistedState: bookingPersistedState, onPersistedStateChange: setBookingPersistedState })), u$2(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
|
|
16965
17012
|
setIsSuccess(false);
|
|
16966
17013
|
setCurrentStep("eventTypes");
|
|
16967
17014
|
setSidebarOpen(false);
|