@riverbankcms/sdk 0.181.0 → 0.182.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.
Files changed (196) hide show
  1. package/dist/_dts/{BlocksIslandsHydrator-CVCasDPz.d.ts → BlocksIslandsHydrator-Bvw2bUif.d.ts} +1 -1
  2. package/dist/_dts/{Page-Dtj2Ui3S.d.ts → Page-B2EAT-bE.d.ts} +7 -7
  3. package/dist/_dts/{SdkPreviewMode-D1f_60WW.d.ts → SdkPreviewMode-D0vww6rh.d.ts} +2 -2
  4. package/dist/_dts/{client-Chr9pNVW.d.ts → client-D6T430bk.d.ts} +1 -3
  5. package/dist/_dts/{content-types-kjccgopX.d.ts → content-types-wZVWccC6.d.ts} +2 -2
  6. package/dist/_dts/{contracts-BodaiS00.d.ts → contracts-B-vtOcr8.d.ts} +3 -3
  7. package/dist/_dts/{generatePageMetadata-BS6kaJFp.d.ts → generatePageMetadata-CxfwHE6z.d.ts} +2 -2
  8. package/dist/_dts/{index-Brl6_I2j.d.ts → index-CEyYMhLJ.d.ts} +1 -1
  9. package/dist/_dts/{index-DG0OvBs0.d.ts → index-CQrb3Ccc.d.ts} +4 -4
  10. package/dist/_dts/{index-Dy50xUMK.d.ts → index-CciRW_w1.d.ts} +2 -2
  11. package/dist/_dts/{index-Diqt0PvG.d.ts → index-Cqxis-nv.d.ts} +1 -1
  12. package/dist/_dts/{index-CJkefwYh.d.ts → index-DIU-wL1M.d.ts} +2 -2
  13. package/dist/_dts/{index-D1WpKwQe.d.ts → index-DqPKdeTk.d.ts} +1 -1
  14. package/dist/_dts/{loadContent-BgxshKrA.d.ts → loadContent-D0wrxiSp.d.ts} +7 -7
  15. package/dist/_dts/{request-CA0izds5.d.ts → request-DEwxUSw8.d.ts} +130 -28
  16. package/dist/_dts/{resolveBlockData-ChQmwEd3.d.ts → resolveBlockData-VaG_MYbN.d.ts} +5 -5
  17. package/dist/_dts/{resolvePageContent-BvGyvblj.d.ts → resolvePageContent-DTwklC_v.d.ts} +1 -1
  18. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
  19. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  20. package/dist/_dts/sdk/src/client.d.ts +7 -7
  21. package/dist/_dts/sdk/src/config/index.d.ts +6 -6
  22. package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
  23. package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
  24. package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
  25. package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
  26. package/dist/_dts/sdk/src/data/types.d.ts +2 -2
  27. package/dist/_dts/sdk/src/gifting/client.d.ts +1 -1
  28. package/dist/_dts/sdk/src/index.d.ts +7 -7
  29. package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
  30. package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
  31. package/dist/_dts/sdk/src/navigation/index.d.ts +3 -3
  32. package/dist/_dts/sdk/src/next/index.d.ts +7 -7
  33. package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
  34. package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
  35. package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
  36. package/dist/_dts/sdk/src/portal/index.d.ts +1 -1
  37. package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
  38. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
  39. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
  40. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  41. package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
  42. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
  43. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
  44. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -4
  45. package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
  46. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  47. package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
  48. package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
  49. package/dist/_dts/sdk/src/routing/index.d.ts +6 -6
  50. package/dist/_dts/sdk/src/server.d.ts +5 -5
  51. package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
  52. package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
  53. package/dist/_dts/{serviceBookingOutline-BgFbJQhU.d.ts → serviceBookingOutline-DtQuFlID.d.ts} +6 -6
  54. package/dist/_dts/{types-CgS3xLk8.d.ts → types-B3RjeBLV.d.ts} +2 -2
  55. package/dist/_dts/{types-CQrsP1x_.d.ts → types-BvUSGQrw.d.ts} +3 -3
  56. package/dist/_dts/{types-R65DKjPn.d.ts → types-CkRFtBqd.d.ts} +7 -7
  57. package/dist/_dts/{validation-6LTIbuBA.d.ts → validation-BZA3DhcV.d.ts} +4 -4
  58. package/dist/client/{BlocksIslandsHydrator-DqZPz6oW.mjs → BlocksIslandsHydrator-CQMf0HdN.mjs} +17 -17
  59. package/dist/client/{BookingMailingListNote-uWfR2kaG.mjs → BookingMailingListNote-7kdvuPow.mjs} +6 -6
  60. package/dist/client/{BookingQuestionFields-CyNIKw6k.mjs → BookingQuestionFields-BJI7mZuV.mjs} +1 -1
  61. package/dist/client/{CalendarNavigationChevron-BGCX3zwG.mjs → CalendarNavigationChevron-DPUD6wjy.mjs} +7 -7
  62. package/dist/client/{DemoBookingPortalAccess-DFLPyuqe.mjs → DemoBookingPortalAccess-8kwNF9HN.mjs} +4 -4
  63. package/dist/client/{EventCalendar.client-zDL4-t-B.mjs → EventCalendar.client-Dhb14bcC.mjs} +9 -9
  64. package/dist/client/{EventCombined.client-uciDKLID.mjs → EventCombined.client-C1jEZBN9.mjs} +8 -8
  65. package/dist/client/{EventItem-CwzrjcRw.mjs → EventItem-Bb0ppG2N.mjs} +8 -176
  66. package/dist/client/{EventListWeekNavigation-ChvcnPma.mjs → EventListWeekNavigation-DMryCaNV.mjs} +1 -1
  67. package/dist/client/{EventListing.client-DA57Qoyx.mjs → EventListing.client-BuH5kKA3.mjs} +3 -3
  68. package/dist/client/{EventListing.view-DZ0qMFF4.mjs → EventListing.view-DsqvuulZ.mjs} +7 -7
  69. package/dist/client/{EventRegistrationPayment-DSqCJL8E.mjs → EventRegistrationPayment-D4FvQSFF.mjs} +31 -164
  70. package/dist/client/{Page-C7mygH_f.mjs → Page-sV6BJkXX.mjs} +172 -102
  71. package/dist/client/{SiteTermsAgreementField-B4z-e4Wq.mjs → SiteTermsAgreementField-VfSd6JU-.mjs} +2 -2
  72. package/dist/client/{StepIndicator-Dn_DY4oY.mjs → StepIndicator-B6o5B7g3.mjs} +1 -1
  73. package/dist/client/{StepIndicator-atfDU82W.mjs → StepIndicator-BTqO7cJl.mjs} +220 -19
  74. package/dist/client/{accessibleSurfaces-n6kS6Hct.mjs → accessibleSurfaces-BogaGutk.mjs} +966 -693
  75. package/dist/client/{accordion-CsW8U3ff.mjs → accordion-6cuswD_s.mjs} +1 -1
  76. package/dist/client/{booking-form.client-cBWM392H.mjs → booking-form.client-BOMe_SKi.mjs} +15 -15
  77. package/dist/client/{bookingForm-DgySpp6C.mjs → bookingForm-DSCH-VHo.mjs} +4 -4
  78. package/dist/client/bookings.mjs +5 -5
  79. package/dist/client/{boxStyleClassNames-BpGVdLFD.mjs → boxStyleClassNames-BFuqZCfz.mjs} +2 -2
  80. package/dist/client/{carousel-DJoleFV3.mjs → carousel-CGyQVV1M.mjs} +1 -1
  81. package/dist/client/{cart-EO5o6uPH.mjs → cart-BYOe7MCh.mjs} +3 -3
  82. package/dist/client/{cart.client-D_gPw45z.mjs → cart.client-BKFkaXdV.mjs} +1 -1
  83. package/dist/client/{checkout-NVfZW0kR.mjs → checkout-Dwd7Di77.mjs} +3 -3
  84. package/dist/client/{checkout.client-DD3JuqOy.mjs → checkout.client-C25hpi-z.mjs} +1 -1
  85. package/dist/client/{checkoutUrls-z2gXvlGw.mjs → checkoutUrls-tG788sw0.mjs} +1 -1
  86. package/dist/client/client.mjs +25 -6
  87. package/dist/client/{constants-CoOkvw__.mjs → constants-DdxFG3Ic.mjs} +1 -1
  88. package/dist/client/{context-CRhn9qzS.mjs → context-Hi1RuYEM.mjs} +23 -5
  89. package/dist/client/{dateFormatting-BnWB4L1s.mjs → dateFormatting-C8vBCHuo.mjs} +1 -1
  90. package/dist/client/{demoPortalMagicLink-CWDGSTBu.mjs → demoPortalMagicLink-BAL5UIDG.mjs} +1 -1
  91. package/dist/client/{enhanceHeaderSection-tdP_-Z9o.mjs → enhanceHeaderSection-Dv1Lr9kJ.mjs} +3 -3
  92. package/dist/client/{event-registration.client-D7YYKySQ.mjs → event-registration.client-dB_Z7bb-.mjs} +12 -12
  93. package/dist/client/{eventCalendar-CsAfu5d0.mjs → eventCalendar-CQnRA4Ww.mjs} +4 -4
  94. package/dist/client/{eventCombined-VXJB5CoS.mjs → eventCombined-BDOG1hVp.mjs} +4 -4
  95. package/dist/client/{eventListing-B3KIZNfY.mjs → eventListing-DSVmhy9n.mjs} +4 -4
  96. package/dist/client/{eventRegistration-BP-dEk1c.mjs → eventRegistration-CD5mRtEH.mjs} +4 -4
  97. package/dist/client/{form-DM8Zbxbv.mjs → form-DWnlEVSK.mjs} +3 -3
  98. package/dist/client/{form.client-e2z_Tlgk.mjs → form.client-D7zmeqNI.mjs} +4 -4
  99. package/dist/client/{form.parts-Ctljy1a3.mjs → form.parts-C-G6N_MK.mjs} +1 -1
  100. package/dist/client/gifting/client.mjs +7 -7
  101. package/dist/client/{gifting-DWIsqQru.mjs → gifting-Cn0jidP5.mjs} +4 -4
  102. package/dist/client/{gifting.client-QsSWF0uA.mjs → gifting.client-DVo1YFLs.mjs} +4 -4
  103. package/dist/client/{gifting.parts-CedLgwa_.mjs → gifting.parts-Bak93gD2.mjs} +2 -2
  104. package/dist/client/{headerSection-DAkRkwb-.mjs → headerSection-DjQuj_6v.mjs} +2 -2
  105. package/dist/client/{newsletter-form.client-WYja9-WN.mjs → newsletter-form.client-rIYPziZC.mjs} +5 -5
  106. package/dist/client/{newsletter-form.interactive-RuM86VAv.mjs → newsletter-form.interactive-DVt3enLr.mjs} +162 -135
  107. package/dist/client/{newsletter-form.parts-2petDnWv.mjs → newsletter-form.parts-CH6dGfdn.mjs} +1 -1
  108. package/dist/client/{newsletterForm-BUbXdA_e.mjs → newsletterForm-Cg8cBDHd.mjs} +3 -3
  109. package/dist/client/{noop-Dl4mZ-rr.mjs → noop-jesvJXEE.mjs} +239 -229
  110. package/dist/client/portal/client.mjs +269 -83
  111. package/dist/client/{portalOrders-COGn4BKG.mjs → portalOrders-oEoTvzkW.mjs} +1 -1
  112. package/dist/client/{portalRoutes-D72yvtDh.mjs → portalRoutes-ByyVZfVq.mjs} +13 -2
  113. package/dist/client/{product-detail.client-pOAryevt.mjs → product-detail.client-5aHq-vuu.mjs} +1 -1
  114. package/dist/client/{product-list.client-CcUpUiud.mjs → product-list.client-CyAk5rnC.mjs} +1 -1
  115. package/dist/client/{productDetail-BZJCfqat.mjs → productDetail-B8aZ2mqY.mjs} +3 -3
  116. package/dist/client/{productList-CiRs3mNb.mjs → productList-BuLemmod.mjs} +3 -3
  117. package/dist/client/{propsDecoder--uHW4tFM.mjs → propsDecoder-0Unsqn3R.mjs} +2 -2
  118. package/dist/client/{registry.server-CDNNd8wC.mjs → registry.server-DzvtVVD0.mjs} +352 -166
  119. package/dist/client/rendering/client.mjs +23 -23
  120. package/dist/client/rendering/islands.mjs +1 -1
  121. package/dist/client/rendering.mjs +5 -5
  122. package/dist/client/{richText-coerce-CQGE_wHV.mjs → richText-coerce-Bnng7JFA.mjs} +2 -2
  123. package/dist/client/{routeIslandApiConfig-BtCg87-N.mjs → routeIslandApiConfig-BGfcc9sk.mjs} +1 -1
  124. package/dist/client/{runtimeResponse-Ds9cmBUf.mjs → runtimeResponse-DAPVRToN.mjs} +1 -1
  125. package/dist/client/{runtimeResponse-DL_ARBpa.mjs → runtimeResponse-nXT8VAMl.mjs} +1 -1
  126. package/dist/client/{shop-Rx_gEMK8.mjs → shop-GuMqnDL-.mjs} +3 -3
  127. package/dist/client/{shop-commerce-D8evQnMT.mjs → shop-commerce-D5bDY1o1.mjs} +12 -12
  128. package/dist/client/{shop-commerce-store-C9PcsSTj.mjs → shop-commerce-store-B7sHnLwI.mjs} +1 -1
  129. package/dist/client/{shop-discount-apply.state-D5CtGfJI.mjs → shop-discount-apply.state-Dos2zdC2.mjs} +2 -2
  130. package/dist/client/{shop.client-D4lzQ9oY.mjs → shop.client-uvj5GDZb.mjs} +11 -11
  131. package/dist/client/{shopShared-BVbq7Nm-.mjs → shopShared-3giNWE3H.mjs} +2 -2
  132. package/dist/client/{src-ZSqRK3dD.mjs → src-CmXh3JWs.mjs} +5 -1
  133. package/dist/client/{timetableModel-BQJrSK0K.mjs → timetableModel-GA-hn1qM.mjs} +8 -15
  134. package/dist/client/{useAvailableSlots-Dm3lKJKR.mjs → useAvailableSlots-CBneCxbG.mjs} +2 -2
  135. package/dist/client/{useDiscountCodeUi-klgfGn7f.mjs → useDiscountCodeUi-D0kGF0C7.mjs} +1 -1
  136. package/dist/client/{useEventPagination-Jnjt7_ly.mjs → useEventPagination-xX8n_Tuu.mjs} +7 -7
  137. package/dist/client/{view-CC_yQLSA.mjs → view-DOyZc-DF.mjs} +3 -3
  138. package/dist/client/{wizardSteps-BliJOzEX.mjs → wizardSteps-B952ify5.mjs} +303 -31
  139. package/dist/preview-next/client/{PageSectionToolbar-BhL0uADo.mjs → PageSectionToolbar-BI3UCdpu.mjs} +3 -3
  140. package/dist/preview-next/client/{PreviewEditorSidebar-Ct8eIm0i.mjs → PreviewEditorSidebar-jkfLVOgY.mjs} +12 -9
  141. package/dist/preview-next/client/{PreviewEditorUI-BS32G4V9.mjs → PreviewEditorUI-DwJQs4hM.mjs} +4 -4
  142. package/dist/preview-next/client/{PreviewShell-RL0WfZXD.mjs → PreviewShell-BAxAkuz8.mjs} +5 -5
  143. package/dist/preview-next/client/{SdkPreviewModeRuntime-MK_gHeGy.mjs → SdkPreviewModeRuntime-0UVB-39f.mjs} +44 -17
  144. package/dist/preview-next/client/{previewAssistantSlot-CQyS8pcq.mjs → previewAssistantSlot-BgiYk3PB.mjs} +2577 -1683
  145. package/dist/preview-next/client/{previewChromeRoot-BSxp3Mfu.mjs → previewChromeRoot-tieNdF3E.mjs} +1 -1
  146. package/dist/preview-next/client/runtime.mjs +3 -3
  147. package/dist/preview-next/client/{sdk-runtime-DKnTzy74.mjs → sdk-runtime-DXb_Evl0.mjs} +2 -2
  148. package/dist/preview-next/client/{siteStyleAccess-BlmbvbLN.mjs → siteStyleAccess-BlN0jt2c.mjs} +1 -1
  149. package/dist/preview-next/client/{useAutosaveStatus-D-7GwZOQ.mjs → useAutosaveStatus-BUEPA4oL.mjs} +1 -1
  150. package/dist/preview-next/client/{useOpenBlockForSetup-BNZtGM5g.mjs → useOpenBlockForSetup-BVfr5P--.mjs} +1 -1
  151. package/dist/preview-next/keepAlive.mjs +1 -1
  152. package/dist/preview-next/middleware.mjs +1 -1
  153. package/dist/preview-next/{route-contract-R3PcMmax.mjs → route-contract-BHTBA48n.mjs} +20 -1
  154. package/dist/server/{Block.shared-CniF9tSu.mjs → Block.shared-hGoyEdjJ.mjs} +5 -5
  155. package/dist/server/{ThemeScopeCore-BQWsnGT6.mjs → ThemeScopeCore-BfUCTOwj.mjs} +37 -25
  156. package/dist/server/{accessibleSurfaces-WPzUAHp4.mjs → accessibleSurfaces-Dskni4Xj.mjs} +94 -361
  157. package/dist/server/{bindings-DxojjtK3.mjs → bindings-DMJH4bvo.mjs} +4 -4
  158. package/dist/server/{client-CDndhbYO.mjs → client-DrwlRNAH.mjs} +22 -3
  159. package/dist/server/config-validation.mjs +1 -1
  160. package/dist/server/config.mjs +2 -2
  161. package/dist/server/{constants-VyF5nEhL.mjs → constants-CeMywaiD.mjs} +11 -0
  162. package/dist/server/data/resolveBlockData.mjs +1 -1
  163. package/dist/server/{resolveButtonColourStates-B0O1IM16.mjs → expandPalette-ehuW8r2g.mjs} +769 -227
  164. package/dist/server/index.mjs +2 -2
  165. package/dist/server/{loadContent-BKstMBmX.mjs → loadContent-D0prFflT.mjs} +4 -4
  166. package/dist/server/{loadPage-IgNnZaqr.mjs → loadPage-CBLke9pJ.mjs} +3 -3
  167. package/dist/server/{lookMediaFrame-TFjgNG61.mjs → lookMediaFrame-H0fi4bJk.mjs} +2 -2
  168. package/dist/server/{navigation-quBYlSKD.mjs → navigation-wrcuWmgp.mjs} +1 -1
  169. package/dist/server/navigation.mjs +1 -1
  170. package/dist/server/next.mjs +8 -8
  171. package/dist/server/{overrideResolution-CCaAPpIa.mjs → overrideResolution-DUgCEH8z.mjs} +1 -1
  172. package/dist/server/page-converter.mjs +1 -1
  173. package/dist/server/{pageRenderPlan-B7iULvKe.mjs → pageRenderPlan-BHrmogsW.mjs} +161 -244
  174. package/dist/server/{pageRuntimeSupport-BytMroxn.mjs → pageRuntimeSupport-D2-YMRei.mjs} +1 -1
  175. package/dist/server/{pageShared-Dcs_XTIO.mjs → pageShared-CG8O31Eo.mjs} +1265 -1032
  176. package/dist/server/{parseThemeForPersistence-Bihl4W5K.mjs → parseThemeForPersistence-CrPlbJEN.mjs} +1 -1
  177. package/dist/server/{portal-CMW_b9mG.mjs → portal-pG_uhsI2.mjs} +1 -1
  178. package/dist/server/portal.mjs +2 -2
  179. package/dist/server/{prebuild-agaH-vZV.mjs → prebuild-C8Amvzce.mjs} +1 -1
  180. package/dist/server/prebuild.mjs +1 -1
  181. package/dist/server/{prefetchBlockData-DwpRjqw4.mjs → prefetchBlockData-BxUETRIZ.mjs} +2 -2
  182. package/dist/server/{registry-DM9dHfDC.mjs → registry-Cc88-23f.mjs} +1173 -745
  183. package/dist/server/rendering/components/pageShared.mjs +1 -1
  184. package/dist/server/rendering/helpers/loadPage.mjs +1 -1
  185. package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
  186. package/dist/server/rendering/server.mjs +4 -4
  187. package/dist/server/rendering.mjs +8 -8
  188. package/dist/server/{resolveBlockData-CinHGf8l.mjs → resolveBlockData-OG3KOkig.mjs} +1 -1
  189. package/dist/server/server.mjs +3 -3
  190. package/dist/server/{servicePageContent-BBBhOtdE.mjs → servicePageContent-BcFuhhD7.mjs} +5 -5
  191. package/dist/server/theme-bridge.mjs +33 -8
  192. package/dist/server/theme.mjs +1 -1
  193. package/dist/server/{validation-DG5jX3jH.mjs → validation-BovmbS8N.mjs} +3 -3
  194. package/dist/server/{version-CipbxPHL.mjs → version-hws4hgyX.mjs} +1 -1
  195. package/dist/styles/index.css +86 -46
  196. package/package.json +1 -1
@@ -1,19 +1,19 @@
1
1
  import { D as surfaceInkStyle, E as surfaceInkDeclarations, F as textColorValue, J as parseColorTokenParts, L as callsCssLoadingFunction, M as mergeStyles, N as rgbColorValue, P as textColorStyle, R as staysInsideDeclaration, S as surfaceForegroundInputFromResolved, Y as parseThemeColorToken, a as createStandardButtonSurfacePolicy, i as buttonSizeNameSchema, j as cssVarValue, k as backgroundColorStyle, s as unsafeAsOpaqueButtonColourToken, t as DEFAULT_VARIANT_ALIAS_ID, w as surfaceForegroundValue, x as surfaceForegroundDeclarations, y as SURFACE_INK_CSS_VARS } from "./types-BKaBZFjD.mjs";
2
- import { C as contrastRatio, a as formatButtonColourContractError, c as DEFAULT_BUTTON_SIZES, d as generateShadowValue$1, g as expandPalette, i as BUTTON_CONTRAST_POLICY, j as hexToRgb, n as compileButtonColourStates, r as resolveSolidButtonColour, s as BORDER_WIDTH_MAP, u as FONT_SIZE_MAP } from "./resolveButtonColourStates-B0O1IM16.mjs";
3
- import { $ as formatEventDuration, A as OfferingCourseCards, B as EventItem, C as resolvePageRouteTarget, D as EVENT_REGISTRATION_ANCHOR_ID, E as EventHeader, F as createEditorPresentationPageReader, G as eventDisplayTitleText, H as CalendarIcon, I as createPresentationPageReader, J as buildMonthDay, K as formatCourseDatesAfter, L as EmptyState, M as offeringDatesBySeries, N as deriveEventScheduleSummary, O as MonthLookView, P as derivePreviewRunSchedule, Q as formatEventTeacherLine, R as CardListCollection, S as resolveEntryRouteTarget, T as lookPartShown, U as MapPinIcon, V as eventCategoryBadge, W as eventDisplayTitle, X as formatEventQuickDate, Y as resolveMonthSelectedDay, Z as selectQuickDateEvents, _ as publicAppointmentLocationSchema, a as joinSlotKey, ct as buildThemeTokens, d as resolveLinkedEntryInlineFieldEligibility, et as resolveEventCardBooking, g as formatAppointmentPrice, h as formatAppointmentLocation, i as composePageJoins, j as eventCardListContent, k as EventListingFrameView, l as buildLinkedContentEditTarget, lt as defaultThemeTokens, m as formatAppointmentDuration, n as createPageRenderPlanReader, nt as resolveEventLinkProps, o as renderedJoinLayout, p as defaultTransforms, q as formatCourseSessions, rt as parseStoredVariant, s as retargetJoinsAcrossOmissions, tt as resolveEventCta, v as publicAppointmentPricingSchema, w as resolveRouteTarget, z as CardListItems } from "./pageRenderPlan-B7iULvKe.mjs";
4
- import { $i as PUBLIC_DOWNLOAD_MEDIA_TYPES, $n as composeHeaderSectionWrapperClassName, $r as singleButtonFragment, $s as resolveBookingBusinessTimeZone, $t as eventOnlinePlace, A as membershipClassesLabel, Ai as el, An as isOrdinaryPublicEvent, Ar as Grid, As as resolveWholeSeriesBookingPhase, At as offeringRunLifecycle, B as eventListingBlockDefinition, Bi as FileArchiveIcon, Bn as isBookableEvent, Br as formatEventDepositNote, Bt as ThemedButtonLink, C as buildCartInteractiveIslandProps, Ca as authoredHeaderLinkForeground, Cn as groupEventsByDate, Cr as defineProgressiveBlockRuntime, Cs as pageTemplateFromEntry, D as buildShopInteractiveIslandProps, Da as headerNeedsPhotoShade, Dn as hasCancelledRegistrationDate, Dr as lookListPresentationSchemaShape, Ds as CANCELLED_SESSION_STATUS, Dt as buildOfferingsPreviewListing, E as buildProductListInteractiveIslandProps, En as cancelledDateCopy, Eo as boundaryRuntimeMetricsForDecorativeTransition, Er as listLookSlot, Et as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, F as offeringsCatalogueShape, Fi as ArrowDownIcon, Fn as planWholeSeriesRunSelection, Fs as parseMailingListPlacementTargeting, Ft as resolveOfferingsRenderInput, G as eventCollectionDisplaySchemaShape, Gi as PlusIcon, Gn as getEventAvailabilityStatus, Gs as addLocalScheduleDays, Gt as eventListWeekDays, H as buildEventCollectionDisplay, Hi as FileSpreadsheetIcon, Hn as formatEventRemainingPlaces, Hr as formatEventPriceAmount, Ht as getIconComponent, I as eventCalendarBlockDefinition, Ii as ChevronDownIcon, Is as sameMailingListPlacementTargeting, It as normalizeEventRegistrationPageSurfaceSubject, J as catalogueEventCardProps, Ji as parseInlineTextFromUnknown, Jn as FEATURE_CARD_ICON_TREATMENTS, Jr as headingFragment, Js as getBookingLocalDateKey, K as eventCollectionHydrationSchema, Ki as inlineTextToPlainText, Kn as isEventFull, Kt as eventWeekGroupingContext, L as buildEventCalendarInteractiveIslandProps, Li as CircleMinusIcon, Ln as resolveSelectionBookingClosedDetail, Lt as resolveEventRegistrationScopedEvents, M as offeringsPreviewBlockDefinition, Mi as buildGeneratedBlockIconRenderAssetLookupFromUnknown, Mn as planOrdinarySeriesSelection, Ms as buildMailingListSignupBlockSourceRef, Mt as readOfferingsGrouping, N as publicRouteCandidatesSchema, Ni as parseBlockIconValue, Nn as planWholeSeriesParentBooking, No as anglePolygonCss, Ns as parseMailingListRuntimeContext, Nt as resolveOfferingsPreviewGroupCta, O as shopProductPresentation, Oa as headerRootIsTransparent, On as eventOccurrenceContext, Or as resolvedItemSurfaceProps, Ot as groupOfferingRunsByCourse, P as buildOfferingsCatalogueListing, Pi as resolveBlockIconRenderValue, Pn as planWholeSeriesParentSelection, Po as transitionCatalogueEntries, Pt as resolveOfferingsPreviewGroups, Q as cardListPresentationSchemaShape, Qi as parseFieldDefinitions, Qr as blogFeaturedPostFragment, Qs as toUtcIsoDateTimeString, Qt as browserReadAuthoritySchema, R as buildEventCalendarListingDisplay, Ri as CirclePlusIcon, Rn as selectionRepresentativeEvent, Rs as EVENT_ADDRESS_AFTER_BOOKING_LABEL, Rt as ThemedAuthoredButton, S as shopBlockDefinition, Si as defineFragment, Sn as formatTime, Sr as defineClientOwnedBlockRuntime, Ss as loadedReadinessFact, St as previewStageSchema, T as buildProductDetailInteractiveIslandProps, Ta as readOpeningToneProjection, Tn as bookingPageKindSchema, Tr as listLookControl, U as buildEventCollectionHydration, Ui as FileTextIcon, Un as formatTotalCapacity, Us as formatBookingCompactEnglishTime, Ut as SpinnerNode, V as buildEventListingInteractiveIslandProps, Va as resolveEffectiveArrangement, Vi as FileAudioIcon, Vr as formatEventPrice, Vt as ThemedDownloadLink, W as buildEventCollectionListingDisplay, Wi as MinusIcon, Ws as toScheduledBookingDateTime, Wt as buildEventListWeek, X as CardListContentPart, Xn as shouldReserveFeatureCardIconZone, Xr as faqAccordionFragment, Xs as parseBookingLocalDate, Y as listingEventCardProps, Yn as resolveFeatureCardGeneratedIconSizePx, Yr as cardFragment, Ys as getLocalScheduleDate, Yt as resolveRuntimeEventDestination, Zr as faqHeadingFragment, Zs as parseLocalScheduleTime, Zt as bookingPresentation, _ as buildGiftingInteractiveIslandProps, _a as AFFORDANCE_SUPPRESS_CLASS, _n as formatEventHourLabel, _r as buildFormInteractiveIslandProps, _t as getContainerClass, a as LOCATION_MAP_LOADER_KEYS, ac as publicEventPricingDisplay, ai as heroCtaRowFragment, an as closedDatesCopy, ar as teamMemberCardBiography, as as getDayOfWeek, b as productDetailBlockDefinition, bn as formatEventTimeRange, br as defineInteractiveIslandMetaKeys, bs as admitReadinessFacts, bt as resolveEventRegistrationEventSource, c as normalizeLocationMapSource, ci as heroCopyFragment, cn as buildCalendarViewport, co as generateDefaultCardSystem, cs as getWeekCalendarDays, d as newsletterSignupBlockDefinition, di as normalizeBoxStylesBorder, do as generateNavLinkCSS, ec as toBookingTimeZone, ei as formEmbedFragment, en as eventPlaceName, er as markEditableSurfaceForwarding, fi as resolveCardRoleForBoxStyles, fn as formatCalendarTitle, fo as generateEffectsCSS, fr as staticHeaderChromeRuntime, fs as publicEventsArraySchema, ft as buildResolveImageUrlContext, g as giftingBlockDefinition, ga as themeButtonSelector, gn as formatEventDateParts, gr as formBlockDefinition, gs as beforeBookingQuestionsPresentationSchema, gt as getCardOrientation, h as newsletterBlockSubmissionMessage, ha as parseThemeButtonVariantId, hn as formatEventCompactDateRail, ho as generateInteractiveChildInheritanceCSS, hs as bookingConsentCarrierSchema, ht as EventQuickFacts, ic as publicEventPricingCurrency, ii as ctaCopyFragment, in as pageNavigationSchema, ir as teamMemberBiography, is as formatDateKey, it as MediaPlaceholder, j as passCardListContent, ja as arrangementLookHooks, ji as when, jn as planDropInPanel, jr as clsx, js as resolveWholeSeriesPaymentDates, jt as offeringsListingFor, k as membershipCardListContent, ka as headerRootPaint, ki as runTransforms, kn as getPublicEventCanonicalPath, kr as itemRole, ks as orderedLiveRunSessions, kt as normalizeOfferingsPreviewItemLimit, l as parseLocationMapLoaderResult, lc as formatCurrencyAmount, lo as generateFooterCss, ls as isSameCalendarDay, lt as resolvePublicMediaUrl, m as buildNewsletterFormInteractiveIslandProps, mc as TokenResolver, mn as formatEventClockLabel, mo as resolveEffectPaint, ms as blockBookingConsentSchema, mt as setContextResolveImageUrlContext, nc as formatBookingPriceDisplay, ni as testimonialsCarouselFragment, nn as formatEventLocation, ns as getLocalMinuteOfDay, nt as RichText, o as describeUnresolvedLocationMapLocation, oa as eventReadinessResultSchema, oc as publicEventPricingType, oi as ctaRowFragment, on as closedRunCopy, or as readRuntimeNow, os as getOrderedDayNames, p as NEWSLETTER_SIGNUPS_PAUSED_MESSAGE, pn as formatDate, po as resolveEffectApplications, ps as blockBookingPaymentTermsSchema, pt as getCurrentResolveImageUrlContext, q as eventCollectionSourceSchemaShape, qi as isInlineTextEmpty, qn as groupPublicEventsByRun, qr as richTextFragment, qs as formatLocalScheduleDate, r as normalizeBlockContent, ra as eventReadinessLoaderKey, rc as isPublicEventPricingOptionDisplayable, ri as testimonialsHeadingFragment, rn as blockSiteTermsSchema, rr as parseTeamMemberSpecialties, rs as addDays, rt as ImagePresets, s as normalizeLocationMapProps, sc as resolveExactOrFreePriceDisplay, si as isBlockButtonRole, sn as closedDateCopy, so as resolveCardRole, sr as resolveDateRuntimeContext, ss as getWeekCalendarDayTuple, t as getBlockDefinition, ta as chosenString, ti as formCopyFragment, tn as eventVenuePlace, to as requireCuratedSiteStyle, tr as splitPositioningClasses, ts as getLocalDateKey, tt as MediaNodeServer, u as resolveLocationMapLocation, ui as boxStyleClassNames, un as eventDateOptions, uo as buildTextContrastShadow, us as isToday, v as checkoutBlockDefinition, va as resolveHeaderRootForeground, vi as resolveBackgroundColorValue, vn as formatEventNextDateFact, vr as buildInteractiveIslandProps, vt as eventRegistrationBlockDefinition, w as buildCheckoutInteractiveIslandProps, wa as effectiveHeaderNavLinkStyle, wn as resolveEventTimeZone, wr as listItemPresentation, ws as unavailableReadinessFact, x as productListBlockDefinition, xa as selectItemSurfacePresentation, xi as bodyCopyFragment, xr as createZodCodec, xs as hiddenFromVisitors, xt as bookingNowSchema, y as cartBlockDefinition, yi as ctaButton, yr as createInteractiveIslandCodec, yt as buildEventRegistrationInteractiveIslandProps, za as arrangementManifestFromVariants, zi as ClockIcon, zr as formatCoursePrice, zs as formatDate$1, zt as ThemedButton } from "./registry-DM9dHfDC.mjs";
5
- import { C as materializeRuntimeButtonAppearance, F as resolveSurfaceForeground, H as certifyPaint, K as resolveConcreteColorHex, L as surfaceInkPublication, N as freezeOwnedThemeValue, O as mapButtonVisualAppearances, P as ownedThemeSnapshot, S as buttonTypographyDeclarations, U as contrastThresholdByPolicy, V as HOVER_TEXT_THRESHOLD, W as inkReference, b as buttonShadow, f as compositeHex, g as actionVariableFallback, n as parseSurfaceTree, o as resolveSurface, q as resolveOpaqueSurfaceHex, s as serializeSurfaceTree, v as buttonBorder, w as paddingDeclarations, x as buttonStateAppearanceDeclarations, y as buttonRadius } from "./accessibleSurfaces-WPzUAHp4.mjs";
2
+ import { L as contrastRatio, M as resolveOpaqueSurfaceHex, U as hexToRgb, a as compositeHex, d as resolveSolidButtonColour, f as BUTTON_CONTRAST_POLICY, g as DEFAULT_BUTTON_SIZES, h as BORDER_WIDTH_MAP, j as resolveConcreteColorHex, p as formatButtonColourContractError, r as expandPalette, u as compileButtonColourStates, v as FONT_SIZE_MAP, y as generateShadowValue$1 } from "./expandPalette-ehuW8r2g.mjs";
3
+ import { $ as formatEventDuration, A as OfferingCourseCards, B as EventItem, C as resolvePageRouteTarget, D as EVENT_REGISTRATION_ANCHOR_ID, E as EventHeader, F as createEditorPresentationPageReader, G as eventDisplayTitleText, H as CalendarIcon, I as createPresentationPageReader, J as buildMonthDay, K as formatCourseDatesAfter, L as EmptyState, M as offeringDatesBySeries, N as deriveEventScheduleSummary, O as MonthLookView, P as derivePreviewRunSchedule, Q as formatEventTeacherLine, R as CardListCollection, S as resolveEntryRouteTarget, T as lookPartShown, U as MapPinIcon, V as eventCategoryBadge, W as eventDisplayTitle, X as formatEventQuickDate, Y as resolveMonthSelectedDay, Z as selectQuickDateEvents, _ as publicAppointmentLocationSchema, a as joinSlotKey, at as buildThemeTokens, d as resolveLinkedEntryInlineFieldEligibility, et as parseStoredVariant, g as formatAppointmentPrice, h as formatAppointmentLocation, i as composePageJoins, j as eventCardListContent, k as EventListingFrameView, l as buildLinkedContentEditTarget, m as formatAppointmentDuration, n as createPageRenderPlanReader, o as renderedJoinLayout, ot as defaultThemeTokens, p as defaultTransforms, q as formatCourseSessions, s as retargetJoinsAcrossOmissions, v as publicAppointmentPricingSchema, w as resolveRouteTarget, z as CardListItems } from "./pageRenderPlan-BHrmogsW.mjs";
4
+ import { $ as cardListPresentationSchemaShape, $i as buildGeneratedBlockIconRenderAssetLookupFromUnknown, $n as selectionRepresentativeEvent, $t as browserReadAuthoritySchema, A as membershipCardListContent, Ai as boxStyleClassNames, An as getLocalMinuteOfDay, Ao as generateInteractiveChildInheritanceCSS, At as groupOfferingRunsByCourse, Ba as authoredHeaderLinkForeground, Bi as layoutSectionGround, Bn as cancelledDateCopy, Br as defineInteractiveIslandMetaKeys, Bs as orderedLiveRunSessions, Bt as ThemedAuthoredButton, C as shopBlockDefinition, Ci as testimonialsHeadingFragment, Co as generateDefaultCardSystem, Cr as parseTeamMemberSpecialties, Cs as publicEventsArraySchema, Ct as bookingNowSchema, D as buildProductListInteractiveIslandProps, Da as eventReadinessResultSchema, Di as isBlockButtonRole, Dn as groupEventsByDate, Do as generateEffectsCSS, Dr as resolveDateRuntimeContext, Ds as beforeBookingQuestionsPresentationSchema, E as buildProductDetailInteractiveIslandProps, Ei as ctaRowFragment, En as formatTime, Eo as generateNavLinkCSS, Er as readRuntimeNow, Es as bookingConsentCarrierSchema, F as buildOfferingsCatalogueListing, Fa as resolveHeaderRootForeground, Fn as getWeekCalendarDayTuple, Fs as unavailableReadinessFact, Ft as resolveOfferingsPreviewGroupCta, G as buildEventCollectionListingDisplay, Ga as headerRootIsTransparent, Gn as isOrdinaryPublicEvent, Gr as listLookControl, Gt as SpinnerNode, H as buildEventListingInteractiveIslandProps, Ha as readOpeningToneProjection, Hi as bodyCopyFragment, Hn as eventOccurrenceContext, Hr as defineClientOwnedBlockRuntime, Hs as resolveWholeSeriesPaymentDates, Ht as ThemedButtonLink, I as offeringsCatalogueShape, In as getWeekCalendarDays, Ir as formBlockDefinition, It as resolveOfferingsPreviewGroups, J as eventCollectionSourceSchemaShape, Ja as arrangementLookHooks, Jn as planWholeSeriesParentBooking, Jr as resolvedItemSurfaceProps, Jt as eventWeekGroupingContext, K as eventCollectionDisplaySchemaShape, Ka as headerRootPaint, Kn as planDropInPanel, Kr as listLookSlot, Ks as parseMailingListPlacementTargeting, Kt as buildEventListWeek, L as eventCalendarBlockDefinition, Ln as isSameCalendarDay, Lo as pageGround, Lr as buildFormInteractiveIslandProps, Lt as resolveOfferingsRenderInput, M as passCardListContent, Ma as parseThemeButtonVariantId, Mi as resolveCardRoleForBoxStyles, Mn as formatDateKey, Mr as staticHeaderChromeRuntime, Ms as hiddenFromVisitors, Mt as offeringRunLifecycle, N as offeringsPreviewBlockDefinition, Na as themeButtonSelector, Nn as getDayOfWeek, Ns as loadedReadinessFact, Nt as offeringsListingFor, O as buildShopInteractiveIslandProps, Oi as heroCopyFragment, On as resolveEventTimeZone, Oo as resolveEffectApplications, Ot as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, P as publicRouteCandidatesSchema, Pa as AFFORDANCE_SUPPRESS_CLASS, Pn as getOrderedDayNames, Ps as pageTemplateFromEntry, Pt as readOfferingsGrouping, Qi as when, Qn as resolveSelectionBookingClosedDetail, Qt as bookingPresentation, R as buildEventCalendarInteractiveIslandProps, Ra as selectItemSurfacePresentation, Ri as resolveBackgroundColorValue, Rn as isToday, Rr as buildInteractiveIslandProps, Rs as CANCELLED_SESSION_STATUS, Rt as normalizeEventRegistrationPageSurfaceSubject, S as productListBlockDefinition, Sa as chosenString, Si as testimonialsCarouselFragment, Sn as formatEventNextDateFact, So as resolveCardRole, St as resolveEventRegistrationEventSource, T as buildCheckoutInteractiveIslandProps, Ti as heroCtaRowFragment, To as buildTextContrastShadow, Tr as teamMemberCardBiography, Ts as blockBookingConsentSchema, U as buildEventCollectionDisplay, Ui as defineFragment, Un as getPublicEventCanonicalPath, Uo as boundaryRuntimeMetricsForDecorativeTransition, Ur as defineProgressiveBlockRuntime, Us as buildMailingListSignupBlockSourceRef, Ut as ThemedDownloadLink, V as eventListingBlockDefinition, Va as effectiveHeaderNavLinkStyle, Vn as hasCancelledRegistrationDate, Vr as createZodCodec, Vs as resolveWholeSeriesBookingPhase, Vt as ThemedButton, W as buildEventCollectionHydration, Wa as headerNeedsPhotoShade, Wn as isDropInPublicEvent, Wr as listItemPresentation, Ws as parseMailingListRuntimeContext, Wt as getIconComponent, X as listingEventCardProps, Xi as runTransforms, Xn as planWholeSeriesRunSelection, Xo as anglePolygonCss, Xr as Grid, Xs as formatDate$1, Y as catalogueEventCardProps, Yn as planWholeSeriesParentSelection, Yr as itemRole, Ys as EVENT_ADDRESS_AFTER_BOOKING_LABEL, Z as CardListContentPart, Zi as el, Zo as transitionCatalogueEntries, Zr as clsx, _ as giftingBlockDefinition, _c as publicEventPricingType, _i as faqHeadingFragment, _n as formatDate, _t as getCardOrientation, aa as CirclePlusIcon, ac as getBookingLocalDateKey, ai as formatCoursePrice, an as pageNavigationSchema, ar as resolveRuntimeEventDestination, at as MediaPlaceholder, b as cartBlockDefinition, ba as PUBLIC_DOWNLOAD_MEDIA_TYPES, bc as formatCurrencyAmount, bi as formEmbedFragment, bn as formatEventDateParts, br as markEditableSurfaceForwarding, bt as eventRegistrationBlockDefinition, c as normalizeLocationMapProps, ca as FileAudioIcon, cc as parseLocalScheduleTime, ci as formatEventPriceAmount, cn as closedRunCopy, cr as formatEventRemainingPlaces, d as resolveLocationMapLocation, da as MinusIcon, dc as toBookingTimeZone, dn as cutOffDateCopy, dr as getEventAvailabilityStatus, ea as parseBlockIconValue, ec as formatBookingCompactEnglishTime, en as eventOnlinePlace, er as eventDestinationBookingLink, f as newsletterSignupBlockDefinition, fa as PlusIcon, fn as buildCalendarViewport, fr as isEventFull, g as newsletterBlockSubmissionMessage, gc as publicEventPricingDisplay, gi as faqAccordionFragment, gn as formatCalendarTitle, gr as shouldReserveFeatureCardIconZone, gt as EventQuickFacts, h as buildNewsletterFormInteractiveIslandProps, ha as parseInlineTextFromUnknown, hc as publicEventPricingCurrency, hi as cardFragment, hr as resolveFeatureCardGeneratedIconSizePx, ht as setContextResolveImageUrlContext, i as normalizeBlockContent, ia as CircleMinusIcon, ic as formatLocalScheduleDate, in as blockSiteTermsSchema, io as resolveEffectiveArrangement, ir as resolveEventPageLink, it as ImagePresets, j as membershipClassesLabel, ji as normalizeBoxStylesBorder, jn as addDays, js as admitReadinessFacts, jt as normalizeOfferingsPreviewItemLimit, k as shopProductPresentation, kn as getLocalDateKey, ko as resolveEffectPaint, kt as buildOfferingsPreviewListing, l as normalizeLocationMapSource, la as FileSpreadsheetIcon, lc as toUtcIsoDateTimeString, ln as bookElsewhereDateCopy, lr as formatTotalCapacity, m as NEWSLETTER_SIGNUPS_PAUSED_MESSAGE, ma as isInlineTextEmpty, mc as isPublicEventPricingOptionDisplayable, mi as headingFragment, mn as eventDateOptions, mr as FEATURE_CARD_ICON_TREATMENTS, mt as getCurrentResolveImageUrlContext, n as hasBlockDefinition, na as ArrowDownIcon, nc as addLocalScheduleDays, nn as eventVenuePlace, no as arrangementManifestFromVariants, nr as resolveEventCardBooking, nt as MediaNodeServer, o as LOCATION_MAP_LOADER_KEYS, oa as ClockIcon, oc as getLocalScheduleDate, oi as formatEventDepositNote, on as closedDateListCopy, or as isBookableEvent, pa as inlineTextToPlainText, pc as formatBookingPriceDisplay, pi as richTextFragment, pr as groupPublicEventsByRun, pt as buildResolveImageUrlContext, q as eventCollectionHydrationSchema, qn as planOrdinarySeriesSelection, qr as lookListPresentationSchemaShape, qs as sameMailingListPlacementTargeting, qt as eventListWeekDays, ra as ChevronDownIcon, rn as formatEventLocation, rr as resolveEventCta, rt as RichText, s as describeUnresolvedLocationMapLocation, sa as FileArchiveIcon, sc as parseBookingLocalDate, si as formatEventPrice, sn as closedDatesCopy, sr as isInBookingCutOffWindow, t as getBlockDefinition, ta as resolveBlockIconRenderValue, tc as toScheduledBookingDateTime, tn as eventPlaceName, tr as eventDestinationPagePath, u as parseLocationMapLoaderResult, ua as FileTextIcon, uc as resolveBookingBusinessTimeZone, un as closedDateCopy, ut as resolvePublicMediaUrl, v as buildGiftingInteractiveIslandProps, vc as resolveExactOrFreePriceDisplay, vi as blogFeaturedPostFragment, vn as formatEventClockLabel, vo as requireCuratedSiteStyle, vt as getContainerClass, w as buildCartInteractiveIslandProps, wa as eventReadinessLoaderKey, wc as TokenResolver, wi as ctaCopyFragment, wn as formatEventTimeRange, wo as generateFooterCss, wr as teamMemberBiography, ws as blockBookingPaymentTermsSchema, wt as previewStageSchema, x as productDetailBlockDefinition, xi as formCopyFragment, xn as formatEventHourLabel, xr as splitPositioningClasses, xt as buildEventRegistrationInteractiveIslandProps, y as checkoutBlockDefinition, ya as parseFieldDefinitions, yi as singleButtonFragment, yn as formatEventCompactDateRail, yr as composeHeaderSectionWrapperClassName, z as buildEventCalendarListingDisplay, zi as ctaButton, zn as bookingPageKindSchema, zr as createInteractiveIslandCodec, zt as resolveEventRegistrationScopedEvents } from "./registry-Cc88-23f.mjs";
5
+ import { A as ownedThemeSnapshot, I as HOVER_TEXT_THRESHOLD, L as certifyPaint, N as surfaceInkPublication, R as contrastThresholdByPolicy, _ as buttonStateAppearanceDeclarations, b as paddingDeclarations, f as actionVariableFallback, g as buttonShadow, h as buttonRadius, j as resolveSurfaceForeground, k as freezeOwnedThemeValue, m as buttonBorder, n as parseSurfaceTree, o as resolveSurface, s as serializeSurfaceTree, v as buttonTypographyDeclarations, w as mapButtonVisualAppearances, y as materializeRuntimeButtonAppearance, z as inkReference } from "./accessibleSurfaces-Dskni4Xj.mjs";
6
6
  import { b as siteChromeBackgroundOverrideOwner, m as surfaceCardRoleValues, s as boxBackgroundSchema } from "./schema-CwfxQjc4.mjs";
7
7
  import { a as normalizeLocationAddressText, c as publicLocationSchema, d as mapDrawingSchema } from "./mapLocation-MDDSubTp.mjs";
8
8
  import { t as assertNever$3 } from "./assert-never-ku-PUn9U.mjs";
9
- import { A as MQ_MD_UP, M as MQ_SM_UP, N as MQ_TABLET_ONLY, O as MQ_LG_UP, c as readSdkPreviewPublishedPlacement, h as compileManifestContentContract, j as MQ_SM_DOWN, k as MQ_MD_DOWN, y as validateManifestDraft } from "./pageRuntimeSupport-BytMroxn.mjs";
9
+ import { A as MQ_MD_UP, M as MQ_SM_UP, N as MQ_TABLET_ONLY, O as MQ_LG_UP, c as readSdkPreviewPublishedPlacement, h as compileManifestContentContract, j as MQ_SM_DOWN, k as MQ_MD_DOWN, y as validateManifestDraft } from "./pageRuntimeSupport-D2-YMRei.mjs";
10
10
  import { a as bindingSchema, l as RichTextDocSchema, m as sanitizeHref, n as isRecord$4, t as isObjectRecord } from "./typeGuards-CTW_9AXq.mjs";
11
11
  import { l as renderableMediaAssetSchema, o as runtimeMediaSchema } from "./media-gvfIw3z8.mjs";
12
- import { M as opaqueSurfaceDeclarations, T as testimonialsCompositionTreatmentValues, j as opaqueSurfaceContextFromTheme, v as featureCardCompositionTreatmentValues, x as offeringsPreviewCompositionTreatmentValues, y as introCompositionTreatmentValues } from "./lookMediaFrame-TFjgNG61.mjs";
13
- import { l as mergeHeaderNavTypographyPreference, u as readHeaderNavFontSizePreference } from "./bindings-DxojjtK3.mjs";
14
- import { A as generateShadowCssVars, C as INPUT_ERROR_BORDER_COLOR_VAR, D as RESOLVED_BUTTON_DISABLED_DECLARATIONS, E as generateOpaquePanelCss, M as cardBorderDeclarations, N as cardDecorationPseudoRules, O as resolvedButtonColourDeclarations, S as INPUT_EDGE_COLOR_VAR, T as generateCheckableCss, _ as getResponsiveScopeSpec, a as escapeStyleContent, b as INPUT_GROUP_SELECTOR, c as parseBlockCustomCssRules, d as generateBlockCustomVarsCss, f as generateTypographyCss, g as THEME_RESPONSIVE_CONTAINER_NAME, h as DEFAULT_THEME_RESPONSIVE_MODE, i as compileCustomCssRules, j as renderCssDeclarations, k as resolvedButtonFocusDeclarations, l as parseCustomCssRules, m as generateStatusCss, n as THEME_RADIUS_CSS_VARS, o as prefixSelector, p as generateProgressCss, r as compileBlockCustomCssRules, s as toKebabCase, t as ThemeScopeCore, u as generateAllBlockVarsCss, v as INPUT_GROUP_ERROR_SELECTOR, w as inputEdgeColorValue, x as generateInputGroupCss, y as INPUT_GROUP_FOCUS_SELECTOR } from "./ThemeScopeCore-BQWsnGT6.mjs";
12
+ import { M as opaqueSurfaceDeclarations, T as testimonialsCompositionTreatmentValues, j as opaqueSurfaceContextFromTheme, v as featureCardCompositionTreatmentValues, x as offeringsPreviewCompositionTreatmentValues, y as introCompositionTreatmentValues } from "./lookMediaFrame-H0fi4bJk.mjs";
13
+ import { l as mergeHeaderNavTypographyPreference, u as readHeaderNavFontSizePreference } from "./bindings-DMJH4bvo.mjs";
14
+ import { A as generateShadowCssVars, C as INPUT_ERROR_BORDER_COLOR_VAR, D as RESOLVED_BUTTON_DISABLED_DECLARATIONS, E as generateOpaquePanelCss, M as cardBorderDeclarations, N as cardDecorationPseudoRules, O as resolvedButtonColourDeclarations, S as INPUT_EDGE_COLOR_VAR, T as generateCheckableCss, _ as getResponsiveScopeSpec, a as escapeStyleContent, b as INPUT_GROUP_SELECTOR, c as parseBlockCustomCssRules, d as generateBlockCustomVarsCss, f as generateTypographyCss, g as THEME_RESPONSIVE_CONTAINER_NAME, h as DEFAULT_THEME_RESPONSIVE_MODE, i as compileCustomCssRules, j as renderCssDeclarations, k as resolvedButtonFocusDeclarations, l as parseCustomCssRules, m as generateStatusCss, n as THEME_RADIUS_CSS_VARS, o as prefixSelector, p as generateProgressCss, r as compileBlockCustomCssRules, s as toKebabCase, t as ThemeScopeCore, u as generateAllBlockVarsCss, v as INPUT_GROUP_ERROR_SELECTOR, w as inputEdgeColorValue, x as generateInputGroupCss, y as INPUT_GROUP_FOCUS_SELECTOR } from "./ThemeScopeCore-BfUCTOwj.mjs";
15
15
  import { c as ACCORDION_SPACING_MAP, d as ICON_CONFIG, f as ICON_SIZE_PX, i as getNodeProps, l as ACCORDION_TRIGGER_FONT_SCALE, n as getVideoEmbed, r as getVideoEmbedLoadingStrategy, s as ACCORDION_OPEN_ACCENT_THICKNESS, t as VIDEO_ASPECT_RATIO_PATTERN, u as ACCORDION_TRIGGER_LETTER_SPACING } from "./video-Cdr3wh-q.mjs";
16
- import { t as parseThemeForPersistence } from "./parseThemeForPersistence-Bihl4W5K.mjs";
16
+ import { t as parseThemeForPersistence } from "./parseThemeForPersistence-CrPlbJEN.mjs";
17
17
  import { n as mapOutlineBlocks } from "./pageRegions-BaeEF2MU.mjs";
18
18
  import { t as getAtPath } from "./src-DHK4JUlp.mjs";
19
19
  import * as React$1 from "react";
@@ -406,554 +406,238 @@ function flexibleBalanceDueDay(config, bookingStartAt, timeZone) {
406
406
  return formatLocalScheduleDate(rule.kind === "fixed_calendar_date" ? parseBookingLocalDate(rule.dueAt.slice(0, 10)) : addLocalScheduleDays(getLocalScheduleDate(new Date(bookingStartAt), timeZone), -rule.daysBeforeStart));
407
407
  }
408
408
  //#endregion
409
- //#region ../calendar/src/lane-packing.ts
409
+ //#region ../theme-core/src/styles/skinTokens.ts
410
+ function skinTokenCssVars(tokens) {
411
+ return Object.fromEntries(Object.entries(tokens ?? {}).map(([name, value]) => [`--rb-skin-${name}`, value]));
412
+ }
413
+ //#endregion
414
+ //#region ../theme-core/src/cards/constants.ts
410
415
  /**
411
- * Assign lanes to a list of intervals.
412
- *
413
- * Returns one result per input in the same order as the input. Internally
414
- * sorts a copy by `(start, end, orderKey)` to ensure determinism, then
415
- * permutes results back to input order.
416
+ * Corner style to border-radius value map for content-bearing card surfaces.
417
+ * Full pill radii are reserved for controls; cards need a capped radius so
418
+ * long titles, media, and expanded content do not clip into capsule shapes.
416
419
  */
417
- function assignLanes(intervals) {
418
- if (intervals.length === 0) return [];
419
- const indexed = intervals.map((interval, index) => ({
420
- interval,
421
- index
422
- }));
423
- indexed.sort((left, right) => left.interval.start - right.interval.start || left.interval.end - right.interval.end || left.interval.orderKey.localeCompare(right.interval.orderKey));
424
- const results = new Array(intervals.length);
425
- let cluster = [];
426
- let activeLaneEnds = [];
427
- let clusterMaxEnd = -Infinity;
428
- const closeCluster = () => {
429
- if (cluster.length === 0) return;
430
- const laneCount = Math.max(1, cluster.reduce((max, entry) => Math.max(max, entry.laneIndex + 1), 0));
431
- for (const entry of cluster) results[entry.index] = {
432
- laneIndex: entry.laneIndex,
433
- laneCount
434
- };
435
- cluster = [];
436
- activeLaneEnds = [];
437
- clusterMaxEnd = -Infinity;
420
+ const CORNER_RADIUS_MAP = {
421
+ square: "0px",
422
+ soft: "8px",
423
+ rounded: "16px",
424
+ pill: "24px"
425
+ };
426
+ /**
427
+ * Gradient direction to CSS direction map
428
+ */
429
+ const GRADIENT_DIRECTION_MAP = {
430
+ "to-r": "to right",
431
+ "to-l": "to left",
432
+ "to-t": "to top",
433
+ "to-b": "to bottom",
434
+ "to-tr": "to top right",
435
+ "to-tl": "to top left",
436
+ "to-br": "to bottom right",
437
+ "to-bl": "to bottom left"
438
+ };
439
+ /**
440
+ * Generate CSS box-shadow value from Shadow object
441
+ */
442
+ function generateShadowValue(shadow) {
443
+ if (shadow.elevation === "none") return "none";
444
+ const offset = {
445
+ low: 2,
446
+ medium: 4,
447
+ high: 6
448
+ }[shadow.elevation];
449
+ const xOffset = shadow.position === "bottom-right" ? offset : 0;
450
+ if (shadow.softness === "hard") return `${xOffset}px ${offset}px 0 0 rgba(0,0,0,1)`;
451
+ const soft = shadow.softness !== "crisp";
452
+ switch (shadow.elevation) {
453
+ case "low": return soft ? `${xOffset}px 1px 2px rgba(0,0,0,.06)` : `${xOffset}px 1px 1px rgba(0,0,0,.12)`;
454
+ case "medium": return soft ? `${xOffset}px 10px 20px rgba(0,0,0,.08)` : `${xOffset}px 6px 12px rgba(0,0,0,.16)`;
455
+ case "high": return soft ? `${xOffset}px 25px 50px rgba(0,0,0,.18)` : `${xOffset}px 20px 30px rgba(0,0,0,.28)`;
456
+ }
457
+ }
458
+ //#endregion
459
+ //#region ../theme-core/src/cards/generateCardCss.ts
460
+ const PER_CORNER_RADIUS_MAP = {
461
+ square: "0",
462
+ soft: "0.5rem",
463
+ rounded: "1rem",
464
+ pill: "1.5rem",
465
+ expressive: "calc(var(--rb-block-radius) * 3)"
466
+ };
467
+ function resolveCornerRadiiCss(cornerRadii, fallback) {
468
+ const fallbackValue = CORNER_RADIUS_MAP[fallback];
469
+ const at = (value) => value ? PER_CORNER_RADIUS_MAP[value] : fallbackValue;
470
+ return `${at(cornerRadii.topLeft)} ${at(cornerRadii.topRight)} ${at(cornerRadii.bottomRight)} ${at(cornerRadii.bottomLeft)}`;
471
+ }
472
+ function generateCardCss(options) {
473
+ const { themeId, cardSystem: providedCardSystem, solvedInks } = options;
474
+ const theme = {
475
+ ...options.theme,
476
+ buttons: ownedThemeSnapshot(options.theme.buttons)
438
477
  };
439
- for (const { interval, index } of indexed) {
440
- if (interval.start >= clusterMaxEnd) closeCluster();
441
- const laneIndex = firstAvailableLane(activeLaneEnds, interval.start);
442
- activeLaneEnds[laneIndex] = interval.end;
443
- clusterMaxEnd = Math.max(clusterMaxEnd, interval.end);
444
- cluster.push({
445
- index,
446
- laneIndex
447
- });
478
+ const tokens = new TokenResolver(theme);
479
+ const palette = freezeOwnedThemeValue(expandPalette(theme.palette));
480
+ const cardSystem = providedCardSystem ?? generateDefaultCardSystem(theme);
481
+ const source = providedCardSystem ? "site-style" : "generated-baseline";
482
+ const aliasGroups = resolveRoleAliasGroups(theme, providedCardSystem ?? null);
483
+ const cssChunks = [];
484
+ const emittedGroupKeys = /* @__PURE__ */ new Set();
485
+ for (const variant of cardSystem.variants) {
486
+ if (!variant.enabled) continue;
487
+ const groupKey = roleAliasGroupKey(source, variant.id);
488
+ emittedGroupKeys.add(groupKey);
489
+ const aliasClasses = aliasGroups.get(groupKey)?.classes ?? [];
490
+ cssChunks.push(generateVariantCSS(variant, themeId, [`card-${variant.id}`, ...aliasClasses], tokens, theme, palette, solvedInks));
448
491
  }
449
- closeCluster();
450
- return results;
492
+ for (const [groupKey, group] of aliasGroups) {
493
+ if (emittedGroupKeys.has(groupKey)) continue;
494
+ cssChunks.push(generateVariantCSS(group.variant, themeId, group.classes, tokens, theme, palette, solvedInks));
495
+ }
496
+ return cssChunks.filter(Boolean).join("\n\n");
451
497
  }
452
- function firstAvailableLane(activeLaneEnds, start) {
453
- const laneIndex = activeLaneEnds.findIndex((end) => end <= start);
454
- return laneIndex >= 0 ? laneIndex : activeLaneEnds.length;
498
+ function roleAliasGroupKey(source, variantId) {
499
+ return `${source}:${variantId}`;
455
500
  }
456
- //#endregion
457
- //#region ../calendar/src/timetable.ts
458
501
  /**
459
- * Timetable model — the package's core surface.
460
- *
461
- * Generic over `T`. Takes a list of timed items + a viewport; returns a
462
- * day-by-day layout with overlap-packed lanes and percent-based positions
463
- * plus a diagnostics list for items dropped during processing.
502
+ * Stable per-theme role aliases (`.card-role-default` and friends), resolved
503
+ * through the fallback chain so compiled content can address a role without
504
+ * knowing which variant id a site style used — or whether it defined one.
464
505
  *
465
- * The function is pure: given identical input (including `now`), it returns
466
- * the same output. The model has no opinion on what an item is — pass
467
- * accessors.
506
+ * Aliases are grouped by the variant they resolve to, so an alias shares one
507
+ * rule with that variant rather than duplicating its declarations.
468
508
  */
469
- const DEFAULT_BOUNDS = {
470
- minStartHour: 5,
471
- maxEndHour: 23,
472
- defaultStartHour: 6,
473
- defaultEndHour: 21,
474
- minHeightPercent: 2.5,
475
- marginMinutes: 0
476
- };
477
- function buildTimetableModel$1(input) {
478
- const bounds = resolveBounds(input.bounds);
479
- const viewportDays = getTimetableDays(input.viewDate, input.view ?? "week", input.startOfWeek);
480
- const viewportKeys = new Set(viewportDays.map(formatDateKey));
481
- const parsed = parseAllItems(input.items, input);
482
- const inViewport = deriveVisibleSegments(parsed.drafts, viewportKeys);
483
- const hourRange = input.hours === void 0 ? resolveHourRange(inViewport, bounds) : fixedHourRange(input.hours);
484
- const laid = layoutCellsByDate(inViewport, hourRange, bounds);
485
- return {
486
- days: assembleDays(viewportDays, laid.cellsByDate, input.today),
487
- hourTicks: buildHourTicks(hourRange.startHour, hourRange.endHour),
488
- startHour: hourRange.startHour,
489
- endHour: hourRange.endHour,
490
- rangeMinutes: (hourRange.endHour - hourRange.startHour) * 60,
491
- hasItems: inViewport.length > 0,
492
- diagnostics: [...parsed.diagnostics, ...laid.diagnostics]
493
- };
494
- }
495
- function parseAllItems(items, accessors) {
496
- const drafts = [];
497
- const diagnostics = [];
498
- for (const item of items) {
499
- const result = parseDraft(item, accessors);
500
- if (result.ok) drafts.push(result.draft);
501
- else diagnostics.push({
502
- item,
503
- reason: result.reason
509
+ function resolveRoleAliasGroups(theme, cardSystem) {
510
+ const groups = /* @__PURE__ */ new Map();
511
+ for (const role of surfaceCardRoleValues) {
512
+ const resolved = resolveCardRole(theme, cardSystem, role);
513
+ if (resolved.kind === "none") continue;
514
+ const groupKey = roleAliasGroupKey(resolved.source, resolved.variant.id);
515
+ const aliasClass = `card-role-${role}`;
516
+ const group = groups.get(groupKey);
517
+ if (group) group.classes.push(aliasClass);
518
+ else groups.set(groupKey, {
519
+ variant: resolved.variant,
520
+ classes: [aliasClass]
504
521
  });
505
522
  }
506
- return {
507
- drafts,
508
- diagnostics
509
- };
510
- }
511
- function layoutCellsByDate(segments, hourRange, bounds) {
512
- const rangeMinutes = (hourRange.endHour - hourRange.startHour) * 60;
513
- const rangeStartMinutes = hourRange.startHour * 60;
514
- const rangeEndMinutes = hourRange.endHour * 60;
515
- const segmentsByDate = groupSegmentsByDate(segments);
516
- const cellsByDate = /* @__PURE__ */ new Map();
517
- const diagnostics = [];
518
- for (const [dateKey, daySegments] of segmentsByDate) {
519
- const clipped = [];
520
- for (const segment of daySegments) {
521
- const result = clipDraft(segment, rangeStartMinutes, rangeEndMinutes);
522
- if (result.ok) clipped.push(result.clipped);
523
- else diagnostics.push({
524
- item: segment.draft.item,
525
- reason: result.reason
526
- });
527
- }
528
- const laneResults = assignLanes(clipped.map((entry) => ({
529
- start: entry.visibleStart,
530
- end: entry.visibleEnd,
531
- orderKey: entry.segment.draft.orderKey
532
- })));
533
- cellsByDate.set(dateKey, clipped.map((entry, idx) => buildCell(entry, laneResults[idx] ?? {
534
- laneIndex: 0,
535
- laneCount: 1
536
- }, rangeStartMinutes, rangeMinutes, bounds.minHeightPercent)));
537
- }
538
- return {
539
- cellsByDate,
540
- diagnostics
541
- };
542
- }
543
- function assembleDays(viewportDays, cellsByDate, today) {
544
- return viewportDays.map((date) => {
545
- const dateKey = formatDateKey(date);
546
- return {
547
- date,
548
- dateKey,
549
- isToday: isSameCalendarDay(date, today),
550
- cells: cellsByDate.get(dateKey) ?? []
551
- };
552
- });
523
+ return groups;
553
524
  }
554
- function parseDraft(item, accessors) {
555
- const startsAtIso = accessors.getStartsAt(item);
556
- const endsAtIso = accessors.getEndsAt(item);
557
- const timeZone = accessors.getTimeZone(item);
558
- const startsAtMinutes = getLocalMinuteOfDay(startsAtIso, timeZone);
559
- if (Number.isNaN(startsAtMinutes)) return {
560
- ok: false,
561
- reason: "invalid-start"
562
- };
563
- const startDateKey = getLocalDateKey(startsAtIso, timeZone);
564
- if (startDateKey == null) return {
565
- ok: false,
566
- reason: "invalid-timezone"
567
- };
568
- const endDateKey = getLocalDateKey(endsAtIso, timeZone);
569
- if (endDateKey == null) return {
570
- ok: false,
571
- reason: "invalid-end"
572
- };
573
- const endsAtMinutesRaw = getLocalMinuteOfDay(endsAtIso, timeZone);
574
- if (Number.isNaN(endsAtMinutesRaw)) return {
575
- ok: false,
576
- reason: "invalid-end"
577
- };
578
- const spansMultipleDays = startDateKey < endDateKey;
579
- const endsAtMinutes = spansMultipleDays || endsAtMinutesRaw > startsAtMinutes ? endsAtMinutesRaw : Math.min(1440, startsAtMinutes + 60);
580
- if (!spansMultipleDays && endsAtMinutes <= startsAtMinutes) return {
581
- ok: false,
582
- reason: "non-positive-duration"
583
- };
584
- return {
585
- ok: true,
586
- draft: {
587
- item,
588
- startDateKey,
589
- endDateKey,
590
- startsAtMinutes,
591
- endsAtMinutes,
592
- color: accessors.getColor?.(item) ?? null,
593
- orderKey: accessors.getOrderKey?.(item) ?? accessors.getId(item)
594
- }
595
- };
596
- }
597
- function deriveVisibleSegments(drafts, viewportKeys) {
598
- const segments = [];
599
- for (const draft of drafts) for (const dateKey of enumerateDateKeys(draft.startDateKey, draft.endDateKey)) {
600
- if (!viewportKeys.has(dateKey)) continue;
601
- const isStartDay = dateKey === draft.startDateKey;
602
- const isEndDay = dateKey === draft.endDateKey;
603
- const startsAtMinutes = isStartDay ? draft.startsAtMinutes : 0;
604
- const endsAtMinutes = isEndDay ? draft.endsAtMinutes : 1440;
605
- if (endsAtMinutes <= startsAtMinutes) continue;
606
- segments.push({
607
- draft,
608
- dateKey,
609
- startsAtMinutes,
610
- endsAtMinutes,
611
- continuesBefore: !isStartDay,
612
- continuesAfter: !isEndDay
613
- });
525
+ /**
526
+ * Padding map for card content based on spacing semantic values
527
+ */
528
+ const CONTENT_PADDING_MAP = {
529
+ none: "0",
530
+ compact: "0.75rem",
531
+ cozy: "1rem",
532
+ medium: "1.25rem",
533
+ comfortable: "1.5rem",
534
+ spacious: "2rem"
535
+ };
536
+ /**
537
+ * Corner radius map for card media (top corners only). Match card surface
538
+ * radii rather than button pills so media does not become capsule-clipped.
539
+ */
540
+ const MEDIA_CORNER_MAP = {
541
+ square: "0",
542
+ soft: "0.5rem",
543
+ rounded: "1rem",
544
+ pill: "1.5rem"
545
+ };
546
+ /**
547
+ * Generate CSS for a single card variant
548
+ *
549
+ * Generates complete CSS for card containers and their children:
550
+ * - Container: background, shadow, corners, border
551
+ * - .card-media: top corners matching container
552
+ * - .card-content: padding based on spacing
553
+ *
554
+ * This CSS-first approach eliminates runtime transforms for styling,
555
+ * keeping transforms only for data normalization and dynamic layout.
556
+ */
557
+ function generateVariantCSS(variant, themeId, cardClasses, tokens, theme, palette, solvedInks) {
558
+ const selectorsFor = (suffix) => cardClasses.map((cardClass) => `:where([data-theme-scope="${themeId}"]) .${cardClass}.${cardClass}${suffix}`).join(",\n");
559
+ const containerSelectors = cardClasses.map((cardClass) => `:where([data-theme-scope="${themeId}"]) .${cardClass}.${cardClass}`);
560
+ const containerSelector = containerSelectors.join(",\n");
561
+ const mediaSelector = selectorsFor(" .card-media");
562
+ const contentSelector = selectorsFor(" .card-content");
563
+ const fallbackBackgroundSelector = selectorsFor(" > .rb-bg-surface");
564
+ const rules = [];
565
+ rules.push(...cardSurfaceRules(variant, tokens, theme, palette, solvedInks));
566
+ const resolveColor = (token) => tokens.getColor(token);
567
+ rules.push(...cardBorderDeclarations(variant.border ? borderDeclaration(variant.border, tokens) : null, variant.decorations, resolveColor));
568
+ const corners = variant.corners ?? theme.corners;
569
+ const radius = variant.cornerRadii ? resolveCornerRadiiCss(variant.cornerRadii, corners) : CORNER_RADIUS_MAP[corners];
570
+ rules.push(`border-radius: ${radius}`);
571
+ const shadow = variant.shadow ?? theme.shadow;
572
+ if (shadow.elevation !== "none") {
573
+ const shadowValue = generateShadowValue(shadow);
574
+ rules.push(`box-shadow: ${shadowValue}`);
614
575
  }
615
- return segments;
616
- }
617
- function clipDraft(segment, rangeStartMinutes, rangeEndMinutes) {
618
- const visibleStart = Math.max(rangeStartMinutes, segment.startsAtMinutes);
619
- const visibleEnd = Math.min(rangeEndMinutes, segment.endsAtMinutes);
620
- if (visibleEnd <= visibleStart) return {
621
- ok: false,
622
- reason: "out-of-visible-hours"
623
- };
624
- return {
625
- ok: true,
626
- clipped: {
627
- segment,
628
- visibleStart,
629
- visibleEnd
630
- }
631
- };
632
- }
633
- function buildCell(entry, lane, rangeStartMinutes, rangeMinutes, minHeightPercent) {
634
- const heightPercent = Math.max(minHeightPercent, toRangePercent(entry.visibleEnd - entry.visibleStart, rangeMinutes));
635
- const rawTopPercent = toRangePercent(entry.visibleStart - rangeStartMinutes, rangeMinutes);
636
- const topPercent = Math.min(rawTopPercent, 100 - heightPercent);
637
- return {
638
- item: entry.segment.draft.item,
639
- dateKey: entry.segment.dateKey,
640
- startsAtMinutes: entry.segment.startsAtMinutes,
641
- endsAtMinutes: entry.segment.endsAtMinutes,
642
- visibleStartsAtMinutes: entry.visibleStart,
643
- visibleEndsAtMinutes: entry.visibleEnd,
644
- topPercent,
645
- heightPercent,
646
- isClippedStart: entry.segment.continuesBefore || entry.segment.startsAtMinutes < entry.visibleStart,
647
- isClippedEnd: entry.segment.continuesAfter || entry.segment.endsAtMinutes > entry.visibleEnd,
648
- laneIndex: lane.laneIndex,
649
- laneCount: lane.laneCount,
650
- color: entry.segment.draft.color
651
- };
652
- }
653
- function resolveBounds(bounds) {
654
- return {
655
- ...DEFAULT_BOUNDS,
656
- ...bounds
657
- };
658
- }
659
- function resolveHourRange(segments, bounds) {
660
- if (segments.length === 0) return {
661
- startHour: bounds.defaultStartHour,
662
- endHour: bounds.defaultEndHour
663
- };
664
- const earliestStart = Math.min(...segments.map((segment) => segment.startsAtMinutes));
665
- const latestEnd = Math.max(...segments.map((segment) => segment.endsAtMinutes));
666
- const startHour = Math.max(bounds.minStartHour, Math.floor((earliestStart - bounds.marginMinutes) / 60));
667
- const endHour = Math.min(bounds.maxEndHour, Math.ceil((latestEnd + bounds.marginMinutes) / 60));
668
- return {
669
- startHour,
670
- endHour: Math.max(startHour + 1, endHour)
671
- };
672
- }
673
- function fixedHourRange(hours) {
674
- const startHour = Math.min(23, Math.max(0, Math.floor(hours.startHour)));
675
- return {
676
- startHour,
677
- endHour: Math.min(24, Math.max(startHour + 1, Math.ceil(hours.endHour)))
678
- };
576
+ const structureSelector = cardClasses.map((cardClass) => `:where([data-theme-scope="${themeId}"]) :where(.${cardClass})`).join(",\n");
577
+ const mediaRadius = MEDIA_CORNER_MAP[corners];
578
+ const mediaRules = [`border-top-left-radius: ${mediaRadius}`, `border-top-right-radius: ${mediaRadius}`];
579
+ const contentRules = [`padding: ${resolveContentPadding(variant)}`];
580
+ return [
581
+ `${structureSelector} {\n display: flex;\n flex-direction: column;\n position: relative;\n overflow: visible;\n}`,
582
+ `${containerSelector} {\n ${renderCssDeclarations(rules)}\n}`,
583
+ ...cardDecorationPseudoRules(containerSelectors, variant.decorations, resolveColor),
584
+ `${fallbackBackgroundSelector} {\n background: transparent;\n}`,
585
+ `${mediaSelector} {\n ${mediaRules.join(";\n ")};\n}`,
586
+ `${contentSelector} {\n ${contentRules.join(";\n ")};\n}`
587
+ ].join("\n\n");
679
588
  }
680
- function buildHourTicks(startHour, endHour) {
681
- const ticks = [];
682
- for (let hour = startHour; hour <= endHour; hour += 1) ticks.push(hour);
683
- return ticks;
589
+ function cardSurfaceRules(variant, tokens, theme, palette, solvedInks) {
590
+ if (variant.background.type === "transparent") return ["background: transparent"];
591
+ const surface = resolveSurface({
592
+ kind: "paint",
593
+ paint: cardSurfacePaint(variant)
594
+ }, {
595
+ palette,
596
+ buttonSystem: theme.buttons,
597
+ linkHoverToken: theme.typography.proseLinkStyle?.hoverColorToken,
598
+ solvedInks
599
+ });
600
+ return [cardBackgroundRule(variant.background, tokens), ...opaqueSurfaceDeclarations(surface)];
684
601
  }
685
- function groupSegmentsByDate(segments) {
686
- const grouped = /* @__PURE__ */ new Map();
687
- for (const segment of segments) {
688
- const existing = grouped.get(segment.dateKey) ?? [];
689
- existing.push(segment);
690
- grouped.set(segment.dateKey, existing);
602
+ function cardSurfacePaint(variant) {
603
+ switch (variant.background.type) {
604
+ case "transparent": return { kind: "transparent" };
605
+ case "solid": return {
606
+ kind: "solid",
607
+ token: variant.background.colorToken,
608
+ foregroundToken: variant.foregroundToken
609
+ };
610
+ case "gradient": return {
611
+ kind: "gradient",
612
+ foregroundToken: variant.foregroundToken
613
+ };
691
614
  }
692
- return grouped;
693
- }
694
- function toRangePercent(minutes, rangeMinutes) {
695
- if (rangeMinutes <= 0) return 0;
696
- return minutes / rangeMinutes * 100;
697
615
  }
698
- function getTimetableDays(viewDate, view, startOfWeek) {
699
- if (view === "day") return [viewDate];
700
- return getWeekCalendarDays(viewDate, startOfWeek);
616
+ function cardBackgroundRule(background, tokens) {
617
+ if (background.type === "solid") return `background: ${tokens.getColor(background.colorToken)}`;
618
+ const from = tokens.getColor(background.fromToken);
619
+ const to = tokens.getColor(background.toToken);
620
+ return `background: linear-gradient(${GRADIENT_DIRECTION_MAP[background.direction] || "to right"}, ${from}, ${to})`;
701
621
  }
702
- function enumerateDateKeys(startDateKey, endDateKey) {
703
- if (startDateKey > endDateKey) throw new Error(`Invalid timetable date range: ${startDateKey} is after ${endDateKey}`);
704
- const start = parseDateKey(startDateKey);
705
- parseDateKey(endDateKey);
706
- const keys = [];
707
- let cursor = start;
708
- while (formatDateKey(cursor) <= endDateKey) {
709
- keys.push(formatDateKey(cursor));
710
- cursor = addDays(cursor, 1);
711
- }
712
- return keys;
622
+ function borderDeclaration(border, tokens) {
623
+ const borderColor = tokens.getColor(border.colorToken);
624
+ return `border: ${border.widthClass === "border-4" ? "4px" : border.widthClass === "border-2" ? "2px" : border.widthClass === "border" ? "1px" : "1px"} solid ${borderColor}`;
713
625
  }
714
- function parseDateKey(dateKey) {
715
- const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(dateKey);
716
- if (match === null) throw new Error(`Invalid timetable date key: ${dateKey}`);
717
- const [, year, month, day] = match;
718
- return {
719
- year: Number(year),
720
- month: Number(month),
721
- day: Number(day)
722
- };
626
+ function paddingFor(spacing) {
627
+ return CONTENT_PADDING_MAP[spacing] || CONTENT_PADDING_MAP.comfortable;
723
628
  }
724
- //#endregion
725
- //#region ../theme-core/src/styles/skinTokens.ts
726
- function skinTokenCssVars(tokens) {
727
- return Object.fromEntries(Object.entries(tokens ?? {}).map(([name, value]) => [`--rb-skin-${name}`, value]));
629
+ /** A card's padding: one value for both axes, or one per axis. */
630
+ function resolveContentPadding(variant) {
631
+ const spacing = variant.spacing;
632
+ return typeof spacing === "string" ? paddingFor(spacing) : `${paddingFor(spacing.block)} ${paddingFor(spacing.inline)}`;
728
633
  }
729
634
  //#endregion
730
- //#region ../theme-core/src/cards/constants.ts
635
+ //#region ../theme-core/src/accordions/defaults.ts
731
636
  /**
732
- * Corner style to border-radius value map for content-bearing card surfaces.
733
- * Full pill radii are reserved for controls; cards need a capped radius so
734
- * long titles, media, and expanded content do not clip into capsule shapes.
735
- */
736
- const CORNER_RADIUS_MAP = {
737
- square: "0px",
738
- soft: "8px",
739
- rounded: "16px",
740
- pill: "24px"
741
- };
742
- /**
743
- * Gradient direction to CSS direction map
744
- */
745
- const GRADIENT_DIRECTION_MAP = {
746
- "to-r": "to right",
747
- "to-l": "to left",
748
- "to-t": "to top",
749
- "to-b": "to bottom",
750
- "to-tr": "to top right",
751
- "to-tl": "to top left",
752
- "to-br": "to bottom right",
753
- "to-bl": "to bottom left"
754
- };
755
- /**
756
- * Generate CSS box-shadow value from Shadow object
757
- */
758
- function generateShadowValue(shadow) {
759
- if (shadow.elevation === "none") return "none";
760
- const offset = {
761
- low: 2,
762
- medium: 4,
763
- high: 6
764
- }[shadow.elevation];
765
- const xOffset = shadow.position === "bottom-right" ? offset : 0;
766
- if (shadow.softness === "hard") return `${xOffset}px ${offset}px 0 0 rgba(0,0,0,1)`;
767
- const soft = shadow.softness !== "crisp";
768
- switch (shadow.elevation) {
769
- case "low": return soft ? `${xOffset}px 1px 2px rgba(0,0,0,.06)` : `${xOffset}px 1px 1px rgba(0,0,0,.12)`;
770
- case "medium": return soft ? `${xOffset}px 10px 20px rgba(0,0,0,.08)` : `${xOffset}px 6px 12px rgba(0,0,0,.16)`;
771
- case "high": return soft ? `${xOffset}px 25px 50px rgba(0,0,0,.18)` : `${xOffset}px 20px 30px rgba(0,0,0,.28)`;
772
- }
773
- }
774
- //#endregion
775
- //#region ../theme-core/src/cards/generateCardCss.ts
776
- const PER_CORNER_RADIUS_MAP = {
777
- square: "0",
778
- soft: "0.5rem",
779
- rounded: "1rem",
780
- pill: "1.5rem",
781
- expressive: "calc(var(--rb-block-radius) * 3)"
782
- };
783
- function resolveCornerRadiiCss(cornerRadii, fallback) {
784
- const fallbackValue = CORNER_RADIUS_MAP[fallback];
785
- const at = (value) => value ? PER_CORNER_RADIUS_MAP[value] : fallbackValue;
786
- return `${at(cornerRadii.topLeft)} ${at(cornerRadii.topRight)} ${at(cornerRadii.bottomRight)} ${at(cornerRadii.bottomLeft)}`;
787
- }
788
- function generateCardCss(options) {
789
- const { themeId, cardSystem: providedCardSystem, solvedInks } = options;
790
- const theme = {
791
- ...options.theme,
792
- buttons: ownedThemeSnapshot(options.theme.buttons)
793
- };
794
- const tokens = new TokenResolver(theme);
795
- const palette = freezeOwnedThemeValue(expandPalette(theme.palette));
796
- const cardSystem = providedCardSystem ?? generateDefaultCardSystem(theme);
797
- const source = providedCardSystem ? "site-style" : "generated-baseline";
798
- const aliasGroups = resolveRoleAliasGroups(theme, providedCardSystem ?? null);
799
- const cssChunks = [];
800
- const emittedGroupKeys = /* @__PURE__ */ new Set();
801
- for (const variant of cardSystem.variants) {
802
- if (!variant.enabled) continue;
803
- const groupKey = roleAliasGroupKey(source, variant.id);
804
- emittedGroupKeys.add(groupKey);
805
- const aliasClasses = aliasGroups.get(groupKey)?.classes ?? [];
806
- cssChunks.push(generateVariantCSS(variant, themeId, [`card-${variant.id}`, ...aliasClasses], tokens, theme, palette, solvedInks));
807
- }
808
- for (const [groupKey, group] of aliasGroups) {
809
- if (emittedGroupKeys.has(groupKey)) continue;
810
- cssChunks.push(generateVariantCSS(group.variant, themeId, group.classes, tokens, theme, palette, solvedInks));
811
- }
812
- return cssChunks.filter(Boolean).join("\n\n");
813
- }
814
- function roleAliasGroupKey(source, variantId) {
815
- return `${source}:${variantId}`;
816
- }
817
- /**
818
- * Stable per-theme role aliases (`.card-role-default` and friends), resolved
819
- * through the fallback chain so compiled content can address a role without
820
- * knowing which variant id a site style used — or whether it defined one.
821
- *
822
- * Aliases are grouped by the variant they resolve to, so an alias shares one
823
- * rule with that variant rather than duplicating its declarations.
824
- */
825
- function resolveRoleAliasGroups(theme, cardSystem) {
826
- const groups = /* @__PURE__ */ new Map();
827
- for (const role of surfaceCardRoleValues) {
828
- const resolved = resolveCardRole(theme, cardSystem, role);
829
- if (resolved.kind === "none") continue;
830
- const groupKey = roleAliasGroupKey(resolved.source, resolved.variant.id);
831
- const aliasClass = `card-role-${role}`;
832
- const group = groups.get(groupKey);
833
- if (group) group.classes.push(aliasClass);
834
- else groups.set(groupKey, {
835
- variant: resolved.variant,
836
- classes: [aliasClass]
837
- });
838
- }
839
- return groups;
840
- }
841
- /**
842
- * Padding map for card content based on spacing semantic values
843
- */
844
- const CONTENT_PADDING_MAP = {
845
- none: "0",
846
- compact: "0.75rem",
847
- cozy: "1rem",
848
- medium: "1.25rem",
849
- comfortable: "1.5rem",
850
- spacious: "2rem"
851
- };
852
- /**
853
- * Corner radius map for card media (top corners only). Match card surface
854
- * radii rather than button pills so media does not become capsule-clipped.
855
- */
856
- const MEDIA_CORNER_MAP = {
857
- square: "0",
858
- soft: "0.5rem",
859
- rounded: "1rem",
860
- pill: "1.5rem"
861
- };
862
- /**
863
- * Generate CSS for a single card variant
864
- *
865
- * Generates complete CSS for card containers and their children:
866
- * - Container: background, shadow, corners, border
867
- * - .card-media: top corners matching container
868
- * - .card-content: padding based on spacing
869
- *
870
- * This CSS-first approach eliminates runtime transforms for styling,
871
- * keeping transforms only for data normalization and dynamic layout.
872
- */
873
- function generateVariantCSS(variant, themeId, cardClasses, tokens, theme, palette, solvedInks) {
874
- const selectorsFor = (suffix) => cardClasses.map((cardClass) => `:where([data-theme-scope="${themeId}"]) .${cardClass}.${cardClass}${suffix}`).join(",\n");
875
- const containerSelectors = cardClasses.map((cardClass) => `:where([data-theme-scope="${themeId}"]) .${cardClass}.${cardClass}`);
876
- const containerSelector = containerSelectors.join(",\n");
877
- const mediaSelector = selectorsFor(" .card-media");
878
- const contentSelector = selectorsFor(" .card-content");
879
- const fallbackBackgroundSelector = selectorsFor(" > .rb-bg-surface");
880
- const rules = [];
881
- rules.push(...cardSurfaceRules(variant, tokens, theme, palette, solvedInks));
882
- const resolveColor = (token) => tokens.getColor(token);
883
- rules.push(...cardBorderDeclarations(variant.border ? borderDeclaration(variant.border, tokens) : null, variant.decorations, resolveColor));
884
- const corners = variant.corners ?? theme.corners;
885
- const radius = variant.cornerRadii ? resolveCornerRadiiCss(variant.cornerRadii, corners) : CORNER_RADIUS_MAP[corners];
886
- rules.push(`border-radius: ${radius}`);
887
- const shadow = variant.shadow ?? theme.shadow;
888
- if (shadow.elevation !== "none") {
889
- const shadowValue = generateShadowValue(shadow);
890
- rules.push(`box-shadow: ${shadowValue}`);
891
- }
892
- const structureSelector = cardClasses.map((cardClass) => `:where([data-theme-scope="${themeId}"]) :where(.${cardClass})`).join(",\n");
893
- const mediaRadius = MEDIA_CORNER_MAP[corners];
894
- const mediaRules = [`border-top-left-radius: ${mediaRadius}`, `border-top-right-radius: ${mediaRadius}`];
895
- const contentRules = [`padding: ${resolveContentPadding(variant)}`];
896
- return [
897
- `${structureSelector} {\n display: flex;\n flex-direction: column;\n position: relative;\n overflow: visible;\n}`,
898
- `${containerSelector} {\n ${renderCssDeclarations(rules)}\n}`,
899
- ...cardDecorationPseudoRules(containerSelectors, variant.decorations, resolveColor),
900
- `${fallbackBackgroundSelector} {\n background: transparent;\n}`,
901
- `${mediaSelector} {\n ${mediaRules.join(";\n ")};\n}`,
902
- `${contentSelector} {\n ${contentRules.join(";\n ")};\n}`
903
- ].join("\n\n");
904
- }
905
- function cardSurfaceRules(variant, tokens, theme, palette, solvedInks) {
906
- if (variant.background.type === "transparent") return ["background: transparent"];
907
- const surface = resolveSurface({
908
- kind: "paint",
909
- paint: cardSurfacePaint(variant)
910
- }, {
911
- palette,
912
- buttonSystem: theme.buttons,
913
- linkHoverToken: theme.typography.proseLinkStyle?.hoverColorToken,
914
- solvedInks
915
- });
916
- return [cardBackgroundRule(variant.background, tokens), ...opaqueSurfaceDeclarations(surface)];
917
- }
918
- function cardSurfacePaint(variant) {
919
- switch (variant.background.type) {
920
- case "transparent": return { kind: "transparent" };
921
- case "solid": return {
922
- kind: "solid",
923
- token: variant.background.colorToken,
924
- foregroundToken: variant.foregroundToken
925
- };
926
- case "gradient": return {
927
- kind: "gradient",
928
- foregroundToken: variant.foregroundToken
929
- };
930
- }
931
- }
932
- function cardBackgroundRule(background, tokens) {
933
- if (background.type === "solid") return `background: ${tokens.getColor(background.colorToken)}`;
934
- const from = tokens.getColor(background.fromToken);
935
- const to = tokens.getColor(background.toToken);
936
- return `background: linear-gradient(${GRADIENT_DIRECTION_MAP[background.direction] || "to right"}, ${from}, ${to})`;
937
- }
938
- function borderDeclaration(border, tokens) {
939
- const borderColor = tokens.getColor(border.colorToken);
940
- return `border: ${border.widthClass === "border-4" ? "4px" : border.widthClass === "border-2" ? "2px" : border.widthClass === "border" ? "1px" : "1px"} solid ${borderColor}`;
941
- }
942
- function paddingFor(spacing) {
943
- return CONTENT_PADDING_MAP[spacing] || CONTENT_PADDING_MAP.comfortable;
944
- }
945
- /** A card's padding: one value for both axes, or one per axis. */
946
- function resolveContentPadding(variant) {
947
- const spacing = variant.spacing;
948
- return typeof spacing === "string" ? paddingFor(spacing) : `${paddingFor(spacing.block)} ${paddingFor(spacing.inline)}`;
949
- }
950
- //#endregion
951
- //#region ../theme-core/src/accordions/defaults.ts
952
- /**
953
- * Generate default accordion system based on theme configuration
954
- *
955
- * Creates a single accordion style that harmonizes with the theme's
956
- * visual language (spacing, borders, shadows, colors).
637
+ * Generate default accordion system based on theme configuration
638
+ *
639
+ * Creates a single accordion style that harmonizes with the theme's
640
+ * visual language (spacing, borders, shadows, colors).
957
641
  */
958
642
  function generateDefaultAccordionSystem(theme) {
959
643
  const overrides = theme.siteStyleId ? requireCuratedSiteStyle(theme.siteStyleId).themeOverrides?.accordions : void 0;
@@ -3478,6 +3162,9 @@ function generateBoundaryCss(selector) {
3478
3162
  * footer blocks intervene, document adapters mark their region so only their
3479
3163
  * ending receives the reserve (and an empty region falls back to the page).
3480
3164
  *
3165
+ * A two-column layout (a booking page) marks itself rather than a block: its
3166
+ * sections have no padding of their own, and either column can end lower.
3167
+ *
3481
3168
  * Pages that don't come from the page renderer (privacy, terms, checkout, the
3482
3169
  * portal, a not-found page) have no block ending. The site document's content
3483
3170
  * area takes the reserve for them instead, but only when nothing inside it is
@@ -3487,7 +3174,11 @@ function footerEdgeReserveCss(selector, entry) {
3487
3174
  const metrics = boundaryRuntimeMetricsForDecorativeTransition(entry.intent);
3488
3175
  const withEdge = `${selector}:has([data-footer-edge][data-boundary-treatment='${entry.intent}'])`;
3489
3176
  const pageEnds = `${withEdge}:not(:has([data-footer-blocks] [data-page-ending]))`;
3490
- return [rule(`${pageEnds} [data-block][data-page-ending] > ${blockSection}, ${withEdge} [data-footer-blocks] [data-block][data-page-ending] > ${blockSection}`, [`padding-bottom: calc(var(--rb-section-pad-y, 0rem) + ${metrics.heightCss});`]), rule(`${pageEnds} [data-site-document-content]:not(:has([data-page-ending]))`, [`padding-bottom: ${metrics.heightCss};`])];
3177
+ return [
3178
+ rule(`${pageEnds} [data-block][data-page-ending] > ${blockSection}, ${withEdge} [data-footer-blocks] [data-block][data-page-ending] > ${blockSection}`, [`padding-bottom: calc(var(--rb-section-pad-y, 0rem) + ${metrics.heightCss});`]),
3179
+ rule(`${pageEnds} [data-page-layout][data-page-ending]`, [`padding-bottom: calc(var(--rb-page-layout-pad-y, 0rem) + ${metrics.heightCss});`]),
3180
+ rule(`${pageEnds} [data-site-document-content]:not(:has([data-page-ending]))`, [`padding-bottom: ${metrics.heightCss};`])
3181
+ ];
3491
3182
  }
3492
3183
  function placementCss(boundary) {
3493
3184
  return Object.keys(placementRules).flatMap((placement) => {
@@ -4155,525 +3846,969 @@ function buildThemeCssVars(theme) {
4155
3846
  /** Font roles use one formatter and weight mapping; absent small headings add no variables. */
4156
3847
  function typographyFontRoleCssVars(typography) {
4157
3848
  return {
4158
- "--font-heading": formatFontFamily(typography.headings.default.family),
4159
- "--font-body": formatFontFamily(typography.body.family),
4160
- ...typography.smallHeading ? {
4161
- "--font-small-heading": formatFontFamily(typography.smallHeading.family),
4162
- "--fw-small-heading": mapWeight(typography.smallHeading.weight)
4163
- } : {}
3849
+ "--font-heading": formatFontFamily(typography.headings.default.family),
3850
+ "--font-body": formatFontFamily(typography.body.family),
3851
+ ...typography.smallHeading ? {
3852
+ "--font-small-heading": formatFontFamily(typography.smallHeading.family),
3853
+ "--fw-small-heading": mapWeight(typography.smallHeading.weight)
3854
+ } : {}
3855
+ };
3856
+ }
3857
+ function mapWeight(w) {
3858
+ return {
3859
+ light: 300,
3860
+ regular: 400,
3861
+ medium: 500,
3862
+ semibold: 600,
3863
+ bold: 700
3864
+ }[w];
3865
+ }
3866
+ function mapShadow(level, softness, position = "bottom", colorToken) {
3867
+ if (level === "none") return "none";
3868
+ const tintVar = colorToken ? cssVarValue(colorToken) : null;
3869
+ const shadowColor = (a) => tintVar ? `rgb(${tintVar} / ${a})` : `rgba(0,0,0,${a})`;
3870
+ const offset = {
3871
+ low: 2,
3872
+ medium: 4,
3873
+ high: 6
3874
+ }[level];
3875
+ const xOffset = position === "bottom-right" ? offset : 0;
3876
+ if (softness === "hard") return `${xOffset}px ${offset}px 0 0 ${shadowColor("1")}`;
3877
+ const soft = softness !== "crisp";
3878
+ switch (level) {
3879
+ case "low": return soft ? `${xOffset}px 1px 2px ${shadowColor(".06")}` : `${xOffset}px 1px 1px ${shadowColor(".12")}`;
3880
+ case "medium": return soft ? `${xOffset}px 10px 20px ${shadowColor(".08")}` : `${xOffset}px 6px 12px ${shadowColor(".16")}`;
3881
+ case "high": return soft ? `${xOffset}px 25px 50px ${shadowColor(".18")}` : `${xOffset}px 20px 30px ${shadowColor(".28")}`;
3882
+ }
3883
+ }
3884
+ function mapSpaceMult(space) {
3885
+ return {
3886
+ comfortable: 1.15,
3887
+ standard: 1,
3888
+ dense: .88
3889
+ }[space];
3890
+ }
3891
+ function mapRhythm(space) {
3892
+ switch (space) {
3893
+ case "comfortable": return "1.2rem";
3894
+ case "dense": return "0.75rem";
3895
+ default: return "1rem";
3896
+ }
3897
+ }
3898
+ function mapMotionDuration(level) {
3899
+ return {
3900
+ off: "0ms",
3901
+ low: "120ms",
3902
+ medium: "180ms",
3903
+ high: "250ms"
3904
+ }[level];
3905
+ }
3906
+ function mapMotionEasing(e) {
3907
+ return {
3908
+ standard: "cubic-bezier(.2,.8,.2,1)",
3909
+ snappy: "cubic-bezier(.2,1,.2,1)",
3910
+ gentle: "cubic-bezier(.15,.85,.15,1)"
3911
+ }[e];
3912
+ }
3913
+ /**
3914
+ * Map corner style to block radius CSS value.
3915
+ * These are Tier 2 vars used consistently across blocks. The pill token is
3916
+ * intentionally capped for block surfaces: buttons can be fully pill-shaped,
3917
+ * but cards/panels with real content should not become capsules.
3918
+ */
3919
+ function mapBlockRadius(corners) {
3920
+ return {
3921
+ square: "0",
3922
+ soft: "0.5rem",
3923
+ rounded: "0.75rem",
3924
+ pill: "1rem"
3925
+ }[corners];
3926
+ }
3927
+ /**
3928
+ * Map corner style to large-panel radius CSS value (Tier 2 `--rb-panel-radius`).
3929
+ * Derived from the same `corners` enum, one step more generous than the
3930
+ * block/card radius so large surfaces can carry a softer corner without a new
3931
+ * schema field. `rounded` lands on 20px (1.25rem), matching the physio mockup's
3932
+ * large-panel radius.
3933
+ */
3934
+ function mapPanelRadius(corners) {
3935
+ return {
3936
+ square: "0",
3937
+ soft: "0.75rem",
3938
+ rounded: "1.25rem",
3939
+ pill: "2rem"
3940
+ }[corners];
3941
+ }
3942
+ /**
3943
+ * Map motion level to block transition duration.
3944
+ * These are Tier 2 vars used consistently across blocks.
3945
+ */
3946
+ function mapBlockTransition(level) {
3947
+ return {
3948
+ off: "0ms",
3949
+ low: "120ms",
3950
+ medium: "150ms",
3951
+ high: "200ms"
3952
+ }[level];
3953
+ }
3954
+ /**
3955
+ * Map corner style to button radius CSS value.
3956
+ * Uses Tailwind-style button radius values that match the button system.
3957
+ * - square/soft → rounded-md (0.375rem) for subtle rounding
3958
+ * - rounded → rounded-lg (0.5rem) for moderate rounding
3959
+ * - pill → rounded-full (9999px) for pill shape
3960
+ */
3961
+ function mapButtonRadius(corners) {
3962
+ return {
3963
+ square: "0.375rem",
3964
+ soft: "0.375rem",
3965
+ rounded: "0.5rem",
3966
+ pill: "9999px"
3967
+ }[corners];
3968
+ }
3969
+ function mapBorderWidth(width) {
3970
+ switch (width) {
3971
+ case "none": return "0px";
3972
+ case "thick": return "2px";
3973
+ default: return "1px";
3974
+ }
3975
+ }
3976
+ function mapBorderStyle(style) {
3977
+ return style;
3978
+ }
3979
+ function proseLinkStyleToCssVars(style) {
3980
+ if (!style) return {};
3981
+ return {
3982
+ ...style.colorToken ? { ["--rb-prose-link-color"]: rgbColorValue(style.colorToken) } : {},
3983
+ ...style.hoverColorToken ? { ["--rb-prose-link-hover-color"]: rgbColorValue(style.hoverColorToken) } : {},
3984
+ ...style.decorationColorToken ? { ["--rb-prose-link-decoration-color"]: rgbColorValue(style.decorationColorToken) } : {},
3985
+ ...style.hoverDecorationColorToken ? { ["--rb-prose-link-hover-decoration-color"]: rgbColorValue(style.hoverDecorationColorToken) } : {},
3986
+ ...style.underline != null ? { ["--rb-prose-link-decoration-line"]: style.underline ? "underline" : "none" } : {},
3987
+ ...style.underlineStyle ? { ["--rb-prose-link-underline-style"]: style.underlineStyle } : {},
3988
+ ...style.underlineThickness ? { ["--rb-prose-link-underline-thickness"]: mapProseLinkUnderlineThickness(style.underlineThickness) } : {},
3989
+ ...style.underlineOffset ? { ["--rb-prose-link-underline-offset"]: mapProseLinkUnderlineOffset(style.underlineOffset) } : {}
3990
+ };
3991
+ }
3992
+ /**
3993
+ * Generate structured block override CSS (separate from blockCustomVars).
3994
+ * This handles typed theme overrides, while blockCustomVars remains raw var passthrough.
3995
+ */
3996
+ function generateBlockOverrideCss(themeId, theme) {
3997
+ const overrides = theme.blockOverrides;
3998
+ if (!overrides) return "";
3999
+ const cssBlocks = [];
4000
+ for (const [blockKind, blockOverride] of Object.entries(overrides)) {
4001
+ const blockSelectorKind = normalizeBlockKind(blockKind);
4002
+ const proseVars = proseLinkStyleToCssVars(blockOverride.typography?.proseLinkStyle);
4003
+ const declarations = Object.entries(proseVars).map(([key, value]) => ` ${key}: ${String(value)};`).join("\n");
4004
+ if (!declarations) continue;
4005
+ cssBlocks.push(`:where([data-theme-scope="${escapeAttrValue(themeId)}"]) :where([data-block="${escapeAttrValue(blockSelectorKind)}"]) {\n${declarations}\n}`);
4006
+ }
4007
+ return cssBlocks.join("\n");
4008
+ }
4009
+ function escapeAttrValue(value) {
4010
+ return value.replace(/\\/g, "\\\\").replace(/"/g, "\\\"");
4011
+ }
4012
+ function mapProseLinkUnderlineThickness(value) {
4013
+ switch (value) {
4014
+ case "fromFont": return "from-font";
4015
+ case "thin": return "1px";
4016
+ case "medium": return "2px";
4017
+ case "thick": return "3px";
4018
+ default: return "auto";
4019
+ }
4020
+ }
4021
+ function mapProseLinkUnderlineOffset(value) {
4022
+ switch (value) {
4023
+ case "tight": return "0.08em";
4024
+ case "loose": return "0.2em";
4025
+ case "normal": return "0.14em";
4026
+ default: return "auto";
4027
+ }
4028
+ }
4029
+ /**
4030
+ * Map input corners to CSS radius value for tier-2 input variables.
4031
+ * Falls back to theme corners if inputCorners is null.
4032
+ */
4033
+ function mapInputRadius(inputCorners, themeFallback) {
4034
+ switch (inputCorners ?? themeFallback) {
4035
+ case "square": return "0";
4036
+ case "soft": return "0.25rem";
4037
+ case "rounded": return "0.5rem";
4038
+ case "pill": return "9999px";
4039
+ default: return "0.375rem";
4040
+ }
4041
+ }
4042
+ /**
4043
+ * Normalize scale name to handle both old and new naming conventions.
4044
+ * Old names (minorThird, majorThird, perfectFourth) map to new names (compact, balanced, spacious).
4045
+ */
4046
+ function normalizeScaleName(scale) {
4047
+ return {
4048
+ minorThird: "compact",
4049
+ majorThird: "balanced",
4050
+ perfectFourth: "spacious",
4051
+ compact: "compact",
4052
+ balanced: "balanced",
4053
+ spacious: "spacious"
4054
+ }[scale] ?? "balanced";
4055
+ }
4056
+ /**
4057
+ * Compute base type scale sizes for headings.
4058
+ * Returns both static sizes and min/max for fluid typography.
4059
+ */
4060
+ function computeTypeScale(scale, bodySize) {
4061
+ const base = {
4062
+ md: 16,
4063
+ lg: 17,
4064
+ xl: 18
4065
+ }[bodySize];
4066
+ const ratio = {
4067
+ compact: 1.2,
4068
+ balanced: 1.25,
4069
+ spacious: 1.333
4070
+ }[normalizeScaleName(scale)];
4071
+ const h3 = Math.round(base * ratio);
4072
+ const h2 = Math.round(h3 * ratio);
4073
+ const h1 = Math.round(h2 * ratio);
4074
+ const fluidMin = .7;
4075
+ const h2FluidMin = .9;
4076
+ const fluidMax = 1.3;
4077
+ return {
4078
+ ["--fs-body"]: `${base}px`,
4079
+ ["--fs-h3"]: `${h3}px`,
4080
+ ["--fs-h2"]: `${h2}px`,
4081
+ ["--fs-h1"]: `${h1}px`,
4082
+ ["--fs-h1-min"]: `${Math.round(h1 * fluidMin)}px`,
4083
+ ["--fs-h1-max"]: `${Math.round(h1 * fluidMax)}px`,
4084
+ ["--fs-h2-min"]: `${Math.round(h2 * h2FluidMin)}px`,
4085
+ ["--fs-h2-max"]: `${Math.round(h2 * fluidMax)}px`,
4086
+ ["--fs-h3-min"]: `${Math.round(h3 * fluidMin)}px`,
4087
+ ["--fs-h3-max"]: `${Math.round(h3 * fluidMax)}px`,
4088
+ ["--fs-h1-fluid"]: `clamp(${Math.round(h1 * fluidMin)}px, calc(${Math.round(h1 * fluidMin)}px + ${Math.round(h1 * (fluidMax - fluidMin))} * ((100vw - 320px) / 880)), ${Math.round(h1 * fluidMax)}px)`,
4089
+ ["--fs-h2-fluid"]: `clamp(${Math.round(h2 * h2FluidMin)}px, calc(${Math.round(h2 * h2FluidMin)}px + ${Math.round(h2 * (fluidMax - h2FluidMin))} * ((100vw - 320px) / 880)), ${Math.round(h2 * fluidMax)}px)`,
4090
+ ["--fs-h3-fluid"]: `clamp(${Math.round(h3 * fluidMin)}px, calc(${Math.round(h3 * fluidMin)}px + ${Math.round(h3 * (fluidMax - fluidMin))} * ((100vw - 320px) / 880)), ${Math.round(h3 * fluidMax)}px)`,
4091
+ ["--fs-h1-display"]: `${Math.round(h1 * 1.5)}px`,
4092
+ ["--fs-h1-display-fluid"]: `clamp(${Math.round(h1 * fluidMin * 1.5)}px, calc(${Math.round(h1 * fluidMin * 1.5)}px + ${Math.round(h1 * (fluidMax - fluidMin) * 1.5)} * ((100vw - 320px) / 880)), ${Math.round(h1 * fluidMax * 1.5)}px)`
4093
+ };
4094
+ }
4095
+ /**
4096
+ * Size scale multipliers for heading size overrides.
4097
+ * Expanded from md/lg/xl to xs through 2xl for finer control.
4098
+ */
4099
+ const SIZE_SCALE_MAP = {
4100
+ xs: .85,
4101
+ sm: .925,
4102
+ md: 1,
4103
+ lg: 1.1,
4104
+ xl: 1.2,
4105
+ "2xl": 1.35
4106
+ };
4107
+ function applyHeadingSizeOverrides(base, typography) {
4108
+ const body = base["--fs-body"];
4109
+ const h1Base = parseFloat(base["--fs-h1"].replace("px", ""));
4110
+ const h2Base = parseFloat(base["--fs-h2"].replace("px", ""));
4111
+ const h3Base = parseFloat(base["--fs-h3"].replace("px", ""));
4112
+ const h1Scale = typography.headings.h1.size ? SIZE_SCALE_MAP[typography.headings.h1.size] : 1;
4113
+ const h2Scale = typography.headings.h2.size ? SIZE_SCALE_MAP[typography.headings.h2.size] : 1;
4114
+ const h3Scale = typography.headings.h3.size ? SIZE_SCALE_MAP[typography.headings.h3.size] : 1;
4115
+ const h1 = Math.round(h1Base * h1Scale);
4116
+ const h2 = Math.round(h2Base * h2Scale);
4117
+ const h3 = Math.round(h3Base * h3Scale);
4118
+ const fluidMin = .7;
4119
+ const h2FluidMin = .9;
4120
+ const fluidMax = 1.3;
4121
+ return {
4122
+ body,
4123
+ h1: `${h1}px`,
4124
+ h2: `${h2}px`,
4125
+ h3: `${h3}px`,
4126
+ h1Fluid: `clamp(${Math.round(h1 * fluidMin)}px, calc(${Math.round(h1 * fluidMin)}px + ${Math.round(h1 * (fluidMax - fluidMin))} * ((100vw - 320px) / 880)), ${Math.round(h1 * fluidMax)}px)`,
4127
+ h2Fluid: `clamp(${Math.round(h2 * h2FluidMin)}px, calc(${Math.round(h2 * h2FluidMin)}px + ${Math.round(h2 * (fluidMax - h2FluidMin))} * ((100vw - 320px) / 880)), ${Math.round(h2 * fluidMax)}px)`,
4128
+ h3Fluid: `clamp(${Math.round(h3 * fluidMin)}px, calc(${Math.round(h3 * fluidMin)}px + ${Math.round(h3 * (fluidMax - fluidMin))} * ((100vw - 320px) / 880)), ${Math.round(h3 * fluidMax)}px)`,
4129
+ h1Display: `${Math.round(h1 * 1.5)}px`,
4130
+ h1DisplayFluid: `clamp(${Math.round(h1 * 1.5 * fluidMin)}px, calc(${Math.round(h1 * 1.5 * fluidMin)}px + ${Math.round(h1 * 1.5 * (fluidMax - fluidMin))} * ((100vw - 320px) / 880)), ${Math.round(h1 * 1.5 * fluidMax)}px)`
4164
4131
  };
4165
4132
  }
4166
- function mapWeight(w) {
4133
+ function mapLetterSpacing(s) {
4167
4134
  return {
4168
- light: 300,
4169
- regular: 400,
4170
- medium: 500,
4171
- semibold: 600,
4172
- bold: 700
4173
- }[w];
4174
- }
4175
- function mapShadow(level, softness, position = "bottom", colorToken) {
4176
- if (level === "none") return "none";
4177
- const tintVar = colorToken ? cssVarValue(colorToken) : null;
4178
- const shadowColor = (a) => tintVar ? `rgb(${tintVar} / ${a})` : `rgba(0,0,0,${a})`;
4179
- const offset = {
4180
- low: 2,
4181
- medium: 4,
4182
- high: 6
4183
- }[level];
4184
- const xOffset = position === "bottom-right" ? offset : 0;
4185
- if (softness === "hard") return `${xOffset}px ${offset}px 0 0 ${shadowColor("1")}`;
4186
- const soft = softness !== "crisp";
4187
- switch (level) {
4188
- case "low": return soft ? `${xOffset}px 1px 2px ${shadowColor(".06")}` : `${xOffset}px 1px 1px ${shadowColor(".12")}`;
4189
- case "medium": return soft ? `${xOffset}px 10px 20px ${shadowColor(".08")}` : `${xOffset}px 6px 12px ${shadowColor(".16")}`;
4190
- case "high": return soft ? `${xOffset}px 25px 50px ${shadowColor(".18")}` : `${xOffset}px 20px 30px ${shadowColor(".28")}`;
4191
- }
4135
+ tight: "-0.01em",
4136
+ normal: "0em",
4137
+ loose: "0.02em"
4138
+ }[s];
4192
4139
  }
4193
- function mapSpaceMult(space) {
4140
+ function mapEyebrowSize(s) {
4194
4141
  return {
4195
- comfortable: 1.15,
4196
- standard: 1,
4197
- dense: .88
4198
- }[space];
4199
- }
4200
- function mapRhythm(space) {
4201
- switch (space) {
4202
- case "comfortable": return "1.2rem";
4203
- case "dense": return "0.75rem";
4204
- default: return "1rem";
4205
- }
4142
+ sm: "0.75rem",
4143
+ md: "0.875rem",
4144
+ lg: "1rem"
4145
+ }[s];
4206
4146
  }
4207
- function mapMotionDuration(level) {
4147
+ function mapEyebrowLetterSpacing(s) {
4208
4148
  return {
4209
- off: "0ms",
4210
- low: "120ms",
4211
- medium: "180ms",
4212
- high: "250ms"
4213
- }[level];
4149
+ tight: "0em",
4150
+ normal: "0.025em",
4151
+ loose: "0.06em",
4152
+ wide: "0.12em"
4153
+ }[s];
4214
4154
  }
4215
- function mapMotionEasing(e) {
4155
+ function mapEyebrowCase(c) {
4156
+ return c === "uppercase" ? "uppercase" : "none";
4157
+ }
4158
+ function mapLineHeight(s) {
4216
4159
  return {
4217
- standard: "cubic-bezier(.2,.8,.2,1)",
4218
- snappy: "cubic-bezier(.2,1,.2,1)",
4219
- gentle: "cubic-bezier(.15,.85,.15,1)"
4220
- }[e];
4160
+ normal: "1.5",
4161
+ relaxed: "1.65",
4162
+ loose: "1.8"
4163
+ }[s];
4221
4164
  }
4222
4165
  /**
4223
- * Map corner style to block radius CSS value.
4224
- * These are Tier 2 vars used consistently across blocks. The pill token is
4225
- * intentionally capped for block surfaces: buttons can be fully pill-shaped,
4226
- * but cards/panels with real content should not become capsules.
4166
+ * Headings get their own line-height scale, decoupled from body. `mapLineHeight`
4167
+ * is floored at 1.5 (a body leading) which reads as too airy on headings — the
4168
+ * more so as size drops. These values sit well under 1.5 and let presets taper
4169
+ * per level (larger headings tighter). `tight`/`snug` extend the token set for
4170
+ * display headings; body keeps `mapLineHeight`.
4227
4171
  */
4228
- function mapBlockRadius(corners) {
4172
+ function mapHeadingLineHeight(s) {
4229
4173
  return {
4230
- square: "0",
4231
- soft: "0.5rem",
4232
- rounded: "0.75rem",
4233
- pill: "1rem"
4234
- }[corners];
4174
+ tight: "1.1",
4175
+ snug: "1.15",
4176
+ normal: "1.2",
4177
+ relaxed: "1.3",
4178
+ loose: "1.4"
4179
+ }[s];
4180
+ }
4181
+ function mapTextTransform(c) {
4182
+ if (c === "uppercase") return "uppercase";
4183
+ return "none";
4184
+ }
4185
+ function mapFontVariant(c) {
4186
+ if (c === "smallCaps") return "small-caps";
4187
+ return "normal";
4188
+ }
4189
+ function mapFontStyle(italic) {
4190
+ return italic ? "italic" : "normal";
4191
+ }
4192
+ /** Adapt the canonical default-card decision for the embedded registration. */
4193
+ function generateThemeBlockVarsCss(theme, themeId) {
4194
+ const card = resolveCardRole(theme, theme.cards ?? null, "default");
4195
+ return generateAllBlockVarsCss({
4196
+ theme,
4197
+ themeId,
4198
+ surface: opaqueSurfaceContextFromTheme(theme),
4199
+ embeddedRegistrationPaint: card.kind === "surface" ? cardSurfacePaint(card.variant) : { kind: "transparent" }
4200
+ });
4201
+ }
4202
+ //#endregion
4203
+ //#region ../blocks/src/system/node/fragments/headingDecoration.ts
4204
+ const defaultBindFrom = "_sectionStyles.headingDecoration";
4205
+ function headingDecoration({ bindFrom = defaultBindFrom, className } = {}) {
4206
+ return el("div", {
4207
+ "aria-hidden": "true",
4208
+ className: "rb-heading-decoration-row"
4209
+ }, [el("div", { className: { $bind: {
4210
+ from: bindFrom,
4211
+ transforms: [{
4212
+ id: "ui.headingDecorationClassName",
4213
+ options: { baseClass: className }
4214
+ }]
4215
+ } } })], when(`${bindFrom}.family`));
4235
4216
  }
4217
+ //#endregion
4218
+ //#region ../blocks/src/system/fragments/library/headerCta.ts
4219
+ const headerCtaFragment = defineFragment({
4220
+ variantMeaning: { kind: "arrangement" },
4221
+ id: "headerCta",
4222
+ title: "Header CTA",
4223
+ description: "Single call-to-action button for the site header.",
4224
+ fields: [{
4225
+ id: "cta",
4226
+ type: "group",
4227
+ label: "Call to action",
4228
+ description: "Primary action button displayed on CTA variant layouts.",
4229
+ schema: { fields: [
4230
+ {
4231
+ id: "label",
4232
+ type: "text",
4233
+ label: "Label",
4234
+ description: "Button label shown in the header."
4235
+ },
4236
+ {
4237
+ id: "link",
4238
+ type: "link",
4239
+ label: "Link",
4240
+ description: "Select an internal page or provide a custom destination."
4241
+ },
4242
+ {
4243
+ id: "variant",
4244
+ type: "select",
4245
+ label: "Style",
4246
+ defaultValue: "primary",
4247
+ options: [
4248
+ {
4249
+ value: "primary",
4250
+ label: "Primary"
4251
+ },
4252
+ {
4253
+ value: "secondary",
4254
+ label: "Secondary"
4255
+ },
4256
+ {
4257
+ value: "outline",
4258
+ label: "Outline"
4259
+ }
4260
+ ]
4261
+ }
4262
+ ] }
4263
+ }],
4264
+ layout: [ctaButton({
4265
+ basePath: "cta",
4266
+ whenPath: "cta.label"
4267
+ })]
4268
+ });
4269
+ //#endregion
4270
+ //#region ../blocks/src/system/fragments/lazyInit.ts
4271
+ let initialized = false;
4272
+ const ALL_FRAGMENTS = [
4273
+ bodyCopyFragment,
4274
+ heroCopyFragment,
4275
+ ctaRowFragment,
4276
+ heroCtaRowFragment,
4277
+ ctaCopyFragment,
4278
+ testimonialsHeadingFragment,
4279
+ testimonialsCarouselFragment,
4280
+ formCopyFragment,
4281
+ formEmbedFragment,
4282
+ headerCtaFragment,
4283
+ singleButtonFragment,
4284
+ blogFeaturedPostFragment,
4285
+ faqHeadingFragment,
4286
+ faqAccordionFragment,
4287
+ cardFragment,
4288
+ headingFragment,
4289
+ richTextFragment
4290
+ ];
4236
4291
  /**
4237
- * Map corner style to large-panel radius CSS value (Tier 2 `--rb-panel-radius`).
4238
- * Derived from the same `corners` enum, one step more generous than the
4239
- * block/card radius so large surfaces can carry a softer corner without a new
4240
- * schema field. `rounded` lands on 20px (1.25rem), matching the physio mockup's
4241
- * large-panel radius.
4292
+ * Register all fragment definitions lazily.
4293
+ * This function is called by the registry on first access.
4294
+ *
4295
+ * @param registerFn - Function to register a single fragment
4242
4296
  */
4243
- function mapPanelRadius(corners) {
4244
- return {
4245
- square: "0",
4246
- soft: "0.75rem",
4247
- rounded: "1.25rem",
4248
- pill: "2rem"
4249
- }[corners];
4297
+ function lazyRegisterFragments(registerFn) {
4298
+ if (initialized) return;
4299
+ ALL_FRAGMENTS.forEach(registerFn);
4300
+ initialized = true;
4250
4301
  }
4302
+ //#endregion
4303
+ //#region ../blocks/src/system/fragments/registry.ts
4304
+ const fragmentRegistry = {};
4251
4305
  /**
4252
- * Map motion level to block transition duration.
4253
- * These are Tier 2 vars used consistently across blocks.
4306
+ * Ensure all fragments are registered.
4307
+ * This is called automatically by getFragmentRegistry() and getFragment().
4308
+ * Can also be called explicitly to force registration.
4254
4309
  */
4255
- function mapBlockTransition(level) {
4256
- return {
4257
- off: "0ms",
4258
- low: "120ms",
4259
- medium: "150ms",
4260
- high: "200ms"
4261
- }[level];
4310
+ function ensureInitialized() {
4311
+ lazyRegisterFragments((fragment) => {
4312
+ if (!fragmentRegistry[fragment.id]) fragmentRegistry[fragment.id] = fragment;
4313
+ });
4262
4314
  }
4263
4315
  /**
4264
- * Map corner style to button radius CSS value.
4265
- * Uses Tailwind-style button radius values that match the button system.
4266
- * - square/soft → rounded-md (0.375rem) for subtle rounding
4267
- * - rounded → rounded-lg (0.5rem) for moderate rounding
4268
- * - pill → rounded-full (9999px) for pill shape
4316
+ * Get the full fragment registry.
4317
+ * Useful for passing to runtime components.
4318
+ *
4319
+ * @returns The complete fragment registry
4269
4320
  */
4270
- function mapButtonRadius(corners) {
4271
- return {
4272
- square: "0.375rem",
4273
- soft: "0.375rem",
4274
- rounded: "0.5rem",
4275
- pill: "9999px"
4276
- }[corners];
4321
+ function getFragmentRegistry() {
4322
+ ensureInitialized();
4323
+ return fragmentRegistry;
4277
4324
  }
4278
- function mapBorderWidth(width) {
4279
- switch (width) {
4280
- case "none": return "0px";
4281
- case "thick": return "2px";
4282
- default: return "1px";
4283
- }
4325
+ //#endregion
4326
+ //#region ../blocks/src/system/blocks/events/shared/detailsSelection.ts
4327
+ function isFutureOrNow(iso, nowIso) {
4328
+ const ts = Date.parse(iso);
4329
+ const now = Date.parse(nowIso);
4330
+ if (!Number.isFinite(ts) || !Number.isFinite(now)) return false;
4331
+ return ts >= now;
4284
4332
  }
4285
- function mapBorderStyle(style) {
4286
- return style;
4333
+ const localDateKey = (startsAt, timeZone) => getBookingLocalDateKey(toScheduledBookingDateTime({
4334
+ startsAt,
4335
+ timeZone
4336
+ }));
4337
+ function selectRequested(events, requested) {
4338
+ if (!requested) return null;
4339
+ const byId = events.find((event) => event.occurrenceId === requested.id || event.id === requested.id);
4340
+ if (byId) return byId;
4341
+ if (!requested.startsAt || !requested.timeZone) return null;
4342
+ const requestedDate = localDateKey(requested.startsAt, requested.timeZone);
4343
+ return events.find((event) => localDateKey(event.startsAt, event.timeZone) === requestedDate) ?? null;
4287
4344
  }
4288
- function proseLinkStyleToCssVars(style) {
4289
- if (!style) return {};
4290
- return {
4291
- ...style.colorToken ? { ["--rb-prose-link-color"]: rgbColorValue(style.colorToken) } : {},
4292
- ...style.hoverColorToken ? { ["--rb-prose-link-hover-color"]: rgbColorValue(style.hoverColorToken) } : {},
4293
- ...style.decorationColorToken ? { ["--rb-prose-link-decoration-color"]: rgbColorValue(style.decorationColorToken) } : {},
4294
- ...style.hoverDecorationColorToken ? { ["--rb-prose-link-hover-decoration-color"]: rgbColorValue(style.hoverDecorationColorToken) } : {},
4295
- ...style.underline != null ? { ["--rb-prose-link-decoration-line"]: style.underline ? "underline" : "none" } : {},
4296
- ...style.underlineStyle ? { ["--rb-prose-link-underline-style"]: style.underlineStyle } : {},
4297
- ...style.underlineThickness ? { ["--rb-prose-link-underline-thickness"]: mapProseLinkUnderlineThickness(style.underlineThickness) } : {},
4298
- ...style.underlineOffset ? { ["--rb-prose-link-underline-offset"]: mapProseLinkUnderlineOffset(style.underlineOffset) } : {}
4345
+ function selectNextUpcoming(events, nowIso) {
4346
+ return [...events].filter((event) => isFutureOrNow(event.startsAt, nowIso)).sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt))[0] ?? null;
4347
+ }
4348
+ function selectCompletedWholeSeries(events) {
4349
+ if (events.length === 0 || !events.every((event) => event.bookingScope === "whole_series")) return null;
4350
+ return [...events].sort((left, right) => Date.parse(right.startsAt) - Date.parse(left.startsAt))[0] ?? null;
4351
+ }
4352
+ function selectEventDetailsCandidate(events, requested, nowIso) {
4353
+ const selected = selectRequested(events, requested);
4354
+ if (selected) return {
4355
+ event: selected,
4356
+ mode: "selected"
4299
4357
  };
4358
+ const upcoming = selectNextUpcoming(events, nowIso);
4359
+ if (upcoming) return {
4360
+ event: upcoming,
4361
+ mode: "next"
4362
+ };
4363
+ const completed = selectCompletedWholeSeries(events);
4364
+ return completed ? {
4365
+ event: completed,
4366
+ mode: "completed"
4367
+ } : null;
4300
4368
  }
4369
+ //#endregion
4370
+ //#region ../blocks/src/system/blocks/events/shared/bookedElsewhere.ts
4301
4371
  /**
4302
- * Generate structured block override CSS (separate from blockCustomVars).
4303
- * This handles typed theme overrides, while blockCustomVars remains raw var passthrough.
4372
+ * The booking decision for a page whose event is booked on another website.
4373
+ *
4374
+ * Such a page has no booking form here, only a button out, so what it needs to
4375
+ * know is which date (if any) that button books and, when none, why not. The
4376
+ * page's header and its registration panel both read this one decision, so a
4377
+ * recurring class whose today's date is past its cut-off can't be "closed" in
4378
+ * one place and bookable for next week in the other. Copy projects from the
4379
+ * closure; it never decides eligibility.
4380
+ *
4381
+ * The render clock is part of the input: a page's projected availability can be
4382
+ * older than the page, and a cut-off or start makes that gap matter.
4304
4383
  */
4305
- function generateBlockOverrideCss(themeId, theme) {
4306
- const overrides = theme.blockOverrides;
4307
- if (!overrides) return "";
4308
- const cssBlocks = [];
4309
- for (const [blockKind, blockOverride] of Object.entries(overrides)) {
4310
- const blockSelectorKind = normalizeBlockKind(blockKind);
4311
- const proseVars = proseLinkStyleToCssVars(blockOverride.typography?.proseLinkStyle);
4312
- const declarations = Object.entries(proseVars).map(([key, value]) => ` ${key}: ${String(value)};`).join("\n");
4313
- if (!declarations) continue;
4314
- cssBlocks.push(`:where([data-theme-scope="${escapeAttrValue(themeId)}"]) :where([data-block="${escapeAttrValue(blockSelectorKind)}"]) {\n${declarations}\n}`);
4315
- }
4316
- return cssBlocks.join("\n");
4317
- }
4318
- function escapeAttrValue(value) {
4319
- return value.replace(/\\/g, "\\\\").replace(/"/g, "\\\"");
4320
- }
4321
- function mapProseLinkUnderlineThickness(value) {
4322
- switch (value) {
4323
- case "fromFont": return "from-font";
4324
- case "thin": return "1px";
4325
- case "medium": return "2px";
4326
- case "thick": return "3px";
4327
- default: return "auto";
4328
- }
4329
- }
4330
- function mapProseLinkUnderlineOffset(value) {
4331
- switch (value) {
4332
- case "tight": return "0.08em";
4333
- case "loose": return "0.2em";
4334
- case "normal": return "0.14em";
4335
- default: return "auto";
4336
- }
4384
+ /** Every date the page scopes in is booked elsewhere. */
4385
+ function isBookedElsewherePage(events) {
4386
+ return events.length > 0 && events.every((event) => event.destination.kind === "external");
4387
+ }
4388
+ /** Null while the date is open by both its projected availability and this clock. */
4389
+ function bookedElsewhereDateClosure(event, now) {
4390
+ const closesAt = event.bookingClosesAt;
4391
+ if (closesAt && isInBookingCutOffWindow(event, now)) return {
4392
+ kind: "cutOff",
4393
+ closesAt
4394
+ };
4395
+ const reason = event.bookingAvailability.kind === "closed" ? event.bookingAvailability.reason : null;
4396
+ if (reason === "occurrence_completed" || reason === "series_completed" || Date.parse(event.endsAt) <= now.getTime()) return { kind: "finished" };
4397
+ if (reason === "already_started" || Date.parse(event.startsAt) <= now.getTime()) return { kind: "started" };
4398
+ return reason ? { kind: "notTaking" } : null;
4337
4399
  }
4338
4400
  /**
4339
- * Map input corners to CSS radius value for tier-2 input variables.
4340
- * Falls back to theme corners if inputCorners is null.
4401
+ * What a page booked elsewhere books. Null when the selection isn't booked
4402
+ * elsewhere, so pages booked here keep their own rules. A page-level closure
4403
+ * (paused, opening soon) comes first; then the selection's own dates.
4341
4404
  */
4342
- function mapInputRadius(inputCorners, themeFallback) {
4343
- switch (inputCorners ?? themeFallback) {
4344
- case "square": return "0";
4345
- case "soft": return "0.25rem";
4346
- case "rounded": return "0.5rem";
4347
- case "pill": return "9999px";
4348
- default: return "0.375rem";
4405
+ function decideBookedElsewhereBooking(selection, now) {
4406
+ const destination = selectionRepresentativeEvent(selection).destination;
4407
+ if (destination.kind !== "external") return null;
4408
+ const open = (target) => ({
4409
+ kind: "open",
4410
+ target,
4411
+ destination
4412
+ });
4413
+ const closed = (closure) => ({
4414
+ kind: "closed",
4415
+ closure
4416
+ });
4417
+ const detail = resolveSelectionBookingClosedDetail(selection);
4418
+ if (detail) return closed({
4419
+ kind: "bookingClosed",
4420
+ detail
4421
+ });
4422
+ switch (selection.kind) {
4423
+ case "occurrence": {
4424
+ const closure = bookedElsewhereDateClosure(selection.event, now);
4425
+ return closure ? closed({
4426
+ kind: "date",
4427
+ event: selection.event,
4428
+ closure
4429
+ }) : open(selection.event);
4430
+ }
4431
+ case "dateChoice": {
4432
+ const target = selection.dates.find((date) => bookedElsewhereDateClosure(date, now) === null);
4433
+ if (target) return open(target);
4434
+ const firstCutOff = selection.dates.flatMap((event) => {
4435
+ const closure = bookedElsewhereDateClosure(event, now);
4436
+ return closure?.kind === "cutOff" ? [{
4437
+ event,
4438
+ closesAt: closure.closesAt
4439
+ }] : [];
4440
+ })[0];
4441
+ return closed(firstCutOff ? {
4442
+ kind: "datesCutOff",
4443
+ dates: selection.dates,
4444
+ firstCutOff
4445
+ } : { kind: "unavailable" });
4446
+ }
4447
+ case "wholeSeriesRun": {
4448
+ const { run, representative } = selection.run;
4449
+ const phase = resolveWholeSeriesBookingPhase(run, now);
4450
+ if (phase.kind === "closed") return closed({
4451
+ kind: "run",
4452
+ reason: phase.reason,
4453
+ run
4454
+ });
4455
+ return representative.bookingAvailability.kind === "closed" ? closed({
4456
+ kind: "run",
4457
+ reason: "enrolment-closed",
4458
+ run
4459
+ }) : open(representative);
4460
+ }
4461
+ case "wholeSeriesParent": return open(selection.eligibleRuns[0].representative);
4462
+ case "wholeSeriesParentUnavailable": return closed({ kind: "unavailable" });
4349
4463
  }
4350
4464
  }
4351
4465
  /**
4352
- * Normalize scale name to handle both old and new naming conventions.
4353
- * Old names (minorThird, majorThird, perfectFourth) map to new names (compact, balanced, spacious).
4466
+ * The date a page of dates booked elsewhere speaks for: the route's own date,
4467
+ * else the series' earliest date still open there, so one closed date (today's,
4468
+ * past its cut-off) doesn't close the page while next week's can still be
4469
+ * booked. With none open, the series' usual choice speaks and shows its closed
4470
+ * state. Null when the page isn't booked elsewhere or names no such date.
4354
4471
  */
4355
- function normalizeScaleName(scale) {
4356
- return {
4357
- minorThird: "compact",
4358
- majorThird: "balanced",
4359
- perfectFourth: "spacious",
4360
- compact: "compact",
4361
- balanced: "balanced",
4362
- spacious: "spacious"
4363
- }[scale] ?? "balanced";
4472
+ function selectBookedElsewhereDates(events, occurrenceId, now) {
4473
+ if (!isBookedElsewherePage(events)) return null;
4474
+ if (occurrenceId) {
4475
+ const event = events.find((candidate) => candidate.occurrenceId === occurrenceId);
4476
+ return event && isOrdinaryPublicEvent(event) ? {
4477
+ kind: "occurrence",
4478
+ event
4479
+ } : null;
4480
+ }
4481
+ const fallback = planOrdinarySeriesSelection(events);
4482
+ if (fallback?.kind !== "occurrence") return fallback;
4483
+ const open = events.filter(isOrdinaryPublicEvent).filter((event) => event.seriesId === fallback.event.seriesId).filter((event) => decideBookedElsewhereBooking({
4484
+ kind: "occurrence",
4485
+ event
4486
+ }, now)?.kind === "open").sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt))[0];
4487
+ return open ? {
4488
+ kind: "occurrence",
4489
+ event: open
4490
+ } : fallback;
4364
4491
  }
4492
+ /** The page's whole decision for dates booked elsewhere, for consumers that show it without a selection of their own. */
4493
+ function decideBookedElsewhereDatesPage(events, occurrenceId, now) {
4494
+ const selection = selectBookedElsewhereDates(events, occurrenceId, now);
4495
+ return selection ? decideBookedElsewhereBooking(selection, now) : null;
4496
+ }
4497
+ //#endregion
4498
+ //#region ../calendar/src/lane-packing.ts
4365
4499
  /**
4366
- * Compute base type scale sizes for headings.
4367
- * Returns both static sizes and min/max for fluid typography.
4500
+ * Assign lanes to a list of intervals.
4501
+ *
4502
+ * Returns one result per input in the same order as the input. Internally
4503
+ * sorts a copy by `(start, end, orderKey)` to ensure determinism, then
4504
+ * permutes results back to input order.
4368
4505
  */
4369
- function computeTypeScale(scale, bodySize) {
4370
- const base = {
4371
- md: 16,
4372
- lg: 17,
4373
- xl: 18
4374
- }[bodySize];
4375
- const ratio = {
4376
- compact: 1.2,
4377
- balanced: 1.25,
4378
- spacious: 1.333
4379
- }[normalizeScaleName(scale)];
4380
- const h3 = Math.round(base * ratio);
4381
- const h2 = Math.round(h3 * ratio);
4382
- const h1 = Math.round(h2 * ratio);
4383
- const fluidMin = .7;
4384
- const h2FluidMin = .9;
4385
- const fluidMax = 1.3;
4386
- return {
4387
- ["--fs-body"]: `${base}px`,
4388
- ["--fs-h3"]: `${h3}px`,
4389
- ["--fs-h2"]: `${h2}px`,
4390
- ["--fs-h1"]: `${h1}px`,
4391
- ["--fs-h1-min"]: `${Math.round(h1 * fluidMin)}px`,
4392
- ["--fs-h1-max"]: `${Math.round(h1 * fluidMax)}px`,
4393
- ["--fs-h2-min"]: `${Math.round(h2 * h2FluidMin)}px`,
4394
- ["--fs-h2-max"]: `${Math.round(h2 * fluidMax)}px`,
4395
- ["--fs-h3-min"]: `${Math.round(h3 * fluidMin)}px`,
4396
- ["--fs-h3-max"]: `${Math.round(h3 * fluidMax)}px`,
4397
- ["--fs-h1-fluid"]: `clamp(${Math.round(h1 * fluidMin)}px, calc(${Math.round(h1 * fluidMin)}px + ${Math.round(h1 * (fluidMax - fluidMin))} * ((100vw - 320px) / 880)), ${Math.round(h1 * fluidMax)}px)`,
4398
- ["--fs-h2-fluid"]: `clamp(${Math.round(h2 * h2FluidMin)}px, calc(${Math.round(h2 * h2FluidMin)}px + ${Math.round(h2 * (fluidMax - h2FluidMin))} * ((100vw - 320px) / 880)), ${Math.round(h2 * fluidMax)}px)`,
4399
- ["--fs-h3-fluid"]: `clamp(${Math.round(h3 * fluidMin)}px, calc(${Math.round(h3 * fluidMin)}px + ${Math.round(h3 * (fluidMax - fluidMin))} * ((100vw - 320px) / 880)), ${Math.round(h3 * fluidMax)}px)`,
4400
- ["--fs-h1-display"]: `${Math.round(h1 * 1.5)}px`,
4401
- ["--fs-h1-display-fluid"]: `clamp(${Math.round(h1 * fluidMin * 1.5)}px, calc(${Math.round(h1 * fluidMin * 1.5)}px + ${Math.round(h1 * (fluidMax - fluidMin) * 1.5)} * ((100vw - 320px) / 880)), ${Math.round(h1 * fluidMax * 1.5)}px)`
4506
+ function assignLanes(intervals) {
4507
+ if (intervals.length === 0) return [];
4508
+ const indexed = intervals.map((interval, index) => ({
4509
+ interval,
4510
+ index
4511
+ }));
4512
+ indexed.sort((left, right) => left.interval.start - right.interval.start || left.interval.end - right.interval.end || left.interval.orderKey.localeCompare(right.interval.orderKey));
4513
+ const results = new Array(intervals.length);
4514
+ let cluster = [];
4515
+ let activeLaneEnds = [];
4516
+ let clusterMaxEnd = -Infinity;
4517
+ const closeCluster = () => {
4518
+ if (cluster.length === 0) return;
4519
+ const laneCount = Math.max(1, cluster.reduce((max, entry) => Math.max(max, entry.laneIndex + 1), 0));
4520
+ for (const entry of cluster) results[entry.index] = {
4521
+ laneIndex: entry.laneIndex,
4522
+ laneCount
4523
+ };
4524
+ cluster = [];
4525
+ activeLaneEnds = [];
4526
+ clusterMaxEnd = -Infinity;
4402
4527
  };
4528
+ for (const { interval, index } of indexed) {
4529
+ if (interval.start >= clusterMaxEnd) closeCluster();
4530
+ const laneIndex = firstAvailableLane(activeLaneEnds, interval.start);
4531
+ activeLaneEnds[laneIndex] = interval.end;
4532
+ clusterMaxEnd = Math.max(clusterMaxEnd, interval.end);
4533
+ cluster.push({
4534
+ index,
4535
+ laneIndex
4536
+ });
4537
+ }
4538
+ closeCluster();
4539
+ return results;
4540
+ }
4541
+ function firstAvailableLane(activeLaneEnds, start) {
4542
+ const laneIndex = activeLaneEnds.findIndex((end) => end <= start);
4543
+ return laneIndex >= 0 ? laneIndex : activeLaneEnds.length;
4403
4544
  }
4545
+ //#endregion
4546
+ //#region ../calendar/src/timetable.ts
4404
4547
  /**
4405
- * Size scale multipliers for heading size overrides.
4406
- * Expanded from md/lg/xl to xs through 2xl for finer control.
4548
+ * Timetable model — the package's core surface.
4549
+ *
4550
+ * Generic over `T`. Takes a list of timed items + a viewport; returns a
4551
+ * day-by-day layout with overlap-packed lanes and percent-based positions
4552
+ * plus a diagnostics list for items dropped during processing.
4553
+ *
4554
+ * The function is pure: given identical input (including `now`), it returns
4555
+ * the same output. The model has no opinion on what an item is — pass
4556
+ * accessors.
4407
4557
  */
4408
- const SIZE_SCALE_MAP = {
4409
- xs: .85,
4410
- sm: .925,
4411
- md: 1,
4412
- lg: 1.1,
4413
- xl: 1.2,
4414
- "2xl": 1.35
4558
+ const DEFAULT_BOUNDS = {
4559
+ minStartHour: 5,
4560
+ maxEndHour: 23,
4561
+ defaultStartHour: 6,
4562
+ defaultEndHour: 21,
4563
+ minHeightPercent: 2.5,
4564
+ marginMinutes: 0
4415
4565
  };
4416
- function applyHeadingSizeOverrides(base, typography) {
4417
- const body = base["--fs-body"];
4418
- const h1Base = parseFloat(base["--fs-h1"].replace("px", ""));
4419
- const h2Base = parseFloat(base["--fs-h2"].replace("px", ""));
4420
- const h3Base = parseFloat(base["--fs-h3"].replace("px", ""));
4421
- const h1Scale = typography.headings.h1.size ? SIZE_SCALE_MAP[typography.headings.h1.size] : 1;
4422
- const h2Scale = typography.headings.h2.size ? SIZE_SCALE_MAP[typography.headings.h2.size] : 1;
4423
- const h3Scale = typography.headings.h3.size ? SIZE_SCALE_MAP[typography.headings.h3.size] : 1;
4424
- const h1 = Math.round(h1Base * h1Scale);
4425
- const h2 = Math.round(h2Base * h2Scale);
4426
- const h3 = Math.round(h3Base * h3Scale);
4427
- const fluidMin = .7;
4428
- const h2FluidMin = .9;
4429
- const fluidMax = 1.3;
4566
+ function buildTimetableModel$1(input) {
4567
+ const bounds = resolveBounds(input.bounds);
4568
+ const viewportDays = getTimetableDays(input.viewDate, input.view ?? "week", input.startOfWeek);
4569
+ const viewportKeys = new Set(viewportDays.map(formatDateKey));
4570
+ const parsed = parseAllItems(input.items, input);
4571
+ const inViewport = deriveVisibleSegments(parsed.drafts, viewportKeys);
4572
+ const hourRange = input.hours === void 0 ? resolveHourRange(inViewport, bounds) : fixedHourRange(input.hours);
4573
+ const laid = layoutCellsByDate(inViewport, hourRange, bounds);
4430
4574
  return {
4431
- body,
4432
- h1: `${h1}px`,
4433
- h2: `${h2}px`,
4434
- h3: `${h3}px`,
4435
- h1Fluid: `clamp(${Math.round(h1 * fluidMin)}px, calc(${Math.round(h1 * fluidMin)}px + ${Math.round(h1 * (fluidMax - fluidMin))} * ((100vw - 320px) / 880)), ${Math.round(h1 * fluidMax)}px)`,
4436
- h2Fluid: `clamp(${Math.round(h2 * h2FluidMin)}px, calc(${Math.round(h2 * h2FluidMin)}px + ${Math.round(h2 * (fluidMax - h2FluidMin))} * ((100vw - 320px) / 880)), ${Math.round(h2 * fluidMax)}px)`,
4437
- h3Fluid: `clamp(${Math.round(h3 * fluidMin)}px, calc(${Math.round(h3 * fluidMin)}px + ${Math.round(h3 * (fluidMax - fluidMin))} * ((100vw - 320px) / 880)), ${Math.round(h3 * fluidMax)}px)`,
4438
- h1Display: `${Math.round(h1 * 1.5)}px`,
4439
- h1DisplayFluid: `clamp(${Math.round(h1 * 1.5 * fluidMin)}px, calc(${Math.round(h1 * 1.5 * fluidMin)}px + ${Math.round(h1 * 1.5 * (fluidMax - fluidMin))} * ((100vw - 320px) / 880)), ${Math.round(h1 * 1.5 * fluidMax)}px)`
4575
+ days: assembleDays(viewportDays, laid.cellsByDate, input.today),
4576
+ hourTicks: buildHourTicks(hourRange.startHour, hourRange.endHour),
4577
+ startHour: hourRange.startHour,
4578
+ endHour: hourRange.endHour,
4579
+ rangeMinutes: (hourRange.endHour - hourRange.startHour) * 60,
4580
+ hasItems: inViewport.length > 0,
4581
+ diagnostics: [...parsed.diagnostics, ...laid.diagnostics]
4440
4582
  };
4441
4583
  }
4442
- function mapLetterSpacing(s) {
4584
+ function parseAllItems(items, accessors) {
4585
+ const drafts = [];
4586
+ const diagnostics = [];
4587
+ for (const item of items) {
4588
+ const result = parseDraft(item, accessors);
4589
+ if (result.ok) drafts.push(result.draft);
4590
+ else diagnostics.push({
4591
+ item,
4592
+ reason: result.reason
4593
+ });
4594
+ }
4443
4595
  return {
4444
- tight: "-0.01em",
4445
- normal: "0em",
4446
- loose: "0.02em"
4447
- }[s];
4596
+ drafts,
4597
+ diagnostics
4598
+ };
4448
4599
  }
4449
- function mapEyebrowSize(s) {
4600
+ function layoutCellsByDate(segments, hourRange, bounds) {
4601
+ const rangeMinutes = (hourRange.endHour - hourRange.startHour) * 60;
4602
+ const rangeStartMinutes = hourRange.startHour * 60;
4603
+ const rangeEndMinutes = hourRange.endHour * 60;
4604
+ const segmentsByDate = groupSegmentsByDate(segments);
4605
+ const cellsByDate = /* @__PURE__ */ new Map();
4606
+ const diagnostics = [];
4607
+ for (const [dateKey, daySegments] of segmentsByDate) {
4608
+ const clipped = [];
4609
+ for (const segment of daySegments) {
4610
+ const result = clipDraft(segment, rangeStartMinutes, rangeEndMinutes);
4611
+ if (result.ok) clipped.push(result.clipped);
4612
+ else diagnostics.push({
4613
+ item: segment.draft.item,
4614
+ reason: result.reason
4615
+ });
4616
+ }
4617
+ const laneResults = assignLanes(clipped.map((entry) => ({
4618
+ start: entry.visibleStart,
4619
+ end: entry.visibleEnd,
4620
+ orderKey: entry.segment.draft.orderKey
4621
+ })));
4622
+ cellsByDate.set(dateKey, clipped.map((entry, idx) => buildCell(entry, laneResults[idx] ?? {
4623
+ laneIndex: 0,
4624
+ laneCount: 1
4625
+ }, rangeStartMinutes, rangeMinutes, bounds.minHeightPercent)));
4626
+ }
4450
4627
  return {
4451
- sm: "0.75rem",
4452
- md: "0.875rem",
4453
- lg: "1rem"
4454
- }[s];
4628
+ cellsByDate,
4629
+ diagnostics
4630
+ };
4455
4631
  }
4456
- function mapEyebrowLetterSpacing(s) {
4632
+ function assembleDays(viewportDays, cellsByDate, today) {
4633
+ return viewportDays.map((date) => {
4634
+ const dateKey = formatDateKey(date);
4635
+ return {
4636
+ date,
4637
+ dateKey,
4638
+ isToday: isSameCalendarDay(date, today),
4639
+ cells: cellsByDate.get(dateKey) ?? []
4640
+ };
4641
+ });
4642
+ }
4643
+ function parseDraft(item, accessors) {
4644
+ const startsAtIso = accessors.getStartsAt(item);
4645
+ const endsAtIso = accessors.getEndsAt(item);
4646
+ const timeZone = accessors.getTimeZone(item);
4647
+ const startsAtMinutes = getLocalMinuteOfDay(startsAtIso, timeZone);
4648
+ if (Number.isNaN(startsAtMinutes)) return {
4649
+ ok: false,
4650
+ reason: "invalid-start"
4651
+ };
4652
+ const startDateKey = getLocalDateKey(startsAtIso, timeZone);
4653
+ if (startDateKey == null) return {
4654
+ ok: false,
4655
+ reason: "invalid-timezone"
4656
+ };
4657
+ const endDateKey = getLocalDateKey(endsAtIso, timeZone);
4658
+ if (endDateKey == null) return {
4659
+ ok: false,
4660
+ reason: "invalid-end"
4661
+ };
4662
+ const endsAtMinutesRaw = getLocalMinuteOfDay(endsAtIso, timeZone);
4663
+ if (Number.isNaN(endsAtMinutesRaw)) return {
4664
+ ok: false,
4665
+ reason: "invalid-end"
4666
+ };
4667
+ const spansMultipleDays = startDateKey < endDateKey;
4668
+ const endsAtMinutes = spansMultipleDays || endsAtMinutesRaw > startsAtMinutes ? endsAtMinutesRaw : Math.min(1440, startsAtMinutes + 60);
4669
+ if (!spansMultipleDays && endsAtMinutes <= startsAtMinutes) return {
4670
+ ok: false,
4671
+ reason: "non-positive-duration"
4672
+ };
4457
4673
  return {
4458
- tight: "0em",
4459
- normal: "0.025em",
4460
- loose: "0.06em",
4461
- wide: "0.12em"
4462
- }[s];
4674
+ ok: true,
4675
+ draft: {
4676
+ item,
4677
+ startDateKey,
4678
+ endDateKey,
4679
+ startsAtMinutes,
4680
+ endsAtMinutes,
4681
+ color: accessors.getColor?.(item) ?? null,
4682
+ orderKey: accessors.getOrderKey?.(item) ?? accessors.getId(item)
4683
+ }
4684
+ };
4463
4685
  }
4464
- function mapEyebrowCase(c) {
4465
- return c === "uppercase" ? "uppercase" : "none";
4686
+ function deriveVisibleSegments(drafts, viewportKeys) {
4687
+ const segments = [];
4688
+ for (const draft of drafts) for (const dateKey of enumerateDateKeys(draft.startDateKey, draft.endDateKey)) {
4689
+ if (!viewportKeys.has(dateKey)) continue;
4690
+ const isStartDay = dateKey === draft.startDateKey;
4691
+ const isEndDay = dateKey === draft.endDateKey;
4692
+ const startsAtMinutes = isStartDay ? draft.startsAtMinutes : 0;
4693
+ const endsAtMinutes = isEndDay ? draft.endsAtMinutes : 1440;
4694
+ if (endsAtMinutes <= startsAtMinutes) continue;
4695
+ segments.push({
4696
+ draft,
4697
+ dateKey,
4698
+ startsAtMinutes,
4699
+ endsAtMinutes,
4700
+ continuesBefore: !isStartDay,
4701
+ continuesAfter: !isEndDay
4702
+ });
4703
+ }
4704
+ return segments;
4466
4705
  }
4467
- function mapLineHeight(s) {
4706
+ function clipDraft(segment, rangeStartMinutes, rangeEndMinutes) {
4707
+ const visibleStart = Math.max(rangeStartMinutes, segment.startsAtMinutes);
4708
+ const visibleEnd = Math.min(rangeEndMinutes, segment.endsAtMinutes);
4709
+ if (visibleEnd <= visibleStart) return {
4710
+ ok: false,
4711
+ reason: "out-of-visible-hours"
4712
+ };
4468
4713
  return {
4469
- normal: "1.5",
4470
- relaxed: "1.65",
4471
- loose: "1.8"
4472
- }[s];
4714
+ ok: true,
4715
+ clipped: {
4716
+ segment,
4717
+ visibleStart,
4718
+ visibleEnd
4719
+ }
4720
+ };
4473
4721
  }
4474
- /**
4475
- * Headings get their own line-height scale, decoupled from body. `mapLineHeight`
4476
- * is floored at 1.5 (a body leading) which reads as too airy on headings — the
4477
- * more so as size drops. These values sit well under 1.5 and let presets taper
4478
- * per level (larger headings tighter). `tight`/`snug` extend the token set for
4479
- * display headings; body keeps `mapLineHeight`.
4480
- */
4481
- function mapHeadingLineHeight(s) {
4722
+ function buildCell(entry, lane, rangeStartMinutes, rangeMinutes, minHeightPercent) {
4723
+ const heightPercent = Math.max(minHeightPercent, toRangePercent(entry.visibleEnd - entry.visibleStart, rangeMinutes));
4724
+ const rawTopPercent = toRangePercent(entry.visibleStart - rangeStartMinutes, rangeMinutes);
4725
+ const topPercent = Math.min(rawTopPercent, 100 - heightPercent);
4482
4726
  return {
4483
- tight: "1.1",
4484
- snug: "1.15",
4485
- normal: "1.2",
4486
- relaxed: "1.3",
4487
- loose: "1.4"
4488
- }[s];
4489
- }
4490
- function mapTextTransform(c) {
4491
- if (c === "uppercase") return "uppercase";
4492
- return "none";
4493
- }
4494
- function mapFontVariant(c) {
4495
- if (c === "smallCaps") return "small-caps";
4496
- return "normal";
4497
- }
4498
- function mapFontStyle(italic) {
4499
- return italic ? "italic" : "normal";
4500
- }
4501
- /** Adapt the canonical default-card decision for the embedded registration. */
4502
- function generateThemeBlockVarsCss(theme, themeId) {
4503
- const card = resolveCardRole(theme, theme.cards ?? null, "default");
4504
- return generateAllBlockVarsCss({
4505
- theme,
4506
- themeId,
4507
- surface: opaqueSurfaceContextFromTheme(theme),
4508
- embeddedRegistrationPaint: card.kind === "surface" ? cardSurfacePaint(card.variant) : { kind: "transparent" }
4509
- });
4727
+ item: entry.segment.draft.item,
4728
+ dateKey: entry.segment.dateKey,
4729
+ startsAtMinutes: entry.segment.startsAtMinutes,
4730
+ endsAtMinutes: entry.segment.endsAtMinutes,
4731
+ visibleStartsAtMinutes: entry.visibleStart,
4732
+ visibleEndsAtMinutes: entry.visibleEnd,
4733
+ topPercent,
4734
+ heightPercent,
4735
+ isClippedStart: entry.segment.continuesBefore || entry.segment.startsAtMinutes < entry.visibleStart,
4736
+ isClippedEnd: entry.segment.continuesAfter || entry.segment.endsAtMinutes > entry.visibleEnd,
4737
+ laneIndex: lane.laneIndex,
4738
+ laneCount: lane.laneCount,
4739
+ color: entry.segment.draft.color
4740
+ };
4510
4741
  }
4511
- //#endregion
4512
- //#region ../blocks/src/system/node/fragments/headingDecoration.ts
4513
- const defaultBindFrom = "_sectionStyles.headingDecoration";
4514
- function headingDecoration({ bindFrom = defaultBindFrom, className } = {}) {
4515
- return el("div", {
4516
- "aria-hidden": "true",
4517
- className: "rb-heading-decoration-row"
4518
- }, [el("div", { className: { $bind: {
4519
- from: bindFrom,
4520
- transforms: [{
4521
- id: "ui.headingDecorationClassName",
4522
- options: { baseClass: className }
4523
- }]
4524
- } } })], when(`${bindFrom}.family`));
4742
+ function resolveBounds(bounds) {
4743
+ return {
4744
+ ...DEFAULT_BOUNDS,
4745
+ ...bounds
4746
+ };
4525
4747
  }
4526
- //#endregion
4527
- //#region ../blocks/src/system/fragments/library/headerCta.ts
4528
- const headerCtaFragment = defineFragment({
4529
- variantMeaning: { kind: "arrangement" },
4530
- id: "headerCta",
4531
- title: "Header CTA",
4532
- description: "Single call-to-action button for the site header.",
4533
- fields: [{
4534
- id: "cta",
4535
- type: "group",
4536
- label: "Call to action",
4537
- description: "Primary action button displayed on CTA variant layouts.",
4538
- schema: { fields: [
4539
- {
4540
- id: "label",
4541
- type: "text",
4542
- label: "Label",
4543
- description: "Button label shown in the header."
4544
- },
4545
- {
4546
- id: "link",
4547
- type: "link",
4548
- label: "Link",
4549
- description: "Select an internal page or provide a custom destination."
4550
- },
4551
- {
4552
- id: "variant",
4553
- type: "select",
4554
- label: "Style",
4555
- defaultValue: "primary",
4556
- options: [
4557
- {
4558
- value: "primary",
4559
- label: "Primary"
4560
- },
4561
- {
4562
- value: "secondary",
4563
- label: "Secondary"
4564
- },
4565
- {
4566
- value: "outline",
4567
- label: "Outline"
4568
- }
4569
- ]
4570
- }
4571
- ] }
4572
- }],
4573
- layout: [ctaButton({
4574
- basePath: "cta",
4575
- whenPath: "cta.label"
4576
- })]
4577
- });
4578
- //#endregion
4579
- //#region ../blocks/src/system/fragments/lazyInit.ts
4580
- let initialized = false;
4581
- const ALL_FRAGMENTS = [
4582
- bodyCopyFragment,
4583
- heroCopyFragment,
4584
- ctaRowFragment,
4585
- heroCtaRowFragment,
4586
- ctaCopyFragment,
4587
- testimonialsHeadingFragment,
4588
- testimonialsCarouselFragment,
4589
- formCopyFragment,
4590
- formEmbedFragment,
4591
- headerCtaFragment,
4592
- singleButtonFragment,
4593
- blogFeaturedPostFragment,
4594
- faqHeadingFragment,
4595
- faqAccordionFragment,
4596
- cardFragment,
4597
- headingFragment,
4598
- richTextFragment
4599
- ];
4600
- /**
4601
- * Register all fragment definitions lazily.
4602
- * This function is called by the registry on first access.
4603
- *
4604
- * @param registerFn - Function to register a single fragment
4605
- */
4606
- function lazyRegisterFragments(registerFn) {
4607
- if (initialized) return;
4608
- ALL_FRAGMENTS.forEach(registerFn);
4609
- initialized = true;
4748
+ function resolveHourRange(segments, bounds) {
4749
+ if (segments.length === 0) return {
4750
+ startHour: bounds.defaultStartHour,
4751
+ endHour: bounds.defaultEndHour
4752
+ };
4753
+ const earliestStart = Math.min(...segments.map((segment) => segment.startsAtMinutes));
4754
+ const latestEnd = Math.max(...segments.map((segment) => segment.endsAtMinutes));
4755
+ const startHour = Math.max(bounds.minStartHour, Math.floor((earliestStart - bounds.marginMinutes) / 60));
4756
+ const endHour = Math.min(bounds.maxEndHour, Math.ceil((latestEnd + bounds.marginMinutes) / 60));
4757
+ return {
4758
+ startHour,
4759
+ endHour: Math.max(startHour + 1, endHour)
4760
+ };
4610
4761
  }
4611
- //#endregion
4612
- //#region ../blocks/src/system/fragments/registry.ts
4613
- const fragmentRegistry = {};
4614
- /**
4615
- * Ensure all fragments are registered.
4616
- * This is called automatically by getFragmentRegistry() and getFragment().
4617
- * Can also be called explicitly to force registration.
4618
- */
4619
- function ensureInitialized() {
4620
- lazyRegisterFragments((fragment) => {
4621
- if (!fragmentRegistry[fragment.id]) fragmentRegistry[fragment.id] = fragment;
4622
- });
4762
+ function fixedHourRange(hours) {
4763
+ const startHour = Math.min(23, Math.max(0, Math.floor(hours.startHour)));
4764
+ return {
4765
+ startHour,
4766
+ endHour: Math.min(24, Math.max(startHour + 1, Math.ceil(hours.endHour)))
4767
+ };
4623
4768
  }
4624
- /**
4625
- * Get the full fragment registry.
4626
- * Useful for passing to runtime components.
4627
- *
4628
- * @returns The complete fragment registry
4629
- */
4630
- function getFragmentRegistry() {
4631
- ensureInitialized();
4632
- return fragmentRegistry;
4769
+ function buildHourTicks(startHour, endHour) {
4770
+ const ticks = [];
4771
+ for (let hour = startHour; hour <= endHour; hour += 1) ticks.push(hour);
4772
+ return ticks;
4633
4773
  }
4634
- //#endregion
4635
- //#region ../blocks/src/system/blocks/events/shared/detailsSelection.ts
4636
- function isFutureOrNow(iso, nowIso) {
4637
- const ts = Date.parse(iso);
4638
- const now = Date.parse(nowIso);
4639
- if (!Number.isFinite(ts) || !Number.isFinite(now)) return false;
4640
- return ts >= now;
4774
+ function groupSegmentsByDate(segments) {
4775
+ const grouped = /* @__PURE__ */ new Map();
4776
+ for (const segment of segments) {
4777
+ const existing = grouped.get(segment.dateKey) ?? [];
4778
+ existing.push(segment);
4779
+ grouped.set(segment.dateKey, existing);
4780
+ }
4781
+ return grouped;
4641
4782
  }
4642
- const localDateKey = (startsAt, timeZone) => getBookingLocalDateKey(toScheduledBookingDateTime({
4643
- startsAt,
4644
- timeZone
4645
- }));
4646
- function selectRequested(events, requested) {
4647
- if (!requested) return null;
4648
- const byId = events.find((event) => event.occurrenceId === requested.id || event.id === requested.id);
4649
- if (byId) return byId;
4650
- if (!requested.startsAt || !requested.timeZone) return null;
4651
- const requestedDate = localDateKey(requested.startsAt, requested.timeZone);
4652
- return events.find((event) => localDateKey(event.startsAt, event.timeZone) === requestedDate) ?? null;
4783
+ function toRangePercent(minutes, rangeMinutes) {
4784
+ if (rangeMinutes <= 0) return 0;
4785
+ return minutes / rangeMinutes * 100;
4653
4786
  }
4654
- function selectNextUpcoming(events, nowIso) {
4655
- return [...events].filter((event) => isFutureOrNow(event.startsAt, nowIso)).sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt))[0] ?? null;
4787
+ function getTimetableDays(viewDate, view, startOfWeek) {
4788
+ if (view === "day") return [viewDate];
4789
+ return getWeekCalendarDays(viewDate, startOfWeek);
4656
4790
  }
4657
- function selectCompletedWholeSeries(events) {
4658
- if (events.length === 0 || !events.every((event) => event.bookingScope === "whole_series")) return null;
4659
- return [...events].sort((left, right) => Date.parse(right.startsAt) - Date.parse(left.startsAt))[0] ?? null;
4791
+ function enumerateDateKeys(startDateKey, endDateKey) {
4792
+ if (startDateKey > endDateKey) throw new Error(`Invalid timetable date range: ${startDateKey} is after ${endDateKey}`);
4793
+ const start = parseDateKey(startDateKey);
4794
+ parseDateKey(endDateKey);
4795
+ const keys = [];
4796
+ let cursor = start;
4797
+ while (formatDateKey(cursor) <= endDateKey) {
4798
+ keys.push(formatDateKey(cursor));
4799
+ cursor = addDays(cursor, 1);
4800
+ }
4801
+ return keys;
4660
4802
  }
4661
- function selectEventDetailsCandidate(events, requested, nowIso) {
4662
- const selected = selectRequested(events, requested);
4663
- if (selected) return {
4664
- event: selected,
4665
- mode: "selected"
4666
- };
4667
- const upcoming = selectNextUpcoming(events, nowIso);
4668
- if (upcoming) return {
4669
- event: upcoming,
4670
- mode: "next"
4803
+ function parseDateKey(dateKey) {
4804
+ const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(dateKey);
4805
+ if (match === null) throw new Error(`Invalid timetable date key: ${dateKey}`);
4806
+ const [, year, month, day] = match;
4807
+ return {
4808
+ year: Number(year),
4809
+ month: Number(month),
4810
+ day: Number(day)
4671
4811
  };
4672
- const completed = selectCompletedWholeSeries(events);
4673
- return completed ? {
4674
- event: completed,
4675
- mode: "completed"
4676
- } : null;
4677
4812
  }
4678
4813
  //#endregion
4679
4814
  //#region ../blocks/src/system/runtime/nodes/events/domain/depositOffer.ts
@@ -5098,7 +5233,7 @@ function EventCardContent(props) {
5098
5233
  className: "card-title rb-mb-3",
5099
5234
  children: /* @__PURE__ */ jsx("a", {
5100
5235
  className: "event-title-link",
5101
- ...resolveEventLinkProps(event),
5236
+ ...resolveEventPageLink(event),
5102
5237
  children: props.title
5103
5238
  })
5104
5239
  }),
@@ -5357,7 +5492,7 @@ const LegacyEventCompactRow = ({ event, buttonVariant = "primary", buttonText, s
5357
5492
  className: "event-compact-row-title",
5358
5493
  children: /* @__PURE__ */ jsx("a", {
5359
5494
  className: "event-title-link",
5360
- ...resolveEventLinkProps(event),
5495
+ ...resolveEventPageLink(event),
5361
5496
  children: eventDisplayTitle(event).title
5362
5497
  })
5363
5498
  }),
@@ -5493,7 +5628,7 @@ function EventQuickDateCard(props) {
5493
5628
  className: "event-quick-date-title",
5494
5629
  children: /* @__PURE__ */ jsx("a", {
5495
5630
  className: "event-title-link",
5496
- ...resolveEventLinkProps(event),
5631
+ ...resolveEventPageLink(event),
5497
5632
  children: event.title
5498
5633
  })
5499
5634
  }),
@@ -5814,7 +5949,7 @@ function renderedInlineStyle(style, nodeType) {
5814
5949
  }
5815
5950
  //#endregion
5816
5951
  //#region ../blocks/src/primitives/layout/Section.tsx
5817
- const Section = forwardRef(function Section({ as: Comp = "section", children, background, className = "", style, "data-slot": dataSlot, "data-arrangement": dataArrangement, "data-look": dataLook, "data-surface": dataSurface }, ref) {
5952
+ const Section = forwardRef(function Section({ as: Comp = "section", children, background, className = "", style, "data-slot": dataSlot, "data-arrangement": dataArrangement, "data-look": dataLook, "data-surface": dataSurface, "data-rb-section": geometryHook }, ref) {
5818
5953
  return /* @__PURE__ */ jsx(Comp, {
5819
5954
  ref,
5820
5955
  className: clsx("rb-relative rb-isolate rb-overflow-visible", className),
@@ -5823,6 +5958,7 @@ const Section = forwardRef(function Section({ as: Comp = "section", children, ba
5823
5958
  "data-surface": dataSurface,
5824
5959
  "data-arrangement": dataArrangement,
5825
5960
  "data-look": dataLook,
5961
+ "data-rb-section": geometryHook,
5826
5962
  children
5827
5963
  });
5828
5964
  });
@@ -8348,6 +8484,10 @@ function selectRelatedDates(input) {
8348
8484
  const dates = input.events.filter((event) => event.seriesId === input.seriesId).filter((event) => isWholeSeries || isFutureOrNow(event.startsAt, input.nowIso)).filter((event) => !selectedOccurrenceId || (event.occurrenceId || event.id) !== selectedOccurrenceId).sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt));
8349
8485
  return isWholeSeries ? dates : dates.slice(0, input.limit);
8350
8486
  }
8487
+ /** The registration panel's own decision, read from the same scoped dates and clock. */
8488
+ function pageBookedElsewhere(events, occurrenceContext, nowIso) {
8489
+ return decideBookedElsewhereDatesPage(events, occurrenceContext?.id ?? null, new Date(nowIso));
8490
+ }
8351
8491
  function selectEventDetails(args) {
8352
8492
  const all = uniqByOccurrenceId(resolveEventRegistrationScopedEvents((args.events ?? []).filter(Boolean), {
8353
8493
  occurrenceContext: args.occurrenceContext,
@@ -8391,7 +8531,8 @@ function selectEventDetails(args) {
8391
8531
  selected,
8392
8532
  otherDates: otherDates.filter(isOrdinaryEvent),
8393
8533
  timeZone,
8394
- depositOffer: resolvePublicEventDepositOffer(selected, { nowIso: args.nowIso })
8534
+ depositOffer: resolvePublicEventDepositOffer(selected, { nowIso: args.nowIso }),
8535
+ bookedElsewhere: pageBookedElsewhere(all, occurrenceContext, args.nowIso)
8395
8536
  };
8396
8537
  }
8397
8538
  //#endregion
@@ -8797,7 +8938,7 @@ function OtherEventDates({ selection }) {
8797
8938
  className: "rb-mt-2 rb-tiles-grid",
8798
8939
  children: dates.map((event) => /* @__PURE__ */ jsx("a", {
8799
8940
  className: "rb-tile rb-tile--interactive",
8800
- ...resolveEventLinkProps(event),
8941
+ ...resolveEventPageLink(event),
8801
8942
  children: /* @__PURE__ */ jsx(DateTimeTile, {
8802
8943
  startsAt: event.startsAt,
8803
8944
  endsAt: event.endsAt,
@@ -8832,7 +8973,7 @@ function EventVenueMap({ venue, drawing, showMap, mapHeight, mapClassName }) {
8832
8973
  /** One pricing projection governs the selected panel, including drop-in and whole-series behavior. */
8833
8974
  function selectedEventPricing(selection, showCost) {
8834
8975
  const event = selection.selected;
8835
- const isDropIn = isDropInEvent(event);
8976
+ const isDropIn = isDropInPublicEvent(event);
8836
8977
  const wholeSeriesPricing = wholeSeriesPricingOf(event);
8837
8978
  const showEventCost = showCost && !isDropIn && wholeSeriesPricing === null;
8838
8979
  return {
@@ -8844,7 +8985,6 @@ function selectedEventPricing(selection, showCost) {
8844
8985
  ticketTypes: showEventCost && isPaid(event) ? getDisplayablePricingOptions(event) : []
8845
8986
  };
8846
8987
  }
8847
- const isDropInEvent = (event) => event.bookingScope === "single_occurrence" && event.requiresRegistration === false;
8848
8988
  const wholeSeriesPricingOf = (event) => event.bookingScope === "whole_series" && event.pricing.kind !== "external" ? event.pricing : null;
8849
8989
  const isPaid = (event) => publicEventPricingType(event.pricing) !== "free";
8850
8990
  function SelectedEventDetailsView(props) {
@@ -9297,7 +9437,7 @@ function runDataFromMaybeArray(events) {
9297
9437
  items: [...groupPublicEventsByRun(events)].map((run) => ({
9298
9438
  kind: "run",
9299
9439
  run,
9300
- path: run.representative.destination.kind === "native" ? run.representative.destination.path : null
9440
+ path: eventDestinationPagePath(run.representative.destination)
9301
9441
  }))
9302
9442
  };
9303
9443
  }
@@ -10303,15 +10443,8 @@ function WeeklySlotAvailabilitySSR(props) {
10303
10443
  }
10304
10444
  //#endregion
10305
10445
  //#region ../blocks/src/system/runtime/nodes/events/RecurringSchedule.tsx
10306
- function destinationHref(destination) {
10307
- return destination.kind === "external" ? destination.url : destination.path;
10308
- }
10309
10446
  function bookingLinkProps(booking) {
10310
- return booking.destination.kind === "external" ? {
10311
- href: destinationHref(booking.destination),
10312
- target: "_blank",
10313
- rel: "noopener noreferrer"
10314
- } : { href: destinationHref(booking.destination) };
10447
+ return eventDestinationBookingLink(booking.destination);
10315
10448
  }
10316
10449
  function bookingActionContent(input) {
10317
10450
  switch (input.booking.kind) {
@@ -11261,7 +11394,7 @@ function AgendaModalCard({ event, showCapacity, calendarTimeZone, onClick }) {
11261
11394
  });
11262
11395
  }
11263
11396
  function AgendaLinkCard({ event, showCapacity, showVenue, buttonVariant, buttonText, calendarTimeZone }) {
11264
- const eventLinkProps = resolveEventLinkProps(event);
11397
+ const eventLinkProps = resolveEventPageLink(event);
11265
11398
  const categoryColor = event.eventCategory?.color || "rgb(var(--tb-accent))";
11266
11399
  const timeZone = resolveEventTimeZone(event, calendarTimeZone);
11267
11400
  const teacherLine = formatEventTeacherLine(event);
@@ -11502,7 +11635,7 @@ function formatCompactTimeRange(event, calendarTimeZone) {
11502
11635
  }));
11503
11636
  }
11504
11637
  const WeekBoardCard = ({ event, showCapacity, calendarTimeZone }) => {
11505
- const linkProps = resolveEventLinkProps(event);
11638
+ const linkProps = resolveEventPageLink(event);
11506
11639
  const { status, label } = getEventAvailabilityStatus(event);
11507
11640
  const pill = showCapacity ? label : null;
11508
11641
  return /* @__PURE__ */ jsxs("a", {
@@ -11939,7 +12072,7 @@ function renderCalendarSsr(display, hydration) {
11939
12072
  }), /* @__PURE__ */ jsxs("div", {
11940
12073
  className: "event-calendar-events",
11941
12074
  children: [day.visibleEntries.map(({ event, timeZone }) => /* @__PURE__ */ jsxs("a", {
11942
- ...resolveEventLinkProps(event),
12075
+ ...resolveEventPageLink(event),
11943
12076
  className: "event-calendar-event",
11944
12077
  title: `${eventDisplayTitleText(event)} at ${formatTime(event.startsAt, eventDateOptions({
11945
12078
  ...event,
@@ -12045,7 +12178,7 @@ function renderTimetableSsr(display, hydration) {
12045
12178
  className: "event-timetable-day-empty",
12046
12179
  children: "No classes"
12047
12180
  }) : day.events.map((cell) => /* @__PURE__ */ jsxs("a", {
12048
- ...resolveEventLinkProps(cell.event),
12181
+ ...resolveEventPageLink(cell.event),
12049
12182
  className: "event-timetable-event",
12050
12183
  title: `${eventDisplayTitleText(cell.event)}, ${cell.timeLabel}`,
12051
12184
  style: {
@@ -12204,6 +12337,18 @@ function EventBookingPanelBody({ panel }) {
12204
12337
  children: cancelledDateCopy.bodyText
12205
12338
  })]
12206
12339
  });
12340
+ case "bookElsewhere": return /* @__PURE__ */ jsx("div", {
12341
+ className: "event-booking-panel__book-elsewhere",
12342
+ children: /* @__PURE__ */ jsx(ThemedButtonLink, {
12343
+ variant: "primary",
12344
+ size: "md",
12345
+ extraClassName: "event-booking-panel__book-link rb-block rb-w-full rb-text-center",
12346
+ href: panel.url,
12347
+ target: "_blank",
12348
+ rel: "noopener noreferrer",
12349
+ label: panel.label
12350
+ })
12351
+ });
12207
12352
  case "dropIn": return /* @__PURE__ */ jsx(DropInPanel, { panel: panel.panel });
12208
12353
  case "bookingClosed": return /* @__PURE__ */ jsx(BookingClosedPanel, { detail: panel.detail });
12209
12354
  case "closedRun": return /* @__PURE__ */ jsx(ClosedRunPanel, { copy: closedRunCopy(panel.reason, panel.run) });
@@ -12390,20 +12535,36 @@ function resolveBookingPanelSelection(source) {
12390
12535
  } : null;
12391
12536
  }
12392
12537
  function selectPagePanel(source, events) {
12393
- if (source.subject?.kind === "eventOffering" && source.subject.bookingScope === "whole_series") {
12394
- if (source.pageKind !== "bookingPage") return null;
12395
- return planWholeSeriesParentSelection({
12396
- offeringId: source.subject.eventOfferingId,
12397
- events,
12398
- now: new Date(source.now)
12399
- });
12400
- }
12401
- if (source.subject?.kind === "eventSeries" && source.subject.bookingScope === "whole_series") return planWholeSeriesRunSelection({
12402
- eventSeriesId: source.subject.eventSeriesId,
12538
+ const bookedElsewhere = isBookedElsewherePage(events);
12539
+ const subject = source.subject;
12540
+ if (subject?.kind === "eventOffering" && subject.bookingScope === "whole_series") return source.pageKind === "bookingPage" || bookedElsewhere ? planWholeSeriesParentSelection({
12541
+ offeringId: subject.eventOfferingId,
12542
+ events,
12543
+ now: new Date(source.now)
12544
+ }) : null;
12545
+ if (subject?.kind === "eventSeries" && subject.bookingScope === "whole_series") return planWholeSeriesRunSelection({
12546
+ eventSeriesId: subject.eventSeriesId,
12403
12547
  events
12404
12548
  });
12405
- if (!source.occurrenceContext && source.subject?.kind === "eventSeries") return planOrdinarySeriesSelection(events);
12406
- return selectOccurrenceForPanel(events, source.occurrenceContext?.id);
12549
+ return bookedElsewhere ? selectBookedElsewherePanel(source, events) : selectBookedHerePanel(source, events);
12550
+ }
12551
+ /** The page header reads the same choice (`decideBookedElsewhereDatesPage`). Unscoped blocks show no panel. */
12552
+ function selectBookedElsewherePanel(source, events) {
12553
+ const occurrenceId = source.occurrenceContext?.id ?? null;
12554
+ return occurrenceId || offersSeriesDates(source, true) ? selectBookedElsewhereDates(events, occurrenceId, new Date(source.now)) : null;
12555
+ }
12556
+ function selectBookedHerePanel(source, events) {
12557
+ return offersSeriesDates(source, false) ? planOrdinarySeriesSelection(events) : selectOccurrenceForPanel(events, source.occurrenceContext?.id);
12558
+ }
12559
+ /**
12560
+ * A series subject without a dated route offers the same eligible dates in
12561
+ * CMS/SDK and hosted pages. Unscoped blocks keep their catalogue picker, as
12562
+ * does an offering's page booked here.
12563
+ */
12564
+ function offersSeriesDates(source, bookedElsewhere) {
12565
+ if (source.occurrenceContext) return false;
12566
+ const kind = source.subject?.kind;
12567
+ return kind === "eventSeries" || kind === "eventOffering" && bookedElsewhere;
12407
12568
  }
12408
12569
  /** The decided target is also retained for recovery when fresh booking is closed. */
12409
12570
  function registrationSourceForPanel(source, panel) {
@@ -12427,6 +12588,8 @@ function planEventBookingPanel({ selection, subject, pageEvents }, now) {
12427
12588
  kind: "cancelled",
12428
12589
  registration: null
12429
12590
  };
12591
+ const elsewhere = planBookElsewherePanel(selection, now);
12592
+ if (elsewhere) return elsewhere;
12430
12593
  const nonBookingPanel = planNonBookingPanel(selection);
12431
12594
  switch (selection.kind) {
12432
12595
  case "occurrence":
@@ -12484,6 +12647,49 @@ function closedDatePanel(selection, now) {
12484
12647
  copy
12485
12648
  } : null;
12486
12649
  }
12650
+ /**
12651
+ * An event booked on another website is saved with no booking here, so it
12652
+ * would otherwise read as a drop-in ("No booking needed"). It is decided
12653
+ * first, after a cancelled date, by the shared booked-elsewhere decision the
12654
+ * page header also reads: a closed, started or finished date says so rather
12655
+ * than sending people out. There is nothing here to recover, so no
12656
+ * registration target is kept.
12657
+ */
12658
+ function planBookElsewherePanel(selection, now) {
12659
+ const booking = decideBookedElsewhereBooking(selection, now);
12660
+ if (!booking) return null;
12661
+ return booking.kind === "open" ? {
12662
+ kind: "bookElsewhere",
12663
+ url: booking.destination.url,
12664
+ label: booking.destination.label,
12665
+ registration: null
12666
+ } : {
12667
+ ...bookElsewhereClosedPanel(booking.closure),
12668
+ registration: null
12669
+ };
12670
+ }
12671
+ function bookElsewhereClosedPanel(closure) {
12672
+ switch (closure.kind) {
12673
+ case "bookingClosed": return {
12674
+ kind: "bookingClosed",
12675
+ detail: closure.detail
12676
+ };
12677
+ case "date": return {
12678
+ kind: "closedDate",
12679
+ copy: bookElsewhereDateCopy(closure.event, closure.closure)
12680
+ };
12681
+ case "datesCutOff": return {
12682
+ kind: "closedDate",
12683
+ copy: closedDateListCopy(closure.dates.length, cutOffDateCopy(closure.firstCutOff.event, closure.firstCutOff.closesAt))
12684
+ };
12685
+ case "run": return {
12686
+ kind: "closedRun",
12687
+ reason: closure.reason,
12688
+ run: closure.run
12689
+ };
12690
+ case "unavailable": return { kind: "unavailable" };
12691
+ }
12692
+ }
12487
12693
  /** Drop-in and page-level closure take precedence over fresh booking and run selection. */
12488
12694
  function planNonBookingPanel(selection) {
12489
12695
  if (!selectionRepresentativeEvent(selection).requiresRegistration) return {
@@ -15345,10 +15551,14 @@ function blockBoundaryReserves(input) {
15345
15551
  return {
15346
15552
  topPlacement: top?.placement,
15347
15553
  bottomPlacement: bottom?.placement,
15348
- fieldSeam: input.before?.fieldsMeet ? "top" : void 0,
15554
+ seamBefore: seamAttribute(input.before),
15555
+ seamAfter: seamAttribute(input.after),
15349
15556
  style: top || bottom ? style : void 0
15350
15557
  };
15351
15558
  }
15559
+ function seamAttribute(slot) {
15560
+ return slot && slot.seam !== "none" ? slot.seam : void 0;
15561
+ }
15352
15562
  /** The reserve one join needs on one side of itself, if it draws at all. */
15353
15563
  function reserveOnSide(slot, side) {
15354
15564
  const layout = renderedJoinLayout(slot?.join ?? null);
@@ -15942,11 +16152,32 @@ function composeSurvivorJoins(plan, survivors, themeResources) {
15942
16152
  survivors: survivors.map(({ entry }) => ({
15943
16153
  id: entry.block.id,
15944
16154
  kind: entry.block.kind,
15945
- content: boundaryClassificationContent(entry, themeResources)
16155
+ content: boundaryClassificationContent(entry, themeResources),
16156
+ ...seamSectionFacts(entry)
15946
16157
  }))
15947
16158
  });
15948
16159
  }
15949
16160
  /**
16161
+ * Whether the platform paints this entry's section, and the ground it
16162
+ * declares. Only a system block whose layout is a styled section is
16163
+ * `platform`: that section carries the geometry hook the seam rules target,
16164
+ * whatever the Look or skin. An override component, a custom block, a layout
16165
+ * that draws its own root, or a block that manages its own wrapper (so never
16166
+ * carries the seam attributes) owns its ground and padding.
16167
+ */
16168
+ function seamSectionFacts(entry) {
16169
+ const own = {
16170
+ ground: pageGround,
16171
+ section: "own"
16172
+ };
16173
+ if (entry.kind !== "renderable" || entry.override || entry.managesOwnWrapper || !hasBlockDefinition(entry.block.kind)) return own;
16174
+ const ground = layoutSectionGround(resolveBlockLayout(entry.definition.manifest, entry.effectiveArrangementKey));
16175
+ return ground ? {
16176
+ ground,
16177
+ section: "platform"
16178
+ } : own;
16179
+ }
16180
+ /**
15950
16181
  * The content a join is classified from must be the content that paints the
15951
16182
  * section. The default block renderer layers the theme's per-block style
15952
16183
  * defaults (`theme.blockOverrides[kind].styles`, background included) under
@@ -16247,7 +16478,7 @@ function wrapRenderedPage(props, plan, rendered) {
16247
16478
  function renderPreparedPage(props, preparation, themeResources, imageResolveContext, headingPresentation) {
16248
16479
  const resolvedRegistry = props.registry ?? getDefaultComponentRegistry();
16249
16480
  const joinSlots = joinSlotsByPair(preparation.joins);
16250
- const renderRegion = (entries, joins, flow) => entries.map((entry, index) => renderGuardedPlanEntry({
16481
+ const renderRegion = (entries, joins, ending) => entries.map((entry, index) => renderGuardedPlanEntry({
16251
16482
  entry,
16252
16483
  index,
16253
16484
  entries,
@@ -16257,27 +16488,28 @@ function renderPreparedPage(props, preparation, themeResources, imageResolveCont
16257
16488
  resolvedRegistry,
16258
16489
  systemTrees: headingPresentation.trees,
16259
16490
  joinSlots: joins,
16260
- flow,
16491
+ ending,
16261
16492
  wrapBlock: props.wrapBlock,
16262
16493
  renderJoin: props.renderJoin
16263
16494
  }));
16264
16495
  const { main, aside } = preparation.regions;
16265
16496
  const title = headingPresentation.needsPageTitle ? /* @__PURE__ */ jsx(PageTitleFallback, { name: props.page?.name ?? "" }) : null;
16266
- if (aside.length === 0) return /* @__PURE__ */ jsxs("div", { children: [title, renderRegion(main, joinSlots, "main")] });
16497
+ if (aside.length === 0) return /* @__PURE__ */ jsxs("div", { children: [title, renderRegion(main, joinSlots, "lastBlock")] });
16267
16498
  return /* @__PURE__ */ jsxs("div", {
16268
16499
  className: "rb-page-layout",
16269
16500
  "data-page-layout": "main-aside",
16501
+ "data-page-ending": "",
16270
16502
  children: [
16271
16503
  title,
16272
16504
  /* @__PURE__ */ jsx("div", {
16273
16505
  className: "rb-page-layout__main",
16274
16506
  "data-page-region": "main",
16275
- children: renderRegion(main, joinSlots, "main")
16507
+ children: renderRegion(main, joinSlots, "elsewhere")
16276
16508
  }),
16277
16509
  /* @__PURE__ */ jsx("aside", {
16278
16510
  className: "rb-page-layout__aside rb-sticky-below-site-chrome",
16279
16511
  "data-page-region": "aside",
16280
- children: renderRegion(aside, /* @__PURE__ */ new Map(), "aside")
16512
+ children: renderRegion(aside, /* @__PURE__ */ new Map(), "elsewhere")
16281
16513
  })
16282
16514
  ]
16283
16515
  });
@@ -16366,9 +16598,9 @@ function requireEntryBlockOverride(entry, themeResources) {
16366
16598
  }
16367
16599
  requireBlockOverride(themeResources, entry.override, entry.block.kind);
16368
16600
  }
16369
- /** The footer meets the main flow's last block, which marks itself for the footer edge's reserve. */
16370
- function pageEndingAttribute(flow, position) {
16371
- return flow === "main" && (position === "last" || position === "only") ? "" : void 0;
16601
+ /** The block the footer meets marks itself for the footer edge's reserve. */
16602
+ function pageEndingAttribute(ending, position) {
16603
+ return ending === "lastBlock" && (position === "last" || position === "only") ? "" : void 0;
16372
16604
  }
16373
16605
  /** The block's stored identifier, emitted as its section `id` so `#identifier` links land on it. */
16374
16606
  function blockAnchorId(block) {
@@ -16435,10 +16667,11 @@ function renderPlanEntry(input) {
16435
16667
  "data-block-composition": blockComposition?.treatment,
16436
16668
  "data-block-composition-kind": blockComposition?.kind,
16437
16669
  "data-page-block-position": blockPosition,
16438
- "data-page-ending": pageEndingAttribute(input.flow, blockPosition),
16670
+ "data-page-ending": pageEndingAttribute(input.ending, blockPosition),
16439
16671
  "data-site-style-boundary-before": reserves.topPlacement,
16440
16672
  "data-site-style-boundary-after": reserves.bottomPlacement,
16441
- "data-site-style-field-seam": reserves.fieldSeam,
16673
+ "data-site-style-seam-before": reserves.seamBefore,
16674
+ "data-site-style-seam-after": reserves.seamAfter,
16442
16675
  "data-style-group": styleGroup,
16443
16676
  style: reserves.style,
16444
16677
  children: /* @__PURE__ */ jsx(MemoBlockSection, { ...blockSectionProps })