@riverbankcms/sdk 0.168.0 → 0.169.1
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/_dts/{BlocksIslandsHydrator-CiD_VVGM.d.ts → BlocksIslandsHydrator-DEhlJEwj.d.ts} +1 -1
- package/dist/_dts/{Page-Bj6VJRS5.d.ts → Page-BhCfStX1.d.ts} +7 -7
- package/dist/_dts/{SdkPreviewMode-ChpsnwDX.d.ts → SdkPreviewMode-DSYdsdmJ.d.ts} +2 -2
- package/dist/_dts/{client-C8mfUxrJ.d.ts → client-BZMn4Y99.d.ts} +39 -397
- package/dist/_dts/{content-types-_vXZyR4H.d.ts → content-types-EMK-E_r9.d.ts} +2 -2
- package/dist/_dts/{contracts-CJFfrVKU.d.ts → contracts-DjYsGY3B.d.ts} +4 -3
- package/dist/_dts/{footerPageOutline-CMegb23G.d.ts → footerPageOutline-BtYUi-m0.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata-D9YdAIMh.d.ts → generatePageMetadata-D_fNTi5r.d.ts} +2 -2
- package/dist/_dts/{index-BQXaZ7aY.d.ts → index-BR0i0c3G.d.ts} +4 -4
- package/dist/_dts/{index-Bpr-wT5k.d.ts → index-BV-qVnt7.d.ts} +2 -2
- package/dist/_dts/{index-C7_Rz8EY.d.ts → index-BYYhTQ_b.d.ts} +3 -3
- package/dist/_dts/{index-Vh8B9FSa.d.ts → index-BzguBJzR.d.ts} +1 -1
- package/dist/_dts/{index-Dgz6yhsy.d.ts → index-DgEwZ5WQ.d.ts} +1 -1
- package/dist/_dts/{index-Cx2BQlHL.d.ts → index-NaRauKDR.d.ts} +1 -1
- package/dist/_dts/{index-vR3p9Bu-.d.ts → index-QIbYMeI7.d.ts} +2 -2
- package/dist/_dts/{loadContent-dhWSgLeS.d.ts → loadContent-BmGH6NKl.d.ts} +7 -7
- package/dist/_dts/{request-BrYhNV9Z.d.ts → request-DssgRQSm.d.ts} +9558 -7863
- package/dist/_dts/{resolveBlockData-BfSHm8Ms.d.ts → resolveBlockData-5BqNxwL8.d.ts} +5 -5
- package/dist/_dts/{resolvePageContent-gZJ4i1wN.d.ts → resolvePageContent-DIuwuFA7.d.ts} +2 -2
- package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
- package/dist/_dts/sdk/src/client/types.d.ts +2 -2
- package/dist/_dts/sdk/src/client.d.ts +7 -7
- package/dist/_dts/sdk/src/config/index.d.ts +6 -6
- package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
- package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
- package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
- package/dist/_dts/sdk/src/data/types.d.ts +2 -2
- package/dist/_dts/sdk/src/index.d.ts +8 -8
- package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
- package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
- package/dist/_dts/sdk/src/navigation/index.d.ts +2 -2
- package/dist/_dts/sdk/src/next/index.d.ts +7 -7
- package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
- package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
- package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
- package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -4
- package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
- package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
- package/dist/_dts/sdk/src/server.d.ts +5 -5
- package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
- package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
- package/dist/_dts/{types-BB33-Spd.d.ts → types-DrAWDtqR.d.ts} +3 -3
- package/dist/_dts/{types-BVFXYtRg.d.ts → types-Z388-GR1.d.ts} +7 -7
- package/dist/_dts/{types-FOsJ-KYb.d.ts → types-cObpvZGF.d.ts} +2 -2
- package/dist/_dts/{validation-DckTc6TQ.d.ts → validation-hLr8zVrc.d.ts} +4 -4
- package/dist/client/BlocksIslandsHydrator-CN2GyuuA.mjs +410 -0
- package/dist/client/{BookingMailingListNote-Dsugoe-n.mjs → BookingMailingListNote-Br1VyHkP.mjs} +17 -6
- package/dist/client/{BookingQuestionFields-Bhh0cvsl.mjs → BookingQuestionFields-LLGCWjvU.mjs} +3 -3
- package/dist/client/{CalendarNavigationChevron-CNe3ZjdC.mjs → CalendarNavigationChevron-DSnSBNeq.mjs} +7 -7
- package/dist/client/{DemoBookingPortalAccess-BeiZxEUJ.mjs → DemoBookingPortalAccess-Cilv5zdS.mjs} +65 -9
- package/dist/client/{EventCalendar.client-BL943-tl.mjs → EventCalendar.client-ucgdMS35.mjs} +9 -9
- package/dist/client/{EventCombined.client-BFVxECTp.mjs → EventCombined.client-BEdfJGpx.mjs} +7 -7
- package/dist/client/{EventItem-BIc4gjiD.mjs → EventItem-OpLehMpT.mjs} +4 -4
- package/dist/client/{EventListWeekNavigation-a0QEIEf0.mjs → EventListWeekNavigation-DTsVU6gc.mjs} +1 -1
- package/dist/client/{EventListing.client-CEFTC3jH.mjs → EventListing.client-8MFGI9BA.mjs} +3 -3
- package/dist/client/{EventListing.view-Bt2sBBms.mjs → EventListing.view-BCvRqU86.mjs} +6 -6
- package/dist/client/{EventRegistrationPayment-D9YBNb_E.mjs → EventRegistrationPayment-CqH3hE-k.mjs} +132 -62
- package/dist/client/{LocationMapActions-gqzt5gkW.mjs → LocationMapActions-BFp2uQQQ.mjs} +1 -1
- package/dist/client/{MapDrawingSvg-13JQI7_z.mjs → MapDrawingSvg-DDWfmgpA.mjs} +1 -1
- package/dist/client/{Page-D_M2Vxz3.mjs → Page-Bu5TJU3L.mjs} +53 -22
- package/dist/client/{StepIndicator-CaN8snZ8.mjs → StepIndicator-CR7_0yu4.mjs} +5 -4
- package/dist/client/{accessibleSurfaces-chpD4C2c.mjs → accessibleSurfaces-_7jkuinl.mjs} +56 -8
- package/dist/client/{accordion-DE7OG--d.mjs → accordion-DMItWylU.mjs} +6 -1
- package/dist/client/{booking-form.client-CS1PPjw7.mjs → booking-form.client-wd71DG19.mjs} +505 -217
- package/dist/client/{bookingForm-DE2CwIU9.mjs → bookingForm-Cyr2qeS1.mjs} +17 -17
- package/dist/client/{bookingRoute-Bqlyu5Vb.mjs → bookingRoute-D6DlxYx6.mjs} +6 -2
- package/dist/client/bookings.mjs +16 -13
- package/dist/client/{carousel-DZyUdnFh.mjs → carousel-B5-Hzzif.mjs} +7 -9
- package/dist/client/{carousel.client-BD4DXMtI.mjs → carousel.client-eSSr1oYA.mjs} +2 -2
- package/dist/client/{cart-D7HkkNwe.mjs → cart-B-M5l__W.mjs} +3 -3
- package/dist/client/{cart.client-H4sv2TpD.mjs → cart.client-COAP4CEy.mjs} +1 -1
- package/dist/client/{checkout-2qVyG-Sh.mjs → checkout-ZHc8GfaG.mjs} +3 -3
- package/dist/client/{checkout.client-DAjrBZ74.mjs → checkout.client-DRralR3e.mjs} +1 -1
- package/dist/client/{checkoutUrls-CYj06rX1.mjs → checkoutUrls-CY8qywXl.mjs} +3 -2
- package/dist/client/client.mjs +87 -4
- package/dist/client/{context-DXmIbXCK.mjs → context-Xhf81Q-c.mjs} +25 -3
- package/dist/client/{createLucideIcon-CIbxe9em.mjs → createLucideIcon-BrXgHVKN.mjs} +9 -9
- package/dist/client/{bookingQuestionValues-BjcyCru5.mjs → creditProducts-CMOmhWm2.mjs} +71 -11
- package/dist/client/{cta-DP_IBnq3.mjs → cta-CfuyGqXL.mjs} +2 -2
- package/dist/client/{dateFormatting-CwrkFZTr.mjs → dateFormatting-Bv6kjUW3.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-DQXK-Fh6.mjs → demoPortalMagicLink-DQtwf_s2.mjs} +1 -1
- package/dist/client/{wizardSteps-CFulHWnT.mjs → display-DDNmyb0z.mjs} +920 -870
- package/dist/client/{enhanceHeaderSection-DheQj7rg.mjs → enhanceHeaderSection-D7gRy-pL.mjs} +3 -2
- package/dist/client/{event-details.client-C5UufcRp.mjs → event-details.client-DZZaoCUc.mjs} +1 -1
- package/dist/client/{event-registration.client-CMGg63IU.mjs → event-registration.client-CLBdHUfd.mjs} +59 -18
- package/dist/client/{eventCalendar-DlD0GCEy.mjs → eventCalendar-BY3AfYkK.mjs} +14 -17
- package/dist/client/eventCombined-86P2vQCb.mjs +25 -0
- package/dist/client/{eventDetails-DzuQYgmO.mjs → eventDetails-DIJYMzVg.mjs} +4 -6
- package/dist/client/eventListing-8jS0qGGC.mjs +26 -0
- package/dist/client/{eventRegistration-CjS3Zpjp.mjs → eventRegistration-DyseP_sY.mjs} +19 -19
- package/dist/client/flightRegistrations-DjYm0Wz6.mjs +45 -0
- package/dist/client/{form-DgQqm7T2.mjs → form-RTqunrpz.mjs} +9 -14
- package/dist/client/{form.client-BI9Dcsq5.mjs → form.client-D3_RF29v.mjs} +4 -4
- package/dist/client/{form.parts-DevF0L_A.mjs → form.parts-DWLf_3PF.mjs} +1 -1
- package/dist/client/{formatDate-DDyURjoe.mjs → formatDate-BGlhrmhF.mjs} +1 -1
- package/dist/client/gifting/client.mjs +2 -2
- package/dist/client/{headerSection-DYIG6Pwb.mjs → headerSection-CyNGt23J.mjs} +2 -2
- package/dist/client/{newsletter-form.client-BWp7Y1e1.mjs → newsletter-form.client-IfLup4o0.mjs} +5 -5
- package/dist/client/{newsletter-form.parts-Dg8s9NwJ.mjs → newsletter-form.parts-DDD-LRyW.mjs} +1 -1
- package/dist/client/{newsletterForm-DnPraMzx.mjs → newsletterForm-o5wFBVHv.mjs} +10 -15
- package/dist/client/{noop-ByFRHYQ2.mjs → noop-B_f7RqLD.mjs} +111 -2
- package/dist/client/portal/client.mjs +21 -13
- package/dist/client/{product-detail.client-BFAgHrdg.mjs → product-detail.client-5hNA8aKU.mjs} +1 -1
- package/dist/client/{product-list.client-DVrs_DyY.mjs → product-list.client-c-777ohj.mjs} +1 -1
- package/dist/client/{productDetail-D4rvl6Xg.mjs → productDetail-hXttfQhE.mjs} +3 -3
- package/dist/client/{productList-B8o5AOMX.mjs → productList-BPsYP_jA.mjs} +3 -3
- package/dist/client/{propsDecoder-hhotPP6P.mjs → propsDecoder-Dc8j5i79.mjs} +3 -3
- package/dist/client/reactMount-DFQy3CmO.mjs +51 -0
- package/dist/client/{registry.server-Ch3EpupA.mjs → registry.server-CMrdUGGv.mjs} +338 -289
- package/dist/client/rendering/client.mjs +39 -39
- package/dist/client/rendering/islandDelivery.flight.mjs +99 -0
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +5 -5
- package/dist/client/{richText-coerce-C3LabQ1O.mjs → richText-coerce-BTurYEao.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-CQGlxId8.mjs → routeIslandApiConfig-DFjRKvzM.mjs} +1 -1
- package/dist/client/{runtimeResponse-Dg4XFsuM.mjs → runtimeResponse-BGU8sMZY.mjs} +1 -1
- package/dist/client/runtimeResponse-D2LT--Gj.mjs +3 -0
- package/dist/client/{shop-rRXplPGZ.mjs → shop-Ds47onRS.mjs} +3 -3
- package/dist/client/{shop-commerce-VDbVaKY-.mjs → shop-commerce-B3PyRHaN.mjs} +12 -12
- package/dist/client/{shop-commerce-store-DqdgJ8Zw.mjs → shop-commerce-store-D9CHihQv.mjs} +1 -1
- package/dist/client/{shop.client-DdwvMvaK.mjs → shop.client-RljK0qPB.mjs} +110 -31
- package/dist/client/{shop.interactive-C8OvFY06.mjs → shop.interactive-BH0xDlMF.mjs} +42 -533
- package/dist/client/{shopShared-BeuJiGPU.mjs → shopShared-BEfD0e4m.mjs} +12 -15
- package/dist/client/src-BozhJ43Z.mjs +3 -0
- package/dist/client/{src-1PJxc8KO.mjs → src-xrjaKaCj.mjs} +6 -8
- package/dist/client/{timetableModel-Cko9LRKy.mjs → timetableModel-BG7Ejxdr.mjs} +12 -12
- package/dist/client/{useAvailableSlots-M6QIEiWf.mjs → useAvailableSlots-GP8tnAVW.mjs} +3 -3
- package/dist/client/{useDiscountApply-BJSnyO0f.mjs → useDiscountApply-Cq07nTyG.mjs} +5 -3
- package/dist/client/{useDiscountCodeUi-D3XnOSCi.mjs → useDiscountCodeUi-CD82QX5i.mjs} +1 -1
- package/dist/client/{useEventPagination-PhTIoFVX.mjs → useEventPagination-spj7sGQP.mjs} +6 -6
- package/dist/client/{view-L_mkgtnk.mjs → view-aAP2WbCR.mjs} +2 -3
- package/dist/client/{view-448wvvEY.mjs → view-oToSpu1N.mjs} +7 -7
- package/dist/preview-next/client/{ArrangementLookControls-BpvnOGlN.mjs → ArrangementLookControls-CoWdilcI.mjs} +7 -7
- package/dist/preview-next/client/{LocationPickerEnvironment-CZQ4vkRe.mjs → LocationPickerEnvironment-CwxRbAs2.mjs} +1 -1
- package/dist/preview-next/client/{MapLibreEditMap-CP4w7T_0.mjs → MapLibreEditMap-CKjYUp_E.mjs} +2 -2
- package/dist/preview-next/client/{PreviewEditorSidebar-C0OtdWu_.mjs → PreviewEditorSidebar-BNCrO6PQ.mjs} +201 -151
- package/dist/preview-next/client/{PreviewEditorUI-Csc5vH5k.mjs → PreviewEditorUI-inVZkLCd.mjs} +6 -6
- package/dist/preview-next/client/{PreviewShell-BOLH_pm-.mjs → PreviewShell-CFQlAHTe.mjs} +10 -15
- package/dist/preview-next/client/{SdkPreviewModeRuntime-CKodLReY.mjs → SdkPreviewModeRuntime-Dgl7ktO4.mjs} +12 -9
- package/dist/preview-next/client/{SiteChromeCustomizeButton-BeEZpeKn.mjs → SiteChromeCustomizeButton-DgDYHwkG.mjs} +1418 -598
- package/dist/preview-next/client/{lucide-react-DkZ8fO-G.mjs → lucide-react-DbC1o6_9.mjs} +11 -11
- package/dist/preview-next/client/{previewAssistantSlot-BBdN5kfY.mjs → previewAssistantSlot-DRDu7Ndv.mjs} +684 -930
- package/dist/preview-next/client/{previewChromeSurface-VZtGwPuH.mjs → previewChromeSurface-K6Q5uEMC.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-kiZkMcuR.mjs → sdk-runtime-AGypzhcO.mjs} +2 -2
- package/dist/preview-next/client/{src-DY8JCJdE.mjs → src-DzXUmsyK.mjs} +6 -8
- package/dist/preview-next/client/src-LUhVXBEQ.mjs +3 -0
- package/dist/preview-next/client/{useAutosaveStatus-BiIHEeE0.mjs → useAutosaveStatus-B2mn_l6c.mjs} +3 -3
- package/dist/preview-next/client/{useBlockCustomizeControls-BuFLIpmX.mjs → useBlockCustomizeControls-CBXHo6ph.mjs} +5 -5
- package/dist/preview-next/client/{useOpenBlockForSetup-DlxYgmh_.mjs → useOpenBlockForSetup-BpZnBznt.mjs} +1 -1
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +3 -4
- package/dist/preview-next/{route-contract-C0sCvCYL.mjs → route-contract-jc2Bug-h.mjs} +83 -0
- package/dist/server/{Block.shared-Dnhc0Wu5.mjs → Block.shared-BHgQjX16.mjs} +4 -4
- package/dist/server/{ThemeScopeCore-NAQ_zsFu.mjs → ThemeScopeCore-Ck0dhZA6.mjs} +31 -5
- package/dist/server/{accessibleSurfaces-108nxyGc.mjs → accessibleSurfaces-D0q5tLSW.mjs} +56 -8
- package/dist/server/{bindings-DLoZYUxG.mjs → bindings-CAbTvrCZ.mjs} +1 -1
- package/dist/server/{booking-form.reserved-fields-BWRF7509.mjs → booking-form.reserved-fields-Cqp13TKc.mjs} +1 -0
- package/dist/server/{client-Bc8jI8zN.mjs → client-C-asG6Cf.mjs} +85 -2
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +1 -1
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/{headerVariant-BwR9NV4b.mjs → headerVariant-8O5MvxIU.mjs} +2 -1
- package/dist/server/index.mjs +2 -2
- package/dist/server/{loadContent-D61gpqHB.mjs → loadContent-DKerbSnI.mjs} +4 -4
- package/dist/server/{loadPage-B4ZYpIcd.mjs → loadPage-XgtQR90Z.mjs} +2 -2
- package/dist/server/next.mjs +6 -6
- package/dist/server/{opaqueSurface-BawlEAd_.mjs → opaqueSurface-Yltv_u7r.mjs} +1 -1
- package/dist/server/{overrideResolution-CDReKy2P.mjs → overrideResolution-Z5pwH-kz.mjs} +1 -1
- package/dist/server/page-converter.mjs +1 -1
- package/dist/server/{pageRenderPlan-ByVTA7-4.mjs → pageRenderPlan-DQAo35og.mjs} +9 -8
- package/dist/server/{pageRuntimeSupport-Dzz_Dze6.mjs → pageRuntimeSupport-g-K-FCHa.mjs} +2 -2
- package/dist/server/{pageShared-Dk5Ku6hs.mjs → pageShared-7mPhqqXX.mjs} +345 -289
- package/dist/server/{parseThemeForPersistence-pJPGfMrf.mjs → parseThemeForPersistence-BebSeE17.mjs} +1 -1
- package/dist/server/{prebuild-CW4M0WEZ.mjs → prebuild-C0m4KOT9.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-Bvx0SiIM.mjs → prefetchBlockData-DcLKHfHG.mjs} +2 -2
- package/dist/server/{registry-Bh0Y25zH.mjs → registry-7_0_lUrh.mjs} +305 -844
- package/dist/server/rendering/components/pageShared.mjs +1 -1
- package/dist/server/rendering/helpers/loadPage.mjs +1 -1
- package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
- package/dist/server/rendering/islandDelivery.script.mjs +19 -0
- package/dist/server/rendering/server.mjs +3 -3
- package/dist/server/rendering.mjs +7 -7
- package/dist/server/{resolveBlockData-CnHHst9r.mjs → resolveBlockData-q3WnpvyZ.mjs} +1 -1
- package/dist/server/server.mjs +3 -3
- package/dist/server/theme-bridge.mjs +2 -2
- package/dist/server/theme.mjs +1 -1
- package/dist/server/{validation-D2bHWSxJ.mjs → validation-CSMS6XmP.mjs} +4 -4
- package/dist/server/{version-DkM1eAxG.mjs → version-DWeqmTXc.mjs} +1 -1
- package/dist/styles/index.css +15 -3
- package/package.json +10 -6
- package/dist/client/BlocksIslandsHydrator-DcwEaliO.mjs +0 -296
- package/dist/client/creditProducts-BOWi1QLp.mjs +0 -62
- package/dist/client/eventCombined-DoSi8p_l.mjs +0 -28
- package/dist/client/eventListing-CkiMjl0g.mjs +0 -29
- package/dist/client/reactMount-BGJVsHRb.mjs +0 -28
- package/dist/client/runtimeResponse-BP-L6exS.mjs +0 -3
- package/dist/client/src-CdRISvQp.mjs +0 -3
- package/dist/preview-next/client/src-BP8771hw.mjs +0 -3
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { $ as pageEvidenceEvents, $c as resolveEventTimeZone, $f as featureCardCompositionTreatmentValues, $h as surfaceInkStyle, $i as getEventIdentity, $l as teamMemberBiography, $o as paymentChoicePrice, $r as getShopDisplayForItems, $s as normalizeTicketSelectionLines, $u as resolveSectionSurfaceForeground, $v as unsafeAsSiteId, A_ as generateUuidV4, Ac as getInitialFieldValue, Ag as surfaceInkPublication, Ao as isRegistrationLocked, Ap as editorAdmissionRefusal, As as ENTITLEMENT_SINGLE_TICKET_TOOLTIP, Av as parseLocalScheduleTime, Ba as EVENT_BOOKING_ARRIVAL_QUERY, Bc as buildCalendarViewport, Bf as boundaryRuntimeMetricsForDecorativeTransition, Bg as expandPalette, Bh as generateInteractiveChildInheritanceCSS, Bi as eventCollectionHydrationSchema, Bm as Item$1, Bo as resolveGuestNextStepCheck, Bp as ApiEnvelopeError, Br as newsletterBlockSubmissionMessage, Bs as getPortalSubjectEmail, Bv as publicEventPricingStrategy, C_ as getBookingLaterInstalments, Ca as computeMediaTransformStyle, Cc as deriveBookingQuestions, Cd as buildGeneratedBlockIconRenderAssetLookupFromUnknown, Cf as compiledRuntimeStyleFieldNames, Cg as FONT_SIZE_MAP, Ci as buildEventCalendarListingDisplay, Cl as blockBookingConsentSchema, Co as registrationRoute, Cs as ok, Cu as resolvedItemSurfaceProps, Cv as formatBookingCompactEnglishTime, D_ as nextLiveRunSessionStartMs, Dc as toBookingQuestionsAnswerDraft, Dd as resolveBlockIconRenderValue, Df as getGradientPreset, Dg as ownedThemeSnapshot, Dl as beforeBookingQuestionsPresentationSchema, Dm as DialogTrigger, Do as createInitialRegistrationFlowState, Dp as EDITOR_LOADING_NOTICE, Ds as reportWorkflowSuccess, Dv as getBookingLocalDateKey, E_ as CANCELLED_SESSION_STATUS, Ea as renderVideo, Ec as restoreBookingQuestionsAnswers, Ed as parseBlockIconValue, Eg as freezeOwnedThemeValue, Eh as bindingSchema, El as toBookingRequirementConsentField, Em as DialogTitle, Eo as areEventRegistrationPaymentSelectionsEqual, Ep as isRecord$14, Es as reportWorkflowError, Eu as Grid, Ev as formatLocalScheduleDate, Fc as formatEventPrice, Ff as buildTextContrastShadow, Fg as inkReference, Fi as eventListingBlockRuntime, Fo as fullyBookedLabel, Fp as BEFORE_BOOKING_QUESTIONS_ROUTE, Fs as formatEventDateTime, Fv as toUtcIsoDateTimeString, Ga as bookingNowSchema, Gc as formatEventClockLabel, Gf as anglePolygonCss, Gg as oklchToHexGamut, Gh as SURFACE_FOREGROUND_CSS_VARS, Gi as calendarWindowBounds, Go as visitorHoldsOwnPlace, Gr as productDetailBlockDefinition, Gs as withOccurrenceTitle, Gt as ApiRequestError, Gv as toNonNegativeCents, H_ as sameMailingListPlacementTargeting, Ha as buildEventRegistrationDisplayFromScopedEvents, Hc as eventDateOptions, Hg as hexToRgb, Hh as BUTTON_CONTRAST_POLICY, Hi as calendarMonthKey, Hm as createRovingFocusGroupScope, Ho as resolveRegistrationAvailabilityBlocker, Hp as unwrapResponse, Hr as buildGiftingInteractiveIslandProps, Hs as getVisibleTicketTypes, Hu as isBlockButtonRole, Hv as resolveExactOrFreePriceDisplay, Ic as formatEventPriceAmount, If as generateNavLinkCSS, Ig as resolveConcreteColorHex, Ii as buildEventCollectionDisplay, Io as getTicketSelectionPurpose, Ip as calendarMonthDate, Is as formatPassCreditUsageLabel, Iv as formatBookingPriceDisplay, Ja as resolveEventCalendarReadPlan, Jc as formatEventHourLabel, Jd as heroPhotoPaintsGround, Jh as surfaceForegroundInputFromResolved, Ji as planCalendarMonthRanges, Jl as composeHeaderSectionWrapperClassName, Jo as resolveEventRegistrationSubmitPlan, Jp as Select, Jr as buildCartInteractiveIslandProps, Js as getSingleSelectedPricingOptionId, Ju as normalizeBoxStylesBorder, K as createSessionJournalBindings, Ka as previewStageSchema, Kc as formatEventCompactDateRail, Kf as transitionCatalogueEntries, Kg as rgbToHex, Kh as SURFACE_INK_CSS_VARS, Ki as calendarWindowMonths$1, Kl as siteTopChromeMeasurementTargets$1, Ko as isEventRegistrationAvailable, Kr as productListBlockDefinition, Ks as formatPrice, Ku as boxStylesTransforms, Kv as formatCurrencyAmount, La as getCardOrientation, Lc as formatEventPriceDisplay, Ld as inlineTextToPlainText, Lf as formatSiteChromeBackgroundTokenLabel, Lg as resolveOpaqueSurfaceHex, Li as buildEventCollectionHydration, Ll as siteFooterManifest, Lo as placeCountCeiling, Lr as newsletterSignupBlockDefinition, Ls as formatRegistrationSchedule, Lv as isPublicEventPricingOptionDisplayable, Mc as eventListWeekDays, Md as coerceInlineTextWithFallback, Mf as generateDefaultCardSystem, Mg as HOVER_TEXT_THRESHOLD, Mo as buildEventRegistrationPaymentOptionsViewModel, Mp as observeEditorAdmission, Ms as findSelectedTicketType, Mv as resolveBookingTimeZoneId, N_ as parseMailingListRuntimeContext, Nc as buildMonthDay, Nd as deriveInlineTextFieldChanges, Ng as certifyPaint, Ni as eventListingBlockDefinition, Nl as resolveFeatureCardGeneratedIconSizePx, No as decideEventRegistrationPayment, Ns as formatBookingWhen, Nv as toBookingTimeZone, O_ as orderedLiveRunSessions, Oc as toBookingQuestionsPaymentSnapshot, Og as resolveSurfaceForeground, Oo as decideEventChoice, Os as confirmationPaymentRows, Ov as getLocalScheduleDate, P_ as resolveBookingSignupOffer, Pc as resolveMonthSelectedDay, Pf as generateFooterCss, Pg as contrastThresholdByPolicy, Pi as buildEventListingInteractiveIslandProps, Pl as shouldReserveFeatureCardIconZone, Po as shouldPromptForLogin, Pp as API_ENDPOINTS, Pr as normalizeLocationMapProps, Ps as formatDate$3, Pv as parseUtcIsoDateTimeString, Qc as groupEventsByDate, Qh as surfaceInkDeclarations, Qi as eventPaginationLoadReducer, Ql as parseTeamMemberSpecialties, Qo as paymentChoiceDetails, Qp as SelectValue, Qr as buildShopInteractiveIslandProps, Qs as hasValidPricingOptionSelection, Qu as parseRuntimeBackgroundContent, R_ as parseMailingListPlacementTargeting, Ra as getContainerClass, Rc as formatEventTeacherLine, Rd as isInlineTextEmpty, Rf as headerNeedsPhotoShade, Ri as buildEventCollectionListingDisplay, Rl as siteHeaderManifest, Ro as planRegistrationDetailsCheck, Rp as pageCommitReasonMessage, Rr as NEWSLETTER_SIGNUPS_PAUSED_MESSAGE, Rs as formatTime$3, Rv as publicEventPricingCurrency, S_ as resolveAvailableBookingCollectionOptions, Sa as MediaPlaceholder, Sc as decideBookingQuestionsRestoration, Sd as sanitizeHref, Sf as requireCuratedSiteStyle, Sg as DEFAULT_BUTTON_SIZES, Si as buildEventCalendarInteractiveIslandProps, Sl as blockBookingPaymentTermsSchema, Sm as DialogContent, So as registrationPresentation, Sp as MQ_TABLET_ONLY, Ss as err, Su as lookListPresentationSchemaShape, Sv as resolveBookingDisplayContext, T_ as authoredValuesEqual, Ta as renderAudio, Tc as needsBookingQuestionsRefresh, Tf as gradientToCss, Tg as mapButtonVisualAppearances, Th as unmanagedSurfaceEditability, Tl as isBookingRequirementConsentFieldId, Tm as DialogPortal, To as registrationStepLabelContext, Tp as isObjectRecord, Ts as clearWorkflowFeedback, Tv as addLocalScheduleDays, Ua as buildEventRegistrationInteractiveIslandProps, Uc as formatCalendarTitle, Ug as oklabToOklch, Uh as formatButtonColourContractError, Ui as calendarPageResponseError, Um as Presence, Uo as resolveRegistrationTicketContinuation, Ur as checkoutBlockDefinition, Us as occurrenceTitleOverride, Uv as resolvePricingOptionsPriceDisplay, Va as eventRegistrationBlockDefinition, Vc as eventCalendarWeekStart, Vd as parseInlineTextFromUnknown, Vg as contrastRatio, Vh as compileButtonColourStates, Vi as eventCollectionSourceSchemaShape, Vm as Root$1, Vo as resolveRegistrationAdmission, Vp as extractApiEnvelopeErrorDetails, Vr as giftingBlockDefinition, Vs as getTicketTypeAvailabilityLabel, Vv as publicEventPricingType, Wa as displayButtonText, Wc as formatDate$1, Wg as oklabToSrgb, Wh as DEFAULT_SURFACE_TEXT_COLOR, Wi as calendarQueryKey, Wl as measureSiteTopChromeBottomPx, Wo as settledRemainingPlaces, Wr as cartBlockDefinition, Ws as transformRegistrationOptionsResponse, Wv as parsePositiveCents, Xa as resolveEventRegistrationScopedEvents, Xc as formatEventTimeRange, Xd as readOpeningToneProjection, Xg as customCssRuleSchema, Xh as surfaceForegroundValue, Xi as createInitialEventPaginationLoadState, Xl as splitPositioningClasses, Xm as useSize, Xo as buildBookingPaymentSelectionViewModel, Xp as SelectItem, Xr as buildProductDetailInteractiveIslandProps, Xs as getTicketSelectionTotal, Xu as parseBackgroundContent, Xv as unsafeAsPositiveByteCount, Y as SessionJournalProvider, Ya as normalizeEventRegistrationPageSurfaceSubject, Yc as formatEventNextDateFact, Yd as effectiveHeaderNavLinkStyle, Yg as blockCustomCssRuleSchema, Yh as surfaceForegroundStyle, Yi as resolveCalendarReadProfile, Yl as markEditableSurfaceForwarding, Yn as planArrangementContent, Yo as calculateEventRegistrationPreviewTotal, Yp as SelectContent, Yr as buildCheckoutInteractiveIslandProps, Ys as getTicketLineQuantity, Yu as resolveCardRoleForBoxStyles, Z_ as publishedContactDetails, Za as offeringNounForEvent, Zc as formatTime$1, Zg as boxBackgroundSchema, Zh as surfaceForegroundValueWithOpacity, Zi as eventPageOperationQuery, Zl as contentTransforms, Zm as useId$1, Zo as buildReviewedBookingPaymentViewModel, Zp as SelectTrigger, Zr as buildProductListInteractiveIslandProps, Zs as getTicketTypeLineMax, Zu as parseBackgroundOverlay, Zv as unsafeAsPositiveSeconds, _ as applyBindingsToContent, __ as siteChromeBackgroundOverrideOwner, _a as MapPinIcon, _c as NO_BOOKING_QUESTIONS, _f as designRuntimeRulesForTheme, _g as buttonStateAppearanceDeclarations, _h as useComposedRefs, _l as selectMostOpenCapacitySource, _n as remoteDraftValues, _o as bookingEntryProgress, _p as MQ_LG_UP, _s as resolveHeldTicketPlaces, _u as defineClientOwnedBlockRuntime, aa as getEventRuntimeFiltersKey, ac as eventSignInDraftStore, ad as lookCarouselRegionTransform, af as skinTokenCssVars, ag as textColorValue, ah as useLayoutEffect2, ai as formatInterval, al as getBlockApiReadStage, ap as PUBLIC_DOWNLOAD_MEDIA_TYPES, ar as getAtPath, as as toRegistrationRequestSubject, au as chromeLogoTransforms, bc as bookingQuestionsPaymentSnapshotSchema, bg as paddingDeclarations, bi as eventCalendarBlockDefinition, bl as groupPublicEventsByRun, bm as Dialog, bn as resolveRenderedValues, bo as panelShouldOpen, bp as MQ_SM_DOWN, bs as validateFormData, bu as listLookControl, bv as formatTimeZoneCityLabel, c as usePreviewShownTheme, ca as normalizeOptionalId, cc as toEventSignInDraft, cd as lookSkinSlotTransform, cg as parseSurfaceTree, ch as Primitive, ci as passCardListContent, cl as canJoinEventWaitlist, cr as EventHeader, cs as invitationSubmission, da as EmptyState, dc as decideSignInReturn, dd as runTransforms, dg as serializeSurfaceTree, di as buildProductCartItem, dl as formatTotalCapacity, dm as NATIVE_CHOICE_CLASS, do as resolveOfferingsPreviewGroups, dr as eventCardListContent, ds as getEligibilityFlowFlags, dt as JournalWriteRefused, du as formBlockDefinition, ea as getEventPaginationView, ec as setTicketLineQuantity, ed as resolveSurfaceForegroundStyles, eg as backgroundColorStyle, ei as shopProductPresentation, el as resolveEventCardBooking, em as usePrevious, ep as introCompositionTreatmentValues, es as findPreSelectedEvent, eu as teamMemberCardBiography, fa as CardListCollection, fc as nextSignInReturnExpiry, fd as el, ff as arrangementManifestFromVariants, fg as compositeHex, fh as useControlReadiness, fi as deriveCommerceCheckoutState, fl as getEventAvailability, fo as resolveOfferingsRenderInput, fr as deriveEventScheduleSummary, fs as getRegistrationOccurrenceId, ft as journalFailureReason, fu as buildFormInteractiveIslandProps, g_ as parseGradientPresetId, ga as CalendarIcon, gc as EMPTY_BOOKING_QUESTIONS_ANSWERS, gf as componentRuntimeRulesForTheme, gg as buttonShadow, gl as selectEventCapacitySource, go as bookingEntry, gs as parseCurrencyInputToCents, gu as createZodCodec, gv as formatDate$2, h as composePreviewTheme, h_ as surfaceCardRoleValues, ha as eventCategoryBadge, hc as sweepExpiredSignInReturnDrafts, hg as buttonRadius, hi as reduceCommerceCart, hl as isEventFull, ho as bookingCardEntry, hr as EventListingFrameView, hs as getTicketSelectionRemainingPlaces, hu as defineInteractiveIslandMetaKeys, ia as buildEventRuntimeFilters, ic as EVENT_SIGN_IN_FORM_ID, id as getAnchorClasses, if as restoreCompiledRuntimeFieldsFromContent, ig as textColorStyle, ih as useControllableState, ii as formatCommercePrice, il as browserReadAuthoritySchema, ir as lookPartShown, is as resolveRouteRequiresPayment, iu as headerRuntimeTransforms, ja as resolvePublicMediaUrl, jc as buildEventListWeek, jf as resolveCardRole, jg as solveSurfaceInks, jo as registrationFlowReducer, jp as editorAdmissionSession, jr as getBlockDefinition, js as areEntitlementsDisabledForTicketCount, jv as resolveBookingBusinessTimeZone, k_ as resolveWholeSeriesBookingPhase, ka as resolveMediaNodeResponsiveImage, kc as checkBookingQuestionsAnswered, kg as safeTokenOr, kl as FEATURE_CARD_ICON_TREATMENTS, ko as getDeclinedPass, ks as resolveFinishedPresentation, kv as parseBookingLocalDate, l_ as indexRenderableMediaAssets, la as catalogueEventCardProps, lc as clearSignInReturnDrafts, ld as asPartialObject, lg as prepareSurfaceIndex, li as EMPTY_COMMERCE_CART_STATE, ll as canJoinEventWaitlistOnAnyMode, lm as FIELD_SURFACE_CLASS, lo as resolveOfferingsPreviewGroupCta, lr as EVENT_REGISTRATION_ANCHOR_ID, ls as formatCentsAsCurrencyInput, lt as getEditorClientId, lu as uiTransforms, ma as EventItem, mc as signInReturnPath, md as parseStoredVariant, mf as resolveEffectiveArrangement, mg as buttonBorder, mi as productItemKey, ml as getRemainingPlaces, mo as bookingBarPlacement, mr as MonthLookView, ms as getSlidingScaleSelectionMessage, mu as createInteractiveIslandCodec, mv as unsafeAsEditorBlockId, na as toEventPaginationLoadError, nc as toRegistrationEvents, nf as compileEditorModelRuntime, ng as mergeStyles, nh as useDirection, ni as buildProductCardDisplay, nl as resolveEventLinkProps, nn as useOptionalEditorUiStoreInstance, no as buildOfferingsPreviewListing, np as testimonialsCompositionTreatmentValues, ns as resolveEventRequiresPayment, nu as resolveDateRuntimeContext, nv as EDITOR_SESSION_GENERATION_HEADER, o_ as runtimeMediaSchema, oa as normalizeCsvIds, oc as eventSignInEnds, od as lookLeadSlotTransform, of as mergeHeaderNavTypographyPreference, og as opaqueSurfaceContextFromTheme, oh as createContextScope, oi as membershipCardListContent, ol as placesLeftLabel, om as FIELD_CONTROL_CLASS, oo as normalizeOfferingsPreviewItemLimit, os as beginWaitlistInvitation, ou as layoutTransforms, pa as CardListItems, pc as readSignInReturn, pd as when, pg as actionVariableFallback, pi as parseStoredCommerceCartState, pl as getEventAvailabilityStatus, po as DEFAULT_BOOKING_BUTTON_TEXT, pr as derivePreviewRunSchedule, ps as getSlidingScaleForEvent, pt as sendPageCommand, pu as buildInteractiveIslandProps, q_ as knownSocialPlatformLabels, qa as eventCalendarListGroupingDecision, qc as formatEventDateParts, qd as selectItemSurfacePresentation, qf as resolveCompiledSectionContextFromContent, qg as srgbToOklab, qh as surfaceForegroundDeclarations, qi as calendarWindowPageSchema, qo as normalizeEventRegistrationMaxTickets, qp as trustedJournalState, qr as shopBlockDefinition, qs as canRequestTicketOption, qu as boxStyleClassNames, qv as assertNever$1, ra as toError, rc as toWholeSeriesRegistrationEvents, rd as BACKGROUND_POSITION_PRESET_VALUES, rg as rgbColorValue, rh as createCollection, ri as buildProductDetailDisplay, rl as resolveRuntimeEventDestination, rs as resolveRegistrationTarget, ru as mediaTransforms, s as usePreviewPageDesignRenderState, sa as normalizeCsvString, sc as eventSignInRestoration, sd as lookQuoteLimitTransform, sf as readHeaderNavFontSizePreference, sg as opaqueSurfaceDeclarations, sh as composeEventHandlers, si as membershipClassesLabel, sl as shownVenue, sm as FIELD_FOCUS_CLASS, so as offeringsListingFor, sr as withValueAtPath, ss as createRegistrationDraftData, su as staticHeaderChromeRuntime, ta as planEventPageOperation, tc as getRegistrationStartAt, td as resolveBackgroundColorValue, tf as applyCompiledRuntimeFieldsToContent, tg as cssVarValue, ti as buildCartDisplay, tl as resolveEventCta, to as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, tp as offeringsPreviewCompositionTreatmentValues, ts as resolveDiscountContext, tu as readRuntimeNow, ty as parseUuidBrand, u as useSiteChromeCustomizeOptional, ua as listingEventCardProps, uc as createSignInReturnDraftStore, ud as createTransformRegistry, uf as arrangementLookHooks, ug as resolveSurface, uh as Button, ui as buildPassCartItem, ul as formatEventRemainingPlaces, um as FIELD_TEXTAREA_CLASS, ur as EVENT_REGISTRATION_CHECKOUT_ATTEMPT_PARAM, us as getCurrentTicketSelection, ut as createSessionJournal, uu as formattingTransforms, v_ as asDesignBlockId, va as MediaNodeServer, vc as applyBookingQuestionsAnswerEvent, vg as buttonTypographyDeclarations, vh as cn$1, vi as buildOfferingsCatalogueListing, vl as blockSiteTermsSchema, vn as renderSourceFor, vo as bookingPanelHeading, vp as MQ_MD_DOWN, vs as shouldLoadRegistrationOptions, vu as defineProgressiveBlockRuntime, vv as formatDateTimeRange, w_ as journalReplayValue, wa as mediaImageHostProps, wc as isBookingQuestionsAnswerEvent, wf as surfaceResolutionContextFromTheme, wg as generateShadowValue$1, wi as buildEventCalendarListingRender, wo as registrationStepLabel, ws as okWith, wu as itemRole, wv as toScheduledBookingDateTime, x_ as normalizeCurrencyCode, xa as ImagePresets, xc as bookingQuestionsRefusal, xg as BORDER_WIDTH_MAP, xm as DialogClose, xo as registrationPaymentRoute, xp as MQ_SM_UP, xs as assertNever$2, xu as listLookSlot, xv as inferSiteDateLocale, ya as RichText, yc as bookingQuestionsAnswerDraftSchema, yd as RichTextDocSchema, yf as headerStyleRecipeForTheme, yg as materializeRuntimeButtonAppearance, yi as offeringsCatalogueShape, yl as verifiedSiteTermsAcceptanceSchema, yo as getEventSelectionMode, yp as MQ_MD_UP, ys as registrationQuestionsMessage, yu as listItemPresentation, yv as formatTime$2, z_ as parseMailingListVisitorSelection, za as resolveEventSelection, zc as formatEventDuration, zf as headerRootPaint, zg as TokenResolver, zh as generateEffectsCSS, zi as eventCollectionDisplaySchemaShape, zl as SITE_CHROME_VISIBLE_HEADER_SELECTOR, zo as planRegistrationDetailsContinuation, zp as pageCommitReasonTag, zr as buildNewsletterFormInteractiveIslandProps, zs as getImplicitSingleTicketType, zv as publicEventPricingDisplay } from "./previewAssistantSlot-BBdN5kfY.mjs";
|
|
3
|
-
import { At as sameMeaningfulAddress, Ct as LOCATION_MATCH_THRESHOLDS_METRES, D as Minus, Dt as editLocationValue, Et as decideLocationSave, Ft as locationPinSchema, Gt as err$1, Kt as ok$1, Lt as normalizeLocationAddressText, Mt as decideLocationSourcePermission, Nt as formatLocationAddress, Ot as locationDistanceMetres, Pt as locationAddressSchema, R as Info, Rt as parseLocationValue, T as Mountain, Tt as decideLocationRelationship, U as House, Wt as mapDrawingSchema, _ as RotateCcw, _t as Building2, b as Pencil, c as Trash2, ct as CircleMinus, d as Sparkles, ft as ChevronRight, g as Route, h as Search, k as MapPin, kt as sameLocationSpatialPair, lt as CircleCheck, mt as ChevronDown, n as X, ot as Circle, pt as ChevronLeft, r as WifiOff, s as TriangleAlert, st as CirclePlus, tt as Crosshair, u as Store, w as Move, wt as confirmLocationPair, xt as ArrowDown, y as Plus } from "./lucide-react-
|
|
2
|
+
import { $ as pageEvidenceEvents, $c as formatEventTimeRange, $g as oklabToSrgb, $h as DEFAULT_SURFACE_TEXT_COLOR, $i as eventPaginationLoadReducer, $l as measureSiteTopChromeBottomPx, $o as buildReviewedBookingPaymentViewModel, $r as getShopDisplayForItems, $s as getTicketSelectionTotal, $v as parsePositiveCents, A_ as normalizeCurrencyCode, Aa as resolveMediaNodeResponsiveImage, Ac as toBookingQuestionsAnswerDraft, Ag as BORDER_WIDTH_MAP, Am as DialogClose, Ao as decideEventChoice, Ap as MQ_SM_UP, As as reportWorkflowSuccess, Au as listLookSlot, Av as inferSiteDateLocale, Ba as resolveEventSelection, Bc as formatEventPriceDisplay, Bf as resolveCardRole, Bg as solveSurfaceInks, Bi as eventCollectionDisplaySchemaShape, Bo as planRegistrationDetailsCheck, Bp as editorAdmissionSession, Br as newsletterBlockSubmissionMessage, Bs as formatRegistrationSchedule, Bv as resolveBookingBusinessTimeZone, Ca as MediaPlaceholder, Cc as bookingQuestionsPaymentSnapshotSchema, Cd as parseStoredVariant, Cf as resolveEffectiveArrangement, Cg as buttonBorder, Ci as buildEventCalendarInteractiveIslandProps, Cl as PAGE_NAVIGATION, Co as registrationPaymentRoute, Cs as validateFormData, Cu as createInteractiveIslandCodec, Cv as unsafeAsEditorBlockId, D_ as asDesignBlockId, Da as renderVideo, Dc as isBookingQuestionsAnswerEvent, Dg as buttonTypographyDeclarations, Dh as cn$1, Dl as requestSignIn, Do as registrationStepLabelContext, Dp as MQ_MD_DOWN, Ds as okWith, Du as defineProgressiveBlockRuntime, Dv as formatDateTimeRange, E_ as siteChromeBackgroundOverrideOwner, Ea as renderAudio, Ec as deriveBookingQuestions, Ef as designRuntimeRulesForTheme, Eg as buttonStateAppearanceDeclarations, Eh as useComposedRefs, El as pageNavigationSchema, Eo as registrationStepLabel, Ep as MQ_LG_UP, Es as ok, Eu as defineClientOwnedBlockRuntime, F_ as CANCELLED_SESSION_STATUS, Fc as eventListWeekDays, Fd as parseBlockIconValue, Fg as freezeOwnedThemeValue, Fh as bindingSchema, Fi as buildEventListingInteractiveIslandProps, Fl as toBookingRequirementConsentField, Fm as DialogTitle, Fo as decideEventRegistrationPayment, Fp as isRecord$14, Fs as findSelectedTicketType, Fu as Grid, Fv as formatLocalScheduleDate, Ga as displayButtonText, Gc as eventDateOptions, Gf as generateNavLinkCSS, Gg as resolveConcreteColorHex, Gi as calendarQueryKey, Go as resolveRegistrationTicketContinuation, Gp as calendarMonthDate, Gr as productDetailBlockDefinition, Gs as getVisibleTicketTypes, Gt as ApiRequestError, Gv as formatBookingPriceDisplay, H_ as parseMailingListRuntimeContext, Ha as eventRegistrationBlockDefinition, Hc as formatEventDuration, Hd as deriveInlineTextFieldChanges, Hg as certifyPaint, Hi as eventCollectionSourceSchemaShape, Hl as resolveFeatureCardGeneratedIconSizePx, Ho as resolveGuestNextStepCheck, Hr as buildGiftingInteractiveIslandProps, Hs as getImplicitSingleTicketType, Hv as toBookingTimeZone, I_ as nextLiveRunSessionStartMs, Ic as buildMonthDay, Id as resolveBlockIconRenderValue, If as getGradientPreset, Ig as ownedThemeSnapshot, Ii as eventListingBlockRuntime, Il as beforeBookingQuestionsPresentationSchema, Im as DialogTrigger, Io as shouldPromptForLogin, Ip as EDITOR_LOADING_NOTICE, Is as formatBookingWhen, Iv as getBookingLocalDateKey, J_ as parseMailingListVisitorSelection, Ja as eventCalendarListGroupingDecision, Jc as formatEventClockLabel, Jf as headerRootPaint, Jg as TokenResolver, Jh as generateEffectsCSS, Ji as calendarWindowPageSchema, Jl as SITE_CHROME_VISIBLE_HEADER_SELECTOR, Jo as isEventRegistrationAvailable, Jp as pageCommitReasonTag, Jr as buildCartInteractiveIslandProps, Js as withOccurrenceTitle, Jv as publicEventPricingDisplay, K as createSessionJournalBindings, Ka as bookingNowSchema, Kc as formatCalendarTitle, Kd as inlineTextToPlainText, Kf as formatSiteChromeBackgroundTokenLabel, Kg as resolveOpaqueSurfaceHex, Ki as calendarWindowBounds, Kl as siteFooterManifest, Ko as settledRemainingPlaces, Kr as productListBlockDefinition, Ks as occurrenceTitleOverride, Kv as isPublicEventPricingOptionDisplayable, L_ as orderedLiveRunSessions, Lc as resolveMonthSelectedDay, Lg as resolveSurfaceForeground, Li as buildEventCollectionDisplay, Lo as fullyBookedLabel, Lr as newsletterSignupBlockDefinition, Ls as formatDate$3, Lv as getLocalScheduleDate, M_ as getBookingLaterInstalments, Ma as resolvePublicMediaUrl, Mc as checkBookingQuestionsAnswered, Md as buildGeneratedBlockIconRenderAssetLookupFromUnknown, Mf as compiledRuntimeStyleFieldNames, Mg as FONT_SIZE_MAP, Ml as blockBookingConsentSchema, Mo as isRegistrationLocked, Ms as resolveFinishedPresentation, Mu as resolvedItemSurfaceProps, Mv as formatBookingCompactEnglishTime, N_ as journalReplayValue, Nc as getInitialFieldValue, Nf as surfaceResolutionContextFromTheme, Ng as generateShadowValue$1, No as registrationFlowReducer, Ns as ENTITLEMENT_SINGLE_TICKET_TOOLTIP, Nu as itemRole, Nv as toScheduledBookingDateTime, Oc as needsBookingQuestionsRefresh, Od as RichTextDocSchema, Of as headerStyleRecipeForTheme, Og as materializeRuntimeButtonAppearance, Ol as publicPassProductCollectionSchema, Oo as areEventRegistrationPaymentSelectionsEqual, Op as MQ_MD_UP, Os as clearWorkflowFeedback, Ou as listItemPresentation, Ov as formatTime$2, P_ as authoredValuesEqual, Pc as buildEventListWeek, Pf as gradientToCss, Pg as mapButtonVisualAppearances, Ph as unmanagedSurfaceEditability, Pi as eventListingBlockDefinition, Pl as isBookingRequirementConsentFieldId, Pm as DialogPortal, Po as buildEventRegistrationPaymentOptionsViewModel, Pp as isObjectRecord, Pr as normalizeLocationMapProps, Ps as areEntitlementsDisabledForTicketCount, Pv as addLocalScheduleDays, Qa as offeringNounForEvent, Qc as formatEventNextDateFact, Qg as oklabToOklch, Qh as formatButtonColourContractError, Qi as eventPageOperationQuery, Qm as Presence, Qo as buildBookingPaymentSelectionViewModel, Qr as buildShopInteractiveIslandProps, Qs as getTicketLineQuantity, Qv as resolvePricingOptionsPriceDisplay, R_ as resolveWholeSeriesBookingPhase, Ra as getCardOrientation, Rc as formatEventPrice, Rg as safeTokenOr, Ri as buildEventCollectionHydration, Rl as FEATURE_CARD_ICON_TREATMENTS, Ro as getTicketSelectionPurpose, Rr as NEWSLETTER_SIGNUPS_PAUSED_MESSAGE, Rs as formatEventDateTime, Rv as parseBookingLocalDate, Sa as ImagePresets, Sc as bookingQuestionsAnswerDraftSchema, Sd as when, Sg as actionVariableFallback, Sl as verifiedSiteTermsAcceptanceSchema, So as panelShouldOpen, Ss as registrationQuestionsMessage, Su as buildInteractiveIslandProps, T_ as parseGradientPresetId, Ta as mediaImageHostProps, Tc as decideBookingQuestionsRestoration, Tf as componentRuntimeRulesForTheme, Tg as buttonShadow, Ti as buildEventCalendarListingRender, Tl as leavePage, To as registrationRoute, Ts as err, Tu as createZodCodec, Tv as formatDate$2, U_ as resolveBookingSignupOffer, Ua as buildEventRegistrationDisplayFromScopedEvents, Uc as buildCalendarViewport, Uf as generateFooterCss, Ug as contrastThresholdByPolicy, Ui as calendarMonthKey, Ul as shouldReserveFeatureCardIconZone, Uo as resolveRegistrationAdmission, Up as API_ENDPOINTS, Ur as checkoutBlockDefinition, Us as getPortalSubjectEmail, Uv as parseUtcIsoDateTimeString, Va as EVENT_BOOKING_ARRIVAL_QUERY, Vc as formatEventTeacherLine, Vd as coerceInlineTextWithFallback, Vf as generateDefaultCardSystem, Vg as HOVER_TEXT_THRESHOLD, Vi as eventCollectionHydrationSchema, Vo as planRegistrationDetailsContinuation, Vp as observeEditorAdmission, Vr as giftingBlockDefinition, Vs as formatTime$3, Vv as resolveBookingTimeZoneId, Wa as buildEventRegistrationInteractiveIslandProps, Wc as eventCalendarWeekStart, Wf as buildTextContrastShadow, Wg as inkReference, Wi as calendarPageResponseError, Wo as resolveRegistrationAvailabilityBlocker, Wp as BEFORE_BOOKING_QUESTIONS_ROUTE, Wr as cartBlockDefinition, Ws as getTicketTypeAvailabilityLabel, Wv as toUtcIsoDateTimeString, Xa as normalizeEventRegistrationPageSurfaceSubject, Xc as formatEventDateParts, Xd as parseInlineTextFromUnknown, Xg as contrastRatio, Xh as compileButtonColourStates, Xi as resolveCalendarReadProfile, Xm as Root$1, Xo as resolveEventRegistrationSubmitPlan, Xp as extractApiEnvelopeErrorDetails, Xr as buildProductDetailInteractiveIslandProps, Xs as canRequestTicketOption, Xv as publicEventPricingType, Y as SessionJournalProvider, Ya as resolveEventCalendarReadPlan, Yc as formatEventCompactDateRail, Yf as boundaryRuntimeMetricsForDecorativeTransition, Yg as expandPalette, Yh as generateInteractiveChildInheritanceCSS, Yi as planCalendarMonthRanges, Ym as Item$1, Yn as planArrangementContent, Yo as normalizeEventRegistrationMaxTickets, Yp as ApiEnvelopeError, Yr as buildCheckoutInteractiveIslandProps, Ys as formatPrice, Yv as publicEventPricingStrategy, Z_ as sameMailingListPlacementTargeting, Za as resolveEventRegistrationScopedEvents, Zc as formatEventHourLabel, Zg as hexToRgb, Zh as BUTTON_CONTRAST_POLICY, Zi as createInitialEventPaginationLoadState, Zm as createRovingFocusGroupScope, Zo as calculateEventRegistrationPreviewTotal, Zp as unwrapResponse, Zr as buildProductListInteractiveIslandProps, Zs as getSingleSelectedPricingOptionId, Zu as isBlockButtonRole, Zv as resolveExactOrFreePriceDisplay, _ as applyBindingsToContent, _a as CalendarIcon, _c as signInReturnPath, _d as lookSkinSlotTransform, _g as parseSurfaceTree, _h as Primitive, _l as getRemainingPlaces, _n as remoteDraftValues, _o as bookingEntry, _s as getTicketSelectionRemainingPlaces, a_ as customCssRuleSchema, aa as buildEventRuntimeFilters, ac as toRegistrationEvents, ad as parseBackgroundContent, af as readOpeningToneProjection, ag as surfaceForegroundValue, ah as useSize, ai as formatInterval, al as resolveEventLinkProps, am as SelectItem, ar as getAtPath, as as resolveRegistrationTarget, au as splitPositioningClasses, ay as unsafeAsPositiveByteCount, ba as RichText, bc as NO_BOOKING_QUESTIONS, bd as runTransforms, bg as serializeSurfaceTree, bi as offeringsCatalogueShape, bl as selectMostOpenCapacitySource, bm as NATIVE_CHOICE_CLASS, bn as resolveRenderedValues, bo as courseTitleOf, bs as shouldLoadRegistrationOptions, bu as formBlockDefinition, c as usePreviewShownTheme, ca as normalizeCsvString, cc as eventSignInDraftStore, cd as resolveSectionSurfaceForeground, cg as surfaceInkStyle, ci as membershipClassesLabel, cl as getBlockApiReadStage, co as offeringsListingFor, cp as featureCardCompositionTreatmentValues, cr as EventHeader, cs as beginWaitlistInvitation, cu as teamMemberBiography, cy as unsafeAsSiteId, da as listingEventCardProps, dc as toEventSignInDraft, df as compileEditorModelRuntime, dg as mergeStyles, dh as useDirection, di as buildPassCartItem, dl as canJoinEventWaitlist, dp as testimonialsCompositionTreatmentValues, dr as eventCardListContent, ds as formatCentsAsCurrencyInput, dt as JournalWriteRefused, du as resolveDateRuntimeContext, dv as EDITOR_SESSION_GENERATION_HEADER, e_ as oklchToHexGamut, ea as getEventIdentity, ec as getTicketTypeLineMax, eg as SURFACE_FOREGROUND_CSS_VARS, ei as shopProductPresentation, el as formatTime$1, ep as anglePolygonCss, es as paymentChoiceDetails, ey as toNonNegativeCents, fa as EmptyState, fc as clearSignInReturnDrafts, fd as BACKGROUND_POSITION_PRESET_VALUES, fg as rgbColorValue, fh as createCollection, fi as buildProductCartItem, fl as canJoinEventWaitlistOnAnyMode, fo as resolveOfferingsPreviewGroups, fr as deriveEventScheduleSummary, fs as getCurrentTicketSelection, ft as journalFailureReason, fu as mediaTransforms, ga as eventCategoryBadge, gc as readSignInReturn, gd as lookQuoteLimitTransform, gf as readHeaderNavFontSizePreference, gg as opaqueSurfaceDeclarations, gh as composeEventHandlers, gi as reduceCommerceCart, gl as getEventAvailabilityStatus, gm as FIELD_FOCUS_CLASS, go as bookingCardEntry, gs as getSlidingScaleSelectionMessage, gu as staticHeaderChromeRuntime, h as composePreviewTheme, h_ as runtimeMediaSchema, ha as EventItem, hc as nextSignInReturnExpiry, hd as lookLeadSlotTransform, hf as mergeHeaderNavTypographyPreference, hg as opaqueSurfaceContextFromTheme, hh as createContextScope, hi as productItemKey, hl as getEventAvailability, hm as FIELD_CONTROL_CLASS, ho as bookingBarPlacement, hr as EventListingFrameView, hs as getSlidingScaleForEvent, hu as layoutTransforms, i_ as blockCustomCssRuleSchema, ia as toError, ic as getRegistrationStartAt, id as resolveCardRoleForBoxStyles, if as effectiveHeaderNavLinkStyle, ig as surfaceForegroundStyle, ii as formatCommercePrice, il as resolveEventCta, im as SelectContent, ir as lookPartShown, is as resolveEventRequiresPayment, iu as markEditableSurfaceForwarding, j_ as resolveAvailableBookingCollectionOptions, jc as toBookingQuestionsPaymentSnapshot, jd as sanitizeHref, jf as requireCuratedSiteStyle, jg as DEFAULT_BUTTON_SIZES, jl as blockBookingPaymentTermsSchema, jm as DialogContent, jo as getDeclinedPass, jp as MQ_TABLET_ONLY, jr as getBlockDefinition, js as confirmationPaymentRows, ju as lookListPresentationSchemaShape, jv as resolveBookingDisplayContext, kc as restoreBookingQuestionsAnswers, kg as paddingDeclarations, kl as groupPublicEventsByRun, km as Dialog, ko as createInitialRegistrationFlowState, kp as MQ_SM_DOWN, ks as reportWorkflowError, ku as listLookControl, kv as formatTimeZoneCityLabel, la as normalizeOptionalId, lc as eventSignInEnds, ld as resolveSurfaceForegroundStyles, lg as backgroundColorStyle, li as passCardListContent, ll as placesLeftLabel, lm as usePrevious, lp as introCompositionTreatmentValues, lr as EVENT_REGISTRATION_ANCHOR_ID, ls as createRegistrationDraftData, lt as getEditorClientId, lu as teamMemberCardBiography, ma as CardListItems, mc as decideSignInReturn, md as lookCarouselRegionTransform, mf as skinTokenCssVars, mg as textColorValue, mh as useLayoutEffect2, mi as parseStoredCommerceCartState, ml as formatTotalCapacity, mo as DEFAULT_BOOKING_BUTTON_TEXT, mp as PUBLIC_DOWNLOAD_MEDIA_TYPES, mr as MonthLookView, ms as getRegistrationOccurrenceId, mu as chromeLogoTransforms, n_ as srgbToOklab, na as planEventPageOperation, nc as normalizeTicketSelectionLines, nd as boxStyleClassNames, nf as selectItemSurfacePresentation, ng as surfaceForegroundDeclarations, ni as buildProductCardDisplay, nl as resolveEventTimeZone, nm as trustedJournalState, nn as useOptionalEditorUiStoreInstance, no as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, np as resolveCompiledSectionContextFromContent, ns as findPreSelectedEvent, nv as knownSocialPlatformLabels, ny as assertNever$1, o_ as boxBackgroundSchema, oa as getEventRuntimeFiltersKey, oc as toWholeSeriesRegistrationEvents, od as parseBackgroundOverlay, og as surfaceForegroundValueWithOpacity, oh as useId$1, oi as formatValidity, ol as resolveRuntimeEventDestination, om as SelectTrigger, os as resolveRouteRequiresPayment, ou as contentTransforms, ov as publishedContactDetails, oy as unsafeAsPositiveSeconds, pa as CardListCollection, pc as createSignInReturnDraftStore, pd as getAnchorClasses, pf as restoreCompiledRuntimeFieldsFromContent, pg as textColorStyle, ph as useControllableState, pi as deriveCommerceCheckoutState, pl as formatEventRemainingPlaces, po as resolveOfferingsRenderInput, pr as derivePreviewRunSchedule, ps as getEligibilityFlowFlags, pt as sendPageCommand, pu as headerRuntimeTransforms, q_ as parseMailingListPlacementTargeting, qa as previewStageSchema, qc as formatDate$1, qd as isInlineTextEmpty, qf as headerNeedsPhotoShade, qi as calendarWindowMonths$1, ql as siteHeaderManifest, qo as visitorHoldsOwnPlace, qp as pageCommitReasonMessage, qr as shopBlockDefinition, qs as transformRegistrationOptionsResponse, qv as publicEventPricingCurrency, ra as toEventPaginationLoadError, rc as setTicketLineQuantity, rd as normalizeBoxStylesBorder, rf as heroPhotoPaintsGround, rg as surfaceForegroundInputFromResolved, ri as buildProductDetailDisplay, rl as resolveEventCardBooking, rm as Select, ro as buildOfferingsPreviewListing, rs as resolveDiscountContext, ru as composeHeaderSectionWrapperClassName, s as usePreviewPageDesignRenderState, sa as normalizeCsvIds, sc as EVENT_SIGN_IN_FORM_ID, sd as parseRuntimeBackgroundContent, sg as surfaceInkDeclarations, si as membershipCardListContent, sl as browserReadAuthoritySchema, sm as SelectValue, so as normalizeOfferingsPreviewItemLimit, sr as withValueAtPath, ss as toRegistrationRequestSubject, su as parseTeamMemberSpecialties, t_ as rgbToHex, ta as getEventPaginationView, tc as hasValidPricingOptionSelection, td as boxStylesTransforms, tg as SURFACE_INK_CSS_VARS, ti as buildCartDisplay, tl as groupEventsByDate, tp as transitionCatalogueEntries, ts as paymentChoicePrice, tu as siteTopChromeMeasurementTargets$1, ty as formatCurrencyAmount, u as useSiteChromeCustomizeOptional, ua as catalogueEventCardProps, uc as eventSignInRestoration, ud as resolveBackgroundColorValue, uf as applyCompiledRuntimeFieldsToContent, ug as cssVarValue, ui as EMPTY_COMMERCE_CART_STATE, ul as shownVenue, uo as resolveOfferingsPreviewGroupCta, up as offeringsPreviewCompositionTreatmentValues, ur as EVENT_REGISTRATION_CHECKOUT_ATTEMPT_PARAM, us as invitationSubmission, ut as createSessionJournal, uu as readRuntimeNow, uy as parseUuidBrand, v_ as indexRenderableMediaAssets, va as MapPinIcon, vc as sweepExpiredSignInReturnDrafts, vd as asPartialObject, vg as prepareSurfaceIndex, vl as isEventFull, vm as FIELD_SURFACE_CLASS, vn as renderSourceFor, vo as bookingEntryProgress, vs as parseCurrencyInputToCents, vu as uiTransforms, w_ as surfaceCardRoleValues, wa as computeMediaTransformStyle, wc as bookingQuestionsRefusal, wg as buttonRadius, wi as buildEventCalendarListingDisplay, wl as canonicalUrl, wo as registrationPresentation, ws as assertNever$2, wu as defineInteractiveIslandMetaKeys, xc as applyBookingQuestionsAnswerEvent, xd as el, xf as arrangementManifestFromVariants, xg as compositeHex, xh as useControlReadiness, xi as eventCalendarBlockDefinition, xl as blockSiteTermsSchema, xo as getEventSelectionMode, xs as withRegistrationAvailability, xu as buildFormInteractiveIslandProps, ya as MediaNodeServer, yc as EMPTY_BOOKING_QUESTIONS_ANSWERS, yd as createTransformRegistry, yf as arrangementLookHooks, yg as resolveSurface, yh as Button, yi as buildOfferingsCatalogueListing, yl as selectEventCapacitySource, ym as FIELD_TEXTAREA_CLASS, yo as bookingPanelHeading, ys as resolveHeldTicketPlaces, yu as formattingTransforms, z_ as generateUuidV4, za as getContainerClass, zc as formatEventPriceAmount, zg as surfaceInkPublication, zi as buildEventCollectionListingDisplay, zo as placeCountCeiling, zp as editorAdmissionRefusal, zr as buildNewsletterFormInteractiveIslandProps, zs as formatPassCreditUsageLabel, zv as parseLocalScheduleTime } from "./previewAssistantSlot-DRDu7Ndv.mjs";
|
|
3
|
+
import { At as sameMeaningfulAddress, Ct as LOCATION_MATCH_THRESHOLDS_METRES, D as Minus, Dt as editLocationValue, Et as decideLocationSave, Ft as locationPinSchema, Gt as err$1, Kt as ok$1, Lt as normalizeLocationAddressText, Mt as decideLocationSourcePermission, Nt as formatLocationAddress, Ot as locationDistanceMetres, Pt as locationAddressSchema, R as Info, Rt as parseLocationValue, T as Mountain, Tt as decideLocationRelationship, U as House, Wt as mapDrawingSchema, _ as RotateCcw, _t as Building2, b as Pencil, c as Trash2, ct as CircleMinus, d as Sparkles, ft as ChevronRight, g as Route, h as Search, k as MapPin, kt as sameLocationSpatialPair, lt as CircleCheck, mt as ChevronDown, n as X, ot as Circle, pt as ChevronLeft, r as WifiOff, s as TriangleAlert, st as CirclePlus, tt as Crosshair, u as Store, w as Move, wt as confirmLocationPair, xt as ArrowDown, y as Plus } from "./lucide-react-DbC1o6_9.mjs";
|
|
4
4
|
import { A as buttonSizeNameSchema, C as MinusIcon, D as AFFORDANCE_SUPPRESS_CLASS, E as themeButtonSelector, M as unsafeAsOpaqueButtonColourToken, O as DEFAULT_VARIANT_ALIAS_ID, S as FileTextIcon, T as parseThemeButtonVariantId, X as parseThemeColorToken, Y as parseColorTokenParts, _ as ClockIcon$1, a as ThemedDownloadLink, b as FileAudioIcon, g as CirclePlusIcon, h as CircleMinusIcon, j as createStandardButtonSurfacePolicy, m as ChevronDownIcon, n as ThemedButton, nt as SpinnerNode, o as getIconComponent, p as ArrowDownIcon, r as ThemedButtonLink, rt as clsx, t as ThemedAuthoredButton, w as PlusIcon, x as FileSpreadsheetIcon, y as FileArchiveIcon } from "./ThemedButton-BQU45t-E.mjs";
|
|
5
|
-
import { a as buildTimetableModel$1, b as shiftCalendarAnchorDate, f as formatDateKey, g as getWeekCalendarDayTuple, h as getOrderedDayNames, l as addMonths, p as getDayOfWeek, v as isSameCalendarDay, y as isToday } from "./src-
|
|
6
|
-
import { a as NO_EDIT_MAP_OVERLAY, i as useOptionalLocationPickerEnvironment, l as EMPTY_EDIT_MAP_VIEW, r as useLocationPickerWidgetContext, t as LocationDashboardLink } from "./LocationPickerEnvironment-
|
|
5
|
+
import { a as buildTimetableModel$1, b as shiftCalendarAnchorDate, f as formatDateKey, g as getWeekCalendarDayTuple, h as getOrderedDayNames, l as addMonths, p as getDayOfWeek, v as isSameCalendarDay, y as isToday } from "./src-DzXUmsyK.mjs";
|
|
6
|
+
import { a as NO_EDIT_MAP_OVERLAY, i as useOptionalLocationPickerEnvironment, l as EMPTY_EDIT_MAP_VIEW, r as useLocationPickerWidgetContext, t as LocationDashboardLink } from "./LocationPickerEnvironment-CwxRbAs2.mjs";
|
|
7
7
|
import * as React$1 from "react";
|
|
8
8
|
import React, { Suspense, cloneElement, createContext, createElement, forwardRef, isValidElement, lazy, startTransition, useCallback, useContext, useEffect, useEffectEvent, useId, useLayoutEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore, useTransition } from "react";
|
|
9
9
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { z } from "zod";
|
|
11
11
|
import ReactDOM, { createPortal } from "react-dom";
|
|
12
12
|
import deepEqual from "fast-deep-equal";
|
|
13
|
+
import { IslandDelivery } from "#island-delivery";
|
|
13
14
|
import { createRoot } from "react-dom/client";
|
|
14
15
|
//#region ../core/src/branded/entitlements.ts
|
|
15
16
|
const unsafeAsPassId = (id) => id;
|
|
@@ -2267,7 +2268,7 @@ function buttonRingDefaults(variant) {
|
|
|
2267
2268
|
};
|
|
2268
2269
|
}
|
|
2269
2270
|
//#endregion
|
|
2270
|
-
//#region ../../node_modules/.pnpm/@radix-ui+react-collapsible@1.1.14_@types+react-dom@19.
|
|
2271
|
+
//#region ../../node_modules/.pnpm/@radix-ui+react-collapsible@1.1.14_@types+react-dom@19.3.0_@types+react@19.3.0__@types+_0c44053653ada5b0f65d38b9de6b5dd2/node_modules/@radix-ui/react-collapsible/dist/index.mjs
|
|
2271
2272
|
var COLLAPSIBLE_NAME = "Collapsible";
|
|
2272
2273
|
var [createCollapsibleContext, createCollapsibleScope] = createContextScope(COLLAPSIBLE_NAME);
|
|
2273
2274
|
var [CollapsibleProvider, useCollapsibleContext] = createCollapsibleContext(COLLAPSIBLE_NAME);
|
|
@@ -2383,7 +2384,7 @@ var Root = Collapsible;
|
|
|
2383
2384
|
var Trigger$1 = CollapsibleTrigger;
|
|
2384
2385
|
var Content$1 = CollapsibleContent;
|
|
2385
2386
|
//#endregion
|
|
2386
|
-
//#region ../../node_modules/.pnpm/@radix-ui+react-tabs@1.1.15_@types+react-dom@19.
|
|
2387
|
+
//#region ../../node_modules/.pnpm/@radix-ui+react-tabs@1.1.15_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@1_eb635937abcf7c2a1724d3ef3a6f5f4e/node_modules/@radix-ui/react-tabs/dist/index.mjs
|
|
2387
2388
|
var TABS_NAME = "Tabs";
|
|
2388
2389
|
var [createTabsContext, createTabsScope] = createContextScope(TABS_NAME, [createRovingFocusGroupScope]);
|
|
2389
2390
|
var useRovingFocusGroupScope$1 = createRovingFocusGroupScope();
|
|
@@ -4089,7 +4090,7 @@ function EmblaCarousel(root, userOptions, userPlugins) {
|
|
|
4089
4090
|
}
|
|
4090
4091
|
EmblaCarousel.globalOptions = void 0;
|
|
4091
4092
|
//#endregion
|
|
4092
|
-
//#region ../../node_modules/.pnpm/embla-carousel-react@8.6.0_react@19.
|
|
4093
|
+
//#region ../../node_modules/.pnpm/embla-carousel-react@8.6.0_react@19.3.1/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js
|
|
4093
4094
|
function useEmblaCarousel(options = {}, plugins = []) {
|
|
4094
4095
|
const storedOptions = useRef(options);
|
|
4095
4096
|
const storedPlugins = useRef(plugins);
|
|
@@ -4133,7 +4134,7 @@ const Textarea = React$1.forwardRef(({ className, disabled, ...props }, ref) =>
|
|
|
4133
4134
|
});
|
|
4134
4135
|
Textarea.displayName = "Textarea";
|
|
4135
4136
|
//#endregion
|
|
4136
|
-
//#region ../../node_modules/.pnpm/@radix-ui+react-accordion@1.2.14_@types+react-dom@19.
|
|
4137
|
+
//#region ../../node_modules/.pnpm/@radix-ui+react-accordion@1.2.14_@types+react-dom@19.3.0_@types+react@19.3.0__@types+re_b14c2e354eb15ca6de0629216f19579e/node_modules/@radix-ui/react-accordion/dist/index.mjs
|
|
4137
4138
|
var ACCORDION_NAME = "Accordion";
|
|
4138
4139
|
var ACCORDION_KEYS = [
|
|
4139
4140
|
"Home",
|
|
@@ -4372,7 +4373,7 @@ var Header = AccordionHeader;
|
|
|
4372
4373
|
var Trigger2 = AccordionTrigger$1;
|
|
4373
4374
|
var Content2 = AccordionContent$1;
|
|
4374
4375
|
//#endregion
|
|
4375
|
-
//#region ../../node_modules/.pnpm/sonner@2.0.7_react-dom@19.
|
|
4376
|
+
//#region ../../node_modules/.pnpm/sonner@2.0.7_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/sonner/dist/index.mjs
|
|
4376
4377
|
function __insertCSS(code) {
|
|
4377
4378
|
if (!code || typeof document == "undefined") return;
|
|
4378
4379
|
let head = document.head || document.getElementsByTagName("head")[0];
|
|
@@ -5275,7 +5276,7 @@ const Toaster = /*#__PURE__*/ React.forwardRef(function Toaster(props, ref) {
|
|
|
5275
5276
|
}));
|
|
5276
5277
|
});
|
|
5277
5278
|
//#endregion
|
|
5278
|
-
//#region ../../node_modules/.pnpm/@radix-ui+react-radio-group@1.4.1_@types+react-dom@19.
|
|
5279
|
+
//#region ../../node_modules/.pnpm/@radix-ui+react-radio-group@1.4.1_@types+react-dom@19.3.0_@types+react@19.3.0__@types+r_fa2bed0ca733a5be15622d1461ac5b82/node_modules/@radix-ui/react-radio-group/dist/index.mjs
|
|
5279
5280
|
var RADIO_NAME = "Radio";
|
|
5280
5281
|
var [createRadioContext, createRadioScope] = createContextScope(RADIO_NAME);
|
|
5281
5282
|
var [RadioProviderImpl, useRadioContext] = createRadioContext(RADIO_NAME);
|
|
@@ -6568,6 +6569,20 @@ function generateShadowCssVars(theme) {
|
|
|
6568
6569
|
*/
|
|
6569
6570
|
const BOOKING_BAR_SELECTOR = ":where([data-block='event-registration']) .er-booking-bar";
|
|
6570
6571
|
const opaquePanels = [
|
|
6572
|
+
{
|
|
6573
|
+
selector: ":where([data-block='offerings-preview']) .event-quick-date",
|
|
6574
|
+
paint: {
|
|
6575
|
+
kind: "solid",
|
|
6576
|
+
token: "surface"
|
|
6577
|
+
}
|
|
6578
|
+
},
|
|
6579
|
+
{
|
|
6580
|
+
selector: ":where([data-block='offerings-preview']) .offerings-preview-card--default",
|
|
6581
|
+
paint: {
|
|
6582
|
+
kind: "solid",
|
|
6583
|
+
token: "surface"
|
|
6584
|
+
}
|
|
6585
|
+
},
|
|
6571
6586
|
{
|
|
6572
6587
|
selector: ":where([data-block=\"event-registration\"], [data-block=\"appointment-booking\"]) .rb-reg-surface",
|
|
6573
6588
|
paint: {
|
|
@@ -10815,8 +10830,8 @@ function compareTimestamp(left, right) {
|
|
|
10815
10830
|
* @param anchorId - Block anchor ID for the return URL hash fragment.
|
|
10816
10831
|
* @returns Object with success and cancel URLs
|
|
10817
10832
|
*/
|
|
10818
|
-
function buildCheckoutReturnUrls(paramName, anchorId, returnParams = {}) {
|
|
10819
|
-
const currentUrl = new URL(window.location.href);
|
|
10833
|
+
function buildCheckoutReturnUrls(paramName, anchorId, returnParams = {}, navigation) {
|
|
10834
|
+
const currentUrl = new URL(canonicalUrl(window.location.href, navigation));
|
|
10820
10835
|
const hash = `#${anchorId}`;
|
|
10821
10836
|
const successParams = new URLSearchParams(currentUrl.search);
|
|
10822
10837
|
successParams.set(paramName, "success");
|
|
@@ -10836,9 +10851,11 @@ const BOOK_TARGET_PARAMS = {
|
|
|
10836
10851
|
service: "service",
|
|
10837
10852
|
resource: "resource",
|
|
10838
10853
|
occurrence: "occurrence",
|
|
10839
|
-
event: "event"
|
|
10854
|
+
event: "event",
|
|
10855
|
+
category: "category"
|
|
10840
10856
|
};
|
|
10841
10857
|
function resolveDedicatedBookingTarget(pathname) {
|
|
10858
|
+
if (pathname === "/embed" || pathname.startsWith("/embed/")) return { kind: "embed" };
|
|
10842
10859
|
const internalPublishedMatch = pathname.match(/^\/internal-sites\/([^/]+)\/([^/]+)\/published(?:\/.*)?$/);
|
|
10843
10860
|
if (internalPublishedMatch) {
|
|
10844
10861
|
const hostKey = internalPublishedMatch[1];
|
|
@@ -10854,7 +10871,7 @@ function resolveDedicatedBookingTarget(pathname) {
|
|
|
10854
10871
|
function resolveDedicatedBookingPath(pathname) {
|
|
10855
10872
|
const target = resolveDedicatedBookingTarget(pathname);
|
|
10856
10873
|
if (target.kind === "internal_published_preview") return `/internal-sites/${target.hostKey}/${target.siteIdentifier}/published/book`;
|
|
10857
|
-
return "/book";
|
|
10874
|
+
return target.kind === "embed" ? "/embed/book" : "/book";
|
|
10858
10875
|
}
|
|
10859
10876
|
function resolveDedicatedBookingHref(pathname, bookingTarget = { kind: "chooser" }) {
|
|
10860
10877
|
const bookingPath = resolveDedicatedBookingPath(pathname);
|
|
@@ -10876,6 +10893,8 @@ function resolveDedicatedBookingHref(pathname, bookingTarget = { kind: "chooser"
|
|
|
10876
10893
|
const queryString = params.toString();
|
|
10877
10894
|
return queryString ? `${bookingPath}?${queryString}` : bookingPath;
|
|
10878
10895
|
}
|
|
10896
|
+
const EMBED_SEGMENT = "[a-z0-9][a-z0-9-]*";
|
|
10897
|
+
new RegExp(`^/(?:events/${EMBED_SEGMENT}(?:/${EMBED_SEGMENT})?|services/${EMBED_SEGMENT})$`, "i");
|
|
10879
10898
|
//#endregion
|
|
10880
10899
|
//#region ../blocks/src/system/runtime/shared/utils/checkoutRoute.ts
|
|
10881
10900
|
function resolveDedicatedCheckoutTarget(pathname) {
|
|
@@ -12467,7 +12486,7 @@ function EventQuickDateCard(props) {
|
|
|
12467
12486
|
const { event } = props;
|
|
12468
12487
|
const { date, bookingLink } = quickDateCardPresentation(props);
|
|
12469
12488
|
return /* @__PURE__ */ jsxs("article", {
|
|
12470
|
-
className: "event-quick-date rb-flex rb-min-w-12rem rb-shrink-0 rb-flex-col rb-gap-3 rb-rounded-lg rb-border rb-
|
|
12489
|
+
className: "event-quick-date rb-flex rb-min-w-12rem rb-shrink-0 rb-flex-col rb-gap-3 rb-rounded-lg rb-border rb-p-4",
|
|
12471
12490
|
children: [
|
|
12472
12491
|
/* @__PURE__ */ jsx("time", {
|
|
12473
12492
|
className: "event-quick-date-when",
|
|
@@ -14201,14 +14220,16 @@ function getIslandRootProps(kind, id) {
|
|
|
14201
14220
|
if (id) resolved["data-rb-island-id"] = id;
|
|
14202
14221
|
return resolved;
|
|
14203
14222
|
}
|
|
14204
|
-
|
|
14205
|
-
|
|
14206
|
-
|
|
14207
|
-
|
|
14208
|
-
|
|
14209
|
-
|
|
14210
|
-
|
|
14211
|
-
|
|
14223
|
+
/** The one owner of an island's root element and how its props reach the browser. */
|
|
14224
|
+
function IslandRoot({ kind, id, value, as = "div", attributes, children }) {
|
|
14225
|
+
return /* @__PURE__ */ jsx(IslandDelivery, {
|
|
14226
|
+
as,
|
|
14227
|
+
rootProps: {
|
|
14228
|
+
...attributes,
|
|
14229
|
+
...getIslandRootProps(kind, id)
|
|
14230
|
+
},
|
|
14231
|
+
transport: serializeSurfaceTree(value),
|
|
14232
|
+
children
|
|
14212
14233
|
});
|
|
14213
14234
|
}
|
|
14214
14235
|
//#endregion
|
|
@@ -14233,30 +14254,30 @@ const CarouselNodeSSR = (props) => {
|
|
|
14233
14254
|
});
|
|
14234
14255
|
const normalizedSlidesToShow = normalizeSlidesToShow(settings.slidesToShow);
|
|
14235
14256
|
const controlsEnabled = settings.arrowVisibility === "never" ? false : normalizeBoolean$1(settings.showControls);
|
|
14236
|
-
return /* @__PURE__ */ jsxs(
|
|
14237
|
-
|
|
14238
|
-
|
|
14239
|
-
|
|
14240
|
-
|
|
14241
|
-
|
|
14242
|
-
|
|
14243
|
-
|
|
14244
|
-
|
|
14245
|
-
|
|
14246
|
-
|
|
14247
|
-
|
|
14248
|
-
|
|
14249
|
-
|
|
14250
|
-
|
|
14251
|
-
props.
|
|
14252
|
-
|
|
14253
|
-
|
|
14254
|
-
|
|
14255
|
-
|
|
14256
|
-
|
|
14257
|
-
|
|
14258
|
-
|
|
14259
|
-
]
|
|
14257
|
+
return /* @__PURE__ */ jsxs(IslandRoot, {
|
|
14258
|
+
kind: "carousel",
|
|
14259
|
+
id: props.blockId,
|
|
14260
|
+
attributes: {
|
|
14261
|
+
className: clsx("carousel-root rb-relative", props.className),
|
|
14262
|
+
style: getCarouselSlidesToShowCssVars(normalizedSlidesToShow),
|
|
14263
|
+
...carouselRegionAttributes(props),
|
|
14264
|
+
"data-slides-to-show": resolveSlidesToShowMobile(normalizedSlidesToShow),
|
|
14265
|
+
"data-transition": settings.transition,
|
|
14266
|
+
"data-show-controls": controlsEnabled ? "true" : "false"
|
|
14267
|
+
},
|
|
14268
|
+
value: carouselIslandValue(props, settings, indicator),
|
|
14269
|
+
children: [/* @__PURE__ */ jsx(CarouselSsrFrame, {
|
|
14270
|
+
slides,
|
|
14271
|
+
transition: settings.transition,
|
|
14272
|
+
arrangement: props.arrangement
|
|
14273
|
+
}), props.mode === "arrangement" ? /* @__PURE__ */ jsx(CarouselSsrControls, {
|
|
14274
|
+
props: {
|
|
14275
|
+
...props,
|
|
14276
|
+
indicator: indicator ?? props.indicator
|
|
14277
|
+
},
|
|
14278
|
+
count: slides.length,
|
|
14279
|
+
renderDots: settings.autoplay === true
|
|
14280
|
+
}) : null]
|
|
14260
14281
|
});
|
|
14261
14282
|
};
|
|
14262
14283
|
/** What the client needs to hydrate as the server rendered; auto-advance is carried only when on. */
|
|
@@ -14418,17 +14439,21 @@ const ACCORDION_ICONS$1 = {
|
|
|
14418
14439
|
CircleMinus: CircleMinusIcon
|
|
14419
14440
|
};
|
|
14420
14441
|
const AccordionNodeSSR = ({ blockId, children, className, type = "single", defaultValue, collapsible, ...look }) => {
|
|
14421
|
-
return /* @__PURE__ */
|
|
14422
|
-
|
|
14423
|
-
|
|
14424
|
-
|
|
14425
|
-
|
|
14426
|
-
|
|
14427
|
-
|
|
14442
|
+
return /* @__PURE__ */ jsx(IslandRoot, {
|
|
14443
|
+
kind: "accordion",
|
|
14444
|
+
id: blockId,
|
|
14445
|
+
attributes: {
|
|
14446
|
+
...accordionLookAttributes(look),
|
|
14447
|
+
className: clsx("accordion-root", className),
|
|
14448
|
+
"data-accordion-type": type,
|
|
14449
|
+
"data-default-value": Array.isArray(defaultValue) ? defaultValue.join(",") : defaultValue
|
|
14450
|
+
},
|
|
14451
|
+
value: {
|
|
14428
14452
|
type,
|
|
14429
14453
|
defaultValue,
|
|
14430
14454
|
collapsible
|
|
14431
|
-
}
|
|
14455
|
+
},
|
|
14456
|
+
children
|
|
14432
14457
|
});
|
|
14433
14458
|
};
|
|
14434
14459
|
const AccordionItemNodeSSR = ({ className, value, trigger, content, question, answer, iconStyle, iconTreatment, ...look }) => {
|
|
@@ -14487,31 +14512,55 @@ function resolveNode$1(value) {
|
|
|
14487
14512
|
}
|
|
14488
14513
|
//#endregion
|
|
14489
14514
|
//#region ../blocks/src/system/runtime/nodes/header-section.frame.tsx
|
|
14490
|
-
|
|
14491
|
-
|
|
14492
|
-
|
|
14493
|
-
ref: rootRef,
|
|
14494
|
-
className: rootClassName,
|
|
14515
|
+
function headerRootAttributes(input) {
|
|
14516
|
+
return {
|
|
14517
|
+
className: input.rootClassName,
|
|
14495
14518
|
role: "navigation",
|
|
14496
14519
|
"aria-label": "Primary navigation",
|
|
14520
|
+
"data-rb-island-mounted": input.islandMounted ? "true" : void 0,
|
|
14521
|
+
"data-block": "site-header",
|
|
14522
|
+
"data-block-kind": input.blockKind,
|
|
14523
|
+
"data-block-id": input.blockId ?? void 0,
|
|
14524
|
+
"data-block-content": input.hasBlockContent ? "true" : void 0,
|
|
14525
|
+
"data-fragment-registry": input.hasFragmentRegistry ? "true" : void 0,
|
|
14526
|
+
"data-path-base": input.pathBase,
|
|
14527
|
+
"data-preview-site-chrome-surface": input.previewSiteChromeSurface
|
|
14528
|
+
};
|
|
14529
|
+
}
|
|
14530
|
+
/** Shared DOM frame for server-rendered and React-owned site headers. */
|
|
14531
|
+
function HeaderSectionFrame({ rootRef, rootClassName, sectionClassName, blockId, blockKind = "block.site-header", previewSiteChromeSurface, islandMounted, islandId, islandValue, hasBlockContent, hasFragmentRegistry, pathBase, as, style, background = "background", dataSlot, children }) {
|
|
14532
|
+
const attributes = headerRootAttributes({
|
|
14533
|
+
rootClassName,
|
|
14534
|
+
blockId,
|
|
14535
|
+
blockKind,
|
|
14536
|
+
previewSiteChromeSurface,
|
|
14537
|
+
islandMounted,
|
|
14538
|
+
hasBlockContent,
|
|
14539
|
+
hasFragmentRegistry,
|
|
14540
|
+
pathBase
|
|
14541
|
+
});
|
|
14542
|
+
const section = /* @__PURE__ */ jsx(Section, {
|
|
14543
|
+
as,
|
|
14544
|
+
style,
|
|
14545
|
+
background,
|
|
14546
|
+
"data-slot": dataSlot,
|
|
14547
|
+
className: sectionClassName || void 0,
|
|
14548
|
+
children
|
|
14549
|
+
});
|
|
14550
|
+
if (islandValue !== void 0) return /* @__PURE__ */ jsx(IslandRoot, {
|
|
14551
|
+
kind: "headerSection",
|
|
14552
|
+
id: islandId,
|
|
14553
|
+
as: "nav",
|
|
14554
|
+
attributes,
|
|
14555
|
+
value: islandValue,
|
|
14556
|
+
children: section
|
|
14557
|
+
});
|
|
14558
|
+
return /* @__PURE__ */ jsx("nav", {
|
|
14559
|
+
ref: rootRef,
|
|
14560
|
+
...attributes,
|
|
14497
14561
|
"data-rb-island": "headerSection",
|
|
14498
14562
|
"data-rb-island-id": islandId,
|
|
14499
|
-
|
|
14500
|
-
"data-block": "site-header",
|
|
14501
|
-
"data-block-kind": blockKind,
|
|
14502
|
-
"data-block-id": blockId ?? void 0,
|
|
14503
|
-
"data-block-content": hasBlockContent ? "true" : void 0,
|
|
14504
|
-
"data-fragment-registry": hasFragmentRegistry ? "true" : void 0,
|
|
14505
|
-
"data-path-base": pathBase,
|
|
14506
|
-
"data-preview-site-chrome-surface": previewSiteChromeSurface,
|
|
14507
|
-
children: [islandPropsNode, /* @__PURE__ */ jsx(Section, {
|
|
14508
|
-
as,
|
|
14509
|
-
style,
|
|
14510
|
-
background,
|
|
14511
|
-
"data-slot": dataSlot,
|
|
14512
|
-
className: sectionClassName || void 0,
|
|
14513
|
-
children
|
|
14514
|
-
})]
|
|
14563
|
+
children: section
|
|
14515
14564
|
});
|
|
14516
14565
|
}
|
|
14517
14566
|
//#endregion
|
|
@@ -14539,7 +14588,7 @@ const HeaderSectionNode$1 = ({ blockId, children, className, runtime, "data-prev
|
|
|
14539
14588
|
blockId,
|
|
14540
14589
|
islandId: blockId ?? void 0,
|
|
14541
14590
|
previewSiteChromeSurface,
|
|
14542
|
-
|
|
14591
|
+
islandValue: { runtime: runtime ?? staticHeaderChromeRuntime },
|
|
14543
14592
|
as: asProp,
|
|
14544
14593
|
style: styleProp,
|
|
14545
14594
|
background: backgroundProp,
|
|
@@ -14656,6 +14705,7 @@ const publicAppointmentServiceSchema = z.object({
|
|
|
14656
14705
|
pricing: publicPricingSchema.optional(),
|
|
14657
14706
|
priceAmount: z.number().nullable(),
|
|
14658
14707
|
priceCurrency: z.string().nullable(),
|
|
14708
|
+
onlinePaymentMode: z.enum(["session_or_package", "package_only"]).optional(),
|
|
14659
14709
|
location: publicLocationSchema,
|
|
14660
14710
|
categoryId: z.string().nullable().optional().transform((value) => value ?? null)
|
|
14661
14711
|
});
|
|
@@ -14712,6 +14762,7 @@ function formatVenue(venue) {
|
|
|
14712
14762
|
return venue.area ? `${venue.name}, ${venue.area}` : venue.name;
|
|
14713
14763
|
}
|
|
14714
14764
|
function formatAppointmentPrice(service) {
|
|
14765
|
+
if (service.onlinePaymentMode === "package_only") return "Book with a package";
|
|
14715
14766
|
const pricing = service.pricing;
|
|
14716
14767
|
if (pricing) {
|
|
14717
14768
|
const display = (() => {
|
|
@@ -15143,6 +15194,141 @@ function TeamMembersNode(props) {
|
|
|
15143
15194
|
}
|
|
15144
15195
|
});
|
|
15145
15196
|
}
|
|
15197
|
+
//#endregion
|
|
15198
|
+
//#region ../blocks/src/system/runtime/nodes/booking-form.service-pricing.ts
|
|
15199
|
+
function getBookingServiceSlidingScale(service) {
|
|
15200
|
+
const pricing = service?.pricing;
|
|
15201
|
+
if (!pricing || pricing.pricingStrategy !== "sliding_scale" || pricing.slidingMinAmount === null || pricing.slidingMinAmount === void 0 || pricing.slidingMaxAmount === null || pricing.slidingMaxAmount === void 0) return null;
|
|
15202
|
+
return {
|
|
15203
|
+
minAmount: pricing.slidingMinAmount,
|
|
15204
|
+
maxAmount: pricing.slidingMaxAmount,
|
|
15205
|
+
suggestedAmount: pricing.slidingSuggestedAmount ?? null,
|
|
15206
|
+
currency: pricing.currency
|
|
15207
|
+
};
|
|
15208
|
+
}
|
|
15209
|
+
//#endregion
|
|
15210
|
+
//#region ../blocks/src/system/runtime/nodes/booking-form.package-purchase.ts
|
|
15211
|
+
function bookingRequiresResourceSelection(service, configured = false) {
|
|
15212
|
+
return configured || service?.onlinePaymentChoices?.anyAvailable === false;
|
|
15213
|
+
}
|
|
15214
|
+
function toBookingPurchasablePackages(products) {
|
|
15215
|
+
return products.filter((product) => product.productUseCase === "appointment_package" && product.purchaseAvailability === "purchasable").map(({ id, name, price, currency, creditsTotal, validDays, heldWithTeamMember }) => ({
|
|
15216
|
+
id,
|
|
15217
|
+
name,
|
|
15218
|
+
price,
|
|
15219
|
+
currency,
|
|
15220
|
+
creditsTotal,
|
|
15221
|
+
validDays,
|
|
15222
|
+
heldWithTeamMember: heldWithTeamMember ?? null
|
|
15223
|
+
}));
|
|
15224
|
+
}
|
|
15225
|
+
function resolveBookingPurchasablePackages(enabled, state) {
|
|
15226
|
+
if (!enabled) return { kind: "disabled" };
|
|
15227
|
+
switch (state.tag) {
|
|
15228
|
+
case "idle":
|
|
15229
|
+
case "loading": return { kind: "loading" };
|
|
15230
|
+
case "error": return {
|
|
15231
|
+
kind: "error",
|
|
15232
|
+
message: state.message
|
|
15233
|
+
};
|
|
15234
|
+
case "loaded": return {
|
|
15235
|
+
kind: "ready",
|
|
15236
|
+
items: state.value
|
|
15237
|
+
};
|
|
15238
|
+
}
|
|
15239
|
+
}
|
|
15240
|
+
function resolveBookingPaymentAvailability(perSession, held, purchase) {
|
|
15241
|
+
if (perSession || held.items.length > 0 || purchase.kind === "ready" && purchase.items.length > 0) return { kind: "available" };
|
|
15242
|
+
if (held.kind === "loading" || held.kind === "idle" || purchase.kind === "loading") return { kind: "loading" };
|
|
15243
|
+
if (held.kind === "error" || purchase.kind === "error") return { kind: "load_error" };
|
|
15244
|
+
return { kind: "no_choices" };
|
|
15245
|
+
}
|
|
15246
|
+
/** Disclose the package's purchase price; server settlement may require a review for discounts or credit. */
|
|
15247
|
+
function bookingPackagePurchaseTerms(product, promisedDiscountId) {
|
|
15248
|
+
return {
|
|
15249
|
+
currency: product.currency,
|
|
15250
|
+
totalCents: product.price,
|
|
15251
|
+
dueNowCents: product.price,
|
|
15252
|
+
laterPaymentAmountsCents: [],
|
|
15253
|
+
paymentOption: { kind: product.price > 0 ? "upfront" : "not_required" },
|
|
15254
|
+
promisedDiscountId
|
|
15255
|
+
};
|
|
15256
|
+
}
|
|
15257
|
+
function reconcileBookingPackagePurchase(selection, packages) {
|
|
15258
|
+
if (selection.kind === "none") return selection;
|
|
15259
|
+
const product = packages.find((product) => product.id === selection.package.id);
|
|
15260
|
+
if (!product) return { kind: "none" };
|
|
15261
|
+
return JSON.stringify(product) === JSON.stringify(selection.package) ? selection : {
|
|
15262
|
+
kind: "selected",
|
|
15263
|
+
package: product
|
|
15264
|
+
};
|
|
15265
|
+
}
|
|
15266
|
+
function resolveBookingPaymentChoice(purchase, heldId, option) {
|
|
15267
|
+
if (purchase.kind === "selected") return {
|
|
15268
|
+
kind: "buy_package",
|
|
15269
|
+
package: purchase.package
|
|
15270
|
+
};
|
|
15271
|
+
if (heldId) return {
|
|
15272
|
+
kind: "held_package",
|
|
15273
|
+
customerPassId: heldId
|
|
15274
|
+
};
|
|
15275
|
+
return option ? {
|
|
15276
|
+
kind: "per_session",
|
|
15277
|
+
option
|
|
15278
|
+
} : { kind: "unselected" };
|
|
15279
|
+
}
|
|
15280
|
+
function bookingHasPackagePaymentChoices(service) {
|
|
15281
|
+
return service?.onlinePaymentChoices?.buyPackage === true || service?.onlinePaymentChoices?.heldPackage !== false && service?.onlinePaymentChoices?.perSession === false;
|
|
15282
|
+
}
|
|
15283
|
+
function resolveBookingPackageSources(service, enabled, bearerAuth) {
|
|
15284
|
+
const packageOnly = service?.onlinePaymentChoices?.perSession === false;
|
|
15285
|
+
return {
|
|
15286
|
+
packageOnly,
|
|
15287
|
+
held: resolveHeldPackageSource(service, service?.onlinePaymentChoices?.heldPackage !== false && (enabled || packageOnly), bearerAuth),
|
|
15288
|
+
canBuy: service?.onlinePaymentChoices?.buyPackage === true
|
|
15289
|
+
};
|
|
15290
|
+
}
|
|
15291
|
+
function resolveHeldPackageSource(service, enabled, bearerAuth) {
|
|
15292
|
+
if (!enabled) return "disabled";
|
|
15293
|
+
if (!heldPackageServiceEligible(service)) return "missing-priced-service";
|
|
15294
|
+
return bearerAuth ? "enabled" : "missing-portal-auth";
|
|
15295
|
+
}
|
|
15296
|
+
function heldPackageServiceEligible(service) {
|
|
15297
|
+
if (!service) return false;
|
|
15298
|
+
return service.onlinePaymentChoices?.perSession === false || !getBookingServiceSlidingScale(service) && (service.priceAmount ?? 0) > 0;
|
|
15299
|
+
}
|
|
15300
|
+
function resolveBookingPackagePaymentSelection(data, service) {
|
|
15301
|
+
if (data.selectedAppointmentPackageId || data.packagePurchase?.kind === "selected") return "selected";
|
|
15302
|
+
return service?.onlinePaymentChoices?.perSession === false ? "required" : "per_session";
|
|
15303
|
+
}
|
|
15304
|
+
function bookingPackageRequestKey(enabled, serviceId, resourceId) {
|
|
15305
|
+
return enabled && serviceId ? `${serviceId}:${resourceId ?? "any"}` : null;
|
|
15306
|
+
}
|
|
15307
|
+
/** Resolve form admission and existing holdings before any payment/resource consumer sees service offers. */
|
|
15308
|
+
function applyBookingPaymentAdmission(services, requiresApproval, unrestrictedHeldServiceId) {
|
|
15309
|
+
return services.map((service) => {
|
|
15310
|
+
const choices = service.onlinePaymentChoices;
|
|
15311
|
+
if (requiresApproval) return {
|
|
15312
|
+
...service,
|
|
15313
|
+
onlinePaymentChoices: {
|
|
15314
|
+
perSession: choices?.perSession ?? true,
|
|
15315
|
+
heldPackage: false,
|
|
15316
|
+
buyPackage: false,
|
|
15317
|
+
anyAvailable: true
|
|
15318
|
+
}
|
|
15319
|
+
};
|
|
15320
|
+
return choices && service.id === unrestrictedHeldServiceId ? {
|
|
15321
|
+
...service,
|
|
15322
|
+
onlinePaymentChoices: {
|
|
15323
|
+
...choices,
|
|
15324
|
+
anyAvailable: true
|
|
15325
|
+
}
|
|
15326
|
+
} : service;
|
|
15327
|
+
});
|
|
15328
|
+
}
|
|
15329
|
+
function resolveBookingPaymentMode(service, payment) {
|
|
15330
|
+
return bookingHasPackagePaymentChoices(service) || payment.kind === "unavailable" ? "choice_required" : payment.mode;
|
|
15331
|
+
}
|
|
15146
15332
|
const BOOKING_FORM_DATA_RESERVED_KEYS = /* @__PURE__ */ new Set([
|
|
15147
15333
|
"serviceId",
|
|
15148
15334
|
"resourceId",
|
|
@@ -15152,6 +15338,7 @@ const BOOKING_FORM_DATA_RESERVED_KEYS = /* @__PURE__ */ new Set([
|
|
|
15152
15338
|
"selectedSlidingAmountInput",
|
|
15153
15339
|
"selectedCollectionOptionKind",
|
|
15154
15340
|
"selectedAppointmentPackageId",
|
|
15341
|
+
"packagePurchase",
|
|
15155
15342
|
"mailingListOptIn"
|
|
15156
15343
|
]);
|
|
15157
15344
|
//#endregion
|
|
@@ -15442,16 +15629,6 @@ function readOptionalString(value) {
|
|
|
15442
15629
|
function readOptionalNumber(value) {
|
|
15443
15630
|
return typeof value === "number" && Number.isFinite(value) ? value : void 0;
|
|
15444
15631
|
}
|
|
15445
|
-
function getBookingServiceSlidingScale(service) {
|
|
15446
|
-
const pricing = service?.pricing;
|
|
15447
|
-
if (!pricing || pricing.pricingStrategy !== "sliding_scale" || pricing.slidingMinAmount === null || pricing.slidingMinAmount === void 0 || pricing.slidingMaxAmount === null || pricing.slidingMaxAmount === void 0) return null;
|
|
15448
|
-
return {
|
|
15449
|
-
minAmount: pricing.slidingMinAmount,
|
|
15450
|
-
maxAmount: pricing.slidingMaxAmount,
|
|
15451
|
-
suggestedAmount: pricing.slidingSuggestedAmount ?? null,
|
|
15452
|
-
currency: pricing.currency
|
|
15453
|
-
};
|
|
15454
|
-
}
|
|
15455
15632
|
function parseBookingCurrencyInputToCents(value) {
|
|
15456
15633
|
const trimmed = value?.trim() ?? "";
|
|
15457
15634
|
if (!trimmed) return null;
|
|
@@ -15490,15 +15667,11 @@ function resolveBookingSelectedService(input) {
|
|
|
15490
15667
|
/** One resolved choice set drives step visibility, selection and submission. */
|
|
15491
15668
|
function resolveBookingPaymentStep(input) {
|
|
15492
15669
|
const service = resolveBookingSelectedService(input);
|
|
15493
|
-
if (!service) return
|
|
15494
|
-
|
|
15495
|
-
|
|
15496
|
-
service: null,
|
|
15497
|
-
errorMessage: "Payment options are unavailable for the selected service right now."
|
|
15498
|
-
} : {
|
|
15499
|
-
kind: "unselected",
|
|
15670
|
+
if (!service) return resolveMissingBookingPaymentStep(input);
|
|
15671
|
+
if (service.onlinePaymentChoices?.perSession === false) return {
|
|
15672
|
+
kind: "not_required",
|
|
15500
15673
|
mode: "hidden",
|
|
15501
|
-
service
|
|
15674
|
+
service
|
|
15502
15675
|
};
|
|
15503
15676
|
const totalCents = resolveBookingServiceTotalCents(service, input.data);
|
|
15504
15677
|
if (totalCents <= 0) return {
|
|
@@ -15561,6 +15734,16 @@ function prepareBookingSubmission(input) {
|
|
|
15561
15734
|
customerPassId
|
|
15562
15735
|
}
|
|
15563
15736
|
};
|
|
15737
|
+
if (input.data.packagePurchase?.kind === "selected") return {
|
|
15738
|
+
ok: true,
|
|
15739
|
+
value: {
|
|
15740
|
+
...common,
|
|
15741
|
+
kind: "package_purchase",
|
|
15742
|
+
purchasePassId: input.data.packagePurchase.package.id,
|
|
15743
|
+
discountCode: toTrimmedString(input.data.discountCode),
|
|
15744
|
+
shownTerms: input.shownTerms ?? bookingPackagePurchaseTerms(input.data.packagePurchase.package, input.promisedDiscountId)
|
|
15745
|
+
}
|
|
15746
|
+
};
|
|
15564
15747
|
const payment = prepareStandardBookingPayment(input, service);
|
|
15565
15748
|
return payment.ok ? {
|
|
15566
15749
|
ok: true,
|
|
@@ -15616,6 +15799,14 @@ function buildBookingSubmissionCommon(input, service, startAt) {
|
|
|
15616
15799
|
};
|
|
15617
15800
|
}
|
|
15618
15801
|
function prepareStandardBookingPayment(input, service) {
|
|
15802
|
+
if (service.onlinePaymentChoices?.perSession === false) return {
|
|
15803
|
+
ok: false,
|
|
15804
|
+
error: {
|
|
15805
|
+
tag: "payment-option-required",
|
|
15806
|
+
serviceId: service.id,
|
|
15807
|
+
serviceTitle: service.title
|
|
15808
|
+
}
|
|
15809
|
+
};
|
|
15619
15810
|
const amount = validateBookingSlidingSelection(service, input.data);
|
|
15620
15811
|
if (!amount.ok) return amount;
|
|
15621
15812
|
const payment = resolveBookingPaymentStep(input);
|
|
@@ -15765,6 +15956,18 @@ function snapshotBookingShownTerms(payment, promisedDiscountId) {
|
|
|
15765
15956
|
promisedDiscountId
|
|
15766
15957
|
};
|
|
15767
15958
|
}
|
|
15959
|
+
function resolveMissingBookingPaymentStep(input) {
|
|
15960
|
+
return input.services.length === 0 || resolveRequestedBookingServiceId(input) ? {
|
|
15961
|
+
kind: "unavailable",
|
|
15962
|
+
mode: "unsupported",
|
|
15963
|
+
service: null,
|
|
15964
|
+
errorMessage: "Payment options are unavailable for the selected service right now."
|
|
15965
|
+
} : {
|
|
15966
|
+
kind: "unselected",
|
|
15967
|
+
mode: "hidden",
|
|
15968
|
+
service: null
|
|
15969
|
+
};
|
|
15970
|
+
}
|
|
15768
15971
|
//#endregion
|
|
15769
15972
|
//#region ../blocks/src/system/runtime/nodes/booking-form.service-categories.ts
|
|
15770
15973
|
function isRecord$7(value) {
|
|
@@ -15917,6 +16120,7 @@ const bookingSourceSchema = z.object({
|
|
|
15917
16120
|
demoEmailSuppressed: z.boolean().optional(),
|
|
15918
16121
|
mailingList: bookingMailingListContextSchema.optional(),
|
|
15919
16122
|
siteTerms: blockSiteTermsSchema.optional(),
|
|
16123
|
+
pageNavigation: pageNavigationSchema.optional(),
|
|
15920
16124
|
siteName: z.string().optional(),
|
|
15921
16125
|
siteId: z.string().optional(),
|
|
15922
16126
|
apiBaseUrl: z.string().optional(),
|
|
@@ -15951,6 +16155,7 @@ const bookingHydrationSchema = z.object({
|
|
|
15951
16155
|
demoEmailSuppressed: z.boolean().optional(),
|
|
15952
16156
|
mailingList: bookingMailingListContextSchema.optional(),
|
|
15953
16157
|
siteTerms: blockSiteTermsSchema.optional(),
|
|
16158
|
+
pageNavigation: pageNavigationSchema.optional(),
|
|
15954
16159
|
siteName: z.string().optional(),
|
|
15955
16160
|
formId: z.string().nullable(),
|
|
15956
16161
|
serviceId: z.string().nullable(),
|
|
@@ -16003,6 +16208,7 @@ const bookingFormBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
16003
16208
|
demoEmailSuppressed: source.demoEmailSuppressed,
|
|
16004
16209
|
mailingList: source.mailingList,
|
|
16005
16210
|
siteTerms: source.siteTerms,
|
|
16211
|
+
pageNavigation: source.pageNavigation,
|
|
16006
16212
|
siteName: source.siteName,
|
|
16007
16213
|
formId: form?.id ?? source.formId ?? null,
|
|
16008
16214
|
serviceId: source.serviceId ?? form?.settings?.serviceId ?? null,
|
|
@@ -16069,56 +16275,54 @@ function buildBookingFormInteractiveIslandProps(props) {
|
|
|
16069
16275
|
function BookingFormSSR({ blockId, children, ...sourceProps }) {
|
|
16070
16276
|
const islandProps = buildBookingFormInteractiveIslandProps(sourceProps);
|
|
16071
16277
|
const display = islandProps.render.display;
|
|
16072
|
-
return /* @__PURE__ */ jsxs(
|
|
16073
|
-
|
|
16074
|
-
|
|
16075
|
-
|
|
16076
|
-
|
|
16077
|
-
|
|
16078
|
-
|
|
16079
|
-
|
|
16080
|
-
|
|
16081
|
-
|
|
16082
|
-
|
|
16083
|
-
|
|
16084
|
-
|
|
16085
|
-
})
|
|
16278
|
+
return /* @__PURE__ */ jsxs(IslandRoot, {
|
|
16279
|
+
kind: "booking-form",
|
|
16280
|
+
id: blockId,
|
|
16281
|
+
attributes: { "data-block": "appointment-booking" },
|
|
16282
|
+
value: islandProps,
|
|
16283
|
+
children: [display.state === "missing" ? /* @__PURE__ */ jsx("div", {
|
|
16284
|
+
className: `rb-reg-surface booking-form-ssr ${sourceProps.className ?? ""}`.trim(),
|
|
16285
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
16286
|
+
className: "alert alert-error",
|
|
16287
|
+
role: "alert",
|
|
16288
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
16289
|
+
className: "ab-text",
|
|
16290
|
+
children: display.message
|
|
16086
16291
|
})
|
|
16087
|
-
})
|
|
16088
|
-
|
|
16089
|
-
|
|
16090
|
-
|
|
16091
|
-
|
|
16092
|
-
|
|
16093
|
-
|
|
16094
|
-
|
|
16095
|
-
|
|
16096
|
-
|
|
16097
|
-
|
|
16098
|
-
|
|
16099
|
-
|
|
16100
|
-
|
|
16101
|
-
|
|
16102
|
-
|
|
16103
|
-
children: [/* @__PURE__ */ jsx("div", { className: "rb-shell-line rb-shell-line--md" }), /* @__PURE__ */ jsx("div", { className: "rb-shell-line rb-shell-line--sm" })]
|
|
16104
|
-
})
|
|
16105
|
-
}),
|
|
16106
|
-
/* @__PURE__ */ jsxs("div", {
|
|
16292
|
+
})
|
|
16293
|
+
}) : /* @__PURE__ */ jsxs("div", {
|
|
16294
|
+
className: `rb-reg-surface booking-form-ssr ab-shell ${sourceProps.className ?? ""}`.trim(),
|
|
16295
|
+
"aria-busy": true,
|
|
16296
|
+
"aria-label": "Loading booking form",
|
|
16297
|
+
role: "status",
|
|
16298
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
16299
|
+
className: "rb-sr-only",
|
|
16300
|
+
children: "Loading booking form..."
|
|
16301
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
16302
|
+
className: "rb-reg-stack",
|
|
16303
|
+
"aria-hidden": "true",
|
|
16304
|
+
children: [
|
|
16305
|
+
/* @__PURE__ */ jsx("div", {
|
|
16306
|
+
className: "rb-reg-summary",
|
|
16307
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
16107
16308
|
className: "rb-reg-stack rb-reg-stack--sm",
|
|
16108
|
-
children: [/* @__PURE__ */ jsx("div", { className: "rb-shell-line rb-shell-line--
|
|
16109
|
-
}),
|
|
16110
|
-
/* @__PURE__ */ jsx("div", {
|
|
16111
|
-
className: "rb-wizard-actions",
|
|
16112
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
16113
|
-
className: "ab-shell-button",
|
|
16114
|
-
children: display.submitLabel
|
|
16115
|
-
})
|
|
16309
|
+
children: [/* @__PURE__ */ jsx("div", { className: "rb-shell-line rb-shell-line--md" }), /* @__PURE__ */ jsx("div", { className: "rb-shell-line rb-shell-line--sm" })]
|
|
16116
16310
|
})
|
|
16117
|
-
|
|
16118
|
-
|
|
16119
|
-
|
|
16120
|
-
|
|
16121
|
-
|
|
16311
|
+
}),
|
|
16312
|
+
/* @__PURE__ */ jsxs("div", {
|
|
16313
|
+
className: "rb-reg-stack rb-reg-stack--sm",
|
|
16314
|
+
children: [/* @__PURE__ */ jsx("div", { className: "rb-shell-line rb-shell-line--lg" }), /* @__PURE__ */ jsx("div", { className: "rb-shell-line rb-shell-line--xs" })]
|
|
16315
|
+
}),
|
|
16316
|
+
/* @__PURE__ */ jsx("div", {
|
|
16317
|
+
className: "rb-wizard-actions",
|
|
16318
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
16319
|
+
className: "ab-shell-button",
|
|
16320
|
+
children: display.submitLabel
|
|
16321
|
+
})
|
|
16322
|
+
})
|
|
16323
|
+
]
|
|
16324
|
+
})]
|
|
16325
|
+
}), children]
|
|
16122
16326
|
});
|
|
16123
16327
|
}
|
|
16124
16328
|
//#endregion
|
|
@@ -16747,8 +16951,8 @@ function withLookParts(props, arrangement) {
|
|
|
16747
16951
|
}
|
|
16748
16952
|
//#endregion
|
|
16749
16953
|
//#region ../blocks/src/system/runtime/nodes/event-details.server.tsx
|
|
16750
|
-
function
|
|
16751
|
-
return
|
|
16954
|
+
function eventDetailsIslandValue({ props, presentation, scopedEvents, subject, nowIso }) {
|
|
16955
|
+
return {
|
|
16752
16956
|
...props.arrangement ? {
|
|
16753
16957
|
arrangement: props.arrangement,
|
|
16754
16958
|
entryTitle: props.entryTitle,
|
|
@@ -16776,7 +16980,7 @@ function EventDetailsHydration({ props, presentation, scopedEvents, subject, now
|
|
|
16776
16980
|
autoApplyDiscount: presentation.autoApplyDiscount,
|
|
16777
16981
|
className: props.className,
|
|
16778
16982
|
nowIso
|
|
16779
|
-
}
|
|
16983
|
+
};
|
|
16780
16984
|
}
|
|
16781
16985
|
function EventDetailsSSR(props) {
|
|
16782
16986
|
const { blockId, occurrenceContext = null, subject, events = null, className, children } = props;
|
|
@@ -16793,24 +16997,24 @@ function EventDetailsSSR(props) {
|
|
|
16793
16997
|
subject: normalizedSubject,
|
|
16794
16998
|
nowIso
|
|
16795
16999
|
});
|
|
16796
|
-
return /* @__PURE__ */ jsxs(
|
|
16797
|
-
|
|
16798
|
-
|
|
16799
|
-
|
|
16800
|
-
|
|
16801
|
-
|
|
16802
|
-
|
|
16803
|
-
|
|
16804
|
-
|
|
16805
|
-
|
|
16806
|
-
|
|
16807
|
-
|
|
16808
|
-
|
|
16809
|
-
|
|
16810
|
-
|
|
16811
|
-
|
|
16812
|
-
|
|
16813
|
-
]
|
|
17000
|
+
return /* @__PURE__ */ jsxs(IslandRoot, {
|
|
17001
|
+
kind: "event-details",
|
|
17002
|
+
id: blockId,
|
|
17003
|
+
attributes: {
|
|
17004
|
+
className: `event-details ${className ?? ""}`.trim(),
|
|
17005
|
+
"data-block": "event-details"
|
|
17006
|
+
},
|
|
17007
|
+
value: eventDetailsIslandValue({
|
|
17008
|
+
props,
|
|
17009
|
+
presentation,
|
|
17010
|
+
scopedEvents,
|
|
17011
|
+
subject: normalizedSubject,
|
|
17012
|
+
nowIso
|
|
17013
|
+
}),
|
|
17014
|
+
children: [/* @__PURE__ */ jsx(EventDetailsView, {
|
|
17015
|
+
...presentation,
|
|
17016
|
+
mapClassName: "venue-map event-details-map"
|
|
17017
|
+
}), children]
|
|
16814
17018
|
});
|
|
16815
17019
|
}
|
|
16816
17020
|
//#endregion
|
|
@@ -16997,37 +17201,37 @@ const EventCombinedSSR = ({ blockId, ...source }) => {
|
|
|
16997
17201
|
const listDisplay = buildEventCombinedListingDisplay(render);
|
|
16998
17202
|
const islandProps = buildEventCombinedInteractiveIslandProps(source);
|
|
16999
17203
|
const ssrEmptyMessage = render.hydration.prefetchedEvents ? render.display.emptyMessage : listDisplay.loadingMessage;
|
|
17000
|
-
return /* @__PURE__ */ jsxs(
|
|
17001
|
-
|
|
17002
|
-
|
|
17003
|
-
|
|
17004
|
-
|
|
17005
|
-
|
|
17006
|
-
|
|
17007
|
-
|
|
17008
|
-
|
|
17009
|
-
|
|
17010
|
-
|
|
17011
|
-
|
|
17012
|
-
|
|
17013
|
-
|
|
17014
|
-
|
|
17015
|
-
|
|
17016
|
-
|
|
17017
|
-
|
|
17018
|
-
|
|
17019
|
-
|
|
17020
|
-
|
|
17021
|
-
|
|
17022
|
-
|
|
17023
|
-
|
|
17024
|
-
|
|
17025
|
-
|
|
17026
|
-
|
|
17027
|
-
|
|
17028
|
-
|
|
17204
|
+
return /* @__PURE__ */ jsxs(IslandRoot, {
|
|
17205
|
+
kind: "event-combined",
|
|
17206
|
+
id: blockId,
|
|
17207
|
+
attributes: {
|
|
17208
|
+
className: `event-combined ${render.display.className || ""}`,
|
|
17209
|
+
"data-block": "event-combined"
|
|
17210
|
+
},
|
|
17211
|
+
value: islandProps,
|
|
17212
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
17213
|
+
className: "nav-tabs",
|
|
17214
|
+
role: "tablist",
|
|
17215
|
+
children: [/* @__PURE__ */ jsx("button", {
|
|
17216
|
+
type: "button",
|
|
17217
|
+
role: "tab",
|
|
17218
|
+
"aria-selected": true,
|
|
17219
|
+
className: "nav-tab nav-tab--active",
|
|
17220
|
+
children: "List"
|
|
17221
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
17222
|
+
type: "button",
|
|
17223
|
+
role: "tab",
|
|
17224
|
+
"aria-selected": false,
|
|
17225
|
+
className: "nav-tab",
|
|
17226
|
+
children: "Calendar"
|
|
17227
|
+
})]
|
|
17228
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
17229
|
+
className: "event-combined-content",
|
|
17230
|
+
children: listDisplay.events.length === 0 ? /* @__PURE__ */ jsx(EmptyState, { message: ssrEmptyMessage }) : /* @__PURE__ */ jsx("div", {
|
|
17231
|
+
className: listDisplay.containerClass,
|
|
17232
|
+
children: listDisplay.events.map((event) => renderEventListItem(event, listDisplay))
|
|
17029
17233
|
})
|
|
17030
|
-
]
|
|
17234
|
+
})]
|
|
17031
17235
|
});
|
|
17032
17236
|
};
|
|
17033
17237
|
//#endregion
|
|
@@ -17766,7 +17970,7 @@ function styledGroupFrame(cardStyles, baseClass) {
|
|
|
17766
17970
|
}
|
|
17767
17971
|
function resolveGroupFrame(cardStyles) {
|
|
17768
17972
|
if (!cardStyles) return {
|
|
17769
|
-
containerClassName: "offerings-preview-card rb-flex rb-h-full rb-min-h-full rb-flex-col rb-rounded-lg rb-border rb-border-border rb-
|
|
17973
|
+
containerClassName: "offerings-preview-card offerings-preview-card--default rb-flex rb-h-full rb-min-h-full rb-flex-col rb-rounded-lg rb-border rb-border-border rb-p-5",
|
|
17770
17974
|
contentClassName: GROUP_FRAME_CONTENT_CLASS
|
|
17771
17975
|
};
|
|
17772
17976
|
const role = resolveCardRoleForBoxStyles(cardStyles, void 0);
|
|
@@ -18573,18 +18777,18 @@ function CartSSR({ blockId, siteId, apiBaseUrl, stage, children, ...rest }) {
|
|
|
18573
18777
|
stage,
|
|
18574
18778
|
...rest
|
|
18575
18779
|
});
|
|
18576
|
-
return /* @__PURE__ */ jsxs(
|
|
18577
|
-
|
|
18578
|
-
id:
|
|
18579
|
-
|
|
18580
|
-
|
|
18581
|
-
|
|
18582
|
-
|
|
18583
|
-
|
|
18584
|
-
|
|
18585
|
-
|
|
18586
|
-
|
|
18587
|
-
]
|
|
18780
|
+
return /* @__PURE__ */ jsxs(IslandRoot, {
|
|
18781
|
+
kind: "cart",
|
|
18782
|
+
id: blockId,
|
|
18783
|
+
attributes: {
|
|
18784
|
+
className: `shop ${rest.className ?? ""}`.trim(),
|
|
18785
|
+
id: "shop",
|
|
18786
|
+
"data-shop": true,
|
|
18787
|
+
"data-block": "shop",
|
|
18788
|
+
"data-site-id": siteId ?? void 0
|
|
18789
|
+
},
|
|
18790
|
+
value: islandProps,
|
|
18791
|
+
children: [/* @__PURE__ */ jsx(CartServerContent, { render: islandProps.render }), children]
|
|
18588
18792
|
});
|
|
18589
18793
|
}
|
|
18590
18794
|
//#endregion
|
|
@@ -18597,18 +18801,18 @@ function CheckoutSSR({ blockId, siteId, apiBaseUrl, stage, demoEmailSuppressed,
|
|
|
18597
18801
|
demoEmailSuppressed,
|
|
18598
18802
|
...rest
|
|
18599
18803
|
});
|
|
18600
|
-
return /* @__PURE__ */ jsxs(
|
|
18601
|
-
|
|
18602
|
-
id:
|
|
18603
|
-
|
|
18604
|
-
|
|
18605
|
-
|
|
18606
|
-
|
|
18607
|
-
|
|
18608
|
-
|
|
18609
|
-
|
|
18610
|
-
|
|
18611
|
-
]
|
|
18804
|
+
return /* @__PURE__ */ jsxs(IslandRoot, {
|
|
18805
|
+
kind: "checkout",
|
|
18806
|
+
id: blockId,
|
|
18807
|
+
attributes: {
|
|
18808
|
+
className: `shop ${rest.className ?? ""}`.trim(),
|
|
18809
|
+
id: "shop-checkout",
|
|
18810
|
+
"data-shop": true,
|
|
18811
|
+
"data-block": "shop",
|
|
18812
|
+
"data-site-id": siteId ?? void 0
|
|
18813
|
+
},
|
|
18814
|
+
value: islandProps,
|
|
18815
|
+
children: [/* @__PURE__ */ jsx(CheckoutServerContent, { render: islandProps.render }), children]
|
|
18612
18816
|
});
|
|
18613
18817
|
}
|
|
18614
18818
|
//#endregion
|
|
@@ -18617,12 +18821,17 @@ function GiftingSSR({ blockId, ...rest }) {
|
|
|
18617
18821
|
const islandProps = buildGiftingInteractiveIslandProps(rest);
|
|
18618
18822
|
const offers = islandProps.render.hydration.offers;
|
|
18619
18823
|
const hasOffers = Boolean((offers?.giftCards.length ?? 0) > 0 || (offers?.vouchers.length ?? 0) > 0);
|
|
18620
|
-
return /* @__PURE__ */
|
|
18621
|
-
|
|
18622
|
-
|
|
18623
|
-
|
|
18624
|
-
|
|
18625
|
-
|
|
18824
|
+
return /* @__PURE__ */ jsx(IslandRoot, {
|
|
18825
|
+
kind: "gifting",
|
|
18826
|
+
id: blockId,
|
|
18827
|
+
as: "section",
|
|
18828
|
+
attributes: {
|
|
18829
|
+
className: rest.className ?? void 0,
|
|
18830
|
+
"data-block": "gifting",
|
|
18831
|
+
style: { color: "rgb(var(--tb-text, 17 24 39))" }
|
|
18832
|
+
},
|
|
18833
|
+
value: islandProps,
|
|
18834
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
18626
18835
|
className: "rb-grid",
|
|
18627
18836
|
style: { gap: "1.5rem" },
|
|
18628
18837
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
@@ -18722,7 +18931,7 @@ function GiftingSSR({ blockId, ...rest }) {
|
|
|
18722
18931
|
style: { margin: 0 },
|
|
18723
18932
|
children: islandProps.render.display.emptyStateText
|
|
18724
18933
|
})]
|
|
18725
|
-
})
|
|
18934
|
+
})
|
|
18726
18935
|
});
|
|
18727
18936
|
}
|
|
18728
18937
|
//#endregion
|
|
@@ -19749,9 +19958,11 @@ function renderEventCalendarMode(display, hydration) {
|
|
|
19749
19958
|
}
|
|
19750
19959
|
const EventCalendarSSR = (props) => {
|
|
19751
19960
|
const islandProps = buildEventCalendarInteractiveIslandProps(props);
|
|
19752
|
-
return /* @__PURE__ */
|
|
19753
|
-
|
|
19754
|
-
|
|
19961
|
+
return /* @__PURE__ */ jsx(IslandRoot, {
|
|
19962
|
+
kind: "event-calendar",
|
|
19963
|
+
id: props.blockId,
|
|
19964
|
+
value: islandProps,
|
|
19965
|
+
children: renderEventCalendarMode(islandProps.render.display, islandProps.render.hydration)
|
|
19755
19966
|
});
|
|
19756
19967
|
};
|
|
19757
19968
|
function CombinedSsrTabs({ look }) {
|
|
@@ -19784,12 +19995,14 @@ function CombinedSsrTabs({ look }) {
|
|
|
19784
19995
|
const EventListingSSR = (props) => {
|
|
19785
19996
|
const islandProps = buildEventListingInteractiveIslandProps(props);
|
|
19786
19997
|
const display = islandProps.render.display;
|
|
19787
|
-
return /* @__PURE__ */
|
|
19788
|
-
|
|
19789
|
-
|
|
19998
|
+
return /* @__PURE__ */ jsx(IslandRoot, {
|
|
19999
|
+
kind: "event-listing",
|
|
20000
|
+
id: props.blockId,
|
|
20001
|
+
value: islandProps,
|
|
20002
|
+
children: /* @__PURE__ */ jsx(EventListingFrameView, {
|
|
19790
20003
|
display,
|
|
19791
20004
|
renderEventCard: (event) => renderEventListItem(event, display)
|
|
19792
|
-
})
|
|
20005
|
+
})
|
|
19793
20006
|
});
|
|
19794
20007
|
};
|
|
19795
20008
|
//#endregion
|
|
@@ -19960,7 +20173,7 @@ function ChooseEventCard({ entry, buttonVariant, onAction }) {
|
|
|
19960
20173
|
className: "er-booking-card__body",
|
|
19961
20174
|
children: /* @__PURE__ */ jsx("p", {
|
|
19962
20175
|
className: "er-booking-card__when",
|
|
19963
|
-
children:
|
|
20176
|
+
children: entry.countLabel
|
|
19964
20177
|
})
|
|
19965
20178
|
}), /* @__PURE__ */ jsx(CardCta, {
|
|
19966
20179
|
label: entry.action,
|
|
@@ -20056,6 +20269,7 @@ function bookingBarCopy(entry) {
|
|
|
20056
20269
|
switch (entry.kind) {
|
|
20057
20270
|
case "single": {
|
|
20058
20271
|
const copy = barCopy(entry.title, [
|
|
20272
|
+
plain(entry.run),
|
|
20059
20273
|
plain(entry.shortWhen),
|
|
20060
20274
|
price(entry.price),
|
|
20061
20275
|
plain(entry.places)
|
|
@@ -20067,7 +20281,7 @@ function bookingBarCopy(entry) {
|
|
|
20067
20281
|
plain(entry.nextDate ? `next: ${entry.nextDate}` : null),
|
|
20068
20282
|
plain(entry.schedule)
|
|
20069
20283
|
]);
|
|
20070
|
-
case "chooseEvent": return barCopy(entry.title, [plain(
|
|
20284
|
+
case "chooseEvent": return barCopy(entry.title, [plain(entry.countLabel)]);
|
|
20071
20285
|
case "inProgress": return barCopy(entry.title, [plain("Booking in progress"), plain(entry.progress ? `Step ${entry.progress.current} of ${entry.progress.total}` : null)]);
|
|
20072
20286
|
case "booked": return barCopy("Booked", [plain(entry.shortWhen), plain(entry.places)]);
|
|
20073
20287
|
case "waitlisted": return barCopy("On the waitlist", [plain(entry.shortWhen)]);
|
|
@@ -20228,24 +20442,24 @@ function EventRegistrationSSR({ blockId, subject, loaderFailures, children, ...s
|
|
|
20228
20442
|
});
|
|
20229
20443
|
const display = islandProps.render.display;
|
|
20230
20444
|
const className = sourceProps.className;
|
|
20231
|
-
return /* @__PURE__ */ jsxs(
|
|
20232
|
-
|
|
20233
|
-
|
|
20234
|
-
|
|
20235
|
-
|
|
20236
|
-
|
|
20237
|
-
|
|
20238
|
-
|
|
20239
|
-
|
|
20240
|
-
|
|
20241
|
-
|
|
20242
|
-
|
|
20243
|
-
|
|
20244
|
-
|
|
20245
|
-
|
|
20246
|
-
|
|
20247
|
-
|
|
20248
|
-
]
|
|
20445
|
+
return /* @__PURE__ */ jsxs(IslandRoot, {
|
|
20446
|
+
kind: "event-registration",
|
|
20447
|
+
id: blockId,
|
|
20448
|
+
attributes: {
|
|
20449
|
+
className: `event-registration ${className ?? ""}`.trim(),
|
|
20450
|
+
"data-block": "event-registration",
|
|
20451
|
+
"data-rb-island-required": "true",
|
|
20452
|
+
"data-rb-island-error-message": "We couldn’t load the booking options for this event. Please refresh this page and try again. If this keeps happening, contact the organiser for help.",
|
|
20453
|
+
"data-rb-island-error-class": "event-registration__hydration-error"
|
|
20454
|
+
},
|
|
20455
|
+
value: islandProps,
|
|
20456
|
+
children: [display.state === "booking-card" ? /* @__PURE__ */ jsx("div", {
|
|
20457
|
+
id: EVENT_REGISTRATION_ANCHOR_ID,
|
|
20458
|
+
children: /* @__PURE__ */ jsx(BookingEntryCard, {
|
|
20459
|
+
entry: display.entry,
|
|
20460
|
+
buttonVariant: display.buttonVariant ?? "primary"
|
|
20461
|
+
})
|
|
20462
|
+
}) : /* @__PURE__ */ jsx(EventRegistrationShell, { display }), children]
|
|
20249
20463
|
});
|
|
20250
20464
|
}
|
|
20251
20465
|
function EventRegistrationShell({ display }) {
|
|
@@ -20537,18 +20751,22 @@ const FormNodeSSR = ({ blockId, lookSlots, value, submitLabel, successMessage, c
|
|
|
20537
20751
|
});
|
|
20538
20752
|
const display = islandProps.render.display;
|
|
20539
20753
|
const form = display.form;
|
|
20540
|
-
if (!form) return /* @__PURE__ */
|
|
20541
|
-
|
|
20542
|
-
|
|
20754
|
+
if (!form) return /* @__PURE__ */ jsx(IslandRoot, {
|
|
20755
|
+
kind: "form",
|
|
20756
|
+
id: blockId,
|
|
20757
|
+
value: islandProps,
|
|
20758
|
+
children: /* @__PURE__ */ jsx(FeedbackMessage, {
|
|
20543
20759
|
tone: "warning",
|
|
20544
20760
|
className: clsx("fb-empty", className),
|
|
20545
20761
|
role: "status",
|
|
20546
20762
|
children: "Missing or unknown form."
|
|
20547
|
-
})
|
|
20763
|
+
})
|
|
20548
20764
|
});
|
|
20549
|
-
return /* @__PURE__ */
|
|
20550
|
-
|
|
20551
|
-
|
|
20765
|
+
return /* @__PURE__ */ jsx(IslandRoot, {
|
|
20766
|
+
kind: "form",
|
|
20767
|
+
id: blockId,
|
|
20768
|
+
value: islandProps,
|
|
20769
|
+
children: /* @__PURE__ */ jsxs("form", {
|
|
20552
20770
|
method: "POST",
|
|
20553
20771
|
action,
|
|
20554
20772
|
onSubmit,
|
|
@@ -20577,7 +20795,7 @@ const FormNodeSSR = ({ blockId, lookSlots, value, submitLabel, successMessage, c
|
|
|
20577
20795
|
lookSlots: display.lookSlots
|
|
20578
20796
|
})
|
|
20579
20797
|
]
|
|
20580
|
-
})
|
|
20798
|
+
})
|
|
20581
20799
|
});
|
|
20582
20800
|
};
|
|
20583
20801
|
//#endregion
|
|
@@ -20778,11 +20996,15 @@ function NewsletterFormSSR(props) {
|
|
|
20778
20996
|
})
|
|
20779
20997
|
});
|
|
20780
20998
|
const { email: emailField, extra: extraFields } = partitionNewsletterFields(fields);
|
|
20781
|
-
return /* @__PURE__ */
|
|
20782
|
-
|
|
20783
|
-
|
|
20784
|
-
|
|
20785
|
-
|
|
20999
|
+
return /* @__PURE__ */ jsx(IslandRoot, {
|
|
21000
|
+
kind: "newsletter-form",
|
|
21001
|
+
id: blockId,
|
|
21002
|
+
attributes: {
|
|
21003
|
+
...listLookSlot(display, "panel"),
|
|
21004
|
+
className: clsx("newsletter-form-ssr", className)
|
|
21005
|
+
},
|
|
21006
|
+
value: islandProps,
|
|
21007
|
+
children: /* @__PURE__ */ jsxs("form", {
|
|
20786
21008
|
method: "POST",
|
|
20787
21009
|
className: "newsletter-form fb-form",
|
|
20788
21010
|
children: [
|
|
@@ -20827,7 +21049,7 @@ function NewsletterFormSSR(props) {
|
|
|
20827
21049
|
children: display.privacyNote
|
|
20828
21050
|
})
|
|
20829
21051
|
]
|
|
20830
|
-
})
|
|
21052
|
+
})
|
|
20831
21053
|
});
|
|
20832
21054
|
}
|
|
20833
21055
|
//#endregion
|
|
@@ -20839,18 +21061,18 @@ function ProductDetailSSR({ blockId, siteId, apiBaseUrl, stage, children, ...res
|
|
|
20839
21061
|
stage,
|
|
20840
21062
|
...rest
|
|
20841
21063
|
});
|
|
20842
|
-
return /* @__PURE__ */ jsxs(
|
|
20843
|
-
|
|
20844
|
-
id:
|
|
20845
|
-
|
|
20846
|
-
|
|
20847
|
-
|
|
20848
|
-
|
|
20849
|
-
|
|
20850
|
-
|
|
20851
|
-
|
|
20852
|
-
|
|
20853
|
-
]
|
|
21064
|
+
return /* @__PURE__ */ jsxs(IslandRoot, {
|
|
21065
|
+
kind: "product-detail",
|
|
21066
|
+
id: blockId,
|
|
21067
|
+
attributes: {
|
|
21068
|
+
className: `shop ${rest.className ?? ""}`.trim(),
|
|
21069
|
+
id: "shop",
|
|
21070
|
+
"data-shop": true,
|
|
21071
|
+
"data-block": "shop",
|
|
21072
|
+
"data-site-id": siteId ?? void 0
|
|
21073
|
+
},
|
|
21074
|
+
value: islandProps,
|
|
21075
|
+
children: [/* @__PURE__ */ jsx(ProductDetailServerContent, { render: islandProps.render }), children]
|
|
20854
21076
|
});
|
|
20855
21077
|
}
|
|
20856
21078
|
//#endregion
|
|
@@ -20862,18 +21084,18 @@ function ProductListSSR({ blockId, siteId, apiBaseUrl, stage, children, ...rest
|
|
|
20862
21084
|
stage,
|
|
20863
21085
|
...rest
|
|
20864
21086
|
});
|
|
20865
|
-
return /* @__PURE__ */ jsxs(
|
|
20866
|
-
|
|
20867
|
-
id:
|
|
20868
|
-
|
|
20869
|
-
|
|
20870
|
-
|
|
20871
|
-
|
|
20872
|
-
|
|
20873
|
-
|
|
20874
|
-
|
|
20875
|
-
|
|
20876
|
-
]
|
|
21087
|
+
return /* @__PURE__ */ jsxs(IslandRoot, {
|
|
21088
|
+
kind: "product-list",
|
|
21089
|
+
id: blockId,
|
|
21090
|
+
attributes: {
|
|
21091
|
+
className: `shop ${rest.className ?? ""}`.trim(),
|
|
21092
|
+
id: "shop",
|
|
21093
|
+
"data-shop": true,
|
|
21094
|
+
"data-block": "shop",
|
|
21095
|
+
"data-site-id": siteId ?? void 0
|
|
21096
|
+
},
|
|
21097
|
+
value: islandProps,
|
|
21098
|
+
children: [/* @__PURE__ */ jsx(ProductListServerContent, { render: islandProps.render }), children]
|
|
20877
21099
|
});
|
|
20878
21100
|
}
|
|
20879
21101
|
//#endregion
|
|
@@ -20886,18 +21108,18 @@ function ShopSSR({ blockId, siteId, apiBaseUrl, stage, children, checkoutEndpoin
|
|
|
20886
21108
|
...rest
|
|
20887
21109
|
});
|
|
20888
21110
|
const render = islandProps.render;
|
|
20889
|
-
return /* @__PURE__ */ jsxs(
|
|
20890
|
-
|
|
20891
|
-
id:
|
|
20892
|
-
|
|
20893
|
-
|
|
20894
|
-
|
|
20895
|
-
|
|
20896
|
-
|
|
20897
|
-
|
|
20898
|
-
|
|
20899
|
-
|
|
20900
|
-
]
|
|
21111
|
+
return /* @__PURE__ */ jsxs(IslandRoot, {
|
|
21112
|
+
kind: "shop",
|
|
21113
|
+
id: blockId,
|
|
21114
|
+
attributes: {
|
|
21115
|
+
className: `shop ${rest.className ?? ""}`.trim(),
|
|
21116
|
+
id: rest.mode === "checkout" ? "shop-checkout" : "shop",
|
|
21117
|
+
"data-shop": true,
|
|
21118
|
+
"data-block": "shop",
|
|
21119
|
+
"data-site-id": siteId ?? void 0
|
|
21120
|
+
},
|
|
21121
|
+
value: islandProps,
|
|
21122
|
+
children: [/* @__PURE__ */ jsx(ShopSsrProducts, { render }), children]
|
|
20901
21123
|
});
|
|
20902
21124
|
}
|
|
20903
21125
|
function ShopSsrProducts({ render }) {
|
|
@@ -37158,6 +37380,15 @@ const containerResponsiveThemeCss = `/*
|
|
|
37158
37380
|
}
|
|
37159
37381
|
}
|
|
37160
37382
|
|
|
37383
|
+
/* These panels own their paint; opaquePanels publishes its text and button pair. */
|
|
37384
|
+
:where(.theme-scope) :where([data-block='offerings-preview']) .event-quick-date {
|
|
37385
|
+
background: rgb(var(--tb-surface));
|
|
37386
|
+
}
|
|
37387
|
+
|
|
37388
|
+
:where(.theme-scope) :where([data-block='offerings-preview']) .offerings-preview-card--default {
|
|
37389
|
+
background: rgb(var(--tb-surface));
|
|
37390
|
+
}
|
|
37391
|
+
|
|
37161
37392
|
/* =============================================================================
|
|
37162
37393
|
* Featured-editorial testimonial compositions, promoted from the Fran André
|
|
37163
37394
|
* treatment study and keyed on the Look's composition intent.
|
|
@@ -37763,7 +37994,8 @@ const containerResponsiveThemeCss = `/*
|
|
|
37763
37994
|
/* ===================================================== CALENDAR LIST */
|
|
37764
37995
|
.theme-scope :where([data-arrangement][data-mode="list"]) [data-slot="list"] { list-style: none; margin: 0; padding: 0; }
|
|
37765
37996
|
.theme-scope :where([data-arrangement="ledger"], [data-arrangement="timetable-rows"], [data-arrangement="compact"]) :is([data-slot="row"], [data-slot="row-continued"]) { display: grid; grid-template-columns: 7rem minmax(0, 1fr) auto; column-gap: 1.25rem; align-items: center; padding-block: 1.125rem; }
|
|
37766
|
-
|
|
37997
|
+
/* A ledger leaves the date off a second session on the same day; the timetable repeats it, so each row reads on its own. */
|
|
37998
|
+
.theme-scope [data-arrangement="ledger"] [data-slot="row-continued"] [data-slot="date"] { visibility: hidden; }
|
|
37767
37999
|
.theme-scope :where([data-arrangement="ledger"], [data-arrangement="timetable-rows"], [data-arrangement="compact"]) [data-slot="date"] { grid-column: 1; }
|
|
37768
38000
|
.theme-scope :where([data-arrangement="ledger"], [data-arrangement="timetable-rows"], [data-arrangement="compact"]) [data-slot="what"] { grid-column: 2; }
|
|
37769
38001
|
.theme-scope :where([data-arrangement="ledger"], [data-arrangement="timetable-rows"], [data-arrangement="compact"]) [data-slot="action"] { grid-column: 3; justify-self: end; }
|
|
@@ -37993,6 +38225,8 @@ const containerResponsiveThemeCss = `/*
|
|
|
37993
38225
|
.theme-scope :is([data-slot="item-actions"], [data-slot="action"], .rb-feature-card .cta-row):not(:where([data-arrangement] *)) :is(a, button):only-child { padding: 0; min-height: 0; }
|
|
37994
38226
|
.theme-scope [data-arrangement] :is([data-slot="item-actions"], [data-slot="action"], .cta-row) :is(a, button):only-child:not(.button-primary, .button-secondary) { padding: 0; min-height: 0; }
|
|
37995
38227
|
.theme-scope [data-arrangement] [data-slot="more"] { grid-column: 1 / -1; }
|
|
38228
|
+
/* A group's "View all" link sits under its list; a group on its own panel spaces it with the panel's gap. */
|
|
38229
|
+
.theme-scope [data-arrangement] [data-list-group]:not([data-slot="panel"]) > [data-slot="more"] { display: inline-block; margin-top: 1.5rem; }
|
|
37996
38230
|
/* Capacity decoration is attached only to the places phrase. */
|
|
37997
38231
|
.theme-scope [data-arrangement] :is([data-availability="low"], [data-availability="full"]) [data-event-places]::before { content: ""; display: inline-block; width: 0.4em; height: 0.4em; margin-right: 0.45em; border-radius: 50%; vertical-align: 0.1em; }
|
|
37998
38232
|
.theme-scope [data-arrangement] [data-availability="low"] [data-event-places]::before { background: var(--rb-surface-mark-color); }
|
|
@@ -44462,12 +44696,12 @@ const containerResponsiveThemeCss = `/*
|
|
|
44462
44696
|
@scope ([data-rb-responsive-mode="container"]) to (:scope [data-rb-responsive-mode]) {
|
|
44463
44697
|
/* On phones the date is a line above the title, as on the session cards, so the session has the
|
|
44464
44698
|
* row's full width; the time and button take their own line under it. A row on the same day as the
|
|
44465
|
-
* one above leaves the date out. */
|
|
44699
|
+
* one above leaves the date out, except in the timetable, which repeats it on every row. */
|
|
44466
44700
|
[data-skin="brook"]:is(*, :scope) [data-arrangement]:is([data-treat="rows"], [data-treat="rows-panel"], [data-treat="timetable"], [data-treat="week-list"]) :is([data-slot="row"], [data-slot="row-continued"]) { grid-template-columns: minmax(0, 1fr); row-gap: 0.375rem; }
|
|
44467
44701
|
[data-skin="brook"]:is(*, :scope) [data-arrangement]:is([data-treat="rows"], [data-treat="rows-panel"], [data-treat="timetable"], [data-treat="week-list"]) :is([data-slot="date"], [data-slot="what"], [data-slot="time"], [data-slot="places"], [data-slot="action"]) { grid-column: 1; grid-row: auto; }
|
|
44468
44702
|
[data-skin="brook"]:is(*, :scope) [data-arrangement]:is([data-treat="rows"], [data-treat="rows-panel"], [data-treat="timetable"], [data-treat="week-list"]) [data-slot="date"] { display: flex; flex-direction: row; align-items: baseline; justify-content: start; gap: 0.375rem; min-width: 0; padding: 0; border: 0; text-align: start; }
|
|
44469
44703
|
[data-skin="brook"]:is(*, :scope) [data-arrangement]:is([data-treat="rows"], [data-treat="rows-panel"], [data-treat="timetable"], [data-treat="week-list"]) [data-slot="date"] [data-slot="day"] { font: 600 0.8125rem/1.2 var(--font-body); letter-spacing: 0.06em; color: var(--rb-surface-link-color); }
|
|
44470
|
-
[data-skin="brook"]:is(*, :scope) [data-arrangement]:is([data-treat="rows"], [data-treat="rows-panel"], [data-treat="
|
|
44704
|
+
[data-skin="brook"]:is(*, :scope) [data-arrangement]:is([data-treat="rows"], [data-treat="rows-panel"], [data-treat="week-list"]) [data-slot="row-continued"] [data-slot="date"] { display: none; }
|
|
44471
44705
|
[data-skin="brook"]:is(*, :scope) [data-arrangement][data-treat="timetable"] :is([data-slot="row"], [data-slot="row-continued"]) > [data-slot="item-actions"] { grid-column: 1; grid-row: auto; margin-top: 0.375rem; }
|
|
44472
44706
|
}
|
|
44473
44707
|
}
|
|
@@ -44833,7 +45067,8 @@ function planEditorReveal(target, ancestors, alignment = "nearest") {
|
|
|
44833
45067
|
const ancestorIndex = ancestors.findIndex(({ overflowY }) => /^(auto|scroll)$/.test(overflowY));
|
|
44834
45068
|
const viewport = ancestors[ancestorIndex];
|
|
44835
45069
|
if (!viewport || viewport.height <= 0 || viewport.scale <= 0) return null;
|
|
44836
|
-
const
|
|
45070
|
+
const inset = viewport.inset ?? 0;
|
|
45071
|
+
const delta = revealDelta((target.top - viewport.top) / viewport.scale - inset, (target.bottom - viewport.top) / viewport.scale - inset, viewport.height - inset, alignment);
|
|
44837
45072
|
const next = Math.max(0, Math.min(viewport.scrollHeight - viewport.height, viewport.scrollTop + delta));
|
|
44838
45073
|
return next === viewport.scrollTop ? null : {
|
|
44839
45074
|
ancestorIndex,
|
|
@@ -44842,11 +45077,23 @@ function planEditorReveal(target, ancestors, alignment = "nearest") {
|
|
|
44842
45077
|
}
|
|
44843
45078
|
function revealDelta(top, bottom, height, alignment) {
|
|
44844
45079
|
if (alignment === "start") return top;
|
|
44845
|
-
if (alignment === "center") return (top + bottom - height) / 2;
|
|
45080
|
+
if (alignment === "center") return bottom - top > height ? top : (top + bottom - height) / 2;
|
|
44846
45081
|
if (top <= 0 && bottom >= height) return 0;
|
|
44847
45082
|
if (top < 0 || bottom > height && bottom - top > height) return top;
|
|
44848
45083
|
return bottom > height ? bottom - height : 0;
|
|
44849
45084
|
}
|
|
45085
|
+
function documentViewport(root) {
|
|
45086
|
+
const inset = Number.parseFloat(getComputedStyle(root).scrollPaddingTop);
|
|
45087
|
+
return {
|
|
45088
|
+
overflowY: "auto",
|
|
45089
|
+
top: 0,
|
|
45090
|
+
height: root.clientHeight,
|
|
45091
|
+
scrollTop: root.scrollTop,
|
|
45092
|
+
scrollHeight: root.scrollHeight,
|
|
45093
|
+
scale: 1,
|
|
45094
|
+
inset: Number.isFinite(inset) ? inset : 0
|
|
45095
|
+
};
|
|
45096
|
+
}
|
|
44850
45097
|
function ancestorElements(element) {
|
|
44851
45098
|
const parent = element.parentElement;
|
|
44852
45099
|
return parent ? [parent, ...ancestorElements(parent)] : [];
|
|
@@ -44855,7 +45102,9 @@ function ancestorElements(element) {
|
|
|
44855
45102
|
function revealEditorElement(element, options = {}) {
|
|
44856
45103
|
if (!element || element.getClientRects().length === 0) return;
|
|
44857
45104
|
const ancestors = ancestorElements(element);
|
|
45105
|
+
const root = options.scrollDocument ? document.scrollingElement : null;
|
|
44858
45106
|
const measurements = ancestors.map((ancestor) => {
|
|
45107
|
+
if (ancestor === root) return documentViewport(ancestor);
|
|
44859
45108
|
const rect = ancestor.getBoundingClientRect();
|
|
44860
45109
|
const scale = ancestor.offsetHeight > 0 ? rect.height / ancestor.offsetHeight : 1;
|
|
44861
45110
|
return {
|
|
@@ -45554,6 +45803,11 @@ const WHOLE_SERIES = { waitlistClaimResolve: {
|
|
|
45554
45803
|
authScope: "portal"
|
|
45555
45804
|
} };
|
|
45556
45805
|
const SHOP = {
|
|
45806
|
+
listPublicPasses: {
|
|
45807
|
+
path: "/public/sites/{siteId}/bookings/products/passes",
|
|
45808
|
+
method: "GET",
|
|
45809
|
+
authScope: "public"
|
|
45810
|
+
},
|
|
45557
45811
|
listProducts: {
|
|
45558
45812
|
path: "/public/sites/{siteId}/products",
|
|
45559
45813
|
method: "GET",
|
|
@@ -46124,6 +46378,14 @@ function createBlockApi(config) {
|
|
|
46124
46378
|
async submitBookingWithPackage(data) {
|
|
46125
46379
|
return request(BOOKINGS.createAppointmentWithPackage, { body: data });
|
|
46126
46380
|
},
|
|
46381
|
+
async listPublicPasses(params) {
|
|
46382
|
+
const path = buildPath(SHOP.listPublicPasses.path, { siteId: requireSiteId() });
|
|
46383
|
+
const result = await request(SHOP.listPublicPasses, {
|
|
46384
|
+
path,
|
|
46385
|
+
query: params
|
|
46386
|
+
});
|
|
46387
|
+
return publicPassProductCollectionSchema.parse(result);
|
|
46388
|
+
},
|
|
46127
46389
|
async getEligibleAppointmentPackages(params) {
|
|
46128
46390
|
return request(BOOKINGS.getEligibleAppointmentPackages, { query: {
|
|
46129
46391
|
serviceId: params.serviceId,
|
|
@@ -46692,6 +46954,15 @@ function useBlockApi() {
|
|
|
46692
46954
|
if (!client) throw new Error("useBlockApi must be used within a BlockApiProvider. Make sure your component is wrapped with <BlockApiProvider>.");
|
|
46693
46955
|
return client;
|
|
46694
46956
|
}
|
|
46957
|
+
/**
|
|
46958
|
+
* Hook to optionally access the Block API Client
|
|
46959
|
+
*
|
|
46960
|
+
* Returns null if not within a BlockApiProvider.
|
|
46961
|
+
* Useful for components that can work with or without the API client.
|
|
46962
|
+
*/
|
|
46963
|
+
function useBlockApiOptional() {
|
|
46964
|
+
return useContext(BlockApiContext);
|
|
46965
|
+
}
|
|
46695
46966
|
//#endregion
|
|
46696
46967
|
//#region ../blocks/src/system/runtime/api/types/discounts.ts
|
|
46697
46968
|
function discountAvailabilityHasDiscounts(availability) {
|
|
@@ -46709,6 +46980,52 @@ function getAutoAppliedDiscountPreview(availability) {
|
|
|
46709
46980
|
}
|
|
46710
46981
|
}
|
|
46711
46982
|
//#endregion
|
|
46983
|
+
//#region ../blocks/src/system/runtime/shared/navigation/NavigationHandOffPanel.tsx
|
|
46984
|
+
function NavigationHandOffPanel(props) {
|
|
46985
|
+
const [opened, setOpened] = useState(false);
|
|
46986
|
+
const payment = props.purpose === "payment";
|
|
46987
|
+
const offering = props.offeringLabel?.toLowerCase() ?? "event";
|
|
46988
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
46989
|
+
className: "rb-reg-stack er-stack",
|
|
46990
|
+
"aria-live": "polite",
|
|
46991
|
+
children: [
|
|
46992
|
+
/* @__PURE__ */ jsx("h3", {
|
|
46993
|
+
className: "er-title",
|
|
46994
|
+
children: opened ? "Finish booking in the new tab" : payment ? "Finish paying in a new tab" : "Continue in a new tab"
|
|
46995
|
+
}),
|
|
46996
|
+
!opened && /* @__PURE__ */ jsx("p", {
|
|
46997
|
+
className: "er-text",
|
|
46998
|
+
children: handOffDescription(props, offering)
|
|
46999
|
+
}),
|
|
47000
|
+
opened && /* @__PURE__ */ jsxs("p", { children: ["Tab didn't open? ", /* @__PURE__ */ jsx("a", {
|
|
47001
|
+
href: props.handOff.url,
|
|
47002
|
+
target: "_blank",
|
|
47003
|
+
rel: "noopener",
|
|
47004
|
+
children: "Open the booking page"
|
|
47005
|
+
})] }),
|
|
47006
|
+
!opened && /* @__PURE__ */ jsx("a", {
|
|
47007
|
+
className: "rb-button",
|
|
47008
|
+
href: props.handOff.url,
|
|
47009
|
+
target: "_blank",
|
|
47010
|
+
rel: "noopener",
|
|
47011
|
+
onClick: () => setOpened(true),
|
|
47012
|
+
children: payment ? "Pay in a new tab" : "Continue in a new tab"
|
|
47013
|
+
}),
|
|
47014
|
+
/* @__PURE__ */ jsx("button", {
|
|
47015
|
+
type: "button",
|
|
47016
|
+
className: "er-portal-auth-link",
|
|
47017
|
+
onClick: props.onBack,
|
|
47018
|
+
children: props.purpose === "signIn" ? `Back to pay for this ${offering} instead` : "Back to my booking"
|
|
47019
|
+
})
|
|
47020
|
+
]
|
|
47021
|
+
});
|
|
47022
|
+
}
|
|
47023
|
+
function handOffDescription(props, offering) {
|
|
47024
|
+
if (props.purpose === "payment") return "We'll open a secure payment page in a new tab. Your booking is confirmed once you've paid.";
|
|
47025
|
+
if (props.purpose === "signIn") return `You'll need to sign in to use a pass or membership. We'll open ${props.businessName ?? "the business"}'s booking page in a new tab, with this ${offering} already picked, and you can finish booking there. You'll need to enter your booking details again.`;
|
|
47026
|
+
return "Open the booking page in a new tab to continue.";
|
|
47027
|
+
}
|
|
47028
|
+
//#endregion
|
|
46712
47029
|
//#region ../blocks/src/system/runtime/nodes/booking-form.date-display.ts
|
|
46713
47030
|
/**
|
|
46714
47031
|
* Appointments happen at the business, so every day and clock in the flow is
|
|
@@ -47129,6 +47446,23 @@ function omitBookingConsentEntries(record) {
|
|
|
47129
47446
|
function isBookingFieldValue(value) {
|
|
47130
47447
|
return value === null || typeof value === "string" || typeof value === "number" || typeof value === "boolean" || Array.isArray(value) && value.every((item) => typeof item === "string");
|
|
47131
47448
|
}
|
|
47449
|
+
//#endregion
|
|
47450
|
+
//#region ../blocks/src/system/runtime/nodes/booking-form.sign-in-return.ts
|
|
47451
|
+
const packagePurchaseSchema = z.discriminatedUnion("kind", [z.object({ kind: z.literal("none") }), z.object({
|
|
47452
|
+
kind: z.literal("selected"),
|
|
47453
|
+
package: z.object({
|
|
47454
|
+
id: z.string(),
|
|
47455
|
+
name: z.string(),
|
|
47456
|
+
price: z.number(),
|
|
47457
|
+
currency: z.string(),
|
|
47458
|
+
creditsTotal: z.number(),
|
|
47459
|
+
validDays: z.number().nullable(),
|
|
47460
|
+
heldWithTeamMember: z.object({
|
|
47461
|
+
id: z.string(),
|
|
47462
|
+
name: z.string()
|
|
47463
|
+
}).nullable()
|
|
47464
|
+
})
|
|
47465
|
+
})]);
|
|
47132
47466
|
/** The appointment form's drafts, for the shared `useSignInReturn` owner. */
|
|
47133
47467
|
const bookingSignInDraftStore = createSignInReturnDraftStore(z.object({
|
|
47134
47468
|
nonce: z.string().min(1),
|
|
@@ -47164,6 +47498,8 @@ const bookingSignInDraftStore = createSignInReturnDraftStore(z.object({
|
|
|
47164
47498
|
"instalment_plan",
|
|
47165
47499
|
"flexible_balance"
|
|
47166
47500
|
]).optional(),
|
|
47501
|
+
selectedAppointmentPackageId: z.string().optional(),
|
|
47502
|
+
packagePurchase: packagePurchaseSchema,
|
|
47167
47503
|
discountCode: z.string(),
|
|
47168
47504
|
questions: bookingQuestionsAnswerDraftSchema
|
|
47169
47505
|
}));
|
|
@@ -47187,6 +47523,8 @@ function toBookingSignInDraft(state, attempt) {
|
|
|
47187
47523
|
mailingListOptIn: state.mailingListOptIn,
|
|
47188
47524
|
selectedSlidingAmountInput: state.selectedSlidingAmountInput,
|
|
47189
47525
|
selectedCollectionOptionKind: state.selectedCollectionOptionKind,
|
|
47526
|
+
selectedAppointmentPackageId: state.selectedAppointmentPackageId,
|
|
47527
|
+
packagePurchase: state.packagePurchase,
|
|
47190
47528
|
discountCode: state.discountCode,
|
|
47191
47529
|
questions: toBookingQuestionsAnswerDraft(state.bookingQuestions)
|
|
47192
47530
|
};
|
|
@@ -47217,6 +47555,8 @@ function restoreBookingSignInDraft(state, draft, questions) {
|
|
|
47217
47555
|
mailingListOptIn: draft.mailingListOptIn,
|
|
47218
47556
|
selectedSlidingAmountInput: draft.selectedSlidingAmountInput,
|
|
47219
47557
|
selectedCollectionOptionKind: draft.selectedCollectionOptionKind,
|
|
47558
|
+
selectedAppointmentPackageId: draft.selectedAppointmentPackageId ? unsafeAsCustomerPassId(draft.selectedAppointmentPackageId) : void 0,
|
|
47559
|
+
packagePurchase: draft.packagePurchase,
|
|
47220
47560
|
discountCode: draft.discountCode,
|
|
47221
47561
|
bookingQuestions: restoreBookingQuestionsAnswers(state.bookingQuestions, questions)
|
|
47222
47562
|
};
|
|
@@ -48259,6 +48599,7 @@ function executeBookingSubmission$1(api, data) {
|
|
|
48259
48599
|
bookingQuestions: data.bookingQuestions,
|
|
48260
48600
|
mailingListOptIn: data.mailingListOptIn,
|
|
48261
48601
|
timezone: data.timezone,
|
|
48602
|
+
...data.kind === "package_purchase" ? { purchasePassId: data.purchasePassId } : {},
|
|
48262
48603
|
shownTerms: data.shownTerms,
|
|
48263
48604
|
discountCode: data.discountCode,
|
|
48264
48605
|
selectedSlidingAmount: data.selectedSlidingAmount,
|
|
@@ -48348,6 +48689,7 @@ const unsafeAsBookingFieldId = (id) => id;
|
|
|
48348
48689
|
function createInitialBookingFlowReducerState(input) {
|
|
48349
48690
|
const initialData = input.initialData ?? {};
|
|
48350
48691
|
return {
|
|
48692
|
+
packagePurchase: { kind: "none" },
|
|
48351
48693
|
phase: "editing",
|
|
48352
48694
|
currentStepId: "service-selection",
|
|
48353
48695
|
selectedServiceId: toOptionalAppointmentServiceId(toOptionalString(initialData.serviceId) ?? input.defaultServiceId),
|
|
@@ -48415,6 +48757,11 @@ function reduceBookingFlowEvent(state, event) {
|
|
|
48415
48757
|
...event,
|
|
48416
48758
|
state
|
|
48417
48759
|
}).reduce(reduceBookingFlowEvent, state);
|
|
48760
|
+
case "purchasable-packages-received": return applyBookingPackagePurchaseRefresh(state, event.packages);
|
|
48761
|
+
case "unrestricted-held-packages-received": return {
|
|
48762
|
+
...state,
|
|
48763
|
+
unrestrictedHeldPackageServiceId: event.serviceId
|
|
48764
|
+
};
|
|
48418
48765
|
case "packages-received": return planBookingPackageAcceptance({
|
|
48419
48766
|
...event,
|
|
48420
48767
|
state
|
|
@@ -48423,6 +48770,7 @@ function reduceBookingFlowEvent(state, event) {
|
|
|
48423
48770
|
case "resource-selected": return {
|
|
48424
48771
|
...state,
|
|
48425
48772
|
selectedResourceId: event.resourceId ?? void 0,
|
|
48773
|
+
packagePurchase: { kind: "none" },
|
|
48426
48774
|
selectedDate: void 0,
|
|
48427
48775
|
selectedSlot: null,
|
|
48428
48776
|
validationErrors: clearBookingFormError(state.validationErrors)
|
|
@@ -48490,6 +48838,7 @@ function reduceBookingFlowEvent(state, event) {
|
|
|
48490
48838
|
review: null,
|
|
48491
48839
|
paymentChoices: event.paymentChoices,
|
|
48492
48840
|
selectedCollectionOptionKind: void 0,
|
|
48841
|
+
packagePurchase: { kind: "none" },
|
|
48493
48842
|
currentStepId: "payment-selection",
|
|
48494
48843
|
feedback: {
|
|
48495
48844
|
kind: "error",
|
|
@@ -48511,6 +48860,15 @@ function reduceBookingFlowEvent(state, event) {
|
|
|
48511
48860
|
default: return assertNever$2(event);
|
|
48512
48861
|
}
|
|
48513
48862
|
}
|
|
48863
|
+
/** Changed purchase facts invalidate a price review; identical refreshes preserve the current intent. */
|
|
48864
|
+
function applyBookingPackagePurchaseRefresh(state, packages) {
|
|
48865
|
+
const packagePurchase = reconcileBookingPackagePurchase(state.packagePurchase, packages);
|
|
48866
|
+
return packagePurchase === state.packagePurchase ? state : {
|
|
48867
|
+
...state,
|
|
48868
|
+
packagePurchase,
|
|
48869
|
+
review: null
|
|
48870
|
+
};
|
|
48871
|
+
}
|
|
48514
48872
|
/** Answering a question clears the server's complaint about that question. */
|
|
48515
48873
|
function applyBookingQuestionsFlowEvent(state, event) {
|
|
48516
48874
|
const bookingQuestions = applyAppointmentBookingQuestionsEvent(state.bookingQuestions, event);
|
|
@@ -48528,9 +48886,11 @@ function applyBookingQuestionsFlowEvent(state, event) {
|
|
|
48528
48886
|
function applyBookingServiceSelection(state, serviceId) {
|
|
48529
48887
|
return {
|
|
48530
48888
|
...state,
|
|
48889
|
+
packagePurchase: { kind: "none" },
|
|
48531
48890
|
bookingQuestions: EMPTY_APPOINTMENT_BOOKING_QUESTIONS,
|
|
48532
48891
|
questionFieldErrors: {},
|
|
48533
48892
|
selectedServiceId: serviceId,
|
|
48893
|
+
unrestrictedHeldPackageServiceId: void 0,
|
|
48534
48894
|
selectedResourceId: void 0,
|
|
48535
48895
|
selectedDate: void 0,
|
|
48536
48896
|
selectedSlot: null,
|
|
@@ -48601,6 +48961,7 @@ function toBookingFormData(state) {
|
|
|
48601
48961
|
discountCode: state.discountCode || void 0,
|
|
48602
48962
|
selectedSlidingAmountInput: state.selectedSlidingAmountInput || void 0,
|
|
48603
48963
|
selectedCollectionOptionKind: state.selectedCollectionOptionKind,
|
|
48964
|
+
...state.packagePurchase.kind === "selected" ? { packagePurchase: state.packagePurchase } : {},
|
|
48604
48965
|
selectedAppointmentPackageId: state.selectedAppointmentPackageId
|
|
48605
48966
|
};
|
|
48606
48967
|
}
|
|
@@ -48645,10 +49006,14 @@ function buildBookingStepResolution(input) {
|
|
|
48645
49006
|
}
|
|
48646
49007
|
function resolveBookingStepVisibility(input, defaultServiceId, payment) {
|
|
48647
49008
|
const hasValidConfiguredService = Boolean(defaultServiceId) && input.services.some((service) => service.id === defaultServiceId);
|
|
49009
|
+
const service = resolveBookingSelectedService({
|
|
49010
|
+
...input,
|
|
49011
|
+
defaultServiceId
|
|
49012
|
+
});
|
|
48648
49013
|
return {
|
|
48649
49014
|
needsServiceSelection: [
|
|
48650
49015
|
input.requiresServiceSelection,
|
|
48651
|
-
input.requiresResourceSelection,
|
|
49016
|
+
bookingRequiresResourceSelection(service, input.requiresResourceSelection),
|
|
48652
49017
|
!hasValidConfiguredService && input.services.length > 1,
|
|
48653
49018
|
(input.form?.settings?.serviceIds?.length ?? 0) > 1
|
|
48654
49019
|
].some(Boolean),
|
|
@@ -48657,11 +49022,17 @@ function resolveBookingStepVisibility(input, defaultServiceId, payment) {
|
|
|
48657
49022
|
};
|
|
48658
49023
|
}
|
|
48659
49024
|
function needsBookingPaymentStep(input, payment) {
|
|
48660
|
-
|
|
49025
|
+
if (input.form?.settings?.requiresApproval) return false;
|
|
49026
|
+
return [
|
|
49027
|
+
bookingHasPackagePaymentChoices(payment.service),
|
|
49028
|
+
getBookingServiceSlidingScale(payment.service),
|
|
49029
|
+
payment.mode !== "hidden",
|
|
49030
|
+
input.enableAppointmentPackages && (payment.service?.priceAmount ?? 0) > 0
|
|
49031
|
+
].some(Boolean);
|
|
48661
49032
|
}
|
|
48662
49033
|
/** The service step needs a service, and a practitioner when the form insists on one. */
|
|
48663
49034
|
function serviceSelectionMessage(input) {
|
|
48664
|
-
if (input.requiresResourceSelection && !(input.data.resourceId ?? input.defaultResourceId)) return "Please select a practitioner";
|
|
49035
|
+
if (bookingRequiresResourceSelection(resolveBookingSelectedService(input), input.requiresResourceSelection) && !(input.data.resourceId ?? input.defaultResourceId)) return "Please select a practitioner";
|
|
48665
49036
|
return input.data.serviceId ? null : "Please select a service";
|
|
48666
49037
|
}
|
|
48667
49038
|
function validateBookingStep(input) {
|
|
@@ -48690,7 +49061,8 @@ function bookingStepValidationFromMessage(message) {
|
|
|
48690
49061
|
} : { ok: true };
|
|
48691
49062
|
}
|
|
48692
49063
|
function validateBookingPaymentStep(input) {
|
|
48693
|
-
|
|
49064
|
+
const packageValidation = validateBookingPackagePayment(input);
|
|
49065
|
+
if (packageValidation) return packageValidation;
|
|
48694
49066
|
const resolution = input.paymentResolution ?? resolveBookingPaymentStep(input);
|
|
48695
49067
|
const slidingScale = getBookingServiceSlidingScale(resolution.service);
|
|
48696
49068
|
if (slidingScale && !isBookingServiceSlidingAmountInRange(slidingScale, parseBookingCurrencyInputToCents(input.data.selectedSlidingAmountInput))) return bookingStepValidationFromMessage("Please choose an amount within the sliding scale");
|
|
@@ -48861,12 +49233,15 @@ function buildBookingSubmitPlan(input) {
|
|
|
48861
49233
|
}
|
|
48862
49234
|
return {
|
|
48863
49235
|
ok: true,
|
|
48864
|
-
redirect: input.redirect,
|
|
48865
49236
|
value: finalizeBookingSubmissionCommand(prepared.value, input)
|
|
48866
49237
|
};
|
|
48867
49238
|
}
|
|
48868
49239
|
function validateBookingSubmissionContact(input) {
|
|
48869
|
-
if (
|
|
49240
|
+
if (bookingRequiresResourceSelection(resolveBookingSelectedService({
|
|
49241
|
+
services: input.services,
|
|
49242
|
+
data: toBookingFormData(input.state),
|
|
49243
|
+
defaultServiceId: input.defaultServiceId
|
|
49244
|
+
}), input.requiresResourceSelection) && !(input.state.selectedResourceId ?? input.defaultResourceId)) {
|
|
48870
49245
|
const message = "Please select a practitioner";
|
|
48871
49246
|
return {
|
|
48872
49247
|
ok: false,
|
|
@@ -49198,7 +49573,7 @@ function planBookingPackageAcceptance(input) {
|
|
|
49198
49573
|
}] : [];
|
|
49199
49574
|
}
|
|
49200
49575
|
function isBookingPaymentEvent(event) {
|
|
49201
|
-
return event.type === "payment-option-selected" || event.type === "sliding-amount-changed" || event.type === "appointment-package-selected" || event.type === "discount-code-changed";
|
|
49576
|
+
return event.type === "payment-option-selected" || event.type === "sliding-amount-changed" || event.type === "appointment-package-selected" || event.type === "purchase-package-selected" || event.type === "discount-code-changed";
|
|
49202
49577
|
}
|
|
49203
49578
|
function applyBookingPaymentEvent(state, event) {
|
|
49204
49579
|
const change = bookingPaymentEventChange(event);
|
|
@@ -49211,17 +49586,28 @@ function applyBookingPaymentEvent(state, event) {
|
|
|
49211
49586
|
function bookingPaymentEventChange(event) {
|
|
49212
49587
|
switch (event.type) {
|
|
49213
49588
|
case "payment-option-selected": return {
|
|
49589
|
+
packagePurchase: { kind: "none" },
|
|
49214
49590
|
selectedCollectionOptionKind: event.kind ?? void 0,
|
|
49215
49591
|
selectedAppointmentPackageId: void 0
|
|
49216
49592
|
};
|
|
49217
49593
|
case "sliding-amount-changed": return {
|
|
49594
|
+
packagePurchase: { kind: "none" },
|
|
49218
49595
|
selectedSlidingAmountInput: event.value,
|
|
49219
49596
|
selectedAppointmentPackageId: void 0
|
|
49220
49597
|
};
|
|
49221
49598
|
case "appointment-package-selected": return {
|
|
49599
|
+
packagePurchase: { kind: "none" },
|
|
49222
49600
|
selectedAppointmentPackageId: event.packageId ?? void 0,
|
|
49223
49601
|
selectedCollectionOptionKind: void 0
|
|
49224
49602
|
};
|
|
49603
|
+
case "purchase-package-selected": return {
|
|
49604
|
+
packagePurchase: event.package ? {
|
|
49605
|
+
kind: "selected",
|
|
49606
|
+
package: event.package
|
|
49607
|
+
} : { kind: "none" },
|
|
49608
|
+
selectedAppointmentPackageId: void 0,
|
|
49609
|
+
selectedCollectionOptionKind: void 0
|
|
49610
|
+
};
|
|
49225
49611
|
case "discount-code-changed": return { discountCode: event.code };
|
|
49226
49612
|
}
|
|
49227
49613
|
}
|
|
@@ -49229,7 +49615,8 @@ function changesBookingIntent(event) {
|
|
|
49229
49615
|
return changesBookingPaymentFacts(event) || [
|
|
49230
49616
|
"field-updated",
|
|
49231
49617
|
"discount-code-changed",
|
|
49232
|
-
"appointment-package-selected"
|
|
49618
|
+
"appointment-package-selected",
|
|
49619
|
+
"purchase-package-selected"
|
|
49233
49620
|
].includes(event.type);
|
|
49234
49621
|
}
|
|
49235
49622
|
/** Applies server-owned recovery facts to the existing catalogue model. */
|
|
@@ -49239,6 +49626,13 @@ function applyBookingPaymentChoices(services, choices) {
|
|
|
49239
49626
|
...choices
|
|
49240
49627
|
} : service) : services;
|
|
49241
49628
|
}
|
|
49629
|
+
function validateBookingPackagePayment(input) {
|
|
49630
|
+
switch (resolveBookingPackagePaymentSelection(input.data, resolveBookingSelectedService(input))) {
|
|
49631
|
+
case "selected": return { ok: true };
|
|
49632
|
+
case "required": return bookingStepValidationFromMessage("Please choose a payment option");
|
|
49633
|
+
case "per_session": return null;
|
|
49634
|
+
}
|
|
49635
|
+
}
|
|
49242
49636
|
//#endregion
|
|
49243
49637
|
//#region ../blocks/src/system/runtime/hooks/useBookingChoices.ts
|
|
49244
49638
|
const NO_PACKAGES = { packages: [] };
|
|
@@ -49254,18 +49648,23 @@ function useBookingChoices(input) {
|
|
|
49254
49648
|
label: item.label
|
|
49255
49649
|
}));
|
|
49256
49650
|
}, [input.api]);
|
|
49257
|
-
const
|
|
49258
|
-
|
|
49259
|
-
|
|
49260
|
-
|
|
49261
|
-
serviceId,
|
|
49651
|
+
const loadPurchasablePackages = useCallback(async (_key) => {
|
|
49652
|
+
if (!input.serviceId) return [];
|
|
49653
|
+
return toBookingPurchasablePackages((await input.api.listPublicPasses({
|
|
49654
|
+
serviceId: input.serviceId,
|
|
49262
49655
|
...input.selectedResourceId ? { teamMemberId: input.selectedResourceId } : {}
|
|
49263
|
-
});
|
|
49656
|
+
})).passes);
|
|
49264
49657
|
}, [
|
|
49265
49658
|
input.api,
|
|
49266
49659
|
input.serviceId,
|
|
49267
49660
|
input.selectedResourceId
|
|
49268
49661
|
]);
|
|
49662
|
+
const acceptPurchasablePackages = useCallback((packages) => {
|
|
49663
|
+
latest.current.dispatch({
|
|
49664
|
+
type: "purchasable-packages-received",
|
|
49665
|
+
packages
|
|
49666
|
+
});
|
|
49667
|
+
}, []);
|
|
49269
49668
|
const acceptResources = useCallback((resources) => {
|
|
49270
49669
|
const current = latest.current;
|
|
49271
49670
|
current.dispatch({
|
|
@@ -49275,23 +49674,19 @@ function useBookingChoices(input) {
|
|
|
49275
49674
|
autoSelect: current.autoSelectSingleResource
|
|
49276
49675
|
});
|
|
49277
49676
|
}, []);
|
|
49278
|
-
const acceptPackages = useCallback((response) => {
|
|
49279
|
-
latest.current.dispatch({
|
|
49280
|
-
type: "packages-received",
|
|
49281
|
-
packages: response.packages
|
|
49282
|
-
});
|
|
49283
|
-
}, []);
|
|
49284
49677
|
const resources = useBookingChoicesRequest(input.serviceId ?? null, loadResources, acceptResources, "Failed to load booking resources.");
|
|
49285
|
-
const packagesResponse =
|
|
49678
|
+
const packagesResponse = useBookingPackageEligibility(input);
|
|
49679
|
+
const purchasablePackages = useBookingChoicesRequest(bookingPackageRequestKey(input.canLoadPurchasablePackages, input.serviceId, input.selectedResourceId), loadPurchasablePackages, acceptPurchasablePackages, "Failed to load packages.");
|
|
49286
49680
|
useEffect(() => {
|
|
49287
|
-
if (!input.
|
|
49288
|
-
}, [input.
|
|
49681
|
+
if (!input.canLoadPurchasablePackages) acceptPurchasablePackages([]);
|
|
49682
|
+
}, [input.canLoadPurchasablePackages, acceptPurchasablePackages]);
|
|
49289
49683
|
return {
|
|
49290
49684
|
resources,
|
|
49291
49685
|
packages: useMemo(() => packagesResponse.tag === "loaded" ? {
|
|
49292
49686
|
tag: "loaded",
|
|
49293
49687
|
value: packagesResponse.value.packages
|
|
49294
49688
|
} : packagesResponse, [packagesResponse]),
|
|
49689
|
+
purchasablePackages,
|
|
49295
49690
|
heldPackageTeamMembers: packagesResponse.tag === "loaded" && !input.selectedResourceId ? packagesResponse.value.heldPackageTeamMembers ?? [] : [],
|
|
49296
49691
|
resourceFacts: input.serviceId && resources.tag === "loaded" ? {
|
|
49297
49692
|
serviceId: input.serviceId,
|
|
@@ -49299,6 +49694,56 @@ function useBookingChoices(input) {
|
|
|
49299
49694
|
} : null
|
|
49300
49695
|
};
|
|
49301
49696
|
}
|
|
49697
|
+
/** Unscoped eligibility resolves practitioner admission independently of the selected practitioner. */
|
|
49698
|
+
function useBookingPackageEligibility(input) {
|
|
49699
|
+
const latest = useRef(input);
|
|
49700
|
+
useLayoutEffect(() => {
|
|
49701
|
+
latest.current = input;
|
|
49702
|
+
}, [input]);
|
|
49703
|
+
const loadAny = useCallback(async () => input.serviceId ? input.api.getEligibleAppointmentPackages({ serviceId: input.serviceId }) : NO_PACKAGES, [input.api, input.serviceId]);
|
|
49704
|
+
const loadScoped = useCallback(async () => input.serviceId && input.selectedResourceId ? input.api.getEligibleAppointmentPackages({
|
|
49705
|
+
serviceId: input.serviceId,
|
|
49706
|
+
teamMemberId: input.selectedResourceId
|
|
49707
|
+
}) : NO_PACKAGES, [
|
|
49708
|
+
input.api,
|
|
49709
|
+
input.serviceId,
|
|
49710
|
+
input.selectedResourceId
|
|
49711
|
+
]);
|
|
49712
|
+
const accept = useCallback((response) => {
|
|
49713
|
+
latest.current.dispatch({
|
|
49714
|
+
type: "packages-received",
|
|
49715
|
+
packages: response.packages
|
|
49716
|
+
});
|
|
49717
|
+
}, []);
|
|
49718
|
+
const acceptAny = useCallback((response) => {
|
|
49719
|
+
const current = latest.current;
|
|
49720
|
+
current.dispatch({
|
|
49721
|
+
type: "unrestricted-held-packages-received",
|
|
49722
|
+
serviceId: response.packages.length ? current.serviceId : void 0
|
|
49723
|
+
});
|
|
49724
|
+
if (!current.selectedResourceId) accept(response);
|
|
49725
|
+
}, [accept]);
|
|
49726
|
+
const any = useBookingChoicesRequest(bookingPackageRequestKey(input.canLoadPackages, input.serviceId, null), loadAny, acceptAny, "Could not check package credits.");
|
|
49727
|
+
const scoped = useBookingChoicesRequest(bookingPackageRequestKey(input.canLoadPackages && !!input.selectedResourceId, input.serviceId, input.selectedResourceId), loadScoped, accept, "Could not check package credits.");
|
|
49728
|
+
useEffect(() => {
|
|
49729
|
+
if (!input.canLoadPackages) {
|
|
49730
|
+
accept(NO_PACKAGES);
|
|
49731
|
+
acceptAny(NO_PACKAGES);
|
|
49732
|
+
}
|
|
49733
|
+
}, [
|
|
49734
|
+
input.canLoadPackages,
|
|
49735
|
+
accept,
|
|
49736
|
+
acceptAny
|
|
49737
|
+
]);
|
|
49738
|
+
useEffect(() => {
|
|
49739
|
+
if (!input.selectedResourceId && any.tag === "loaded") accept(any.value);
|
|
49740
|
+
}, [
|
|
49741
|
+
input.selectedResourceId,
|
|
49742
|
+
any,
|
|
49743
|
+
accept
|
|
49744
|
+
]);
|
|
49745
|
+
return input.selectedResourceId ? scoped : any;
|
|
49746
|
+
}
|
|
49302
49747
|
function useBookingChoicesRequest(key, load, accept, errorMessage) {
|
|
49303
49748
|
const [receipt, setReceipt] = useState({
|
|
49304
49749
|
key: null,
|
|
@@ -49348,7 +49793,6 @@ function useBookingChoicesRequest(key, load, accept, errorMessage) {
|
|
|
49348
49793
|
function planBookingSubmissionCompletion(input) {
|
|
49349
49794
|
const { data } = input;
|
|
49350
49795
|
if (data.type === "review_required") return {
|
|
49351
|
-
navigation: { kind: "none" },
|
|
49352
49796
|
events: [{
|
|
49353
49797
|
type: "review-required",
|
|
49354
49798
|
review: data.review
|
|
@@ -49360,7 +49804,6 @@ function planBookingSubmissionCompletion(input) {
|
|
|
49360
49804
|
}
|
|
49361
49805
|
};
|
|
49362
49806
|
if (data.type === "payment_choice_required") return {
|
|
49363
|
-
navigation: { kind: "none" },
|
|
49364
49807
|
events: [{
|
|
49365
49808
|
type: "payment-choice-required",
|
|
49366
49809
|
paymentChoices: data.paymentChoices
|
|
@@ -49378,10 +49821,6 @@ function planBookingSubmissionCompletion(input) {
|
|
|
49378
49821
|
};
|
|
49379
49822
|
if (data.type === "checkout_redirect") return {
|
|
49380
49823
|
events: [],
|
|
49381
|
-
navigation: input.redirect === "auto" ? {
|
|
49382
|
-
kind: "checkout",
|
|
49383
|
-
url: data.checkoutUrl
|
|
49384
|
-
} : { kind: "none" },
|
|
49385
49824
|
result: {
|
|
49386
49825
|
ok: true,
|
|
49387
49826
|
outcome: {
|
|
@@ -49393,7 +49832,6 @@ function planBookingSubmissionCompletion(input) {
|
|
|
49393
49832
|
}
|
|
49394
49833
|
};
|
|
49395
49834
|
if (data.type === "requested") return {
|
|
49396
|
-
navigation: { kind: "none" },
|
|
49397
49835
|
events: [{
|
|
49398
49836
|
type: "feedback-set",
|
|
49399
49837
|
feedback: {
|
|
@@ -49418,7 +49856,6 @@ function planBookingSubmissionCompletion(input) {
|
|
|
49418
49856
|
}
|
|
49419
49857
|
};
|
|
49420
49858
|
return {
|
|
49421
|
-
navigation: { kind: "none" },
|
|
49422
49859
|
events: [{
|
|
49423
49860
|
type: "feedback-set",
|
|
49424
49861
|
feedback: bookingSuccessFeedback(data, input.successMessage)
|
|
@@ -49447,7 +49884,6 @@ function bookingSuccessFeedback(data, successMessage) {
|
|
|
49447
49884
|
function completeBookingSubmission(input) {
|
|
49448
49885
|
const plan = planBookingSubmissionCompletion(input);
|
|
49449
49886
|
plan.events.forEach(input.dispatch);
|
|
49450
|
-
if (plan.navigation.kind === "checkout" && typeof window !== "undefined") input.navigateToCheckout(plan.navigation.url);
|
|
49451
49887
|
return plan.result;
|
|
49452
49888
|
}
|
|
49453
49889
|
//#endregion
|
|
@@ -49470,6 +49906,14 @@ function useBookingFlowController(input) {
|
|
|
49470
49906
|
}, [latestRef]);
|
|
49471
49907
|
return useMemo(() => ({
|
|
49472
49908
|
...bookingEditActions(input.dispatch),
|
|
49909
|
+
selectPackageToBuy: (passId) => {
|
|
49910
|
+
const source = latestRef.current.purchasablePackages;
|
|
49911
|
+
const product = source.tag === "loaded" ? source.value.find((product) => product.id === passId) ?? null : null;
|
|
49912
|
+
input.dispatch({
|
|
49913
|
+
type: "purchase-package-selected",
|
|
49914
|
+
package: product
|
|
49915
|
+
});
|
|
49916
|
+
},
|
|
49473
49917
|
next: async () => navigate("next"),
|
|
49474
49918
|
back: () => {
|
|
49475
49919
|
navigate("back");
|
|
@@ -49524,7 +49968,6 @@ function useBookingSubmitAction(latestRef) {
|
|
|
49524
49968
|
...latest.state,
|
|
49525
49969
|
discountCode: latest.discountCode
|
|
49526
49970
|
},
|
|
49527
|
-
redirect: options?.redirect ?? "manual",
|
|
49528
49971
|
successUrl: options?.successUrl,
|
|
49529
49972
|
cancelUrl: options?.cancelUrl
|
|
49530
49973
|
});
|
|
@@ -49560,9 +50003,7 @@ async function executeBookingSubmission(start, latest, latestRef) {
|
|
|
49560
50003
|
if (result.data.type !== "review_required" && result.data.type !== "payment_choice_required") latest.endSignInReturn?.();
|
|
49561
50004
|
return completeBookingSubmission({
|
|
49562
50005
|
data: result.data,
|
|
49563
|
-
redirect: start.plan.redirect,
|
|
49564
50006
|
successMessage: latest.successMessage,
|
|
49565
|
-
navigateToCheckout: latest.navigateToCheckout,
|
|
49566
50007
|
dispatch: latest.dispatch
|
|
49567
50008
|
});
|
|
49568
50009
|
}
|
|
@@ -49623,7 +50064,17 @@ function failBookingSubmission(failure, dispatch) {
|
|
|
49623
50064
|
};
|
|
49624
50065
|
}
|
|
49625
50066
|
function sameBookingIntent(left, right) {
|
|
49626
|
-
return
|
|
50067
|
+
return [
|
|
50068
|
+
left.selectedServiceId === right.selectedServiceId,
|
|
50069
|
+
left.selectedResourceId === right.selectedResourceId,
|
|
50070
|
+
left.selectedSlot?.key === right.selectedSlot?.key,
|
|
50071
|
+
left.selectedSlidingAmountInput === right.selectedSlidingAmountInput,
|
|
50072
|
+
left.selectedCollectionOptionKind === right.selectedCollectionOptionKind,
|
|
50073
|
+
left.selectedAppointmentPackageId === right.selectedAppointmentPackageId,
|
|
50074
|
+
left.packagePurchase === right.packagePurchase,
|
|
50075
|
+
left.discountCode === right.discountCode,
|
|
50076
|
+
left.fieldValues === right.fieldValues
|
|
50077
|
+
].every(Boolean);
|
|
49627
50078
|
}
|
|
49628
50079
|
function isOutdatedBookingReview(result, submitted, current) {
|
|
49629
50080
|
return result.ok && (result.data.type === "review_required" || result.data.type === "payment_choice_required") && !sameBookingIntent(submitted, current);
|
|
@@ -49808,14 +50259,19 @@ function useHeadlessBookingFlow(options) {
|
|
|
49808
50259
|
options.services
|
|
49809
50260
|
]);
|
|
49810
50261
|
const [state, dispatch] = useReducer((previous, event) => bookingFlowReducer(previous, event, {
|
|
49811
|
-
services: applyBookingPaymentChoices(options.services, previous.paymentChoices),
|
|
50262
|
+
services: applyBookingPaymentAdmission(applyBookingPaymentChoices(options.services, previous.paymentChoices), Boolean(options.form?.settings?.requiresApproval), previous.unrestrictedHeldPackageServiceId),
|
|
49812
50263
|
defaultServiceId,
|
|
49813
50264
|
nowIso: bookingNowIso
|
|
49814
50265
|
}), initialState);
|
|
49815
50266
|
const api = useBlockApi();
|
|
49816
50267
|
const selectedServiceId = state.selectedServiceId ?? defaultServiceId;
|
|
49817
50268
|
const selectedResourceId = state.selectedResourceId ?? defaultResourceId;
|
|
49818
|
-
const services = useMemo(() => applyBookingPaymentChoices(options.services, state.paymentChoices),
|
|
50269
|
+
const services = useMemo(() => applyBookingPaymentAdmission(applyBookingPaymentChoices(options.services, state.paymentChoices), Boolean(options.form?.settings?.requiresApproval), state.unrestrictedHeldPackageServiceId), [
|
|
50270
|
+
options.services,
|
|
50271
|
+
options.form?.settings?.requiresApproval,
|
|
50272
|
+
state.paymentChoices,
|
|
50273
|
+
state.unrestrictedHeldPackageServiceId
|
|
50274
|
+
]);
|
|
49819
50275
|
const selectedService = services.find((service) => service.id === selectedServiceId) ?? null;
|
|
49820
50276
|
const siteTerms = useSiteTermsAgreement({
|
|
49821
50277
|
terms: options.siteTerms,
|
|
@@ -49837,32 +50293,36 @@ function useHeadlessBookingFlow(options) {
|
|
|
49837
50293
|
dispatch
|
|
49838
50294
|
});
|
|
49839
50295
|
const questionsRefusal = appointmentQuestionsRefusal(questions.presentation);
|
|
50296
|
+
const requiresResourceSelection = bookingRequiresResourceSelection(selectedService, options.requiresResourceSelection);
|
|
50297
|
+
const packageSources = resolveBookingPackageSources(selectedService, Boolean(options.enableAppointmentPackages), hasPortalBearerAuth);
|
|
50298
|
+
const { packageOnly, canBuy: canLoadPurchasablePackages } = packageSources;
|
|
49840
50299
|
const selectedServiceSlidingScale = getBookingServiceSlidingScale(selectedService);
|
|
49841
50300
|
const selectedSlidingAmount = parseBookingCurrencyInputToCents(state.selectedSlidingAmountInput);
|
|
49842
50301
|
const selectedAppointmentPriceAmount = selectedServiceSlidingScale && selectedSlidingAmount !== null ? selectedSlidingAmount : selectedService?.priceAmount ?? 0;
|
|
49843
|
-
const canLoadAppointmentPackages =
|
|
49844
|
-
const appointmentPackagesUnavailableReason =
|
|
50302
|
+
const canLoadAppointmentPackages = packageSources.held === "enabled";
|
|
50303
|
+
const appointmentPackagesUnavailableReason = packageSources.held === "enabled" ? null : packageSources.held;
|
|
49845
50304
|
const data = useMemo(() => toBookingFormData(state), [state]);
|
|
49846
50305
|
const mailingList = resolveBookingSignupOffer(options.mailingList, options.siteName);
|
|
49847
50306
|
const mailingListEligible = mailingList !== null;
|
|
50307
|
+
const availabilityServiceId = requiresResourceSelection && !selectedResourceId ? void 0 : selectedServiceId;
|
|
49848
50308
|
const availabilityDatesQuery = useMemo(() => buildBookingAvailabilityQuery({
|
|
49849
|
-
serviceId:
|
|
50309
|
+
serviceId: availabilityServiceId,
|
|
49850
50310
|
resourceId: selectedResourceId,
|
|
49851
50311
|
timezone: availabilityTimeZone
|
|
49852
50312
|
}), [
|
|
49853
50313
|
selectedResourceId,
|
|
49854
|
-
|
|
50314
|
+
availabilityServiceId,
|
|
49855
50315
|
availabilityTimeZone
|
|
49856
50316
|
]);
|
|
49857
50317
|
const availabilitySlotsQuery = useMemo(() => buildBookingAvailabilityQuery({
|
|
49858
|
-
serviceId:
|
|
50318
|
+
serviceId: availabilityServiceId,
|
|
49859
50319
|
resourceId: selectedResourceId,
|
|
49860
50320
|
selectedDate: state.selectedDate,
|
|
49861
50321
|
timezone: availabilityTimeZone,
|
|
49862
50322
|
requireDate: true
|
|
49863
50323
|
}), [
|
|
49864
50324
|
selectedResourceId,
|
|
49865
|
-
|
|
50325
|
+
availabilityServiceId,
|
|
49866
50326
|
state.selectedDate,
|
|
49867
50327
|
availabilityTimeZone
|
|
49868
50328
|
]);
|
|
@@ -49876,7 +50336,7 @@ function useHeadlessBookingFlow(options) {
|
|
|
49876
50336
|
defaultResourceId,
|
|
49877
50337
|
currentStepId: state.currentStepId,
|
|
49878
50338
|
requiresServiceSelection: options.requiresServiceSelection,
|
|
49879
|
-
requiresResourceSelection
|
|
50339
|
+
requiresResourceSelection,
|
|
49880
50340
|
enableAppointmentPackages: options.enableAppointmentPackages,
|
|
49881
50341
|
attemptedStepIds: state.attemptedStepIds,
|
|
49882
50342
|
questionsRefusal
|
|
@@ -49889,7 +50349,7 @@ function useHeadlessBookingFlow(options) {
|
|
|
49889
50349
|
defaultResourceId,
|
|
49890
50350
|
options.enableAppointmentPackages,
|
|
49891
50351
|
runtimeForm,
|
|
49892
|
-
|
|
50352
|
+
requiresResourceSelection,
|
|
49893
50353
|
options.requiresServiceSelection,
|
|
49894
50354
|
services,
|
|
49895
50355
|
state.paymentChoices,
|
|
@@ -49960,19 +50420,29 @@ function useHeadlessBookingFlow(options) {
|
|
|
49960
50420
|
selectedResourceId: selectedResourceId ?? null,
|
|
49961
50421
|
defaultResourceId,
|
|
49962
50422
|
canLoadPackages: canLoadAppointmentPackages,
|
|
50423
|
+
canLoadPurchasablePackages,
|
|
49963
50424
|
autoSelectSingleResource: options.shouldAutoSelectSingleResource !== false,
|
|
49964
50425
|
dispatch
|
|
49965
50426
|
});
|
|
49966
50427
|
const resourcesState = choices.resources;
|
|
49967
50428
|
const appointmentPackages = choices.packages;
|
|
49968
50429
|
const resources = resourcesState.tag === "loaded" ? resourcesState.value : [];
|
|
50430
|
+
const purchase = state.packagePurchase;
|
|
50431
|
+
const paymentPriceAmount = purchase.kind === "selected" ? purchase.package.price : selectedAppointmentPriceAmount;
|
|
49969
50432
|
const discountUi = useDiscountCodeUi({
|
|
49970
50433
|
api,
|
|
49971
|
-
discountContext: useMemo(() =>
|
|
50434
|
+
discountContext: useMemo(() => purchase.kind === "selected" ? {
|
|
50435
|
+
type: "pass",
|
|
50436
|
+
passId: purchase.package.id
|
|
50437
|
+
} : selectedService && selectedAppointmentPriceAmount > 0 ? {
|
|
49972
50438
|
type: "appointment",
|
|
49973
50439
|
serviceId: selectedService.id
|
|
49974
|
-
} : null, [
|
|
49975
|
-
|
|
50440
|
+
} : null, [
|
|
50441
|
+
purchase,
|
|
50442
|
+
selectedAppointmentPriceAmount,
|
|
50443
|
+
selectedService?.id
|
|
50444
|
+
]),
|
|
50445
|
+
subtotalCents: paymentPriceAmount
|
|
49976
50446
|
});
|
|
49977
50447
|
const { submit, clearFeedback } = useBookingSubmission(options.siteId, siteTerms);
|
|
49978
50448
|
const actions = useBookingFlowController({
|
|
@@ -49982,9 +50452,10 @@ function useHeadlessBookingFlow(options) {
|
|
|
49982
50452
|
formId: formKey,
|
|
49983
50453
|
services,
|
|
49984
50454
|
promisedDiscountId: resolveDisclosedBookingDiscountId(discountUi),
|
|
50455
|
+
purchasablePackages: choices.purchasablePackages,
|
|
49985
50456
|
defaultServiceId,
|
|
49986
50457
|
defaultResourceId,
|
|
49987
|
-
requiresResourceSelection
|
|
50458
|
+
requiresResourceSelection,
|
|
49988
50459
|
successMessage: options.successMessage,
|
|
49989
50460
|
viewerTimeZone,
|
|
49990
50461
|
discountCode: discountUi.discountCode,
|
|
@@ -49992,7 +50463,6 @@ function useHeadlessBookingFlow(options) {
|
|
|
49992
50463
|
requireSiteTerms: siteTerms.requireAgreement,
|
|
49993
50464
|
clearFeedback,
|
|
49994
50465
|
setDiscountCode: discountUi.setDiscountCode,
|
|
49995
|
-
navigateToCheckout: options.navigateToCheckout ?? navigateToCheckout,
|
|
49996
50466
|
steps: stepState.steps,
|
|
49997
50467
|
currentStep: stepState.currentStep,
|
|
49998
50468
|
currentStepIndex: stepState.currentStepIndex,
|
|
@@ -50026,7 +50496,7 @@ function useHeadlessBookingFlow(options) {
|
|
|
50026
50496
|
const paymentConfirmationSummary = resolveBookingPaymentConfirmationSummary({
|
|
50027
50497
|
service: selectedService,
|
|
50028
50498
|
priceAmount: selectedAppointmentPriceAmount,
|
|
50029
|
-
hasSelectedAppointmentPackage: Boolean(state.selectedAppointmentPackageId),
|
|
50499
|
+
hasSelectedAppointmentPackage: Boolean(state.selectedAppointmentPackageId) || purchase.kind === "selected",
|
|
50030
50500
|
paymentResolution
|
|
50031
50501
|
});
|
|
50032
50502
|
const availabilityDisplay = resolveBookingFormDateDisplay({
|
|
@@ -50045,7 +50515,7 @@ function useHeadlessBookingFlow(options) {
|
|
|
50045
50515
|
feedback: state.feedback
|
|
50046
50516
|
});
|
|
50047
50517
|
const appointmentPackagesModel = resolveAppointmentPackagesModel({
|
|
50048
|
-
enabled:
|
|
50518
|
+
enabled: packageSources.held !== "disabled",
|
|
50049
50519
|
canLoad: canLoadAppointmentPackages,
|
|
50050
50520
|
unavailableReason: appointmentPackagesUnavailableReason,
|
|
50051
50521
|
state: appointmentPackages,
|
|
@@ -50053,7 +50523,14 @@ function useHeadlessBookingFlow(options) {
|
|
|
50053
50523
|
selected: selectedAppointmentPackage,
|
|
50054
50524
|
heldWithTeamMembers: choices.heldPackageTeamMembers
|
|
50055
50525
|
});
|
|
50056
|
-
const
|
|
50526
|
+
const purchasablePackages = resolveBookingPurchasablePackages(canLoadPurchasablePackages, choices.purchasablePackages);
|
|
50527
|
+
const packagePaymentModel = {
|
|
50528
|
+
choice: resolveBookingPaymentChoice(state.packagePurchase, state.selectedAppointmentPackageId, packageOnly ? void 0 : selectedCollectionOptionKind),
|
|
50529
|
+
purchasablePackages,
|
|
50530
|
+
availability: resolveBookingPaymentAvailability(!packageOnly && paymentResolution.kind !== "unavailable", appointmentPackagesModel, purchasablePackages)
|
|
50531
|
+
};
|
|
50532
|
+
const payment = paymentResolution.kind === "unavailable" && packagePaymentModel.availability.kind === "no_choices" ? {
|
|
50533
|
+
...packagePaymentModel,
|
|
50057
50534
|
kind: "unsupported",
|
|
50058
50535
|
mode: "unsupported",
|
|
50059
50536
|
selection: null,
|
|
@@ -50066,8 +50543,9 @@ function useHeadlessBookingFlow(options) {
|
|
|
50066
50543
|
errorMessage: paymentResolution.errorMessage,
|
|
50067
50544
|
confirmationSummary: null
|
|
50068
50545
|
} : {
|
|
50546
|
+
...packagePaymentModel,
|
|
50069
50547
|
kind: "ok",
|
|
50070
|
-
mode: paymentResolution
|
|
50548
|
+
mode: resolveBookingPaymentMode(selectedService, paymentResolution),
|
|
50071
50549
|
selection: paymentSelection,
|
|
50072
50550
|
selectedCollectionOptionKind,
|
|
50073
50551
|
selectedAppointmentPackageId: state.selectedAppointmentPackageId,
|
|
@@ -50101,7 +50579,8 @@ function useHeadlessBookingFlow(options) {
|
|
|
50101
50579
|
selected: resources.find((resource) => resource.id === selectedResourceId) ?? null,
|
|
50102
50580
|
selectedResourceId,
|
|
50103
50581
|
state: resourcesState,
|
|
50104
|
-
requiresSelection:
|
|
50582
|
+
requiresSelection: requiresResourceSelection,
|
|
50583
|
+
configuredRequiresSelection: Boolean(options.requiresResourceSelection)
|
|
50105
50584
|
},
|
|
50106
50585
|
availability: {
|
|
50107
50586
|
selectedDate: state.selectedDate,
|
|
@@ -50156,9 +50635,6 @@ const EMPTY_SERVICE_CATEGORIES = [];
|
|
|
50156
50635
|
function readServiceCategories(options) {
|
|
50157
50636
|
return options.serviceCategories ?? EMPTY_SERVICE_CATEGORIES;
|
|
50158
50637
|
}
|
|
50159
|
-
function navigateToCheckout(checkoutUrl) {
|
|
50160
|
-
window.location.href = checkoutUrl;
|
|
50161
|
-
}
|
|
50162
50638
|
function resolveDisclosedBookingDiscountId(discount) {
|
|
50163
50639
|
return discount.discountsAvailableLoading || discount.discountCode.trim() ? void 0 : discount.autoAppliedDiscount?.id;
|
|
50164
50640
|
}
|
|
@@ -50880,6 +51356,84 @@ function BookingReviewIdentity({ booking }) {
|
|
|
50880
51356
|
});
|
|
50881
51357
|
}
|
|
50882
51358
|
//#endregion
|
|
51359
|
+
//#region ../blocks/src/system/runtime/nodes/booking-form.payment-packages.tsx
|
|
51360
|
+
/** Copy for one package the client can buy and use for this booking. */
|
|
51361
|
+
function purchasablePackageRowCopy(item, serviceTitle) {
|
|
51362
|
+
const heldWith = item.heldWithTeamMember;
|
|
51363
|
+
const sessions = item.creditsTotal === 1 ? "1 session" : `${item.creditsTotal} sessions`;
|
|
51364
|
+
return {
|
|
51365
|
+
label: heldWith ? `${item.name} with ${heldWith.name}` : item.name,
|
|
51366
|
+
details: [
|
|
51367
|
+
`${sessions}. This booking uses one.`,
|
|
51368
|
+
heldWith ? `Use them with ${heldWith.name}.` : `Use them with anyone who offers ${serviceTitle}.`,
|
|
51369
|
+
...item.validDays ? [`${formatValidity(item.validDays)} from when you buy it.`] : []
|
|
51370
|
+
],
|
|
51371
|
+
price: formatCurrencyAmount(item.price, item.currency, { decimals: "auto" })
|
|
51372
|
+
};
|
|
51373
|
+
}
|
|
51374
|
+
function heldPackageRows(booking) {
|
|
51375
|
+
return booking.payment.appointmentPackages.items.map((held) => ({
|
|
51376
|
+
id: held.customerPassId,
|
|
51377
|
+
label: held.passName,
|
|
51378
|
+
details: ["Use 1 package credit", `Balance: ${held.creditsRemaining} of ${held.creditsTotal} credits remaining`],
|
|
51379
|
+
price: "1 credit",
|
|
51380
|
+
selected: booking.payment.choice.kind === "held_package" && booking.payment.choice.customerPassId === held.customerPassId,
|
|
51381
|
+
onSelect: () => booking.actions.selectAppointmentPackage(held.customerPassId)
|
|
51382
|
+
}));
|
|
51383
|
+
}
|
|
51384
|
+
function purchasableItems(payment) {
|
|
51385
|
+
return payment.purchasablePackages.kind === "ready" ? payment.purchasablePackages.items : [];
|
|
51386
|
+
}
|
|
51387
|
+
function hasPurchasablePackages(payment) {
|
|
51388
|
+
return purchasableItems(payment).length > 0;
|
|
51389
|
+
}
|
|
51390
|
+
/** "Or buy a package and use it now", below the other ways to pay. */
|
|
51391
|
+
function PurchasablePackageChoices(props) {
|
|
51392
|
+
const { payment, actions } = props.booking;
|
|
51393
|
+
const items = purchasableItems(payment);
|
|
51394
|
+
if (items.length === 0) return null;
|
|
51395
|
+
const heading = props.hasOtherChoices ? "Or buy a package and use it now" : "Buy a package to book this";
|
|
51396
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
51397
|
+
className: "rb-reg-stack rb-reg-stack--sm",
|
|
51398
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
51399
|
+
className: "ab-subtitle",
|
|
51400
|
+
children: heading
|
|
51401
|
+
}), /* @__PURE__ */ jsx(PaymentChoiceRows, {
|
|
51402
|
+
label: heading,
|
|
51403
|
+
rows: items.map((item) => ({
|
|
51404
|
+
id: item.id,
|
|
51405
|
+
...purchasablePackageRowCopy(item, props.serviceTitle),
|
|
51406
|
+
selected: payment.choice.kind === "buy_package" && payment.choice.package.id === item.id,
|
|
51407
|
+
onSelect: () => actions.selectPackageToBuy(item.id)
|
|
51408
|
+
}))
|
|
51409
|
+
})]
|
|
51410
|
+
});
|
|
51411
|
+
}
|
|
51412
|
+
/** Explains a packages-only service while packages load, or when there's nothing to use or buy. */
|
|
51413
|
+
function PackagePaymentAvailabilityNotice(props) {
|
|
51414
|
+
switch (props.payment.availability.kind) {
|
|
51415
|
+
case "available": return null;
|
|
51416
|
+
case "loading": return /* @__PURE__ */ jsx(FeedbackMessage, {
|
|
51417
|
+
tone: "info",
|
|
51418
|
+
className: "alert alert-info",
|
|
51419
|
+
role: "status",
|
|
51420
|
+
children: "Checking packages..."
|
|
51421
|
+
});
|
|
51422
|
+
case "load_error": return /* @__PURE__ */ jsx(FeedbackMessage, {
|
|
51423
|
+
tone: "error",
|
|
51424
|
+
className: "alert alert-error",
|
|
51425
|
+
role: "alert",
|
|
51426
|
+
children: "We couldn't load the packages for this booking. Please try again in a moment."
|
|
51427
|
+
});
|
|
51428
|
+
case "no_choices": return /* @__PURE__ */ jsx(FeedbackMessage, {
|
|
51429
|
+
tone: "info",
|
|
51430
|
+
className: "alert alert-info",
|
|
51431
|
+
role: "status",
|
|
51432
|
+
children: "You need a package to book this, and there isn't one you can buy online at the moment. Please get in touch and we'll help you book."
|
|
51433
|
+
});
|
|
51434
|
+
}
|
|
51435
|
+
}
|
|
51436
|
+
//#endregion
|
|
50883
51437
|
//#region ../blocks/src/system/runtime/shared/components/SiteTermsAgreementField.tsx
|
|
50884
51438
|
function SiteTermsAgreementField(props) {
|
|
50885
51439
|
const id = useId();
|
|
@@ -51612,7 +52166,17 @@ function AlreadyAnswered(input) {
|
|
|
51612
52166
|
}
|
|
51613
52167
|
function SignInNotice(props) {
|
|
51614
52168
|
const [open, setOpen] = React$1.useState(false);
|
|
52169
|
+
const [handOff, setHandOff] = React$1.useState(null);
|
|
52170
|
+
const api = useBlockApiOptional();
|
|
52171
|
+
const signIn = () => {
|
|
52172
|
+
const outcome = requestSignIn(window.location.href, () => setOpen(true), api?.config.pageNavigation);
|
|
52173
|
+
if (outcome.kind === "handOff") setHandOff(outcome);
|
|
52174
|
+
};
|
|
51615
52175
|
const titleId = `${React$1.useId()}-sign-in-title`;
|
|
52176
|
+
if (handOff) return /* @__PURE__ */ jsx(NavigationHandOffPanel, {
|
|
52177
|
+
handOff,
|
|
52178
|
+
onBack: () => setHandOff(null)
|
|
52179
|
+
});
|
|
51616
52180
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("p", {
|
|
51617
52181
|
className: "rb-bq-note",
|
|
51618
52182
|
children: [
|
|
@@ -51621,7 +52185,7 @@ function SignInNotice(props) {
|
|
|
51621
52185
|
/* @__PURE__ */ jsx("button", {
|
|
51622
52186
|
type: "button",
|
|
51623
52187
|
className: "rb-bq-link",
|
|
51624
|
-
onClick:
|
|
52188
|
+
onClick: signIn,
|
|
51625
52189
|
children: "Sign in"
|
|
51626
52190
|
}),
|
|
51627
52191
|
" ",
|
|
@@ -52145,35 +52709,39 @@ function DefaultResourceChoices({ allowAnyResource, booking, resources, selected
|
|
|
52145
52709
|
className: "rb-reg-stack rb-reg-stack--sm",
|
|
52146
52710
|
role: "group",
|
|
52147
52711
|
"aria-labelledby": headingId,
|
|
52148
|
-
children: [
|
|
52149
|
-
|
|
52150
|
-
|
|
52151
|
-
|
|
52152
|
-
|
|
52153
|
-
|
|
52154
|
-
|
|
52155
|
-
|
|
52156
|
-
|
|
52157
|
-
|
|
52158
|
-
"aria-pressed": !selectedResourceId,
|
|
52159
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
52160
|
-
className: "rb-flex-1 ab-subtitle",
|
|
52161
|
-
children: "Anyone available"
|
|
52162
|
-
}), !selectedResourceId ? /* @__PURE__ */ jsx(SelectedCheck, {}) : null]
|
|
52163
|
-
}) : null, resources.map((resource) => {
|
|
52164
|
-
const isSelected = selectedResourceId === resource.id;
|
|
52165
|
-
return /* @__PURE__ */ jsxs("button", {
|
|
52712
|
+
children: [
|
|
52713
|
+
/* @__PURE__ */ jsxs("h3", {
|
|
52714
|
+
id: headingId,
|
|
52715
|
+
className: "ab-subtitle",
|
|
52716
|
+
children: ["Who would you like to see?", booking.resources.requiresSelection ? null : /* @__PURE__ */ jsx(OptionalMark$1, {})]
|
|
52717
|
+
}),
|
|
52718
|
+
/* @__PURE__ */ jsx(PackageOnlyResourceNote, { booking }),
|
|
52719
|
+
/* @__PURE__ */ jsxs("div", {
|
|
52720
|
+
className: "rb-reg-grid",
|
|
52721
|
+
children: [allowAnyResource ? /* @__PURE__ */ jsxs("button", {
|
|
52166
52722
|
type: "button",
|
|
52167
|
-
onClick: () => booking.actions.selectResource(
|
|
52168
|
-
className: optionCardClassName(
|
|
52169
|
-
"aria-pressed":
|
|
52723
|
+
onClick: () => booking.actions.selectResource(null),
|
|
52724
|
+
className: optionCardClassName(!selectedResourceId),
|
|
52725
|
+
"aria-pressed": !selectedResourceId,
|
|
52170
52726
|
children: [/* @__PURE__ */ jsx("div", {
|
|
52171
52727
|
className: "rb-flex-1 ab-subtitle",
|
|
52172
|
-
children:
|
|
52173
|
-
}),
|
|
52174
|
-
}, resource
|
|
52175
|
-
|
|
52176
|
-
|
|
52728
|
+
children: "Anyone available"
|
|
52729
|
+
}), !selectedResourceId ? /* @__PURE__ */ jsx(SelectedCheck, {}) : null]
|
|
52730
|
+
}) : null, resources.map((resource) => {
|
|
52731
|
+
const isSelected = selectedResourceId === resource.id;
|
|
52732
|
+
return /* @__PURE__ */ jsxs("button", {
|
|
52733
|
+
type: "button",
|
|
52734
|
+
onClick: () => booking.actions.selectResource(resource.id),
|
|
52735
|
+
className: optionCardClassName(isSelected),
|
|
52736
|
+
"aria-pressed": isSelected,
|
|
52737
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
52738
|
+
className: "rb-flex-1 ab-subtitle",
|
|
52739
|
+
children: resource.label
|
|
52740
|
+
}), isSelected ? /* @__PURE__ */ jsx(SelectedCheck, {}) : null]
|
|
52741
|
+
}, resource.id);
|
|
52742
|
+
})]
|
|
52743
|
+
})
|
|
52744
|
+
]
|
|
52177
52745
|
});
|
|
52178
52746
|
}
|
|
52179
52747
|
function BookingSelectedServiceSummary({ services }) {
|
|
@@ -52253,24 +52821,45 @@ function DefaultDateTimeSelectionStep({ booking, errorSummaryId }) {
|
|
|
52253
52821
|
]
|
|
52254
52822
|
});
|
|
52255
52823
|
}
|
|
52824
|
+
/** Which ways to pay the step lists: held packages and per-session options, but no per-session payment for a packages-only service. */
|
|
52825
|
+
function planPaymentStepChoices(booking) {
|
|
52826
|
+
const viewModel = booking.payment.selection;
|
|
52827
|
+
const perSessionOffered = booking.services.selected?.onlinePaymentChoices?.perSession !== false;
|
|
52828
|
+
const perSessionOptions = perSessionOffered && viewModel ? viewModel.options : [];
|
|
52829
|
+
const choice = booking.payment.choice;
|
|
52830
|
+
const otherRows = [...heldPackageRows(booking), ...perSessionOptions.map((option) => ({
|
|
52831
|
+
id: option.kind,
|
|
52832
|
+
label: option.title,
|
|
52833
|
+
details: paymentChoiceDetails(option),
|
|
52834
|
+
price: paymentChoicePrice(option.amounts),
|
|
52835
|
+
selected: choice.kind === "per_session" ? choice.option === option.kind : choice.kind === "unselected" && viewModel?.mode === "single_option",
|
|
52836
|
+
onSelect: () => booking.actions.selectPaymentOption(option.kind)
|
|
52837
|
+
}))];
|
|
52838
|
+
return {
|
|
52839
|
+
perSessionOffered,
|
|
52840
|
+
perSessionOptions,
|
|
52841
|
+
otherRows,
|
|
52842
|
+
onlyOneWayToPay: viewModel?.mode === "single_option" && otherRows.length === perSessionOptions.length && !hasPurchasablePackages(booking.payment)
|
|
52843
|
+
};
|
|
52844
|
+
}
|
|
52845
|
+
function paymentStepUnavailableMessage(booking) {
|
|
52846
|
+
if (booking.payment.kind === "unsupported") return booking.payment.errorMessage;
|
|
52847
|
+
if (!booking.services.selected) return "Payment options are unavailable for this service right now.";
|
|
52848
|
+
return null;
|
|
52849
|
+
}
|
|
52850
|
+
function paymentStepTitle(booking) {
|
|
52851
|
+
return booking.payment.selection?.sectionTitle ?? "How would you like to pay?";
|
|
52852
|
+
}
|
|
52256
52853
|
function HeadlessBookingPaymentSelectionStep({ booking }) {
|
|
52257
52854
|
const service = booking.services.selected;
|
|
52258
|
-
const
|
|
52259
|
-
|
|
52855
|
+
const { perSessionOffered, perSessionOptions, otherRows, onlyOneWayToPay } = planPaymentStepChoices(booking);
|
|
52856
|
+
const unavailableMessage = paymentStepUnavailableMessage(booking);
|
|
52857
|
+
if (unavailableMessage !== null || !service) return /* @__PURE__ */ jsx(FeedbackMessage, {
|
|
52260
52858
|
tone: "error",
|
|
52261
52859
|
className: "alert alert-error",
|
|
52262
52860
|
role: "alert",
|
|
52263
|
-
children:
|
|
52861
|
+
children: unavailableMessage
|
|
52264
52862
|
});
|
|
52265
|
-
if (!service || !viewModel) return /* @__PURE__ */ jsx(FeedbackMessage, {
|
|
52266
|
-
tone: "error",
|
|
52267
|
-
className: "alert alert-error",
|
|
52268
|
-
role: "alert",
|
|
52269
|
-
children: "Payment options are unavailable for this service right now."
|
|
52270
|
-
});
|
|
52271
|
-
const packageOptions = booking.payment.appointmentPackages.items;
|
|
52272
|
-
const hasPackageOptions = packageOptions.length > 0;
|
|
52273
|
-
const slidingScale = booking.payment.slidingScale;
|
|
52274
52863
|
return /* @__PURE__ */ jsxs("div", {
|
|
52275
52864
|
className: "rb-reg-stack",
|
|
52276
52865
|
children: [
|
|
@@ -52278,76 +52867,16 @@ function HeadlessBookingPaymentSelectionStep({ booking }) {
|
|
|
52278
52867
|
className: "rb-reg-summary",
|
|
52279
52868
|
children: [/* @__PURE__ */ jsx("h3", {
|
|
52280
52869
|
className: "ab-subtitle",
|
|
52281
|
-
children:
|
|
52870
|
+
children: paymentStepTitle(booking)
|
|
52282
52871
|
}), /* @__PURE__ */ jsx("p", {
|
|
52283
52872
|
className: "ab-text rb-on-surface--muted",
|
|
52284
52873
|
children: service.title
|
|
52285
52874
|
})]
|
|
52286
52875
|
}),
|
|
52287
|
-
|
|
52288
|
-
|
|
52289
|
-
|
|
52290
|
-
|
|
52291
|
-
children: "Checking package credits..."
|
|
52292
|
-
}) : null,
|
|
52293
|
-
booking.payment.appointmentPackages.state.tag === "error" ? /* @__PURE__ */ jsxs(FeedbackMessage, {
|
|
52294
|
-
tone: "info",
|
|
52295
|
-
className: "alert alert-info",
|
|
52296
|
-
role: "status",
|
|
52297
|
-
children: [booking.payment.appointmentPackages.state.message, " You can continue with the normal payment option."]
|
|
52298
|
-
}) : null,
|
|
52299
|
-
booking.payment.appointmentPackages.kind === "ready" ? booking.payment.appointmentPackages.heldWithTeamMembers.map((member) => /* @__PURE__ */ jsxs("div", {
|
|
52300
|
-
className: "rb-reg-summary rb-space-y-2",
|
|
52301
|
-
children: [/* @__PURE__ */ jsxs("p", {
|
|
52302
|
-
className: "ab-text",
|
|
52303
|
-
children: [
|
|
52304
|
-
"You have sessions with ",
|
|
52305
|
-
member.name,
|
|
52306
|
-
". Book with ",
|
|
52307
|
-
member.name,
|
|
52308
|
-
" to use them."
|
|
52309
|
-
]
|
|
52310
|
-
}), /* @__PURE__ */ jsx(ThemedButton, {
|
|
52311
|
-
type: "button",
|
|
52312
|
-
variant: "secondary",
|
|
52313
|
-
size: "sm",
|
|
52314
|
-
label: `Book with ${member.name}`,
|
|
52315
|
-
onClick: () => {
|
|
52316
|
-
booking.actions.selectResource(member.id);
|
|
52317
|
-
booking.actions.goToStep("datetime-selection");
|
|
52318
|
-
}
|
|
52319
|
-
})]
|
|
52320
|
-
}, member.id)) : null,
|
|
52321
|
-
slidingScale ? /* @__PURE__ */ jsxs("div", {
|
|
52322
|
-
className: "rb-space-y-2",
|
|
52323
|
-
children: [
|
|
52324
|
-
/* @__PURE__ */ jsx("label", {
|
|
52325
|
-
htmlFor: "appointment-sliding-amount",
|
|
52326
|
-
className: "form-label",
|
|
52327
|
-
children: "Choose your price"
|
|
52328
|
-
}),
|
|
52329
|
-
/* @__PURE__ */ jsxs("p", {
|
|
52330
|
-
className: "rb-caption status-muted",
|
|
52331
|
-
children: [
|
|
52332
|
-
formatBookingAmount(slidingScale.minAmount, slidingScale.currency),
|
|
52333
|
-
" to ",
|
|
52334
|
-
formatBookingAmount(slidingScale.maxAmount, slidingScale.currency),
|
|
52335
|
-
slidingScale.suggestedAmount !== null ? `, suggested ${formatBookingAmount(slidingScale.suggestedAmount, slidingScale.currency)}` : ""
|
|
52336
|
-
]
|
|
52337
|
-
}),
|
|
52338
|
-
/* @__PURE__ */ jsx("input", {
|
|
52339
|
-
id: "appointment-sliding-amount",
|
|
52340
|
-
type: "number",
|
|
52341
|
-
className: "form-input",
|
|
52342
|
-
min: slidingScale.minAmount / 100,
|
|
52343
|
-
max: slidingScale.maxAmount / 100,
|
|
52344
|
-
step: "0.01",
|
|
52345
|
-
value: booking.payment.selectedSlidingAmountInput,
|
|
52346
|
-
onChange: (event) => booking.actions.setSlidingAmountInput(event.target.value)
|
|
52347
|
-
})
|
|
52348
|
-
]
|
|
52349
|
-
}) : null,
|
|
52350
|
-
viewModel.mode === "single_option" && !hasPackageOptions ? viewModel.options.map((option) => /* @__PURE__ */ jsx("div", {
|
|
52876
|
+
/* @__PURE__ */ jsx(HeldPackageStatus, { booking }),
|
|
52877
|
+
/* @__PURE__ */ jsx(PackagePaymentAvailabilityNotice, { payment: booking.payment }),
|
|
52878
|
+
perSessionOffered ? /* @__PURE__ */ jsx(SlidingScaleField, { booking }) : null,
|
|
52879
|
+
onlyOneWayToPay ? perSessionOptions.map((option) => /* @__PURE__ */ jsx("div", {
|
|
52351
52880
|
className: "rb-reg-summary",
|
|
52352
52881
|
children: /* @__PURE__ */ jsx(PaymentOptionContent, {
|
|
52353
52882
|
id: option.kind,
|
|
@@ -52356,23 +52885,93 @@ function HeadlessBookingPaymentSelectionStep({ booking }) {
|
|
|
52356
52885
|
summaryRows: option.summaryRows,
|
|
52357
52886
|
helperText: option.helperText
|
|
52358
52887
|
})
|
|
52359
|
-
}, option.kind)) : /* @__PURE__ */ jsx(PaymentChoiceRows, {
|
|
52888
|
+
}, option.kind)) : otherRows.length > 0 ? /* @__PURE__ */ jsx(PaymentChoiceRows, {
|
|
52360
52889
|
label: "Payment options",
|
|
52361
|
-
rows:
|
|
52362
|
-
|
|
52363
|
-
|
|
52364
|
-
|
|
52365
|
-
|
|
52366
|
-
|
|
52367
|
-
|
|
52368
|
-
|
|
52369
|
-
|
|
52370
|
-
|
|
52371
|
-
|
|
52372
|
-
|
|
52373
|
-
|
|
52374
|
-
|
|
52375
|
-
|
|
52890
|
+
rows: otherRows
|
|
52891
|
+
}) : null,
|
|
52892
|
+
/* @__PURE__ */ jsx(PurchasablePackageChoices, {
|
|
52893
|
+
booking,
|
|
52894
|
+
serviceTitle: service.title,
|
|
52895
|
+
hasOtherChoices: otherRows.length > 0
|
|
52896
|
+
})
|
|
52897
|
+
]
|
|
52898
|
+
});
|
|
52899
|
+
}
|
|
52900
|
+
function PackageOnlyResourceNote({ booking }) {
|
|
52901
|
+
if (booking.services.selected?.onlinePaymentChoices?.anyAvailable !== false) return null;
|
|
52902
|
+
return /* @__PURE__ */ jsx("p", {
|
|
52903
|
+
className: "ab-text rb-on-surface--muted",
|
|
52904
|
+
children: "You book this with a package, and each package is with one practitioner. Choose who you'd like to see, and you'll see their packages when you pay."
|
|
52905
|
+
});
|
|
52906
|
+
}
|
|
52907
|
+
function HeldPackageStatus({ booking }) {
|
|
52908
|
+
const held = booking.payment.appointmentPackages;
|
|
52909
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
52910
|
+
held.state.tag === "loading" ? /* @__PURE__ */ jsx(FeedbackMessage, {
|
|
52911
|
+
tone: "info",
|
|
52912
|
+
className: "alert alert-info",
|
|
52913
|
+
role: "status",
|
|
52914
|
+
children: "Checking package credits..."
|
|
52915
|
+
}) : null,
|
|
52916
|
+
held.state.tag === "error" ? /* @__PURE__ */ jsxs(FeedbackMessage, {
|
|
52917
|
+
tone: "info",
|
|
52918
|
+
className: "alert alert-info",
|
|
52919
|
+
role: "status",
|
|
52920
|
+
children: [held.state.message, " You can continue with the normal payment option."]
|
|
52921
|
+
}) : null,
|
|
52922
|
+
held.kind === "ready" ? held.heldWithTeamMembers.map((member) => /* @__PURE__ */ jsxs("div", {
|
|
52923
|
+
className: "rb-reg-summary rb-space-y-2",
|
|
52924
|
+
children: [/* @__PURE__ */ jsxs("p", {
|
|
52925
|
+
className: "ab-text",
|
|
52926
|
+
children: [
|
|
52927
|
+
"You have sessions with ",
|
|
52928
|
+
member.name,
|
|
52929
|
+
". Book with ",
|
|
52930
|
+
member.name,
|
|
52931
|
+
" to use them."
|
|
52932
|
+
]
|
|
52933
|
+
}), /* @__PURE__ */ jsx(ThemedButton, {
|
|
52934
|
+
type: "button",
|
|
52935
|
+
variant: "secondary",
|
|
52936
|
+
size: "sm",
|
|
52937
|
+
label: `Book with ${member.name}`,
|
|
52938
|
+
onClick: () => {
|
|
52939
|
+
booking.actions.selectResource(member.id);
|
|
52940
|
+
booking.actions.goToStep("datetime-selection");
|
|
52941
|
+
}
|
|
52942
|
+
})]
|
|
52943
|
+
}, member.id)) : null
|
|
52944
|
+
] });
|
|
52945
|
+
}
|
|
52946
|
+
function SlidingScaleField({ booking }) {
|
|
52947
|
+
const slidingScale = booking.payment.slidingScale;
|
|
52948
|
+
if (!slidingScale) return null;
|
|
52949
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
52950
|
+
className: "rb-space-y-2",
|
|
52951
|
+
children: [
|
|
52952
|
+
/* @__PURE__ */ jsx("label", {
|
|
52953
|
+
htmlFor: "appointment-sliding-amount",
|
|
52954
|
+
className: "form-label",
|
|
52955
|
+
children: "Choose your price"
|
|
52956
|
+
}),
|
|
52957
|
+
/* @__PURE__ */ jsxs("p", {
|
|
52958
|
+
className: "rb-caption status-muted",
|
|
52959
|
+
children: [
|
|
52960
|
+
formatBookingAmount(slidingScale.minAmount, slidingScale.currency),
|
|
52961
|
+
" to ",
|
|
52962
|
+
formatBookingAmount(slidingScale.maxAmount, slidingScale.currency),
|
|
52963
|
+
slidingScale.suggestedAmount !== null ? `, suggested ${formatBookingAmount(slidingScale.suggestedAmount, slidingScale.currency)}` : ""
|
|
52964
|
+
]
|
|
52965
|
+
}),
|
|
52966
|
+
/* @__PURE__ */ jsx("input", {
|
|
52967
|
+
id: "appointment-sliding-amount",
|
|
52968
|
+
type: "number",
|
|
52969
|
+
className: "form-input",
|
|
52970
|
+
min: slidingScale.minAmount / 100,
|
|
52971
|
+
max: slidingScale.maxAmount / 100,
|
|
52972
|
+
step: "0.01",
|
|
52973
|
+
value: booking.payment.selectedSlidingAmountInput,
|
|
52974
|
+
onChange: (event) => booking.actions.setSlidingAmountInput(event.target.value)
|
|
52376
52975
|
})
|
|
52377
52976
|
]
|
|
52378
52977
|
});
|
|
@@ -52480,7 +53079,11 @@ function BookingConfirmation(props) {
|
|
|
52480
53079
|
})] });
|
|
52481
53080
|
}
|
|
52482
53081
|
function DemoBookingPortalAccess(props) {
|
|
52483
|
-
const { state, openPortal } = useDemoBookingPortalAccess(props.email);
|
|
53082
|
+
const { state, openPortal, back } = useDemoBookingPortalAccess(props.email);
|
|
53083
|
+
if (state.tag === "handOff") return /* @__PURE__ */ jsx(NavigationHandOffPanel, {
|
|
53084
|
+
handOff: state.handOff,
|
|
53085
|
+
onBack: back
|
|
53086
|
+
});
|
|
52484
53087
|
return /* @__PURE__ */ jsxs("div", {
|
|
52485
53088
|
className: "rb-mt-4 rb-flex rb-flex-col rb-items-start rb-gap-3",
|
|
52486
53089
|
"data-testid": "demo-booking-portal-access",
|
|
@@ -52539,7 +53142,11 @@ function useDemoBookingPortalAccess(email) {
|
|
|
52539
53142
|
});
|
|
52540
53143
|
switch (result.kind) {
|
|
52541
53144
|
case "demo_sign_in":
|
|
52542
|
-
|
|
53145
|
+
const outcome = leavePage(result.url, api.config.pageNavigation);
|
|
53146
|
+
if (outcome.kind === "handOff") setState({
|
|
53147
|
+
tag: "handOff",
|
|
53148
|
+
handOff: outcome
|
|
53149
|
+
});
|
|
52543
53150
|
return;
|
|
52544
53151
|
case "refused":
|
|
52545
53152
|
setState({
|
|
@@ -52557,7 +53164,8 @@ function useDemoBookingPortalAccess(email) {
|
|
|
52557
53164
|
};
|
|
52558
53165
|
return {
|
|
52559
53166
|
state,
|
|
52560
|
-
openPortal
|
|
53167
|
+
openPortal,
|
|
53168
|
+
back: () => setState({ tag: "idle" })
|
|
52561
53169
|
};
|
|
52562
53170
|
}
|
|
52563
53171
|
function handlePortalAccessError(error) {
|
|
@@ -52777,9 +53385,8 @@ function appendRebookFlag(url, enabled) {
|
|
|
52777
53385
|
}
|
|
52778
53386
|
function createBookingFormSubmitHandler(input) {
|
|
52779
53387
|
return async () => {
|
|
52780
|
-
const { successUrl, cancelUrl } = buildCheckoutReturnUrls("booking", input.bookingAnchorId);
|
|
53388
|
+
const { successUrl, cancelUrl } = buildCheckoutReturnUrls("booking", input.bookingAnchorId, {}, input.pageNavigation);
|
|
52781
53389
|
const options = {
|
|
52782
|
-
redirect: "manual",
|
|
52783
53390
|
successUrl: appendRebookFlag(successUrl, input.isPortalRebook),
|
|
52784
53391
|
cancelUrl: appendRebookFlag(cancelUrl, input.isPortalRebook)
|
|
52785
53392
|
};
|
|
@@ -52791,7 +53398,10 @@ function createBookingFormSubmitHandler(input) {
|
|
|
52791
53398
|
customerEmail: result.outcome.customerEmail,
|
|
52792
53399
|
mailingListNote: result.outcome.mailingListSignupNote ?? null
|
|
52793
53400
|
});
|
|
52794
|
-
|
|
53401
|
+
const outcome = leavePage(result.outcome.checkoutUrl, input.pageNavigation, (url) => {
|
|
53402
|
+
window.location.href = url;
|
|
53403
|
+
});
|
|
53404
|
+
if (outcome.kind === "handOff") input.onHandOff(outcome);
|
|
52795
53405
|
return;
|
|
52796
53406
|
}
|
|
52797
53407
|
input.setLocalMailingListNote(result.outcome.mailingListSignupNote ?? null);
|
|
@@ -52837,6 +53447,7 @@ const BookingFormClient = ({ siteId: siteIdProp, render }) => {
|
|
|
52837
53447
|
const [localMailingListNote, setLocalMailingListNote] = useState(null);
|
|
52838
53448
|
const [localCustomerEmail, setLocalCustomerEmail] = useState(null);
|
|
52839
53449
|
const api = useBlockApi();
|
|
53450
|
+
const [handOff, setHandOff] = useState(null);
|
|
52840
53451
|
const hasPortalAuth = api.config.auth.type === "bearer" || api.config.authOverrides?.portal?.type === "bearer";
|
|
52841
53452
|
const formId = render.hydration.formId ?? form?.id ?? "booking-form";
|
|
52842
53453
|
const booking = useHeadlessBookingFlow({
|
|
@@ -52921,6 +53532,8 @@ const BookingFormClient = ({ siteId: siteIdProp, render }) => {
|
|
|
52921
53532
|
})
|
|
52922
53533
|
});
|
|
52923
53534
|
const handleComplete = createBookingFormSubmitHandler({
|
|
53535
|
+
pageNavigation: render.hydration.pageNavigation,
|
|
53536
|
+
onHandOff: setHandOff,
|
|
52924
53537
|
booking,
|
|
52925
53538
|
bookingAnchorId,
|
|
52926
53539
|
isPortalRebook,
|
|
@@ -52974,33 +53587,37 @@ const BookingFormClient = ({ siteId: siteIdProp, render }) => {
|
|
|
52974
53587
|
onClick: verification.retry
|
|
52975
53588
|
})]
|
|
52976
53589
|
});
|
|
52977
|
-
return /* @__PURE__ */
|
|
53590
|
+
return /* @__PURE__ */ jsx(BookingSurface, {
|
|
52978
53591
|
id: bookingAnchorId,
|
|
52979
53592
|
className: render.display.className,
|
|
52980
|
-
children:
|
|
52981
|
-
|
|
52982
|
-
|
|
52983
|
-
|
|
52984
|
-
|
|
52985
|
-
|
|
52986
|
-
className: "
|
|
52987
|
-
|
|
52988
|
-
|
|
52989
|
-
|
|
52990
|
-
|
|
52991
|
-
|
|
52992
|
-
|
|
52993
|
-
|
|
52994
|
-
|
|
52995
|
-
className: "
|
|
52996
|
-
|
|
53593
|
+
children: /* @__PURE__ */ jsxs(AppointmentNavigationContent, {
|
|
53594
|
+
handOff,
|
|
53595
|
+
onBack: () => setHandOff(null),
|
|
53596
|
+
children: [
|
|
53597
|
+
render.hydration.noticeMessage ? /* @__PURE__ */ jsx(FeedbackMessage, {
|
|
53598
|
+
tone: "info",
|
|
53599
|
+
className: "alert alert-info rb-mb-4",
|
|
53600
|
+
role: "status",
|
|
53601
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
53602
|
+
className: "ab-text",
|
|
53603
|
+
children: render.hydration.noticeMessage
|
|
53604
|
+
})
|
|
53605
|
+
}) : null,
|
|
53606
|
+
viewState.kind === "error" ? /* @__PURE__ */ jsx(FeedbackMessage, {
|
|
53607
|
+
tone: "error",
|
|
53608
|
+
className: "alert alert-error rb-mb-4",
|
|
53609
|
+
role: "alert",
|
|
53610
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
53611
|
+
className: "ab-text",
|
|
53612
|
+
children: viewState.message
|
|
53613
|
+
})
|
|
53614
|
+
}) : null,
|
|
53615
|
+
/* @__PURE__ */ jsx(HeadlessBookingDefaultForm, {
|
|
53616
|
+
booking,
|
|
53617
|
+
onSubmit: handleComplete
|
|
52997
53618
|
})
|
|
52998
|
-
|
|
52999
|
-
|
|
53000
|
-
booking,
|
|
53001
|
-
onSubmit: handleComplete
|
|
53002
|
-
})
|
|
53003
|
-
]
|
|
53619
|
+
]
|
|
53620
|
+
})
|
|
53004
53621
|
});
|
|
53005
53622
|
};
|
|
53006
53623
|
/**
|
|
@@ -53015,6 +53632,13 @@ const BookingFormNodeClient = (props) => /* @__PURE__ */ jsx(BookingFormClient,
|
|
|
53015
53632
|
function buildBookingFormNodeClientProps(props) {
|
|
53016
53633
|
return buildBookingFormInteractiveIslandProps(props);
|
|
53017
53634
|
}
|
|
53635
|
+
function AppointmentNavigationContent(props) {
|
|
53636
|
+
return props.handOff ? /* @__PURE__ */ jsx(NavigationHandOffPanel, {
|
|
53637
|
+
handOff: props.handOff,
|
|
53638
|
+
purpose: "payment",
|
|
53639
|
+
onBack: props.onBack
|
|
53640
|
+
}) : props.children;
|
|
53641
|
+
}
|
|
53018
53642
|
//#endregion
|
|
53019
53643
|
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationSurface.ts
|
|
53020
53644
|
/** Admission only limits fresh bookings; existing purchases always reach recovery. */
|
|
@@ -53086,32 +53710,6 @@ function planEventRegistrationSurface(input) {
|
|
|
53086
53710
|
} : { kind: "unavailableWholeSeries" };
|
|
53087
53711
|
}
|
|
53088
53712
|
//#endregion
|
|
53089
|
-
//#region ../blocks/src/system/runtime/nodes/event-registration/useRegistrationAdmission.ts
|
|
53090
|
-
/** Owns admission and its navigation commands; renderers receive decisions. */
|
|
53091
|
-
function useRegistrationAdmission(input) {
|
|
53092
|
-
const { admission, isAuthenticated, dispatchFlow } = input;
|
|
53093
|
-
const ticketContinuation = resolveRegistrationTicketContinuation({
|
|
53094
|
-
admission,
|
|
53095
|
-
ticketSelectionRequired: input.ticketSelectionRequired,
|
|
53096
|
-
hasValidTicketSelection: input.hasValidTicketSelection,
|
|
53097
|
-
isCheckingExistingRegistration: isAuthenticated && input.existingRegistrationLoading
|
|
53098
|
-
});
|
|
53099
|
-
const handleTicketsComplete = () => {
|
|
53100
|
-
if (ticketContinuation.kind === "blocked") return {
|
|
53101
|
-
ok: false,
|
|
53102
|
-
reason: "blocked",
|
|
53103
|
-
message: ticketContinuation.message
|
|
53104
|
-
};
|
|
53105
|
-
dispatchFlow({ type: "tickets-completed" });
|
|
53106
|
-
return { ok: true };
|
|
53107
|
-
};
|
|
53108
|
-
return {
|
|
53109
|
-
admission,
|
|
53110
|
-
ticketContinuation,
|
|
53111
|
-
handleTicketsComplete
|
|
53112
|
-
};
|
|
53113
|
-
}
|
|
53114
|
-
//#endregion
|
|
53115
53713
|
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationErrorRecovery.ts
|
|
53116
53714
|
function resolveRegistrationRecoveryAction(step, action) {
|
|
53117
53715
|
if (step === "payment-failed") return "payment-options";
|
|
@@ -53134,36 +53732,113 @@ function resetRegistrationAfterExpiry(input) {
|
|
|
53134
53732
|
input.setErrorMessage("");
|
|
53135
53733
|
}
|
|
53136
53734
|
/** Retry the retained submission in place; explicit payment uncertainty stays status-only. */
|
|
53137
|
-
function recoverRegistrationError(action, handlers) {
|
|
53735
|
+
function recoverRegistrationError(action, handlers, navigation) {
|
|
53138
53736
|
switch (action) {
|
|
53139
|
-
case "none": return;
|
|
53140
|
-
case "portal":
|
|
53141
|
-
|
|
53142
|
-
return;
|
|
53143
|
-
case "event":
|
|
53144
|
-
window.location.assign(window.location.pathname);
|
|
53145
|
-
return;
|
|
53737
|
+
case "none": return { kind: "navigated" };
|
|
53738
|
+
case "portal": return leavePage(CUSTOMER_PORTAL_PATH, navigation);
|
|
53739
|
+
case "event": return leavePage(window.location.pathname, navigation);
|
|
53146
53740
|
case "retry":
|
|
53147
53741
|
handlers.clearError();
|
|
53148
53742
|
handlers.setStep("select-payment");
|
|
53149
|
-
return;
|
|
53743
|
+
return { kind: "navigated" };
|
|
53150
53744
|
case "details":
|
|
53151
53745
|
handlers.clearError();
|
|
53152
53746
|
handlers.setStep("enter-details");
|
|
53153
|
-
return;
|
|
53747
|
+
return { kind: "navigated" };
|
|
53154
53748
|
case "payment-options":
|
|
53155
53749
|
case "places":
|
|
53156
53750
|
handlers.refreshOptions();
|
|
53157
53751
|
handlers.clearError();
|
|
53158
53752
|
handlers.setStep(action === "places" ? handlers.canJoinWaitlist ? "enter-details" : "select-tickets" : "select-payment");
|
|
53159
|
-
return;
|
|
53753
|
+
return { kind: "navigated" };
|
|
53160
53754
|
case "start":
|
|
53161
53755
|
handlers.refreshOptions();
|
|
53162
53756
|
handlers.reset();
|
|
53163
|
-
return;
|
|
53757
|
+
return { kind: "navigated" };
|
|
53164
53758
|
}
|
|
53165
53759
|
}
|
|
53166
53760
|
//#endregion
|
|
53761
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/useRegistrationNavigation.ts
|
|
53762
|
+
function signInBookingPath(target) {
|
|
53763
|
+
const subject = target?.subject;
|
|
53764
|
+
return resolveDedicatedBookingHref("/", subject?.kind === "wholeSeries" ? {
|
|
53765
|
+
kind: "event_series",
|
|
53766
|
+
eventId: subject.eventSeriesId
|
|
53767
|
+
} : subject ? {
|
|
53768
|
+
kind: "event_occurrence",
|
|
53769
|
+
occurrenceId: subject.occurrenceId
|
|
53770
|
+
} : { kind: "chooser" });
|
|
53771
|
+
}
|
|
53772
|
+
/** Presentation state for leaving the frame stays outside registration's state machine. */
|
|
53773
|
+
function useRegistrationNavigation(input) {
|
|
53774
|
+
const navigation = input.pageNavigation ?? PAGE_NAVIGATION;
|
|
53775
|
+
const [showMagicLinkModal, openMagicLinkModal] = useState(false);
|
|
53776
|
+
const [handOff, setHandOff] = useState(null);
|
|
53777
|
+
const returnPath = signInBookingPath(input.target);
|
|
53778
|
+
const changeSignInVisibility = useCallback((show) => {
|
|
53779
|
+
if (!show) {
|
|
53780
|
+
openMagicLinkModal(false);
|
|
53781
|
+
return;
|
|
53782
|
+
}
|
|
53783
|
+
const outcome = requestSignIn(returnPath, () => openMagicLinkModal(true), navigation);
|
|
53784
|
+
if (outcome.kind === "handOff") setHandOff({
|
|
53785
|
+
...outcome,
|
|
53786
|
+
purpose: "signIn"
|
|
53787
|
+
});
|
|
53788
|
+
}, [navigation, returnPath]);
|
|
53789
|
+
const recover = (action, handlers) => {
|
|
53790
|
+
receiveHandOff(recoverRegistrationError(action, handlers, navigation), setHandOff);
|
|
53791
|
+
};
|
|
53792
|
+
return {
|
|
53793
|
+
showMagicLinkModal,
|
|
53794
|
+
changeSignInVisibility,
|
|
53795
|
+
recover,
|
|
53796
|
+
interceptPaymentSelection: useCallback((selection) => {
|
|
53797
|
+
if (navigation.kind === "page" || selection.method === null || selection.method === "stripe" || selection.method === "free") return false;
|
|
53798
|
+
changeSignInVisibility(true);
|
|
53799
|
+
return true;
|
|
53800
|
+
}, [navigation, changeSignInVisibility]),
|
|
53801
|
+
presentation: handOff ? {
|
|
53802
|
+
handOff,
|
|
53803
|
+
dismissHandOff: () => setHandOff(null),
|
|
53804
|
+
handOffBusinessName: input.businessName,
|
|
53805
|
+
handOffOfferingLabel: input.offeringNoun?.label
|
|
53806
|
+
} : {}
|
|
53807
|
+
};
|
|
53808
|
+
}
|
|
53809
|
+
function receiveHandOff(outcome, receive) {
|
|
53810
|
+
if (outcome.kind === "handOff") receive({
|
|
53811
|
+
...outcome,
|
|
53812
|
+
purpose: "navigation"
|
|
53813
|
+
});
|
|
53814
|
+
}
|
|
53815
|
+
//#endregion
|
|
53816
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/useRegistrationAdmission.ts
|
|
53817
|
+
/** Owns admission and its navigation commands; renderers receive decisions. */
|
|
53818
|
+
function useRegistrationAdmission(input) {
|
|
53819
|
+
const { admission, isAuthenticated, dispatchFlow } = input;
|
|
53820
|
+
const ticketContinuation = resolveRegistrationTicketContinuation({
|
|
53821
|
+
admission,
|
|
53822
|
+
ticketSelectionRequired: input.ticketSelectionRequired,
|
|
53823
|
+
hasValidTicketSelection: input.hasValidTicketSelection,
|
|
53824
|
+
isCheckingExistingRegistration: isAuthenticated && input.existingRegistrationLoading
|
|
53825
|
+
});
|
|
53826
|
+
const handleTicketsComplete = () => {
|
|
53827
|
+
if (ticketContinuation.kind === "blocked") return {
|
|
53828
|
+
ok: false,
|
|
53829
|
+
reason: "blocked",
|
|
53830
|
+
message: ticketContinuation.message
|
|
53831
|
+
};
|
|
53832
|
+
dispatchFlow({ type: "tickets-completed" });
|
|
53833
|
+
return { ok: true };
|
|
53834
|
+
};
|
|
53835
|
+
return {
|
|
53836
|
+
admission,
|
|
53837
|
+
ticketContinuation,
|
|
53838
|
+
handleTicketsComplete
|
|
53839
|
+
};
|
|
53840
|
+
}
|
|
53841
|
+
//#endregion
|
|
53167
53842
|
//#region ../blocks/src/system/runtime/nodes/event-registration/useEventRegistrationQuestions.ts
|
|
53168
53843
|
/** The event series is the booking target: its question set applies to every date. */
|
|
53169
53844
|
function eventTarget(event) {
|
|
@@ -53358,18 +54033,18 @@ function eligibilityLookupReducer(state, action) {
|
|
|
53358
54033
|
}
|
|
53359
54034
|
const initialExistingRegistrationLookupState = {
|
|
53360
54035
|
tag: "idle",
|
|
53361
|
-
|
|
54036
|
+
registrations: []
|
|
53362
54037
|
};
|
|
53363
54038
|
function existingRegistrationLookupReducer(state, action) {
|
|
53364
54039
|
switch (action.type) {
|
|
53365
54040
|
case "reset": return initialExistingRegistrationLookupState;
|
|
53366
54041
|
case "loading-started": return {
|
|
53367
54042
|
tag: "loading",
|
|
53368
|
-
|
|
54043
|
+
registrations: state.registrations
|
|
53369
54044
|
};
|
|
53370
54045
|
case "resolved": return {
|
|
53371
54046
|
tag: "resolved",
|
|
53372
|
-
|
|
54047
|
+
registrations: action.registrations
|
|
53373
54048
|
};
|
|
53374
54049
|
default: return assertNever$2(action);
|
|
53375
54050
|
}
|
|
@@ -53563,13 +54238,13 @@ function useExistingEventRegistrationWithDeps({ isAuthenticated, occurrenceId },
|
|
|
53563
54238
|
if (cancelled || requestIdRef.current !== requestId) return;
|
|
53564
54239
|
dispatch({
|
|
53565
54240
|
type: "resolved",
|
|
53566
|
-
|
|
54241
|
+
registrations: events.filter((event) => event.occurrenceId === occurrenceId && event.status !== "cancelled" && event.transferState !== "transferred_out")
|
|
53567
54242
|
});
|
|
53568
54243
|
} catch {
|
|
53569
54244
|
if (cancelled || requestIdRef.current !== requestId) return;
|
|
53570
54245
|
dispatch({
|
|
53571
54246
|
type: "resolved",
|
|
53572
|
-
|
|
54247
|
+
registrations: []
|
|
53573
54248
|
});
|
|
53574
54249
|
}
|
|
53575
54250
|
}
|
|
@@ -53584,7 +54259,7 @@ function useExistingEventRegistrationWithDeps({ isAuthenticated, occurrenceId },
|
|
|
53584
54259
|
]);
|
|
53585
54260
|
return {
|
|
53586
54261
|
state,
|
|
53587
|
-
|
|
54262
|
+
registrations: state.registrations,
|
|
53588
54263
|
isLoading: state.tag === "loading"
|
|
53589
54264
|
};
|
|
53590
54265
|
}
|
|
@@ -54838,6 +55513,14 @@ function useRegistrationEventSource(options) {
|
|
|
54838
55513
|
} : options.eventSource, [options.eventSource, scopedEvents])
|
|
54839
55514
|
};
|
|
54840
55515
|
}
|
|
55516
|
+
/** A signed-in booker's email is their verified identity, never a draft copy. */
|
|
55517
|
+
function useVerifiedFormData(draft, authState, profile) {
|
|
55518
|
+
const verifiedEmail = authState === "authenticated" ? profile?.email ?? null : null;
|
|
55519
|
+
return useMemo(() => verifiedEmail === null ? draft : {
|
|
55520
|
+
...draft,
|
|
55521
|
+
email: verifiedEmail
|
|
55522
|
+
}, [draft, verifiedEmail]);
|
|
55523
|
+
}
|
|
54841
55524
|
function useEventRegistrationWizardWithDeps(options, deps) {
|
|
54842
55525
|
const api = useBlockApi();
|
|
54843
55526
|
const arrivalCredential = deps.useWaitlistClaimCredential();
|
|
@@ -54855,7 +55538,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
54855
55538
|
}));
|
|
54856
55539
|
const step = flowState.step;
|
|
54857
55540
|
const paymentIntent = flowState.paymentSelection;
|
|
54858
|
-
const { selectedEvent, formData, guests, selectedAttendanceMode, selectedTicketLines, selectedSlidingAmountInput } = flowState.draft;
|
|
55541
|
+
const { selectedEvent, formData: draftFormData, guests, selectedAttendanceMode, selectedTicketLines, selectedSlidingAmountInput } = flowState.draft;
|
|
54859
55542
|
const setSelectedEvent = useCallback((value) => dispatchFlow({
|
|
54860
55543
|
type: "draft-edited",
|
|
54861
55544
|
edit: {
|
|
@@ -54913,6 +55596,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
54913
55596
|
const [submissionErrorAction, setErrorAction] = useState("retry");
|
|
54914
55597
|
const [optionsRefreshKey, setOptionsRefreshKey] = useState(0);
|
|
54915
55598
|
const { authState: portalAuthState, profile: portalProfile } = deps.usePortalAuth();
|
|
55599
|
+
const formData = useVerifiedFormData(draftFormData, portalAuthState, portalProfile);
|
|
54916
55600
|
const portalIdentity = portalSessionIdentity(api.config);
|
|
54917
55601
|
const waitlistClaim = flowState.invitation;
|
|
54918
55602
|
const claimLookup = deps.useWaitlistClaim(waitlistClaim.kind === "none" ? null : waitlistClaim.request);
|
|
@@ -54936,13 +55620,11 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
54936
55620
|
]);
|
|
54937
55621
|
const errorMessage = waitlistClaim.kind === "error" ? waitlistClaim.message : submissionErrorMessage;
|
|
54938
55622
|
const errorAction = waitlistClaim.kind === "error" ? waitlistClaim.action : submissionErrorAction;
|
|
54939
|
-
const [showMagicLinkModal, setShowMagicLinkModal] = useState(false);
|
|
54940
55623
|
const selectionLocked = isRegistrationLocked(step);
|
|
54941
55624
|
useEffect(() => {
|
|
54942
55625
|
if (selectionLocked || portalAuthState !== "authenticated" || !portalProfile) return;
|
|
54943
55626
|
setFormData((prev) => ({
|
|
54944
55627
|
...prev,
|
|
54945
|
-
email: portalProfile.email,
|
|
54946
55628
|
name: prev.name || portalProfile.name,
|
|
54947
55629
|
phone: prev.phone || portalProfile.phone || ""
|
|
54948
55630
|
}));
|
|
@@ -54953,6 +55635,13 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
54953
55635
|
selectedEvent
|
|
54954
55636
|
}), [options.occurrenceContext, selectedEvent]);
|
|
54955
55637
|
const registrationOccurrenceId = getRegistrationOccurrenceId(registrationTarget);
|
|
55638
|
+
const registrationNavigation = useRegistrationNavigation({
|
|
55639
|
+
pageNavigation: options.pageNavigation,
|
|
55640
|
+
target: registrationTarget,
|
|
55641
|
+
businessName: options.siteName,
|
|
55642
|
+
offeringNoun: options.offeringNoun
|
|
55643
|
+
});
|
|
55644
|
+
const { showMagicLinkModal, changeSignInVisibility: setShowMagicLinkModal, interceptPaymentSelection } = registrationNavigation;
|
|
54956
55645
|
const currentEvent = selectedEvent ?? preSelectedEvent;
|
|
54957
55646
|
const commandRef = useRef(null);
|
|
54958
55647
|
const setStep = useCallback((nextStep) => {
|
|
@@ -55008,6 +55697,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
55008
55697
|
isAuthenticated: portalAuthState === "authenticated",
|
|
55009
55698
|
occurrenceId: registrationOccurrenceId
|
|
55010
55699
|
});
|
|
55700
|
+
const existingRegistrations = useMemo(() => existingRegistrationResult.registrations.filter((registration) => registration.occurrenceId === registrationOccurrenceId), [existingRegistrationResult.registrations, registrationOccurrenceId]);
|
|
55011
55701
|
const eligibility = eligibilityResult.eligibility;
|
|
55012
55702
|
const eligibilityLoading = eligibilityResult.isLoading;
|
|
55013
55703
|
const eligibilityError = eligibilityResult.error;
|
|
@@ -55429,7 +56119,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
55429
56119
|
commandRef.current = null;
|
|
55430
56120
|
setOptionsRefreshKey((value) => value + 1);
|
|
55431
56121
|
};
|
|
55432
|
-
const handleRetry = () =>
|
|
56122
|
+
const handleRetry = () => registrationNavigation.recover(resolveRegistrationRecoveryAction(step, errorAction), {
|
|
55433
56123
|
canJoinWaitlist: admission.kind === "waitlist",
|
|
55434
56124
|
refreshOptions: () => setOptionsRefreshKey((value) => value + 1),
|
|
55435
56125
|
clearError: () => setErrorMessage(""),
|
|
@@ -55448,11 +56138,12 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
55448
56138
|
}
|
|
55449
56139
|
});
|
|
55450
56140
|
const handlePaymentSelectionChange = useCallback((selection) => {
|
|
56141
|
+
if (interceptPaymentSelection(selection)) return;
|
|
55451
56142
|
dispatchFlow({
|
|
55452
56143
|
type: "set-manual-payment-selection",
|
|
55453
56144
|
selection
|
|
55454
56145
|
});
|
|
55455
|
-
}, []);
|
|
56146
|
+
}, [interceptPaymentSelection]);
|
|
55456
56147
|
const presentation = presentWizardStep({
|
|
55457
56148
|
step,
|
|
55458
56149
|
flow: flowState,
|
|
@@ -55471,7 +56162,9 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
55471
56162
|
ticketsCount,
|
|
55472
56163
|
paymentMethod: paymentSelection.method
|
|
55473
56164
|
});
|
|
56165
|
+
const displayEvent = withRegistrationAvailability(currentEvent, eligibilityLoading ? null : eligibility, selectedAttendanceMode);
|
|
55474
56166
|
return {
|
|
56167
|
+
...registrationNavigation.presentation,
|
|
55475
56168
|
api,
|
|
55476
56169
|
nowIso,
|
|
55477
56170
|
directPaymentOptions,
|
|
@@ -55483,7 +56176,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
55483
56176
|
events,
|
|
55484
56177
|
maxTicketsNum: waitlistClaim.kind === "ready" ? waitlistClaim.restoration.ticketsCount : options.maxTicketsNum,
|
|
55485
56178
|
scopedEvents,
|
|
55486
|
-
preSelectedEvent,
|
|
56179
|
+
preSelectedEvent: preSelectedEvent?.selectionId === currentEvent?.selectionId ? displayEvent : preSelectedEvent,
|
|
55487
56180
|
hasPreSelectedContext,
|
|
55488
56181
|
presentation,
|
|
55489
56182
|
flow: flowState,
|
|
@@ -55494,7 +56187,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
55494
56187
|
admission,
|
|
55495
56188
|
ticketContinuation,
|
|
55496
56189
|
handleTicketsComplete,
|
|
55497
|
-
selectedEvent,
|
|
56190
|
+
selectedEvent: selectedEvent ? displayEvent : null,
|
|
55498
56191
|
setSelectedEvent: (value) => {
|
|
55499
56192
|
if (!selectionLocked) setSelectedEvent(value);
|
|
55500
56193
|
},
|
|
@@ -55569,7 +56262,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
55569
56262
|
registrationOptionsState: eligibilityResult.state,
|
|
55570
56263
|
eligibilityLoading: eligibilityLoading || checkingNextStep,
|
|
55571
56264
|
eligibilityError,
|
|
55572
|
-
|
|
56265
|
+
existingRegistrations,
|
|
55573
56266
|
existingRegistrationLoading: existingRegistrationResult.isLoading || portalAuthState === "authenticated" && eligibilityLoading,
|
|
55574
56267
|
existingRegistrationState: existingRegistrationResult.state,
|
|
55575
56268
|
registrationState,
|
|
@@ -56717,6 +57410,26 @@ function ClosedPaymentPanel({ message }) {
|
|
|
56717
57410
|
});
|
|
56718
57411
|
}
|
|
56719
57412
|
//#endregion
|
|
57413
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/existingBookingsSummary.ts
|
|
57414
|
+
function places(count) {
|
|
57415
|
+
return count === 1 ? "1 place" : `${count} places`;
|
|
57416
|
+
}
|
|
57417
|
+
/** Waitlist entries have their own notice, so only confirmed bookings count here. */
|
|
57418
|
+
function summariseExistingBookings(registrations) {
|
|
57419
|
+
const confirmed = registrations.filter((registration) => registration.status === "confirmed");
|
|
57420
|
+
const [only] = confirmed;
|
|
57421
|
+
if (!only) return { kind: "none" };
|
|
57422
|
+
if (confirmed.length === 1) return {
|
|
57423
|
+
kind: "booked",
|
|
57424
|
+
detail: only.ticketBreakdown ?? places(only.ticketsCount)
|
|
57425
|
+
};
|
|
57426
|
+
const placeCount = confirmed.reduce((total, registration) => total + registration.ticketsCount, 0);
|
|
57427
|
+
return {
|
|
57428
|
+
kind: "booked",
|
|
57429
|
+
detail: `${confirmed.length} bookings · ${places(placeCount)}`
|
|
57430
|
+
};
|
|
57431
|
+
}
|
|
57432
|
+
//#endregion
|
|
56720
57433
|
//#region ../blocks/src/system/runtime/nodes/event-registration/EventSelectionStep.tsx
|
|
56721
57434
|
/** Dates in order, grouped by the month and year they fall in, both in the date's own zone. */
|
|
56722
57435
|
function groupByMonth(events) {
|
|
@@ -57973,7 +58686,7 @@ function entitlementRows(props) {
|
|
|
57973
58686
|
//#region ../blocks/src/system/runtime/nodes/event-registration/CalendarAction.tsx
|
|
57974
58687
|
/** Download effects happen only after a click, including in editor preview. */
|
|
57975
58688
|
async function downloadCalendar(calendar) {
|
|
57976
|
-
const { renderCalendarFeedIcs } = await import("./src-
|
|
58689
|
+
const { renderCalendarFeedIcs } = await import("./src-LUhVXBEQ.mjs");
|
|
57977
58690
|
const url = URL.createObjectURL(new Blob([renderCalendarFeedIcs(calendar.feed)], { type: "text/calendar;charset=utf-8" }));
|
|
57978
58691
|
const link = document.createElement("a");
|
|
57979
58692
|
link.href = url;
|
|
@@ -58276,6 +58989,7 @@ function ExistingRegistrationNotice(props) {
|
|
|
58276
58989
|
className: "er-existing-registration-notice",
|
|
58277
58990
|
titleClassName: "er-existing-registration-title",
|
|
58278
58991
|
bodyClassName: "er-existing-registration-copy",
|
|
58992
|
+
secondaryBodyClassName: "er-existing-registration-copy",
|
|
58279
58993
|
icon: /* @__PURE__ */ jsx(StateIcon, {
|
|
58280
58994
|
variant: isBooked ? "success" : "info",
|
|
58281
58995
|
children: /* @__PURE__ */ jsx("svg", {
|
|
@@ -58290,9 +59004,14 @@ function ExistingRegistrationNotice(props) {
|
|
|
58290
59004
|
})
|
|
58291
59005
|
})
|
|
58292
59006
|
}),
|
|
58293
|
-
title: isBooked ? "You're already booked
|
|
58294
|
-
body: "Sign out to book for someone else.",
|
|
58295
|
-
|
|
59007
|
+
title: isBooked ? "You're already booked for this date" : "You're already on the waitlist for this event.",
|
|
59008
|
+
body: isBooked ? props.detail : "Sign out to book for someone else.",
|
|
59009
|
+
secondaryBody: isBooked ? "Need more tickets? You can book them below. They'll come as a new booking with its own confirmation email, and your first booking won't change." : void 0,
|
|
59010
|
+
actions: isBooked ? /* @__PURE__ */ jsx("a", {
|
|
59011
|
+
href: "/portal",
|
|
59012
|
+
className: "er-existing-registration-link",
|
|
59013
|
+
children: "View my bookings"
|
|
59014
|
+
}) : /* @__PURE__ */ jsx("button", {
|
|
58296
59015
|
type: "button",
|
|
58297
59016
|
className: "er-existing-registration-link",
|
|
58298
59017
|
onClick: props.onBookForSomeoneElse,
|
|
@@ -58398,8 +59117,14 @@ function ClosedAdmissionNotice({ wizard }) {
|
|
|
58398
59117
|
}
|
|
58399
59118
|
function TicketSelectionContent({ wizard, display }) {
|
|
58400
59119
|
if (!wizard.selectedEvent && !wizard.occurrenceContext) return null;
|
|
59120
|
+
const isWaitlisted = wizard.admission.kind === "closed" && wizard.admission.reason === "alreadyWaitlisted";
|
|
59121
|
+
const existingBookings = summariseExistingBookings(wizard.existingRegistrations);
|
|
58401
59122
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
58402
|
-
|
|
59123
|
+
existingBookings.kind === "booked" && !isWaitlisted && /* @__PURE__ */ jsx(ExistingRegistrationNotice, {
|
|
59124
|
+
kind: "booked",
|
|
59125
|
+
detail: existingBookings.detail
|
|
59126
|
+
}),
|
|
59127
|
+
isWaitlisted && /* @__PURE__ */ jsx(ExistingRegistrationNotice, {
|
|
58403
59128
|
kind: "waitlisted",
|
|
58404
59129
|
onBookForSomeoneElse: wizard.handleBookForSomeoneElse
|
|
58405
59130
|
}),
|
|
@@ -58777,7 +59502,13 @@ function EventRegistrationSurface(props) {
|
|
|
58777
59502
|
return /* @__PURE__ */ jsxs("div", {
|
|
58778
59503
|
ref: useRegistrationStepFocus(wizard.step, props.variant),
|
|
58779
59504
|
className: `rb-reg-surface er-container${props.variant === "overlay" ? " er-container--overlay" : ""}`,
|
|
58780
|
-
children: [
|
|
59505
|
+
children: [wizard.handOff ? /* @__PURE__ */ jsx(NavigationHandOffPanel, {
|
|
59506
|
+
handOff: wizard.handOff,
|
|
59507
|
+
purpose: wizard.handOff.purpose,
|
|
59508
|
+
businessName: wizard.handOffBusinessName,
|
|
59509
|
+
offeringLabel: wizard.handOffOfferingLabel,
|
|
59510
|
+
onBack: () => wizard.dismissHandOff?.()
|
|
59511
|
+
}, wizard.handOff.url) : presentation.layout === "steps" ? /* @__PURE__ */ jsx(EventRegistrationStepLayout, {
|
|
58781
59512
|
...props,
|
|
58782
59513
|
progress: presentation.progress
|
|
58783
59514
|
}) : /* @__PURE__ */ jsxs("div", {
|
|
@@ -58913,6 +59644,8 @@ function useConfiguredEventRegistrationWizard(props) {
|
|
|
58913
59644
|
maxTicketsNum: normalizeEventRegistrationMaxTickets(props.maxTickets ?? "5"),
|
|
58914
59645
|
mailingList: props.mailingList,
|
|
58915
59646
|
siteTerms: props.siteTerms,
|
|
59647
|
+
pageNavigation: props.pageNavigation,
|
|
59648
|
+
offeringNoun: props.offeringNoun,
|
|
58916
59649
|
siteName: props.siteName
|
|
58917
59650
|
});
|
|
58918
59651
|
}
|
|
@@ -59013,7 +59746,8 @@ function EventRegistrationWizardView(viewProps) {
|
|
|
59013
59746
|
display,
|
|
59014
59747
|
buttonText,
|
|
59015
59748
|
noun: props.offeringNoun ?? offeringNounForEvent(summaryEvent ?? wizard.scopedEvents[0] ?? null, null),
|
|
59016
|
-
attendanceMode: wizard.selectedAttendanceMode
|
|
59749
|
+
attendanceMode: wizard.selectedAttendanceMode,
|
|
59750
|
+
courseTitle: courseTitleOf(props.subject)
|
|
59017
59751
|
};
|
|
59018
59752
|
const progressFacts = bookingEntryProgress({
|
|
59019
59753
|
presentation,
|
|
@@ -60089,7 +60823,8 @@ function shopPassesMembershipsReducer(state, action) {
|
|
|
60089
60823
|
...state,
|
|
60090
60824
|
checkout: createOpenCheckoutState({
|
|
60091
60825
|
productType: "pass",
|
|
60092
|
-
product: action.pass
|
|
60826
|
+
product: action.pass,
|
|
60827
|
+
teamMember: action.teamMember
|
|
60093
60828
|
})
|
|
60094
60829
|
};
|
|
60095
60830
|
case "openMembershipCheckout": return {
|
|
@@ -60202,6 +60937,7 @@ function planDirectShopCheckoutRequest(input) {
|
|
|
60202
60937
|
return ok$1({
|
|
60203
60938
|
productType: input.productType,
|
|
60204
60939
|
productId: input.productId,
|
|
60940
|
+
...input.teamMemberId ? { teamMemberId: input.teamMemberId } : {},
|
|
60205
60941
|
customerEmail: contact.value.email,
|
|
60206
60942
|
customerName: contact.value.name,
|
|
60207
60943
|
...discountCode ? { discountCode } : {},
|
|
@@ -60218,7 +60954,8 @@ function buildUnifiedCheckoutItems(checkout) {
|
|
|
60218
60954
|
quantity: item.quantity
|
|
60219
60955
|
} : {
|
|
60220
60956
|
type: "pass",
|
|
60221
|
-
passId: item.passId
|
|
60957
|
+
passId: item.passId,
|
|
60958
|
+
...item.teamMember ? { teamMemberId: item.teamMember.id } : {}
|
|
60222
60959
|
});
|
|
60223
60960
|
}
|
|
60224
60961
|
function planUnifiedCheckoutRequest(input) {
|
|
@@ -60496,6 +61233,7 @@ function buildDirectShopCheckoutPlan(input) {
|
|
|
60496
61233
|
command: planDirectShopCheckoutRequest({
|
|
60497
61234
|
productType: input.checkout.item.productType,
|
|
60498
61235
|
productId: input.checkout.item.product.id,
|
|
61236
|
+
...input.checkout.item.productType === "pass" && input.checkout.item.teamMember ? { teamMemberId: input.checkout.item.teamMember.id } : {},
|
|
60499
61237
|
form,
|
|
60500
61238
|
successUrl: successUrl.toString(),
|
|
60501
61239
|
cancelUrl: cancelUrl.toString(),
|
|
@@ -60538,33 +61276,113 @@ async function submitDirectShopCheckout(input) {
|
|
|
60538
61276
|
function ShopClient(props) {
|
|
60539
61277
|
return /* @__PURE__ */ jsx(PassesMembershipsController, { render: props.render });
|
|
60540
61278
|
}
|
|
61279
|
+
function initialPassTeamMember(selection) {
|
|
61280
|
+
if (!selection || selection.kind === "any") return null;
|
|
61281
|
+
if (selection.kind === "owner") return selection.teamMember;
|
|
61282
|
+
return selection.teamMembers.length === 1 ? selection.teamMembers[0] ?? null : null;
|
|
61283
|
+
}
|
|
61284
|
+
function PassTeamMemberChoice(props) {
|
|
61285
|
+
const selection = props.selection;
|
|
61286
|
+
if (!selection || selection.kind === "any") return null;
|
|
61287
|
+
if (selection.kind === "owner") return /* @__PURE__ */ jsxs("p", {
|
|
61288
|
+
className: "shop__card-team-member",
|
|
61289
|
+
children: ["With ", selection.teamMember.name]
|
|
61290
|
+
});
|
|
61291
|
+
const selectId = `shop-pass-team-member-${props.passId}`;
|
|
61292
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
61293
|
+
className: "shop__card-team-member-choice rb-flex rb-flex-col rb-gap-1",
|
|
61294
|
+
children: [
|
|
61295
|
+
/* @__PURE__ */ jsx("label", {
|
|
61296
|
+
className: "rb-label",
|
|
61297
|
+
htmlFor: selectId,
|
|
61298
|
+
children: "Choose your practitioner"
|
|
61299
|
+
}),
|
|
61300
|
+
/* @__PURE__ */ jsxs("select", {
|
|
61301
|
+
id: selectId,
|
|
61302
|
+
className: "form-input",
|
|
61303
|
+
value: props.chosen?.id ?? "",
|
|
61304
|
+
"aria-invalid": props.missing || void 0,
|
|
61305
|
+
onChange: (event) => props.onChoose(selection.teamMembers.find((member) => member.id === event.target.value) ?? null),
|
|
61306
|
+
children: [selection.teamMembers.length > 1 ? /* @__PURE__ */ jsx("option", {
|
|
61307
|
+
value: "",
|
|
61308
|
+
children: "Choose…"
|
|
61309
|
+
}) : null, selection.teamMembers.map((member) => /* @__PURE__ */ jsx("option", {
|
|
61310
|
+
value: member.id,
|
|
61311
|
+
children: member.name
|
|
61312
|
+
}, member.id))]
|
|
61313
|
+
}),
|
|
61314
|
+
props.chosen ? /* @__PURE__ */ jsxs("p", {
|
|
61315
|
+
className: "rb-caption status-muted",
|
|
61316
|
+
children: [
|
|
61317
|
+
"You'll book these sessions with ",
|
|
61318
|
+
props.chosen.name,
|
|
61319
|
+
"."
|
|
61320
|
+
]
|
|
61321
|
+
}) : props.missing ? /* @__PURE__ */ jsx("p", {
|
|
61322
|
+
className: "rb-caption status-error",
|
|
61323
|
+
role: "alert",
|
|
61324
|
+
children: "Choose who you'd like to book these sessions with."
|
|
61325
|
+
}) : null
|
|
61326
|
+
]
|
|
61327
|
+
});
|
|
61328
|
+
}
|
|
60541
61329
|
function PassProductCard(props) {
|
|
60542
61330
|
const action = props.display.action;
|
|
60543
|
-
|
|
61331
|
+
const nobodyToChoose = action.kind === "purchase" && action.product.teamMemberSelection?.kind === "choose" && action.product.teamMemberSelection.teamMembers.length === 0;
|
|
61332
|
+
if (action.kind === "unavailable" || nobodyToChoose) return /* @__PURE__ */ jsx(PassCardView, {
|
|
60544
61333
|
display: props.display,
|
|
60545
61334
|
presentation: props.presentation,
|
|
60546
61335
|
index: props.index,
|
|
60547
|
-
action: /* @__PURE__ */ jsx(PassPurchaseUnavailable, { label: action.label })
|
|
61336
|
+
action: /* @__PURE__ */ jsx(PassPurchaseUnavailable, { label: action.kind === "unavailable" ? action.label : "Not available to buy online yet" })
|
|
60548
61337
|
});
|
|
61338
|
+
return /* @__PURE__ */ jsx(PurchasablePassCard, {
|
|
61339
|
+
...props,
|
|
61340
|
+
action
|
|
61341
|
+
});
|
|
61342
|
+
}
|
|
61343
|
+
function PurchasablePassCard(props) {
|
|
61344
|
+
const { product } = props.action;
|
|
61345
|
+
const selection = product.teamMemberSelection;
|
|
61346
|
+
const [chosen, setChosen] = useState(() => initialPassTeamMember(selection));
|
|
61347
|
+
const [missing, setMissing] = useState(false);
|
|
61348
|
+
const buy = () => {
|
|
61349
|
+
if (selection?.kind === "choose" && !chosen) {
|
|
61350
|
+
setMissing(true);
|
|
61351
|
+
return;
|
|
61352
|
+
}
|
|
61353
|
+
props.onBuy(product, chosen);
|
|
61354
|
+
};
|
|
60549
61355
|
return /* @__PURE__ */ jsx(PassCardView, {
|
|
60550
61356
|
display: props.display,
|
|
60551
61357
|
presentation: props.presentation,
|
|
60552
61358
|
index: props.index,
|
|
60553
|
-
action: /* @__PURE__ */ jsx(
|
|
61359
|
+
action: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(PassTeamMemberChoice, {
|
|
61360
|
+
passId: product.id,
|
|
61361
|
+
selection,
|
|
61362
|
+
chosen,
|
|
61363
|
+
missing,
|
|
61364
|
+
onChoose: (teamMember) => {
|
|
61365
|
+
setChosen(teamMember);
|
|
61366
|
+
setMissing(false);
|
|
61367
|
+
}
|
|
61368
|
+
}), /* @__PURE__ */ jsx(ShopPurchaseAction, {
|
|
60554
61369
|
presentation: props.presentation,
|
|
60555
61370
|
type: "button",
|
|
60556
61371
|
variant: props.buttonVariant,
|
|
60557
61372
|
size: "md",
|
|
60558
61373
|
extraClassName: "shop__cta",
|
|
60559
|
-
label: action.label,
|
|
60560
|
-
onClick:
|
|
60561
|
-
}),
|
|
61374
|
+
label: props.action.label,
|
|
61375
|
+
onClick: buy
|
|
61376
|
+
})] }),
|
|
60562
61377
|
feedback: /* @__PURE__ */ jsx(ShopAddFeedback, {
|
|
60563
61378
|
active: props.feedbackActive,
|
|
60564
|
-
itemLabel:
|
|
61379
|
+
itemLabel: chosen ? `${product.name} with ${chosen.name}` : product.name
|
|
60565
61380
|
})
|
|
60566
61381
|
});
|
|
60567
61382
|
}
|
|
61383
|
+
function checkoutProductLabel(checkout) {
|
|
61384
|
+
return `${checkout.item.productType === "pass" && checkout.item.teamMember ? `${checkout.item.product.name} with ${checkout.item.teamMember.name}` : checkout.item.product.name} — ${formatCommercePrice(checkout.item.product.price, checkout.item.product.currency)}`;
|
|
61385
|
+
}
|
|
60568
61386
|
function getCheckoutModalTitle(checkout) {
|
|
60569
61387
|
if (!checkout) return "";
|
|
60570
61388
|
if (checkout.item.productType === "membership") return "Subscribe to Membership";
|
|
@@ -60616,11 +61434,12 @@ function PassesMembershipsController({ render }) {
|
|
|
60616
61434
|
subtotalCents: checkout?.item.product.price
|
|
60617
61435
|
});
|
|
60618
61436
|
const discountApplyFeedback = getDiscountApplyFeedback(discountApply.status, formatCommercePrice);
|
|
60619
|
-
const handleBuyPass = useCallback((pass) => {
|
|
61437
|
+
const handleBuyPass = useCallback((pass, teamMember) => {
|
|
60620
61438
|
if (hydration.passPurchaseMode === "add_to_cart") {
|
|
60621
61439
|
addPassToCommerceCart(api.config.siteId, {
|
|
60622
61440
|
passId: pass.id,
|
|
60623
61441
|
title: pass.name,
|
|
61442
|
+
...teamMember ? { teamMember } : {},
|
|
60624
61443
|
unitPriceCents: pass.price,
|
|
60625
61444
|
currency: pass.currency
|
|
60626
61445
|
});
|
|
@@ -60629,7 +61448,8 @@ function PassesMembershipsController({ render }) {
|
|
|
60629
61448
|
}
|
|
60630
61449
|
dispatch({
|
|
60631
61450
|
type: "openPassCheckout",
|
|
60632
|
-
pass
|
|
61451
|
+
pass,
|
|
61452
|
+
teamMember
|
|
60633
61453
|
});
|
|
60634
61454
|
}, [
|
|
60635
61455
|
api.config.siteId,
|
|
@@ -60804,15 +61624,10 @@ function PassesMembershipsController({ render }) {
|
|
|
60804
61624
|
children: [
|
|
60805
61625
|
/* @__PURE__ */ jsxs("p", {
|
|
60806
61626
|
className: "shop__modal-product",
|
|
60807
|
-
children: [
|
|
60808
|
-
|
|
60809
|
-
|
|
60810
|
-
|
|
60811
|
-
checkout.item.productType === "membership" ? /* @__PURE__ */ jsx("span", {
|
|
60812
|
-
className: "shop__modal-interval",
|
|
60813
|
-
children: formatInterval(checkout.item.product.billingInterval)
|
|
60814
|
-
}) : null
|
|
60815
|
-
]
|
|
61627
|
+
children: [checkoutProductLabel(checkout), checkout.item.productType === "membership" ? /* @__PURE__ */ jsx("span", {
|
|
61628
|
+
className: "shop__modal-interval",
|
|
61629
|
+
children: formatInterval(checkout.item.product.billingInterval)
|
|
61630
|
+
}) : null]
|
|
60816
61631
|
}),
|
|
60817
61632
|
/* @__PURE__ */ jsx(SiteTermsChangedNotice, { message: siteTerms.notice }),
|
|
60818
61633
|
checkout.duplicateWarning ? /* @__PURE__ */ jsxs(FeedbackMessage, {
|
|
@@ -67335,9 +68150,14 @@ async function applyBatch(input, batch) {
|
|
|
67335
68150
|
return commitReserved(input, batch);
|
|
67336
68151
|
});
|
|
67337
68152
|
} catch (error) {
|
|
68153
|
+
const reason = journalFailureReason(error);
|
|
68154
|
+
if (reason === "lease-lost") return {
|
|
68155
|
+
kind: "refused",
|
|
68156
|
+
reason
|
|
68157
|
+
};
|
|
67338
68158
|
return {
|
|
67339
68159
|
kind: "failed",
|
|
67340
|
-
uncertain:
|
|
68160
|
+
uncertain: reason === "reconcile"
|
|
67341
68161
|
};
|
|
67342
68162
|
}
|
|
67343
68163
|
} catch {
|
|
@@ -69354,7 +70174,7 @@ function usePreviewTheme(siteId, enabled) {
|
|
|
69354
70174
|
}
|
|
69355
70175
|
//#endregion
|
|
69356
70176
|
//#region ../editor-blocks/src/widgets/location/PickerMapArea.tsx
|
|
69357
|
-
const LazyEditMap = lazy(() => import("./MapLibreEditMap-
|
|
70177
|
+
const LazyEditMap = lazy(() => import("./MapLibreEditMap-CKjYUp_E.mjs").then((mod) => ({ default: mod.MapLibreEditMap })));
|
|
69358
70178
|
function EditMap(props) {
|
|
69359
70179
|
return /* @__PURE__ */ jsx(Suspense, {
|
|
69360
70180
|
fallback: null,
|
|
@@ -70531,7 +71351,7 @@ async function loadLocationSourceAvailability(port) {
|
|
|
70531
71351
|
status: "ready",
|
|
70532
71352
|
businessAddress: formatLocationAddress(business.value.locationValue?.address ?? null, business.value.siteCountry) ?? (business.value.locationValue ? "Map pin only, no address" : null),
|
|
70533
71353
|
businessHidden: profile.value.profile.addressVisibility === "hidden",
|
|
70534
|
-
venueCount: venues.value.length
|
|
71354
|
+
venueCount: venues.value.filter((venue) => venue.archivedAt === null).length
|
|
70535
71355
|
};
|
|
70536
71356
|
}
|
|
70537
71357
|
const sourcePort = (siteId, apiClient) => ({
|