@riverbankcms/sdk 0.174.1 → 0.176.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/dist/_dts/{BlocksIslandsHydrator-YRmc-Yxz.d.ts → BlocksIslandsHydrator-DvoTk7Py.d.ts} +1 -1
- package/dist/_dts/{Page-Du0zX1B-.d.ts → Page-D-l374tU.d.ts} +8 -16
- package/dist/_dts/{SdkPreviewMode-4L8v3FkY.d.ts → SdkPreviewMode-22DdQAj5.d.ts} +2 -2
- package/dist/_dts/{client-B1J6Akyf.d.ts → client-D4p0J1lK.d.ts} +487 -11
- package/dist/_dts/{content-types-CGGYI0u_.d.ts → content-types-0WWR6dC4.d.ts} +2 -2
- package/dist/_dts/{contracts-CHMlw9hT.d.ts → contracts-f_ZG_SwY.d.ts} +8 -8
- package/dist/_dts/{footerPageOutline-DIHSU1Vr.d.ts → footerPageOutline-DSeZvOaj.d.ts} +85 -8
- package/dist/_dts/{generatePageMetadata-JITXD6BU.d.ts → generatePageMetadata-BlitPA2D.d.ts} +2 -2
- package/dist/_dts/{index-BLEKFHt1.d.ts → index-CKkkCgb6.d.ts} +1 -1
- package/dist/_dts/{index-yWDbUojb.d.ts → index-CoLcwjqJ.d.ts} +1 -1
- package/dist/_dts/{index-DpJm0NpL.d.ts → index-D-ai8IQd.d.ts} +4 -4
- package/dist/_dts/{index-CXZSy_9M.d.ts → index-DDsfmM4d.d.ts} +2 -2
- package/dist/_dts/{index-CF62FntA.d.ts → index-EJMo-KSo.d.ts} +2 -2
- package/dist/_dts/{index-D9ZYmGAJ.d.ts → index-ZKEDvLuN.d.ts} +1 -1
- package/dist/_dts/{index-BgOr1Xyz.d.ts → index-tcPtGdag.d.ts} +3 -3
- package/dist/_dts/{loadContent-M-s0p0rq.d.ts → loadContent-Ci932ORy.d.ts} +7 -7
- package/dist/_dts/{request-BK-pHf0P.d.ts → request-B8jVdvgI.d.ts} +1993 -407
- package/dist/_dts/{resolveBlockData-DZAlnhwt.d.ts → resolveBlockData-DrSMuD76.d.ts} +5 -5
- package/dist/_dts/{resolvePageContent-DXUCWJ3y.d.ts → resolvePageContent-Be4iL6-F.d.ts} +2 -2
- package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
- package/dist/_dts/sdk/src/client/types.d.ts +2 -2
- package/dist/_dts/sdk/src/client.d.ts +7 -7
- package/dist/_dts/sdk/src/config/index.d.ts +6 -6
- package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
- package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
- package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
- package/dist/_dts/sdk/src/data/types.d.ts +2 -2
- package/dist/_dts/sdk/src/gifting/client.d.ts +13 -1
- 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 +7 -7
- package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
- package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
- package/dist/_dts/sdk/src/portal/client.d.ts +3 -2
- 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 +5 -177
- 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 +5 -5
- package/dist/_dts/sdk/src/server.d.ts +5 -5
- package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
- package/dist/_dts/sdk/src/theme/index.d.ts +2 -1
- package/dist/_dts/{types-CwmB2NHU.d.ts → types-BXMX4z2j.d.ts} +7 -7
- package/dist/_dts/{types-DjVNADXR.d.ts → types-DXY64Xh4.d.ts} +4 -4
- package/dist/_dts/{types-Dmow_FI6.d.ts → types-lwSgCWZ4.d.ts} +11 -2
- package/dist/_dts/{validation-h8t1HLlL.d.ts → validation-C5xp--Fu.d.ts} +7 -4
- package/dist/client/{BlocksIslandsHydrator-DRVx_XLi.mjs → BlocksIslandsHydrator-CeYQQQs7.mjs} +17 -16
- package/dist/client/{BookingMailingListNote-CwrMzj-k.mjs → BookingMailingListNote-CDDWrY_W.mjs} +6 -6
- package/dist/client/{BookingPanelArrangement-C2_hFT6K.mjs → BookingPanelArrangement-BShQSial.mjs} +1 -1
- package/dist/client/{BookingQuestionFields-DZMrGvBh.mjs → BookingQuestionFields-MbvIo2jS.mjs} +3 -3
- package/dist/client/{CalendarNavigationChevron-Az1-TIEI.mjs → CalendarNavigationChevron-C6CSVfEB.mjs} +36 -11
- package/dist/client/DemoBookingPortalAccess-C9Ggcfx3.mjs +545 -0
- package/dist/client/{EventCalendar.client-CDkkP-Lv.mjs → EventCalendar.client-BSMuSqg0.mjs} +15 -25
- package/dist/client/{EventCombined.client-DK3aaz62.mjs → EventCombined.client-BTrmSyUB.mjs} +25 -17
- package/dist/client/{EventItem-WeUipfIP.mjs → EventItem-B0WjGXsH.mjs} +4 -3
- package/dist/client/{EventListWeekNavigation-D3sbAeDo.mjs → EventListWeekNavigation-8Ij7vuxY.mjs} +1 -1
- package/dist/client/{EventListing.client-DL3gGGmF.mjs → EventListing.client-CWk2NEwd.mjs} +3 -3
- package/dist/client/{EventListing.view-DKFImKOx.mjs → EventListing.view-BEH4UbSL.mjs} +18 -8
- package/dist/client/{EventRegistrationPayment-Dn9TpWyL.mjs → EventRegistrationPayment-B2EikR3f.mjs} +635 -359
- package/dist/client/{LocationMapActions-BJT7MqP2.mjs → LocationMapActions-myIQIvQL.mjs} +1 -1
- package/dist/client/{MapDrawingSvg-DCIwlON6.mjs → MapDrawingSvg-BfsVyPvB.mjs} +2 -22
- package/dist/client/{Page-BpeP9xdt.mjs → Page-F3lhDvw1.mjs} +1036 -953
- package/dist/client/{DemoBookingPortalAccess-1p-pJ1lg.mjs → SiteTermsAgreementField-BYACYP0T.mjs} +4 -301
- package/dist/client/{StepIndicator-CP6zrwkl.mjs → StepIndicator-Bb7rPtSq.mjs} +37 -12
- package/dist/client/{accordion-nR7D4m1a.mjs → accordion-BfsOiweL.mjs} +1 -1
- package/dist/client/{booking-form.client-Ce-mQZ7W.mjs → booking-form.client-B8ohIj13.mjs} +229 -42
- package/dist/client/{bookingForm-B-qT_AQB.mjs → bookingForm-CXsck2oH.mjs} +4 -4
- package/dist/client/bookings.mjs +22 -15
- package/dist/client/{boxStyleClassNames-CrE3TDpW.mjs → boxStyleClassNames-B_hcuT06.mjs} +2 -1
- package/dist/client/{carousel-CVUOatsY.mjs → carousel-Cz5Ddbsx.mjs} +1 -1
- package/dist/client/{cart-DE0K6E0R.mjs → cart-CTC2oS3p.mjs} +3 -3
- package/dist/client/{cart.client-C23E6WQ5.mjs → cart.client-c1YkTC-Q.mjs} +1 -1
- package/dist/client/{checkout-76cdHyPL.mjs → checkout-BeW1ufaH.mjs} +3 -3
- package/dist/client/{checkout.client-DJOzqb26.mjs → checkout.client-BeU32khQ.mjs} +1 -1
- package/dist/client/{checkoutUrls-CvIP5DCO.mjs → checkoutUrls-DVfSUSKp.mjs} +1 -1
- package/dist/client/client.mjs +145 -21
- package/dist/client/{context-CNlesLfF.mjs → context-R9p5c8IH.mjs} +76 -58
- package/dist/client/{course-DHIrXqNT.mjs → course-CUFVJEAc.mjs} +2 -2
- package/dist/client/{creditProducts-KYMVIH3J.mjs → creditProducts-BQ1t1erI.mjs} +14 -61
- package/dist/client/{dateFormatting-B73Ll0s4.mjs → dateFormatting-CF6FWCoo.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-BVbLD4pi.mjs → demoPortalMagicLink-tZxIm3RL.mjs} +1 -1
- package/dist/client/display-4HYOb-AK.mjs +11844 -0
- package/dist/client/{enhanceHeaderSection-5GD5o4Mt.mjs → enhanceHeaderSection-DEYDI54E.mjs} +3 -3
- package/dist/client/{event-details.client-D7Oz1q2L.mjs → event-details.client-BwjBJP-f.mjs} +1 -1
- package/dist/client/{event-registration.client-zbuX36aA.mjs → event-registration.client-DWvSODTI.mjs} +176 -75
- package/dist/client/{eventCalendar-uZrksODt.mjs → eventCalendar-C9Pn9eeZ.mjs} +4 -4
- package/dist/client/{eventCombined-DxhvNAx8.mjs → eventCombined-Bdhk0fp0.mjs} +4 -4
- package/dist/client/{eventDetails-DCIH4BYG.mjs → eventDetails-C2LfNW_o.mjs} +2 -2
- package/dist/client/{eventListing-B9KrnPvc.mjs → eventListing-B-bJOQUk.mjs} +4 -4
- package/dist/client/{eventRegistration-TjnURMKl.mjs → eventRegistration-CbdmUiDT.mjs} +4 -4
- package/dist/client/{form-CfqIAhfN.mjs → form-BbUUt784.mjs} +3 -3
- package/dist/client/{form.client-CL6fF0cW.mjs → form.client-BVlz-9_t.mjs} +4 -4
- package/dist/client/{form.parts-Bf-L66Gg.mjs → form.parts-TB4UIrML.mjs} +1 -1
- package/dist/client/{formatDate-Dp7POa9Y.mjs → formatDate-TDHhFjFN.mjs} +1 -1
- package/dist/client/gifting/client.mjs +5 -3
- package/dist/client/gifting-CbNSrp7C.mjs +28 -0
- package/dist/client/gifting.client-B__bGhFc.mjs +404 -0
- package/dist/client/gifting.parts-CTA1sDW6.mjs +86 -0
- package/dist/client/{headerSection-WVXtOcuW.mjs → headerSection-5Wn9nUW_.mjs} +2 -2
- package/dist/client/{display-Cf_j5stk.mjs → lookSurfaces-BwiNdgMU.mjs} +2951 -14395
- package/dist/client/{newsletter-form.client-Bb7GAZpO.mjs → newsletter-form.client-B17WYHxZ.mjs} +7 -5
- package/dist/client/{newsletter-form.parts-BqOVRdIc.mjs → newsletter-form.parts-DN9wD1ZG.mjs} +3 -3
- package/dist/client/{newsletterForm-DOVe-qY3.mjs → newsletterForm-DLMlxInp.mjs} +3 -3
- package/dist/client/{noop-D5mFWXtN.mjs → noop-CaQxI-Js.mjs} +94 -36
- package/dist/client/portal/client.mjs +313 -148
- package/dist/client/{product-detail.client-CNzeFnFf.mjs → product-detail.client-Di_anRGR.mjs} +1 -1
- package/dist/client/{product-list.client-LKpzC7pj.mjs → product-list.client-Duhl6rtL.mjs} +1 -1
- package/dist/client/{productDetail-D2JNeEgx.mjs → productDetail-BgKmCwA8.mjs} +3 -3
- package/dist/client/{productList-DTgZXOEq.mjs → productList-C_wMKsYS.mjs} +3 -3
- package/dist/client/{propsDecoder-mpBQt2AT.mjs → propsDecoder-y3LvxaiG.mjs} +4 -3
- package/dist/client/{registry.server-DdTJyar2.mjs → registry.server-CIWYKz1V.mjs} +369 -246
- package/dist/client/rendering/client.mjs +25 -491
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +87 -21
- package/dist/client/{richText-coerce-C32cRQ03.mjs → richText-coerce-DkPBFb_a.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-8cfSgT0E.mjs → routeIslandApiConfig-BgO0rZce.mjs} +1 -1
- package/dist/client/{shop-5LBhftWx.mjs → shop-CFbWlv_W.mjs} +3 -3
- package/dist/client/{shop-discount-apply.state-D0ifS6KX.mjs → shop-add-feedback-DvC2kP1K.mjs} +1 -78
- package/dist/client/{shop-commerce-DkValjZj.mjs → shop-commerce-C-I29eaA.mjs} +64 -32
- package/dist/client/{shop-commerce-store-BOmXFmk_.mjs → shop-commerce-store-DGcc7twO.mjs} +1 -1
- package/dist/client/shop-discount-apply.state-DOm7vx0X.mjs +83 -0
- package/dist/client/{shop.client-BTtZqNmv.mjs → shop.client-GHTWUKD6.mjs} +56 -19
- package/dist/client/{shop.interactive-DNRqG4aX.mjs → shop.interactive-CxDJ8P2r.mjs} +113 -35
- package/dist/client/{shopShared-Nky6kPYr.mjs → shopShared-Be9QJJpT.mjs} +2 -2
- package/dist/client/{timetableModel-DZArznD_.mjs → timetableModel--R0zVzZO.mjs} +10 -10
- package/dist/client/{useAvailableSlots-CUVRD1nx.mjs → useAvailableSlots-BGu_2F50.mjs} +3 -3
- package/dist/client/{useDiscountCodeUi-d7viY_mu.mjs → useDiscountCodeUi-I_mXI9Yd.mjs} +32 -17
- package/dist/client/{useEventPagination-Da2JqxGC.mjs → useEventPagination-DxIJ--JZ.mjs} +7 -6
- package/dist/client/{view-BvuYmQJ5.mjs → view-3foOzGWR.mjs} +3 -2
- package/dist/client/{view-D9ObkFtz.mjs → view-BbzH5MQb.mjs} +128 -32
- package/dist/preview-next/client/{PageSectionToolbar-DwxHT-2k.mjs → PageSectionToolbar-0xyUPWUB.mjs} +4 -4
- package/dist/preview-next/client/{PreviewEditorSidebar-D4SBxGU6.mjs → PreviewEditorSidebar-D8vUzXtI.mjs} +61 -55
- package/dist/preview-next/client/{PreviewEditorUI-D8mUct32.mjs → PreviewEditorUI-CRjS4gAu.mjs} +4 -4
- package/dist/preview-next/client/{PreviewShell-L2AEdNUQ.mjs → PreviewShell-BvdBdeH_.mjs} +5 -5
- package/dist/preview-next/client/{SdkPreviewModeRuntime-bhVAU2D2.mjs → SdkPreviewModeRuntime-DWTyKbFj.mjs} +156 -143
- package/dist/preview-next/client/{previewAssistantSlot-Jpj_HDra.mjs → previewAssistantSlot-BqY2TTcZ.mjs} +4535 -2913
- package/dist/preview-next/client/{previewChromeRoot-CYTDvx4u.mjs → previewChromeRoot-BuRYe2iL.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-CZHX6J_4.mjs → sdk-runtime-BnK5kH9f.mjs} +2 -2
- package/dist/preview-next/client/{siteStyleAccess-DmGIG9Hk.mjs → siteStyleAccess-DbKozRSn.mjs} +527 -236
- package/dist/preview-next/client/{useAutosaveStatus-DQCyswQ-.mjs → useAutosaveStatus-D9s6dyMW.mjs} +1 -1
- package/dist/preview-next/client/{useOpenBlockForSetup-LwE5yXvL.mjs → useOpenBlockForSetup-Ce4WCxpT.mjs} +28 -5
- package/dist/preview-next/container-responsive.css +51 -3
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-BOuNcOcN.mjs → route-contract-BYezcMx5.mjs} +94 -12
- package/dist/server/{Block.shared-wfJfhs08.mjs → Block.shared-Cn7gg13_.mjs} +84 -16
- package/dist/server/{ThemeScopeCore-BtrJNHTB.mjs → ThemeScopeCore-DFEM1a85.mjs} +16 -2
- package/dist/server/{bindings-P1CF2Gm6.mjs → bindings-VGgS6UvF.mjs} +13 -34
- package/dist/server/{client-CGtU5fHI.mjs → client-Bvag5OtW.mjs} +145 -22
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/{customCss-BGB8gMVb.mjs → customCss-BZ8YSrQg.mjs} +1 -0
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/index.mjs +2 -2
- package/dist/server/{loadContent-ChnkJSay.mjs → loadContent-CxASA3PE.mjs} +6 -9
- package/dist/server/{loadPage-DesHhgxj.mjs → loadPage-CQgde5DN.mjs} +2 -2
- package/dist/server/{lookMediaFrame-BBr0mkze.mjs → lookMediaFrame-CaH018pK.mjs} +24 -5
- package/dist/server/mapLocation-BM5WX7FY.mjs +315 -0
- package/dist/server/next.mjs +35 -9
- package/dist/server/{overrideResolution-DHEkHcZs.mjs → overrideResolution-BqVLO4gX.mjs} +1 -1
- package/dist/server/page-converter.mjs +1 -1
- package/dist/server/{pageRenderPlan-0jvm0RBk.mjs → pageRenderPlan-CfSnAkCO.mjs} +67 -40
- package/dist/server/{pageRuntimeSupport-8-f1Zr9e.mjs → pageRuntimeSupport-uz4gzBOo.mjs} +7 -15
- package/dist/server/{pageShared-CuVFoV4z.mjs → pageShared-D23o5QgC.mjs} +1068 -891
- package/dist/server/{parseThemeForPersistence-Cwqb5pZx.mjs → parseThemeForPersistence-DOsfofCy.mjs} +1 -1
- package/dist/server/{prebuild-Bms_Y7wQ.mjs → prebuild-BuoXWT9y.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-5oC5kyHe.mjs → prefetchBlockData-CCiYV8_s.mjs} +21 -6
- package/dist/server/{registry-DmqxC8th.mjs → registry-CXRXsFSx.mjs} +19721 -19621
- 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 +4 -4
- package/dist/server/rendering.mjs +7 -7
- package/dist/server/{resolveBlockData-EYogtwQc.mjs → resolveBlockData-yfe8WLEA.mjs} +1 -1
- package/dist/server/{responseMedia-DpBC1hTM.mjs → responseMedia-F-ElH2Rd.mjs} +1 -0
- package/dist/server/{schema-CUDHMirj.mjs → schema-BpsqaSSU.mjs} +2 -2
- package/dist/server/server.mjs +3 -3
- package/dist/server/theme-bridge.mjs +1 -1
- package/dist/server/theme.mjs +2 -2
- package/dist/server/{validation-Bt_8IL1g.mjs → validation-CozQ7wE0.mjs} +4 -4
- package/dist/server/{version-DT_efohp.mjs → version-CgCWRFEY.mjs} +1 -1
- package/dist/styles/index.css +295 -37
- package/package.json +1 -1
- package/dist/client/useDiscountApply-BBnStWXU.mjs +0 -199
- package/dist/server/identity-DQD_8lNO.mjs +0 -6
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import { C as ok, S as err, x as parseUuidBrand } from "./media-luf7RF22.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region ../core/src/branded/identity.ts
|
|
4
|
+
const unsafeAsSiteId = (id) => id;
|
|
5
|
+
const parseSiteId = (value) => parseUuidBrand(value, unsafeAsSiteId);
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region ../core/src/map-drawing/model.ts
|
|
8
|
+
const MAX_DRAWING_BYTES = 1024 * 1024;
|
|
9
|
+
/** Current real city extracts fit with >2x headroom; reservations precede allocation. */
|
|
10
|
+
const DRAWING_DECODE_LIMITS = {
|
|
11
|
+
pathsPerFeature: 2048,
|
|
12
|
+
verticesPerPath: 8192,
|
|
13
|
+
verticesPerFeature: 32768,
|
|
14
|
+
featuresPerLayer: 1e4,
|
|
15
|
+
featuresPerTile: 16e3,
|
|
16
|
+
featuresPerAttempt: 6e4,
|
|
17
|
+
verticesPerAttempt: 1e6
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* The two fixed framings. Neighbourhood draws 1 m per view-box unit, wider 4 m, so the same stroke and label
|
|
21
|
+
* sizes read well in both. The wider view leaves out buildings, distant paths and small green patches, which turn to
|
|
22
|
+
* noise at that scale. `minParkArea` is in square view-box units. Labels go to the nearest streets first, with a
|
|
23
|
+
* minor street counted as `minorLabelDistance` times further away than it is, so the wider view names main roads.
|
|
24
|
+
*/
|
|
25
|
+
const FRAMINGS = [{
|
|
26
|
+
name: "neighbourhood",
|
|
27
|
+
radiusMeters: 400,
|
|
28
|
+
zoom: 15,
|
|
29
|
+
roads: [
|
|
30
|
+
"major",
|
|
31
|
+
"minor",
|
|
32
|
+
"path"
|
|
33
|
+
],
|
|
34
|
+
maxPathDistance: 800,
|
|
35
|
+
buildings: true,
|
|
36
|
+
minParkArea: .3,
|
|
37
|
+
maxLabels: 6,
|
|
38
|
+
minorLabelDistance: 1.5
|
|
39
|
+
}, {
|
|
40
|
+
name: "wider",
|
|
41
|
+
radiusMeters: 1600,
|
|
42
|
+
zoom: 14,
|
|
43
|
+
roads: [
|
|
44
|
+
"major",
|
|
45
|
+
"minor",
|
|
46
|
+
"path"
|
|
47
|
+
],
|
|
48
|
+
maxPathDistance: 100,
|
|
49
|
+
buildings: false,
|
|
50
|
+
minParkArea: 40,
|
|
51
|
+
maxLabels: 5,
|
|
52
|
+
minorLabelDistance: 4
|
|
53
|
+
}];
|
|
54
|
+
const tilePoint = z.tuple([z.number().finite().min(-8192).max(12288), z.number().finite().min(-8192).max(12288)]).readonly();
|
|
55
|
+
const paths = z.array(z.array(tilePoint).min(2).max(DRAWING_DECODE_LIMITS.verticesPerPath).readonly()).min(1).max(DRAWING_DECODE_LIMITS.pathsPerFeature).readonly();
|
|
56
|
+
const featureFields = {
|
|
57
|
+
kind: z.string().max(80),
|
|
58
|
+
name: z.string().trim().max(60).regex(/^[^<>\u0000-\u001f\u007f]*$/).nullish().transform((value) => value === void 0 || value === null || value === "" ? null : value),
|
|
59
|
+
sortRank: z.number().finite().min(-1e4).max(1e4).default(0),
|
|
60
|
+
paths: paths.refine((value) => value.reduce((n, path) => n + path.length, 0) <= DRAWING_DECODE_LIMITS.verticesPerFeature)
|
|
61
|
+
};
|
|
62
|
+
const feature = z.discriminatedUnion("geometry", [z.strictObject({
|
|
63
|
+
...featureFields,
|
|
64
|
+
layer: z.literal("roads"),
|
|
65
|
+
geometry: z.literal("line")
|
|
66
|
+
}).readonly(), z.strictObject({
|
|
67
|
+
...featureFields,
|
|
68
|
+
layer: z.enum([
|
|
69
|
+
"earth",
|
|
70
|
+
"water",
|
|
71
|
+
"landuse",
|
|
72
|
+
"buildings"
|
|
73
|
+
]),
|
|
74
|
+
geometry: z.literal("polygon")
|
|
75
|
+
}).refine((value) => value.paths.every((ring) => ring.length >= 3)).readonly()]);
|
|
76
|
+
const tile = z.strictObject({
|
|
77
|
+
z: z.union([z.literal(14), z.literal(15)]),
|
|
78
|
+
x: z.number().int().nonnegative(),
|
|
79
|
+
y: z.number().int().nonnegative(),
|
|
80
|
+
extent: z.literal(4096),
|
|
81
|
+
features: z.array(feature).max(DRAWING_DECODE_LIMITS.featuresPerTile).readonly()
|
|
82
|
+
}).refine((value) => value.x < 2 ** value.z && value.y < 2 ** value.z).readonly();
|
|
83
|
+
z.strictObject({
|
|
84
|
+
buildId: z.string().regex(/^\d{8}$/),
|
|
85
|
+
tileSchemaVersion: z.string().regex(/^4\.\d+\.\d+$/),
|
|
86
|
+
pin: z.lazy(() => locationPinSchema),
|
|
87
|
+
tiles: z.array(tile).min(1).max(96).readonly()
|
|
88
|
+
}).superRefine((value, ctx) => {
|
|
89
|
+
const features = value.tiles.flatMap((item) => item.features);
|
|
90
|
+
if (features.length > DRAWING_DECODE_LIMITS.featuresPerAttempt || features.reduce((sum, item) => sum + item.paths.reduce((count, path) => count + path.length, 0), 0) > DRAWING_DECODE_LIMITS.verticesPerAttempt) ctx.addIssue({
|
|
91
|
+
code: "custom",
|
|
92
|
+
message: "Decoded geometry exceeds the attempt budget."
|
|
93
|
+
});
|
|
94
|
+
}).readonly();
|
|
95
|
+
const point = z.tuple([z.number().min(0).max(800), z.number().min(0).max(800)]).readonly();
|
|
96
|
+
const polygon = z.strictObject({
|
|
97
|
+
kind: z.literal("polygon"),
|
|
98
|
+
fillRule: z.literal("evenodd"),
|
|
99
|
+
className: z.enum([
|
|
100
|
+
"map-land",
|
|
101
|
+
"map-water",
|
|
102
|
+
"map-park",
|
|
103
|
+
"map-building"
|
|
104
|
+
]),
|
|
105
|
+
rings: z.array(z.array(point).min(3).max(8192).readonly()).min(1).max(DRAWING_DECODE_LIMITS.pathsPerFeature).readonly()
|
|
106
|
+
}).readonly();
|
|
107
|
+
const line = z.strictObject({
|
|
108
|
+
kind: z.literal("line"),
|
|
109
|
+
className: z.enum([
|
|
110
|
+
"map-road-major-casing",
|
|
111
|
+
"map-road-major",
|
|
112
|
+
"map-road-minor-casing",
|
|
113
|
+
"map-road-minor",
|
|
114
|
+
"map-road-path"
|
|
115
|
+
]),
|
|
116
|
+
points: z.array(point).min(2).max(8192).readonly()
|
|
117
|
+
}).readonly();
|
|
118
|
+
const drawingPathSchema = z.discriminatedUnion("kind", [polygon, line]);
|
|
119
|
+
const label = z.strictObject({
|
|
120
|
+
className: z.literal("map-label"),
|
|
121
|
+
haloClassName: z.literal("map-label-halo"),
|
|
122
|
+
text: z.string().trim().min(1).max(60).regex(/^[^<>\u0000-\u001f\u007f]*$/),
|
|
123
|
+
point,
|
|
124
|
+
angle: z.number().min(-90).max(90)
|
|
125
|
+
}).readonly();
|
|
126
|
+
const drawingFrameSchema = z.strictObject({
|
|
127
|
+
radiusMeters: z.union([z.literal(FRAMINGS[0].radiusMeters), z.literal(FRAMINGS[1].radiusMeters)]),
|
|
128
|
+
viewBox: z.tuple([
|
|
129
|
+
z.literal(0),
|
|
130
|
+
z.literal(0),
|
|
131
|
+
z.literal(800),
|
|
132
|
+
z.literal(800)
|
|
133
|
+
]).readonly(),
|
|
134
|
+
backgroundClass: z.literal("map-water"),
|
|
135
|
+
paths: z.array(drawingPathSchema).max(1800).readonly(),
|
|
136
|
+
labels: z.array(label).max(12).readonly(),
|
|
137
|
+
pin: z.strictObject({
|
|
138
|
+
className: z.literal("map-pin"),
|
|
139
|
+
point: z.tuple([z.literal(400), z.literal(400)]).readonly()
|
|
140
|
+
}).readonly()
|
|
141
|
+
}).superRefine((value, ctx) => {
|
|
142
|
+
if (value.paths.reduce((sum, path) => sum + (path.kind === "line" ? path.points.length : path.rings.reduce((n, ring) => n + ring.length, 0)), 0) > 5e4) ctx.addIssue({
|
|
143
|
+
code: "custom",
|
|
144
|
+
message: "Drawing exceeds its vertex budget."
|
|
145
|
+
});
|
|
146
|
+
}).readonly();
|
|
147
|
+
const mapDrawingSchema = z.strictObject({
|
|
148
|
+
schemaVersion: z.literal(2),
|
|
149
|
+
generatorVersion: z.literal(3),
|
|
150
|
+
buildId: z.string().regex(/^\d{8}$/),
|
|
151
|
+
tileSchemaVersion: z.string().regex(/^4\.\d+\.\d+$/),
|
|
152
|
+
frames: z.strictObject({
|
|
153
|
+
neighbourhood: drawingFrameSchema,
|
|
154
|
+
wider: drawingFrameSchema
|
|
155
|
+
}).readonly()
|
|
156
|
+
}).refine((value) => value.frames.neighbourhood.radiusMeters === FRAMINGS[0].radiusMeters && value.frames.wider.radiusMeters === FRAMINGS[1].radiusMeters).refine((value) => new TextEncoder().encode(JSON.stringify(value)).byteLength <= MAX_DRAWING_BYTES, { error: "Drawing exceeds its byte budget." }).readonly();
|
|
157
|
+
//#endregion
|
|
158
|
+
//#region ../core/src/string.ts
|
|
159
|
+
/**
|
|
160
|
+
* Trim a user-entered string and collapse blank values to null.
|
|
161
|
+
*/
|
|
162
|
+
function trimmedStringOrNull(value) {
|
|
163
|
+
const trimmed = typeof value === "string" ? value.trim() : "";
|
|
164
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
165
|
+
}
|
|
166
|
+
//#endregion
|
|
167
|
+
//#region ../core/src/location.ts
|
|
168
|
+
/** One complete, finite, bounded arrival pin; zero is a valid coordinate. */
|
|
169
|
+
const locationPinSchema = z.strictObject({
|
|
170
|
+
lat: z.number().min(-90).max(90),
|
|
171
|
+
lng: z.number().min(-180).max(180)
|
|
172
|
+
}).readonly().brand();
|
|
173
|
+
const addressPart = z.string().trim().max(200).nullish().transform((value) => trimmedStringOrNull(value));
|
|
174
|
+
/** Building identifies the place; unit/floor refine it without moving it. */
|
|
175
|
+
const locationAddressSchema = z.strictObject({
|
|
176
|
+
building: addressPart,
|
|
177
|
+
unit: addressPart,
|
|
178
|
+
floor: addressPart,
|
|
179
|
+
street: addressPart,
|
|
180
|
+
locality: addressPart,
|
|
181
|
+
region: addressPart,
|
|
182
|
+
postalCode: addressPart,
|
|
183
|
+
country: addressPart.transform((value) => value?.length === 2 ? value.toUpperCase() : value)
|
|
184
|
+
}).readonly().transform((address) => Object.values(address).some((part) => part !== null) ? address : null);
|
|
185
|
+
const locationAddressMatchSchema = z.strictObject({
|
|
186
|
+
point: locationPinSchema,
|
|
187
|
+
precision: z.enum([
|
|
188
|
+
"building",
|
|
189
|
+
"street",
|
|
190
|
+
"area",
|
|
191
|
+
"unknown"
|
|
192
|
+
]),
|
|
193
|
+
placeId: z.string().trim().max(1024).regex(/^[a-z][a-z0-9-]*:\S+$/),
|
|
194
|
+
attribution: z.array(z.strictObject({
|
|
195
|
+
text: z.string().trim().min(1).max(500),
|
|
196
|
+
url: z.url().max(2048).refine((value) => /^https?:\/\//.test(value))
|
|
197
|
+
}).readonly()).min(1).max(4).readonly()
|
|
198
|
+
}).readonly();
|
|
199
|
+
const locationValueSchema = z.strictObject({
|
|
200
|
+
address: locationAddressSchema.nullable().default(null),
|
|
201
|
+
pin: locationPinSchema.nullable().default(null),
|
|
202
|
+
doorNote: z.string().trim().max(1e3).nullish().transform(trimmedStringOrNull),
|
|
203
|
+
addressMatch: locationAddressMatchSchema.nullable().default(null),
|
|
204
|
+
addressCheckSettled: z.literal(true).optional(),
|
|
205
|
+
ownerConfirmedPinAndAddress: z.boolean().default(false)
|
|
206
|
+
}).superRefine((value, context) => {
|
|
207
|
+
if (value.address === null && value.pin === null) context.addIssue({
|
|
208
|
+
code: "custom",
|
|
209
|
+
path: ["address"],
|
|
210
|
+
message: "Use null to remove a location."
|
|
211
|
+
});
|
|
212
|
+
if (value.address === null && value.addressMatch !== null) context.addIssue({
|
|
213
|
+
code: "custom",
|
|
214
|
+
path: ["addressMatch"],
|
|
215
|
+
message: "Address evidence requires an address."
|
|
216
|
+
});
|
|
217
|
+
if (value.address === null && value.addressCheckSettled) context.addIssue({
|
|
218
|
+
code: "custom",
|
|
219
|
+
path: ["addressCheckSettled"],
|
|
220
|
+
message: "A settled address check requires an address."
|
|
221
|
+
});
|
|
222
|
+
if (value.ownerConfirmedPinAndAddress && (value.address === null || value.pin === null)) context.addIssue({
|
|
223
|
+
code: "custom",
|
|
224
|
+
path: ["ownerConfirmedPinAndAddress"],
|
|
225
|
+
message: "Confirmation requires both address and pin."
|
|
226
|
+
});
|
|
227
|
+
}).readonly();
|
|
228
|
+
/** API/DB ingress parses once. Removed locations are represented by null. */
|
|
229
|
+
function parseLocationValue(input) {
|
|
230
|
+
const parsed = locationValueSchema.nullable().safeParse(input);
|
|
231
|
+
return parsed.success ? ok(parsed.data) : err({
|
|
232
|
+
kind: "invalid_location",
|
|
233
|
+
issues: parsed.error.issues
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
/** One display formatter: a known matching site country is redundant. */
|
|
237
|
+
function formatLocationAddress(address, siteCountry) {
|
|
238
|
+
if (address === null) return null;
|
|
239
|
+
return [
|
|
240
|
+
address.building,
|
|
241
|
+
address.street,
|
|
242
|
+
address.unit,
|
|
243
|
+
address.floor,
|
|
244
|
+
address.locality,
|
|
245
|
+
address.region,
|
|
246
|
+
address.postalCode,
|
|
247
|
+
sameLocationCountry(address.country, siteCountry) ? null : address.country
|
|
248
|
+
].filter((part) => part !== null).join(", ") || null;
|
|
249
|
+
}
|
|
250
|
+
const regionNames = new Intl.DisplayNames(["en"], { type: "region" });
|
|
251
|
+
const countryIdentity = (country) => {
|
|
252
|
+
const text = country.trim();
|
|
253
|
+
const code = text.toUpperCase() === "UK" ? "GB" : text.toUpperCase();
|
|
254
|
+
return (code.length === 2 && /^[A-Z]{2}$/.test(code) ? regionNames.of(code) ?? text : text).toLowerCase();
|
|
255
|
+
};
|
|
256
|
+
function sameLocationCountry(country, siteCountry) {
|
|
257
|
+
return country !== null && Boolean(siteCountry?.trim()) && countryIdentity(country) === countryIdentity(siteCountry ?? "");
|
|
258
|
+
}
|
|
259
|
+
const publicLocationSchema = z.strictObject({
|
|
260
|
+
drawing: z.lazy(() => mapDrawingSchema).optional().catch(void 0),
|
|
261
|
+
address: locationAddressSchema.nullable(),
|
|
262
|
+
displayAddress: z.string().nullable().default(null),
|
|
263
|
+
pin: locationPinSchema.nullable(),
|
|
264
|
+
doorNote: z.string().max(1e3).nullable(),
|
|
265
|
+
attribution: z.array(locationAddressMatchSchema.unwrap().shape.attribution.unwrap().element).max(4).readonly()
|
|
266
|
+
}).readonly();
|
|
267
|
+
/** Permission belongs to the resource/source owner before this projection. */
|
|
268
|
+
function projectPublicLocation(location, siteCountry) {
|
|
269
|
+
return {
|
|
270
|
+
address: location.address,
|
|
271
|
+
displayAddress: formatLocationAddress(location.address, siteCountry),
|
|
272
|
+
pin: location.pin,
|
|
273
|
+
doorNote: location.doorNote,
|
|
274
|
+
attribution: location.addressMatch?.attribution ?? []
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
function normalizeLocationAddressText(value) {
|
|
278
|
+
if (typeof value !== "string") return null;
|
|
279
|
+
return trimmedStringOrNull(value);
|
|
280
|
+
}
|
|
281
|
+
function hasLocationCoordinates(value) {
|
|
282
|
+
return value != null && typeof value.lat === "number" && Number.isFinite(value.lat) && Math.abs(value.lat) <= 90 && typeof value.lng === "number" && Number.isFinite(value.lng) && Math.abs(value.lng) <= 180;
|
|
283
|
+
}
|
|
284
|
+
function toLocationCoordinates(value) {
|
|
285
|
+
if (!hasLocationCoordinates(value)) return null;
|
|
286
|
+
return {
|
|
287
|
+
lat: value.lat,
|
|
288
|
+
lng: value.lng
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
//#endregion
|
|
292
|
+
//#region ../site-contracts/src/siteData/venues.ts
|
|
293
|
+
/** Additive map DTO; hidden venues retain only their public name and area. */
|
|
294
|
+
const publicVenueMapLocationSchema = publicLocationSchema.unwrap().extend({
|
|
295
|
+
name: z.string().optional(),
|
|
296
|
+
area: z.string().nullable().optional(),
|
|
297
|
+
addressWithBooking: z.boolean().optional()
|
|
298
|
+
}).readonly();
|
|
299
|
+
//#endregion
|
|
300
|
+
//#region ../site-contracts/src/siteData/mapLocation.ts
|
|
301
|
+
/** Site and preview authority belong to transport, never to the selected source. */
|
|
302
|
+
const publicMapLocationParamsSchema = z.discriminatedUnion("source", [z.object({
|
|
303
|
+
source: z.literal("venue"),
|
|
304
|
+
venueId: z.string().uuid()
|
|
305
|
+
}), z.object({ source: z.literal("business_address") })]);
|
|
306
|
+
const publicMapLocationResultSchema = z.discriminatedUnion("kind", [
|
|
307
|
+
z.object({
|
|
308
|
+
kind: z.literal("shown"),
|
|
309
|
+
location: publicVenueMapLocationSchema
|
|
310
|
+
}),
|
|
311
|
+
z.object({ kind: z.literal("hidden") }),
|
|
312
|
+
z.object({ kind: z.literal("not_found") })
|
|
313
|
+
]);
|
|
314
|
+
//#endregion
|
|
315
|
+
export { normalizeLocationAddressText as a, publicLocationSchema as c, mapDrawingSchema as d, parseSiteId as f, locationValueSchema as i, toLocationCoordinates as l, publicMapLocationResultSchema as n, parseLocationValue as o, publicVenueMapLocationSchema as r, projectPublicLocation as s, publicMapLocationParamsSchema as t, trimmedStringOrNull as u };
|
package/dist/server/next.mjs
CHANGED
|
@@ -1,23 +1,48 @@
|
|
|
1
|
-
import { Is as
|
|
2
|
-
import { i as defaultLayoutThemeRuntime, l as ThemeScope, n as toPageHydrationBootstrapConfig, r as defaultCatchAllThemeRuntime } from "./pageShared-
|
|
3
|
-
import { _ as createBearerAPIClient, h as RiverbankApiError, m as CircuitOpenError, p as sdkRequestOptions, t as createRiverbankClient, v as ApiRequestError, y as unwrapResponse } from "./client-
|
|
4
|
-
import { i as loadContent, n as isPageContent, r as isPageSurfaceContent, t as isEntryContent } from "./loadContent-
|
|
1
|
+
import { Is as inferSiteDateLocale, Ks as toUtcIsoDateTimeString, Ws as resolveBookingBusinessTimeZone } from "./registry-CXRXsFSx.mjs";
|
|
2
|
+
import { i as defaultLayoutThemeRuntime, l as ThemeScope, n as toPageHydrationBootstrapConfig, r as defaultCatchAllThemeRuntime } from "./pageShared-D23o5QgC.mjs";
|
|
3
|
+
import { _ as createBearerAPIClient, h as RiverbankApiError, m as CircuitOpenError, p as sdkRequestOptions, t as createRiverbankClient, v as ApiRequestError, y as unwrapResponse } from "./client-Bvag5OtW.mjs";
|
|
4
|
+
import { i as loadContent, n as isPageContent, r as isPageSurfaceContent, t as isEntryContent } from "./loadContent-CxASA3PE.mjs";
|
|
5
5
|
import { n as MissingSdkThemeError, r as requireSdkTheme, t as MISSING_SDK_THEME_ERROR_CODE } from "./themeAdmission-DGSAlFUK.mjs";
|
|
6
6
|
import { r as normalizeDataLoaderSearchParams } from "./dataLoaderContext-B3fXA54R.mjs";
|
|
7
7
|
import { l as isPreviewMode, o as normalizeSdkRenderingMode, s as themeRuntimeForRendering } from "./overrides-CD4d-1w7.mjs";
|
|
8
8
|
import { n as generatePreviewMetadata, r as applyPageSurfaceIndexing, t as generatePageMetadata } from "./generatePageMetadata-DB_lbrZ7.mjs";
|
|
9
9
|
import { t as getPortalToken } from "./portal-BjVHMAUC.mjs";
|
|
10
10
|
import { _ as toRoutingInfo, a as resolvePageContent, i as contentNotFound, n as contentFound, o as defaultShouldAttemptEntrySubroute, t as RiverbankContentLoadError } from "./resolvePageContent-CAELMBEJ.mjs";
|
|
11
|
-
import { t as SDK_VERSION } from "./version-
|
|
11
|
+
import { t as SDK_VERSION } from "./version-CgCWRFEY.mjs";
|
|
12
12
|
import { t as appendSearchToRedirectDestination } from "./redirect-destination-Bee5ZEon.mjs";
|
|
13
|
-
import { i as Page, r as resolveBlockOverridesForPage } from "./overrideResolution-
|
|
14
|
-
import "react";
|
|
13
|
+
import { i as Page, r as resolveBlockOverridesForPage } from "./overrideResolution-BqVLO4gX.mjs";
|
|
14
|
+
import { cache } from "react";
|
|
15
15
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
16
|
import { BlocksIslandsHydrator } from "#sdk-rendering-client";
|
|
17
17
|
import { notFound, permanentRedirect, redirect } from "next/navigation";
|
|
18
18
|
import { cookies } from "next/headers";
|
|
19
19
|
import { CustomerPortal, PortalAccessState, PortalDigitalProductView, PortalTicketView } from "#sdk-portal-client";
|
|
20
20
|
import { RedeemGiftCardRouteClient } from "#sdk-gifting-client";
|
|
21
|
+
//#region src/next/requestReadMemo.ts
|
|
22
|
+
/**
|
|
23
|
+
* Metadata and the page both load the same content in one render. Next's fetch dedupe skips
|
|
24
|
+
* any fetch with an abort signal, and every client read carries a timeout signal, so without
|
|
25
|
+
* this each render reads twice. A caller's own signal opts out, as it may abort only its read.
|
|
26
|
+
*
|
|
27
|
+
* Each catch-all owns one memo, so two catch-alls with different clients can't share reads.
|
|
28
|
+
*/
|
|
29
|
+
function createRequestReadMemo() {
|
|
30
|
+
const readsForThisRequest = cache(() => /* @__PURE__ */ new Map());
|
|
31
|
+
function once(key, read) {
|
|
32
|
+
const reads = readsForThisRequest();
|
|
33
|
+
const existing = reads.get(key);
|
|
34
|
+
if (existing) return existing;
|
|
35
|
+
const pending = read();
|
|
36
|
+
reads.set(key, pending);
|
|
37
|
+
return pending;
|
|
38
|
+
}
|
|
39
|
+
return (client) => ({
|
|
40
|
+
...client,
|
|
41
|
+
getPage: (params) => params.signal ? client.getPage(params) : once(`page:${JSON.stringify(params)}`, () => client.getPage(params)),
|
|
42
|
+
getSite: (params) => params.signal ? client.getSite(params) : once(`site:${JSON.stringify(params)}`, () => client.getSite(params))
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
21
46
|
//#region src/next/resolveEventPageSubroute.ts
|
|
22
47
|
async function resolveEventPageSubroute(input) {
|
|
23
48
|
if (!isSupportedKind(input.kind) || !isPageSurfaceContent(input.content)) return null;
|
|
@@ -486,6 +511,7 @@ function createCatchAllRuntime(options) {
|
|
|
486
511
|
return {
|
|
487
512
|
options,
|
|
488
513
|
preview,
|
|
514
|
+
withRequestReadMemo: createRequestReadMemo(),
|
|
489
515
|
enablePortal: options.enablePortal ?? options.config.enablePortal ?? false,
|
|
490
516
|
contentTypes: (options.config.content?.contentTypes ?? []).map(toRoutingInfo),
|
|
491
517
|
rendering,
|
|
@@ -679,7 +705,7 @@ async function renderResolvedCatchAllPage(runtime, input) {
|
|
|
679
705
|
async function renderCatchAllPage(runtime, props) {
|
|
680
706
|
const { path, searchParams } = await readCatchAllRequest(runtime, props);
|
|
681
707
|
if (isReservedStaticPath(path)) return notFound();
|
|
682
|
-
const client = runtime.options.getClient();
|
|
708
|
+
const client = runtime.withRequestReadMemo(runtime.options.getClient());
|
|
683
709
|
const apiBaseUrl = client.getBaseUrl();
|
|
684
710
|
const portalToken = runtime.enablePortal ? getPortalToken(await cookies()) : null;
|
|
685
711
|
let resolution;
|
|
@@ -755,7 +781,7 @@ async function generateCatchAllMetadata(runtime, props) {
|
|
|
755
781
|
try {
|
|
756
782
|
const resolution = await resolveContentForPath(runtime, {
|
|
757
783
|
path,
|
|
758
|
-
client: runtime.options.getClient(),
|
|
784
|
+
client: runtime.withRequestReadMemo(runtime.options.getClient()),
|
|
759
785
|
purpose: {
|
|
760
786
|
kind: "metadata",
|
|
761
787
|
searchParams
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as PageContent } from "./pageShared-
|
|
1
|
+
import { t as PageContent } from "./pageShared-D23o5QgC.mjs";
|
|
2
2
|
import { t as allOutlineBlocks } from "./pageRegions-BaeEF2MU.mjs";
|
|
3
3
|
import { i as lazyBlockOverrideSymbol } from "./overrides-CD4d-1w7.mjs";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { li as parseBackgroundContent, n as listBlockDescriptors } from "./registry-CXRXsFSx.mjs";
|
|
2
2
|
import { i as createRichTextDoc } from "./richTextSchema-QLaQrbII.mjs";
|
|
3
3
|
import { t as getFlattenedRepeaterFields } from "./repeaterFields-MIz7r1ez.mjs";
|
|
4
4
|
import { r as createDebugWriter } from "./debug-DXUyrE0T.mjs";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Dt as parseThemeColorToken, G as hexToRgb, J as oklchToHexGamut, K as oklabToOklch, P as getTextColorForBackground, R as contrastRatio, X as rgbToHex, Z as srgbToOklab, q as oklabToSrgb } from "./resolveButtonColourStates--6yJp9Tq.mjs";
|
|
2
|
-
import { $
|
|
2
|
+
import { $ as resolveCardListSchedule, $a as gradientToCss, $s as resolveExactOrFreePriceDisplay, Ao as resolveSectionBackground, At as groupOfferingRunsByCourse, Ba as resolveModeArrangement, Bn as getEventAvailability, Br as formatEventStartingPrice, Bt as ThemedButtonLink, Ci as asPartialObject, Cs as nextLiveRunSessionStartMs, Do as applyLookPhotoTreatment, Fi as ClockIcon, Fr as formatCoursePrice, Fs as formatDateTimeRange, Hn as isEventFull, Hr as getAnchorClasses, Hs as parseBookingLocalDate, Ia as styleSectionBackgroundForColour, In as isBookableEvent, Ir as formatEventDepositNote, Js as formatBookingPriceDisplay, Jt as weekColumnDays, Ks as toUtcIsoDateTimeString, La as arrangementManifestFromVariants, Ln as canJoinEventWaitlistOnAnyMode, Lr as formatEventPrice, Mr as classPricesCopySchema, No as stripStaleTransitionStyleGroup, Nr as classPricesDataSchema, Ns as formatDate, Oa as arrangementAppearancePresets, Oo as deriveSectionGround, Or as heroMorePhotoCount, Po as themeV2CompilerOwnedFieldNames, Pr as resolveClassPriceItems, Ps as formatDateRange, Qn as contentTransforms, Qo as formatDateKey, Qt as eventLocalDateKey, Ra as readStoredMode, Rn as formatEventRemainingPlaces, Si as lookSkinSlotTransform, Sn as closedRunCopy, Sr as listLookSlot, Ts as resolveWholeSeriesBookingPhase, Ua as deriveSiteStyleBlockPolicy, Va as resolvePublishedLook, Vn as getEventAvailabilityStatus, Vr as BACKGROUND_POSITION_PRESET_VALUES, Vs as getLocalScheduleDate, Ws as resolveBookingBusinessTimeZone, Wt as buildEventListWeek, X as CardListContentPart, Xi as augmentManifest, Xt as eventCalendarWeekStart, Z as CardListLeadDate, Zi as isObjectRecord, Zt as eventDateOptions, _a as lookPresentationOnPalette, aa as eventDiscoveryFilterKeys, ac as parseGradientPresetId, ai as boxStylesTransforms, ar as headerRuntimeTransforms, at as computeMediaTransformStyle, bi as lookLeadSlotTransform, br as listItemPresentation, ca as eventScopeQueryKeys, cn as formatEventWeekdayTime, da as eventCalendarListGroupingDecision, di as parseRuntimeBackgroundContent, dn as resolveEventTimeZone, dt as systemCustomizeFacetDefinitionsForBlock, ea as blockChecksForEvents, ec as resolvePricingOptionsPriceDisplay, eo as getGradientPreset, et as selectCardListPresentation, fa as resolveEventCalendarReadPlan, fi as resolveSectionSurfaceForeground, fn as resolveRuntimeEventDestination, gi as isSemanticSpacing, ho as sectionShapeHook, ht as EventQuickFacts, ir as mediaTransforms, is as isToday, jo as sectionSurfaceBase, ko as parseCanonicalRuntimeBackground, la as resolveEventScope, li as parseBackgroundContent, ln as formatTime, lr as uiTransforms, mi as resolveBackgroundColorValue, mo as sectionShapeFromContent, na as eventReadinessQuery, nn as formatEventCompactDateRail, nr as readRuntimeNow, oa as eventScopeLoaderParam, oc as arrangementSlotNames, on as formatEventRunDates, or as chromeLogoTransforms, pi as resolveSurfaceForegroundStyles, pn as formatBookingSchedulePresentation, po as sectionShapeForGround, qt as groupEventsByWeek, ra as eventReadinessQueryKeys, rn as formatEventDateParts, rt as ImagePresets, sa as eventScopeQuery, sn as formatEventTimeRange, sr as layoutTransforms, t as getBlockDefinition, ta as eventReadinessLoaderKey, tt as MediaNodeServer, ua as resolveCalendarReadProfile, ui as parseBackgroundOverlay, un as groupEventsByDate, ur as formattingTransforms, ut as resolveArrangementKnobs, va as resolveLookSurfacePresentation, vo as boundaryRuntimeMetricsForDecorativeTransition, wa as heroPhotoPaintsGround, wi as createTransformRegistry, ws as orderedLiveRunSessions, xi as lookQuoteLimitTransform, yi as lookCarouselRegionTransform, yn as formatEventLocation, z as combinedLookSchema, za as resolveEffectiveArrangement, zn as formatTotalCapacity, zr as formatEventPriceDisplay, zs as compareLocalScheduleDates } from "./registry-CXRXsFSx.mjs";
|
|
3
3
|
import { A as resolveOnColorForThemeToken, G as resolveConcreteColorHex, M as resolveTokenOrCssColorValue, k as isCssColorLiteral, n as parseSurfaceTree } from "./accessibleSurfaces-CM3QANtw.mjs";
|
|
4
|
-
import { D as asSiteStyleId, O as makeBoundaryId, S as asDesignBlockId, T as asLayoutVariantKey } from "./customCss-
|
|
4
|
+
import { D as asSiteStyleId, O as makeBoundaryId, S as asDesignBlockId, T as asLayoutVariantKey } from "./customCss-BZ8YSrQg.mjs";
|
|
5
5
|
import { o as runtimeMediaSchema } from "./media-luf7RF22.mjs";
|
|
6
6
|
import { t as assertNever } from "./assert-never-ku-PUn9U.mjs";
|
|
7
7
|
import { o as isRecord$2 } from "./richTextSchema-QLaQrbII.mjs";
|
|
8
|
-
import { f as assertNever$1, n as resolveLookMediaFrame } from "./lookMediaFrame-
|
|
8
|
+
import { f as assertNever$1, n as resolveLookMediaFrame } from "./lookMediaFrame-CaH018pK.mjs";
|
|
9
9
|
import { i as outlineRegions, n as mapOutlineBlocks } from "./pageRegions-BaeEF2MU.mjs";
|
|
10
10
|
import { i as resolveRouteTargetForStage$1 } from "./dist-Xevqwf1U.mjs";
|
|
11
11
|
import React from "react";
|
|
@@ -1726,7 +1726,7 @@ const EmptyState = ({ message = "No upcoming events scheduled.", className, hasA
|
|
|
1726
1726
|
}), hasActiveFilters && onResetFilters && /* @__PURE__ */ jsx("button", {
|
|
1727
1727
|
type: "button",
|
|
1728
1728
|
onClick: onResetFilters,
|
|
1729
|
-
className: "event-
|
|
1729
|
+
className: "rb-item-text-link event-list-empty-action",
|
|
1730
1730
|
children: resetFiltersText
|
|
1731
1731
|
})]
|
|
1732
1732
|
});
|
|
@@ -2022,10 +2022,7 @@ function offeringFacts(event, places, offering) {
|
|
|
2022
2022
|
label: "Length",
|
|
2023
2023
|
value: sessions
|
|
2024
2024
|
}] : lengthFact(event, !offering || course),
|
|
2025
|
-
...offering
|
|
2026
|
-
label: "Venue",
|
|
2027
|
-
value: event.venue.name
|
|
2028
|
-
}] : [],
|
|
2025
|
+
...offering ? placeFact(event) : [],
|
|
2029
2026
|
...places ? [{
|
|
2030
2027
|
label: "Places",
|
|
2031
2028
|
value: places,
|
|
@@ -2037,6 +2034,13 @@ function offeringFacts(event, places, offering) {
|
|
|
2037
2034
|
}]
|
|
2038
2035
|
];
|
|
2039
2036
|
}
|
|
2037
|
+
/** An online event, or one whose address follows the booking, says so where a venue would go. */
|
|
2038
|
+
function placeFact(event) {
|
|
2039
|
+
return event.venue || event.addressAfterBooking || event.deliveryMode !== "in_person" ? [{
|
|
2040
|
+
label: "Venue",
|
|
2041
|
+
value: formatEventLocation(event)
|
|
2042
|
+
}] : [];
|
|
2043
|
+
}
|
|
2040
2044
|
function lengthFact(event, shown) {
|
|
2041
2045
|
const minutes = Math.round((Date.parse(event.endsAt) - Date.parse(event.startsAt)) / 6e4);
|
|
2042
2046
|
return shown && minutes > 0 ? [{
|
|
@@ -2584,7 +2588,7 @@ function MonthLookView(props) {
|
|
|
2584
2588
|
...listItemPresentation(props, index, entries.length),
|
|
2585
2589
|
event,
|
|
2586
2590
|
arrangement: "month-day"
|
|
2587
|
-
}, event.occurrenceId ?? event.id)) : /* @__PURE__ */ jsx("p", {
|
|
2591
|
+
}, event.occurrenceId ?? event.id)) : props.showEmptyState === false ? null : /* @__PURE__ */ jsx("p", {
|
|
2588
2592
|
...listLookSlot(props, "intro"),
|
|
2589
2593
|
children: props.emptyMessage
|
|
2590
2594
|
})
|
|
@@ -2642,7 +2646,7 @@ function eventHeaderContent(selection, show) {
|
|
|
2642
2646
|
label: "Time",
|
|
2643
2647
|
value: timeRange
|
|
2644
2648
|
},
|
|
2645
|
-
...show.cost ? (item.facts ?? []).filter(({ label }) => label === "Price") : [],
|
|
2649
|
+
...show.cost ? (item.facts ?? []).filter(({ label }) => label === "Price").map((fact) => withDepositNote(fact, event)) : [],
|
|
2646
2650
|
...groupSize === null ? [] : [{
|
|
2647
2651
|
label: "Group size",
|
|
2648
2652
|
value: groupSize
|
|
@@ -2651,6 +2655,14 @@ function eventHeaderContent(selection, show) {
|
|
|
2651
2655
|
action: headerAction(selection, item.action)
|
|
2652
2656
|
};
|
|
2653
2657
|
}
|
|
2658
|
+
/** The page states a deposit option beside the price, so it isn't first seen at checkout. */
|
|
2659
|
+
function withDepositNote(fact, event) {
|
|
2660
|
+
const note = formatEventDepositNote(event.pricing, event.paymentTerms, event);
|
|
2661
|
+
return note ? {
|
|
2662
|
+
...fact,
|
|
2663
|
+
value: `${fact.value}, ${note}`
|
|
2664
|
+
} : fact;
|
|
2665
|
+
}
|
|
2654
2666
|
/** A course run is described by its whole span, not by whichever session was selected. */
|
|
2655
2667
|
function headerDateFact(selection) {
|
|
2656
2668
|
const event = selection.selected;
|
|
@@ -3555,8 +3567,7 @@ const eventCalendarReadEnabled = {
|
|
|
3555
3567
|
summary: "Choose the read projection required by the calendar display mode",
|
|
3556
3568
|
schema: readJobSchema,
|
|
3557
3569
|
run(value, options) {
|
|
3558
|
-
|
|
3559
|
-
return plan.jobs === options.job || plan.jobs === "both" && options.job !== "schedule";
|
|
3570
|
+
return resolveEventCalendarReadPlan(asPartialObject(value) ?? {}).jobs === options.job;
|
|
3560
3571
|
}
|
|
3561
3572
|
};
|
|
3562
3573
|
/**
|
|
@@ -3607,7 +3618,7 @@ const builtinTransformDefinitions = [
|
|
|
3607
3618
|
kind: "formatter",
|
|
3608
3619
|
run(value) {
|
|
3609
3620
|
const content = asPartialObject(value) ?? {};
|
|
3610
|
-
return content
|
|
3621
|
+
return blockChecksForEvents(content) && eventReadinessLoaderKey(content) !== "schedule";
|
|
3611
3622
|
}
|
|
3612
3623
|
},
|
|
3613
3624
|
{
|
|
@@ -4274,7 +4285,7 @@ function planBlock(block, renderableContent, resolveTarget, audience, siteStyleI
|
|
|
4274
4285
|
}
|
|
4275
4286
|
function renderableBlockPlan(common, target, audience, siteStyleId) {
|
|
4276
4287
|
const { definition, systemDefinition, override } = target;
|
|
4277
|
-
const renderableContent =
|
|
4288
|
+
const { renderableContent, ownerEditableContent } = planArrangementBlockContent(common.block.kind, definition.manifest, common.renderableContent, audience);
|
|
4278
4289
|
const effectiveArrangementKey = resolveEffectiveArrangement({
|
|
4279
4290
|
manifest: arrangementManifestFromVariants(definition.manifest),
|
|
4280
4291
|
...definition.manifest.variantMeaning.kind !== "mode" ? { look: effectiveLookFromContent(renderableContent)?.look } : {},
|
|
@@ -4286,6 +4297,7 @@ function renderableBlockPlan(common, target, audience, siteStyleId) {
|
|
|
4286
4297
|
}).key;
|
|
4287
4298
|
return {
|
|
4288
4299
|
...common,
|
|
4300
|
+
ownerEditableContent,
|
|
4289
4301
|
renderableContent,
|
|
4290
4302
|
kind: "renderable",
|
|
4291
4303
|
definition,
|
|
@@ -4385,8 +4397,14 @@ function effectiveLookFromContent(content) {
|
|
|
4385
4397
|
return isObjectRecord(value) && isObjectRecord(value.look) ? restoreCompiledLook(value) : null;
|
|
4386
4398
|
}
|
|
4387
4399
|
function planArrangementContent(blockKind, manifest, authored, audience) {
|
|
4400
|
+
return planArrangementBlockContent(blockKind, manifest, authored, audience).renderableContent;
|
|
4401
|
+
}
|
|
4402
|
+
function planArrangementBlockContent(blockKind, manifest, authored, audience) {
|
|
4388
4403
|
const runtime = arrangementRuntime(authored);
|
|
4389
|
-
if (!runtime) return
|
|
4404
|
+
if (!runtime) return {
|
|
4405
|
+
renderableContent: authored,
|
|
4406
|
+
ownerEditableContent: authored
|
|
4407
|
+
};
|
|
4390
4408
|
const spacingHook = authoredSectionSpacingHook(authored);
|
|
4391
4409
|
const content = withoutSectionSpacing(authored);
|
|
4392
4410
|
const mode = readStoredMode({
|
|
@@ -4394,7 +4412,10 @@ function planArrangementContent(blockKind, manifest, authored, audience) {
|
|
|
4394
4412
|
variantMeaning: manifest.variantMeaning
|
|
4395
4413
|
}, content);
|
|
4396
4414
|
const effective = resolveArrangementContentLook(runtime, mode, content, audience);
|
|
4397
|
-
if (!effective) return
|
|
4415
|
+
if (!effective) return {
|
|
4416
|
+
renderableContent: content,
|
|
4417
|
+
ownerEditableContent: content
|
|
4418
|
+
};
|
|
4398
4419
|
const { facts } = arrangementContentFacts(content);
|
|
4399
4420
|
const { length, knobs } = resolveArrangementKnobs({
|
|
4400
4421
|
blockKind,
|
|
@@ -4408,7 +4429,7 @@ function planArrangementContent(blockKind, manifest, authored, audience) {
|
|
|
4408
4429
|
manifest,
|
|
4409
4430
|
arrangementLook: true
|
|
4410
4431
|
}), ["look"]);
|
|
4411
|
-
const activeContent = withoutLookOwnedContent(Object.fromEntries(Object.entries(content).filter(([key]) => knobs[key]?.kind
|
|
4432
|
+
const activeContent = withoutLookOwnedContent(Object.fromEntries(Object.entries(content).filter(([key]) => (knobs[key]?.kind ?? "used") === "used")), lookOwnedPaths);
|
|
4412
4433
|
const photoContent = arrangementPhotoContent(activeContent, effectiveContent);
|
|
4413
4434
|
const photoCount = arrangementContentFacts({
|
|
4414
4435
|
...activeContent,
|
|
@@ -4416,28 +4437,31 @@ function planArrangementContent(blockKind, manifest, authored, audience) {
|
|
|
4416
4437
|
...photoContent
|
|
4417
4438
|
}).photoCount + lookPartPhotoCount(blockKind, activeContent, effective.look.structure.byMode[mode ?? "default"] ?? null);
|
|
4418
4439
|
return {
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4440
|
+
ownerEditableContent: activeContent,
|
|
4441
|
+
renderableContent: {
|
|
4442
|
+
...activeContent,
|
|
4443
|
+
...arrangementPhotoTreatmentContent(activeContent, effective, runtime.surfaceContext.palette, values.photoTint === "brand" ? "brand" : "dark"),
|
|
4444
|
+
...mode !== null ? { variant: mode } : {},
|
|
4445
|
+
...effectiveContent,
|
|
4446
|
+
...photoContent,
|
|
4447
|
+
...arrangementMediaFrameContent(blockKind, effective, values, authored),
|
|
4448
|
+
...arrangementPanelContent(activeContent, effective, mode),
|
|
4449
|
+
...arrangementQuoteContent(blockKind, effective, values),
|
|
4450
|
+
_arrangementLooks: runtime,
|
|
4451
|
+
_effectiveLook: effective,
|
|
4452
|
+
_lookHooks: {
|
|
4453
|
+
...arrangementContentHooks(effective, mode, length, {
|
|
4454
|
+
...facts.content,
|
|
4455
|
+
photo: photoCount > 0
|
|
4456
|
+
}, values, photoCount),
|
|
4457
|
+
...spacingHook
|
|
4458
|
+
},
|
|
4459
|
+
_effectiveKnobs: knobs,
|
|
4460
|
+
_lookOwnedPaths: lookOwnedPaths,
|
|
4461
|
+
_lookAudience: audience,
|
|
4462
|
+
_lookSlots: arrangementContentSlots(blockKind),
|
|
4463
|
+
blockLook: effective.look.id
|
|
4464
|
+
}
|
|
4441
4465
|
};
|
|
4442
4466
|
}
|
|
4443
4467
|
/**
|
|
@@ -4481,7 +4505,10 @@ function arrangementMediaFrameContent(blockKind, look, knobs, authored) {
|
|
|
4481
4505
|
return frame.kind === "fixed" ? {
|
|
4482
4506
|
aspectRatio: frame.aspectRatio,
|
|
4483
4507
|
_lookMediaFrame: frame
|
|
4484
|
-
} : {
|
|
4508
|
+
} : {
|
|
4509
|
+
aspectRatio: typeof authored.aspectRatio === "string" ? authored.aspectRatio : frame.aspectRatio,
|
|
4510
|
+
...frame.borderRadius ? { _lookMediaFrame: frame } : {}
|
|
4511
|
+
};
|
|
4485
4512
|
}
|
|
4486
4513
|
function arrangementQuoteContent(blockKind, effective, values) {
|
|
4487
4514
|
if (blockKind !== "block.testimonials") return {};
|