@riverbankcms/sdk 0.177.0 → 0.179.0
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/README.md +15 -8
- package/dist/_dts/{BlocksIslandsHydrator-sYraeqm9.d.ts → BlocksIslandsHydrator-DKwgs95u.d.ts} +1 -1
- package/dist/_dts/{Page-Bp7hTDTy.d.ts → Page-lWenra5i.d.ts} +7 -7
- package/dist/_dts/{SdkPreviewMode-CxkCCyKw.d.ts → SdkPreviewMode-BRxhRw4I.d.ts} +2 -2
- package/dist/_dts/{client-K6UhbL3t.d.ts → client-qWn7xAwJ.d.ts} +77 -23
- package/dist/_dts/{content-types-BLAdIMyr.d.ts → content-types-DL6GIvTm.d.ts} +2 -2
- package/dist/_dts/{contracts-BG7yTZ6t.d.ts → contracts-CzWyAiJj.d.ts} +6 -116
- package/dist/_dts/{generatePageMetadata-X_WpGzZZ.d.ts → generatePageMetadata-CBKd0cJ4.d.ts} +2 -2
- package/dist/_dts/{index--n-wV8Xd.d.ts → index-7CDBZGb-.d.ts} +1 -1
- package/dist/_dts/{index-Bygd2RCg.d.ts → index-BU9uAkHB.d.ts} +4 -4
- package/dist/_dts/{index-BMGif2r3.d.ts → index-BYnG_vF5.d.ts} +1 -1
- package/dist/_dts/{index-CBRbZJ6u.d.ts → index-CZgJrhzT.d.ts} +4 -2
- package/dist/_dts/{index-BLseXObg.d.ts → index-CaCum9mM.d.ts} +2 -2
- package/dist/_dts/{index-BpAW9AKB.d.ts → index-DCiSHd-C.d.ts} +1 -1
- package/dist/_dts/{index-CX9bp60k.d.ts → index-DVSipdrT.d.ts} +3 -3
- package/dist/_dts/{loadContent-uhUThWaq.d.ts → loadContent-CPKbFQyq.d.ts} +15 -13
- package/dist/_dts/{request-Bf9YImJw.d.ts → request-BjKBCS7t.d.ts} +1687 -373
- package/dist/_dts/{resolveBlockData-D6M5NMZB.d.ts → resolveBlockData-DupbMCup.d.ts} +8 -5
- package/dist/_dts/resolvePageContent-BqNyCHi8.d.ts +61 -0
- package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
- package/dist/_dts/sdk/src/client/types.d.ts +3 -3
- 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 +7 -2
- package/dist/_dts/sdk/src/gifting/client.d.ts +1 -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 +3 -3
- package/dist/_dts/sdk/src/next/index.d.ts +32 -12
- 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 +56 -4
- package/dist/_dts/sdk/src/portal/index.d.ts +95 -13
- 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 +7 -7
- package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +3 -3
- package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/index.d.ts +19 -6
- 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/serviceBookingOutline-YcsIjvn1.d.ts +582 -0
- package/dist/_dts/{types-C1l2Sm2h.d.ts → types-B7e6Lmo5.d.ts} +3 -3
- package/dist/_dts/{types-DgV8P2mz.d.ts → types-BOxSq-Bq.d.ts} +8 -7
- package/dist/_dts/{types-BdZ5pJSk.d.ts → types-CT-KOxl_.d.ts} +5 -39
- package/dist/_dts/{validation-BtbZIT5f.d.ts → validation-Dz6qccue.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-CeYQQQs7.mjs → BlocksIslandsHydrator-1XifJg6V.mjs} +17 -18
- package/dist/client/{BookingMailingListNote-CDDWrY_W.mjs → BookingMailingListNote-BsbEgagJ.mjs} +7 -7
- package/dist/client/{BookingQuestionFields-MbvIo2jS.mjs → BookingQuestionFields-C8IbeLHj.mjs} +4 -4
- package/dist/client/{CalendarNavigationChevron-C6CSVfEB.mjs → CalendarNavigationChevron-Bbqij1XQ.mjs} +43 -10
- package/dist/client/{CheckboxChoice-b-PJLEXe.mjs → CheckboxChoice-BZPLCgTU.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-C9Ggcfx3.mjs → DemoBookingPortalAccess-uA9H8LIL.mjs} +4 -4
- package/dist/client/{EventCalendar.client-BSMuSqg0.mjs → EventCalendar.client-yoSI77ov.mjs} +11 -11
- package/dist/client/{EventCombined.client-BTrmSyUB.mjs → EventCombined.client-HeCNlliq.mjs} +11 -11
- package/dist/client/{EventEmbeddedCheckoutStep-B18VbNS_.mjs → EventEmbeddedCheckoutStep-BDnicDM6.mjs} +1 -1
- package/dist/client/{EventItem-B0WjGXsH.mjs → EventItem-Duhk1vnF.mjs} +247 -7
- package/dist/client/{EventListWeekNavigation-8Ij7vuxY.mjs → EventListWeekNavigation-BiutEqPK.mjs} +1 -1
- package/dist/client/{EventListing.client-CWk2NEwd.mjs → EventListing.client-B5ln77jG.mjs} +3 -3
- package/dist/client/{EventListing.view-BEH4UbSL.mjs → EventListing.view-hUDhNtMv.mjs} +203 -9
- package/dist/client/{EventRegistrationPayment-B2EikR3f.mjs → EventRegistrationPayment-DqtX1vB2.mjs} +439 -123
- package/dist/client/{Page-C03rc6jw.mjs → Page-ChJ2TGVk.mjs} +24314 -20226
- package/dist/client/{ProtectedSubmitButton-C-ql101B.mjs → ProtectedSubmitButton-De6AzhE6.mjs} +1 -1
- package/dist/client/{SiteTermsAgreementField-BYACYP0T.mjs → SiteTermsAgreementField-CDBU31xW.mjs} +3 -3
- package/dist/client/{StepIndicator-Bb7rPtSq.mjs → StepIndicator-2Dl9zon2.mjs} +80 -33
- package/dist/client/{BookingPanelArrangement-BShQSial.mjs → StepIndicator-JQA-VuEH.mjs} +12 -12
- package/dist/client/{TabBarFragment-BqfRLojo.mjs → TabBarFragment-DlKQRhP4.mjs} +1 -1
- package/dist/client/{ThemedButton-DuaYtnvG.mjs → ThemedButton-CnSa7o-I.mjs} +66 -66
- package/dist/client/{accessibleSurfaces-DN8it_Cx.mjs → accessibleSurfaces-Wl8-_OVJ.mjs} +1 -1
- package/dist/client/{accordion-BfsOiweL.mjs → accordion-B6SqU49k.mjs} +1 -1
- package/dist/client/{booking-form.client-B8ohIj13.mjs → booking-form.client-DrEOjQ3N.mjs} +15 -15
- package/dist/client/{bookingForm-CXsck2oH.mjs → bookingForm-drZBwEZW.mjs} +4 -4
- package/dist/client/bookings.mjs +5 -5
- package/dist/client/{boxStyleClassNames-B_hcuT06.mjs → boxStyleClassNames-DEh45w16.mjs} +19 -19
- package/dist/client/{carousel-Cz5Ddbsx.mjs → carousel-C-YJliD-.mjs} +2 -2
- package/dist/client/{carousel.client-h65clfUO.mjs → carousel.client-DMtGYTTM.mjs} +1 -1
- package/dist/client/{cart-CTC2oS3p.mjs → cart-acGFWK9R.mjs} +3 -3
- package/dist/client/{cart.client-c1YkTC-Q.mjs → cart.client-BzlOGP2j.mjs} +1 -1
- package/dist/client/{checkout-BeW1ufaH.mjs → checkout-SEontwhy.mjs} +3 -3
- package/dist/client/{checkout.client-BeU32khQ.mjs → checkout.client-C0Qvh-d4.mjs} +1 -1
- package/dist/client/{checkoutUrls-DVfSUSKp.mjs → checkoutUrls-yUKeq1N9.mjs} +1 -1
- package/dist/client/client.mjs +469 -320
- package/dist/client/{context-R9p5c8IH.mjs → context-DTrwaQtg.mjs} +2 -1
- package/dist/client/{dateFormatting-CF6FWCoo.mjs → dateFormatting-Cg8E1r9l.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-tZxIm3RL.mjs → demoPortalMagicLink-D0kOJYOX.mjs} +5 -4
- package/dist/client/{enhanceHeaderSection-DEYDI54E.mjs → enhanceHeaderSection-DyrpZ7ks.mjs} +4 -4
- package/dist/client/{event-registration.client-DWvSODTI.mjs → event-registration.client-RLZQWi2V.mjs} +121 -183
- package/dist/client/{eventCalendar-C9Pn9eeZ.mjs → eventCalendar-CphYnImh.mjs} +4 -4
- package/dist/client/{eventCombined-Bdhk0fp0.mjs → eventCombined-BvqjASB_.mjs} +4 -4
- package/dist/client/{eventListing-B-bJOQUk.mjs → eventListing-BaNAoC_M.mjs} +4 -4
- package/dist/client/{eventRegistration-CbdmUiDT.mjs → eventRegistration-COMHoRl6.mjs} +4 -4
- package/dist/client/events-9LPvwbWp.mjs +28 -0
- package/dist/client/{form-BbUUt784.mjs → form-DyH2juYT.mjs} +3 -3
- package/dist/client/{form.client-BVlz-9_t.mjs → form.client-DBwzkB0M.mjs} +5 -5
- package/dist/client/{form.parts-TB4UIrML.mjs → form.parts-CY4kX3mh.mjs} +3 -3
- package/dist/client/{formatDate-TDHhFjFN.mjs → formatDate-CTEN7gxW.mjs} +1 -1
- package/dist/client/gifting/client.mjs +7 -6
- package/dist/client/{gifting-CbNSrp7C.mjs → gifting-CIx4V378.mjs} +4 -4
- package/dist/client/{gifting.client-B__bGhFc.mjs → gifting.client-BEVPpzJM.mjs} +5 -5
- package/dist/client/{gifting.parts-CTA1sDW6.mjs → gifting.parts-VnORjnZK.mjs} +2 -2
- package/dist/client/{headerSection-5Wn9nUW_.mjs → headerSection-DGcJfRS8.mjs} +2 -2
- package/dist/client/{lookSurfaces-BwiNdgMU.mjs → lookSurfaces-IqT_SVnX.mjs} +167 -85
- package/dist/client/{newsletter-form.client-B17WYHxZ.mjs → newsletter-form.client-BvEDkjiD.mjs} +6 -6
- package/dist/client/{shop.interactive-CxDJ8P2r.mjs → newsletter-form.interactive-DCO1lErD.mjs} +3970 -3997
- package/dist/client/{newsletter-form.parts-DN9wD1ZG.mjs → newsletter-form.parts-BIy4IUT3.mjs} +2 -2
- package/dist/client/{newsletterForm-DLMlxInp.mjs → newsletterForm-CoTXDNFS.mjs} +3 -3
- package/dist/client/portal/client.mjs +346 -21
- package/dist/client/{product-detail.client-Di_anRGR.mjs → product-detail.client-YHQ2aKX1.mjs} +1 -1
- package/dist/client/{product-list.client-Duhl6rtL.mjs → product-list.client-DxoZw1vF.mjs} +1 -1
- package/dist/client/{productDetail-BgKmCwA8.mjs → productDetail-DjuFvkey.mjs} +3 -3
- package/dist/client/{productList-C_wMKsYS.mjs → productList-DE9GEFoZ.mjs} +3 -3
- package/dist/client/{propsDecoder-y3LvxaiG.mjs → propsDecoder-Cyag_HOs.mjs} +2 -48
- package/dist/client/{registry.server-CIWYKz1V.mjs → registry.server-BPwV-0Pp.mjs} +10426 -9114
- package/dist/client/rendering/client.mjs +41 -27
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +23 -2836
- package/dist/client/{richText-coerce-DkPBFb_a.mjs → richText-coerce-NrRqDeOg.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-BgO0rZce.mjs → routeIslandApiConfig-BWq5gKFK.mjs} +1 -1
- package/dist/client/runtimeResponse-D2j2-mOk.mjs +3 -0
- package/dist/client/{runtimeResponse-9v8q2NBc.mjs → runtimeResponse-DtWSfWSZ.mjs} +1 -1
- package/dist/client/{shop-CFbWlv_W.mjs → shop-C3wM0Hr4.mjs} +3 -3
- package/dist/client/{shop-commerce-C-I29eaA.mjs → shop-commerce-34YvcpbX.mjs} +14 -14
- package/dist/client/{shop-commerce-store-DGcc7twO.mjs → shop-commerce-store-B7xHksOs.mjs} +1 -1
- package/dist/client/{shop-discount-apply.state-DOm7vx0X.mjs → shop-discount-apply.state-BiBnozfO.mjs} +2 -2
- package/dist/client/{shop.client-GHTWUKD6.mjs → shop.client-C0v88nLd.mjs} +14 -14
- package/dist/client/{shopShared-Be9QJJpT.mjs → shopShared-Ct-BRNez.mjs} +2 -2
- package/dist/client/spam-protection.mjs +1 -1
- package/dist/client/{noop-CaQxI-Js.mjs → src-CCtanNlD.mjs} +462 -455
- package/dist/client/src-DqMbCjI1.mjs +3 -0
- package/dist/client/{src-xrjaKaCj.mjs → src-uwCpbHXG.mjs} +2 -1
- package/dist/client/{timetableModel--R0zVzZO.mjs → timetableModel-lhE29TNT.mjs} +66 -12
- package/dist/client/{types-DjWUR_O6.mjs → types-BEaKfam_.mjs} +65 -65
- package/dist/client/{useAvailableSlots-BGu_2F50.mjs → useAvailableSlots-BelJviOT.mjs} +2 -2
- package/dist/client/useDiscountCodeUi-rQRE1-Ho.mjs +196 -0
- package/dist/client/{useEventPagination-DxIJ--JZ.mjs → useEventPagination-C4rS2Xxl.mjs} +8 -8
- package/dist/client/{view-3foOzGWR.mjs → view-LJVHVqsy.mjs} +4 -4
- package/dist/client/{display-4HYOb-AK.mjs → wizardSteps-CNDsxeJH.mjs} +9168 -8981
- package/dist/preview-next/before-render.mjs +4 -3
- package/dist/preview-next/client/{PageSectionToolbar-D6-jojqh.mjs → PageSectionToolbar-C4TtBPN-.mjs} +3 -3
- package/dist/preview-next/client/{PreviewEditorSidebar-BUVFKZ4k.mjs → PreviewEditorSidebar-D6fkE59-.mjs} +15 -13
- package/dist/preview-next/client/{PreviewEditorUI-292pOiSt.mjs → PreviewEditorUI-amcDlj0O.mjs} +4 -4
- package/dist/preview-next/client/{PreviewShell-CW0Yzj3h.mjs → PreviewShell-DeQjx4zk.mjs} +5 -5
- package/dist/preview-next/client/{SdkPreviewModeRuntime-Dba7zoZK.mjs → SdkPreviewModeRuntime-Cx0SXnoX.mjs} +5 -5
- package/dist/preview-next/client/{previewAssistantSlot-B-utyhbS.mjs → previewAssistantSlot-aqpU34WI.mjs} +1764 -1090
- package/dist/preview-next/client/{previewChromeRoot-CCoGydUD.mjs → previewChromeRoot-D3Gy_Rs0.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-DCpXVcA0.mjs → sdk-runtime-Dzx_RrN7.mjs} +2 -2
- package/dist/preview-next/client/{siteStyleAccess-sjOvRAHY.mjs → siteStyleAccess-LHedw83e.mjs} +1 -1
- package/dist/preview-next/client/src-EO5QoRlU.mjs +3 -0
- package/dist/preview-next/client/{src-DzXUmsyK.mjs → src-lX6heoDA.mjs} +2 -1
- package/dist/preview-next/client/{useAutosaveStatus-R1rZ9-IZ.mjs → useAutosaveStatus-DpSd9aVk.mjs} +1 -1
- package/dist/preview-next/client/{useOpenBlockForSetup-BS7CANPv.mjs → useOpenBlockForSetup-BGZn5AT1.mjs} +1 -1
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-BSSbtz6A.mjs → route-contract-DnL-FgSV.mjs} +83 -11
- package/dist/server/{Block.shared-Dc3DX7Cf.mjs → Block.shared-BEbq6EwO.mjs} +5 -5
- package/dist/server/{bindings-VGgS6UvF.mjs → bindings-Bly0dRs7.mjs} +36 -5
- package/dist/server/{client-BPLLL22F.mjs → client-CGJ2ztYp.mjs} +1021 -1118
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/constants-Cj7hfbrA.mjs +41 -0
- package/dist/server/contentTypeResolver-B9vy8BrF.mjs +19 -0
- package/dist/server/data/dataLoaderContext.mjs +1 -1
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/{dataLoaderContext-B3fXA54R.mjs → dataLoaderContext-lMRTfG5Z.mjs} +1 -0
- package/dist/server/error-f4g44bKx.mjs +387 -0
- package/dist/server/index.mjs +3 -2
- package/dist/server/loadContent-BkK1w3QQ.mjs +692 -0
- package/dist/server/{loadPage-CQgde5DN.mjs → loadPage-DTLe0FEs.mjs} +22 -4
- package/dist/server/{navigation-iC_hXjJI.mjs → navigation-BcNfYYuu.mjs} +1 -1
- package/dist/server/navigation.mjs +1 -1
- package/dist/server/next.mjs +103 -100
- package/dist/server/{overrideResolution-CkpwAHvW.mjs → overrideResolution-Uy9Zp2Ks.mjs} +1 -1
- package/dist/server/page-converter.mjs +1 -1
- package/dist/server/{pageRenderPlan-CfSnAkCO.mjs → pageRenderPlan-JzxBnqfV.mjs} +19 -7
- package/dist/server/{pageRuntimeSupport-uz4gzBOo.mjs → pageRuntimeSupport-DyNSd2Yj.mjs} +50 -2
- package/dist/server/{pageShared-6z6JBU41.mjs → pageShared-DU4ETFPS.mjs} +89 -83
- package/dist/server/portal-B4JVkdjc.mjs +783 -0
- package/dist/server/portal.mjs +3 -3
- package/dist/server/{prebuild-B4_Llisx.mjs → prebuild-8jNtDXmS.mjs} +5 -4
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-CCiYV8_s.mjs → prefetchBlockData-xeMG42aw.mjs} +3 -2
- package/dist/server/{registry-CXRXsFSx.mjs → registry-DH1VrsCl.mjs} +587 -329
- 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/server.mjs +5 -4
- package/dist/server/rendering.mjs +9 -8
- package/dist/server/{resolveBlockData-yfe8WLEA.mjs → resolveBlockData-BN8tweTx.mjs} +24 -5
- package/dist/server/resolvePageContent-DnM16_f9.mjs +89 -0
- package/dist/server/routing.mjs +271 -57
- package/dist/server/server.mjs +3 -3
- package/dist/server/{loadContent-CxASA3PE.mjs → servicePageContent-B-FezJmH.mjs} +709 -453
- package/dist/server/{validation-BvHio6QI.mjs → validation-3jOzYdPL.mjs} +3 -3
- package/dist/server/{version-SuFlio6n.mjs → version-8t0o6_jd.mjs} +1 -1
- package/dist/styles/index.css +19 -0
- package/package.json +1 -1
- package/dist/_dts/footerPageOutline-DwMHeYmQ.d.ts +0 -256
- package/dist/_dts/resolvePageContent-DkzWvFbG.d.ts +0 -162
- package/dist/client/LocationMapActions-myIQIvQL.mjs +0 -62
- package/dist/client/MapDrawingSvg-BfsVyPvB.mjs +0 -200
- package/dist/client/course-CUFVJEAc.mjs +0 -237
- package/dist/client/duration-Q6_QNgiv.mjs +0 -37
- package/dist/client/event-details.client-BwjBJP-f.mjs +0 -53
- package/dist/client/eventDetails-C2LfNW_o.mjs +0 -13
- package/dist/client/runtimeResponse-CVkM0dHy.mjs +0 -3
- package/dist/client/src-BozhJ43Z.mjs +0 -3
- package/dist/client/useDiscountCodeUi-I_mXI9Yd.mjs +0 -237
- package/dist/client/view-BbzH5MQb.mjs +0 -1371
- package/dist/preview-next/client/src-LUhVXBEQ.mjs +0 -3
- package/dist/server/constants-hl17xz6x.mjs +0 -22
- package/dist/server/portal-BjVHMAUC.mjs +0 -371
- package/dist/server/resolvePageContent-CAELMBEJ.mjs +0 -438
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { n as useOptionalPreviewLayout } from "./PreviewLayoutContext-Dy0LwcHc.mjs";
|
|
3
3
|
import { At as stableJsonStringify, Bt as toLocationCoordinates, Ft as locationValueSchema, Gt as err$1, Ht as capitalize$1, It as normalizeLocationAddressText, Kt as ok$2, Lt as parseLocationValue, Rt as projectPublicLocation, T as Minus, Tt as decideLocationSave, Ut as trimmedStringOrNull, Wt as mapDrawingSchema, at as CirclePlus, bt as ArrowDown, dt as ChevronLeft, ft as ChevronDown, n as X, ot as CircleMinus, u as Sparkles, ut as ChevronRight, v as Plus, zt as publicLocationSchema } from "./lucide-react-McYZeSMb.mjs";
|
|
4
4
|
import { $ as ICON_PICKER_PRESETS, A as buttonSizeNameSchema, B as blockColorTokenNames, C as MinusIcon, D as AFFORDANCE_SUPPRESS_CLASS, E as themeButtonSelector, F as buttonSystemSchema, G as paletteColorsFromEntries, H as isThemeColorToken, I as buttonVisualStatesSchema, K as paletteColorsSchema, L as opaqueButtonColourTokenSchema, M as unsafeAsOpaqueButtonColourToken, N as buttonEffectApplicationSchema, O as DEFAULT_VARIANT_ALIAS_ID, P as buttonPressOffsetSchema, Q as themeColorTokenSchema, R as parseOpaqueButtonColourToken, S as FileTextIcon, T as parseThemeButtonVariantId, U as normalizePaletteHex, V as hexColorSchema, W as paletteColorEntries, X as parseThemeColorToken, Y as parseColorTokenParts, Z as themeColorShadeSteps, _ as ClockIcon$1, a as ThemedDownloadLink, b as FileAudioIcon, d as SEMANTIC_ICON_DEFINITIONS, et as SYSTEM_BLOCK_KINDS, f as isSemanticIconId, g as CirclePlusIcon, h as CircleMinusIcon, j as createStandardButtonSurfacePolicy, k as STANDARD_BUTTON_SURFACE_POLICY, m as ChevronDownIcon, n as ThemedButton, nt as SpinnerNode, o as getIconComponent, p as ArrowDownIcon, q as paletteModeSchema, r as ThemedButtonLink, rt as clsx, t as ThemedAuthoredButton, tt as VARIANT_ROLES, v as ExternalLinkIcon, w as PlusIcon, x as FileSpreadsheetIcon, y as FileArchiveIcon, z as PALETTE_TOKEN_NAMES } from "./ThemedButton-CVYz7h68.mjs";
|
|
5
|
-
import { a as buildTimetableModel$1, b as shiftCalendarAnchorDate, c as addDays, f as formatDateKey$1, g as getWeekCalendarDayTuple, h as getOrderedDayNames, i as groupItemsByDate, l as addMonths, p as getDayOfWeek, r as calendarLinks, u as buildCalendarViewport$1, v as isSameCalendarDay, y as isToday } from "./src-
|
|
5
|
+
import { a as buildTimetableModel$1, b as shiftCalendarAnchorDate, c as addDays, f as formatDateKey$1, g as getWeekCalendarDayTuple, h as getOrderedDayNames, i as groupItemsByDate, l as addMonths, p as getDayOfWeek, r as calendarLinks, u as buildCalendarViewport$1, v as isSameCalendarDay, y as isToday } from "./src-lX6heoDA.mjs";
|
|
6
6
|
import * as React$1 from "react";
|
|
7
7
|
import React, { Suspense, createContext, createElement, forwardRef, lazy, startTransition, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore, useTransition } from "react";
|
|
8
8
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -485,7 +485,7 @@ function parseEventPageSurfaceDestinationMode(value) {
|
|
|
485
485
|
return value === "cms-managed" || value === "system-managed" ? value : void 0;
|
|
486
486
|
}
|
|
487
487
|
function parseEventPageSurfaceSubject(value) {
|
|
488
|
-
if (!isRecord$
|
|
488
|
+
if (!isRecord$37(value)) return err$1({ kind: "notObject" });
|
|
489
489
|
const parsed = value.kind === "eventSeries" ? parseEventSeriesPageSurfaceSubject(value) : value.kind === "eventOffering" ? parseEventOfferingPageSurfaceSubject(value) : err$1({
|
|
490
490
|
kind: "unsupportedSubject",
|
|
491
491
|
subjectKind: value.kind
|
|
@@ -544,7 +544,7 @@ function parseEventSeriesIdList(values) {
|
|
|
544
544
|
}
|
|
545
545
|
return ok$2(parsed);
|
|
546
546
|
}
|
|
547
|
-
function isRecord$
|
|
547
|
+
function isRecord$37(value) {
|
|
548
548
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
549
549
|
}
|
|
550
550
|
//#endregion
|
|
@@ -570,128 +570,6 @@ function servicePageDestination(value) {
|
|
|
570
570
|
return mode === "cms-managed" || mode === "system-managed" ? { serviceDestinationMode: mode } : {};
|
|
571
571
|
}
|
|
572
572
|
//#endregion
|
|
573
|
-
//#region ../core/src/ticket-quantity.ts
|
|
574
|
-
function toPositiveTicketQuantity(value) {
|
|
575
|
-
if (!Number.isFinite(value) || !Number.isInteger(value) || value <= 0) return err$1("invalid_quantity");
|
|
576
|
-
return ok$2(value);
|
|
577
|
-
}
|
|
578
|
-
/**
|
|
579
|
-
* The places a booking holds: the sum of its ticket lines' quantities. The one
|
|
580
|
-
* derivation for selections, persisted lines and a booking outcome's lines;
|
|
581
|
-
* null when the total is not a positive whole number.
|
|
582
|
-
*/
|
|
583
|
-
function deriveTotalTicketQuantity(lines) {
|
|
584
|
-
const parsed = toPositiveTicketQuantity(lines.reduce((sum, line) => sum + line.quantity, 0));
|
|
585
|
-
return parsed.ok ? parsed.value : null;
|
|
586
|
-
}
|
|
587
|
-
//#endregion
|
|
588
|
-
//#region ../core/src/booking-flexible-balance.ts
|
|
589
|
-
function clampFlexibleBalanceConfiguredAmount(amountCents, totalAmountCents) {
|
|
590
|
-
return Math.max(0, Math.min(amountCents, totalAmountCents));
|
|
591
|
-
}
|
|
592
|
-
function resolveFlexibleBalanceInitialPaymentCents(input) {
|
|
593
|
-
return clampFlexibleBalanceConfiguredAmount(input.config.upfrontAmountCents, input.totalAmountCents);
|
|
594
|
-
}
|
|
595
|
-
//#endregion
|
|
596
|
-
//#region ../core/src/booking-instalments.ts
|
|
597
|
-
function isDepositBearingBookingInstalmentPlan(plan) {
|
|
598
|
-
switch (plan.kind) {
|
|
599
|
-
case "deposit_plus_one_remainder":
|
|
600
|
-
case "deposit_plus_scheduled_instalments": return true;
|
|
601
|
-
case "equal_scheduled_instalments": return false;
|
|
602
|
-
default: return assertNever$8(plan);
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
function getBookingInstalmentDepositRefundability(plan) {
|
|
606
|
-
return isDepositBearingBookingInstalmentPlan(plan) ? plan.depositRefundability : null;
|
|
607
|
-
}
|
|
608
|
-
function getBookingInstalmentProtectedDepositAmountCents(plan) {
|
|
609
|
-
return isDepositBearingBookingInstalmentPlan(plan) ? plan.depositAmountCents : null;
|
|
610
|
-
}
|
|
611
|
-
function clampConfiguredAmount(amountCents, totalAmountCents) {
|
|
612
|
-
return Math.max(0, Math.min(amountCents, totalAmountCents));
|
|
613
|
-
}
|
|
614
|
-
function splitAmountWithRemainderInFirst(totalAmountCents, partCount) {
|
|
615
|
-
if (partCount <= 0) return [];
|
|
616
|
-
const baseAmountCents = Math.floor(totalAmountCents / partCount);
|
|
617
|
-
const remainderCents = totalAmountCents - baseAmountCents * partCount;
|
|
618
|
-
return Array.from({ length: partCount }, (_, index) => index === 0 ? baseAmountCents + remainderCents : baseAmountCents);
|
|
619
|
-
}
|
|
620
|
-
function addIntervalPreservingMonthAnchor(isoString, intervalCount, intervalUnit) {
|
|
621
|
-
const date = new Date(isoString);
|
|
622
|
-
if (!Number.isFinite(date.getTime())) return isoString;
|
|
623
|
-
switch (intervalUnit) {
|
|
624
|
-
case "day":
|
|
625
|
-
date.setUTCDate(date.getUTCDate() + intervalCount);
|
|
626
|
-
return date.toISOString();
|
|
627
|
-
case "week":
|
|
628
|
-
date.setUTCDate(date.getUTCDate() + intervalCount * 7);
|
|
629
|
-
return date.toISOString();
|
|
630
|
-
case "month": return addMonthsPreservingAnchorDay(date, intervalCount).toISOString();
|
|
631
|
-
default: return assertNever$8(intervalUnit);
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
function getBookingInstalmentPlanIntervalCount(plan) {
|
|
635
|
-
switch (plan.kind) {
|
|
636
|
-
case "deposit_plus_one_remainder": return plan.remainderDueCount;
|
|
637
|
-
case "deposit_plus_scheduled_instalments":
|
|
638
|
-
case "equal_scheduled_instalments": return plan.intervalCount;
|
|
639
|
-
default: return assertNever$8(plan);
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
function omitZeroAmountFutureRows(rows) {
|
|
643
|
-
if (rows.length <= 1) return rows;
|
|
644
|
-
const firstRow = rows[0];
|
|
645
|
-
if (firstRow === void 0) return [];
|
|
646
|
-
return [firstRow, ...rows.slice(1).filter((row) => row.amountCents > 0)];
|
|
647
|
-
}
|
|
648
|
-
function addMonthsPreservingAnchorDay(date, intervalCount) {
|
|
649
|
-
const anchorDay = date.getUTCDate();
|
|
650
|
-
const nextMonth = new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth() + intervalCount, 1, date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.getUTCMilliseconds()));
|
|
651
|
-
const lastDayOfTargetMonth = new Date(Date.UTC(nextMonth.getUTCFullYear(), nextMonth.getUTCMonth() + 1, 0)).getUTCDate();
|
|
652
|
-
nextMonth.setUTCDate(Math.min(anchorDay, lastDayOfTargetMonth));
|
|
653
|
-
return nextMonth;
|
|
654
|
-
}
|
|
655
|
-
function assertNever$8(value) {
|
|
656
|
-
throw new Error(`Unexpected value: ${String(value)}`);
|
|
657
|
-
}
|
|
658
|
-
//#endregion
|
|
659
|
-
//#region ../core/src/booking-payment-options.ts
|
|
660
|
-
/**
|
|
661
|
-
* One way a customer may pay for a booking. This is the single definition of
|
|
662
|
-
* the option type; `booking-payment-schemas.typetest.ts` keeps it equal to the
|
|
663
|
-
* schema's output in both directions.
|
|
664
|
-
*/
|
|
665
|
-
/** When a course's instalments must all be paid by: before its first or its last live session. */
|
|
666
|
-
const BOOKING_COURSE_INSTALMENT_DEADLINES = ["first_session", "last_session"];
|
|
667
|
-
/** Automatic instalments and a flexible balance cannot share one booking offer. */
|
|
668
|
-
function validateBookingPaymentOptionKinds(kinds) {
|
|
669
|
-
if (kinds.length === 0) return err$1("no_options");
|
|
670
|
-
const uniqueKinds = new Set(kinds);
|
|
671
|
-
if (uniqueKinds.size !== kinds.length) return err$1("duplicate_kind");
|
|
672
|
-
if (uniqueKinds.has("instalment_plan") && uniqueKinds.has("flexible_balance")) return err$1("incompatible_collection_options");
|
|
673
|
-
return ok$2(void 0);
|
|
674
|
-
}
|
|
675
|
-
//#endregion
|
|
676
|
-
//#region ../core/src/booking-date-time/instant.ts
|
|
677
|
-
function parseUtcIsoDateTimeString(value) {
|
|
678
|
-
const normalized = value.trim();
|
|
679
|
-
const hasUtcSuffix = normalized.endsWith("Z");
|
|
680
|
-
const hasExplicitOffset = /[+-]\d{2}:\d{2}$/u.test(normalized);
|
|
681
|
-
if (!hasUtcSuffix && !hasExplicitOffset) return err$1("missing-timezone-offset");
|
|
682
|
-
const date = new Date(normalized);
|
|
683
|
-
if (Number.isNaN(date.getTime())) return err$1("invalid-date-time");
|
|
684
|
-
return ok$2(date.toISOString());
|
|
685
|
-
}
|
|
686
|
-
function toUtcIsoDateTimeString(value) {
|
|
687
|
-
const parsed = parseUtcIsoDateTimeString(value);
|
|
688
|
-
if (!parsed.ok) {
|
|
689
|
-
const message = parsed.error === "missing-timezone-offset" ? `Expected an offset-aware ISO datetime, received "${value}"` : `Expected a valid ISO datetime, received "${value}"`;
|
|
690
|
-
throw new Error(message);
|
|
691
|
-
}
|
|
692
|
-
return parsed.value;
|
|
693
|
-
}
|
|
694
|
-
//#endregion
|
|
695
573
|
//#region ../core/src/date-time-formatter.ts
|
|
696
574
|
/** Shared Intl engine, internal to core's date presentation owners. */
|
|
697
575
|
const FORMATTER_CACHE_LIMIT = 100;
|
|
@@ -777,6 +655,25 @@ function resolveBookingBusinessTimeZone(value) {
|
|
|
777
655
|
return resolveBookingTimeZoneId(value, DEFAULT_BOOKING_BUSINESS_TIME_ZONE);
|
|
778
656
|
}
|
|
779
657
|
//#endregion
|
|
658
|
+
//#region ../core/src/booking-date-time/instant.ts
|
|
659
|
+
function parseUtcIsoDateTimeString(value) {
|
|
660
|
+
const normalized = value.trim();
|
|
661
|
+
const hasUtcSuffix = normalized.endsWith("Z");
|
|
662
|
+
const hasExplicitOffset = /[+-]\d{2}:\d{2}$/u.test(normalized);
|
|
663
|
+
if (!hasUtcSuffix && !hasExplicitOffset) return err$1("missing-timezone-offset");
|
|
664
|
+
const date = new Date(normalized);
|
|
665
|
+
if (Number.isNaN(date.getTime())) return err$1("invalid-date-time");
|
|
666
|
+
return ok$2(date.toISOString());
|
|
667
|
+
}
|
|
668
|
+
function toUtcIsoDateTimeString(value) {
|
|
669
|
+
const parsed = parseUtcIsoDateTimeString(value);
|
|
670
|
+
if (!parsed.ok) {
|
|
671
|
+
const message = parsed.error === "missing-timezone-offset" ? `Expected an offset-aware ISO datetime, received "${value}"` : `Expected a valid ISO datetime, received "${value}"`;
|
|
672
|
+
throw new Error(message);
|
|
673
|
+
}
|
|
674
|
+
return parsed.value;
|
|
675
|
+
}
|
|
676
|
+
//#endregion
|
|
780
677
|
//#region ../core/src/booking-date-time/local.ts
|
|
781
678
|
const LOCAL_DATE_PATTERN = /^(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})$/u;
|
|
782
679
|
function getZonedDateTimeParts(date, timeZone) {
|
|
@@ -865,59 +762,6 @@ function resolveLocalInstant(targetLocalMs, timeZone, guess, seen) {
|
|
|
865
762
|
return resolveLocalInstant(targetLocalMs, timeZone, nextGuess, [...seen, guess]);
|
|
866
763
|
}
|
|
867
764
|
//#endregion
|
|
868
|
-
//#region ../core/src/booking-date-time/window.ts
|
|
869
|
-
const START_OF_DAY = {
|
|
870
|
-
hour: 0,
|
|
871
|
-
minute: 0,
|
|
872
|
-
second: 0
|
|
873
|
-
};
|
|
874
|
-
function parseWindowDate(value, field) {
|
|
875
|
-
try {
|
|
876
|
-
return {
|
|
877
|
-
ok: true,
|
|
878
|
-
value: parseBookingLocalDate(value)
|
|
879
|
-
};
|
|
880
|
-
} catch {
|
|
881
|
-
return {
|
|
882
|
-
ok: false,
|
|
883
|
-
field,
|
|
884
|
-
reason: "invalid_date_format",
|
|
885
|
-
value
|
|
886
|
-
};
|
|
887
|
-
}
|
|
888
|
-
}
|
|
889
|
-
function parseBookingUtcDateWindow(input) {
|
|
890
|
-
const timeZone = resolveBookingTimeZoneId(input.timeZone);
|
|
891
|
-
const start = parseWindowDate(input.startDate, "startDate");
|
|
892
|
-
if (!start.ok) return start;
|
|
893
|
-
const end = parseWindowDate(input.endDate, "endDate");
|
|
894
|
-
if (!end.ok) return end;
|
|
895
|
-
const startLocalDate = start.value;
|
|
896
|
-
const endLocalDate = end.value;
|
|
897
|
-
if (compareLocalScheduleDates(startLocalDate, endLocalDate) > 0) return {
|
|
898
|
-
ok: false,
|
|
899
|
-
field: "endDate",
|
|
900
|
-
reason: "invalid_date_range",
|
|
901
|
-
value: input.endDate
|
|
902
|
-
};
|
|
903
|
-
return {
|
|
904
|
-
ok: true,
|
|
905
|
-
value: {
|
|
906
|
-
timeZone,
|
|
907
|
-
startLocalDate,
|
|
908
|
-
endLocalDate,
|
|
909
|
-
startAt: localScheduleDateTimeToUtcDate(startLocalDate, START_OF_DAY, timeZone),
|
|
910
|
-
endExclusive: localScheduleDateTimeToUtcDate(addLocalScheduleDays(endLocalDate, 1), START_OF_DAY, timeZone)
|
|
911
|
-
}
|
|
912
|
-
};
|
|
913
|
-
}
|
|
914
|
-
function buildBookingUtcDateWindow(input) {
|
|
915
|
-
const result = parseBookingUtcDateWindow(input);
|
|
916
|
-
if (result.ok) return result.value;
|
|
917
|
-
if (result.reason === "invalid_date_range") throw new Error(`Invalid booking date range: startDate "${input.startDate}" must be on or before endDate "${input.endDate}"`);
|
|
918
|
-
throw new Error(`Invalid booking date format: "${result.value}" (expected YYYY-MM-DD)`);
|
|
919
|
-
}
|
|
920
|
-
//#endregion
|
|
921
765
|
//#region ../core/src/booking-date-time/scheduled.ts
|
|
922
766
|
function parseStrictBookingTimeZone(timeZone) {
|
|
923
767
|
const parsed = parseBookingTimeZone(timeZone);
|
|
@@ -1020,6 +864,31 @@ function resolveBookingDisplayContext(input) {
|
|
|
1020
864
|
zone: input.surface !== "dashboard" && input.isOnline || input.sessionTimeZone !== input.siteTimeZone ? "always" : "omit"
|
|
1021
865
|
};
|
|
1022
866
|
}
|
|
867
|
+
/** Dashboard and assistant site dates read in British English, whatever the site's own language. */
|
|
868
|
+
const SITE_DISPLAY_LOCALE = "en-GB";
|
|
869
|
+
/** The site display policy: `en-GB` in the given zone, falling back to the business zone the server uses. */
|
|
870
|
+
function siteDisplayContext(timeZone) {
|
|
871
|
+
return {
|
|
872
|
+
locale: SITE_DISPLAY_LOCALE,
|
|
873
|
+
timeZone: resolveBookingBusinessTimeZone(timeZone)
|
|
874
|
+
};
|
|
875
|
+
}
|
|
876
|
+
/** A stored instant as a site date, `22 Sept 2026` by default; an unparseable value is shown as it came. */
|
|
877
|
+
function formatSiteInstantDate(iso, timeZone, options = {}) {
|
|
878
|
+
const parsed = parseUtcIsoDateTimeString(iso);
|
|
879
|
+
return parsed.ok ? formatDate$4({
|
|
880
|
+
kind: "instant",
|
|
881
|
+
value: parsed.value
|
|
882
|
+
}, siteDisplayContext(timeZone), {
|
|
883
|
+
date: "short",
|
|
884
|
+
...options
|
|
885
|
+
}) : iso;
|
|
886
|
+
}
|
|
887
|
+
/** A stored instant as a site time, `2:05pm` without a zone label by default; an unparseable value is shown as it came. */
|
|
888
|
+
function formatSiteInstantTime(iso, timeZone, options = { zone: "omit" }) {
|
|
889
|
+
const parsed = parseUtcIsoDateTimeString(iso);
|
|
890
|
+
return parsed.ok ? formatTime$3(parsed.value, siteDisplayContext(timeZone), options) : iso;
|
|
891
|
+
}
|
|
1023
892
|
function formatDate$4(value, context, options = {}) {
|
|
1024
893
|
return presentDate(value, context, displayProfile(options, "omit"));
|
|
1025
894
|
}
|
|
@@ -1224,6 +1093,199 @@ function assertOrdered(start, end) {
|
|
|
1224
1093
|
function formatTimeZoneCityLabel(timeZone) {
|
|
1225
1094
|
return timeZone.startsWith("Etc/") ? "local time" : `${timeZone.split("/").slice(-1)[0]?.replace(/_/gu, " ") ?? timeZone} time`;
|
|
1226
1095
|
}
|
|
1096
|
+
const MS_PER_HOUR = 36e5;
|
|
1097
|
+
const MS_PER_WEEK = 168 * MS_PER_HOUR;
|
|
1098
|
+
/** The instant bookings stop for something starting at `startsAt`. */
|
|
1099
|
+
function bookingClosesAt(startsAt, cutOffHours) {
|
|
1100
|
+
return (/* @__PURE__ */ new Date(Date.parse(startsAt) - cutOffHours * MS_PER_HOUR)).toISOString();
|
|
1101
|
+
}
|
|
1102
|
+
/** Closing is inclusive, matching the gate: at the exact instant it has closed. */
|
|
1103
|
+
function hasBookingClosed(closesAt, now) {
|
|
1104
|
+
return Date.parse(closesAt) <= now.getTime();
|
|
1105
|
+
}
|
|
1106
|
+
/** The whole hours between closing and the start, for "2 hours before the start". */
|
|
1107
|
+
function bookingCutOffHoursBetween(startsAt, closesAt) {
|
|
1108
|
+
return Math.round((Date.parse(startsAt) - Date.parse(closesAt)) / MS_PER_HOUR);
|
|
1109
|
+
}
|
|
1110
|
+
/**
|
|
1111
|
+
* When bookings closed, in the event's own time zone: "5pm" on the day it starts,
|
|
1112
|
+
* "7pm on Tuesday" earlier in the week, and with the date if it's further back
|
|
1113
|
+
* than that, when a weekday alone could mean the wrong one.
|
|
1114
|
+
*/
|
|
1115
|
+
function formatBookingClosedTime(closesAt, startsAt, timeZone) {
|
|
1116
|
+
const time = formatSiteInstantTime(closesAt, timeZone);
|
|
1117
|
+
const dayOf = (iso) => formatSiteInstantDate(iso, timeZone);
|
|
1118
|
+
if (dayOf(closesAt) === dayOf(startsAt)) return time;
|
|
1119
|
+
return `${time} on ${formatSiteInstantDate(closesAt, timeZone, Date.parse(startsAt) - Date.parse(closesAt) >= MS_PER_WEEK ? {
|
|
1120
|
+
date: "long",
|
|
1121
|
+
weekday: "long",
|
|
1122
|
+
year: "omit"
|
|
1123
|
+
} : {
|
|
1124
|
+
date: "omit",
|
|
1125
|
+
weekday: "long",
|
|
1126
|
+
year: "omit"
|
|
1127
|
+
})}`;
|
|
1128
|
+
}
|
|
1129
|
+
/** "1 hour" or "24 hours". */
|
|
1130
|
+
function formatBookingCutOffHours(hours) {
|
|
1131
|
+
return hours === 1 ? "1 hour" : `${hours} hours`;
|
|
1132
|
+
}
|
|
1133
|
+
//#endregion
|
|
1134
|
+
//#region ../core/src/ticket-quantity.ts
|
|
1135
|
+
function toPositiveTicketQuantity(value) {
|
|
1136
|
+
if (!Number.isFinite(value) || !Number.isInteger(value) || value <= 0) return err$1("invalid_quantity");
|
|
1137
|
+
return ok$2(value);
|
|
1138
|
+
}
|
|
1139
|
+
/**
|
|
1140
|
+
* The places a booking holds: the sum of its ticket lines' quantities. The one
|
|
1141
|
+
* derivation for selections, persisted lines and a booking outcome's lines;
|
|
1142
|
+
* null when the total is not a positive whole number.
|
|
1143
|
+
*/
|
|
1144
|
+
function deriveTotalTicketQuantity(lines) {
|
|
1145
|
+
const parsed = toPositiveTicketQuantity(lines.reduce((sum, line) => sum + line.quantity, 0));
|
|
1146
|
+
return parsed.ok ? parsed.value : null;
|
|
1147
|
+
}
|
|
1148
|
+
//#endregion
|
|
1149
|
+
//#region ../core/src/booking-flexible-balance.ts
|
|
1150
|
+
function clampFlexibleBalanceConfiguredAmount(amountCents, totalAmountCents) {
|
|
1151
|
+
return Math.max(0, Math.min(amountCents, totalAmountCents));
|
|
1152
|
+
}
|
|
1153
|
+
function resolveFlexibleBalanceInitialPaymentCents(input) {
|
|
1154
|
+
return clampFlexibleBalanceConfiguredAmount(input.config.upfrontAmountCents, input.totalAmountCents);
|
|
1155
|
+
}
|
|
1156
|
+
//#endregion
|
|
1157
|
+
//#region ../core/src/booking-instalments.ts
|
|
1158
|
+
function isDepositBearingBookingInstalmentPlan(plan) {
|
|
1159
|
+
switch (plan.kind) {
|
|
1160
|
+
case "deposit_plus_one_remainder":
|
|
1161
|
+
case "deposit_plus_scheduled_instalments": return true;
|
|
1162
|
+
case "equal_scheduled_instalments": return false;
|
|
1163
|
+
default: return assertNever$8(plan);
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
function getBookingInstalmentDepositRefundability(plan) {
|
|
1167
|
+
return isDepositBearingBookingInstalmentPlan(plan) ? plan.depositRefundability : null;
|
|
1168
|
+
}
|
|
1169
|
+
function getBookingInstalmentProtectedDepositAmountCents(plan) {
|
|
1170
|
+
return isDepositBearingBookingInstalmentPlan(plan) ? plan.depositAmountCents : null;
|
|
1171
|
+
}
|
|
1172
|
+
function clampConfiguredAmount(amountCents, totalAmountCents) {
|
|
1173
|
+
return Math.max(0, Math.min(amountCents, totalAmountCents));
|
|
1174
|
+
}
|
|
1175
|
+
function splitAmountWithRemainderInFirst(totalAmountCents, partCount) {
|
|
1176
|
+
if (partCount <= 0) return [];
|
|
1177
|
+
const baseAmountCents = Math.floor(totalAmountCents / partCount);
|
|
1178
|
+
const remainderCents = totalAmountCents - baseAmountCents * partCount;
|
|
1179
|
+
return Array.from({ length: partCount }, (_, index) => index === 0 ? baseAmountCents + remainderCents : baseAmountCents);
|
|
1180
|
+
}
|
|
1181
|
+
function addIntervalPreservingMonthAnchor(isoString, intervalCount, intervalUnit) {
|
|
1182
|
+
const date = new Date(isoString);
|
|
1183
|
+
if (!Number.isFinite(date.getTime())) return isoString;
|
|
1184
|
+
switch (intervalUnit) {
|
|
1185
|
+
case "day":
|
|
1186
|
+
date.setUTCDate(date.getUTCDate() + intervalCount);
|
|
1187
|
+
return date.toISOString();
|
|
1188
|
+
case "week":
|
|
1189
|
+
date.setUTCDate(date.getUTCDate() + intervalCount * 7);
|
|
1190
|
+
return date.toISOString();
|
|
1191
|
+
case "month": return addMonthsPreservingAnchorDay(date, intervalCount).toISOString();
|
|
1192
|
+
default: return assertNever$8(intervalUnit);
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
function getBookingInstalmentPlanIntervalCount(plan) {
|
|
1196
|
+
switch (plan.kind) {
|
|
1197
|
+
case "deposit_plus_one_remainder": return plan.remainderDueCount;
|
|
1198
|
+
case "deposit_plus_scheduled_instalments":
|
|
1199
|
+
case "equal_scheduled_instalments": return plan.intervalCount;
|
|
1200
|
+
default: return assertNever$8(plan);
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
function omitZeroAmountFutureRows(rows) {
|
|
1204
|
+
if (rows.length <= 1) return rows;
|
|
1205
|
+
const firstRow = rows[0];
|
|
1206
|
+
if (firstRow === void 0) return [];
|
|
1207
|
+
return [firstRow, ...rows.slice(1).filter((row) => row.amountCents > 0)];
|
|
1208
|
+
}
|
|
1209
|
+
function addMonthsPreservingAnchorDay(date, intervalCount) {
|
|
1210
|
+
const anchorDay = date.getUTCDate();
|
|
1211
|
+
const nextMonth = new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth() + intervalCount, 1, date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.getUTCMilliseconds()));
|
|
1212
|
+
const lastDayOfTargetMonth = new Date(Date.UTC(nextMonth.getUTCFullYear(), nextMonth.getUTCMonth() + 1, 0)).getUTCDate();
|
|
1213
|
+
nextMonth.setUTCDate(Math.min(anchorDay, lastDayOfTargetMonth));
|
|
1214
|
+
return nextMonth;
|
|
1215
|
+
}
|
|
1216
|
+
function assertNever$8(value) {
|
|
1217
|
+
throw new Error(`Unexpected value: ${String(value)}`);
|
|
1218
|
+
}
|
|
1219
|
+
//#endregion
|
|
1220
|
+
//#region ../core/src/booking-payment-options.ts
|
|
1221
|
+
/**
|
|
1222
|
+
* One way a customer may pay for a booking. This is the single definition of
|
|
1223
|
+
* the option type; `booking-payment-schemas.typetest.ts` keeps it equal to the
|
|
1224
|
+
* schema's output in both directions.
|
|
1225
|
+
*/
|
|
1226
|
+
/** When a course's instalments must all be paid by: before its first or its last live session. */
|
|
1227
|
+
const BOOKING_COURSE_INSTALMENT_DEADLINES = ["first_session", "last_session"];
|
|
1228
|
+
/** Automatic instalments and a flexible balance cannot share one booking offer. */
|
|
1229
|
+
function validateBookingPaymentOptionKinds(kinds) {
|
|
1230
|
+
if (kinds.length === 0) return err$1("no_options");
|
|
1231
|
+
const uniqueKinds = new Set(kinds);
|
|
1232
|
+
if (uniqueKinds.size !== kinds.length) return err$1("duplicate_kind");
|
|
1233
|
+
if (uniqueKinds.has("instalment_plan") && uniqueKinds.has("flexible_balance")) return err$1("incompatible_collection_options");
|
|
1234
|
+
return ok$2(void 0);
|
|
1235
|
+
}
|
|
1236
|
+
//#endregion
|
|
1237
|
+
//#region ../core/src/booking-date-time/window.ts
|
|
1238
|
+
const START_OF_DAY = {
|
|
1239
|
+
hour: 0,
|
|
1240
|
+
minute: 0,
|
|
1241
|
+
second: 0
|
|
1242
|
+
};
|
|
1243
|
+
function parseWindowDate(value, field) {
|
|
1244
|
+
try {
|
|
1245
|
+
return {
|
|
1246
|
+
ok: true,
|
|
1247
|
+
value: parseBookingLocalDate(value)
|
|
1248
|
+
};
|
|
1249
|
+
} catch {
|
|
1250
|
+
return {
|
|
1251
|
+
ok: false,
|
|
1252
|
+
field,
|
|
1253
|
+
reason: "invalid_date_format",
|
|
1254
|
+
value
|
|
1255
|
+
};
|
|
1256
|
+
}
|
|
1257
|
+
}
|
|
1258
|
+
function parseBookingUtcDateWindow(input) {
|
|
1259
|
+
const timeZone = resolveBookingTimeZoneId(input.timeZone);
|
|
1260
|
+
const start = parseWindowDate(input.startDate, "startDate");
|
|
1261
|
+
if (!start.ok) return start;
|
|
1262
|
+
const end = parseWindowDate(input.endDate, "endDate");
|
|
1263
|
+
if (!end.ok) return end;
|
|
1264
|
+
const startLocalDate = start.value;
|
|
1265
|
+
const endLocalDate = end.value;
|
|
1266
|
+
if (compareLocalScheduleDates(startLocalDate, endLocalDate) > 0) return {
|
|
1267
|
+
ok: false,
|
|
1268
|
+
field: "endDate",
|
|
1269
|
+
reason: "invalid_date_range",
|
|
1270
|
+
value: input.endDate
|
|
1271
|
+
};
|
|
1272
|
+
return {
|
|
1273
|
+
ok: true,
|
|
1274
|
+
value: {
|
|
1275
|
+
timeZone,
|
|
1276
|
+
startLocalDate,
|
|
1277
|
+
endLocalDate,
|
|
1278
|
+
startAt: localScheduleDateTimeToUtcDate(startLocalDate, START_OF_DAY, timeZone),
|
|
1279
|
+
endExclusive: localScheduleDateTimeToUtcDate(addLocalScheduleDays(endLocalDate, 1), START_OF_DAY, timeZone)
|
|
1280
|
+
}
|
|
1281
|
+
};
|
|
1282
|
+
}
|
|
1283
|
+
function buildBookingUtcDateWindow(input) {
|
|
1284
|
+
const result = parseBookingUtcDateWindow(input);
|
|
1285
|
+
if (result.ok) return result.value;
|
|
1286
|
+
if (result.reason === "invalid_date_range") throw new Error(`Invalid booking date range: startDate "${input.startDate}" must be on or before endDate "${input.endDate}"`);
|
|
1287
|
+
throw new Error(`Invalid booking date format: "${result.value}" (expected YYYY-MM-DD)`);
|
|
1288
|
+
}
|
|
1227
1289
|
//#endregion
|
|
1228
1290
|
//#region ../core/src/site-terms.ts
|
|
1229
1291
|
function siteTermsApplies(operation, items) {
|
|
@@ -1513,6 +1575,31 @@ function applySavedBlockContentVersion(versions, saved) {
|
|
|
1513
1575
|
}
|
|
1514
1576
|
}
|
|
1515
1577
|
//#endregion
|
|
1578
|
+
//#region ../core/src/participants.ts
|
|
1579
|
+
function unsafeAsParticipantEmail(value) {
|
|
1580
|
+
return value;
|
|
1581
|
+
}
|
|
1582
|
+
/**
|
|
1583
|
+
* Canonicalizes an optional participant email for equality checks.
|
|
1584
|
+
*
|
|
1585
|
+
* This intentionally does not validate email shape; call parseParticipantEmail at
|
|
1586
|
+
* API/DB boundaries that require a syntactically usable address.
|
|
1587
|
+
*/
|
|
1588
|
+
function normalizeParticipantEmail(value) {
|
|
1589
|
+
const normalized = value?.trim().normalize("NFC").toLowerCase() ?? "";
|
|
1590
|
+
return normalized.length > 0 ? unsafeAsParticipantEmail(normalized) : null;
|
|
1591
|
+
}
|
|
1592
|
+
function parseParticipantEmail(value) {
|
|
1593
|
+
const normalized = normalizeParticipantEmail(value);
|
|
1594
|
+
if (normalized === null) return err$1({ kind: "empty_email" });
|
|
1595
|
+
if (!isEmailLike(normalized)) return err$1({ kind: "invalid_email_shape" });
|
|
1596
|
+
return ok$2(normalized);
|
|
1597
|
+
}
|
|
1598
|
+
function isEmailLike(value) {
|
|
1599
|
+
const atIndex = value.indexOf("@");
|
|
1600
|
+
return atIndex > 0 && atIndex === value.lastIndexOf("@") && atIndex < value.length - 1;
|
|
1601
|
+
}
|
|
1602
|
+
//#endregion
|
|
1516
1603
|
//#region ../core/src/public-url-validation.ts
|
|
1517
1604
|
function buildPublicUrlValidationError(message, errorFactory) {
|
|
1518
1605
|
return errorFactory !== void 0 ? errorFactory(message) : new Error(message);
|
|
@@ -1690,7 +1777,7 @@ const knownSocialPlatformLabels = {
|
|
|
1690
1777
|
x: "X",
|
|
1691
1778
|
youtube: "YouTube"
|
|
1692
1779
|
};
|
|
1693
|
-
function isRecord$
|
|
1780
|
+
function isRecord$36(value) {
|
|
1694
1781
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1695
1782
|
}
|
|
1696
1783
|
function trimmedOptionalString(value) {
|
|
@@ -1700,7 +1787,7 @@ function trimmedOptionalString(value) {
|
|
|
1700
1787
|
return trimmed.length > 0 ? trimmed : null;
|
|
1701
1788
|
}
|
|
1702
1789
|
function parsePublicContactDetails(value) {
|
|
1703
|
-
if (!isRecord$
|
|
1790
|
+
if (!isRecord$36(value)) return err$1({
|
|
1704
1791
|
code: "invalid_shape",
|
|
1705
1792
|
path: "contact",
|
|
1706
1793
|
message: "Contact details must be an object."
|
|
@@ -1780,7 +1867,7 @@ function minutesSinceMidnight(value) {
|
|
|
1780
1867
|
}
|
|
1781
1868
|
function parseOpeningHoursDay(value, expectedWeekday, index) {
|
|
1782
1869
|
const path = `openingHours.days.${index}`;
|
|
1783
|
-
if (!isRecord$
|
|
1870
|
+
if (!isRecord$36(value) || value.weekday !== expectedWeekday) return err$1({
|
|
1784
1871
|
code: "invalid_weekdays",
|
|
1785
1872
|
path,
|
|
1786
1873
|
message: `Expected ${expectedWeekday} in calendar order.`
|
|
@@ -1797,7 +1884,7 @@ function parseOpeningHoursDay(value, expectedWeekday, index) {
|
|
|
1797
1884
|
const intervals = [];
|
|
1798
1885
|
for (const [intervalIndex, rawInterval] of value.intervals.entries()) {
|
|
1799
1886
|
const intervalPath = `${path}.intervals.${intervalIndex}`;
|
|
1800
|
-
if (!isRecord$
|
|
1887
|
+
if (!isRecord$36(rawInterval)) return err$1({
|
|
1801
1888
|
code: "invalid_interval",
|
|
1802
1889
|
path: intervalPath,
|
|
1803
1890
|
message: "Opening interval is invalid."
|
|
@@ -1859,7 +1946,7 @@ function parseOpeningHoursWeek(rawDays) {
|
|
|
1859
1946
|
]);
|
|
1860
1947
|
}
|
|
1861
1948
|
function parseWeeklyOpeningHours(value) {
|
|
1862
|
-
if (!isRecord$
|
|
1949
|
+
if (!isRecord$36(value) || !Array.isArray(value.days) || value.days.length !== publicProfileWeekdays.length) return err$1({
|
|
1863
1950
|
code: "invalid_weekdays",
|
|
1864
1951
|
path: "openingHours.days",
|
|
1865
1952
|
message: "Opening hours must include all seven weekdays."
|
|
@@ -1917,7 +2004,7 @@ function parsePublicSocialLinks(value) {
|
|
|
1917
2004
|
const ids = /* @__PURE__ */ new Set();
|
|
1918
2005
|
for (const [index, rawLink] of value.entries()) {
|
|
1919
2006
|
const path = `socialLinks.${index}`;
|
|
1920
|
-
if (!isRecord$
|
|
2007
|
+
if (!isRecord$36(rawLink)) return err$1({
|
|
1921
2008
|
code: "invalid_social_link",
|
|
1922
2009
|
path,
|
|
1923
2010
|
message: "Social link is invalid."
|
|
@@ -1986,7 +2073,7 @@ function parsePublicProfilePresentation(value) {
|
|
|
1986
2073
|
});
|
|
1987
2074
|
}
|
|
1988
2075
|
function parsePublicProfile(value) {
|
|
1989
|
-
if (!isRecord$
|
|
2076
|
+
if (!isRecord$36(value)) return err$1({
|
|
1990
2077
|
code: "invalid_shape",
|
|
1991
2078
|
path: "",
|
|
1992
2079
|
message: "Public profile must be an object."
|
|
@@ -2020,7 +2107,7 @@ function parseContactVisibility(value) {
|
|
|
2020
2107
|
phone: "shown",
|
|
2021
2108
|
email: "shown"
|
|
2022
2109
|
});
|
|
2023
|
-
if (!isRecord$
|
|
2110
|
+
if (!isRecord$36(value)) return err$1({
|
|
2024
2111
|
code: "invalid_contact_visibility",
|
|
2025
2112
|
path: "contactVisibility",
|
|
2026
2113
|
message: "Contact visibility must be an object."
|
|
@@ -2147,7 +2234,7 @@ function formatOpeningHoursRows(hours, options = {}) {
|
|
|
2147
2234
|
}
|
|
2148
2235
|
//#endregion
|
|
2149
2236
|
//#region ../core/src/rich-text.ts
|
|
2150
|
-
function isRecord$
|
|
2237
|
+
function isRecord$35(value) {
|
|
2151
2238
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
2152
2239
|
}
|
|
2153
2240
|
function hasOnlyKeys(value, allowed) {
|
|
@@ -2167,15 +2254,15 @@ function isDenseArrayOf(value, predicate) {
|
|
|
2167
2254
|
return true;
|
|
2168
2255
|
}
|
|
2169
2256
|
function isTipTapMark(value) {
|
|
2170
|
-
return isRecord$
|
|
2257
|
+
return isRecord$35(value) && hasOnlyKeys(value, markKeys) && typeof value.type === "string" && value.type.length > 0 && (value.attrs === void 0 || isRecord$35(value.attrs));
|
|
2171
2258
|
}
|
|
2172
2259
|
function isTipTapNode(value) {
|
|
2173
|
-
if (!isRecord$
|
|
2260
|
+
if (!isRecord$35(value) || !hasOnlyKeys(value, nodeKeys) || typeof value.type !== "string" || value.type.length === 0 || value.type === "doc" || value.attrs !== void 0 && !isRecord$35(value.attrs) || value.marks !== void 0 && (!Array.isArray(value.marks) || !isDenseArrayOf(value.marks, isTipTapMark)) || value.content !== void 0 && (!Array.isArray(value.content) || !isDenseArrayOf(value.content, isTipTapNode))) return false;
|
|
2174
2261
|
if (value.type === "text") return typeof value.text === "string" && value.text.length > 0 && value.content === void 0;
|
|
2175
2262
|
return value.text === void 0;
|
|
2176
2263
|
}
|
|
2177
2264
|
function isCanonicalRichTextDoc(value) {
|
|
2178
|
-
return isRecord$
|
|
2265
|
+
return isRecord$35(value) && hasOnlyKeys(value, rootKeys) && value.type === "doc" && Array.isArray(value.content) && isDenseArrayOf(value.content, isTipTapNode);
|
|
2179
2266
|
}
|
|
2180
2267
|
/** Whether a document contains non-whitespace text, including in nested nodes. */
|
|
2181
2268
|
function richTextHasText(document) {
|
|
@@ -2261,10 +2348,10 @@ function presentVisitorSelection(selection, optionCount) {
|
|
|
2261
2348
|
//#region ../core/src/mailing-list-targeting-parser.ts
|
|
2262
2349
|
function parseMailingListPlacementTargeting(value) {
|
|
2263
2350
|
if (value == null) return ok$2(DEFAULT_MAILING_LIST_TARGETING);
|
|
2264
|
-
if (!isRecord$
|
|
2351
|
+
if (!isRecord$34(value)) return targetingError("shape");
|
|
2265
2352
|
if (value.mode === "default") return ok$2({ mode: "default" });
|
|
2266
2353
|
if (value.mode !== "custom") return targetingError("mode");
|
|
2267
|
-
if (!isRecord$
|
|
2354
|
+
if (!isRecord$34(value.selection)) return targetingError("selection");
|
|
2268
2355
|
switch (value.provider) {
|
|
2269
2356
|
case "native": return parseNativeTargeting(value.selection);
|
|
2270
2357
|
case "brevo": return parseBrevoTargeting(value.selection);
|
|
@@ -2273,7 +2360,7 @@ function parseMailingListPlacementTargeting(value) {
|
|
|
2273
2360
|
}
|
|
2274
2361
|
}
|
|
2275
2362
|
function parseMailingListVisitorSelection(value) {
|
|
2276
|
-
if (!isRecord$
|
|
2363
|
+
if (!isRecord$34(value)) return visitorSelectionError$1("shape");
|
|
2277
2364
|
switch (value.provider) {
|
|
2278
2365
|
case "native": {
|
|
2279
2366
|
if (Object.keys(value).some((key) => key !== "provider" && key !== "topicIds")) return visitorSelectionError$1("shape");
|
|
@@ -2402,7 +2489,7 @@ function parseVisitorIds(value, parseId) {
|
|
|
2402
2489
|
const parsed = parseNonEmptyUniqueIds(value, parseId);
|
|
2403
2490
|
return parsed.ok ? parsed.value : null;
|
|
2404
2491
|
}
|
|
2405
|
-
function isRecord$
|
|
2492
|
+
function isRecord$34(value) {
|
|
2406
2493
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
2407
2494
|
}
|
|
2408
2495
|
function targetingError(field) {
|
|
@@ -2419,7 +2506,7 @@ function visitorSelectionError$1(field) {
|
|
|
2419
2506
|
}
|
|
2420
2507
|
//#endregion
|
|
2421
2508
|
//#region ../core/src/footer-engagement.ts
|
|
2422
|
-
function isRecord$
|
|
2509
|
+
function isRecord$33(value) {
|
|
2423
2510
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
2424
2511
|
}
|
|
2425
2512
|
function invalid(path, message) {
|
|
@@ -2440,7 +2527,7 @@ function parseEngagementBase(value, base, path) {
|
|
|
2440
2527
|
const heading = parseBoundedText(value.heading, `${path}.heading`, { maxLength: 80 });
|
|
2441
2528
|
if (!heading.ok) return heading;
|
|
2442
2529
|
if (heading.value === null) return err$1(invalid(`${path}.heading`, "Footer engagement heading cannot be empty."));
|
|
2443
|
-
if (!isRecord$
|
|
2530
|
+
if (!isRecord$33(value.source)) return err$1(invalid(`${path}.source`, "Footer engagement source is invalid."));
|
|
2444
2531
|
const intro = parseBoundedText(value.source.intro, `${path}.source.intro`, {
|
|
2445
2532
|
maxLength: 240,
|
|
2446
2533
|
optional: true
|
|
@@ -2482,7 +2569,7 @@ function parseFooterEngagementSectionValue(value, sectionBase, path) {
|
|
|
2482
2569
|
const base = parseEngagementBase(value, sectionBase, path);
|
|
2483
2570
|
if (!base.ok) return base;
|
|
2484
2571
|
const source = value.source;
|
|
2485
|
-
if (!isRecord$
|
|
2572
|
+
if (!isRecord$33(source)) return err$1(invalid(`${path}.source`, "Footer engagement source is invalid."));
|
|
2486
2573
|
switch (source.kind) {
|
|
2487
2574
|
case "standard-contact": return parseStandardContact(source, base.value, `${path}.source`);
|
|
2488
2575
|
case "mailing-list": return parseMailingList(source, base.value, `${path}.source`);
|
|
@@ -2615,7 +2702,7 @@ function unsafeAsFooterModuleId(value) {
|
|
|
2615
2702
|
function parseFooterModuleId(value) {
|
|
2616
2703
|
return parseSectionId(value, "sectionId");
|
|
2617
2704
|
}
|
|
2618
|
-
function isRecord$
|
|
2705
|
+
function isRecord$32(value) {
|
|
2619
2706
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
2620
2707
|
}
|
|
2621
2708
|
function isRichText(value) {
|
|
@@ -2641,7 +2728,7 @@ function parseHeading(value, path) {
|
|
|
2641
2728
|
}
|
|
2642
2729
|
function parseFooterSection(value, index) {
|
|
2643
2730
|
const path = `sections.${index}`;
|
|
2644
|
-
if (!isRecord$
|
|
2731
|
+
if (!isRecord$32(value)) return err$1({
|
|
2645
2732
|
code: "invalid_section",
|
|
2646
2733
|
path,
|
|
2647
2734
|
message: "Footer section must be an object."
|
|
@@ -2670,7 +2757,7 @@ function parseFooterSection(value, index) {
|
|
|
2670
2757
|
});
|
|
2671
2758
|
break;
|
|
2672
2759
|
case "navigation":
|
|
2673
|
-
if (isRecord$
|
|
2760
|
+
if (isRecord$32(value.source) && value.source.kind === "menu-role" && value.source.role === "main") return ok$2({
|
|
2674
2761
|
...base,
|
|
2675
2762
|
kind: "navigation",
|
|
2676
2763
|
heading: heading.value,
|
|
@@ -2681,7 +2768,7 @@ function parseFooterSection(value, index) {
|
|
|
2681
2768
|
});
|
|
2682
2769
|
break;
|
|
2683
2770
|
case "legal-navigation":
|
|
2684
|
-
if (isRecord$
|
|
2771
|
+
if (isRecord$32(value.source) && value.source.kind === "menu-role" && value.source.role === "legal-policy") return ok$2({
|
|
2685
2772
|
...base,
|
|
2686
2773
|
kind: "legal-navigation",
|
|
2687
2774
|
heading: heading.value,
|
|
@@ -2692,7 +2779,7 @@ function parseFooterSection(value, index) {
|
|
|
2692
2779
|
});
|
|
2693
2780
|
break;
|
|
2694
2781
|
case "business-address":
|
|
2695
|
-
if (isRecord$
|
|
2782
|
+
if (isRecord$32(value.source) && value.source.kind === "business-address") return ok$2({
|
|
2696
2783
|
...base,
|
|
2697
2784
|
kind: "business-address",
|
|
2698
2785
|
heading: heading.value,
|
|
@@ -2702,7 +2789,7 @@ function parseFooterSection(value, index) {
|
|
|
2702
2789
|
case "contact":
|
|
2703
2790
|
case "opening-hours":
|
|
2704
2791
|
case "social-links":
|
|
2705
|
-
if (isRecord$
|
|
2792
|
+
if (isRecord$32(value.source) && value.source.kind === "public-profile") return ok$2({
|
|
2706
2793
|
...base,
|
|
2707
2794
|
kind: value.kind,
|
|
2708
2795
|
heading: heading.value,
|
|
@@ -2746,7 +2833,7 @@ function validateFooterComposition(composition) {
|
|
|
2746
2833
|
return ok$2(composition);
|
|
2747
2834
|
}
|
|
2748
2835
|
function parseFooterCompositionV1(value) {
|
|
2749
|
-
if (!isRecord$
|
|
2836
|
+
if (!isRecord$32(value)) return err$1({
|
|
2750
2837
|
code: "invalid_shape",
|
|
2751
2838
|
path: "",
|
|
2752
2839
|
message: "Footer composition must be an object."
|
|
@@ -2954,7 +3041,7 @@ const defaultSections = (legacy, options) => {
|
|
|
2954
3041
|
];
|
|
2955
3042
|
};
|
|
2956
3043
|
function normalizeLegacyFooterContentToV1(value, options = {}) {
|
|
2957
|
-
if (!isRecord$
|
|
3044
|
+
if (!isRecord$32(value)) return err$1({
|
|
2958
3045
|
code: "invalid_shape",
|
|
2959
3046
|
path: "",
|
|
2960
3047
|
message: "Legacy footer content must be an object."
|
|
@@ -2990,7 +3077,7 @@ z.unknown().transform((value, ctx) => {
|
|
|
2990
3077
|
return z.NEVER;
|
|
2991
3078
|
});
|
|
2992
3079
|
function parseMailingListGlobalForm(value) {
|
|
2993
|
-
if (!isRecord$
|
|
3080
|
+
if (!isRecord$31(value)) return formError("shape");
|
|
2994
3081
|
const fields = parseGlobalFields(value.fields);
|
|
2995
3082
|
if (fields === null) return formError("fields");
|
|
2996
3083
|
if (typeof value.includeOptionalPhone !== "boolean") return formError("includeOptionalPhone");
|
|
@@ -3009,7 +3096,7 @@ function parseMailingListGlobalForm(value) {
|
|
|
3009
3096
|
});
|
|
3010
3097
|
}
|
|
3011
3098
|
function parseNewsletterAudience(value) {
|
|
3012
|
-
if (!isRecord$
|
|
3099
|
+
if (!isRecord$31(value)) return err$1("invalid_newsletter_audience");
|
|
3013
3100
|
if (value.kind === "general" && Object.keys(value).length === 1) return ok$2({ kind: "general" });
|
|
3014
3101
|
if (value.kind !== "topic" || Object.keys(value).some((key) => key !== "kind" && key !== "topicId")) return err$1("invalid_newsletter_audience");
|
|
3015
3102
|
const topicId = parseNewsletterListId(value.topicId);
|
|
@@ -3019,7 +3106,7 @@ function parseNewsletterAudience(value) {
|
|
|
3019
3106
|
});
|
|
3020
3107
|
}
|
|
3021
3108
|
function parseGlobalFields(value) {
|
|
3022
|
-
if (!isRecord$
|
|
3109
|
+
if (!isRecord$31(value) || typeof value.preset !== "string") return null;
|
|
3023
3110
|
switch (value.preset) {
|
|
3024
3111
|
case "emailOnly": return { preset: "emailOnly" };
|
|
3025
3112
|
case "emailName": return isRequirement(value.name) ? {
|
|
@@ -3060,7 +3147,7 @@ function parseOptionalString(value) {
|
|
|
3060
3147
|
function isRequirement(value) {
|
|
3061
3148
|
return value === "required" || value === "optional";
|
|
3062
3149
|
}
|
|
3063
|
-
function isRecord$
|
|
3150
|
+
function isRecord$31(value) {
|
|
3064
3151
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
3065
3152
|
}
|
|
3066
3153
|
function formError(field) {
|
|
@@ -3179,7 +3266,7 @@ function assessMatchedChoices(matched, choices) {
|
|
|
3179
3266
|
//#endregion
|
|
3180
3267
|
//#region ../core/src/mailing-list-runtime.ts
|
|
3181
3268
|
function parseMailingListRuntimeContext(value) {
|
|
3182
|
-
if (!isRecord$
|
|
3269
|
+
if (!isRecord$30(value)) return invalidRuntimeContext();
|
|
3183
3270
|
if (value.tag === "not_configured") return ok$2({ tag: "not_configured" });
|
|
3184
3271
|
if (value.tag !== "configured") return invalidRuntimeContext();
|
|
3185
3272
|
return parseConfiguredRuntimeContext(value);
|
|
@@ -3207,7 +3294,7 @@ function parseBookingSignupOffer(value) {
|
|
|
3207
3294
|
tag: "unavailable",
|
|
3208
3295
|
reason: "disabled"
|
|
3209
3296
|
};
|
|
3210
|
-
if (!isRecord$
|
|
3297
|
+
if (!isRecord$30(value)) return null;
|
|
3211
3298
|
if (value.tag === "offered") return { tag: "offered" };
|
|
3212
3299
|
if (value.tag === "unavailable" && (value.reason === "disabled" || value.reason === "fields" || value.reason === "destination")) return {
|
|
3213
3300
|
tag: "unavailable",
|
|
@@ -3216,7 +3303,7 @@ function parseBookingSignupOffer(value) {
|
|
|
3216
3303
|
return null;
|
|
3217
3304
|
}
|
|
3218
3305
|
function parseRuntimeProvider(value) {
|
|
3219
|
-
if (!isRecord$
|
|
3306
|
+
if (!isRecord$30(value)) return null;
|
|
3220
3307
|
switch (value.provider) {
|
|
3221
3308
|
case "native": return parseNativeRuntimeProvider(value);
|
|
3222
3309
|
case "brevo": return parseBrevoRuntimeProvider(value);
|
|
@@ -3254,7 +3341,7 @@ function parseMailchimpRuntimeProvider(value) {
|
|
|
3254
3341
|
} : null;
|
|
3255
3342
|
}
|
|
3256
3343
|
function parseMailchimpAudience(value) {
|
|
3257
|
-
if (!isRecord$
|
|
3344
|
+
if (!isRecord$30(value) || !Array.isArray(value.interests)) return null;
|
|
3258
3345
|
const id = parseMailchimpAudienceId(value.id);
|
|
3259
3346
|
const name = parseName(value.name);
|
|
3260
3347
|
const interests = Array.from(value.interests, parseMailchimpInterest);
|
|
@@ -3265,7 +3352,7 @@ function parseMailchimpAudience(value) {
|
|
|
3265
3352
|
} : null;
|
|
3266
3353
|
}
|
|
3267
3354
|
function parseMailchimpInterest(value) {
|
|
3268
|
-
if (!isRecord$
|
|
3355
|
+
if (!isRecord$30(value)) return null;
|
|
3269
3356
|
const id = parseMailchimpInterestId(value.id);
|
|
3270
3357
|
const name = parseName(value.name);
|
|
3271
3358
|
const categoryName = parseName(value.categoryName);
|
|
@@ -3278,7 +3365,7 @@ function parseMailchimpInterest(value) {
|
|
|
3278
3365
|
function parseNamedItems(value, parseId) {
|
|
3279
3366
|
if (!Array.isArray(value)) return null;
|
|
3280
3367
|
const items = Array.from(value, (item) => {
|
|
3281
|
-
if (!isRecord$
|
|
3368
|
+
if (!isRecord$30(item)) return null;
|
|
3282
3369
|
const id = parseId(item.id);
|
|
3283
3370
|
const name = parseName(item.name);
|
|
3284
3371
|
return id !== null && name !== null ? {
|
|
@@ -3293,7 +3380,7 @@ function parseName(value) {
|
|
|
3293
3380
|
const name = value.trim();
|
|
3294
3381
|
return name.length > 0 ? name : null;
|
|
3295
3382
|
}
|
|
3296
|
-
function isRecord$
|
|
3383
|
+
function isRecord$30(value) {
|
|
3297
3384
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
3298
3385
|
}
|
|
3299
3386
|
function invalidRuntimeContext() {
|
|
@@ -3415,16 +3502,17 @@ function nextLiveRunSessionStartMs(sessions, now) {
|
|
|
3415
3502
|
return next === void 0 ? null : sessionStartMs(next);
|
|
3416
3503
|
}
|
|
3417
3504
|
/**
|
|
3418
|
-
* Booking stays open until the run's
|
|
3505
|
+
* Booking stays open until the run's cut-off, counted from its first surviving
|
|
3506
|
+
* session. A cut-off of zero closes it as that session starts.
|
|
3419
3507
|
*
|
|
3420
3508
|
* There has to be something left to sell: a run with no schedule at all, or one
|
|
3421
3509
|
* whose every session has been cancelled, is closed rather than open. Adding a
|
|
3422
3510
|
* future session opens it again, subject to the usual status, visibility and
|
|
3423
3511
|
* admission rules.
|
|
3424
3512
|
*/
|
|
3425
|
-
function isWholeSeriesRegistrationOpen(sessions, now) {
|
|
3426
|
-
const
|
|
3427
|
-
return
|
|
3513
|
+
function isWholeSeriesRegistrationOpen(sessions, now, cutOffHours) {
|
|
3514
|
+
const first = orderedLiveRunSessions(sessions)[0];
|
|
3515
|
+
return first !== void 0 && !hasBookingClosed(bookingClosesAt(first.startsAt, cutOffHours), now);
|
|
3428
3516
|
}
|
|
3429
3517
|
/**
|
|
3430
3518
|
* Where the run sits in its own life, independent of any one session.
|
|
@@ -3449,8 +3537,8 @@ function resolveWholeSeriesRunLifecycle(input, now) {
|
|
|
3449
3537
|
* Whether a prepared run is still inviting bookings at render time.
|
|
3450
3538
|
*
|
|
3451
3539
|
* `lifecycle` and `enrollmentOpen` come from the projection; the first session
|
|
3452
|
-
* start
|
|
3453
|
-
* cached page can cross while it sits in front of a visitor.
|
|
3540
|
+
* start and the cut-off are the facts re-read against `now`, because those are
|
|
3541
|
+
* the boundaries a cached page can cross while it sits in front of a visitor.
|
|
3454
3542
|
*/
|
|
3455
3543
|
function resolveWholeSeriesBookingPhase(run, now) {
|
|
3456
3544
|
switch (run.lifecycle) {
|
|
@@ -3471,10 +3559,14 @@ function resolveWholeSeriesBookingPhase(run, now) {
|
|
|
3471
3559
|
kind: "closed",
|
|
3472
3560
|
reason: "no-sessions"
|
|
3473
3561
|
};
|
|
3474
|
-
if (!isWholeSeriesRegistrationOpen(run.sessions, now)) return {
|
|
3562
|
+
if (!isWholeSeriesRegistrationOpen(run.sessions, now, 0)) return {
|
|
3475
3563
|
kind: "closed",
|
|
3476
3564
|
reason: "in-progress"
|
|
3477
3565
|
};
|
|
3566
|
+
if (run.bookingClosesAt !== void 0 && hasBookingClosed(run.bookingClosesAt, now)) return {
|
|
3567
|
+
kind: "closed",
|
|
3568
|
+
reason: "bookings-closed"
|
|
3569
|
+
};
|
|
3478
3570
|
return run.enrollmentOpen ? { kind: "open" } : {
|
|
3479
3571
|
kind: "closed",
|
|
3480
3572
|
reason: "enrolment-closed"
|
|
@@ -3521,7 +3613,6 @@ const PUBLIC_READ_CACHE_POLICIES = {
|
|
|
3521
3613
|
"public_memberships"
|
|
3522
3614
|
], "batch_only"),
|
|
3523
3615
|
getPublicMapLocation: availability(["public_events", "public_event_filters"], "batch_only"),
|
|
3524
|
-
resolveEventSubroute: availability(["public_events", "public_event_filters"], "direct"),
|
|
3525
3616
|
listPublicRouteCandidates: content(["published_content"], "batch_only"),
|
|
3526
3617
|
listPublicTeamMembers: content(["public_team_members"]),
|
|
3527
3618
|
listPublicProducts: availability(["public_products"], "direct"),
|
|
@@ -3650,7 +3741,7 @@ function authoredValuesEqual(left, right) {
|
|
|
3650
3741
|
}
|
|
3651
3742
|
//#endregion
|
|
3652
3743
|
//#region ../core/src/record-guards.ts
|
|
3653
|
-
function isRecord$
|
|
3744
|
+
function isRecord$29(value) {
|
|
3654
3745
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
3655
3746
|
}
|
|
3656
3747
|
//#endregion
|
|
@@ -6147,11 +6238,11 @@ function parseRelativeStoragePath(value) {
|
|
|
6147
6238
|
}
|
|
6148
6239
|
//#endregion
|
|
6149
6240
|
//#region ../media-core/src/typeGuards.ts
|
|
6150
|
-
function isRecord$
|
|
6241
|
+
function isRecord$28(value) {
|
|
6151
6242
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
6152
6243
|
}
|
|
6153
6244
|
function asRecord(value) {
|
|
6154
|
-
return isRecord$
|
|
6245
|
+
return isRecord$28(value) ? value : void 0;
|
|
6155
6246
|
}
|
|
6156
6247
|
//#endregion
|
|
6157
6248
|
//#region ../media-core/src/identifiers.ts
|
|
@@ -6595,8 +6686,8 @@ function walkAndCollectImageAttrs(value, out, location = "") {
|
|
|
6595
6686
|
value.forEach((item, index) => walkAndCollectImageAttrs(item, out, `${location}[${index}]`));
|
|
6596
6687
|
return;
|
|
6597
6688
|
}
|
|
6598
|
-
if (!isRecord$
|
|
6599
|
-
if (value.type === "image" && isRecord$
|
|
6689
|
+
if (!isRecord$28(value)) return;
|
|
6690
|
+
if (value.type === "image" && isRecord$28(value.attrs)) out.push({
|
|
6600
6691
|
attrs: value.attrs,
|
|
6601
6692
|
location: location ? `${location}.attrs` : "attrs"
|
|
6602
6693
|
});
|
|
@@ -6692,7 +6783,7 @@ const runtimeBoxBackgroundSchema = z.discriminatedUnion("type", [
|
|
|
6692
6783
|
]).nullable().optional() })
|
|
6693
6784
|
]);
|
|
6694
6785
|
function normalizeAuthoringOpacity(value) {
|
|
6695
|
-
if (!isRecord$
|
|
6786
|
+
if (!isRecord$27(value)) return value;
|
|
6696
6787
|
return {
|
|
6697
6788
|
...value,
|
|
6698
6789
|
opacity: normalizeOpacity(value.opacity)
|
|
@@ -6701,7 +6792,7 @@ function normalizeAuthoringOpacity(value) {
|
|
|
6701
6792
|
function normalizeOpacity(value) {
|
|
6702
6793
|
return typeof value === "number" && value > 1 && value <= 100 ? value / 100 : value;
|
|
6703
6794
|
}
|
|
6704
|
-
function isRecord$
|
|
6795
|
+
function isRecord$27(value) {
|
|
6705
6796
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6706
6797
|
}
|
|
6707
6798
|
//#endregion
|
|
@@ -29797,7 +29888,7 @@ function CalloutDescription({ className, ...props }) {
|
|
|
29797
29888
|
function isObject$1(subject) {
|
|
29798
29889
|
return Object.prototype.toString.call(subject) === "[object Object]";
|
|
29799
29890
|
}
|
|
29800
|
-
function isRecord$
|
|
29891
|
+
function isRecord$26(subject) {
|
|
29801
29892
|
return isObject$1(subject) || Array.isArray(subject);
|
|
29802
29893
|
}
|
|
29803
29894
|
function canUseDOM() {
|
|
@@ -29812,7 +29903,7 @@ function areOptionsEqual(optionsA, optionsB) {
|
|
|
29812
29903
|
const valueA = optionsA[key];
|
|
29813
29904
|
const valueB = optionsB[key];
|
|
29814
29905
|
if (typeof valueA === "function") return `${valueA}` === `${valueB}`;
|
|
29815
|
-
if (!isRecord$
|
|
29906
|
+
if (!isRecord$26(valueA) || !isRecord$26(valueB)) return valueA === valueB;
|
|
29816
29907
|
return areOptionsEqual(valueA, valueB);
|
|
29817
29908
|
});
|
|
29818
29909
|
}
|
|
@@ -32009,20 +32100,20 @@ function isApiErrorCode(value) {
|
|
|
32009
32100
|
function isApiSuccess(result) {
|
|
32010
32101
|
return result.success === true;
|
|
32011
32102
|
}
|
|
32012
|
-
function isRecord$
|
|
32103
|
+
function isRecord$25(value) {
|
|
32013
32104
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
32014
32105
|
}
|
|
32015
32106
|
function isFieldError$1(value) {
|
|
32016
|
-
return isRecord$
|
|
32107
|
+
return isRecord$25(value) && typeof value.field === "string" && typeof value.code === "string" && typeof value.message === "string" && (value.capacityOverride === void 0 || isCapacityOverrideRefusal(value.capacityOverride));
|
|
32017
32108
|
}
|
|
32018
32109
|
function fieldErrorsFromUnknown$1(value) {
|
|
32019
32110
|
if (!Array.isArray(value)) return null;
|
|
32020
32111
|
return value.every(isFieldError$1) ? value : null;
|
|
32021
32112
|
}
|
|
32022
32113
|
function extractEnvelopeErrorObject(body) {
|
|
32023
|
-
if (!isRecord$
|
|
32114
|
+
if (!isRecord$25(body)) return null;
|
|
32024
32115
|
const error = body.error;
|
|
32025
|
-
if (!isRecord$
|
|
32116
|
+
if (!isRecord$25(error)) return null;
|
|
32026
32117
|
if ("success" in body && body.success !== false) return null;
|
|
32027
32118
|
return error;
|
|
32028
32119
|
}
|
|
@@ -32779,6 +32870,20 @@ function buildFetchPolicy(siteId, reads, freshnessSeconds) {
|
|
|
32779
32870
|
function buildPublicReadBatchFetchPolicy(siteId, reads) {
|
|
32780
32871
|
return buildFetchPolicy(siteId, reads, publicReadBatchFreshnessSeconds);
|
|
32781
32872
|
}
|
|
32873
|
+
/** A page may depend on admission even when an ordinary CMS page won precedence. */
|
|
32874
|
+
function buildPageReadCachePolicy(siteId, dependencies) {
|
|
32875
|
+
return dependencies === "availability" ? {
|
|
32876
|
+
tags: normalizeRevalidateTags([
|
|
32877
|
+
...buildCacheReadTags([TAG_TEMPLATES.siteRoutableContent], { siteId }),
|
|
32878
|
+
...buildPublicReadFetchTags("listPublicEvents", { siteId }),
|
|
32879
|
+
...buildPublicReadFetchTags("getPublicBookingService", { siteId })
|
|
32880
|
+
]),
|
|
32881
|
+
revalidate: 60
|
|
32882
|
+
} : {
|
|
32883
|
+
tags: buildCacheReadTags([TAG_TEMPLATES.siteRoutableContent], { siteId }),
|
|
32884
|
+
revalidate: PUBLIC_CONTENT_FRESHNESS_SECONDS
|
|
32885
|
+
};
|
|
32886
|
+
}
|
|
32782
32887
|
//#endregion
|
|
32783
32888
|
//#region ../api/src/sdkEntryReadEndpoints.ts
|
|
32784
32889
|
const SDK_ENTRY_READ_ENDPOINTS = {
|
|
@@ -32948,8 +33053,10 @@ const arrangementEndRequestSchema = z.object({
|
|
|
32948
33053
|
...recordedReturn,
|
|
32949
33054
|
lastDate: localDate
|
|
32950
33055
|
}).strict();
|
|
32951
|
-
|
|
33056
|
+
/** `expectedUpdatedAt` is the version the dialog was showing, so a save can't overwrite a newer change. */
|
|
33057
|
+
const arrangementEditSchema = z.object({
|
|
32952
33058
|
...operation,
|
|
33059
|
+
expectedUpdatedAt: z.string().min(1),
|
|
32953
33060
|
serviceId: z.string().uuid(),
|
|
32954
33061
|
holdsTime: z.boolean(),
|
|
32955
33062
|
payment: arrangementPaymentSchema
|
|
@@ -32983,6 +33090,11 @@ z.discriminatedUnion("kind", [
|
|
|
32983
33090
|
kind: z.literal("end"),
|
|
32984
33091
|
arrangementId: z.string().uuid(),
|
|
32985
33092
|
request: arrangementEndRequestSchema
|
|
33093
|
+
}).strict(),
|
|
33094
|
+
z.object({
|
|
33095
|
+
kind: z.literal("edit"),
|
|
33096
|
+
arrangementId: z.string().uuid(),
|
|
33097
|
+
request: arrangementEditSchema
|
|
32986
33098
|
}).strict()
|
|
32987
33099
|
]);
|
|
32988
33100
|
const arrangementTimeOffChoiceSchema = z.discriminatedUnion("kind", [
|
|
@@ -33683,6 +33795,20 @@ const APPOINTMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
33683
33795
|
auth: "user",
|
|
33684
33796
|
responseKind: "json"
|
|
33685
33797
|
},
|
|
33798
|
+
listStaffServiceOnlineDetails: {
|
|
33799
|
+
path: "/sites/{siteId}/bookings/resources/{resourceId}/services/online-details",
|
|
33800
|
+
method: "GET",
|
|
33801
|
+
auth: "user",
|
|
33802
|
+
responseKind: "json",
|
|
33803
|
+
errors: []
|
|
33804
|
+
},
|
|
33805
|
+
setStaffServiceOnlineDetails: {
|
|
33806
|
+
path: "/sites/{siteId}/bookings/resources/{resourceId}/services/online-details",
|
|
33807
|
+
method: "PUT",
|
|
33808
|
+
auth: "user",
|
|
33809
|
+
responseKind: "json",
|
|
33810
|
+
errors: []
|
|
33811
|
+
},
|
|
33686
33812
|
getServiceResources: {
|
|
33687
33813
|
path: "/sites/{siteId}/bookings/services/{serviceId}/resources",
|
|
33688
33814
|
method: "GET",
|
|
@@ -34080,6 +34206,18 @@ const EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS = defineEndpointDefinitions
|
|
|
34080
34206
|
"server:internal_error"
|
|
34081
34207
|
]
|
|
34082
34208
|
},
|
|
34209
|
+
setEventAttendeesNoShow: {
|
|
34210
|
+
path: "/sites/{siteId}/bookings/attendees/no-show",
|
|
34211
|
+
method: "POST",
|
|
34212
|
+
auth: "user",
|
|
34213
|
+
responseKind: "json",
|
|
34214
|
+
errors: [
|
|
34215
|
+
"validation:invalid_input",
|
|
34216
|
+
"auth:forbidden",
|
|
34217
|
+
"resource:conflict",
|
|
34218
|
+
"server:internal_error"
|
|
34219
|
+
]
|
|
34220
|
+
},
|
|
34083
34221
|
listEventOfferingCombinationPrices: {
|
|
34084
34222
|
path: "/sites/{siteId}/bookings/event-offerings/{eventOfferingId}/combination-prices",
|
|
34085
34223
|
method: "GET",
|
|
@@ -35555,15 +35693,6 @@ const PUBLIC_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
35555
35693
|
"resource:conflict",
|
|
35556
35694
|
"server:internal_error"
|
|
35557
35695
|
]
|
|
35558
|
-
},
|
|
35559
|
-
resolveEventSubroute: {
|
|
35560
|
-
path: "/public/sites/{siteId}/events/subroutes/resolve",
|
|
35561
|
-
method: "GET",
|
|
35562
|
-
revalidate: publicReadFreshnessSeconds("resolveEventSubroute"),
|
|
35563
|
-
tags: [TAG_TEMPLATES.publicEvents, "event-subroute"],
|
|
35564
|
-
auth: "public",
|
|
35565
|
-
responseKind: "json",
|
|
35566
|
-
errors: []
|
|
35567
35696
|
}
|
|
35568
35697
|
});
|
|
35569
35698
|
//#endregion
|
|
@@ -38769,6 +38898,14 @@ const API_ENDPOINTS = {
|
|
|
38769
38898
|
responseKind: "json",
|
|
38770
38899
|
errors: []
|
|
38771
38900
|
},
|
|
38901
|
+
adminDeleteSupportTicketScreenshot: {
|
|
38902
|
+
path: "/admin/support/tickets/screenshot/delete",
|
|
38903
|
+
method: "POST",
|
|
38904
|
+
tags: ["admin", "support"],
|
|
38905
|
+
auth: "admin",
|
|
38906
|
+
responseKind: "json",
|
|
38907
|
+
errors: []
|
|
38908
|
+
},
|
|
38772
38909
|
mfaTotpEnroll: {
|
|
38773
38910
|
path: "/auth/mfa/totp/enroll",
|
|
38774
38911
|
method: "POST",
|
|
@@ -39770,6 +39907,7 @@ const API_ENDPOINTS = {
|
|
|
39770
39907
|
responseKind: "json"
|
|
39771
39908
|
},
|
|
39772
39909
|
resolveRouteOutcome: {
|
|
39910
|
+
revalidate: PUBLIC_CONTENT_FRESHNESS_SECONDS,
|
|
39773
39911
|
path: "/sites/{siteId}/route-outcome",
|
|
39774
39912
|
method: "GET",
|
|
39775
39913
|
tags: [
|
|
@@ -40697,6 +40835,25 @@ const API_ENDPOINTS = {
|
|
|
40697
40835
|
"bookings"
|
|
40698
40836
|
]
|
|
40699
40837
|
},
|
|
40838
|
+
listEventBookingTicketChoices: {
|
|
40839
|
+
errors: [],
|
|
40840
|
+
path: "/sites/{siteId}/bookings/event-attendees/{attendeeId}/ticket-choices",
|
|
40841
|
+
method: "GET",
|
|
40842
|
+
auth: "user",
|
|
40843
|
+
responseKind: "json"
|
|
40844
|
+
},
|
|
40845
|
+
changeEventBookingTickets: {
|
|
40846
|
+
errors: [],
|
|
40847
|
+
path: "/sites/{siteId}/bookings/event-attendees/{attendeeId}/change-tickets",
|
|
40848
|
+
method: "POST",
|
|
40849
|
+
auth: "user",
|
|
40850
|
+
responseKind: "json",
|
|
40851
|
+
tags: [
|
|
40852
|
+
"site-{siteId}",
|
|
40853
|
+
"event-attendee-{attendeeId}",
|
|
40854
|
+
"bookings"
|
|
40855
|
+
]
|
|
40856
|
+
},
|
|
40700
40857
|
restoreEventBooking: {
|
|
40701
40858
|
errors: [],
|
|
40702
40859
|
path: "/sites/{siteId}/bookings/event-attendees/{attendeeId}/restore",
|
|
@@ -42586,6 +42743,27 @@ const API_ENDPOINTS = {
|
|
|
42586
42743
|
responseKind: "json",
|
|
42587
42744
|
errors: []
|
|
42588
42745
|
},
|
|
42746
|
+
portalEntryPreview: {
|
|
42747
|
+
path: "/portal/auth/entry/preview",
|
|
42748
|
+
method: "POST",
|
|
42749
|
+
auth: "public",
|
|
42750
|
+
responseKind: "json",
|
|
42751
|
+
errors: []
|
|
42752
|
+
},
|
|
42753
|
+
portalEntryRedeem: {
|
|
42754
|
+
path: "/portal/auth/entry/redeem",
|
|
42755
|
+
method: "POST",
|
|
42756
|
+
auth: "public",
|
|
42757
|
+
responseKind: "json",
|
|
42758
|
+
errors: []
|
|
42759
|
+
},
|
|
42760
|
+
portalEntryResend: {
|
|
42761
|
+
path: "/portal/auth/entry/resend",
|
|
42762
|
+
method: "POST",
|
|
42763
|
+
auth: "public",
|
|
42764
|
+
responseKind: "json",
|
|
42765
|
+
errors: []
|
|
42766
|
+
},
|
|
42589
42767
|
portalLogout: {
|
|
42590
42768
|
path: "/portal/auth/logout",
|
|
42591
42769
|
method: "POST",
|
|
@@ -42884,7 +43062,7 @@ const blockStore = isBlocksTestRuntime$1 ? /* @__PURE__ */ new Map() : globalSco
|
|
|
42884
43062
|
/**
|
|
42885
43063
|
* Strict record guard: excludes null, primitives, and arrays.
|
|
42886
43064
|
*/
|
|
42887
|
-
function isRecord$
|
|
43065
|
+
function isRecord$24(value) {
|
|
42888
43066
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
42889
43067
|
}
|
|
42890
43068
|
/**
|
|
@@ -47431,9 +47609,9 @@ function sectionFactsForContent(content) {
|
|
|
47431
47609
|
function isLookPhotoGround(content) {
|
|
47432
47610
|
const look = content._effectiveLook;
|
|
47433
47611
|
const hooks = content._lookHooks;
|
|
47434
|
-
return isRecord$
|
|
47612
|
+
return isRecord$23(look) && look.photoGround === true && isRecord$23(hooks) && hooks["data-has-photo"] === "true";
|
|
47435
47613
|
}
|
|
47436
|
-
function isRecord$
|
|
47614
|
+
function isRecord$23(value) {
|
|
47437
47615
|
return typeof value === "object" && value !== null;
|
|
47438
47616
|
}
|
|
47439
47617
|
function isPhotoBackground(content) {
|
|
@@ -65460,7 +65638,7 @@ function arrangementContentFacts(content) {
|
|
|
65460
65638
|
featured,
|
|
65461
65639
|
outcome: typeof content.outcome === "string" && content.outcome.length > 0,
|
|
65462
65640
|
figure: typeof content.figure === "string" && content.figure.trim().length > 0,
|
|
65463
|
-
entrance: isRecord$
|
|
65641
|
+
entrance: isRecord$29(content.entrancePhoto)
|
|
65464
65642
|
},
|
|
65465
65643
|
settings: { "listed-by-week": content.listBy === "week" }
|
|
65466
65644
|
}
|
|
@@ -65475,10 +65653,10 @@ function lookFillPartsFromContent(content) {
|
|
|
65475
65653
|
}
|
|
65476
65654
|
/** The content stage owns media presence for every arrangement consumer. */
|
|
65477
65655
|
function arrangementPhotoCount(content) {
|
|
65478
|
-
if (Array.isArray(content.cards)) return content.cards.filter((card) => isRecord$
|
|
65479
|
-
if (Array.isArray(content.members)) return content.members.filter((member) => isRecord$
|
|
65480
|
-
if (Array.isArray(content.images)) return content.images.filter((item) => isRecord$
|
|
65481
|
-
if (isRecord$
|
|
65656
|
+
if (Array.isArray(content.cards)) return content.cards.filter((card) => isRecord$29(card) && isRecord$29(card.media)).length;
|
|
65657
|
+
if (Array.isArray(content.members)) return content.members.filter((member) => isRecord$29(member) && isRecord$29(member.photo)).length;
|
|
65658
|
+
if (Array.isArray(content.images)) return content.images.filter((item) => isRecord$29(item) && isRecord$29(item.image)).length;
|
|
65659
|
+
if (isRecord$29(content.media) || isRecord$29(content.entrancePhoto)) return 1;
|
|
65482
65660
|
return storedSectionPhoto(content) === null ? 0 : 1;
|
|
65483
65661
|
}
|
|
65484
65662
|
/** Both rendering and join matching ask the publication-fallback owner. */
|
|
@@ -72570,7 +72748,7 @@ function parseSiteIconStyleGuideVersionId(value) {
|
|
|
72570
72748
|
//#endregion
|
|
72571
72749
|
//#region ../blocks/src/system/icons/value.ts
|
|
72572
72750
|
const NO_BLOCK_ICON_VALUE = { kind: "none" };
|
|
72573
|
-
function isRecord$
|
|
72751
|
+
function isRecord$22(value) {
|
|
72574
72752
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
72575
72753
|
}
|
|
72576
72754
|
function parseBlockIconValue(value) {
|
|
@@ -72578,7 +72756,7 @@ function parseBlockIconValue(value) {
|
|
|
72578
72756
|
kind: "semantic",
|
|
72579
72757
|
iconId: value
|
|
72580
72758
|
};
|
|
72581
|
-
if (!isRecord$
|
|
72759
|
+
if (!isRecord$22(value)) return NO_BLOCK_ICON_VALUE;
|
|
72582
72760
|
switch (value.kind) {
|
|
72583
72761
|
case "none": return NO_BLOCK_ICON_VALUE;
|
|
72584
72762
|
case "semantic": return isSemanticIconId(value.iconId) ? {
|
|
@@ -72659,7 +72837,7 @@ function buildGeneratedBlockIconRenderAssetLookupFromUnknown(value) {
|
|
|
72659
72837
|
if (!Array.isArray(value)) return { kind: "invalid_asset_list" };
|
|
72660
72838
|
const inputs = [];
|
|
72661
72839
|
for (const [index, item] of value.entries()) {
|
|
72662
|
-
if (!isRecord$
|
|
72840
|
+
if (!isRecord$22(item)) return {
|
|
72663
72841
|
kind: "invalid_asset_entry",
|
|
72664
72842
|
index,
|
|
72665
72843
|
reason: "not_object"
|
|
@@ -72719,7 +72897,7 @@ function resolveBlockIconRenderValue(value, generatedAssets = /* @__PURE__ */ ne
|
|
|
72719
72897
|
}
|
|
72720
72898
|
}
|
|
72721
72899
|
function getGeneratedBlockIconStyleState(value, currentStyleGuideVersionId) {
|
|
72722
|
-
if (isRecord$
|
|
72900
|
+
if (isRecord$22(value) && value.kind === "generated" && parseBlockIconValue(value).kind !== "generated") return { kind: "invalid_generated" };
|
|
72723
72901
|
const parsed = parseBlockIconValue(value);
|
|
72724
72902
|
if (parsed.kind !== "generated") return { kind: "not_generated" };
|
|
72725
72903
|
if (parsed.styleGuideVersionId === currentStyleGuideVersionId) return {
|
|
@@ -72949,7 +73127,7 @@ function treeSize(value, depth = 0) {
|
|
|
72949
73127
|
nodes: 0,
|
|
72950
73128
|
text: 0
|
|
72951
73129
|
};
|
|
72952
|
-
if (!isRecord$
|
|
73130
|
+
if (!isRecord$29(value)) return {
|
|
72953
73131
|
depth,
|
|
72954
73132
|
nodes: 0,
|
|
72955
73133
|
text: 0
|
|
@@ -73187,7 +73365,7 @@ function buildRichTextSchema(options) {
|
|
|
73187
73365
|
const content = val.content;
|
|
73188
73366
|
if (!Array.isArray(content) || content.length === 0) return false;
|
|
73189
73367
|
const first = content[0];
|
|
73190
|
-
if (content.length === 1 && isRecord$
|
|
73368
|
+
if (content.length === 1 && isRecord$29(first) && first.type === "paragraph" && (!("content" in first) || first.content == null)) return false;
|
|
73191
73369
|
return true;
|
|
73192
73370
|
}, { message: `${label} is required` });
|
|
73193
73371
|
}
|
|
@@ -80569,6 +80747,8 @@ const publicWholeSeriesRunSchema = z.object({
|
|
|
80569
80747
|
eventSeriesId: z.string(),
|
|
80570
80748
|
eventOfferingId: z.string(),
|
|
80571
80749
|
enrollmentOpen: z.boolean(),
|
|
80750
|
+
/** Present when bookings stop before the first session. Older sites ignore it. */
|
|
80751
|
+
bookingClosesAt: z.string().optional(),
|
|
80572
80752
|
visibility: z.enum(["public", "unlisted"]),
|
|
80573
80753
|
lifecycle: z.enum([
|
|
80574
80754
|
"upcoming",
|
|
@@ -80616,6 +80796,11 @@ const publicEventBaseSchema = z.object({
|
|
|
80616
80796
|
requiresRegistration: z.boolean(),
|
|
80617
80797
|
bookingAvailability: publicEventBookingAvailabilitySchema,
|
|
80618
80798
|
bookingClosedDetail: publicEventBookingClosedDetailSchema.optional(),
|
|
80799
|
+
/**
|
|
80800
|
+
* Present when bookings stop before this date starts. It's what says "closed
|
|
80801
|
+
* early": the closed reasons stay as they are, so older sites keep working.
|
|
80802
|
+
*/
|
|
80803
|
+
bookingClosesAt: z.string().optional(),
|
|
80619
80804
|
deliveryMode: z.enum([
|
|
80620
80805
|
"in_person",
|
|
80621
80806
|
"online",
|
|
@@ -85912,16 +86097,16 @@ const interpolateRichTextTokensOptionsSchema = z.object({ tokens: z.array(suppor
|
|
|
85912
86097
|
const richTextTokenPattern = /\{\{\s*([a-zA-Z0-9_]+)\s*\}\}/g;
|
|
85913
86098
|
function getSiteName(context) {
|
|
85914
86099
|
const viewModel = context.viewModel;
|
|
85915
|
-
if (!isRecord$
|
|
86100
|
+
if (!isRecord$24(viewModel)) return null;
|
|
85916
86101
|
const site = viewModel.site;
|
|
85917
|
-
if (isRecord$
|
|
86102
|
+
if (isRecord$24(site) && typeof site.title === "string") {
|
|
85918
86103
|
const title = site.title.trim();
|
|
85919
86104
|
return title.length > 0 ? title : null;
|
|
85920
86105
|
}
|
|
85921
86106
|
const root = viewModel.$root;
|
|
85922
|
-
if (isRecord$
|
|
86107
|
+
if (isRecord$24(root)) {
|
|
85923
86108
|
const rootSite = root.site;
|
|
85924
|
-
if (isRecord$
|
|
86109
|
+
if (isRecord$24(rootSite) && typeof rootSite.title === "string") {
|
|
85925
86110
|
const title = rootSite.title.trim();
|
|
85926
86111
|
if (title.length > 0) return title;
|
|
85927
86112
|
}
|
|
@@ -85943,7 +86128,7 @@ function replaceTokenText(input, allowedTokens, tokenValues) {
|
|
|
85943
86128
|
});
|
|
85944
86129
|
}
|
|
85945
86130
|
function visitRichTextNode(node, allowedTokens, tokenValues) {
|
|
85946
|
-
if (!isRecord$
|
|
86131
|
+
if (!isRecord$24(node)) return node;
|
|
85947
86132
|
let changed = false;
|
|
85948
86133
|
const nextNode = { ...node };
|
|
85949
86134
|
if (nextNode.type === "text" && typeof nextNode.text === "string") {
|
|
@@ -85964,7 +86149,7 @@ function visitRichTextNode(node, allowedTokens, tokenValues) {
|
|
|
85964
86149
|
return changed ? nextNode : node;
|
|
85965
86150
|
}
|
|
85966
86151
|
function interpolateRichTextTokens(value, options, context) {
|
|
85967
|
-
if (typeof value !== "string" && !isRecord$
|
|
86152
|
+
if (typeof value !== "string" && !isRecord$24(value)) return value;
|
|
85968
86153
|
const allowedTokens = new Set(options.tokens);
|
|
85969
86154
|
const tokenValues = {
|
|
85970
86155
|
year: () => formatDate$4({
|
|
@@ -87438,11 +87623,11 @@ function resolveFeatureCardGeneratedIconSizePx(value) {
|
|
|
87438
87623
|
const parsed = parseFeatureCardGeneratedIconSizePx(value);
|
|
87439
87624
|
return parsed.ok ? parsed.value : unsafeAsFeatureCardGeneratedIconSizePx(FEATURE_CARD_GENERATED_ICON_SIZE_PX.default);
|
|
87440
87625
|
}
|
|
87441
|
-
function isRecord$
|
|
87626
|
+
function isRecord$21(value) {
|
|
87442
87627
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
87443
87628
|
}
|
|
87444
87629
|
function toPlainTextFromTipTap(value) {
|
|
87445
|
-
if (!isRecord$
|
|
87630
|
+
if (!isRecord$21(value)) return "";
|
|
87446
87631
|
if (typeof value.text === "string") return value.text;
|
|
87447
87632
|
const content = value.content;
|
|
87448
87633
|
if (!Array.isArray(content)) return "";
|
|
@@ -89608,31 +89793,21 @@ function rowFor(rows, mode) {
|
|
|
89608
89793
|
* capacity comes from the shared event-domain helpers so uncapped, fallback,
|
|
89609
89794
|
* and hybrid attendance-mode cases agree with the registration runtime.
|
|
89610
89795
|
*/
|
|
89611
|
-
function isBookableEvent(event) {
|
|
89796
|
+
function isBookableEvent(event, now) {
|
|
89612
89797
|
if (!event.requiresRegistration) return false;
|
|
89613
89798
|
if (event.bookingAvailability.kind !== "open") return false;
|
|
89799
|
+
if (now && hasEventBookingClosedEarly(event, now)) return false;
|
|
89614
89800
|
return !isEventFull(event) || canJoinEventWaitlistOnAnyMode(event);
|
|
89615
89801
|
}
|
|
89616
|
-
//#endregion
|
|
89617
|
-
//#region ../blocks/src/system/blocks/events/shared/pageSelection.ts
|
|
89618
89802
|
/**
|
|
89619
|
-
*
|
|
89620
|
-
*
|
|
89621
|
-
* The resolver used to assume that one returned `PublicEvent` meant one
|
|
89622
|
-
* occurrence. A whole-series Event breaks that assumption in two directions: a
|
|
89623
|
-
* parent Event path selects nothing concrete until a run is chosen, and a run
|
|
89624
|
-
* path selects a run whose identity spans every one of its sessions. This
|
|
89625
|
-
* module parses those cases once, so the renderer switches over a closed set of
|
|
89626
|
-
* page states instead of probing booking scopes at render time.
|
|
89627
|
-
*
|
|
89628
|
-
* Everything here is pure. Loading events and resolving run slugs is the
|
|
89629
|
-
* resolver's job; deciding what the page is and which runs the chooser
|
|
89630
|
-
* advertises happens here. When a run is open to join, and where it sits in its
|
|
89631
|
-
* own life, come from `@riverbankcms/core`: the same authority the
|
|
89632
|
-
* public read projection and the write-side run-facts loader use, so a run
|
|
89633
|
-
* cannot report itself open on the storefront and closed at the point of
|
|
89634
|
-
* booking.
|
|
89803
|
+
* Whether a date has passed its cut-off by this clock. The projected availability
|
|
89804
|
+
* can be older than the page it's on, and a cut-off makes that gap matter more.
|
|
89635
89805
|
*/
|
|
89806
|
+
function hasEventBookingClosedEarly(event, now) {
|
|
89807
|
+
return event.bookingClosesAt !== void 0 && hasBookingClosed(event.bookingClosesAt, now);
|
|
89808
|
+
}
|
|
89809
|
+
//#endregion
|
|
89810
|
+
//#region ../blocks/src/system/blocks/events/shared/pageSelection.ts
|
|
89636
89811
|
function planWholeSeriesParentBooking(eligibleRuns) {
|
|
89637
89812
|
const [first, second, ...rest] = eligibleRuns;
|
|
89638
89813
|
if (!second) return {
|
|
@@ -89672,7 +89847,7 @@ function planOrdinarySeriesSelection(events) {
|
|
|
89672
89847
|
const ordinary = events.filter(isOrdinaryPublicEvent);
|
|
89673
89848
|
const firstSeriesId = ordinary[0]?.seriesId;
|
|
89674
89849
|
if (!firstSeriesId || ordinary.some((event) => event.seriesId !== firstSeriesId)) return null;
|
|
89675
|
-
const [first, second] = ordinary.filter(isBookableEvent);
|
|
89850
|
+
const [first, second] = ordinary.filter((event) => isBookableEvent(event));
|
|
89676
89851
|
if (first && second) {
|
|
89677
89852
|
const [a, b, ...rest] = [...ordinary].filter(isOpenForBooking).sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt));
|
|
89678
89853
|
if (a && b) return {
|
|
@@ -89883,6 +90058,243 @@ function isCancelledOrdinaryDate(event) {
|
|
|
89883
90058
|
//#region ../blocks/src/system/blocks/shared/bookingPageKind.ts
|
|
89884
90059
|
const bookingPageKindSchema = z.enum(["fullPage", "bookingPage"]);
|
|
89885
90060
|
//#endregion
|
|
90061
|
+
//#region ../blocks/src/system/runtime/nodes/events/domain/dates.ts
|
|
90062
|
+
/** Event presentation adapters; core owns projection, clocks and ranges. */
|
|
90063
|
+
function eventDateLocale(siteTimeZone) {
|
|
90064
|
+
return inferSiteDateLocale(siteTimeZone);
|
|
90065
|
+
}
|
|
90066
|
+
function eventCalendarWeekStart(timeZone, override) {
|
|
90067
|
+
return override ?? (inferSiteDateLocale(resolveBookingBusinessTimeZone(timeZone)) === "en-US" ? "sunday" : "monday");
|
|
90068
|
+
}
|
|
90069
|
+
/** Admit older wire zones once; the booking business fallback remains London. */
|
|
90070
|
+
function eventDateOptions(place) {
|
|
90071
|
+
const siteTimeZone = resolveBookingBusinessTimeZone(place.siteTimeZone);
|
|
90072
|
+
const resolved = resolveBookingDisplayContext({
|
|
90073
|
+
sessionTimeZone: resolveBookingTimeZoneId(place.timeZone, siteTimeZone),
|
|
90074
|
+
siteTimeZone,
|
|
90075
|
+
locale: inferSiteDateLocale(siteTimeZone),
|
|
90076
|
+
isOnline: place.isOnline === true || place.deliveryMode === "online" || place.deliveryMode === "hybrid",
|
|
90077
|
+
surface: "public"
|
|
90078
|
+
});
|
|
90079
|
+
return {
|
|
90080
|
+
...resolved.context,
|
|
90081
|
+
zone: resolved.zone
|
|
90082
|
+
};
|
|
90083
|
+
}
|
|
90084
|
+
/** Overnight spans keep their end day; folds retain both distinct offsets. */
|
|
90085
|
+
function formatEventTimeRange(times, options) {
|
|
90086
|
+
const start = toUtcIsoDateTimeString(times.startsAt);
|
|
90087
|
+
const end = toUtcIsoDateTimeString(times.endsAt);
|
|
90088
|
+
const startDay = getLocalScheduleDate(new Date(start), options.timeZone);
|
|
90089
|
+
const endDay = getLocalScheduleDate(new Date(end), options.timeZone);
|
|
90090
|
+
return startDay.year === endDay.year && startDay.month === endDay.month && startDay.day === endDay.day ? formatTimeRange(start, end, options, { zone: options.zone }) : formatDateTimeRange({
|
|
90091
|
+
start,
|
|
90092
|
+
end
|
|
90093
|
+
}, options, {
|
|
90094
|
+
date: "short",
|
|
90095
|
+
zone: options.zone
|
|
90096
|
+
});
|
|
90097
|
+
}
|
|
90098
|
+
function resolveEventTimeZone(event, calendarTimeZone) {
|
|
90099
|
+
return resolveBookingTimeZoneId(event.timeZone, resolveBookingBusinessTimeZone(calendarTimeZone));
|
|
90100
|
+
}
|
|
90101
|
+
function formatDate$2(isoTimestamp, options) {
|
|
90102
|
+
return formatDate$4({
|
|
90103
|
+
kind: "instant",
|
|
90104
|
+
value: toUtcIsoDateTimeString(isoTimestamp)
|
|
90105
|
+
}, options, {
|
|
90106
|
+
date: "short",
|
|
90107
|
+
weekday: "long"
|
|
90108
|
+
});
|
|
90109
|
+
}
|
|
90110
|
+
function formatTime$2(isoTimestamp, options) {
|
|
90111
|
+
return formatTime$3(toUtcIsoDateTimeString(isoTimestamp), options, { zone: options.zone });
|
|
90112
|
+
}
|
|
90113
|
+
function formatEventDateParts(args) {
|
|
90114
|
+
return {
|
|
90115
|
+
date: formatDate$2(args.startsAt, args),
|
|
90116
|
+
timeRange: formatEventTimeRange(args, args)
|
|
90117
|
+
};
|
|
90118
|
+
}
|
|
90119
|
+
/** A course run's first to last session date, such as `8–22 Sept 2026`. */
|
|
90120
|
+
function formatEventRunDates(first, last, options) {
|
|
90121
|
+
return formatDateRange({
|
|
90122
|
+
kind: "instant",
|
|
90123
|
+
value: toUtcIsoDateTimeString(first.startsAt)
|
|
90124
|
+
}, {
|
|
90125
|
+
kind: "instant",
|
|
90126
|
+
value: toUtcIsoDateTimeString(last.startsAt)
|
|
90127
|
+
}, options, {
|
|
90128
|
+
date: "short",
|
|
90129
|
+
order: "session"
|
|
90130
|
+
});
|
|
90131
|
+
}
|
|
90132
|
+
/** Civil calendar headings never acquire an instant's timezone shift. */
|
|
90133
|
+
function formatCalendarTitle(viewDate, view, days, timeZone) {
|
|
90134
|
+
const context = eventDateOptions({
|
|
90135
|
+
siteTimeZone: timeZone,
|
|
90136
|
+
timeZone
|
|
90137
|
+
});
|
|
90138
|
+
const first = days[0];
|
|
90139
|
+
const last = days[6];
|
|
90140
|
+
return view === "week" && first && last ? formatDateRange({
|
|
90141
|
+
kind: "civil",
|
|
90142
|
+
value: first
|
|
90143
|
+
}, {
|
|
90144
|
+
kind: "civil",
|
|
90145
|
+
value: last
|
|
90146
|
+
}, context, { date: "short" }) : formatDate$4({
|
|
90147
|
+
kind: "civil",
|
|
90148
|
+
value: viewDate
|
|
90149
|
+
}, context, {
|
|
90150
|
+
date: "long",
|
|
90151
|
+
day: "omit"
|
|
90152
|
+
});
|
|
90153
|
+
}
|
|
90154
|
+
function buildCalendarViewport(input) {
|
|
90155
|
+
const viewport = buildCalendarViewport$1(input);
|
|
90156
|
+
return {
|
|
90157
|
+
...viewport,
|
|
90158
|
+
title: formatCalendarTitle(input.anchorDate, input.view, viewport.days, input.timeZone)
|
|
90159
|
+
};
|
|
90160
|
+
}
|
|
90161
|
+
/** Tick digits are civil clock values, not session instants. */
|
|
90162
|
+
function formatEventHourLabel(hour, timeZone) {
|
|
90163
|
+
return formatEventClockLabel(`${String(hour % 24).padStart(2, "0")}:00`, eventDateLocale(timeZone));
|
|
90164
|
+
}
|
|
90165
|
+
/** Weekly cadence and tick clocks are civil values; UTC only carries their components. */
|
|
90166
|
+
function formatEventClockLabel(value, locale) {
|
|
90167
|
+
const clock = parseLocalScheduleTime(value);
|
|
90168
|
+
return formatTime$3(toUtcIsoDateTimeString(new Date(Date.UTC(2e3, 0, 1, clock.hour, clock.minute)).toISOString()), {
|
|
90169
|
+
locale,
|
|
90170
|
+
timeZone: resolveBookingBusinessTimeZone("UTC")
|
|
90171
|
+
}, { zone: "omit" });
|
|
90172
|
+
}
|
|
90173
|
+
function formatEventCompactDateRail(isoTimestamp, options, letterCase = "capitals") {
|
|
90174
|
+
const instant = {
|
|
90175
|
+
kind: "instant",
|
|
90176
|
+
value: toUtcIsoDateTimeString(isoTimestamp)
|
|
90177
|
+
};
|
|
90178
|
+
const cased = (value) => letterCase === "capitals" ? value.toLocaleUpperCase(options.locale) : value;
|
|
90179
|
+
return {
|
|
90180
|
+
weekday: cased(formatDate$4(instant, options, {
|
|
90181
|
+
date: "omit",
|
|
90182
|
+
weekday: "short",
|
|
90183
|
+
year: "omit"
|
|
90184
|
+
})),
|
|
90185
|
+
fullWeekday: formatDate$4(instant, options, {
|
|
90186
|
+
date: "omit",
|
|
90187
|
+
weekday: "long",
|
|
90188
|
+
year: "omit"
|
|
90189
|
+
}),
|
|
90190
|
+
day: formatDate$4(instant, options, {
|
|
90191
|
+
date: "omit",
|
|
90192
|
+
day: "numeric",
|
|
90193
|
+
year: "omit"
|
|
90194
|
+
}),
|
|
90195
|
+
month: cased(formatDate$4(instant, options, {
|
|
90196
|
+
date: "short",
|
|
90197
|
+
day: "omit",
|
|
90198
|
+
year: "omit"
|
|
90199
|
+
}).slice(0, 3)),
|
|
90200
|
+
label: formatDate$4(instant, options, {
|
|
90201
|
+
date: "long",
|
|
90202
|
+
weekday: "long"
|
|
90203
|
+
})
|
|
90204
|
+
};
|
|
90205
|
+
}
|
|
90206
|
+
/**
|
|
90207
|
+
* Format the next occurrence for the image-free catalogue card treatment.
|
|
90208
|
+
*
|
|
90209
|
+
* The compact rail already owns this short, booking-local date vocabulary;
|
|
90210
|
+
* keep the fact panel on the same date and timezone rules as event rows.
|
|
90211
|
+
*/
|
|
90212
|
+
function formatEventNextDateFact(event) {
|
|
90213
|
+
const rail = formatEventCompactDateRail(event.startsAt, eventDateOptions(event));
|
|
90214
|
+
return {
|
|
90215
|
+
dateTime: event.startsAt,
|
|
90216
|
+
value: `${rail.weekday} ${rail.day} ${rail.month}`,
|
|
90217
|
+
label: rail.label
|
|
90218
|
+
};
|
|
90219
|
+
}
|
|
90220
|
+
/**
|
|
90221
|
+
* Group events by their local date (YYYY-MM-DD key in each event's own
|
|
90222
|
+
* timezone). Thin domain wrapper over `groupItemsByDate` from the calendar
|
|
90223
|
+
* package; preserves the historical `Map<string, PublicEvent[]>` shape.
|
|
90224
|
+
*/
|
|
90225
|
+
function groupEventsByDate(events, calendarTimeZone) {
|
|
90226
|
+
const grouped = groupItemsByDate(events, {
|
|
90227
|
+
getStartsAt: (event) => event.startsAt,
|
|
90228
|
+
getTimeZone: () => calendarTimeZone
|
|
90229
|
+
});
|
|
90230
|
+
return new Map([...grouped].map(([dateKey, bucket]) => [dateKey, [...bucket]]));
|
|
90231
|
+
}
|
|
90232
|
+
/** Stable local-day identity shared by ledger continuations and day groups. */
|
|
90233
|
+
function eventLocalDateKey(event) {
|
|
90234
|
+
return getBookingLocalDateKey(toScheduledBookingDateTime({
|
|
90235
|
+
startsAt: event.startsAt,
|
|
90236
|
+
timeZone: resolveBookingBusinessTimeZone(event.timeZone),
|
|
90237
|
+
locale: "en-GB"
|
|
90238
|
+
}));
|
|
90239
|
+
}
|
|
90240
|
+
/** Full weekday and the existing zone-aware time range for a weekly running list. */
|
|
90241
|
+
function formatEventWeekdayTime(event) {
|
|
90242
|
+
const options = eventDateOptions(event);
|
|
90243
|
+
return `${formatDate$4({
|
|
90244
|
+
kind: "instant",
|
|
90245
|
+
value: toUtcIsoDateTimeString(event.startsAt)
|
|
90246
|
+
}, options, {
|
|
90247
|
+
date: "omit",
|
|
90248
|
+
weekday: "long",
|
|
90249
|
+
year: "omit"
|
|
90250
|
+
})} · ${formatEventTimeRange(event, options)}`;
|
|
90251
|
+
}
|
|
90252
|
+
//#endregion
|
|
90253
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/closedEarlyCopy.ts
|
|
90254
|
+
const isWeekly$1 = (event) => event.scheduleScope === "recurring";
|
|
90255
|
+
function eventTimeZone(event) {
|
|
90256
|
+
return eventDateOptions(event).timeZone;
|
|
90257
|
+
}
|
|
90258
|
+
/** On a date's own read both `path` and the destination name that date; its event's page is one level up. */
|
|
90259
|
+
function eventOwnPagePath(event) {
|
|
90260
|
+
const path = getPublicEventCanonicalPath(event);
|
|
90261
|
+
const dateSegment = `/${event.occurrenceId}`;
|
|
90262
|
+
return path?.endsWith(dateSegment) ? path.slice(0, -dateSegment.length) || "/" : path;
|
|
90263
|
+
}
|
|
90264
|
+
/** "Bookings close 2 hours before the start.", while they're still open. */
|
|
90265
|
+
function openBookingLine(event) {
|
|
90266
|
+
if (!event.bookingClosesAt) return null;
|
|
90267
|
+
const before = formatBookingCutOffHours(bookingCutOffHoursBetween(event.startsAt, event.bookingClosesAt));
|
|
90268
|
+
return isWeekly$1(event) ? `Bookings for each date close ${before} before the start.` : `Bookings close ${before} before the start.`;
|
|
90269
|
+
}
|
|
90270
|
+
/** The course's open line, counted from its first session still running. */
|
|
90271
|
+
function openRunBookingLine(run) {
|
|
90272
|
+
const first = orderedLiveRunSessions(run.sessions)[0];
|
|
90273
|
+
if (!run.bookingClosesAt || !first) return null;
|
|
90274
|
+
return `Bookings close ${formatBookingCutOffHours(bookingCutOffHoursBetween(first.startsAt, run.bookingClosesAt))} before the first session.`;
|
|
90275
|
+
}
|
|
90276
|
+
/** One date between its cut-off and its start, or null. */
|
|
90277
|
+
function closedDateCopy(event, now) {
|
|
90278
|
+
const closesAt = event.bookingClosesAt;
|
|
90279
|
+
if (!closesAt || !hasBookingClosed(closesAt, now) || Date.parse(event.startsAt) <= now.getTime()) return null;
|
|
90280
|
+
const zone = eventTimeZone(event);
|
|
90281
|
+
const closed = formatBookingClosedTime(closesAt, event.startsAt, zone);
|
|
90282
|
+
const start = formatBookingClosedTime(event.startsAt, event.startsAt, zone);
|
|
90283
|
+
const before = formatBookingCutOffHours(bookingCutOffHoursBetween(event.startsAt, closesAt));
|
|
90284
|
+
const weekly = isWeekly$1(event);
|
|
90285
|
+
return {
|
|
90286
|
+
titleText: weekly ? "Bookings for this date have closed" : "Bookings for this event have closed",
|
|
90287
|
+
bodyText: `Bookings closed at ${closed}, ${before} before the ${start} start. The organiser may still be able to help if you’d like to come.`,
|
|
90288
|
+
otherDatesHref: weekly ? eventOwnPagePath(event) : null
|
|
90289
|
+
};
|
|
90290
|
+
}
|
|
90291
|
+
/** The body of a course past its cut-off, or null if the run doesn't say when. */
|
|
90292
|
+
function closedRunBody(run) {
|
|
90293
|
+
const first = orderedLiveRunSessions(run.sessions)[0];
|
|
90294
|
+
if (!run.bookingClosesAt || !first) return null;
|
|
90295
|
+
return `Bookings closed at ${formatBookingClosedTime(run.bookingClosesAt, first.startsAt, first.timeZone)}, ${formatBookingCutOffHours(bookingCutOffHoursBetween(first.startsAt, run.bookingClosesAt))} before the first session. The organiser may still be able to help if you’d like to join.`;
|
|
90296
|
+
}
|
|
90297
|
+
//#endregion
|
|
89886
90298
|
//#region ../blocks/src/system/runtime/nodes/event-registration/closedRunCopy.ts
|
|
89887
90299
|
const copy = {
|
|
89888
90300
|
cancelled: {
|
|
@@ -89897,6 +90309,10 @@ const copy = {
|
|
|
89897
90309
|
titleText: "These dates have finished",
|
|
89898
90310
|
bodyText: "The details are kept here for reference."
|
|
89899
90311
|
},
|
|
90312
|
+
"bookings-closed": {
|
|
90313
|
+
titleText: "Bookings for these dates have closed",
|
|
90314
|
+
bodyText: "Bookings for these dates have closed. The organiser may still be able to help if you’d like to join."
|
|
90315
|
+
},
|
|
89900
90316
|
"enrolment-closed": {
|
|
89901
90317
|
titleText: "Booking closed",
|
|
89902
90318
|
bodyText: "Bookings are no longer being taken for these dates."
|
|
@@ -89906,8 +90322,27 @@ const copy = {
|
|
|
89906
90322
|
bodyText: "There are no dates to book at the moment. The organiser may add more, and anything already booked still stands."
|
|
89907
90323
|
}
|
|
89908
90324
|
};
|
|
89909
|
-
|
|
89910
|
-
|
|
90325
|
+
/** A run past its cut-off says when it closed, if it can. */
|
|
90326
|
+
function closedRunCopy(reason, run) {
|
|
90327
|
+
const body = reason === "bookings-closed" && run ? closedRunBody(run) : null;
|
|
90328
|
+
return body ? {
|
|
90329
|
+
...copy[reason],
|
|
90330
|
+
bodyText: body
|
|
90331
|
+
} : copy[reason];
|
|
90332
|
+
}
|
|
90333
|
+
/**
|
|
90334
|
+
* A list of dates closes once none is left to book and at least one stopped at
|
|
90335
|
+
* its cut-off. Until then the closed ones just leave the list. There's nothing
|
|
90336
|
+
* further to point at, so the copy offers no other dates.
|
|
90337
|
+
*/
|
|
90338
|
+
function closedDatesCopy(dates, now) {
|
|
90339
|
+
if (dates.some((date) => Date.parse(date.startsAt) > now.getTime() && !(date.bookingClosesAt && hasBookingClosed(date.bookingClosesAt, now)))) return null;
|
|
90340
|
+
const [firstClosed] = dates.flatMap((date) => closedDateCopy(date, now) ?? []);
|
|
90341
|
+
if (!firstClosed) return null;
|
|
90342
|
+
return {
|
|
90343
|
+
...dates.length > 1 ? copy["bookings-closed"] : firstClosed,
|
|
90344
|
+
otherDatesHref: null
|
|
90345
|
+
};
|
|
89911
90346
|
}
|
|
89912
90347
|
//#endregion
|
|
89913
90348
|
//#region ../blocks/src/system/runtime/shared/navigation/pageNavigation.ts
|
|
@@ -90126,11 +90561,11 @@ function formatBookingScheduleSummary(event) {
|
|
|
90126
90561
|
}
|
|
90127
90562
|
//#endregion
|
|
90128
90563
|
//#region ../blocks/src/system/runtime/nodes/events/domain/destination.ts
|
|
90129
|
-
function isRecord$
|
|
90564
|
+
function isRecord$20(value) {
|
|
90130
90565
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
90131
90566
|
}
|
|
90132
90567
|
function isRuntimeEventDestination(value) {
|
|
90133
|
-
if (!isRecord$
|
|
90568
|
+
if (!isRecord$20(value) || typeof value.kind !== "string") return false;
|
|
90134
90569
|
if (value.kind === "native") return (value.mode === "cms-managed" || value.mode === "system-managed") && typeof value.path === "string";
|
|
90135
90570
|
return value.kind === "external" && typeof value.url === "string" && typeof value.label === "string";
|
|
90136
90571
|
}
|
|
@@ -90280,9 +90715,15 @@ function occurrenceCardAvailability(event, count) {
|
|
|
90280
90715
|
status: availability.isFull ? "full" : availability.status === "filling" ? "low" : "available"
|
|
90281
90716
|
} : null;
|
|
90282
90717
|
}
|
|
90283
|
-
/** Preserve projected closure reasons; only an open native
|
|
90718
|
+
/** Preserve projected closure reasons; only an open native booking needs its clock rechecked. */
|
|
90284
90719
|
function renderClockClosedCta(event, now) {
|
|
90285
|
-
if (!now || event.
|
|
90720
|
+
if (!now || event.destination.kind !== "native") return null;
|
|
90721
|
+
if (event.bookingScope !== "whole_series") return hasEventBookingClosedEarly(event, now) ? {
|
|
90722
|
+
label: "Registration closed",
|
|
90723
|
+
href: resolveEventHref(event),
|
|
90724
|
+
external: false,
|
|
90725
|
+
hidden: true
|
|
90726
|
+
} : null;
|
|
90286
90727
|
const phase = resolveWholeSeriesBookingPhase(event.run, now);
|
|
90287
90728
|
if (phase.kind === "open") return null;
|
|
90288
90729
|
return {
|
|
@@ -90291,6 +90732,7 @@ function renderClockClosedCta(event, now) {
|
|
|
90291
90732
|
case "cancelled": return "Cancelled";
|
|
90292
90733
|
case "completed": return "Completed";
|
|
90293
90734
|
case "in-progress":
|
|
90735
|
+
case "bookings-closed":
|
|
90294
90736
|
case "enrolment-closed":
|
|
90295
90737
|
case "no-sessions": return "Registration closed";
|
|
90296
90738
|
default: return assertNever$9(phase.reason);
|
|
@@ -90298,202 +90740,10 @@ function renderClockClosedCta(event, now) {
|
|
|
90298
90740
|
})(),
|
|
90299
90741
|
href: resolveEventHref(event),
|
|
90300
90742
|
external: false,
|
|
90301
|
-
hidden: phase.reason !== "enrolment-closed"
|
|
90743
|
+
hidden: phase.reason !== "enrolment-closed" && phase.reason !== "bookings-closed"
|
|
90302
90744
|
};
|
|
90303
90745
|
}
|
|
90304
90746
|
//#endregion
|
|
90305
|
-
//#region ../blocks/src/system/runtime/nodes/events/domain/dates.ts
|
|
90306
|
-
/** Event presentation adapters; core owns projection, clocks and ranges. */
|
|
90307
|
-
function eventDateLocale(siteTimeZone) {
|
|
90308
|
-
return inferSiteDateLocale(siteTimeZone);
|
|
90309
|
-
}
|
|
90310
|
-
function eventCalendarWeekStart(timeZone, override) {
|
|
90311
|
-
return override ?? (inferSiteDateLocale(resolveBookingBusinessTimeZone(timeZone)) === "en-US" ? "sunday" : "monday");
|
|
90312
|
-
}
|
|
90313
|
-
/** Admit older wire zones once; the booking business fallback remains London. */
|
|
90314
|
-
function eventDateOptions(place) {
|
|
90315
|
-
const siteTimeZone = resolveBookingBusinessTimeZone(place.siteTimeZone);
|
|
90316
|
-
const resolved = resolveBookingDisplayContext({
|
|
90317
|
-
sessionTimeZone: resolveBookingTimeZoneId(place.timeZone, siteTimeZone),
|
|
90318
|
-
siteTimeZone,
|
|
90319
|
-
locale: inferSiteDateLocale(siteTimeZone),
|
|
90320
|
-
isOnline: place.isOnline === true || place.deliveryMode === "online" || place.deliveryMode === "hybrid",
|
|
90321
|
-
surface: "public"
|
|
90322
|
-
});
|
|
90323
|
-
return {
|
|
90324
|
-
...resolved.context,
|
|
90325
|
-
zone: resolved.zone
|
|
90326
|
-
};
|
|
90327
|
-
}
|
|
90328
|
-
/** Overnight spans keep their end day; folds retain both distinct offsets. */
|
|
90329
|
-
function formatEventTimeRange(times, options) {
|
|
90330
|
-
const start = toUtcIsoDateTimeString(times.startsAt);
|
|
90331
|
-
const end = toUtcIsoDateTimeString(times.endsAt);
|
|
90332
|
-
const startDay = getLocalScheduleDate(new Date(start), options.timeZone);
|
|
90333
|
-
const endDay = getLocalScheduleDate(new Date(end), options.timeZone);
|
|
90334
|
-
return startDay.year === endDay.year && startDay.month === endDay.month && startDay.day === endDay.day ? formatTimeRange(start, end, options, { zone: options.zone }) : formatDateTimeRange({
|
|
90335
|
-
start,
|
|
90336
|
-
end
|
|
90337
|
-
}, options, {
|
|
90338
|
-
date: "short",
|
|
90339
|
-
zone: options.zone
|
|
90340
|
-
});
|
|
90341
|
-
}
|
|
90342
|
-
function resolveEventTimeZone(event, calendarTimeZone) {
|
|
90343
|
-
return resolveBookingTimeZoneId(event.timeZone, resolveBookingBusinessTimeZone(calendarTimeZone));
|
|
90344
|
-
}
|
|
90345
|
-
function formatDate$2(isoTimestamp, options) {
|
|
90346
|
-
return formatDate$4({
|
|
90347
|
-
kind: "instant",
|
|
90348
|
-
value: toUtcIsoDateTimeString(isoTimestamp)
|
|
90349
|
-
}, options, {
|
|
90350
|
-
date: "short",
|
|
90351
|
-
weekday: "long"
|
|
90352
|
-
});
|
|
90353
|
-
}
|
|
90354
|
-
function formatTime$2(isoTimestamp, options) {
|
|
90355
|
-
return formatTime$3(toUtcIsoDateTimeString(isoTimestamp), options, { zone: options.zone });
|
|
90356
|
-
}
|
|
90357
|
-
function formatEventDateParts(args) {
|
|
90358
|
-
return {
|
|
90359
|
-
date: formatDate$2(args.startsAt, args),
|
|
90360
|
-
timeRange: formatEventTimeRange(args, args)
|
|
90361
|
-
};
|
|
90362
|
-
}
|
|
90363
|
-
/** A course run's first to last session date, such as `8–22 Sept 2026`. */
|
|
90364
|
-
function formatEventRunDates(first, last, options) {
|
|
90365
|
-
return formatDateRange({
|
|
90366
|
-
kind: "instant",
|
|
90367
|
-
value: toUtcIsoDateTimeString(first.startsAt)
|
|
90368
|
-
}, {
|
|
90369
|
-
kind: "instant",
|
|
90370
|
-
value: toUtcIsoDateTimeString(last.startsAt)
|
|
90371
|
-
}, options, {
|
|
90372
|
-
date: "short",
|
|
90373
|
-
order: "session"
|
|
90374
|
-
});
|
|
90375
|
-
}
|
|
90376
|
-
/** Civil calendar headings never acquire an instant's timezone shift. */
|
|
90377
|
-
function formatCalendarTitle(viewDate, view, days, timeZone) {
|
|
90378
|
-
const context = eventDateOptions({
|
|
90379
|
-
siteTimeZone: timeZone,
|
|
90380
|
-
timeZone
|
|
90381
|
-
});
|
|
90382
|
-
const first = days[0];
|
|
90383
|
-
const last = days[6];
|
|
90384
|
-
return view === "week" && first && last ? formatDateRange({
|
|
90385
|
-
kind: "civil",
|
|
90386
|
-
value: first
|
|
90387
|
-
}, {
|
|
90388
|
-
kind: "civil",
|
|
90389
|
-
value: last
|
|
90390
|
-
}, context, { date: "short" }) : formatDate$4({
|
|
90391
|
-
kind: "civil",
|
|
90392
|
-
value: viewDate
|
|
90393
|
-
}, context, {
|
|
90394
|
-
date: "long",
|
|
90395
|
-
day: "omit"
|
|
90396
|
-
});
|
|
90397
|
-
}
|
|
90398
|
-
function buildCalendarViewport(input) {
|
|
90399
|
-
const viewport = buildCalendarViewport$1(input);
|
|
90400
|
-
return {
|
|
90401
|
-
...viewport,
|
|
90402
|
-
title: formatCalendarTitle(input.anchorDate, input.view, viewport.days, input.timeZone)
|
|
90403
|
-
};
|
|
90404
|
-
}
|
|
90405
|
-
/** Tick digits are civil clock values, not session instants. */
|
|
90406
|
-
function formatEventHourLabel(hour, timeZone) {
|
|
90407
|
-
return formatEventClockLabel(`${String(hour % 24).padStart(2, "0")}:00`, eventDateLocale(timeZone));
|
|
90408
|
-
}
|
|
90409
|
-
/** Weekly cadence and tick clocks are civil values; UTC only carries their components. */
|
|
90410
|
-
function formatEventClockLabel(value, locale) {
|
|
90411
|
-
const clock = parseLocalScheduleTime(value);
|
|
90412
|
-
return formatTime$3(toUtcIsoDateTimeString(new Date(Date.UTC(2e3, 0, 1, clock.hour, clock.minute)).toISOString()), {
|
|
90413
|
-
locale,
|
|
90414
|
-
timeZone: resolveBookingBusinessTimeZone("UTC")
|
|
90415
|
-
}, { zone: "omit" });
|
|
90416
|
-
}
|
|
90417
|
-
function formatEventCompactDateRail(isoTimestamp, options, letterCase = "capitals") {
|
|
90418
|
-
const instant = {
|
|
90419
|
-
kind: "instant",
|
|
90420
|
-
value: toUtcIsoDateTimeString(isoTimestamp)
|
|
90421
|
-
};
|
|
90422
|
-
const cased = (value) => letterCase === "capitals" ? value.toLocaleUpperCase(options.locale) : value;
|
|
90423
|
-
return {
|
|
90424
|
-
weekday: cased(formatDate$4(instant, options, {
|
|
90425
|
-
date: "omit",
|
|
90426
|
-
weekday: "short",
|
|
90427
|
-
year: "omit"
|
|
90428
|
-
})),
|
|
90429
|
-
fullWeekday: formatDate$4(instant, options, {
|
|
90430
|
-
date: "omit",
|
|
90431
|
-
weekday: "long",
|
|
90432
|
-
year: "omit"
|
|
90433
|
-
}),
|
|
90434
|
-
day: formatDate$4(instant, options, {
|
|
90435
|
-
date: "omit",
|
|
90436
|
-
day: "numeric",
|
|
90437
|
-
year: "omit"
|
|
90438
|
-
}),
|
|
90439
|
-
month: cased(formatDate$4(instant, options, {
|
|
90440
|
-
date: "short",
|
|
90441
|
-
day: "omit",
|
|
90442
|
-
year: "omit"
|
|
90443
|
-
}).slice(0, 3)),
|
|
90444
|
-
label: formatDate$4(instant, options, {
|
|
90445
|
-
date: "long",
|
|
90446
|
-
weekday: "long"
|
|
90447
|
-
})
|
|
90448
|
-
};
|
|
90449
|
-
}
|
|
90450
|
-
/**
|
|
90451
|
-
* Format the next occurrence for the image-free catalogue card treatment.
|
|
90452
|
-
*
|
|
90453
|
-
* The compact rail already owns this short, booking-local date vocabulary;
|
|
90454
|
-
* keep the fact panel on the same date and timezone rules as event rows.
|
|
90455
|
-
*/
|
|
90456
|
-
function formatEventNextDateFact(event) {
|
|
90457
|
-
const rail = formatEventCompactDateRail(event.startsAt, eventDateOptions(event));
|
|
90458
|
-
return {
|
|
90459
|
-
dateTime: event.startsAt,
|
|
90460
|
-
value: `${rail.weekday} ${rail.day} ${rail.month}`,
|
|
90461
|
-
label: rail.label
|
|
90462
|
-
};
|
|
90463
|
-
}
|
|
90464
|
-
/**
|
|
90465
|
-
* Group events by their local date (YYYY-MM-DD key in each event's own
|
|
90466
|
-
* timezone). Thin domain wrapper over `groupItemsByDate` from the calendar
|
|
90467
|
-
* package; preserves the historical `Map<string, PublicEvent[]>` shape.
|
|
90468
|
-
*/
|
|
90469
|
-
function groupEventsByDate(events, calendarTimeZone) {
|
|
90470
|
-
const grouped = groupItemsByDate(events, {
|
|
90471
|
-
getStartsAt: (event) => event.startsAt,
|
|
90472
|
-
getTimeZone: () => calendarTimeZone
|
|
90473
|
-
});
|
|
90474
|
-
return new Map([...grouped].map(([dateKey, bucket]) => [dateKey, [...bucket]]));
|
|
90475
|
-
}
|
|
90476
|
-
/** Stable local-day identity shared by ledger continuations and day groups. */
|
|
90477
|
-
function eventLocalDateKey(event) {
|
|
90478
|
-
return getBookingLocalDateKey(toScheduledBookingDateTime({
|
|
90479
|
-
startsAt: event.startsAt,
|
|
90480
|
-
timeZone: resolveBookingBusinessTimeZone(event.timeZone),
|
|
90481
|
-
locale: "en-GB"
|
|
90482
|
-
}));
|
|
90483
|
-
}
|
|
90484
|
-
/** Full weekday and the existing zone-aware time range for a weekly running list. */
|
|
90485
|
-
function formatEventWeekdayTime(event) {
|
|
90486
|
-
const options = eventDateOptions(event);
|
|
90487
|
-
return `${formatDate$4({
|
|
90488
|
-
kind: "instant",
|
|
90489
|
-
value: toUtcIsoDateTimeString(event.startsAt)
|
|
90490
|
-
}, options, {
|
|
90491
|
-
date: "omit",
|
|
90492
|
-
weekday: "long",
|
|
90493
|
-
year: "omit"
|
|
90494
|
-
})} · ${formatEventTimeRange(event, options)}`;
|
|
90495
|
-
}
|
|
90496
|
-
//#endregion
|
|
90497
90747
|
//#region ../blocks/src/system/runtime/nodes/events/domain/duration.ts
|
|
90498
90748
|
function formatEventDuration(event, style = "legacy") {
|
|
90499
90749
|
const durationMinutes = Math.max(0, Math.round((Date.parse(event.endsAt) - Date.parse(event.startsAt)) / 6e4));
|
|
@@ -90535,8 +90785,8 @@ function formatEventTeacherLine(event) {
|
|
|
90535
90785
|
* Sorting before deduplication means a duplicate occurrence keeps its earliest
|
|
90536
90786
|
* deterministic representation.
|
|
90537
90787
|
*/
|
|
90538
|
-
function selectQuickDateEvents(events) {
|
|
90539
|
-
return orderedUniqueEventOccurrences(events.filter((event) => event.bookingScope !== "whole_series" && isBookableEvent(event))).slice(0, 4);
|
|
90788
|
+
function selectQuickDateEvents(events, now) {
|
|
90789
|
+
return orderedUniqueEventOccurrences(events.filter((event) => event.bookingScope !== "whole_series" && isBookableEvent(event, now))).slice(0, 4);
|
|
90540
90790
|
}
|
|
90541
90791
|
/** Shared ordering and identity selection, independent of booking capacity. */
|
|
90542
90792
|
function orderedUniqueEventOccurrences(events) {
|
|
@@ -92706,6 +92956,7 @@ function transformRegistrationOptionsResponse(response) {
|
|
|
92706
92956
|
const eventAcceptsMemberships = response.entitlements.requiresLoginForMemberships || eligibleMemberships.length > 0 || response.entitlements.availableForPurchase.memberships.length > 0;
|
|
92707
92957
|
const monetaryPaymentAvailable = hasMonetaryPaymentOption(response);
|
|
92708
92958
|
return {
|
|
92959
|
+
discountPreview: response.discountPreview,
|
|
92709
92960
|
availability: response.availability,
|
|
92710
92961
|
registration: response.registration,
|
|
92711
92962
|
paymentOptions: response.paymentOptions,
|
|
@@ -94168,6 +94419,7 @@ function bookingCalendar(event, outcome) {
|
|
|
94168
94419
|
function toRegistrationEvent(event) {
|
|
94169
94420
|
return {
|
|
94170
94421
|
...event,
|
|
94422
|
+
...bookingCloseLine(openBookingLine(event)),
|
|
94171
94423
|
selectionId: event.id,
|
|
94172
94424
|
registrationSubject: {
|
|
94173
94425
|
kind: "occurrence",
|
|
@@ -94175,6 +94427,9 @@ function toRegistrationEvent(event) {
|
|
|
94175
94427
|
}
|
|
94176
94428
|
};
|
|
94177
94429
|
}
|
|
94430
|
+
function bookingCloseLine(line) {
|
|
94431
|
+
return line ? { bookingCloseLine: line } : {};
|
|
94432
|
+
}
|
|
94178
94433
|
function toRegistrationEvents(events) {
|
|
94179
94434
|
return events.filter((event) => event.bookingScope === "single_occurrence").map(toRegistrationEvent);
|
|
94180
94435
|
}
|
|
@@ -94193,6 +94448,7 @@ function toWholeSeriesRegistrationEvent(group) {
|
|
|
94193
94448
|
const lastSession = sessions[sessions.length - 1] ?? firstSession;
|
|
94194
94449
|
return {
|
|
94195
94450
|
...representative,
|
|
94451
|
+
...bookingCloseLine(openRunBookingLine(run)),
|
|
94196
94452
|
selectionId: run.eventSeriesId,
|
|
94197
94453
|
registrationSubject: {
|
|
94198
94454
|
kind: "wholeSeries",
|
|
@@ -94862,6 +95118,11 @@ function resolveWaitlistClaimRestoration(input) {
|
|
|
94862
95118
|
message: "This waiting list invitation is for a different event. Please open the link in your invitation email."
|
|
94863
95119
|
};
|
|
94864
95120
|
}
|
|
95121
|
+
/** A place held on a run or date that's closed is still theirs, so it stays on the list they see. */
|
|
95122
|
+
function withOfferedEvent(choices, invitation) {
|
|
95123
|
+
const offered = invitation.kind === "ready" ? invitation.restoration.event : null;
|
|
95124
|
+
return offered && !choices.some((event) => event.selectionId === offered.selectionId) ? [offered, ...choices] : choices;
|
|
95125
|
+
}
|
|
94865
95126
|
//#endregion
|
|
94866
95127
|
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationBrowserDraft.ts
|
|
94867
95128
|
const browserDraftSteps = [
|
|
@@ -96967,7 +97228,7 @@ function inferLegacyOfferingsPreviewGroupOrder(overrides) {
|
|
|
96967
97228
|
return keys.length >= 2 ? keys : [];
|
|
96968
97229
|
}
|
|
96969
97230
|
function normalizeOfferingsPreviewContentForWrite(value) {
|
|
96970
|
-
if (!isRecord$
|
|
97231
|
+
if (!isRecord$19(value)) return null;
|
|
96971
97232
|
const groupOrderValue = value.groupOrder;
|
|
96972
97233
|
if (Array.isArray(groupOrderValue)) {
|
|
96973
97234
|
const normalized = normalizeOfferingsPreviewGroupOrder(groupOrderValue);
|
|
@@ -96980,7 +97241,7 @@ function normalizeOfferingsPreviewContentForWrite(value) {
|
|
|
96980
97241
|
...value,
|
|
96981
97242
|
groupOrder: []
|
|
96982
97243
|
};
|
|
96983
|
-
const legacyOrder = inferLegacyOfferingsPreviewGroupOrder(Array.isArray(value.groupOverrides) ? value.groupOverrides.filter(isRecord$
|
|
97244
|
+
const legacyOrder = inferLegacyOfferingsPreviewGroupOrder(Array.isArray(value.groupOverrides) ? value.groupOverrides.filter(isRecord$19) : []);
|
|
96984
97245
|
return legacyOrder.length > 0 ? {
|
|
96985
97246
|
...value,
|
|
96986
97247
|
groupOrder: legacyOrder
|
|
@@ -97119,7 +97380,7 @@ function uniqueOfferingsPreviewSourceKeys(values) {
|
|
|
97119
97380
|
}
|
|
97120
97381
|
return keys;
|
|
97121
97382
|
}
|
|
97122
|
-
function isRecord$
|
|
97383
|
+
function isRecord$19(value) {
|
|
97123
97384
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
97124
97385
|
}
|
|
97125
97386
|
function mergeOrderedKeysWithDefaults(orderedKeys, defaultKeys) {
|
|
@@ -97468,7 +97729,7 @@ function resolveEventRegistrationChoices(events, context, now) {
|
|
|
97468
97729
|
const runs = groupPublicEventsByRun(scoped);
|
|
97469
97730
|
if (context.occurrenceContext || context.subject?.kind === "eventSeries" && context.subject.bookingScope === "whole_series" || runs.length === 1 && scoped.every((event) => event.bookingScope === "whole_series")) return scoped;
|
|
97470
97731
|
const eligibleRunIds = new Set(runs.filter((group) => resolveWholeSeriesChooserEligibility(group, now).kind === "eligible").map((group) => group.eventSeriesId));
|
|
97471
|
-
return scoped.filter((event) => event.bookingScope === "whole_series" ? eligibleRunIds.has(event.seriesId) : Date.parse(event.startsAt) > now.getTime());
|
|
97732
|
+
return scoped.filter((event) => event.bookingScope === "whole_series" ? eligibleRunIds.has(event.seriesId) : Date.parse(event.startsAt) > now.getTime() && !hasEventBookingClosedEarly(event, now));
|
|
97472
97733
|
}
|
|
97473
97734
|
//#endregion
|
|
97474
97735
|
//#region ../blocks/src/system/runtime/nodes/shared/contract-schemas.ts
|
|
@@ -97673,7 +97934,7 @@ function closedRegistrationCopy(source, events) {
|
|
|
97673
97934
|
if (hasCancelledRegistrationDate(events, source.occurrenceContext?.id)) return cancelledDateCopy;
|
|
97674
97935
|
const selectedRun = resolveSelectedWholeSeriesRun(events);
|
|
97675
97936
|
const phase = selectedRun ? resolveWholeSeriesBookingPhase(selectedRun.run, new Date(source.now)) : null;
|
|
97676
|
-
return phase?.kind === "closed" ? closedRunCopy(phase.reason) : null;
|
|
97937
|
+
return phase?.kind === "closed" ? closedRunCopy(phase.reason, selectedRun?.run) : null;
|
|
97677
97938
|
}
|
|
97678
97939
|
function buildEventRegistrationShellStepLabels(source, scopedSourceEvents) {
|
|
97679
97940
|
const selectedRun = resolveSelectedWholeSeriesRun(scopedSourceEvents);
|
|
@@ -97771,13 +98032,13 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
97771
98032
|
}
|
|
97772
98033
|
});
|
|
97773
98034
|
function normalizeEventRegistrationEventInput(value) {
|
|
97774
|
-
if (!isRecord$
|
|
98035
|
+
if (!isRecord$18(value)) return value;
|
|
97775
98036
|
return {
|
|
97776
98037
|
...value,
|
|
97777
98038
|
destination: resolveRuntimeEventDestination(value)
|
|
97778
98039
|
};
|
|
97779
98040
|
}
|
|
97780
|
-
function isRecord$
|
|
98041
|
+
function isRecord$18(value) {
|
|
97781
98042
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
97782
98043
|
}
|
|
97783
98044
|
function buildEventRegistrationInteractiveIslandProps(props) {
|
|
@@ -101926,8 +102187,8 @@ function EventQuickDates({ events, pathname, buttonVariant = "primary", dateStyl
|
|
|
101926
102187
|
* Null when the date has no registration path (closed, paused, not open yet,
|
|
101927
102188
|
* no registration, or full with no waitlist), so no caller repeats that gate.
|
|
101928
102189
|
*/
|
|
101929
|
-
function eventDateBookingLink(event, pathname, dateLabel) {
|
|
101930
|
-
if (!isBookableEvent(event)) return null;
|
|
102190
|
+
function eventDateBookingLink(event, pathname, dateLabel, now) {
|
|
102191
|
+
if (!isBookableEvent(event, now)) return null;
|
|
101931
102192
|
const cta = resolveEventCta(event);
|
|
101932
102193
|
return {
|
|
101933
102194
|
href: resolveRuntimeEventDestination(event).kind === "external" ? cta.href : resolveDedicatedBookingHref(pathname, {
|
|
@@ -105252,7 +105513,7 @@ const groupOverrideSchema = z.object({
|
|
|
105252
105513
|
ctaLabel: z.string().nullish().catch(void 0)
|
|
105253
105514
|
});
|
|
105254
105515
|
function normalizeOfferingsPreviewGroupOverride(value) {
|
|
105255
|
-
if (!isRecord$
|
|
105516
|
+
if (!isRecord$17(value)) return [];
|
|
105256
105517
|
const parsed = groupOverrideSchema.parse(value);
|
|
105257
105518
|
return [Object.fromEntries(Object.entries(parsed).filter(([, field]) => field !== void 0))];
|
|
105258
105519
|
}
|
|
@@ -105267,7 +105528,7 @@ function normalizeSectionStylesContent(value) {
|
|
|
105267
105528
|
}
|
|
105268
105529
|
function normalizeBoxStylesContent(value) {
|
|
105269
105530
|
if (value === null) return null;
|
|
105270
|
-
if (!isRecord$
|
|
105531
|
+
if (!isRecord$17(value)) return void 0;
|
|
105271
105532
|
const { background: _background, ...rest } = value;
|
|
105272
105533
|
const background = parseBackgroundContent(value.background);
|
|
105273
105534
|
return {
|
|
@@ -105275,7 +105536,7 @@ function normalizeBoxStylesContent(value) {
|
|
|
105275
105536
|
...background ? { background } : {}
|
|
105276
105537
|
};
|
|
105277
105538
|
}
|
|
105278
|
-
function isRecord$
|
|
105539
|
+
function isRecord$17(value) {
|
|
105279
105540
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
105280
105541
|
}
|
|
105281
105542
|
const embedManifest = createBlockManifest({
|
|
@@ -111465,7 +111726,7 @@ function ensureSystemBlockDefinitionsRegistered() {
|
|
|
111465
111726
|
//#region ../blocks/src/system/registry.ts
|
|
111466
111727
|
function normalizeBlockContent(definition, content) {
|
|
111467
111728
|
const normalizer = definition?.contentNormalizer;
|
|
111468
|
-
if (!normalizer || !isRecord$
|
|
111729
|
+
if (!normalizer || !isRecord$24(content)) return content;
|
|
111469
111730
|
const normalized = normalizer.normalize(content);
|
|
111470
111731
|
const owned = new Set(normalizer.fieldIds);
|
|
111471
111732
|
return {
|
|
@@ -113693,7 +113954,7 @@ function carouselContents(props) {
|
|
|
113693
113954
|
//#region ../blocks/src/system/data/linkedContentEntries.ts
|
|
113694
113955
|
const LINKED_CONTENT_ENTRY_META_KEY = "__rbLinkedContentEntry";
|
|
113695
113956
|
function coerceLinkedContentEntriesPayload(payload) {
|
|
113696
|
-
if (!isRecord$
|
|
113957
|
+
if (!isRecord$16(payload)) return payload;
|
|
113697
113958
|
const response = payload;
|
|
113698
113959
|
if (!Array.isArray(response.entries)) return payload;
|
|
113699
113960
|
const contentType = parsePublicContentTypeMeta(response.contentType);
|
|
@@ -113701,7 +113962,7 @@ function coerceLinkedContentEntriesPayload(payload) {
|
|
|
113701
113962
|
return response.entries.map((entry) => enrichLinkedContentEntry(entry, contentType));
|
|
113702
113963
|
}
|
|
113703
113964
|
function getLinkedContentEntryMeta(value) {
|
|
113704
|
-
if (!isRecord$
|
|
113965
|
+
if (!isRecord$16(value)) return null;
|
|
113705
113966
|
const candidate = value[LINKED_CONTENT_ENTRY_META_KEY];
|
|
113706
113967
|
return isLinkedContentEntryMeta(candidate) ? {
|
|
113707
113968
|
...candidate,
|
|
@@ -113710,10 +113971,10 @@ function getLinkedContentEntryMeta(value) {
|
|
|
113710
113971
|
}
|
|
113711
113972
|
function buildLinkedContentEditTarget(input) {
|
|
113712
113973
|
const { entry, sourceBlockId, sourceBlockKind, itemIndex } = input;
|
|
113713
|
-
if (!isRecord$
|
|
113974
|
+
if (!isRecord$16(entry)) return null;
|
|
113714
113975
|
const meta = getLinkedContentEntryMeta(entry);
|
|
113715
113976
|
if (!meta || meta.support.kind !== "supported") return null;
|
|
113716
|
-
const content = isRecord$
|
|
113977
|
+
const content = isRecord$16(entry.content) ? entry.content : {};
|
|
113717
113978
|
return {
|
|
113718
113979
|
kind: "linked-content-entry",
|
|
113719
113980
|
entryId: meta.entryId,
|
|
@@ -113778,12 +114039,12 @@ function resolveLinkedEntryInlineFieldEligibility(input) {
|
|
|
113778
114039
|
};
|
|
113779
114040
|
}
|
|
113780
114041
|
function enrichLinkedContentEntry(entry, contentType) {
|
|
113781
|
-
if (!isRecord$
|
|
114042
|
+
if (!isRecord$16(entry)) return entry;
|
|
113782
114043
|
const entryId = typeof entry.id === "string" ? entry.id : null;
|
|
113783
114044
|
if (!entryId) return entry;
|
|
113784
114045
|
const title = typeof entry.title === "string" && entry.title.trim().length > 0 ? entry.title : entryId;
|
|
113785
114046
|
const optimisticHash = typeof entry.optimisticHash === "string" && entry.optimisticHash.length > 0 ? entry.optimisticHash : null;
|
|
113786
|
-
const content = isRecord$
|
|
114047
|
+
const content = isRecord$16(entry.content) ? entry.content : {};
|
|
113787
114048
|
const editRevision = typeof entry.editRevision === "number" ? entry.editRevision : null;
|
|
113788
114049
|
const meta = {
|
|
113789
114050
|
kind: "linked-content-entry",
|
|
@@ -113881,7 +114142,7 @@ function capitalize(value) {
|
|
|
113881
114142
|
return value.charAt(0).toUpperCase() + value.slice(1).toLowerCase();
|
|
113882
114143
|
}
|
|
113883
114144
|
function parsePublicContentTypeMeta(value) {
|
|
113884
|
-
if (!isRecord$
|
|
114145
|
+
if (!isRecord$16(value)) return null;
|
|
113885
114146
|
if (typeof value.key !== "string" || value.key.trim().length === 0) return null;
|
|
113886
114147
|
return {
|
|
113887
114148
|
key: value.key,
|
|
@@ -113891,7 +114152,7 @@ function parsePublicContentTypeMeta(value) {
|
|
|
113891
114152
|
};
|
|
113892
114153
|
}
|
|
113893
114154
|
function parsePublicContentTypeLinkedEntryEditing(value) {
|
|
113894
|
-
if (!isRecord$
|
|
114155
|
+
if (!isRecord$16(value) || typeof value.kind !== "string") return null;
|
|
113895
114156
|
switch (value.kind) {
|
|
113896
114157
|
case "generic": return { kind: "generic" };
|
|
113897
114158
|
case "unsupported-domain-backed": return {
|
|
@@ -113902,7 +114163,7 @@ function parsePublicContentTypeLinkedEntryEditing(value) {
|
|
|
113902
114163
|
}
|
|
113903
114164
|
}
|
|
113904
114165
|
function parsePublicContentTypeFieldMeta(value) {
|
|
113905
|
-
if (!isRecord$
|
|
114166
|
+
if (!isRecord$16(value)) return [];
|
|
113906
114167
|
if (typeof value.id !== "string" || typeof value.type !== "string") return [];
|
|
113907
114168
|
return [{
|
|
113908
114169
|
id: value.id,
|
|
@@ -113917,7 +114178,7 @@ function parseStringArray(value) {
|
|
|
113917
114178
|
return value.filter((item) => typeof item === "string");
|
|
113918
114179
|
}
|
|
113919
114180
|
function isLinkedContentEntryMeta(value) {
|
|
113920
|
-
if (!isRecord$
|
|
114181
|
+
if (!isRecord$16(value) || value.kind !== "linked-content-entry") return false;
|
|
113921
114182
|
return [
|
|
113922
114183
|
[
|
|
113923
114184
|
"entryId",
|
|
@@ -113927,7 +114188,7 @@ function isLinkedContentEntryMeta(value) {
|
|
|
113927
114188
|
].every((key) => typeof value[key] === "string"),
|
|
113928
114189
|
isNullOrOfType(value.optimisticHash, "string"),
|
|
113929
114190
|
value.editRevision === void 0 || isNullOrOfType(value.editRevision, "number"),
|
|
113930
|
-
isRecord$
|
|
114191
|
+
isRecord$16(value.contentType),
|
|
113931
114192
|
isLinkedEntryFieldSourceArray(value.fieldSources),
|
|
113932
114193
|
isLinkedContentEditSupport(value.support)
|
|
113933
114194
|
].every(Boolean);
|
|
@@ -113939,7 +114200,7 @@ function isLinkedEntryFieldSourceArray(value) {
|
|
|
113939
114200
|
return Array.isArray(value) && value.every(isLinkedEntryFieldSource);
|
|
113940
114201
|
}
|
|
113941
114202
|
function isLinkedEntryFieldSource(value) {
|
|
113942
|
-
if (!isRecord$
|
|
114203
|
+
if (!isRecord$16(value)) return false;
|
|
113943
114204
|
if (typeof value.displayPath !== "string") return false;
|
|
113944
114205
|
switch (value.kind) {
|
|
113945
114206
|
case "content-field": return typeof value.fieldPath === "string" && (value.fieldType === "text" || value.fieldType === "richText");
|
|
@@ -113960,7 +114221,7 @@ function isLinkedEntryInlineFieldReadOnlyReason(value) {
|
|
|
113960
114221
|
}
|
|
113961
114222
|
}
|
|
113962
114223
|
function isLinkedContentEditSupport(value) {
|
|
113963
|
-
if (!isRecord$
|
|
114224
|
+
if (!isRecord$16(value) || typeof value.kind !== "string") return false;
|
|
113964
114225
|
switch (value.kind) {
|
|
113965
114226
|
case "supported": return true;
|
|
113966
114227
|
case "unsupported-domain-backed":
|
|
@@ -113969,7 +114230,7 @@ function isLinkedContentEditSupport(value) {
|
|
|
113969
114230
|
default: return false;
|
|
113970
114231
|
}
|
|
113971
114232
|
}
|
|
113972
|
-
function isRecord$
|
|
114233
|
+
function isRecord$16(value) {
|
|
113973
114234
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
113974
114235
|
}
|
|
113975
114236
|
//#endregion
|
|
@@ -114074,11 +114335,11 @@ var UnsafePathSegmentError = class extends Error {
|
|
|
114074
114335
|
function assertSafePathSegments(segments) {
|
|
114075
114336
|
for (const segment of segments) if (typeof segment === "string" && UNSAFE_PATH_SEGMENTS.has(segment)) throw new UnsafePathSegmentError(segment);
|
|
114076
114337
|
}
|
|
114077
|
-
function isRecord$
|
|
114338
|
+
function isRecord$15(value) {
|
|
114078
114339
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
114079
114340
|
}
|
|
114080
114341
|
function isPathContainer(value) {
|
|
114081
|
-
return Array.isArray(value) || isRecord$
|
|
114342
|
+
return Array.isArray(value) || isRecord$15(value);
|
|
114082
114343
|
}
|
|
114083
114344
|
function createPathContainer(nextIsIndex) {
|
|
114084
114345
|
return nextIsIndex ? [] : {};
|
|
@@ -114135,7 +114396,7 @@ function withValueAtPath(target, path, value) {
|
|
|
114135
114396
|
const segments = parsePath(path);
|
|
114136
114397
|
if (segments.length === 0) return target;
|
|
114137
114398
|
const result = replacePathValue(target, segments, value);
|
|
114138
|
-
return isRecord$
|
|
114399
|
+
return isRecord$15(result) ? result : target;
|
|
114139
114400
|
}
|
|
114140
114401
|
function replacePathValue(current, segments, value) {
|
|
114141
114402
|
const [segment, ...rest] = segments;
|
|
@@ -116106,12 +116367,12 @@ function resolveBookingSiteId(siteId, form) {
|
|
|
116106
116367
|
return siteId || form?.siteId || "";
|
|
116107
116368
|
}
|
|
116108
116369
|
function normalizeBookingFormConfig(form) {
|
|
116109
|
-
if (!isRecord$
|
|
116370
|
+
if (!isRecord$14(form)) return null;
|
|
116110
116371
|
const id = readNonEmptyString(form.id);
|
|
116111
116372
|
const name = readNonEmptyString(form.name);
|
|
116112
116373
|
if (!id || !name) return null;
|
|
116113
|
-
const schemaSource = isRecord$
|
|
116114
|
-
const settingsSource = isRecord$
|
|
116374
|
+
const schemaSource = isRecord$14(form.schema) ? form.schema : isRecord$14(form.schemaJson) ? form.schemaJson : null;
|
|
116375
|
+
const settingsSource = isRecord$14(form.settings) ? form.settings : isRecord$14(form.settingsJson) ? form.settingsJson : null;
|
|
116115
116376
|
return {
|
|
116116
116377
|
id,
|
|
116117
116378
|
name,
|
|
@@ -116131,8 +116392,8 @@ function normalizeBookingServices(services) {
|
|
|
116131
116392
|
};
|
|
116132
116393
|
if (!services) return [];
|
|
116133
116394
|
if (Array.isArray(services)) return services.filter(isBookingFormService).map(normalizeService);
|
|
116134
|
-
if (isRecord$
|
|
116135
|
-
return isRecord$
|
|
116395
|
+
if (isRecord$14(services) && "services" in services) return Array.isArray(services.services) ? services.services.filter(isBookingFormService).map(normalizeService) : [];
|
|
116396
|
+
return isRecord$14(services) ? Object.values(services).filter(isBookingFormService).map(normalizeService) : [];
|
|
116136
116397
|
}
|
|
116137
116398
|
function normalizeBookingSchema(value) {
|
|
116138
116399
|
if (!value) return void 0;
|
|
@@ -116143,7 +116404,7 @@ function normalizeBookingSchema(value) {
|
|
|
116143
116404
|
};
|
|
116144
116405
|
}
|
|
116145
116406
|
function readBookingFormField(value) {
|
|
116146
|
-
if (!isRecord$
|
|
116407
|
+
if (!isRecord$14(value)) return null;
|
|
116147
116408
|
const id = readNonEmptyString(value.id);
|
|
116148
116409
|
const label = readNonEmptyString(value.label);
|
|
116149
116410
|
const type = readBookingFieldType(value.type);
|
|
@@ -116186,7 +116447,7 @@ function readBookingFieldOptions(value) {
|
|
|
116186
116447
|
return options.length > 0 ? options : void 0;
|
|
116187
116448
|
}
|
|
116188
116449
|
function readBookingFieldOption(value) {
|
|
116189
|
-
if (!isRecord$
|
|
116450
|
+
if (!isRecord$14(value)) return null;
|
|
116190
116451
|
const optionValue = readNonEmptyString(value.value);
|
|
116191
116452
|
const label = readNonEmptyString(value.label);
|
|
116192
116453
|
return optionValue && label ? {
|
|
@@ -116205,7 +116466,7 @@ function normalizeBookingSettings(value) {
|
|
|
116205
116466
|
};
|
|
116206
116467
|
}
|
|
116207
116468
|
function isBookingFormService(value) {
|
|
116208
|
-
return isRecord$
|
|
116469
|
+
return isRecord$14(value) && typeof value.id === "string" && typeof value.siteId === "string" && typeof value.title === "string" && (value.asksSiteTerms === void 0 || typeof value.asksSiteTerms === "boolean") && (value.consent === void 0 || blockBookingConsentSchema.safeParse(value.consent).success) && (value.bookingQuestions === void 0 || beforeBookingQuestionsPresentationSchema.safeParse(value.bookingQuestions).success);
|
|
116209
116470
|
}
|
|
116210
116471
|
function collectBookingCustomFields(data) {
|
|
116211
116472
|
return Object.fromEntries(Object.entries(data).filter(([key]) => !BOOKING_FORM_DATA_RESERVED_KEYS.has(key)));
|
|
@@ -116240,7 +116501,7 @@ function readStringArray(value) {
|
|
|
116240
116501
|
const strings = value.filter((item) => typeof item === "string");
|
|
116241
116502
|
return strings.length > 0 ? strings : void 0;
|
|
116242
116503
|
}
|
|
116243
|
-
function isRecord$
|
|
116504
|
+
function isRecord$14(value) {
|
|
116244
116505
|
return typeof value === "object" && value !== null;
|
|
116245
116506
|
}
|
|
116246
116507
|
function resolveDefaultBookingServiceId(formConfig, services) {
|
|
@@ -116564,11 +116825,11 @@ function resolveMissingBookingPaymentStep(input) {
|
|
|
116564
116825
|
}
|
|
116565
116826
|
//#endregion
|
|
116566
116827
|
//#region ../blocks/src/system/runtime/nodes/booking-form.service-categories.ts
|
|
116567
|
-
function isRecord$
|
|
116828
|
+
function isRecord$13(value) {
|
|
116568
116829
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
116569
116830
|
}
|
|
116570
116831
|
function readCategory(value) {
|
|
116571
|
-
if (!isRecord$
|
|
116832
|
+
if (!isRecord$13(value)) return [];
|
|
116572
116833
|
const { id, name, description } = value;
|
|
116573
116834
|
if (typeof id !== "string" || id.trim() === "" || typeof name !== "string") return [];
|
|
116574
116835
|
return [{
|
|
@@ -116584,7 +116845,7 @@ function readCategory(value) {
|
|
|
116584
116845
|
* it.
|
|
116585
116846
|
*/
|
|
116586
116847
|
function normalizeBookingServiceCategories(services) {
|
|
116587
|
-
if (!isRecord$
|
|
116848
|
+
if (!isRecord$13(services) || !Array.isArray(services.categories)) return [];
|
|
116588
116849
|
return services.categories.flatMap(readCategory);
|
|
116589
116850
|
}
|
|
116590
116851
|
//#endregion
|
|
@@ -117425,6 +117686,7 @@ function bookingClosedReason(reason) {
|
|
|
117425
117686
|
case "cancelled": return "These dates have been cancelled.";
|
|
117426
117687
|
case "in-progress": return "Bookings closed when the first session began.";
|
|
117427
117688
|
case "completed": return "These dates have finished.";
|
|
117689
|
+
case "bookings-closed":
|
|
117428
117690
|
case "enrolment-closed": return "Bookings for these dates have closed.";
|
|
117429
117691
|
case "no-sessions": return "No dates are currently scheduled.";
|
|
117430
117692
|
}
|
|
@@ -117711,40 +117973,8 @@ function withLookParts(props, arrangement) {
|
|
|
117711
117973
|
}
|
|
117712
117974
|
//#endregion
|
|
117713
117975
|
//#region ../blocks/src/system/runtime/nodes/event-details.server.tsx
|
|
117714
|
-
function eventDetailsIslandValue({ props, presentation, scopedEvents, subject }) {
|
|
117715
|
-
return {
|
|
117716
|
-
...props.arrangement ? {
|
|
117717
|
-
arrangement: props.arrangement,
|
|
117718
|
-
entryTitle: props.entryTitle,
|
|
117719
|
-
actionSize: props.actionSize,
|
|
117720
|
-
lookSlots: props.lookSlots,
|
|
117721
|
-
surfacePresentation: props.surfacePresentation,
|
|
117722
|
-
panelHeading: props.panelHeading
|
|
117723
|
-
} : {},
|
|
117724
|
-
quickFacts: props.quickFacts,
|
|
117725
|
-
occurrenceContext: props.occurrenceContext ?? null,
|
|
117726
|
-
subject,
|
|
117727
|
-
events: scopedEvents,
|
|
117728
|
-
venueDrawing: props.venueDrawing ?? null,
|
|
117729
|
-
showVenue: presentation.showVenue,
|
|
117730
|
-
showMap: presentation.showMap,
|
|
117731
|
-
showOtherDates: presentation.showOtherDates,
|
|
117732
|
-
otherDatesLimit: props.otherDatesLimit,
|
|
117733
|
-
showCost: presentation.showCost,
|
|
117734
|
-
showTitle: presentation.showTitle,
|
|
117735
|
-
showDescription: presentation.showDescription,
|
|
117736
|
-
showCapacity: presentation.showCapacity,
|
|
117737
|
-
showAcceptedPasses: presentation.showAcceptedPasses,
|
|
117738
|
-
showAcceptedMemberships: presentation.showAcceptedMemberships,
|
|
117739
|
-
sitePasses: props.sitePasses,
|
|
117740
|
-
siteMemberships: props.siteMemberships,
|
|
117741
|
-
autoApplyDiscount: presentation.autoApplyDiscount,
|
|
117742
|
-
className: props.className,
|
|
117743
|
-
now: props.now
|
|
117744
|
-
};
|
|
117745
|
-
}
|
|
117746
117976
|
function EventDetailsSSR(props) {
|
|
117747
|
-
const {
|
|
117977
|
+
const { occurrenceContext = null, subject, events = null, className, children } = props;
|
|
117748
117978
|
const normalizedSubject = normalizeEventRegistrationPageSurfaceSubject(subject);
|
|
117749
117979
|
const scopedEvents = events === null ? null : resolveEventRegistrationScopedEvents(events, {
|
|
117750
117980
|
occurrenceContext,
|
|
@@ -117756,19 +117986,9 @@ function EventDetailsSSR(props) {
|
|
|
117756
117986
|
occurrenceContext,
|
|
117757
117987
|
subject: normalizedSubject
|
|
117758
117988
|
});
|
|
117759
|
-
return /* @__PURE__ */ jsxs(
|
|
117760
|
-
|
|
117761
|
-
|
|
117762
|
-
attributes: {
|
|
117763
|
-
className: `event-details ${className ?? ""}`.trim(),
|
|
117764
|
-
"data-block": "event-details"
|
|
117765
|
-
},
|
|
117766
|
-
value: eventDetailsIslandValue({
|
|
117767
|
-
props,
|
|
117768
|
-
presentation,
|
|
117769
|
-
scopedEvents,
|
|
117770
|
-
subject: normalizedSubject
|
|
117771
|
-
}),
|
|
117989
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
117990
|
+
className: `event-details ${className ?? ""}`.trim(),
|
|
117991
|
+
"data-block": "event-details",
|
|
117772
117992
|
children: [/* @__PURE__ */ jsx(EventDetailsView, {
|
|
117773
117993
|
...presentation,
|
|
117774
117994
|
mapClassName: "venue-map event-details-map"
|
|
@@ -118096,12 +118316,12 @@ function cardsListDates(props) {
|
|
|
118096
118316
|
return props.lookSlots !== void 0 && props.datesMode === "next-dates";
|
|
118097
118317
|
}
|
|
118098
118318
|
/** One offering has room for a Book link on each date; several keep plain rows. */
|
|
118099
|
-
function catalogueDateBooking(shape, pathname) {
|
|
118100
|
-
return shape === "single" ? (event, dateLabel) => eventDateBookingLink(event, pathname ?? "/", dateLabel) : void 0;
|
|
118319
|
+
function catalogueDateBooking(shape, pathname, now) {
|
|
118320
|
+
return shape === "single" ? (event, dateLabel) => eventDateBookingLink(event, pathname ?? "/", dateLabel, now) : void 0;
|
|
118101
118321
|
}
|
|
118102
118322
|
function renderOfferingsCatalogueGroups({ props, groups, shape }) {
|
|
118103
118323
|
const enabledSeriesIds = new Set(groups.flatMap((load) => load.kind === "items" ? load.items.map((item) => item.kind === "event" ? item.event.seriesId : item.run.eventSeriesId) : []));
|
|
118104
|
-
const quickDateEvents = cardsListDates(props) ? [] : selectQuickDateEvents((props.quickDateEvents ?? []).filter((event) => enabledSeriesIds.has(event.seriesId)));
|
|
118324
|
+
const quickDateEvents = cardsListDates(props) ? [] : selectQuickDateEvents((props.quickDateEvents ?? []).filter((event) => enabledSeriesIds.has(event.seriesId)), props.now);
|
|
118105
118325
|
const populated = groups.flatMap(catalogueGroupItems);
|
|
118106
118326
|
const frames = listGroupFrames(props);
|
|
118107
118327
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -118164,7 +118384,7 @@ function renderCatalogueItems({ props, items, shape, groupTitle }) {
|
|
|
118164
118384
|
}
|
|
118165
118385
|
/** Dates are a display sample; the series card never infers availability from them. */
|
|
118166
118386
|
function catalogueDates(events, now, shape, pathname) {
|
|
118167
|
-
return offeringDatesBySeries(events, now, catalogueDateBooking(shape, pathname));
|
|
118387
|
+
return offeringDatesBySeries(events, now, catalogueDateBooking(shape, pathname, now));
|
|
118168
118388
|
}
|
|
118169
118389
|
function catalogueCardContent(item, now, dates, typeLabel) {
|
|
118170
118390
|
const event = item.kind === "event" ? item.event : item.run.representative;
|
|
@@ -120939,7 +121159,11 @@ function EventBookingPanelBody({ panel }) {
|
|
|
120939
121159
|
});
|
|
120940
121160
|
case "dropIn": return /* @__PURE__ */ jsx(DropInPanel, { panel: panel.panel });
|
|
120941
121161
|
case "bookingClosed": return /* @__PURE__ */ jsx(BookingClosedPanel, { detail: panel.detail });
|
|
120942
|
-
case "closedRun": return /* @__PURE__ */ jsx(ClosedRunPanel, {
|
|
121162
|
+
case "closedRun": return /* @__PURE__ */ jsx(ClosedRunPanel, { copy: closedRunCopy(panel.reason, panel.run) });
|
|
121163
|
+
case "closedDate": return /* @__PURE__ */ jsx(ClosedRunPanel, {
|
|
121164
|
+
copy: panel.copy,
|
|
121165
|
+
otherDatesHref: panel.copy.otherDatesHref
|
|
121166
|
+
});
|
|
120943
121167
|
case "single": return /* @__PURE__ */ jsx(SingleDateBooking, { run: panel.run });
|
|
120944
121168
|
case "choice": return /* @__PURE__ */ jsx(RunChooser, { runs: panel.runs });
|
|
120945
121169
|
case "unavailable": return /* @__PURE__ */ jsxs("div", {
|
|
@@ -121011,17 +121235,27 @@ function BookingClosedPanel({ detail }) {
|
|
|
121011
121235
|
});
|
|
121012
121236
|
}
|
|
121013
121237
|
/** Dates that cannot be booked keep their details and say why. */
|
|
121014
|
-
function ClosedRunPanel({
|
|
121015
|
-
const copy = closedRunCopy(reason);
|
|
121238
|
+
function ClosedRunPanel({ copy, otherDatesHref }) {
|
|
121016
121239
|
return /* @__PURE__ */ jsxs("div", {
|
|
121017
121240
|
className: "event-booking-panel__closed-run",
|
|
121018
|
-
children: [
|
|
121019
|
-
|
|
121020
|
-
|
|
121021
|
-
|
|
121022
|
-
|
|
121023
|
-
|
|
121024
|
-
|
|
121241
|
+
children: [
|
|
121242
|
+
/* @__PURE__ */ jsx("h2", {
|
|
121243
|
+
className: "card-title rb-mb-3",
|
|
121244
|
+
children: copy.titleText
|
|
121245
|
+
}),
|
|
121246
|
+
/* @__PURE__ */ jsx("p", {
|
|
121247
|
+
className: "status-muted rb-text-base rb-leading-relaxed",
|
|
121248
|
+
children: copy.bodyText
|
|
121249
|
+
}),
|
|
121250
|
+
otherDatesHref ? /* @__PURE__ */ jsx("p", {
|
|
121251
|
+
className: "rb-mt-4 rb-text-base",
|
|
121252
|
+
children: /* @__PURE__ */ jsx("a", {
|
|
121253
|
+
className: "rb-underline",
|
|
121254
|
+
href: otherDatesHref,
|
|
121255
|
+
children: "See the other dates"
|
|
121256
|
+
})
|
|
121257
|
+
}) : null
|
|
121258
|
+
]
|
|
121025
121259
|
});
|
|
121026
121260
|
}
|
|
121027
121261
|
/**
|
|
@@ -121155,40 +121389,53 @@ function planEventBookingPanel({ selection, subject }, now) {
|
|
|
121155
121389
|
...nonBookingPanel,
|
|
121156
121390
|
registration
|
|
121157
121391
|
};
|
|
121158
|
-
|
|
121159
|
-
|
|
121160
|
-
kind: "closedRun",
|
|
121161
|
-
reason: phase.reason,
|
|
121162
|
-
registration
|
|
121163
|
-
} : {
|
|
121164
|
-
kind: "registration",
|
|
121392
|
+
return {
|
|
121393
|
+
...closedDatePanel(selection, now) ?? closedRunPanel(selection, now) ?? { kind: "registration" },
|
|
121165
121394
|
registration
|
|
121166
121395
|
};
|
|
121167
121396
|
}
|
|
121168
121397
|
case "wholeSeriesParent": {
|
|
121398
|
+
const registration = parentRegistrationTarget(selection, subject);
|
|
121169
121399
|
if (nonBookingPanel) return {
|
|
121170
121400
|
...nonBookingPanel,
|
|
121171
|
-
registration
|
|
121401
|
+
registration
|
|
121172
121402
|
};
|
|
121173
121403
|
const panel = planWholeSeriesParentBooking(selection.eligibleRuns);
|
|
121174
121404
|
return panel.kind === "bookTogether" ? {
|
|
121175
121405
|
kind: "registration",
|
|
121176
|
-
registration
|
|
121177
|
-
events: panel.runs.map((run) => run.representative),
|
|
121178
|
-
subject,
|
|
121179
|
-
occurrenceContext: null
|
|
121180
|
-
}
|
|
121406
|
+
registration
|
|
121181
121407
|
} : {
|
|
121182
121408
|
...panel,
|
|
121183
|
-
registration
|
|
121409
|
+
registration
|
|
121184
121410
|
};
|
|
121185
121411
|
}
|
|
121186
121412
|
case "wholeSeriesParentUnavailable": return {
|
|
121187
121413
|
...nonBookingPanel ?? { kind: "unavailable" },
|
|
121188
|
-
registration:
|
|
121414
|
+
registration: parentRegistrationTarget(selection, subject)
|
|
121189
121415
|
};
|
|
121190
121416
|
}
|
|
121191
121417
|
}
|
|
121418
|
+
/**
|
|
121419
|
+
* A date past its cut-off, however old the page's data is. A list of dates only
|
|
121420
|
+
* closes when every date has: until then the closed ones just leave the list.
|
|
121421
|
+
*/
|
|
121422
|
+
function closedRunPanel(selection, now) {
|
|
121423
|
+
if (selection.kind !== "wholeSeriesRun") return null;
|
|
121424
|
+
const phase = resolveWholeSeriesBookingPhase(selection.run.run, now);
|
|
121425
|
+
return phase.kind === "closed" ? {
|
|
121426
|
+
kind: "closedRun",
|
|
121427
|
+
reason: phase.reason,
|
|
121428
|
+
run: selection.run.run
|
|
121429
|
+
} : null;
|
|
121430
|
+
}
|
|
121431
|
+
function closedDatePanel(selection, now) {
|
|
121432
|
+
if (selection.kind === "wholeSeriesRun") return null;
|
|
121433
|
+
const copy = selection.kind === "occurrence" ? closedDateCopy(selection.event, now) : closedDatesCopy(selection.dates, now);
|
|
121434
|
+
return copy ? {
|
|
121435
|
+
kind: "closedDate",
|
|
121436
|
+
copy
|
|
121437
|
+
} : null;
|
|
121438
|
+
}
|
|
121192
121439
|
/** Drop-in and page-level closure take precedence over fresh booking and run selection. */
|
|
121193
121440
|
function planNonBookingPanel(selection) {
|
|
121194
121441
|
if (!selectionRepresentativeEvent(selection).requiresRegistration) return {
|
|
@@ -121220,13 +121467,25 @@ function selectionRegistrationTarget(selection, subject) {
|
|
|
121220
121467
|
};
|
|
121221
121468
|
}
|
|
121222
121469
|
}
|
|
121470
|
+
/**
|
|
121471
|
+
* Every run the course page admits, not just those still taking bookings. An
|
|
121472
|
+
* invitation emailed for a run links here, and stays good after that run closes.
|
|
121473
|
+
* The wizard narrows these to the runs it offers for a new booking.
|
|
121474
|
+
*/
|
|
121475
|
+
function parentRegistrationTarget(selection, subject) {
|
|
121476
|
+
return {
|
|
121477
|
+
events: selection.admittedRuns.map((run) => run.representative),
|
|
121478
|
+
occurrenceContext: null,
|
|
121479
|
+
subject
|
|
121480
|
+
};
|
|
121481
|
+
}
|
|
121223
121482
|
/** Cancelled dates have no new-booking or recovery form, including old direct links. */
|
|
121224
121483
|
function isCancelledDateSelection(selection) {
|
|
121225
121484
|
return selection.kind === "occurrence" && hasCancelledRegistrationDate([selection.event]);
|
|
121226
121485
|
}
|
|
121227
121486
|
//#endregion
|
|
121228
121487
|
//#region ../blocks/src/system/runtime/nodes/event-registration/RegistrationClosedState.tsx
|
|
121229
|
-
function RegistrationClosedState({ title, body }) {
|
|
121488
|
+
function RegistrationClosedState({ title, body, otherDatesHref }) {
|
|
121230
121489
|
return /* @__PURE__ */ jsx("div", {
|
|
121231
121490
|
id: EVENT_REGISTRATION_ANCHOR_ID,
|
|
121232
121491
|
className: "rb-reg-surface er-container er-registration-closed",
|
|
@@ -121245,7 +121504,15 @@ function RegistrationClosedState({ title, body }) {
|
|
|
121245
121504
|
/* @__PURE__ */ jsx("p", {
|
|
121246
121505
|
className: "er-text er-text--muted",
|
|
121247
121506
|
children: body
|
|
121248
|
-
})
|
|
121507
|
+
}),
|
|
121508
|
+
otherDatesHref ? /* @__PURE__ */ jsx("p", {
|
|
121509
|
+
className: "er-text",
|
|
121510
|
+
children: /* @__PURE__ */ jsx("a", {
|
|
121511
|
+
className: "rb-underline",
|
|
121512
|
+
href: otherDatesHref,
|
|
121513
|
+
children: "See the other dates"
|
|
121514
|
+
})
|
|
121515
|
+
}) : null
|
|
121249
121516
|
] })
|
|
121250
121517
|
})
|
|
121251
121518
|
});
|
|
@@ -122572,14 +122839,14 @@ function isDecoratedHeadingBlockKind(blockKind) {
|
|
|
122572
122839
|
return blockKind === "block.intro" || blockKind === "block.feature-cards" || blockKind === "block.testimonials" || blockKind === "block.faq";
|
|
122573
122840
|
}
|
|
122574
122841
|
function readVariant(blockContent) {
|
|
122575
|
-
if (!isRecord$
|
|
122842
|
+
if (!isRecord$12(blockContent)) return void 0;
|
|
122576
122843
|
const variant = blockContent.variant;
|
|
122577
122844
|
return typeof variant === "string" ? variant : void 0;
|
|
122578
122845
|
}
|
|
122579
122846
|
function isFaqDecoratedVariant(variant) {
|
|
122580
122847
|
return variant === "default" || variant === "question-columns";
|
|
122581
122848
|
}
|
|
122582
|
-
function isRecord$
|
|
122849
|
+
function isRecord$12(value) {
|
|
122583
122850
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
122584
122851
|
}
|
|
122585
122852
|
function buildHeadingDecorationWrapperClassName(className) {
|
|
@@ -123674,11 +123941,11 @@ function readTreatment(kind, value) {
|
|
|
123674
123941
|
};
|
|
123675
123942
|
}
|
|
123676
123943
|
function readBlockComposition(value) {
|
|
123677
|
-
if (!isRecord$
|
|
123944
|
+
if (!isRecord$11(value) || typeof value.kind !== "string") return null;
|
|
123678
123945
|
if (!isCompositionKind(value.kind)) return null;
|
|
123679
123946
|
return readTreatment(value.kind, value.treatment);
|
|
123680
123947
|
}
|
|
123681
|
-
function isRecord$
|
|
123948
|
+
function isRecord$11(value) {
|
|
123682
123949
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
123683
123950
|
}
|
|
123684
123951
|
function arrangementHooksFromContent(content) {
|
|
@@ -125086,9 +125353,9 @@ function parseBackgroundOverrideFromContent(content) {
|
|
|
125086
125353
|
* Only the explicit owner marker can make a background a page-design override.
|
|
125087
125354
|
*/
|
|
125088
125355
|
function parseCanonicalSectionBackground(content) {
|
|
125089
|
-
const background = (isRecord$
|
|
125356
|
+
const background = (isRecord$10(content._sectionStyles) ? content._sectionStyles : null)?.background;
|
|
125090
125357
|
if (background === null || background === void 0) return { kind: "none" };
|
|
125091
|
-
if (isRecord$
|
|
125358
|
+
if (isRecord$10(background) && background.contentOwner === "page-design-editor") return {
|
|
125092
125359
|
kind: "page-design-override",
|
|
125093
125360
|
parsed: parseBackgroundOverride(background)
|
|
125094
125361
|
};
|
|
@@ -125149,7 +125416,7 @@ function parseBackgroundOverride(value) {
|
|
|
125149
125416
|
kind: "supported",
|
|
125150
125417
|
override: DEFAULT_BACKGROUND_OVERRIDE
|
|
125151
125418
|
};
|
|
125152
|
-
if (!isRecord$
|
|
125419
|
+
if (!isRecord$10(value)) return {
|
|
125153
125420
|
kind: "unsupported",
|
|
125154
125421
|
reason: "unsupported-shape",
|
|
125155
125422
|
background: {}
|
|
@@ -125188,7 +125455,7 @@ function parseBackgroundOverride(value) {
|
|
|
125188
125455
|
}
|
|
125189
125456
|
}
|
|
125190
125457
|
function applyBackgroundOverrideContentPatch(content, override) {
|
|
125191
|
-
const sectionStyles = isRecord$
|
|
125458
|
+
const sectionStyles = isRecord$10(content._sectionStyles) ? content._sectionStyles : {};
|
|
125192
125459
|
const serialized = serializeBackgroundOverride(override);
|
|
125193
125460
|
if (serialized === null) return withSectionStyles(content, omitRecordKey$1(sectionStyles, "background"));
|
|
125194
125461
|
return withSectionStyles(content, {
|
|
@@ -125408,7 +125675,7 @@ function imageAllowed(identifier, pool) {
|
|
|
125408
125675
|
return pool?.some((item) => item.reference.identifier === identifier) ?? false;
|
|
125409
125676
|
}
|
|
125410
125677
|
function parseImageReference(value) {
|
|
125411
|
-
if (!isRecord$
|
|
125678
|
+
if (!isRecord$10(value) || value.identifier === void 0 || value.identifier === null) return { kind: "missing" };
|
|
125412
125679
|
if (value.type !== void 0 && value.type !== "image") return { kind: "invalid" };
|
|
125413
125680
|
const parsed = imageMediaSchema.safeParse({
|
|
125414
125681
|
...value,
|
|
@@ -125451,7 +125718,7 @@ function withSectionStyles(content, sectionStyles) {
|
|
|
125451
125718
|
function omitRecordKey$1(content, key) {
|
|
125452
125719
|
return Object.fromEntries(Object.entries(content).filter(([entryKey]) => entryKey !== key));
|
|
125453
125720
|
}
|
|
125454
|
-
function isRecord$
|
|
125721
|
+
function isRecord$10(value) {
|
|
125455
125722
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
125456
125723
|
}
|
|
125457
125724
|
//#endregion
|
|
@@ -126318,7 +126585,7 @@ function ensureFieldValue(field, raw, ctx) {
|
|
|
126318
126585
|
return (Array.isArray(value) ? value : []).map((item) => ensureRepeaterItem(field, item, ctx));
|
|
126319
126586
|
}
|
|
126320
126587
|
function ensureRepeaterItem(field, value, ctx) {
|
|
126321
|
-
const itemData = isRecord$
|
|
126588
|
+
const itemData = isRecord$29(value) ? value : {};
|
|
126322
126589
|
const itemType = typeof itemData._type === "string" ? itemData._type : Object.keys(field.itemTypes ?? {})[0] ?? "";
|
|
126323
126590
|
const fields = field.polymorphic ? field.itemTypes[itemType]?.fields ?? [] : getRepeaterChildFields(field);
|
|
126324
126591
|
return {
|
|
@@ -128343,9 +128610,9 @@ function isBlockSaveable(saveability) {
|
|
|
128343
128610
|
/** The payload a block save sends: its values, unwrapped from a `data` envelope if present. */
|
|
128344
128611
|
function blockSaveData(values) {
|
|
128345
128612
|
const record = values ?? {};
|
|
128346
|
-
return isRecord$
|
|
128613
|
+
return isRecord$9(record.data) ? record.data : record;
|
|
128347
128614
|
}
|
|
128348
|
-
function isRecord$
|
|
128615
|
+
function isRecord$9(value) {
|
|
128349
128616
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
128350
128617
|
}
|
|
128351
128618
|
//#endregion
|
|
@@ -130381,7 +130648,8 @@ function viewModeButton(variant) {
|
|
|
130381
130648
|
case "lost-with-unsaved": return DISCARD_AND_VIEW;
|
|
130382
130649
|
case "your-other-tab":
|
|
130383
130650
|
case "another-user":
|
|
130384
|
-
case "unreachable":
|
|
130651
|
+
case "unreachable":
|
|
130652
|
+
case "refused": return KEEP_VIEWING;
|
|
130385
130653
|
}
|
|
130386
130654
|
}
|
|
130387
130655
|
function sentenceStart(text) {
|
|
@@ -130412,8 +130680,38 @@ function heldElsewhereNotice(holder, thing, unsaved) {
|
|
|
130412
130680
|
}]
|
|
130413
130681
|
};
|
|
130414
130682
|
}
|
|
130683
|
+
function refusalCopy(refusal, thing) {
|
|
130684
|
+
switch (refusal) {
|
|
130685
|
+
case "forbidden": return {
|
|
130686
|
+
title: `You can't edit ${thing}`,
|
|
130687
|
+
body: "Your access to this site might have changed. Reload the page to check, and if you still can't edit, ask the site's owner or contact support."
|
|
130688
|
+
};
|
|
130689
|
+
case "not-found": return {
|
|
130690
|
+
title: `We can't open ${thing} for editing`,
|
|
130691
|
+
body: "It might have been deleted, or something might be wrong with how it's set up. Reload the page to check, and if it's still there, contact support."
|
|
130692
|
+
};
|
|
130693
|
+
case "invalid":
|
|
130694
|
+
case "required": return {
|
|
130695
|
+
title: `We can't open ${thing} for editing right now`,
|
|
130696
|
+
body: "Reload the page, and if it keeps happening, contact support."
|
|
130697
|
+
};
|
|
130698
|
+
}
|
|
130699
|
+
}
|
|
130700
|
+
function refusedNotice(refusal, thing, unsaved) {
|
|
130701
|
+
const { title, body } = refusalCopy(refusal, thing);
|
|
130702
|
+
return {
|
|
130703
|
+
variant: "refused",
|
|
130704
|
+
title,
|
|
130705
|
+
body: unsaved ? `${body} Anything you haven't saved yet might be lost.` : body,
|
|
130706
|
+
buttons: [{
|
|
130707
|
+
action: "reload",
|
|
130708
|
+
label: "Reload"
|
|
130709
|
+
}]
|
|
130710
|
+
};
|
|
130711
|
+
}
|
|
130415
130712
|
function readOnlyNotice(editability, thing, unsaved) {
|
|
130416
130713
|
if (editability.reason === "held-elsewhere") return heldElsewhereNotice(editability.holder, thing, unsaved);
|
|
130714
|
+
if (editability.reason === "refused") return refusedNotice(editability.refusal, thing, unsaved);
|
|
130417
130715
|
return {
|
|
130418
130716
|
variant: "unreachable",
|
|
130419
130717
|
title: "Editing is temporarily unavailable",
|
|
@@ -131065,6 +131363,153 @@ Object.values(BINDING_TRANSFORMS);
|
|
|
131065
131363
|
/** View-mode preview controls: above a site's floating bars, below its modal panel. */
|
|
131066
131364
|
const PREVIEW_CHROME_Z_INDEX = 13e3;
|
|
131067
131365
|
//#endregion
|
|
131366
|
+
//#region ../api/src/pageReadResponseCache.ts
|
|
131367
|
+
var CacheProbeMiss = class extends Error {};
|
|
131368
|
+
/** Next has no response-dependent fetch TTL. Only the matching policy may store a page read. */
|
|
131369
|
+
var UncachedPageRead = class extends Error {
|
|
131370
|
+
constructor(snapshot) {
|
|
131371
|
+
super("Page read belongs to another cache policy");
|
|
131372
|
+
this.snapshot = snapshot;
|
|
131373
|
+
}
|
|
131374
|
+
};
|
|
131375
|
+
function isRecord$8(value) {
|
|
131376
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
131377
|
+
}
|
|
131378
|
+
function isResolvedPage(page) {
|
|
131379
|
+
return page?.kind === "resolved" && typeof page.requestedPath === "string" && (page.dependencies === "content" || page.dependencies === "availability") && isRecord$8(page.result) && [
|
|
131380
|
+
"cms",
|
|
131381
|
+
"system_event",
|
|
131382
|
+
"system_service"
|
|
131383
|
+
].includes(String(page.result.kind));
|
|
131384
|
+
}
|
|
131385
|
+
function envelopePage(body) {
|
|
131386
|
+
const data = isRecord$8(body) && body.success === true && isRecord$8(body.data) ? body.data : null;
|
|
131387
|
+
return data?.type === "content" && isRecord$8(data.content) ? data.content : data;
|
|
131388
|
+
}
|
|
131389
|
+
function admit(snapshot) {
|
|
131390
|
+
try {
|
|
131391
|
+
const page = envelopePage(JSON.parse(snapshot.body));
|
|
131392
|
+
if (snapshot.status === 200 && isResolvedPage(page)) return {
|
|
131393
|
+
resolved: true,
|
|
131394
|
+
dependencies: page.dependencies
|
|
131395
|
+
};
|
|
131396
|
+
} catch {}
|
|
131397
|
+
return {
|
|
131398
|
+
resolved: false,
|
|
131399
|
+
dependencies: snapshot.status === 200 || snapshot.headers.some(([key, value]) => key === "x-riverbank-page-dependencies" && value === "availability") ? "availability" : "content"
|
|
131400
|
+
};
|
|
131401
|
+
}
|
|
131402
|
+
/** A scoped transport read is shared with Next's background refresh, never across requests. */
|
|
131403
|
+
function liveResponse(read) {
|
|
131404
|
+
const pending = /* @__PURE__ */ new Map();
|
|
131405
|
+
return () => {
|
|
131406
|
+
const existing = pending.get("response");
|
|
131407
|
+
if (existing) return existing;
|
|
131408
|
+
const response = read().then(async (value) => ({
|
|
131409
|
+
body: await value.text(),
|
|
131410
|
+
status: value.status,
|
|
131411
|
+
headers: [...value.headers.entries()],
|
|
131412
|
+
cachedAt: Date.now()
|
|
131413
|
+
}));
|
|
131414
|
+
pending.set("response", response);
|
|
131415
|
+
return response;
|
|
131416
|
+
};
|
|
131417
|
+
}
|
|
131418
|
+
/** Neutral probes do not register a policy; the chosen entry is then checked with its real tags. */
|
|
131419
|
+
async function readPolicy(input, probe = false) {
|
|
131420
|
+
const policy = buildPageReadCachePolicy(input.siteId, input.dependency);
|
|
131421
|
+
const revalidate = Math.min(policy.revalidate, input.maxAge ?? policy.revalidate);
|
|
131422
|
+
const snapshot = await input.cache(async () => {
|
|
131423
|
+
const snapshot = await input.read();
|
|
131424
|
+
const admission = admit(snapshot);
|
|
131425
|
+
if (!admission.resolved || admission.dependencies !== input.dependency) throw new UncachedPageRead(snapshot);
|
|
131426
|
+
return snapshot;
|
|
131427
|
+
}, [
|
|
131428
|
+
"page-read-envelope-v2",
|
|
131429
|
+
input.key,
|
|
131430
|
+
input.dependency
|
|
131431
|
+
], probe ? {
|
|
131432
|
+
revalidate: false,
|
|
131433
|
+
tags: []
|
|
131434
|
+
} : {
|
|
131435
|
+
...policy,
|
|
131436
|
+
revalidate
|
|
131437
|
+
})();
|
|
131438
|
+
if (Date.now() - snapshot.cachedAt < revalidate * 1e3) return snapshot;
|
|
131439
|
+
return probe ? null : input.read();
|
|
131440
|
+
}
|
|
131441
|
+
async function probePolicy(input) {
|
|
131442
|
+
return readPolicy({
|
|
131443
|
+
...input,
|
|
131444
|
+
read: async () => {
|
|
131445
|
+
throw new CacheProbeMiss();
|
|
131446
|
+
}
|
|
131447
|
+
}, true).catch((error) => {
|
|
131448
|
+
if (error instanceof CacheProbeMiss) return null;
|
|
131449
|
+
throw error;
|
|
131450
|
+
});
|
|
131451
|
+
}
|
|
131452
|
+
/** Read in a framework cache scope, but never store an unclassified or failed response. */
|
|
131453
|
+
async function readInCacheScope(cache, key, read) {
|
|
131454
|
+
try {
|
|
131455
|
+
return await cache(async () => {
|
|
131456
|
+
throw new UncachedPageRead(await read());
|
|
131457
|
+
}, ["page-read-live-v2", key], {
|
|
131458
|
+
revalidate: false,
|
|
131459
|
+
tags: []
|
|
131460
|
+
})();
|
|
131461
|
+
} catch (error) {
|
|
131462
|
+
if (error instanceof UncachedPageRead) return error.snapshot;
|
|
131463
|
+
throw error;
|
|
131464
|
+
}
|
|
131465
|
+
}
|
|
131466
|
+
async function selectResponse(input) {
|
|
131467
|
+
const candidate = await probePolicy({
|
|
131468
|
+
...input,
|
|
131469
|
+
dependency: "content"
|
|
131470
|
+
}) ?? await probePolicy({
|
|
131471
|
+
...input,
|
|
131472
|
+
dependency: "availability"
|
|
131473
|
+
});
|
|
131474
|
+
if (candidate) try {
|
|
131475
|
+
const checked = await readPolicy({
|
|
131476
|
+
...input,
|
|
131477
|
+
dependency: admit(candidate).dependencies
|
|
131478
|
+
});
|
|
131479
|
+
if (checked) return checked;
|
|
131480
|
+
} catch (error) {
|
|
131481
|
+
if (error instanceof UncachedPageRead) return storeResponse(input, error.snapshot);
|
|
131482
|
+
throw error;
|
|
131483
|
+
}
|
|
131484
|
+
return storeResponse(input, await readInCacheScope(input.cache, input.key, input.read));
|
|
131485
|
+
}
|
|
131486
|
+
async function storeResponse(input, snapshot) {
|
|
131487
|
+
const admission = admit(snapshot);
|
|
131488
|
+
try {
|
|
131489
|
+
return await readPolicy({
|
|
131490
|
+
...input,
|
|
131491
|
+
key: admission.resolved ? input.key : `${input.key}:refusal:${snapshot.status}`,
|
|
131492
|
+
dependency: admission.dependencies,
|
|
131493
|
+
read: async () => snapshot
|
|
131494
|
+
}) ?? snapshot;
|
|
131495
|
+
} catch (error) {
|
|
131496
|
+
if (error instanceof UncachedPageRead) return error.snapshot;
|
|
131497
|
+
throw error;
|
|
131498
|
+
}
|
|
131499
|
+
}
|
|
131500
|
+
async function cachePageReadResponse(input) {
|
|
131501
|
+
if (!input.cache) return input.read();
|
|
131502
|
+
const result = await selectResponse({
|
|
131503
|
+
...input,
|
|
131504
|
+
cache: input.cache,
|
|
131505
|
+
read: liveResponse(input.read)
|
|
131506
|
+
});
|
|
131507
|
+
return new Response(result.body, {
|
|
131508
|
+
status: result.status,
|
|
131509
|
+
headers: result.headers
|
|
131510
|
+
});
|
|
131511
|
+
}
|
|
131512
|
+
//#endregion
|
|
131068
131513
|
//#region ../api/src/request-error.ts
|
|
131069
131514
|
var ApiRequestError = class extends Error {
|
|
131070
131515
|
constructor(message, options) {
|
|
@@ -131392,19 +131837,6 @@ function resolveApiBaseUrl() {
|
|
|
131392
131837
|
}
|
|
131393
131838
|
//#endregion
|
|
131394
131839
|
//#region ../api/src/request.ts
|
|
131395
|
-
let revalidateTag = null;
|
|
131396
|
-
let revalidateTagResolved = false;
|
|
131397
|
-
function getRevalidateTag() {
|
|
131398
|
-
if (revalidateTagResolved) return revalidateTag;
|
|
131399
|
-
revalidateTagResolved = true;
|
|
131400
|
-
if (typeof window !== "undefined") return null;
|
|
131401
|
-
try {
|
|
131402
|
-
revalidateTag = new Function("modulePath", "return require(modulePath)")("next/cache").revalidateTag ?? null;
|
|
131403
|
-
} catch {
|
|
131404
|
-
revalidateTag = null;
|
|
131405
|
-
}
|
|
131406
|
-
return revalidateTag;
|
|
131407
|
-
}
|
|
131408
131840
|
/**
|
|
131409
131841
|
* Generate a UUID, with fallback for environments where crypto.randomUUID isn't available.
|
|
131410
131842
|
*/
|
|
@@ -131493,8 +131925,8 @@ function serializePathParam(endpoint, key, value) {
|
|
|
131493
131925
|
if (typeof value === "string") return value;
|
|
131494
131926
|
throw new Error(`Invalid path param for endpoint ${String(endpoint)}: ${key} must be a string`);
|
|
131495
131927
|
}
|
|
131496
|
-
function invalidateCacheTags(tags, params) {
|
|
131497
|
-
const resolved =
|
|
131928
|
+
function invalidateCacheTags(adapter, tags, params) {
|
|
131929
|
+
const resolved = adapter?.invalidateTag;
|
|
131498
131930
|
if (typeof window !== "undefined" || !resolved || !tags) return;
|
|
131499
131931
|
tags.forEach((tag) => {
|
|
131500
131932
|
let processedTag = tag;
|
|
@@ -131502,7 +131934,7 @@ function invalidateCacheTags(tags, params) {
|
|
|
131502
131934
|
processedTag = processedTag.replace(`{${key}}`, String(value));
|
|
131503
131935
|
});
|
|
131504
131936
|
try {
|
|
131505
|
-
resolved(processedTag
|
|
131937
|
+
resolved(processedTag);
|
|
131506
131938
|
} catch {}
|
|
131507
131939
|
});
|
|
131508
131940
|
}
|
|
@@ -131595,7 +132027,7 @@ function successJsonEnvelope(parsed, requestId) {
|
|
|
131595
132027
|
if (parsed && typeof parsed === "object" && "success" in parsed && typeof parsed.success === "boolean") return parsed;
|
|
131596
132028
|
return buildSuccessEnvelope(coerceResponse(parsed), requestId);
|
|
131597
132029
|
}
|
|
131598
|
-
function createApiResponseTransport(getHeaders = () => ({}), baseUrl, { sdkVersion } = {}) {
|
|
132030
|
+
function createApiResponseTransport(getHeaders = () => ({}), baseUrl, { sdkVersion, frameworkCache } = {}) {
|
|
131599
132031
|
return ({ endpoint, body, params, options = {} }) => {
|
|
131600
132032
|
const plan = buildApiRequestPlan({
|
|
131601
132033
|
endpoint,
|
|
@@ -131609,14 +132041,31 @@ function createApiResponseTransport(getHeaders = () => ({}), baseUrl, { sdkVersi
|
|
|
131609
132041
|
baseUrl: normalizeCmsApiBaseUrl(baseUrl ?? resolveApiBaseUrl()),
|
|
131610
132042
|
sdkVersion
|
|
131611
132043
|
});
|
|
131612
|
-
const fetchPromise =
|
|
132044
|
+
const fetchPromise = executeApiRequest(plan, endpoint, params, options, frameworkCache);
|
|
131613
132045
|
if (plan.cacheInvalidationTags) return fetchPromise.then((response) => {
|
|
131614
|
-
if (response.ok) invalidateCacheTags(plan.cacheInvalidationTags, params);
|
|
132046
|
+
if (response.ok) invalidateCacheTags(frameworkCache, plan.cacheInvalidationTags, params);
|
|
131615
132047
|
return response;
|
|
131616
132048
|
});
|
|
131617
132049
|
return fetchPromise;
|
|
131618
132050
|
};
|
|
131619
132051
|
}
|
|
132052
|
+
function isPublishedPageRead(endpoint, params, options) {
|
|
132053
|
+
return (endpoint === "getContentByPath" || endpoint === "resolveRouteOutcome") && params?.preview !== true && params?.preview !== "true" && options.cache !== "no-store";
|
|
132054
|
+
}
|
|
132055
|
+
function executeApiRequest(plan, endpoint, params, options, frameworkCache) {
|
|
132056
|
+
const inputParams = params;
|
|
132057
|
+
const { next: fetchPolicy, ...uncachedInit } = plan.init;
|
|
132058
|
+
return isPublishedPageRead(endpoint, inputParams, options) ? cachePageReadResponse({
|
|
132059
|
+
cache: frameworkCache?.cache ?? null,
|
|
132060
|
+
key: JSON.stringify([plan.url, [...new Headers(plan.init.headers).entries()]]),
|
|
132061
|
+
siteId: typeof inputParams?.siteId === "string" ? inputParams.siteId : "",
|
|
132062
|
+
maxAge: typeof fetchPolicy?.revalidate === "number" ? fetchPolicy.revalidate : void 0,
|
|
132063
|
+
read: () => fetch(plan.url, {
|
|
132064
|
+
...uncachedInit,
|
|
132065
|
+
cache: "no-store"
|
|
132066
|
+
})
|
|
132067
|
+
}) : fetch(plan.url, plan.init);
|
|
132068
|
+
}
|
|
131620
132069
|
const batchReadPolicyBodySchema = z.object({ requests: z.array(z.object({
|
|
131621
132070
|
endpoint: z.string(),
|
|
131622
132071
|
params: z.record(z.string(), z.unknown()).optional()
|
|
@@ -131650,10 +132099,12 @@ function batchReadRequestOptions(params, body, options) {
|
|
|
131650
132099
|
function publicReadRequestOptions(endpoint, params, body, options) {
|
|
131651
132100
|
if (endpoint === "batchBlockLoaders") return batchReadRequestOptions(params, body, options);
|
|
131652
132101
|
const preview = params?.preview === true || params?.preview === "true";
|
|
131653
|
-
|
|
132102
|
+
if (endpoint !== "getContentByPath" && endpoint !== "resolveRouteOutcome") return options;
|
|
132103
|
+
if (preview) return {
|
|
131654
132104
|
...options,
|
|
131655
132105
|
cache: "no-store"
|
|
131656
|
-
}
|
|
132106
|
+
};
|
|
132107
|
+
return options;
|
|
131657
132108
|
}
|
|
131658
132109
|
function assertResolvedEndpointPath(endpoint, url) {
|
|
131659
132110
|
const tokens = [...url.match(/\{[^}]+\}/g) ?? [], ...url.match(/(^|\/):([A-Za-z][A-Za-z0-9_]*)\b/g) ?? []];
|
|
@@ -137757,99 +138208,24 @@ async function requestManualPreview(input) {
|
|
|
137757
138208
|
const initialDiscountCodeUiState = {
|
|
137758
138209
|
discountUiOpen: false,
|
|
137759
138210
|
discountCode: "",
|
|
137760
|
-
discountCodeRestored: false
|
|
137761
|
-
|
|
137762
|
-
};
|
|
137763
|
-
function getDiscountContextKey(context) {
|
|
137764
|
-
if (!context) return "disabled";
|
|
137765
|
-
switch (context.type) {
|
|
137766
|
-
case "event": return [
|
|
137767
|
-
context.type,
|
|
137768
|
-
context.eventSeriesId,
|
|
137769
|
-
context.eventCategoryId ?? "",
|
|
137770
|
-
context.ticketsCount ?? ""
|
|
137771
|
-
].join(":");
|
|
137772
|
-
case "appointment": return [context.type, context.serviceId].join(":");
|
|
137773
|
-
case "whole_series": return [context.type, context.eventSeriesId].join(":");
|
|
137774
|
-
case "pass": return [context.type, context.passId].join(":");
|
|
137775
|
-
case "membership": return [context.type, context.membershipId].join(":");
|
|
137776
|
-
case "product": return [
|
|
137777
|
-
context.type,
|
|
137778
|
-
context.productId,
|
|
137779
|
-
context.productCategoryId ?? ""
|
|
137780
|
-
].join(":");
|
|
137781
|
-
}
|
|
137782
|
-
}
|
|
137783
|
-
function buildDiscountAvailabilityRequestPlan(options) {
|
|
137784
|
-
if (!options.discountContext) return {
|
|
137785
|
-
ok: false,
|
|
137786
|
-
key: "disabled"
|
|
137787
|
-
};
|
|
137788
|
-
const subtotalCents = options.subtotalCents;
|
|
137789
|
-
return {
|
|
137790
|
-
ok: true,
|
|
137791
|
-
key: [getDiscountContextKey(options.discountContext), subtotalCents ?? ""].join("|"),
|
|
137792
|
-
request: {
|
|
137793
|
-
context: options.discountContext,
|
|
137794
|
-
...subtotalCents !== void 0 ? { subtotalCents } : {}
|
|
137795
|
-
}
|
|
137796
|
-
};
|
|
137797
|
-
}
|
|
137798
|
-
function discountAvailabilityStateFromResponse(requestKey, response) {
|
|
137799
|
-
if (!discountAvailabilityHasDiscounts(response)) return {
|
|
137800
|
-
tag: "unavailable",
|
|
137801
|
-
requestKey
|
|
137802
|
-
};
|
|
137803
|
-
return {
|
|
137804
|
-
tag: "available",
|
|
137805
|
-
requestKey,
|
|
137806
|
-
manualCodeEntryAllowed: discountAvailabilityAllowsManualEntry(response),
|
|
137807
|
-
autoAppliedDiscount: getAutoAppliedDiscountPreview(response)
|
|
137808
|
-
};
|
|
137809
|
-
}
|
|
137810
|
-
/** When codes can't be entered a typed code goes, but a restored one stays until the server has refused it. */
|
|
137811
|
-
function withoutManualEntry(state, availability) {
|
|
137812
|
-
return state.discountCodeRestored ? {
|
|
137813
|
-
...state,
|
|
137814
|
-
availability
|
|
137815
|
-
} : {
|
|
137816
|
-
...state,
|
|
137817
|
-
discountUiOpen: false,
|
|
137818
|
-
discountCode: "",
|
|
137819
|
-
availability
|
|
137820
|
-
};
|
|
137821
|
-
}
|
|
138211
|
+
discountCodeRestored: false
|
|
138212
|
+
};
|
|
137822
138213
|
function discountCodeUiReducer(state, event) {
|
|
137823
138214
|
switch (event.type) {
|
|
137824
|
-
case "
|
|
137825
|
-
case "availability-loading": return {
|
|
138215
|
+
case "manual-entry-unavailable": return state.discountCodeRestored ? state : {
|
|
137826
138216
|
...state,
|
|
137827
|
-
|
|
137828
|
-
|
|
137829
|
-
previous: state.availability.tag === "available" || state.availability.tag === "unavailable" ? state.availability : state.availability.tag === "loading" ? state.availability.previous : null
|
|
137830
|
-
}
|
|
138217
|
+
discountCode: "",
|
|
138218
|
+
discountUiOpen: false
|
|
137831
138219
|
};
|
|
137832
|
-
case "availability-loaded": {
|
|
137833
|
-
const availability = discountAvailabilityStateFromResponse(event.requestKey, event.response);
|
|
137834
|
-
if (availability.tag !== "available" || !availability.manualCodeEntryAllowed) return withoutManualEntry(state, availability);
|
|
137835
|
-
return {
|
|
137836
|
-
...state,
|
|
137837
|
-
availability
|
|
137838
|
-
};
|
|
137839
|
-
}
|
|
137840
|
-
case "availability-failed": return withoutManualEntry(state, {
|
|
137841
|
-
tag: "error",
|
|
137842
|
-
requestKey: event.requestKey
|
|
137843
|
-
});
|
|
137844
138220
|
case "discount-code-changed": return {
|
|
137845
138221
|
...state,
|
|
137846
138222
|
discountCode: event.code,
|
|
137847
|
-
discountCodeRestored: event.code.trim()
|
|
138223
|
+
discountCodeRestored: Boolean(event.code.trim()) && state.discountCodeRestored
|
|
137848
138224
|
};
|
|
137849
138225
|
case "discount-code-restored": return {
|
|
137850
138226
|
...state,
|
|
137851
|
-
discountUiOpen: true,
|
|
137852
138227
|
discountCode: event.code,
|
|
138228
|
+
discountUiOpen: true,
|
|
137853
138229
|
discountCodeRestored: true
|
|
137854
138230
|
};
|
|
137855
138231
|
case "discount-ui-open-changed": return {
|
|
@@ -137860,55 +138236,95 @@ function discountCodeUiReducer(state, event) {
|
|
|
137860
138236
|
}
|
|
137861
138237
|
//#endregion
|
|
137862
138238
|
//#region ../blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.ts
|
|
137863
|
-
function
|
|
137864
|
-
const
|
|
137865
|
-
|
|
137866
|
-
|
|
137867
|
-
|
|
138239
|
+
function useStandaloneDiscountAvailability(api, context, scopeKey, subtotalCents) {
|
|
138240
|
+
const key = JSON.stringify([
|
|
138241
|
+
scopeKey,
|
|
138242
|
+
context,
|
|
138243
|
+
subtotalCents
|
|
138244
|
+
]);
|
|
138245
|
+
const [loaded, setLoaded] = useState(null);
|
|
138246
|
+
useEffect(() => {
|
|
138247
|
+
const lifetime = { current: true };
|
|
138248
|
+
if (context) api.getDiscountsAvailable({
|
|
138249
|
+
context,
|
|
138250
|
+
...subtotalCents === void 0 ? {} : { subtotalCents }
|
|
138251
|
+
}).then((response) => {
|
|
138252
|
+
if (lifetime.current) setLoaded({
|
|
138253
|
+
key,
|
|
138254
|
+
response
|
|
138255
|
+
});
|
|
138256
|
+
}, () => {
|
|
138257
|
+
if (lifetime.current) setLoaded({
|
|
138258
|
+
key,
|
|
138259
|
+
response: null
|
|
138260
|
+
});
|
|
138261
|
+
});
|
|
138262
|
+
return () => {
|
|
138263
|
+
lifetime.current = false;
|
|
138264
|
+
};
|
|
138265
|
+
}, [api, key]);
|
|
138266
|
+
return {
|
|
138267
|
+
response: context && loaded?.key === key ? loaded.response : null,
|
|
138268
|
+
loading: context !== null && loaded?.key !== key
|
|
138269
|
+
};
|
|
138270
|
+
}
|
|
138271
|
+
function standaloneDiscountContext(context) {
|
|
138272
|
+
return context?.type === "appointment" || context?.type === "pass" || context?.type === "membership" ? context : null;
|
|
138273
|
+
}
|
|
138274
|
+
function discountAvailabilityPlan(options) {
|
|
138275
|
+
const registration = "preview" in options ? options : null;
|
|
138276
|
+
const context = standaloneDiscountContext(options.discountContext);
|
|
138277
|
+
return {
|
|
138278
|
+
context,
|
|
138279
|
+
scopeKey: registration?.scopeKey ?? "",
|
|
138280
|
+
subtotalCents: "subtotalCents" in options ? options.subtotalCents : void 0,
|
|
138281
|
+
standalonePurchase: registration === null || context !== null
|
|
138282
|
+
};
|
|
138283
|
+
}
|
|
138284
|
+
function quotedRegistrationPreview(preview) {
|
|
138285
|
+
return preview?.kind === "quoted" ? preview : null;
|
|
138286
|
+
}
|
|
138287
|
+
function discountAvailabilityView(options, standalonePurchase, standalone) {
|
|
138288
|
+
if (standalonePurchase) return standaloneDiscountView(standalone);
|
|
138289
|
+
const registration = "preview" in options ? options : null;
|
|
138290
|
+
const quoted = quotedRegistrationPreview(registration?.preview);
|
|
138291
|
+
const manualCodeEntryAllowed = quoted?.manualCodeEntryAllowed ?? false;
|
|
138292
|
+
return {
|
|
138293
|
+
manualCodeEntryAllowed,
|
|
138294
|
+
discountsAvailable: manualCodeEntryAllowed || quoted?.automaticCode != null,
|
|
138295
|
+
autoAppliedDiscount: null,
|
|
138296
|
+
discountsAvailableLoading: registration?.loading ?? false
|
|
138297
|
+
};
|
|
138298
|
+
}
|
|
138299
|
+
function standaloneDiscountView(standalone) {
|
|
138300
|
+
const response = standalone.response;
|
|
138301
|
+
return {
|
|
138302
|
+
manualCodeEntryAllowed: response !== null && discountAvailabilityAllowsManualEntry(response),
|
|
138303
|
+
discountsAvailable: response !== null && discountAvailabilityHasDiscounts(response),
|
|
138304
|
+
autoAppliedDiscount: response ? getAutoAppliedDiscountPreview(response) : null,
|
|
138305
|
+
discountsAvailableLoading: standalone.loading
|
|
138306
|
+
};
|
|
137868
138307
|
}
|
|
137869
138308
|
function useDiscountCodeUi(options) {
|
|
137870
138309
|
const [state, dispatch] = useReducer(discountCodeUiReducer, initialDiscountCodeUiState);
|
|
137871
|
-
const
|
|
138310
|
+
const plan = discountAvailabilityPlan(options);
|
|
138311
|
+
const standalone = useStandaloneDiscountAvailability(options.api, plan.context, plan.scopeKey, plan.subtotalCents);
|
|
138312
|
+
const view = discountAvailabilityView(options, plan.standalonePurchase, standalone);
|
|
138313
|
+
const { manualCodeEntryAllowed } = view;
|
|
138314
|
+
const standalonePurchase = plan.standalonePurchase;
|
|
137872
138315
|
useEffect(() => {
|
|
137873
|
-
|
|
137874
|
-
|
|
137875
|
-
|
|
137876
|
-
|
|
137877
|
-
|
|
137878
|
-
|
|
137879
|
-
dispatch({ type: "availability-loading" });
|
|
137880
|
-
try {
|
|
137881
|
-
const res = await options.api.getDiscountsAvailable(requestPlan.request);
|
|
137882
|
-
if (cancelled) return;
|
|
137883
|
-
dispatch({
|
|
137884
|
-
type: "availability-loaded",
|
|
137885
|
-
requestKey: requestPlan.key,
|
|
137886
|
-
response: res
|
|
137887
|
-
});
|
|
137888
|
-
} catch {
|
|
137889
|
-
if (cancelled) return;
|
|
137890
|
-
dispatch({
|
|
137891
|
-
type: "availability-failed",
|
|
137892
|
-
requestKey: requestPlan.key
|
|
137893
|
-
});
|
|
137894
|
-
}
|
|
137895
|
-
}
|
|
137896
|
-
checkDiscountAvailability();
|
|
137897
|
-
return () => {
|
|
137898
|
-
cancelled = true;
|
|
137899
|
-
};
|
|
137900
|
-
}, [options.api, requestPlan]);
|
|
137901
|
-
const availability = state.availability;
|
|
137902
|
-
const settledAvailability = availability.tag === "loading" ? availability.previous : availability.tag === "available" || availability.tag === "unavailable" ? availability : null;
|
|
137903
|
-
const isAvailable = settledAvailability?.tag === "available";
|
|
137904
|
-
const manualCodeEntryAllowed = isAvailable ? settledAvailability.manualCodeEntryAllowed : false;
|
|
138316
|
+
if (standalonePurchase && !standalone.loading && !manualCodeEntryAllowed) dispatch({ type: "manual-entry-unavailable" });
|
|
138317
|
+
}, [
|
|
138318
|
+
standalonePurchase,
|
|
138319
|
+
standalone.loading,
|
|
138320
|
+
manualCodeEntryAllowed
|
|
138321
|
+
]);
|
|
137905
138322
|
return {
|
|
137906
|
-
|
|
138323
|
+
...state,
|
|
137907
138324
|
setDiscountUiOpen: (isOpen) => dispatch({
|
|
137908
138325
|
type: "discount-ui-open-changed",
|
|
137909
138326
|
isOpen
|
|
137910
138327
|
}),
|
|
137911
|
-
discountCode: state.discountCode,
|
|
137912
138328
|
setDiscountCode: (code) => dispatch({
|
|
137913
138329
|
type: "discount-code-changed",
|
|
137914
138330
|
code
|
|
@@ -137917,13 +138333,7 @@ function useDiscountCodeUi(options) {
|
|
|
137917
138333
|
type: "discount-code-restored",
|
|
137918
138334
|
code
|
|
137919
138335
|
}),
|
|
137920
|
-
|
|
137921
|
-
discountsAvailable: isAvailable,
|
|
137922
|
-
manualCodeEntryAllowed,
|
|
137923
|
-
autoAppliedDiscount: isAvailable ? settledAvailability.autoAppliedDiscount : null,
|
|
137924
|
-
discountsAvailableLoading: availability.tag === "loading",
|
|
137925
|
-
discountAvailabilityRequestKey: requestPlan.key,
|
|
137926
|
-
settledDiscountAvailabilityRequestKey: availability.tag === "error" ? availability.requestKey : settledAvailability?.requestKey ?? null
|
|
138336
|
+
...view
|
|
137927
138337
|
};
|
|
137928
138338
|
}
|
|
137929
138339
|
//#endregion
|
|
@@ -139631,8 +140041,9 @@ function BookingMailingListChoice({ booking }) {
|
|
|
139631
140041
|
//#endregion
|
|
139632
140042
|
//#region ../blocks/src/system/runtime/shared/utils/demoPortalMagicLink.ts
|
|
139633
140043
|
const CUSTOMER_PORTAL_PATH = "/portal";
|
|
139634
|
-
|
|
139635
|
-
|
|
140044
|
+
const PORTAL_CALLBACK_PATH = "/api/portal/callback";
|
|
140045
|
+
function buildPortalCallbackUrl(origin, redirectTo) {
|
|
140046
|
+
const url = new URL(PORTAL_CALLBACK_PATH, origin);
|
|
139636
140047
|
url.searchParams.set("redirect_to", redirectTo);
|
|
139637
140048
|
return url.toString();
|
|
139638
140049
|
}
|
|
@@ -141587,20 +141998,128 @@ function registrationAdmissionSurface(input) {
|
|
|
141587
141998
|
default: return assertNever$3(input.availability);
|
|
141588
141999
|
}
|
|
141589
142000
|
}
|
|
141590
|
-
/** Resolve the host guard once
|
|
142001
|
+
/** Resolve the host guard once. Bookings closing is the wizard's to decide: it owns the step. */
|
|
141591
142002
|
function resolveEventRegistrationClientSurface(input) {
|
|
141592
|
-
if (input.recoveryRequest !== "none") return
|
|
142003
|
+
if (input.recoveryRequest !== "none") return "wizard";
|
|
141593
142004
|
switch (input.plan.kind) {
|
|
141594
|
-
case "wholeSeries":
|
|
142005
|
+
case "wholeSeries":
|
|
142006
|
+
case "occurrence": return "wizard";
|
|
141595
142007
|
case "unavailableWholeSeries":
|
|
141596
|
-
case "mixedBookingScopes": return
|
|
141597
|
-
case "occurrence": return input.pastStartsAt ? {
|
|
141598
|
-
kind: "past",
|
|
141599
|
-
startsAt: input.pastStartsAt
|
|
141600
|
-
} : { kind: "wizard" };
|
|
142008
|
+
case "mixedBookingScopes": return "unavailable";
|
|
141601
142009
|
default: return assertNever$3(input.plan);
|
|
141602
142010
|
}
|
|
141603
142011
|
}
|
|
142012
|
+
function isPastOccurrence(startsAt, now) {
|
|
142013
|
+
if (!startsAt) return false;
|
|
142014
|
+
const startsAtTime = Date.parse(startsAt);
|
|
142015
|
+
if (!Number.isFinite(startsAtTime)) return false;
|
|
142016
|
+
return startsAtTime <= Date.parse(now);
|
|
142017
|
+
}
|
|
142018
|
+
/** Whether someone on this step hasn't been admitted yet, so closing stops them. */
|
|
142019
|
+
function stepStartsNewBooking(step) {
|
|
142020
|
+
switch (step) {
|
|
142021
|
+
case "select-event":
|
|
142022
|
+
case "select-tickets":
|
|
142023
|
+
case "enter-details":
|
|
142024
|
+
case "select-payment": return true;
|
|
142025
|
+
case "submitting":
|
|
142026
|
+
case "payment":
|
|
142027
|
+
case "verifying-payment":
|
|
142028
|
+
case "verifying-timeout":
|
|
142029
|
+
case "payment-status":
|
|
142030
|
+
case "payment-failed":
|
|
142031
|
+
case "error":
|
|
142032
|
+
case "success": return false;
|
|
142033
|
+
default: return assertNever$3(step);
|
|
142034
|
+
}
|
|
142035
|
+
}
|
|
142036
|
+
const FRESH_BOOKING_OPEN = { kind: "open" };
|
|
142037
|
+
/**
|
|
142038
|
+
* Whether this page has stopped taking new bookings, by the clock: a date's page
|
|
142039
|
+
* when that date closes or starts, a course run's when the run closes, and a page
|
|
142040
|
+
* with several to choose from when none of them is left.
|
|
142041
|
+
*
|
|
142042
|
+
* Closing only stops someone starting: a person with a checkout under way, a
|
|
142043
|
+
* confirmation on screen, a place held for them or a payment to come back to
|
|
142044
|
+
* keeps it, whenever the date closes or starts around them.
|
|
142045
|
+
*/
|
|
142046
|
+
function resolveFreshBookingClosure(input) {
|
|
142047
|
+
if (input.holdsPlace || input.recoveryRequest !== "none" || !stepStartsNewBooking(input.step)) return { kind: "underway" };
|
|
142048
|
+
const { events, occurrenceContext, subject } = input;
|
|
142049
|
+
const plan = planEventRegistrationSurface({
|
|
142050
|
+
events,
|
|
142051
|
+
occurrenceContext,
|
|
142052
|
+
subject
|
|
142053
|
+
});
|
|
142054
|
+
switch (plan.kind) {
|
|
142055
|
+
case "wholeSeries": return closedRunsClosure(plan.runs, new Date(input.now));
|
|
142056
|
+
case "occurrence": return occurrenceContext ? datePageClosure(events, occurrenceContext, input.now) : closedEarlyClosure(closedDatesCopy(plan.events, new Date(input.now)));
|
|
142057
|
+
case "unavailableWholeSeries":
|
|
142058
|
+
case "mixedBookingScopes": return FRESH_BOOKING_OPEN;
|
|
142059
|
+
default: return assertNever$3(plan);
|
|
142060
|
+
}
|
|
142061
|
+
}
|
|
142062
|
+
function closedEarlyClosure(copy) {
|
|
142063
|
+
return copy ? {
|
|
142064
|
+
kind: "closedEarly",
|
|
142065
|
+
copy
|
|
142066
|
+
} : FRESH_BOOKING_OPEN;
|
|
142067
|
+
}
|
|
142068
|
+
function datePageClosure(events, occurrenceContext, now) {
|
|
142069
|
+
const date = events.find((event) => event.occurrenceId === occurrenceContext.id);
|
|
142070
|
+
const copy = date ? closedDateCopy(date, new Date(now)) : null;
|
|
142071
|
+
if (copy) return {
|
|
142072
|
+
kind: "closedEarly",
|
|
142073
|
+
copy
|
|
142074
|
+
};
|
|
142075
|
+
return isPastOccurrence(occurrenceContext.startsAt, now) ? {
|
|
142076
|
+
kind: "started",
|
|
142077
|
+
startsAt: occurrenceContext.startsAt
|
|
142078
|
+
} : FRESH_BOOKING_OPEN;
|
|
142079
|
+
}
|
|
142080
|
+
/** One run speaks for itself; several say so together, since each closed at its own time. */
|
|
142081
|
+
function closedRunsClosure(runs, now) {
|
|
142082
|
+
const closed = runs.flatMap(({ run }) => {
|
|
142083
|
+
const phase = resolveWholeSeriesBookingPhase(run, now);
|
|
142084
|
+
return phase.kind === "closed" ? [{
|
|
142085
|
+
run,
|
|
142086
|
+
reason: phase.reason
|
|
142087
|
+
}] : [];
|
|
142088
|
+
});
|
|
142089
|
+
const [first] = closed;
|
|
142090
|
+
if (!first || closed.length < runs.length) return FRESH_BOOKING_OPEN;
|
|
142091
|
+
return {
|
|
142092
|
+
kind: "closedEarly",
|
|
142093
|
+
copy: {
|
|
142094
|
+
...closed.length === 1 ? closedRunCopy(first.reason, first.run) : closedRunCopy("bookings-closed"),
|
|
142095
|
+
otherDatesHref: null
|
|
142096
|
+
}
|
|
142097
|
+
};
|
|
142098
|
+
}
|
|
142099
|
+
/**
|
|
142100
|
+
* The moment that decision next changes while the page stays open. With several
|
|
142101
|
+
* to choose from that's when the last of them closes: the chooser's own clock
|
|
142102
|
+
* takes each one off the list before then.
|
|
142103
|
+
*/
|
|
142104
|
+
function nextFreshBookingBoundary(events, occurrenceContext, subject) {
|
|
142105
|
+
const plan = planEventRegistrationSurface({
|
|
142106
|
+
events,
|
|
142107
|
+
occurrenceContext,
|
|
142108
|
+
subject
|
|
142109
|
+
});
|
|
142110
|
+
switch (plan.kind) {
|
|
142111
|
+
case "wholeSeries": return latestInstant(plan.runs.map(({ run }) => run.bookingClosesAt ?? orderedLiveRunSessions(run.sessions)[0]?.startsAt));
|
|
142112
|
+
case "occurrence":
|
|
142113
|
+
if (!occurrenceContext) return latestInstant(plan.events.map((date) => date.bookingClosesAt ?? date.startsAt));
|
|
142114
|
+
return events.find((event) => event.occurrenceId === occurrenceContext.id)?.bookingClosesAt ?? occurrenceContext.startsAt;
|
|
142115
|
+
case "unavailableWholeSeries":
|
|
142116
|
+
case "mixedBookingScopes": return null;
|
|
142117
|
+
default: return assertNever$3(plan);
|
|
142118
|
+
}
|
|
142119
|
+
}
|
|
142120
|
+
function latestInstant(instants) {
|
|
142121
|
+
return instants.reduce((latest, instant) => instant && (latest === null || Date.parse(instant) > Date.parse(latest)) ? instant : latest, null);
|
|
142122
|
+
}
|
|
141604
142123
|
/**
|
|
141605
142124
|
* Whether a run agrees with the offering whose page it arrived on.
|
|
141606
142125
|
*
|
|
@@ -141686,7 +142205,7 @@ const NO_REDUCTION = {
|
|
|
141686
142205
|
function decideSingleBookingPrices(input) {
|
|
141687
142206
|
const { context, quote } = input;
|
|
141688
142207
|
if (input.several || !context) return NO_REDUCTION;
|
|
141689
|
-
if (context.type === "event") return eventPrices(input, quote);
|
|
142208
|
+
if (context.type === "event" || context.type === "whole_series") return eventPrices(input, quote);
|
|
141690
142209
|
if (!quote) return NO_REDUCTION;
|
|
141691
142210
|
if (context.type === "pass") return {
|
|
141692
142211
|
...NO_REDUCTION,
|
|
@@ -141702,12 +142221,16 @@ function eventPrices(input, quote) {
|
|
|
141702
142221
|
...NO_REDUCTION,
|
|
141703
142222
|
automaticDiscount: input.advertisedAutomatic
|
|
141704
142223
|
};
|
|
141705
|
-
if (quote.preview.type !== "applied") return
|
|
142224
|
+
if (quote.preview.type !== "applied") return {
|
|
142225
|
+
...NO_REDUCTION,
|
|
142226
|
+
bookingTotalCents: quote.preview.totalAfterDiscountCents
|
|
142227
|
+
};
|
|
141706
142228
|
return quote.source === "typed" ? {
|
|
141707
142229
|
...NO_REDUCTION,
|
|
141708
142230
|
bookingTotalCents: quote.preview.totalAfterDiscountCents
|
|
141709
142231
|
} : {
|
|
141710
142232
|
...NO_REDUCTION,
|
|
142233
|
+
bookingTotalCents: quote.preview.totalAfterDiscountCents + quote.preview.discountCents,
|
|
141711
142234
|
automaticDiscount: automaticFromQuote(quote.preview, input.advertisedAutomatic)
|
|
141712
142235
|
};
|
|
141713
142236
|
}
|
|
@@ -142624,13 +143147,20 @@ function useEligibility(params) {
|
|
|
142624
143147
|
function eligibilityRequest(params) {
|
|
142625
143148
|
const selections = normalizeTicketSelectionLines(params.ticketSelections);
|
|
142626
143149
|
if (!params.enabled || !params.subject || selections.length === 0) return null;
|
|
143150
|
+
const email = parseParticipantEmail(params.buyerEmail);
|
|
142627
143151
|
return {
|
|
143152
|
+
buyer: email.ok ? {
|
|
143153
|
+
kind: "email",
|
|
143154
|
+
email: email.value
|
|
143155
|
+
} : { kind: "unknown" },
|
|
143156
|
+
purchaseTarget: params.purchaseTarget ?? "eventTickets",
|
|
142628
143157
|
subject: toRegistrationRequestSubject(params.subject, params.attendanceMode),
|
|
142629
143158
|
selections: selections.map(({ pricingOptionId, quantity }) => ({
|
|
142630
143159
|
pricingOptionId,
|
|
142631
143160
|
quantity
|
|
142632
143161
|
})),
|
|
142633
|
-
selectedSlidingAmount: params.selectedSlidingAmount ?? void 0
|
|
143162
|
+
selectedSlidingAmount: params.selectedSlidingAmount ?? void 0,
|
|
143163
|
+
...params.waitlistClaim ? { waitlistClaim: params.waitlistClaim } : {}
|
|
142634
143164
|
};
|
|
142635
143165
|
}
|
|
142636
143166
|
/** One effective union owns readiness, including the pre-fetch debounce window. */
|
|
@@ -142662,11 +143192,24 @@ async function loadEligibility(input) {
|
|
|
142662
143192
|
function useEligibilityWithDeps(params, deps) {
|
|
142663
143193
|
const api = deps.useBlockApi();
|
|
142664
143194
|
const request = eligibilityRequest(params);
|
|
143195
|
+
const scope = useRef({
|
|
143196
|
+
api,
|
|
143197
|
+
version: 0
|
|
143198
|
+
});
|
|
143199
|
+
if (scope.current.api !== api) scope.current = {
|
|
143200
|
+
api,
|
|
143201
|
+
version: scope.current.version + 1
|
|
143202
|
+
};
|
|
142665
143203
|
const requestKey = JSON.stringify({
|
|
143204
|
+
scope: scope.current.version,
|
|
143205
|
+
subjectEmail: params.subjectEmail,
|
|
143206
|
+
purchaseKey: params.purchaseKey,
|
|
142666
143207
|
refreshKey: params.refreshKey ?? 0,
|
|
142667
143208
|
request
|
|
142668
143209
|
});
|
|
142669
143210
|
const [state, dispatch] = useReducer(eligibilityLookupReducer, initialEligibilityLookupState);
|
|
143211
|
+
const activeKey = useRef(requestKey);
|
|
143212
|
+
activeKey.current = requestKey;
|
|
142670
143213
|
useEffect(() => {
|
|
142671
143214
|
const lifetime = { current: true };
|
|
142672
143215
|
const timeoutId = window.setTimeout(() => {
|
|
@@ -142676,7 +143219,7 @@ function useEligibilityWithDeps(params, deps) {
|
|
|
142676
143219
|
request,
|
|
142677
143220
|
requestKey,
|
|
142678
143221
|
dispatch,
|
|
142679
|
-
isCurrent: () => lifetime.current
|
|
143222
|
+
isCurrent: () => lifetime.current && activeKey.current === requestKey
|
|
142680
143223
|
});
|
|
142681
143224
|
}, REGISTRATION_OPTIONS_DEBOUNCE_MS);
|
|
142682
143225
|
return () => {
|
|
@@ -143297,8 +143840,12 @@ function quoteFeedback(state) {
|
|
|
143297
143840
|
} : null;
|
|
143298
143841
|
}
|
|
143299
143842
|
/** A quote belongs to the complete priced input and the customer, never just the draft code. */
|
|
143300
|
-
function selectionQuoteKey(lines, email) {
|
|
143301
|
-
return lines ? JSON.stringify([
|
|
143843
|
+
function selectionQuoteKey(lines, email, scope) {
|
|
143844
|
+
return lines ? JSON.stringify([
|
|
143845
|
+
selectionPreviewKey(null, lines),
|
|
143846
|
+
email.trim().toLowerCase(),
|
|
143847
|
+
...scope ? [scope] : []
|
|
143848
|
+
]) : null;
|
|
143302
143849
|
}
|
|
143303
143850
|
function currentSelectionQuote(state, key) {
|
|
143304
143851
|
return state.key === key ? state : emptyQuoteDraft(key, state.draftCode);
|
|
@@ -143340,12 +143887,9 @@ function decideSelectionQuoteResponse(pending, result) {
|
|
|
143340
143887
|
* or before going to Stripe and coming back), which they've already applied
|
|
143341
143888
|
* as far as they know. A code typed here waits for Apply.
|
|
143342
143889
|
*/
|
|
143343
|
-
function
|
|
143344
|
-
|
|
143345
|
-
|
|
143346
|
-
/** Several items have no total until the server prices them; one booking has a price already. */
|
|
143347
|
-
function uncodedQuoteWanted(input) {
|
|
143348
|
-
return input.several !== null || input.automaticOffered;
|
|
143890
|
+
function explicitSelectionQuoteWanted(state, input, carried = false) {
|
|
143891
|
+
if (input.several === null && input.combinedPending) return false;
|
|
143892
|
+
return input.automaticWanted && state.status === "draft" && (carried || (input.several !== null || input.productAutomaticOffered) && !state.draftCode.trim());
|
|
143349
143893
|
}
|
|
143350
143894
|
/** Nothing to price: no code or automatic discount can change a free selection. */
|
|
143351
143895
|
function freeSelection(input) {
|
|
@@ -143364,11 +143908,14 @@ function pricedPreview(state) {
|
|
|
143364
143908
|
if (state.status === "priced") return state.preview;
|
|
143365
143909
|
return state.status === "refused" ? state.uncoded ?? null : null;
|
|
143366
143910
|
}
|
|
143911
|
+
function selectionPriceSettled(input, state) {
|
|
143912
|
+
return !(input.several === null && state.key !== null && Boolean(state.draftCode.trim()) && state.status !== "priced") && (pricedPreview(state) !== null || freeSelection(input) || singleBookingNeedsNoAnswer(input, state));
|
|
143913
|
+
}
|
|
143367
143914
|
/** The only projection that can expose a selection's payable total and submitted code. */
|
|
143368
143915
|
function decidedSelectionPricing(input, state, apply) {
|
|
143369
143916
|
const priced = state.status === "priced" ? state : null;
|
|
143370
143917
|
const fallback = priced === null ? pricedPreview(state) : null;
|
|
143371
|
-
const settled =
|
|
143918
|
+
const settled = selectionPriceSettled(input, state);
|
|
143372
143919
|
const waiting = quoteWaiting(input, state, settled);
|
|
143373
143920
|
return {
|
|
143374
143921
|
state,
|
|
@@ -143395,11 +143942,11 @@ function decidedSelectionPricing(input, state, apply) {
|
|
|
143395
143942
|
* price anyway, so a preview that failed never stops a booking. A typed code always waits.
|
|
143396
143943
|
*/
|
|
143397
143944
|
function singleBookingNeedsNoAnswer(input, state) {
|
|
143398
|
-
if (input.several !== null) return false;
|
|
143945
|
+
if (input.several !== null || input.combinedPending) return false;
|
|
143399
143946
|
if (state.key === null) return true;
|
|
143400
143947
|
if (state.draftCode.trim()) return false;
|
|
143401
143948
|
if (state.status === "failed") return true;
|
|
143402
|
-
return state.status === "draft" && !(
|
|
143949
|
+
return state.status === "draft" && !((input.several !== null || input.productAutomaticOffered) && input.automaticWanted);
|
|
143403
143950
|
}
|
|
143404
143951
|
/** What the payment step is waiting for. Checking a typed code on one booking leaves its choices on screen, with Pay held. */
|
|
143405
143952
|
function quoteWaiting(input, state, settled) {
|
|
@@ -143435,6 +143982,31 @@ function codeFieldFor(state, apply, settled) {
|
|
|
143435
143982
|
hint: state.status === "priced" && state.preview.totalAfterDiscountCents === 0 ? "There's nothing to pay. You won't need to enter card details." : ""
|
|
143436
143983
|
};
|
|
143437
143984
|
}
|
|
143985
|
+
/** A combined response may settle only an uncoded draft. Explicit code requests own their result. */
|
|
143986
|
+
function seedRegistrationQuote(state, preview) {
|
|
143987
|
+
if (state.status !== "draft" || state.draftCode.trim() || !preview) return state;
|
|
143988
|
+
if (preview.kind === "incomplete_selection") return state;
|
|
143989
|
+
if (preview.kind === "lookup_failure") return {
|
|
143990
|
+
...state,
|
|
143991
|
+
status: "failed"
|
|
143992
|
+
};
|
|
143993
|
+
const [first, ...rest] = preview.price.priceReductions;
|
|
143994
|
+
const fields = {
|
|
143995
|
+
subtotalCents: preview.price.subtotalCents,
|
|
143996
|
+
totalAfterDiscountCents: preview.price.totalCents,
|
|
143997
|
+
currency: preview.price.currency,
|
|
143998
|
+
manualCodeEntryAllowed: preview.manualCodeEntryAllowed,
|
|
143999
|
+
...first ? { priceReductions: [first, ...rest] } : {}
|
|
144000
|
+
};
|
|
144001
|
+
return decideSelectionQuoteResponse(state, preview.automaticCode ? {
|
|
144002
|
+
type: "applied",
|
|
144003
|
+
...fields,
|
|
144004
|
+
...preview.automaticCode
|
|
144005
|
+
} : {
|
|
144006
|
+
type: "priced",
|
|
144007
|
+
...fields
|
|
144008
|
+
});
|
|
144009
|
+
}
|
|
143438
144010
|
//#endregion
|
|
143439
144011
|
//#region ../blocks/src/system/runtime/nodes/event-registration/useSelectionCombinationPricing.ts
|
|
143440
144012
|
const NOTHING = {
|
|
@@ -143493,10 +144065,13 @@ async function requestSelectionQuote(input) {
|
|
|
143493
144065
|
*/
|
|
143494
144066
|
function useSelectionCombinationPricing(input) {
|
|
143495
144067
|
const lines = input.several !== null ? selectionPreviewLines(input) : input.singleLines.length > 0 ? input.singleLines : null;
|
|
143496
|
-
const key = selectionQuoteKey(lines, input.email);
|
|
144068
|
+
const key = selectionQuoteKey(lines, input.email, input.registrationRequestKey);
|
|
143497
144069
|
const [state, setState] = useState(() => emptyQuoteDraft(key));
|
|
143498
144070
|
const [carried, setCarried] = useState(false);
|
|
143499
|
-
const
|
|
144071
|
+
const registrationPreview = input.several === null ? input.registrationPreview : null;
|
|
144072
|
+
const current = seedRegistrationQuote(currentSelectionQuote(state, key), registrationPreview);
|
|
144073
|
+
const activeKey = useRef(key);
|
|
144074
|
+
activeKey.current = key;
|
|
143500
144075
|
const apply = async () => {
|
|
143501
144076
|
if (key === null || lines === null) return;
|
|
143502
144077
|
if (current.draftCode.trim() && !input.email.trim()) {
|
|
@@ -143519,26 +144094,27 @@ function useSelectionCombinationPricing(input) {
|
|
|
143519
144094
|
lines,
|
|
143520
144095
|
pending
|
|
143521
144096
|
});
|
|
143522
|
-
setState((previous) => previous === pending ? next : previous);
|
|
144097
|
+
setState((previous) => activeKey.current === key && previous === pending ? next : previous);
|
|
143523
144098
|
};
|
|
143524
144099
|
useEffect(() => {
|
|
143525
|
-
if (
|
|
144100
|
+
if (explicitSelectionQuoteWanted(current, input, carried)) apply();
|
|
143526
144101
|
}, [
|
|
143527
144102
|
key,
|
|
143528
144103
|
input.automaticWanted,
|
|
143529
|
-
input.
|
|
144104
|
+
input.productAutomaticOffered,
|
|
144105
|
+
input.combinedPending,
|
|
143530
144106
|
current.status,
|
|
143531
144107
|
current.draftCode,
|
|
143532
144108
|
carried
|
|
143533
144109
|
]);
|
|
143534
144110
|
const editCode = (draftCode) => {
|
|
143535
144111
|
setCarried(false);
|
|
143536
|
-
setState((previous) => editedSelectionCode(previous, key, draftCode));
|
|
144112
|
+
setState((previous) => editedSelectionCode(seedRegistrationQuote(currentSelectionQuote(previous, key), registrationPreview), key, draftCode));
|
|
143537
144113
|
};
|
|
143538
144114
|
/** A code typed in one item's box, or restored after Stripe: priced as soon as payment wants a price. */
|
|
143539
144115
|
const carryCode = (draftCode) => {
|
|
143540
144116
|
setCarried(Boolean(draftCode.trim()));
|
|
143541
|
-
setState((previous) => editedSelectionCode(previous, key, draftCode));
|
|
144117
|
+
setState((previous) => editedSelectionCode(seedRegistrationQuote(currentSelectionQuote(previous, key), registrationPreview), key, draftCode));
|
|
143542
144118
|
};
|
|
143543
144119
|
/** A new booking starts with no code and no earlier price. */
|
|
143544
144120
|
const reset = () => {
|
|
@@ -143558,66 +144134,15 @@ function useSelectionCombinationPricing(input) {
|
|
|
143558
144134
|
};
|
|
143559
144135
|
}
|
|
143560
144136
|
//#endregion
|
|
143561
|
-
//#region ../blocks/src/system/runtime/nodes/event-registration/
|
|
143562
|
-
|
|
143563
|
-
|
|
143564
|
-
|
|
143565
|
-
|
|
143566
|
-
|
|
143567
|
-
|
|
143568
|
-
event: input.currentEvent,
|
|
143569
|
-
eventRequiresPayment: input.eventRequiresPayment,
|
|
143570
|
-
ticketsCount: input.ticketsCount
|
|
143571
|
-
}),
|
|
143572
|
-
subtotalCents: input.eligibility.price,
|
|
143573
|
-
summaryLines: input.eligibility.ticketLines.map((line) => ({
|
|
143574
|
-
pricingOptionId: line.pricingOptionId,
|
|
143575
|
-
label: line.label,
|
|
143576
|
-
quantity: line.quantity,
|
|
143577
|
-
unitPriceCents: line.unitPriceCents,
|
|
143578
|
-
subtotalCents: line.subtotalCents
|
|
143579
|
-
}))
|
|
143580
|
-
};
|
|
143581
|
-
}
|
|
143582
|
-
function eligibilityIsSettled(result) {
|
|
143583
|
-
return result.settledRequestKey === result.requestKey;
|
|
143584
|
-
}
|
|
143585
|
-
function viewIsStale(view, currentEvent, eligibilityState) {
|
|
143586
|
-
return view.eventSelectionId !== currentEvent?.selectionId || eligibilityState?.tag === "failed" || eligibilityState?.tag === "idle";
|
|
143587
|
-
}
|
|
143588
|
-
function requestIsSettled(discountUi) {
|
|
143589
|
-
return discountUi.discountAvailabilityRequestKey === "disabled" || discountUi.settledDiscountAvailabilityRequestKey === discountUi.discountAvailabilityRequestKey;
|
|
143590
|
-
}
|
|
143591
|
-
function discountRequest(view, several = false) {
|
|
143592
|
-
const discountContext = several ? null : view?.discountContext ?? null;
|
|
143593
|
-
return {
|
|
143594
|
-
discountContext,
|
|
143595
|
-
subtotalCents: discountContext?.type === "event" && view?.subtotalCents !== null ? view?.subtotalCents : void 0
|
|
143596
|
-
};
|
|
143597
|
-
}
|
|
143598
|
-
function useSettledCommerceView(input) {
|
|
143599
|
-
const candidate = buildCandidate({
|
|
143600
|
-
eligibilityIsSettled: eligibilityIsSettled(input.eligibilityResult),
|
|
143601
|
-
eligibility: input.eligibility,
|
|
143602
|
-
currentEvent: input.currentEvent,
|
|
143603
|
-
paymentSelection: input.paymentSelection,
|
|
143604
|
-
eventRequiresPayment: input.eventRequiresPayment,
|
|
143605
|
-
ticketsCount: input.ticketsCount
|
|
143606
|
-
});
|
|
143607
|
-
const settledRef = useRef(candidate);
|
|
143608
|
-
if (settledRef.current && viewIsStale(settledRef.current, input.currentEvent, input.eligibilityResult.state)) settledRef.current = null;
|
|
143609
|
-
const requestView = candidate ?? settledRef.current;
|
|
143610
|
-
const discountUi = input.useDiscountCodeUi({
|
|
143611
|
-
api: input.api,
|
|
143612
|
-
...discountRequest(requestView, input.several)
|
|
144137
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/useEventRegistrationRecoveryRequest.ts
|
|
144138
|
+
/** Retain arrival intent while the payment controller cleans up the return URL. */
|
|
144139
|
+
function useEventRegistrationRecoveryRequest() {
|
|
144140
|
+
const [arrival] = useState(() => {
|
|
144141
|
+
if (typeof window === "undefined") return "none";
|
|
144142
|
+
if (eventRegistrationCheckoutReturnRequest(new URLSearchParams(window.location.search))) return "paymentReturn";
|
|
144143
|
+
return getWaitlistClaimTokenFromUrl() || getWaitlistClaimEntryIdFromUrl() ? "waitlistInvitation" : "none";
|
|
143613
144144
|
});
|
|
143614
|
-
|
|
143615
|
-
return {
|
|
143616
|
-
discountUi,
|
|
143617
|
-
discountContext: settledRef.current?.discountContext ?? null,
|
|
143618
|
-
ticketSelectionSubtotalCents: settledRef.current?.subtotalCents ?? null,
|
|
143619
|
-
ticketSelectionSummaryLines: settledRef.current?.summaryLines ?? []
|
|
143620
|
-
};
|
|
144145
|
+
return arrival;
|
|
143621
144146
|
}
|
|
143622
144147
|
//#endregion
|
|
143623
144148
|
//#region ../blocks/src/system/runtime/nodes/event-registration/useGuestDetailsCheck.ts
|
|
@@ -143655,11 +144180,17 @@ async function checkGuestNextStep(input, request, setCheckingNextStep) {
|
|
|
143655
144180
|
}
|
|
143656
144181
|
}
|
|
143657
144182
|
function guestNextStepRequest(input) {
|
|
144183
|
+
const buyer = parseParticipantEmail(input.formData.email);
|
|
143658
144184
|
return input.registrationTarget ? {
|
|
143659
144185
|
subject: toRegistrationRequestSubject(input.registrationTarget.subject, input.selectedAttendanceMode),
|
|
143660
144186
|
selections: input.ticketSelections,
|
|
143661
144187
|
selectedSlidingAmount: input.selectedSlidingAmount ?? void 0,
|
|
143662
|
-
email: input.formData.email
|
|
144188
|
+
email: input.formData.email,
|
|
144189
|
+
buyer: buyer.ok ? {
|
|
144190
|
+
kind: "email",
|
|
144191
|
+
email: buyer.value
|
|
144192
|
+
} : { kind: "unknown" },
|
|
144193
|
+
purchaseTarget: "eventTickets"
|
|
143663
144194
|
} : null;
|
|
143664
144195
|
}
|
|
143665
144196
|
//#endregion
|
|
@@ -144175,16 +144706,54 @@ function useEventRegistrationWizard(options) {
|
|
|
144175
144706
|
return useEventRegistrationWizardWithDeps(options, eventRegistrationWizardDeps);
|
|
144176
144707
|
}
|
|
144177
144708
|
const CHOOSER_CLOCK = { kind: "relative" };
|
|
144709
|
+
/** The wizard owns the step, so it owns whether the clock has stopped this visitor starting a booking. */
|
|
144710
|
+
function useFreshBookingClosure(deps, options, events, step, visitorHoldsPlace) {
|
|
144711
|
+
const recoveryRequest = useEventRegistrationRecoveryRequest();
|
|
144712
|
+
const nextBoundary = useMemo(() => nextFreshBookingBoundary(events, options.occurrenceContext, options.subject), [
|
|
144713
|
+
events,
|
|
144714
|
+
options.occurrenceContext,
|
|
144715
|
+
options.subject
|
|
144716
|
+
]);
|
|
144717
|
+
const now = deps.useBookingNowIso(options.now, {
|
|
144718
|
+
kind: "presentation",
|
|
144719
|
+
nextBoundary
|
|
144720
|
+
});
|
|
144721
|
+
return resolveFreshBookingClosure({
|
|
144722
|
+
step,
|
|
144723
|
+
holdsPlace: visitorHoldsPlace,
|
|
144724
|
+
recoveryRequest,
|
|
144725
|
+
events,
|
|
144726
|
+
occurrenceContext: options.occurrenceContext,
|
|
144727
|
+
subject: options.subject,
|
|
144728
|
+
now
|
|
144729
|
+
});
|
|
144730
|
+
}
|
|
144731
|
+
function holdsPlace(claim, payment) {
|
|
144732
|
+
return claim.kind !== "none" || payment.retryingHeldPlace;
|
|
144733
|
+
}
|
|
144734
|
+
/** A date that has closed has nothing to quote for a new booking. */
|
|
144735
|
+
function bookingClosureAllowsQuote(closure, wanted) {
|
|
144736
|
+
return closure.kind !== "closedEarly" && closure.kind !== "started" && wanted;
|
|
144737
|
+
}
|
|
144738
|
+
function waitlistClaimCredential(claim) {
|
|
144739
|
+
return claim.kind === "none" ? null : claim.request.credential;
|
|
144740
|
+
}
|
|
144178
144741
|
/**
|
|
144179
144742
|
* Preserve source availability through event adaptation and page scoping.
|
|
144180
144743
|
*
|
|
144181
144744
|
* `choiceNowIso` is the chooser's clock: it starts at the server snapshot so hydration matches, then
|
|
144182
144745
|
* follows the browser, so a date that starts while the page is open leaves the chooser.
|
|
144183
|
-
* `registrationEvents` stays the full set, so payment recovery still finds a date that has started
|
|
144746
|
+
* `registrationEvents` stays the full set, so payment recovery still finds a date that has started,
|
|
144747
|
+
* and `recoveryEvents` is that set within this page, so an invitation finds a run that has closed.
|
|
144184
144748
|
*/
|
|
144185
144749
|
function useRegistrationEventSource(options, choiceNowIso) {
|
|
144186
144750
|
const events = options.eventSource.kind === "ready" ? options.eventSource.events : NO_EVENTS;
|
|
144187
144751
|
const registrationEvents = useMemo(() => [...toRegistrationEvents(events), ...toWholeSeriesRegistrationEvents(events)], [events]);
|
|
144752
|
+
const scopeOfPage = [
|
|
144753
|
+
options.occurrenceContext?.seriesId,
|
|
144754
|
+
options.subject?.kind,
|
|
144755
|
+
options.subject?.kind === "eventSeries" ? options.subject.eventSeriesId : options.subject?.kind === "eventOffering" ? `${options.subject.eventOfferingId}:${options.subject.catalogueEventSeriesIds.join(",")}` : options.subject?.reason
|
|
144756
|
+
].join("|");
|
|
144188
144757
|
const choiceKey = useMemo(() => {
|
|
144189
144758
|
const choices = resolveEventRegistrationChoices(events, {
|
|
144190
144759
|
occurrenceContext: options.occurrenceContext,
|
|
@@ -144194,22 +144763,25 @@ function useRegistrationEventSource(options, choiceNowIso) {
|
|
|
144194
144763
|
}, [
|
|
144195
144764
|
events,
|
|
144196
144765
|
choiceNowIso,
|
|
144197
|
-
|
|
144198
|
-
options.subject?.kind,
|
|
144199
|
-
options.subject?.kind === "eventSeries" ? options.subject.eventSeriesId : options.subject?.kind === "eventOffering" ? `${options.subject.eventOfferingId}:${options.subject.catalogueEventSeriesIds.join(",")}` : options.subject?.reason
|
|
144766
|
+
scopeOfPage
|
|
144200
144767
|
]);
|
|
144201
144768
|
const scopedEvents = useMemo(() => {
|
|
144202
144769
|
const choiceIds = new Set(choiceKey.split("\n"));
|
|
144203
144770
|
return registrationEvents.filter((event) => choiceIds.has(event.selectionId));
|
|
144204
144771
|
}, [registrationEvents, choiceKey]);
|
|
144772
|
+
const recoveryEvents = useMemo(() => resolveEventRegistrationScopedEvents(registrationEvents, {
|
|
144773
|
+
occurrenceContext: options.occurrenceContext,
|
|
144774
|
+
subject: options.subject
|
|
144775
|
+
}), [registrationEvents, scopeOfPage]);
|
|
144205
144776
|
return {
|
|
144206
144777
|
events,
|
|
144207
144778
|
registrationEvents,
|
|
144779
|
+
recoveryEvents,
|
|
144208
144780
|
scopedEvents,
|
|
144209
|
-
|
|
144781
|
+
claimEventSource: useMemo(() => options.eventSource.kind === "ready" ? {
|
|
144210
144782
|
kind: "ready",
|
|
144211
|
-
events:
|
|
144212
|
-
} : options.eventSource, [options.eventSource,
|
|
144783
|
+
events: recoveryEvents
|
|
144784
|
+
} : options.eventSource, [options.eventSource, recoveryEvents])
|
|
144213
144785
|
};
|
|
144214
144786
|
}
|
|
144215
144787
|
/** A signed-in booker's email is their verified identity, never a draft copy. */
|
|
@@ -144220,11 +144792,51 @@ function useVerifiedFormData(draft, authState, profile) {
|
|
|
144220
144792
|
email: verifiedEmail
|
|
144221
144793
|
}, [draft, verifiedEmail]);
|
|
144222
144794
|
}
|
|
144795
|
+
function registrationQuoteInputs(eligibility) {
|
|
144796
|
+
return {
|
|
144797
|
+
primarySubtotalCents: eligibility?.price ?? null,
|
|
144798
|
+
ticketSelectionSummaryLines: eligibility?.ticketLines ?? []
|
|
144799
|
+
};
|
|
144800
|
+
}
|
|
144801
|
+
function registrationDiscountPreview(state) {
|
|
144802
|
+
return state.tag === "resolved" ? state.eligibility.discountPreview : null;
|
|
144803
|
+
}
|
|
144804
|
+
function registrationPurchaseTarget(payment) {
|
|
144805
|
+
return registrationPurchaseIdentity(payment) === "eventTickets" ? "eventTickets" : "other";
|
|
144806
|
+
}
|
|
144807
|
+
function registrationPurchaseIdentity(payment) {
|
|
144808
|
+
return payment.method === null || payment.method === "stripe" || payment.method === "free" ? "eventTickets" : payment;
|
|
144809
|
+
}
|
|
144810
|
+
function registrationDiscountContext(input) {
|
|
144811
|
+
const { several, currentEvent, paymentIntent, eventRequiresPayment, ticketsCount } = input;
|
|
144812
|
+
const selectedDiscountContext = several !== null || !currentEvent ? null : resolveDiscountContext({
|
|
144813
|
+
paymentSelection: paymentIntent,
|
|
144814
|
+
event: currentEvent,
|
|
144815
|
+
eventRequiresPayment,
|
|
144816
|
+
ticketsCount
|
|
144817
|
+
});
|
|
144818
|
+
return selectedDiscountContext?.type === "event" && currentEvent?.registrationSubject.kind === "wholeSeries" ? {
|
|
144819
|
+
type: "whole_series",
|
|
144820
|
+
eventSeriesId: selectedDiscountContext.eventSeriesId
|
|
144821
|
+
} : selectedDiscountContext;
|
|
144822
|
+
}
|
|
144823
|
+
function registrationClaimRequest(claim) {
|
|
144824
|
+
return claim.kind === "none" ? null : claim.request;
|
|
144825
|
+
}
|
|
144826
|
+
function registrationClaimError(claim, message, action) {
|
|
144827
|
+
return claim.kind === "error" ? {
|
|
144828
|
+
message: claim.message,
|
|
144829
|
+
action: claim.action
|
|
144830
|
+
} : {
|
|
144831
|
+
message,
|
|
144832
|
+
action
|
|
144833
|
+
};
|
|
144834
|
+
}
|
|
144223
144835
|
function useEventRegistrationWizardWithDeps(options, deps) {
|
|
144224
144836
|
const api = useBlockApi();
|
|
144225
144837
|
const arrivalCredential = deps.useWaitlistClaimCredential();
|
|
144226
144838
|
const nowIso = deps.useBookingNowIso(options.now);
|
|
144227
|
-
const { events, registrationEvents, scopedEvents,
|
|
144839
|
+
const { events, registrationEvents, recoveryEvents, scopedEvents, claimEventSource } = useRegistrationEventSource(options, deps.useBookingNowIso(options.now, CHOOSER_CLOCK));
|
|
144228
144840
|
const preSelectedEvent = useMemo(() => findPreSelectedEvent({
|
|
144229
144841
|
scopedEvents,
|
|
144230
144842
|
occurrenceContext: options.occurrenceContext
|
|
@@ -144323,7 +144935,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
144323
144935
|
const formData = useVerifiedFormData(draftFormData, portalAuthState, portalProfile);
|
|
144324
144936
|
const portalIdentity = portalSessionIdentity(api.config);
|
|
144325
144937
|
const waitlistClaim = flowState.invitation;
|
|
144326
|
-
const claimLookup = deps.useWaitlistClaim(waitlistClaim
|
|
144938
|
+
const claimLookup = deps.useWaitlistClaim(registrationClaimRequest(waitlistClaim));
|
|
144327
144939
|
useEffect(() => {
|
|
144328
144940
|
dispatchFlow({
|
|
144329
144941
|
type: "claim-arrived",
|
|
@@ -144335,16 +144947,15 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
144335
144947
|
if (claimLookup) dispatchFlow({
|
|
144336
144948
|
type: "claim-updated",
|
|
144337
144949
|
lookup: claimLookup,
|
|
144338
|
-
events:
|
|
144950
|
+
events: claimEventSource,
|
|
144339
144951
|
occurrenceContextId: options.occurrenceContext?.id
|
|
144340
144952
|
});
|
|
144341
144953
|
}, [
|
|
144342
144954
|
claimLookup,
|
|
144343
|
-
|
|
144955
|
+
claimEventSource,
|
|
144344
144956
|
options.occurrenceContext?.id
|
|
144345
144957
|
]);
|
|
144346
|
-
const errorMessage
|
|
144347
|
-
const errorAction = waitlistClaim.kind === "error" ? waitlistClaim.action : submissionErrorAction;
|
|
144958
|
+
const { message: errorMessage, action: errorAction } = registrationClaimError(waitlistClaim, submissionErrorMessage, submissionErrorAction);
|
|
144348
144959
|
const selectionLocked = isRegistrationLocked(step);
|
|
144349
144960
|
useEffect(() => {
|
|
144350
144961
|
if (selectionLocked || portalAuthState !== "authenticated" || !portalProfile) return;
|
|
@@ -144413,20 +145024,31 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
144413
145024
|
detailsInPage: () => Object.keys(validateFormData(formData)).length === 0
|
|
144414
145025
|
});
|
|
144415
145026
|
const { recovery: paymentStatusRecovery, showRecovery: setPaymentStatusRecovery, check: handleCheckPaymentStatus, continuePayment: handleContinueExistingPayment, returnToPayment: handleReturnToPayment, returnToBooking: handleReturnToBooking } = paymentController;
|
|
145027
|
+
const bookingClosure = useFreshBookingClosure(deps, options, events, step, holdsPlace(waitlistClaim, paymentController));
|
|
144416
145028
|
const eligibilityResult = deps.useEligibility({
|
|
144417
145029
|
refreshKey: optionsRefreshKey,
|
|
144418
|
-
|
|
145030
|
+
buyerEmail: formData.email,
|
|
145031
|
+
purchaseTarget: registrationPurchaseTarget(paymentIntent),
|
|
145032
|
+
purchaseKey: JSON.stringify([
|
|
145033
|
+
registrationPurchaseIdentity(paymentIntent),
|
|
145034
|
+
several,
|
|
145035
|
+
api.config.siteId,
|
|
145036
|
+
portalIdentity
|
|
145037
|
+
]),
|
|
145038
|
+
enabled: bookingClosureAllowsQuote(bookingClosure, shouldRefreshAfterRegistrationError(step, errorAction, shouldLoadRegistrationOptions(portalAuthState, step))),
|
|
144419
145039
|
subject: registrationTarget?.subject ?? null,
|
|
144420
145040
|
attendanceMode: selectedAttendanceMode,
|
|
144421
145041
|
ticketSelections,
|
|
144422
145042
|
selectedSlidingAmount: parseCurrencyInputToCents(selectedSlidingAmountInput),
|
|
144423
|
-
subjectEmail: getPortalSubjectEmail(portalProfile)
|
|
145043
|
+
subjectEmail: getPortalSubjectEmail(portalProfile),
|
|
145044
|
+
waitlistClaim: waitlistClaimCredential(waitlistClaim)
|
|
144424
145045
|
});
|
|
144425
145046
|
const existingRegistrationResult = deps.useExistingEventRegistration({
|
|
144426
145047
|
isAuthenticated: portalAuthState === "authenticated",
|
|
144427
145048
|
occurrenceId: registrationOccurrenceId
|
|
144428
145049
|
});
|
|
144429
145050
|
const existingRegistrations = useMemo(() => existingRegistrationResult.registrations.filter((registration) => registration.occurrenceId === registrationOccurrenceId), [existingRegistrationResult.registrations, registrationOccurrenceId]);
|
|
145051
|
+
const registrationOptionsState = eligibilityResult.state;
|
|
144430
145052
|
const eligibility = eligibilityResult.eligibility;
|
|
144431
145053
|
const eligibilityLoading = eligibilityResult.isLoading;
|
|
144432
145054
|
const eligibilityError = eligibilityResult.error;
|
|
@@ -144744,16 +145366,21 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
144744
145366
|
}
|
|
144745
145367
|
setStep("select-tickets");
|
|
144746
145368
|
};
|
|
144747
|
-
const
|
|
144748
|
-
|
|
144749
|
-
|
|
144750
|
-
eligibilityResult,
|
|
144751
|
-
eligibility,
|
|
145369
|
+
const currentPreview = registrationDiscountPreview(eligibilityResult.state);
|
|
145370
|
+
const discountContext = registrationDiscountContext({
|
|
145371
|
+
several,
|
|
144752
145372
|
currentEvent,
|
|
145373
|
+
paymentIntent,
|
|
144753
145374
|
eventRequiresPayment,
|
|
144754
|
-
|
|
144755
|
-
|
|
144756
|
-
|
|
145375
|
+
ticketsCount
|
|
145376
|
+
});
|
|
145377
|
+
const { primarySubtotalCents, ticketSelectionSummaryLines } = registrationQuoteInputs(eligibility);
|
|
145378
|
+
const discountUi = deps.useDiscountCodeUi({
|
|
145379
|
+
api,
|
|
145380
|
+
discountContext,
|
|
145381
|
+
preview: currentPreview,
|
|
145382
|
+
loading: eligibilityLoading,
|
|
145383
|
+
scopeKey: eligibilityResult.requestKey
|
|
144757
145384
|
});
|
|
144758
145385
|
const selectionPrice = planSelectionPrice({
|
|
144759
145386
|
several,
|
|
@@ -144787,7 +145414,10 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
144787
145414
|
ticketLines: ticketSelectionSummaryLines,
|
|
144788
145415
|
currentEvent
|
|
144789
145416
|
}),
|
|
144790
|
-
|
|
145417
|
+
registrationPreview: currentPreview,
|
|
145418
|
+
registrationRequestKey: eligibilityResult.requestKey,
|
|
145419
|
+
combinedPending: eligibilityLoading,
|
|
145420
|
+
productAutomaticOffered: discountUi.autoAppliedDiscount !== null && discountContext?.type === "pass"
|
|
144791
145421
|
});
|
|
144792
145422
|
const discountView = registrationDiscountView({
|
|
144793
145423
|
several: several !== null,
|
|
@@ -145042,6 +145672,8 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
145042
145672
|
...registrationNavigation.presentation,
|
|
145043
145673
|
api,
|
|
145044
145674
|
nowIso,
|
|
145675
|
+
/** Whether the clock has stopped this visitor starting a booking on this page. */
|
|
145676
|
+
bookingClosure,
|
|
145045
145677
|
directPaymentOptions,
|
|
145046
145678
|
paymentDecision,
|
|
145047
145679
|
anchorId: options.anchorId,
|
|
@@ -145050,7 +145682,10 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
145050
145682
|
subject: options.subject,
|
|
145051
145683
|
events,
|
|
145052
145684
|
maxTicketsNum: waitlistClaim.kind === "ready" ? waitlistClaim.restoration.ticketsCount : options.maxTicketsNum,
|
|
145053
|
-
|
|
145685
|
+
/** The new-booking choices, plus the run or date an invitation holds a place on. */
|
|
145686
|
+
scopedEvents: withOfferedEvent(scopedEvents, waitlistClaim),
|
|
145687
|
+
/** Everything on this page a booking could be for, whether or not it's still a choice. */
|
|
145688
|
+
recoveryEvents,
|
|
145054
145689
|
preSelectedEvent: preSelectedDisplayEvent(preSelectedEvent, currentEvent, displayEvent),
|
|
145055
145690
|
hasPreSelectedContext,
|
|
145056
145691
|
presentation,
|
|
@@ -145182,7 +145817,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
145182
145817
|
isMembershipFastTrack,
|
|
145183
145818
|
waitlistClaim,
|
|
145184
145819
|
eligibility,
|
|
145185
|
-
registrationOptionsState
|
|
145820
|
+
registrationOptionsState,
|
|
145186
145821
|
eligibilityLoading: anyLoading(eligibilityLoading, checkingNextStep, combinationPricing.quoting),
|
|
145187
145822
|
eligibilityError,
|
|
145188
145823
|
existingRegistrations,
|
|
@@ -145315,10 +145950,6 @@ function singleBookingTicketDetails(contextType, input) {
|
|
|
145315
145950
|
ticketUnits
|
|
145316
145951
|
};
|
|
145317
145952
|
}
|
|
145318
|
-
/** The server can't yet preview an automatic discount on a membership, so its summary shows the regular price and checkout takes the discount off. */
|
|
145319
|
-
function automaticQuoteOffered(automatic, context) {
|
|
145320
|
-
return automatic !== null && context?.type !== "membership";
|
|
145321
|
-
}
|
|
145322
145953
|
/** The quote's field, saying beside an applied code what it does to this purchase. */
|
|
145323
145954
|
function registrationCodeField(field, quote, paymentIntent) {
|
|
145324
145955
|
if (!field) return null;
|
|
@@ -147479,16 +148110,20 @@ const EventSelectionStep = (props) => {
|
|
|
147479
148110
|
});
|
|
147480
148111
|
if (getEventSelectionMode(events) === "date") return /* @__PURE__ */ jsxs("div", {
|
|
147481
148112
|
className: "rb-reg-stack er-stack",
|
|
147482
|
-
children: [
|
|
147483
|
-
|
|
147484
|
-
|
|
147485
|
-
|
|
147486
|
-
|
|
147487
|
-
|
|
147488
|
-
|
|
147489
|
-
|
|
147490
|
-
|
|
147491
|
-
|
|
148113
|
+
children: [
|
|
148114
|
+
/* @__PURE__ */ jsx("h3", {
|
|
148115
|
+
tabIndex: -1,
|
|
148116
|
+
className: "er-title",
|
|
148117
|
+
children: "Choose a date"
|
|
148118
|
+
}),
|
|
148119
|
+
/* @__PURE__ */ jsx(BookingCloseLine, { events }),
|
|
148120
|
+
/* @__PURE__ */ jsx(DateSelectionList, {
|
|
148121
|
+
events: [...events].sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt)),
|
|
148122
|
+
selectedEvent,
|
|
148123
|
+
display,
|
|
148124
|
+
onChoose
|
|
148125
|
+
})
|
|
148126
|
+
]
|
|
147492
148127
|
});
|
|
147493
148128
|
return /* @__PURE__ */ jsx(EventList, {
|
|
147494
148129
|
events,
|
|
@@ -147564,6 +148199,14 @@ function EventListCard({ event, selected, onSelect, display }) {
|
|
|
147564
148199
|
})
|
|
147565
148200
|
});
|
|
147566
148201
|
}
|
|
148202
|
+
/** When bookings close, inside the booking card, if the cut-off is earlier than the start. */
|
|
148203
|
+
function BookingCloseLine({ events }) {
|
|
148204
|
+
const line = events.find((event) => event.bookingCloseLine)?.bookingCloseLine;
|
|
148205
|
+
return line ? /* @__PURE__ */ jsx("p", {
|
|
148206
|
+
className: "er-text er-text--muted",
|
|
148207
|
+
children: line
|
|
148208
|
+
}) : null;
|
|
148209
|
+
}
|
|
147567
148210
|
const SEVERAL_HEADINGS = {
|
|
147568
148211
|
dates: {
|
|
147569
148212
|
title: "Choose dates",
|
|
@@ -147601,6 +148244,7 @@ function SeveralSelection(props) {
|
|
|
147601
148244
|
className: "er-text er-text--muted er-selection-lede",
|
|
147602
148245
|
children: heading.lede
|
|
147603
148246
|
}),
|
|
148247
|
+
/* @__PURE__ */ jsx(BookingCloseLine, { events: props.events }),
|
|
147604
148248
|
/* @__PURE__ */ jsx(CombinationOfferLine, { parts: combinationOfferLine(combinationOffersOf(props.events)) }),
|
|
147605
148249
|
/* @__PURE__ */ jsx("div", {
|
|
147606
148250
|
className: "er-date-list",
|
|
@@ -148436,7 +149080,7 @@ function entitlementRows(props) {
|
|
|
148436
149080
|
//#region ../blocks/src/system/runtime/nodes/event-registration/CalendarAction.tsx
|
|
148437
149081
|
/** Download effects happen only after a click, including in editor preview. */
|
|
148438
149082
|
async function downloadCalendar(calendar) {
|
|
148439
|
-
const { renderCalendarFeedIcs } = await import("./src-
|
|
149083
|
+
const { renderCalendarFeedIcs } = await import("./src-EO5QoRlU.mjs");
|
|
148440
149084
|
const url = URL.createObjectURL(new Blob([renderCalendarFeedIcs(calendar.feed)], { type: "text/calendar;charset=utf-8" }));
|
|
148441
149085
|
const link = document.createElement("a");
|
|
148442
149086
|
link.href = url;
|
|
@@ -148957,6 +149601,11 @@ function ticketStepInvitation(claim) {
|
|
|
148957
149601
|
expiresAt: claim.claim.expiresAt
|
|
148958
149602
|
} : { kind: "pending" };
|
|
148959
149603
|
}
|
|
149604
|
+
/** With a date to pick, the choosing step has already said it. */
|
|
149605
|
+
function TicketStepBookingCloseLine({ wizard }) {
|
|
149606
|
+
if (wizard.scopedEvents.length > 1 || wizard.waitlistClaim.kind !== "none") return null;
|
|
149607
|
+
return /* @__PURE__ */ jsx(BookingCloseLine, { events: wizard.scopedEvents });
|
|
149608
|
+
}
|
|
148960
149609
|
function TicketSelectionContent({ wizard, display }) {
|
|
148961
149610
|
if (!wizard.selectedEvent && !wizard.occurrenceContext) return null;
|
|
148962
149611
|
const isWaitlisted = wizard.admission.kind === "closed" && wizard.admission.reason === "alreadyWaitlisted";
|
|
@@ -148971,6 +149620,7 @@ function TicketSelectionContent({ wizard, display }) {
|
|
|
148971
149620
|
onBookForSomeoneElse: wizard.handleBookForSomeoneElse
|
|
148972
149621
|
}),
|
|
148973
149622
|
/* @__PURE__ */ jsx(ClosedAdmissionNotice, { wizard }),
|
|
149623
|
+
/* @__PURE__ */ jsx(TicketStepBookingCloseLine, { wizard }),
|
|
148974
149624
|
wizard.severalItems === "runs" ? /* @__PURE__ */ jsx(SeveralRunsTicketStep, {
|
|
148975
149625
|
wizard,
|
|
148976
149626
|
display
|
|
@@ -149464,6 +150114,46 @@ function signInBenefitsTitle(benefits) {
|
|
|
149464
150114
|
return benefits.credit ? "Have credit on your account?" : null;
|
|
149465
150115
|
}
|
|
149466
150116
|
//#endregion
|
|
150117
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/PastOccurrenceNotice.tsx
|
|
150118
|
+
function getParentPathname(pathname) {
|
|
150119
|
+
const segments = pathname.split("/").filter(Boolean);
|
|
150120
|
+
if (segments.length < 2) return null;
|
|
150121
|
+
return `/${segments.slice(0, -1).join("/")}`;
|
|
150122
|
+
}
|
|
150123
|
+
function PastOccurrenceNotice(props) {
|
|
150124
|
+
const [parentPathname, setParentPathname] = useState(null);
|
|
150125
|
+
useEffect(() => {
|
|
150126
|
+
setParentPathname(getParentPathname(window.location.pathname));
|
|
150127
|
+
}, []);
|
|
150128
|
+
return /* @__PURE__ */ jsx("div", {
|
|
150129
|
+
id: props.anchorId,
|
|
150130
|
+
className: `event-registration ${props.className || ""}`,
|
|
150131
|
+
"data-block": "event-registration",
|
|
150132
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
150133
|
+
className: "er-empty",
|
|
150134
|
+
children: [/* @__PURE__ */ jsxs("p", {
|
|
150135
|
+
className: "er-empty__text",
|
|
150136
|
+
children: [
|
|
150137
|
+
"This event date (",
|
|
150138
|
+
formatEventDateTime(props.startsAt, {
|
|
150139
|
+
timeZone: props.timeZone,
|
|
150140
|
+
siteTimeZone: props.siteTimeZone,
|
|
150141
|
+
deliveryMode: props.deliveryMode
|
|
150142
|
+
}, "long"),
|
|
150143
|
+
") has already started. Registration is closed."
|
|
150144
|
+
]
|
|
150145
|
+
}), parentPathname && /* @__PURE__ */ jsx("p", {
|
|
150146
|
+
className: "er-empty__text",
|
|
150147
|
+
children: /* @__PURE__ */ jsx("a", {
|
|
150148
|
+
href: parentPathname,
|
|
150149
|
+
className: "er-link",
|
|
150150
|
+
children: "View other dates for this event"
|
|
150151
|
+
})
|
|
150152
|
+
})]
|
|
150153
|
+
})
|
|
150154
|
+
});
|
|
150155
|
+
}
|
|
150156
|
+
//#endregion
|
|
149467
150157
|
//#region ../blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizard.tsx
|
|
149468
150158
|
const EVENT_PORTAL_AUTH_COPY = {
|
|
149469
150159
|
membership: {
|
|
@@ -149539,11 +150229,26 @@ function useConfiguredEventRegistrationWizard(props) {
|
|
|
149539
150229
|
}
|
|
149540
150230
|
function EventRegistrationWizard(props) {
|
|
149541
150231
|
const wizard = useConfiguredEventRegistrationWizard(props);
|
|
149542
|
-
return /* @__PURE__ */ jsx(
|
|
150232
|
+
return /* @__PURE__ */ jsx(EventRegistrationWizardSurface, {
|
|
149543
150233
|
...props,
|
|
149544
150234
|
wizard
|
|
149545
150235
|
});
|
|
149546
150236
|
}
|
|
150237
|
+
/** Closing swaps out the booking steps only for someone who hadn't started: the hook decides who that is. */
|
|
150238
|
+
function EventRegistrationWizardSurface(props) {
|
|
150239
|
+
const closure = props.wizard.bookingClosure;
|
|
150240
|
+
switch (closure.kind) {
|
|
150241
|
+
case "open":
|
|
150242
|
+
case "underway": return /* @__PURE__ */ jsx(EventRegistrationWizardView, { ...props });
|
|
150243
|
+
case "closedEarly": return /* @__PURE__ */ jsx(RegistrationClosedState, {
|
|
150244
|
+
title: closure.copy.titleText,
|
|
150245
|
+
body: closure.copy.bodyText,
|
|
150246
|
+
otherDatesHref: closure.copy.otherDatesHref
|
|
150247
|
+
});
|
|
150248
|
+
case "started": return /* @__PURE__ */ jsx(PastOccurrenceNotice, { ...pastOccurrenceNoticeProps(props, closure.startsAt) });
|
|
150249
|
+
default: return assertNever$3(closure);
|
|
150250
|
+
}
|
|
150251
|
+
}
|
|
149547
150252
|
/** The panel header's pinned progress, while the panel shows a step (issue 1581). */
|
|
149548
150253
|
function overlayProgress(presentation, stepLabelContext) {
|
|
149549
150254
|
if (presentation.layout !== "steps" || !presentation.progress) return null;
|
|
@@ -149559,6 +150264,18 @@ function overlayProgress(presentation, stepLabelContext) {
|
|
|
149559
150264
|
function ticketStepOffersSignIn(wizard, pricingType) {
|
|
149560
150265
|
return wizard.step === "select-tickets" && wizard.severalItems === null && wizard.portalAuthState !== "authenticated" && wizard.portalAuthState !== "checking" && pricingType !== "free";
|
|
149561
150266
|
}
|
|
150267
|
+
/** Older sources can omit session facts; admission keeps the notice render-safe. */
|
|
150268
|
+
function pastOccurrenceNoticeProps(props, startsAt) {
|
|
150269
|
+
const event = props.events?.find((candidate) => candidate.occurrenceId === props.occurrenceContext?.id);
|
|
150270
|
+
return {
|
|
150271
|
+
anchorId: EVENT_REGISTRATION_ANCHOR_ID,
|
|
150272
|
+
className: props.className,
|
|
150273
|
+
startsAt,
|
|
150274
|
+
timeZone: props.occurrenceContext?.timeZone ?? null,
|
|
150275
|
+
siteTimeZone: event?.siteTimeZone ?? null,
|
|
150276
|
+
deliveryMode: event?.deliveryMode ?? null
|
|
150277
|
+
};
|
|
150278
|
+
}
|
|
149562
150279
|
function EventRegistrationWizardView(viewProps) {
|
|
149563
150280
|
const { wizard, ...props } = viewProps;
|
|
149564
150281
|
const { display, successMessage, buttonText = DEFAULT_BOOKING_BUTTON_TEXT, buttonVariant = "primary", className, supportEmail } = props;
|
|
@@ -149610,7 +150327,7 @@ function EventRegistrationWizardView(viewProps) {
|
|
|
149610
150327
|
}));
|
|
149611
150328
|
const showPortalAuthPrompt = waitlistClaimRequiresPortalLogin || ticketStepOffersSignIn(wizard, summaryEventPricingType) && portalAuthCopy.title !== "";
|
|
149612
150329
|
const presentation = resolveFinishedPresentation(wizard.presentation, {
|
|
149613
|
-
events: wizard.
|
|
150330
|
+
events: wizard.recoveryEvents,
|
|
149614
150331
|
completedOutcomes: wizard.flow.completedOutcomes,
|
|
149615
150332
|
draftEvent: summaryEvent ?? null,
|
|
149616
150333
|
occurrenceContext: wizard.occurrenceContext,
|
|
@@ -149698,63 +150415,6 @@ function EventRegistrationWizardView(viewProps) {
|
|
|
149698
150415
|
});
|
|
149699
150416
|
}
|
|
149700
150417
|
//#endregion
|
|
149701
|
-
//#region ../blocks/src/system/runtime/nodes/event-registration/useEventRegistrationRecoveryRequest.ts
|
|
149702
|
-
/** Retain arrival intent while the payment controller cleans up the return URL. */
|
|
149703
|
-
function useEventRegistrationRecoveryRequest() {
|
|
149704
|
-
const [arrival] = useState(() => {
|
|
149705
|
-
if (typeof window === "undefined") return "none";
|
|
149706
|
-
if (eventRegistrationCheckoutReturnRequest(new URLSearchParams(window.location.search))) return "paymentReturn";
|
|
149707
|
-
return getWaitlistClaimTokenFromUrl() || getWaitlistClaimEntryIdFromUrl() ? "waitlistInvitation" : "none";
|
|
149708
|
-
});
|
|
149709
|
-
return arrival;
|
|
149710
|
-
}
|
|
149711
|
-
//#endregion
|
|
149712
|
-
//#region ../blocks/src/system/runtime/nodes/event-registration/PastOccurrenceNotice.tsx
|
|
149713
|
-
function isPastOccurrence(startsAt, now) {
|
|
149714
|
-
if (!startsAt) return false;
|
|
149715
|
-
const startsAtTime = Date.parse(startsAt);
|
|
149716
|
-
if (!Number.isFinite(startsAtTime)) return false;
|
|
149717
|
-
return startsAtTime <= Date.parse(now);
|
|
149718
|
-
}
|
|
149719
|
-
function getParentPathname(pathname) {
|
|
149720
|
-
const segments = pathname.split("/").filter(Boolean);
|
|
149721
|
-
if (segments.length < 2) return null;
|
|
149722
|
-
return `/${segments.slice(0, -1).join("/")}`;
|
|
149723
|
-
}
|
|
149724
|
-
function PastOccurrenceNotice(props) {
|
|
149725
|
-
const [parentPathname, setParentPathname] = useState(null);
|
|
149726
|
-
useEffect(() => {
|
|
149727
|
-
setParentPathname(getParentPathname(window.location.pathname));
|
|
149728
|
-
}, []);
|
|
149729
|
-
return /* @__PURE__ */ jsx("div", {
|
|
149730
|
-
id: props.anchorId,
|
|
149731
|
-
className: `event-registration ${props.className || ""}`,
|
|
149732
|
-
"data-block": "event-registration",
|
|
149733
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
149734
|
-
className: "er-empty",
|
|
149735
|
-
children: [/* @__PURE__ */ jsxs("p", {
|
|
149736
|
-
className: "er-empty__text",
|
|
149737
|
-
children: [
|
|
149738
|
-
"This event date (",
|
|
149739
|
-
formatEventDateTime(props.startsAt, {
|
|
149740
|
-
timeZone: props.timeZone,
|
|
149741
|
-
siteTimeZone: props.siteTimeZone,
|
|
149742
|
-
deliveryMode: props.deliveryMode
|
|
149743
|
-
}, "long"),
|
|
149744
|
-
") has already started. Registration is closed."
|
|
149745
|
-
]
|
|
149746
|
-
}), parentPathname && /* @__PURE__ */ jsx("p", {
|
|
149747
|
-
className: "er-empty__text",
|
|
149748
|
-
children: /* @__PURE__ */ jsx("a", {
|
|
149749
|
-
href: parentPathname,
|
|
149750
|
-
className: "er-link",
|
|
149751
|
-
children: "View other dates for this event"
|
|
149752
|
-
})
|
|
149753
|
-
})]
|
|
149754
|
-
})
|
|
149755
|
-
});
|
|
149756
|
-
}
|
|
149757
|
-
//#endregion
|
|
149758
150418
|
//#region ../blocks/src/system/runtime/nodes/event-registration/useEventSourceRecovery.ts
|
|
149759
150419
|
const RECOVERY_DELAYS_MS = [
|
|
149760
150420
|
0,
|
|
@@ -149853,47 +150513,27 @@ function toEventRegistrationClientProps(props, display) {
|
|
|
149853
150513
|
className: display.className ?? void 0
|
|
149854
150514
|
};
|
|
149855
150515
|
}
|
|
149856
|
-
/** Older sources can omit session facts; admission keeps the notice render-safe. */
|
|
149857
|
-
function pastOccurrenceNoticeProps(clientProps, startsAt) {
|
|
149858
|
-
const event = clientProps.events?.find((event) => event.occurrenceId === clientProps.occurrenceContext?.id);
|
|
149859
|
-
return {
|
|
149860
|
-
anchorId: EVENT_REGISTRATION_ANCHOR_ID,
|
|
149861
|
-
className: clientProps.className,
|
|
149862
|
-
startsAt,
|
|
149863
|
-
timeZone: clientProps.occurrenceContext?.timeZone ?? null,
|
|
149864
|
-
siteTimeZone: event?.siteTimeZone ?? null,
|
|
149865
|
-
deliveryMode: event?.deliveryMode ?? null
|
|
149866
|
-
};
|
|
149867
|
-
}
|
|
149868
150516
|
const EventRegistrationClient = (clientProps) => {
|
|
149869
|
-
const
|
|
149870
|
-
|
|
149871
|
-
|
|
149872
|
-
|
|
149873
|
-
|
|
149874
|
-
|
|
149875
|
-
|
|
149876
|
-
const presentation = resolveEventRegistrationClientSurface({
|
|
149877
|
-
plan: surface,
|
|
149878
|
-
recoveryRequest,
|
|
149879
|
-
pastStartsAt: isPastOccurrence(startsAt, useBookingNowIso(clientProps.now, {
|
|
149880
|
-
kind: "presentation",
|
|
149881
|
-
nextBoundary: startsAt ?? null
|
|
149882
|
-
})) ? startsAt ?? null : null
|
|
150517
|
+
const surface = resolveEventRegistrationClientSurface({
|
|
150518
|
+
recoveryRequest: useEventRegistrationRecoveryRequest(),
|
|
150519
|
+
plan: planEventRegistrationSurface({
|
|
150520
|
+
events: clientProps.events ?? [],
|
|
150521
|
+
occurrenceContext: clientProps.occurrenceContext,
|
|
150522
|
+
subject: clientProps.subject
|
|
150523
|
+
})
|
|
149883
150524
|
});
|
|
149884
150525
|
if (hasCancelledRegistrationDate(clientProps.events ?? [], clientProps.occurrenceContext?.id)) return /* @__PURE__ */ jsx(RegistrationClosedState, {
|
|
149885
150526
|
title: cancelledDateCopy.titleText,
|
|
149886
150527
|
body: cancelledDateCopy.bodyText
|
|
149887
150528
|
});
|
|
149888
|
-
switch (
|
|
150529
|
+
switch (surface) {
|
|
149889
150530
|
case "wizard": return /* @__PURE__ */ jsx(EventRegistrationWizard, { ...clientProps });
|
|
149890
150531
|
case "unavailable": return /* @__PURE__ */ jsx("div", {
|
|
149891
150532
|
className: clientProps.className,
|
|
149892
150533
|
role: "status",
|
|
149893
150534
|
children: "Registration is temporarily unavailable. Please refresh the page or try again shortly."
|
|
149894
150535
|
});
|
|
149895
|
-
|
|
149896
|
-
default: return assertNever$3(presentation);
|
|
150536
|
+
default: return assertNever$3(surface);
|
|
149897
150537
|
}
|
|
149898
150538
|
};
|
|
149899
150539
|
const EventRegistrationIslandClient = (props) => {
|
|
@@ -150011,36 +150651,6 @@ function RecoveredEventRegistrationClient({ props, display, events: recoveredEve
|
|
|
150011
150651
|
}
|
|
150012
150652
|
//#endregion
|
|
150013
150653
|
//#region ../blocks/src/system/runtime/nodes/event-details.client.tsx
|
|
150014
|
-
function toEventDetailsClientProps(props) {
|
|
150015
|
-
return {
|
|
150016
|
-
arrangement: props.arrangement,
|
|
150017
|
-
quickFacts: props.quickFacts,
|
|
150018
|
-
entryTitle: props.entryTitle,
|
|
150019
|
-
actionSize: props.actionSize,
|
|
150020
|
-
lookSlots: props.lookSlots,
|
|
150021
|
-
surfacePresentation: props.surfacePresentation,
|
|
150022
|
-
panelHeading: props.panelHeading,
|
|
150023
|
-
occurrenceContext: props.occurrenceContext,
|
|
150024
|
-
subject: props.subject,
|
|
150025
|
-
events: props.events ? [...props.events] : props.events,
|
|
150026
|
-
venueDrawing: props.venueDrawing,
|
|
150027
|
-
showVenue: props.showVenue,
|
|
150028
|
-
showMap: props.showMap,
|
|
150029
|
-
showOtherDates: props.showOtherDates,
|
|
150030
|
-
otherDatesLimit: props.otherDatesLimit,
|
|
150031
|
-
showCost: props.showCost,
|
|
150032
|
-
showTitle: props.showTitle,
|
|
150033
|
-
showDescription: props.showDescription,
|
|
150034
|
-
showCapacity: props.showCapacity,
|
|
150035
|
-
showAcceptedPasses: props.showAcceptedPasses,
|
|
150036
|
-
showAcceptedMemberships: props.showAcceptedMemberships,
|
|
150037
|
-
sitePasses: props.sitePasses ? { passes: [...props.sitePasses.passes] } : props.sitePasses,
|
|
150038
|
-
siteMemberships: props.siteMemberships ? { memberships: [...props.siteMemberships.memberships] } : props.siteMemberships,
|
|
150039
|
-
autoApplyDiscount: props.autoApplyDiscount ?? null,
|
|
150040
|
-
className: props.className,
|
|
150041
|
-
now: props.now
|
|
150042
|
-
};
|
|
150043
|
-
}
|
|
150044
150654
|
function EventDetailsClient(props) {
|
|
150045
150655
|
const { occurrenceContext = null, events = null, className, children } = props;
|
|
150046
150656
|
const presentation = resolveEventDetailsPresentation({
|
|
@@ -150054,9 +150664,6 @@ function EventDetailsClient(props) {
|
|
|
150054
150664
|
children: [/* @__PURE__ */ jsx(EventDetailsView, { ...presentation }), children]
|
|
150055
150665
|
});
|
|
150056
150666
|
}
|
|
150057
|
-
function EventDetailsIslandClient(props) {
|
|
150058
|
-
return /* @__PURE__ */ jsx(EventDetailsClient, { ...toEventDetailsClientProps(props) });
|
|
150059
|
-
}
|
|
150060
150667
|
//#endregion
|
|
150061
150668
|
//#region ../blocks/src/portal/dateFormatting.ts
|
|
150062
150669
|
/** Optional API timestamps enter the display model here; invalid values never render a Date. */
|
|
@@ -156633,7 +157240,7 @@ const clientComponentRegistry = buildClientRegistryFromEntries(serverComponentRe
|
|
|
156633
157240
|
accordionItem: defineSourcePropsClientEntry(AccordionItemNode),
|
|
156634
157241
|
headerSection: defineSourcePropsClientEntry(header_section_client_default),
|
|
156635
157242
|
"booking-form": defineExplicitAdapterClientEntry(BookingFormNodeClient, { produces: "island-props" }),
|
|
156636
|
-
"event-details":
|
|
157243
|
+
"event-details": defineSourcePropsClientEntry(EventDetailsClient),
|
|
156637
157244
|
"location-map": defineSourcePropsClientEntry(LocationMapSSR),
|
|
156638
157245
|
"event-combined": defineExplicitAdapterClientEntry(EventCombinedIslandClient, { produces: "client-props" }),
|
|
156639
157246
|
"weekly-slot-availability": defineSourcePropsClientEntry(WeeklySlotAvailabilityClient)
|
|
@@ -157156,6 +157763,63 @@ async function dispatchJournalEffect(request, owners) {
|
|
|
157156
157763
|
};
|
|
157157
157764
|
}
|
|
157158
157765
|
//#endregion
|
|
157766
|
+
//#region ../content-editor/src/session-journal/grouping.ts
|
|
157767
|
+
/** A journal group has one target; keep its first inverse and last forward value. */
|
|
157768
|
+
function groupedJournalChange(first, last) {
|
|
157769
|
+
return {
|
|
157770
|
+
...first,
|
|
157771
|
+
after: last.after
|
|
157772
|
+
};
|
|
157773
|
+
}
|
|
157774
|
+
/** Keep the accepted identity and label while adopting only the owner's canonical inverse. */
|
|
157775
|
+
function replaceJournalInverse(change, inverse) {
|
|
157776
|
+
return {
|
|
157777
|
+
...change,
|
|
157778
|
+
before: inverse.before,
|
|
157779
|
+
after: inverse.after
|
|
157780
|
+
};
|
|
157781
|
+
}
|
|
157782
|
+
/**
|
|
157783
|
+
* The edits one send stands for become one undo step, because the server never saw the values between
|
|
157784
|
+
* them. Undo then lands on what the send's receipt says was stored, and a run that nets to nothing
|
|
157785
|
+
* cancels whole, the same as a typing group. Pending edits sit below the cursor, so it can't split one.
|
|
157786
|
+
*/
|
|
157787
|
+
function mergeJournalGroups(state, operationIds) {
|
|
157788
|
+
const merged = state.entries.filter((entry) => operationIds.includes(entry.edit.operationId));
|
|
157789
|
+
const group = merged[0]?.group;
|
|
157790
|
+
const groups = new Set(merged.map((entry) => entry.group));
|
|
157791
|
+
if (group === void 0 || groups.size < 2) return state;
|
|
157792
|
+
return {
|
|
157793
|
+
...state,
|
|
157794
|
+
entries: state.entries.map((entry) => groups.has(entry.group) ? {
|
|
157795
|
+
...entry,
|
|
157796
|
+
group
|
|
157797
|
+
} : entry),
|
|
157798
|
+
grouping: state.grouping && groups.has(state.grouping.group) ? {
|
|
157799
|
+
...state.grouping,
|
|
157800
|
+
group
|
|
157801
|
+
} : state.grouping
|
|
157802
|
+
};
|
|
157803
|
+
}
|
|
157804
|
+
/** A successful manual save closes its captured interaction, even if typing continued during the request. */
|
|
157805
|
+
function closeSavedManualGroup(state, captured) {
|
|
157806
|
+
const last = captured.at(-1);
|
|
157807
|
+
if (!last || typeof last.edit.textKey !== "object" || last.edit.textKey?.kind !== "manual") return state;
|
|
157808
|
+
const following = state.entries.filter((entry) => entry.group === last.group && entry.order > last.order);
|
|
157809
|
+
const nextGroup = following[0]?.order;
|
|
157810
|
+
return {
|
|
157811
|
+
...state,
|
|
157812
|
+
entries: state.entries.map((entry) => nextGroup !== void 0 && following.includes(entry) ? {
|
|
157813
|
+
...entry,
|
|
157814
|
+
group: nextGroup
|
|
157815
|
+
} : entry),
|
|
157816
|
+
grouping: state.grouping?.group === last.group ? nextGroup === void 0 ? null : {
|
|
157817
|
+
...state.grouping,
|
|
157818
|
+
group: nextGroup
|
|
157819
|
+
} : state.grouping
|
|
157820
|
+
};
|
|
157821
|
+
}
|
|
157822
|
+
//#endregion
|
|
157159
157823
|
//#region ../content-editor/src/session-journal/editorCapture.ts
|
|
157160
157824
|
const textKey = (command) => {
|
|
157161
157825
|
switch (command.type) {
|
|
@@ -157471,41 +158135,6 @@ function rebaseValueCheckpoint(before, next, checkpoint) {
|
|
|
157471
158135
|
};
|
|
157472
158136
|
}
|
|
157473
158137
|
//#endregion
|
|
157474
|
-
//#region ../content-editor/src/session-journal/grouping.ts
|
|
157475
|
-
/** A journal group has one target; keep its first inverse and last forward value. */
|
|
157476
|
-
function groupedJournalChange(first, last) {
|
|
157477
|
-
return {
|
|
157478
|
-
...first,
|
|
157479
|
-
after: last.after
|
|
157480
|
-
};
|
|
157481
|
-
}
|
|
157482
|
-
/** Keep the accepted identity and label while adopting only the owner's canonical inverse. */
|
|
157483
|
-
function replaceJournalInverse(change, inverse) {
|
|
157484
|
-
return {
|
|
157485
|
-
...change,
|
|
157486
|
-
before: inverse.before,
|
|
157487
|
-
after: inverse.after
|
|
157488
|
-
};
|
|
157489
|
-
}
|
|
157490
|
-
/** A successful manual save closes its captured interaction, even if typing continued during the request. */
|
|
157491
|
-
function closeSavedManualGroup(state, captured) {
|
|
157492
|
-
const last = captured.at(-1);
|
|
157493
|
-
if (!last || typeof last.edit.textKey !== "object" || last.edit.textKey?.kind !== "manual") return state;
|
|
157494
|
-
const following = state.entries.filter((entry) => entry.group === last.group && entry.order > last.order);
|
|
157495
|
-
const nextGroup = following[0]?.order;
|
|
157496
|
-
return {
|
|
157497
|
-
...state,
|
|
157498
|
-
entries: state.entries.map((entry) => nextGroup !== void 0 && following.includes(entry) ? {
|
|
157499
|
-
...entry,
|
|
157500
|
-
group: nextGroup
|
|
157501
|
-
} : entry),
|
|
157502
|
-
grouping: state.grouping?.group === last.group ? nextGroup === void 0 ? null : {
|
|
157503
|
-
...state.grouping,
|
|
157504
|
-
group: nextGroup
|
|
157505
|
-
} : state.grouping
|
|
157506
|
-
};
|
|
157507
|
-
}
|
|
157508
|
-
//#endregion
|
|
157509
158138
|
//#region ../content-editor/src/session-journal/replay.ts
|
|
157510
158139
|
/** Selection never searches for an older usable entry. Focus and the current view are irrelevant. */
|
|
157511
158140
|
function planJournalReplay(state, direction, operationId) {
|
|
@@ -157628,6 +158257,7 @@ function foldSettledPair(first, last) {
|
|
|
157628
158257
|
const receipt = first.settlement.receipt === last.settlement.receipt ? first.settlement.receipt : composeJournalCommitReceipts([first.settlement.receipt, last.settlement.receipt], journalTargetKey);
|
|
157629
158258
|
return receipt ? {
|
|
157630
158259
|
...first,
|
|
158260
|
+
order: last.order,
|
|
157631
158261
|
edit: groupedJournalChange(first.edit, last.edit),
|
|
157632
158262
|
settlement: {
|
|
157633
158263
|
kind: "settled",
|
|
@@ -157789,6 +158419,7 @@ function journalTransition(state, event) {
|
|
|
157789
158419
|
cause: event.cause
|
|
157790
158420
|
}
|
|
157791
158421
|
};
|
|
158422
|
+
case "run-formed": return mergeJournalGroups(state, event.operationIds);
|
|
157792
158423
|
case "conflicted": return adoptConflict(state, event.operationId, event.authoritative);
|
|
157793
158424
|
case "root-observed": return noteRootRevision(state, event.root, event.revision);
|
|
157794
158425
|
case "root-write-started": return beginRootWrite(state, event.root, event.operationId);
|
|
@@ -158647,7 +159278,7 @@ async function settlePendingReplay(operationIds, direction, effects, dispatch) {
|
|
|
158647
159278
|
}
|
|
158648
159279
|
function replaySelectionMatches(before, after, direction) {
|
|
158649
159280
|
const selected = (state) => state.entries[direction === "undo" ? state.cursor - 1 : state.cursor]?.order;
|
|
158650
|
-
return
|
|
159281
|
+
return selected(before) === selected(after);
|
|
158651
159282
|
}
|
|
158652
159283
|
/** A failed settlement may have committed; timeout ends this replay, never parks it for later. */
|
|
158653
159284
|
function boundedJournalSettlement(settlement) {
|
|
@@ -159022,19 +159653,25 @@ function fail(state, reason) {
|
|
|
159022
159653
|
},
|
|
159023
159654
|
effects: releaseOwned(state.phase)
|
|
159024
159655
|
};
|
|
159025
|
-
|
|
159656
|
+
if (reason === "unavailable") return {
|
|
159657
|
+
state: {
|
|
159658
|
+
...state,
|
|
159659
|
+
phase: { kind: "unavailable" }
|
|
159660
|
+
},
|
|
159661
|
+
effects: releaseOwned(state.phase)
|
|
159662
|
+
};
|
|
159026
159663
|
return {
|
|
159027
159664
|
state: {
|
|
159028
159665
|
...state,
|
|
159029
|
-
phase:
|
|
159666
|
+
phase: {
|
|
159030
159667
|
kind: "fault",
|
|
159031
159668
|
reason
|
|
159032
|
-
}
|
|
159669
|
+
}
|
|
159033
159670
|
},
|
|
159034
|
-
effects: [...releaseOwned(state.phase),
|
|
159671
|
+
effects: [...releaseOwned(state.phase), {
|
|
159035
159672
|
kind: "fault",
|
|
159036
159673
|
reason
|
|
159037
|
-
}]
|
|
159674
|
+
}]
|
|
159038
159675
|
};
|
|
159039
159676
|
}
|
|
159040
159677
|
function onGrant(state, event) {
|
|
@@ -159264,8 +159901,12 @@ function leaseEditability(state) {
|
|
|
159264
159901
|
} : state.phase.showing ?? { kind: "acquiring" };
|
|
159265
159902
|
case "requesting":
|
|
159266
159903
|
case "idle":
|
|
159267
|
-
case "suspended":
|
|
159268
|
-
case "fault": return {
|
|
159904
|
+
case "suspended": return { kind: "acquiring" };
|
|
159905
|
+
case "fault": return {
|
|
159906
|
+
kind: "read-only",
|
|
159907
|
+
reason: "refused",
|
|
159908
|
+
refusal: state.phase.reason
|
|
159909
|
+
};
|
|
159269
159910
|
case "closed": return null;
|
|
159270
159911
|
}
|
|
159271
159912
|
}
|
|
@@ -159402,12 +160043,15 @@ async function release(runtime, token) {
|
|
|
159402
160043
|
});
|
|
159403
160044
|
} catch {}
|
|
159404
160045
|
}
|
|
160046
|
+
/** The store's editability already explains a refusal; a host may be able to show something better. */
|
|
159405
160047
|
function reportFault(runtime, reason) {
|
|
159406
|
-
|
|
159407
|
-
|
|
159408
|
-
|
|
159409
|
-
|
|
159410
|
-
|
|
160048
|
+
logger.warn("editLease.refused", {
|
|
160049
|
+
reason,
|
|
160050
|
+
siteId: runtime.scope.siteId,
|
|
160051
|
+
nodeType: runtime.scope.nodeType,
|
|
160052
|
+
nodeId: runtime.scope.nodeId
|
|
160053
|
+
});
|
|
160054
|
+
if (reason === "not-found" || reason === "forbidden") runtime.onAccessChanged.current?.();
|
|
159411
160055
|
}
|
|
159412
160056
|
async function runLeaseEffect(runtime, effect, dispatch, current) {
|
|
159413
160057
|
switch (effect.kind) {
|
|
@@ -159629,6 +160273,9 @@ function useEditLeaseActions() {
|
|
|
159629
160273
|
}
|
|
159630
160274
|
//#endregion
|
|
159631
160275
|
//#region ../content-editor/src/controller/EditorWriteGate.tsx
|
|
160276
|
+
function reloadPage() {
|
|
160277
|
+
window.location.reload();
|
|
160278
|
+
}
|
|
159632
160279
|
/** Makes a mount's editing surface inert while the tab is waiting for, or denied, the lease. */
|
|
159633
160280
|
function EditorWriteSurface({ children }) {
|
|
159634
160281
|
const blocked = useEditorUiStore((state) => blocksEditingSurface(state.editability) || state.authoringHold() !== null);
|
|
@@ -159685,6 +160332,7 @@ function EditLeaseModal({ thing, onKeepViewing }) {
|
|
|
159685
160332
|
handlers: {
|
|
159686
160333
|
"take-over": () => actions.takeOver(),
|
|
159687
160334
|
retry: () => actions.retry(),
|
|
160335
|
+
reload: reloadPage,
|
|
159688
160336
|
discard: () => actions.discardLocal(),
|
|
159689
160337
|
"keep-viewing": keepViewing,
|
|
159690
160338
|
"discard-and-view": () => {
|
|
@@ -161312,9 +161960,31 @@ function captureCheckpoint(state, request) {
|
|
|
161312
161960
|
};
|
|
161313
161961
|
}
|
|
161314
161962
|
/**
|
|
161315
|
-
*
|
|
161963
|
+
* The operations one send stands for: the first queued group, plus every queued operation straight
|
|
161964
|
+
* after it that owes only the same value on the same target. They become one undo step and settle
|
|
161965
|
+
* together from the one receipt. Anything else queued, reserved or settled in between ends the run,
|
|
161966
|
+
* so a value never overtakes a write to something else.
|
|
161967
|
+
*/
|
|
161968
|
+
function sendRun(state, entries, first, order, deferred) {
|
|
161969
|
+
const group = entries.filter((entry) => entry.order < order && entry.group === first.group && state.operations.has(entry.edit.operationId));
|
|
161970
|
+
const key = soleKey(state, group, first.edit);
|
|
161971
|
+
const later = key ? entries.filter((entry) => entry.order > (group[group.length - 1]?.order ?? first.order) && entry.order < order) : [];
|
|
161972
|
+
const end = later.findIndex((entry) => deferred.has(entry.edit.operationId) || !key || !owesOnly(state, entry, first.edit, key));
|
|
161973
|
+
return [...group, ...end < 0 ? later : later.slice(0, end)].map((entry) => entry.edit.operationId);
|
|
161974
|
+
}
|
|
161975
|
+
/** The one value a whole group owes and may share a send for, if there is one. */
|
|
161976
|
+
function soleKey(state, group, target) {
|
|
161977
|
+
const owed = state.operations.get(target.operationId)?.keys.values().next().value;
|
|
161978
|
+
return owed && group.every((entry) => owesOnly(state, entry, target, owed.checkpoint.key)) ? owed.checkpoint.key : null;
|
|
161979
|
+
}
|
|
161980
|
+
function owesOnly(state, entry, target, key) {
|
|
161981
|
+
const operation = state.operations.get(entry.edit.operationId);
|
|
161982
|
+
return operation?.keys.size === 1 && operation.keys.get(valueKeyId(key))?.kind === "queued" && journalTargetKey(entry.edit) === journalTargetKey(target);
|
|
161983
|
+
}
|
|
161984
|
+
/**
|
|
161985
|
+
* A run sends once: the latest queued values of each key its operations still owe.
|
|
161316
161986
|
*
|
|
161317
|
-
* Every operation in a
|
|
161987
|
+
* Every operation in a run of more than one owes the same single key. Grouping needs a text key,
|
|
161318
161988
|
* and a text key names one block or field, so a grouped command can't change two values. Only a
|
|
161319
161989
|
* lone operation owes several keys. A group mixing a one-key and a two-key operation can't be
|
|
161320
161990
|
* built today and isn't designed for: if text keys ever span values, work out how such a group's
|
|
@@ -161399,7 +162069,11 @@ async function runBefore(state, drain, deferred = /* @__PURE__ */ new Set()) {
|
|
|
161399
162069
|
const first = entries.find((entry) => entry.order < order && !deferred.has(entry.edit.operationId) && state.operations.has(entry.edit.operationId));
|
|
161400
162070
|
if (!first) return [];
|
|
161401
162071
|
if (entries.some((entry) => entry.order < first.order && isUnqueuedImmediate(state, entry))) return [];
|
|
161402
|
-
const group =
|
|
162072
|
+
const group = sendRun(state, entries, first, order, deferred);
|
|
162073
|
+
state.journal.dispatch({
|
|
162074
|
+
kind: "run-formed",
|
|
162075
|
+
operationIds: group
|
|
162076
|
+
});
|
|
161403
162077
|
const results = await runGroup(state, group, drain.request);
|
|
161404
162078
|
return results.some(stopsDrain) ? results : [...results, ...await runBefore(state, drain, /* @__PURE__ */ new Set([...deferred, ...group]))];
|
|
161405
162079
|
}
|
|
@@ -169326,7 +170000,7 @@ function applyBindings(bindings, context) {
|
|
|
169326
170000
|
if (value !== void 0 && value !== null) setBindingValue(result, key, value);
|
|
169327
170001
|
continue;
|
|
169328
170002
|
}
|
|
169329
|
-
if (isRecord$
|
|
170003
|
+
if (isRecord$24(bindingSpec)) {
|
|
169330
170004
|
const nested = applyBindings(bindingSpec, context);
|
|
169331
170005
|
if (Object.keys(nested).length > 0) setBindingValue(result, key, nested);
|
|
169332
170006
|
}
|
|
@@ -169367,7 +170041,7 @@ function mergeResolvedBindings(base, resolved) {
|
|
|
169367
170041
|
const merged = { ...base };
|
|
169368
170042
|
for (const [key, resolvedValue] of Object.entries(resolved)) {
|
|
169369
170043
|
const baseValue = merged[key];
|
|
169370
|
-
merged[key] = isRecord$
|
|
170044
|
+
merged[key] = isRecord$24(baseValue) && isRecord$24(resolvedValue) ? mergeResolvedBindings(baseValue, resolvedValue) : resolvedValue;
|
|
169371
170045
|
}
|
|
169372
170046
|
return merged;
|
|
169373
170047
|
}
|
|
@@ -169392,7 +170066,7 @@ function setBindingValue(target, path, value) {
|
|
|
169392
170066
|
current[Number(segment)] = value;
|
|
169393
170067
|
return;
|
|
169394
170068
|
}
|
|
169395
|
-
if (isRecord$
|
|
170069
|
+
if (isRecord$24(current)) current[segment] = value;
|
|
169396
170070
|
return;
|
|
169397
170071
|
}
|
|
169398
170072
|
const nextWantsArray = typeof nextSegment === "string" && isIndex(nextSegment);
|
|
@@ -169401,15 +170075,15 @@ function setBindingValue(target, path, value) {
|
|
|
169401
170075
|
const existing = current[index];
|
|
169402
170076
|
if (nextWantsArray) {
|
|
169403
170077
|
if (!Array.isArray(existing)) current[index] = [];
|
|
169404
|
-
} else if (!isRecord$
|
|
170078
|
+
} else if (!isRecord$24(existing)) current[index] = {};
|
|
169405
170079
|
current = current[index];
|
|
169406
170080
|
continue;
|
|
169407
170081
|
}
|
|
169408
|
-
if (isRecord$
|
|
170082
|
+
if (isRecord$24(current)) {
|
|
169409
170083
|
const existing = current[segment];
|
|
169410
170084
|
if (nextWantsArray) {
|
|
169411
170085
|
if (!Array.isArray(existing)) current[segment] = [];
|
|
169412
|
-
} else if (!isRecord$
|
|
170086
|
+
} else if (!isRecord$24(existing)) current[segment] = {};
|
|
169413
170087
|
current = current[segment];
|
|
169414
170088
|
continue;
|
|
169415
170089
|
}
|
|
@@ -169447,7 +170121,7 @@ function getPath(source, path) {
|
|
|
169447
170121
|
const segments = path.split(".").map((segment) => segment.trim()).filter(Boolean);
|
|
169448
170122
|
let current = source;
|
|
169449
170123
|
for (const segment of segments) {
|
|
169450
|
-
if (!isRecord$
|
|
170124
|
+
if (!isRecord$24(current)) return void 0;
|
|
169451
170125
|
current = current[segment];
|
|
169452
170126
|
}
|
|
169453
170127
|
return current;
|
|
@@ -169480,7 +170154,7 @@ function textToInlineText(value) {
|
|
|
169480
170154
|
function extractFirstParagraph(value) {
|
|
169481
170155
|
if (!isRichTextDoc(value)) return null;
|
|
169482
170156
|
for (const node of value.content) {
|
|
169483
|
-
if (!isRecord$
|
|
170157
|
+
if (!isRecord$24(node)) continue;
|
|
169484
170158
|
if (node.type !== "paragraph" || !Array.isArray(node.content)) continue;
|
|
169485
170159
|
const text = node.content.filter((item) => item.type === "text").map((item) => typeof item.text === "string" ? item.text : "").join("").trim();
|
|
169486
170160
|
if (text.length > 0) return text;
|
|
@@ -169491,7 +170165,7 @@ function extractFirstParagraph(value) {
|
|
|
169491
170165
|
* Type guard to check if a value is a valid binding descriptor.
|
|
169492
170166
|
*/
|
|
169493
170167
|
function isBindingDescriptor(value) {
|
|
169494
|
-
if (!isRecord$
|
|
170168
|
+
if (!isRecord$24(value) || typeof value.source !== "string") return false;
|
|
169495
170169
|
if (!BINDING_SOURCES.includes(value.source)) return false;
|
|
169496
170170
|
switch (value.source) {
|
|
169497
170171
|
case "field":
|
|
@@ -169506,7 +170180,7 @@ function isBindingDescriptor(value) {
|
|
|
169506
170180
|
* Type guard to check if a value is binding-descriptor-like (can be normalized).
|
|
169507
170181
|
*/
|
|
169508
170182
|
function isBindingDescriptorLike(value) {
|
|
169509
|
-
return isBindingDescriptor(value) || typeof value === "string" || isRecord$
|
|
170183
|
+
return isBindingDescriptor(value) || typeof value === "string" || isRecord$24(value) && typeof value.source === "string" && typeof value.path === "string";
|
|
169510
170184
|
}
|
|
169511
170185
|
/**
|
|
169512
170186
|
* Normalizes a binding input to a binding descriptor.
|
|
@@ -172245,4 +172919,4 @@ function usePreviewAssistantSlot() {
|
|
|
172245
172919
|
return useContext(PreviewAssistantSlotContext);
|
|
172246
172920
|
}
|
|
172247
172921
|
//#endregion
|
|
172248
|
-
export { useFooterComposerState as $, richTextVariantCapabilities as $a, createContextScope as $c, themeRuntimeScopeProps as $i, renderableMediaAssetSchema as $l, readSliderFieldUiConfig as $n, gradientToCss as $o, selectBlockContent as $r, Dialog as $s, listEntryPageContentSlots as $t, editorBlockCollectionOwnersEqual as $u, usePreviewJoinOutcome as A, faqHeadingFragment as Aa, __spreadArray as Ac, resolveMediaSlotContract as Ai, buttonStyleSelectionKey as Al, lifecycleOutcomeMessage as An, backgroundImagePromotedFieldPath as Ao, LocationMapView as Ar, resolveBlockTitle as As, toRoutableLinkPayload as At, parseBrevoListId as Au, initPreviewAuth as B, BLOCK_BUTTON_ROLE_OPTIONS as Ba, Content$1 as Bc, setContextResolveImageUrlContext as Bi, paletteValueKey as Bl, withoutServerVersions as Bn, concretePaletteFromTheme as Bo, defaultTransforms as Br, publicMapLocationParamsSchema as Bs, derivePromotedFieldPlan as Bt, readEditorBlockVersionsFromPlacement as Bu, pageDesignLookTiles as C, pageTemplateFromEntry as Ca, ReactRemoveScroll as Cc, getRichTextImageSize as Ci, siteOptionSources as Cl, recoveryConflictCopy as Cn, buildThemeRuntime as Co, arrangementHooksFromContent as Cr, flowRepeaterGridItems as Cs, EditorWriteSurface as Ct, setFooterSectionSelected as Cu, ObservedJoin as D, headingFragment as Da, __generator as Dc, resolveMediaStorageUrl as Di, resolveButtonStyleSelection as Dl, parseStoredSidebarWidth as Dn, getResponsiveScopeSpec as Do, buildLoadedOfferingsPreviewListing as Dr, resolveRepeaterGridAcceptedSpans as Ds, sendPageCommand as Dt, DEFAULT_MAILING_LIST_TARGETING as Du, selectedImageFromRenderableAsset as E, richTextFragment as Ea, __extends as Ec, resolveImageUrlWithContext as Ei, findButtonStyleRecipe as El, SIDEBAR_WIDTH as En, DEFAULT_THEME_RESPONSIVE_MODE as Eo, getDefaultComponentRegistry as Er, planRepeaterGridStartNewRow as Es, getEditorClientId as Et, parseMailingListPlacementTargeting as Eu, lookTilePosition as F, testimonialsCarouselFragment as Fa, createRovingFocusGroupScope as Fc, systemCustomizeFacetDefinitionForBlock as Fi, rgbColorValue as Fl, renderSourceFor as Fn, resolveEditorArrangementLook as Fo, siblingPath as Fr, editorAdmissionNotice as Fs, NewsletterFormClient as Ft, knownSocialPlatforms as Fu, renderSiteChromeBlock as G, defineFragment as Ga, FocusScope as Gc, isOfferingsPreviewSourceKey as Gi, formatAspectRatioToken as Gl, createManifestFormAdapter as Gn, componentRuntimeRulesForTheme as Go, createEditorPresentationPageReader as Gr, selectedCanvasBlockId as Gs, hasVisibilityConditions as Gt, knownRevision as Gu, renewPreviewSession as H, heroCopyFragment as Ha, createPopperScope as Hc, OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS as Hi, expandPalette as Hl, unsafeAsLinkedContentEntryId as Hn, lookDefinitionForId as Ho, resolvePageRouteTarget as Hr, ApiEnvelopeError as Hs, evaluateVisibility as Ht, selectedContentVersionId as Hu, lookTilesFor as I, testimonialsHeadingFragment as Ia, Presence as Ic, systemCustomizeFacetDefinitionsForBlock as Ii, textColorStyle as Il, renderedFieldChanges as In, restoreCompiledRuntimeFieldsFromContent as Io, withValueAtPath as Ir, editorAdmissionSession as Is, ImageResolveContextProvider as It, parsePublicProfile as Iu, footerLayoutSelection as J, validateManifestDraft as Ja, useCallbackRef$1 as Jc, planOfferingPreviewCardSelection as Ji, getDirectImageUrlForMediaAsset as Jl, getFieldDefault as Jn, headerStyleRecipeForTheme as Jo, mapOutlineRegions as Jr, VISUALLY_HIDDEN_STYLES as Js, createBlock as Jt, valueStatus as Ju, siteChromeHeaderLogoMayBeHardToSee as K, runTransforms as Ka, useFocusGuards as Kc, normalizeOfferingsPreviewGroupOrder as Ki, parseAspectRatioValue as Kl, createManifestValidation as Kn, designRuntimeRulesForTheme as Ko, allOutlineBlocks as Kr, sidebarReturnView as Ks, isNonEmptyValue as Kt, pristineValueSync as Ku, nextLookTilePin as L, ctaCopyFragment as La, Portal as Lc, systemCustomizeFacetStoredValue as Li, mapDrawingStyle as Ll, resolveRenderedValues as Ln, formatSiteChromeBackgroundTokenLabel as Lo, LINKED_CONTENT_ENTRY_META_KEY as Lr, observeEditorAdmission as Ls, useImageResolveContextOptional as Lt, publicProfileWeekdays as Lu, usePreviewRenderReadiness as M, singleButtonFragment as Ma, hideOthers as Mc, resolveArrangementKnobs as Mi, surfaceForegroundInputFromResolved as Ml, activeLinkedSaveHandover as Mn, sectionPhotoPresence as Mo, logger as Mr, isObjectRecord$1 as Ms, updateFooterComposition as Mt, parseMailchimpInterestId as Mu, STYLE_DEFAULT_LOOK_KEY as N, formEmbedFragment as Na, Item$1 as Nc, isSystemCustomizeFacetId as Ni, surfaceForegroundStyle as Nl, planLinkedSaveHandoverRetention as Nn, applyCompiledRuntimeFieldsToContent as No, Text as Nr, isRecord$23 as Ns, footerCreditLine as Nt, parseNewsletterListId as Nu, PreviewRenderObservationsProvider as O, cardFragment as Oa, __read as Oc, SECTION_BACKGROUND_MIN_SOURCE_WIDTH as Oi, updateButtonStyleHoverPreference as Ol, selectAutosaveStatus as On, resolveVisiblePromotedFieldPathsForEditorBlock as Oo, resolveEventDetailsPresentation as Or, resolveRepeaterGridBreakpointForWidth as Os, missingReceiptError as Ot, mailingListTargetingChoiceIds as Ou, lookPositionLabel as P, formCopyFragment as Pa, Root$2 as Pc, systemCustomizeFacetAppliesToLayoutVariant as Pi, surfaceForegroundValue as Pl, remoteDraftValues as Pn, compileEditorModelRuntime as Po, getAtPath as Pr, editorAdmissionIsOpen as Ps, clientComponentRegistry as Pt, knownSocialPlatformLabels as Pu, useFooterAuthoringOptional as Q, isRichTextDoc as Qa, useLayoutEffect2 as Qc, readThemeScopeContext as Qi, buildRenderableMediaAssetIndex as Ql, readNumberFieldUiConfig as Qn, surfaceResolutionContextFromTheme as Qo, readinessFactsFromLoaders as Qr, Spinner as Qs, isSurfaceSlotBlockTarget as Qt, editorBlockCollectionOwnerKey as Qu, selectedLookTile as R, heroCtaRowFragment as Ra, Anchor as Rc, buildResolveImageUrlContext as Ri, parseSurfaceTree as Rl, useStore as Rn, getHeaderLayout as Ro, coerceLinkedContentEntriesPayload as Rr, OPERATION_ID_HEADER as Rs, FormNodeClient as Rt, publishedContactDetails as Ru, pageDesignLookPosition as S, hiddenFromVisitors as Sa, usePortalContainer as Sc, RichText as Si, resolveRepeaterGridSpanFieldId as Sl, useSidebarView as Sn, parseFieldDefinition as So, resolveDefaultBlockTree as Sr, findFirstAvailableRepeaterGridPlacement as Ss, EditLeaseModal as St, resolveFooterSections as Su, selectedImageFromMediaValue as T, bookingConsentCarrierSchema as Ta, __awaiter as Tc, resolveImageSourceSetWithContext as Ti, buttonStyleSelectionParameterValue as Tl, unfinishedBlockCopy as Tn, mergeContentWithBlockStyleOverrides as To, readBlockComposition as Tr, normalizeRepeaterGridSpan as Ts, LeaseNoticeButtons as Tt, planFooterLayout as Tu, usePreviewAuth as U, ctaButton as Ua, useSize as Uc, groupOfferingRunsByCourse as Ui, isRotationDimensionSwap as Ul, editorAuthoredBlockDocument as Un, readStoredMode as Uo, resolveRouteTarget as Ur, extractApiEnvelopeErrorDetails as Us, getFieldIntent as Ut, parseEditLeaseScope as Uu, registerPreviewRenewalFetcher as V, isBlockButtonRole as Va, Root2$1 as Vc, normalizeEventRegistrationPageSurfaceSubject as Vi, defaultThemeTokens as Vl, deriveEditorValuePublicationState as Vn, concretePaletteToTheme as Vo, resolveEntryRouteTarget as Vr, calendarWindowQuerySchema as Vs, collectVisibleWhenWatchPaths as Vt, readPublishedBlockPlacement as Vu, usePreviewToken as W, bodyCopyFragment as Wa, useId$1 as Wc, inferLegacyOfferingsPreviewGroupOrder as Wi, normalizeRightAngle as Wl, initialBlockDraftValues as Wn, defaultPolicyPageFlowPresetId as Wo, fieldsNotShownIn as Wr, unwrapResponse as Ws, getWidgetKey as Wt, displayedValues as Wu, resolveFooterEngagementPreview as X, deriveFieldValidationPlan as Xa, createCollection as Xc, resolveOfferingsPreviewGroupOrderEntries as Xi, mediaSchema as Xl, normalizeFieldForCanonicalValidation as Xn, palettesForSiteStyle as Xo, publishReadinessWarning as Xr, CalloutDescription as Xs, deleteBlock as Xt, createEditorRemoveBlockCommand as Xu, resolveFooterEngagementAuthoringState as Y, admitLayoutGridForPlan as Ya, useDirection as Yc, readOfferingsGrouping as Yi, getImageUrl as Yl, getRepeaterItemDefault as Yn, offeredSiteStyles as Yo, PUBLISH_READINESS_COPY as Yr, Callout as Ys, createSlotBlock as Yt, createEditorInsertBlockCommand as Yu, FooterComposerProvider as Z, RichTextDocSchema as Za, useControllableState as Zc, buildThemeDataAttrs as Zi, runtimeMediaSchema as Zl, getGroupChildFields as Zn, compiledRuntimeStyleFieldNames as Zo, readinessFactsFromPayload as Zr, CalloutTitle as Zs, deleteSlotBlock as Zt, createEditorReorderBlocksCommand as Zu, PreviewFooterProvider as _, resolveDateRuntimeContext as _a, Root$1 as _c, chooseScheduleScope as _i, canEditorWrite as _l, resolveContentTitle as _n, parseInlineTextFromUnknown as _o, createCustomBlockRegistry as _r, isInternalResolvedLinkValue as _s, savedContentReceipt as _t, mailingListProviderName as _u, PreviewPageDesignEditorStateProvider as a, suggestSemanticIconForFeatureCard as aa, DialogTitle as ac, resolveBookingBusinessTimeZone as ad, LOCATION_MAP_LOADER_KEYS as ai, useControlReadiness as al, getDashboardBaseUrl as an, parseGeneratedIconSetId as ao, parseBackgroundColorToken as ar, getSiteFontsStorageUrl as as, readFooterEngagementDraft as at, getFontWidthRange as au, buildPageDesignEditorReadModelForBlocks as b, eventCalendarListGroupingDecision as ba, menuTriggerInteractionClassName as bc, writeEventSelectionChips as bi, resolveRepeaterGridColumnFieldId as bl, useEditorUiStoreInstance as bn, replaceInlineTextRange as bo, makeDefaultBlockComponent as br, planRepeaterGridSpanChange as bs, VIEWING_PARTICIPATION as bt, parseFooterCompositionV1 as bu, usePreviewShownTheme as c, SITE_OVERLAY_HEADER_CLEARANCE_CSS_VAR as ca, Dialog$1 as cc, toUtcIsoDateTimeString as cd, parseLocationMapLoaderResult as ci, createSlottable as cl, SURFACE_DOCUMENT_DATA_ATTRIBUTE as cn, coerceInlineTextWithFallback as co, planBackgroundTransition as cr, sectionTransitionFamilies as cs, EntryControllerProvider as ct, asDesignBlockId as cu, cycleSiteChromeSelectionId as d, measureSiteStickyChromeHeightPx as da, DialogDescription$1 as dc, unsafeAsMediaAssetId as dd, offeringsPreviewBlockDefinition as di, cn as dl, PREVIEW_CHROME_Z_INDEX as dn, inlineTextEqual as do, createPageRenderPlanReader as dr, resolveCompiledSectionContextFromContent as ds, DONE as dt, authoredValuesEqual as du, FEATURE_CARD_GENERATED_ICON_SIZE_PX as ea, DialogClose as ec, unsafeAsEditorBlockId as ed, fieldPathsOwnedBy as ei, composeEventHandlers as el, listPageSurfaceContentSlots as en, sanitizeHref as eo, backgroundColorTokens as er, GRADIENT_PRESETS as es, useFooterPanelOwnsNotice as et, indexRenderableMediaAssets as eu, PreviewThemeJournalProvider as f, measureSiteTopChromeBottomPx as fa, DialogOverlay$1 as fc, unsafeAsPositiveByteCount as fd, publicRouteCandidatesSchema as fi, useShallow as fl, createRoutingHelpers as fn, inlineTextHighlightTones as fo, planArrangementContent as fr, isThemeV2NormalEditorRawStyleFieldName as fs, runHeldLifecycle as ft, generateUuidV4 as fu, previewThemeBase as g, readRuntimeNow as ga, Content as gc, chooseAllEvents as gi, readLinkedEntryLease as gl, resolvePageRouteSlug as gn, normalizeInlineTextMarks as go, retargetJoinsAcrossOmissions as gr, assertNever$5 as gs, createEditorApiClientFactory as gt, resolveMailingListDefaultDestination as gu, composePreviewTheme as h, EDITABLE_SURFACE_FORWARDING_PROP as ha, DialogTrigger$1 as hc, expectParsedBrandedId as hd, EVENT_SELECTION_TYPE_OPTIONS as hi, canWriteLinkedEntry as hl, deriveRouteMetadataPresentation as hn, normalizeInlineText as ho, renderedJoinLayout as hr, lookModes as hs, useSessionJournalHistory as ht, assessMailingListTargeting as hu, usePreviewSidebarNavigation as i, resolveFeatureCardGeneratedIconSizePx as ia, DialogHeader as ic, parseBookingLocalDate as id, normalizeBlockContent as ii, buttonVariants as il, blocksKeys as in, parseGeneratedIconAssetId as io, imagePoolForOverride as ir, generateFontFaceCss as is, footerPartKey as it, asRecord as iu, usePreviewRenderBackgrounds as j, blogFeaturedPostFragment as ja, __spreadArrays as jc, arrangementKnobChoices as ji, parseThemeForPersistence as jl, canDiscardDraft as jn, decideSectionPhoto as jo, renderInlineText as jr, augmentManifestWithStyleGroups as js, publishContentEntry as jt, parseMailchimpAudienceId as ju, PreviewRenderPlanProjection as k, faqAccordionFragment as ka, __rest as kc, resolveMediaSlot as ki, updateButtonStyleSelectionChoice as kl, selectEditorWriteState as kn, heroPhotoPaintsGround as ko, buildAppointmentServicesView as kr, resolveRepeaterGridColumnsForBreakpoint as ks, footerMenuNavigationFacts as kt, sameMailingListPlacementTargeting as ku, SiteChromeCustomizeProvider as l, SITE_STICKY_CHROME_HEIGHT_CSS_VAR as la, DialogClose$1 as lc, assertNever$9 as ld, resolveLocationMapLocation as li, composeRefs as ll, resolveSurfaceDocumentAttributes as ln, deriveInlineTextFieldChanges as lo, rankBackgroundImagePoolItems as lr, sectionTransitionFamilyForBoundaryOptionId as ls, useEntryController as lt, asLayoutVariantKey as lu, usePreviewThemeSourceOptional as m, siteTopChromeMeasurementTargets as ma, DialogTitle$1 as mc, parseSiteId as md, EVENT_SELECTION_SCOPE_OPTIONS as mi, isEdited as ml, routeLifecycleContext as mn, isInlineTextEmpty as mo, joinSlotKey as mr, appearancePresets as ms, useSessionJournal as mt, buildMailingListSignupBlockSourceRef as mu, usePreviewAssistantSlot as n, getFeatureCardIconCompletion as na, DialogDescription as nc, formatDate$4 as nd, getBlockDefinition as ni, dispatchDiscreteCustomEvent as nl, reorderSlotBlocks as nn, getGeneratedBlockIconStyleState as no, defaultBackgroundOverrideForMode as nr, buildFontPreviewUrl as ns, footerHeaderStatus as nt, PUBLIC_FILE_FIELD_KINDS as nu, usePreviewPageDesignEditorState as o, toFeatureCardIconSuggestionInputs as oa, DialogTrigger as oc, resolveBookingTimeZoneId as od, describeUnresolvedLocationMapLocation as oi, cva as ol, getDashboardUrl as on, parseSiteIconStyleGuideVersionId as oo, parseBackgroundOverrideFromContent as or, findCuratedPalette as os, footerEngagementEventFields as ot, isBodyFontFamily as ou, usePreviewThemeSource as p, planSiteOverlayHeaderClearance as pa, DialogPortal$1 as pc, unsafeAsPositiveSeconds as pd, eventCalendarPagingFields as pi, baselineRevisionOf as pl, createSnapshotFromPageRecord as pn, inlineTextToPlainText as po, composePageJoins as pr, isThemeV2NormalEditorRawStylePath as ps, useServerRefresh as pt, slugify as pu, buildFooterRuntimeViewModel as q, compileManifestContentContract as qa, DismissableLayer as qc, offeringsListingFor as qi, resolveMediaTransformForAspect as ql, manifestFieldSectionOptions as qn, getCuratedSiteStyle as qo, mapOutlineBlocks as qr, Root as qs, partitionFieldsByIntent as qt, syncStateOf as qu, PreviewSidebarBootstrap as r, parseFeatureCardGeneratedIconSizePx as ra, DialogFooter as rc, formatDateTime as rd, listBlockDescriptors as ri, Button as rl, withSlotCompositionHash as rn, parseBlockIconValue as ro, enabledBackgroundModes as rr, buildGoogleFontFamilyQuery as rs, footerEngagementStarted as rt, mediaIdentifierSchema as ru, usePreviewPageDesignRenderState as s, SITE_CHROME_VISIBLE_HEADER_SELECTOR as sa, overlayScrimClass as sc, parseUtcIsoDateTimeString as sd, normalizeLocationMapSource as si, createSlot as sl, DEFAULT_SURFACE_ID as sn, applyInlineTextMarkToRange as so, parseCanonicalSectionBackground as sr, defaultSectionTransitionVariantForFamily as ss, parseFooterEngagementDraft as st, asAppearancePresetId as su, PreviewAssistantSlotProvider as t, createFeatureCardIconKey as ta, DialogContent as tc, unsafeAsEditorBlockValues as td, resolveFieldOwnership as ti, Primitive as tl, reorderBlocks as tn, getBlockIconSemanticId as to, canCycleBackgroundOverrideValue as tr, getGradientPreset as ts, SessionJournalHost as tt, resolveManagedMediaReference as tu, useSiteChromeCustomizeOptional as u, SITE_STICKY_CHROME_HEIGHT_FALLBACK as ua, DialogContent$1 as uc, parseMediaAssetId as ud, buildNewsletterFormInteractiveIslandProps as ui, useComposedRefs as ul, ApiRequestError as un, inlineTextAccentTones as uo, resolveBackgroundCapability as ur, sectionTransitionVariantForBoundaryOptionId as us, useEntryEditorController as ut, asSiteStyleId as uu, useLiveFooterRuntime as v, planSiteChromePlacement as va, Trigger as vc, readEventSelectionChips as vi, bindingSchema as vl, planLeaseNotice as vn, plainTextToInlineText as vo, mergeBlockDescriptorsWithRegistry as vr, planLayoutGridColumnEdit as vs, savedPageSurfaceMetadataReceipt as vt, deriveFooterEditorOverview as vu, setPageDesignBlockBackground as w, publicEventsArraySchema as wa, __assign as wc, computeMediaTransformStyle as wi, buttonStyleHoverPreferenceValue as wl, shouldRevealAllBlockFieldValidation as wn, escapeStyleContent as wo, blockLookFromContent as wr, isRepeaterGridLayoutInvalid as ws, LeaseDiscardedNoticeView as wt, unsafeAsFooterModuleId as wu, cyclePageDesignBlockLook as x, projectRecurringSchedule as xa, PortalContainerProvider as xc, cardListPresentationSchemaShape as xi, resolveRepeaterGridRowFieldId as xl, useOptionalEditorUiStoreInstance as xn, truncateInlineText as xo, resolveBlockVariantKey as xr, projectRepeaterGridLayout as xs, EditLeaseDiscardedNotice as xt, parseFooterModuleId as xu, applyBindingsToContent as y, buildFormInteractiveIslandProps as ya, menuItemInteractionClassName as yc, toggleEventType as yi, isAcceptedRepeaterGridSpan as yl, useEditorUiStore as yn, removeInlineTextMarkFromRange as yo, mergeManifestWithSdkOptions as yr, buildRepeaterGridDropTargets as ys, useRetentionTicks as yt, normalizeLegacyFooterContentToV1 as yu, createGuardedPreviewApiClient as z, ctaRowFragment as za, Arrow as zc, getCurrentResolveImageUrlContext as zi, resolveSurfaceForeground as zl, toEditorBlockItem as zn, getHeaderStyle as zo, getLinkedContentEntryMeta as zr, API_ENDPOINTS as zs, BlockApiProvider as zt, NO_BLOCK_VERSIONS as zu };
|
|
172922
|
+
export { useFooterComposerState as $, isRichTextDoc as $a, useLayoutEffect2 as $c, readThemeScopeContext as $i, buildRenderableMediaAssetIndex as $l, readNumberFieldUiConfig as $n, surfaceResolutionContextFromTheme as $o, readinessFactsFromLoaders as $r, Spinner as $s, isSurfaceSlotBlockTarget as $t, editorBlockCollectionOwnerKey as $u, usePreviewJoinOutcome as A, faqAccordionFragment as Aa, __rest as Ac, resolveMediaSlot as Ai, updateButtonStyleSelectionChoice as Al, selectEditorWriteState as An, heroPhotoPaintsGround as Ao, buildAppointmentServicesView as Ar, resolveRepeaterGridColumnsForBreakpoint as As, footerMenuNavigationFacts as At, sameMailingListPlacementTargeting as Au, initPreviewAuth as B, ctaRowFragment as Ba, Arrow as Bc, getCurrentResolveImageUrlContext as Bi, resolveSurfaceForeground as Bl, toEditorBlockItem as Bn, getHeaderStyle as Bo, getLinkedContentEntryMeta as Br, API_ENDPOINTS as Bs, BlockApiProvider as Bt, NO_BLOCK_VERSIONS as Bu, pageDesignLookTiles as C, hiddenFromVisitors as Ca, usePortalContainer as Cc, RichText as Ci, resolveRepeaterGridSpanFieldId as Cl, useSidebarView as Cn, parseFieldDefinition as Co, resolveDefaultBlockTree as Cr, findFirstAvailableRepeaterGridPlacement as Cs, EditorWriteSurface as Ct, resolveFooterSections as Cu, ObservedJoin as D, richTextFragment as Da, __extends as Dc, resolveImageUrlWithContext as Di, findButtonStyleRecipe as Dl, SIDEBAR_WIDTH as Dn, DEFAULT_THEME_RESPONSIVE_MODE as Do, getDefaultComponentRegistry as Dr, planRepeaterGridStartNewRow as Ds, getEditorClientId as Dt, parseMailingListPlacementTargeting as Du, selectedImageFromRenderableAsset as E, bookingConsentCarrierSchema as Ea, __awaiter as Ec, resolveImageSourceSetWithContext as Ei, buttonStyleSelectionParameterValue as El, unfinishedBlockCopy as En, mergeContentWithBlockStyleOverrides as Eo, readBlockComposition as Er, normalizeRepeaterGridSpan as Es, reloadPage as Et, planFooterLayout as Eu, lookTilePosition as F, formCopyFragment as Fa, Root$2 as Fc, systemCustomizeFacetAppliesToLayoutVariant as Fi, surfaceForegroundValue as Fl, remoteDraftValues as Fn, compileEditorModelRuntime as Fo, getAtPath as Fr, editorAdmissionIsOpen as Fs, clientComponentRegistry as Ft, knownSocialPlatformLabels as Fu, renderSiteChromeBlock as G, bodyCopyFragment as Ga, useId$1 as Gc, inferLegacyOfferingsPreviewGroupOrder as Gi, normalizeRightAngle as Gl, initialBlockDraftValues as Gn, defaultPolicyPageFlowPresetId as Go, fieldsNotShownIn as Gr, unwrapResponse as Gs, getWidgetKey as Gt, displayedValues as Gu, renewPreviewSession as H, isBlockButtonRole as Ha, Root2$1 as Hc, normalizeEventRegistrationPageSurfaceSubject as Hi, defaultThemeTokens as Hl, deriveEditorValuePublicationState as Hn, concretePaletteToTheme as Ho, resolveEntryRouteTarget as Hr, calendarWindowQuerySchema as Hs, collectVisibleWhenWatchPaths as Ht, readPublishedBlockPlacement as Hu, lookTilesFor as I, testimonialsCarouselFragment as Ia, createRovingFocusGroupScope as Ic, systemCustomizeFacetDefinitionForBlock as Ii, rgbColorValue as Il, renderSourceFor as In, resolveEditorArrangementLook as Io, siblingPath as Ir, editorAdmissionNotice as Is, NewsletterFormClient as It, knownSocialPlatforms as Iu, footerLayoutSelection as J, compileManifestContentContract as Ja, DismissableLayer as Jc, offeringsListingFor as Ji, resolveMediaTransformForAspect as Jl, manifestFieldSectionOptions as Jn, getCuratedSiteStyle as Jo, mapOutlineBlocks as Jr, Root as Js, partitionFieldsByIntent as Jt, syncStateOf as Ju, siteChromeHeaderLogoMayBeHardToSee as K, defineFragment as Ka, FocusScope as Kc, isOfferingsPreviewSourceKey as Ki, formatAspectRatioToken as Kl, createManifestFormAdapter as Kn, componentRuntimeRulesForTheme as Ko, createEditorPresentationPageReader as Kr, selectedCanvasBlockId as Ks, hasVisibilityConditions as Kt, knownRevision as Ku, nextLookTilePin as L, testimonialsHeadingFragment as La, Presence as Lc, systemCustomizeFacetDefinitionsForBlock as Li, textColorStyle as Ll, renderedFieldChanges as Ln, restoreCompiledRuntimeFieldsFromContent as Lo, withValueAtPath as Lr, editorAdmissionSession as Ls, ImageResolveContextProvider as Lt, parsePublicProfile as Lu, usePreviewRenderReadiness as M, blogFeaturedPostFragment as Ma, __spreadArrays as Mc, arrangementKnobChoices as Mi, parseThemeForPersistence as Ml, canDiscardDraft as Mn, decideSectionPhoto as Mo, renderInlineText as Mr, augmentManifestWithStyleGroups as Ms, publishContentEntry as Mt, parseMailchimpAudienceId as Mu, STYLE_DEFAULT_LOOK_KEY as N, singleButtonFragment as Na, hideOthers as Nc, resolveArrangementKnobs as Ni, surfaceForegroundInputFromResolved as Nl, activeLinkedSaveHandover as Nn, sectionPhotoPresence as No, logger as Nr, isObjectRecord$1 as Ns, updateFooterComposition as Nt, parseMailchimpInterestId as Nu, PreviewRenderObservationsProvider as O, headingFragment as Oa, __generator as Oc, resolveMediaStorageUrl as Oi, resolveButtonStyleSelection as Ol, parseStoredSidebarWidth as On, getResponsiveScopeSpec as Oo, buildLoadedOfferingsPreviewListing as Or, resolveRepeaterGridAcceptedSpans as Os, sendPageCommand as Ot, DEFAULT_MAILING_LIST_TARGETING as Ou, lookPositionLabel as P, formEmbedFragment as Pa, Item$1 as Pc, isSystemCustomizeFacetId as Pi, surfaceForegroundStyle as Pl, planLinkedSaveHandoverRetention as Pn, applyCompiledRuntimeFieldsToContent as Po, Text as Pr, isRecord$24 as Ps, footerCreditLine as Pt, parseNewsletterListId as Pu, useFooterAuthoringOptional as Q, RichTextDocSchema as Qa, useControllableState as Qc, buildThemeDataAttrs as Qi, runtimeMediaSchema as Ql, getGroupChildFields as Qn, compiledRuntimeStyleFieldNames as Qo, readinessFactsFromPayload as Qr, CalloutTitle as Qs, deleteSlotBlock as Qt, createEditorReorderBlocksCommand as Qu, selectedLookTile as R, ctaCopyFragment as Ra, Portal as Rc, systemCustomizeFacetStoredValue as Ri, mapDrawingStyle as Rl, resolveRenderedValues as Rn, formatSiteChromeBackgroundTokenLabel as Ro, LINKED_CONTENT_ENTRY_META_KEY as Rr, observeEditorAdmission as Rs, useImageResolveContextOptional as Rt, publicProfileWeekdays as Ru, pageDesignLookPosition as S, projectRecurringSchedule as Sa, PortalContainerProvider as Sc, cardListPresentationSchemaShape as Si, resolveRepeaterGridRowFieldId as Sl, useOptionalEditorUiStoreInstance as Sn, truncateInlineText as So, resolveBlockVariantKey as Sr, projectRepeaterGridLayout as Ss, EditLeaseModal as St, parseFooterModuleId as Su, selectedImageFromMediaValue as T, publicEventsArraySchema as Ta, __assign as Tc, computeMediaTransformStyle as Ti, buttonStyleHoverPreferenceValue as Tl, shouldRevealAllBlockFieldValidation as Tn, escapeStyleContent as To, blockLookFromContent as Tr, isRepeaterGridLayoutInvalid as Ts, LeaseNoticeButtons as Tt, unsafeAsFooterModuleId as Tu, usePreviewAuth as U, heroCopyFragment as Ua, createPopperScope as Uc, OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS as Ui, expandPalette as Ul, unsafeAsLinkedContentEntryId as Un, lookDefinitionForId as Uo, resolvePageRouteTarget as Ur, ApiEnvelopeError as Us, evaluateVisibility as Ut, selectedContentVersionId as Uu, registerPreviewRenewalFetcher as V, BLOCK_BUTTON_ROLE_OPTIONS as Va, Content$1 as Vc, setContextResolveImageUrlContext as Vi, paletteValueKey as Vl, withoutServerVersions as Vn, concretePaletteFromTheme as Vo, defaultTransforms as Vr, publicMapLocationParamsSchema as Vs, derivePromotedFieldPlan as Vt, readEditorBlockVersionsFromPlacement as Vu, usePreviewToken as W, ctaButton as Wa, useSize as Wc, groupOfferingRunsByCourse as Wi, isRotationDimensionSwap as Wl, editorAuthoredBlockDocument as Wn, readStoredMode as Wo, resolveRouteTarget as Wr, extractApiEnvelopeErrorDetails as Ws, getFieldIntent as Wt, parseEditLeaseScope as Wu, resolveFooterEngagementPreview as X, admitLayoutGridForPlan as Xa, useDirection as Xc, readOfferingsGrouping as Xi, getImageUrl as Xl, getRepeaterItemDefault as Xn, offeredSiteStyles as Xo, PUBLISH_READINESS_COPY as Xr, Callout as Xs, createSlotBlock as Xt, createEditorInsertBlockCommand as Xu, resolveFooterEngagementAuthoringState as Y, validateManifestDraft as Ya, useCallbackRef$1 as Yc, planOfferingPreviewCardSelection as Yi, getDirectImageUrlForMediaAsset as Yl, getFieldDefault as Yn, headerStyleRecipeForTheme as Yo, mapOutlineRegions as Yr, VISUALLY_HIDDEN_STYLES as Ys, createBlock as Yt, valueStatus as Yu, FooterComposerProvider as Z, deriveFieldValidationPlan as Za, createCollection as Zc, resolveOfferingsPreviewGroupOrderEntries as Zi, mediaSchema as Zl, normalizeFieldForCanonicalValidation as Zn, palettesForSiteStyle as Zo, publishReadinessWarning as Zr, CalloutDescription as Zs, deleteBlock as Zt, createEditorRemoveBlockCommand as Zu, PreviewFooterProvider as _, readRuntimeNow as _a, Content as _c, chooseAllEvents as _i, readLinkedEntryLease as _l, resolvePageRouteSlug as _n, normalizeInlineTextMarks as _o, retargetJoinsAcrossOmissions as _r, assertNever$5 as _s, savedContentReceipt as _t, resolveMailingListDefaultDestination as _u, PreviewPageDesignEditorStateProvider as a, resolveFeatureCardGeneratedIconSizePx as aa, DialogHeader as ac, parseBookingLocalDate as ad, normalizeBlockContent as ai, buttonVariants as al, blocksKeys as an, parseGeneratedIconAssetId as ao, imagePoolForOverride as ar, generateFontFaceCss as as, readFooterEngagementDraft as at, asRecord as au, buildPageDesignEditorReadModelForBlocks as b, buildFormInteractiveIslandProps as ba, menuItemInteractionClassName as bc, toggleEventType as bi, isAcceptedRepeaterGridSpan as bl, useEditorUiStore as bn, removeInlineTextMarkFromRange as bo, mergeManifestWithSdkOptions as br, buildRepeaterGridDropTargets as bs, VIEWING_PARTICIPATION as bt, normalizeLegacyFooterContentToV1 as bu, usePreviewShownTheme as c, SITE_CHROME_VISIBLE_HEADER_SELECTOR as ca, overlayScrimClass as cc, resolveBookingBusinessTimeZone as cd, normalizeLocationMapSource as ci, createSlot as cl, DEFAULT_SURFACE_ID as cn, applyInlineTextMarkToRange as co, parseCanonicalSectionBackground as cr, defaultSectionTransitionVariantForFamily as cs, EntryControllerProvider as ct, asAppearancePresetId as cu, cycleSiteChromeSelectionId as d, SITE_STICKY_CHROME_HEIGHT_FALLBACK as da, DialogContent$1 as dc, parseMediaAssetId as dd, buildNewsletterFormInteractiveIslandProps as di, useComposedRefs as dl, ApiRequestError as dn, inlineTextAccentTones as do, resolveBackgroundCapability as dr, sectionTransitionVariantForBoundaryOptionId as ds, DONE as dt, asSiteStyleId as du, themeRuntimeScopeProps as ea, Dialog as ec, editorBlockCollectionOwnersEqual as ed, selectBlockContent as ei, createContextScope as el, listEntryPageContentSlots as en, richTextVariantCapabilities as eo, readSliderFieldUiConfig as er, gradientToCss as es, useFooterPanelOwnsNotice as et, renderableMediaAssetSchema as eu, PreviewThemeJournalProvider as f, measureSiteStickyChromeHeightPx as fa, DialogDescription$1 as fc, unsafeAsMediaAssetId as fd, offeringsPreviewBlockDefinition as fi, cn as fl, PREVIEW_CHROME_Z_INDEX as fn, inlineTextEqual as fo, createPageRenderPlanReader as fr, resolveCompiledSectionContextFromContent as fs, runHeldLifecycle as ft, authoredValuesEqual as fu, previewThemeBase as g, EDITABLE_SURFACE_FORWARDING_PROP as ga, DialogTrigger$1 as gc, expectParsedBrandedId as gd, EVENT_SELECTION_TYPE_OPTIONS as gi, canWriteLinkedEntry as gl, deriveRouteMetadataPresentation as gn, normalizeInlineText as go, renderedJoinLayout as gr, lookModes as gs, createEditorApiClientFactory as gt, assessMailingListTargeting as gu, composePreviewTheme as h, siteTopChromeMeasurementTargets as ha, DialogTitle$1 as hc, parseSiteId as hd, EVENT_SELECTION_SCOPE_OPTIONS as hi, isEdited as hl, routeLifecycleContext as hn, isInlineTextEmpty as ho, joinSlotKey as hr, appearancePresets as hs, useSessionJournalHistory as ht, buildMailingListSignupBlockSourceRef as hu, usePreviewSidebarNavigation as i, parseFeatureCardGeneratedIconSizePx as ia, DialogFooter as ic, formatDateTime as id, listBlockDescriptors as ii, Button as il, withSlotCompositionHash as in, parseBlockIconValue as io, enabledBackgroundModes as ir, buildGoogleFontFamilyQuery as is, footerPartKey as it, mediaIdentifierSchema as iu, usePreviewRenderBackgrounds as j, faqHeadingFragment as ja, __spreadArray as jc, resolveMediaSlotContract as ji, buttonStyleSelectionKey as jl, lifecycleOutcomeMessage as jn, backgroundImagePromotedFieldPath as jo, LocationMapView as jr, resolveBlockTitle as js, toRoutableLinkPayload as jt, parseBrevoListId as ju, PreviewRenderPlanProjection as k, cardFragment as ka, __read as kc, SECTION_BACKGROUND_MIN_SOURCE_WIDTH as ki, updateButtonStyleHoverPreference as kl, selectAutosaveStatus as kn, resolveVisiblePromotedFieldPathsForEditorBlock as ko, resolveEventDetailsPresentation as kr, resolveRepeaterGridBreakpointForWidth as ks, missingReceiptError as kt, mailingListTargetingChoiceIds as ku, SiteChromeCustomizeProvider as l, SITE_OVERLAY_HEADER_CLEARANCE_CSS_VAR as la, Dialog$1 as lc, resolveBookingTimeZoneId as ld, parseLocationMapLoaderResult as li, createSlottable as ll, SURFACE_DOCUMENT_DATA_ATTRIBUTE as ln, coerceInlineTextWithFallback as lo, planBackgroundTransition as lr, sectionTransitionFamilies as ls, useEntryController as lt, asDesignBlockId as lu, usePreviewThemeSourceOptional as m, planSiteOverlayHeaderClearance as ma, DialogPortal$1 as mc, unsafeAsPositiveSeconds as md, eventCalendarPagingFields as mi, baselineRevisionOf as ml, createSnapshotFromPageRecord as mn, inlineTextToPlainText as mo, composePageJoins as mr, isThemeV2NormalEditorRawStylePath as ms, useSessionJournal as mt, slugify as mu, usePreviewAssistantSlot as n, createFeatureCardIconKey as na, DialogContent as nc, unsafeAsEditorBlockValues as nd, resolveFieldOwnership as ni, Primitive as nl, reorderBlocks as nn, getBlockIconSemanticId as no, canCycleBackgroundOverrideValue as nr, getGradientPreset as ns, footerHeaderStatus as nt, resolveManagedMediaReference as nu, usePreviewPageDesignEditorState as o, suggestSemanticIconForFeatureCard as oa, DialogTitle as oc, parseUtcIsoDateTimeString as od, LOCATION_MAP_LOADER_KEYS as oi, useControlReadiness as ol, getDashboardBaseUrl as on, parseGeneratedIconSetId as oo, parseBackgroundColorToken as or, getSiteFontsStorageUrl as os, footerEngagementEventFields as ot, getFontWidthRange as ou, usePreviewThemeSource as p, measureSiteTopChromeBottomPx as pa, DialogOverlay$1 as pc, unsafeAsPositiveByteCount as pd, publicRouteCandidatesSchema as pi, useShallow as pl, createRoutingHelpers as pn, inlineTextHighlightTones as po, planArrangementContent as pr, isThemeV2NormalEditorRawStyleFieldName as ps, useServerRefresh as pt, generateUuidV4 as pu, buildFooterRuntimeViewModel as q, runTransforms as qa, useFocusGuards as qc, normalizeOfferingsPreviewGroupOrder as qi, parseAspectRatioValue as ql, createManifestValidation as qn, designRuntimeRulesForTheme as qo, allOutlineBlocks as qr, sidebarReturnView as qs, isNonEmptyValue as qt, pristineValueSync as qu, PreviewSidebarBootstrap as r, getFeatureCardIconCompletion as ra, DialogDescription as rc, formatDate$4 as rd, getBlockDefinition as ri, dispatchDiscreteCustomEvent as rl, reorderSlotBlocks as rn, getGeneratedBlockIconStyleState as ro, defaultBackgroundOverrideForMode as rr, buildFontPreviewUrl as rs, footerEngagementStarted as rt, PUBLIC_FILE_FIELD_KINDS as ru, usePreviewPageDesignRenderState as s, toFeatureCardIconSuggestionInputs as sa, DialogTrigger as sc, toUtcIsoDateTimeString as sd, describeUnresolvedLocationMapLocation as si, cva as sl, getDashboardUrl as sn, parseSiteIconStyleGuideVersionId as so, parseBackgroundOverrideFromContent as sr, findCuratedPalette as ss, parseFooterEngagementDraft as st, isBodyFontFamily as su, PreviewAssistantSlotProvider as t, FEATURE_CARD_GENERATED_ICON_SIZE_PX as ta, DialogClose as tc, unsafeAsEditorBlockId as td, fieldPathsOwnedBy as ti, composeEventHandlers as tl, listPageSurfaceContentSlots as tn, sanitizeHref as to, backgroundColorTokens as tr, GRADIENT_PRESETS as ts, SessionJournalHost as tt, indexRenderableMediaAssets as tu, useSiteChromeCustomizeOptional as u, SITE_STICKY_CHROME_HEIGHT_CSS_VAR as ua, DialogClose$1 as uc, assertNever$9 as ud, resolveLocationMapLocation as ui, composeRefs as ul, resolveSurfaceDocumentAttributes as un, deriveInlineTextFieldChanges as uo, rankBackgroundImagePoolItems as ur, sectionTransitionFamilyForBoundaryOptionId as us, useEntryEditorController as ut, asLayoutVariantKey as uu, useLiveFooterRuntime as v, resolveDateRuntimeContext as va, Root$1 as vc, chooseScheduleScope as vi, canEditorWrite as vl, resolveContentTitle as vn, parseInlineTextFromUnknown as vo, createCustomBlockRegistry as vr, isInternalResolvedLinkValue as vs, savedPageSurfaceMetadataReceipt as vt, mailingListProviderName as vu, setPageDesignBlockBackground as w, pageTemplateFromEntry as wa, ReactRemoveScroll as wc, getRichTextImageSize as wi, siteOptionSources as wl, recoveryConflictCopy as wn, buildThemeRuntime as wo, arrangementHooksFromContent as wr, flowRepeaterGridItems as ws, LeaseDiscardedNoticeView as wt, setFooterSectionSelected as wu, cyclePageDesignBlockLook as x, eventCalendarListGroupingDecision as xa, menuTriggerInteractionClassName as xc, writeEventSelectionChips as xi, resolveRepeaterGridColumnFieldId as xl, useEditorUiStoreInstance as xn, replaceInlineTextRange as xo, makeDefaultBlockComponent as xr, planRepeaterGridSpanChange as xs, EditLeaseDiscardedNotice as xt, parseFooterCompositionV1 as xu, applyBindingsToContent as y, planSiteChromePlacement as ya, Trigger as yc, readEventSelectionChips as yi, bindingSchema as yl, planLeaseNotice as yn, plainTextToInlineText as yo, mergeBlockDescriptorsWithRegistry as yr, planLayoutGridColumnEdit as ys, useRetentionTicks as yt, deriveFooterEditorOverview as yu, createGuardedPreviewApiClient as z, heroCtaRowFragment as za, Anchor as zc, buildResolveImageUrlContext as zi, parseSurfaceTree as zl, useStore as zn, getHeaderLayout as zo, coerceLinkedContentEntriesPayload as zr, OPERATION_ID_HEADER as zs, FormNodeClient as zt, publishedContactDetails as zu };
|