@riverbankcms/sdk 0.178.0 → 0.179.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 (210) hide show
  1. package/README.md +15 -8
  2. package/dist/_dts/{BlocksIslandsHydrator-CrKsXtpD.d.ts → BlocksIslandsHydrator-DKwgs95u.d.ts} +1 -1
  3. package/dist/_dts/{Page-C9i27wZA.d.ts → Page-lWenra5i.d.ts} +7 -7
  4. package/dist/_dts/{SdkPreviewMode-DzGSR3jh.d.ts → SdkPreviewMode-BRxhRw4I.d.ts} +2 -2
  5. package/dist/_dts/{client-BnYN6XsH.d.ts → client-qWn7xAwJ.d.ts} +47 -17
  6. package/dist/_dts/{content-types-CXj6lp3d.d.ts → content-types-DL6GIvTm.d.ts} +2 -2
  7. package/dist/_dts/{contracts-BZLwkTwL.d.ts → contracts-CzWyAiJj.d.ts} +6 -116
  8. package/dist/_dts/{generatePageMetadata-ByEWwe9j.d.ts → generatePageMetadata-CBKd0cJ4.d.ts} +2 -2
  9. package/dist/_dts/{index-DCa-8TEY.d.ts → index-7CDBZGb-.d.ts} +1 -1
  10. package/dist/_dts/{index-CKDRr54L.d.ts → index-BU9uAkHB.d.ts} +4 -4
  11. package/dist/_dts/{index-D9-N1d9v.d.ts → index-BYnG_vF5.d.ts} +1 -1
  12. package/dist/_dts/{index-nnEdgc3Z.d.ts → index-CZgJrhzT.d.ts} +4 -2
  13. package/dist/_dts/{index-cTpvQg_Q.d.ts → index-CaCum9mM.d.ts} +2 -2
  14. package/dist/_dts/{index-0HFgCnGz.d.ts → index-DCiSHd-C.d.ts} +1 -1
  15. package/dist/_dts/{index-BE9dWIsr.d.ts → index-DVSipdrT.d.ts} +3 -3
  16. package/dist/_dts/{loadContent-DYkVV6w4.d.ts → loadContent-CPKbFQyq.d.ts} +15 -13
  17. package/dist/_dts/{request-B20VRWHH.d.ts → request-BjKBCS7t.d.ts} +1201 -335
  18. package/dist/_dts/{resolveBlockData-C_aK5GIS.d.ts → resolveBlockData-DupbMCup.d.ts} +8 -5
  19. package/dist/_dts/resolvePageContent-BqNyCHi8.d.ts +61 -0
  20. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
  21. package/dist/_dts/sdk/src/client/types.d.ts +3 -3
  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 +7 -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 +16 -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 +1 -1
  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 +7 -7
  47. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  48. package/dist/_dts/sdk/src/rendering/server.d.ts +3 -3
  49. package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
  50. package/dist/_dts/sdk/src/routing/index.d.ts +19 -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 +582 -0
  55. package/dist/_dts/{types-rm2M4LGx.d.ts → types-B7e6Lmo5.d.ts} +3 -3
  56. package/dist/_dts/{types-CYcd15BQ.d.ts → types-BOxSq-Bq.d.ts} +8 -7
  57. package/dist/_dts/{types-CMZ5mkpv.d.ts → types-CT-KOxl_.d.ts} +5 -39
  58. package/dist/_dts/{validation-BSxnRhyy.d.ts → validation-Dz6qccue.d.ts} +4 -4
  59. package/dist/client/{BlocksIslandsHydrator-D1n09bu-.mjs → BlocksIslandsHydrator-1XifJg6V.mjs} +17 -18
  60. package/dist/client/{BookingMailingListNote-DSD4gS96.mjs → BookingMailingListNote-BsbEgagJ.mjs} +7 -7
  61. package/dist/client/{BookingQuestionFields-B57oGPcj.mjs → BookingQuestionFields-C8IbeLHj.mjs} +4 -4
  62. package/dist/client/{CalendarNavigationChevron-qXvsFYOg.mjs → CalendarNavigationChevron-Bbqij1XQ.mjs} +42 -9
  63. package/dist/client/{CheckboxChoice-b-PJLEXe.mjs → CheckboxChoice-BZPLCgTU.mjs} +1 -1
  64. package/dist/client/{DemoBookingPortalAccess-Olvrwi3Z.mjs → DemoBookingPortalAccess-uA9H8LIL.mjs} +4 -4
  65. package/dist/client/{EventCalendar.client-DwFNFb-0.mjs → EventCalendar.client-yoSI77ov.mjs} +10 -10
  66. package/dist/client/{EventCombined.client-Ffu-aVOb.mjs → EventCombined.client-HeCNlliq.mjs} +10 -10
  67. package/dist/client/{EventEmbeddedCheckoutStep-B18VbNS_.mjs → EventEmbeddedCheckoutStep-BDnicDM6.mjs} +1 -1
  68. package/dist/client/{EventItem-b8tVkNHA.mjs → EventItem-Duhk1vnF.mjs} +247 -7
  69. package/dist/client/{EventListWeekNavigation-BxnJW_Gf.mjs → EventListWeekNavigation-BiutEqPK.mjs} +1 -1
  70. package/dist/client/{EventListing.client-ViCnrNg4.mjs → EventListing.client-B5ln77jG.mjs} +3 -3
  71. package/dist/client/{EventListing.view-CdjiepMf.mjs → EventListing.view-hUDhNtMv.mjs} +203 -9
  72. package/dist/client/{EventRegistrationPayment-BVd70XkH.mjs → EventRegistrationPayment-DqtX1vB2.mjs} +189 -111
  73. package/dist/client/{Page-DqETUt-U.mjs → Page-ChJ2TGVk.mjs} +24314 -20226
  74. package/dist/client/{ProtectedSubmitButton-C-ql101B.mjs → ProtectedSubmitButton-De6AzhE6.mjs} +1 -1
  75. package/dist/client/{SiteTermsAgreementField-DkFnbzf_.mjs → SiteTermsAgreementField-CDBU31xW.mjs} +3 -3
  76. package/dist/client/{StepIndicator-JO2PS03n.mjs → StepIndicator-2Dl9zon2.mjs} +6 -6
  77. package/dist/client/{BookingPanelArrangement--EkA1ZQd.mjs → StepIndicator-JQA-VuEH.mjs} +12 -12
  78. package/dist/client/{TabBarFragment-BqfRLojo.mjs → TabBarFragment-DlKQRhP4.mjs} +1 -1
  79. package/dist/client/{ThemedButton-DuaYtnvG.mjs → ThemedButton-CnSa7o-I.mjs} +66 -66
  80. package/dist/client/{accessibleSurfaces-DN8it_Cx.mjs → accessibleSurfaces-Wl8-_OVJ.mjs} +1 -1
  81. package/dist/client/{accordion-XgNxl0Wg.mjs → accordion-B6SqU49k.mjs} +1 -1
  82. package/dist/client/{booking-form.client-ljJoDwuI.mjs → booking-form.client-DrEOjQ3N.mjs} +15 -15
  83. package/dist/client/{bookingForm-DtEHwY4W.mjs → bookingForm-drZBwEZW.mjs} +4 -4
  84. package/dist/client/bookings.mjs +5 -5
  85. package/dist/client/{boxStyleClassNames-BHoMAcun.mjs → boxStyleClassNames-DEh45w16.mjs} +19 -19
  86. package/dist/client/{carousel-B3UhbFu7.mjs → carousel-C-YJliD-.mjs} +2 -2
  87. package/dist/client/{carousel.client-h65clfUO.mjs → carousel.client-DMtGYTTM.mjs} +1 -1
  88. package/dist/client/{cart-DzOJfYOR.mjs → cart-acGFWK9R.mjs} +3 -3
  89. package/dist/client/{cart.client-DBG77v-5.mjs → cart.client-BzlOGP2j.mjs} +1 -1
  90. package/dist/client/{checkout-LmePoEgM.mjs → checkout-SEontwhy.mjs} +3 -3
  91. package/dist/client/{checkout.client-DmgZuLBT.mjs → checkout.client-C0Qvh-d4.mjs} +1 -1
  92. package/dist/client/{checkoutUrls-CMZI8o_V.mjs → checkoutUrls-yUKeq1N9.mjs} +1 -1
  93. package/dist/client/client.mjs +414 -319
  94. package/dist/client/{context-CJIz4FdL.mjs → context-DTrwaQtg.mjs} +2 -1
  95. package/dist/client/{dateFormatting-UoXqBh10.mjs → dateFormatting-Cg8E1r9l.mjs} +1 -1
  96. package/dist/client/{demoPortalMagicLink-6CgFZNvu.mjs → demoPortalMagicLink-D0kOJYOX.mjs} +1 -1
  97. package/dist/client/{enhanceHeaderSection-DaMo6len.mjs → enhanceHeaderSection-DyrpZ7ks.mjs} +4 -4
  98. package/dist/client/{event-registration.client-b6APrFQe.mjs → event-registration.client-RLZQWi2V.mjs} +13 -13
  99. package/dist/client/{eventCalendar-DJYz7yZf.mjs → eventCalendar-CphYnImh.mjs} +4 -4
  100. package/dist/client/{eventCombined-j9VCVgMW.mjs → eventCombined-BvqjASB_.mjs} +4 -4
  101. package/dist/client/{eventListing-DWgpGuFM.mjs → eventListing-BaNAoC_M.mjs} +4 -4
  102. package/dist/client/{eventRegistration-DCinRot3.mjs → eventRegistration-COMHoRl6.mjs} +4 -4
  103. package/dist/client/events-9LPvwbWp.mjs +28 -0
  104. package/dist/client/{form-BBBtRwvy.mjs → form-DyH2juYT.mjs} +3 -3
  105. package/dist/client/{form.client-CZeRQLGF.mjs → form.client-DBwzkB0M.mjs} +5 -5
  106. package/dist/client/{form.parts-DhGGv4_L.mjs → form.parts-CY4kX3mh.mjs} +3 -3
  107. package/dist/client/{formatDate-DVFVDcDW.mjs → formatDate-CTEN7gxW.mjs} +1 -1
  108. package/dist/client/gifting/client.mjs +6 -6
  109. package/dist/client/{gifting-Di9-SpwW.mjs → gifting-CIx4V378.mjs} +4 -4
  110. package/dist/client/{gifting.client-CjT5PrAZ.mjs → gifting.client-BEVPpzJM.mjs} +5 -5
  111. package/dist/client/{gifting.parts-ffP6mjMd.mjs → gifting.parts-VnORjnZK.mjs} +2 -2
  112. package/dist/client/{headerSection-jjAvtSZk.mjs → headerSection-DGcJfRS8.mjs} +2 -2
  113. package/dist/client/{lookSurfaces-C2VzJfyG.mjs → lookSurfaces-IqT_SVnX.mjs} +167 -85
  114. package/dist/client/{newsletter-form.client-D45frHoa.mjs → newsletter-form.client-BvEDkjiD.mjs} +6 -6
  115. package/dist/client/{shop.interactive-D7wky1GL.mjs → newsletter-form.interactive-DCO1lErD.mjs} +3975 -3975
  116. package/dist/client/{newsletter-form.parts-CHdg82ct.mjs → newsletter-form.parts-BIy4IUT3.mjs} +2 -2
  117. package/dist/client/{newsletterForm-tS465_vl.mjs → newsletterForm-CoTXDNFS.mjs} +3 -3
  118. package/dist/client/portal/client.mjs +9 -9
  119. package/dist/client/{product-detail.client-DIWSeW7P.mjs → product-detail.client-YHQ2aKX1.mjs} +1 -1
  120. package/dist/client/{product-list.client-BRf14h_e.mjs → product-list.client-DxoZw1vF.mjs} +1 -1
  121. package/dist/client/{productDetail-gxF5whea.mjs → productDetail-DjuFvkey.mjs} +3 -3
  122. package/dist/client/{productList-B9t0XJrN.mjs → productList-DE9GEFoZ.mjs} +3 -3
  123. package/dist/client/{propsDecoder-Db8wAmgr.mjs → propsDecoder-Cyag_HOs.mjs} +2 -48
  124. package/dist/client/{registry.server-Bn0gE0uP.mjs → registry.server-BPwV-0Pp.mjs} +10420 -9108
  125. package/dist/client/rendering/client.mjs +41 -27
  126. package/dist/client/rendering/islands.mjs +1 -1
  127. package/dist/client/rendering.mjs +23 -2836
  128. package/dist/client/{richText-coerce-COnKrLO7.mjs → richText-coerce-NrRqDeOg.mjs} +1 -1
  129. package/dist/client/{routeIslandApiConfig-Bok1Oy50.mjs → routeIslandApiConfig-BWq5gKFK.mjs} +1 -1
  130. package/dist/client/runtimeResponse-D2j2-mOk.mjs +3 -0
  131. package/dist/client/{runtimeResponse-9v8q2NBc.mjs → runtimeResponse-DtWSfWSZ.mjs} +1 -1
  132. package/dist/client/{shop-D1oTPDxm.mjs → shop-C3wM0Hr4.mjs} +3 -3
  133. package/dist/client/{shop-commerce-DyMZLC0a.mjs → shop-commerce-34YvcpbX.mjs} +14 -14
  134. package/dist/client/{shop-commerce-store-FODNS63D.mjs → shop-commerce-store-B7xHksOs.mjs} +1 -1
  135. package/dist/client/{shop-discount-apply.state-C4xcmFzZ.mjs → shop-discount-apply.state-BiBnozfO.mjs} +2 -2
  136. package/dist/client/{shop.client-CRgRulfI.mjs → shop.client-C0v88nLd.mjs} +14 -14
  137. package/dist/client/{shopShared-Bd_hy9ZO.mjs → shopShared-Ct-BRNez.mjs} +2 -2
  138. package/dist/client/spam-protection.mjs +1 -1
  139. package/dist/client/{noop-D11X-B6n.mjs → src-CCtanNlD.mjs} +317 -342
  140. package/dist/client/{timetableModel-UlWfP1gh.mjs → timetableModel-lhE29TNT.mjs} +65 -11
  141. package/dist/client/{types-DjWUR_O6.mjs → types-BEaKfam_.mjs} +65 -65
  142. package/dist/client/{useAvailableSlots-D-qoooLy.mjs → useAvailableSlots-BelJviOT.mjs} +2 -2
  143. package/dist/client/useDiscountCodeUi-rQRE1-Ho.mjs +196 -0
  144. package/dist/client/{useEventPagination-CQH2e9sQ.mjs → useEventPagination-C4rS2Xxl.mjs} +8 -8
  145. package/dist/client/{view-bGU1ws-m.mjs → view-LJVHVqsy.mjs} +4 -4
  146. package/dist/client/{display-D1oVR5Eh.mjs → wizardSteps-CNDsxeJH.mjs} +8935 -8913
  147. package/dist/preview-next/before-render.mjs +4 -3
  148. package/dist/preview-next/client/{PageSectionToolbar-D-Le7O3o.mjs → PageSectionToolbar-C4TtBPN-.mjs} +3 -3
  149. package/dist/preview-next/client/{PreviewEditorSidebar-DNy5j_ce.mjs → PreviewEditorSidebar-D6fkE59-.mjs} +5 -5
  150. package/dist/preview-next/client/{PreviewEditorUI-CzJvgbqt.mjs → PreviewEditorUI-amcDlj0O.mjs} +4 -4
  151. package/dist/preview-next/client/{PreviewShell-xhJ6ca1i.mjs → PreviewShell-DeQjx4zk.mjs} +5 -5
  152. package/dist/preview-next/client/{SdkPreviewModeRuntime-BmYO1TdT.mjs → SdkPreviewModeRuntime-Cx0SXnoX.mjs} +5 -5
  153. package/dist/preview-next/client/{previewAssistantSlot-BN93X9o1.mjs → previewAssistantSlot-aqpU34WI.mjs} +627 -498
  154. package/dist/preview-next/client/{previewChromeRoot-C51RQseo.mjs → previewChromeRoot-D3Gy_Rs0.mjs} +1 -1
  155. package/dist/preview-next/client/runtime.mjs +3 -3
  156. package/dist/preview-next/client/{sdk-runtime-oeGquJM-.mjs → sdk-runtime-Dzx_RrN7.mjs} +2 -2
  157. package/dist/preview-next/client/{siteStyleAccess-BGTAcPud.mjs → siteStyleAccess-LHedw83e.mjs} +1 -1
  158. package/dist/preview-next/client/{useAutosaveStatus-BMGXjGZq.mjs → useAutosaveStatus-DpSd9aVk.mjs} +1 -1
  159. package/dist/preview-next/client/{useOpenBlockForSetup-CTDoR_gQ.mjs → useOpenBlockForSetup-BGZn5AT1.mjs} +1 -1
  160. package/dist/preview-next/keepAlive.mjs +1 -1
  161. package/dist/preview-next/middleware.mjs +1 -1
  162. package/dist/preview-next/{route-contract-BtdzkSUg.mjs → route-contract-DnL-FgSV.mjs} +28 -10
  163. package/dist/server/{Block.shared-Bp3OlOjj.mjs → Block.shared-BEbq6EwO.mjs} +4 -4
  164. package/dist/server/{bindings-DrbJuftt.mjs → bindings-Bly0dRs7.mjs} +36 -5
  165. package/dist/server/{client-Bf06n9oj.mjs → client-CGJ2ztYp.mjs} +1449 -1600
  166. package/dist/server/config-validation.mjs +1 -1
  167. package/dist/server/config.mjs +2 -2
  168. package/dist/server/contentTypeResolver-B9vy8BrF.mjs +19 -0
  169. package/dist/server/data/dataLoaderContext.mjs +1 -1
  170. package/dist/server/data/resolveBlockData.mjs +1 -1
  171. package/dist/server/{dataLoaderContext-B3fXA54R.mjs → dataLoaderContext-lMRTfG5Z.mjs} +1 -0
  172. package/dist/server/error-f4g44bKx.mjs +387 -0
  173. package/dist/server/index.mjs +3 -2
  174. package/dist/server/loadContent-BkK1w3QQ.mjs +692 -0
  175. package/dist/server/{loadPage-5iZefzDd.mjs → loadPage-DTLe0FEs.mjs} +22 -4
  176. package/dist/server/next.mjs +54 -94
  177. package/dist/server/{overrideResolution-CUHtm7tW.mjs → overrideResolution-Uy9Zp2Ks.mjs} +1 -1
  178. package/dist/server/page-converter.mjs +1 -1
  179. package/dist/server/{pageRenderPlan-GmPXForc.mjs → pageRenderPlan-JzxBnqfV.mjs} +7 -2
  180. package/dist/server/{pageRuntimeSupport-Dd8LFzfa.mjs → pageRuntimeSupport-DyNSd2Yj.mjs} +50 -2
  181. package/dist/server/{pageShared-tz-GVWft.mjs → pageShared-DU4ETFPS.mjs} +8 -50
  182. package/dist/server/{prebuild-JmsuYCIH.mjs → prebuild-8jNtDXmS.mjs} +5 -4
  183. package/dist/server/prebuild.mjs +1 -1
  184. package/dist/server/{prefetchBlockData-Ce9DDwON.mjs → prefetchBlockData-xeMG42aw.mjs} +3 -2
  185. package/dist/server/{registry-D12XF_h1.mjs → registry-DH1VrsCl.mjs} +122 -19
  186. package/dist/server/rendering/components/pageShared.mjs +1 -1
  187. package/dist/server/rendering/helpers/loadPage.mjs +1 -1
  188. package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
  189. package/dist/server/rendering/server.mjs +5 -4
  190. package/dist/server/rendering.mjs +9 -8
  191. package/dist/server/{resolveBlockData-D9yZIN3V.mjs → resolveBlockData-BN8tweTx.mjs} +24 -5
  192. package/dist/server/resolvePageContent-DnM16_f9.mjs +89 -0
  193. package/dist/server/routing.mjs +271 -57
  194. package/dist/server/server.mjs +3 -3
  195. package/dist/server/{loadContent-eaTY7RPg.mjs → servicePageContent-B-FezJmH.mjs} +709 -453
  196. package/dist/server/{validation-CLq5cw6M.mjs → validation-3jOzYdPL.mjs} +3 -3
  197. package/dist/server/{version-oPbhAx8E.mjs → version-8t0o6_jd.mjs} +1 -1
  198. package/package.json +1 -1
  199. package/dist/_dts/footerPageOutline-D_XbQW_o.d.ts +0 -256
  200. package/dist/_dts/resolvePageContent-YT6ndha1.d.ts +0 -162
  201. package/dist/client/LocationMapActions-CiMtl1Ha.mjs +0 -62
  202. package/dist/client/MapDrawingSvg-BCZa3dpf.mjs +0 -200
  203. package/dist/client/course-DBEU9IA9.mjs +0 -244
  204. package/dist/client/duration-Q6_QNgiv.mjs +0 -37
  205. package/dist/client/event-details.client-BwASwKIq.mjs +0 -53
  206. package/dist/client/eventDetails-BzGOVDI-.mjs +0 -13
  207. package/dist/client/runtimeResponse-CVkM0dHy.mjs +0 -3
  208. package/dist/client/useDiscountCodeUi-B9DODAkj.mjs +0 -237
  209. package/dist/client/view-DNX59QwM.mjs +0 -1372
  210. package/dist/server/resolvePageContent-CAELMBEJ.mjs +0 -438
@@ -1,20 +1,46 @@
1
1
  "use client";
2
- import { $ as resolveEventRegistrationSubmitPlan, $n as getTicketSelectionRemainingPlaces, $t as incompleteRunChoiceMessage, An as selectionPreviewLines, At as toRegistrationEvents, B as getTicketSelectionPurpose, Bo as eventRegistrationErrors, Bt as decideSelectionRequirementsLayout, Cn as combinationHintCopy, Ct as registrationQuestionsMessage, D as registrationRoute, Dn as selectionCombinationHint, Dr as closedDateCopy, E as registrationPresentation, En as combinationWorking, Eo as groupPublicEventsByRun, Er as closedRunCopy, Et as toWaitlistClaimResolveFailure, F as registrationFlowReducer, Ft as eventSignInEnds, G as resolveRegistrationAdmission, Gt as toRunRequirementsSnapshots, H as planRegistrationDetailsCheck, Hn as getPortalSubjectEmail, Ht as nextRunToRead, I as buildEventRegistrationPaymentOptionsViewModel, It as eventSignInRestoration, Ja as requestSignIn, Jn as getCurrentTicketSelection, Ka as leavePage, Kn as transformRegistrationOptionsResponse, Ko as orderedLiveRunSessions, Kt as withoutKeptAnswers, L as decideEventRegistrationPayment, Lt as toEventSignInDraft, M as decideEventChoice, Mt as toWholeSeriesRegistrationEvents, N as getDeclinedPass, Nt as EVENT_SIGN_IN_FORM_ID, P as isRegistrationLocked, Pn as findSelectedTicketType, Pt as eventSignInDraftStore, Qn as getSlidingScaleSelectionMessage, Qt as effectiveSelection, Ro as decideSelectionAttendance, Rt as buildSelectionRequirementsSubmission, Sn as toggleSelectionItem, St as invitationSubmission, T as registrationPaymentRoute, Tn as combinationOffersOf, Tr as closedDatesCopy, Tt as isSameWaitlistClaim, U as planRegistrationDetailsContinuation, Ut as runFieldErrors, Vn as getImplicitSingleTicketType, Vo as parseEventRegistrationErrorReason, Vt as deriveRunRequirements, W as resolveGuestNextStepCheck, Wa as PAGE_NAVIGATION, Wn as getVisibleTicketTypes, Wt as runsKeepingAnswers, Xn as getRegistrationOccurrenceId, Xo as resolveBookingSignupOffer, Xt as canToggleSelectionItem, Y as visitorHoldsOwnPlace, Yn as getEligibilityFlowFlags, Zn as getSlidingScaleForEvent, Zt as decideSelectionPayment, _n as selectionTicketInputs, _t as resolveRegistrationTarget, aa as deriveBookingQuestions, ar as getSingleSelectedPricingOptionId, bn as severalRunsChoiceMessage, bt as beginWaitlistInvitation, c as formatCommercePrice, dn as selectionIncludes, dt as restorableBrowserDraftCode, en as planSelectionPrice, er as parseCurrencyInputToCents, fn as selectionItemPrice, ft as withOfferedEvent, gt as resolveEventRequiresPayment, ht as resolveDiscountContext, it as calculateEventRegistrationPreviewTotal, j as createInitialRegistrationFlowState, jn as serverPricedTotalCents, kn as selectionPreviewKey, kt as getRegistrationStartAt, la as toBookingQuestionsPaymentSnapshot, lr as hasValidPricingOptionSelection, ls as publicEventPricingCurrency, lt as registrationBrowserDraft, mt as findPreSelectedEvent, nn as registrationSelectionMode, no as resolveEventRegistrationScopedEvents, nr as shouldLoadRegistrationOptions, oa as needsBookingQuestionsRefresh, pt as buildRegistrationSelectionRequest, q as resolveRegistrationTicketContinuation, qi as formatCentsAsCurrencyInput, qo as resolveWholeSeriesBookingPhase, qt as paymentReturnRestoration, rr as withRegistrationAvailability, t as appliedDiscountHint, tn as primarySelectionItem, to as resolveEventRegistrationChoices, tr as resolveHeldTicketPlaces, ur as normalizeTicketSelectionLines, ut as registrationBrowserDraftSchema, vt as resolveRouteRequiresPayment, wt as validateFormData, xn as summariseSelectionPayment, xt as createRegistrationDraftData, yn as severalItemsOf, yt as toRegistrationRequestSubject, zo as eventRegistrationErrorEndsCommand, zt as checkRunRequirements } from "./display-D1oVR5Eh.mjs";
3
- import { gn as resolveBookingBusinessTimeZone, n as assertNever, rn as inferSiteDateLocale } from "./noop-D11X-B6n.mjs";
2
+ import { f as err, p as ok } from "./renderableMediaAssetAdmission-BlfqYLJW.mjs";
3
+ import { $ as beginWaitlistInvitation, $t as severalRunsChoiceMessage, An as getSlidingScaleForEvent, Ar as resolveEventRegistrationScopedEvents, At as decideSelectionPayment, Bo as eventRegistrationErrorEndsCommand, C as resolveGuestNextStepCheck, Cn as getVisibleTicketTypes, Ct as runsKeepingAnswers, Dn as getCurrentTicketSelection, E as resolveRegistrationTicketContinuation, Er as closedDateCopy, Et as paymentReturnRestoration, Fn as shouldLoadRegistrationOptions, Ft as registrationSelectionMode, G as withOfferedEvent, Gt as selectionItemPrice, H as registrationBrowserDraft, Hn as hasValidPricingOptionSelection, Ho as parseEventRegistrationErrorReason, Hr as groupPublicEventsByRun, In as withRegistrationAvailability, J as resolveDiscountContext, Jo as resolveWholeSeriesBookingPhase, K as buildRegistrationSelectionRequest, L as calculateEventRegistrationPreviewTotal, M as resolveEventRegistrationSubmitPlan, Mn as getTicketSelectionRemainingPlaces, Mt as incompleteRunChoiceMessage, Nn as parseCurrencyInputToCents, Nt as planSelectionPrice, O as visitorHoldsOwnPlace, Oi as toBookingQuestionsPaymentSnapshot, On as getEligibilityFlowFlags, Pn as resolveHeldTicketPlaces, Pt as primarySelectionItem, Q as toRegistrationRequestSubject, Qt as severalItemsOf, Rn as getSingleSelectedPricingOptionId, S as planRegistrationDetailsContinuation, St as runFieldErrors, Ti as needsBookingQuestionsRefresh, Tn as transformRegistrationOptionsResponse, Tr as closedRunCopy, Tt as withoutKeptAnswers, U as registrationBrowserDraftSchema, Un as normalizeTicketSelectionLines, Vo as eventRegistrationErrors, W as restorableBrowserDraftCode, Wt as selectionIncludes, X as resolveRegistrationTarget, Xt as selectionTicketInputs, Y as resolveEventRequiresPayment, Z as resolveRouteRequiresPayment, Zo as resolveBookingSignupOffer, _t as buildSelectionRequirementsSubmission, a as registrationPresentation, an as combinationWorking, at as toWaitlistClaimResolveFailure, bn as getImplicitSingleTicketType, bt as deriveRunRequirements, cn as selectionPreviewKey, ct as getRegistrationStartAt, d as decideEventChoice, da as PAGE_NAVIGATION, dt as toWholeSeriesRegistrationEvents, en as summariseSelectionPayment, et as createRegistrationDraftData, f as getDeclinedPass, fi as formatCentsAsCurrencyInput, ft as EVENT_SIGN_IN_FORM_ID, g as decideEventRegistrationPayment, gt as toEventSignInDraft, h as buildEventRegistrationPaymentOptionsViewModel, ha as requestSignIn, ht as eventSignInRestoration, i as registrationPaymentRoute, in as combinationOffersOf, it as isSameWaitlistClaim, jn as getSlidingScaleSelectionMessage, jt as effectiveSelection, kn as getRegistrationOccurrenceId, kr as resolveEventRegistrationChoices, kt as canToggleSelectionItem, ln as selectionPreviewLines, lt as toRegistrationEvents, m as registrationFlowReducer, mt as eventSignInEnds, nn as combinationHintCopy, nt as registrationQuestionsMessage, o as registrationRoute, on as selectionCombinationHint, p as isRegistrationLocked, pa as leavePage, pn as findSelectedTicketType, pt as eventSignInDraftStore, q as findPreSelectedEvent, qo as orderedLiveRunSessions, rr as appliedDiscountHint, rt as validateFormData, tn as toggleSelectionItem, tt as invitationSubmission, u as createInitialRegistrationFlowState, un as serverPricedTotalCents, ur as formatCommercePrice, us as publicEventPricingCurrency, vt as checkRunRequirements, w as resolveRegistrationAdmission, wi as deriveBookingQuestions, wr as closedDatesCopy, wt as toRunRequirementsSnapshots, x as planRegistrationDetailsCheck, xn as getPortalSubjectEmail, xt as nextRunToRead, y as getTicketSelectionPurpose, yt as decideSelectionRequirementsLayout, zo as decideSelectionAttendance } from "./wizardSteps-CNDsxeJH.mjs";
4
+ import { mn as resolveBookingBusinessTimeZone, t as assertNever, tn as inferSiteDateLocale } from "./src-CCtanNlD.mjs";
4
5
  import { o as checkBookingQuestionsAnswered } from "./creditProducts-BQ1t1erI.mjs";
5
- import { a as eventSiteTermsSurface, i as useSiteTermsAgreement, r as siteTermsFailureKind } from "./SiteTermsAgreementField-DkFnbzf_.mjs";
6
+ import { a as eventSiteTermsSurface, i as useSiteTermsAgreement, r as siteTermsFailureKind } from "./SiteTermsAgreementField-CDBU31xW.mjs";
6
7
  import { t as generateUuidV4 } from "./uuid-BETKW8rS.mjs";
7
- import { i as BlockApiError, n as useBlockApi } from "./context-CJIz4FdL.mjs";
8
+ import { i as BlockApiError, n as useBlockApi } from "./context-DTrwaQtg.mjs";
8
9
  import { t as resolveDedicatedBookingHref } from "./bookingRoute-D6DlxYx6.mjs";
9
- import { r as DISCOUNT_APPLY_MESSAGES } from "./DemoBookingPortalAccess-Olvrwi3Z.mjs";
10
- import { i as useBookingNowIso, r as parseBookingSubmissionFailure } from "./BookingQuestionFields-B57oGPcj.mjs";
11
- import { t as useDiscountCodeUi } from "./useDiscountCodeUi-B9DODAkj.mjs";
12
- import { a as usePolling, c as useBookingQuestionsRefresh, o as portalSessionIdentity, s as useSignInReturn } from "./BookingMailingListNote-DSD4gS96.mjs";
13
10
  import { n as EVENT_REGISTRATION_CHECKOUT_ATTEMPT_PARAM, t as EVENT_REGISTRATION_ANCHOR_ID } from "./constants-4o4_hl34.mjs";
14
- import { s as storeDemoBookingPass, t as CUSTOMER_PORTAL_PATH } from "./demoPortalMagicLink-6CgFZNvu.mjs";
11
+ import { r as DISCOUNT_APPLY_MESSAGES } from "./DemoBookingPortalAccess-uA9H8LIL.mjs";
12
+ import { i as useBookingNowIso, r as parseBookingSubmissionFailure } from "./BookingQuestionFields-C8IbeLHj.mjs";
13
+ import { t as useDiscountCodeUi } from "./useDiscountCodeUi-rQRE1-Ho.mjs";
14
+ import { a as usePolling, c as useBookingQuestionsRefresh, o as portalSessionIdentity, s as useSignInReturn } from "./BookingMailingListNote-BsbEgagJ.mjs";
15
+ import { s as storeDemoBookingPass, t as CUSTOMER_PORTAL_PATH } from "./demoPortalMagicLink-D0kOJYOX.mjs";
15
16
  import { Suspense, lazy, useCallback, useEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore } from "react";
16
17
  import { jsx } from "react/jsx-runtime";
17
18
  import { z } from "zod";
19
+ //#region ../core/src/participants.ts
20
+ function unsafeAsParticipantEmail(value) {
21
+ return value;
22
+ }
23
+ /**
24
+ * Canonicalizes an optional participant email for equality checks.
25
+ *
26
+ * This intentionally does not validate email shape; call parseParticipantEmail at
27
+ * API/DB boundaries that require a syntactically usable address.
28
+ */
29
+ function normalizeParticipantEmail(value) {
30
+ const normalized = value?.trim().normalize("NFC").toLowerCase() ?? "";
31
+ return normalized.length > 0 ? unsafeAsParticipantEmail(normalized) : null;
32
+ }
33
+ function parseParticipantEmail(value) {
34
+ const normalized = normalizeParticipantEmail(value);
35
+ if (normalized === null) return err({ kind: "empty_email" });
36
+ if (!isEmailLike(normalized)) return err({ kind: "invalid_email_shape" });
37
+ return ok(normalized);
38
+ }
39
+ function isEmailLike(value) {
40
+ const atIndex = value.indexOf("@");
41
+ return atIndex > 0 && atIndex === value.lastIndexOf("@") && atIndex < value.length - 1;
42
+ }
43
+ //#endregion
18
44
  //#region ../blocks/src/system/runtime/shared/utils/portalLogout.ts
19
45
  /**
20
46
  * Portal Logout Utility
@@ -258,7 +284,7 @@ const NO_REDUCTION = {
258
284
  function decideSingleBookingPrices(input) {
259
285
  const { context, quote } = input;
260
286
  if (input.several || !context) return NO_REDUCTION;
261
- if (context.type === "event") return eventPrices(input, quote);
287
+ if (context.type === "event" || context.type === "whole_series") return eventPrices(input, quote);
262
288
  if (!quote) return NO_REDUCTION;
263
289
  if (context.type === "pass") return {
264
290
  ...NO_REDUCTION,
@@ -274,12 +300,16 @@ function eventPrices(input, quote) {
274
300
  ...NO_REDUCTION,
275
301
  automaticDiscount: input.advertisedAutomatic
276
302
  };
277
- if (quote.preview.type !== "applied") return NO_REDUCTION;
303
+ if (quote.preview.type !== "applied") return {
304
+ ...NO_REDUCTION,
305
+ bookingTotalCents: quote.preview.totalAfterDiscountCents
306
+ };
278
307
  return quote.source === "typed" ? {
279
308
  ...NO_REDUCTION,
280
309
  bookingTotalCents: quote.preview.totalAfterDiscountCents
281
310
  } : {
282
311
  ...NO_REDUCTION,
312
+ bookingTotalCents: quote.preview.totalAfterDiscountCents + quote.preview.discountCents,
283
313
  automaticDiscount: automaticFromQuote(quote.preview, input.advertisedAutomatic)
284
314
  };
285
315
  }
@@ -1196,7 +1226,13 @@ function useEligibility(params) {
1196
1226
  function eligibilityRequest(params) {
1197
1227
  const selections = normalizeTicketSelectionLines(params.ticketSelections);
1198
1228
  if (!params.enabled || !params.subject || selections.length === 0) return null;
1229
+ const email = parseParticipantEmail(params.buyerEmail);
1199
1230
  return {
1231
+ buyer: email.ok ? {
1232
+ kind: "email",
1233
+ email: email.value
1234
+ } : { kind: "unknown" },
1235
+ purchaseTarget: params.purchaseTarget ?? "eventTickets",
1200
1236
  subject: toRegistrationRequestSubject(params.subject, params.attendanceMode),
1201
1237
  selections: selections.map(({ pricingOptionId, quantity }) => ({
1202
1238
  pricingOptionId,
@@ -1235,11 +1271,24 @@ async function loadEligibility(input) {
1235
1271
  function useEligibilityWithDeps(params, deps) {
1236
1272
  const api = deps.useBlockApi();
1237
1273
  const request = eligibilityRequest(params);
1274
+ const scope = useRef({
1275
+ api,
1276
+ version: 0
1277
+ });
1278
+ if (scope.current.api !== api) scope.current = {
1279
+ api,
1280
+ version: scope.current.version + 1
1281
+ };
1238
1282
  const requestKey = JSON.stringify({
1283
+ scope: scope.current.version,
1284
+ subjectEmail: params.subjectEmail,
1285
+ purchaseKey: params.purchaseKey,
1239
1286
  refreshKey: params.refreshKey ?? 0,
1240
1287
  request
1241
1288
  });
1242
1289
  const [state, dispatch] = useReducer(eligibilityLookupReducer, initialEligibilityLookupState);
1290
+ const activeKey = useRef(requestKey);
1291
+ activeKey.current = requestKey;
1243
1292
  useEffect(() => {
1244
1293
  const lifetime = { current: true };
1245
1294
  const timeoutId = window.setTimeout(() => {
@@ -1249,7 +1298,7 @@ function useEligibilityWithDeps(params, deps) {
1249
1298
  request,
1250
1299
  requestKey,
1251
1300
  dispatch,
1252
- isCurrent: () => lifetime.current
1301
+ isCurrent: () => lifetime.current && activeKey.current === requestKey
1253
1302
  });
1254
1303
  }, REGISTRATION_OPTIONS_DEBOUNCE_MS);
1255
1304
  return () => {
@@ -1870,8 +1919,12 @@ function quoteFeedback(state) {
1870
1919
  } : null;
1871
1920
  }
1872
1921
  /** A quote belongs to the complete priced input and the customer, never just the draft code. */
1873
- function selectionQuoteKey(lines, email) {
1874
- return lines ? JSON.stringify([selectionPreviewKey(null, lines), email.trim().toLowerCase()]) : null;
1922
+ function selectionQuoteKey(lines, email, scope) {
1923
+ return lines ? JSON.stringify([
1924
+ selectionPreviewKey(null, lines),
1925
+ email.trim().toLowerCase(),
1926
+ ...scope ? [scope] : []
1927
+ ]) : null;
1875
1928
  }
1876
1929
  function currentSelectionQuote(state, key) {
1877
1930
  return state.key === key ? state : emptyQuoteDraft(key, state.draftCode);
@@ -1913,12 +1966,9 @@ function decideSelectionQuoteResponse(pending, result) {
1913
1966
  * or before going to Stripe and coming back), which they've already applied
1914
1967
  * as far as they know. A code typed here waits for Apply.
1915
1968
  */
1916
- function automaticSelectionQuoteWanted(state, input, carried = false) {
1917
- return input.automaticWanted && state.status === "draft" && (carried || uncodedQuoteWanted(input) && !state.draftCode.trim());
1918
- }
1919
- /** Several items have no total until the server prices them; one booking has a price already. */
1920
- function uncodedQuoteWanted(input) {
1921
- return input.several !== null || input.automaticOffered;
1969
+ function explicitSelectionQuoteWanted(state, input, carried = false) {
1970
+ if (input.several === null && input.combinedPending) return false;
1971
+ return input.automaticWanted && state.status === "draft" && (carried || (input.several !== null || input.productAutomaticOffered) && !state.draftCode.trim());
1922
1972
  }
1923
1973
  /** Nothing to price: no code or automatic discount can change a free selection. */
1924
1974
  function freeSelection(input) {
@@ -1937,11 +1987,14 @@ function pricedPreview(state) {
1937
1987
  if (state.status === "priced") return state.preview;
1938
1988
  return state.status === "refused" ? state.uncoded ?? null : null;
1939
1989
  }
1990
+ function selectionPriceSettled(input, state) {
1991
+ return !(input.several === null && state.key !== null && Boolean(state.draftCode.trim()) && state.status !== "priced") && (pricedPreview(state) !== null || freeSelection(input) || singleBookingNeedsNoAnswer(input, state));
1992
+ }
1940
1993
  /** The only projection that can expose a selection's payable total and submitted code. */
1941
1994
  function decidedSelectionPricing(input, state, apply) {
1942
1995
  const priced = state.status === "priced" ? state : null;
1943
1996
  const fallback = priced === null ? pricedPreview(state) : null;
1944
- const settled = priced !== null || fallback !== null || freeSelection(input) || singleBookingNeedsNoAnswer(input, state);
1997
+ const settled = selectionPriceSettled(input, state);
1945
1998
  const waiting = quoteWaiting(input, state, settled);
1946
1999
  return {
1947
2000
  state,
@@ -1968,11 +2021,11 @@ function decidedSelectionPricing(input, state, apply) {
1968
2021
  * price anyway, so a preview that failed never stops a booking. A typed code always waits.
1969
2022
  */
1970
2023
  function singleBookingNeedsNoAnswer(input, state) {
1971
- if (input.several !== null) return false;
2024
+ if (input.several !== null || input.combinedPending) return false;
1972
2025
  if (state.key === null) return true;
1973
2026
  if (state.draftCode.trim()) return false;
1974
2027
  if (state.status === "failed") return true;
1975
- return state.status === "draft" && !(uncodedQuoteWanted(input) && input.automaticWanted);
2028
+ return state.status === "draft" && !((input.several !== null || input.productAutomaticOffered) && input.automaticWanted);
1976
2029
  }
1977
2030
  /** What the payment step is waiting for. Checking a typed code on one booking leaves its choices on screen, with Pay held. */
1978
2031
  function quoteWaiting(input, state, settled) {
@@ -2008,6 +2061,31 @@ function codeFieldFor(state, apply, settled) {
2008
2061
  hint: state.status === "priced" && state.preview.totalAfterDiscountCents === 0 ? "There's nothing to pay. You won't need to enter card details." : ""
2009
2062
  };
2010
2063
  }
2064
+ /** A combined response may settle only an uncoded draft. Explicit code requests own their result. */
2065
+ function seedRegistrationQuote(state, preview) {
2066
+ if (state.status !== "draft" || state.draftCode.trim() || !preview) return state;
2067
+ if (preview.kind === "incomplete_selection") return state;
2068
+ if (preview.kind === "lookup_failure") return {
2069
+ ...state,
2070
+ status: "failed"
2071
+ };
2072
+ const [first, ...rest] = preview.price.priceReductions;
2073
+ const fields = {
2074
+ subtotalCents: preview.price.subtotalCents,
2075
+ totalAfterDiscountCents: preview.price.totalCents,
2076
+ currency: preview.price.currency,
2077
+ manualCodeEntryAllowed: preview.manualCodeEntryAllowed,
2078
+ ...first ? { priceReductions: [first, ...rest] } : {}
2079
+ };
2080
+ return decideSelectionQuoteResponse(state, preview.automaticCode ? {
2081
+ type: "applied",
2082
+ ...fields,
2083
+ ...preview.automaticCode
2084
+ } : {
2085
+ type: "priced",
2086
+ ...fields
2087
+ });
2088
+ }
2011
2089
  //#endregion
2012
2090
  //#region ../blocks/src/system/runtime/nodes/event-registration/useSelectionCombinationPricing.ts
2013
2091
  const NOTHING = {
@@ -2066,10 +2144,13 @@ async function requestSelectionQuote(input) {
2066
2144
  */
2067
2145
  function useSelectionCombinationPricing(input) {
2068
2146
  const lines = input.several !== null ? selectionPreviewLines(input) : input.singleLines.length > 0 ? input.singleLines : null;
2069
- const key = selectionQuoteKey(lines, input.email);
2147
+ const key = selectionQuoteKey(lines, input.email, input.registrationRequestKey);
2070
2148
  const [state, setState] = useState(() => emptyQuoteDraft(key));
2071
2149
  const [carried, setCarried] = useState(false);
2072
- const current = currentSelectionQuote(state, key);
2150
+ const registrationPreview = input.several === null ? input.registrationPreview : null;
2151
+ const current = seedRegistrationQuote(currentSelectionQuote(state, key), registrationPreview);
2152
+ const activeKey = useRef(key);
2153
+ activeKey.current = key;
2073
2154
  const apply = async () => {
2074
2155
  if (key === null || lines === null) return;
2075
2156
  if (current.draftCode.trim() && !input.email.trim()) {
@@ -2092,26 +2173,27 @@ function useSelectionCombinationPricing(input) {
2092
2173
  lines,
2093
2174
  pending
2094
2175
  });
2095
- setState((previous) => previous === pending ? next : previous);
2176
+ setState((previous) => activeKey.current === key && previous === pending ? next : previous);
2096
2177
  };
2097
2178
  useEffect(() => {
2098
- if (automaticSelectionQuoteWanted(current, input, carried)) apply();
2179
+ if (explicitSelectionQuoteWanted(current, input, carried)) apply();
2099
2180
  }, [
2100
2181
  key,
2101
2182
  input.automaticWanted,
2102
- input.automaticOffered,
2183
+ input.productAutomaticOffered,
2184
+ input.combinedPending,
2103
2185
  current.status,
2104
2186
  current.draftCode,
2105
2187
  carried
2106
2188
  ]);
2107
2189
  const editCode = (draftCode) => {
2108
2190
  setCarried(false);
2109
- setState((previous) => editedSelectionCode(previous, key, draftCode));
2191
+ setState((previous) => editedSelectionCode(seedRegistrationQuote(currentSelectionQuote(previous, key), registrationPreview), key, draftCode));
2110
2192
  };
2111
2193
  /** A code typed in one item's box, or restored after Stripe: priced as soon as payment wants a price. */
2112
2194
  const carryCode = (draftCode) => {
2113
2195
  setCarried(Boolean(draftCode.trim()));
2114
- setState((previous) => editedSelectionCode(previous, key, draftCode));
2196
+ setState((previous) => editedSelectionCode(seedRegistrationQuote(currentSelectionQuote(previous, key), registrationPreview), key, draftCode));
2115
2197
  };
2116
2198
  /** A new booking starts with no code and no earlier price. */
2117
2199
  const reset = () => {
@@ -2142,68 +2224,6 @@ function useEventRegistrationRecoveryRequest() {
2142
2224
  return arrival;
2143
2225
  }
2144
2226
  //#endregion
2145
- //#region ../blocks/src/system/runtime/nodes/event-registration/useSettledCommerceView.ts
2146
- function buildCandidate(input) {
2147
- if (!input.eligibilityIsSettled || !input.eligibility || !input.currentEvent) return null;
2148
- return {
2149
- eventSelectionId: input.currentEvent.selectionId,
2150
- discountContext: resolveDiscountContext({
2151
- paymentSelection: input.paymentSelection,
2152
- event: input.currentEvent,
2153
- eventRequiresPayment: input.eventRequiresPayment,
2154
- ticketsCount: input.ticketsCount
2155
- }),
2156
- subtotalCents: input.eligibility.price,
2157
- summaryLines: input.eligibility.ticketLines.map((line) => ({
2158
- pricingOptionId: line.pricingOptionId,
2159
- label: line.label,
2160
- quantity: line.quantity,
2161
- unitPriceCents: line.unitPriceCents,
2162
- subtotalCents: line.subtotalCents
2163
- }))
2164
- };
2165
- }
2166
- function eligibilityIsSettled(result) {
2167
- return result.settledRequestKey === result.requestKey;
2168
- }
2169
- function viewIsStale(view, currentEvent, eligibilityState) {
2170
- return view.eventSelectionId !== currentEvent?.selectionId || eligibilityState?.tag === "failed" || eligibilityState?.tag === "idle";
2171
- }
2172
- function requestIsSettled(discountUi) {
2173
- return discountUi.discountAvailabilityRequestKey === "disabled" || discountUi.settledDiscountAvailabilityRequestKey === discountUi.discountAvailabilityRequestKey;
2174
- }
2175
- function discountRequest(view, several = false) {
2176
- const discountContext = several ? null : view?.discountContext ?? null;
2177
- return {
2178
- discountContext,
2179
- subtotalCents: discountContext?.type === "event" && view?.subtotalCents !== null ? view?.subtotalCents : void 0
2180
- };
2181
- }
2182
- function useSettledCommerceView(input) {
2183
- const candidate = buildCandidate({
2184
- eligibilityIsSettled: eligibilityIsSettled(input.eligibilityResult),
2185
- eligibility: input.eligibility,
2186
- currentEvent: input.currentEvent,
2187
- paymentSelection: input.paymentSelection,
2188
- eventRequiresPayment: input.eventRequiresPayment,
2189
- ticketsCount: input.ticketsCount
2190
- });
2191
- const settledRef = useRef(candidate);
2192
- if (settledRef.current && viewIsStale(settledRef.current, input.currentEvent, input.eligibilityResult.state)) settledRef.current = null;
2193
- const requestView = candidate ?? settledRef.current;
2194
- const discountUi = input.useDiscountCodeUi({
2195
- api: input.api,
2196
- ...discountRequest(requestView, input.several)
2197
- });
2198
- if (candidate && requestIsSettled(discountUi)) settledRef.current = candidate;
2199
- return {
2200
- discountUi,
2201
- discountContext: settledRef.current?.discountContext ?? null,
2202
- ticketSelectionSubtotalCents: settledRef.current?.subtotalCents ?? null,
2203
- ticketSelectionSummaryLines: settledRef.current?.summaryLines ?? []
2204
- };
2205
- }
2206
- //#endregion
2207
2227
  //#region ../blocks/src/system/runtime/nodes/event-registration/useGuestDetailsCheck.ts
2208
2228
  /** When a guest completes details on a full event with a waitlist, asks the
2209
2229
  * server whether their email has an unfinished booking to pay for instead.
@@ -2239,11 +2259,17 @@ async function checkGuestNextStep(input, request, setCheckingNextStep) {
2239
2259
  }
2240
2260
  }
2241
2261
  function guestNextStepRequest(input) {
2262
+ const buyer = parseParticipantEmail(input.formData.email);
2242
2263
  return input.registrationTarget ? {
2243
2264
  subject: toRegistrationRequestSubject(input.registrationTarget.subject, input.selectedAttendanceMode),
2244
2265
  selections: input.ticketSelections,
2245
2266
  selectedSlidingAmount: input.selectedSlidingAmount ?? void 0,
2246
- email: input.formData.email
2267
+ email: input.formData.email,
2268
+ buyer: buyer.ok ? {
2269
+ kind: "email",
2270
+ email: buyer.value
2271
+ } : { kind: "unknown" },
2272
+ purchaseTarget: "eventTickets"
2247
2273
  } : null;
2248
2274
  }
2249
2275
  //#endregion
@@ -2845,6 +2871,46 @@ function useVerifiedFormData(draft, authState, profile) {
2845
2871
  email: verifiedEmail
2846
2872
  }, [draft, verifiedEmail]);
2847
2873
  }
2874
+ function registrationQuoteInputs(eligibility) {
2875
+ return {
2876
+ primarySubtotalCents: eligibility?.price ?? null,
2877
+ ticketSelectionSummaryLines: eligibility?.ticketLines ?? []
2878
+ };
2879
+ }
2880
+ function registrationDiscountPreview(state) {
2881
+ return state.tag === "resolved" ? state.eligibility.discountPreview : null;
2882
+ }
2883
+ function registrationPurchaseTarget(payment) {
2884
+ return registrationPurchaseIdentity(payment) === "eventTickets" ? "eventTickets" : "other";
2885
+ }
2886
+ function registrationPurchaseIdentity(payment) {
2887
+ return payment.method === null || payment.method === "stripe" || payment.method === "free" ? "eventTickets" : payment;
2888
+ }
2889
+ function registrationDiscountContext(input) {
2890
+ const { several, currentEvent, paymentIntent, eventRequiresPayment, ticketsCount } = input;
2891
+ const selectedDiscountContext = several !== null || !currentEvent ? null : resolveDiscountContext({
2892
+ paymentSelection: paymentIntent,
2893
+ event: currentEvent,
2894
+ eventRequiresPayment,
2895
+ ticketsCount
2896
+ });
2897
+ return selectedDiscountContext?.type === "event" && currentEvent?.registrationSubject.kind === "wholeSeries" ? {
2898
+ type: "whole_series",
2899
+ eventSeriesId: selectedDiscountContext.eventSeriesId
2900
+ } : selectedDiscountContext;
2901
+ }
2902
+ function registrationClaimRequest(claim) {
2903
+ return claim.kind === "none" ? null : claim.request;
2904
+ }
2905
+ function registrationClaimError(claim, message, action) {
2906
+ return claim.kind === "error" ? {
2907
+ message: claim.message,
2908
+ action: claim.action
2909
+ } : {
2910
+ message,
2911
+ action
2912
+ };
2913
+ }
2848
2914
  function useEventRegistrationWizardWithDeps(options, deps) {
2849
2915
  const api = useBlockApi();
2850
2916
  const arrivalCredential = deps.useWaitlistClaimCredential();
@@ -2948,7 +3014,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
2948
3014
  const formData = useVerifiedFormData(draftFormData, portalAuthState, portalProfile);
2949
3015
  const portalIdentity = portalSessionIdentity(api.config);
2950
3016
  const waitlistClaim = flowState.invitation;
2951
- const claimLookup = deps.useWaitlistClaim(waitlistClaim.kind === "none" ? null : waitlistClaim.request);
3017
+ const claimLookup = deps.useWaitlistClaim(registrationClaimRequest(waitlistClaim));
2952
3018
  useEffect(() => {
2953
3019
  dispatchFlow({
2954
3020
  type: "claim-arrived",
@@ -2968,8 +3034,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
2968
3034
  claimEventSource,
2969
3035
  options.occurrenceContext?.id
2970
3036
  ]);
2971
- const errorMessage = waitlistClaim.kind === "error" ? waitlistClaim.message : submissionErrorMessage;
2972
- const errorAction = waitlistClaim.kind === "error" ? waitlistClaim.action : submissionErrorAction;
3037
+ const { message: errorMessage, action: errorAction } = registrationClaimError(waitlistClaim, submissionErrorMessage, submissionErrorAction);
2973
3038
  const selectionLocked = isRegistrationLocked(step);
2974
3039
  useEffect(() => {
2975
3040
  if (selectionLocked || portalAuthState !== "authenticated" || !portalProfile) return;
@@ -3041,6 +3106,14 @@ function useEventRegistrationWizardWithDeps(options, deps) {
3041
3106
  const bookingClosure = useFreshBookingClosure(deps, options, events, step, holdsPlace(waitlistClaim, paymentController));
3042
3107
  const eligibilityResult = deps.useEligibility({
3043
3108
  refreshKey: optionsRefreshKey,
3109
+ buyerEmail: formData.email,
3110
+ purchaseTarget: registrationPurchaseTarget(paymentIntent),
3111
+ purchaseKey: JSON.stringify([
3112
+ registrationPurchaseIdentity(paymentIntent),
3113
+ several,
3114
+ api.config.siteId,
3115
+ portalIdentity
3116
+ ]),
3044
3117
  enabled: bookingClosureAllowsQuote(bookingClosure, shouldRefreshAfterRegistrationError(step, errorAction, shouldLoadRegistrationOptions(portalAuthState, step))),
3045
3118
  subject: registrationTarget?.subject ?? null,
3046
3119
  attendanceMode: selectedAttendanceMode,
@@ -3054,6 +3127,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
3054
3127
  occurrenceId: registrationOccurrenceId
3055
3128
  });
3056
3129
  const existingRegistrations = useMemo(() => existingRegistrationResult.registrations.filter((registration) => registration.occurrenceId === registrationOccurrenceId), [existingRegistrationResult.registrations, registrationOccurrenceId]);
3130
+ const registrationOptionsState = eligibilityResult.state;
3057
3131
  const eligibility = eligibilityResult.eligibility;
3058
3132
  const eligibilityLoading = eligibilityResult.isLoading;
3059
3133
  const eligibilityError = eligibilityResult.error;
@@ -3371,16 +3445,21 @@ function useEventRegistrationWizardWithDeps(options, deps) {
3371
3445
  }
3372
3446
  setStep("select-tickets");
3373
3447
  };
3374
- const { discountUi, discountContext, ticketSelectionSubtotalCents: primarySubtotalCents, ticketSelectionSummaryLines } = useSettledCommerceView({
3375
- api,
3376
- useDiscountCodeUi: deps.useDiscountCodeUi,
3377
- eligibilityResult,
3378
- eligibility,
3448
+ const currentPreview = registrationDiscountPreview(eligibilityResult.state);
3449
+ const discountContext = registrationDiscountContext({
3450
+ several,
3379
3451
  currentEvent,
3452
+ paymentIntent,
3380
3453
  eventRequiresPayment,
3381
- paymentSelection: paymentIntent,
3382
- ticketsCount,
3383
- several: several !== null
3454
+ ticketsCount
3455
+ });
3456
+ const { primarySubtotalCents, ticketSelectionSummaryLines } = registrationQuoteInputs(eligibility);
3457
+ const discountUi = deps.useDiscountCodeUi({
3458
+ api,
3459
+ discountContext,
3460
+ preview: currentPreview,
3461
+ loading: eligibilityLoading,
3462
+ scopeKey: eligibilityResult.requestKey
3384
3463
  });
3385
3464
  const selectionPrice = planSelectionPrice({
3386
3465
  several,
@@ -3414,7 +3493,10 @@ function useEventRegistrationWizardWithDeps(options, deps) {
3414
3493
  ticketLines: ticketSelectionSummaryLines,
3415
3494
  currentEvent
3416
3495
  }),
3417
- automaticOffered: automaticQuoteOffered(discountUi.autoAppliedDiscount, discountContext)
3496
+ registrationPreview: currentPreview,
3497
+ registrationRequestKey: eligibilityResult.requestKey,
3498
+ combinedPending: eligibilityLoading,
3499
+ productAutomaticOffered: discountUi.autoAppliedDiscount !== null && discountContext?.type === "pass"
3418
3500
  });
3419
3501
  const discountView = registrationDiscountView({
3420
3502
  several: several !== null,
@@ -3814,7 +3896,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
3814
3896
  isMembershipFastTrack,
3815
3897
  waitlistClaim,
3816
3898
  eligibility,
3817
- registrationOptionsState: eligibilityResult.state,
3899
+ registrationOptionsState,
3818
3900
  eligibilityLoading: anyLoading(eligibilityLoading, checkingNextStep, combinationPricing.quoting),
3819
3901
  eligibilityError,
3820
3902
  existingRegistrations,
@@ -3947,10 +4029,6 @@ function singleBookingTicketDetails(contextType, input) {
3947
4029
  ticketUnits
3948
4030
  };
3949
4031
  }
3950
- /** The server can't yet preview an automatic discount on a membership, so its summary shows the regular price and checkout takes the discount off. */
3951
- function automaticQuoteOffered(automatic, context) {
3952
- return automatic !== null && context?.type !== "membership";
3953
- }
3954
4032
  /** The quote's field, saying beside an applied code what it does to this purchase. */
3955
4033
  function registrationCodeField(field, quote, paymentIntent) {
3956
4034
  if (!field) return null;
@@ -4049,7 +4127,7 @@ function resolveWizardPaymentView(input) {
4049
4127
  }
4050
4128
  //#endregion
4051
4129
  //#region ../blocks/src/system/runtime/nodes/event-registration/EventRegistrationPayment.tsx
4052
- const Payment = lazy(() => import("./EventEmbeddedCheckoutStep-B18VbNS_.mjs"));
4130
+ const Payment = lazy(() => import("./EventEmbeddedCheckoutStep-BDnicDM6.mjs"));
4053
4131
  /** The one Stripe mount, shared by the standard wizard and headless arrangements. */
4054
4132
  function EventPaymentMount({ state, onComplete, onRetry, onBack, buttonVariant }) {
4055
4133
  if (state.kind === "abandoning") return /* @__PURE__ */ jsx("p", {