@bigz-app/booking-widget 1.4.0 → 1.4.2
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 +508 -319
- package/dist/booking-widget.js.map +1 -1
- package/dist/components/UniversalBookingWidget.d.ts.map +1 -1
- package/dist/components/booking/BookingForm.d.ts +1 -0
- package/dist/components/booking/BookingForm.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/EventInstanceSelection.d.ts +2 -1
- package/dist/components/events/EventInstanceSelection.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/flow-progress.d.ts +8 -0
- package/dist/components/shared/flow-progress.d.ts.map +1 -0
- package/dist/components/shared/payment-logos-strip.d.ts +2 -0
- package/dist/components/shared/payment-logos-strip.d.ts.map +1 -0
- package/dist/components/upsells/UpsellsStep.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 +508 -319
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +508 -319
- 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",
|
|
@@ -294,6 +295,7 @@
|
|
|
294
295
|
"events.availableFrom": "Freie Plätze ab {{date}}",
|
|
295
296
|
"events.noAvailableDates": "Keine Termine frei",
|
|
296
297
|
"events.previewSectionTitle": "Specials & nächste Termine",
|
|
298
|
+
"events.seeMoreDates": "Weitere Termine ansehen...",
|
|
297
299
|
// Event instances
|
|
298
300
|
"instances.title": "Terminauswahl",
|
|
299
301
|
"instances.noAvailable": "Keine verfügbaren Termine",
|
|
@@ -308,7 +310,7 @@
|
|
|
308
310
|
"nextEvents.subtitle": "Wähle einen Termin aus oder zeige alle verfügbaren Termine an",
|
|
309
311
|
"nextEvents.noUpcoming": "Keine bevorstehenden Termine",
|
|
310
312
|
"nextEvents.noUpcomingMessage": "Aktuell sind keine Termine verfügbar. Bitte schaue später noch einmal vorbei oder kontaktiere uns direkt.",
|
|
311
|
-
"nextEvents.showAll": "
|
|
313
|
+
"nextEvents.showAll": "Weitere Termine ansehen...",
|
|
312
314
|
"nextEvents.priceOnRequest": "Preis auf Anfrage",
|
|
313
315
|
// Specials view
|
|
314
316
|
"specials.title": "Sonderangebote",
|
|
@@ -347,6 +349,10 @@
|
|
|
347
349
|
"booking.maxSpotsReached": "Maximal {{count}} Plätze verfügbar.",
|
|
348
350
|
"booking.comment": "Kommentar (optional)",
|
|
349
351
|
"booking.commentPlaceholder": "Zusätzliche Anmerkungen zur Buchung...",
|
|
352
|
+
"booking.stepDate": "Termin",
|
|
353
|
+
"booking.stepUpsells": "Extras",
|
|
354
|
+
"booking.stepDetails": "Angaben",
|
|
355
|
+
"booking.stepPayment": "Zahlung",
|
|
350
356
|
// Booking summary
|
|
351
357
|
"summary.title": "Buchungszusammenfassung",
|
|
352
358
|
"summary.subtotal": "Zwischensumme:",
|
|
@@ -479,6 +485,7 @@
|
|
|
479
485
|
"upsells.selectedPlural": "{{count}} Extras ausgewählt",
|
|
480
486
|
"upsells.savePercent": "{{percent}}% sparen",
|
|
481
487
|
"booking.paymentUnavailable": "Online-Zahlung ist für diese Buchung nicht verfügbar. Bitte kontaktiere uns, um die Reservierung abzuschließen.",
|
|
488
|
+
"booking.depositNotConfigured": "Online-Anzahlung ist für dieses Event nicht verfügbar. Bitte kontaktiere uns, um die Reservierung abzuschließen.",
|
|
482
489
|
"upsells.spotsFree": "{{count}} Plätze frei",
|
|
483
490
|
"upsells.notAvailable": "Nicht verfügbar",
|
|
484
491
|
"upsells.reason.outOfStock": "{{productName}} ist nicht auf Lager",
|
|
@@ -504,6 +511,9 @@
|
|
|
504
511
|
"promo.giftCode": "Dein Geschenk-Code",
|
|
505
512
|
"promo.copied": "Kopiert!",
|
|
506
513
|
"promo.copy": "Kopieren",
|
|
514
|
+
"trust.securePayment": "Sichere Zahlung",
|
|
515
|
+
"trust.paypal": "PayPal",
|
|
516
|
+
"trust.stripe": "Stripe",
|
|
507
517
|
};
|
|
508
518
|
|
|
509
519
|
const en = {
|
|
@@ -551,6 +561,7 @@
|
|
|
551
561
|
// Buttons
|
|
552
562
|
"button.bookNow": "Book now",
|
|
553
563
|
"button.selectDate": "Select a date",
|
|
564
|
+
"button.viewDates": "View dates",
|
|
554
565
|
"button.moreDetails": "More details",
|
|
555
566
|
"button.toPayment": "To payment ↓",
|
|
556
567
|
"button.redeem": "Redeem",
|
|
@@ -574,6 +585,7 @@
|
|
|
574
585
|
"events.availableFrom": "Available from {{date}}",
|
|
575
586
|
"events.noAvailableDates": "No dates available",
|
|
576
587
|
"events.previewSectionTitle": "Specials & upcoming dates",
|
|
588
|
+
"events.seeMoreDates": "See more dates...",
|
|
577
589
|
// Event instances
|
|
578
590
|
"instances.title": "Select a date",
|
|
579
591
|
"instances.noAvailable": "No available dates",
|
|
@@ -588,7 +600,7 @@
|
|
|
588
600
|
"nextEvents.subtitle": "Select a date or view all available dates",
|
|
589
601
|
"nextEvents.noUpcoming": "No upcoming dates",
|
|
590
602
|
"nextEvents.noUpcomingMessage": "There are currently no dates available. Please check back later or contact us directly.",
|
|
591
|
-
"nextEvents.showAll": "
|
|
603
|
+
"nextEvents.showAll": "See more dates...",
|
|
592
604
|
"nextEvents.priceOnRequest": "Price on request",
|
|
593
605
|
// Specials view
|
|
594
606
|
"specials.title": "Special Offers",
|
|
@@ -627,6 +639,10 @@
|
|
|
627
639
|
"booking.maxSpotsReached": "Maximum {{count}} spots available.",
|
|
628
640
|
"booking.comment": "Comment (optional)",
|
|
629
641
|
"booking.commentPlaceholder": "Additional notes for the booking...",
|
|
642
|
+
"booking.stepDate": "Date",
|
|
643
|
+
"booking.stepUpsells": "Extras",
|
|
644
|
+
"booking.stepDetails": "Details",
|
|
645
|
+
"booking.stepPayment": "Payment",
|
|
630
646
|
// Booking summary
|
|
631
647
|
"summary.title": "Booking Summary",
|
|
632
648
|
"summary.subtotal": "Subtotal:",
|
|
@@ -759,6 +775,7 @@
|
|
|
759
775
|
"upsells.selectedPlural": "{{count}} extras selected",
|
|
760
776
|
"upsells.savePercent": "Save {{percent}}%",
|
|
761
777
|
"booking.paymentUnavailable": "Online payment is not available for this booking. Please contact us to complete your reservation.",
|
|
778
|
+
"booking.depositNotConfigured": "Online deposit payment is not available for this event. Please contact us to complete your reservation.",
|
|
762
779
|
"upsells.spotsFree": "{{count}} spots available",
|
|
763
780
|
"upsells.notAvailable": "Not available",
|
|
764
781
|
"upsells.reason.outOfStock": "{{productName}} is out of stock",
|
|
@@ -784,6 +801,9 @@
|
|
|
784
801
|
"promo.giftCode": "Your gift code",
|
|
785
802
|
"promo.copied": "Copied!",
|
|
786
803
|
"promo.copy": "Copy",
|
|
804
|
+
"trust.securePayment": "Secure payment",
|
|
805
|
+
"trust.paypal": "PayPal",
|
|
806
|
+
"trust.stripe": "Stripe",
|
|
787
807
|
};
|
|
788
808
|
|
|
789
809
|
const es = {
|
|
@@ -831,6 +851,7 @@
|
|
|
831
851
|
// Buttons
|
|
832
852
|
"button.bookNow": "Reservar ahora",
|
|
833
853
|
"button.selectDate": "Seleccionar fecha",
|
|
854
|
+
"button.viewDates": "Ver fechas",
|
|
834
855
|
"button.moreDetails": "Más detalles",
|
|
835
856
|
"button.toPayment": "Al pago ↓",
|
|
836
857
|
"button.redeem": "Canjear",
|
|
@@ -854,6 +875,7 @@
|
|
|
854
875
|
"events.availableFrom": "Disponible desde {{date}}",
|
|
855
876
|
"events.noAvailableDates": "Sin fechas disponibles",
|
|
856
877
|
"events.previewSectionTitle": "Especiales & próximas fechas",
|
|
878
|
+
"events.seeMoreDates": "Ver más fechas...",
|
|
857
879
|
// Event instances
|
|
858
880
|
"instances.title": "Seleccionar fecha",
|
|
859
881
|
"instances.noAvailable": "Sin fechas disponibles",
|
|
@@ -868,7 +890,7 @@
|
|
|
868
890
|
"nextEvents.subtitle": "Selecciona una fecha o consulta todas las fechas disponibles",
|
|
869
891
|
"nextEvents.noUpcoming": "Sin próximas fechas",
|
|
870
892
|
"nextEvents.noUpcomingMessage": "Actualmente no hay fechas disponibles. Por favor, vuelve más tarde o contáctanos directamente.",
|
|
871
|
-
"nextEvents.showAll": "
|
|
893
|
+
"nextEvents.showAll": "Ver más fechas...",
|
|
872
894
|
"nextEvents.priceOnRequest": "Precio bajo consulta",
|
|
873
895
|
// Specials view
|
|
874
896
|
"specials.title": "Ofertas especiales",
|
|
@@ -907,6 +929,10 @@
|
|
|
907
929
|
"booking.maxSpotsReached": "Máximo {{count}} plazas disponibles.",
|
|
908
930
|
"booking.comment": "Comentario (opcional)",
|
|
909
931
|
"booking.commentPlaceholder": "Notas adicionales para la reserva...",
|
|
932
|
+
"booking.stepDate": "Fecha",
|
|
933
|
+
"booking.stepUpsells": "Extras",
|
|
934
|
+
"booking.stepDetails": "Datos",
|
|
935
|
+
"booking.stepPayment": "Pago",
|
|
910
936
|
// Booking summary
|
|
911
937
|
"summary.title": "Resumen de la reserva",
|
|
912
938
|
"summary.subtotal": "Subtotal:",
|
|
@@ -1039,6 +1065,7 @@
|
|
|
1039
1065
|
"upsells.selectedPlural": "{{count}} extras seleccionados",
|
|
1040
1066
|
"upsells.savePercent": "Ahorra {{percent}}%",
|
|
1041
1067
|
"booking.paymentUnavailable": "El pago en línea no está disponible para esta reserva. Contáctanos para completarla.",
|
|
1068
|
+
"booking.depositNotConfigured": "El pago de depósito en línea no está disponible para este evento. Contáctanos para completar la reserva.",
|
|
1042
1069
|
"upsells.spotsFree": "{{count}} plazas disponibles",
|
|
1043
1070
|
"upsells.notAvailable": "No disponible",
|
|
1044
1071
|
"upsells.reason.outOfStock": "{{productName}} está agotado",
|
|
@@ -1064,6 +1091,9 @@
|
|
|
1064
1091
|
"promo.giftCode": "Tu codigo de regalo",
|
|
1065
1092
|
"promo.copied": "Copiado!",
|
|
1066
1093
|
"promo.copy": "Copiar",
|
|
1094
|
+
"trust.securePayment": "Pago seguro",
|
|
1095
|
+
"trust.paypal": "PayPal",
|
|
1096
|
+
"trust.stripe": "Stripe",
|
|
1067
1097
|
};
|
|
1068
1098
|
|
|
1069
1099
|
const pt = {
|
|
@@ -1111,6 +1141,7 @@
|
|
|
1111
1141
|
// Buttons
|
|
1112
1142
|
"button.bookNow": "Reservar agora",
|
|
1113
1143
|
"button.selectDate": "Selecionar data",
|
|
1144
|
+
"button.viewDates": "Ver datas",
|
|
1114
1145
|
"button.moreDetails": "Mais detalhes",
|
|
1115
1146
|
"button.toPayment": "Para pagamento ↓",
|
|
1116
1147
|
"button.redeem": "Resgatar",
|
|
@@ -1134,6 +1165,7 @@
|
|
|
1134
1165
|
"events.availableFrom": "Disponível a partir de {{date}}",
|
|
1135
1166
|
"events.noAvailableDates": "Sem datas disponíveis",
|
|
1136
1167
|
"events.previewSectionTitle": "Especiais & próximas datas",
|
|
1168
|
+
"events.seeMoreDates": "Ver mais datas...",
|
|
1137
1169
|
// Event instances
|
|
1138
1170
|
"instances.title": "Selecionar data",
|
|
1139
1171
|
"instances.noAvailable": "Sem datas disponíveis",
|
|
@@ -1148,7 +1180,7 @@
|
|
|
1148
1180
|
"nextEvents.subtitle": "Selecione uma data ou veja todas as datas disponíveis",
|
|
1149
1181
|
"nextEvents.noUpcoming": "Sem próximas datas",
|
|
1150
1182
|
"nextEvents.noUpcomingMessage": "Atualmente não há datas disponíveis. Por favor, volte mais tarde ou contacte-nos diretamente.",
|
|
1151
|
-
"nextEvents.showAll": "
|
|
1183
|
+
"nextEvents.showAll": "Ver mais datas...",
|
|
1152
1184
|
"nextEvents.priceOnRequest": "Preço sob consulta",
|
|
1153
1185
|
// Specials view
|
|
1154
1186
|
"specials.title": "Ofertas especiais",
|
|
@@ -1187,6 +1219,10 @@
|
|
|
1187
1219
|
"booking.maxSpotsReached": "Máximo {{count}} lugares disponíveis.",
|
|
1188
1220
|
"booking.comment": "Comentário (opcional)",
|
|
1189
1221
|
"booking.commentPlaceholder": "Notas adicionais para a reserva...",
|
|
1222
|
+
"booking.stepDate": "Data",
|
|
1223
|
+
"booking.stepUpsells": "Extras",
|
|
1224
|
+
"booking.stepDetails": "Dados",
|
|
1225
|
+
"booking.stepPayment": "Pagamento",
|
|
1190
1226
|
// Booking summary
|
|
1191
1227
|
"summary.title": "Resumo da reserva",
|
|
1192
1228
|
"summary.subtotal": "Subtotal:",
|
|
@@ -1319,6 +1355,7 @@
|
|
|
1319
1355
|
"upsells.selectedPlural": "{{count}} extras selecionados",
|
|
1320
1356
|
"upsells.savePercent": "Poupa {{percent}}%",
|
|
1321
1357
|
"booking.paymentUnavailable": "O pagamento online não está disponível para esta reserva. Contacta-nos para concluir a reserva.",
|
|
1358
|
+
"booking.depositNotConfigured": "O pagamento de depósito online não está disponível para este evento. Contacta-nos para concluir a reserva.",
|
|
1322
1359
|
"upsells.spotsFree": "{{count}} lugares disponíveis",
|
|
1323
1360
|
"upsells.notAvailable": "Não disponível",
|
|
1324
1361
|
"upsells.reason.outOfStock": "{{productName}} está esgotado",
|
|
@@ -1344,6 +1381,9 @@
|
|
|
1344
1381
|
"promo.giftCode": "O teu codigo de oferta",
|
|
1345
1382
|
"promo.copied": "Copiado!",
|
|
1346
1383
|
"promo.copy": "Copiar",
|
|
1384
|
+
"trust.securePayment": "Pagamento seguro",
|
|
1385
|
+
"trust.paypal": "PayPal",
|
|
1386
|
+
"trust.stripe": "Stripe",
|
|
1347
1387
|
};
|
|
1348
1388
|
|
|
1349
1389
|
const sv = {
|
|
@@ -1391,6 +1431,7 @@
|
|
|
1391
1431
|
// Buttons
|
|
1392
1432
|
"button.bookNow": "Boka nu",
|
|
1393
1433
|
"button.selectDate": "Välj datum",
|
|
1434
|
+
"button.viewDates": "Visa datum",
|
|
1394
1435
|
"button.moreDetails": "Mer information",
|
|
1395
1436
|
"button.toPayment": "Till betalning ↓",
|
|
1396
1437
|
"button.redeem": "Lös in",
|
|
@@ -1414,6 +1455,7 @@
|
|
|
1414
1455
|
"events.availableFrom": "Lediga platser från {{date}}",
|
|
1415
1456
|
"events.noAvailableDates": "Inga datum lediga",
|
|
1416
1457
|
"events.previewSectionTitle": "Specials & kommande datum",
|
|
1458
|
+
"events.seeMoreDates": "Se fler datum...",
|
|
1417
1459
|
// Event instances
|
|
1418
1460
|
"instances.title": "Välj datum",
|
|
1419
1461
|
"instances.noAvailable": "Inga tillgängliga datum",
|
|
@@ -1428,7 +1470,7 @@
|
|
|
1428
1470
|
"nextEvents.subtitle": "Välj ett datum eller visa alla tillgängliga datum",
|
|
1429
1471
|
"nextEvents.noUpcoming": "Inga kommande datum",
|
|
1430
1472
|
"nextEvents.noUpcomingMessage": "Det finns för närvarande inga datum tillgängliga. Kom tillbaka senare eller kontakta oss direkt.",
|
|
1431
|
-
"nextEvents.showAll": "
|
|
1473
|
+
"nextEvents.showAll": "Se fler datum...",
|
|
1432
1474
|
"nextEvents.priceOnRequest": "Pris på förfrågan",
|
|
1433
1475
|
// Specials view
|
|
1434
1476
|
"specials.title": "Specialerbjudanden",
|
|
@@ -1467,6 +1509,10 @@
|
|
|
1467
1509
|
"booking.maxSpotsReached": "Maximalt {{count}} platser tillgängliga.",
|
|
1468
1510
|
"booking.comment": "Kommentar (valfritt)",
|
|
1469
1511
|
"booking.commentPlaceholder": "Ytterligare anteckningar för bokningen...",
|
|
1512
|
+
"booking.stepDate": "Datum",
|
|
1513
|
+
"booking.stepUpsells": "Tillägg",
|
|
1514
|
+
"booking.stepDetails": "Uppgifter",
|
|
1515
|
+
"booking.stepPayment": "Betalning",
|
|
1470
1516
|
// Booking summary
|
|
1471
1517
|
"summary.title": "Bokningssammanfattning",
|
|
1472
1518
|
"summary.subtotal": "Delsumma:",
|
|
@@ -1599,6 +1645,7 @@
|
|
|
1599
1645
|
"upsells.selectedPlural": "{{count}} tillägg valda",
|
|
1600
1646
|
"upsells.savePercent": "Spara {{percent}}%",
|
|
1601
1647
|
"booking.paymentUnavailable": "Onlinebetalning är inte tillgänglig för denna bokning. Kontakta oss för att slutföra bokningen.",
|
|
1648
|
+
"booking.depositNotConfigured": "Online deposition är inte tillgänglig för detta evenemang. Kontakta oss för att slutföra bokningen.",
|
|
1602
1649
|
"upsells.spotsFree": "{{count}} platser lediga",
|
|
1603
1650
|
"upsells.notAvailable": "Inte tillgängligt",
|
|
1604
1651
|
"upsells.reason.outOfStock": "{{productName}} är slut i lager",
|
|
@@ -1624,6 +1671,9 @@
|
|
|
1624
1671
|
"promo.giftCode": "Din presentkod",
|
|
1625
1672
|
"promo.copied": "Kopierad!",
|
|
1626
1673
|
"promo.copy": "Kopiera",
|
|
1674
|
+
"trust.securePayment": "Säker betalning",
|
|
1675
|
+
"trust.paypal": "PayPal",
|
|
1676
|
+
"trust.stripe": "Stripe",
|
|
1627
1677
|
};
|
|
1628
1678
|
|
|
1629
1679
|
const SUPPORTED_LOCALES = ["de", "en", "es", "sv", "pt"];
|
|
@@ -2308,7 +2358,7 @@
|
|
|
2308
2358
|
return {
|
|
2309
2359
|
"Content-Type": "application/json",
|
|
2310
2360
|
"X-Origin-Url": window.location.href,
|
|
2311
|
-
"X-Language": locale
|
|
2361
|
+
"X-Language": locale,
|
|
2312
2362
|
"X-User-Agent": navigator.userAgent,
|
|
2313
2363
|
};
|
|
2314
2364
|
};
|
|
@@ -6363,6 +6413,7 @@
|
|
|
6363
6413
|
|
|
6364
6414
|
function GiftCardOnlyBooking({ config, eventDetails, formData, discountCode, giftCards, onSuccess, onError, upsellSelections = [], }) {
|
|
6365
6415
|
const t = useTranslations();
|
|
6416
|
+
const { locale } = useLocale();
|
|
6366
6417
|
const [isLoading, setIsLoading] = d$1(false);
|
|
6367
6418
|
const [error, setError] = d$1(null);
|
|
6368
6419
|
const handleBooking = async () => {
|
|
@@ -6384,7 +6435,7 @@
|
|
|
6384
6435
|
};
|
|
6385
6436
|
const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/create-gift-card-booking"), {
|
|
6386
6437
|
method: "POST",
|
|
6387
|
-
headers: createApiHeaders(config),
|
|
6438
|
+
headers: createApiHeaders(config, locale),
|
|
6388
6439
|
body: JSON.stringify(createRequestBody(config, requestData)),
|
|
6389
6440
|
});
|
|
6390
6441
|
const data = await response.json();
|
|
@@ -6535,7 +6586,7 @@
|
|
|
6535
6586
|
try {
|
|
6536
6587
|
const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/mollie-methods"), {
|
|
6537
6588
|
method: "POST",
|
|
6538
|
-
headers: createApiHeaders(config),
|
|
6589
|
+
headers: createApiHeaders(config, locale),
|
|
6539
6590
|
body: JSON.stringify(createRequestBody(config, {
|
|
6540
6591
|
organizationId: config.organizationId,
|
|
6541
6592
|
amount: Math.round(totalAmount),
|
|
@@ -6678,7 +6729,7 @@
|
|
|
6678
6729
|
}
|
|
6679
6730
|
const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/create-mollie-payment"), {
|
|
6680
6731
|
method: "POST",
|
|
6681
|
-
headers: createApiHeaders(config),
|
|
6732
|
+
headers: createApiHeaders(config, locale),
|
|
6682
6733
|
body: JSON.stringify(createRequestBody(config, buildRequestData(token))),
|
|
6683
6734
|
});
|
|
6684
6735
|
const data = await response.json();
|
|
@@ -6714,7 +6765,7 @@
|
|
|
6714
6765
|
}
|
|
6715
6766
|
const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/create-mollie-payment"), {
|
|
6716
6767
|
method: "POST",
|
|
6717
|
-
headers: createApiHeaders(config),
|
|
6768
|
+
headers: createApiHeaders(config, locale),
|
|
6718
6769
|
body: JSON.stringify(createRequestBody(config, buildRequestData())),
|
|
6719
6770
|
});
|
|
6720
6771
|
const data = await response.json();
|
|
@@ -6912,6 +6963,7 @@
|
|
|
6912
6963
|
}
|
|
6913
6964
|
function StripePaymentForm({ config, eventDetails, formData, totalAmount, discountCode, giftCards, onSuccess, onError, systemConfig, stripePromise, stripeAppearance, upsellSelections = [], }) {
|
|
6914
6965
|
const t = useTranslations();
|
|
6966
|
+
const { locale } = useLocale();
|
|
6915
6967
|
const [clientSecret, setClientSecret] = d$1(null);
|
|
6916
6968
|
const [paymentIntentId, setPaymentIntentId] = d$1(null);
|
|
6917
6969
|
const [isCreatingPaymentIntent, setIsCreatingPaymentIntent] = d$1(false);
|
|
@@ -7014,7 +7066,7 @@
|
|
|
7014
7066
|
}
|
|
7015
7067
|
const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/create-stripe-payment"), {
|
|
7016
7068
|
method: "POST",
|
|
7017
|
-
headers: createApiHeaders(config),
|
|
7069
|
+
headers: createApiHeaders(config, locale),
|
|
7018
7070
|
body: JSON.stringify(createRequestBody(config, requestData)),
|
|
7019
7071
|
});
|
|
7020
7072
|
const data = await response.json();
|
|
@@ -7390,10 +7442,60 @@
|
|
|
7390
7442
|
}, children: children }))] }));
|
|
7391
7443
|
}
|
|
7392
7444
|
|
|
7445
|
+
function FlowProgress({ currentStep, hasUpsellsStep }) {
|
|
7446
|
+
const t = useTranslations();
|
|
7447
|
+
const steps = hasUpsellsStep
|
|
7448
|
+
? [
|
|
7449
|
+
{ key: "date", label: t("booking.stepDate") },
|
|
7450
|
+
{ key: "upsells", label: t("booking.stepUpsells") },
|
|
7451
|
+
{ key: "details", label: t("booking.stepDetails") },
|
|
7452
|
+
{ key: "payment", label: t("booking.stepPayment") },
|
|
7453
|
+
]
|
|
7454
|
+
: [
|
|
7455
|
+
{ key: "date", label: t("booking.stepDate") },
|
|
7456
|
+
{ key: "details", label: t("booking.stepDetails") },
|
|
7457
|
+
{ key: "payment", label: t("booking.stepPayment") },
|
|
7458
|
+
];
|
|
7459
|
+
const activeIndex = Math.max(steps.findIndex((step) => step.key === currentStep), 0);
|
|
7460
|
+
const progressPercent = steps.length > 1 ? (activeIndex / (steps.length - 1)) * 100 : 100;
|
|
7461
|
+
return (u$2("div", { style: {
|
|
7462
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
7463
|
+
border: "1px solid var(--bw-border-color)",
|
|
7464
|
+
borderRadius: "var(--bw-border-radius)",
|
|
7465
|
+
padding: "12px 14px",
|
|
7466
|
+
marginBottom: "16px",
|
|
7467
|
+
}, children: [u$2("div", { style: {
|
|
7468
|
+
display: "flex",
|
|
7469
|
+
justifyContent: "space-between",
|
|
7470
|
+
alignItems: "center",
|
|
7471
|
+
marginBottom: "10px",
|
|
7472
|
+
fontFamily: "var(--bw-font-family)",
|
|
7473
|
+
gap: "8px",
|
|
7474
|
+
}, children: steps.map((step, index) => (u$2("span", { style: {
|
|
7475
|
+
fontSize: "12px",
|
|
7476
|
+
fontWeight: 700,
|
|
7477
|
+
color: index <= activeIndex ? "var(--bw-highlight-color)" : "var(--bw-text-muted)",
|
|
7478
|
+
whiteSpace: "nowrap",
|
|
7479
|
+
}, children: [index + 1, ". ", step.label] }, step.key))) }), u$2("div", { style: {
|
|
7480
|
+
width: "100%",
|
|
7481
|
+
height: "8px",
|
|
7482
|
+
borderRadius: "999px",
|
|
7483
|
+
backgroundColor: "var(--bw-background-color)",
|
|
7484
|
+
border: "1px solid var(--bw-border-color)",
|
|
7485
|
+
overflow: "hidden",
|
|
7486
|
+
}, children: u$2("div", { style: {
|
|
7487
|
+
width: `${progressPercent}%`,
|
|
7488
|
+
height: "100%",
|
|
7489
|
+
backgroundColor: "var(--bw-highlight-color)",
|
|
7490
|
+
transition: "width 0.25s ease",
|
|
7491
|
+
} }) })] }));
|
|
7492
|
+
}
|
|
7493
|
+
|
|
7393
7494
|
// Spinner icon (kept local as it has animation style)
|
|
7394
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" }) }));
|
|
7395
7496
|
function VoucherInput({ config, orderValue, eventInstanceId, customerEmail, onVoucherValidated, appliedVouchers, onRemoveVoucher, disabled = false, }) {
|
|
7396
7497
|
const t = useTranslations();
|
|
7498
|
+
const { locale } = useLocale();
|
|
7397
7499
|
const [inputValue, setInputValue] = d$1("");
|
|
7398
7500
|
const [isLoading, setIsLoading] = d$1(false);
|
|
7399
7501
|
const [error, setError] = d$1(null);
|
|
@@ -7413,7 +7515,7 @@
|
|
|
7413
7515
|
try {
|
|
7414
7516
|
const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/validate-voucher"), {
|
|
7415
7517
|
method: "POST",
|
|
7416
|
-
headers: createApiHeaders(config),
|
|
7518
|
+
headers: createApiHeaders(config, locale),
|
|
7417
7519
|
body: JSON.stringify(createRequestBody(config, {
|
|
7418
7520
|
code: code.trim(),
|
|
7419
7521
|
orderValue: orderValue,
|
|
@@ -11604,6 +11706,7 @@
|
|
|
11604
11706
|
const { locale } = useLocale();
|
|
11605
11707
|
const timezone = useTimezone();
|
|
11606
11708
|
const roundEnabled = systemConfig?.roundPricesEnabled !== false;
|
|
11709
|
+
const widgetPaymentMode = systemConfig?.widgetPaymentMode ?? "all";
|
|
11607
11710
|
const participantFieldsConfig = eventDetails.participantFieldsConfig ?? DEFAULT_PARTICIPANT_FIELDS_CONFIG;
|
|
11608
11711
|
const participantLevelOptions = eventDetails.participantLevelOptions ?? ["beginner", "advanced"];
|
|
11609
11712
|
const roundDiscountUp = (minorUnits) => Math.ceil(minorUnits / 100) * 100;
|
|
@@ -11617,6 +11720,7 @@
|
|
|
11617
11720
|
const [paymentOption, setPaymentOption] = d$1(() => persistedState?.paymentOption ?? "deposit");
|
|
11618
11721
|
// Per-participant upsell selections: participantIndex -> array of upsell package IDs
|
|
11619
11722
|
const [participantUpsells, setParticipantUpsells] = d$1(() => persistedState?.participantUpsells ?? {});
|
|
11723
|
+
const [showPaymentValidationHint, setShowPaymentValidationHint] = d$1(false);
|
|
11620
11724
|
const wasOpenRef = A$2(false);
|
|
11621
11725
|
const form = useForm({
|
|
11622
11726
|
resolver: t(createBookingFormSchema(t$1, participantFieldsConfig)),
|
|
@@ -11740,12 +11844,22 @@
|
|
|
11740
11844
|
const totalDiscount = calculateTotalDiscount();
|
|
11741
11845
|
const totalAmount = calculateTotal();
|
|
11742
11846
|
const depositAmount = calculateDeposit();
|
|
11743
|
-
|
|
11744
|
-
|
|
11745
|
-
const
|
|
11746
|
-
const
|
|
11747
|
-
|
|
11748
|
-
|
|
11847
|
+
const allowsDepositInWidget = widgetPaymentMode === "all" || widgetPaymentMode === "deposits_only";
|
|
11848
|
+
const allowsFullInWidget = widgetPaymentMode === "all" || widgetPaymentMode === "full_only";
|
|
11849
|
+
const hasConfiguredDeposit = depositAmount > 0;
|
|
11850
|
+
const hasDepositChoice = allowsDepositInWidget && hasConfiguredDeposit && depositAmount < totalAmount;
|
|
11851
|
+
const depositsOnlyBlocked = widgetPaymentMode === "deposits_only" && !hasConfiguredDeposit;
|
|
11852
|
+
y$1(() => {
|
|
11853
|
+
if (widgetPaymentMode === "deposits_only") {
|
|
11854
|
+
setPaymentOption("deposit");
|
|
11855
|
+
}
|
|
11856
|
+
else if (widgetPaymentMode === "full_only") {
|
|
11857
|
+
setPaymentOption("full");
|
|
11858
|
+
}
|
|
11859
|
+
}, [widgetPaymentMode]);
|
|
11860
|
+
const paymentAmount = allowsFullInWidget && (!hasDepositChoice || paymentOption === "full" || !allowsDepositInWidget)
|
|
11861
|
+
? totalAmount
|
|
11862
|
+
: Math.min(depositAmount, totalAmount);
|
|
11749
11863
|
// Convert per-participant upsells to UpsellSelection[] format for API
|
|
11750
11864
|
// Includes participantIndices to track which participants selected each upsell
|
|
11751
11865
|
const aggregatedUpsellSelections = q$2(() => {
|
|
@@ -11904,7 +12018,39 @@
|
|
|
11904
12018
|
onClose();
|
|
11905
12019
|
};
|
|
11906
12020
|
// Footer navigation
|
|
11907
|
-
const
|
|
12021
|
+
const canContinueToPayment = isReadyForPayment();
|
|
12022
|
+
const handleContinueToPayment = async () => {
|
|
12023
|
+
if (canContinueToPayment && hasPaymentProvider) {
|
|
12024
|
+
setShowPaymentValidationHint(false);
|
|
12025
|
+
setCheckoutStep("payment");
|
|
12026
|
+
return;
|
|
12027
|
+
}
|
|
12028
|
+
const participantErrors = await form.trigger("participants");
|
|
12029
|
+
const customerErrors = await form.trigger(["customerName", "customerEmail", "acceptTerms"]);
|
|
12030
|
+
if (!participantErrors || !customerErrors) {
|
|
12031
|
+
setShowPaymentValidationHint(true);
|
|
12032
|
+
}
|
|
12033
|
+
};
|
|
12034
|
+
y$1(() => {
|
|
12035
|
+
if (showPaymentValidationHint && canContinueToPayment) {
|
|
12036
|
+
setShowPaymentValidationHint(false);
|
|
12037
|
+
}
|
|
12038
|
+
}, [showPaymentValidationHint, canContinueToPayment]);
|
|
12039
|
+
const footerContent = (u$2("div", { style: { width: "100%", display: "flex", flexDirection: "column", gap: "6px" }, children: [checkoutStep === "details" && (u$2("div", { style: {
|
|
12040
|
+
minHeight: "14px",
|
|
12041
|
+
fontSize: "11px",
|
|
12042
|
+
color: "var(--bw-error-color)",
|
|
12043
|
+
textAlign: "center",
|
|
12044
|
+
fontFamily: "var(--bw-font-family)",
|
|
12045
|
+
opacity: showPaymentValidationHint ? 1 : 0,
|
|
12046
|
+
transition: "opacity 0.15s ease",
|
|
12047
|
+
pointerEvents: "none",
|
|
12048
|
+
}, children: t$1("payment.fillRequired") })), u$2("div", { style: { display: "flex", gap: "12px", width: "100%" }, children: [u$2("button", { type: "button", onClick: checkoutStep === "payment" ? () => setCheckoutStep("details") : handleClose, style: mergeStyles(buttonStyles.secondary, buttonStyles.fullWidth), children: checkoutStep === "payment" ? t$1("button.backToDetails") : t$1("common.back") }), checkoutStep === "details" && (u$2("button", { type: "button", onClick: handleContinueToPayment, disabled: !hasPaymentProvider, style: mergeStyles(buttonStyles.primary, buttonStyles.fullWidth, !canContinueToPayment
|
|
12049
|
+
? {
|
|
12050
|
+
opacity: 0.55,
|
|
12051
|
+
cursor: "pointer",
|
|
12052
|
+
}
|
|
12053
|
+
: undefined), children: t$1("button.continueToPayment") }))] })] }));
|
|
11908
12054
|
if (!eventDetails.bookingOpen) {
|
|
11909
12055
|
return (u$2(Sidebar, { isOpen: isOpen, onClose: handleClose, title: t$1("booking.notPossible"), children: u$2("div", { style: {
|
|
11910
12056
|
display: "flex",
|
|
@@ -11921,7 +12067,7 @@
|
|
|
11921
12067
|
fontFamily: "var(--bw-font-family)",
|
|
11922
12068
|
}, children: t$1("booking.notPossible") }), u$2("p", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: t$1("booking.notPossibleMessage") })] }) }) }));
|
|
11923
12069
|
}
|
|
11924
|
-
return (u$2(Sidebar, { isOpen: isOpen, onClose: handleClose, title: t$1("booking.title", { name: eventDetails.name }), footer: footerContent, children: u$2("div", { className: "booking-widget-container", style: { padding: "16px" }, children: [checkoutStep === "details" && (u$2(k$3, { children: [u$2("div", { style: cardStyles$1, children: [u$2("h2", { style: sectionHeaderStyles$1, children: t$1("booking.eventDetails") }), u$2("div", { style: {
|
|
12070
|
+
return (u$2(Sidebar, { isOpen: isOpen, onClose: handleClose, title: t$1("booking.title", { name: eventDetails.name }), footer: footerContent, children: u$2("div", { className: "booking-widget-container", style: { padding: "16px" }, children: [u$2(FlowProgress, { currentStep: checkoutStep === "details" ? "details" : "payment", hasUpsellsStep: upsells.length > 0 }), checkoutStep === "details" && (u$2(k$3, { children: [u$2("div", { style: cardStyles$1, children: [u$2("h2", { style: sectionHeaderStyles$1, children: t$1("booking.eventDetails") }), u$2("div", { style: {
|
|
11925
12071
|
display: "grid",
|
|
11926
12072
|
gridTemplateColumns: "repeat(auto-fit, minmax(200px, 1fr))",
|
|
11927
12073
|
gap: "12px",
|
|
@@ -12047,7 +12193,7 @@
|
|
|
12047
12193
|
}, children: t$1("summary.giftCard", { code: giftCard.code }) }), u$2("span", { style: { color: "var(--bw-success-color)", fontFamily: "var(--bw-font-family)" }, children: ["-", formatCurrency(giftCard.balanceToUse || giftCard.discountAmount)] })] }, giftCard.code)))] })), u$2("div", { style: {
|
|
12048
12194
|
borderTop: "1px solid var(--bw-border-color)",
|
|
12049
12195
|
paddingTop: "12px",
|
|
12050
|
-
}, children: [
|
|
12196
|
+
}, children: [hasDepositChoice && (u$2("div", { style: {
|
|
12051
12197
|
display: "flex",
|
|
12052
12198
|
justifyContent: "space-between",
|
|
12053
12199
|
alignItems: "center",
|
|
@@ -12057,7 +12203,7 @@
|
|
|
12057
12203
|
color: "var(--bw-text-muted)",
|
|
12058
12204
|
fontFamily: "var(--bw-font-family)",
|
|
12059
12205
|
fontWeight: 500,
|
|
12060
|
-
}, children: formatCurrency(totalAmount) })] })),
|
|
12206
|
+
}, children: formatCurrency(totalAmount) })] })), hasDepositChoice && widgetPaymentMode === "all" && (u$2("div", { style: {
|
|
12061
12207
|
display: "flex",
|
|
12062
12208
|
gap: "8px",
|
|
12063
12209
|
marginBottom: "16px",
|
|
@@ -12113,19 +12259,19 @@
|
|
|
12113
12259
|
alignItems: "center",
|
|
12114
12260
|
fontSize: "18px",
|
|
12115
12261
|
fontWeight: 600,
|
|
12116
|
-
}, children: [u$2("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children:
|
|
12262
|
+
}, children: [u$2("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: hasDepositChoice && paymentOption === "deposit"
|
|
12117
12263
|
? t$1("summary.payToday")
|
|
12118
12264
|
: t$1("summary.totalAmount") }), u$2("span", { style: {
|
|
12119
12265
|
color: "var(--bw-highlight-color)",
|
|
12120
12266
|
fontFamily: "var(--bw-font-family)",
|
|
12121
12267
|
fontWeight: 700,
|
|
12122
|
-
}, children: formatCurrency(paymentAmount) })] }),
|
|
12268
|
+
}, children: formatCurrency(paymentAmount) })] }), hasDepositChoice && paymentOption === "deposit" && (u$2("div", { style: {
|
|
12123
12269
|
fontSize: "12px",
|
|
12124
12270
|
color: "var(--bw-text-muted)",
|
|
12125
12271
|
fontFamily: "var(--bw-font-family)",
|
|
12126
12272
|
marginTop: "8px",
|
|
12127
12273
|
textAlign: "right",
|
|
12128
|
-
}, children: t$1("summary.remainingOnSite", { amount: formatCurrency(totalAmount - depositAmount) }) }))] })] })] }), !hasPaymentProvider && (u$2("div", { style: cardStyles$1, children: u$2("p", { style: { ...errorTextStyles$1, margin: 0 }, children: t$1("booking.paymentUnavailable") }) })), hasPaymentProvider && (systemConfig?.paymentProvider === "mollie" ? (u$2("div", { style: cardStyles$1, children: [u$2("h2", { style: { ...sectionHeaderStyles$1 }, children: t$1("summary.payment") }), u$2(MolliePaymentForm, { config: config, eventDetails: eventDetails, formData: paymentFormData, totalAmount: paymentAmount, discountCode: discountCodeProp, giftCards: appliedGiftCards, onSuccess: onSuccess, onError: onError, upsellSelections: aggregatedUpsellSelections(), mollieProfileId: systemConfig?.mollieProfileId, mollieTestmode: systemConfig?.mollieTestmode })] })) : (u$2("div", { style: cardStyles$1, children: [u$2("h2", { style: { ...sectionHeaderStyles$1 }, children: t$1("summary.payment") }), u$2(StripePaymentForm, { config: config, eventDetails: eventDetails, formData: paymentFormData, totalAmount: paymentAmount, discountCode: discountCodeProp, giftCards: appliedGiftCards, onSuccess: onSuccess, onError: onError, systemConfig: systemConfig ?? null, stripePromise: stripePromise, stripeAppearance: stripeAppearance, upsellSelections: aggregatedUpsellSelections() })] })))] }))] }) }));
|
|
12274
|
+
}, children: t$1("summary.remainingOnSite", { amount: formatCurrency(totalAmount - depositAmount) }) }))] })] })] }), depositsOnlyBlocked && (u$2("div", { style: cardStyles$1, children: u$2("p", { style: { ...errorTextStyles$1, margin: 0 }, children: t$1("booking.depositNotConfigured") }) })), !hasPaymentProvider && !depositsOnlyBlocked && (u$2("div", { style: cardStyles$1, children: u$2("p", { style: { ...errorTextStyles$1, margin: 0 }, children: t$1("booking.paymentUnavailable") }) })), hasPaymentProvider && !depositsOnlyBlocked && (systemConfig?.paymentProvider === "mollie" ? (u$2("div", { style: cardStyles$1, children: [u$2("h2", { style: { ...sectionHeaderStyles$1 }, children: t$1("summary.payment") }), u$2(MolliePaymentForm, { config: config, eventDetails: eventDetails, formData: paymentFormData, totalAmount: paymentAmount, discountCode: discountCodeProp, giftCards: appliedGiftCards, onSuccess: onSuccess, onError: onError, upsellSelections: aggregatedUpsellSelections(), mollieProfileId: systemConfig?.mollieProfileId, mollieTestmode: systemConfig?.mollieTestmode })] })) : (u$2("div", { style: cardStyles$1, children: [u$2("h2", { style: { ...sectionHeaderStyles$1 }, children: t$1("summary.payment") }), u$2(StripePaymentForm, { config: config, eventDetails: eventDetails, formData: paymentFormData, totalAmount: paymentAmount, discountCode: discountCodeProp, giftCards: appliedGiftCards, onSuccess: onSuccess, onError: onError, systemConfig: systemConfig ?? null, stripePromise: stripePromise, stripeAppearance: stripeAppearance, upsellSelections: aggregatedUpsellSelections() })] })))] }))] }) }));
|
|
12129
12275
|
}
|
|
12130
12276
|
|
|
12131
12277
|
/**
|
|
@@ -12973,6 +13119,31 @@
|
|
|
12973
13119
|
} }))] }));
|
|
12974
13120
|
};
|
|
12975
13121
|
|
|
13122
|
+
function PaymentLogosStrip() {
|
|
13123
|
+
const logoHeight = 34;
|
|
13124
|
+
const logoCellStyle = {
|
|
13125
|
+
display: "inline-flex",
|
|
13126
|
+
alignItems: "center",
|
|
13127
|
+
justifyContent: "center",
|
|
13128
|
+
padding: "0px 1px",
|
|
13129
|
+
minHeight: "36px",
|
|
13130
|
+
borderRadius: "6px",
|
|
13131
|
+
};
|
|
13132
|
+
return (u$2("div", { style: {
|
|
13133
|
+
padding: "8px 5px",
|
|
13134
|
+
backgroundColor: "var(--bw-background-color)",
|
|
13135
|
+
border: "1px solid var(--bw-border-color)",
|
|
13136
|
+
display: "flex",
|
|
13137
|
+
alignItems: "center",
|
|
13138
|
+
justifyContent: "center",
|
|
13139
|
+
borderRadius: "var(--bw-border-radius)",
|
|
13140
|
+
gap: "0px",
|
|
13141
|
+
flexWrap: "wrap",
|
|
13142
|
+
width: "fit-content",
|
|
13143
|
+
margin: "20px auto",
|
|
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" }) })] }) })] }));
|
|
13145
|
+
}
|
|
13146
|
+
|
|
12976
13147
|
function VoucherPurchaseCard({ config, minEventPrice, fallbackImages = [], onClick, standalone = false, }) {
|
|
12977
13148
|
const t = useTranslations();
|
|
12978
13149
|
const [activeSlideIndex, setActiveSlideIndex] = d$1(0);
|
|
@@ -14092,7 +14263,7 @@
|
|
|
14092
14263
|
display: "flex",
|
|
14093
14264
|
flexDirection: "column",
|
|
14094
14265
|
justifyContent: "space-between",
|
|
14095
|
-
height: "
|
|
14266
|
+
height: "540px",
|
|
14096
14267
|
}, children: [u$2("div", { children: [u$2("h2", { className: "event-type-title", style: {
|
|
14097
14268
|
fontSize: "clamp(1.1rem, 2.5vw, 24px)",
|
|
14098
14269
|
fontWeight: 700,
|
|
@@ -14162,19 +14333,9 @@
|
|
|
14162
14333
|
}) }) })) : (u$2("div", { className: "event-type-desc", style: {
|
|
14163
14334
|
margin: "10px 0",
|
|
14164
14335
|
height: "7.5em", // Same height as highlights
|
|
14165
|
-
}, children: "\u00A0" })) })] }), u$2("div", { children: [
|
|
14166
|
-
fontWeight: 700,
|
|
14167
|
-
color: "var(--bw-text-color)",
|
|
14168
|
-
fontFamily: "var(--bw-font-family)",
|
|
14169
|
-
textAlign: "right",
|
|
14170
|
-
}, children: u$2("span", { children: formatDurationInfo(eventType.durationInfo, t) }) }), u$2("div", { className: "event-type-price", style: {
|
|
14171
|
-
fontSize: "clamp(1.72rem, 4vw, 32px)",
|
|
14172
|
-
fontWeight: 700,
|
|
14173
|
-
color: "var(--bw-text-color)",
|
|
14174
|
-
fontFamily: "var(--bw-font-family)",
|
|
14175
|
-
textAlign: "right",
|
|
14176
|
-
}, children: u$2("span", { children: [t("common.from"), " ", formatCurrency(eventType.minPrice)] }) })] }), (() => {
|
|
14336
|
+
}, children: "\u00A0" })) })] }), u$2("div", { children: [(() => {
|
|
14177
14337
|
const preview = eventType.cardPreview ?? [];
|
|
14338
|
+
const hasMoreDates = eventType.availableInstancesCount > preview.length;
|
|
14178
14339
|
return (u$2("div", { style: {
|
|
14179
14340
|
marginTop: "12px",
|
|
14180
14341
|
borderTop: "1px solid var(--bw-border-color)",
|
|
@@ -14208,8 +14369,33 @@
|
|
|
14208
14369
|
transition: "background 0.15s",
|
|
14209
14370
|
boxSizing: "border-box",
|
|
14210
14371
|
}, children: [u$2("span", { style: { whiteSpace: "nowrap", display: "flex", alignItems: "center", gap: "3px" }, children: [item.isSpecial && (u$2("span", { style: { color: "var(--bw-highlight-color)", fontSize: "11px", lineHeight: 1 }, children: "\u2605" })), formatWeekday(item.startTime, timezone, locale), " ", formatDate(item.startTime, timezone, locale)] }), u$2("span", { style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", opacity: 0.75 }, children: item.name }), u$2("span", { style: { display: "flex", alignItems: "center", gap: "4px", whiteSpace: "nowrap" }, children: [hasDiscount && (u$2("span", { style: { textDecoration: "line-through", opacity: 0.55, fontSize: "11px" }, children: formatCurrency(item.basePrice) })), u$2("span", { style: { fontWeight: 700, color: item.isSpecial ? "var(--bw-highlight-color)" : "var(--bw-text-color)" }, children: formatCurrency(item.price) })] }), item.specialDescription ? (u$2(InfoBadge, { text: item.specialDescription })) : (u$2("span", {}))] }, item.id));
|
|
14211
|
-
}) })
|
|
14212
|
-
|
|
14372
|
+
}) }), hasMoreDates && (u$2("button", { type: "button", onClick: (e) => {
|
|
14373
|
+
e.stopPropagation();
|
|
14374
|
+
onEventTypeSelect(eventType);
|
|
14375
|
+
}, style: {
|
|
14376
|
+
marginTop: "6px",
|
|
14377
|
+
padding: 0,
|
|
14378
|
+
border: "none",
|
|
14379
|
+
background: "none",
|
|
14380
|
+
color: "var(--bw-highlight-color)",
|
|
14381
|
+
fontFamily: "var(--bw-font-family)",
|
|
14382
|
+
fontSize: "13px",
|
|
14383
|
+
fontWeight: 600,
|
|
14384
|
+
cursor: "pointer",
|
|
14385
|
+
textDecoration: "underline",
|
|
14386
|
+
}, children: t("events.seeMoreDates") }))] }));
|
|
14387
|
+
})(), u$2("div", { style: { marginBottom: "16px" }, children: [u$2("div", { className: "event-type-price", style: {
|
|
14388
|
+
fontWeight: 700,
|
|
14389
|
+
color: "var(--bw-text-color)",
|
|
14390
|
+
fontFamily: "var(--bw-font-family)",
|
|
14391
|
+
textAlign: "right",
|
|
14392
|
+
}, children: u$2("span", { children: formatDurationInfo(eventType.durationInfo, t) }) }), u$2("div", { className: "event-type-price", style: {
|
|
14393
|
+
fontSize: "clamp(1.72rem, 4vw, 32px)",
|
|
14394
|
+
fontWeight: 700,
|
|
14395
|
+
color: "var(--bw-text-color)",
|
|
14396
|
+
fontFamily: "var(--bw-font-family)",
|
|
14397
|
+
textAlign: "right",
|
|
14398
|
+
}, children: u$2("span", { children: [t("common.from"), " ", formatCurrency(eventType.minPrice)] }) })] }), u$2("div", { style: {
|
|
14213
14399
|
display: "flex",
|
|
14214
14400
|
justifyContent: "flex-end",
|
|
14215
14401
|
alignItems: "center",
|
|
@@ -14267,7 +14453,7 @@
|
|
|
14267
14453
|
fontFamily: "var(--bw-font-family)",
|
|
14268
14454
|
boxShadow: "var(--bw-shadow-md)",
|
|
14269
14455
|
}, children: t("events.soldOut") }) }))] }, eventType.id));
|
|
14270
|
-
}) }) })), u$2(EventTypeDetailsDialog, { isOpen: detailsDialogOpen, onClose: handleCloseDetails, eventType: selectedEventTypeForDetails, onEventTypeSelect: onEventTypeSelect })] }));
|
|
14456
|
+
}) }) })), u$2(PaymentLogosStrip, {}), u$2(EventTypeDetailsDialog, { isOpen: detailsDialogOpen, onClose: handleCloseDetails, eventType: selectedEventTypeForDetails, onEventTypeSelect: onEventTypeSelect })] }));
|
|
14271
14457
|
}
|
|
14272
14458
|
|
|
14273
14459
|
const getAllocationBadgeInfo = (availableSpots, maxParticipants, t) => {
|
|
@@ -14394,7 +14580,7 @@
|
|
|
14394
14580
|
boxShadow: displayInfo ? "0 2px 4px rgba(0, 0, 0, 0.2)" : "none",
|
|
14395
14581
|
}, children: formatCurrency(price) }));
|
|
14396
14582
|
};
|
|
14397
|
-
function EventInstanceSelection({ eventInstances, selectedEventType, onEventInstanceSelect, onBackToEventTypes, isOpen, onClose, isLoadingEventInstances = false, isLoadingEventDetails = false, }) {
|
|
14583
|
+
function EventInstanceSelection({ eventInstances, selectedEventType, onEventInstanceSelect, onBackToEventTypes, isOpen, onClose, isLoadingEventInstances = false, isLoadingEventDetails = false, hasUpsellsStep = false, }) {
|
|
14398
14584
|
const t = useTranslations();
|
|
14399
14585
|
const { locale } = useLocale();
|
|
14400
14586
|
const timezone = useTimezone();
|
|
@@ -14460,88 +14646,88 @@
|
|
|
14460
14646
|
const footerNav = (u$2("button", { type: "button", onClick: handleClose, style: mergeStyles(buttonStyles.secondary, buttonStyles.fullWidth), children: t("common.back") }));
|
|
14461
14647
|
// Show loading state first if we're loading event instances
|
|
14462
14648
|
if (isLoadingEventInstances) {
|
|
14463
|
-
return (u$2(Sidebar, { isOpen: isOpen, onClose: handleClose, title: `${selectedEventType?.name}`, footer: footerNav, children: u$2("div", { style: { padding: "24px" }, children: u$2("div", { style: { display: "flex", flexDirection: "column", gap: "20px" }, children: Array.from({ length: 3 }).map((_, idx) => (u$2("div", { className: "skeleton-shimmer", style: {
|
|
14464
|
-
|
|
14465
|
-
|
|
14466
|
-
|
|
14467
|
-
|
|
14468
|
-
|
|
14469
|
-
|
|
14470
|
-
|
|
14471
|
-
|
|
14472
|
-
padding: "16px 20px",
|
|
14473
|
-
cursor: "pointer",
|
|
14474
|
-
borderBottom: "1px solid var(--bw-border-color)",
|
|
14475
|
-
}, children: [u$2("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [u$2("div", { style: {
|
|
14476
|
-
width: "80px",
|
|
14477
|
-
height: "20px",
|
|
14478
|
-
backgroundColor: "var(--bw-border-color)",
|
|
14479
|
-
borderRadius: "var(--bw-border-radius-small)",
|
|
14480
|
-
} }), u$2("div", { style: {
|
|
14481
|
-
width: "16px",
|
|
14482
|
-
height: "16px",
|
|
14483
|
-
backgroundColor: "var(--bw-border-color)",
|
|
14484
|
-
borderRadius: "var(--bw-border-radius-small)",
|
|
14485
|
-
} })] }), u$2("div", { style: {
|
|
14486
|
-
width: "70px",
|
|
14487
|
-
height: "16px",
|
|
14488
|
-
backgroundColor: "var(--bw-highlight-color)",
|
|
14489
|
-
opacity: 0.3,
|
|
14490
|
-
borderRadius: "var(--bw-border-radius-small)",
|
|
14491
|
-
} })] }), u$2("div", { style: {
|
|
14492
|
-
display: "flex",
|
|
14493
|
-
flexDirection: "column",
|
|
14494
|
-
gap: "12px",
|
|
14495
|
-
paddingTop: "12px",
|
|
14496
|
-
padding: "12px 20px 20px 20px",
|
|
14497
|
-
}, children: Array.from({ length: 2 }).map((_, eventIdx) => (u$2("div", { style: {
|
|
14498
|
-
position: "relative",
|
|
14499
|
-
border: "1px solid var(--bw-border-color)",
|
|
14500
|
-
backgroundColor: "var(--bw-surface-color)",
|
|
14501
|
-
borderRadius: "var(--bw-border-radius)",
|
|
14649
|
+
return (u$2(Sidebar, { isOpen: isOpen, onClose: handleClose, title: `${selectedEventType?.name}`, footer: footerNav, children: u$2("div", { style: { padding: "24px" }, children: [u$2(FlowProgress, { currentStep: "date", hasUpsellsStep: hasUpsellsStep }), u$2("div", { style: { display: "flex", flexDirection: "column", gap: "20px" }, children: Array.from({ length: 3 }).map((_, idx) => (u$2("div", { className: "skeleton-shimmer", style: {
|
|
14650
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
14651
|
+
border: "1px solid var(--bw-border-color)",
|
|
14652
|
+
borderRadius: "var(--bw-border-radius)",
|
|
14653
|
+
overflow: "hidden",
|
|
14654
|
+
}, children: [u$2("div", { style: {
|
|
14655
|
+
display: "flex",
|
|
14656
|
+
justifyContent: "space-between",
|
|
14657
|
+
alignItems: "center",
|
|
14502
14658
|
padding: "16px 20px",
|
|
14503
|
-
|
|
14504
|
-
|
|
14505
|
-
|
|
14506
|
-
|
|
14507
|
-
|
|
14508
|
-
alignItems: "flex-start",
|
|
14509
|
-
gap: "12px",
|
|
14510
|
-
marginBottom: "4px",
|
|
14511
|
-
}, children: [u$2("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [u$2("div", { style: {
|
|
14512
|
-
width: "40px",
|
|
14513
|
-
height: "40px",
|
|
14514
|
-
backgroundColor: "var(--bw-background-color)",
|
|
14515
|
-
border: "1px solid var(--bw-border-color)",
|
|
14516
|
-
borderTopWidth: "4px",
|
|
14517
|
-
borderRadius: "var(--bw-border-radius-small)",
|
|
14518
|
-
} }), u$2("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [u$2("div", { style: {
|
|
14519
|
-
width: "80px",
|
|
14520
|
-
height: "16px",
|
|
14521
|
-
backgroundColor: "var(--bw-border-color)",
|
|
14522
|
-
borderRadius: "var(--bw-border-radius)",
|
|
14523
|
-
} }), u$2("div", { style: {
|
|
14524
|
-
width: "60px",
|
|
14525
|
-
height: "14px",
|
|
14526
|
-
backgroundColor: "var(--bw-border-color)",
|
|
14527
|
-
borderRadius: "var(--bw-border-radius)",
|
|
14528
|
-
} })] })] }), u$2("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-end" }, children: u$2("div", { style: {
|
|
14529
|
-
width: "70px",
|
|
14530
|
-
height: "20px",
|
|
14531
|
-
backgroundColor: "var(--bw-highlight-color)",
|
|
14532
|
-
opacity: 0.3,
|
|
14533
|
-
borderRadius: "var(--bw-border-radius)",
|
|
14534
|
-
} }) })] }), u$2("div", { style: { display: "flex", alignItems: "center", gap: "8px", marginBottom: "4px" }, children: [u$2("div", { style: {
|
|
14535
|
-
width: "120px",
|
|
14536
|
-
height: "16px",
|
|
14659
|
+
cursor: "pointer",
|
|
14660
|
+
borderBottom: "1px solid var(--bw-border-color)",
|
|
14661
|
+
}, children: [u$2("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [u$2("div", { style: {
|
|
14662
|
+
width: "80px",
|
|
14663
|
+
height: "20px",
|
|
14537
14664
|
backgroundColor: "var(--bw-border-color)",
|
|
14538
|
-
borderRadius: "var(--bw-border-radius)",
|
|
14665
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
14539
14666
|
} }), u$2("div", { style: {
|
|
14540
|
-
width: "
|
|
14541
|
-
height: "
|
|
14667
|
+
width: "16px",
|
|
14668
|
+
height: "16px",
|
|
14542
14669
|
backgroundColor: "var(--bw-border-color)",
|
|
14543
|
-
borderRadius: "
|
|
14544
|
-
} })] })
|
|
14670
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
14671
|
+
} })] }), u$2("div", { style: {
|
|
14672
|
+
width: "70px",
|
|
14673
|
+
height: "16px",
|
|
14674
|
+
backgroundColor: "var(--bw-highlight-color)",
|
|
14675
|
+
opacity: 0.3,
|
|
14676
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
14677
|
+
} })] }), u$2("div", { style: {
|
|
14678
|
+
display: "flex",
|
|
14679
|
+
flexDirection: "column",
|
|
14680
|
+
gap: "12px",
|
|
14681
|
+
paddingTop: "12px",
|
|
14682
|
+
padding: "12px 20px 20px 20px",
|
|
14683
|
+
}, children: Array.from({ length: 2 }).map((_, eventIdx) => (u$2("div", { style: {
|
|
14684
|
+
position: "relative",
|
|
14685
|
+
border: "1px solid var(--bw-border-color)",
|
|
14686
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
14687
|
+
borderRadius: "var(--bw-border-radius)",
|
|
14688
|
+
padding: "16px 20px",
|
|
14689
|
+
fontFamily: "var(--bw-font-family)",
|
|
14690
|
+
}, children: [u$2("div", { style: {
|
|
14691
|
+
display: "flex",
|
|
14692
|
+
justifyContent: "space-between",
|
|
14693
|
+
width: "100%",
|
|
14694
|
+
alignItems: "flex-start",
|
|
14695
|
+
gap: "12px",
|
|
14696
|
+
marginBottom: "4px",
|
|
14697
|
+
}, children: [u$2("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [u$2("div", { style: {
|
|
14698
|
+
width: "40px",
|
|
14699
|
+
height: "40px",
|
|
14700
|
+
backgroundColor: "var(--bw-background-color)",
|
|
14701
|
+
border: "1px solid var(--bw-border-color)",
|
|
14702
|
+
borderTopWidth: "4px",
|
|
14703
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
14704
|
+
} }), u$2("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [u$2("div", { style: {
|
|
14705
|
+
width: "80px",
|
|
14706
|
+
height: "16px",
|
|
14707
|
+
backgroundColor: "var(--bw-border-color)",
|
|
14708
|
+
borderRadius: "var(--bw-border-radius)",
|
|
14709
|
+
} }), u$2("div", { style: {
|
|
14710
|
+
width: "60px",
|
|
14711
|
+
height: "14px",
|
|
14712
|
+
backgroundColor: "var(--bw-border-color)",
|
|
14713
|
+
borderRadius: "var(--bw-border-radius)",
|
|
14714
|
+
} })] })] }), u$2("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-end" }, children: u$2("div", { style: {
|
|
14715
|
+
width: "70px",
|
|
14716
|
+
height: "20px",
|
|
14717
|
+
backgroundColor: "var(--bw-highlight-color)",
|
|
14718
|
+
opacity: 0.3,
|
|
14719
|
+
borderRadius: "var(--bw-border-radius)",
|
|
14720
|
+
} }) })] }), u$2("div", { style: { display: "flex", alignItems: "center", gap: "8px", marginBottom: "4px" }, children: [u$2("div", { style: {
|
|
14721
|
+
width: "120px",
|
|
14722
|
+
height: "16px",
|
|
14723
|
+
backgroundColor: "var(--bw-border-color)",
|
|
14724
|
+
borderRadius: "var(--bw-border-radius)",
|
|
14725
|
+
} }), u$2("div", { style: {
|
|
14726
|
+
width: "50px",
|
|
14727
|
+
height: "20px",
|
|
14728
|
+
backgroundColor: "var(--bw-border-color)",
|
|
14729
|
+
borderRadius: "16px",
|
|
14730
|
+
} })] })] }, eventIdx))) })] }, idx))) })] }) }));
|
|
14545
14731
|
}
|
|
14546
14732
|
// Show empty state only if not loading and no event instances
|
|
14547
14733
|
if (eventInstances.length === 0) {
|
|
@@ -14560,116 +14746,116 @@
|
|
|
14560
14746
|
fontFamily: "var(--bw-font-family)",
|
|
14561
14747
|
}, children: t("instances.noAvailable") }), u$2("p", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: t("instances.noAvailableMessage") })] }) }) }));
|
|
14562
14748
|
}
|
|
14563
|
-
return (u$2(Sidebar, { isOpen: isOpen, onClose: handleClose, title: `${selectedEventType?.name}`, footer: footerNav, children: u$2("div", { style: { padding: "20px 10px" }, children: u$2("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: monthYearGroups.map(({ key, label, events, minPrice, year }, idx) => {
|
|
14564
|
-
|
|
14565
|
-
|
|
14566
|
-
|
|
14567
|
-
|
|
14568
|
-
|
|
14569
|
-
|
|
14570
|
-
|
|
14571
|
-
|
|
14572
|
-
|
|
14573
|
-
|
|
14574
|
-
|
|
14575
|
-
|
|
14576
|
-
|
|
14577
|
-
|
|
14578
|
-
|
|
14579
|
-
|
|
14580
|
-
|
|
14581
|
-
|
|
14582
|
-
|
|
14583
|
-
|
|
14584
|
-
|
|
14585
|
-
|
|
14586
|
-
|
|
14587
|
-
|
|
14588
|
-
|
|
14589
|
-
|
|
14590
|
-
|
|
14591
|
-
|
|
14592
|
-
|
|
14593
|
-
|
|
14594
|
-
|
|
14595
|
-
|
|
14596
|
-
|
|
14597
|
-
|
|
14598
|
-
|
|
14599
|
-
|
|
14600
|
-
|
|
14601
|
-
|
|
14602
|
-
|
|
14603
|
-
|
|
14604
|
-
|
|
14605
|
-
|
|
14606
|
-
|
|
14607
|
-
|
|
14608
|
-
|
|
14609
|
-
|
|
14610
|
-
|
|
14611
|
-
|
|
14612
|
-
|
|
14613
|
-
|
|
14614
|
-
|
|
14615
|
-
|
|
14616
|
-
|
|
14617
|
-
|
|
14618
|
-
|
|
14619
|
-
|
|
14620
|
-
|
|
14621
|
-
|
|
14622
|
-
|
|
14623
|
-
|
|
14624
|
-
|
|
14625
|
-
|
|
14626
|
-
|
|
14627
|
-
|
|
14628
|
-
|
|
14629
|
-
|
|
14630
|
-
|
|
14631
|
-
|
|
14632
|
-
|
|
14633
|
-
|
|
14634
|
-
|
|
14635
|
-
|
|
14636
|
-
|
|
14637
|
-
|
|
14638
|
-
|
|
14639
|
-
|
|
14640
|
-
|
|
14641
|
-
|
|
14642
|
-
|
|
14643
|
-
|
|
14644
|
-
|
|
14645
|
-
|
|
14646
|
-
|
|
14647
|
-
|
|
14648
|
-
|
|
14649
|
-
|
|
14650
|
-
|
|
14651
|
-
|
|
14652
|
-
|
|
14653
|
-
|
|
14654
|
-
|
|
14655
|
-
|
|
14656
|
-
|
|
14657
|
-
|
|
14658
|
-
|
|
14659
|
-
|
|
14660
|
-
|
|
14661
|
-
|
|
14662
|
-
|
|
14663
|
-
|
|
14664
|
-
|
|
14665
|
-
|
|
14666
|
-
|
|
14667
|
-
|
|
14668
|
-
|
|
14669
|
-
|
|
14670
|
-
|
|
14671
|
-
|
|
14672
|
-
|
|
14749
|
+
return (u$2(Sidebar, { isOpen: isOpen, onClose: handleClose, title: `${selectedEventType?.name}`, footer: footerNav, children: u$2("div", { style: { padding: "20px 10px" }, children: [u$2(FlowProgress, { currentStep: "date", hasUpsellsStep: hasUpsellsStep }), u$2("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: monthYearGroups.map(({ key, label, events, minPrice, year }, idx) => {
|
|
14750
|
+
const monthPriceDisplayInfo = getMonthPriceDisplayInfo(minPrice);
|
|
14751
|
+
return (u$2(k$3, { children: [idx > 0 && monthYearGroups[idx - 1].year !== year && (u$2("div", { style: { height: "1px", backgroundColor: "var(--bw-border-color)", margin: "4px 0" } })), u$2(Accordion, { title: label, priceInfo: u$2("div", { style: {
|
|
14752
|
+
fontSize: "16px",
|
|
14753
|
+
fontWeight: 500,
|
|
14754
|
+
marginLeft: "auto",
|
|
14755
|
+
padding: "4px 8px",
|
|
14756
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
14757
|
+
backgroundColor: monthPriceDisplayInfo
|
|
14758
|
+
? monthPriceDisplayInfo.backgroundColor
|
|
14759
|
+
: "#14532d",
|
|
14760
|
+
color: monthPriceDisplayInfo
|
|
14761
|
+
? monthPriceDisplayInfo.textColor
|
|
14762
|
+
: "#4ade80",
|
|
14763
|
+
boxShadow: monthPriceDisplayInfo
|
|
14764
|
+
? "0 2px 4px rgba(0, 0, 0, 0.2)"
|
|
14765
|
+
: undefined,
|
|
14766
|
+
}, children: `${t("common.from")} ${formatCurrency(minPrice)}` }), isOpen: openGroups.has(key), onToggle: () => toggleGroup(key), children: u$2("div", { style: { display: "flex", flexDirection: "column", gap: "12px", paddingTop: "12px" }, children: events.map((event) => {
|
|
14767
|
+
const availableSpots = event.maxParticipants - event.participantCount;
|
|
14768
|
+
const isFullyBooked = availableSpots === 0;
|
|
14769
|
+
const startDate = new Date(event.startTime);
|
|
14770
|
+
const isPastEvent = today.toISOString() >= startDate.toISOString();
|
|
14771
|
+
const isDisabled = isFullyBooked || isPastEvent || !event.bookingOpen;
|
|
14772
|
+
return (u$2("div", { style: {
|
|
14773
|
+
position: "relative",
|
|
14774
|
+
border: "1px solid var(--bw-border-color)",
|
|
14775
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
14776
|
+
borderRadius: "var(--bw-border-radius)",
|
|
14777
|
+
padding: "16px 10px",
|
|
14778
|
+
transition: "all 0.2s ease",
|
|
14779
|
+
fontFamily: "var(--bw-font-family)",
|
|
14780
|
+
opacity: isDisabled ? 0.3 : 1,
|
|
14781
|
+
filter: isDisabled ? "grayscale(40%)" : "none",
|
|
14782
|
+
cursor: isDisabled ? "not-allowed" : "pointer",
|
|
14783
|
+
}, onClick: () => {
|
|
14784
|
+
if (!isDisabled) {
|
|
14785
|
+
handleEventInstanceSelect(event);
|
|
14786
|
+
}
|
|
14787
|
+
}, children: [selectedEventInstanceId === event.id && isLoadingEventDetails && (u$2("div", { style: {
|
|
14788
|
+
position: "absolute",
|
|
14789
|
+
inset: 0,
|
|
14790
|
+
backgroundColor: "rgba(15, 23, 42, 0.8)",
|
|
14791
|
+
borderRadius: "var(--bw-border-radius)",
|
|
14792
|
+
display: "flex",
|
|
14793
|
+
alignItems: "center",
|
|
14794
|
+
justifyContent: "center",
|
|
14795
|
+
}, children: u$2("div", { style: {
|
|
14796
|
+
width: "32px",
|
|
14797
|
+
height: "32px",
|
|
14798
|
+
color: "var(--bw-highlight-color)",
|
|
14799
|
+
opacity: 0.8,
|
|
14800
|
+
fontSize: "32px",
|
|
14801
|
+
}, children: spinner() }) })), u$2(SpecialPriceBadge, { price: event.price, yearPrices: yearPrices, t: t }), u$2(AllocationBadge, { availableSpots: availableSpots, maxParticipants: event.maxParticipants, t: t }), u$2("div", { style: {
|
|
14802
|
+
display: "flex",
|
|
14803
|
+
justifyContent: "space-between",
|
|
14804
|
+
width: "100%",
|
|
14805
|
+
alignItems: "flex-start",
|
|
14806
|
+
gap: "12px",
|
|
14807
|
+
marginBottom: "4px",
|
|
14808
|
+
}, children: [u$2("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [u$2("div", { style: {
|
|
14809
|
+
fontSize: "16px",
|
|
14810
|
+
transition: "all 0.2s ease",
|
|
14811
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
14812
|
+
borderTop: "4px solid var(--bw-border-color)",
|
|
14813
|
+
border: "1px solid var(--bw-border-color)",
|
|
14814
|
+
width: "40px",
|
|
14815
|
+
height: "40px",
|
|
14816
|
+
display: "flex",
|
|
14817
|
+
alignItems: "center",
|
|
14818
|
+
justifyContent: "center",
|
|
14819
|
+
fontWeight: 700,
|
|
14820
|
+
color: "var(--bw-text-color)",
|
|
14821
|
+
backgroundColor: "var(--bw-background-color)",
|
|
14822
|
+
}, children: startDate.getDate() }), u$2("div", { style: {
|
|
14823
|
+
fontSize: "16px",
|
|
14824
|
+
color: "var(--bw-text-color)",
|
|
14825
|
+
display: "flex",
|
|
14826
|
+
flexDirection: "column",
|
|
14827
|
+
alignItems: "flex-start",
|
|
14828
|
+
justifyContent: "flex-start",
|
|
14829
|
+
lineHeight: 1.25,
|
|
14830
|
+
}, children: [u$2("div", { children: [u$2("span", { style: { fontWeight: 600, marginBottom: "2px", textTransform: "capitalize" }, children: formatWeekday(event.startTime, timezone, locale) }), formatWeekday(event.startTime, timezone, locale) !==
|
|
14831
|
+
formatWeekday(event.endTime, timezone, locale) && (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: formatWeekday(event.startTime, timezone, locale) ===
|
|
14832
|
+
formatWeekday(event.endTime, timezone, locale) ? (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: {
|
|
14833
|
+
fontSize: "12px",
|
|
14834
|
+
fontWeight: 400,
|
|
14835
|
+
color: "var(--bw-text-muted)",
|
|
14836
|
+
marginLeft: "6px",
|
|
14837
|
+
backgroundColor: "rgba(0, 0, 0, 0.05)",
|
|
14838
|
+
whiteSpace: "nowrap",
|
|
14839
|
+
padding: "2px 6px",
|
|
14840
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
14841
|
+
}, children: [event.durationDays, " ", event.durationDays > 1 ? t("common.days") : t("common.day")] })] }), u$2("div", { style: {
|
|
14842
|
+
textAlign: "right",
|
|
14843
|
+
display: "flex",
|
|
14844
|
+
flexDirection: "column",
|
|
14845
|
+
alignItems: "flex-end",
|
|
14846
|
+
}, children: u$2(PriceDisplay, { price: event.price, yearPrices: yearPrices, t: t }) })] }), event.name !== selectedEventType?.name && (u$2("h4", { style: {
|
|
14847
|
+
fontSize: "16px",
|
|
14848
|
+
fontWeight: 600,
|
|
14849
|
+
color: "var(--bw-text-color)",
|
|
14850
|
+
lineHeight: 1.25,
|
|
14851
|
+
margin: "0 0 2px 0",
|
|
14852
|
+
display: "flex",
|
|
14853
|
+
alignItems: "center",
|
|
14854
|
+
gap: "8px",
|
|
14855
|
+
maxWidth: "230px",
|
|
14856
|
+
}, children: event.name }))] }, event.id));
|
|
14857
|
+
}) }) })] }, key));
|
|
14858
|
+
}) })] }) }));
|
|
14673
14859
|
}
|
|
14674
14860
|
|
|
14675
14861
|
function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText, showAllButton, isLoadingEventDetails = false, isLoadingShowAll = false, isLoading = false, }) {
|
|
@@ -14677,6 +14863,47 @@
|
|
|
14677
14863
|
const { locale } = useLocale();
|
|
14678
14864
|
const timezone = useTimezone();
|
|
14679
14865
|
const [selectedEventInstanceId, setSelectedEventInstanceId] = d$1(null);
|
|
14866
|
+
const normalizedShowAllButtonText = showAllButtonText.trim() || t("nextEvents.showAll");
|
|
14867
|
+
function InfoBadge({ text }) {
|
|
14868
|
+
const [open, setOpen] = d$1(false);
|
|
14869
|
+
return (u$2("span", { onClick: (event) => {
|
|
14870
|
+
event.stopPropagation();
|
|
14871
|
+
setOpen((current) => !current);
|
|
14872
|
+
}, style: {
|
|
14873
|
+
position: "relative",
|
|
14874
|
+
display: "inline-flex",
|
|
14875
|
+
alignItems: "center",
|
|
14876
|
+
justifyContent: "center",
|
|
14877
|
+
width: "16px",
|
|
14878
|
+
height: "16px",
|
|
14879
|
+
borderRadius: "50%",
|
|
14880
|
+
border: "1px solid var(--bw-highlight-color)",
|
|
14881
|
+
color: "var(--bw-highlight-color)",
|
|
14882
|
+
fontSize: "9px",
|
|
14883
|
+
fontWeight: 700,
|
|
14884
|
+
cursor: "pointer",
|
|
14885
|
+
flexShrink: 0,
|
|
14886
|
+
userSelect: "none",
|
|
14887
|
+
}, children: ["i", open && (u$2("span", { style: {
|
|
14888
|
+
position: "absolute",
|
|
14889
|
+
bottom: "calc(100% + 6px)",
|
|
14890
|
+
right: 0,
|
|
14891
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
14892
|
+
border: "1px solid var(--bw-border-color)",
|
|
14893
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
14894
|
+
boxShadow: "var(--bw-shadow-md)",
|
|
14895
|
+
padding: "6px 10px",
|
|
14896
|
+
fontSize: "13px",
|
|
14897
|
+
color: "var(--bw-text-color)",
|
|
14898
|
+
fontWeight: 400,
|
|
14899
|
+
whiteSpace: "normal",
|
|
14900
|
+
width: "180px",
|
|
14901
|
+
lineHeight: 1.4,
|
|
14902
|
+
zIndex: 100,
|
|
14903
|
+
textAlign: "left",
|
|
14904
|
+
pointerEvents: "none",
|
|
14905
|
+
}, children: text }))] }));
|
|
14906
|
+
}
|
|
14680
14907
|
const handleEventSelect = (eventInstanceId) => {
|
|
14681
14908
|
setSelectedEventInstanceId(eventInstanceId);
|
|
14682
14909
|
onEventSelect(eventInstanceId);
|
|
@@ -14742,20 +14969,9 @@
|
|
|
14742
14969
|
return (u$2("div", { style: {
|
|
14743
14970
|
maxWidth: "500px",
|
|
14744
14971
|
margin: "0 auto",
|
|
14745
|
-
padding: "16px",
|
|
14972
|
+
padding: "12px 16px",
|
|
14746
14973
|
fontFamily: "var(--bw-font-family)",
|
|
14747
|
-
}, children: [u$2("div", { style: {
|
|
14748
|
-
fontWeight: 600,
|
|
14749
|
-
margin: "0 0 8px 0",
|
|
14750
|
-
fontSize: "18px",
|
|
14751
|
-
color: "var(--bw-text-color)",
|
|
14752
|
-
fontFamily: "var(--bw-font-family)",
|
|
14753
|
-
}, children: t("nextEvents.title") }), u$2("p", { style: {
|
|
14754
|
-
margin: 0,
|
|
14755
|
-
fontSize: "16px",
|
|
14756
|
-
color: "var(--bw-text-muted)",
|
|
14757
|
-
fontFamily: "var(--bw-font-family)",
|
|
14758
|
-
}, 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: "4px", marginBottom: "10px" }, children: events.map((event) => {
|
|
14759
14975
|
const availableSpots = event.maxParticipants - event.participantCount;
|
|
14760
14976
|
const isFullyBooked = availableSpots === 0;
|
|
14761
14977
|
const startDate = new Date(event.startTime);
|
|
@@ -14779,11 +14995,10 @@
|
|
|
14779
14995
|
const isDisabled = isFullyBooked || isPastEvent || !event.bookingOpen;
|
|
14780
14996
|
return (u$2("div", { style: {
|
|
14781
14997
|
position: "relative",
|
|
14782
|
-
|
|
14783
|
-
|
|
14784
|
-
padding: "8px 10px",
|
|
14998
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
14999
|
+
padding: "0 4px",
|
|
14785
15000
|
transition: "all 0.2s ease",
|
|
14786
|
-
border:
|
|
15001
|
+
border: "1px solid transparent",
|
|
14787
15002
|
fontFamily: "var(--bw-font-family)",
|
|
14788
15003
|
opacity: isDisabled ? 0.3 : 1,
|
|
14789
15004
|
filter: isDisabled ? "grayscale(100%)" : "none",
|
|
@@ -14792,6 +15007,14 @@
|
|
|
14792
15007
|
if (!isDisabled) {
|
|
14793
15008
|
handleEventSelect(event.id);
|
|
14794
15009
|
}
|
|
15010
|
+
}, onMouseEnter: (hoverEvent) => {
|
|
15011
|
+
if (!isDisabled) {
|
|
15012
|
+
hoverEvent.currentTarget.style.backgroundColor = "var(--bw-surface-color)";
|
|
15013
|
+
hoverEvent.currentTarget.style.borderColor = getAvailabilityColor();
|
|
15014
|
+
}
|
|
15015
|
+
}, onMouseLeave: (hoverEvent) => {
|
|
15016
|
+
hoverEvent.currentTarget.style.backgroundColor = "transparent";
|
|
15017
|
+
hoverEvent.currentTarget.style.borderColor = "transparent";
|
|
14795
15018
|
}, children: [selectedEventInstanceId === event.id && isLoadingEventDetails && (u$2("div", { style: {
|
|
14796
15019
|
position: "absolute",
|
|
14797
15020
|
inset: 0,
|
|
@@ -14807,80 +15030,41 @@
|
|
|
14807
15030
|
fontSize: "32px",
|
|
14808
15031
|
animation: "spin 1s linear infinite",
|
|
14809
15032
|
}, children: "\u27F3" }) })), u$2("div", { style: {
|
|
14810
|
-
|
|
14811
|
-
|
|
14812
|
-
|
|
14813
|
-
alignItems: "flex-start",
|
|
14814
|
-
gap: "12px",
|
|
14815
|
-
marginBottom: "4px",
|
|
14816
|
-
}, children: [u$2("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [u$2("div", { style: {
|
|
14817
|
-
display: "flex",
|
|
14818
|
-
alignItems: "center",
|
|
14819
|
-
justifyContent: "center",
|
|
14820
|
-
fontWeight: 700,
|
|
14821
|
-
fontSize: "16px",
|
|
14822
|
-
borderRadius: "var(--bw-border-radius-small)",
|
|
14823
|
-
width: "40px",
|
|
14824
|
-
height: "40px",
|
|
14825
|
-
color: "var(--bw-text-color)",
|
|
14826
|
-
backgroundColor: "var(--bw-background-color)",
|
|
14827
|
-
border: "1px solid var(--bw-border-color)",
|
|
14828
|
-
borderTopWidth: "4px",
|
|
14829
|
-
borderTopColor: getAvailabilityColor(),
|
|
14830
|
-
transition: "all 0.2s ease",
|
|
14831
|
-
}, children: startDate.getDate() }), u$2("div", { style: {
|
|
14832
|
-
display: "flex",
|
|
14833
|
-
flexDirection: "column",
|
|
14834
|
-
alignItems: "flex-start",
|
|
14835
|
-
justifyContent: "flex-start",
|
|
14836
|
-
fontSize: "16px",
|
|
14837
|
-
color: "var(--bw-text-color)",
|
|
14838
|
-
lineHeight: 1.25,
|
|
14839
|
-
}, children: [u$2("span", { style: { fontWeight: 600, marginBottom: "2px", textTransform: "capitalize" }, children: formatWeekday(event.startTime, timezone, locale) }), u$2("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: formatTime(event.startTime, timezone, locale) })] })] }), u$2("div", { style: {
|
|
14840
|
-
display: "flex",
|
|
14841
|
-
flexDirection: "column",
|
|
14842
|
-
alignItems: "flex-end",
|
|
14843
|
-
textAlign: "right",
|
|
14844
|
-
}, children: [u$2("div", { style: {
|
|
14845
|
-
fontWeight: 700,
|
|
14846
|
-
color: "var(--bw-highlight-color)",
|
|
14847
|
-
fontSize: "18px",
|
|
14848
|
-
}, 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: {
|
|
14849
|
-
display: "flex",
|
|
15033
|
+
minHeight: "32px",
|
|
15034
|
+
display: "grid",
|
|
15035
|
+
gridTemplateColumns: "1fr auto 20px",
|
|
14850
15036
|
alignItems: "center",
|
|
14851
|
-
fontWeight: 600,
|
|
14852
|
-
margin: "0 0 2px 0",
|
|
14853
|
-
fontSize: "16px",
|
|
14854
|
-
color: "var(--bw-text-color)",
|
|
14855
|
-
lineHeight: 1.25,
|
|
14856
15037
|
gap: "8px",
|
|
14857
|
-
|
|
14858
|
-
|
|
14859
|
-
fontWeight: 400,
|
|
14860
|
-
color: "var(--bw-text-muted)",
|
|
14861
|
-
marginLeft: "6px",
|
|
14862
|
-
backgroundColor: "rgba(0, 0, 0, 0.05)",
|
|
14863
|
-
borderRadius: "16px",
|
|
14864
|
-
padding: "2px 8px",
|
|
14865
|
-
}, children: [event.durationDays, " ", event.durationDays > 1 ? t("common.days") : t("common.day")] })] }), event.notes && (u$2("p", { style: {
|
|
14866
|
-
margin: "8px 0 0 0",
|
|
14867
|
-
fontSize: "12px",
|
|
15038
|
+
width: "100%",
|
|
15039
|
+
fontSize: "13px",
|
|
14868
15040
|
color: "var(--bw-text-muted)",
|
|
14869
|
-
|
|
14870
|
-
|
|
14871
|
-
|
|
14872
|
-
|
|
14873
|
-
|
|
14874
|
-
|
|
15041
|
+
}, children: [u$2("span", { style: {
|
|
15042
|
+
whiteSpace: "nowrap",
|
|
15043
|
+
display: "flex",
|
|
15044
|
+
alignItems: "center",
|
|
15045
|
+
gap: "3px",
|
|
15046
|
+
overflow: "hidden",
|
|
15047
|
+
textOverflow: "ellipsis",
|
|
15048
|
+
textTransform: "capitalize",
|
|
15049
|
+
}, children: [formatWeekday(event.startTime, timezone, locale), " ", formatDate(event.startTime, timezone, locale)] }), u$2("span", { style: {
|
|
15050
|
+
display: "flex",
|
|
15051
|
+
alignItems: "center",
|
|
15052
|
+
gap: "4px",
|
|
15053
|
+
whiteSpace: "nowrap",
|
|
15054
|
+
fontWeight: 700,
|
|
15055
|
+
color: "var(--bw-text-color)",
|
|
15056
|
+
}, children: event.price !== null ? formatCurrency(event.price) : t("nextEvents.priceOnRequest") }), event.notes ? u$2(InfoBadge, { text: event.notes }) : u$2("span", {})] })] }, event.id));
|
|
14875
15057
|
}) }), showAllButton && (u$2("div", { style: { textAlign: "center" }, children: u$2("button", { type: "button", disabled: isLoadingShowAll, style: {
|
|
14876
|
-
|
|
15058
|
+
display: "inline-flex",
|
|
15059
|
+
alignItems: "center",
|
|
15060
|
+
justifyContent: "center",
|
|
14877
15061
|
backgroundColor: "var(--bw-surface-color)",
|
|
14878
15062
|
color: "var(--bw-highlight-color)",
|
|
14879
15063
|
border: "1px solid var(--bw-highlight-color)",
|
|
14880
|
-
padding: "
|
|
14881
|
-
borderRadius: "var(--bw-border-radius)",
|
|
14882
|
-
fontSize: "
|
|
14883
|
-
fontWeight:
|
|
15064
|
+
padding: "6px 10px",
|
|
15065
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
15066
|
+
fontSize: "13px",
|
|
15067
|
+
fontWeight: 600,
|
|
14884
15068
|
fontFamily: "var(--bw-font-family)",
|
|
14885
15069
|
transition: "all 0.2s ease",
|
|
14886
15070
|
cursor: isLoadingShowAll ? "not-allowed" : "pointer",
|
|
@@ -14891,7 +15075,7 @@
|
|
|
14891
15075
|
color: "var(--bw-highlight-color)",
|
|
14892
15076
|
fontSize: "16px",
|
|
14893
15077
|
animation: "spin 1s linear infinite",
|
|
14894
|
-
}, children: "\u27F3" }), t("common.loading")] })) : (
|
|
15078
|
+
}, children: "\u27F3" }), t("common.loading")] })) : (normalizedShowAllButtonText) }) }))] }));
|
|
14895
15079
|
}
|
|
14896
15080
|
|
|
14897
15081
|
function SpecialsView({ specials, onEventSelect, isLoading = false, showSavingsAmount = true, showSavingsPercent = false, emptyStateText, isLoadingEventDetails = false, }) {
|
|
@@ -15528,7 +15712,7 @@
|
|
|
15528
15712
|
const isSelected = (upsellId) => selectedUpsells.some((s) => s.upsellPackageId === upsellId);
|
|
15529
15713
|
const selectedCount = selectedUpsells.length;
|
|
15530
15714
|
const footerContent = (u$2(k$3, { children: [u$2("button", { type: "button", onClick: onBack, style: mergeStyles(buttonStyles.secondary, buttonStyles.fullWidth), className: buttonClassName, children: t("common.back") }), u$2("button", { type: "button", onClick: onContinue, style: mergeStyles(buttonStyles.primary, buttonStyles.fullWidth), className: buttonClassName, children: selectedCount === 0 ? t("button.continueWithout") : t("button.continue") })] }));
|
|
15531
|
-
return (u$2(Sidebar, { isOpen: isOpen, onClose: onClose, title: t("upsells.title"), footer: footerContent, children: u$2("div", { style: { display: "flex", flexDirection: "column", height: "100%", padding: "16px 16px" }, children: [isLoading && (u$2("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", gap: "12px", padding: "40px 20px", ...textStyles.muted }, children: [spinner(), u$2("span", { children: t("upsells.loading") })] })), !isLoading && upsells.length === 0 && (u$2("div", { style: { textAlign: "center", padding: "40px 20px", ...textStyles.muted }, children: u$2("p", { children: t("upsells.noExtras") }) })), !isLoading && upsells.length > 0 && (u$2("div", { style: { display: "flex", flexDirection: "column", gap: "12px", flex: 1, overflowY: "auto", paddingBottom: "16px" }, children: upsells.map((upsell) => (u$2(UpsellCard, { upsell: upsell, isSelected: isSelected(upsell.id), participantCount: participantCount, onSelect: () => selectUpsell(upsell.id) }, upsell.id))) })), selectedCount > 0 && (u$2("div", { style: { display: "flex", alignItems: "center", marginTop: "16px", paddingBottom: "16px", paddingTop: "16px", borderTop: "1px solid var(--bw-border-color)", fontSize: "14px" }, children: u$2("span", { style: textStyles.muted, children: selectedCount === 1 ? t("upsells.selected", { count: selectedCount }) : t("upsells.selectedPlural", { count: selectedCount }) }) }))] }) }));
|
|
15715
|
+
return (u$2(Sidebar, { isOpen: isOpen, onClose: onClose, title: t("upsells.title"), footer: footerContent, children: u$2("div", { style: { display: "flex", flexDirection: "column", height: "100%", padding: "16px 16px" }, children: [u$2(FlowProgress, { currentStep: "upsells", hasUpsellsStep: true }), isLoading && (u$2("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", gap: "12px", padding: "40px 20px", ...textStyles.muted }, children: [spinner(), u$2("span", { children: t("upsells.loading") })] })), !isLoading && upsells.length === 0 && (u$2("div", { style: { textAlign: "center", padding: "40px 20px", ...textStyles.muted }, children: u$2("p", { children: t("upsells.noExtras") }) })), !isLoading && upsells.length > 0 && (u$2("div", { style: { display: "flex", flexDirection: "column", gap: "12px", flex: 1, overflowY: "auto", paddingBottom: "16px" }, children: upsells.map((upsell) => (u$2(UpsellCard, { upsell: upsell, isSelected: isSelected(upsell.id), participantCount: participantCount, onSelect: () => selectUpsell(upsell.id) }, upsell.id))) })), selectedCount > 0 && (u$2("div", { style: { display: "flex", alignItems: "center", marginTop: "16px", paddingBottom: "16px", paddingTop: "16px", borderTop: "1px solid var(--bw-border-color)", fontSize: "14px" }, children: u$2("span", { style: textStyles.muted, children: selectedCount === 1 ? t("upsells.selected", { count: selectedCount }) : t("upsells.selectedPlural", { count: selectedCount }) }) }))] }) }));
|
|
15532
15716
|
}
|
|
15533
15717
|
|
|
15534
15718
|
/**
|
|
@@ -15669,6 +15853,7 @@
|
|
|
15669
15853
|
const [bookingPersistedState, setBookingPersistedState] = d$1(null);
|
|
15670
15854
|
const [isLoadingUpsells, setIsLoadingUpsells] = d$1(false);
|
|
15671
15855
|
const [tempParticipantCount, setTempParticipantCount] = d$1(1); // Used during upsell step
|
|
15856
|
+
const hasUpsellsFlowStep = upsells.length > 0 || currentStep === "upsells";
|
|
15672
15857
|
// State for upcoming events (next-events view mode)
|
|
15673
15858
|
const [upcomingEvents, setUpcomingEvents] = d$1([]);
|
|
15674
15859
|
const [showingPreview, setShowingPreview] = d$1(true);
|
|
@@ -15795,6 +15980,7 @@
|
|
|
15795
15980
|
...(data.mollieProfileId ? { mollieProfileId: data.mollieProfileId } : {}),
|
|
15796
15981
|
...(data.mollieTestmode !== undefined ? { mollieTestmode: data.mollieTestmode } : {}),
|
|
15797
15982
|
roundPricesEnabled: data.roundPricesEnabled ?? true,
|
|
15983
|
+
widgetPaymentMode: data.widgetPaymentMode ?? "all",
|
|
15798
15984
|
});
|
|
15799
15985
|
}
|
|
15800
15986
|
}
|
|
@@ -16159,6 +16345,7 @@
|
|
|
16159
16345
|
mollieProfileId: data.mollieProfileId,
|
|
16160
16346
|
mollieTestmode: data.mollieTestmode,
|
|
16161
16347
|
roundPricesEnabled: data.roundPricesEnabled ?? true,
|
|
16348
|
+
widgetPaymentMode: data.widgetPaymentMode ?? "all",
|
|
16162
16349
|
});
|
|
16163
16350
|
}
|
|
16164
16351
|
if (data.stripePublishableKey) {
|
|
@@ -16219,6 +16406,7 @@
|
|
|
16219
16406
|
mollieProfileId: data.mollieProfileId,
|
|
16220
16407
|
mollieTestmode: data.mollieTestmode,
|
|
16221
16408
|
roundPricesEnabled: data.roundPricesEnabled ?? true,
|
|
16409
|
+
widgetPaymentMode: data.widgetPaymentMode ?? "all",
|
|
16222
16410
|
});
|
|
16223
16411
|
if (!stripePromise && data.stripePublishableKey) {
|
|
16224
16412
|
const stripeOptions = {
|
|
@@ -16727,7 +16915,7 @@
|
|
|
16727
16915
|
}, isOpen: currentStep === "eventInstances", onClose: () => {
|
|
16728
16916
|
setShowingPreview(true);
|
|
16729
16917
|
setCurrentStep("eventTypes");
|
|
16730
|
-
}, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), u$2(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
|
|
16918
|
+
}, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails, hasUpsellsStep: hasUpsellsFlowStep })), u$2(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
|
|
16731
16919
|
setIsSuccess(false);
|
|
16732
16920
|
setCurrentStep("eventTypes");
|
|
16733
16921
|
setShowingPreview(true);
|
|
@@ -16766,11 +16954,12 @@
|
|
|
16766
16954
|
setShouldRenderBookingForm(true);
|
|
16767
16955
|
}
|
|
16768
16956
|
else {
|
|
16957
|
+
setCurrentStep("eventInstances");
|
|
16769
16958
|
setSidebarOpen(true);
|
|
16770
16959
|
setShouldRenderInstanceSelection(true);
|
|
16771
16960
|
}
|
|
16772
16961
|
}, children: config.buttonText ||
|
|
16773
|
-
(isDirectInstanceMode ? t("button.bookNow") : t("button.
|
|
16962
|
+
(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: () => {
|
|
16774
16963
|
setIsSuccess(false);
|
|
16775
16964
|
setCurrentStep("eventTypes");
|
|
16776
16965
|
setSidebarOpen(false);
|
|
@@ -16831,7 +17020,7 @@
|
|
|
16831
17020
|
};
|
|
16832
17021
|
};
|
|
16833
17022
|
const backHandlers = getBackHandlers();
|
|
16834
|
-
return (u$2(StyleProvider, { config: config, children: [u$2("div", { ref: setWidgetContainerRef, children: [cardsView, shouldRenderInstanceSelection && (u$2(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: handleBackToEventTypes, isOpen: currentStep === "eventInstances", onClose: handleBackToEventTypes, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), 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: backHandlers.onClose, systemConfig: systemConfig, selectedUpsells: selectedUpsells, upsells: upsells, persistedState: bookingPersistedState, onPersistedStateChange: setBookingPersistedState })), u$2(BookingSuccessModal, { isOpen: isSuccess && !voucherPurchaseResult, onClose: () => {
|
|
17023
|
+
return (u$2(StyleProvider, { config: config, children: [u$2("div", { ref: setWidgetContainerRef, children: [cardsView, shouldRenderInstanceSelection && (u$2(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: handleBackToEventTypes, isOpen: currentStep === "eventInstances", onClose: handleBackToEventTypes, 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: backHandlers.onClose, systemConfig: systemConfig, selectedUpsells: selectedUpsells, upsells: upsells, persistedState: bookingPersistedState, onPersistedStateChange: setBookingPersistedState })), u$2(BookingSuccessModal, { isOpen: isSuccess && !voucherPurchaseResult, onClose: () => {
|
|
16835
17024
|
setIsSuccess(false);
|
|
16836
17025
|
setCurrentStep("eventTypes");
|
|
16837
17026
|
setSuccessPaymentId(null);
|