@riverbankcms/sdk 0.174.0 → 0.174.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/dist/_dts/{BlocksIslandsHydrator-GqVX3I8E.d.ts → BlocksIslandsHydrator-YRmc-Yxz.d.ts} +1 -1
  2. package/dist/_dts/{Page-BhUH31M-.d.ts → Page-Du0zX1B-.d.ts} +7 -7
  3. package/dist/_dts/{SdkPreviewMode-DBn2x0UL.d.ts → SdkPreviewMode-4L8v3FkY.d.ts} +2 -2
  4. package/dist/_dts/{client-Cr-sOeSl.d.ts → client-B1J6Akyf.d.ts} +1 -1
  5. package/dist/_dts/{content-types-DKw1yJdN.d.ts → content-types-CGGYI0u_.d.ts} +2 -2
  6. package/dist/_dts/{contracts-CJ2O03nB.d.ts → contracts-CHMlw9hT.d.ts} +3 -3
  7. package/dist/_dts/{footerPageOutline-DoGHHKr_.d.ts → footerPageOutline-DIHSU1Vr.d.ts} +6 -6
  8. package/dist/_dts/{generatePageMetadata-CJGu4hoa.d.ts → generatePageMetadata-JITXD6BU.d.ts} +2 -2
  9. package/dist/_dts/{index-Bq-488M7.d.ts → index-BLEKFHt1.d.ts} +1 -1
  10. package/dist/_dts/{index-DYsP4k6S.d.ts → index-BgOr1Xyz.d.ts} +3 -3
  11. package/dist/_dts/{index-DQZ5L0Gb.d.ts → index-CF62FntA.d.ts} +2 -2
  12. package/dist/_dts/{index-3GzargmS.d.ts → index-CXZSy_9M.d.ts} +2 -2
  13. package/dist/_dts/{index-DYlfdT1O.d.ts → index-D9ZYmGAJ.d.ts} +1 -1
  14. package/dist/_dts/{index-DdEi2iXd.d.ts → index-DpJm0NpL.d.ts} +4 -4
  15. package/dist/_dts/{index--39uLjrr.d.ts → index-yWDbUojb.d.ts} +1 -1
  16. package/dist/_dts/{loadContent-BVPagYmy.d.ts → loadContent-M-s0p0rq.d.ts} +7 -7
  17. package/dist/_dts/{request-Be1E-H-V.d.ts → request-BK-pHf0P.d.ts} +449 -118
  18. package/dist/_dts/{resolveBlockData-D1pL25bD.d.ts → resolveBlockData-DZAlnhwt.d.ts} +5 -5
  19. package/dist/_dts/{resolvePageContent-B4sbTf96.d.ts → resolvePageContent-DXUCWJ3y.d.ts} +2 -2
  20. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
  21. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  22. package/dist/_dts/sdk/src/client.d.ts +7 -7
  23. package/dist/_dts/sdk/src/config/index.d.ts +6 -6
  24. package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
  25. package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
  26. package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
  27. package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
  28. package/dist/_dts/sdk/src/data/types.d.ts +2 -2
  29. package/dist/_dts/sdk/src/index.d.ts +8 -8
  30. package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
  31. package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
  32. package/dist/_dts/sdk/src/navigation/index.d.ts +3 -3
  33. package/dist/_dts/sdk/src/next/index.d.ts +7 -7
  34. package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
  35. package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
  36. package/dist/_dts/sdk/src/portal/client.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 +5 -5
  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/{types-5MeDI1w8.d.ts → types-CwmB2NHU.d.ts} +7 -7
  54. package/dist/_dts/{types-Bm5_3VEd.d.ts → types-DjVNADXR.d.ts} +3 -3
  55. package/dist/_dts/{types-CVoCc_Ia.d.ts → types-Dmow_FI6.d.ts} +2 -2
  56. package/dist/_dts/{validation-lEtYD-Rh.d.ts → validation-h8t1HLlL.d.ts} +4 -4
  57. package/dist/client/{BlocksIslandsHydrator-DkflFLGQ.mjs → BlocksIslandsHydrator-DRVx_XLi.mjs} +16 -16
  58. package/dist/client/{BookingMailingListNote-CAyoiAGD.mjs → BookingMailingListNote-CwrMzj-k.mjs} +2 -2
  59. package/dist/client/{BookingPanelArrangement-C7yiJrxm.mjs → BookingPanelArrangement-C2_hFT6K.mjs} +1 -1
  60. package/dist/client/{CalendarNavigationChevron-BPQU5Snc.mjs → CalendarNavigationChevron-Az1-TIEI.mjs} +4 -4
  61. package/dist/client/{DemoBookingPortalAccess-BnEgvJas.mjs → DemoBookingPortalAccess-1p-pJ1lg.mjs} +1 -1
  62. package/dist/client/{EventCalendar.client-BiWQc28-.mjs → EventCalendar.client-CDkkP-Lv.mjs} +8 -8
  63. package/dist/client/{EventCombined.client-B_ytWQtn.mjs → EventCombined.client-DK3aaz62.mjs} +5 -5
  64. package/dist/client/{EventItem-C-mxXpX_.mjs → EventItem-WeUipfIP.mjs} +3 -3
  65. package/dist/client/{EventListWeekNavigation-Bm3Ap1Rd.mjs → EventListWeekNavigation-D3sbAeDo.mjs} +1 -1
  66. package/dist/client/{EventListing.client-Bs_8im5_.mjs → EventListing.client-DL3gGGmF.mjs} +3 -3
  67. package/dist/client/{EventListing.view-CN7BjGgC.mjs → EventListing.view-DKFImKOx.mjs} +5 -5
  68. package/dist/client/{EventRegistrationPayment-DPkRcSdw.mjs → EventRegistrationPayment-Dn9TpWyL.mjs} +39 -13
  69. package/dist/client/{Page--xJ23nA5.mjs → Page-BpeP9xdt.mjs} +58 -1011
  70. package/dist/client/{StepIndicator-D391QRNc.mjs → StepIndicator-CP6zrwkl.mjs} +4 -241
  71. package/dist/client/{accordion-BQtTkDN8.mjs → accordion-nR7D4m1a.mjs} +1 -1
  72. package/dist/client/{booking-form.client-D9M7TKGV.mjs → booking-form.client-Ce-mQZ7W.mjs} +6 -6
  73. package/dist/client/{bookingForm-BsOS0sl9.mjs → bookingForm-B-qT_AQB.mjs} +3 -3
  74. package/dist/client/bookings.mjs +3 -3
  75. package/dist/client/{boxStyleClassNames-CNDLpT06.mjs → boxStyleClassNames-CrE3TDpW.mjs} +2 -29
  76. package/dist/client/{carousel-CPsW-FPh.mjs → carousel-CVUOatsY.mjs} +1 -1
  77. package/dist/client/{cart-CwElmocm.mjs → cart-DE0K6E0R.mjs} +3 -3
  78. package/dist/client/{cart.client-RpqI56w8.mjs → cart.client-C23E6WQ5.mjs} +1 -1
  79. package/dist/client/{checkout-CfMgqY8H.mjs → checkout-76cdHyPL.mjs} +3 -3
  80. package/dist/client/{checkout.client-BpuPyOuJ.mjs → checkout.client-DJOzqb26.mjs} +1 -1
  81. package/dist/client/{checkoutUrls-VeHY6WYj.mjs → checkoutUrls-CvIP5DCO.mjs} +1 -1
  82. package/dist/client/client.mjs +4 -3
  83. package/dist/client/{course-q1sA4Cj-.mjs → course-DHIrXqNT.mjs} +1 -1
  84. package/dist/client/{display-D8MW2b0e.mjs → display-Cf_j5stk.mjs} +1972 -382
  85. package/dist/client/{enhanceHeaderSection-BzjY6AiY.mjs → enhanceHeaderSection-5GD5o4Mt.mjs} +3 -3
  86. package/dist/client/{event-details.client-CseTWUFC.mjs → event-details.client-D7Oz1q2L.mjs} +1 -1
  87. package/dist/client/{event-registration.client-b5TLxntR.mjs → event-registration.client-zbuX36aA.mjs} +133 -127
  88. package/dist/client/{eventCalendar-C-kJNIc9.mjs → eventCalendar-uZrksODt.mjs} +3 -3
  89. package/dist/client/{eventCombined-BgHJGhwE.mjs → eventCombined-DxhvNAx8.mjs} +3 -3
  90. package/dist/client/{eventDetails-CAwbreD0.mjs → eventDetails-DCIH4BYG.mjs} +2 -2
  91. package/dist/client/{eventListing-_14atrj8.mjs → eventListing-B9KrnPvc.mjs} +3 -3
  92. package/dist/client/{eventRegistration-BOqSdstJ.mjs → eventRegistration-TjnURMKl.mjs} +3 -3
  93. package/dist/client/{form-DfAB-llc.mjs → form-CfqIAhfN.mjs} +2 -2
  94. package/dist/client/{form.client-DN-I9_qC.mjs → form.client-CL6fF0cW.mjs} +2 -2
  95. package/dist/client/{form.parts-t2Q1neM6.mjs → form.parts-Bf-L66Gg.mjs} +1 -1
  96. package/dist/client/{headerSection-Dces54pb.mjs → headerSection-WVXtOcuW.mjs} +2 -2
  97. package/dist/client/{newsletter-form.client-D_YFUlR2.mjs → newsletter-form.client-Bb7GAZpO.mjs} +3 -3
  98. package/dist/client/{newsletter-form.parts-URO5Mn_I.mjs → newsletter-form.parts-BqOVRdIc.mjs} +1 -1
  99. package/dist/client/{newsletterForm-_c9fKIzS.mjs → newsletterForm-DOVe-qY3.mjs} +2 -2
  100. package/dist/client/{product-detail.client-CVW1UIxJ.mjs → product-detail.client-CNzeFnFf.mjs} +1 -1
  101. package/dist/client/{product-list.client-CF9hO23G.mjs → product-list.client-LKpzC7pj.mjs} +1 -1
  102. package/dist/client/{productDetail-C_qbmUuP.mjs → productDetail-D2JNeEgx.mjs} +3 -3
  103. package/dist/client/{productList-Df5qDD0z.mjs → productList-DTgZXOEq.mjs} +3 -3
  104. package/dist/client/{propsDecoder-BiEyK2ii.mjs → propsDecoder-mpBQt2AT.mjs} +2 -2
  105. package/dist/client/{registry.server-ClcfWpvM.mjs → registry.server-DdTJyar2.mjs} +19 -37
  106. package/dist/client/rendering/client.mjs +20 -20
  107. package/dist/client/rendering/islands.mjs +1 -1
  108. package/dist/client/rendering.mjs +5 -6
  109. package/dist/client/{routeIslandApiConfig-DAypPzSo.mjs → routeIslandApiConfig-8cfSgT0E.mjs} +1 -1
  110. package/dist/client/{shop-gteEpeO5.mjs → shop-5LBhftWx.mjs} +3 -3
  111. package/dist/client/{shop-commerce-Bw4_BXQg.mjs → shop-commerce-DkValjZj.mjs} +8 -8
  112. package/dist/client/{shop-commerce-store-Da6Ah-_4.mjs → shop-commerce-store-BOmXFmk_.mjs} +1 -1
  113. package/dist/client/{shop-discount-apply.state-DidgH7ow.mjs → shop-discount-apply.state-D0ifS6KX.mjs} +1 -1
  114. package/dist/client/{shop.client-CbbdjWWd.mjs → shop.client-BTtZqNmv.mjs} +8 -8
  115. package/dist/client/{shop.interactive-CKFORzux.mjs → shop.interactive-DNRqG4aX.mjs} +6 -5
  116. package/dist/client/{shopShared-C7QjoywZ.mjs → shopShared-Nky6kPYr.mjs} +1 -1
  117. package/dist/client/{timetableModel-CtZiIj9q.mjs → timetableModel-DZArznD_.mjs} +5 -142
  118. package/dist/client/{useDiscountApply-BZU5DWZQ.mjs → useDiscountApply-BBnStWXU.mjs} +1 -1
  119. package/dist/client/{useDiscountCodeUi-BuLgof7O.mjs → useDiscountCodeUi-d7viY_mu.mjs} +1 -1
  120. package/dist/client/{useEventPagination-B4VPtSEF.mjs → useEventPagination-Da2JqxGC.mjs} +4 -4
  121. package/dist/client/{view-CvlTplao.mjs → view-BvuYmQJ5.mjs} +2 -2
  122. package/dist/client/{view-CxUpgcM6.mjs → view-D9ObkFtz.mjs} +5 -6
  123. package/dist/preview-next/client/{PageSectionToolbar-BFbSrDbi.mjs → PageSectionToolbar-DwxHT-2k.mjs} +3 -3
  124. package/dist/preview-next/client/{PreviewEditorSidebar-BtpzqQ-i.mjs → PreviewEditorSidebar-D4SBxGU6.mjs} +9 -9
  125. package/dist/preview-next/client/{PreviewEditorUI-z22h-CCY.mjs → PreviewEditorUI-D8mUct32.mjs} +4 -4
  126. package/dist/preview-next/client/{PreviewShell-BW3Qpoa_.mjs → PreviewShell-L2AEdNUQ.mjs} +5 -5
  127. package/dist/preview-next/client/{SdkPreviewModeRuntime-BvVeK1hR.mjs → SdkPreviewModeRuntime-bhVAU2D2.mjs} +5 -5
  128. package/dist/preview-next/client/{previewAssistantSlot-BUqAh1FL.mjs → previewAssistantSlot-Jpj_HDra.mjs} +852 -610
  129. package/dist/preview-next/client/{previewChromeRoot-NCy5zHO8.mjs → previewChromeRoot-CYTDvx4u.mjs} +1 -1
  130. package/dist/preview-next/client/runtime.mjs +3 -3
  131. package/dist/preview-next/client/{sdk-runtime-CxmKDVGZ.mjs → sdk-runtime-CZHX6J_4.mjs} +2 -2
  132. package/dist/preview-next/client/{siteStyleAccess-B_UaDyJO.mjs → siteStyleAccess-DmGIG9Hk.mjs} +3 -3
  133. package/dist/preview-next/client/{useAutosaveStatus-BqmWvPLY.mjs → useAutosaveStatus-DQCyswQ-.mjs} +1 -1
  134. package/dist/preview-next/client/{useOpenBlockForSetup-LAllV0rU.mjs → useOpenBlockForSetup-LwE5yXvL.mjs} +13 -2
  135. package/dist/preview-next/keepAlive.mjs +1 -1
  136. package/dist/preview-next/middleware.mjs +1 -1
  137. package/dist/preview-next/{route-contract-DV6SeCNv.mjs → route-contract-BOuNcOcN.mjs} +1 -0
  138. package/dist/server/{Block.shared-Ch2FKAvU.mjs → Block.shared-wfJfhs08.mjs} +4 -4
  139. package/dist/server/{ThemeScopeCore-DFvjDVzi.mjs → ThemeScopeCore-BtrJNHTB.mjs} +1 -1
  140. package/dist/server/{bindings-CQg2lzZn.mjs → bindings-P1CF2Gm6.mjs} +4 -4
  141. package/dist/server/{client-aYRTVneD.mjs → client-CGtU5fHI.mjs} +2 -1
  142. package/dist/server/config-validation.mjs +1 -1
  143. package/dist/server/config.mjs +2 -2
  144. package/dist/server/data/resolveBlockData.mjs +1 -1
  145. package/dist/server/index.mjs +2 -2
  146. package/dist/server/{loadContent-Cgpfr44e.mjs → loadContent-ChnkJSay.mjs} +4 -4
  147. package/dist/server/{loadPage-RDk10NMP.mjs → loadPage-DesHhgxj.mjs} +2 -2
  148. package/dist/server/{lookMediaFrame-CQtkvlDn.mjs → lookMediaFrame-BBr0mkze.mjs} +106 -8
  149. package/dist/server/next.mjs +6 -6
  150. package/dist/server/{overrideResolution-VhhN94d8.mjs → overrideResolution-DHEkHcZs.mjs} +1 -1
  151. package/dist/server/page-converter.mjs +1 -1
  152. package/dist/server/{pageRenderPlan-CkFTsxkd.mjs → pageRenderPlan-0jvm0RBk.mjs} +13 -323
  153. package/dist/server/{pageRuntimeSupport-CpAtzNxD.mjs → pageRuntimeSupport-8-f1Zr9e.mjs} +1 -1
  154. package/dist/server/{pageShared-B8yLPjs0.mjs → pageShared-CuVFoV4z.mjs} +7 -243
  155. package/dist/server/{prebuild-DOu6QceG.mjs → prebuild-Bms_Y7wQ.mjs} +1 -1
  156. package/dist/server/prebuild.mjs +1 -1
  157. package/dist/server/{prefetchBlockData-CfOXFKYG.mjs → prefetchBlockData-5oC5kyHe.mjs} +2 -2
  158. package/dist/server/{registry-34rkAfaU.mjs → registry-DmqxC8th.mjs} +663 -48
  159. package/dist/server/rendering/components/pageShared.mjs +1 -1
  160. package/dist/server/rendering/helpers/loadPage.mjs +1 -1
  161. package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
  162. package/dist/server/rendering/server.mjs +3 -3
  163. package/dist/server/rendering.mjs +7 -7
  164. package/dist/server/{resolveBlockData-D7VeoWgr.mjs → resolveBlockData-EYogtwQc.mjs} +1 -1
  165. package/dist/server/server.mjs +3 -3
  166. package/dist/server/theme-bridge.mjs +1 -1
  167. package/dist/server/{validation-CLVKoJrX.mjs → validation-Bt_8IL1g.mjs} +3 -3
  168. package/dist/server/{version-HVfdvBJ0.mjs → version-DT_efohp.mjs} +1 -1
  169. package/dist/styles/index.css +66 -20
  170. package/package.json +1 -1
  171. package/dist/client/bookability-CE637yDE.mjs +0 -17
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import { c as unsafeAsMediaAssetId, d as parseUuidBrand, f as err, i as resolveManagedMediaReference, l as unsafeAsStorageBucketName, o as parseCanonicalMediaIdentifier, p as ok$1, u as unsafeAsStoragePath } from "./renderableMediaAssetAdmission-BlfqYLJW.mjs";
3
- import { $ as assetMediaSchema, $t as compareLocalScheduleDates, A as eventListTreatmentValues, Bt as formatDate$2, D as accordionIconSetValues, E as accordionIconMotionValues, Et as normalizeCurrencyCode, F as tileTreatmentValues, Gt as formatTimeRange, H as blockBookingPaymentTermsSchema, Ht as formatDateTime, I as visibleHeadingDecorationFamilyValues, J as bookingQuestionsAnswerValueSchema, Jt as resolveBookingDisplayContext, K as toBookingRequirementConsentField, M as headingDecorationColorTokenValues, N as headingDecorationOverrideValues, O as arrangementModes, P as isArrangementMode, Qt as addLocalScheduleDays, T as accordionIconColorTokenValues, Tt as allocateReductionCents, U as blockBookingConsentSchema, Ut as formatDateTimeRange, Vt as formatDateRange, Wt as formatTime$2, Xt as toScheduledBookingDateTime, an as resolveBookingBusinessTimeZone, at as videoMediaSchema, cn as parseUtcIsoDateTimeString, en as formatLocalScheduleDate, et as externalMediaSchema, ft as eventCalendarListLayoutValues, in as parseLocalScheduleTime, it as runtimeMediaSchema, j as eyebrowTreatmentValues, k as decorativeTransitionIntentValues, ln as toUtcIsoDateTimeString, lt as eventCalendarDefaultViewValues, mn as formatCurrencyAmount, n as blockSiteTermsSchema, nn as getLocalScheduleDate, nt as mediaSchema, on as resolveBookingTimeZoneId, pn as toNonNegativeCents, q as beforeBookingQuestionsPresentationSchema, qt as inferSiteDateLocale, rn as parseBookingLocalDate, sn as toBookingTimeZone, tn as getBookingLocalDateKey, tt as imageMediaSchema, un as validateBookingPaymentOptionKinds, ut as eventCalendarDisplayModeValues, wt as unsafeAsPositiveCheckoutQuantity } from "./noop-D5mFWXtN.mjs";
3
+ import { $ as assetMediaSchema, $t as compareLocalScheduleDates, A as eventListTreatmentValues, Bt as formatDate$2, D as accordionIconSetValues, E as accordionIconMotionValues, Et as normalizeCurrencyCode, F as tileTreatmentValues, Gt as formatTimeRange, H as blockBookingPaymentTermsSchema, Ht as formatDateTime, I as visibleHeadingDecorationFamilyValues, J as bookingQuestionsAnswerValueSchema, Jt as resolveBookingDisplayContext, K as toBookingRequirementConsentField, M as headingDecorationColorTokenValues, N as headingDecorationOverrideValues, O as arrangementModes, P as isArrangementMode, Qt as addLocalScheduleDays, T as accordionIconColorTokenValues, Tt as allocateReductionCents, U as blockBookingConsentSchema, Ut as formatDateTimeRange, Vt as formatDateRange, Wt as formatTime$2, Xt as toScheduledBookingDateTime, _ as eventCalendarListLayoutOptions, an as resolveBookingBusinessTimeZone, at as videoMediaSchema, cn as parseUtcIsoDateTimeString, dt as eventCalendarListLayoutCompatibleDisplayModeValues, en as formatLocalScheduleDate, et as externalMediaSchema, ft as eventCalendarListLayoutValues, in as parseLocalScheduleTime, it as runtimeMediaSchema, j as eyebrowTreatmentValues, k as decorativeTransitionIntentValues, ln as toUtcIsoDateTimeString, lt as eventCalendarDefaultViewValues, mn as formatCurrencyAmount, n as blockSiteTermsSchema, nn as getLocalScheduleDate, nt as mediaSchema, on as resolveBookingTimeZoneId, pn as toNonNegativeCents, q as beforeBookingQuestionsPresentationSchema, qt as inferSiteDateLocale, rn as parseBookingLocalDate, sn as toBookingTimeZone, tn as getBookingLocalDateKey, tt as imageMediaSchema, un as validateBookingPaymentOptionKinds, ut as eventCalendarDisplayModeValues, wt as unsafeAsPositiveCheckoutQuantity } from "./noop-D5mFWXtN.mjs";
4
4
  import { A as assertNever$2, C as addIntervalPreservingMonthAnchor, D as getBookingInstalmentPlanIntervalCount, E as getBookingInstalmentDepositRefundability, O as omitZeroAmountFutureRows, S as formatCreditProductUnits, a as buildBookingQuestionsSubmission, b as creditProductUnitNoun, d as resolveBookingQuestionsAnswerMode, j as parseAppointmentServiceId, k as splitAmountWithRemainderInFirst, l as initialBookingQuestionsAnswerMode, o as checkBookingQuestionsAnswered, p as assertNever$3, t as deriveCreditProductLabels, u as initialBookingQuestionsValues, w as clampConfiguredAmount } from "./creditProducts-KYMVIH3J.mjs";
5
5
  import { t as stableJsonStringify } from "./stable-json-D0XAEIXc.mjs";
6
6
  import { l as buildCalendarViewport$1, n as calendarLinks, r as groupItemsByDate } from "./src-xrjaKaCj.mjs";
7
7
  import { At as featuresFromHex, Ct as resolveOpaqueSurfaceHex, Et as requirePaletteColorsFromEntries, F as defineButtonStyleRecipe, G as mergeStyles, H as backgroundColorStyle, I as mapButtonRoleAppearances, K as rgbColorValue, L as mapButtonVisualAppearances, Ot as preparePaletteColourIndex, P as PUBLIC_BUTTON_ROLES, St as resolveConcreteColorHex, Tt as paletteValueKeySchema, Y as resolveSurfaceForeground, _ as contextualButtonSurfaceResetStyles, _t as surfaceInkDeclarations, a as requireResolvedSurface, b as BUTTON_CONTRAST_POLICY, bt as freezeOwnedThemeValue, c as surfaceButtonRequest, d as toAccessibleColorSurfaceIntent, dt as SURFACE_INK_CSS_VARS, ft as surfaceForegroundDeclarations, h as scrimTone, ht as surfaceForegroundValue, i as prepareThemeSurfaceRevision, it as contrastThresholdByPolicy, j as ELEVATION_OFFSET, m as minimumScrimOpacity, o as resolveSurface, ot as expandPalette, p as gradientScrimSamples, q as textColorStyle, t as parseResolvedSurface, u as surfaceTransportContext, ut as SURFACE_FOREGROUND_CSS_VARS, wt as paletteValueKey, xt as ownedThemeSnapshot } from "./accessibleSurfaces-DN8it_Cx.mjs";
8
- import { C as paletteColorsFromEntries, D as parseThemeColorToken, E as parseColorTokenParts, O as themeColorTokenSchema, S as paletteColorEntries, T as paletteModeSchema, b as isThemeColorToken, c as buttonEffectApplicationSchema, f as buttonVisualStatesSchema, g as VARIANT_ROLES, l as buttonPressOffsetSchema, s as unsafeAsOpaqueButtonColourToken, u as buttonSystemSchema, w as paletteColorsSchema, y as hexColorSchema } from "./types-DjWUR_O6.mjs";
8
+ import { C as paletteColorsFromEntries, D as parseThemeColorToken, E as parseColorTokenParts, O as themeColorTokenSchema, S as paletteColorEntries, T as paletteModeSchema, b as isThemeColorToken, c as buttonEffectApplicationSchema, f as buttonVisualStatesSchema, g as VARIANT_ROLES, l as buttonPressOffsetSchema, s as unsafeAsOpaqueButtonColourToken, u as buttonSystemSchema, v as blockColorTokenNames, w as paletteColorsSchema, y as hexColorSchema } from "./types-DjWUR_O6.mjs";
9
9
  import { S as clsx } from "./ThemedButton-DuaYtnvG.mjs";
10
10
  import { a as getSupabaseUrl, i as getSiteId, n as getCurrentResolveImageUrlContext, r as getMediaAssetIndex } from "./mediaContext-Fusweriw.mjs";
11
11
  import React from "react";
@@ -201,7 +201,7 @@ function formatBookingPriceDisplay(display, options = {}) {
201
201
  case "exact": return formatCurrencyAmount(display.amount, display.currency, options);
202
202
  case "from": return `From ${formatCurrencyAmount(display.amount, display.currency, options)}`;
203
203
  case "range": return `${formatCurrencyAmount(display.minAmount, display.currency, options)}–${formatCurrencyAmount(display.maxAmount, display.currency, options)}`;
204
- case "mixed": return display.paidToAmount > display.paidFromAmount ? `Free / ${formatCurrencyAmount(display.paidFromAmount, display.currency, options)}–${formatCurrencyAmount(display.paidToAmount, display.currency, options)}` : `Free / ${formatCurrencyAmount(display.paidFromAmount, display.currency, options)}`;
204
+ case "mixed": return display.paidToAmount > display.paidFromAmount ? `Free or ${formatCurrencyAmount(display.paidFromAmount, display.currency, options)}–${formatCurrencyAmount(display.paidToAmount, display.currency, options)}` : `Free or ${formatCurrencyAmount(display.paidFromAmount, display.currency, options)}`;
205
205
  case "unavailable": return "Pricing unavailable";
206
206
  case "external": return display.label;
207
207
  default: return assertNever$2(display);
@@ -4201,6 +4201,18 @@ const themeSchema = z.object({
4201
4201
  styleGroups: z.record(z.string(), z.array(z.string())).optional()
4202
4202
  });
4203
4203
  //#endregion
4204
+ //#region ../theme-core/src/tokens/blockColorTokens.ts
4205
+ const blockColorTokenNameSet = new Set(blockColorTokenNames);
4206
+ function isBlockColorToken(value) {
4207
+ if (typeof value !== "string") return false;
4208
+ const parts = parseColorTokenParts(value);
4209
+ return parts.kind === "token" && blockColorTokenNameSet.has(parts.token);
4210
+ }
4211
+ function parseBlockColorToken(value) {
4212
+ if (!isBlockColorToken(value)) return null;
4213
+ return value.trim();
4214
+ }
4215
+ //#endregion
4204
4216
  //#region ../theme-core/src/tokens/resolver.ts
4205
4217
  /**
4206
4218
  * Resolves theme tokens to CSS variables
@@ -4997,6 +5009,80 @@ function resolveBlockAppearancePresetDesign(preset, layoutProfile = null) {
4997
5009
  * for a card role; the style owns its paint. Arrangement Looks own structure
4998
5010
  * and never a section background. Removing an entry retires its pins to auto.
4999
5011
  */
5012
+ /** Shape knobs override the skin's ordinary photo frame. Corner choices keep its ratio. */
5013
+ const photoShapeFrames = [{
5014
+ knob: "imageShape",
5015
+ values: {
5016
+ circle: {
5017
+ kind: "fixed",
5018
+ aspectRatio: "1/1",
5019
+ borderRadius: "50%"
5020
+ },
5021
+ arch: {
5022
+ kind: "fixed",
5023
+ aspectRatio: "4/5",
5024
+ borderRadius: "9999px 9999px 0.125rem 0.125rem"
5025
+ }
5026
+ }
5027
+ }];
5028
+ const naturalPhotoFrame = {
5029
+ kind: "variable",
5030
+ because: "The photo keeps its own proportions.",
5031
+ aspectRatio: "auto"
5032
+ };
5033
+ const introPhotoFrames = {
5034
+ default: naturalPhotoFrame,
5035
+ bySkin: {
5036
+ haven: {
5037
+ kind: "fixed",
5038
+ aspectRatio: "1/1"
5039
+ },
5040
+ brook: {
5041
+ kind: "fixed",
5042
+ aspectRatio: "4/3"
5043
+ },
5044
+ orbit: {
5045
+ kind: "fixed",
5046
+ aspectRatio: "1/1",
5047
+ borderRadius: "50%"
5048
+ }
5049
+ },
5050
+ byKnob: photoShapeFrames
5051
+ };
5052
+ const mediaTextPhotoFrames = {
5053
+ default: naturalPhotoFrame,
5054
+ bySkin: {
5055
+ poster: {
5056
+ kind: "fixed",
5057
+ aspectRatio: "4/3"
5058
+ },
5059
+ poise: {
5060
+ kind: "fixed",
5061
+ aspectRatio: "4/5"
5062
+ },
5063
+ haven: {
5064
+ kind: "fixed",
5065
+ aspectRatio: "5/4"
5066
+ },
5067
+ loom: {
5068
+ kind: "fixed",
5069
+ aspectRatio: "3/2"
5070
+ },
5071
+ folio: {
5072
+ kind: "fixed",
5073
+ aspectRatio: "4/5"
5074
+ },
5075
+ brook: {
5076
+ kind: "fixed",
5077
+ aspectRatio: "4/3"
5078
+ },
5079
+ orbit: {
5080
+ kind: "fixed",
5081
+ aspectRatio: "4/3"
5082
+ }
5083
+ },
5084
+ byKnob: photoShapeFrames
5085
+ };
5000
5086
  const brandScrimOptionGroups = [{
5001
5087
  id: "image-surface-treatment",
5002
5088
  label: "Photo tint",
@@ -6021,6 +6107,11 @@ const blockAppearancePresets = [
6021
6107
  styleFallback: [id$1("image-gallery-square-tiles")]
6022
6108
  }),
6023
6109
  defineArrangementLook("media-text-circle-beside-text", "media-text", "Circle beside the text", "circle-beside", ["imagePosition"], {
6110
+ mediaFrame: { default: {
6111
+ kind: "fixed",
6112
+ aspectRatio: "1/1",
6113
+ borderRadius: "50%"
6114
+ } },
6024
6115
  thumbnail: sketch.page([sketch.middle([sketch.photo("medium", "circle")], [sketch.title(.8), sketch.text(3)])]),
6025
6116
  forcedKnobs: {
6026
6117
  imageShape: "circle",
@@ -6456,6 +6547,7 @@ const blockAppearancePresets = [
6456
6547
  styleFallback: [id$1("intro-photo-beside-text")]
6457
6548
  }),
6458
6549
  defineArrangementLook("intro-photo-beside-text", "intro", "Small photo beside the text", "media-copy", ["imagePosition", "imageShape"], {
6550
+ mediaFrame: introPhotoFrames,
6459
6551
  thumbnail: sketch.page([sketch.middle(sketch.weight(1, [sketch.photo("medium")]), sketch.weight(2, [sketch.title(.7), sketch.text(3)]))]),
6460
6552
  whenMissing: [{
6461
6553
  fact: "photo",
@@ -6463,6 +6555,7 @@ const blockAppearancePresets = [
6463
6555
  }]
6464
6556
  }),
6465
6557
  defineArrangementLook("intro-large-photo-beside-text", "intro", "Large photo beside the text", "media-copy", ["imagePosition"], {
6558
+ mediaFrame: { default: naturalPhotoFrame },
6466
6559
  thumbnail: sketch.page([sketch.row(sketch.weight(1, [sketch.photo("tall")]), sketch.weight(1, [sketch.title(.7), sketch.text(5)]))]),
6467
6560
  whenMissing: [{
6468
6561
  fact: "photo",
@@ -6470,12 +6563,20 @@ const blockAppearancePresets = [
6470
6563
  }],
6471
6564
  styleFallback: [id$1("intro-photo-beside-text")]
6472
6565
  }),
6473
- defineArrangementLook("media-text-photo-beside-text", "media-text", "Photo beside the text", "default", ["imagePosition", "imageShape"], { thumbnail: sketch.page([sketch.middle([sketch.photo("tall")], [
6474
- sketch.rule,
6475
- sketch.title(.8),
6476
- sketch.text(3)
6477
- ])]) }),
6566
+ defineArrangementLook("media-text-photo-beside-text", "media-text", "Photo beside the text", "default", ["imagePosition", "imageShape"], {
6567
+ mediaFrame: mediaTextPhotoFrames,
6568
+ thumbnail: sketch.page([sketch.middle([sketch.photo("tall")], [
6569
+ sketch.rule,
6570
+ sketch.title(.8),
6571
+ sketch.text(3)
6572
+ ])])
6573
+ }),
6478
6574
  defineArrangementLook("media-text-photo-to-edge", "media-text", "Photo to the edge", "default", ["imagePosition"], {
6575
+ mediaFrame: { default: {
6576
+ kind: "variable",
6577
+ because: "The photo fills the section height, which depends on the text and viewport.",
6578
+ aspectRatio: "auto"
6579
+ } },
6479
6580
  thumbnail: sketch.page([sketch.row(sketch.weight(1, [
6480
6581
  sketch.rule,
6481
6582
  sketch.title(.8),
@@ -21370,6 +21471,26 @@ function defineHeaderCuration(input) {
21370
21471
  const [first, ...remaining] = input;
21371
21472
  return [toEntry(first), ...remaining.map(toEntry)];
21372
21473
  }
21474
+ /** A brand-coloured bar in the style's own type: its navigation keeps sentence case rather than the catalogue's capitals. */
21475
+ const sentenceCaseBrandBar = {
21476
+ tone: "brand",
21477
+ dropdown: brandHeaderDropdown,
21478
+ background: {
21479
+ kind: "token",
21480
+ token: "primary"
21481
+ },
21482
+ nav: {
21483
+ kind: "minimal",
21484
+ hoverColorToken: "secondary"
21485
+ },
21486
+ navWeight: "semibold",
21487
+ navLinkWeight: "medium",
21488
+ navTypography: "plain",
21489
+ border: "none",
21490
+ shadow: { kind: "absent" },
21491
+ frame: { kind: "none" },
21492
+ cta: { treatment: "inverted" }
21493
+ };
21373
21494
  const headerCurationBySiteStyle = {
21374
21495
  "site-style:loom": defineHeaderCuration([{
21375
21496
  layoutId: "classic",
@@ -21421,6 +21542,7 @@ const headerCurationBySiteStyle = {
21421
21542
  "site-style:fulcrum": defineHeaderCuration([{
21422
21543
  layoutId: "classic",
21423
21544
  styleIds: [
21545
+ "brand-bar",
21424
21546
  "fine-line",
21425
21547
  "minimal",
21426
21548
  "serif-line",
@@ -21488,7 +21610,11 @@ const headerCurationBySiteStyle = {
21488
21610
  ]),
21489
21611
  "site-style:measure": defineHeaderCuration([{
21490
21612
  layoutId: "classic",
21491
- styleIds: ["fine-line", "minimal"]
21613
+ styleIds: [
21614
+ "brand-bar",
21615
+ "fine-line",
21616
+ "minimal"
21617
+ ]
21492
21618
  }])
21493
21619
  };
21494
21620
  /** Optional authored overrides remain absent when the catalogue did not supply them. */
@@ -26369,6 +26495,7 @@ const curatedSiteStyles = [
26369
26495
  },
26370
26496
  testimonialQuote: serifDisplayQuote
26371
26497
  },
26498
+ headerStyleRecipes: { "brand-bar": sentenceCaseBrandBar },
26372
26499
  ...fulcrumFooter,
26373
26500
  buttonStyleChoices: [
26374
26501
  buttonChoice("fulcrum"),
@@ -26495,6 +26622,7 @@ const curatedSiteStyles = [
26495
26622
  accordions: editorialDividedAccordionSystem,
26496
26623
  testimonialQuote: serifDisplayQuote
26497
26624
  },
26625
+ headerStyleRecipes: { "brand-bar": sentenceCaseBrandBar },
26498
26626
  ...measureFooter,
26499
26627
  buttonStyleChoices: [
26500
26628
  buttonChoice("flat-ink", void 0, { corners: "square" }),
@@ -27497,8 +27625,13 @@ function sectionRhythmSurfaces(style, flow) {
27497
27625
  }
27498
27626
  //#endregion
27499
27627
  //#region ../theme-core/src/site-styles/lookMediaFrame.ts
27500
- function resolveLookMediaFrame(frames, skin) {
27501
- return (skin ? frames?.bySkin?.[skin] : void 0) ?? frames?.default;
27628
+ function resolveLookMediaFrame(frames, skin, knobs = {}) {
27629
+ if (!frames) return void 0;
27630
+ const base = (skin ? frames.bySkin?.[skin] : void 0) ?? frames.default;
27631
+ return (frames.byKnob ?? []).reduce((frame, rule) => {
27632
+ const value = knobs[rule.knob];
27633
+ return (typeof value === "string" ? rule.values[value] : void 0) ?? frame;
27634
+ }, base);
27502
27635
  }
27503
27636
  function frameVars(frame) {
27504
27637
  return [
@@ -27516,7 +27649,11 @@ function generateLookMediaFrameCss(themeId) {
27516
27649
  if (!frames) return [];
27517
27650
  const scope = `:where([data-theme-scope="${themeId}"])`;
27518
27651
  const selector = `[data-look="${look.id}"]`;
27519
- return [`${scope} ${selector} { ${frameVars(frames.default)} }`, ...Object.entries(frames.bySkin ?? {}).map(([skin, frame]) => `${scope} :is([data-skin="${skin}"], [data-skin="${skin}"] *)${selector} { ${frameVars(frame)} }`)];
27652
+ return [
27653
+ `${scope} ${selector} { ${frameVars(frames.default)} }`,
27654
+ ...Object.entries(frames.bySkin ?? {}).map(([skin, frame]) => `${scope} :is([data-skin="${skin}"], [data-skin="${skin}"] *)${selector} { ${frameVars(frame)} }`),
27655
+ ...(frames.byKnob ?? []).flatMap((rule) => Object.entries(rule.values).map(([value, frame]) => `${scope} ${selector}[data-knob-${rule.knob.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`)}="${value}"] { ${frameVars(frame)} }`))
27656
+ ];
27520
27657
  }).join("\n");
27521
27658
  }
27522
27659
  //#endregion
@@ -27702,7 +27839,7 @@ function itemRole(index, count, roles, featured = false) {
27702
27839
  }
27703
27840
  //#endregion
27704
27841
  //#region ../blocks/src/system/runtime/lookSurfaces.ts
27705
- const isPlainObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
27842
+ const isPlainObject$1 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
27706
27843
  function resolvedItemSurfaceProps(surface, slot, style = void 0) {
27707
27844
  const declarations = opaqueSurfaceDeclarations(surface, true);
27708
27845
  const styles = Object.fromEntries(declarations.map((declaration) => {
@@ -27713,7 +27850,7 @@ function resolvedItemSurfaceProps(surface, slot, style = void 0) {
27713
27850
  return {
27714
27851
  "data-surface": paint?.kind === "solid" ? paint.token : surface.kind === "inherit" ? "section" : slot,
27715
27852
  style: {
27716
- ...isPlainObject(style) ? style : {},
27853
+ ...isPlainObject$1(style) ? style : {},
27717
27854
  ...styles,
27718
27855
  ...paint?.kind === "solid" ? { background: resolvedSurfaceBackground(surface, paint.token) } : {}
27719
27856
  }
@@ -27851,6 +27988,575 @@ function defineProgressiveBlockRuntime(runtime) {
27851
27988
  function defineClientOwnedBlockRuntime(runtime) {
27852
27989
  return runtime;
27853
27990
  }
27991
+ //#endregion
27992
+ //#region ../blocks/src/system/blocks/events/shared/runGrouping.ts
27993
+ function isWholeSeriesPublicEvent(event) {
27994
+ return event.bookingScope === "whole_series";
27995
+ }
27996
+ /**
27997
+ * Group events into one entry per whole-series run.
27998
+ *
27999
+ * Single-occurrence events are ignored. Run order follows first appearance, so
28000
+ * a caller's sort survives the grouping, and an occurrence that arrives twice
28001
+ * is kept once.
28002
+ */
28003
+ function groupPublicEventsByRun(events) {
28004
+ const occurrencesBySeriesId = /* @__PURE__ */ new Map();
28005
+ const order = [];
28006
+ const seenOccurrenceIds = /* @__PURE__ */ new Set();
28007
+ for (const event of events) {
28008
+ if (!isWholeSeriesPublicEvent(event)) continue;
28009
+ if (seenOccurrenceIds.has(event.occurrenceId)) continue;
28010
+ seenOccurrenceIds.add(event.occurrenceId);
28011
+ const seriesId = event.run.eventSeriesId;
28012
+ const existing = occurrencesBySeriesId.get(seriesId);
28013
+ if (existing) {
28014
+ existing.push(event);
28015
+ continue;
28016
+ }
28017
+ occurrencesBySeriesId.set(seriesId, [event]);
28018
+ order.push(seriesId);
28019
+ }
28020
+ return order.map((eventSeriesId) => {
28021
+ const occurrences = occurrencesBySeriesId.get(eventSeriesId) ?? [];
28022
+ const representative = occurrences[0];
28023
+ if (!representative) throw new Error(`Run ${eventSeriesId} grouped without any occurrence`);
28024
+ return {
28025
+ eventSeriesId,
28026
+ run: representative.run,
28027
+ occurrences,
28028
+ representative
28029
+ };
28030
+ });
28031
+ }
28032
+ //#endregion
28033
+ //#region ../blocks/src/system/runtime/nodes/events/domain/capacity.ts
28034
+ /**
28035
+ * Compute remaining spots for an event from `availableSpots` with a fallback
28036
+ * to `capacity - registeredCount`. Returns `{ available: null, isFull: false }`
28037
+ * for uncapped events so call sites can render no capacity indicator at all.
28038
+ *
28039
+ * The single source of truth for capacity math across event cards, agenda
28040
+ * rows, and timetable cells — keep wording variations in the call sites.
28041
+ */
28042
+ function getEventAvailability(event) {
28043
+ if (event.capacity == null) return {
28044
+ available: null,
28045
+ isFull: false
28046
+ };
28047
+ if (event.registeredCount === null) return {
28048
+ available: 0,
28049
+ isFull: true
28050
+ };
28051
+ const available = event.availableSpots ?? event.capacity - event.registeredCount;
28052
+ if (available <= 0) return {
28053
+ available: 0,
28054
+ isFull: true
28055
+ };
28056
+ return {
28057
+ available,
28058
+ isFull: false
28059
+ };
28060
+ }
28061
+ /**
28062
+ * Pick the capacity row a booking decision should read: the selected
28063
+ * attendance mode's availability when the visitor has chosen one and the
28064
+ * event publishes it, otherwise the event-level aggregate.
28065
+ *
28066
+ * The mode row is used wholesale. A mode with `capacity: null` on a capped
28067
+ * event is uncapped *by design*: the registration write path applies the
28068
+ * same rule via `getEffectiveOccurrenceCapacityForAttendanceMode`, so falling
28069
+ * back to the event's `availableSpots` here would block bookings the server
28070
+ * accepts. (Waitlist claims are still occurrence-scoped; see issue 1377.)
28071
+ */
28072
+ function selectEventCapacitySource(event, attendanceMode) {
28073
+ if (!attendanceMode) return event;
28074
+ return (event.attendanceModes ?? []).find((mode) => mode.mode === attendanceMode) ?? event;
28075
+ }
28076
+ /**
28077
+ * Whether the visitor's next step is the waitlist: the source is full *and*
28078
+ * a waitlist is open. The one place this is decided — cards, rows, the
28079
+ * wizard's steps and its action bar all route through here so they agree,
28080
+ * including for producers that omit `availableSpots` and rely on the
28081
+ * `capacity - registeredCount` fallback.
28082
+ */
28083
+ function canJoinEventWaitlist(event, options) {
28084
+ const source = selectEventCapacitySource(event, options?.attendanceMode);
28085
+ return getEventAvailability(source).isFull && source.waitlistEnabled === true;
28086
+ }
28087
+ /**
28088
+ * Remaining places at or below which an event reads as scarce and the exact
28089
+ * count is worth showing. Above it, no number is shown at all: "147 places
28090
+ * left" is not something a visitor acts on, and it is the figure most likely
28091
+ * to be stale on a cached page.
28092
+ *
28093
+ * max( min(3, ceil(capacity * 0.25)), ceil(capacity * 0.05) )
28094
+ *
28095
+ * The 25% arm stops small groups shouting early (3 of 4 is not urgency); the
28096
+ * 5% floor stops large events staying silent until three remain.
28097
+ * capacity 4 -> 1, 12 -> 3, 40 -> 3, 100 -> 5, 200 -> 10.
28098
+ */
28099
+ function lowCapacityThreshold(capacity) {
28100
+ return Math.max(Math.min(3, Math.ceil(capacity * .25)), Math.ceil(capacity * .05));
28101
+ }
28102
+ function getRemainingPlaces(source) {
28103
+ const { available, isFull } = getEventAvailability(source);
28104
+ if (available === null) return { kind: "unlimited" };
28105
+ if (isFull) return {
28106
+ kind: "full",
28107
+ waitlist: canJoinEventWaitlist(source)
28108
+ };
28109
+ if (source.capacity !== null && available <= lowCapacityThreshold(source.capacity)) return {
28110
+ kind: "low",
28111
+ remaining: available
28112
+ };
28113
+ return { kind: "open" };
28114
+ }
28115
+ /**
28116
+ * The one place a remaining-places count becomes text. Returns `null` when
28117
+ * nothing should be shown: uncapped events, and capped events above the
28118
+ * scarcity threshold, unless the surface asks for every known count.
28119
+ * Surfaces that need their own full-state wording pass
28120
+ * it in rather than re-deriving the count.
28121
+ */
28122
+ function formatRemainingPlaces(source, wording = {}) {
28123
+ const remaining = getRemainingPlaces(source);
28124
+ switch (remaining.kind) {
28125
+ case "unlimited": return null;
28126
+ case "open": {
28127
+ const available = getEventAvailability(source).available;
28128
+ return wording.count === "always" && available !== null ? formatPlacesLeft(available, wording.compact === true) : null;
28129
+ }
28130
+ case "low": return formatPlacesLeft(remaining.remaining, wording.compact === true);
28131
+ case "full": return remaining.waitlist ? wording.waitlist ?? "Waitlist" : wording.full ?? "Full";
28132
+ }
28133
+ }
28134
+ function formatPlacesLeft(count, compact) {
28135
+ if (compact) return `${count} left`;
28136
+ return count === 1 ? "1 place left" : `${count} places left`;
28137
+ }
28138
+ function formatTicketTypeRemaining(remainingCapacity) {
28139
+ if (remainingCapacity === null || remainingCapacity > 3) return null;
28140
+ if (remainingCapacity <= 0) return "None left for this ticket type";
28141
+ return `${formatPlacesLeft(remainingCapacity, false)} for this ticket type`;
28142
+ }
28143
+ /** Total capacity as copy ("12 places"), for detail surfaces that state the size of an event. */
28144
+ function formatTotalCapacity(capacity) {
28145
+ if (capacity === null) return null;
28146
+ return capacity === 1 ? "1 place" : `${capacity} places`;
28147
+ }
28148
+ function getEventAvailabilityStatus(event) {
28149
+ const source = selectMostOpenCapacitySource(event);
28150
+ const remaining = getRemainingPlaces(source);
28151
+ const label = formatEventRemainingPlaces(event, { compact: true });
28152
+ switch (remaining.kind) {
28153
+ case "unlimited": return {
28154
+ status: "available",
28155
+ available: null,
28156
+ isFull: false,
28157
+ label
28158
+ };
28159
+ case "open": return {
28160
+ status: "available",
28161
+ available: getEventAvailability(source).available,
28162
+ isFull: false,
28163
+ label
28164
+ };
28165
+ case "low": return {
28166
+ status: "filling",
28167
+ available: remaining.remaining,
28168
+ isFull: false,
28169
+ label
28170
+ };
28171
+ case "full": return {
28172
+ status: "waitlist",
28173
+ available: 0,
28174
+ isFull: true,
28175
+ label
28176
+ };
28177
+ }
28178
+ }
28179
+ /**
28180
+ * Which capacity figure wins when they disagree.
28181
+ *
28182
+ * For a hybrid event that publishes both attendance-mode rows, **the mode
28183
+ * rows are authoritative and the event-level aggregate is only a summary**.
28184
+ * The registration write path admits or refuses per mode
28185
+ * (`getEffectiveOccurrenceCapacityForAttendanceMode` on the server), so the
28186
+ * aggregate can read full while a mode still has room, and can read open
28187
+ * while the mode the visitor wants is full. Believing the aggregate on a
28188
+ * card is how a "places available" event turns into a dead end at step two.
28189
+ *
28190
+ * Everything else — single-mode events, events that publish no rows, and the
28191
+ * aggregate-only helpers {@link getEventAvailability} /
28192
+ * {@link getRemainingPlaces} that existing callers rely on — keeps reading
28193
+ * the aggregate, unchanged.
28194
+ */
28195
+ function findHybridModeRows(event) {
28196
+ if (event.deliveryMode !== "hybrid") return null;
28197
+ const rows = event.attendanceModes ?? [];
28198
+ const inPerson = rows.find((row) => row.mode === "in_person");
28199
+ const online = rows.find((row) => row.mode === "online");
28200
+ return inPerson && online ? {
28201
+ inPerson,
28202
+ online
28203
+ } : null;
28204
+ }
28205
+ /** Openness rank; higher means more room. A full mode with a waitlist beats one without. */
28206
+ function remainingPlacesRank(remaining) {
28207
+ switch (remaining.kind) {
28208
+ case "unlimited": return 4;
28209
+ case "open": return 3;
28210
+ case "low": return 2;
28211
+ case "full": return remaining.waitlist ? 1 : 0;
28212
+ }
28213
+ }
28214
+ function isMoreOpen(candidate, than) {
28215
+ const rank = remainingPlacesRank(candidate);
28216
+ const otherRank = remainingPlacesRank(than);
28217
+ if (rank !== otherRank) return rank > otherRank;
28218
+ return candidate.kind === "low" && than.kind === "low" ? candidate.remaining > than.remaining : false;
28219
+ }
28220
+ /** True when `candidate` has less room left than `than`. */
28221
+ function isScarcer(candidate, than) {
28222
+ return isMoreOpen(than, candidate);
28223
+ }
28224
+ /**
28225
+ * The capacity row a whole-event decision should read: the most open
28226
+ * attendance mode of a hybrid event, otherwise the aggregate. A hybrid event
28227
+ * is sold out only when both of its modes are, and its waitlist is reachable
28228
+ * when either full mode has one open.
28229
+ */
28230
+ function selectMostOpenCapacitySource(event) {
28231
+ const rows = findHybridModeRows(event);
28232
+ if (!rows) return event;
28233
+ return isMoreOpen(getRemainingPlaces(rows.online), getRemainingPlaces(rows.inPerson)) ? rows.online : rows.inPerson;
28234
+ }
28235
+ /** True when no attendance mode has room. Hybrid-aware; use this for sold-out decisions. */
28236
+ function isEventFull(event) {
28237
+ return getEventAvailability(selectMostOpenCapacitySource(event)).isFull;
28238
+ }
28239
+ /**
28240
+ * True when the event is full on every mode and at least one of those full
28241
+ * modes has a waitlist open. An event with a mode still bookable is not a
28242
+ * waitlist prospect: it should send the visitor to that mode instead.
28243
+ */
28244
+ function canJoinEventWaitlistOnAnyMode(event) {
28245
+ return canJoinEventWaitlist(selectMostOpenCapacitySource(event));
28246
+ }
28247
+ const ATTENDANCE_MODE_LABEL = {
28248
+ in_person: "In person",
28249
+ online: "Online"
28250
+ };
28251
+ /** Wording for a mode with room to spare, where the count is deliberately withheld. */
28252
+ const PLACES_AVAILABLE = "Places available";
28253
+ /**
28254
+ * The browse-surface label for an event's remaining places. Single-mode
28255
+ * events get exactly the aggregate label {@link formatRemainingPlaces}
28256
+ * produces, and so does a hybrid event whose two modes tell the same story.
28257
+ * When the modes differ, both sides are named: "available" on a card is a
28258
+ * promise the registration wizard would otherwise have to break.
28259
+ *
28260
+ * Hybrid examples, in person full with 3 online places left:
28261
+ * default -> "Online: 3 places left · In person: Full"
28262
+ * { full: 'Sold out' } -> "Online: 3 places left · In person: Sold out"
28263
+ * { compact: true } -> "Online: 3 left"
28264
+ */
28265
+ function formatEventRemainingPlaces(event, wording = {}) {
28266
+ const rows = findHybridModeRows(event);
28267
+ if (!rows) return formatRemainingPlaces(event, wording);
28268
+ const inPerson = formatRemainingPlaces(rows.inPerson, wording);
28269
+ const online = formatRemainingPlaces(rows.online, wording);
28270
+ if (inPerson === online) return inPerson;
28271
+ if (wording.compact === true) return formatCompactHybridPlaces(rows, wording);
28272
+ return formatBothHybridSides(rows, {
28273
+ inPerson,
28274
+ online
28275
+ });
28276
+ }
28277
+ /**
28278
+ * Both sides, the one with room first: that is the half a visitor can act on,
28279
+ * and it should not arrive after a full stop's worth of bad news.
28280
+ */
28281
+ function formatBothHybridSides(rows, labels) {
28282
+ return (isMoreOpen(getRemainingPlaces(rows.online), getRemainingPlaces(rows.inPerson)) ? [["online", labels.online], ["in_person", labels.inPerson]] : [["in_person", labels.inPerson], ["online", labels.online]]).map(([mode, label]) => namedModePlaces(mode, label)).join(" · ");
28283
+ }
28284
+ function namedModePlaces(mode, label) {
28285
+ return `${ATTENDANCE_MODE_LABEL[mode]}: ${label ?? PLACES_AVAILABLE}`;
28286
+ }
28287
+ /**
28288
+ * Pills and timetable cells have room for one short phrase, so they name the
28289
+ * single mode that carries news rather than listing both: the scarce side
28290
+ * when there is a count to show, and otherwise the side that has closed —
28291
+ * "In person: Full", never "Online only", which reads as a statement about
28292
+ * how the event is delivered rather than about its remaining places.
28293
+ */
28294
+ function formatCompactHybridPlaces(rows, wording) {
28295
+ const inPerson = getRemainingPlaces(rows.inPerson);
28296
+ const online = getRemainingPlaces(rows.online);
28297
+ if (inPerson.kind === "full" && online.kind === "full") return formatRemainingPlaces(inPerson.waitlist ? rows.inPerson : rows.online, wording);
28298
+ if (inPerson.kind === "full" || online.kind === "full") {
28299
+ const fullSide = inPerson.kind === "full" ? "in_person" : "online";
28300
+ const openSide = inPerson.kind === "full" ? "online" : "in_person";
28301
+ const openLabel = formatRemainingPlaces(rowFor(rows, openSide), wording);
28302
+ return openLabel !== null ? namedModePlaces(openSide, openLabel) : namedModePlaces(fullSide, formatRemainingPlaces(rowFor(rows, fullSide), wording));
28303
+ }
28304
+ const scarcerSide = isScarcer(online, inPerson) ? "online" : "in_person";
28305
+ return namedModePlaces(scarcerSide, formatRemainingPlaces(rowFor(rows, scarcerSide), wording));
28306
+ }
28307
+ function rowFor(rows, mode) {
28308
+ return mode === "online" ? rows.online : rows.inPerson;
28309
+ }
28310
+ //#endregion
28311
+ //#region ../blocks/src/system/runtime/nodes/events/domain/bookability.ts
28312
+ /**
28313
+ * Whether a public event has a registration path a visitor can take.
28314
+ *
28315
+ * Lifecycle admission comes from the public booking-availability contract;
28316
+ * capacity comes from the shared event-domain helpers so uncapped, fallback,
28317
+ * and hybrid attendance-mode cases agree with the registration runtime.
28318
+ */
28319
+ function isBookableEvent(event) {
28320
+ if (!event.requiresRegistration) return false;
28321
+ if (event.bookingAvailability.kind !== "open") return false;
28322
+ return !isEventFull(event) || canJoinEventWaitlistOnAnyMode(event);
28323
+ }
28324
+ //#endregion
28325
+ //#region ../blocks/src/system/blocks/events/shared/pageSelection.ts
28326
+ /**
28327
+ * What a system-managed Event URL actually selected.
28328
+ *
28329
+ * The resolver used to assume that one returned `PublicEvent` meant one
28330
+ * occurrence. A whole-series Event breaks that assumption in two directions: a
28331
+ * parent Event path selects nothing concrete until a run is chosen, and a run
28332
+ * path selects a run whose identity spans every one of its sessions. This
28333
+ * module parses those cases once, so the renderer switches over a closed set of
28334
+ * page states instead of probing booking scopes at render time.
28335
+ *
28336
+ * Everything here is pure. Loading events and resolving run slugs is the
28337
+ * resolver's job; deciding what the page is and which runs the chooser
28338
+ * advertises happens here. When a run is open to join, and where it sits in its
28339
+ * own life, come from `@riverbankcms/core`: the same authority the
28340
+ * public read projection and the write-side run-facts loader use, so a run
28341
+ * cannot report itself open on the storefront and closed at the point of
28342
+ * booking.
28343
+ */
28344
+ function planWholeSeriesParentBooking(eligibleRuns) {
28345
+ const [first, second, ...rest] = eligibleRuns;
28346
+ if (!second) return {
28347
+ kind: "single",
28348
+ run: first
28349
+ };
28350
+ return eligibleRuns.every((group) => group.representative.allowsMultipleBooking) ? {
28351
+ kind: "bookTogether",
28352
+ runs: [
28353
+ first,
28354
+ second,
28355
+ ...rest
28356
+ ]
28357
+ } : {
28358
+ kind: "choice",
28359
+ runs: eligibleRuns
28360
+ };
28361
+ }
28362
+ function isOrdinaryPublicEvent(event) {
28363
+ return event.bookingScope === "single_occurrence";
28364
+ }
28365
+ /**
28366
+ * What a series' own page shows when its URL names no date.
28367
+ *
28368
+ * Two or more dates a visitor can book make a choice: the page lists every
28369
+ * date whose booking is open and lets the visitor pick, so a full date still
28370
+ * shows as full rather than vanishing. One bookable date isn't a choice, so the
28371
+ * page books that date. With none, the first date speaks for the page and shows
28372
+ * its own full or closed state.
28373
+ *
28374
+ * The caller passes every date it read for the series, not the cards a listing
28375
+ * happened to show, so the one-date shortcut is decided on the complete set.
28376
+ * "Has places" isn't enough on its own: only a date whose booking is open
28377
+ * counts, and a drop-in date never does.
28378
+ */
28379
+ function planOrdinarySeriesSelection(events) {
28380
+ const ordinary = events.filter(isOrdinaryPublicEvent);
28381
+ const firstSeriesId = ordinary[0]?.seriesId;
28382
+ if (!firstSeriesId || ordinary.some((event) => event.seriesId !== firstSeriesId)) return null;
28383
+ const [first, second] = ordinary.filter(isBookableEvent);
28384
+ if (first && second) {
28385
+ const [a, b, ...rest] = [...ordinary].filter(isOpenForBooking).sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt));
28386
+ if (a && b) return {
28387
+ kind: "dateChoice",
28388
+ dates: [
28389
+ a,
28390
+ b,
28391
+ ...rest
28392
+ ]
28393
+ };
28394
+ }
28395
+ const event = first ?? ordinary[0];
28396
+ return event ? {
28397
+ kind: "occurrence",
28398
+ event
28399
+ } : null;
28400
+ }
28401
+ function isOpenForBooking(event) {
28402
+ return event.requiresRegistration && event.bookingAvailability.kind === "open";
28403
+ }
28404
+ /**
28405
+ * Whether a parent Event page advertises this run.
28406
+ *
28407
+ * Visibility admission belongs to the scoped public read. Active, still-open
28408
+ * admitted runs are advertised, and a run that has started,
28409
+ * finished or been cancelled is informational wherever it appears.
28410
+ *
28411
+ * Capacity is deliberately not consulted (decision A24/A30): a full date is
28412
+ * still one of the dates on offer, and its own page shows the full or waitlist
28413
+ * state that the registration engine decides. Hiding it here would leave a
28414
+ * visitor unable to see that the date exists at all.
28415
+ */
28416
+ function resolveWholeSeriesChooserEligibility(group, now) {
28417
+ const status = group.representative.status;
28418
+ if (status !== void 0 && status !== "active") return {
28419
+ kind: "excluded",
28420
+ reason: "series-not-active"
28421
+ };
28422
+ const phase = resolveWholeSeriesBookingPhase(group.run, now);
28423
+ return phase.kind === "open" ? { kind: "eligible" } : {
28424
+ kind: "excluded",
28425
+ reason: phase.reason
28426
+ };
28427
+ }
28428
+ /**
28429
+ * Runs in the order a visitor reads them: soonest first session first.
28430
+ *
28431
+ * A run with no session left to attend has no place in the sequence, so it
28432
+ * sorts last rather than being given an arbitrary date.
28433
+ */
28434
+ function orderRunsBySchedule(groups) {
28435
+ return [...groups].sort((left, right) => {
28436
+ const leftStart = firstLiveRunSessionStartMs(left.run.sessions);
28437
+ const rightStart = firstLiveRunSessionStartMs(right.run.sessions);
28438
+ if (leftStart === null) return rightStart === null ? 0 : 1;
28439
+ if (rightStart === null) return -1;
28440
+ return leftStart - rightStart;
28441
+ });
28442
+ }
28443
+ function asNonEmpty(groups) {
28444
+ const [first, ...rest] = groups;
28445
+ return first ? [first, ...rest] : null;
28446
+ }
28447
+ /**
28448
+ * What a parent Event path selects.
28449
+ *
28450
+ * The scoped read admits public and unlisted runs for the offering's own page.
28451
+ * The chooser lists the ones still open; when none is, the most recent
28452
+ * admitted run supplies the page's name and copy. Runs from another offering
28453
+ * cannot speak for this page.
28454
+ */
28455
+ function planWholeSeriesParentSelection(input) {
28456
+ const offeringRuns = orderRunsBySchedule(groupPublicEventsByRun(input.events).filter((group) => group.run.eventOfferingId === input.offeringId));
28457
+ const eligibleRuns = asNonEmpty(offeringRuns.filter((group) => resolveWholeSeriesChooserEligibility(group, input.now).kind === "eligible"));
28458
+ if (eligibleRuns) return {
28459
+ kind: "wholeSeriesParent",
28460
+ admittedRuns: offeringRuns,
28461
+ offeringId: input.offeringId,
28462
+ eligibleRuns
28463
+ };
28464
+ const informationalRun = offeringRuns.at(-1);
28465
+ return informationalRun ? {
28466
+ kind: "wholeSeriesParentUnavailable",
28467
+ admittedRuns: offeringRuns,
28468
+ offeringId: input.offeringId,
28469
+ informationalRun,
28470
+ bookingClosedDetail: resolveParentBookingClosedDetail(offeringRuns, input.now)
28471
+ } : null;
28472
+ }
28473
+ /**
28474
+ * What a course page says when none of its runs is bookable.
28475
+ *
28476
+ * A run whose page is up without bookings carries its own reason, so the course
28477
+ * speaks for the runs it has: if any of them was live and has been taken
28478
+ * offline the course is closed for now, and otherwise it is waiting to open. A
28479
+ * course whose runs are simply cancelled, under way or finished carries no
28480
+ * reason at all, and the page keeps the words it already has for that.
28481
+ *
28482
+ * Only a run with a session still to come counts. A run that was paused a year
28483
+ * ago and whose dates have all passed says nothing about the course now, and
28484
+ * letting it speak would tell a visitor that a newly announced run is closed.
28485
+ */
28486
+ function resolveParentBookingClosedDetail(runs, now) {
28487
+ const details = runs.flatMap((group) => {
28488
+ const detail = group.representative.bookingClosedDetail;
28489
+ return detail && hasSessionAhead(group, now) ? [detail] : [];
28490
+ });
28491
+ if (details.length === 0) return null;
28492
+ return details.some((detail) => detail.kind === "paused") ? { kind: "paused" } : { kind: "opensSoon" };
28493
+ }
28494
+ /** Whether the run still has a session a visitor could attend. */
28495
+ function hasSessionAhead(group, now) {
28496
+ return orderedLiveRunSessions(group.run.sessions).some((session) => Date.parse(session.startsAt) > now.getTime());
28497
+ }
28498
+ /** What a targeted run path selects, when the named run projected any data. */
28499
+ function planWholeSeriesRunSelection(input) {
28500
+ const group = groupPublicEventsByRun(input.events).find((candidate) => candidate.eventSeriesId === input.eventSeriesId);
28501
+ if (!group) return null;
28502
+ return {
28503
+ kind: "wholeSeriesRun",
28504
+ offeringId: group.run.eventOfferingId,
28505
+ run: group
28506
+ };
28507
+ }
28508
+ /**
28509
+ * The Event record that speaks for a selection.
28510
+ *
28511
+ * Page metadata, the destination mode and the shared presentation all need one
28512
+ * record; every variant has one, so callers never re-derive it.
28513
+ */
28514
+ function selectionRepresentativeEvent(selection) {
28515
+ switch (selection.kind) {
28516
+ case "occurrence": return selection.event;
28517
+ case "dateChoice": return selection.dates[0];
28518
+ case "wholeSeriesParent": return selection.eligibleRuns[0].representative;
28519
+ case "wholeSeriesParentUnavailable": return selection.informationalRun.representative;
28520
+ case "wholeSeriesRun": return selection.run.representative;
28521
+ }
28522
+ }
28523
+ /**
28524
+ * Why this page is not taking bookings, when its own state says so.
28525
+ *
28526
+ * A parent course page answers for its runs; everything else answers for the
28527
+ * record the page is about. `null` leaves the booking column exactly as it was.
28528
+ */
28529
+ function resolveSelectionBookingClosedDetail(selection) {
28530
+ switch (selection.kind) {
28531
+ case "occurrence": return selection.event.bookingClosedDetail ?? null;
28532
+ case "wholeSeriesRun": return selection.run.representative.bookingClosedDetail ?? null;
28533
+ case "dateChoice":
28534
+ case "wholeSeriesParent": return null;
28535
+ case "wholeSeriesParentUnavailable": return selection.bookingClosedDetail;
28536
+ }
28537
+ }
28538
+ function planDropInPanel(selection) {
28539
+ const detail = resolveSelectionBookingClosedDetail(selection);
28540
+ if (detail === null) return { kind: "comeAlong" };
28541
+ switch (detail.kind) {
28542
+ case "opensSoon":
28543
+ case "paused": return { kind: "notRunning" };
28544
+ }
28545
+ }
28546
+ function getPublicEventCanonicalPath(event) {
28547
+ if (event.path) return event.path;
28548
+ return event.destination.kind === "native" ? event.destination.path : null;
28549
+ }
28550
+ function eventOccurrenceContext(event) {
28551
+ return {
28552
+ id: event.occurrenceId,
28553
+ seriesId: event.seriesId,
28554
+ startsAt: event.startsAt,
28555
+ endsAt: event.endsAt,
28556
+ timeZone: event.timeZone,
28557
+ ...event.occurrenceTitle ? { overrides: { title: event.occurrenceTitle } } : {}
28558
+ };
28559
+ }
27854
28560
  const unsupportedEventRegistrationPageSurfaceSubjectSchema = z.object({
27855
28561
  kind: z.literal("unsupported"),
27856
28562
  reason: z.enum([
@@ -27957,6 +28663,14 @@ function resolveEventRegistrationScopedEvents(events, context) {
27957
28663
  case "unscoped": return [...events];
27958
28664
  }
27959
28665
  }
28666
+ /** Keep dated detail/recovery targets, but only invite bookings for future choices. */
28667
+ function resolveEventRegistrationChoices(events, context, now) {
28668
+ const scoped = resolveEventRegistrationScopedEvents(events, context);
28669
+ const runs = groupPublicEventsByRun(scoped);
28670
+ if (context.occurrenceContext || context.subject?.kind === "eventSeries" && context.subject.bookingScope === "whole_series" || runs.length === 1 && scoped.every((event) => event.bookingScope === "whole_series")) return scoped;
28671
+ const eligibleRunIds = new Set(runs.filter((group) => resolveWholeSeriesChooserEligibility(group, now).kind === "eligible").map((group) => group.eventSeriesId));
28672
+ return scoped.filter((event) => event.bookingScope === "whole_series" ? eligibleRunIds.has(event.seriesId) : Date.parse(event.startsAt) > now.getTime());
28673
+ }
27960
28674
  //#endregion
27961
28675
  //#region ../blocks/src/contracts/islands.ts
27962
28676
  function isObjectRecord(value) {
@@ -29521,325 +30235,6 @@ function buildBookingFormInteractiveIslandProps(props) {
29521
30235
  });
29522
30236
  }
29523
30237
  //#endregion
29524
- //#region ../blocks/src/system/blocks/events/shared/runGrouping.ts
29525
- function isWholeSeriesPublicEvent(event) {
29526
- return event.bookingScope === "whole_series";
29527
- }
29528
- /**
29529
- * Group events into one entry per whole-series run.
29530
- *
29531
- * Single-occurrence events are ignored. Run order follows first appearance, so
29532
- * a caller's sort survives the grouping, and an occurrence that arrives twice
29533
- * is kept once.
29534
- */
29535
- function groupPublicEventsByRun(events) {
29536
- const occurrencesBySeriesId = /* @__PURE__ */ new Map();
29537
- const order = [];
29538
- const seenOccurrenceIds = /* @__PURE__ */ new Set();
29539
- for (const event of events) {
29540
- if (!isWholeSeriesPublicEvent(event)) continue;
29541
- if (seenOccurrenceIds.has(event.occurrenceId)) continue;
29542
- seenOccurrenceIds.add(event.occurrenceId);
29543
- const seriesId = event.run.eventSeriesId;
29544
- const existing = occurrencesBySeriesId.get(seriesId);
29545
- if (existing) {
29546
- existing.push(event);
29547
- continue;
29548
- }
29549
- occurrencesBySeriesId.set(seriesId, [event]);
29550
- order.push(seriesId);
29551
- }
29552
- return order.map((eventSeriesId) => {
29553
- const occurrences = occurrencesBySeriesId.get(eventSeriesId) ?? [];
29554
- const representative = occurrences[0];
29555
- if (!representative) throw new Error(`Run ${eventSeriesId} grouped without any occurrence`);
29556
- return {
29557
- eventSeriesId,
29558
- run: representative.run,
29559
- occurrences,
29560
- representative
29561
- };
29562
- });
29563
- }
29564
- //#endregion
29565
- //#region ../blocks/src/system/runtime/nodes/events/domain/capacity.ts
29566
- /**
29567
- * Compute remaining spots for an event from `availableSpots` with a fallback
29568
- * to `capacity - registeredCount`. Returns `{ available: null, isFull: false }`
29569
- * for uncapped events so call sites can render no capacity indicator at all.
29570
- *
29571
- * The single source of truth for capacity math across event cards, agenda
29572
- * rows, and timetable cells — keep wording variations in the call sites.
29573
- */
29574
- function getEventAvailability(event) {
29575
- if (event.capacity == null) return {
29576
- available: null,
29577
- isFull: false
29578
- };
29579
- if (event.registeredCount === null) return {
29580
- available: 0,
29581
- isFull: true
29582
- };
29583
- const available = event.availableSpots ?? event.capacity - event.registeredCount;
29584
- if (available <= 0) return {
29585
- available: 0,
29586
- isFull: true
29587
- };
29588
- return {
29589
- available,
29590
- isFull: false
29591
- };
29592
- }
29593
- /**
29594
- * Pick the capacity row a booking decision should read: the selected
29595
- * attendance mode's availability when the visitor has chosen one and the
29596
- * event publishes it, otherwise the event-level aggregate.
29597
- *
29598
- * The mode row is used wholesale. A mode with `capacity: null` on a capped
29599
- * event is uncapped *by design*: the registration write path applies the
29600
- * same rule via `getEffectiveOccurrenceCapacityForAttendanceMode`, so falling
29601
- * back to the event's `availableSpots` here would block bookings the server
29602
- * accepts. (Waitlist claims are still occurrence-scoped; see issue 1377.)
29603
- */
29604
- function selectEventCapacitySource(event, attendanceMode) {
29605
- if (!attendanceMode) return event;
29606
- return (event.attendanceModes ?? []).find((mode) => mode.mode === attendanceMode) ?? event;
29607
- }
29608
- /**
29609
- * Whether the visitor's next step is the waitlist: the source is full *and*
29610
- * a waitlist is open. The one place this is decided — cards, rows, the
29611
- * wizard's steps and its action bar all route through here so they agree,
29612
- * including for producers that omit `availableSpots` and rely on the
29613
- * `capacity - registeredCount` fallback.
29614
- */
29615
- function canJoinEventWaitlist(event, options) {
29616
- const source = selectEventCapacitySource(event, options?.attendanceMode);
29617
- return getEventAvailability(source).isFull && source.waitlistEnabled === true;
29618
- }
29619
- /**
29620
- * Remaining places at or below which an event reads as scarce and the exact
29621
- * count is worth showing. Above it, no number is shown at all: "147 places
29622
- * left" is not something a visitor acts on, and it is the figure most likely
29623
- * to be stale on a cached page.
29624
- *
29625
- * max( min(3, ceil(capacity * 0.25)), ceil(capacity * 0.05) )
29626
- *
29627
- * The 25% arm stops small groups shouting early (3 of 4 is not urgency); the
29628
- * 5% floor stops large events staying silent until three remain.
29629
- * capacity 4 -> 1, 12 -> 3, 40 -> 3, 100 -> 5, 200 -> 10.
29630
- */
29631
- function lowCapacityThreshold(capacity) {
29632
- return Math.max(Math.min(3, Math.ceil(capacity * .25)), Math.ceil(capacity * .05));
29633
- }
29634
- function getRemainingPlaces(source) {
29635
- const { available, isFull } = getEventAvailability(source);
29636
- if (available === null) return { kind: "unlimited" };
29637
- if (isFull) return {
29638
- kind: "full",
29639
- waitlist: canJoinEventWaitlist(source)
29640
- };
29641
- if (source.capacity !== null && available <= lowCapacityThreshold(source.capacity)) return {
29642
- kind: "low",
29643
- remaining: available
29644
- };
29645
- return { kind: "open" };
29646
- }
29647
- /**
29648
- * The one place a remaining-places count becomes text. Returns `null` when
29649
- * nothing should be shown: uncapped events, and capped events above the
29650
- * scarcity threshold, unless the surface asks for every known count.
29651
- * Surfaces that need their own full-state wording pass
29652
- * it in rather than re-deriving the count.
29653
- */
29654
- function formatRemainingPlaces(source, wording = {}) {
29655
- const remaining = getRemainingPlaces(source);
29656
- switch (remaining.kind) {
29657
- case "unlimited": return null;
29658
- case "open": {
29659
- const available = getEventAvailability(source).available;
29660
- return wording.count === "always" && available !== null ? formatPlacesLeft(available, wording.compact === true) : null;
29661
- }
29662
- case "low": return formatPlacesLeft(remaining.remaining, wording.compact === true);
29663
- case "full": return remaining.waitlist ? wording.waitlist ?? "Waitlist" : wording.full ?? "Full";
29664
- }
29665
- }
29666
- function formatPlacesLeft(count, compact) {
29667
- if (compact) return `${count} left`;
29668
- return count === 1 ? "1 place left" : `${count} places left`;
29669
- }
29670
- function formatTicketTypeRemaining(remainingCapacity) {
29671
- if (remainingCapacity === null || remainingCapacity > 3) return null;
29672
- if (remainingCapacity <= 0) return "None left for this ticket type";
29673
- return `${formatPlacesLeft(remainingCapacity, false)} for this ticket type`;
29674
- }
29675
- /** Total capacity as copy ("12 places"), for detail surfaces that state the size of an event. */
29676
- function formatTotalCapacity(capacity) {
29677
- if (capacity === null) return null;
29678
- return capacity === 1 ? "1 place" : `${capacity} places`;
29679
- }
29680
- function getEventAvailabilityStatus(event) {
29681
- const source = selectMostOpenCapacitySource(event);
29682
- const remaining = getRemainingPlaces(source);
29683
- const label = formatEventRemainingPlaces(event, { compact: true });
29684
- switch (remaining.kind) {
29685
- case "unlimited": return {
29686
- status: "available",
29687
- available: null,
29688
- isFull: false,
29689
- label
29690
- };
29691
- case "open": return {
29692
- status: "available",
29693
- available: getEventAvailability(source).available,
29694
- isFull: false,
29695
- label
29696
- };
29697
- case "low": return {
29698
- status: "filling",
29699
- available: remaining.remaining,
29700
- isFull: false,
29701
- label
29702
- };
29703
- case "full": return {
29704
- status: "waitlist",
29705
- available: 0,
29706
- isFull: true,
29707
- label
29708
- };
29709
- }
29710
- }
29711
- /**
29712
- * Which capacity figure wins when they disagree.
29713
- *
29714
- * For a hybrid event that publishes both attendance-mode rows, **the mode
29715
- * rows are authoritative and the event-level aggregate is only a summary**.
29716
- * The registration write path admits or refuses per mode
29717
- * (`getEffectiveOccurrenceCapacityForAttendanceMode` on the server), so the
29718
- * aggregate can read full while a mode still has room, and can read open
29719
- * while the mode the visitor wants is full. Believing the aggregate on a
29720
- * card is how a "places available" event turns into a dead end at step two.
29721
- *
29722
- * Everything else — single-mode events, events that publish no rows, and the
29723
- * aggregate-only helpers {@link getEventAvailability} /
29724
- * {@link getRemainingPlaces} that existing callers rely on — keeps reading
29725
- * the aggregate, unchanged.
29726
- */
29727
- function findHybridModeRows(event) {
29728
- if (event.deliveryMode !== "hybrid") return null;
29729
- const rows = event.attendanceModes ?? [];
29730
- const inPerson = rows.find((row) => row.mode === "in_person");
29731
- const online = rows.find((row) => row.mode === "online");
29732
- return inPerson && online ? {
29733
- inPerson,
29734
- online
29735
- } : null;
29736
- }
29737
- /** Openness rank; higher means more room. A full mode with a waitlist beats one without. */
29738
- function remainingPlacesRank(remaining) {
29739
- switch (remaining.kind) {
29740
- case "unlimited": return 4;
29741
- case "open": return 3;
29742
- case "low": return 2;
29743
- case "full": return remaining.waitlist ? 1 : 0;
29744
- }
29745
- }
29746
- function isMoreOpen(candidate, than) {
29747
- const rank = remainingPlacesRank(candidate);
29748
- const otherRank = remainingPlacesRank(than);
29749
- if (rank !== otherRank) return rank > otherRank;
29750
- return candidate.kind === "low" && than.kind === "low" ? candidate.remaining > than.remaining : false;
29751
- }
29752
- /** True when `candidate` has less room left than `than`. */
29753
- function isScarcer(candidate, than) {
29754
- return isMoreOpen(than, candidate);
29755
- }
29756
- /**
29757
- * The capacity row a whole-event decision should read: the most open
29758
- * attendance mode of a hybrid event, otherwise the aggregate. A hybrid event
29759
- * is sold out only when both of its modes are, and its waitlist is reachable
29760
- * when either full mode has one open.
29761
- */
29762
- function selectMostOpenCapacitySource(event) {
29763
- const rows = findHybridModeRows(event);
29764
- if (!rows) return event;
29765
- return isMoreOpen(getRemainingPlaces(rows.online), getRemainingPlaces(rows.inPerson)) ? rows.online : rows.inPerson;
29766
- }
29767
- /** True when no attendance mode has room. Hybrid-aware; use this for sold-out decisions. */
29768
- function isEventFull(event) {
29769
- return getEventAvailability(selectMostOpenCapacitySource(event)).isFull;
29770
- }
29771
- /**
29772
- * True when the event is full on every mode and at least one of those full
29773
- * modes has a waitlist open. An event with a mode still bookable is not a
29774
- * waitlist prospect: it should send the visitor to that mode instead.
29775
- */
29776
- function canJoinEventWaitlistOnAnyMode(event) {
29777
- return canJoinEventWaitlist(selectMostOpenCapacitySource(event));
29778
- }
29779
- const ATTENDANCE_MODE_LABEL = {
29780
- in_person: "In person",
29781
- online: "Online"
29782
- };
29783
- /** Wording for a mode with room to spare, where the count is deliberately withheld. */
29784
- const PLACES_AVAILABLE = "Places available";
29785
- /**
29786
- * The browse-surface label for an event's remaining places. Single-mode
29787
- * events get exactly the aggregate label {@link formatRemainingPlaces}
29788
- * produces, and so does a hybrid event whose two modes tell the same story.
29789
- * When the modes differ, both sides are named: "available" on a card is a
29790
- * promise the registration wizard would otherwise have to break.
29791
- *
29792
- * Hybrid examples, in person full with 3 online places left:
29793
- * default -> "Online: 3 places left · In person: Full"
29794
- * { full: 'Sold out' } -> "Online: 3 places left · In person: Sold out"
29795
- * { compact: true } -> "Online: 3 left"
29796
- */
29797
- function formatEventRemainingPlaces(event, wording = {}) {
29798
- const rows = findHybridModeRows(event);
29799
- if (!rows) return formatRemainingPlaces(event, wording);
29800
- const inPerson = formatRemainingPlaces(rows.inPerson, wording);
29801
- const online = formatRemainingPlaces(rows.online, wording);
29802
- if (inPerson === online) return inPerson;
29803
- if (wording.compact === true) return formatCompactHybridPlaces(rows, wording);
29804
- return formatBothHybridSides(rows, {
29805
- inPerson,
29806
- online
29807
- });
29808
- }
29809
- /**
29810
- * Both sides, the one with room first: that is the half a visitor can act on,
29811
- * and it should not arrive after a full stop's worth of bad news.
29812
- */
29813
- function formatBothHybridSides(rows, labels) {
29814
- return (isMoreOpen(getRemainingPlaces(rows.online), getRemainingPlaces(rows.inPerson)) ? [["online", labels.online], ["in_person", labels.inPerson]] : [["in_person", labels.inPerson], ["online", labels.online]]).map(([mode, label]) => namedModePlaces(mode, label)).join(" · ");
29815
- }
29816
- function namedModePlaces(mode, label) {
29817
- return `${ATTENDANCE_MODE_LABEL[mode]}: ${label ?? PLACES_AVAILABLE}`;
29818
- }
29819
- /**
29820
- * Pills and timetable cells have room for one short phrase, so they name the
29821
- * single mode that carries news rather than listing both: the scarce side
29822
- * when there is a count to show, and otherwise the side that has closed —
29823
- * "In person: Full", never "Online only", which reads as a statement about
29824
- * how the event is delivered rather than about its remaining places.
29825
- */
29826
- function formatCompactHybridPlaces(rows, wording) {
29827
- const inPerson = getRemainingPlaces(rows.inPerson);
29828
- const online = getRemainingPlaces(rows.online);
29829
- if (inPerson.kind === "full" && online.kind === "full") return formatRemainingPlaces(inPerson.waitlist ? rows.inPerson : rows.online, wording);
29830
- if (inPerson.kind === "full" || online.kind === "full") {
29831
- const fullSide = inPerson.kind === "full" ? "in_person" : "online";
29832
- const openSide = inPerson.kind === "full" ? "online" : "in_person";
29833
- const openLabel = formatRemainingPlaces(rowFor(rows, openSide), wording);
29834
- return openLabel !== null ? namedModePlaces(openSide, openLabel) : namedModePlaces(fullSide, formatRemainingPlaces(rowFor(rows, fullSide), wording));
29835
- }
29836
- const scarcerSide = isScarcer(online, inPerson) ? "online" : "in_person";
29837
- return namedModePlaces(scarcerSide, formatRemainingPlaces(rowFor(rows, scarcerSide), wording));
29838
- }
29839
- function rowFor(rows, mode) {
29840
- return mode === "online" ? rows.online : rows.inPerson;
29841
- }
29842
- //#endregion
29843
30238
  //#region ../blocks/src/system/runtime/nodes/events/domain/destination.ts
29844
30239
  function isRecord(value) {
29845
30240
  return typeof value === "object" && value !== null && !Array.isArray(value);
@@ -30049,6 +30444,1123 @@ function formatEventWeekdayTime(event) {
30049
30444
  year: "omit"
30050
30445
  })} · ${formatEventTimeRange(event, options)}`;
30051
30446
  }
30447
+ const inlineTextMarkSchema = z.discriminatedUnion("kind", [
30448
+ z.object({ kind: z.literal("strong") }),
30449
+ z.object({ kind: z.literal("emphasis") }),
30450
+ z.object({
30451
+ kind: z.literal("accent"),
30452
+ tone: z.enum([
30453
+ "accent",
30454
+ "brand",
30455
+ "contrast"
30456
+ ])
30457
+ }),
30458
+ z.object({
30459
+ kind: z.literal("highlight"),
30460
+ tone: z.enum([
30461
+ "soft",
30462
+ "accent",
30463
+ "brand"
30464
+ ])
30465
+ })
30466
+ ]);
30467
+ const inlineTextRunSchema = z.object({
30468
+ text: z.string(),
30469
+ marks: z.array(inlineTextMarkSchema).optional()
30470
+ });
30471
+ z.array(inlineTextRunSchema);
30472
+ const MARK_ORDER = {
30473
+ strong: 0,
30474
+ emphasis: 1,
30475
+ accent: 2,
30476
+ highlight: 3
30477
+ };
30478
+ function plainTextToInlineText(value) {
30479
+ return normalizeInlineText(value.length > 0 ? [{ text: value }] : []);
30480
+ }
30481
+ function inlineTextToPlainText(value) {
30482
+ return value.map((run) => run.text).join("");
30483
+ }
30484
+ function isInlineTextEmpty(value) {
30485
+ return inlineTextToPlainText(value).trim().length === 0;
30486
+ }
30487
+ function coerceInlineTextWithFallback(value, fallbackPlainText) {
30488
+ const parsed = parseInlineTextFromUnknown(value);
30489
+ if (parsed.ok && !isInlineTextEmpty(parsed.value)) return parsed.value;
30490
+ if (fallbackPlainText && fallbackPlainText.length > 0) return plainTextToInlineText(fallbackPlainText);
30491
+ return parsed.ok ? parsed.value : [];
30492
+ }
30493
+ function parseInlineTextFromUnknown(value) {
30494
+ if (!Array.isArray(value)) return {
30495
+ ok: false,
30496
+ error: { kind: "not-array" }
30497
+ };
30498
+ const runs = [];
30499
+ for (let index = 0; index < value.length; index += 1) {
30500
+ const parsed = inlineTextRunSchema.safeParse(value[index]);
30501
+ if (!parsed.success) return {
30502
+ ok: false,
30503
+ error: {
30504
+ kind: "invalid-run",
30505
+ index
30506
+ }
30507
+ };
30508
+ runs.push(parsed.data);
30509
+ }
30510
+ return {
30511
+ ok: true,
30512
+ value: normalizeInlineText(runs)
30513
+ };
30514
+ }
30515
+ function normalizeInlineText(value) {
30516
+ const normalized = [];
30517
+ for (const run of value) {
30518
+ if (run.text.length === 0) continue;
30519
+ const marks = normalizeInlineTextMarks(run.marks ?? []);
30520
+ const nextRun = marks.length > 0 ? {
30521
+ text: run.text,
30522
+ marks
30523
+ } : { text: run.text };
30524
+ const previous = normalized[normalized.length - 1];
30525
+ if (previous && inlineTextMarksEqual(previous.marks ?? [], nextRun.marks ?? [])) {
30526
+ normalized[normalized.length - 1] = previous.marks && previous.marks.length > 0 ? {
30527
+ text: previous.text + nextRun.text,
30528
+ marks: previous.marks
30529
+ } : { text: previous.text + nextRun.text };
30530
+ continue;
30531
+ }
30532
+ normalized.push(nextRun);
30533
+ }
30534
+ return normalized;
30535
+ }
30536
+ function normalizeInlineTextMarks(marks) {
30537
+ let strong = null;
30538
+ let emphasis = null;
30539
+ let accent = null;
30540
+ let highlight = null;
30541
+ for (const mark of marks) switch (mark.kind) {
30542
+ case "strong":
30543
+ strong = { kind: "strong" };
30544
+ break;
30545
+ case "emphasis":
30546
+ emphasis = { kind: "emphasis" };
30547
+ break;
30548
+ case "accent":
30549
+ accent = {
30550
+ kind: "accent",
30551
+ tone: mark.tone
30552
+ };
30553
+ break;
30554
+ case "highlight":
30555
+ highlight = {
30556
+ kind: "highlight",
30557
+ tone: mark.tone
30558
+ };
30559
+ break;
30560
+ }
30561
+ return [
30562
+ strong,
30563
+ emphasis,
30564
+ accent,
30565
+ highlight
30566
+ ].filter((mark) => mark !== null).sort((left, right) => MARK_ORDER[left.kind] - MARK_ORDER[right.kind]);
30567
+ }
30568
+ function inlineTextMarksEqual(left, right) {
30569
+ const normalizedLeft = normalizeInlineTextMarks(left);
30570
+ const normalizedRight = normalizeInlineTextMarks(right);
30571
+ if (normalizedLeft.length !== normalizedRight.length) return false;
30572
+ return normalizedLeft.every((mark, index) => inlineTextMarkEqual(mark, normalizedRight[index]));
30573
+ }
30574
+ function inlineTextMarkEqual(left, right) {
30575
+ if (!right || left.kind !== right.kind) return false;
30576
+ switch (left.kind) {
30577
+ case "strong":
30578
+ case "emphasis": return true;
30579
+ case "accent": return right.kind === "accent" && left.tone === right.tone;
30580
+ case "highlight": return right.kind === "highlight" && left.tone === right.tone;
30581
+ }
30582
+ }
30583
+ //#endregion
30584
+ //#region ../blocks/src/system/transforms/registry/core.ts
30585
+ /**
30586
+ * Safely narrows unknown values to partial object shapes used by transforms.
30587
+ * Arrays are intentionally excluded.
30588
+ */
30589
+ function asPartialObject(value) {
30590
+ if (typeof value !== "object" || value === null || Array.isArray(value)) return;
30591
+ return value;
30592
+ }
30593
+ function runTransforms(value, transforms, context, registry) {
30594
+ if (!transforms?.length) return value;
30595
+ return transforms.reduce((acc, step) => {
30596
+ const transform = registry.get(step.id);
30597
+ if (!transform) throw new Error(`Unknown transform: ${step.id}`);
30598
+ const options = transform.schema ? z.parse(transform.schema, step.options ?? {}) : step.options ?? {};
30599
+ return transform.run(acc, options, context);
30600
+ }, value);
30601
+ }
30602
+ function createTransformRegistry(definitions) {
30603
+ const registry = /* @__PURE__ */ new Map();
30604
+ for (const definition of definitions) {
30605
+ if (registry.has(definition.id)) continue;
30606
+ registry.set(definition.id, definition);
30607
+ }
30608
+ return registry;
30609
+ }
30610
+ //#endregion
30611
+ //#region ../blocks/src/system/node/fragments/sectionState.shared.ts
30612
+ const SECTION_STATE_KINDS = [
30613
+ "empty",
30614
+ "unavailable",
30615
+ "coming-soon",
30616
+ "no-results"
30617
+ ];
30618
+ const SECTION_STATE_TONE = {
30619
+ empty: "info",
30620
+ unavailable: "warning",
30621
+ "coming-soon": "info",
30622
+ "no-results": "warning"
30623
+ };
30624
+ function isSectionStateKind(value) {
30625
+ return typeof value === "string" && SECTION_STATE_KINDS.includes(value);
30626
+ }
30627
+ function sectionStateToneFromKind(kind) {
30628
+ return SECTION_STATE_TONE[kind];
30629
+ }
30630
+ function sectionStateToneFromUnknown(value) {
30631
+ return isSectionStateKind(value) ? sectionStateToneFromKind(value) : "info";
30632
+ }
30633
+ //#endregion
30634
+ //#region ../blocks/src/system/transforms/registry/ui.ts
30635
+ const joinClasses = (parts) => parts.filter((part) => typeof part === "string" && part.trim().length > 0).join(" ").replace(/\s+/g, " ").trim();
30636
+ const eyebrowTreatmentClassMap = {
30637
+ plain: "",
30638
+ accent: "rb-eyebrow-treatment-accent",
30639
+ pill: "rb-eyebrow-treatment-pill",
30640
+ "accent-pill": "rb-eyebrow-treatment-pill rb-eyebrow-treatment-accent",
30641
+ "pill-bounce": "rb-eyebrow-treatment-pill rb-eyebrow-treatment-pill-bounce",
30642
+ "accent-pill-bounce": "rb-eyebrow-treatment-pill rb-eyebrow-treatment-accent rb-eyebrow-treatment-pill-bounce"
30643
+ };
30644
+ const eyebrowTreatmentSet = new Set(eyebrowTreatmentValues);
30645
+ const headingDecorationFamilySet = new Set(visibleHeadingDecorationFamilyValues);
30646
+ const headingDecorationColorTokenSet = new Set(headingDecorationColorTokenValues);
30647
+ function isEyebrowTreatment(value) {
30648
+ return typeof value === "string" && eyebrowTreatmentSet.has(value);
30649
+ }
30650
+ function isHeadingDecorationFamily(value) {
30651
+ return typeof value === "string" && headingDecorationFamilySet.has(value);
30652
+ }
30653
+ function isHeadingDecorationColorToken(value) {
30654
+ return typeof value === "string" && headingDecorationColorTokenSet.has(value);
30655
+ }
30656
+ const imageGalleryCornerClassMap = {
30657
+ none: "",
30658
+ sm: "rb-rounded-sm",
30659
+ md: "rb-rounded-md",
30660
+ lg: "rb-rounded-lg",
30661
+ xl: "rb-rounded-xl",
30662
+ "2xl": "rb-rounded-2xl",
30663
+ "3xl": "rb-rounded-3xl"
30664
+ };
30665
+ const imageShapeClassMap = {
30666
+ default: "",
30667
+ square: "rb-media-shape-square",
30668
+ rounded: "rb-media-shape-rounded",
30669
+ circle: "rb-media-shape-circle",
30670
+ arch: "rb-media-shape-arch"
30671
+ };
30672
+ const parseRatio = (raw) => {
30673
+ if (typeof raw !== "string") return null;
30674
+ const value = raw.trim();
30675
+ if (!value || value === "auto") return null;
30676
+ const [wRaw, hRaw] = value.split("/").map((part) => part.trim());
30677
+ const w = Number(wRaw);
30678
+ const h = Number(hRaw);
30679
+ if (!Number.isFinite(w) || !Number.isFinite(h)) return null;
30680
+ if (w <= 0 || h <= 0) return null;
30681
+ return {
30682
+ w,
30683
+ h
30684
+ };
30685
+ };
30686
+ const ratioToHeightFactor = (raw) => {
30687
+ const ratio = parseRatio(raw);
30688
+ if (!ratio) return "1";
30689
+ return String(ratio.h / ratio.w);
30690
+ };
30691
+ function resolveBorderColorValue(border) {
30692
+ if (border.enabled === false) return void 0;
30693
+ const rawColorToken = typeof border.colorToken === "string" ? border.colorToken.trim() : "";
30694
+ const parsed = rawColorToken ? parseBlockColorToken(rawColorToken) : null;
30695
+ const baseName = (parsed ? parsed.split("/")[0] : null) ?? "accent";
30696
+ const opacityRaw = typeof border.opacity === "number" ? border.opacity : 30;
30697
+ return rgbColorValue(`${baseName}/${Math.max(0, Math.min(100, opacityRaw))}`);
30698
+ }
30699
+ /**
30700
+ * Get nav link classes based on nav style
30701
+ * Simplified version that reads navStyle enum from theme
30702
+ */
30703
+ function getNavStyleClasses(navStyle) {
30704
+ const baseClasses = "rb-inline-flex rb-items-center rb-gap-2 rb-px-3 rb-py-2 rb-transition-colors";
30705
+ switch (navStyle) {
30706
+ case "minimal": return baseClasses;
30707
+ case "underline": return `${baseClasses} rb-nav-underline rb-nav-underline-offset-4`;
30708
+ case "underline-grow": return `${baseClasses} nav-underline-grow nav-underline-active`;
30709
+ case "capsule": return "rb-inline-flex rb-items-center rb-gap-2 rb-transition-colors rb-rounded-full rb-px-3 rb-py-1.5";
30710
+ case "scale": return `${baseClasses} rb-transform-gpu rb-will-change-transform rb-motion-safe-hover-scale-105`;
30711
+ case "frosted": return "rb-inline-flex rb-items-center rb-gap-2 rb-transition-colors rb-rounded-lg rb-px-3 rb-py-1.5";
30712
+ case "solid": return baseClasses;
30713
+ default: return baseClasses;
30714
+ }
30715
+ }
30716
+ const headerNavLinkClassTransform = {
30717
+ id: "ui.headerNavLinkClass",
30718
+ kind: "string",
30719
+ summary: "Compose header navigation link classes from theme navStyle",
30720
+ schema: z.object({ base: z.string().optional() }),
30721
+ run: (value, options) => {
30722
+ return joinClasses([getNavStyleClasses(asPartialObject(value)?.navStyle ?? "minimal"), options?.base]);
30723
+ }
30724
+ };
30725
+ const headingClassFromAlignment = {
30726
+ id: "ui.headingClassFromAlignment",
30727
+ kind: "string",
30728
+ summary: "Append text alignment class to a base heading class",
30729
+ run: (value, options) => {
30730
+ const alignClass = (typeof value === "string" && value === "center" ? "center" : "left") === "center" ? "rb-text-center" : "rb-text-left";
30731
+ return `${options.base} ${alignClass}`.trim();
30732
+ }
30733
+ };
30734
+ const bodyClassFromAlignment = {
30735
+ id: "ui.bodyClassFromAlignment",
30736
+ kind: "string",
30737
+ summary: "Append body alignment helper classes to a base class",
30738
+ run: (value, options) => {
30739
+ const extra = (typeof value === "string" && value === "center" ? "center" : "left") === "center" ? "rb-mx-auto rb-text-center" : "";
30740
+ return `${options.base} ${extra}`.trim();
30741
+ }
30742
+ };
30743
+ const stackAlignFromAlignment = {
30744
+ id: "ui.stackAlignFromAlignment",
30745
+ kind: "string",
30746
+ summary: "Map text alignment to stack alignment value",
30747
+ run: (value) => value === "center" ? "center" : "start"
30748
+ };
30749
+ const sectionStateToneTransform = {
30750
+ id: "ui.sectionStateTone",
30751
+ kind: "string",
30752
+ summary: "Map semantic section-state kind to feedback tone",
30753
+ run: (value) => sectionStateToneFromUnknown(value)
30754
+ };
30755
+ const heroTitleLengthThresholds = {
30756
+ medium: {
30757
+ maxCharacters: 42,
30758
+ maxWords: 6
30759
+ },
30760
+ long: {
30761
+ maxCharacters: 78,
30762
+ maxWords: 11
30763
+ }
30764
+ };
30765
+ function isPlainObject(value) {
30766
+ return Boolean(value) && typeof value === "object" && !Array.isArray(value);
30767
+ }
30768
+ function readString(obj, key) {
30769
+ const v = obj[key];
30770
+ return typeof v === "string" ? v : void 0;
30771
+ }
30772
+ function resolveGeneratedHeroLayoutStyles(content) {
30773
+ const raw = content._heroLayoutStyles;
30774
+ return isPlainObject(raw) ? raw : null;
30775
+ }
30776
+ function readHeroLayoutString(content, generatedKey, fallbackKey = generatedKey) {
30777
+ const explicitValue = readString(content, fallbackKey);
30778
+ if (explicitValue !== void 0) return explicitValue;
30779
+ const generated = resolveGeneratedHeroLayoutStyles(content);
30780
+ return generated && typeof generated[generatedKey] === "string" ? generated[generatedKey] : void 0;
30781
+ }
30782
+ function resolveHeroVariant(content) {
30783
+ const variant = readString(content, "variant");
30784
+ if (variant && variant.trim()) return variant.trim();
30785
+ const layout = readString(content, "layout");
30786
+ if (layout && layout.trim()) return layout.trim();
30787
+ return null;
30788
+ }
30789
+ function resolveHeroContentAlignment(content) {
30790
+ const raw = readHeroLayoutString(content, "contentAlignment");
30791
+ if (raw === "left" || raw === "center" || raw === "right") return raw;
30792
+ const variant = resolveHeroVariant(content);
30793
+ if (variant === "split" || variant === "splitReverse") return "left";
30794
+ return "center";
30795
+ }
30796
+ function resolveHeroVerticalAlignment(content) {
30797
+ const raw = readHeroLayoutString(content, "verticalAlignment");
30798
+ if (raw === "top" || raw === "center" || raw === "bottom") return raw;
30799
+ const minHeight = asPartialObject(content._sectionStyles)?.minHeight;
30800
+ if (minHeight === "banner" || minHeight === "hero" || minHeight === "immersive") return "center";
30801
+ const variant = resolveHeroVariant(content);
30802
+ if (variant === "split" || variant === "splitReverse") return "center";
30803
+ return "top";
30804
+ }
30805
+ function resolveHeroContentMaxWidth(content) {
30806
+ const raw = readHeroLayoutString(content, "contentMaxWidth");
30807
+ if (raw === "default" || raw === "narrow" || raw === "medium" || raw === "wide") return raw;
30808
+ return "default";
30809
+ }
30810
+ function resolveHeroTypographyScale(content) {
30811
+ const titleSize = readString(content, "titleSize");
30812
+ if (titleSize === "quiet" || titleSize === "editorial" || titleSize === "display" || titleSize === "poster") return titleSize;
30813
+ const raw = readHeroLayoutString(content, "typographyScale", "heroTypographyScale");
30814
+ if (raw === "quiet" || raw === "editorial" || raw === "display" || raw === "poster") return raw;
30815
+ return null;
30816
+ }
30817
+ function resolveHeroTitleLength(content, policy = "legacy") {
30818
+ const headline = heroHeadlineText(content, policy);
30819
+ const words = headline.split(/\s+/).filter((word) => word.length > 0);
30820
+ const wordCount = words.length;
30821
+ const longestWord = longestHeroWord(words, policy);
30822
+ if (headline.length > heroTitleLengthThresholds.long.maxCharacters || longestWord > 18 || wordCount > heroTitleLengthThresholds.long.maxWords) return "long";
30823
+ if (headline.length > heroTitleLengthThresholds.medium.maxCharacters || longestWord > 12 || wordCount > heroTitleLengthThresholds.medium.maxWords) return "medium";
30824
+ return "short";
30825
+ }
30826
+ const heroContentWrapperClassTransform = {
30827
+ id: "ui.heroContentWrapperClass",
30828
+ kind: "string",
30829
+ summary: "Resolve hero content wrapper className from alignment + max width controls",
30830
+ schema: z.object({ base: z.string().optional() }),
30831
+ run: (value, options, context) => {
30832
+ const content = isPlainObject(value) ? value : isPlainObject(context.data) ? context.data : {};
30833
+ const alignment = resolveHeroContentAlignment(content);
30834
+ const maxWidth = resolveHeroContentMaxWidth(content);
30835
+ const typographyScale = resolveHeroTypographyScale(content);
30836
+ const titleLength = resolveHeroTitleLength(content);
30837
+ const textAlignClass = alignment === "center" ? "rb-text-center" : alignment === "right" ? "rb-text-right" : "rb-text-left";
30838
+ const maxWidthClass = maxWidth === "narrow" ? "rb-max-w-2xl" : maxWidth === "medium" ? "rb-max-w-3xl" : maxWidth === "wide" ? "rb-max-w-5xl" : "";
30839
+ const positionClass = alignment === "center" ? "rb-mx-auto" : alignment === "right" ? "rb-ml-auto" : "";
30840
+ return joinClasses([
30841
+ options?.base,
30842
+ textAlignClass,
30843
+ maxWidthClass,
30844
+ positionClass,
30845
+ ...heroLegacyTypographyClasses(content, typographyScale, titleLength)
30846
+ ]);
30847
+ }
30848
+ };
30849
+ const heroCtaJustifyTransform = {
30850
+ id: "ui.heroCtaJustify",
30851
+ kind: "string",
30852
+ summary: "Map hero contentAlignment to CTA row justify value",
30853
+ run: (value, _options, context) => {
30854
+ const alignment = resolveHeroContentAlignment(isPlainObject(value) ? value : isPlainObject(context.data) ? context.data : {});
30855
+ return alignment === "left" ? "start" : alignment === "right" ? "end" : "center";
30856
+ }
30857
+ };
30858
+ const heroStackJustifyFromVerticalAlignmentTransform = {
30859
+ id: "ui.heroStackJustifyFromVerticalAlignment",
30860
+ kind: "string",
30861
+ summary: "Map hero verticalAlignment to stack justify value",
30862
+ run: (value, _options, context) => {
30863
+ const vertical = resolveHeroVerticalAlignment(isPlainObject(value) ? value : isPlainObject(context.data) ? context.data : {});
30864
+ return vertical === "top" ? "start" : vertical === "bottom" ? "end" : "center";
30865
+ }
30866
+ };
30867
+ const heroGridClassFromVerticalAlignmentTransform = {
30868
+ id: "ui.heroGridClassFromVerticalAlignment",
30869
+ kind: "string",
30870
+ summary: "Append align-items class for hero split layouts based on verticalAlignment",
30871
+ schema: z.object({ base: z.string() }),
30872
+ run: (value, options, context) => {
30873
+ const vertical = resolveHeroVerticalAlignment(isPlainObject(value) ? value : isPlainObject(context.data) ? context.data : {});
30874
+ const itemsClass = vertical === "top" ? "rb-items-start" : vertical === "bottom" ? "rb-items-end" : "rb-items-center";
30875
+ return joinClasses([options.base, itemsClass]);
30876
+ }
30877
+ };
30878
+ const imageFragmentClassTransform = {
30879
+ id: "ui.imageFragmentClass",
30880
+ kind: "string",
30881
+ summary: "Return different classes based on aspectRatio (auto vs fixed)",
30882
+ schema: z.object({
30883
+ base: z.string(),
30884
+ whenAuto: z.string(),
30885
+ whenFixed: z.string()
30886
+ }),
30887
+ run: (value, options) => {
30888
+ const aspectRatio = typeof value === "string" ? value.trim() : "auto";
30889
+ const isAuto = aspectRatio === "" || aspectRatio === "auto";
30890
+ return joinClasses([options.base, isAuto ? options.whenAuto : options.whenFixed]);
30891
+ }
30892
+ };
30893
+ const imageFragmentSizeTransform = {
30894
+ id: "ui.imageFragmentSize",
30895
+ kind: "formatter",
30896
+ summary: "Derive Supabase render size options from an aspect ratio",
30897
+ schema: z.object({
30898
+ max: z.number().int().positive().default(1920),
30899
+ quality: z.number().int().min(1).max(100).default(85)
30900
+ }),
30901
+ run: (value, options) => {
30902
+ const ratio = parseRatio(value);
30903
+ const max = options.max ?? 1920;
30904
+ const quality = options.quality ?? 85;
30905
+ if (!ratio) return {
30906
+ width: max,
30907
+ quality,
30908
+ resize: "contain"
30909
+ };
30910
+ const isPortrait = ratio.h > ratio.w;
30911
+ return {
30912
+ width: isPortrait ? Math.round(max * ratio.w / ratio.h) : max,
30913
+ height: isPortrait ? max : Math.round(max * ratio.h / ratio.w),
30914
+ quality,
30915
+ resize: "cover"
30916
+ };
30917
+ }
30918
+ };
30919
+ const conditionalClassTransform = {
30920
+ id: "ui.conditionalClass",
30921
+ kind: "string",
30922
+ summary: "Return different classes based on boolean value",
30923
+ schema: z.object({
30924
+ whenTrue: z.string(),
30925
+ whenFalse: z.string()
30926
+ }),
30927
+ run: (value, options) => {
30928
+ return (typeof value === "boolean" ? value : Boolean(value)) ? options.whenTrue : options.whenFalse;
30929
+ }
30930
+ };
30931
+ const twoColumnContainerClassTransform = {
30932
+ id: "ui.twoColumnContainerClass",
30933
+ kind: "string",
30934
+ summary: "Append a desktop row-reverse class based on imagePosition",
30935
+ schema: z.object({
30936
+ base: z.string(),
30937
+ reverseClass: z.string()
30938
+ }),
30939
+ run: (value, options) => {
30940
+ const position = value === "right" ? "right" : "left";
30941
+ return joinClasses([options.base, position === "right" ? options.reverseClass : null]);
30942
+ }
30943
+ };
30944
+ const twoColumnFlexBasisTransform = {
30945
+ id: "ui.twoColumnFlexBasis",
30946
+ kind: "string",
30947
+ summary: "Map a ratio string to a flex-basis percentage for a 2-column layout",
30948
+ schema: z.object({ side: z.enum(["image", "text"]) }),
30949
+ run: (value, options) => {
30950
+ const ratio = typeof value === "string" ? value.trim() : "1/2";
30951
+ const imagePercent = ratio === "1/4" ? 25 : ratio === "1/3" ? 33.333 : ratio === "2/5" ? 40 : ratio === "2/3" ? 66.667 : 50;
30952
+ return `${options.side === "image" ? imagePercent : 100 - imagePercent}%`;
30953
+ }
30954
+ };
30955
+ const columnsDesktopSpanClassTransform = {
30956
+ id: "ui.columnsDesktopSpanClass",
30957
+ kind: "string",
30958
+ summary: "Append lg col-span class for editorial column layouts",
30959
+ schema: z.object({ base: z.string().optional() }),
30960
+ run: (value, options) => {
30961
+ const raw = typeof value === "string" ? value.trim() : "";
30962
+ const spanClass = raw === "2" ? "rb-lg-col-span-2" : raw === "3" ? "rb-lg-col-span-3" : raw === "4" ? "rb-lg-col-span-4" : "rb-lg-col-span-1";
30963
+ return joinClasses([options.base, spanClass]);
30964
+ }
30965
+ };
30966
+ const resolveColumnsGridCols$1 = (content) => {
30967
+ const items = Array.isArray(content.columns) ? content.columns : [];
30968
+ const count = Math.min(4, Math.max(1, items.length || 1));
30969
+ const configuredDesktopColumnsRaw = typeof content.desktopColumns === "string" ? content.desktopColumns : "auto";
30970
+ const desktopColumns = configuredDesktopColumnsRaw === "2" ? 2 : configuredDesktopColumnsRaw === "3" ? 3 : configuredDesktopColumnsRaw === "4" ? 4 : count;
30971
+ if (desktopColumns <= 1) return { base: 1 };
30972
+ if (desktopColumns === 2) return {
30973
+ base: 1,
30974
+ md: 2
30975
+ };
30976
+ if (desktopColumns === 3) return {
30977
+ base: 1,
30978
+ md: 2,
30979
+ lg: 3
30980
+ };
30981
+ return {
30982
+ base: 1,
30983
+ md: 2,
30984
+ lg: 3,
30985
+ xl: 4
30986
+ };
30987
+ };
30988
+ const uiTransforms = [
30989
+ {
30990
+ id: "look.splitMinHeight",
30991
+ kind: "string",
30992
+ run: (value) => asPartialObject(value)?._lookSlots === void 0 ? "clamp(18rem, 36vw, 34rem)" : void 0
30993
+ },
30994
+ headerNavLinkClassTransform,
30995
+ headingClassFromAlignment,
30996
+ bodyClassFromAlignment,
30997
+ stackAlignFromAlignment,
30998
+ sectionStateToneTransform,
30999
+ heroContentWrapperClassTransform,
31000
+ heroCtaJustifyTransform,
31001
+ heroStackJustifyFromVerticalAlignmentTransform,
31002
+ heroGridClassFromVerticalAlignmentTransform,
31003
+ imageFragmentClassTransform,
31004
+ imageFragmentSizeTransform,
31005
+ {
31006
+ id: "ui.imageShapeClassName",
31007
+ kind: "string",
31008
+ summary: "Apply a constrained media shape class",
31009
+ run: (value, options) => {
31010
+ return joinClasses([typeof options?.baseClass === "string" ? options.baseClass : "", imageShapeClassMap[typeof value === "string" ? value.trim() : "default"] ?? ""]);
31011
+ }
31012
+ },
31013
+ conditionalClassTransform,
31014
+ twoColumnContainerClassTransform,
31015
+ twoColumnFlexBasisTransform,
31016
+ columnsDesktopSpanClassTransform,
31017
+ {
31018
+ id: "ui.columnsGridCols",
31019
+ kind: "formatter",
31020
+ summary: "Resolve responsive grid column counts for columns block",
31021
+ run: (value) => {
31022
+ return resolveColumnsGridCols$1(asPartialObject(value) ?? {});
31023
+ }
31024
+ },
31025
+ {
31026
+ id: "ui.columnsColsAt",
31027
+ kind: "formatter",
31028
+ summary: "Resolve columns count for a specific breakpoint",
31029
+ schema: z.object({ breakpoint: z.enum([
31030
+ "mobile",
31031
+ "md",
31032
+ "lg",
31033
+ "xl"
31034
+ ]) }),
31035
+ run: (value, options) => {
31036
+ const cols = resolveColumnsGridCols$1(asPartialObject(value) ?? {});
31037
+ const mobile = cols.base;
31038
+ const md = cols.md ?? mobile;
31039
+ const lg = cols.lg ?? md;
31040
+ const xl = cols.xl ?? lg;
31041
+ const resolved = options.breakpoint === "mobile" ? mobile : options.breakpoint === "md" ? md : options.breakpoint === "lg" ? lg : xl;
31042
+ return String(resolved);
31043
+ }
31044
+ },
31045
+ {
31046
+ id: "ui.ratioToHeightFactor",
31047
+ kind: "formatter",
31048
+ summary: "Convert a width/height aspect ratio string to a height factor (h/w)",
31049
+ run: (value) => ratioToHeightFactor(value)
31050
+ },
31051
+ {
31052
+ id: "ui.imageGalleryFilterClass",
31053
+ kind: "string",
31054
+ summary: "Map image filter selection to rb-* filter utility class",
31055
+ run: (value) => {
31056
+ switch (typeof value === "string" ? value.trim() : "none") {
31057
+ case "grayscale": return "rb-filter-grayscale";
31058
+ case "grayscale-hover-reveal": return "rb-filter-grayscale-hover-reveal";
31059
+ case "sepia": return "rb-filter-sepia";
31060
+ default: return "";
31061
+ }
31062
+ }
31063
+ },
31064
+ {
31065
+ id: "ui.imageGalleryTileClass",
31066
+ kind: "string",
31067
+ summary: "Compose image gallery tile wrapper classes (border + corners)",
31068
+ run: (value) => {
31069
+ const content = asPartialObject(value) ?? {};
31070
+ const cornersClass = imageGalleryCornerClassMap[typeof content.imageCorners === "string" ? content.imageCorners : "3xl"] ?? "rb-rounded-3xl";
31071
+ const border = content.imageBorder && typeof content.imageBorder === "object" ? content.imageBorder : {};
31072
+ const borderEnabled = border.enabled !== false;
31073
+ const borderWidth = typeof border.width === "string" ? border.width : "2";
31074
+ return joinClasses([
31075
+ "rb-overflow-hidden",
31076
+ "rb-relative",
31077
+ cornersClass,
31078
+ !borderEnabled ? "" : borderWidth === "1" ? "rb-border" : borderWidth === "2" ? "rb-border-2" : borderWidth === "3" ? "rb-border-3" : "rb-border-2"
31079
+ ]);
31080
+ }
31081
+ },
31082
+ {
31083
+ id: "ui.imageGalleryTileStyle",
31084
+ kind: "formatter",
31085
+ summary: "Build image gallery tile inline styles (border color)",
31086
+ run: (value) => {
31087
+ const content = asPartialObject(value) ?? {};
31088
+ const borderColor = resolveBorderColorValue(content.imageBorder && typeof content.imageBorder === "object" ? content.imageBorder : {});
31089
+ return borderColor ? { borderColor } : void 0;
31090
+ }
31091
+ },
31092
+ {
31093
+ id: "ui.imageGalleryMarqueeTileStyle",
31094
+ kind: "formatter",
31095
+ summary: "Build marquee tile inline styles (border + fixed size)",
31096
+ run: (value) => {
31097
+ const content = asPartialObject(value) ?? {};
31098
+ const size = typeof content.marqueeImageSize === "string" ? content.marqueeImageSize : "md";
31099
+ const pixels = size === "sm" ? 200 : size === "lg" ? 320 : size === "xl" ? 400 : 256;
31100
+ const style = {
31101
+ width: `${pixels}px`,
31102
+ height: `${pixels}px`
31103
+ };
31104
+ const borderColor = resolveBorderColorValue(content.imageBorder && typeof content.imageBorder === "object" ? content.imageBorder : {});
31105
+ if (borderColor) style.borderColor = borderColor;
31106
+ return style;
31107
+ }
31108
+ },
31109
+ {
31110
+ id: "ui.imageGalleryMarqueeDuration",
31111
+ kind: "string",
31112
+ summary: "Map marquee speed selection to CSS duration",
31113
+ run: (value) => {
31114
+ const speed = typeof value === "string" ? value.trim() : "medium";
31115
+ return speed === "slow" ? "60s" : speed === "fast" ? "20s" : "40s";
31116
+ }
31117
+ },
31118
+ {
31119
+ id: "ui.imageGalleryMarqueeDirection",
31120
+ kind: "string",
31121
+ summary: "Map marquee direction selection to animation-direction",
31122
+ run: (value) => value === "right" ? "reverse" : "normal"
31123
+ },
31124
+ {
31125
+ id: "ui.eyebrowClassName",
31126
+ kind: "string",
31127
+ summary: "Apply a constrained Theme V2 eyebrow treatment class",
31128
+ run: (value, options) => {
31129
+ return joinClasses([typeof options?.baseClass === "string" ? options.baseClass : "rb-eyebrow", eyebrowTreatmentClassMap[isEyebrowTreatment(value) ? value : "plain"]]);
31130
+ }
31131
+ },
31132
+ {
31133
+ id: "ui.headingDecorationClassName",
31134
+ kind: "string",
31135
+ summary: "Apply constrained Theme V2 heading decoration classes",
31136
+ run: (value, options) => {
31137
+ const baseClass = typeof options?.baseClass === "string" && options.baseClass.trim() ? options.baseClass : "rb-heading-decoration";
31138
+ const decoration = asPartialObject(value);
31139
+ const family = isHeadingDecorationFamily(decoration?.family) ? decoration.family : null;
31140
+ const colorToken = isHeadingDecorationColorToken(decoration?.colorToken) ? decoration.colorToken : "primary";
31141
+ if (!family) return "rb-hidden";
31142
+ return joinClasses([
31143
+ baseClass,
31144
+ `rb-heading-decoration-${family}`,
31145
+ `rb-heading-decoration-color-${colorToken}`
31146
+ ]);
31147
+ }
31148
+ }
31149
+ ];
31150
+ function longestHeroWord(words, policy) {
31151
+ return policy === "look" ? Math.max(0, ...words.map((word) => word.length)) : 0;
31152
+ }
31153
+ function heroLegacyTypographyClasses(content, scale, length) {
31154
+ return content._effectiveLook ? [] : [scale ? `rb-hero-typography-${scale}` : "", `rb-hero-title-${length}`];
31155
+ }
31156
+ function heroHeadlineText(content, policy) {
31157
+ const plain = readString(content, "headline");
31158
+ return policy === "look" ? inlineTextToPlainText(coerceInlineTextWithFallback(content.headlineInline, plain)).trim() : plain?.trim() ?? "";
31159
+ }
31160
+ //#endregion
31161
+ //#region ../blocks/src/system/fields/aspectRatio.ts
31162
+ const standardAspectRatioOptions = [
31163
+ {
31164
+ value: "auto",
31165
+ label: "Auto (original)"
31166
+ },
31167
+ {
31168
+ value: "16/9",
31169
+ label: "16:9 (Landscape)"
31170
+ },
31171
+ {
31172
+ value: "4/3",
31173
+ label: "4:3 (Standard)"
31174
+ },
31175
+ {
31176
+ value: "1/1",
31177
+ label: "1:1 (Square)"
31178
+ },
31179
+ {
31180
+ value: "3/4",
31181
+ label: "3:4 (Portrait)"
31182
+ },
31183
+ {
31184
+ value: "9/16",
31185
+ label: "9:16 (Tall portrait)"
31186
+ }
31187
+ ];
31188
+ function createAspectRatioField(options = {}) {
31189
+ return {
31190
+ id: options.id ?? "aspectRatio",
31191
+ type: "select",
31192
+ label: options.label ?? "Aspect ratio",
31193
+ ...options.description ? { description: options.description } : {},
31194
+ required: false,
31195
+ defaultValue: options.defaultValue ?? "auto",
31196
+ multiple: false,
31197
+ options: [...standardAspectRatioOptions],
31198
+ ui: {
31199
+ intent: options.uiIntent ?? "display",
31200
+ ...options.visibleWhen ? { visibleWhen: options.visibleWhen } : {}
31201
+ }
31202
+ };
31203
+ }
31204
+ //#endregion
31205
+ //#region ../blocks/src/system/fields/heroTitleSize.ts
31206
+ /**
31207
+ * The headline sizes owners can pick, the same in the content form and the
31208
+ * Look's knob. Older stored sizes (`editorial`, `poster`) still render.
31209
+ */
31210
+ const heroTitleSizeOptions = [
31211
+ {
31212
+ value: "quiet",
31213
+ label: "Quieter"
31214
+ },
31215
+ {
31216
+ value: "auto",
31217
+ label: "Standard"
31218
+ },
31219
+ {
31220
+ value: "display",
31221
+ label: "Louder"
31222
+ }
31223
+ ];
31224
+ //#endregion
31225
+ //#region ../blocks/src/system/fields/imageShape.ts
31226
+ const standardImageShapeOptions = [
31227
+ {
31228
+ value: "default",
31229
+ label: "Default"
31230
+ },
31231
+ {
31232
+ value: "square",
31233
+ label: "Square corners"
31234
+ },
31235
+ {
31236
+ value: "rounded",
31237
+ label: "Rounded corners"
31238
+ },
31239
+ {
31240
+ value: "circle",
31241
+ label: "Circle"
31242
+ },
31243
+ {
31244
+ value: "arch",
31245
+ label: "Arch"
31246
+ }
31247
+ ];
31248
+ function createImageShapeField(options = {}) {
31249
+ return {
31250
+ id: options.id ?? "imageShape",
31251
+ type: "select",
31252
+ label: options.label ?? "Image shape",
31253
+ ...options.description ? { description: options.description } : {},
31254
+ required: false,
31255
+ defaultValue: options.defaultValue ?? "default",
31256
+ multiple: false,
31257
+ options: [...standardImageShapeOptions],
31258
+ ui: {
31259
+ intent: options.uiIntent ?? "display",
31260
+ ...options.visibleWhen ? { visibleWhen: options.visibleWhen } : {}
31261
+ }
31262
+ };
31263
+ }
31264
+ //#endregion
31265
+ //#region ../blocks/src/system/customize/facets.ts
31266
+ function defineCustomizeFacet(definition) {
31267
+ return definition;
31268
+ }
31269
+ const eventCalendarListLayoutFacet = defineCustomizeFacet({
31270
+ blockKind: "block.event-calendar",
31271
+ id: "eventCalendar.listLayout",
31272
+ label: "List style",
31273
+ legacyOnly: true,
31274
+ values: eventCalendarListLayoutOptions.map((option) => ({
31275
+ value: option.id,
31276
+ label: option.label
31277
+ })),
31278
+ defaultValue: "stack",
31279
+ target: { kind: "event-calendar-list-layout-content" },
31280
+ appliesToLayoutVariants: eventCalendarListLayoutCompatibleDisplayModeValues
31281
+ });
31282
+ const fixedKnob = (blockKind, id, label, values, defaultValue, ordered = false, boolean = false) => ({
31283
+ blockKind,
31284
+ id,
31285
+ label,
31286
+ values,
31287
+ defaultValue,
31288
+ knob: {
31289
+ kind: "fixed",
31290
+ ordered
31291
+ },
31292
+ target: {
31293
+ kind: "content-field",
31294
+ field: id,
31295
+ ...boolean ? { boolean: true } : {}
31296
+ }
31297
+ });
31298
+ const textKnob = (id, label, maxLength) => ({
31299
+ blockKind: "block.hero",
31300
+ id,
31301
+ label,
31302
+ values: [],
31303
+ defaultValue: "",
31304
+ knob: {
31305
+ kind: "text",
31306
+ maxLength
31307
+ },
31308
+ target: {
31309
+ kind: "content-field",
31310
+ field: id
31311
+ }
31312
+ });
31313
+ const onOff = [{
31314
+ value: "true",
31315
+ label: "On"
31316
+ }, {
31317
+ value: "false",
31318
+ label: "Off"
31319
+ }];
31320
+ const columnCounts = [
31321
+ {
31322
+ value: "2",
31323
+ label: "2"
31324
+ },
31325
+ {
31326
+ value: "3",
31327
+ label: "3"
31328
+ },
31329
+ {
31330
+ value: "4",
31331
+ label: "4"
31332
+ }
31333
+ ];
31334
+ const systemCustomizeFacetDefinitions = [
31335
+ eventCalendarListLayoutFacet,
31336
+ fixedKnob("block.offerings-preview", "grouping", "Grouping", [{
31337
+ value: "by-kind",
31338
+ label: "Grouped by kind"
31339
+ }, {
31340
+ value: "one-list",
31341
+ label: "One list"
31342
+ }], "by-kind"),
31343
+ fixedKnob("block.offerings-preview", "dates", "Dates", [{
31344
+ value: "summary",
31345
+ label: "Summary"
31346
+ }, {
31347
+ value: "next-dates",
31348
+ label: "Next dates"
31349
+ }], "summary"),
31350
+ {
31351
+ ...fixedKnob("block.feature-cards", "actionStyle", "Item actions", [{
31352
+ value: "button",
31353
+ label: "Button"
31354
+ }, {
31355
+ value: "link",
31356
+ label: "Link"
31357
+ }], "button"),
31358
+ blockKinds: cardListKnobBlocks
31359
+ },
31360
+ fixedKnob("block.testimonials", "quoteCount", "How many quotes", [
31361
+ {
31362
+ value: "1",
31363
+ label: "1"
31364
+ },
31365
+ {
31366
+ value: "2",
31367
+ label: "2"
31368
+ },
31369
+ {
31370
+ value: "3",
31371
+ label: "3"
31372
+ },
31373
+ {
31374
+ value: "all",
31375
+ label: "All"
31376
+ }
31377
+ ], "3", true),
31378
+ {
31379
+ ...fixedKnob("block.testimonials", "autoAdvance", "Moves on by itself", onOff, "false", false, true),
31380
+ description: "Moves to the next quote every few seconds, and stops while someone's reading."
31381
+ },
31382
+ fixedKnob("block.testimonials", "tilt", "Tilt the small cards", onOff, "true", false, true),
31383
+ {
31384
+ ...fixedKnob("block.testimonials", "archFrame", "Arch frame", onOff, "true", false, true),
31385
+ blockKinds: [
31386
+ "block.testimonials",
31387
+ "block.newsletter-signup",
31388
+ "block.form"
31389
+ ]
31390
+ },
31391
+ fixedKnob("block.hero", "photoTint", "Photo tint", [{
31392
+ value: "dark",
31393
+ label: "Dark"
31394
+ }, {
31395
+ value: "brand",
31396
+ label: "Brand colour"
31397
+ }], "dark"),
31398
+ fixedKnob("block.hero", "candleGlow", "Candle glow", onOff, "true", false, true),
31399
+ fixedKnob("block.hero", "columnGuides", "Column guides", onOff, "true", false, true),
31400
+ fixedKnob("block.hero", "titleSize", "Headline size", heroTitleSizeOptions, "auto", true),
31401
+ fixedKnob("block.hero", "imagePosition", "Photo side", [{
31402
+ value: "left",
31403
+ label: "Left"
31404
+ }, {
31405
+ value: "right",
31406
+ label: "Right"
31407
+ }], "right"),
31408
+ fixedKnob("block.intro", "imageShape", "Media shape", standardImageShapeOptions, "default"),
31409
+ fixedKnob("block.intro", "imagePosition", "Photo side", [{
31410
+ value: "left",
31411
+ label: "Left"
31412
+ }, {
31413
+ value: "right",
31414
+ label: "Right"
31415
+ }], "left"),
31416
+ fixedKnob("block.media-text", "imagePosition", "Photo side", [{
31417
+ value: "left",
31418
+ label: "Left"
31419
+ }, {
31420
+ value: "right",
31421
+ label: "Right"
31422
+ }], "left"),
31423
+ fixedKnob("block.media-text", "imageShape", "Media shape", standardImageShapeOptions, "default"),
31424
+ fixedKnob("block.media-text", "aspectRatio", "Media aspect ratio", standardAspectRatioOptions, "auto"),
31425
+ textKnob("stickerLine", "Sticker line", 32),
31426
+ textKnob("smallCaption", "Small caption", 24),
31427
+ {
31428
+ ...fixedKnob("block.feature-cards", "showPhotos", "Show photos", onOff, "true", false, true),
31429
+ blockKinds: cardListFamilyBlocks
31430
+ },
31431
+ fixedKnob("block.feature-cards", "columns", "Columns", columnCounts, "3", true),
31432
+ fixedKnob("block.image-gallery", "blackAndWhite", "Black and white", onOff, "false", false, true),
31433
+ fixedKnob("block.event-calendar", "listColumns", "Columns", columnCounts, "3", true),
31434
+ fixedKnob("block.event-calendar", "showPhotos", "Photos", [{
31435
+ value: "true",
31436
+ label: "Show"
31437
+ }, {
31438
+ value: "false",
31439
+ label: "Hide"
31440
+ }], "true", false, true),
31441
+ {
31442
+ ...fixedKnob("block.feature-cards", "cardMarker", "Item markers", [
31443
+ {
31444
+ value: "icons",
31445
+ label: "Icons"
31446
+ },
31447
+ {
31448
+ value: "numbers",
31449
+ label: "Numbers"
31450
+ },
31451
+ {
31452
+ value: "none",
31453
+ label: "None"
31454
+ }
31455
+ ], "icons"),
31456
+ blockKinds: cardListFamilyBlocks
31457
+ },
31458
+ fixedKnob("block.body-text", "alignment", "Text alignment", [{
31459
+ value: "left",
31460
+ label: "Left"
31461
+ }, {
31462
+ value: "center",
31463
+ label: "Centre"
31464
+ }], "left"),
31465
+ {
31466
+ ...fixedKnob("block.event-calendar", "showCapacity", "Places left", onOff, "true", false, true),
31467
+ description: "Show how many places are left on each event"
31468
+ }
31469
+ ];
31470
+ systemCustomizeFacetDefinitions.map((definition) => definition.id);
31471
+ Array.from(new Set(systemCustomizeFacetDefinitions.flatMap((definition) => definition.values.map((option) => option.value))));
31472
+ function systemCustomizeFacetDefinitionsForBlock(blockKind) {
31473
+ return systemCustomizeFacetDefinitions.filter((definition) => definition.blockKind === blockKind || "blockKinds" in definition && definition.blockKinds?.some((kind) => kind === blockKind));
31474
+ }
31475
+ //#endregion
31476
+ //#region ../blocks/src/system/customize/arrangementKnobs.ts
31477
+ /**
31478
+ * Content stage for knobs, shared by the renderer and the editor so what the
31479
+ * options show and what renders can't disagree. Knob buffets are the block's
31480
+ * customise facets; the Look exposes, forces or narrows them and the style's
31481
+ * offer can only remove or narrow further.
31482
+ */
31483
+ function resolveArrangementKnobs(input) {
31484
+ const length = input.blockKind === "block.hero" ? resolveHeroTitleLength({ ...input.content }, "look") : null;
31485
+ const exposure = arrangementKnobExposure(input.blockKind, input.look, length, storedSplitPhotoSide(input.blockKind, input.content));
31486
+ return {
31487
+ length,
31488
+ exposure,
31489
+ knobs: resolveEffectiveKnobs({
31490
+ exposure,
31491
+ content: normalizedHeadlinePreference(input.content)
31492
+ })
31493
+ };
31494
+ }
31495
+ function arrangementKnobExposure(blockKind, look, length, splitPhotoSide) {
31496
+ return systemCustomizeFacetDefinitionsForBlock(blockKind).flatMap((facet) => {
31497
+ if (facet.knob === void 0 || facet.target.kind !== "content-field") return [];
31498
+ const id = facet.target.field;
31499
+ const defaults = look.look.structure.knobDefaults ?? {};
31500
+ const storedDefault = id === "imagePosition" ? splitPhotoSide : null;
31501
+ return [{
31502
+ definition: {
31503
+ id,
31504
+ defaultValue: defaults[id] ?? storedDefault ?? facet.defaultValue,
31505
+ values: facet.values.map((value) => value.value),
31506
+ ...knobKindMetadata(facet.knob)
31507
+ },
31508
+ exposed: exposedKnobIds(look).includes(id),
31509
+ forced: look.look.structure.forcedKnobs?.[id],
31510
+ lookValues: look.look.structure.knobValues?.[id],
31511
+ styleValues: look.knobValues[id],
31512
+ lengthValues: id === "titleSize" ? headlineAllowedValues(length) : void 0
31513
+ }];
31514
+ });
31515
+ }
31516
+ /**
31517
+ * A hero stored as "Split, photo on the left" or "Split, photo on the right"
31518
+ * already says which side its photo is on. Under a Look that side is the Photo
31519
+ * side default, so the photo stays where it was until the owner picks a side.
31520
+ */
31521
+ function storedSplitPhotoSide(blockKind, content) {
31522
+ if (blockKind !== "block.hero") return null;
31523
+ switch (content.variant) {
31524
+ case "split": return "left";
31525
+ case "splitReverse": return "right";
31526
+ default: return null;
31527
+ }
31528
+ }
31529
+ function knobKindMetadata(knob) {
31530
+ return knob.kind === "fixed" ? { ordered: knob.ordered } : {
31531
+ ordered: false,
31532
+ textMaxLength: knob.maxLength
31533
+ };
31534
+ }
31535
+ function headlineAllowedValues(length) {
31536
+ switch (length) {
31537
+ case "long": return ["quiet"];
31538
+ case "medium": return ["quiet", "auto"];
31539
+ case "short": return [
31540
+ "quiet",
31541
+ "auto",
31542
+ "display"
31543
+ ];
31544
+ case null: return;
31545
+ }
31546
+ }
31547
+ /** `titleSize` keeps its five stored values; under a Look they read as three steps. */
31548
+ function normalizedHeadlinePreference(content) {
31549
+ switch (content.titleSize) {
31550
+ case "editorial": return {
31551
+ ...content,
31552
+ titleSize: "auto"
31553
+ };
31554
+ case "poster": return {
31555
+ ...content,
31556
+ titleSize: "display"
31557
+ };
31558
+ default: return content;
31559
+ }
31560
+ }
31561
+ function exposedKnobIds(look) {
31562
+ return [...look.look.structure.knobs, ...look.addKnobs ?? []].filter((id) => !look.removeKnobs.some((removed) => removed === id));
31563
+ }
30052
31564
  //#endregion
30053
31565
  //#region ../blocks/src/system/media/slotContracts.ts
30054
31566
  const DEFAULT_MIN_SOURCE_WIDTH = 1200;
@@ -30456,19 +31968,53 @@ function resolveStrategyDelivery(blockKind, fieldPath, slotPath, values) {
30456
31968
  if (blockKind === "block.site-header" && slotPath === "logo") return resolveSmallLogoDeliveryContract();
30457
31969
  if (blockKind === "block.site-footer" && slotPath === "logo") return resolveSmallLogoDeliveryContract();
30458
31970
  }
30459
- /** Only gallery photos use the gallery Look's frame; backgrounds keep their own contract. */
30460
- function galleryMediaFrame(blockKind, path, frame, values) {
30461
- if (blockKind !== "block.image-gallery" || !/^images\.\d+\.image$/.test(path)) return void 0;
30462
- const effective = asRecord(values?._effectiveLook);
31971
+ function isLookPhotoSlot(blockKind, path) {
31972
+ switch (blockKind) {
31973
+ case "block.image-gallery":
31974
+ case "block.media-text": return /^images\.\d+\.image$/.test(path);
31975
+ case "block.intro": return path === "media";
31976
+ default: return false;
31977
+ }
31978
+ }
31979
+ /** Resolve live editor preferences through the same knob owner as the page planner. */
31980
+ function mediaKnobValues(blockKind, mediaLook, values) {
31981
+ const { knobs } = resolveArrangementKnobs({
31982
+ blockKind,
31983
+ look: mediaLook,
31984
+ content: values
31985
+ });
31986
+ return Object.fromEntries(Object.entries(knobs).flatMap(([key, knob]) => knob.kind === "kept" ? [] : [[key, knob.value]]));
31987
+ }
31988
+ /** Delivery receives content whose knob choices have already been resolved by the page planner. */
31989
+ function renderedLookMediaFrame(values) {
31990
+ const effective = asRecord(values._effectiveLook);
30463
31991
  const look = blockAppearancePresets.find((candidate) => candidate.id === effectiveLookId(values));
30464
- const declared = frame ?? resolveLookMediaFrame(look?.structure.kind === "arrangement" ? look.structure.mediaFrame : void 0, asString(effective?.skin));
30465
- return declared?.kind === "fixed" ? declared : void 0;
31992
+ if (look?.structure.kind !== "arrangement") return void 0;
31993
+ return resolveLookMediaFrame(look.structure.mediaFrame, asString(effective?.skin), {
31994
+ ...values,
31995
+ ...look.structure.forcedKnobs
31996
+ });
31997
+ }
31998
+ function editorLookMediaFrame(blockKind, mediaLook, values) {
31999
+ return resolveLookMediaFrame(mediaLook.look.structure.mediaFrame, mediaLook.skin, mediaKnobValues(blockKind, mediaLook, values));
32000
+ }
32001
+ /** Backgrounds and other photos keep their own contract. */
32002
+ function slotLookMediaFrame(blockKind, path, input) {
32003
+ if (!blockKind || !isLookPhotoSlot(blockKind, path)) return void 0;
32004
+ if (input.lookMediaFrame) return input.lookMediaFrame;
32005
+ const values = input.values ?? {};
32006
+ return input.mediaLook ? editorLookMediaFrame(blockKind, input.mediaLook, values) : renderedLookMediaFrame(values);
30466
32007
  }
30467
- /** The slot contract plus the gallery Look frame it was decided from, so callers needn't resolve the frame again. */
30468
- function resolveMediaSlot({ blockKind, fieldPath, values, fieldAspectRatio, fieldUi, lookMediaFrame }) {
32008
+ /** The contract and its decided frame, shared by editor presentation and delivery. */
32009
+ function resolveMediaSlot({ blockKind, fieldPath, values, fieldAspectRatio, fieldUi, lookMediaFrame, mediaLook }) {
30469
32010
  const slotPath = normalizeSlotPath(fieldPath);
30470
32011
  const variant = asString(values?.variant);
30471
- const frame = galleryMediaFrame(blockKind, fieldPath, lookMediaFrame, values);
32012
+ const declared = slotLookMediaFrame(blockKind, fieldPath, {
32013
+ lookMediaFrame,
32014
+ mediaLook,
32015
+ values
32016
+ });
32017
+ const frame = declared?.kind === "fixed" ? declared : void 0;
30472
32018
  const edit = frame ? {
30473
32019
  mode: "fixed-aspect",
30474
32020
  aspectRatio: frame.aspectRatio,
@@ -30479,7 +32025,7 @@ function resolveMediaSlot({ blockKind, fieldPath, values, fieldAspectRatio, fiel
30479
32025
  const strategyDelivery = resolveStrategyDelivery(blockKind, fieldPath, slotPath, values);
30480
32026
  return {
30481
32027
  contract: buildContract(edit, mergeDelivery(mergeDelivery(defaultDelivery, fieldDelivery), strategyDelivery)),
30482
- galleryFrame: frame
32028
+ mediaFrame: frame
30483
32029
  };
30484
32030
  }
30485
32031
  function resolveMediaSlotContract(input) {
@@ -30763,7 +32309,7 @@ function resolveMediaNodeAspectRatios(size, style, slotContract) {
30763
32309
  const slotAspect = slotContract?.edit.mode === "fixed-aspect" ? slotContract.edit.aspectRatio : void 0;
30764
32310
  return {
30765
32311
  targetAspectRatio: parseAspectRatioValue(slotAspect),
30766
- transformAspectRatio: resolveStyleAspectRatio(style) ?? slotAspect ?? resolveTargetAspectRatio(size)
32312
+ transformAspectRatio: slotAspect ?? resolveStyleAspectRatio(style) ?? resolveTargetAspectRatio(size)
30767
32313
  };
30768
32314
  }
30769
32315
  function resolveMediaNodeResponsiveImage(value, size, style, slot, context) {
@@ -31348,7 +32894,7 @@ function shownVenue(event, display) {
31348
32894
  }
31349
32895
  /** Full/waitlist explanations remain visible even when optional counts are hidden. */
31350
32896
  function placesLeftLabel(source, display, wording = {}) {
31351
- if ("kind" in source) return ticketPlacesLabel(source.remaining, display);
32897
+ if ("kind" in source) return ticketPlacesLabel(source, display);
31352
32898
  if (source.deliveryMode === "hybrid" && source.attendanceModes?.length) return hybridPlacesLabel(source, display, wording);
31353
32899
  return capacityPlacesLabel(source, display, wording);
31354
32900
  }
@@ -31370,7 +32916,9 @@ function hybridPlacesLabel(event, display, wording) {
31370
32916
  return label ? [`${mode.mode === "online" ? "Online" : "In person"}: ${label}`] : [];
31371
32917
  }).join(" · ") || null;
31372
32918
  }
31373
- function ticketPlacesLabel(remaining, display) {
32919
+ function ticketPlacesLabel(source, display) {
32920
+ const { remaining, dateRemaining } = source;
32921
+ if (remaining !== null && dateRemaining !== null && remaining >= dateRemaining) return null;
31374
32922
  if (remaining !== null && remaining > 0 && display.placesLeft === "hidden") return null;
31375
32923
  return formatTicketTypeRemaining(remaining);
31376
32924
  }
@@ -32263,40 +33811,74 @@ function selectionPreviewKey(code, lines) {
32263
33811
  if (code !== null && !trimmed || !lines) return null;
32264
33812
  return JSON.stringify([trimmed, lines]);
32265
33813
  }
33814
+ /**
33815
+ * The lines' sum, shown as "Subtotal" only when something comes off it;
33816
+ * otherwise the lines lead straight to the total.
33817
+ */
33818
+ function paymentSubtotal(subtotalCents, reductions) {
33819
+ return reductions.length > 0 ? subtotalCents : null;
33820
+ }
33821
+ /** "4 dates, 1 place on each", above the list. */
33822
+ function paymentCaption(several, items, places) {
33823
+ return `${plural(items, several === "runs" ? "run" : "date")}, ${plural(places, "place")} on each`;
33824
+ }
33825
+ /** The multiplier for a line, when its amount splits evenly into a price per place. */
33826
+ function paymentLine(input) {
33827
+ const { key, label, amountCents, places, unitPriceCents } = input;
33828
+ return {
33829
+ key,
33830
+ label,
33831
+ amountCents,
33832
+ multiplier: places > 1 && unitPriceCents !== null && unitPriceCents * places === amountCents ? {
33833
+ places,
33834
+ unitPriceCents
33835
+ } : null
33836
+ };
33837
+ }
32266
33838
  const USUAL_PRICE = "At the usual price";
32267
- function plannedGroups(plan) {
33839
+ function plannedGroups(plan, unitPrices) {
32268
33840
  const label = (lineId) => plan.lines.find((row) => row.line.lineId === lineId)?.line.label ?? "";
32269
33841
  const combined = plan.applications.map((app, index) => ({
32270
33842
  key: `combination-${index}`,
32271
33843
  heading: app.offer.label,
32272
- lines: app.allocations.map((row) => ({
33844
+ lines: app.allocations.map((row) => paymentLine({
32273
33845
  key: row.lineId,
32274
33846
  label: label(row.lineId),
32275
- amountCents: row.totalCents
33847
+ amountCents: row.totalCents,
33848
+ places: plan.places,
33849
+ unitPriceCents: null
32276
33850
  }))
32277
33851
  }));
32278
- const usual = plan.lines.filter((row) => !row.combined).map((row) => ({
32279
- key: row.line.lineId,
32280
- label: row.line.label,
32281
- amountCents: row.listCents
32282
- }));
33852
+ const usual = plan.lines.filter((row) => !row.combined).map((row) => planLine(plan, unitPrices, row.line.lineId, row.line.label, row.listCents));
32283
33853
  return [...combined, ...usual.length > 0 ? [{
32284
33854
  key: "usual",
32285
33855
  heading: USUAL_PRICE,
32286
33856
  lines: usual
32287
33857
  }] : []];
32288
33858
  }
32289
- function usualGroups(plan) {
33859
+ function usualGroups(plan, unitPrices) {
32290
33860
  return [{
32291
33861
  key: "usual",
32292
33862
  heading: null,
32293
- lines: plan.lines.map((row) => ({
32294
- key: row.line.lineId,
32295
- label: row.line.label,
32296
- amountCents: row.listCents
32297
- }))
33863
+ lines: plan.lines.map((row) => planLine(plan, unitPrices, row.line.lineId, row.line.label, row.listCents))
32298
33864
  }];
32299
33865
  }
33866
+ function selectionUnitPrices(selection, unitPriceOf) {
33867
+ return new Map(selection.flatMap((event) => {
33868
+ const unitPriceCents = unitPriceOf(event);
33869
+ return unitPriceCents === null ? [] : [[lineIdOf(event), unitPriceCents]];
33870
+ }));
33871
+ }
33872
+ /** An item at its usual price, with its known price per place. */
33873
+ function planLine(plan, unitPrices, key, label, amountCents) {
33874
+ return paymentLine({
33875
+ key,
33876
+ label,
33877
+ amountCents,
33878
+ places: plan.places,
33879
+ unitPriceCents: unitPrices.get(key) ?? null
33880
+ });
33881
+ }
32300
33882
  function sumKind(reductions, kind) {
32301
33883
  return reductions.filter((row) => row.kind === kind).reduce((sum, row) => sum + row.amountCents, 0);
32302
33884
  }
@@ -32318,8 +33900,8 @@ function codeNote(plan, several) {
32318
33900
  const noun = several === "dates" ? "date" : "run";
32319
33901
  return `This code can’t be used with the “${label}” price, so it’s been taken off your other ${others === 1 ? noun : `${noun}s`}.`;
32320
33902
  }
32321
- function placesLabel$1(several, places) {
32322
- return `${plural(places, "place")} on each ${several === "runs" ? "run" : "date"}`;
33903
+ function planCaption(plan, several) {
33904
+ return paymentCaption(several, plan.lines.length, plan.places);
32323
33905
  }
32324
33906
  /**
32325
33907
  * The payment step's list when combinations apply: each combination's items
@@ -32338,9 +33920,9 @@ function summariseCombinedPayment(input) {
32338
33920
  if (!planCombines(plan)) return null;
32339
33921
  return {
32340
33922
  kind: "combined",
32341
- placesLabel: placesLabel$1(input.several, plan.places),
32342
- groups: plannedGroups(plan),
32343
- subtotalCents: plan.totalCents,
33923
+ caption: planCaption(plan, input.several),
33924
+ groups: plannedGroups(plan, input.unitPrices),
33925
+ subtotalCents: null,
32344
33926
  reductions: [],
32345
33927
  note: null,
32346
33928
  totalCents: plan.totalCents,
@@ -32377,7 +33959,7 @@ function previewedPayment(input) {
32377
33959
  const codeRows = code.amountCents > 0 ? [code] : [];
32378
33960
  const base = {
32379
33961
  kind: "combined",
32380
- placesLabel: placesLabel$1(input.several, plan.places),
33962
+ caption: planCaption(plan, input.several),
32381
33963
  note: null,
32382
33964
  totalCents: preview.totalAfterDiscountCents,
32383
33965
  savingCents: savingFrom(plan, preview.totalAfterDiscountCents)
@@ -32387,16 +33969,16 @@ function previewedPayment(input) {
32387
33969
  const limited = quote.source === "typed" && preview.type === "applied" && preview.codeCombinesWithCombinationPrices === false && code.amountCents > 0;
32388
33970
  return {
32389
33971
  ...base,
32390
- groups: plannedGroups(plan),
32391
- subtotalCents: plan.totalCents,
33972
+ groups: plannedGroups(plan, input.unitPrices),
33973
+ subtotalCents: paymentSubtotal(plan.totalCents, codeRows),
32392
33974
  reductions: codeRows,
32393
33975
  note: limited ? codeNote(plan, input.several) : null
32394
33976
  };
32395
33977
  }
32396
33978
  case "usual": return {
32397
33979
  ...base,
32398
- groups: usualGroups(plan),
32399
- subtotalCents: plan.listTotalCents,
33980
+ groups: usualGroups(plan, input.unitPrices),
33981
+ subtotalCents: paymentSubtotal(plan.listTotalCents, codeRows),
32400
33982
  reductions: codeRows
32401
33983
  };
32402
33984
  case "server": {
@@ -32408,8 +33990,8 @@ function previewedPayment(input) {
32408
33990
  const sameBasket = preview.subtotalCents === plan.listTotalCents;
32409
33991
  return {
32410
33992
  ...base,
32411
- groups: sameBasket ? usualGroups(plan) : [],
32412
- subtotalCents: preview.subtotalCents,
33993
+ groups: sameBasket ? usualGroups(plan, input.unitPrices) : [],
33994
+ subtotalCents: paymentSubtotal(preview.subtotalCents, rows),
32413
33995
  reductions: rows
32414
33996
  };
32415
33997
  }
@@ -32740,17 +34322,22 @@ function summariseSelectionPayment(input) {
32740
34322
  const { several, quote } = input;
32741
34323
  if (several === null || input.ready === false) return null;
32742
34324
  const combination = input.price.combination;
34325
+ const unitPrices = selectionUnitPrices(input.selection, (event) => itemPriceCents({
34326
+ ...input,
34327
+ several
34328
+ }, event)?.unitPriceCents ?? null);
32743
34329
  return (combination ? summariseCombinedPayment({
32744
34330
  plan: combination,
32745
34331
  several,
32746
- quote
34332
+ quote,
34333
+ unitPrices
32747
34334
  }) : null) ?? plainSelectionPayment({
32748
34335
  ...input,
32749
34336
  several,
32750
34337
  listTotalCents
32751
34338
  });
32752
34339
  }
32753
- /** Several items without combination prices: each at its price, the places, any automatic code, the total. */
34340
+ /** Several items without combination prices: each at its price for all places, any automatic code, the total. */
32754
34341
  function plainSelectionPayment(input) {
32755
34342
  const { several, quote, listTotalCents } = input;
32756
34343
  const lines = input.selection.map((event) => ({
@@ -32758,19 +34345,22 @@ function plainSelectionPayment(input) {
32758
34345
  label: selectionItemName(event, input.selection),
32759
34346
  price: itemPriceCents(input, event)
32760
34347
  }));
32761
- const priced = lines.flatMap((line) => line.price === null ? [] : [{
34348
+ const priced = lines.flatMap((line) => line.price === null ? [] : [paymentLine({
32762
34349
  key: line.key,
32763
- label: line.price.unitPriceCents === null ? `${line.label} (${countLabel(input.places, "place")})` : line.label,
32764
- amountCents: line.price.unitPriceCents ?? line.price.subtotalCents
32765
- }]);
34350
+ label: line.label,
34351
+ amountCents: line.price.subtotalCents,
34352
+ places: input.places,
34353
+ unitPriceCents: line.price.unitPriceCents
34354
+ })]);
32766
34355
  const totalCents = quote ? quote.preview.totalAfterDiscountCents : input.price.totalCents;
32767
34356
  if (priced.length !== lines.length || listTotalCents === null || totalCents === null) return null;
34357
+ const reductions = quoteReductions(quote);
32768
34358
  return {
32769
34359
  kind: "plain",
34360
+ caption: paymentCaption(several, priced.length, input.places),
32770
34361
  lines: priced,
32771
- placesLabel: `${countLabel(input.places, "place")} on each ${several === "runs" ? "run" : "date"}`,
32772
- subtotalCents: listTotalCents,
32773
- reductions: quoteReductions(quote),
34362
+ subtotalCents: paymentSubtotal(listTotalCents, reductions),
34363
+ reductions,
32774
34364
  totalCents
32775
34365
  };
32776
34366
  }
@@ -36091,4 +37681,4 @@ function membershipCardListContent(display) {
36091
37681
  };
36092
37682
  }
36093
37683
  //#endregion
36094
- export { resolveHeadlessEventRegistrationStatus as $, arrangementAppearancePresets as $a, reconcileBookingPackagePurchase as $i, getSingleSelectedPricingOptionId as $n, transitionIntentForTreatment as $o, formatTotalCapacity as $r, asDesignBlockId as $s, runPricingChoice as $t, createInitialRegistrationFlowState as A, pageNavigationSchema as Aa, publicEventPricingStrategy as Ac, formatPrice as Ai, formatDate as An, footerForegroundCandidates as Ao, buildCalendarViewport as Ar, selectLogoVariant as As, toEventSignInDraft as At, placeCountCeiling as B, defineClientOwnedBlockRuntime as Ba, bookingQuestionsPaymentSnapshotSchema as Bi, transformRegistrationOptionsResponse as Bn, resolvePageDesignBlockLookChoice as Bo, formatEventHourLabel as Br, boxBackgroundSchema as Bs, toRunRequirementsSnapshots as Bt, panelShouldOpen as C, resolveDateRuntimeContext as Ca, offeringLabelForPageSurfaceSubject as Cc, resolveBookingPaymentStep as Ci, selectionPreviewKey as Cn, stripCompiledRuntimeStyleFields as Co, renderAudio as Cr, sectionBackgroundPaintValues as Cs, toRegistrationEvents as Ct, registrationStepLabel as D, PAGE_NAVIGATION as Da, isPublicEventPricingOptionDisplayable as Dc, selectedBookingCollectionOptionKind as Di, areEntitlementsDisabledForTicketCount as Dn, resolveCardRole as Do, resolveImageUrlWithContext as Dr, cardListKnobBlocks as Ds, eventSignInDraftStore as Dt, registrationRoute as E, getBlockApiReadStage as Ea, formatEventPricing as Ec, resolveDefaultBookingServiceId as Ei, ENTITLEMENT_SINGLE_TICKET_TOOLTIP as En, getGradientPreset as Eo, resolveImageUrl as Er, cardListFamilyBlocks as Es, EVENT_SIGN_IN_FORM_ID as Et, buildEventRegistrationPaymentOptionsViewModel as F, defineInteractiveIslandMetaKeys as Fa, unsafeAsSiteId as Fc, appointmentQuestionsRefusal as Fi, getImplicitSingleTicketType as Fn, generateInteractiveChildInheritanceCSS as Fo, formatCalendarTitle as Fr, themeSchema as Fs, deriveRunRequirements as Ft, resolveRegistrationAvailabilityBlocker as G, listLookSlot as Ga, toBookingQuestionsAnswerDraft as Gi, getSlidingScaleForEvent as Gn, boundaryOptionForTransitionIntent as Go, formatTime$1 as Gr, itemRoleValues as Gs, decideSelectionPayment as Gt, planRegistrationDetailsContinuation as H, isDecodeSuccess as Ha, deriveBookingQuestions as Hi, getCurrentTicketSelection as Hn, sectionShapeForGround as Ho, formatEventRunDates as Hr, boxlessCardVariantValue as Hs, SELECTION_LIMIT_NOTE as Ht, decideEventRegistrationPayment as I, eventRegistrationPageSurfaceSubjectSchema as Ia, parseEventSeriesId as Ic, deriveAppointmentBookingQuestions as Ii, getPortalSubjectEmail as In, navLinkHoverColorCandidate as Io, formatDate$1 as Ir, headerVariantValues as Is, nextRunToRead as It, visitorHoldsOwnPlace as J, itemRole as Ja, BOOKING_FORM_DATA_RESERVED_KEY_VALUES as Ji, parseCurrencyInputToCents as Jn, boundaryTreatmentForBoundaryOptionId as Jo, resolveRuntimeEventDestination as Jr, parseGradientPresetId as Js, planSelectionPrice as Jt, resolveRegistrationTicketContinuation as K, lookListPresentationSchemaShape as Ka, toBookingQuestionsPaymentSnapshot as Ki, getSlidingScaleSelectionMessage as Kn, boundaryOptions as Ko, groupEventsByDate as Kr, openCardRoleValue as Ks, effectiveSelection as Kt, shouldPromptForLogin as L, normalizeEventRegistrationPageSurfaceSubject as La, unsafeAsEventCategoryId as Lc, isAppointmentBookingQuestionsEvent as Li, getTicketTypeAvailabilityLabel as Ln, navLinkOwnsHoverForeground as Lo, formatEventClockLabel as Lr, blockCustomCssRuleSchema as Ls, runFieldErrors as Lt, getDeclinedPass as M, bookingPageKindSchema as Ma, resolveExactOrFreePriceDisplay as Mc, resolveSelectedAppointmentConsent as Mi, formatPassCreditUsageLabel as Mn, buildTextContrastShadow as Mo, eventDateLocale as Mr, arrangementSlotNames as Ms, buildSelectionRequirementsSubmission as Mt, isRegistrationLocked as N, buildInteractiveIslandProps as Na, resolvePricingOptionsPriceDisplay as Nc, EMPTY_APPOINTMENT_BOOKING_QUESTIONS as Ni, formatRegistrationSchedule as Nn, generateNavLinkCSS as No, eventDateOptions as Nr, TokenResolver as Ns, checkRunRequirements as Nt, registrationStepLabelContext as O, canonicalUrl as Oa, publicEventPricingCurrency as Oc, toSelectedCollectionOptionKind as Oi, findSelectedTicketType as On, generateDefaultCardSystem as Oo, resolveMediaNodeResponsiveImage as Or, opaqueSurfaceContextFromTheme as Os, eventSignInEnds as Ot, registrationFlowReducer as P, createInteractiveIslandCodec as Pa, parseSiteId as Pc, applyAppointmentBookingQuestionsEvent as Pi, formatTime as Pn, generateEffectsCSS as Po, eventLocalDateKey as Pr, sectionStylesOverrideSchema as Ps, decideSelectionRequirementsLayout as Pt, resolveEventRegistrationSubmitPlan as Q, generateLookMediaFrameCss as Qa, bookingRequiresResourceSelection as Qi, canRequestTicketOption as Qn, spaciousBoundaryOption as Qo, formatRemainingPlaces as Qr, asAppearancePresetId as Qs, runNeedsPricingChoice as Qt, fullyBookedLabel as R, resolveEventRegistrationScopedEvents as Ra, needsAppointmentQuestionsRefresh as Ri, getVisibleTicketTypes as Rn, navLinkOwnsUnderline as Ro, formatEventCompactDateRail as Rr, customCssRuleSchema as Rs, runRequirementsSnapshotSchema as Rt, getEventSelectionMode as S, readRuntimeNow as Sa, parseNewsletterListId as Sc, resolveAppointmentCheckoutVerificationState as Si, selectionItemName as Sn, compiledRuntimeStyleFieldNames as So, mediaImageHostProps as Sr, plainFrame as Ss, getRegistrationStartAt as St, registrationPresentation as T, createHostedBlockApiConfig as Ta, formatBookingPriceDisplay as Tc, resolveBookingSiteId as Ti, serverPricedTotalCents as Tn, gradientToCss as To, resolveImageSourceSetWithContext as Tr, toNonEmptyReadonlyArray as Ts, toWholeSeriesRegistrationEvents as Tt, resolveGuestNextStepCheck as U, listItemPresentation as Ua, needsBookingQuestionsRefresh as Ui, getEligibilityFlowFlags as Un, sectionShapeFromContent as Uo, formatEventTimeRange as Ur, cardRoleSchema as Us, SEVERAL_BOOKINGS_ACCOUNT_NOTE as Ut, planRegistrationDetailsCheck as V, defineProgressiveBlockRuntime as Va, decideBookingQuestionsRestoration as Vi, withOccurrenceTitle as Vn, resolvePageDesignBoundaryChoice as Vo, formatEventNextDateFact as Vr, runtimeBoxBackgroundSchema as Vs, withoutKeptAnswers as Vt, resolveRegistrationAdmission as W, listLookControl as Wa, restoreBookingQuestionsAnswers as Wi, getRegistrationOccurrenceId as Wn, sectionShapeHook as Wo, formatEventWeekdayTime as Wr, cardVariantRoleValues as Ws, canToggleSelectionItem as Wt, isEventRegistrationAvailable as X, resolveLookSurfacePresentation as Xa, bookingHasPackagePaymentChoices as Xi, shouldLoadRegistrationOptions as Xn, noneBoundaryOption as Xo, canJoinEventWaitlistOnAnyMode as Xr, asHeaderStyleId as Xs, registrationSelectionMode as Xt, deriveEventRegistrationSteps as Y, lookPresentationOnPalette as Ya, applyBookingPaymentAdmission as Yi, resolveHeldTicketPlaces as Yn, isDecorativeTransitionIntent as Yo, canJoinEventWaitlist as Yr, asHeaderLayoutId as Ys, primarySelectionItem as Yt, normalizeEventRegistrationMaxTickets as Z, selectItemSurfacePresentation as Za, bookingPackageRequestKey as Zi, withRegistrationAvailability as Zn, softBoundaryOption as Zo, formatEventRemainingPlaces as Zr, siteChromeBackgroundOverrideOwner as Zs, runChoiceUsable as Zt, parseStoredCommerceCartState as _, registrationButtonVariantSchema as _a, DEFAULT_MAILING_LIST_PRIVACY_NOTE as _c, isSameOpenCheckout as _i, combinationHintCopy as _n, componentRuntimeRulesForSiteStyle as _o, shownVenue as _r, defineNoBlockDesignCapability as _s, invitationSubmission as _t, buildProductDetailDisplay as a, resolveBookingPurchasablePackages as aa, parseAspectRatioValue as ac, selectMostOpenCapacitySource as ai, selectionIncludes as an, resolveArrangementLookForBlock as ao, setTicketLineQuantity as ar, resolveSectionBackground as as, buildReviewedBookingPaymentViewModel as at, resolveSelectedProduct as b, blockButtonRoleSchema as ba, parseMailchimpAudienceId as bc, parseBookingCurrencyInputToCents as bi, combinationWorking as bn, requireCuratedSiteStyle as bo, MediaPlaceholder as br, introCompositionTreatmentValues as bs, confirmationPaymentRows as bt, formatInterval as c, bookingNowSchema as ca, decideSelectionAttendance as cc, buildBookingFormInteractiveIslandProps as ci, selectionPlacesLabel as cn, arrangementManifestFromVariants as co, decideSignInReturn as cr, stripStaleTransitionStyleGroup as cs, buildRegistrationSelectionRequest as ct, membershipClassesLabel as d, eventButtonVariantSchema as da, nextLiveRunSessionStartMs as dc, formatBookingSubmissionPreparationError as di, selectionTicketInputs as dn, resolveModeArrangement as do, signInReturnPath as dr, resolveEffectiveKnobs as ds, resolveEventRequiresPayment as dt, resolveBookingPackagePaymentSelection as ea, asLayoutVariantKey as ec, getEventAvailability as ei, runUnitPriceCents as en, arrangementLookHooks as eo, getTicketLineQuantity as er, anglePolygonCss as es, resolveHeadlessEventRegistrationView as et, passCardListContent as f, eventCalendarDefaultViewSchema as fa, orderedLiveRunSessions as fc, getBookingRedirectStateFromLocation as fi, severalConfirmationSentence as fn, resolvePublishedLook as fo, sweepExpiredSignInReturnDrafts as fr, lookModes as fs, resolveRegistrationTarget as ft, deriveCommerceCheckoutState as g, previewStageSchema as ga, resolveBookingSignupOffer as gc, isBookingServiceSlidingAmountInRange as gi, toggleSelectionItem as gn, filterLookIdsForPolicy as go, resolveRegistrationDisplay as gr, defineFrameCapability as gs, createRegistrationDraftData as gt, buildProductCartItem as h, filterAutoShowSchema as ha, parseMailingListRuntimeContext as hc, getShopSuccessCopy as hi, summariseSelectionPayment as hn, filterLayoutProfilesForPolicy as ho, registrationDisplaySchema as hr, defineExactCatalog as hs, beginWaitlistInvitation as ht, buildProductCardDisplay as i, resolveBookingPaymentMode as ia, sanitizeHref as ic, selectEventCapacitySource as ii, selectionEntitlementNote as in, getCompatibleBlockAppearancePresets as io, normalizeTicketSelectionLines as ir, parseCanonicalRuntimeBackground as is, buildBookingPaymentSelectionViewModel as it, decideEventChoice as j, requestSignIn as ja, publicEventPricingType as jc, projectSelectedAppointmentConsentIntoForm as ji, formatEventDateTime as jn, getNavLinkPreset as jo, eventCalendarWeekStart as jr, surfaceToneFromForegroundToken as js, paymentReturnRestoration as jt, areEventRegistrationPaymentSelectionsEqual as k, leavePage as ka, publicEventPricingDisplay as kc, formatCentsAsCurrencyInput as ki, formatBookingWhen as kn, generateFooterCss as ko, resolvePublicMediaUrl as kr, opaqueSurfaceDeclarations as ks, eventSignInRestoration as kt, formatValidity as l, calendarTabViewsSchema as la, CANCELLED_SESSION_STATUS as lc, readOverrideServiceCategories as li, selectionPlacesNote as ln, readStoredMode as lo, nextSignInReturnExpiry as lr, themeV2CompilerOwnedFieldNames as ls, findPreSelectedEvent as lt, buildPassCartItem as m, eventLayoutSchema as ma, resolveWholeSeriesRunLifecycle as mc, getRegistrationSuccessCopy as mi, severalRunsChoiceMessage as mn, deriveSiteStyleBlockPolicy as mo, placesLeftLabel as mr, defineBlockDesignCapability as ms, toRegistrationRequestSubject as mt, buildCheckoutDisplay as n, resolveBookingPaymentAvailability as na, asSiteStyleId as nc, getRemainingPlaces as ni, selectionConfirmationHint as nn, automaticArrangementLook as no, getTicketTypeLineMax as nr, applyLookPhotoTreatment as ns, toInternalPaymentSelection as nt, buildProductListDisplay as o, toBookingPurchasablePackages as oa, isRecord$4 as oc, groupPublicEventsByRun as oi, selectionItemPrice as on, resolveLookForBlock as oo, clearSignInReturnDrafts as or, sectionForegroundBackground as os, paymentChoiceDetails as ot, EMPTY_COMMERCE_CART_STATE as p, eventCalendarDisplayModeSchema as pa, resolveWholeSeriesBookingPhase as pc, getBookingSuccessCopy as pi, severalItemsOf as pn, buildInitialPolicyPageDesignIntent as po, bookingPresentation as pr, assertNever as ps, resolveRouteRequiresPayment as pt, settledRemainingPlaces as q, resolvedItemSurfaceProps as qa, BOOKING_FORM_DATA_RESERVED_KEYS as qi, getTicketSelectionRemainingPlaces as qn, boundaryRuntimeMetricsForDecorativeTransition as qo, resolveEventTimeZone as qr, surfaceCardRoleValues as qs, incompleteRunChoiceMessage as qt, buildPassesMembershipsDisplay as r, resolveBookingPaymentChoice as ra, makeBoundaryId as rc, isEventFull as ri, selectionConsentLabel as rn, compileArrangementLookRuntime as ro, hasValidPricingOptionSelection as rr, deriveSectionGround as rs, calculateEventRegistrationPreviewTotal as rt, formatCommercePrice as s, getBookingServiceSlidingScale as sa, INCOMPATIBLE_ATTENDANCE_MESSAGE as sc, bookingFormInteractiveIslandPropsCodec as si, selectionItemsLabel as sn, styleSectionBackgroundForColour as so, createSignInReturnDraftStore as sr, sectionSurfaceBase as ss, paymentChoicePrice as st, buildCartDisplay as t, resolveBookingPackageSources as ta, asPageFlowPresetId as tc, getEventAvailabilityStatus as ti, selectionAtLimit as tn, arrangementStyleAvailability as to, getTicketSelectionTotal as tr, transitionCatalogueEntries as ts, toHeadlessPaymentSelection as tt, membershipCardListContent as u, columnOptionSchema as ua, firstLiveRunSessionStartMs as uc, deriveBookingFormViewState as ui, selectionRowAvailability as un, resolveEffectiveArrangement as uo, readSignInReturn as ur, appearancePresets as us, resolveDiscountContext as ut, productItemKey as v, weekStartSchema as va, DEFAULT_MAILING_LIST_SUCCESS_MESSAGE as vc, normalizeBookingFormConfig as vi, combinationOfferLine as vn, designRuntimeRulesForSiteStyle as vo, RichText as vr, designIssueSeverityForPolicy as vs, registrationQuestionsMessage as vt, registrationPaymentRoute as w, browserReadAuthoritySchema as wa, EVENT_PRESET_VOCABULARY as wc, resolveBookingSelectedService as wi, selectionPreviewLines as wn, surfaceResolutionContextFromTheme as wo, renderVideo as wr, testimonialsCompositionTreatmentValues as ws, toWholeSeriesRegistrationEvent as wt, REGISTRATION_STEP_LABELS as x, isBlockButtonRole as xa, parseMailchimpInterestId as xc, prepareBookingSubmission as xi, selectionCombinationHint as xn, compilePageRuntimeFields as xo, computeMediaTransformStyle as xr, offeringsPreviewCompositionTreatmentValues as xs, resolveFinishedPresentation as xt, reduceCommerceCart as y, BLOCK_BUTTON_ROLE_OPTIONS as ya, parseBrevoListId as yc, normalizeBookingServices as yi, combinationOffersOf as yn, getCuratedSiteStyle as yo, ImagePresets as yr, featureCardCompositionTreatmentValues as ys, validateFormData as yt, getTicketSelectionPurpose as z, createZodCodec as za, bookingQuestionsAnswerDraftSchema as zi, occurrenceTitleOverride as zn, parsePageDesignIntent as zo, formatEventDateParts as zr, boxBackgroundOverlaySchema as zs, runsKeepingAnswers as zt };
37684
+ export { resolveHeadlessEventRegistrationStatus as $, isBookableEvent as $a, publicEventPricingCurrency as $c, bookingHasPackagePaymentChoices as $i, getSingleSelectedPricingOptionId as $n, gradientToCss as $o, formatEventCompactDateRail as $r, opaqueSurfaceContextFromTheme as $s, runPricingChoice as $t, createInitialRegistrationFlowState as A, PAGE_NAVIGATION as Aa, sanitizeHref as Ac, selectedBookingCollectionOptionKind as Ai, formatDate as An, automaticArrangementLook as Ao, resolveArrangementKnobs as Ar, applyLookPhotoTreatment as As, toEventSignInDraft as At, placeCountCeiling as B, normalizeEventRegistrationPageSurfaceSubject as Ba, parseMailingListRuntimeContext as Bc, isAppointmentBookingQuestionsEvent as Bi, transformRegistrationOptionsResponse as Bn, resolvePublishedLook as Bo, runTransforms as Br, assertNever as Bs, toRunRequirementsSnapshots as Bt, panelShouldOpen as C, blockButtonRoleSchema as Ca, siteChromeBackgroundOverrideOwner as Cc, parseBookingCurrencyInputToCents as Ci, selectionPreviewKey as Cn, resolveLookSurfacePresentation as Co, renderAudio as Cr, isDecorativeTransitionIntent as Cs, toRegistrationEvents as Ct, registrationStepLabel as D, browserReadAuthoritySchema as Da, asPageFlowPresetId as Dc, resolveBookingSelectedService as Di, areEntitlementsDisabledForTicketCount as Dn, arrangementAppearancePresets as Do, resolveImageUrlWithContext as Dr, transitionIntentForTreatment as Ds, eventSignInDraftStore as Dt, registrationRoute as E, resolveDateRuntimeContext as Ea, asLayoutVariantKey as Ec, resolveBookingPaymentStep as Ei, ENTITLEMENT_SINGLE_TICKET_TOOLTIP as En, resolveLookMediaFrame as Eo, resolveImageUrl as Er, spaciousBoundaryOption as Es, EVENT_SIGN_IN_FORM_ID as Et, buildEventRegistrationPaymentOptionsViewModel as F, bookingPageKindSchema as Fa, CANCELLED_SESSION_STATUS as Fc, resolveSelectedAppointmentConsent as Fi, getImplicitSingleTicketType as Fn, styleSectionBackgroundForColour as Fo, uiTransforms as Fr, sectionSurfaceBase as Fs, deriveRunRequirements as Ft, resolveRegistrationAvailabilityBlocker as G, isOrdinaryPublicEvent as Ga, parseMailchimpAudienceId as Gc, deriveBookingQuestions as Gi, getSlidingScaleForEvent as Gn, componentRuntimeRulesForSiteStyle as Go, buildCalendarViewport as Gr, designIssueSeverityForPolicy as Gs, decideSelectionPayment as Gt, planRegistrationDetailsContinuation as H, resolveEventRegistrationScopedEvents as Ha, DEFAULT_MAILING_LIST_PRIVACY_NOTE as Hc, bookingQuestionsAnswerDraftSchema as Hi, getCurrentTicketSelection as Hn, deriveSiteStyleBlockPolicy as Ho, isInlineTextEmpty as Hr, defineExactCatalog as Hs, SELECTION_LIMIT_NOTE as Ht, decideEventRegistrationPayment as I, buildInteractiveIslandProps as Ia, nextLiveRunSessionStartMs as Ic, EMPTY_APPOINTMENT_BOOKING_QUESTIONS as Ii, getPortalSubjectEmail as In, arrangementManifestFromVariants as Io, SECTION_STATE_KINDS as Ir, stripStaleTransitionStyleGroup as Is, nextRunToRead as It, visitorHoldsOwnPlace as J, planWholeSeriesParentBooking as Ja, offeringLabelForPageSurfaceSubject as Jc, toBookingQuestionsAnswerDraft as Ji, parseCurrencyInputToCents as Jn, requireCuratedSiteStyle as Jo, eventDateOptions as Jr, offeringsPreviewCompositionTreatmentValues as Js, planSelectionPrice as Jt, resolveRegistrationTicketContinuation as K, planDropInPanel as Ka, parseMailchimpInterestId as Kc, needsBookingQuestionsRefresh as Ki, getSlidingScaleSelectionMessage as Kn, designRuntimeRulesForSiteStyle as Ko, eventCalendarWeekStart as Kr, featureCardCompositionTreatmentValues as Ks, effectiveSelection as Kt, shouldPromptForLogin as L, createInteractiveIslandCodec as La, orderedLiveRunSessions as Lc, applyAppointmentBookingQuestionsEvent as Li, getTicketTypeAvailabilityLabel as Ln, readStoredMode as Lo, sectionStateToneFromKind as Lr, themeV2CompilerOwnedFieldNames as Ls, runFieldErrors as Lt, getDeclinedPass as M, leavePage as Ma, isRecord$4 as Mc, formatCentsAsCurrencyInput as Mi, formatPassCreditUsageLabel as Mn, getCompatibleBlockAppearancePresets as Mo, createImageShapeField as Mr, parseCanonicalRuntimeBackground as Ms, buildSelectionRequirementsSubmission as Mt, isRegistrationLocked as N, pageNavigationSchema as Na, INCOMPATIBLE_ATTENDANCE_MESSAGE as Nc, formatPrice as Ni, formatRegistrationSchedule as Nn, resolveArrangementLookForBlock as No, heroTitleSizeOptions as Nr, resolveSectionBackground as Ns, checkRunRequirements as Nt, registrationStepLabelContext as O, createHostedBlockApiConfig as Oa, asSiteStyleId as Oc, resolveBookingSiteId as Oi, findSelectedTicketType as On, arrangementLookHooks as Oo, resolveMediaNodeResponsiveImage as Or, anglePolygonCss as Os, eventSignInEnds as Ot, registrationFlowReducer as P, requestSignIn as Pa, decideSelectionAttendance as Pc, projectSelectedAppointmentConsentIntoForm as Pi, formatTime as Pn, resolveLookForBlock as Po, createAspectRatioField as Pr, sectionForegroundBackground as Ps, decideSelectionRequirementsLayout as Pt, resolveEventRegistrationSubmitPlan as Q, selectionRepresentativeEvent as Qa, isPublicEventPricingOptionDisplayable as Qc, applyBookingPaymentAdmission as Qi, canRequestTicketOption as Qn, surfaceResolutionContextFromTheme as Qo, formatEventClockLabel as Qr, toNonEmptyReadonlyArray as Qs, runNeedsPricingChoice as Qt, fullyBookedLabel as R, defineInteractiveIslandMetaKeys as Ra, resolveWholeSeriesBookingPhase as Rc, appointmentQuestionsRefusal as Ri, getVisibleTicketTypes as Rn, resolveEffectiveArrangement as Ro, asPartialObject as Rr, appearancePresets as Rs, runRequirementsSnapshotSchema as Rt, getEventSelectionMode as S, BLOCK_BUTTON_ROLE_OPTIONS as Sa, asHeaderStyleId as Sc, normalizeBookingServices as Si, selectionItemName as Sn, lookPresentationOnPalette as So, mediaImageHostProps as Sr, boundaryTreatmentForBoundaryOptionId as Ss, getRegistrationStartAt as St, registrationPresentation as T, readRuntimeNow as Ta, asDesignBlockId as Tc, resolveAppointmentCheckoutVerificationState as Ti, serverPricedTotalCents as Tn, generateLookMediaFrameCss as To, resolveImageSourceSetWithContext as Tr, softBoundaryOption as Ts, toWholeSeriesRegistrationEvents as Tt, resolveGuestNextStepCheck as U, eventOccurrenceContext as Ua, DEFAULT_MAILING_LIST_SUCCESS_MESSAGE as Uc, bookingQuestionsPaymentSnapshotSchema as Ui, getEligibilityFlowFlags as Un, filterLayoutProfilesForPolicy as Uo, parseInlineTextFromUnknown as Ur, defineFrameCapability as Us, SEVERAL_BOOKINGS_ACCOUNT_NOTE as Ut, planRegistrationDetailsCheck as V, resolveEventRegistrationChoices as Va, resolveBookingSignupOffer as Vc, needsAppointmentQuestionsRefresh as Vi, withOccurrenceTitle as Vn, buildInitialPolicyPageDesignIntent as Vo, inlineTextToPlainText as Vr, defineBlockDesignCapability as Vs, withoutKeptAnswers as Vt, resolveRegistrationAdmission as W, getPublicEventCanonicalPath as Wa, parseBrevoListId as Wc, decideBookingQuestionsRestoration as Wi, getRegistrationOccurrenceId as Wn, filterLookIdsForPolicy as Wo, plainTextToInlineText as Wr, defineNoBlockDesignCapability as Ws, canToggleSelectionItem as Wt, isEventRegistrationAvailable as X, planWholeSeriesRunSelection as Xa, formatBookingPriceDisplay as Xc, BOOKING_FORM_DATA_RESERVED_KEYS as Xi, shouldLoadRegistrationOptions as Xn, compiledRuntimeStyleFieldNames as Xo, formatCalendarTitle as Xr, sectionBackgroundPaintValues as Xs, registrationSelectionMode as Xt, deriveEventRegistrationSteps as Y, planWholeSeriesParentSelection as Ya, EVENT_PRESET_VOCABULARY as Yc, toBookingQuestionsPaymentSnapshot as Yi, resolveHeldTicketPlaces as Yn, compilePageRuntimeFields as Yo, eventLocalDateKey as Yr, plainFrame as Ys, primarySelectionItem as Yt, normalizeEventRegistrationMaxTickets as Z, resolveSelectionBookingClosedDetail as Za, formatEventPricing as Zc, BOOKING_FORM_DATA_RESERVED_KEY_VALUES as Zi, withRegistrationAvailability as Zn, stripCompiledRuntimeStyleFields as Zo, formatDate$1 as Zr, testimonialsCompositionTreatmentValues as Zs, runChoiceUsable as Zt, parseStoredCommerceCartState as _, eventLayoutSchema as _a, itemRoleValues as _c, getRegistrationSuccessCopy as _i, combinationHintCopy as _n, listLookControl as _o, shownVenue as _r, sectionShapeFromContent as _s, invitationSubmission as _t, buildProductDetailDisplay as a, resolveBookingPaymentAvailability as aa, parseBlockColorToken as ac, formatEventWeekdayTime as ai, parseSiteId as al, selectionIncludes as an, getEventAvailability as ao, setTicketLineQuantity as ar, getNavLinkPreset as as, buildReviewedBookingPaymentViewModel as at, resolveSelectedProduct as b, registrationButtonVariantSchema as ba, parseGradientPresetId as bc, isSameOpenCheckout as bi, combinationWorking as bn, resolvedItemSurfaceProps as bo, MediaPlaceholder as br, boundaryOptions as bs, confirmationPaymentRows as bt, formatInterval as c, resolveBookingPurchasablePackages as ca, headerVariantValues as cc, resolveEventTimeZone as ci, unsafeAsEventCategoryId as cl, selectionPlacesLabel as cn, isEventFull as co, decideSignInReturn as cr, generateEffectsCSS as cs, buildRegistrationSelectionRequest as ct, membershipClassesLabel as d, bookingNowSchema as da, boxBackgroundOverlaySchema as dc, buildBookingFormInteractiveIslandProps as di, selectionTicketInputs as dn, groupPublicEventsByRun as do, signInReturnPath as dr, navLinkOwnsHoverForeground as ds, resolveEventRequiresPayment as dt, bookingPackageRequestKey as ea, opaqueSurfaceDeclarations as ec, formatEventDateParts as ei, publicEventPricingDisplay as el, runUnitPriceCents as en, canJoinEventWaitlist as eo, getTicketLineQuantity as er, getGradientPreset as es, resolveHeadlessEventRegistrationView as et, passCardListContent as f, calendarTabViewsSchema as fa, boxBackgroundSchema as fc, readOverrideServiceCategories as fi, severalConfirmationSentence as fn, createZodCodec as fo, sweepExpiredSignInReturnDrafts as fr, navLinkOwnsUnderline as fs, resolveRegistrationTarget as ft, deriveCommerceCheckoutState as g, eventCalendarDisplayModeSchema as ga, cardVariantRoleValues as gc, getBookingSuccessCopy as gi, toggleSelectionItem as gn, listItemPresentation as go, resolveRegistrationDisplay as gr, sectionShapeForGround as gs, createRegistrationDraftData as gt, buildProductCartItem as h, eventCalendarDefaultViewSchema as ha, cardRoleSchema as hc, getBookingRedirectStateFromLocation as hi, summariseSelectionPayment as hn, isDecodeSuccess as ho, registrationDisplaySchema as hr, resolvePageDesignBoundaryChoice as hs, beginWaitlistInvitation as ht, buildProductCardDisplay as i, resolveBookingPackageSources as ia, TokenResolver as ic, formatEventTimeRange as ii, resolvePricingOptionsPriceDisplay as il, selectionEntitlementNote as in, formatTotalCapacity as io, normalizeTicketSelectionLines as ir, footerForegroundCandidates as is, buildBookingPaymentSelectionViewModel as it, decideEventChoice as j, canonicalUrl as ja, parseAspectRatioValue as jc, toSelectedCollectionOptionKind as ji, formatEventDateTime as jn, compileArrangementLookRuntime as jo, systemCustomizeFacetDefinitionsForBlock as jr, deriveSectionGround as js, paymentReturnRestoration as jt, areEventRegistrationPaymentSelectionsEqual as k, getBlockApiReadStage as ka, makeBoundaryId as kc, resolveDefaultBookingServiceId as ki, formatBookingWhen as kn, arrangementStyleAvailability as ko, resolvePublicMediaUrl as kr, transitionCatalogueEntries as ks, eventSignInRestoration as kt, formatValidity as l, toBookingPurchasablePackages as la, blockCustomCssRuleSchema as lc, resolveRuntimeEventDestination as li, selectionPlacesNote as ln, selectEventCapacitySource as lo, nextSignInReturnExpiry as lr, generateInteractiveChildInheritanceCSS as ls, findPreSelectedEvent as lt, buildPassCartItem as m, eventButtonVariantSchema as ma, boxlessCardVariantValue as mc, formatBookingSubmissionPreparationError as mi, severalRunsChoiceMessage as mn, defineProgressiveBlockRuntime as mo, placesLeftLabel as mr, resolvePageDesignBlockLookChoice as ms, toRegistrationRequestSubject as mt, buildCheckoutDisplay as n, reconcileBookingPackagePurchase as na, surfaceToneFromForegroundToken as nc, formatEventNextDateFact as ni, publicEventPricingType as nl, selectionConfirmationHint as nn, formatEventRemainingPlaces as no, getTicketTypeLineMax as nr, generateDefaultCardSystem as ns, toInternalPaymentSelection as nt, buildProductListDisplay as o, resolveBookingPaymentChoice as oa, sectionStylesOverrideSchema as oc, formatTime$1 as oi, unsafeAsSiteId as ol, selectionItemPrice as on, getEventAvailabilityStatus as oo, clearSignInReturnDrafts as or, buildTextContrastShadow as os, paymentChoiceDetails as ot, EMPTY_COMMERCE_CART_STATE as p, columnOptionSchema as pa, runtimeBoxBackgroundSchema as pc, deriveBookingFormViewState as pi, severalItemsOf as pn, defineClientOwnedBlockRuntime as po, bookingPresentation as pr, parsePageDesignIntent as ps, resolveRouteRequiresPayment as pt, settledRemainingPlaces as q, planOrdinarySeriesSelection as qa, parseNewsletterListId as qc, restoreBookingQuestionsAnswers as qi, getTicketSelectionRemainingPlaces as qn, getCuratedSiteStyle as qo, eventDateLocale as qr, introCompositionTreatmentValues as qs, incompleteRunChoiceMessage as qt, buildPassesMembershipsDisplay as r, resolveBookingPackagePaymentSelection as ra, arrangementSlotNames as rc, formatEventRunDates as ri, resolveExactOrFreePriceDisplay as rl, selectionConsentLabel as rn, formatRemainingPlaces as ro, hasValidPricingOptionSelection as rr, generateFooterCss as rs, calculateEventRegistrationPreviewTotal as rt, formatCommercePrice as s, resolveBookingPaymentMode as sa, themeSchema as sc, groupEventsByDate as si, parseEventSeriesId as sl, selectionItemsLabel as sn, getRemainingPlaces as so, createSignInReturnDraftStore as sr, generateNavLinkCSS as ss, paymentChoicePrice as st, buildCartDisplay as t, bookingRequiresResourceSelection as ta, selectLogoVariant as tc, formatEventHourLabel as ti, publicEventPricingStrategy as tl, selectionAtLimit as tn, canJoinEventWaitlistOnAnyMode as to, getTicketSelectionTotal as tr, resolveCardRole as ts, toHeadlessPaymentSelection as tt, membershipCardListContent as u, getBookingServiceSlidingScale as ua, customCssRuleSchema as uc, bookingFormInteractiveIslandPropsCodec as ui, selectionRowAvailability as un, selectMostOpenCapacitySource as uo, readSignInReturn as ur, navLinkHoverColorCandidate as us, resolveDiscountContext as ut, productItemKey as v, filterAutoShowSchema as va, openCardRoleValue as vc, getShopSuccessCopy as vi, combinationOfferLine as vn, listLookSlot as vo, RichText as vr, sectionShapeHook as vs, registrationQuestionsMessage as vt, registrationPaymentRoute as w, isBlockButtonRole as wa, asAppearancePresetId as wc, prepareBookingSubmission as wi, selectionPreviewLines as wn, selectItemSurfacePresentation as wo, renderVideo as wr, noneBoundaryOption as ws, toWholeSeriesRegistrationEvent as wt, REGISTRATION_STEP_LABELS as x, weekStartSchema as xa, asHeaderLayoutId as xc, normalizeBookingFormConfig as xi, selectionCombinationHint as xn, itemRole as xo, computeMediaTransformStyle as xr, boundaryRuntimeMetricsForDecorativeTransition as xs, resolveFinishedPresentation as xt, reduceCommerceCart as y, previewStageSchema as ya, surfaceCardRoleValues as yc, isBookingServiceSlidingAmountInRange as yi, combinationOffersOf as yn, lookListPresentationSchemaShape as yo, ImagePresets as yr, boundaryOptionForTransitionIntent as ys, validateFormData as yt, getTicketSelectionPurpose as z, eventRegistrationPageSurfaceSubjectSchema as za, resolveWholeSeriesRunLifecycle as zc, deriveAppointmentBookingQuestions as zi, occurrenceTitleOverride as zn, resolveModeArrangement as zo, createTransformRegistry as zr, lookModes as zs, runsKeepingAnswers as zt };