@riverbankcms/sdk 0.140.0 → 0.142.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 (145) hide show
  1. package/dist/{PreviewEditorSidebar-CUyTzd5z.mjs → PreviewEditorSidebar-Dk6Dt11f.mjs} +24 -15
  2. package/dist/{PreviewEditorUI-Agkw4v5i.mjs → PreviewEditorUI-D6EQTsCA.mjs} +3 -3
  3. package/dist/{PreviewQueryProvider-CN0ewic5.mjs → PreviewQueryProvider-CC-EPkyQ.mjs} +1 -1
  4. package/dist/{SdkPreviewModeRuntime-DdbeAdS8.mjs → SdkPreviewModeRuntime-DH1n4ytY.mjs} +85 -54
  5. package/dist/{SiteChromeCustomizeContext-CqGOz-Kv.mjs → SiteChromeCustomizeContext-DunIzY0K.mjs} +797 -216
  6. package/dist/_dts/api/src/billing.d.ts +6 -1
  7. package/dist/_dts/api/src/bookingConfig.d.ts +1 -1
  8. package/dist/_dts/api/src/commercePortalEndpoints.d.ts +2 -2
  9. package/dist/_dts/api/src/contentRuntime.d.ts +12 -31
  10. package/dist/_dts/api/src/domainConnection.d.ts +4 -0
  11. package/dist/_dts/api/src/endpoints.d.ts +0 -27
  12. package/dist/_dts/api/src/footerCompositionContracts.d.ts +25 -0
  13. package/dist/_dts/api/src/index.d.ts +2 -2
  14. package/dist/_dts/api/src/launchReadiness.d.ts +1 -0
  15. package/dist/_dts/api/src/navigation/dashboardSiteNav.d.ts +2 -1
  16. package/dist/_dts/api/src/publicBookingService.d.ts +1 -0
  17. package/dist/_dts/api/src/sdkConfig/layout.d.ts +13 -0
  18. package/dist/_dts/api/src/sdkContracts.d.ts +3 -8
  19. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +3 -26
  20. package/dist/_dts/api/src/siteOnboarding.d.ts +7 -0
  21. package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +1 -31
  22. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +6 -1
  23. package/dist/_dts/billing/src/site-arrangements.d.ts +18 -5
  24. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +4 -0
  25. package/dist/_dts/blocks/src/pageRendererContracts.d.ts +2 -0
  26. package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +2 -0
  27. package/dist/_dts/blocks/src/system/blocks/events/eventSelectionFields.d.ts +122 -0
  28. package/dist/_dts/blocks/src/system/blocks/events/shared/calendarWindow.d.ts +2 -1
  29. package/dist/_dts/blocks/src/system/blocks/events/shared/eventSelection.d.ts +11 -0
  30. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +56 -0
  31. package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +8 -0
  32. package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +2 -2
  33. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +47 -47
  34. package/dist/_dts/blocks/src/system/data/prefetchBlockData.d.ts +5 -0
  35. package/dist/_dts/blocks/src/system/data/utils.d.ts +1 -1
  36. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +27 -1
  37. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +12 -180
  38. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +6 -90
  39. package/dist/_dts/blocks/src/system/runtime/hooks/useEventFilters.d.ts +2 -1
  40. package/dist/_dts/blocks/src/system/runtime/nodes/appointment-services.d.ts +5 -1
  41. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +4 -0
  42. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.state.d.ts +5 -0
  43. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.d.ts +3 -0
  44. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.state.d.ts +10 -3
  45. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventCheckoutHandoffRestore.d.ts +9 -0
  46. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +4 -5
  47. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useSettledCommerceView.d.ts +37 -0
  48. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +4 -3
  49. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +3 -0
  50. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.interactive.d.ts +11 -101
  51. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +63 -2
  52. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/listOptions.d.ts +2 -0
  53. package/dist/_dts/blocks/src/system/transforms/registry/eventCalendar.d.ts +12 -0
  54. package/dist/_dts/commerce/src/purchase/bookingInstalmentSchedule.d.ts +4 -0
  55. package/dist/_dts/commerce/src/purchase/stripeCommissionMetadata.d.ts +1 -2
  56. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +3102 -3122
  57. package/dist/_dts/editor-blocks/src/block-editor/ColourFieldOptionsProvider.d.ts +7 -0
  58. package/dist/_dts/editor-blocks/src/block-editor/colourFieldVisibility.d.ts +7 -0
  59. package/dist/_dts/editor-blocks/src/block-editor/preparedManifest.d.ts +2 -0
  60. package/dist/_dts/editor-blocks/src/index.d.ts +1 -0
  61. package/dist/_dts/editor-blocks/src/widgets/site-option-picker/loaders.d.ts +27 -1
  62. package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +2 -2
  63. package/dist/_dts/preview-next/src/client/preview/PreviewFooterEditorPanel.d.ts +3 -6
  64. package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +2 -2
  65. package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +2 -2
  66. package/dist/_dts/preview-next/src/client/preview/footerInspection.d.ts +16 -0
  67. package/dist/_dts/preview-next/src/client/preview/sdkConfig.d.ts +6 -0
  68. package/dist/_dts/sdk/src/config/types.d.ts +2 -18
  69. package/dist/_dts/sdk/src/config/validation.d.ts +6 -0
  70. package/dist/_dts/sdk/src/public-api/contracts.d.ts +4 -1
  71. package/dist/_dts/sdk/src/version.d.ts +1 -1
  72. package/dist/_dts/theme-core/src/ThemeFontLoader.d.ts +17 -1
  73. package/dist/_dts/theme-core/src/buttons/affordanceSuppression.d.ts +17 -0
  74. package/dist/_dts/theme-core/src/buttons/buttonColourContract.d.ts +1 -1
  75. package/dist/_dts/theme-core/src/buttons/classNames.d.ts +16 -0
  76. package/dist/_dts/theme-core/src/buttons/generateButtonCss.d.ts +0 -6
  77. package/dist/_dts/theme-core/src/buttons/resolvedButtonCss.d.ts +4 -4
  78. package/dist/_dts/theme-core/src/footer/mode.d.ts +10 -1
  79. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  80. package/dist/_dts/theme-core/src/hosted-booking-appearance.d.ts +54 -12
  81. package/dist/_dts/theme-core/src/index.d.ts +1 -1
  82. package/dist/_dts/theme-core/src/schema.d.ts +1 -7
  83. package/dist/_dts/theme-core/src/site-styles/effectivePageDesign.d.ts +32 -0
  84. package/dist/_dts/theme-core/src/site-styles/index.d.ts +1 -0
  85. package/dist/client/{BookingConsentAgreement-CuKa82V4.mjs → BookingConsentAgreement-CnJeq3_r.mjs} +2 -2
  86. package/dist/client/{DiscountCodeDisclosure-BbYieKWB.mjs → DiscountCodeDisclosure-BINEO6J9.mjs} +1 -1
  87. package/dist/client/{EventCombined.client-LTfR1Aby.mjs → EventCombined.client-srxNQ6sZ.mjs} +11 -15
  88. package/dist/client/{EventListing.client-DUHpYSuo.mjs → EventListing.client-DbyVyGkX.mjs} +4 -17
  89. package/dist/client/{LeafletStaticMap-CHRupL6m.mjs → LeafletStaticMap-B-wpijzL.mjs} +1 -1
  90. package/dist/client/{accordion-6HiIFxNL.mjs → accordion-B-iUXU7n.mjs} +1 -1
  91. package/dist/client/{bookingForm-Dlmid43H.mjs → bookingForm-BXYPke5q.mjs} +5 -5
  92. package/dist/client/bookings.mjs +194 -102
  93. package/dist/client/{carousel-DmkZRRq_.mjs → carousel-Cr4aj63H.mjs} +1 -1
  94. package/dist/client/{cart-CIC24330.mjs → cart-DibP9WWa.mjs} +3 -3
  95. package/dist/client/{checkout-D1Zw9imo.mjs → checkout-CrSBVnL8.mjs} +3 -3
  96. package/dist/client/client.mjs +643 -192
  97. package/dist/client/{context-Cy1OayHx.mjs → context-Ces-AgdR.mjs} +1 -1
  98. package/dist/client/{dates-aDcfoLHr.mjs → dates-BXyNeNhB.mjs} +2 -2
  99. package/dist/client/{eventCalendar-FQxMPAjf.mjs → eventCalendar-HwpPeqrH.mjs} +11 -7
  100. package/dist/client/{eventCombined-Dr3ac6Hb.mjs → eventCombined-BpFUkuEI.mjs} +3 -3
  101. package/dist/client/{eventDetails-D-AzUHFQ.mjs → eventDetails-DK_agiWy.mjs} +4 -4
  102. package/dist/client/{eventListing-B3XxBf3i.mjs → eventListing-DhzHqP1c.mjs} +3 -3
  103. package/dist/client/{eventRegistration-I6EaokFD.mjs → eventRegistration-BdQ_Dn2d.mjs} +124 -32
  104. package/dist/client/{form-BbWckVWY.mjs → form-B1frcuzy.mjs} +2 -2
  105. package/dist/client/{headerSection-C9qU4Y7x.mjs → headerSection-CT5z460s.mjs} +2 -2
  106. package/dist/client/hooks.mjs +274 -45
  107. package/dist/client/{locationMap-CLCShvlG.mjs → locationMap-CIQXB9i2.mjs} +2 -2
  108. package/dist/client/{newsletterForm-Briukxzi.mjs → newsletterForm-BYNYZSes.mjs} +23 -10
  109. package/dist/client/{pricing-Copadu-2.mjs → pricing-CbTlAsmt.mjs} +1 -1
  110. package/dist/client/{productDetail-oujlRd-r.mjs → productDetail-CR7Z3yjS.mjs} +3 -3
  111. package/dist/client/{productList-BRiIRUcd.mjs → productList-DXj00vzR.mjs} +3 -3
  112. package/dist/client/{propsDecoder-CB2KS_ko.mjs → propsDecoder-DiLiBdek.mjs} +57 -16
  113. package/dist/client/rendering/client.mjs +476 -132
  114. package/dist/client/rendering/islands.mjs +17 -17
  115. package/dist/client/rendering.mjs +686 -195
  116. package/dist/client/{scrollToBlock-B1IS1_ua.mjs → scrollToBlock-CrcbBf0h.mjs} +28 -11
  117. package/dist/client/{shop-Vn6yNFED.mjs → shop-DgqiB_1b.mjs} +6 -6
  118. package/dist/client/{shop-commerce-BVTqipYp.mjs → shop-commerce-D_J781in.mjs} +5 -5
  119. package/dist/client/{shop-commerce-store-BVnJVy7v.mjs → shop-commerce-store-PGUbDwqe.mjs} +1 -1
  120. package/dist/client/{shopShared-COIeK77T.mjs → shopShared-C_Bb2zwG.mjs} +3 -3
  121. package/dist/client/{useEventFilters-DzIUcS9n.mjs → useEventFilters-CM17Xpr1.mjs} +17 -11
  122. package/dist/preview-next/before-render.mjs +0 -37
  123. package/dist/preview-next/client/runtime.mjs +4 -4
  124. package/dist/preview-next/editor-chrome.css +4 -8
  125. package/dist/preview-next/keepAlive.mjs +0 -37
  126. package/dist/preview-next/middleware.mjs +0 -37
  127. package/dist/{previewAuthStore-Gjb6r6vz.mjs → previewAuthStore-oVttoRDO.mjs} +0 -37
  128. package/dist/{sdk-runtime-CnCLvZRv.mjs → sdk-runtime-DhmuRhIX.mjs} +2 -2
  129. package/dist/{separator-DKDRJ1oH.mjs → separator-C3hlg9LH.mjs} +1 -1
  130. package/dist/server/components.mjs +452 -111
  131. package/dist/server/config-validation.mjs +263 -40
  132. package/dist/server/config.mjs +263 -40
  133. package/dist/server/data.mjs +274 -45
  134. package/dist/server/index.mjs +1 -38
  135. package/dist/server/next.mjs +427 -119
  136. package/dist/server/page-converter.mjs +208 -33
  137. package/dist/server/prebuild.mjs +1 -1
  138. package/dist/server/rendering/server.mjs +467 -119
  139. package/dist/server/rendering.mjs +467 -117
  140. package/dist/server/routing.mjs +301 -50
  141. package/dist/server/server.mjs +275 -83
  142. package/dist/server/theme-bridge.mjs +57 -23
  143. package/dist/server/theme.mjs +11 -9
  144. package/dist/styles/index.css +28 -2
  145. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { R as calendarWindowPageSchema } from "./propsDecoder-CB2KS_ko.mjs";
2
+ import { R as calendarWindowPageSchema } from "./propsDecoder-DiLiBdek.mjs";
3
3
  import { createContext, useContext, useMemo } from "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  //#region ../blocks/src/system/runtime/api/deduplication.ts
@@ -1,5 +1,5 @@
1
- import { Gt as formatBookingDate, Kt as formatBookingDateParts, Yt as formatBookingTime, at as resolveRuntimeEventDestination, mn as assertNever, nn as toScheduledBookingDateRange, rn as toScheduledBookingDateTime, tn as toBookingTimeZone } from "./propsDecoder-CB2KS_ko.mjs";
2
- import { a as canJoinEventWaitlistOnAnyMode, p as isEventFull } from "./pricing-Copadu-2.mjs";
1
+ import { Gt as formatBookingDate, Kt as formatBookingDateParts, Yt as formatBookingTime, at as resolveRuntimeEventDestination, mn as assertNever, nn as toScheduledBookingDateRange, rn as toScheduledBookingDateTime, tn as toBookingTimeZone } from "./propsDecoder-DiLiBdek.mjs";
2
+ import { a as canJoinEventWaitlistOnAnyMode, p as isEventFull } from "./pricing-CbTlAsmt.mjs";
3
3
  //#region ../blocks/src/system/runtime/nodes/events/domain/cta.ts
4
4
  /**
5
5
  * Booking call-to-action resolution for events: where an event links to and
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
  import { O as clsx } from "./colorStyles-3013aRAY.mjs";
3
- import { $ as getDayOfWeek, B as resolveCalendarReadProfile, D as buildEventCalendarListingRender, J as MONTH_NAMES, Q as formatDateKey, V as buildEventRuntimeFilters, Y as addDays, dt as themeButtonClassName, et as getOrderedDayNames, nt as isSameCalendarDay, rt as isToday, t as defineIslandPropsDecoder, tt as getWeekCalendarDays } from "./propsDecoder-CB2KS_ko.mjs";
4
- import { o as EventFilters, s as formatEventTeacherLine, t as useEventFilters } from "./useEventFilters-DzIUcS9n.mjs";
5
- import { d as getEventAvailabilityStatus, o as formatEventRemainingPlaces, p as isEventFull } from "./pricing-Copadu-2.mjs";
6
- import { a as formatTime, c as getLocalDateKey, d as resolveEventLinkProps, l as getLocalMinuteOfDay, o as groupEventsByDate, s as resolveEventTimeZone } from "./dates-aDcfoLHr.mjs";
7
- import { a as WeekAgendaView, c as CalendarDayCell, d as useCalendarEvents, i as useHydrationReady, l as EventModalProvider, o as CalendarNavigationChevron, r as EventModals, s as CalendarDayHeaders, t as EventCombinedClient, u as useEventModal } from "./EventCombined.client-LTfR1Aby.mjs";
8
- import { t as BlockApiProvider } from "./context-Cy1OayHx.mjs";
3
+ import { $ as getDayOfWeek, B as resolveCalendarReadProfile, D as buildEventCalendarListingRender, J as MONTH_NAMES, Q as formatDateKey, V as buildEventRuntimeFilters, Y as addDays, dt as themeButtonClassName, et as getOrderedDayNames, nt as isSameCalendarDay, rt as isToday, t as defineIslandPropsDecoder, tt as getWeekCalendarDays } from "./propsDecoder-DiLiBdek.mjs";
4
+ import { o as EventFilters, s as formatEventTeacherLine, t as useEventFilters } from "./useEventFilters-CM17Xpr1.mjs";
5
+ import { d as getEventAvailabilityStatus, o as formatEventRemainingPlaces, p as isEventFull } from "./pricing-CbTlAsmt.mjs";
6
+ import { a as formatTime, c as getLocalDateKey, d as resolveEventLinkProps, l as getLocalMinuteOfDay, o as groupEventsByDate, s as resolveEventTimeZone } from "./dates-BXyNeNhB.mjs";
7
+ import { a as WeekAgendaView, c as CalendarDayCell, d as useCalendarEvents, i as useHydrationReady, l as EventModalProvider, o as CalendarNavigationChevron, r as EventModals, s as CalendarDayHeaders, t as EventCombinedClient, u as useEventModal } from "./EventCombined.client-srxNQ6sZ.mjs";
8
+ import { t as BlockApiProvider } from "./context-Ces-AgdR.mjs";
9
9
  import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
10
10
  import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-UNsfPcYq.mjs";
11
- import { n as EventListingController } from "./EventListing.client-DUHpYSuo.mjs";
11
+ import { n as EventListingController } from "./EventListing.client-DbyVyGkX.mjs";
12
12
  import { useEffect, useId, useMemo, useState } from "react";
13
13
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
14
14
  //#region ../calendar/src/lane-packing.ts
@@ -832,6 +832,7 @@ const EventCalendarClient = ({ render }) => {
832
832
  eventSurface: display.eventSurface,
833
833
  filterEventPresets: display.filterEventPresets,
834
834
  scheduleScope: display.scheduleScope,
835
+ seriesIds: display.seriesIds,
835
836
  filterCategoryIds: display.filterCategoryIds,
836
837
  filterStaffMemberId: display.filterStaffMemberId,
837
838
  filterVenueId: display.filterVenueId,
@@ -855,6 +856,7 @@ const EventCalendarWeekBoardClient = ({ render }) => {
855
856
  const { display, hydration } = render;
856
857
  const filters = useMemo(() => buildDisplayFilterParams(display), [
857
858
  display.eventSurface,
859
+ display.seriesIds,
858
860
  display.filterCategoryIds,
859
861
  display.filterEventPresets,
860
862
  display.filterStaffMemberId,
@@ -1016,6 +1018,7 @@ function useEventCalendarFilterState(display) {
1016
1018
  showCategoryFilter: display.showFilters ? display.showCategoryFilter : "never",
1017
1019
  showVenueFilter: display.showFilters ? display.showVenueFilter : false,
1018
1020
  showStaffFilter: display.showFilters ? display.showStaffFilter : false,
1021
+ preFilterSeriesIds: display.seriesIds,
1019
1022
  preFilterCategoryIds: display.filterCategoryIds,
1020
1023
  preFilterStaffMemberId: display.filterStaffMemberId,
1021
1024
  preFilterVenueId: display.filterVenueId,
@@ -1049,6 +1052,7 @@ function buildDisplayFilterParams(display) {
1049
1052
  eventSurface: display.eventSurface,
1050
1053
  filterEventPresets: display.filterEventPresets,
1051
1054
  scheduleScope: display.scheduleScope,
1055
+ seriesIds: display.seriesIds,
1052
1056
  filterCategoryIds: display.filterCategoryIds,
1053
1057
  filterStaffMemberId: display.filterStaffMemberId,
1054
1058
  filterVenueId: display.filterVenueId
@@ -1,6 +1,6 @@
1
- import { t as defineIslandPropsDecoder } from "./propsDecoder-CB2KS_ko.mjs";
2
- import { n as EventCombinedIslandClient } from "./EventCombined.client-LTfR1Aby.mjs";
3
- import { t as BlockApiProvider } from "./context-Cy1OayHx.mjs";
1
+ import { t as defineIslandPropsDecoder } from "./propsDecoder-DiLiBdek.mjs";
2
+ import { n as EventCombinedIslandClient } from "./EventCombined.client-srxNQ6sZ.mjs";
3
+ import { t as BlockApiProvider } from "./context-Ces-AgdR.mjs";
4
4
  import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
5
5
  import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-UNsfPcYq.mjs";
6
6
  import "react";
@@ -1,8 +1,8 @@
1
- import { Ht as resolveWholeSeriesBookingPhase, Vt as CANCELLED_SESSION_STATUS, Zt as getBookingLocalDateKey, cn as publicEventPricingDisplay, dn as publicEventPricingType, fn as formatCurrencyAmount, in as formatBookingPriceDisplay, k as resolveEventRegistrationScopedEvents, on as isPublicEventPricingOptionDisplayable, rn as toScheduledBookingDateTime, sn as publicEventPricingCurrency, t as defineIslandPropsDecoder, tn as toBookingTimeZone } from "./propsDecoder-CB2KS_ko.mjs";
2
- import { l as formatTotalCapacity, n as formatEventPriceAmount, t as formatEventPrice } from "./pricing-Copadu-2.mjs";
3
- import { d as resolveEventLinkProps, r as formatEventDateParts } from "./dates-aDcfoLHr.mjs";
1
+ import { Ht as resolveWholeSeriesBookingPhase, Vt as CANCELLED_SESSION_STATUS, Zt as getBookingLocalDateKey, cn as publicEventPricingDisplay, dn as publicEventPricingType, fn as formatCurrencyAmount, in as formatBookingPriceDisplay, k as resolveEventRegistrationScopedEvents, on as isPublicEventPricingOptionDisplayable, rn as toScheduledBookingDateTime, sn as publicEventPricingCurrency, t as defineIslandPropsDecoder, tn as toBookingTimeZone } from "./propsDecoder-DiLiBdek.mjs";
2
+ import { l as formatTotalCapacity, n as formatEventPriceAmount, t as formatEventPrice } from "./pricing-CbTlAsmt.mjs";
3
+ import { d as resolveEventLinkProps, r as formatEventDateParts } from "./dates-BXyNeNhB.mjs";
4
4
  import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
5
- import { t as LeafletStaticMap } from "./LeafletStaticMap-CHRupL6m.mjs";
5
+ import { t as LeafletStaticMap } from "./LeafletStaticMap-B-wpijzL.mjs";
6
6
  import "react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  //#region ../blocks/src/system/runtime/nodes/events/shared/eventProductEligibility.ts
@@ -1,8 +1,8 @@
1
- import { t as defineIslandPropsDecoder } from "./propsDecoder-CB2KS_ko.mjs";
2
- import { t as BlockApiProvider } from "./context-Cy1OayHx.mjs";
1
+ import { t as defineIslandPropsDecoder } from "./propsDecoder-DiLiBdek.mjs";
2
+ import { t as BlockApiProvider } from "./context-Ces-AgdR.mjs";
3
3
  import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
4
4
  import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-UNsfPcYq.mjs";
5
- import { t as EventListingClient } from "./EventListing.client-DUHpYSuo.mjs";
5
+ import { t as EventListingClient } from "./EventListing.client-DbyVyGkX.mjs";
6
6
  import "react";
7
7
  import { jsx } from "react/jsx-runtime";
8
8
  //#region src/rendering/islands/enhancers/eventListing.tsx
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import { a as buildBookingPaymentSelectionViewModel, i as usePolling, n as StepIndicator$1, o as resolveBookingPaymentDueNowCents, r as SpinnerNode, s as formatPrice, t as BookingConsentAgreement } from "./BookingConsentAgreement-CuKa82V4.mjs";
3
- import { C as resolveRegistrationTarget, E as getWizardStepsForContext, Gt as formatBookingDate, Pt as assertNever, S as resolveEventRequiresPayment, T as getStepNumber, Yt as formatBookingTime, _ as toRegistrationEvents, b as findPreSelectedEvent, dn as publicEventPricingType, dt as themeButtonClassName, fn as formatCurrencyAmount, g as getRegistrationStartAt, h as buildEventRegistrationDisplayFromScopedEvents, k as resolveEventRegistrationScopedEvents, ln as publicEventPricingOptions, ot as groupPublicEventsByRun, pn as parseCurrencyCode, qt as formatBookingDateTime, rn as toScheduledBookingDateTime, sn as publicEventPricingCurrency, t as defineIslandPropsDecoder, tn as toBookingTimeZone, un as publicEventPricingStrategy, v as toWholeSeriesRegistrationEvents, w as WIZARD_STEPS, x as resolveDiscountContext, y as findEventByOccurrenceId } from "./propsDecoder-CB2KS_ko.mjs";
4
- import { a as canJoinEventWaitlistOnAnyMode, c as formatTicketTypeRemaining, f as getRemainingPlaces, h as selectMostOpenCapacitySource, i as canJoinEventWaitlist, m as selectEventCapacitySource, o as formatEventRemainingPlaces, p as isEventFull, r as formatEventPriceDisplay, s as formatRemainingPlaces, u as getEventAvailability } from "./pricing-Copadu-2.mjs";
5
- import { n as useBlockApi, r as BlockApiError, t as BlockApiProvider } from "./context-Cy1OayHx.mjs";
2
+ import { a as buildBookingPaymentSelectionViewModel, i as usePolling, n as StepIndicator$1, o as resolveBookingPaymentDueNowCents, r as SpinnerNode, s as formatPrice, t as BookingConsentAgreement } from "./BookingConsentAgreement-CnJeq3_r.mjs";
3
+ import { C as resolveRegistrationTarget, E as getWizardStepsForContext, Gt as formatBookingDate, Pt as assertNever, S as resolveEventRequiresPayment, T as getStepNumber, Yt as formatBookingTime, _ as toRegistrationEvents, b as findPreSelectedEvent, dn as publicEventPricingType, dt as themeButtonClassName, fn as formatCurrencyAmount, g as getRegistrationStartAt, h as buildEventRegistrationDisplayFromScopedEvents, k as resolveEventRegistrationScopedEvents, ln as publicEventPricingOptions, ot as groupPublicEventsByRun, pn as parseCurrencyCode, qt as formatBookingDateTime, rn as toScheduledBookingDateTime, sn as publicEventPricingCurrency, t as defineIslandPropsDecoder, tn as toBookingTimeZone, un as publicEventPricingStrategy, v as toWholeSeriesRegistrationEvents, w as WIZARD_STEPS, x as resolveDiscountContext, y as findEventByOccurrenceId } from "./propsDecoder-DiLiBdek.mjs";
4
+ import { a as canJoinEventWaitlistOnAnyMode, c as formatTicketTypeRemaining, f as getRemainingPlaces, h as selectMostOpenCapacitySource, i as canJoinEventWaitlist, m as selectEventCapacitySource, o as formatEventRemainingPlaces, p as isEventFull, r as formatEventPriceDisplay, s as formatRemainingPlaces, u as getEventAvailability } from "./pricing-CbTlAsmt.mjs";
5
+ import { n as useBlockApi, r as BlockApiError, t as BlockApiProvider } from "./context-Ces-AgdR.mjs";
6
6
  import { n as isSpamProtectionEnabled, r as AltchaWidget, t as getChallengeUrl } from "./src-B833rYRr.mjs";
7
- import { a as CheckIcon, i as StateIcon, n as useDiscountCodeUi, r as TerminalPanel, t as scrollToBlock } from "./scrollToBlock-B1IS1_ua.mjs";
8
- import { t as DiscountCodeDisclosure } from "./DiscountCodeDisclosure-BbYieKWB.mjs";
7
+ import { a as CheckIcon, i as StateIcon, n as useDiscountCodeUi, r as TerminalPanel, t as scrollToBlock } from "./scrollToBlock-CrcbBf0h.mjs";
8
+ import { t as DiscountCodeDisclosure } from "./DiscountCodeDisclosure-BINEO6J9.mjs";
9
9
  import { t as FeedbackMessage } from "./FeedbackMessage-CtLvvS_d.mjs";
10
10
  import { n as getFieldValidationControlProps, t as FieldValidationMessage } from "./FieldValidationMessage-AYanWFb-.mjs";
11
11
  import { t as buildCheckoutReturnUrls } from "./checkoutUrls-FL6lRkrt.mjs";
@@ -969,6 +969,7 @@ function getTicketTypeLineMax(input) {
969
969
  const initialEligibilityLookupState = {
970
970
  tag: "idle",
971
971
  eligibility: null,
972
+ settledRequestKey: null,
972
973
  error: null
973
974
  };
974
975
  function eligibilityLookupReducer(state, action) {
@@ -977,16 +978,19 @@ function eligibilityLookupReducer(state, action) {
977
978
  case "loading-started": return {
978
979
  tag: "loading",
979
980
  eligibility: state.eligibility,
981
+ settledRequestKey: state.settledRequestKey,
980
982
  error: null
981
983
  };
982
984
  case "resolved": return {
983
985
  tag: "resolved",
984
986
  eligibility: action.eligibility,
987
+ settledRequestKey: action.requestKey,
985
988
  error: null
986
989
  };
987
990
  case "failed": return {
988
991
  tag: "failed",
989
992
  eligibility: null,
993
+ settledRequestKey: null,
990
994
  error: action.message
991
995
  };
992
996
  default: return assertNever(action);
@@ -1092,9 +1096,23 @@ function toRegistrationOptionsSubject(subject, attendanceMode) {
1092
1096
  function useEligibility(params) {
1093
1097
  return useEligibilityWithDeps(params, eventRegistrationHooksDeps);
1094
1098
  }
1099
+ function eligibilityRequestKey(params) {
1100
+ return JSON.stringify({
1101
+ enabled: params.enabled,
1102
+ refreshKey: params.refreshKey ?? 0,
1103
+ subject: params.subject,
1104
+ attendanceMode: params.attendanceMode ?? null,
1105
+ ticketSelections: params.ticketSelectionsKey,
1106
+ selectedSlidingAmount: params.selectedSlidingAmount ?? null
1107
+ });
1108
+ }
1095
1109
  function useEligibilityWithDeps(params, deps) {
1096
1110
  const api = deps.useBlockApi();
1097
1111
  const ticketSelectionsKey = JSON.stringify(normalizeTicketSelectionLines(params.ticketSelections));
1112
+ const requestKey = eligibilityRequestKey({
1113
+ ...params,
1114
+ ticketSelectionsKey
1115
+ });
1098
1116
  const [state, dispatch] = useReducer(eligibilityLookupReducer, initialEligibilityLookupState);
1099
1117
  const requestIdRef = useRef(0);
1100
1118
  useEffect(() => {
@@ -1127,7 +1145,8 @@ function useEligibilityWithDeps(params, deps) {
1127
1145
  if (cancelled || requestIdRef.current !== requestId) return;
1128
1146
  dispatch({
1129
1147
  type: "resolved",
1130
- eligibility: transformRegistrationOptionsResponse(result)
1148
+ eligibility: transformRegistrationOptionsResponse(result),
1149
+ requestKey
1131
1150
  });
1132
1151
  } catch {
1133
1152
  if (cancelled || requestIdRef.current !== requestId) return;
@@ -1156,6 +1175,8 @@ function useEligibilityWithDeps(params, deps) {
1156
1175
  return {
1157
1176
  state,
1158
1177
  eligibility: state.eligibility,
1178
+ settledRequestKey: state.settledRequestKey,
1179
+ requestKey,
1159
1180
  isLoading: state.tag === "loading",
1160
1181
  error: state.error,
1161
1182
  creditState
@@ -1402,7 +1423,6 @@ const STRIPE_COMMISSION_FREE_REASONS = [
1402
1423
  "no_commission_plan",
1403
1424
  "billing_evidence_invalid",
1404
1425
  "fee_rounds_to_zero",
1405
- "non_commissionable_scope",
1406
1426
  "payment_not_stripe"
1407
1427
  ];
1408
1428
  const historicalContext = {
@@ -2419,6 +2439,68 @@ function buildOccurrenceRegistrationRequest(options, prepared, method, passId, m
2419
2439
  };
2420
2440
  }
2421
2441
  //#endregion
2442
+ //#region ../blocks/src/system/runtime/nodes/event-registration/useSettledCommerceView.ts
2443
+ function buildCandidate(input) {
2444
+ if (!input.eligibilityIsSettled || !input.eligibility || !input.currentEvent) return null;
2445
+ return {
2446
+ eventSelectionId: input.currentEvent.selectionId,
2447
+ discountContext: resolveDiscountContext({
2448
+ paymentSelection: input.paymentSelection,
2449
+ event: input.currentEvent,
2450
+ eventRequiresPayment: input.eventRequiresPayment,
2451
+ ticketsCount: input.ticketsCount
2452
+ }),
2453
+ subtotalCents: input.eligibility.price,
2454
+ summaryLines: input.eligibility.ticketLines.map((line) => ({
2455
+ pricingOptionId: line.pricingOptionId,
2456
+ label: line.label,
2457
+ quantity: line.quantity,
2458
+ unitPriceCents: line.unitPriceCents,
2459
+ subtotalCents: line.subtotalCents
2460
+ }))
2461
+ };
2462
+ }
2463
+ function eligibilityIsSettled(result) {
2464
+ return result.settledRequestKey === result.requestKey;
2465
+ }
2466
+ function viewIsStale(view, currentEvent, eligibilityState) {
2467
+ return view.eventSelectionId !== currentEvent?.selectionId || eligibilityState?.tag === "failed" || eligibilityState?.tag === "idle";
2468
+ }
2469
+ function requestIsSettled(discountUi) {
2470
+ return discountUi.discountAvailabilityRequestKey === "disabled" || discountUi.settledDiscountAvailabilityRequestKey === discountUi.discountAvailabilityRequestKey;
2471
+ }
2472
+ function discountRequest(view) {
2473
+ const discountContext = view?.discountContext ?? null;
2474
+ return {
2475
+ discountContext,
2476
+ subtotalCents: discountContext?.type === "event" && view?.subtotalCents !== null ? view?.subtotalCents : void 0
2477
+ };
2478
+ }
2479
+ function useSettledCommerceView(input) {
2480
+ const candidate = buildCandidate({
2481
+ eligibilityIsSettled: eligibilityIsSettled(input.eligibilityResult),
2482
+ eligibility: input.eligibility,
2483
+ currentEvent: input.currentEvent,
2484
+ paymentSelection: input.paymentSelection,
2485
+ eventRequiresPayment: input.eventRequiresPayment,
2486
+ ticketsCount: input.ticketsCount
2487
+ });
2488
+ const settledRef = useRef(candidate);
2489
+ if (settledRef.current && viewIsStale(settledRef.current, input.currentEvent, input.eligibilityResult.state)) settledRef.current = null;
2490
+ const requestView = candidate ?? settledRef.current;
2491
+ const discountUi = input.useDiscountCodeUi({
2492
+ api: input.api,
2493
+ ...discountRequest(requestView)
2494
+ });
2495
+ if (candidate && requestIsSettled(discountUi)) settledRef.current = candidate;
2496
+ return {
2497
+ discountUi,
2498
+ discountContext: settledRef.current?.discountContext ?? null,
2499
+ ticketSelectionSubtotalCents: settledRef.current?.subtotalCents ?? null,
2500
+ ticketSelectionSummaryLines: settledRef.current?.summaryLines ?? []
2501
+ };
2502
+ }
2503
+ //#endregion
2422
2504
  //#region ../blocks/src/system/runtime/nodes/event-registration/registrationWizardContext.ts
2423
2505
  function getEventSelectionDefaults(event) {
2424
2506
  const suggestedAmount = getSlidingScaleForEvent(event)?.suggestedAmount;
@@ -2572,10 +2654,6 @@ function isSoldOutWithoutWaitlist(input) {
2572
2654
  }
2573
2655
  //#endregion
2574
2656
  //#region ../blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.ts
2575
- function resolveDiscountSubtotalCents(context, subtotalCents) {
2576
- if (context?.type !== "event" || subtotalCents === null) return void 0;
2577
- return subtotalCents;
2578
- }
2579
2657
  function usesTieredPricing(event) {
2580
2658
  return event !== null && event !== void 0 ? publicEventPricingStrategy(event.pricing) === "tiered" : false;
2581
2659
  }
@@ -3027,30 +3105,15 @@ function useEventRegistrationWizardWithDeps(options, deps) {
3027
3105
  }
3028
3106
  setStep("select-tickets");
3029
3107
  };
3030
- const discountContext = useMemo(() => resolveDiscountContext({
3031
- paymentSelection,
3032
- event: currentEvent,
3033
- eventRequiresPayment,
3034
- ticketsCount
3035
- }), [
3108
+ const { discountUi, discountContext, ticketSelectionSubtotalCents, ticketSelectionSummaryLines } = useSettledCommerceView({
3109
+ api,
3110
+ useDiscountCodeUi: deps.useDiscountCodeUi,
3111
+ eligibilityResult,
3112
+ eligibility,
3036
3113
  currentEvent,
3037
3114
  eventRequiresPayment,
3038
3115
  paymentSelection,
3039
3116
  ticketsCount
3040
- ]);
3041
- const ticketSelectionSubtotalCents = eligibility?.price ?? null;
3042
- const ticketSelectionSummaryLines = useMemo(() => eligibility?.ticketLines.map((line) => ({
3043
- pricingOptionId: line.pricingOptionId,
3044
- label: line.label,
3045
- quantity: line.quantity,
3046
- unitPriceCents: line.unitPriceCents,
3047
- subtotalCents: line.subtotalCents
3048
- })) ?? [], [eligibility]);
3049
- const discountSubtotalCents = resolveDiscountSubtotalCents(discountContext, ticketSelectionSubtotalCents);
3050
- const discountUi = deps.useDiscountCodeUi({
3051
- api,
3052
- discountContext,
3053
- subtotalCents: discountSubtotalCents
3054
3117
  });
3055
3118
  const selectionMethod = paymentSelection.method;
3056
3119
  const shouldShowDiscountToggle = discountContext !== null && discountUi.manualCodeEntryAllowed && (selectionMethod === "stripe" || selectionMethod === "pass_bundle" || selectionMethod === "membership_bundle");
@@ -3215,6 +3278,34 @@ function useEventRegistrationWizardWithDeps(options, deps) {
3215
3278
  };
3216
3279
  }
3217
3280
  //#endregion
3281
+ //#region ../blocks/src/system/runtime/nodes/event-registration/useEventCheckoutHandoffRestore.ts
3282
+ function eventRegistrationReloadTarget(location) {
3283
+ return `${location.pathname}${location.search}#${EVENT_REGISTRATION_ANCHOR_ID}`;
3284
+ }
3285
+ function reloadAtEventRegistration() {
3286
+ const target = eventRegistrationReloadTarget(window.location);
3287
+ window.history.replaceState(window.history.state, "", target);
3288
+ window.location.reload();
3289
+ }
3290
+ const browserCheckoutHandoffRestoreDeps = {
3291
+ addPageShowListener: (listener) => window.addEventListener("pageshow", listener),
3292
+ removePageShowListener: (listener) => window.removeEventListener("pageshow", listener),
3293
+ reloadAtRegistration: reloadAtEventRegistration
3294
+ };
3295
+ function useEventCheckoutHandoffRestore(active) {
3296
+ useEventCheckoutHandoffRestoreWithDeps(active, browserCheckoutHandoffRestoreDeps);
3297
+ }
3298
+ function useEventCheckoutHandoffRestoreWithDeps(active, deps) {
3299
+ useEffect(() => {
3300
+ if (!active) return;
3301
+ const handlePageShow = (event) => {
3302
+ if (event.persisted) deps.reloadAtRegistration();
3303
+ };
3304
+ deps.addPageShowListener(handlePageShow);
3305
+ return () => deps.removePageShowListener(handlePageShow);
3306
+ }, [active, deps]);
3307
+ }
3308
+ //#endregion
3218
3309
  //#region ../blocks/src/system/runtime/nodes/shared/MagicLinkForm.state.ts
3219
3310
  const initialMagicLinkSubmissionState = Object.freeze({ tag: "idle" });
3220
3311
  function magicLinkSubmissionReducer(state, action) {
@@ -5829,6 +5920,7 @@ function EventRegistrationWizard(props) {
5829
5920
  events: events ?? [],
5830
5921
  maxTicketsNum
5831
5922
  });
5923
+ useEventCheckoutHandoffRestore(wizard.step === "redirecting");
5832
5924
  const [bookingOverlayOpen, setBookingOverlayOpen] = useState(false);
5833
5925
  const [floatingPortalRoot, setFloatingPortalRoot] = useState(null);
5834
5926
  useEffect(() => {
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { O as clsx } from "./colorStyles-3013aRAY.mjs";
3
- import { It as err, Lt as ok, Pt as assertNever, dt as themeButtonClassName, t as defineIslandPropsDecoder } from "./propsDecoder-CB2KS_ko.mjs";
4
- import { n as useBlockApi, t as BlockApiProvider } from "./context-Cy1OayHx.mjs";
3
+ import { It as err, Lt as ok, Pt as assertNever, dt as themeButtonClassName, t as defineIslandPropsDecoder } from "./propsDecoder-DiLiBdek.mjs";
4
+ import { n as useBlockApi, t as BlockApiProvider } from "./context-Ces-AgdR.mjs";
5
5
  import { n as isSpamProtectionEnabled, r as AltchaWidget, t as getChallengeUrl } from "./src-B833rYRr.mjs";
6
6
  import { t as FeedbackMessage } from "./FeedbackMessage-CtLvvS_d.mjs";
7
7
  import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
@@ -1,7 +1,7 @@
1
1
  "use client";
2
- import { O as staticHeaderChromeRuntime, dt as themeButtonClassName, r as buildCartDisplay, t as defineIslandPropsDecoder } from "./propsDecoder-CB2KS_ko.mjs";
2
+ import { O as staticHeaderChromeRuntime, dt as themeButtonClassName, r as buildCartDisplay, t as defineIslandPropsDecoder } from "./propsDecoder-DiLiBdek.mjs";
3
3
  import { t as resolveDedicatedCheckoutPath } from "./checkoutRoute-ClwHwYVA.mjs";
4
- import { n as useCommerceCart } from "./shop-commerce-store-BVnJVy7v.mjs";
4
+ import { n as useCommerceCart } from "./shop-commerce-store-PGUbDwqe.mjs";
5
5
  import { t as ModalShell } from "./ModalShell-CqkBvBIC.mjs";
6
6
  import * as React$1 from "react";
7
7
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";