@riverbankcms/sdk 0.179.0 → 0.180.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 (193) hide show
  1. package/README.md +2 -2
  2. package/dist/_dts/{BlocksIslandsHydrator-DKwgs95u.d.ts → BlocksIslandsHydrator-DC_AvZwy.d.ts} +1 -1
  3. package/dist/_dts/{Page-lWenra5i.d.ts → Page-DQOxVtp3.d.ts} +7 -7
  4. package/dist/_dts/{SdkPreviewMode-BRxhRw4I.d.ts → SdkPreviewMode-DrLgY9_f.d.ts} +3 -2
  5. package/dist/_dts/{client-qWn7xAwJ.d.ts → client-BP7VBRvs.d.ts} +235 -56
  6. package/dist/_dts/{content-types-DL6GIvTm.d.ts → content-types-1-K2qi__.d.ts} +2 -2
  7. package/dist/_dts/{contracts-CzWyAiJj.d.ts → contracts-Dfqz0Tcu.d.ts} +3 -3
  8. package/dist/_dts/{generatePageMetadata-CBKd0cJ4.d.ts → generatePageMetadata-CSfAqmry.d.ts} +2 -2
  9. package/dist/_dts/{index-DVSipdrT.d.ts → index-B0_2-65A.d.ts} +3 -3
  10. package/dist/_dts/{index-DCiSHd-C.d.ts → index-BeM5Ylwf.d.ts} +5 -3
  11. package/dist/_dts/{index-BYnG_vF5.d.ts → index-Blrw2oVk.d.ts} +1 -1
  12. package/dist/_dts/{index-CaCum9mM.d.ts → index-CB5Csefo.d.ts} +2 -2
  13. package/dist/_dts/{index-CZgJrhzT.d.ts → index-DCcxLa8p.d.ts} +2 -2
  14. package/dist/_dts/{index-7CDBZGb-.d.ts → index-DQBGwBPx.d.ts} +1 -1
  15. package/dist/_dts/{index-BU9uAkHB.d.ts → index-DQr358-m.d.ts} +4 -4
  16. package/dist/_dts/{loadContent-CPKbFQyq.d.ts → loadContent-BG2tLGXj.d.ts} +7 -7
  17. package/dist/_dts/{request-BjKBCS7t.d.ts → request-P08l6mkr.d.ts} +2602 -821
  18. package/dist/_dts/{resolveBlockData-DupbMCup.d.ts → resolveBlockData-BDHc8lFs.d.ts} +5 -5
  19. package/dist/_dts/{resolvePageContent-BqNyCHi8.d.ts → resolvePageContent-Y3IZBbtL.d.ts} +1 -1
  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/gifting/client.d.ts +1 -1
  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 +8 -8
  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 +3 -3
  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 +4 -4
  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 +6 -6
  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 +1 -1
  54. package/dist/_dts/{serviceBookingOutline-YcsIjvn1.d.ts → serviceBookingOutline-BvtNagjw.d.ts} +8 -7
  55. package/dist/_dts/{types-BOxSq-Bq.d.ts → types-BrK6SS5c.d.ts} +9 -8
  56. package/dist/_dts/{types-CT-KOxl_.d.ts → types-DpEAnP4F.d.ts} +7 -2
  57. package/dist/_dts/{types-B7e6Lmo5.d.ts → types-HAy1-Jjo.d.ts} +3 -3
  58. package/dist/_dts/{validation-Dz6qccue.d.ts → validation-D6q3tOBA.d.ts} +4 -4
  59. package/dist/client/{BlocksIslandsHydrator-1XifJg6V.mjs → BlocksIslandsHydrator-DJSmdNUJ.mjs} +16 -16
  60. package/dist/client/{BookingMailingListNote-BsbEgagJ.mjs → BookingMailingListNote-CGxg37zx.mjs} +91 -59
  61. package/dist/client/{BookingQuestionFields-C8IbeLHj.mjs → BookingQuestionFields-DXegGSnS.mjs} +24 -3
  62. package/dist/client/{CalendarNavigationChevron-Bbqij1XQ.mjs → CalendarNavigationChevron-VfP50sYm.mjs} +5 -5
  63. package/dist/client/{DemoBookingPortalAccess-uA9H8LIL.mjs → DemoBookingPortalAccess-0Ua44F1j.mjs} +12 -7
  64. package/dist/client/{EventCalendar.client-yoSI77ov.mjs → EventCalendar.client-CrpiyDSP.mjs} +9 -9
  65. package/dist/client/{EventCombined.client-HeCNlliq.mjs → EventCombined.client-D0me9wnz.mjs} +8 -8
  66. package/dist/client/{EventItem-Duhk1vnF.mjs → EventItem-CJITrGkF.mjs} +5 -4
  67. package/dist/client/{EventListWeekNavigation-BiutEqPK.mjs → EventListWeekNavigation-BlEm_xjq.mjs} +1 -1
  68. package/dist/client/{EventListing.client-B5ln77jG.mjs → EventListing.client-BNM_HuS0.mjs} +3 -3
  69. package/dist/client/{EventListing.view-hUDhNtMv.mjs → EventListing.view-CXfb7RRy.mjs} +7 -210
  70. package/dist/client/{EventRegistrationPayment-DqtX1vB2.mjs → EventRegistrationPayment-DiD9uYs6.mjs} +1292 -224
  71. package/dist/client/{Page-ChJ2TGVk.mjs → Page-bX7iy_MK.mjs} +158 -50
  72. package/dist/client/{SiteTermsAgreementField-CDBU31xW.mjs → SiteTermsAgreementField-BAdW5DvE.mjs} +22 -15
  73. package/dist/client/{StepIndicator-JQA-VuEH.mjs → StepIndicator-DCfdcb7s.mjs} +1 -1
  74. package/dist/client/{StepIndicator-2Dl9zon2.mjs → StepIndicator-DCqorVne.mjs} +6 -6
  75. package/dist/client/{accordion-B6SqU49k.mjs → accordion-wofJY8xY.mjs} +1 -1
  76. package/dist/client/{booking-form.client-DrEOjQ3N.mjs → booking-form.client-CYl9NrqS.mjs} +410 -77
  77. package/dist/client/{bookingForm-drZBwEZW.mjs → bookingForm-kgVWtuMe.mjs} +4 -4
  78. package/dist/client/bookings.mjs +40 -10
  79. package/dist/client/{boxStyleClassNames-DEh45w16.mjs → boxStyleClassNames-CQHWz5gJ.mjs} +2 -2
  80. package/dist/client/{carousel-C-YJliD-.mjs → carousel-BE1dEFsD.mjs} +1 -1
  81. package/dist/client/{cart-acGFWK9R.mjs → cart-BsjsdGZE.mjs} +3 -3
  82. package/dist/client/{cart.client-BzlOGP2j.mjs → cart.client-DylGUWXY.mjs} +1 -1
  83. package/dist/client/{checkout-SEontwhy.mjs → checkout-B5KxEUDr.mjs} +3 -3
  84. package/dist/client/{checkout.client-C0Qvh-d4.mjs → checkout.client-C98fhch3.mjs} +1 -1
  85. package/dist/client/{checkoutUrls-yUKeq1N9.mjs → checkoutUrls-BMLYTf38.mjs} +1 -1
  86. package/dist/client/client.mjs +224 -158
  87. package/dist/client/constants-PfYJsEZF.mjs +101 -0
  88. package/dist/client/{context-DTrwaQtg.mjs → context-DtKdUdkO.mjs} +199 -27
  89. package/dist/client/{dateFormatting-Cg8E1r9l.mjs → dateFormatting-BaGPvQS3.mjs} +1 -1
  90. package/dist/client/{demoPortalMagicLink-D0kOJYOX.mjs → demoPortalMagicLink-B8eDjhuG.mjs} +1 -1
  91. package/dist/client/{enhanceHeaderSection-DyrpZ7ks.mjs → enhanceHeaderSection-DvhD-8eE.mjs} +3 -3
  92. package/dist/client/{event-registration.client-RLZQWi2V.mjs → event-registration.client-Du9a_xAN.mjs} +1980 -1517
  93. package/dist/client/{eventCalendar-CphYnImh.mjs → eventCalendar-Di9wDfzl.mjs} +4 -4
  94. package/dist/client/{eventCombined-BvqjASB_.mjs → eventCombined-CNW6nBsB.mjs} +4 -4
  95. package/dist/client/{eventListing-BaNAoC_M.mjs → eventListing-CQMxQ8By.mjs} +4 -4
  96. package/dist/client/{eventRegistration-COMHoRl6.mjs → eventRegistration-CprS9k1D.mjs} +4 -4
  97. package/dist/client/{form-DyH2juYT.mjs → form-Zl1_8RJ6.mjs} +3 -3
  98. package/dist/client/{form.client-DBwzkB0M.mjs → form.client-TaMUys6I.mjs} +4 -4
  99. package/dist/client/{form.parts-CY4kX3mh.mjs → form.parts-CpNPbPPM.mjs} +1 -1
  100. package/dist/client/{formatDate-CTEN7gxW.mjs → formatDate-hhI1-tzt.mjs} +1 -1
  101. package/dist/client/gifting/client.mjs +5 -5
  102. package/dist/client/{gifting-CIx4V378.mjs → gifting-DNVa7-Wj.mjs} +4 -4
  103. package/dist/client/{gifting.client-BEVPpzJM.mjs → gifting.client-CFUq3GVx.mjs} +4 -4
  104. package/dist/client/{gifting.parts-VnORjnZK.mjs → gifting.parts-CDQvxA4A.mjs} +2 -2
  105. package/dist/client/{headerSection-DGcJfRS8.mjs → headerSection-Cg6083rn.mjs} +2 -2
  106. package/dist/client/{lookSurfaces-IqT_SVnX.mjs → lookSurfaces-gJ3OqPf9.mjs} +92 -2
  107. package/dist/client/{newsletter-form.client-BvEDkjiD.mjs → newsletter-form.client-VuL9I96G.mjs} +5 -5
  108. package/dist/client/{newsletter-form.interactive-DCO1lErD.mjs → newsletter-form.interactive-7Of3eYn0.mjs} +18 -24
  109. package/dist/client/{newsletter-form.parts-BIy4IUT3.mjs → newsletter-form.parts-OBqsfT24.mjs} +1 -1
  110. package/dist/client/{newsletterForm-CoTXDNFS.mjs → newsletterForm-BkJe_RTv.mjs} +3 -3
  111. package/dist/client/portal/client.mjs +299 -115
  112. package/dist/client/{product-detail.client-YHQ2aKX1.mjs → product-detail.client-B2hdxqJN.mjs} +1 -1
  113. package/dist/client/{product-list.client-DxoZw1vF.mjs → product-list.client-CCEgu9rx.mjs} +1 -1
  114. package/dist/client/{productDetail-DjuFvkey.mjs → productDetail-CRX_ZRfS.mjs} +3 -3
  115. package/dist/client/{productList-DE9GEFoZ.mjs → productList-BAdJ6z5S.mjs} +3 -3
  116. package/dist/client/{propsDecoder-Cyag_HOs.mjs → propsDecoder-BLKAmX0S.mjs} +2 -2
  117. package/dist/client/{registry.server-BPwV-0Pp.mjs → registry.server-Bj9cmHHF.mjs} +89 -50
  118. package/dist/client/rendering/client.mjs +22 -22
  119. package/dist/client/rendering/islands.mjs +1 -1
  120. package/dist/client/rendering.mjs +4 -4
  121. package/dist/client/{richText-coerce-NrRqDeOg.mjs → richText-coerce-Z45OLLEX.mjs} +1 -1
  122. package/dist/client/{routeIslandApiConfig-BWq5gKFK.mjs → routeIslandApiConfig-DHpTTK77.mjs} +1 -1
  123. package/dist/client/{shop-C3wM0Hr4.mjs → shop-BKsgxm_-.mjs} +3 -3
  124. package/dist/client/{shop-commerce-34YvcpbX.mjs → shop-commerce-Cbtk_kUW.mjs} +12 -12
  125. package/dist/client/{shop-commerce-store-B7xHksOs.mjs → shop-commerce-store-B-rv2p5h.mjs} +1 -1
  126. package/dist/client/{shop-discount-apply.state-BiBnozfO.mjs → shop-discount-apply.state-CiCDLNh7.mjs} +2 -2
  127. package/dist/client/{shop.client-C0v88nLd.mjs → shop.client-Rnqa74Tk.mjs} +12 -12
  128. package/dist/client/{shopShared-Ct-BRNez.mjs → shopShared-BaBfhjCq.mjs} +2 -2
  129. package/dist/client/{src-CCtanNlD.mjs → src-o7WEvbK1.mjs} +118 -3
  130. package/dist/client/{timetableModel-lhE29TNT.mjs → timetableModel-BOff1Kk5.mjs} +201 -7
  131. package/dist/client/{useAvailableSlots-BelJviOT.mjs → useAvailableSlots-DQJNh10g.mjs} +3 -23
  132. package/dist/client/{useDiscountCodeUi-rQRE1-Ho.mjs → useDiscountCodeUi-BcFQRI_7.mjs} +1 -1
  133. package/dist/client/{useEventPagination-C4rS2Xxl.mjs → useEventPagination-BvdcexDC.mjs} +7 -7
  134. package/dist/client/{view-LJVHVqsy.mjs → view-CTBwSpKv.mjs} +3 -3
  135. package/dist/client/{wizardSteps-CNDsxeJH.mjs → wizardSteps-CWIQyRIw.mjs} +1605 -442
  136. package/dist/preview-next/before-render.mjs +1 -0
  137. package/dist/preview-next/client/{LocationPickerEnvironment-BHAT81Wx.mjs → LocationPickerEnvironment-BW3dRFIv.mjs} +1 -1
  138. package/dist/preview-next/client/{MapLibreEditMap-B52hkdIZ.mjs → MapLibreEditMap-Db9BHyXh.mjs} +2 -2
  139. package/dist/preview-next/client/{PageSectionToolbar-C4TtBPN-.mjs → PageSectionToolbar-CG6KwITA.mjs} +4 -4
  140. package/dist/preview-next/client/{PreviewEditorSidebar-D6fkE59-.mjs → PreviewEditorSidebar-BGBqrC9m.mjs} +8 -7
  141. package/dist/preview-next/client/{PreviewEditorUI-amcDlj0O.mjs → PreviewEditorUI-Bwkyx28x.mjs} +5 -5
  142. package/dist/preview-next/client/{PreviewShell-DeQjx4zk.mjs → PreviewShell-DB1l6JNU.mjs} +7 -7
  143. package/dist/preview-next/client/{SdkPreviewModeRuntime-Cx0SXnoX.mjs → SdkPreviewModeRuntime-Bs6Cwzr3.mjs} +15 -7
  144. package/dist/preview-next/client/{lucide-react-McYZeSMb.mjs → lucide-react-00FF_oar.mjs} +13 -1
  145. package/dist/preview-next/client/{previewAssistantSlot-aqpU34WI.mjs → previewAssistantSlot-T-oDD_Dd.mjs} +5735 -2073
  146. package/dist/preview-next/client/{previewChromeRoot-D3Gy_Rs0.mjs → previewChromeRoot-BeukcDRy.mjs} +1 -1
  147. package/dist/preview-next/client/runtime.mjs +3 -3
  148. package/dist/preview-next/client/{sdk-runtime-Dzx_RrN7.mjs → sdk-runtime-ceDW_9q2.mjs} +2 -2
  149. package/dist/preview-next/client/{siteStyleAccess-LHedw83e.mjs → siteStyleAccess-CCB9bScO.mjs} +35 -23
  150. package/dist/preview-next/client/{useAutosaveStatus-DpSd9aVk.mjs → useAutosaveStatus-D4o0CKq7.mjs} +1 -1
  151. package/dist/preview-next/client/{useOpenBlockForSetup-BGZn5AT1.mjs → useOpenBlockForSetup-Seccrvwu.mjs} +2 -2
  152. package/dist/preview-next/container-responsive.css +103 -10
  153. package/dist/preview-next/keepAlive.mjs +1 -1
  154. package/dist/preview-next/middleware.mjs +1 -1
  155. package/dist/preview-next/{route-contract-DnL-FgSV.mjs → route-contract-FwFj8zGL.mjs} +43 -0
  156. package/dist/server/{Block.shared-BEbq6EwO.mjs → Block.shared-D6WrRCxX.mjs} +4 -4
  157. package/dist/server/{ThemeScopeCore-DFEM1a85.mjs → ThemeScopeCore-BQzjDQ2q.mjs} +8 -1
  158. package/dist/server/{bindings-Bly0dRs7.mjs → bindings-CS6ih1Yc.mjs} +4 -4
  159. package/dist/server/{client-CGJ2ztYp.mjs → client-m0ylCj_f.mjs} +847 -786
  160. package/dist/server/config-validation.mjs +1 -1
  161. package/dist/server/config.mjs +2 -2
  162. package/dist/server/data/resolveBlockData.mjs +1 -1
  163. package/dist/server/index.mjs +2 -2
  164. package/dist/server/{loadContent-BkK1w3QQ.mjs → loadContent-vgWMz1uD.mjs} +6 -4
  165. package/dist/server/{loadPage-DTLe0FEs.mjs → loadPage-CIOL3-9t.mjs} +3 -3
  166. package/dist/server/{lookMediaFrame-CaH018pK.mjs → lookMediaFrame-m-91jGGn.mjs} +36 -0
  167. package/dist/server/next.mjs +43 -30
  168. package/dist/server/{overrideResolution-Uy9Zp2Ks.mjs → overrideResolution-BiHmsvTZ.mjs} +1 -1
  169. package/dist/server/page-converter.mjs +1 -1
  170. package/dist/server/{pageRenderPlan-JzxBnqfV.mjs → pageRenderPlan-DJo_obpi.mjs} +9 -7
  171. package/dist/server/{pageRuntimeSupport-DyNSd2Yj.mjs → pageRuntimeSupport-BnSuoHON.mjs} +5 -1
  172. package/dist/server/{pageShared-DU4ETFPS.mjs → pageShared-BJuOzxzn.mjs} +550 -258
  173. package/dist/server/{prebuild-8jNtDXmS.mjs → prebuild-Cr8p8T7V.mjs} +1 -1
  174. package/dist/server/prebuild.mjs +1 -1
  175. package/dist/server/{prefetchBlockData-xeMG42aw.mjs → prefetchBlockData-BZh57-ua.mjs} +4 -3
  176. package/dist/server/{registry-DH1VrsCl.mjs → registry-CvhFwbXJ.mjs} +240 -80
  177. package/dist/server/rendering/components/pageShared.mjs +1 -1
  178. package/dist/server/rendering/helpers/loadPage.mjs +1 -1
  179. package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
  180. package/dist/server/rendering/server.mjs +4 -4
  181. package/dist/server/rendering.mjs +8 -8
  182. package/dist/server/{resolveBlockData-BN8tweTx.mjs → resolveBlockData-Cv_W1LVB.mjs} +39 -31
  183. package/dist/server/{resolvePageContent-DnM16_f9.mjs → resolvePageContent-BWKUZUIn.mjs} +1 -1
  184. package/dist/server/{responseMedia-F-ElH2Rd.mjs → responseMedia-KRKguBC5.mjs} +56 -1
  185. package/dist/server/routing.mjs +1 -1
  186. package/dist/server/server.mjs +3 -3
  187. package/dist/server/{servicePageContent-B-FezJmH.mjs → servicePageContent-CRKbTm_7.mjs} +14 -10
  188. package/dist/server/theme-bridge.mjs +1 -1
  189. package/dist/server/{validation-3jOzYdPL.mjs → validation-DCl-FCk_.mjs} +4 -4
  190. package/dist/server/{version-8t0o6_jd.mjs → version-DT_R5JAR.mjs} +1 -1
  191. package/dist/styles/index.css +504 -27
  192. package/package.json +1 -1
  193. package/dist/client/constants-4o4_hl34.mjs +0 -6
@@ -1,7 +1,7 @@
1
1
  "use client";
2
- import { gs as parseSiteId } from "./wizardSteps-CNDsxeJH.mjs";
3
- import { A as materializeEntriesMedia, C as siteBlockRenderContext, I as requireSdkTheme, M as RiverbankApiError, N as attachResilienceStatusToError, S as projectRenderablePageOutline, _ as loadContentFromContentResponse, b as buildSiteRenderSupport, ht as isSupportedLoaderEndpoint, k as prefetchBlockDataWithFailures, m as isPageContent, mt as encodePublicProductCategorySelector, t as Page, w as resolveSiteCustomBlocks, x as collectMediaAssetSidecar, y as buildRenderablePageOutline } from "./Page-ChJ2TGVk.mjs";
4
- import { Jn as publicMapLocationParamsSchema } from "./registry.server-BPwV-0Pp.mjs";
2
+ import { Fs as parseSiteId } from "./wizardSteps-CWIQyRIw.mjs";
3
+ import { A as materializeEntriesMedia, C as siteBlockRenderContext, F as attachResilienceStatusToError, M as rethrowClientFrameworkSignal, P as RiverbankApiError, R as requireSdkTheme, S as projectRenderablePageOutline, _ as loadContentFromContentResponse, _t as isSupportedLoaderEndpoint, b as buildSiteRenderSupport, gt as encodePublicProductCategorySelector, j as findFrameworkSignal, k as prefetchBlockDataWithFailures, m as isPageContent, t as Page, w as resolveSiteCustomBlocks, x as collectMediaAssetSidecar, y as buildRenderablePageOutline } from "./Page-bX7iy_MK.mjs";
4
+ import { Jn as publicMapLocationParamsSchema } from "./registry.server-Bj9cmHHF.mjs";
5
5
  import { t as BEFORE_BOOKING_QUESTIONS_ROUTE } from "./bookingQuestions-BHq83mzS.mjs";
6
6
  import { t as restoreRuntimeResponse } from "./runtimeResponse-DtWSfWSZ.mjs";
7
7
  import { useEffect, useState } from "react";
@@ -1377,6 +1377,17 @@ const APPOINTMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
1377
1377
  "server:internal_error"
1378
1378
  ]
1379
1379
  },
1380
+ getTeamMemberTemplatePreview: {
1381
+ path: "/sites/{siteId}/bookings/profile-editor/{entryId}/template-preview",
1382
+ method: "GET",
1383
+ auth: "user",
1384
+ responseKind: "json",
1385
+ errors: [
1386
+ "auth:forbidden",
1387
+ "resource:not_found",
1388
+ "server:internal_error"
1389
+ ]
1390
+ },
1380
1391
  updateTeamMemberProfilePolicy: {
1381
1392
  path: "/sites/{siteId}/bookings/resources/profile-policy",
1382
1393
  method: "PUT",
@@ -7818,6 +7829,38 @@ const API_ENDPOINTS$1 = {
7818
7829
  "server:internal_error"
7819
7830
  ]
7820
7831
  },
7832
+ getEventRoomsRoster: {
7833
+ errors: [],
7834
+ path: "/sites/{siteId}/bookings/event-series/{seriesId}/rooms",
7835
+ method: "GET",
7836
+ tags: ["site-{siteId}", "event-series-{seriesId}"],
7837
+ auth: "user",
7838
+ responseKind: "json"
7839
+ },
7840
+ getChangeEventRoomOptions: {
7841
+ errors: [],
7842
+ path: "/sites/{siteId}/bookings/event-series/{seriesId}/rooms/change/options",
7843
+ method: "GET",
7844
+ tags: [
7845
+ "site-{siteId}",
7846
+ "event-series-{seriesId}",
7847
+ "bookings"
7848
+ ],
7849
+ auth: "user",
7850
+ responseKind: "json"
7851
+ },
7852
+ changeEventRoom: {
7853
+ errors: [],
7854
+ path: "/sites/{siteId}/bookings/event-series/{seriesId}/rooms/change",
7855
+ method: "POST",
7856
+ tags: [
7857
+ "site-{siteId}",
7858
+ "event-series-{seriesId}",
7859
+ "bookings"
7860
+ ],
7861
+ auth: "user",
7862
+ responseKind: "json"
7863
+ },
7821
7864
  listEventSeriesAttendees: {
7822
7865
  path: "/sites/{siteId}/bookings/event-series/{seriesId}/attendees",
7823
7866
  method: "GET",
@@ -10311,14 +10354,6 @@ function resolveApiBaseUrl() {
10311
10354
  }
10312
10355
  //#endregion
10313
10356
  //#region ../api/src/pageReadResponseCache.ts
10314
- var CacheProbeMiss = class extends Error {};
10315
- /** Next has no response-dependent fetch TTL. Only the matching policy may store a page read. */
10316
- var UncachedPageRead = class extends Error {
10317
- constructor(snapshot) {
10318
- super("Page read belongs to another cache policy");
10319
- this.snapshot = snapshot;
10320
- }
10321
- };
10322
10357
  function isRecord(value) {
10323
10358
  return typeof value === "object" && value !== null && !Array.isArray(value);
10324
10359
  }
@@ -10333,130 +10368,146 @@ function envelopePage(body) {
10333
10368
  const data = isRecord(body) && body.success === true && isRecord(body.data) ? body.data : null;
10334
10369
  return data?.type === "content" && isRecord(data.content) ? data.content : data;
10335
10370
  }
10336
- function admit(snapshot) {
10371
+ function parseBody(body) {
10337
10372
  try {
10338
- const page = envelopePage(JSON.parse(snapshot.body));
10339
- if (snapshot.status === 200 && isResolvedPage(page)) return {
10340
- resolved: true,
10373
+ return JSON.parse(body);
10374
+ } catch {
10375
+ return null;
10376
+ }
10377
+ }
10378
+ const header = (snapshot, name) => snapshot.headers.find(([key]) => key.toLowerCase() === name)?.[1];
10379
+ /** Only a complete, resolved page is stored. Anything else passes through and keeps the policy its failure names. */
10380
+ function admit(snapshot) {
10381
+ const page = envelopePage(parseBody(snapshot.body));
10382
+ if (snapshot.status === 200 && isResolvedPage(page)) {
10383
+ if (header(snapshot, "x-riverbank-page-storage") === "no-store") return {
10384
+ kind: "pass-through",
10385
+ dependencies: "availability"
10386
+ };
10387
+ return {
10388
+ kind: "store",
10341
10389
  dependencies: page.dependencies
10342
10390
  };
10343
- } catch {}
10391
+ }
10344
10392
  return {
10345
- resolved: false,
10346
- dependencies: snapshot.status === 200 || snapshot.headers.some(([key, value]) => key === "x-riverbank-page-dependencies" && value === "availability") ? "availability" : "content"
10393
+ kind: "pass-through",
10394
+ dependencies: snapshot.status === 200 || header(snapshot, "x-riverbank-page-dependencies") === "availability" ? "availability" : "content"
10347
10395
  };
10348
10396
  }
10349
- /** A scoped transport read is shared with Next's background refresh, never across requests. */
10350
- function liveResponse(read) {
10351
- const pending = /* @__PURE__ */ new Map();
10352
- return () => {
10353
- const existing = pending.get("response");
10354
- if (existing) return existing;
10355
- const response = read().then(async (value) => ({
10356
- body: await value.text(),
10357
- status: value.status,
10358
- headers: [...value.headers.entries()],
10359
- cachedAt: Date.now()
10360
- }));
10361
- pending.set("response", response);
10362
- return response;
10397
+ /**
10398
+ * One cache entry per request, judged by the policy it is looked up with. Content is looked up first, so a
10399
+ * plain page costs one lookup and never registers the availability policy. A page whose snapshot depends on
10400
+ * availability is looked up again under that policy, which checks its tags and 60-second budget. A snapshot
10401
+ * past its own budget is never served: the live read replaces it.
10402
+ */
10403
+ function planPageRead(state, now, budgetSeconds) {
10404
+ const subject = state.live ?? state.cached;
10405
+ if (!subject) return {
10406
+ kind: "lookup",
10407
+ dependencies: "content"
10408
+ };
10409
+ const { dependencies } = admit(subject);
10410
+ if (!state.lookedUp.includes(dependencies)) return {
10411
+ kind: "lookup",
10412
+ dependencies
10413
+ };
10414
+ if (state.live) return {
10415
+ kind: "serve",
10416
+ snapshot: state.live
10363
10417
  };
10418
+ return now - subject.cachedAt < budgetSeconds(dependencies) * 1e3 ? {
10419
+ kind: "serve",
10420
+ snapshot: subject
10421
+ } : { kind: "read-live" };
10364
10422
  }
10365
- /** Neutral probes do not register a policy; the chosen entry is then checked with its real tags. */
10366
- async function readPolicy(input, probe = false) {
10367
- const policy = buildPageReadCachePolicy(input.siteId, input.dependency);
10368
- const revalidate = Math.min(policy.revalidate, input.maxAge ?? policy.revalidate);
10369
- const snapshot = await input.cache(async () => {
10370
- const snapshot = await input.read();
10371
- const admission = admit(snapshot);
10372
- if (!admission.resolved || admission.dependencies !== input.dependency) throw new UncachedPageRead(snapshot);
10423
+ /**
10424
+ * `unstable_cache` stores whatever its callback returns, so a response that must not be kept leaves the
10425
+ * callback by this one exception, which `lookup` turns back into a value straight away.
10426
+ */
10427
+ var PassThroughResponse = class extends Error {
10428
+ constructor(snapshot) {
10429
+ super("Page read must not be stored");
10430
+ this.snapshot = snapshot;
10431
+ }
10432
+ };
10433
+ async function lookup(input, dependencies) {
10434
+ const { tags } = buildPageReadCachePolicy(input.siteId, dependencies);
10435
+ const load = async () => {
10436
+ const snapshot = await input.live();
10437
+ if (admit(snapshot).kind === "pass-through") throw new PassThroughResponse(snapshot);
10373
10438
  return snapshot;
10374
- }, [
10375
- "page-read-envelope-v2",
10376
- input.key,
10377
- input.dependency
10378
- ], probe ? {
10379
- revalidate: false,
10380
- tags: []
10381
- } : {
10382
- ...policy,
10383
- revalidate
10384
- })();
10385
- if (Date.now() - snapshot.cachedAt < revalidate * 1e3) return snapshot;
10386
- return probe ? null : input.read();
10387
- }
10388
- async function probePolicy(input) {
10389
- return readPolicy({
10390
- ...input,
10391
- read: async () => {
10392
- throw new CacheProbeMiss();
10393
- }
10394
- }, true).catch((error) => {
10395
- if (error instanceof CacheProbeMiss) return null;
10396
- throw error;
10397
- });
10398
- }
10399
- /** Read in a framework cache scope, but never store an unclassified or failed response. */
10400
- async function readInCacheScope(cache, key, read) {
10439
+ };
10401
10440
  try {
10402
- return await cache(async () => {
10403
- throw new UncachedPageRead(await read());
10404
- }, ["page-read-live-v2", key], {
10405
- revalidate: false,
10406
- tags: []
10407
- })();
10441
+ return {
10442
+ cached: await input.cache(load, ["page-read-envelope-v3", input.key], {
10443
+ revalidate: input.budgetSeconds(dependencies),
10444
+ tags
10445
+ })(),
10446
+ live: null
10447
+ };
10408
10448
  } catch (error) {
10409
- if (error instanceof UncachedPageRead) return error.snapshot;
10449
+ if (error instanceof PassThroughResponse) return {
10450
+ cached: null,
10451
+ live: error.snapshot
10452
+ };
10410
10453
  throw error;
10411
10454
  }
10412
10455
  }
10413
- async function selectResponse(input) {
10414
- const candidate = await probePolicy({
10415
- ...input,
10416
- dependency: "content"
10417
- }) ?? await probePolicy({
10418
- ...input,
10419
- dependency: "availability"
10420
- });
10421
- if (candidate) try {
10422
- const checked = await readPolicy({
10423
- ...input,
10424
- dependency: admit(candidate).dependencies
10456
+ async function runPlan(input, state) {
10457
+ const step = planPageRead(state, Date.now(), input.budgetSeconds);
10458
+ switch (step.kind) {
10459
+ case "serve": return step.snapshot;
10460
+ case "read-live": return runPlan(input, {
10461
+ ...state,
10462
+ live: await input.live()
10425
10463
  });
10426
- if (checked) return checked;
10427
- } catch (error) {
10428
- if (error instanceof UncachedPageRead) return storeResponse(input, error.snapshot);
10429
- throw error;
10464
+ case "lookup": {
10465
+ const found = await lookup(input, step.dependencies);
10466
+ return runPlan(input, {
10467
+ lookedUp: [...state.lookedUp, step.dependencies],
10468
+ cached: found.cached ?? state.cached,
10469
+ live: state.live ?? found.live
10470
+ });
10471
+ }
10430
10472
  }
10431
- return storeResponse(input, await readInCacheScope(input.cache, input.key, input.read));
10432
10473
  }
10433
- async function storeResponse(input, snapshot) {
10434
- const admission = admit(snapshot);
10435
- try {
10436
- return await readPolicy({
10437
- ...input,
10438
- key: admission.resolved ? input.key : `${input.key}:refusal:${snapshot.status}`,
10439
- dependency: admission.dependencies,
10440
- read: async () => snapshot
10441
- }) ?? snapshot;
10442
- } catch (error) {
10443
- if (error instanceof UncachedPageRead) return error.snapshot;
10444
- throw error;
10445
- }
10474
+ /**
10475
+ * One transport read per page read, shared by a miss, a stale entry's refresh and the live fallback.
10476
+ * It starts only when one of them asks for it.
10477
+ */
10478
+ function sharedRead(read) {
10479
+ const transport = { started: null };
10480
+ return () => transport.started ?? (transport.started = read().then(async (value) => ({
10481
+ body: await value.text(),
10482
+ status: value.status,
10483
+ headers: [...value.headers.entries()],
10484
+ cachedAt: Date.now()
10485
+ })));
10446
10486
  }
10447
10487
  async function cachePageReadResponse(input) {
10448
- if (!input.cache) return input.read();
10449
- const result = await selectResponse({
10450
- ...input,
10488
+ if (!input.cache || input.maxAge !== void 0 && input.maxAge <= 0) return input.read();
10489
+ const maxAge = input.maxAge;
10490
+ const budgetSeconds = (dependencies) => {
10491
+ const policy = buildPageReadCachePolicy(input.siteId, dependencies).revalidate;
10492
+ return maxAge === void 0 ? policy : Math.min(policy, maxAge);
10493
+ };
10494
+ const result = await runPlan({
10451
10495
  cache: input.cache,
10452
- read: liveResponse(input.read)
10496
+ key: input.key,
10497
+ siteId: input.siteId,
10498
+ live: sharedRead(input.read),
10499
+ budgetSeconds
10500
+ }, {
10501
+ lookedUp: [],
10502
+ cached: null,
10503
+ live: null
10453
10504
  });
10454
10505
  return new Response(result.body, {
10455
10506
  status: result.status,
10456
10507
  headers: result.headers
10457
10508
  });
10458
10509
  }
10459
- /** Result adapters use this for cache fallbacks that did not return through the HTTP transport. */
10510
+ /** Result adapters use this when the SDK served a page without the HTTP transport (memory, durable or prebuild fallback). */
10460
10511
  async function observePageReadPolicy(cache, siteId, payload) {
10461
10512
  if (!cache) return;
10462
10513
  const dependency = pageReadDependencies(payload);
@@ -10706,7 +10757,14 @@ async function parseJsonSuccess(endpoint, response, config, decoder) {
10706
10757
  if (!raw.trim()) return buildSuccessEnvelope(coerceResponse(void 0), requestId);
10707
10758
  const parsed = decodeSuccessJson(raw, endpoint, response, config, decoder);
10708
10759
  requireUsableCommitProjection(response, parsed);
10709
- return successJsonEnvelope(parsed, requestId);
10760
+ const envelope = successJsonEnvelope(parsed, requestId);
10761
+ return envelope.success && response.headers.get("x-riverbank-page-storage") === "no-store" ? {
10762
+ ...envelope,
10763
+ meta: {
10764
+ ...envelope.meta,
10765
+ storage: "no-store"
10766
+ }
10767
+ } : envelope;
10710
10768
  }
10711
10769
  function decodeSuccessJson(raw, endpoint, response, config, decoder) {
10712
10770
  try {
@@ -11372,7 +11430,7 @@ function isEntryResponse(response) {
11372
11430
  //#endregion
11373
11431
  //#region ../site-renderer/src/runtimeClient.ts
11374
11432
  /** Only a client that reconstructs surfaces advertises revision transport. */
11375
- function createRuntimeApiClient(transport) {
11433
+ function createRuntimeApiClient$1(transport) {
11376
11434
  const revisionTransport = (request) => transport({
11377
11435
  ...request,
11378
11436
  ...request.endpoint === "getContentByPath" ? { params: {
@@ -11386,10 +11444,10 @@ function createRuntimeApiClient(transport) {
11386
11444
  });
11387
11445
  }
11388
11446
  function createRuntimeInternalAPIClient(baseUrl, options) {
11389
- return createRuntimeApiClient(createApiResponseTransport(() => ({}), baseUrl, options));
11447
+ return createRuntimeApiClient$1(createApiResponseTransport(() => ({}), baseUrl, options));
11390
11448
  }
11391
11449
  function createRuntimeBearerAPIClient(token, baseUrl, options) {
11392
- return createRuntimeApiClient(createApiResponseTransport(() => ({ Authorization: `Bearer ${typeof token === "function" ? token() : token}` }), baseUrl, options));
11450
+ return createRuntimeApiClient$1(createApiResponseTransport(() => ({ Authorization: `Bearer ${typeof token === "function" ? token() : token}` }), baseUrl, options));
11393
11451
  }
11394
11452
  //#endregion
11395
11453
  //#region src/client/entryListReadRequest.ts
@@ -11546,7 +11604,7 @@ var SimpleCache = class {
11546
11604
  //#endregion
11547
11605
  //#region src/request-options.ts
11548
11606
  /** Every API client the SDK creates sends its version as `x-sdk-version`. */
11549
- const sdkRequestOptions = { sdkVersion: "0.179.0" };
11607
+ const sdkRequestOptions = { sdkVersion: "0.180.0" };
11550
11608
  //#endregion
11551
11609
  //#region src/public-api/runtime.ts
11552
11610
  const PUBLIC_ENDPOINT_NAMES = [
@@ -12097,7 +12155,7 @@ async function readPageWithResilience(input, params) {
12097
12155
  cacheTags: buildSiteReadTags({ siteId }),
12098
12156
  prebuildFallback: void 0
12099
12157
  });
12100
- if (!preview) await observePageReadResponse(input.frameworkCache, siteId, result.data);
12158
+ if (!preview && result.resilience.source !== "live") await observePageReadResponse(input.frameworkCache, siteId, result.data);
12101
12159
  return result;
12102
12160
  }
12103
12161
  function createContentReadOperations(input) {
@@ -12447,6 +12505,7 @@ function isAbortError$1(error) {
12447
12505
  */
12448
12506
  function shouldRetryError(error, customRetryOn) {
12449
12507
  if (isAbortError$1(error)) return false;
12508
+ if (findFrameworkSignal(error) !== void 0) return false;
12450
12509
  if (customRetryOn) return customRetryOn(error, error instanceof RiverbankApiError ? error.status : void 0);
12451
12510
  return isTransientError(error);
12452
12511
  }
@@ -12700,6 +12759,7 @@ function getNetworkErrorCode(error) {
12700
12759
  * - AbortError (let propagate raw for consumer detection)
12701
12760
  */
12702
12761
  function convertToTypedError(error) {
12762
+ rethrowClientFrameworkSignal(error);
12703
12763
  if (isAbortError(error)) throw error;
12704
12764
  if (error instanceof ApiEnvelopeError) throw new RiverbankApiError({
12705
12765
  code: error.code,
@@ -12757,6 +12817,15 @@ function resolveAuth(config) {
12757
12817
  };
12758
12818
  throw new Error("Authentication configuration is required. Provide either `auth` (recommended) or `apiKey` (deprecated). For public endpoints without auth, use: { auth: { type: \"none\" } }");
12759
12819
  }
12820
+ /** The framework adapter is fixed at construction: `@riverbankcms/sdk/next` supplies Next's. */
12821
+ function createRuntimeApiClient(deps, config, authConfig) {
12822
+ const frameworkCache = config.frameworkCache;
12823
+ const requestOptions = frameworkCache ? {
12824
+ ...sdkRequestOptions,
12825
+ frameworkCache
12826
+ } : sdkRequestOptions;
12827
+ return withDefaultHeaders(authConfig.type === "none" ? deps.createInternalAPIClient(config.baseUrl, requestOptions) : deps.createBearerAPIClient(authConfig.type === "api-key" ? authConfig.key : authConfig.token, config.baseUrl, requestOptions), config.defaultHeaders);
12828
+ }
12760
12829
  const defaultRiverbankClientDeps = {
12761
12830
  createBearerAPIClient: createRuntimeBearerAPIClient,
12762
12831
  createInternalAPIClient: createRuntimeInternalAPIClient
@@ -12788,7 +12857,13 @@ function resolveMemoryCachePolicy(config) {
12788
12857
  servesFreshMemoryHits: enabled ?? !isRunningInNextServer()
12789
12858
  };
12790
12859
  }
12791
- const frameworkCacheInstallers = /* @__PURE__ */ new WeakMap();
12860
+ /** The server marks a page built with parts missing (`x-riverbank-page-storage: no-store`); no SDK cache may keep it. */
12861
+ function readLive(response) {
12862
+ return {
12863
+ data: unwrapResponse(response),
12864
+ storable: !(response.success && response.meta?.storage === "no-store")
12865
+ };
12866
+ }
12792
12867
  function createRiverbankClient(config) {
12793
12868
  return createRiverbankClientWithDeps(defaultRiverbankClientDeps, config);
12794
12869
  }
@@ -12827,18 +12902,8 @@ function createRiverbankClientWithDeps(deps, config) {
12827
12902
  keyType = "preview";
12828
12903
  break;
12829
12904
  }
12830
- function createApiClient(frameworkCache) {
12831
- const requestOptions = frameworkCache ? {
12832
- ...sdkRequestOptions,
12833
- frameworkCache
12834
- } : sdkRequestOptions;
12835
- return withDefaultHeaders(authConfig.type === "none" ? deps.createInternalAPIClient(config.baseUrl, requestOptions) : deps.createBearerAPIClient(authConfig.type === "api-key" ? authConfig.key : authConfig.token, config.baseUrl, requestOptions), config.defaultHeaders);
12836
- }
12837
- const framework = {
12838
- adapter: config.frameworkCache,
12839
- apiClient: createApiClient(config.frameworkCache)
12840
- };
12841
- const apiClient = (params) => framework.apiClient(params);
12905
+ const frameworkCache = config.frameworkCache;
12906
+ const apiClient = createRuntimeApiClient(deps, config, authConfig);
12842
12907
  const cache = new SimpleCache({
12843
12908
  maxSize: cacheMaxSize,
12844
12909
  ttl: cacheTTL,
@@ -13008,31 +13073,37 @@ function createRiverbankClientWithDeps(deps, config) {
13008
13073
  }));
13009
13074
  throw new CircuitOpenError(circuitState);
13010
13075
  }
13011
- try {
13012
- let data;
13013
- if (resilienceEnabled) {
13014
- if (circuitBreaker.getState().state === "half-open") circuitBreaker.incrementHalfOpenRequests();
13015
- data = await fetchWithTimeoutAndRetry(async (timeoutSignal) => {
13016
- const combinedSignal = options.signal ? combineAbortSignals(timeoutSignal, options.signal) : timeoutSignal;
13017
- try {
13018
- return unwrapResponse(await fetcher(combinedSignal));
13019
- } catch (error) {
13020
- convertToTypedError(error);
13021
- }
13022
- }, {
13023
- ...retryConfig,
13024
- requestTimeoutMs
13025
- });
13026
- circuitBreaker.recordSuccess();
13027
- } else try {
13028
- data = unwrapResponse(await fetcher(options.signal ?? new AbortController().signal));
13076
+ const storeLive = async (data) => {
13077
+ if (shouldWrite(cacheEnabled, options.force)) cache.set(cacheKey, data, memoryWritePolicy(options.pageRead, data, options.cacheTags, cacheTTL));
13078
+ if (allowFallbacks && !isPreview) await writePublishedRuntimeCache(options.publishedRuntimeCache, data);
13079
+ };
13080
+ const fetchLive = async () => {
13081
+ if (!resilienceEnabled) try {
13082
+ return readLive(await fetcher(options.signal ?? new AbortController().signal));
13029
13083
  } catch (error) {
13030
13084
  convertToTypedError(error);
13031
13085
  }
13032
- if (shouldWrite(cacheEnabled, options.force)) cache.set(cacheKey, data, memoryWritePolicy(options.pageRead, data, options.cacheTags, cacheTTL));
13033
- if (allowFallbacks && !isPreview) await writePublishedRuntimeCache(options.publishedRuntimeCache, data);
13086
+ if (circuitBreaker.getState().state === "half-open") circuitBreaker.incrementHalfOpenRequests();
13087
+ const live = await fetchWithTimeoutAndRetry(async (timeoutSignal) => {
13088
+ const combinedSignal = options.signal ? combineAbortSignals(timeoutSignal, options.signal) : timeoutSignal;
13089
+ try {
13090
+ return readLive(await fetcher(combinedSignal));
13091
+ } catch (error) {
13092
+ convertToTypedError(error);
13093
+ }
13094
+ }, {
13095
+ ...retryConfig,
13096
+ requestTimeoutMs
13097
+ });
13098
+ circuitBreaker.recordSuccess();
13099
+ return live;
13100
+ };
13101
+ try {
13102
+ const { data, storable } = await fetchLive();
13103
+ if (storable) await storeLive(data);
13034
13104
  return emitStatus("live", data, statusDetails());
13035
13105
  } catch (error) {
13106
+ rethrowClientFrameworkSignal(error);
13036
13107
  if (isPageReadRefusal(options.pageRead, error)) throw attachResilienceStatusToError(error, emitStatus("error", null, statusDetails({ error: getRiverbankErrorInfo(error) })).resilience);
13037
13108
  if (resilienceEnabled && error instanceof Error) circuitBreaker.recordFailure(error);
13038
13109
  if (allowFallbacks && !isPreview && staleIfError && cacheEnabled) {
@@ -13072,9 +13143,7 @@ function createRiverbankClientWithDeps(deps, config) {
13072
13143
  apiClient,
13073
13144
  resilientFetch,
13074
13145
  prebuildLoader,
13075
- get frameworkCache() {
13076
- return framework.adapter;
13077
- }
13146
+ frameworkCache
13078
13147
  });
13079
13148
  const eventReads = createPublicEventReadOperations({
13080
13149
  apiClient,
@@ -13098,7 +13167,7 @@ function createRiverbankClientWithDeps(deps, config) {
13098
13167
  prebuildFallback: prebuildLoader && !preview ? () => prebuildLoader.loadEntries(siteId, params) : void 0
13099
13168
  }));
13100
13169
  }
13101
- const client = {
13170
+ return {
13102
13171
  async getSite(params) {
13103
13172
  return (await contentReads.getSiteWithResilience(params)).data;
13104
13173
  },
@@ -13463,14 +13532,11 @@ function createRiverbankClientWithDeps(deps, config) {
13463
13532
  },
13464
13533
  getBaseUrl() {
13465
13534
  return config.baseUrl;
13535
+ },
13536
+ hasFrameworkCache() {
13537
+ return frameworkCache !== void 0;
13466
13538
  }
13467
13539
  };
13468
- frameworkCacheInstallers.set(client, (adapter) => {
13469
- if (framework.adapter) return;
13470
- framework.apiClient = createApiClient(adapter);
13471
- framework.adapter = adapter;
13472
- });
13473
- return client;
13474
13540
  }
13475
13541
  //#endregion
13476
13542
  export { Page, createRiverbankClient, isContentError, isContentLoading, isEntryContentResult, isPageContentResult, useContent, usePage };
@@ -0,0 +1,101 @@
1
+ "use client";
2
+ import { As as publicEventPricingDisplay, as as bookingCollectionDatesOpen, os as flexibleBalanceDueDay, ps as resolveWholeSeriesPaymentDates } from "./wizardSteps-CWIQyRIw.mjs";
3
+ import { S as getBookingInstalmentProtectedDepositAmountCents } from "./creditProducts-BQ1t1erI.mjs";
4
+ //#region ../blocks/src/system/runtime/nodes/events/domain/depositOffer.ts
5
+ const NO_DEPOSIT = { kind: "none" };
6
+ /**
7
+ * True when the terms offer a deposit and every deposit option has run out of
8
+ * time for these dates (commerce's `bookingCollectionDatesOpen`): a flexible balance whose due day has passed (in the
9
+ * site's time zone), or an instalment plan that can no longer finish before
10
+ * its deadline (a course's last session when it says so). Dates only: whether
11
+ * a total can take a deposit is the commerce resolver's decision, not this one.
12
+ */
13
+ function depositDeadlinesPassed(paymentTerms, dates) {
14
+ const deposits = depositOptions(paymentTerms);
15
+ return deposits.length > 0 && deposits.every((option) => !bookingCollectionDatesOpen(option, dates));
16
+ }
17
+ /** Whether the terms include an option that starts with a deposit. */
18
+ function termsOfferDeposit(paymentTerms) {
19
+ return depositOptions(paymentTerms).length > 0;
20
+ }
21
+ /**
22
+ * The event page's deposit note for an event, decided on dates and the prices
23
+ * shown. A course's dates come from its live sessions, as the server reads
24
+ * them for the booking panel; a single date starts when it starts.
25
+ */
26
+ function resolvePublicEventDepositOffer(event, input) {
27
+ const prices = paidPriceSpan(event.pricing);
28
+ const terms = event.paymentTerms;
29
+ const payInFullOffered = terms.allowedOptions.some((option) => option.kind === "upfront");
30
+ const applies = (option) => prices !== null && (depositCents(option) ?? Infinity) < (payInFullOffered ? prices.highestCents : prices.lowestCents);
31
+ const deposits = depositOptions(terms).filter(applies);
32
+ if (!prices || deposits.length === 0) return NO_DEPOSIT;
33
+ const dates = {
34
+ ...input.sessions ? resolveWholeSeriesPaymentDates({
35
+ sessions: input.sessions,
36
+ paymentTerms: terms
37
+ }) : { bookingStartAt: event.startsAt },
38
+ timeZone: event.siteTimeZone,
39
+ nowIso: input.nowIso
40
+ };
41
+ const open = deposits.find((option) => bookingCollectionDatesOpen(option, dates));
42
+ if (!open) return terms.allowedOptions.some((option) => option.kind === "deferred_manual") ? NO_DEPOSIT : { kind: "paid_in_full" };
43
+ return {
44
+ kind: "deposit",
45
+ amountCents: depositCents(open) ?? 0,
46
+ currency: prices.currency,
47
+ payInFullOffered,
48
+ balanceDueDay: open.kind === "flexible_balance" && dates.bookingStartAt ? flexibleBalanceDueDay(open.config, dates.bookingStartAt, dates.timeZone) : null
49
+ };
50
+ }
51
+ const DEPOSIT_KINDS = /* @__PURE__ */ new Set(["flexible_balance", "instalment_plan"]);
52
+ /**
53
+ * The payment step's sentence when the visitor's booking is paid in full
54
+ * although the terms offer a deposit, perhaps advertised on a cached page.
55
+ * `offeredKinds` are the ways to pay the step shows (the live, repriced
56
+ * decision); `dates.nowIso` should be a live clock. Too late when the
57
+ * deposit's dates have passed; otherwise it went for an amount reason, which
58
+ * isn't the visitor's to fix, so the sentence only says how it's paid.
59
+ */
60
+ function paidInFullNote(input) {
61
+ if (!termsOfferDeposit(input.paymentTerms) || input.offeredKinds.length === 0) return null;
62
+ if (input.offeredKinds.some((kind) => DEPOSIT_KINDS.has(kind) || kind === "deferred_manual")) return null;
63
+ return depositDeadlinesPassed(input.paymentTerms, input.dates) ? "It’s too close to the date for a deposit, so this is paid in full now." : "This booking is paid in full when you book.";
64
+ }
65
+ function depositOptions(paymentTerms) {
66
+ return paymentTerms.allowedOptions.filter((option) => depositCents(option) !== null);
67
+ }
68
+ /** A deposit is an amount taken up front that's less than the whole; equal instalments have none. */
69
+ function depositCents(option) {
70
+ switch (option.kind) {
71
+ case "flexible_balance": return positive(option.config.upfrontAmountCents);
72
+ case "instalment_plan": return positive(getBookingInstalmentProtectedDepositAmountCents(option.plan));
73
+ case "upfront":
74
+ case "deferred_manual": return null;
75
+ }
76
+ }
77
+ const positive = (amount) => amount !== null && amount > 0 ? amount : null;
78
+ /** The cheapest and dearest paid place shown; null when nothing shown is paid. */
79
+ function paidPriceSpan(pricing) {
80
+ const display = publicEventPricingDisplay(pricing);
81
+ const span = (lowestCents, highestCents) => highestCents > 0 ? {
82
+ lowestCents: Math.max(lowestCents, 0),
83
+ highestCents,
84
+ currency: "currency" in display ? display.currency : ""
85
+ } : null;
86
+ switch (display.kind) {
87
+ case "exact": return span(display.amount, display.amount);
88
+ case "from": return span(display.amount, Infinity);
89
+ case "range": return span(display.minAmount, display.maxAmount);
90
+ case "mixed": return span(display.paidFromAmount, display.paidToAmount);
91
+ case "free":
92
+ case "unavailable":
93
+ case "external": return null;
94
+ }
95
+ }
96
+ //#endregion
97
+ //#region ../blocks/src/system/runtime/nodes/event-registration/constants.ts
98
+ const EVENT_REGISTRATION_ANCHOR_ID = "event-registration";
99
+ const EVENT_REGISTRATION_CHECKOUT_ATTEMPT_PARAM = "registration_attempt";
100
+ //#endregion
101
+ export { resolvePublicEventDepositOffer as i, EVENT_REGISTRATION_CHECKOUT_ATTEMPT_PARAM as n, paidInFullNote as r, EVENT_REGISTRATION_ANCHOR_ID as t };