@riverbankcms/sdk 0.172.0 → 0.173.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. package/dist/_dts/{BlocksIslandsHydrator-DtrzTJ77.d.ts → BlocksIslandsHydrator-O50mTMCY.d.ts} +1 -1
  2. package/dist/_dts/{Page-DViYbakk.d.ts → Page-Bk99sJwV.d.ts} +7 -7
  3. package/dist/_dts/{SdkPreviewMode-D-5OeDbT.d.ts → SdkPreviewMode-DzAue6Kj.d.ts} +2 -2
  4. package/dist/_dts/{client-DZBOzd3U.d.ts → client-ZlNEIvlU.d.ts} +1002 -139
  5. package/dist/_dts/{content-types-DS3DrYn_.d.ts → content-types-DBXPNc0h.d.ts} +2 -2
  6. package/dist/_dts/{contracts-C3QGPCUf.d.ts → contracts-D9bhu0bb.d.ts} +4 -3
  7. package/dist/_dts/{footerPageOutline-D9Q7VIul.d.ts → footerPageOutline-Bfap3soN.d.ts} +6 -6
  8. package/dist/_dts/{generatePageMetadata-R7NeFT1u.d.ts → generatePageMetadata-DwCdg31h.d.ts} +2 -2
  9. package/dist/_dts/{index-CpOkfBt1.d.ts → index-BnatulTs.d.ts} +3 -3
  10. package/dist/_dts/{index-Dns7OHyl.d.ts → index-C611wjIL.d.ts} +1 -1
  11. package/dist/_dts/{index-Da4UMgbs.d.ts → index-CJzs-yIJ.d.ts} +2 -2
  12. package/dist/_dts/{index-MuMYjetm.d.ts → index-DW3eeNph.d.ts} +4 -4
  13. package/dist/_dts/{index-DkFV_1Bc.d.ts → index-Dq_AboWN.d.ts} +1 -1
  14. package/dist/_dts/{index-C0zjLMAW.d.ts → index-DutLU2d2.d.ts} +1 -1
  15. package/dist/_dts/{index-BnMavhoh.d.ts → index-KXh8FQ2s.d.ts} +2 -2
  16. package/dist/_dts/{loadContent-DJmXHzfi.d.ts → loadContent-Bde2y870.d.ts} +7 -7
  17. package/dist/_dts/{request-wQ28JWbr.d.ts → request-Bysk4QPI.d.ts} +1842 -262
  18. package/dist/_dts/{resolveBlockData-C-IP53u9.d.ts → resolveBlockData-ChbNvpSF.d.ts} +5 -5
  19. package/dist/_dts/{resolvePageContent-Cc4zqaEC.d.ts → resolvePageContent-CGa6QMgc.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 +6 -2
  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-DrinAfeW.d.ts → types-BoEk9ZON.d.ts} +3 -3
  54. package/dist/_dts/{types-CpjyP5I4.d.ts → types-BwitGNTl.d.ts} +7 -7
  55. package/dist/_dts/{types-ZuZoGsZV.d.ts → types-kpp8XyXv.d.ts} +2 -2
  56. package/dist/_dts/{validation-CIZ_fP5l.d.ts → validation-ChftKX-o.d.ts} +4 -4
  57. package/dist/client/{BlocksIslandsHydrator-UFmQB1BE.mjs → BlocksIslandsHydrator-BnUeSE3d.mjs} +17 -17
  58. package/dist/client/{BookingMailingListNote-VjRYhx1c.mjs → BookingMailingListNote-LHQMODqB.mjs} +13 -7
  59. package/dist/client/{BookingPanelArrangement-DpqnRo-t.mjs → BookingPanelArrangement-Be704P85.mjs} +1 -1
  60. package/dist/client/{BookingQuestionFields-CzOT8ZWo.mjs → BookingQuestionFields-BewbU_cV.mjs} +2 -2
  61. package/dist/client/{CalendarNavigationChevron-CNckKZct.mjs → CalendarNavigationChevron-BMZp3RS3.mjs} +41 -34
  62. package/dist/client/{DemoBookingPortalAccess-CmZLVXOy.mjs → DemoBookingPortalAccess-CARUWQ_E.mjs} +21 -21
  63. package/dist/client/{EventCalendar.client-BU-SxLCn.mjs → EventCalendar.client-CaI6upCX.mjs} +11 -10
  64. package/dist/client/{EventCombined.client-f28VltfY.mjs → EventCombined.client-CoRUaYHY.mjs} +10 -9
  65. package/dist/client/{EventItem-sKBofjiW.mjs → EventItem-Doe4KodB.mjs} +25 -16
  66. package/dist/client/{EventListWeekNavigation-IAcax47T.mjs → EventListWeekNavigation-CXWLKDfa.mjs} +1 -1
  67. package/dist/client/{EventListing.client-BEtnRvZr.mjs → EventListing.client-DvJ5tGTx.mjs} +3 -3
  68. package/dist/client/{EventListing.view-BZ4l_rmT.mjs → EventListing.view-BmfyK7S5.mjs} +37 -14
  69. package/dist/client/{EventRegistrationPayment-BWb295cD.mjs → EventRegistrationPayment-DwMlJB2V.mjs} +846 -145
  70. package/dist/client/{LocationMapActions-Hsj2HC_1.mjs → LocationMapActions-CdRPU6gp.mjs} +1 -1
  71. package/dist/client/{MapDrawingSvg-C7E7Lyfa.mjs → MapDrawingSvg-DCLtxOnt.mjs} +1 -1
  72. package/dist/client/{Page-Ds1s3DuC.mjs → Page-D46Dmr7b.mjs} +548 -44
  73. package/dist/client/{StepIndicator-CSCyAaKY.mjs → StepIndicator-CrSZCZn1.mjs} +82 -11
  74. package/dist/client/{accessibleSurfaces-OsAseM7H.mjs → accessibleSurfaces-D4DhWo9j.mjs} +1 -20
  75. package/dist/client/{accordion-DgwFZJSx.mjs → accordion-P8xcfKxq.mjs} +1 -1
  76. package/dist/client/bookability-SargNwlO.mjs +17 -0
  77. package/dist/client/{booking-form.client-CKY9oksp.mjs → booking-form.client-BM2s-NqR.mjs} +11 -11
  78. package/dist/client/{bookingForm-CsHhcdSF.mjs → bookingForm-JnaZPZge.mjs} +4 -4
  79. package/dist/client/bookings.mjs +5 -5
  80. package/dist/client/{boxStyleClassNames-B1Z_TGAe.mjs → boxStyleClassNames-Cahps5kR.mjs} +1 -1
  81. package/dist/client/{carousel-0sw2Kc3a.mjs → carousel-CQQ_m0KA.mjs} +1 -1
  82. package/dist/client/{cart-CPfvMDGJ.mjs → cart-0Q4fjw_K.mjs} +3 -3
  83. package/dist/client/{cart.client-BJBPUTmg.mjs → cart.client-BI0IaHX3.mjs} +1 -1
  84. package/dist/client/{checkout-DU4JFjGT.mjs → checkout-1J-3ftxF.mjs} +3 -3
  85. package/dist/client/{checkout.client-BbNCO4xa.mjs → checkout.client-DOGYDlDk.mjs} +1 -1
  86. package/dist/client/{checkoutUrls-BQ3OlWlM.mjs → checkoutUrls-CwHqcqzP.mjs} +1 -1
  87. package/dist/client/client.mjs +52 -4
  88. package/dist/client/{context-xNC1Cyjw.mjs → context-D0KCgbOq.mjs} +81 -14
  89. package/dist/client/{cta-CNVQHLKs.mjs → course-CmOuoZHN.mjs} +76 -2
  90. package/dist/client/{dateFormatting-B6ea-egy.mjs → dateFormatting-Dmfaczzq.mjs} +1 -1
  91. package/dist/client/{demoPortalMagicLink-BhjGxhX3.mjs → demoPortalMagicLink-CL7KGRta.mjs} +1 -1
  92. package/dist/client/{display-B5DfNb6A.mjs → display-lL-YRApN.mjs} +2462 -426
  93. package/dist/client/{enhanceHeaderSection-BFcHLuqk.mjs → enhanceHeaderSection-B-eLGs2C.mjs} +3 -3
  94. package/dist/client/{event-details.client-WHT5GLn2.mjs → event-details.client-DH1-Jxsh.mjs} +1 -1
  95. package/dist/client/{event-registration.client-CmnRKELC.mjs → event-registration.client-GuuElczW.mjs} +1314 -552
  96. package/dist/client/{eventCalendar-2NbdCyov.mjs → eventCalendar-BiCINPkV.mjs} +4 -4
  97. package/dist/client/{eventCombined-D1lH1n2T.mjs → eventCombined-BtzmH6FW.mjs} +4 -4
  98. package/dist/client/{eventDetails-BHvnF2Tw.mjs → eventDetails-BJpAD10-.mjs} +2 -2
  99. package/dist/client/{eventListing-EhSDk4UL.mjs → eventListing-jLB8iRqp.mjs} +4 -4
  100. package/dist/client/{eventRegistration-z_0jN_KS.mjs → eventRegistration-WhtpDEbq.mjs} +4 -4
  101. package/dist/client/{form-BfChzSkS.mjs → form-DO6qKH3M.mjs} +3 -3
  102. package/dist/client/{form.client-D1zehtPk.mjs → form.client-D12ljYiX.mjs} +3 -3
  103. package/dist/client/{form.parts-rMDlUQIv.mjs → form.parts-C8QHaQOI.mjs} +1 -1
  104. package/dist/client/{formatDate-ymSVT9Y5.mjs → formatDate-BnhfIpCa.mjs} +1 -1
  105. package/dist/client/gifting/client.mjs +2 -2
  106. package/dist/client/{headerSection-BX9bQ84k.mjs → headerSection-BtFWtoUm.mjs} +2 -2
  107. package/dist/client/{newsletter-form.client-DMbuJCtJ.mjs → newsletter-form.client-oHrqM_Ao.mjs} +4 -4
  108. package/dist/client/{newsletter-form.parts-BxrVsoI0.mjs → newsletter-form.parts-D5U-FuVy.mjs} +1 -1
  109. package/dist/client/{newsletterForm-B_I3FJFS.mjs → newsletterForm-CBYbFxSx.mjs} +3 -3
  110. package/dist/client/{noop-CamIX2yK.mjs → noop-CN0o0yjH.mjs} +115 -12
  111. package/dist/client/portal/client.mjs +7 -7
  112. package/dist/client/{product-detail.client-qxuiYCof.mjs → product-detail.client-d_sNCapC.mjs} +1 -1
  113. package/dist/client/{product-list.client-CDL-jihv.mjs → product-list.client-DkSpw6WQ.mjs} +1 -1
  114. package/dist/client/{productDetail-B97m0uZy.mjs → productDetail-DaqM-LgL.mjs} +3 -3
  115. package/dist/client/{productList-DE4vSSG_.mjs → productList-CMx4-XlG.mjs} +3 -3
  116. package/dist/client/{propsDecoder-BTde6Syh.mjs → propsDecoder-BZbUKstC.mjs} +3 -3
  117. package/dist/client/{registry.server-Cn8XjRte.mjs → registry.server-Cdot3dMk.mjs} +85 -57
  118. package/dist/client/rendering/client.mjs +25 -25
  119. package/dist/client/rendering/islands.mjs +1 -1
  120. package/dist/client/rendering.mjs +24 -55
  121. package/dist/client/{richText-coerce-Bcl3vTb4.mjs → richText-coerce-ByApwB4q.mjs} +1 -1
  122. package/dist/client/{routeIslandApiConfig-BjRoLoMD.mjs → routeIslandApiConfig-DTET8f__.mjs} +1 -1
  123. package/dist/client/{runtimeResponse-B-lrAGhX.mjs → runtimeResponse-IkOwKZD0.mjs} +1 -1
  124. package/dist/client/runtimeResponse-Wd6kwhE_.mjs +3 -0
  125. package/dist/client/{shop-BC4H0oYT.mjs → shop-Cy6xXDM7.mjs} +3 -3
  126. package/dist/client/{shop-commerce-BsY7a71m.mjs → shop-commerce-oDR76k1q.mjs} +11 -10
  127. package/dist/client/{shop-commerce-store-BZ5j90HD.mjs → shop-commerce-store-DjoUpL3a.mjs} +1 -1
  128. package/dist/client/shop-discount-apply.state-WsGb9DD8.mjs +166 -0
  129. package/dist/client/{shop.client-WgGVGelc.mjs → shop.client-Brha4BSM.mjs} +11 -10
  130. package/dist/client/{shop.interactive-Bb67gPLL.mjs → shop.interactive-CXhYl0DW.mjs} +35 -12
  131. package/dist/client/{shopShared-BE6TEk2A.mjs → shopShared-JCa_SRhP.mjs} +2 -2
  132. package/dist/client/stable-json-D0XAEIXc.mjs +22 -0
  133. package/dist/client/{timetableModel-Bbz_ECL5.mjs → timetableModel-CZeJwMxP.mjs} +10 -10
  134. package/dist/client/{useAvailableSlots-CdP14E_b.mjs → useAvailableSlots-DfbSkWop.mjs} +17 -6
  135. package/dist/client/{useDiscountApply-DvOSso2l.mjs → useDiscountApply-Dq-wjb1d.mjs} +4 -167
  136. package/dist/client/{useDiscountCodeUi-B4fRd2jy.mjs → useDiscountCodeUi-Cyy0meCH.mjs} +1 -1
  137. package/dist/client/{useEventPagination-M3jC8lgP.mjs → useEventPagination-CCAGQHsD.mjs} +5 -5
  138. package/dist/client/{view-B0TFnP4y.mjs → view-D6yebI4r.mjs} +51 -31
  139. package/dist/client/{view-DNNNbnNj.mjs → view-Sw075FOY.mjs} +2 -2
  140. package/dist/preview-next/client/{PageSectionToolbar-D59tHj_L.mjs → PageSectionToolbar-DG2rXUmo.mjs} +26 -19
  141. package/dist/preview-next/client/{PreviewEditorSidebar-CjOIZlUk.mjs → PreviewEditorSidebar-BDY5vdHU.mjs} +27 -360
  142. package/dist/preview-next/client/{PreviewEditorUI--kS9Cwsc.mjs → PreviewEditorUI-CqZCfOaz.mjs} +4 -4
  143. package/dist/preview-next/client/{PreviewShell-Bi8-rclb.mjs → PreviewShell-Bv2HZ7JY.mjs} +7 -7
  144. package/dist/preview-next/client/{SdkPreviewModeRuntime-CWTUw-3L.mjs → SdkPreviewModeRuntime-BMTcR-MW.mjs} +5 -55
  145. package/dist/preview-next/client/{SiteChromeCustomizeButton-CrgS3I8d.mjs → SiteChromeCustomizeButton-D1MGyN_Z.mjs} +2668 -799
  146. package/dist/preview-next/client/{previewAssistantSlot-Caofnr1Z.mjs → previewAssistantSlot-La6MerV_.mjs} +3540 -684
  147. package/dist/preview-next/client/{previewChromeRoot-CbAI_jSH.mjs → previewChromeRoot-BcOQqJIP.mjs} +1 -1
  148. package/dist/preview-next/client/runtime.mjs +3 -3
  149. package/dist/preview-next/client/{sdk-runtime-DY65_hLk.mjs → sdk-runtime-BkckHox4.mjs} +2 -2
  150. package/dist/preview-next/client/{useAutosaveStatus-CakNU3lp.mjs → useAutosaveStatus-CPAHgGqI.mjs} +1 -1
  151. package/dist/preview-next/client/{useOpenBlockForSetup-CCEMkosU.mjs → useOpenBlockForSetup-BDkuSZxQ.mjs} +1 -1
  152. package/dist/preview-next/keepAlive.mjs +1 -1
  153. package/dist/preview-next/middleware.mjs +1 -1
  154. package/dist/preview-next/{route-contract-DsKDQoVW.mjs → route-contract-CPV30ABr.mjs} +48 -0
  155. package/dist/server/{Block.shared-D7Qy9F4a.mjs → Block.shared-BaMMstO1.mjs} +5 -5
  156. package/dist/server/{bindings-Bp6OnR3n.mjs → bindings-Dge4sqel.mjs} +4 -4
  157. package/dist/server/{client-dROAfMRa.mjs → client-VVIQjC4r.mjs} +51 -3
  158. package/dist/server/config-validation.mjs +1 -1
  159. package/dist/server/config.mjs +2 -2
  160. package/dist/server/data/resolveBlockData.mjs +1 -1
  161. package/dist/server/{identity-20XHqyuO.mjs → identity-DQD_8lNO.mjs} +1 -1
  162. package/dist/server/index.mjs +3 -3
  163. package/dist/server/{loadContent-zOIrtqz-.mjs → loadContent-BIJb3WAK.mjs} +5 -6
  164. package/dist/server/{loadPage-vwFiq1Rk.mjs → loadPage-DjTU19y7.mjs} +2 -2
  165. package/dist/server/{media-Brn9FW5s.mjs → media-luf7RF22.mjs} +2 -2
  166. package/dist/server/{navigation-DAwbICEL.mjs → navigation-iC_hXjJI.mjs} +3 -1
  167. package/dist/server/navigation.mjs +1 -1
  168. package/dist/server/next.mjs +6 -6
  169. package/dist/server/{overrideResolution-DjboggbB.mjs → overrideResolution-1Ru3NMQj.mjs} +1 -1
  170. package/dist/server/page-converter.mjs +1 -1
  171. package/dist/server/{pageRenderPlan-BR4t1rOw.mjs → pageRenderPlan-CytPhrI9.mjs} +143 -27
  172. package/dist/server/{pageRuntimeSupport-BKo6XVK-.mjs → pageRuntimeSupport-DWspU5EZ.mjs} +3 -3
  173. package/dist/server/{pageShared-BJjptSGp.mjs → pageShared-Bhx8bVe1.mjs} +166 -67
  174. package/dist/server/{parseThemeForPersistence-B18KDEue.mjs → parseThemeForPersistence-CtgRtvo3.mjs} +1 -1
  175. package/dist/server/{prebuild-CntSkZQI.mjs → prebuild-BjvFb0CA.mjs} +1 -1
  176. package/dist/server/prebuild.mjs +1 -1
  177. package/dist/server/{prefetchBlockData-BM9Ds0OQ.mjs → prefetchBlockData-Db3stNpp.mjs} +3 -3
  178. package/dist/server/{registry-wYH0LH5f.mjs → registry-BMCfcev6.mjs} +809 -191
  179. package/dist/server/rendering/components/pageShared.mjs +1 -1
  180. package/dist/server/rendering/helpers/loadPage.mjs +1 -1
  181. package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
  182. package/dist/server/rendering/server.mjs +3 -3
  183. package/dist/server/rendering.mjs +8 -8
  184. package/dist/server/{resolveBlockData-Bu_p4HxZ.mjs → resolveBlockData--yUbI-Ll.mjs} +1 -1
  185. package/dist/server/{responseMedia-t6gs0cB7.mjs → responseMedia-DpBC1hTM.mjs} +1 -1
  186. package/dist/server/{schema-BFOqYIMQ.mjs → schema-D5Vfmqzw.mjs} +394 -1
  187. package/dist/server/server.mjs +3 -3
  188. package/dist/server/theme.mjs +2 -2
  189. package/dist/server/{validation-DAQdPDku.mjs → validation-EgTtnTcY.mjs} +4 -4
  190. package/dist/server/{version-DAB0O3yx.mjs → version-LjgU0Cq1.mjs} +1 -1
  191. package/dist/styles/index.css +174 -0
  192. package/package.json +1 -1
  193. package/dist/client/runtimeResponse-CPcA8xSm.mjs +0 -3
  194. package/dist/server/rich-text-CRcONdyM.mjs +0 -33
@@ -1,95 +1,7 @@
1
1
  "use client";
2
2
  import { f as err, p as ok } from "./renderableMediaAssetAdmission-BlfqYLJW.mjs";
3
- import { p as assertNever } from "./creditProducts-BTRX4edc.mjs";
4
- import { d as getAutoAppliedDiscountPreview, l as discountAvailabilityAllowsManualEntry, u as discountAvailabilityHasDiscounts } from "./DemoBookingPortalAccess-CmZLVXOy.mjs";
5
- import { t as FeedbackMessage } from "./FeedbackMessage-CSJrAuXH.mjs";
6
- import * as React$1 from "react";
3
+ import { d as discountAvailabilityHasDiscounts, f as getAutoAppliedDiscountPreview, u as discountAvailabilityAllowsManualEntry } from "./DemoBookingPortalAccess-CARUWQ_E.mjs";
7
4
  import { useCallback } from "react";
8
- import { jsx, jsxs } from "react/jsx-runtime";
9
- //#region ../blocks/src/system/runtime/shared/utils/urlParams.ts
10
- /**
11
- * URL param helpers for client-side "return from redirect" flows.
12
- *
13
- * Used for flows like magic-link login or Stripe checkout return URLs where
14
- * we want to:
15
- * - read a query param once
16
- * - remove it from the URL (so refresh doesn't re-trigger)
17
- * - preserve hash fragments
18
- */
19
- /**
20
- * Consume a query param from the current URL's search string.
21
- *
22
- * Returns the param value (if present) and removes it from the URL via
23
- * history.replaceState, preserving hash.
24
- */
25
- function consumeSearchParam(paramName) {
26
- const url = new URL(window.location.href);
27
- const value = url.searchParams.get(paramName);
28
- if (value === null) return null;
29
- url.searchParams.delete(paramName);
30
- const newUrl = url.pathname + (url.search ? url.search : "") + url.hash;
31
- window.history.replaceState({}, "", newUrl);
32
- return value;
33
- }
34
- /**
35
- * Consume multiple query params from the current URL's search string.
36
- *
37
- * Returns a record of consumed values (missing params are null) and removes
38
- * all provided params from the URL in a single replaceState call.
39
- */
40
- function consumeSearchParams(paramNames) {
41
- const url = new URL(window.location.href);
42
- const values = Object.fromEntries(paramNames.map((name) => [name, url.searchParams.get(name)]));
43
- let changed = false;
44
- for (const name of paramNames) if (url.searchParams.has(name)) {
45
- url.searchParams.delete(name);
46
- changed = true;
47
- }
48
- if (changed) {
49
- const newUrl = url.pathname + (url.search ? url.search : "") + url.hash;
50
- window.history.replaceState({}, "", newUrl);
51
- }
52
- return values;
53
- }
54
- //#endregion
55
- //#region ../blocks/src/system/runtime/nodes/shop-add-feedback.tsx
56
- const DEFAULT_TIMEOUT_MS = 2500;
57
- function useTransientShopAddFeedback(timeoutMs = DEFAULT_TIMEOUT_MS) {
58
- const [activeKey, setActiveKey] = React$1.useState(null);
59
- React$1.useEffect(() => {
60
- if (!activeKey) return;
61
- const timeoutId = window.setTimeout(() => {
62
- setActiveKey((current) => current === activeKey ? null : current);
63
- }, timeoutMs);
64
- return () => window.clearTimeout(timeoutId);
65
- }, [activeKey, timeoutMs]);
66
- return {
67
- activeKey,
68
- markAdded: setActiveKey,
69
- clear: () => setActiveKey(null)
70
- };
71
- }
72
- function ShopAddFeedback(props) {
73
- if (!props.active) return null;
74
- return /* @__PURE__ */ jsxs(FeedbackMessage, {
75
- tone: "success",
76
- className: "rb-caption status-muted",
77
- role: "status",
78
- live: "polite",
79
- children: [
80
- "Added ",
81
- props.itemLabel,
82
- " to cart.",
83
- " ",
84
- /* @__PURE__ */ jsx("a", {
85
- href: "#shop-cart",
86
- children: "View cart"
87
- }),
88
- "."
89
- ]
90
- });
91
- }
92
- //#endregion
93
5
  //#region ../blocks/src/system/runtime/nodes/shop-checkout-form.ts
94
6
  const EMAIL_PATTERN = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
95
7
  function normalizeManualDiscountCode(raw) {
@@ -219,81 +131,6 @@ function checkoutFormForDiscountUiState(form, discountUiState) {
219
131
  };
220
132
  }
221
133
  //#endregion
222
- //#region ../blocks/src/system/runtime/nodes/shop-discount-apply.state.ts
223
- const initialDiscountApplyState = {
224
- isOpen: false,
225
- draftCode: "",
226
- status: { type: "idle" }
227
- };
228
- function discountApplyReducer(state, action) {
229
- switch (action.type) {
230
- case "open": return {
231
- ...state,
232
- isOpen: true
233
- };
234
- case "draftChanged": return {
235
- ...state,
236
- draftCode: action.draftCode,
237
- status: { type: "idle" }
238
- };
239
- case "remove": return initialDiscountApplyState;
240
- case "applyStarted": return {
241
- ...state,
242
- status: { type: "applying" }
243
- };
244
- case "applySucceeded": return {
245
- ...state,
246
- isOpen: true,
247
- draftCode: action.discount.code,
248
- status: {
249
- type: "applied",
250
- discount: action.discount
251
- }
252
- };
253
- case "applyRejected": return {
254
- ...state,
255
- isOpen: true,
256
- status: {
257
- type: "rejected",
258
- reason: action.reason,
259
- message: action.message
260
- }
261
- };
262
- case "resetApplied":
263
- if (state.status.type !== "applied") return state;
264
- return {
265
- ...state,
266
- status: { type: "idle" }
267
- };
268
- default: return assertNever(action);
269
- }
270
- }
271
- function getAppliedDiscountCode(state) {
272
- if (state.status.type !== "applied") return null;
273
- return normalizeManualDiscountCode(state.status.discount.code);
274
- }
275
- function isDiscountApplyInFlight(state) {
276
- return state.status.type === "applying";
277
- }
278
- function getDiscountApplyFeedback(status, formatPrice) {
279
- switch (status.type) {
280
- case "idle":
281
- case "applying": return null;
282
- case "applied": {
283
- const savings = formatPrice(status.discount.discountCents, status.discount.currency);
284
- return {
285
- tone: "success",
286
- message: `${status.discount.publicLabel} applied. You save ${savings}.`
287
- };
288
- }
289
- case "rejected": return {
290
- tone: "error",
291
- message: status.message
292
- };
293
- default: return assertNever(status);
294
- }
295
- }
296
- //#endregion
297
134
  //#region ../blocks/src/system/runtime/nodes/useDiscountApply.ts
298
135
  const DISCOUNT_APPLY_MESSAGES = {
299
136
  emptyCode: "Enter a discount code first.",
@@ -346,8 +183,8 @@ function useDiscountApply(options) {
346
183
  }
347
184
  options.dispatch({
348
185
  type: "applyRejected",
349
- reason: result.reason,
350
- message: result.message
186
+ reason: result.type === "rejected" ? result.reason : "unavailable",
187
+ message: result.type === "rejected" ? result.message : DISCOUNT_APPLY_MESSAGES.unavailable
351
188
  });
352
189
  } catch {
353
190
  options.dispatch({
@@ -359,4 +196,4 @@ function useDiscountApply(options) {
359
196
  }, [options]);
360
197
  }
361
198
  //#endregion
362
- export { initialDiscountApplyState as a, checkoutFormForDiscountUiState as c, planUnifiedCheckoutRequest as d, ShopAddFeedback as f, consumeSearchParams as h, getDiscountApplyFeedback as i, planCartDiscountAvailabilityRequests as l, consumeSearchParam as m, discountApplyReducer as n, isDiscountApplyInFlight as o, useTransientShopAddFeedback as p, getAppliedDiscountCode as r, aggregateCartDiscountUiState as s, useDiscountApply as t, planDirectShopCheckoutRequest as u };
199
+ export { normalizeManualDiscountCode as a, planUnifiedCheckoutRequest as c, checkoutFormForDiscountUiState as i, useDiscountApply as n, planCartDiscountAvailabilityRequests as o, aggregateCartDiscountUiState as r, planDirectShopCheckoutRequest as s, DISCOUNT_APPLY_MESSAGES as t };
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { d as getAutoAppliedDiscountPreview, l as discountAvailabilityAllowsManualEntry, u as discountAvailabilityHasDiscounts } from "./DemoBookingPortalAccess-CmZLVXOy.mjs";
2
+ import { d as discountAvailabilityHasDiscounts, f as getAutoAppliedDiscountPreview, u as discountAvailabilityAllowsManualEntry } from "./DemoBookingPortalAccess-CARUWQ_E.mjs";
3
3
  import { useEffect, useReducer, useRef } from "react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  //#region ../blocks/src/system/runtime/shared/components/StateIcon.tsx
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import { At as toEventPaginationLoadError, Dt as getEventIdentity, Et as eventPaginationLoadReducer, Ft as normalizeCsvString, It as normalizeOptionalId, Nt as getEventRuntimeFiltersKey, Ot as getEventPaginationView, Pt as normalizeCsvIds, Tt as eventPageOperationQuery, jt as toError, kt as planEventPageOperation, wt as createInitialEventPaginationLoadState } from "./shop.interactive-Bb67gPLL.mjs";
3
- import { Ji as listLookSlot, Ki as listItemPresentation, ki as getBlockApiReadStage } from "./display-B5DfNb6A.mjs";
2
+ import { At as toEventPaginationLoadError, Dt as getEventIdentity, Et as eventPaginationLoadReducer, Ft as normalizeCsvString, It as normalizeOptionalId, Nt as getEventRuntimeFiltersKey, Ot as getEventPaginationView, Pt as normalizeCsvIds, Tt as eventPageOperationQuery, jt as toError, kt as planEventPageOperation, wt as createInitialEventPaginationLoadState } from "./shop.interactive-CXhYl0DW.mjs";
3
+ import { Ha as listItemPresentation, Ta as getBlockApiReadStage, Wa as listLookSlot } from "./display-lL-YRApN.mjs";
4
4
  import { p as assertNever } from "./creditProducts-BTRX4edc.mjs";
5
- import { n as useBlockApi } from "./context-xNC1Cyjw.mjs";
5
+ import { n as useBlockApi } from "./context-D0KCgbOq.mjs";
6
6
  import { i as ThemedButtonLink, r as ThemedButton } from "./ThemedButton-DuaYtnvG.mjs";
7
- import { r as EventItem } from "./EventItem-sKBofjiW.mjs";
8
- import { a as EventCard, i as EventCompactRow, r as EmptyState, t as EventListingFrameView } from "./EventListing.view-BZ4l_rmT.mjs";
7
+ import { r as EventItem } from "./EventItem-Doe4KodB.mjs";
8
+ import { a as EventCard, i as EventCompactRow, r as EmptyState, t as EventListingFrameView } from "./EventListing.view-BmfyK7S5.mjs";
9
9
  import { useCallback, useEffect, useId, useMemo, useReducer, useRef, useState } from "react";
10
10
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
11
11
  //#region ../blocks/src/system/runtime/hooks/useEventFilters.state.ts
@@ -1,12 +1,13 @@
1
1
  "use client";
2
- import { Gt as EventQuickFacts, Wt as MediaNodeServer, ct as closedRunCopy, nn as formatEventPriceAmount, ot as formatBookingSchedulePresentation, rn as formatEventPriceDisplay, tn as formatEventPrice, zt as CardListContentPart } from "./shop.interactive-Bb67gPLL.mjs";
3
- import { Cn as ImagePresets, Es as publicEventPricingDisplay, Hn as formatEventCompactDateRail, Ji as listLookSlot, Kn as formatEventRunDates, Ln as eventDateOptions, Os as publicEventPricingType, Ss as formatBookingPriceDisplay, Ts as publicEventPricingCurrency, Un as formatEventDateParts, Vi as resolveEventRegistrationScopedEvents, Yn as formatTime, ar as getEventAvailabilityStatus, cs as nextLiveRunSessionStartMs, er as canJoinEventWaitlistOnAnyMode, ir as getEventAvailability, ls as orderedLiveRunSessions, os as CANCELLED_SESSION_STATUS, qn as formatEventTimeRange, rr as formatTotalCapacity, sr as isEventFull, tr as formatEventRemainingPlaces, us as resolveWholeSeriesBookingPhase, ws as isPublicEventPricingOptionDisplayable } from "./display-B5DfNb6A.mjs";
4
- import { It as formatDate, Kt as toScheduledBookingDateTime, Lt as formatDateRange, Qt as getLocalScheduleDate, Yt as compareLocalScheduleDates, Zt as getBookingLocalDateKey, an as toUtcIsoDateTimeString, rn as toBookingTimeZone, tn as resolveBookingBusinessTimeZone, un as formatCurrencyAmount, zt as formatDateTimeRange } from "./noop-CamIX2yK.mjs";
2
+ import { Gt as EventQuickFacts, Wt as MediaNodeServer, ct as closedRunCopy, in as formatEventPriceDisplay, nn as formatEventPrice, ot as formatBookingSchedulePresentation, rn as formatEventPriceAmount, tn as formatCoursePrice, zt as CardListContentPart } from "./shop.interactive-CXhYl0DW.mjs";
3
+ import { $r as formatTotalCapacity, Cc as formatBookingPriceDisplay, Dc as publicEventPricingDisplay, Ec as publicEventPricingCurrency, Gr as formatTime, Hr as formatEventRunDates, La as resolveEventRegistrationScopedEvents, Nr as eventDateOptions, Rr as formatEventCompactDateRail, Tc as isPublicEventPricingOptionDisplayable, Ur as formatEventTimeRange, Wa as listLookSlot, Zr as formatEventRemainingPlaces, dc as resolveWholeSeriesBookingPhase, ei as getEventAvailability, kc as publicEventPricingType, lc as nextLiveRunSessionStartMs, ri as isEventFull, sc as CANCELLED_SESSION_STATUS, ti as getEventAvailabilityStatus, uc as orderedLiveRunSessions, yr as ImagePresets, zr as formatEventDateParts } from "./display-lL-YRApN.mjs";
4
+ import { $t as getBookingLocalDateKey, Jt as toScheduledBookingDateTime, Rt as formatDate, Vt as formatDateTimeRange, Zt as compareLocalScheduleDates, an as toBookingTimeZone, en as getLocalScheduleDate, fn as formatCurrencyAmount, rn as resolveBookingBusinessTimeZone, sn as toUtcIsoDateTimeString, zt as formatDateRange } from "./noop-CN0o0yjH.mjs";
5
5
  import { N as assertNever } from "./creditProducts-BTRX4edc.mjs";
6
6
  import { t as formatEventDuration } from "./duration-Q6_QNgiv.mjs";
7
- import { t as LocationMapActions } from "./LocationMapActions-Hsj2HC_1.mjs";
8
- import { r as resolveEventLinkProps, t as resolveEventCardBooking } from "./cta-CNVQHLKs.mjs";
9
- import { a as eventVenuePlace, n as MapDrawingSvg } from "./MapDrawingSvg-C7E7Lyfa.mjs";
7
+ import { t as LocationMapActions } from "./LocationMapActions-CdRPU6gp.mjs";
8
+ import { t as isBookableEvent } from "./bookability-SargNwlO.mjs";
9
+ import { a as formatMoreDates, c as resolveEventLinkProps, i as formatCourseSessions, o as resolveEventCardBooking, t as eventDisplayTitle } from "./course-CmOuoZHN.mjs";
10
+ import { a as eventVenuePlace, n as MapDrawingSvg } from "./MapDrawingSvg-DCLtxOnt.mjs";
10
11
  import { t as EVENT_REGISTRATION_ANCHOR_ID } from "./constants-4o4_hl34.mjs";
11
12
  import "react";
12
13
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -53,20 +54,6 @@ function selectEventDetailsCandidate(events, requested, nowIso) {
53
54
  mode: "completed"
54
55
  } : null;
55
56
  }
56
- //#endregion
57
- //#region ../blocks/src/system/runtime/nodes/events/domain/bookability.ts
58
- /**
59
- * Whether a public event has a registration path a visitor can take.
60
- *
61
- * Lifecycle admission comes from the public booking-availability contract;
62
- * capacity comes from the shared event-domain helpers so uncapped, fallback,
63
- * and hybrid attendance-mode cases agree with the registration runtime.
64
- */
65
- function isBookableEvent(event) {
66
- if (!event.requiresRegistration) return false;
67
- if (event.bookingAvailability.kind !== "open") return false;
68
- return !isEventFull(event) || canJoinEventWaitlistOnAnyMode(event);
69
- }
70
57
  /**
71
58
  * Select the next occurrence-targeted events for a quick-book rail.
72
59
  *
@@ -169,11 +156,28 @@ function offeringDatesBySeries(events, now, booking) {
169
156
  const groups = events.reduce((result, event) => new Map([...result, [event.seriesId, [...result.get(event.seriesId) ?? [], event]]]), /* @__PURE__ */ new Map());
170
157
  return new Map([...groups].map(([seriesId, occurrences]) => [seriesId, orderedUniqueEventOccurrences(occurrences.filter((event) => event.bookingScope !== "whole_series" && Date.parse(event.startsAt) >= now.getTime())).slice(0, 3).map((event) => offeringDateRow(event, event, occurrencePlaces(event), booking))]));
171
158
  }
172
- /** Whole-series sessions share the run's capacity, so every row shows the run's decided availability. */
173
- function offeringRunDates(event, now, places) {
174
- if (event.bookingScope !== "whole_series") return [];
159
+ /**
160
+ * A course's dates on a card: its first upcoming session, then how many more
161
+ * follow ("and 5 more"). One booking covers every session, so the places left
162
+ * belong to the course: the card says them once, from its own booking decision,
163
+ * never per date.
164
+ */
165
+ function offeringRunDates(event, now) {
166
+ if (event.bookingScope !== "whole_series") return {
167
+ dates: [],
168
+ datesMore: null
169
+ };
175
170
  const nextStart = nextLiveRunSessionStartMs(event.run.sessions, now);
176
- return nextStart === null ? [] : orderedLiveRunSessions(event.run.sessions).filter((session) => Date.parse(session.startsAt) >= nextStart).slice(0, 3).map((session) => offeringDateRow(session, event, places));
171
+ const upcoming = nextStart === null ? [] : orderedLiveRunSessions(event.run.sessions).filter((session) => Date.parse(session.startsAt) >= nextStart);
172
+ const [first] = upcoming;
173
+ if (!first) return {
174
+ dates: [],
175
+ datesMore: null
176
+ };
177
+ return {
178
+ dates: [offeringDateRow(first, event, null)],
179
+ datesMore: formatMoreDates(upcoming.length - 1)
180
+ };
177
181
  }
178
182
  function offeringDateRow(session, event, places, booking) {
179
183
  const options = eventDateOptions({
@@ -219,7 +223,7 @@ function eventCardListContent(event, context, buttonText) {
219
223
  leadDate: offeringLeadDate(event, context.nextStartMs),
220
224
  newTabHint: external,
221
225
  ...offeringSchedule(event, context.now),
222
- ...event.bookingScope === "whole_series" ? { dates: offeringRunDates(event, context.now, content.availability) } : {}
226
+ ...event.bookingScope === "whole_series" ? offeringRunDates(event, context.now) : {}
223
227
  };
224
228
  default: return assertNever(context);
225
229
  }
@@ -228,11 +232,13 @@ function cardProjectionBase(event, buttonText, context) {
228
232
  const offering = context.kind !== "event-details";
229
233
  const { cta, availability: places, closed } = cardBooking(event, buttonText, context);
230
234
  const titleLink = resolveEventLinkProps(event);
235
+ const { title, runName } = eventDisplayTitle(event);
231
236
  return {
232
237
  external: cta.external,
233
238
  content: {
234
239
  id: event.occurrenceId || event.id,
235
- title: event.title,
240
+ title,
241
+ subtitle: runName,
236
242
  ...titleLink.href ? { titleLink } : {},
237
243
  quickFacts: event.facts,
238
244
  text: event.presentation?.summary ?? event.description,
@@ -330,12 +336,19 @@ function scheduleLine(summary, event, now) {
330
336
  }
331
337
  }
332
338
  }
339
+ /**
340
+ * A course's facts are said for the whole course ("6 weekly sessions, 1 hour
341
+ * each", "£72 for the course"), so one session's length never sits beside
342
+ * the price of all of them.
343
+ */
333
344
  function offeringFacts(event, places, offering) {
345
+ const course = event.bookingScope === "whole_series";
346
+ const sessions = formatCourseSessions(event);
334
347
  return [
335
- ...Math.round((Date.parse(event.endsAt) - Date.parse(event.startsAt)) / 6e4) > 0 && (!offering || event.bookingScope === "whole_series") ? [{
348
+ ...sessions ? [{
336
349
  label: "Length",
337
- value: formatEventDuration(event, "readable")
338
- }] : [],
350
+ value: sessions
351
+ }] : lengthFact(event, !offering || course),
339
352
  ...offering && event.venue ? [{
340
353
  label: "Venue",
341
354
  value: event.venue.name
@@ -347,10 +360,17 @@ function offeringFacts(event, places, offering) {
347
360
  }] : [],
348
361
  ...offering && event.pricing.kind === "external" ? [] : [{
349
362
  label: "Price",
350
- value: formatEventPriceDisplay(event.pricing)
363
+ value: course ? formatCoursePrice(event.pricing) : formatEventPriceDisplay(event.pricing)
351
364
  }]
352
365
  ];
353
366
  }
367
+ function lengthFact(event, shown) {
368
+ const minutes = Math.round((Date.parse(event.endsAt) - Date.parse(event.startsAt)) / 6e4);
369
+ return shown && minutes > 0 ? [{
370
+ label: "Length",
371
+ value: formatEventDuration(event, "readable")
372
+ }] : [];
373
+ }
354
374
  function offeringTypeChips(event, typeLabel) {
355
375
  return event.eventCategory ? [event.eventCategory.name] : typeLabel ? [typeLabel] : [];
356
376
  }
@@ -1251,4 +1271,4 @@ function withLookParts(props, arrangement) {
1251
1271
  };
1252
1272
  }
1253
1273
  //#endregion
1254
- export { eventCardListContent as a, derivePreviewRunSchedule as c, isBookableEvent as d, eventHeaderSlotParents as i, formatEventQuickDate as l, resolveEventDetailsPresentation as n, offeringDatesBySeries as o, lookPartShown as r, deriveEventScheduleSummary as s, EventDetailsView as t, selectQuickDateEvents as u };
1274
+ export { eventCardListContent as a, derivePreviewRunSchedule as c, eventHeaderSlotParents as i, formatEventQuickDate as l, resolveEventDetailsPresentation as n, offeringDatesBySeries as o, lookPartShown as r, deriveEventScheduleSummary as s, EventDetailsView as t, selectQuickDateEvents as u };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
- import { Ji as listLookSlot, d as membershipClassesLabel, f as passCardListContent, u as membershipCardListContent } from "./display-B5DfNb6A.mjs";
2
+ import { Wa as listLookSlot, d as membershipClassesLabel, f as passCardListContent, u as membershipCardListContent } from "./display-lL-YRApN.mjs";
3
3
  import { r as ThemedButton } from "./ThemedButton-DuaYtnvG.mjs";
4
- import { r as EventItem, t as CardListCollection } from "./EventItem-sKBofjiW.mjs";
4
+ import { r as EventItem, t as CardListCollection } from "./EventItem-Doe4KodB.mjs";
5
5
  import React from "react";
6
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
7
  //#region ../blocks/src/system/runtime/nodes/commerce/shared/view.tsx
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import { r as __toESM, t as __commonJSMin } from "./rolldown-runtime-CE6sIgz8.mjs";
3
- import { $_ as authoredValuesEqual, A_ as getDirectImageUrlForMediaAsset, Ah as useControllableState, Bm as DialogHeader, C as selectedImageFromMediaValue, Cf as plainTextToInlineText, Cg as surfaceForegroundValue, Cm as unwrapResponse, Cy as assertNever, D_ as formatAspectRatioToken, Dy as unsafeAsMediaAssetId, E_ as normalizeRightAngle, Ef as truncateInlineText, F as nextLookTilePin, Fm as Dialog, Fn as defaultBackgroundOverrideForMode, Gm as DialogClose, Hn as rankBackgroundImagePoolItems, Ih as Button, It as getDashboardBaseUrl, Jm as DialogOverlay, Km as DialogContent, L_ as resolveManagedMediaReference, Lm as DialogContent$1, M as lookPositionLabel, Mh as createContextScope, Mm as Callout, Mr as getBlockDefinition, N as lookTilePosition, Nh as composeEventHandlers, Nn as backgroundColorTokens, Np as assertNever$1, O_ as parseAspectRatioValue, Oy as unsafeAsPositiveByteCount, Ph as Primitive, Rh as useControlReadiness, Rm as DialogDescription$1, Sa as SECTION_BACKGROUND_MIN_SOURCE_WIDTH, Sh as useSize, T_ as isRotationDimensionSwap, Tf as replaceInlineTextRange, Uh as useComposedRefs, Um as overlayScrimClass, Vm as DialogTitle$1, Wh as cn$2, Wv as unsafeAsEditorBlockId, Xm as DialogTitle, Xt as useEditorUiStore, Ym as DialogPortal, Zt as useEditorUiStoreInstance, _f as inlineTextHighlightTones, ah as __extends, b as pageDesignLookPosition, ba as resolveMediaStorageUrl, bf as normalizeInlineText, ch as __rest, cp as gradientToCss, ef as RichTextDocSchema, ff as applyInlineTextMarkToRange, gf as inlineTextEqual, hf as inlineTextAccentTones, i as usePreviewSidebarNavigation, ih as __awaiter, j_ as getImageUrl, k as usePreviewRenderBackgrounds, k_ as resolveMediaTransformForAspect, lh as __spreadArray, nf as richTextVariantCapabilities, o as usePreviewPageDesignEditorState, oh as __generator, ov as generateUuidV4, pa as computeMediaTransformStyle, q_ as asLayoutVariantKey, qm as DialogDescription, rh as __assign, sh as __read, th as usePortalContainer, tp as getCuratedSiteStyle, ua as getRichTextImageSize, uh as __spreadArrays, up as getGradientPreset, va as resolveImageUrlWithContext, vf as inlineTextToPlainText, w as selectedImageFromRenderableAsset, wf as removeInlineTextMarkFromRange, wm as selectedCanvasBlockId, xf as normalizeInlineTextMarks, y as cyclePageDesignBlockLook, z_ as mediaIdentifierSchema, zh as cva } from "./previewAssistantSlot-Caofnr1Z.mjs";
3
+ import { $h as DialogContent, $y as unsafeAsEditorBlockId, Ah as unwrapResponse, Bg as composeEventHandlers, C as selectedImageFromMediaValue, Dp as truncateInlineText, Ep as replaceInlineTextRange, F as nextLookTilePin, Fn as defaultBackgroundOverrideForMode, Fv as parseAspectRatioValue, Gg as useControlReadiness, Gh as DialogDescription$1, Hh as Dialog, Hn as rankBackgroundImagePoolItems, Ib as unsafeAsMediaAssetId, It as getDashboardBaseUrl, Iv as resolveMediaTransformForAspect, Jh as DialogTitle$1, Kg as cva, Kv as mediaIdentifierSchema, Lb as unsafeAsPositiveByteCount, Lg as useControllableState, Lv as getDirectImageUrlForMediaAsset, M as lookPositionLabel, Mb as assertNever, Mr as getBlockDefinition, Mv as isRotationDimensionSwap, N as lookTilePosition, Nn as backgroundColorTokens, Nv as normalizeRightAngle, Pv as formatAspectRatioToken, Qh as DialogClose, Rm as assertNever$1, Rv as getImageUrl, Sa as SECTION_BACKGROUND_MIN_SOURCE_WIDTH, Sp as normalizeInlineTextMarks, Tp as removeInlineTextMarkFromRange, Ug as Button, Vg as Primitive, Wh as DialogContent$1, Wv as resolveManagedMediaReference, Xg as useComposedRefs, Xh as overlayScrimClass, Xt as useEditorUiStore, Zg as cn$2, Zt as useEditorUiStoreInstance, _g as __spreadArrays, _p as inlineTextEqual, b as pageDesignLookPosition, ba as resolveMediaStorageUrl, cg as usePortalContainer, dg as __awaiter, dm as getGradientPreset, eg as DialogDescription, fg as __extends, gg as __spreadArray, gp as inlineTextAccentTones, hg as __rest, i as usePreviewSidebarNavigation, j_ as surfaceForegroundValue, jh as selectedCanvasBlockId, k as usePreviewRenderBackgrounds, kg as useSize, lm as gradientToCss, mg as __read, my as generateUuidV4, ng as DialogPortal, nm as getCuratedSiteStyle, o as usePreviewPageDesignEditorState, pa as computeMediaTransformStyle, pg as __generator, pp as applyInlineTextMarkToRange, qh as DialogHeader, rg as DialogTitle, rp as richTextVariantCapabilities, sy as authoredValuesEqual, tg as DialogOverlay, tp as RichTextDocSchema, ty as asLayoutVariantKey, ua as getRichTextImageSize, ug as __assign, va as resolveImageUrlWithContext, vp as inlineTextHighlightTones, w as selectedImageFromRenderableAsset, wp as plainTextToInlineText, xp as normalizeInlineText, y as cyclePageDesignBlockLook, yp as inlineTextToPlainText, zg as createContextScope, zh as Callout } from "./previewAssistantSlot-La6MerV_.mjs";
4
4
  import { A as LoaderCircle, F as Italic$1, G as FileText, Gt as err, H as Highlighter, I as Info, J as FileHeadphone, K as FileSpreadsheet, Kt as ok, L as Image, M as ListOrdered, N as Link$1, R as ImageUp, S as Palette, St as Archive, W as File, Y as FileArchive, Z as EyeOff, a as Upload, c as Trash2, dt as ChevronRight, ft as ChevronLeft, j as List, mt as Check, n as X, q as FilePlay, s as TriangleAlert, tt as Crop, v as Plus, vt as Bold$1, y as Pencil } from "./lucide-react-BCNn8dEQ.mjs";
5
- import { I as siteColourCss, O as usePreviewCompiledThemeOptional, Tn as classifyKnownMimeType, Ut as readThemeScopeContext, Xt as CHOSEN_OPTION_CLASS, a as PreviewChromeFloatingControl, an as usePrevious, c as measureSiteTopChromeClearance, en as Select, et as useMediaEditor, f as CustomizeBackgroundColorPicker, fn as useFieldDescribedBy, in as SelectValue, ln as Input, nn as SelectItem, nt as useApiMediaUploader, rn as SelectTrigger, rt as TransferError, s as readThemeCustomProperties, tn as SelectContent, tt as useMediaEditorOptional, u as planBlockToolbarPlacement } from "./SiteChromeCustomizeButton-CrgS3I8d.mjs";
6
- import { A as Tooltip, F as DropdownMenu, H as DropdownMenuTrigger, I as DropdownMenuContent, L as DropdownMenuItem, M as TooltipProvider, N as TooltipTrigger, P as Badge, a as blockNoticeAction, d as arrangementBackgroundControlFor, f as arrangementBlockControlsFor, j as TooltipContent, o as blockNoticeLabel, r as useBlockCustomizeControls, s as blockNoticeMessage, t as useOpenBlockForSetup, u as useBlockNotice } from "./useOpenBlockForSetup-CCEMkosU.mjs";
5
+ import { E as usePreviewCompiledThemeOptional, L as siteColourCss, Tn as classifyKnownMimeType, Wt as readThemeScopeContext, Xt as CHOSEN_OPTION_CLASS, a as PreviewChromeFloatingControl, an as usePrevious, c as measureSiteTopChromeClearance, en as Select, f as CustomizeBackgroundColorPicker, fn as useFieldDescribedBy, in as SelectValue, it as TransferError, ln as Input, nn as SelectItem, nt as useMediaEditorOptional, rn as SelectTrigger, rt as useApiMediaUploader, s as readThemeCustomProperties, tn as SelectContent, tt as useMediaEditor, u as planBlockToolbarPlacement } from "./SiteChromeCustomizeButton-D1MGyN_Z.mjs";
6
+ import { A as Tooltip, F as DropdownMenu, H as DropdownMenuTrigger, I as DropdownMenuContent, L as DropdownMenuItem, M as TooltipProvider, N as TooltipTrigger, P as Badge, a as blockNoticeAction, d as arrangementBackgroundControlFor, f as arrangementBlockControlsFor, j as TooltipContent, o as blockNoticeLabel, r as useBlockCustomizeControls, s as blockNoticeMessage, t as useOpenBlockForSetup, u as useBlockNotice } from "./useOpenBlockForSetup-BDkuSZxQ.mjs";
7
7
  import * as React$1 from "react";
8
8
  import React, { Component, createContext, createRef, forwardRef, useCallback, useContext, useDebugValue, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from "react";
9
9
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -28959,13 +28959,11 @@ function useCropAutosave(props, transform) {
28959
28959
  };
28960
28960
  }
28961
28961
  function CropDialogContent(props) {
28962
- const reference = props.state.resolution?.reference;
28963
- const transform = reference?.type === "image" ? resolveMediaTransformForAspect(reference.transform, props.aspect) : void 0;
28962
+ const transform = resolveMediaTransformForAspect(props.transform, props.aspect);
28964
28963
  const updateSelection = useCropAutosave(props, transform);
28965
- if (props.state.crop.kind === "ineligible") return null;
28966
- return props.state.crop.kind === "ready" ? /* @__PURE__ */ jsx(ImageCropper, {
28967
- imageUrl: props.state.crop.source.imageUrl,
28968
- orientationMode: props.state.crop.source.orientationMode,
28964
+ return props.source ? /* @__PURE__ */ jsx(ImageCropper, {
28965
+ imageUrl: props.source.imageUrl,
28966
+ orientationMode: props.source.orientationMode,
28969
28967
  aspect: props.aspect,
28970
28968
  initialRect: transform?.rect,
28971
28969
  initialHotspot: transform?.hotspot,
@@ -28981,16 +28979,9 @@ function CropDialogContent(props) {
28981
28979
  children: "Unable to load image preview"
28982
28980
  });
28983
28981
  }
28984
- function CropDialog(props) {
28985
- const reference = props.state.resolution?.reference;
28986
- if (reference?.type !== "image" || props.state.crop.kind === "ineligible") return null;
28987
- const sessionKey = JSON.stringify([
28988
- props.siteId,
28989
- props.editingSlot,
28990
- reference.identifier,
28991
- props.aspect
28992
- ]);
28993
- const content = /* @__PURE__ */ jsx(CropDialogContent, { ...props }, sessionKey);
28982
+ /** The existing crop/focus editor, also usable before an upload has a durable media identity. */
28983
+ function ImageCropDialog(props) {
28984
+ const content = /* @__PURE__ */ jsx(CropDialogContent, { ...props }, props.sessionKey);
28994
28985
  if (props.mode === "inline") return props.open ? /* @__PURE__ */ jsx("div", {
28995
28986
  className: "space-y-4",
28996
28987
  children: content
@@ -29008,6 +28999,22 @@ function CropDialog(props) {
29008
28999
  children: content
29009
29000
  });
29010
29001
  }
29002
+ function CropDialog(props) {
29003
+ const reference = props.state.resolution?.reference;
29004
+ if (reference?.type !== "image" || props.state.crop.kind === "ineligible") return null;
29005
+ const sessionKey = JSON.stringify([
29006
+ props.siteId,
29007
+ props.editingSlot,
29008
+ reference.identifier,
29009
+ props.aspect
29010
+ ]);
29011
+ return /* @__PURE__ */ jsx(ImageCropDialog, {
29012
+ ...props,
29013
+ sessionKey,
29014
+ transform: reference.transform,
29015
+ source: props.state.crop.kind === "ready" ? props.state.crop.source : null
29016
+ });
29017
+ }
29011
29018
  //#endregion
29012
29019
  //#region ../media-editor/src/pickerUploads.ts
29013
29020
  /** Batch identity and manual selection have one owner; File identity is irrelevant. */