@riverbankcms/sdk 0.173.0 → 0.174.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 (208) hide show
  1. package/README.md +6 -1
  2. package/dist/_dts/{BlocksIslandsHydrator-O50mTMCY.d.ts → BlocksIslandsHydrator-GqVX3I8E.d.ts} +1 -1
  3. package/dist/_dts/{Page-Bk99sJwV.d.ts → Page-BhUH31M-.d.ts} +27 -16
  4. package/dist/_dts/{SdkPreviewMode-DzAue6Kj.d.ts → SdkPreviewMode-DBn2x0UL.d.ts} +14 -7
  5. package/dist/_dts/{client-ZlNEIvlU.d.ts → client-Cr-sOeSl.d.ts} +1 -1
  6. package/dist/_dts/{content-types-DBXPNc0h.d.ts → content-types-DKw1yJdN.d.ts} +2 -2
  7. package/dist/_dts/{contracts-D9bhu0bb.d.ts → contracts-CJ2O03nB.d.ts} +5 -4
  8. package/dist/_dts/{footerPageOutline-Bfap3soN.d.ts → footerPageOutline-DoGHHKr_.d.ts} +6 -6
  9. package/dist/_dts/{generatePageMetadata-DwCdg31h.d.ts → generatePageMetadata-CJGu4hoa.d.ts} +2 -2
  10. package/dist/_dts/{index-C611wjIL.d.ts → index--39uLjrr.d.ts} +1 -1
  11. package/dist/_dts/{index-CJzs-yIJ.d.ts → index-3GzargmS.d.ts} +2 -2
  12. package/dist/_dts/{index-Dq_AboWN.d.ts → index-Bq-488M7.d.ts} +1 -1
  13. package/dist/_dts/{index-KXh8FQ2s.d.ts → index-DQZ5L0Gb.d.ts} +2 -2
  14. package/dist/_dts/{index-DutLU2d2.d.ts → index-DYlfdT1O.d.ts} +2 -1
  15. package/dist/_dts/{index-BnatulTs.d.ts → index-DYsP4k6S.d.ts} +3 -3
  16. package/dist/_dts/{index-DW3eeNph.d.ts → index-DdEi2iXd.d.ts} +4 -4
  17. package/dist/_dts/{loadContent-Bde2y870.d.ts → loadContent-BVPagYmy.d.ts} +11 -11
  18. package/dist/_dts/{request-Bysk4QPI.d.ts → request-Be1E-H-V.d.ts} +3559 -1967
  19. package/dist/_dts/{resolveBlockData-ChbNvpSF.d.ts → resolveBlockData-D1pL25bD.d.ts} +5 -5
  20. package/dist/_dts/{resolvePageContent-CGa6QMgc.d.ts → resolvePageContent-B4sbTf96.d.ts} +2 -2
  21. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
  22. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  23. package/dist/_dts/sdk/src/client.d.ts +9 -9
  24. package/dist/_dts/sdk/src/config/index.d.ts +6 -6
  25. package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
  26. package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
  27. package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
  28. package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
  29. package/dist/_dts/sdk/src/data/types.d.ts +2 -2
  30. package/dist/_dts/sdk/src/index.d.ts +8 -8
  31. package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
  32. package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
  33. package/dist/_dts/sdk/src/navigation/index.d.ts +3 -3
  34. package/dist/_dts/sdk/src/next/index.d.ts +7 -7
  35. package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
  36. package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
  37. package/dist/_dts/sdk/src/portal/client.d.ts +4 -2
  38. package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
  39. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
  40. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
  41. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  42. package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
  43. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
  44. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
  45. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +13 -8
  46. package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
  47. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  48. package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
  49. package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
  50. package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
  51. package/dist/_dts/sdk/src/server.d.ts +5 -5
  52. package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
  53. package/dist/_dts/sdk/src/theme/index.d.ts +36 -204
  54. package/dist/_dts/{types-BwitGNTl.d.ts → types-5MeDI1w8.d.ts} +7 -7
  55. package/dist/_dts/{types-BoEk9ZON.d.ts → types-Bm5_3VEd.d.ts} +3 -3
  56. package/dist/_dts/{types-kpp8XyXv.d.ts → types-CVoCc_Ia.d.ts} +2 -2
  57. package/dist/_dts/{validation-ChftKX-o.d.ts → validation-lEtYD-Rh.d.ts} +4 -4
  58. package/dist/client/{BlocksIslandsHydrator-BnUeSE3d.mjs → BlocksIslandsHydrator-DkflFLGQ.mjs} +17 -17
  59. package/dist/client/{BookingMailingListNote-LHQMODqB.mjs → BookingMailingListNote-CAyoiAGD.mjs} +10 -10
  60. package/dist/client/{BookingPanelArrangement-Be704P85.mjs → BookingPanelArrangement-C7yiJrxm.mjs} +1 -1
  61. package/dist/client/{BookingQuestionFields-BewbU_cV.mjs → BookingQuestionFields-DZMrGvBh.mjs} +3 -3
  62. package/dist/client/{CalendarNavigationChevron-BMZp3RS3.mjs → CalendarNavigationChevron-BPQU5Snc.mjs} +6 -6
  63. package/dist/client/{DemoBookingPortalAccess-CARUWQ_E.mjs → DemoBookingPortalAccess-BnEgvJas.mjs} +5 -5
  64. package/dist/client/{EventCalendar.client-CaI6upCX.mjs → EventCalendar.client-BiWQc28-.mjs} +9 -9
  65. package/dist/client/{EventCombined.client-CoRUaYHY.mjs → EventCombined.client-B_ytWQtn.mjs} +7 -7
  66. package/dist/client/{EventItem-Doe4KodB.mjs → EventItem-C-mxXpX_.mjs} +4 -4
  67. package/dist/client/{EventListWeekNavigation-CXWLKDfa.mjs → EventListWeekNavigation-Bm3Ap1Rd.mjs} +1 -1
  68. package/dist/client/{EventListing.client-DvJ5tGTx.mjs → EventListing.client-Bs_8im5_.mjs} +3 -3
  69. package/dist/client/{EventListing.view-BmfyK7S5.mjs → EventListing.view-CN7BjGgC.mjs} +6 -6
  70. package/dist/client/{EventRegistrationPayment-DwMlJB2V.mjs → EventRegistrationPayment-DPkRcSdw.mjs} +11 -10
  71. package/dist/client/{LocationMapActions-CdRPU6gp.mjs → LocationMapActions-BJT7MqP2.mjs} +1 -1
  72. package/dist/client/{MapDrawingSvg-DCLtxOnt.mjs → MapDrawingSvg-DCIwlON6.mjs} +1 -1
  73. package/dist/client/{Page-D46Dmr7b.mjs → Page--xJ23nA5.mjs} +629 -494
  74. package/dist/client/{StepIndicator-CrSZCZn1.mjs → StepIndicator-D391QRNc.mjs} +9 -8
  75. package/dist/client/{accessibleSurfaces-D4DhWo9j.mjs → accessibleSurfaces-DN8it_Cx.mjs} +35 -7
  76. package/dist/client/{accordion-P8xcfKxq.mjs → accordion-BQtTkDN8.mjs} +1 -1
  77. package/dist/client/{bookability-SargNwlO.mjs → bookability-CE637yDE.mjs} +1 -1
  78. package/dist/client/{booking-form.client-BM2s-NqR.mjs → booking-form.client-D9M7TKGV.mjs} +362 -47
  79. package/dist/client/{bookingForm-JnaZPZge.mjs → bookingForm-BsOS0sl9.mjs} +4 -4
  80. package/dist/client/bookings.mjs +6 -6
  81. package/dist/client/{boxStyleClassNames-Cahps5kR.mjs → boxStyleClassNames-CNDLpT06.mjs} +1 -1
  82. package/dist/client/{carousel-CQQ_m0KA.mjs → carousel-CPsW-FPh.mjs} +1 -1
  83. package/dist/client/{cart-0Q4fjw_K.mjs → cart-CwElmocm.mjs} +3 -3
  84. package/dist/client/{cart.client-BI0IaHX3.mjs → cart.client-RpqI56w8.mjs} +1 -1
  85. package/dist/client/{checkout-1J-3ftxF.mjs → checkout-CfMgqY8H.mjs} +3 -3
  86. package/dist/client/{checkout.client-DOGYDlDk.mjs → checkout.client-BpuPyOuJ.mjs} +1 -1
  87. package/dist/client/{checkoutUrls-CwHqcqzP.mjs → checkoutUrls-VeHY6WYj.mjs} +1 -1
  88. package/dist/client/client.mjs +158 -7
  89. package/dist/client/{context-D0KCgbOq.mjs → context-CNlesLfF.mjs} +1 -1
  90. package/dist/client/{course-CmOuoZHN.mjs → course-q1sA4Cj-.mjs} +2 -2
  91. package/dist/client/{creditProducts-BTRX4edc.mjs → creditProducts-KYMVIH3J.mjs} +2 -84
  92. package/dist/client/{dateFormatting-Dmfaczzq.mjs → dateFormatting-B73Ll0s4.mjs} +9 -1
  93. package/dist/client/{demoPortalMagicLink-CL7KGRta.mjs → demoPortalMagicLink-BVbLD4pi.mjs} +1 -1
  94. package/dist/client/{display-lL-YRApN.mjs → display-D8MW2b0e.mjs} +618 -397
  95. package/dist/client/{enhanceHeaderSection-B-eLGs2C.mjs → enhanceHeaderSection-BzjY6AiY.mjs} +3 -3
  96. package/dist/client/{event-details.client-DH1-Jxsh.mjs → event-details.client-CseTWUFC.mjs} +1 -1
  97. package/dist/client/{event-registration.client-GuuElczW.mjs → event-registration.client-b5TLxntR.mjs} +11 -11
  98. package/dist/client/{eventCalendar-BiCINPkV.mjs → eventCalendar-C-kJNIc9.mjs} +4 -4
  99. package/dist/client/{eventCombined-BtzmH6FW.mjs → eventCombined-BgHJGhwE.mjs} +4 -4
  100. package/dist/client/{eventDetails-BJpAD10-.mjs → eventDetails-CAwbreD0.mjs} +2 -2
  101. package/dist/client/{eventListing-jLB8iRqp.mjs → eventListing-_14atrj8.mjs} +4 -4
  102. package/dist/client/{eventRegistration-WhtpDEbq.mjs → eventRegistration-BOqSdstJ.mjs} +4 -4
  103. package/dist/client/{form-DO6qKH3M.mjs → form-DfAB-llc.mjs} +3 -3
  104. package/dist/client/{form.client-D12ljYiX.mjs → form.client-DN-I9_qC.mjs} +6 -6
  105. package/dist/client/{form.parts-C8QHaQOI.mjs → form.parts-t2Q1neM6.mjs} +1 -1
  106. package/dist/client/{formatDate-BnhfIpCa.mjs → formatDate-Dp7POa9Y.mjs} +1 -1
  107. package/dist/client/gifting/client.mjs +2 -2
  108. package/dist/client/{headerSection-BtFWtoUm.mjs → headerSection-Dces54pb.mjs} +2 -2
  109. package/dist/client/{newsletter-form.client-oHrqM_Ao.mjs → newsletter-form.client-D_YFUlR2.mjs} +9 -7
  110. package/dist/client/{newsletter-form.parts-D5U-FuVy.mjs → newsletter-form.parts-URO5Mn_I.mjs} +1 -1
  111. package/dist/client/{newsletterForm-CBYbFxSx.mjs → newsletterForm-_c9fKIzS.mjs} +3 -3
  112. package/dist/client/{noop-CN0o0yjH.mjs → noop-D5mFWXtN.mjs} +30 -6
  113. package/dist/client/portal/client.mjs +346 -272
  114. package/dist/client/{product-detail.client-d_sNCapC.mjs → product-detail.client-CVW1UIxJ.mjs} +1 -1
  115. package/dist/client/{product-list.client-DkSpw6WQ.mjs → product-list.client-CF9hO23G.mjs} +1 -1
  116. package/dist/client/{productDetail-DaqM-LgL.mjs → productDetail-C_qbmUuP.mjs} +3 -3
  117. package/dist/client/{productList-CMx4-XlG.mjs → productList-Df5qDD0z.mjs} +3 -3
  118. package/dist/client/{propsDecoder-BZbUKstC.mjs → propsDecoder-BiEyK2ii.mjs} +3 -3
  119. package/dist/client/{registry.server-Cdot3dMk.mjs → registry.server-ClcfWpvM.mjs} +28 -26
  120. package/dist/client/rendering/client.mjs +26 -26
  121. package/dist/client/rendering/islands.mjs +1 -1
  122. package/dist/client/rendering.mjs +17 -13
  123. package/dist/client/{richText-coerce-ByApwB4q.mjs → richText-coerce-C32cRQ03.mjs} +1 -1
  124. package/dist/client/{routeIslandApiConfig-DTET8f__.mjs → routeIslandApiConfig-DAypPzSo.mjs} +1 -1
  125. package/dist/client/{runtimeResponse-IkOwKZD0.mjs → runtimeResponse-9v8q2NBc.mjs} +1 -1
  126. package/dist/client/runtimeResponse-CVkM0dHy.mjs +3 -0
  127. package/dist/client/{shop-commerce-oDR76k1q.mjs → shop-commerce-Bw4_BXQg.mjs} +12 -12
  128. package/dist/client/{shop-commerce-store-DjoUpL3a.mjs → shop-commerce-store-Da6Ah-_4.mjs} +1 -1
  129. package/dist/client/{shop-discount-apply.state-WsGb9DD8.mjs → shop-discount-apply.state-DidgH7ow.mjs} +2 -2
  130. package/dist/client/{shop-Cy6xXDM7.mjs → shop-gteEpeO5.mjs} +3 -3
  131. package/dist/client/{shop.client-Brha4BSM.mjs → shop.client-CbbdjWWd.mjs} +13 -13
  132. package/dist/client/{shop.interactive-CXhYl0DW.mjs → shop.interactive-CKFORzux.mjs} +13 -20
  133. package/dist/client/{shopShared-JCa_SRhP.mjs → shopShared-C7QjoywZ.mjs} +2 -2
  134. package/dist/client/{timetableModel-CZeJwMxP.mjs → timetableModel-CtZiIj9q.mjs} +24 -14
  135. package/dist/client/{useAvailableSlots-DfbSkWop.mjs → useAvailableSlots-CUVRD1nx.mjs} +24 -4
  136. package/dist/client/{useDiscountApply-Dq-wjb1d.mjs → useDiscountApply-BZU5DWZQ.mjs} +1 -1
  137. package/dist/client/{useDiscountCodeUi-Cyy0meCH.mjs → useDiscountCodeUi-BuLgof7O.mjs} +1 -1
  138. package/dist/client/{useEventPagination-CCAGQHsD.mjs → useEventPagination-B4VPtSEF.mjs} +6 -6
  139. package/dist/client/{view-Sw075FOY.mjs → view-CvlTplao.mjs} +2 -2
  140. package/dist/client/{view-D6yebI4r.mjs → view-CxUpgcM6.mjs} +12 -10
  141. package/dist/preview-next/client/{LocationPickerEnvironment-D4F_5rnr.mjs → LocationPickerEnvironment-8iKKoYZr.mjs} +1 -1
  142. package/dist/preview-next/client/{MapLibreEditMap-BKMNxSEJ.mjs → MapLibreEditMap-AIUPN1Zx.mjs} +2 -2
  143. package/dist/preview-next/client/{PageSectionToolbar-DG2rXUmo.mjs → PageSectionToolbar-BFbSrDbi.mjs} +57 -144
  144. package/dist/preview-next/client/{PreviewEditorSidebar-BDY5vdHU.mjs → PreviewEditorSidebar-BtpzqQ-i.mjs} +758 -1279
  145. package/dist/preview-next/client/{PreviewEditorUI-CqZCfOaz.mjs → PreviewEditorUI-z22h-CCY.mjs} +29 -26
  146. package/dist/preview-next/client/{PreviewShell-Bv2HZ7JY.mjs → PreviewShell-BW3Qpoa_.mjs} +50 -30
  147. package/dist/preview-next/client/{SdkPreviewModeRuntime-BMTcR-MW.mjs → SdkPreviewModeRuntime-BvVeK1hR.mjs} +47 -19
  148. package/dist/preview-next/client/{lucide-react-BCNn8dEQ.mjs → lucide-react-Dfgl3Vtq.mjs} +7 -1
  149. package/dist/preview-next/client/{previewAssistantSlot-La6MerV_.mjs → previewAssistantSlot-BUqAh1FL.mjs} +100626 -51720
  150. package/dist/preview-next/client/{previewChromeRoot-BcOQqJIP.mjs → previewChromeRoot-NCy5zHO8.mjs} +1 -1
  151. package/dist/preview-next/client/runtime.mjs +3 -3
  152. package/dist/preview-next/client/{sdk-runtime-BkckHox4.mjs → sdk-runtime-CxmKDVGZ.mjs} +2 -2
  153. package/dist/preview-next/client/siteStyleAccess-B_UaDyJO.mjs +9356 -0
  154. package/dist/preview-next/client/{useAutosaveStatus-CPAHgGqI.mjs → useAutosaveStatus-BqmWvPLY.mjs} +2 -2
  155. package/dist/preview-next/client/{useOpenBlockForSetup-BDkuSZxQ.mjs → useOpenBlockForSetup-LAllV0rU.mjs} +8 -4
  156. package/dist/preview-next/container-responsive.css +117 -32
  157. package/dist/preview-next/keepAlive.mjs +1 -1
  158. package/dist/preview-next/middleware.mjs +1 -1
  159. package/dist/preview-next/{route-contract-CPV30ABr.mjs → route-contract-DV6SeCNv.mjs} +152 -2
  160. package/dist/server/{Block.shared-BaMMstO1.mjs → Block.shared-Ch2FKAvU.mjs} +10 -5
  161. package/dist/server/{ThemeScopeCore-D1NTXZdX.mjs → ThemeScopeCore-DFvjDVzi.mjs} +23 -6
  162. package/dist/server/{accessibleSurfaces-Dbd2__Le.mjs → accessibleSurfaces-CM3QANtw.mjs} +22 -5
  163. package/dist/server/{bindings-Dge4sqel.mjs → bindings-CQg2lzZn.mjs} +6 -4
  164. package/dist/server/{client-VVIQjC4r.mjs → client-aYRTVneD.mjs} +155 -4
  165. package/dist/server/config-validation.mjs +1 -1
  166. package/dist/server/config.mjs +2 -2
  167. package/dist/server/customCss-BGB8gMVb.mjs +210 -0
  168. package/dist/server/data/resolveBlockData.mjs +1 -1
  169. package/dist/server/index.mjs +2 -2
  170. package/dist/server/{loadContent-BIJb3WAK.mjs → loadContent-Cgpfr44e.mjs} +8 -9
  171. package/dist/server/{loadPage-DjTU19y7.mjs → loadPage-RDk10NMP.mjs} +3 -3
  172. package/dist/server/lookMediaFrame-CQtkvlDn.mjs +2528 -0
  173. package/dist/server/manifest.mjs +2 -2
  174. package/dist/server/next.mjs +9 -8
  175. package/dist/server/{overrideResolution-1Ru3NMQj.mjs → overrideResolution-VhhN94d8.mjs} +3 -4
  176. package/dist/server/page-converter.mjs +2 -2
  177. package/dist/server/{pageRenderPlan-CytPhrI9.mjs → pageRenderPlan-CkFTsxkd.mjs} +25 -17
  178. package/dist/server/{pageRuntimeSupport-DWspU5EZ.mjs → pageRuntimeSupport-CpAtzNxD.mjs} +14 -6
  179. package/dist/server/{pageShared-Bhx8bVe1.mjs → pageShared-B8yLPjs0.mjs} +371 -56
  180. package/dist/server/{parseThemeForPersistence-CtgRtvo3.mjs → parseThemeForPersistence-Cwqb5pZx.mjs} +2 -2
  181. package/dist/server/{portal-Ce1Prfl3.mjs → portal-BjVHMAUC.mjs} +1 -1
  182. package/dist/server/portal.mjs +1 -1
  183. package/dist/server/{prebuild-BjvFb0CA.mjs → prebuild-DOu6QceG.mjs} +1 -1
  184. package/dist/server/prebuild.mjs +1 -1
  185. package/dist/server/{prefetchBlockData-Db3stNpp.mjs → prefetchBlockData-CfOXFKYG.mjs} +2 -2
  186. package/dist/server/{registry-BMCfcev6.mjs → registry-34rkAfaU.mjs} +608 -3131
  187. package/dist/server/rendering/components/pageShared.mjs +1 -1
  188. package/dist/server/rendering/helpers/loadPage.mjs +1 -1
  189. package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +2 -2
  190. package/dist/server/rendering/server.mjs +3 -3
  191. package/dist/server/rendering.mjs +7 -7
  192. package/dist/server/{resolveBlockData--yUbI-Ll.mjs → resolveBlockData-D7VeoWgr.mjs} +1 -1
  193. package/dist/server/{resolveButtonColourStates-CCPUY9Xh.mjs → resolveButtonColourStates--6yJp9Tq.mjs} +15 -4
  194. package/dist/server/{schema-D5Vfmqzw.mjs → schema-CUDHMirj.mjs} +46 -153
  195. package/dist/server/server.mjs +3 -3
  196. package/dist/server/{src-Cxucn-1P.mjs → src-DHK4JUlp.mjs} +4 -1
  197. package/dist/server/theme-bridge.mjs +21 -15
  198. package/dist/server/theme.mjs +2 -2
  199. package/dist/server/{three-pass-converter-Bsfdy_ZV.mjs → three-pass-converter-39SXCCnh.mjs} +1 -1
  200. package/dist/server/{titleSourceSchema-DwKJfMYb.mjs → titleSourceSchema-Cu-3PRvv.mjs} +0 -1
  201. package/dist/server/{validation-EgTtnTcY.mjs → validation-CLVKoJrX.mjs} +4 -4
  202. package/dist/server/{version-LjgU0Cq1.mjs → version-HVfdvBJ0.mjs} +1 -1
  203. package/dist/styles/index.css +935 -271
  204. package/package.json +1 -1
  205. package/dist/client/runtimeResponse-Wd6kwhE_.mjs +0 -3
  206. package/dist/preview-next/client/SiteChromeCustomizeButton-D1MGyN_Z.mjs +0 -55403
  207. package/dist/server/customCss-QymcmOZ-.mjs +0 -97
  208. package/dist/server/opaqueSurface-COEKXVwk.mjs +0 -54
@@ -1,23 +1,23 @@
1
1
  "use client";
2
- import { $i as resolveBookingPackagePaymentSelection, Ai as projectSelectedAppointmentConsentIntoForm, Bi as decideBookingQuestionsRestoration, Ci as resolveBookingSelectedService, Di as toSelectedCollectionOptionKind, Ei as selectedBookingCollectionOptionKind, Fi as deriveAppointmentBookingQuestions, Ii as isAppointmentBookingQuestionsEvent, Ji as applyBookingPaymentAdmission, Ki as BOOKING_FORM_DATA_RESERVED_KEYS, Li as needsAppointmentQuestionsRefresh, Mi as EMPTY_APPOINTMENT_BOOKING_QUESTIONS, Nc as unsafeAsSiteId, Ni as applyAppointmentBookingQuestionsEvent, Oa as leavePage, Oi as formatCentsAsCurrencyInput, Pi as appointmentQuestionsRefusal, Qi as reconcileBookingPackagePurchase, Ri as bookingQuestionsAnswerDraftSchema, Sa as resolveDateRuntimeContext, Si as resolveBookingPaymentStep, Ti as resolveDefaultBookingServiceId, Ui as restoreBookingQuestionsAnswers, Wi as toBookingQuestionsAnswerDraft, Xi as bookingPackageRequestKey, Yi as bookingHasPackagePaymentChoices, Zi as bookingRequiresResourceSelection, _i as normalizeBookingFormConfig, aa as toBookingPurchasablePackages, at as buildReviewedBookingPaymentViewModel, bi as prepareBookingSubmission, ci as buildBookingFormInteractiveIslandProps, di as formatBookingSubmissionPreparationError, ea as resolveBookingPackageSources, fi as getBookingRedirectStateFromLocation, gi as isBookingServiceSlidingAmountInRange, ia as resolveBookingPurchasablePackages, it as buildBookingPaymentSelectionViewModel, ji as resolveSelectedAppointmentConsent, l as formatValidity, li as readOverrideServiceCategories, mc as resolveBookingSignupOffer, na as resolveBookingPaymentChoice, oa as getBookingServiceSlidingScale, ot as paymentChoiceDetails, pi as getBookingSuccessCopy, pr as bookingPresentation, ra as resolveBookingPaymentMode, sr as createSignInReturnDraftStore, st as paymentChoicePrice, ta as resolveBookingPaymentAvailability, ui as deriveBookingFormViewState, vi as normalizeBookingServices, wi as resolveBookingSiteId, xa as readRuntimeNow, xi as resolveAppointmentCheckoutVerificationState, yi as parseBookingCurrencyInputToCents } from "./display-lL-YRApN.mjs";
3
- import { Ht as formatTime, Kt as resolveBookingDisplayContext, Rt as formatDate, Vt as formatDateTimeRange, W as isBookingRequirementConsentFieldId, Wt as formatTimeZoneCityLabel, fn as formatCurrencyAmount, in as resolveBookingTimeZoneId, on as parseUtcIsoDateTimeString, rn as resolveBookingBusinessTimeZone, sn as toUtcIsoDateTimeString, t as logger } from "./noop-CN0o0yjH.mjs";
4
- import { F as unsafeAsAppointmentResourceId, I as unsafeAsAppointmentServiceId, S as formatCreditProductUnits, _ as clearWorkflowFeedback, g as okWith, m as err, o as checkBookingQuestionsAnswered, p as assertNever, v as reportWorkflowError, x as formatCreditProductBalance, y as reportWorkflowSuccess } from "./creditProducts-BTRX4edc.mjs";
5
- import { c as NavigationHandOffPanel, i as SiteTermsChangedNotice, l as DiscountCodeDisclosure, o as useSiteTermsAgreement, r as SiteTermsAgreementField, t as BookingConfirmation } from "./DemoBookingPortalAccess-CARUWQ_E.mjs";
2
+ import { $i as reconcileBookingPackagePurchase, Ca as resolveDateRuntimeContext, Ci as resolveBookingPaymentStep, Di as selectedBookingCollectionOptionKind, Ei as resolveDefaultBookingServiceId, Fc as unsafeAsSiteId, Fi as appointmentQuestionsRefusal, Gi as toBookingQuestionsAnswerDraft, Ii as deriveAppointmentBookingQuestions, Li as isAppointmentBookingQuestionsEvent, Mi as resolveSelectedAppointmentConsent, Ni as EMPTY_APPOINTMENT_BOOKING_QUESTIONS, Oi as toSelectedCollectionOptionKind, Pi as applyAppointmentBookingQuestionsEvent, Qi as bookingRequiresResourceSelection, Ri as needsAppointmentQuestionsRefresh, Sa as readRuntimeNow, Si as resolveAppointmentCheckoutVerificationState, Ti as resolveBookingSiteId, Vi as decideBookingQuestionsRestoration, Wi as restoreBookingQuestionsAnswers, Xi as bookingHasPackagePaymentChoices, Yi as applyBookingPaymentAdmission, Zi as bookingPackageRequestKey, _i as isSameOpenCheckout, aa as resolveBookingPurchasablePackages, at as buildReviewedBookingPaymentViewModel, bi as parseBookingCurrencyInputToCents, ci as buildBookingFormInteractiveIslandProps, di as formatBookingSubmissionPreparationError, ea as resolveBookingPackagePaymentSelection, fi as getBookingRedirectStateFromLocation, gc as resolveBookingSignupOffer, gi as isBookingServiceSlidingAmountInRange, ia as resolveBookingPaymentMode, it as buildBookingPaymentSelectionViewModel, ji as projectSelectedAppointmentConsentIntoForm, ka as leavePage, ki as formatCentsAsCurrencyInput, l as formatValidity, li as readOverrideServiceCategories, na as resolveBookingPaymentAvailability, oa as toBookingPurchasablePackages, ot as paymentChoiceDetails, pi as getBookingSuccessCopy, pr as bookingPresentation, qi as BOOKING_FORM_DATA_RESERVED_KEYS, ra as resolveBookingPaymentChoice, sa as getBookingServiceSlidingScale, sr as createSignInReturnDraftStore, st as paymentChoicePrice, ta as resolveBookingPackageSources, ui as deriveBookingFormViewState, vi as normalizeBookingFormConfig, wi as resolveBookingSelectedService, xi as prepareBookingSubmission, yi as normalizeBookingServices, zi as bookingQuestionsAnswerDraftSchema } from "./display-D8MW2b0e.mjs";
3
+ import { Bt as formatDate, G as isBookingRequirementConsentFieldId, Jt as resolveBookingDisplayContext, Kt as formatTimeZoneCityLabel, Ut as formatDateTimeRange, Wt as formatTime, an as resolveBookingBusinessTimeZone, cn as parseUtcIsoDateTimeString, ln as toUtcIsoDateTimeString, mn as formatCurrencyAmount, on as resolveBookingTimeZoneId, t as logger } from "./noop-D5mFWXtN.mjs";
4
+ import { M as unsafeAsAppointmentResourceId, N as unsafeAsAppointmentServiceId, S as formatCreditProductUnits, _ as clearWorkflowFeedback, g as okWith, m as err, o as checkBookingQuestionsAnswered, p as assertNever, v as reportWorkflowError, x as formatCreditProductBalance, y as reportWorkflowSuccess } from "./creditProducts-KYMVIH3J.mjs";
5
+ import { c as NavigationHandOffPanel, i as SiteTermsChangedNotice, l as DiscountCodeDisclosure, o as useSiteTermsAgreement, r as SiteTermsAgreementField, t as BookingConfirmation } from "./DemoBookingPortalAccess-BnEgvJas.mjs";
6
6
  import { t as layoutServicesByCategory } from "./appointment-service-categories-Cl2pqw-z.mjs";
7
- import { n as useBlockApi, t as BlockApiProvider } from "./context-D0KCgbOq.mjs";
7
+ import { a as formatTime$1, i as formatDatePillParts, n as useAvailableDates, o as getRuntimeTimeZone, r as formatDate$1, s as clientPersonPhrases, t as useAvailableSlots } from "./useAvailableSlots-CUVRD1nx.mjs";
8
+ import { n as useBlockApi, t as BlockApiProvider } from "./context-CNlesLfF.mjs";
8
9
  import { l as SpinnerNode, r as ThemedButton } from "./ThemedButton-DuaYtnvG.mjs";
9
- import { t as buildCheckoutReturnUrls } from "./checkoutUrls-CwHqcqzP.mjs";
10
+ import { t as buildCheckoutReturnUrls } from "./checkoutUrls-VeHY6WYj.mjs";
10
11
  import { t as scrollToBlock } from "./scrollToBlock-DrgKE0qZ.mjs";
11
12
  import { t as CheckboxChoice } from "./CheckboxChoice-b-PJLEXe.mjs";
12
13
  import { t as CheckIcon } from "./CheckIcon-CVcKteXH.mjs";
13
14
  import { n as getFieldValidationControlProps, t as FieldValidationMessage } from "./FieldValidationMessage-CsqxShw4.mjs";
14
15
  import { t as FeedbackMessage } from "./FeedbackMessage-CSJrAuXH.mjs";
15
- import { i as useBookingNowIso, n as OptionalMark, r as parseBookingSubmissionFailure } from "./BookingQuestionFields-BewbU_cV.mjs";
16
- import { n as TerminalPanel, r as StateIcon, t as useDiscountCodeUi } from "./useDiscountCodeUi-Cyy0meCH.mjs";
17
- import { a as usePolling, c as useBookingQuestionsRefresh, i as BookingConsentAgreement, l as PaymentChoiceRows, n as BookingQuestionSections, o as portalSessionIdentity, s as useSignInReturn, t as BookingMailingListNote } from "./BookingMailingListNote-LHQMODqB.mjs";
18
- import { n as StepIndicator, t as BookingPanelArrangement } from "./BookingPanelArrangement-Be704P85.mjs";
19
- import { a as formatTime$1, i as formatDatePillParts, n as useAvailableDates, o as getRuntimeTimeZone, r as formatDate$1, t as useAvailableSlots } from "./useAvailableSlots-DfbSkWop.mjs";
20
- import { s as storeDemoBookingPassIfAvailable } from "./demoPortalMagicLink-CL7KGRta.mjs";
16
+ import { i as useBookingNowIso, n as OptionalMark, r as parseBookingSubmissionFailure } from "./BookingQuestionFields-DZMrGvBh.mjs";
17
+ import { n as TerminalPanel, r as StateIcon, t as useDiscountCodeUi } from "./useDiscountCodeUi-BuLgof7O.mjs";
18
+ import { a as usePolling, c as useBookingQuestionsRefresh, i as BookingConsentAgreement, l as PaymentChoiceRows, n as BookingQuestionSections, o as portalSessionIdentity, s as useSignInReturn, t as BookingMailingListNote } from "./BookingMailingListNote-CAyoiAGD.mjs";
19
+ import { n as StepIndicator, t as BookingPanelArrangement } from "./BookingPanelArrangement-C7yiJrxm.mjs";
20
+ import { s as storeDemoBookingPassIfAvailable } from "./demoPortalMagicLink-BVbLD4pi.mjs";
21
21
  import React, { useCallback, useEffect, useLayoutEffect, useMemo, useReducer, useRef, useState } from "react";
22
22
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
23
23
  import { z } from "zod";
@@ -28,6 +28,178 @@ const unsafeAsCustomerPassId = (id) => id;
28
28
  //#region ../core/src/branded/communications.ts
29
29
  const unsafeAsFormId = (id) => id;
30
30
  //#endregion
31
+ //#region ../blocks/src/system/runtime/nodes/booking-form.checkout-return-session.ts
32
+ /** Each cancellation URL names its own browser-held session, even with several checkouts open. */
33
+ function appointmentCheckoutCancelUrl(cancelUrl, returnKey) {
34
+ const url = new URL(cancelUrl);
35
+ url.searchParams.set("booking_return", returnKey);
36
+ return url.toString();
37
+ }
38
+ function saveAppointmentReturnSession(returnKey, sessionId) {
39
+ try {
40
+ window.sessionStorage.setItem(`riverbank:appointment-return:${returnKey}`, sessionId);
41
+ } catch {}
42
+ }
43
+ function readAppointmentReturnSession(search) {
44
+ const returnKey = new URLSearchParams(search).get("booking_return");
45
+ if (!returnKey) return null;
46
+ try {
47
+ return window.sessionStorage.getItem(`riverbank:appointment-return:${returnKey}`);
48
+ } catch {
49
+ return null;
50
+ }
51
+ }
52
+ //#endregion
53
+ //#region ../blocks/src/system/runtime/nodes/booking-form.checkout-return.tsx
54
+ /** Keeps the facts only when there's a checkout to go back to and a deadline to show it against. */
55
+ function heldCheckoutFrom(facts) {
56
+ return facts.checkoutUrl && facts.heldUntil ? {
57
+ sessionId: facts.sessionId,
58
+ checkoutUrl: facts.checkoutUrl,
59
+ heldUntil: facts.heldUntil,
60
+ startAt: facts.startAt
61
+ } : null;
62
+ }
63
+ /**
64
+ * The note names the held time, because the visitor may have picked a different one in the list
65
+ * and "Try paying again" pays for the held time, not the picked one.
66
+ */
67
+ function heldTimeNoteText(startAt, dateContext) {
68
+ const start = parseUtcIsoDateTimeString(startAt);
69
+ if (!start.ok || !dateContext) return "The time you were paying for is still held for you. Try paying again to keep it.";
70
+ return `Your ${formatTime(start.value, dateContext, { zone: "omit" })} on ${formatDate({
71
+ kind: "instant",
72
+ value: start.value
73
+ }, dateContext, {
74
+ date: "short",
75
+ weekday: "short",
76
+ year: "omit"
77
+ })} is still held for you. Try paying again to keep it.`;
78
+ }
79
+ /**
80
+ * A status without checkout recovery means the checkout was paid (or is being confirmed), so the
81
+ * page verifies it from the start. An unpaid status that can't be paid any more drops the note.
82
+ */
83
+ function heldCheckoutChange(held, latest) {
84
+ const recovery = latest.checkoutRecovery;
85
+ if (!recovery) return {
86
+ kind: "paid",
87
+ sessionId: held.sessionId
88
+ };
89
+ const next = heldCheckoutFrom({
90
+ sessionId: held.sessionId,
91
+ startAt: held.startAt,
92
+ ...recovery
93
+ });
94
+ return next ? {
95
+ kind: "held",
96
+ held: next
97
+ } : { kind: "retired" };
98
+ }
99
+ /**
100
+ * While the note shows, read the checkout again when the visitor comes back to the tab, in case
101
+ * they paid it elsewhere. Same focus/visibility triggers as the return page; no polling.
102
+ */
103
+ function useHeldCheckoutRefresh(held, readStatus, onChange) {
104
+ const reading = useRef(false);
105
+ const onChangeRef = useRef(onChange);
106
+ onChangeRef.current = onChange;
107
+ useEffect(() => {
108
+ if (!held) return;
109
+ const scope = new AbortController();
110
+ const refresh = () => {
111
+ if (reading.current) return;
112
+ reading.current = true;
113
+ readStatus({ sessionId: held.sessionId }).then((latest) => {
114
+ if (!scope.signal.aborted) onChangeRef.current(heldCheckoutChange(held, latest));
115
+ }).catch(() => void 0).finally(() => {
116
+ reading.current = false;
117
+ });
118
+ };
119
+ const refreshIfVisible = () => {
120
+ if (document.visibilityState === "visible") refresh();
121
+ };
122
+ window.addEventListener("focus", refresh, { signal: scope.signal });
123
+ document.addEventListener("visibilitychange", refreshIfVisible, { signal: scope.signal });
124
+ return () => scope.abort();
125
+ }, [held, readStatus]);
126
+ }
127
+ /** The held-time note shows on the time step while the hold's deadline is still ahead. */
128
+ function shouldShowHeldTimeNote(held, stepId, now) {
129
+ if (!held || stepId !== "datetime-selection") return false;
130
+ const deadline = Date.parse(held.heldUntil);
131
+ return Number.isFinite(deadline) && deadline > now;
132
+ }
133
+ function useNowUntil(deadline) {
134
+ const [now, setNow] = useState(() => Date.now());
135
+ useEffect(() => {
136
+ if (!(deadline > Date.now())) return;
137
+ const timer = setTimeout(() => setNow(Date.now()), deadline - Date.now());
138
+ return () => clearTimeout(timer);
139
+ }, [deadline]);
140
+ return now;
141
+ }
142
+ function HeldTimeNote(props) {
143
+ const now = useNowUntil(props.held ? Date.parse(props.held.heldUntil) : 0);
144
+ const held = props.held;
145
+ const showing = held !== null && shouldShowHeldTimeNote(held, props.stepId, now);
146
+ useHeldCheckoutRefresh(showing ? held : null, props.readStatus, props.onChange);
147
+ if (!held || !showing) return null;
148
+ return /* @__PURE__ */ jsxs(FeedbackMessage, {
149
+ tone: "info",
150
+ className: "alert alert-info rb-mb-4",
151
+ role: "status",
152
+ children: [/* @__PURE__ */ jsx("p", {
153
+ className: "ab-text",
154
+ children: heldTimeNoteText(held.startAt, props.dateContext)
155
+ }), /* @__PURE__ */ jsx("div", {
156
+ className: "rb-flex rb-flex-wrap rb-gap-3",
157
+ children: /* @__PURE__ */ jsx(ThemedButton, {
158
+ type: "button",
159
+ variant: "secondary",
160
+ size: "md",
161
+ label: "Try paying again",
162
+ onClick: () => props.onRetry(held.checkoutUrl)
163
+ })
164
+ })]
165
+ });
166
+ }
167
+ function AppointmentCheckoutReturn(props) {
168
+ const [now, setNow] = useState(() => Date.now());
169
+ const deadline = props.heldUntil ? Date.parse(props.heldUntil) : 0;
170
+ useEffect(() => {
171
+ const timer = setTimeout(() => setNow(Date.now()), Math.max(0, deadline - Date.now()));
172
+ return () => clearTimeout(timer);
173
+ }, [deadline]);
174
+ const held = deadline > now;
175
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(FeedbackMessage, {
176
+ tone: "info",
177
+ role: "status",
178
+ children: [/* @__PURE__ */ jsx("p", {
179
+ className: "ab-text",
180
+ children: /* @__PURE__ */ jsx("strong", { children: "You haven't been charged." })
181
+ }), /* @__PURE__ */ jsx("p", {
182
+ className: "ab-text",
183
+ children: held ? "Your time's still held for a few minutes." : "The payment window has ended. Check availability to choose a time."
184
+ })]
185
+ }), /* @__PURE__ */ jsxs("div", {
186
+ className: "rb-flex rb-flex-wrap rb-gap-3",
187
+ children: [held && props.checkoutUrl ? /* @__PURE__ */ jsx(ThemedButton, {
188
+ type: "button",
189
+ variant: "primary",
190
+ size: "md",
191
+ label: "Try paying again",
192
+ onClick: () => props.checkoutUrl && props.onRetry(props.checkoutUrl)
193
+ }) : null, /* @__PURE__ */ jsx(ThemedButton, {
194
+ type: "button",
195
+ variant: "secondary",
196
+ size: "md",
197
+ label: "Choose another time",
198
+ onClick: props.onChooseTime
199
+ })]
200
+ })] });
201
+ }
202
+ //#endregion
31
203
  //#region ../blocks/src/system/runtime/nodes/booking-form.date-display.ts
32
204
  /**
33
205
  * Appointments happen at the business, so every day and clock in the flow is
@@ -287,6 +459,31 @@ function useAppointmentBookingQuestions(input) {
287
459
  };
288
460
  }
289
461
  //#endregion
462
+ //#region ../blocks/src/system/runtime/nodes/booking-form.checkout-retry.ts
463
+ function retryKey(siteId, intent) {
464
+ return `riverbank:appointment-checkout:${JSON.stringify([
465
+ siteId,
466
+ intent.formId,
467
+ intent.serviceId,
468
+ intent.resourceId ?? null,
469
+ intent.startAt,
470
+ intent.endAt
471
+ ])}`;
472
+ }
473
+ /** Optional browser possession evidence; the server must still match the email and exact slot. */
474
+ function readAppointmentRetrySession(siteId, intent) {
475
+ try {
476
+ return window.sessionStorage.getItem(retryKey(siteId, intent)) ?? void 0;
477
+ } catch {
478
+ return;
479
+ }
480
+ }
481
+ function saveAppointmentRetrySession(siteId, intent, sessionId) {
482
+ try {
483
+ window.sessionStorage.setItem(retryKey(siteId, intent), sessionId);
484
+ } catch {}
485
+ }
486
+ //#endregion
290
487
  //#region ../blocks/src/system/runtime/hooks/useBookingSubmission.state.ts
291
488
  const initialBookingSubmissionState = {
292
489
  status: { tag: "idle" },
@@ -331,8 +528,7 @@ function selectIsSubmitting(state) {
331
528
  *
332
529
  * Handles API call, submission state, and feedback handling.
333
530
  *
334
- * @param _siteId - Site ID (currently unused; site context is derived from formId).
335
- * Kept for API consistency and potential future use.
531
+ * @param siteId - Scopes browser-held checkout tokens to the booking site.
336
532
  *
337
533
  * @example
338
534
  * ```tsx
@@ -352,13 +548,14 @@ function selectIsSubmitting(state) {
352
548
  * }
353
549
  * ```
354
550
  */
355
- function useBookingSubmission(_siteId, terms) {
551
+ function useBookingSubmission(siteId, terms) {
356
552
  const api = terms.api;
357
553
  const [state, dispatch] = useReducer(bookingSubmissionReducer, initialBookingSubmissionState);
358
554
  const submit = async (data) => {
359
555
  dispatch({ type: "submission-started" });
360
556
  try {
361
- const response = await executeBookingSubmission$1(api, data);
557
+ const response = await executeBookingSubmission$1(api, data, readAppointmentRetrySession(siteId, data));
558
+ if (response.type === "checkout_redirect") saveAppointmentRetrySession(siteId, data, response.sessionId);
362
559
  if (response.type === "review_required" || response.type === "payment_choice_required") {
363
560
  dispatch({ type: "submission-reviewed" });
364
561
  return okWith(response);
@@ -390,7 +587,7 @@ function useBookingSubmission(_siteId, terms) {
390
587
  isSubmitting: selectIsSubmitting(state)
391
588
  };
392
589
  }
393
- function executeBookingSubmission$1(api, data) {
590
+ function executeBookingSubmission$1(api, data, resumeSessionId) {
394
591
  return data.kind === "appointment_package" ? api.submitBookingWithPackage({
395
592
  formId: data.formId,
396
593
  serviceId: data.serviceId,
@@ -403,6 +600,7 @@ function executeBookingSubmission$1(api, data) {
403
600
  timezone: data.timezone,
404
601
  customerPassId: data.customerPassId
405
602
  }) : api.submitBooking({
603
+ ...resumeSessionId ? { resumeSessionId } : {},
406
604
  formId: data.formId,
407
605
  serviceId: data.serviceId,
408
606
  resourceId: data.resourceId || null,
@@ -786,6 +984,7 @@ function buildBookingStepResolution(input) {
786
984
  const paymentResolution = resolveBookingPaymentStep({
787
985
  data: input.data,
788
986
  nowIso: input.nowIso,
987
+ timeZone: input.timeZone,
789
988
  services: input.services,
790
989
  defaultServiceId
791
990
  });
@@ -846,9 +1045,11 @@ function needsBookingPaymentStep(input, payment) {
846
1045
  input.enableAppointmentPackages && (payment.service?.priceAmount ?? 0) > 0
847
1046
  ].some(Boolean);
848
1047
  }
849
- /** The service step needs a service, and a practitioner when the form insists on one. */
1048
+ /** Shown when the form needs a person and none is chosen; it names nobody, so it reads right for any business. */
1049
+ const CHOOSE_WHO_MESSAGE = "Please choose who you'd like to see";
1050
+ /** The service step needs a service, and a person to see when the form insists on one. */
850
1051
  function serviceSelectionMessage(input) {
851
- if (bookingRequiresResourceSelection(resolveBookingSelectedService(input), input.requiresResourceSelection) && !(input.data.resourceId ?? input.defaultResourceId)) return "Please select a practitioner";
1052
+ if (bookingRequiresResourceSelection(resolveBookingSelectedService(input), input.requiresResourceSelection) && !(input.data.resourceId ?? input.defaultResourceId)) return CHOOSE_WHO_MESSAGE;
852
1053
  return input.data.serviceId ? null : "Please select a service";
853
1054
  }
854
1055
  function validateBookingStep(input) {
@@ -1032,6 +1233,7 @@ function buildBookingSubmitPlan(input) {
1032
1233
  bookingQuestions: input.bookingQuestions.submission,
1033
1234
  promisedDiscountId: input.promisedDiscountId,
1034
1235
  formId: input.formId,
1236
+ timeZone: input.timeZone,
1035
1237
  nowIso: input.nowIso,
1036
1238
  data: bookingFormDataWithEligibleOptIn(toBookingFormData(input.state), Boolean(input.mailingListEligible)),
1037
1239
  services: input.services,
@@ -1058,7 +1260,7 @@ function validateBookingSubmissionContact(input) {
1058
1260
  data: toBookingFormData(input.state),
1059
1261
  defaultServiceId: input.defaultServiceId
1060
1262
  }), input.requiresResourceSelection) && !(input.state.selectedResourceId ?? input.defaultResourceId)) {
1061
- const message = "Please select a practitioner";
1263
+ const message = CHOOSE_WHO_MESSAGE;
1062
1264
  return {
1063
1265
  ok: false,
1064
1266
  errors: createFormBookingValidationError(message),
@@ -1998,6 +2200,7 @@ function useHeadlessBookingFlow(options) {
1998
2200
  const [state, dispatch] = useReducer((previous, event) => bookingFlowReducer(previous, event, {
1999
2201
  services: applyBookingPaymentAdmission(applyBookingPaymentChoices(options.services, previous.paymentChoices), previous.unrestrictedHeldPackageServiceId),
2000
2202
  defaultServiceId,
2203
+ timeZone: options.dateContext.timeZone,
2001
2204
  nowIso: bookingNowIso
2002
2205
  }), initialState);
2003
2206
  const api = useBlockApi();
@@ -2065,6 +2268,7 @@ function useHeadlessBookingFlow(options) {
2065
2268
  const stepState = useMemo(() => deriveBookingFlowSteps({
2066
2269
  form: runtimeForm,
2067
2270
  nowIso: bookingNowIso,
2271
+ timeZone: options.dateContext.timeZone,
2068
2272
  services,
2069
2273
  forcePaymentSelection: state.paymentChoices?.id === selectedServiceId,
2070
2274
  data,
@@ -2078,6 +2282,7 @@ function useHeadlessBookingFlow(options) {
2078
2282
  questionsRefusal
2079
2283
  }), [
2080
2284
  questionsRefusal,
2285
+ options.dateContext.timeZone,
2081
2286
  data,
2082
2287
  bookingNowIso,
2083
2288
  state.attemptedStepIds,
@@ -2181,13 +2386,15 @@ function useHeadlessBookingFlow(options) {
2181
2386
  subtotalCents: paymentPriceAmount
2182
2387
  });
2183
2388
  const { submit, clearFeedback } = useBookingSubmission(options.siteId, siteTerms);
2389
+ const promisedDiscountId = resolveDisclosedBookingDiscountId(discountUi);
2184
2390
  const actions = useBookingFlowController({
2185
2391
  state,
2186
2392
  nowIso: bookingNowIso,
2393
+ timeZone: options.dateContext.timeZone,
2187
2394
  form: runtimeForm,
2188
2395
  formId: formKey,
2189
2396
  services,
2190
- promisedDiscountId: resolveDisclosedBookingDiscountId(discountUi),
2397
+ promisedDiscountId,
2191
2398
  purchasablePackages: choices.purchasablePackages,
2192
2399
  defaultServiceId,
2193
2400
  defaultResourceId,
@@ -2384,6 +2591,52 @@ const appointmentCheckoutVerificationDeps = {
2384
2591
  useBlockApi,
2385
2592
  usePolling
2386
2593
  };
2594
+ /**
2595
+ * "You haven't been charged" is only true until the client pays, perhaps in
2596
+ * another tab. While a checkout can still be paid, read its status again when
2597
+ * the visitor comes back to the tab and when the hold ends. If the answer has
2598
+ * changed, verify from the start, which leads to confirmation, the checking
2599
+ * message or the new unpaid facts. A retired checkout has no URL and can't change.
2600
+ */
2601
+ function useOpenCheckoutRefresh(state, readStatus, restartVerification) {
2602
+ const open = state.tag === "unpaid" && state.checkoutUrl !== null ? state : null;
2603
+ const sessionId = open?.sessionId ?? null;
2604
+ const checkoutUrl = open?.checkoutUrl ?? null;
2605
+ const heldUntil = open?.heldUntil ?? null;
2606
+ const reading = useRef(false);
2607
+ useEffect(() => {
2608
+ if (sessionId === null) return;
2609
+ const scope = new AbortController();
2610
+ const refresh = () => {
2611
+ if (reading.current) return;
2612
+ reading.current = true;
2613
+ readStatus({ sessionId }).then((latest) => {
2614
+ if (!scope.signal.aborted && !isSameOpenCheckout({
2615
+ checkoutUrl,
2616
+ heldUntil
2617
+ }, latest)) restartVerification();
2618
+ }).catch(() => void 0).finally(() => {
2619
+ reading.current = false;
2620
+ });
2621
+ };
2622
+ const refreshIfVisible = () => {
2623
+ if (document.visibilityState === "visible") refresh();
2624
+ };
2625
+ window.addEventListener("focus", refresh, { signal: scope.signal });
2626
+ document.addEventListener("visibilitychange", refreshIfVisible, { signal: scope.signal });
2627
+ const deadline = heldUntil === null ? null : setTimeout(refresh, Math.max(0, Date.parse(heldUntil) - Date.now()));
2628
+ return () => {
2629
+ scope.abort();
2630
+ if (deadline !== null) clearTimeout(deadline);
2631
+ };
2632
+ }, [
2633
+ checkoutUrl,
2634
+ heldUntil,
2635
+ readStatus,
2636
+ restartVerification,
2637
+ sessionId
2638
+ ]);
2639
+ }
2387
2640
  function useAppointmentCheckoutVerification(config) {
2388
2641
  return useAppointmentCheckoutVerificationWithDeps(config, appointmentCheckoutVerificationDeps);
2389
2642
  }
@@ -2397,8 +2650,8 @@ function useAppointmentCheckoutVerificationWithDeps(config, deps) {
2397
2650
  return {
2398
2651
  restartKey: sessionId,
2399
2652
  pollFn: () => api.getAppointmentBookingStatus({ sessionId }),
2400
- isComplete: (result) => (result.paymentStatus === "completed" || result.paymentStatus === "not_required") && result.appointmentStatus === "confirmed",
2401
- isFailed: (result) => result.paymentStatus === "failed" || result.paymentStatus === "cancelled" || result.paymentStatus === "refunded" || result.appointmentStatus === "cancelled",
2653
+ isComplete: (result) => result.checkoutRecovery?.kind === "unpaid" || (result.paymentStatus === "completed" || result.paymentStatus === "not_required") && result.appointmentStatus === "confirmed",
2654
+ isFailed: (result) => !result.checkoutRecovery && (result.paymentStatus === "failed" || result.paymentStatus === "cancelled" || result.paymentStatus === "refunded" || result.appointmentStatus === "cancelled"),
2402
2655
  maxAttempts: maxAttempts ?? APPOINTMENT_CHECKOUT_MAX_ATTEMPTS,
2403
2656
  interval: pollInterval ?? resolveAppointmentCheckoutPollInterval
2404
2657
  };
@@ -2409,13 +2662,15 @@ function useAppointmentCheckoutVerificationWithDeps(config, deps) {
2409
2662
  pollInterval
2410
2663
  ]);
2411
2664
  const polling = deps.usePolling(pollingConfig);
2665
+ const state = resolveAppointmentCheckoutVerificationState({
2666
+ config,
2667
+ pollingStatus: polling.status,
2668
+ result: polling.result,
2669
+ error: polling.error
2670
+ });
2671
+ useOpenCheckoutRefresh(state, api.getAppointmentBookingStatus, polling.retry);
2412
2672
  return {
2413
- state: resolveAppointmentCheckoutVerificationState({
2414
- config,
2415
- pollingStatus: polling.status,
2416
- result: polling.result,
2417
- error: polling.error
2418
- }),
2673
+ state,
2419
2674
  retry: polling.retry
2420
2675
  };
2421
2676
  }
@@ -2701,6 +2956,7 @@ function ServiceChoiceGrid({ booking, choices }) {
2701
2956
  }),
2702
2957
  service.description ? /* @__PURE__ */ jsx("div", {
2703
2958
  className: "ab-text rb-on-surface--muted",
2959
+ style: { whiteSpace: "pre-line" },
2704
2960
  children: service.description
2705
2961
  }) : null,
2706
2962
  service.durationMinutes ? /* @__PURE__ */ jsxs("div", {
@@ -3443,10 +3699,10 @@ function DefaultServiceSelectionStep({ booking, presentation }) {
3443
3699
  className: "ab-center",
3444
3700
  children: [/* @__PURE__ */ jsx(SpinnerNode, {
3445
3701
  size: "md",
3446
- srLabel: "Loading practitioners"
3702
+ srLabel: "Loading who's available"
3447
3703
  }), /* @__PURE__ */ jsx("p", {
3448
3704
  className: "ab-text rb-on-surface--muted",
3449
- children: "Loading practitioners..."
3705
+ children: "Loading who's available..."
3450
3706
  })]
3451
3707
  }) : null,
3452
3708
  booking.resources.state.tag === "error" ? /* @__PURE__ */ jsx(FeedbackMessage, {
@@ -3459,7 +3715,7 @@ function DefaultServiceSelectionStep({ booking, presentation }) {
3459
3715
  tone: "error",
3460
3716
  className: "alert alert-error",
3461
3717
  role: "alert",
3462
- children: "No practitioners are available for this service right now."
3718
+ children: "Nobody's available for this service right now."
3463
3719
  }) : null,
3464
3720
  showResourceSelect && booking.resources.state.tag !== "loading" && (allowAnyResource || resources.length > 0) ? /* @__PURE__ */ jsx(DefaultResourceChoices, {
3465
3721
  booking,
@@ -3526,6 +3782,7 @@ function BookingSelectedServiceSummary({ services }) {
3526
3782
  }),
3527
3783
  service.description ? /* @__PURE__ */ jsx("p", {
3528
3784
  className: "ab-text rb-on-surface--muted",
3785
+ style: { whiteSpace: "pre-line" },
3529
3786
  children: service.description
3530
3787
  }) : null,
3531
3788
  service.durationMinutes ? /* @__PURE__ */ jsxs("p", {
@@ -3673,7 +3930,7 @@ function PackageOnlyResourceNote({ booking }) {
3673
3930
  if (booking.services.selected?.onlinePaymentChoices?.anyAvailable !== false) return null;
3674
3931
  return /* @__PURE__ */ jsx("p", {
3675
3932
  className: "ab-text rb-on-surface--muted",
3676
- children: "You book this with a package, and each package is with one practitioner. Choose who you'd like to see, and you'll see their packages when you pay."
3933
+ children: "You book this with a package, and each package is with one person. Choose who you'd like to see, and you'll see their packages when you pay."
3677
3934
  });
3678
3935
  }
3679
3936
  function HeldPackageStatus({ booking }) {
@@ -3834,7 +4091,7 @@ function DefaultBookingErrorSummary({ errors, id }) {
3834
4091
  }
3835
4092
  //#endregion
3836
4093
  //#region ../blocks/src/system/runtime/components/booking/SuccessMessage.tsx
3837
- const SuccessMessage = ({ copy, resourceName, appointment, dateContext, className, demoEmailSuppressed = false, customerEmail = null }) => {
4094
+ const SuccessMessage = ({ copy, resourceName, appointment, dateContext, className, demoEmailSuppressed = false, customerEmail = null, person = clientPersonPhrases(null) }) => {
3838
4095
  return /* @__PURE__ */ jsx(TerminalPanel, {
3839
4096
  tone: "success",
3840
4097
  title: "Booking confirmed",
@@ -3855,7 +4112,8 @@ const SuccessMessage = ({ copy, resourceName, appointment, dateContext, classNam
3855
4112
  secondaryBody: /* @__PURE__ */ jsx(AppointmentDetails, {
3856
4113
  appointment,
3857
4114
  dateContext,
3858
- resourceName
4115
+ resourceName,
4116
+ person
3859
4117
  }),
3860
4118
  className: ["ab-center", className ?? ""].join(" ").trim(),
3861
4119
  titleClassName: "ab-terminal-title",
@@ -3863,10 +4121,10 @@ const SuccessMessage = ({ copy, resourceName, appointment, dateContext, classNam
3863
4121
  live: "polite"
3864
4122
  });
3865
4123
  };
3866
- function AppointmentDetails({ appointment, dateContext, resourceName }) {
3867
- if (!appointment) return resourceName ? /* @__PURE__ */ jsxs("p", {
4124
+ function AppointmentDetails({ appointment, dateContext, resourceName, person }) {
4125
+ if (!appointment) return resourceName ? /* @__PURE__ */ jsx("p", {
3868
4126
  className: "ab-text rb-on-surface--muted",
3869
- children: ["Practitioner: ", resourceName]
4127
+ children: person.withName(resourceName)
3870
4128
  }) : null;
3871
4129
  return /* @__PURE__ */ jsxs("div", {
3872
4130
  className: "ab-text rb-on-surface--muted",
@@ -3876,7 +4134,7 @@ function AppointmentDetails({ appointment, dateContext, resourceName }) {
3876
4134
  appointment,
3877
4135
  dateContext
3878
4136
  }),
3879
- appointment.resourceName ? /* @__PURE__ */ jsxs("p", { children: ["Practitioner: ", appointment.resourceName] }) : null,
4137
+ appointment.resourceName ? /* @__PURE__ */ jsx("p", { children: person.withName(appointment.resourceName) }) : null,
3880
4138
  appointment.location ? /* @__PURE__ */ jsx("p", { children: appointment.location }) : null
3881
4139
  ]
3882
4140
  });
@@ -3980,7 +4238,7 @@ function bookingViewRequest(view, dateContext, service) {
3980
4238
  function CompletionMessage({ request, ...success }) {
3981
4239
  return request ? /* @__PURE__ */ jsx(RequestSentMessage, { request }) : /* @__PURE__ */ jsx(SuccessMessage, { ...success });
3982
4240
  }
3983
- function BookingFormCompletion({ resourceName, appointment, dateContext, successMessage, redirectState, localNote, customerEmail, demoEmailSuppressed = false, request = null }) {
4241
+ function BookingFormCompletion({ resourceName, appointment, dateContext, successMessage, redirectState, localNote, customerEmail, demoEmailSuppressed = false, request = null, businessPerson }) {
3984
4242
  const returnContext = redirectState.kind === "success" ? readAppointmentCheckoutReturnContext(redirectState.sessionId) : null;
3985
4243
  const note = redirectState.kind === "success" ? returnContext?.mailingListNote ?? null : localNote;
3986
4244
  const confirmedEmail = returnContext?.customerEmail ?? customerEmail;
@@ -3991,7 +4249,8 @@ function BookingFormCompletion({ resourceName, appointment, dateContext, success
3991
4249
  appointment,
3992
4250
  dateContext,
3993
4251
  demoEmailSuppressed,
3994
- customerEmail: confirmedEmail
4252
+ customerEmail: confirmedEmail,
4253
+ person: clientPersonPhrases(businessPerson)
3995
4254
  }), note ? /* @__PURE__ */ jsx(BookingMailingListNote, {
3996
4255
  note,
3997
4256
  context: "booking",
@@ -4014,14 +4273,16 @@ function appendRebookFlag(url, enabled) {
4014
4273
  function createBookingFormSubmitHandler(input) {
4015
4274
  return async () => {
4016
4275
  const { successUrl, cancelUrl } = buildCheckoutReturnUrls("booking", input.bookingAnchorId, {}, input.pageNavigation);
4276
+ const returnKey = crypto.randomUUID();
4017
4277
  const options = {
4018
4278
  successUrl: appendRebookFlag(successUrl, input.isPortalRebook),
4019
- cancelUrl: appendRebookFlag(cancelUrl, input.isPortalRebook)
4279
+ cancelUrl: appointmentCheckoutCancelUrl(appendRebookFlag(cancelUrl, input.isPortalRebook), returnKey)
4020
4280
  };
4021
4281
  const result = input.booking.review ? await input.booking.actions.acceptReview(input.booking.review, options) : await input.booking.actions.submit(options);
4022
4282
  if (!result.ok) return;
4023
4283
  storeDemoBookingPassIfAvailable(result.outcome.customerEmail, result.outcome.demoBookingPass);
4024
4284
  if (result.outcome.kind === "checkout_redirect") {
4285
+ saveAppointmentReturnSession(returnKey, result.outcome.sessionId);
4025
4286
  saveAppointmentCheckoutReturnContext(result.outcome.sessionId, {
4026
4287
  customerEmail: result.outcome.customerEmail,
4027
4288
  mailingListNote: result.outcome.mailingListSignupNote ?? null
@@ -4066,23 +4327,32 @@ function BookingSurface({ id, className, pageKind, children }) {
4066
4327
  })
4067
4328
  });
4068
4329
  }
4330
+ function resolveInitialServiceId(hydratedServiceId, form, services) {
4331
+ return hydratedServiceId ?? resolveDefaultBookingServiceId(form, services) ?? void 0;
4332
+ }
4333
+ /** A payment return is verified from Stripe's session on success, or the retained one on cancel. */
4334
+ function resolveVerificationSessionId(redirectState, returnSessionId) {
4335
+ if (redirectState.kind === "success") return redirectState.sessionId;
4336
+ return redirectState.kind === "cancelled" ? returnSessionId : null;
4337
+ }
4069
4338
  const BookingFormClient = ({ siteId: siteIdProp, render }) => {
4070
4339
  const siteId = resolveBookingSiteId(siteIdProp, null);
4071
4340
  const viewerTimeZone = getRuntimeTimeZone();
4072
4341
  const form = render.hydration.form;
4073
4342
  const services = render.hydration.services;
4074
- const defaultServiceId = render.hydration.serviceId ?? resolveDefaultBookingServiceId(form, services);
4075
- const initialServiceId = render.hydration.serviceId ?? defaultServiceId ?? void 0;
4343
+ const initialServiceId = resolveInitialServiceId(render.hydration.serviceId, form, services);
4076
4344
  const initialResourceId = render.hydration.resourceId ?? void 0;
4077
4345
  const isPortalRebook = render.hydration.rebookContext?.kind === "portal_rebook";
4078
4346
  const hasLoggedRebookCompletionRef = useRef(false);
4079
- const [redirectState] = useState(() => getBookingRedirectStateFromLocation(getBookingRedirectLocationSnapshot()));
4347
+ const [redirectState, setRedirectState] = useState(() => getBookingRedirectStateFromLocation(getBookingRedirectLocationSnapshot()));
4348
+ const [heldCheckout, setHeldCheckout] = useState(null);
4080
4349
  const [localMailingListNote, setLocalMailingListNote] = useState(null);
4081
4350
  const [localCustomerEmail, setLocalCustomerEmail] = useState(null);
4082
4351
  const api = useBlockApi();
4083
4352
  const [handOff, setHandOff] = useState(null);
4084
4353
  const hasPortalAuth = api.config.auth.type === "bearer" || api.config.authOverrides?.portal?.type === "bearer";
4085
4354
  const formId = render.hydration.formId ?? form?.id ?? "booking-form";
4355
+ const [returnSessionId] = useState(() => redirectState.kind === "cancelled" ? readAppointmentReturnSession(getBookingRedirectLocationSnapshot().search) : null);
4086
4356
  const booking = useHeadlessBookingFlow({
4087
4357
  now: render.hydration.now,
4088
4358
  dateContext: render.hydration.dateContext,
@@ -4109,7 +4379,8 @@ const BookingFormClient = ({ siteId: siteIdProp, render }) => {
4109
4379
  if (!form) console.warn("[BookingFormClient] Form data not loaded");
4110
4380
  }, [siteId, form]);
4111
4381
  const bookingAnchorId = form ? `booking-form-${form.id}` : "booking-form";
4112
- const verification = useAppointmentCheckoutVerification(redirectState.kind === "success" ? { sessionId: redirectState.sessionId } : null);
4382
+ const verificationSessionId = resolveVerificationSessionId(redirectState, returnSessionId);
4383
+ const verification = useAppointmentCheckoutVerification(verificationSessionId ? { sessionId: verificationSessionId } : null);
4113
4384
  const viewState = deriveBookingFormViewState({
4114
4385
  localSuccessResourceName: booking.view.kind === "success" ? booking.view.resourceName : void 0,
4115
4386
  redirectState,
@@ -4173,6 +4444,20 @@ const BookingFormClient = ({ siteId: siteIdProp, render }) => {
4173
4444
  setLocalMailingListNote,
4174
4445
  setLocalCustomerEmail
4175
4446
  });
4447
+ const retryCheckout = (url) => {
4448
+ const outcome = leavePage(url, render.hydration.pageNavigation, (target) => {
4449
+ window.location.href = target;
4450
+ });
4451
+ if (outcome.kind === "handOff") setHandOff(outcome);
4452
+ };
4453
+ const applyHeldCheckoutChange = (change) => {
4454
+ if (change.kind === "held") return setHeldCheckout(change.held);
4455
+ setHeldCheckout(null);
4456
+ if (change.kind === "paid") setRedirectState({
4457
+ kind: "success",
4458
+ sessionId: change.sessionId
4459
+ });
4460
+ };
4176
4461
  if (viewState.kind === "success") return /* @__PURE__ */ jsx(BookingSurface, {
4177
4462
  pageKind: render.hydration.pageKind,
4178
4463
  id: bookingAnchorId,
@@ -4186,7 +4471,8 @@ const BookingFormClient = ({ siteId: siteIdProp, render }) => {
4186
4471
  localNote: localMailingListNote,
4187
4472
  customerEmail: localCustomerEmail,
4188
4473
  demoEmailSuppressed: render.hydration.demoEmailSuppressed,
4189
- request: bookingViewRequest(booking.view, render.hydration.dateContext, booking.services.selected)
4474
+ request: bookingViewRequest(booking.view, render.hydration.dateContext, booking.services.selected),
4475
+ businessPerson: render.hydration.businessPerson
4190
4476
  })
4191
4477
  });
4192
4478
  if (viewState.kind === "verifying") return /* @__PURE__ */ jsx(BookingSurface, {
@@ -4203,6 +4489,27 @@ const BookingFormClient = ({ siteId: siteIdProp, render }) => {
4203
4489
  })
4204
4490
  })
4205
4491
  });
4492
+ if (viewState.kind === "unpaid") return /* @__PURE__ */ jsx(BookingSurface, {
4493
+ pageKind: render.hydration.pageKind,
4494
+ id: bookingAnchorId,
4495
+ className: render.display.className,
4496
+ children: /* @__PURE__ */ jsx(AppointmentNavigationContent, {
4497
+ handOff,
4498
+ onBack: () => setHandOff(null),
4499
+ children: /* @__PURE__ */ jsx(AppointmentCheckoutReturn, {
4500
+ checkoutUrl: viewState.checkoutUrl,
4501
+ heldUntil: viewState.heldUntil,
4502
+ onRetry: retryCheckout,
4503
+ onChooseTime: () => {
4504
+ if (verification.state.tag === "unpaid") setHeldCheckout(heldCheckoutFrom({
4505
+ ...viewState,
4506
+ sessionId: verification.state.sessionId
4507
+ }));
4508
+ setRedirectState({ kind: "none" });
4509
+ }
4510
+ })
4511
+ })
4512
+ });
4206
4513
  if (viewState.kind === "timeout") return /* @__PURE__ */ jsxs(BookingSurface, {
4207
4514
  pageKind: render.hydration.pageKind,
4208
4515
  id: bookingAnchorId,
@@ -4249,6 +4556,14 @@ const BookingFormClient = ({ siteId: siteIdProp, render }) => {
4249
4556
  children: viewState.message
4250
4557
  })
4251
4558
  }) : null,
4559
+ /* @__PURE__ */ jsx(HeldTimeNote, {
4560
+ held: heldCheckout,
4561
+ stepId: booking.currentStep?.id,
4562
+ dateContext: render.hydration.dateContext,
4563
+ onRetry: retryCheckout,
4564
+ readStatus: api.getAppointmentBookingStatus,
4565
+ onChange: applyHeldCheckoutChange
4566
+ }),
4252
4567
  /* @__PURE__ */ jsx(HeadlessBookingDefaultForm, {
4253
4568
  booking,
4254
4569
  onSubmit: handleComplete,