@riverbankcms/sdk 0.85.0 → 0.89.1

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 (166) hide show
  1. package/dist/{PreviewEditorSidebar-4PH35ZIE.mjs → PreviewEditorSidebar-JDR64FEC.mjs} +3 -3
  2. package/dist/{PreviewEditorUI-WHMCRJGM.mjs → PreviewEditorUI-67TMJMAF.mjs} +3 -3
  3. package/dist/SdkPreviewModeRuntime-ZBEMRV7N.mjs +8 -0
  4. package/dist/_dts/api/src/accessAdmin.d.ts +7 -0
  5. package/dist/_dts/api/src/endpoints.d.ts +66 -14
  6. package/dist/_dts/api/src/index.d.ts +5 -2
  7. package/dist/_dts/api/src/launchReadiness.d.ts +3 -3
  8. package/dist/_dts/api/src/mailchimpIntegration.d.ts +215 -0
  9. package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +35 -15
  10. package/dist/_dts/api/src/siteInfrastructure.d.ts +0 -14
  11. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +5 -1
  12. package/dist/_dts/api/src/siteMembers.d.ts +6 -1
  13. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +1 -13
  14. package/dist/_dts/api/src/types.d.ts +7 -4
  15. package/dist/_dts/blocks/src/PageRenderer.d.ts +1 -0
  16. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +4 -0
  17. package/dist/_dts/blocks/src/index.d.ts +2 -1
  18. package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +288 -288
  19. package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +288 -288
  20. package/dist/_dts/blocks/src/system/blocks/cart.d.ts +288 -288
  21. package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +288 -288
  22. package/dist/_dts/blocks/src/system/blocks/collection.d.ts +288 -288
  23. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +42 -0
  24. package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +4 -0
  25. package/dist/_dts/blocks/src/system/blocks/faq.d.ts +288 -288
  26. package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +288 -288
  27. package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +1 -1
  28. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +42 -42
  29. package/dist/_dts/blocks/src/system/blocks/newsletter-signup-destination.d.ts +300 -0
  30. package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +63 -3
  31. package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +288 -288
  32. package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +288 -288
  33. package/dist/_dts/blocks/src/system/blocks/shop.d.ts +288 -288
  34. package/dist/_dts/blocks/src/system/fragments/library/newsletterForm.d.ts +53 -1
  35. package/dist/_dts/blocks/src/system/icons/cta.d.ts +3 -3
  36. package/dist/_dts/blocks/src/system/icons/index.d.ts +1 -0
  37. package/dist/_dts/blocks/src/system/icons/registry.d.ts +2 -2
  38. package/dist/_dts/blocks/src/system/icons/semantic.d.ts +3 -3
  39. package/dist/_dts/blocks/src/system/icons/svg.d.ts +72 -0
  40. package/dist/_dts/blocks/src/system/manifest/richTextSchema.d.ts +27 -0
  41. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +23 -23
  42. package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +11 -2
  43. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +24 -0
  44. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +12 -0
  45. package/dist/_dts/blocks/src/system/runtime/hooks/loadStateError.d.ts +1 -0
  46. package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableDates.d.ts +1 -1
  47. package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableDates.state.d.ts +55 -0
  48. package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableSlots.state.d.ts +39 -0
  49. package/dist/_dts/blocks/src/system/runtime/hooks/useBookingFormConfig.d.ts +4 -27
  50. package/dist/_dts/blocks/src/system/runtime/hooks/useBookingFormConfig.state.d.ts +40 -0
  51. package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +20 -0
  52. package/dist/_dts/blocks/src/system/runtime/hooks/useEventFilters.state.d.ts +31 -0
  53. package/dist/_dts/blocks/src/system/runtime/hooks/useEventPagination.d.ts +3 -3
  54. package/dist/_dts/blocks/src/system/runtime/hooks/useEventPagination.state.d.ts +39 -0
  55. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +1 -0
  56. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +4 -0
  57. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.server.d.ts +1 -1
  58. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventPaginatedListView.client.d.ts +1 -1
  59. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +11 -1
  60. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.client.state.d.ts +24 -2
  61. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.interactive.d.ts +15 -0
  62. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.server.d.ts +1 -1
  63. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.submission.d.ts +32 -0
  64. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +5 -1
  65. package/dist/_dts/blocks/src/system/runtime/nodes/shared/MagicLinkForm.state.d.ts +24 -0
  66. package/dist/_dts/blocks/src/system/runtime/shared/components/ModalShell.d.ts +5 -1
  67. package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.state.d.ts +35 -0
  68. package/dist/_dts/blocks/src/system/runtime/shared/utils/formatting.d.ts +1 -1
  69. package/dist/_dts/content-model/src/entry-slots/types.d.ts +54 -0
  70. package/dist/_dts/content-model/src/referenceFields.d.ts +1 -1
  71. package/dist/_dts/core/src/branded.d.ts +7 -0
  72. package/dist/_dts/core/src/currency-format.d.ts +37 -2
  73. package/dist/_dts/core/src/event-pricing.d.ts +24 -0
  74. package/dist/_dts/core/src/index.d.ts +1 -0
  75. package/dist/_dts/core/src/site-route-target.d.ts +40 -0
  76. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +705 -17
  77. package/dist/_dts/editor-blocks/src/widgets/reference/loaders.d.ts +3 -1
  78. package/dist/_dts/media-core/src/fileDomain.d.ts +4 -0
  79. package/dist/_dts/sdk/src/client/runtimeCachePolicy.d.ts +160 -0
  80. package/dist/_dts/sdk/src/client/types.d.ts +35 -1
  81. package/dist/_dts/sdk/src/config/validation.d.ts +3 -0
  82. package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +3 -0
  83. package/dist/_dts/sdk/src/data/prefetchBlockData.d.ts +3 -9
  84. package/dist/_dts/sdk/src/index.d.ts +3 -1
  85. package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +1 -1
  86. package/dist/_dts/sdk/src/manifest/three-pass-converter.d.ts +7 -18
  87. package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -0
  88. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +3 -1
  89. package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +7 -3
  90. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +4 -24
  91. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +45 -0
  92. package/dist/_dts/sdk/src/version.d.ts +1 -1
  93. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  94. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +9 -9
  95. package/dist/_dts/theme-core/src/schema.d.ts +11 -11
  96. package/dist/{chunk-PYDHOMEO.mjs → chunk-7N46MZHI.mjs} +1 -1
  97. package/dist/{chunk-ZR2GQK2A.mjs → chunk-7YUAXONX.mjs} +1880 -588
  98. package/dist/{chunk-4QNLOTES.mjs → chunk-F645A5UV.mjs} +76 -14
  99. package/dist/{chunk-OCGTXHSO.mjs → chunk-HKJQERFR.mjs} +7 -7
  100. package/dist/{chunk-NFWGLRZZ.mjs → chunk-TGBJWKMP.mjs} +37 -3
  101. package/dist/{chunk-WFPYN7KA.mjs → chunk-ZQRBLCW5.mjs} +2 -2
  102. package/dist/cli/index.mjs +1075 -126
  103. package/dist/client/{accordion-2UZPBMYM.mjs → accordion-MUCVNGQ7.mjs} +2 -2
  104. package/dist/client/{bookingForm-36CWQUMV.mjs → bookingForm-PKD6EFIE.mjs} +193 -77
  105. package/dist/client/bookings.mjs +487 -197
  106. package/dist/client/{carousel-QH77HR6X.mjs → carousel-3TKQSNJC.mjs} +4 -3
  107. package/dist/client/cart-6XHSZK23.mjs +19 -0
  108. package/dist/client/checkout-FVSPM6FI.mjs +19 -0
  109. package/dist/client/{chunk-ZE5G642V.mjs → chunk-25W2EQUN.mjs} +75 -1
  110. package/dist/client/chunk-6N7YRNYU.mjs +183 -0
  111. package/dist/client/{chunk-4OXKTA3D.mjs → chunk-7DH35FGA.mjs} +2 -2
  112. package/dist/client/{chunk-3C2VTPWI.mjs → chunk-CQKKFEQD.mjs} +363 -66
  113. package/dist/client/{chunk-7UCLJ5SP.mjs → chunk-EY42X22F.mjs} +4 -7
  114. package/dist/client/{chunk-SYIJ5JO2.mjs → chunk-FHU6PFPM.mjs} +1 -1
  115. package/dist/client/{chunk-ZKUO52W3.mjs → chunk-LQFDYWPJ.mjs} +1 -1
  116. package/dist/client/chunk-RSQWWUAD.mjs +390 -0
  117. package/dist/client/{chunk-UDNSI5PY.mjs → chunk-STJ2NCQM.mjs} +2 -3
  118. package/dist/client/{chunk-VGDBVNOO.mjs → chunk-UQFY4AHX.mjs} +511 -406
  119. package/dist/client/{chunk-F5VRX5Y6.mjs → chunk-VGLXACVK.mjs} +1 -1
  120. package/dist/client/{chunk-DVNUDUVT.mjs → chunk-WBQG7VJA.mjs} +4 -1
  121. package/dist/client/{chunk-52CGCQ7B.mjs → chunk-ZJZZA5EP.mjs} +10 -80
  122. package/dist/client/{chunk-XSV6KW4D.mjs → chunk-ZT5XE7FK.mjs} +1 -1
  123. package/dist/client/client.mjs +5820 -4782
  124. package/dist/client/{courseRegistration-TMKU6ABO.mjs → courseRegistration-ATZSYDHM.mjs} +7 -7
  125. package/dist/client/{eventCalendar-G6TI32X6.mjs → eventCalendar-6T2UGKKP.mjs} +11 -11
  126. package/dist/client/{eventCombined-SCKEMNAR.mjs → eventCombined-Q4VANXVF.mjs} +11 -11
  127. package/dist/client/{eventDetails-XPIFXXPK.mjs → eventDetails-DW37E7VW.mjs} +11 -11
  128. package/dist/client/{eventListing-7QFMEMGT.mjs → eventListing-XURTSAUW.mjs} +11 -11
  129. package/dist/client/{eventRegistration-TOODSZUI.mjs → eventRegistration-MRKEVAXW.mjs} +11 -11
  130. package/dist/client/{form-MTCMVCZT.mjs → form-WZZFFGMU.mjs} +3 -3
  131. package/dist/client/{headerSection-Y5TMR3TW.mjs → headerSection-EQYVQBLM.mjs} +4 -4
  132. package/dist/client/hooks.mjs +1700 -1412
  133. package/dist/client/{locationMap-RH2LG7FZ.mjs → locationMap-MFF5VAZR.mjs} +3 -4
  134. package/dist/client/{newsletterForm-PCAIPFMA.mjs → newsletterForm-JQ77UYIE.mjs} +127 -43
  135. package/dist/client/{productDetail-OIGDR4YE.mjs → productDetail-25LMT3IZ.mjs} +9 -9
  136. package/dist/client/{productList-4MA5S2CX.mjs → productList-5ABEMKUG.mjs} +9 -9
  137. package/dist/client/rendering/client.mjs +3884 -3722
  138. package/dist/client/rendering/islands.mjs +19 -19
  139. package/dist/client/rendering.mjs +6774 -6331
  140. package/dist/client/shop-OMMQZ6YO.mjs +21 -0
  141. package/dist/preview-next/before-render.mjs +76 -14
  142. package/dist/preview-next/client/runtime.mjs +5 -5
  143. package/dist/preview-next/editor-chrome.css +56 -9
  144. package/dist/preview-next/middleware.mjs +76 -14
  145. package/dist/{sdk-runtime-QLOCYKVU.mjs → sdk-runtime-WNLBZ3ZH.mjs} +6 -6
  146. package/dist/server/components.mjs +2579 -2548
  147. package/dist/server/config-validation.mjs +1737 -1461
  148. package/dist/server/config.mjs +1737 -1461
  149. package/dist/server/data.mjs +1701 -1413
  150. package/dist/server/index.mjs +1048 -400
  151. package/dist/server/next.mjs +3602 -2858
  152. package/dist/server/page-converter.mjs +2193 -1169
  153. package/dist/server/prebuild.mjs +1 -1
  154. package/dist/server/rendering/server.mjs +2770 -2742
  155. package/dist/server/rendering.mjs +2961 -2886
  156. package/dist/server/routing.mjs +2186 -1508
  157. package/dist/server/server.mjs +2237 -1287
  158. package/dist/server/theme-bridge.mjs +260 -0
  159. package/dist/styles/index.css +258 -0
  160. package/package.json +2 -1
  161. package/dist/SdkPreviewModeRuntime-4FGSVUYI.mjs +0 -8
  162. package/dist/client/cart-X4YK4FTW.mjs +0 -19
  163. package/dist/client/checkout-OM2BEPWD.mjs +0 -19
  164. package/dist/client/chunk-3DTWLTXM.mjs +0 -204
  165. package/dist/client/chunk-I2MMZO53.mjs +0 -6
  166. package/dist/client/shop-WXSYV5QO.mjs +0 -21
@@ -806,6 +806,64 @@ var ENDPOINT_DEFINITIONS = {
806
806
  auth: "user",
807
807
  responseKind: "json"
808
808
  },
809
+ listMailchimpAudiences: {
810
+ path: "/sites/{siteId}/integrations/mailchimp/audiences",
811
+ method: "GET",
812
+ tags: [TAG_TEMPLATES.site],
813
+ auth: "user",
814
+ responseKind: "json",
815
+ errors: ["auth:forbidden", "server:internal_error"]
816
+ },
817
+ getMailchimpSignupSyncHealth: {
818
+ path: "/sites/{siteId}/integrations/mailchimp/signup-sync-health",
819
+ method: "GET",
820
+ tags: [TAG_TEMPLATES.site],
821
+ auth: "user",
822
+ responseKind: "json",
823
+ errors: ["auth:forbidden", "server:internal_error"]
824
+ },
825
+ getMailchimpConnection: {
826
+ path: "/sites/{siteId}/integrations/mailchimp/connection",
827
+ method: "GET",
828
+ tags: [TAG_TEMPLATES.site],
829
+ auth: "user",
830
+ responseKind: "json",
831
+ errors: ["auth:forbidden", "server:internal_error"]
832
+ },
833
+ startMailchimpOAuth: {
834
+ path: "/sites/{siteId}/integrations/mailchimp/oauth/start",
835
+ method: "POST",
836
+ tags: [TAG_TEMPLATES.site],
837
+ auth: "user",
838
+ responseKind: "json",
839
+ demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
840
+ errors: ["auth:forbidden", "validation:invalid_input", "server:internal_error"]
841
+ },
842
+ refreshMailchimpAudiences: {
843
+ path: "/sites/{siteId}/integrations/mailchimp/audiences/refresh",
844
+ method: "POST",
845
+ tags: [TAG_TEMPLATES.site],
846
+ auth: "user",
847
+ responseKind: "json",
848
+ demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
849
+ errors: ["auth:forbidden", "server:internal_error"]
850
+ },
851
+ disconnectMailchimp: {
852
+ path: "/sites/{siteId}/integrations/mailchimp/disconnect",
853
+ method: "POST",
854
+ tags: [TAG_TEMPLATES.site],
855
+ auth: "user",
856
+ responseKind: "json",
857
+ demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
858
+ errors: ["auth:forbidden", "server:internal_error"]
859
+ },
860
+ mailchimpOAuthCallback: {
861
+ path: "/auth/mailchimp/callback",
862
+ method: "GET",
863
+ auth: "public",
864
+ responseKind: "void",
865
+ errors: []
866
+ },
809
867
  createNewsletterList: {
810
868
  path: "/sites/{siteId}/newsletter/lists",
811
869
  method: "POST",
@@ -1807,6 +1865,24 @@ var ENDPOINT_DEFINITIONS = {
1807
1865
  auth: "user",
1808
1866
  responseKind: "json"
1809
1867
  },
1868
+ resendSiteInvitation: {
1869
+ path: "/sites/{siteId}/members/invitations/{invitationId}/resend",
1870
+ method: "POST",
1871
+ errors: [
1872
+ "auth:forbidden",
1873
+ "resource:not_found",
1874
+ "validation:invalid_input",
1875
+ "external:service_error",
1876
+ "server:internal_error"
1877
+ ],
1878
+ tags: [
1879
+ "site-{siteId}",
1880
+ "site-members-{siteId}",
1881
+ "site-invite-{invitationId}"
1882
+ ],
1883
+ auth: "user",
1884
+ responseKind: "json"
1885
+ },
1810
1886
  transferSiteOwnership: {
1811
1887
  path: "/sites/{siteId}/members/transfer-ownership",
1812
1888
  method: "POST",
@@ -3030,20 +3106,6 @@ var ENDPOINT_DEFINITIONS = {
3030
3106
  auth: "user",
3031
3107
  responseKind: "json"
3032
3108
  },
3033
- instagramUploadZip: {
3034
- path: "/instagram/upload-zip",
3035
- method: "POST",
3036
- tags: ["instagram-import"],
3037
- auth: "user",
3038
- responseKind: "json"
3039
- },
3040
- createInstagramZipUploadUrl: {
3041
- path: "/instagram/upload-zip-url",
3042
- method: "POST",
3043
- tags: ["instagram-import"],
3044
- auth: "user",
3045
- responseKind: "json"
3046
- },
3047
3109
  getAnalyticsReport: {
3048
3110
  path: "/sites/{siteId}/analytics/report",
3049
3111
  method: "GET",
@@ -6998,7 +7060,7 @@ var SimpleCache = class {
6998
7060
  };
6999
7061
 
7000
7062
  // src/version.ts
7001
- var SDK_VERSION = "0.85.0";
7063
+ var SDK_VERSION = "0.89.1";
7002
7064
 
7003
7065
  // src/client/error.ts
7004
7066
  var RiverbankApiError = class _RiverbankApiError extends Error {
@@ -7155,6 +7217,476 @@ function attachResilienceStatusToError(error, resilienceStatus) {
7155
7217
  return target;
7156
7218
  }
7157
7219
 
7220
+ // src/public-api/runtime.ts
7221
+ var PUBLIC_ENDPOINT_NAMES2 = [
7222
+ "getSite",
7223
+ "getContentByPath",
7224
+ "listPublishedEntries",
7225
+ "getPublishedEntryPreview",
7226
+ "getPublicFormById",
7227
+ "listPublicForms",
7228
+ "getPublicBookingServices",
7229
+ "getPublicChallenge",
7230
+ "listPublicEvents",
7231
+ "batchBlockLoaders",
7232
+ "listPublicCourses",
7233
+ "listPublicTeamMembers",
7234
+ "listPublicProducts",
7235
+ "listPublicPasses",
7236
+ "listPublicMemberships",
7237
+ "resolveEntrySubroute",
7238
+ "resolveEventOccurrence",
7239
+ "checkRedirect",
7240
+ "getRoutableContent",
7241
+ "getPublicRoutableContent",
7242
+ "getPublicSitemapRoutes"
7243
+ ];
7244
+ var API_ENDPOINTS2 = Object.freeze({
7245
+ getSite: {
7246
+ path: "/sites",
7247
+ method: "GET",
7248
+ revalidate: 900,
7249
+ tags: ["riverbank:site", "riverbank:site:id:{id}", "riverbank:site:slug:{slug}", "riverbank:site:domain:{domain}"],
7250
+ auth: "public",
7251
+ responseKind: "json"
7252
+ },
7253
+ getContentByPath: {
7254
+ path: "/sites/{siteId}/pages",
7255
+ method: "GET",
7256
+ tags: ["riverbank:site:{siteId}:routable-content"],
7257
+ auth: "public",
7258
+ responseKind: "json"
7259
+ },
7260
+ listPublishedEntries: {
7261
+ path: "/public/content/{siteId}/{type}/entries",
7262
+ method: "GET",
7263
+ revalidate: 60,
7264
+ tags: ["content-{siteId}-{type}"],
7265
+ auth: "public",
7266
+ responseKind: "json"
7267
+ },
7268
+ getPublishedEntryPreview: {
7269
+ path: "/public/content/{siteId}/{type}/{slug}/preview",
7270
+ method: "GET",
7271
+ revalidate: 60,
7272
+ tags: ["content-{siteId}-{type}-{slug}"],
7273
+ auth: "public",
7274
+ responseKind: "json"
7275
+ },
7276
+ getPublicFormById: {
7277
+ path: "/public/forms/{formId}",
7278
+ method: "GET",
7279
+ revalidate: 60,
7280
+ tags: ["riverbank:form:{formId}"],
7281
+ auth: "public",
7282
+ responseKind: "json"
7283
+ },
7284
+ listPublicForms: {
7285
+ path: "/public/sites/{siteId}/forms",
7286
+ method: "GET",
7287
+ revalidate: 60,
7288
+ tags: ["riverbank:site:{siteId}:forms"],
7289
+ auth: "public",
7290
+ responseKind: "json"
7291
+ },
7292
+ getPublicBookingServices: {
7293
+ path: "/public/bookings/services",
7294
+ method: "GET",
7295
+ revalidate: 60,
7296
+ tags: ["site-{siteId}"],
7297
+ auth: "public",
7298
+ responseKind: "json"
7299
+ },
7300
+ getPublicChallenge: {
7301
+ path: "/public/challenge",
7302
+ method: "GET",
7303
+ auth: "public",
7304
+ responseKind: "text"
7305
+ },
7306
+ listPublicEvents: {
7307
+ path: "/public/sites/{siteId}/events",
7308
+ method: "GET",
7309
+ revalidate: 60,
7310
+ tags: ["riverbank:site:{siteId}:public-events"],
7311
+ auth: "public",
7312
+ responseKind: "json"
7313
+ },
7314
+ batchBlockLoaders: {
7315
+ path: "/public/sites/{siteId}/block-loaders/batch",
7316
+ method: "POST",
7317
+ auth: "public",
7318
+ responseKind: "json"
7319
+ },
7320
+ listPublicCourses: {
7321
+ path: "/public/sites/{siteId}/courses",
7322
+ method: "GET",
7323
+ revalidate: 60,
7324
+ tags: ["riverbank:site:{siteId}:public-courses"],
7325
+ auth: "public",
7326
+ responseKind: "json"
7327
+ },
7328
+ listPublicTeamMembers: {
7329
+ path: "/public/sites/{siteId}/team-members",
7330
+ method: "GET",
7331
+ revalidate: 60,
7332
+ tags: ["riverbank:site:{siteId}:public-team-members"],
7333
+ auth: "public",
7334
+ responseKind: "json"
7335
+ },
7336
+ listPublicProducts: {
7337
+ path: "/public/sites/{siteId}/products",
7338
+ method: "GET",
7339
+ revalidate: 300,
7340
+ tags: ["riverbank:site:{siteId}:public-products"],
7341
+ auth: "public",
7342
+ responseKind: "json"
7343
+ },
7344
+ listPublicPasses: {
7345
+ path: "/public/sites/{siteId}/bookings/products/passes",
7346
+ method: "GET",
7347
+ revalidate: 300,
7348
+ tags: ["riverbank:site:{siteId}:public-passes"],
7349
+ auth: "public",
7350
+ responseKind: "json"
7351
+ },
7352
+ listPublicMemberships: {
7353
+ path: "/public/sites/{siteId}/bookings/products/memberships",
7354
+ method: "GET",
7355
+ revalidate: 300,
7356
+ tags: ["riverbank:site:{siteId}:public-memberships"],
7357
+ auth: "public",
7358
+ responseKind: "json"
7359
+ },
7360
+ resolveEntrySubroute: {
7361
+ path: "/public/sites/{siteId}/routing/subroutes/resolve",
7362
+ method: "GET",
7363
+ revalidate: 60,
7364
+ tags: ["site-{siteId}", "entry-subroute"],
7365
+ auth: "public",
7366
+ responseKind: "json"
7367
+ },
7368
+ resolveEventOccurrence: {
7369
+ path: "/public/sites/{siteId}/events/occurrences/resolve",
7370
+ method: "GET",
7371
+ revalidate: 60,
7372
+ tags: ["riverbank:site:{siteId}:public-events", "event-occurrence"],
7373
+ auth: "public",
7374
+ responseKind: "json"
7375
+ },
7376
+ checkRedirect: {
7377
+ path: "/public/content/redirect",
7378
+ method: "GET",
7379
+ revalidate: 86400,
7380
+ tags: ["redirect"],
7381
+ auth: "public",
7382
+ responseKind: "json"
7383
+ },
7384
+ getRoutableContent: {
7385
+ path: "/sites/{siteId}/routable-content",
7386
+ method: "GET",
7387
+ revalidate: 60,
7388
+ tags: ["riverbank:site:{siteId}:routable-content"],
7389
+ auth: "user",
7390
+ responseKind: "json"
7391
+ },
7392
+ getPublicRoutableContent: {
7393
+ path: "/public/sites/{siteId}/routable-content",
7394
+ method: "GET",
7395
+ revalidate: 60,
7396
+ tags: ["riverbank:site:{siteId}:routable-content"],
7397
+ auth: "public",
7398
+ responseKind: "json"
7399
+ },
7400
+ getPublicSitemapRoutes: {
7401
+ path: "/public/sites/{siteId}/sitemap",
7402
+ method: "GET",
7403
+ revalidate: 60,
7404
+ tags: ["riverbank:site:{siteId}:routable-content", "riverbank:site:{siteId}:settings"],
7405
+ auth: "public",
7406
+ responseKind: "json"
7407
+ }
7408
+ });
7409
+
7410
+ // src/client/runtimeCachePolicy.ts
7411
+ var DEFAULT_PUBLISHED_RUNTIME_CACHE_PAYLOAD_SCHEMA_VERSION = 1;
7412
+ var DEFAULT_STALE_TTL_SEC = 24 * 60 * 60;
7413
+ var DEFAULT_MEMORY_TTL_SEC = 60;
7414
+ var RUNTIME_CACHE_DURABILITY_OVERRIDES = {
7415
+ getSite: {
7416
+ kind: "durable-public-stale",
7417
+ staleTtlSec: DEFAULT_STALE_TTL_SEC
7418
+ },
7419
+ getContentByPath: {
7420
+ kind: "durable-public-stale",
7421
+ staleTtlSec: DEFAULT_STALE_TTL_SEC
7422
+ },
7423
+ listPublishedEntries: {
7424
+ kind: "memory-only",
7425
+ reason: "durable_rollout_pending"
7426
+ },
7427
+ getPublishedEntryPreview: {
7428
+ kind: "memory-only",
7429
+ reason: "durable_rollout_pending"
7430
+ },
7431
+ getPublicFormById: {
7432
+ kind: "memory-only",
7433
+ reason: "durable_rollout_pending"
7434
+ },
7435
+ listPublicForms: {
7436
+ kind: "memory-only",
7437
+ reason: "durable_rollout_pending"
7438
+ },
7439
+ getPublicBookingServices: {
7440
+ kind: "live-only",
7441
+ reason: "safety_sensitive_booking"
7442
+ },
7443
+ getPublicChallenge: {
7444
+ kind: "live-only",
7445
+ reason: "challenge_endpoint"
7446
+ },
7447
+ listPublicEvents: {
7448
+ kind: "memory-only",
7449
+ reason: "durable_rollout_pending"
7450
+ },
7451
+ batchBlockLoaders: {
7452
+ kind: "live-only",
7453
+ reason: "opaque_batch_loader"
7454
+ },
7455
+ listPublicCourses: {
7456
+ kind: "memory-only",
7457
+ reason: "durable_rollout_pending"
7458
+ },
7459
+ listPublicTeamMembers: {
7460
+ kind: "memory-only",
7461
+ reason: "durable_rollout_pending"
7462
+ },
7463
+ listPublicProducts: {
7464
+ kind: "memory-only",
7465
+ reason: "durable_rollout_pending"
7466
+ },
7467
+ listPublicPasses: {
7468
+ kind: "live-only",
7469
+ reason: "safety_sensitive_booking"
7470
+ },
7471
+ listPublicMemberships: {
7472
+ kind: "live-only",
7473
+ reason: "safety_sensitive_booking"
7474
+ },
7475
+ resolveEntrySubroute: {
7476
+ kind: "memory-only",
7477
+ reason: "durable_rollout_pending"
7478
+ },
7479
+ resolveEventOccurrence: {
7480
+ kind: "memory-only",
7481
+ reason: "durable_rollout_pending"
7482
+ },
7483
+ checkRedirect: {
7484
+ kind: "memory-only",
7485
+ reason: "durable_rollout_pending"
7486
+ },
7487
+ getRoutableContent: {
7488
+ kind: "live-only",
7489
+ reason: "auth_required"
7490
+ },
7491
+ getPublicRoutableContent: {
7492
+ kind: "memory-only",
7493
+ reason: "durable_rollout_pending"
7494
+ },
7495
+ getPublicSitemapRoutes: {
7496
+ kind: "memory-only",
7497
+ reason: "durable_rollout_pending"
7498
+ }
7499
+ };
7500
+ var PUBLIC_ENDPOINT_NAME_SET = new Set(PUBLIC_ENDPOINT_NAMES2);
7501
+ function isPublicEndpointName(endpoint) {
7502
+ return PUBLIC_ENDPOINT_NAME_SET.has(endpoint);
7503
+ }
7504
+ function isTruthyParam(value) {
7505
+ return value === true || value === "true" || value === 1 || value === "1";
7506
+ }
7507
+ function isPreviewRequest(endpoint, params) {
7508
+ if (endpoint === "getContentByPath") {
7509
+ return isTruthyParam(params.preview);
7510
+ }
7511
+ if (endpoint === "listPublishedEntries" || endpoint === "resolveEntrySubroute" || endpoint === "resolveEventOccurrence") {
7512
+ return params.stage === "preview";
7513
+ }
7514
+ return false;
7515
+ }
7516
+ function getEndpointFreshTtlSec(endpoint) {
7517
+ return API_ENDPOINTS2[endpoint].revalidate ?? DEFAULT_MEMORY_TTL_SEC;
7518
+ }
7519
+ function assertNever(value) {
7520
+ throw new Error(`Unhandled runtime cache policy override: ${String(value)}`);
7521
+ }
7522
+ function resolveKnownEndpointPolicy(endpoint, params) {
7523
+ if (isPreviewRequest(endpoint, params)) {
7524
+ return { kind: "live-only", endpoint, reason: "preview_request" };
7525
+ }
7526
+ if (endpoint === "getSite" && isTruthyParam(params.force)) {
7527
+ return { kind: "live-only", endpoint, reason: "force_refresh" };
7528
+ }
7529
+ const override = RUNTIME_CACHE_DURABILITY_OVERRIDES[endpoint];
7530
+ if (override.kind === "live-only") {
7531
+ return { kind: "live-only", endpoint, reason: override.reason };
7532
+ }
7533
+ const endpointDefinition = API_ENDPOINTS2[endpoint];
7534
+ if (endpointDefinition.method !== "GET") {
7535
+ return { kind: "live-only", endpoint, reason: "non_get_request" };
7536
+ }
7537
+ if (endpointDefinition.auth === "user") {
7538
+ return { kind: "live-only", endpoint, reason: "auth_required" };
7539
+ }
7540
+ switch (override.kind) {
7541
+ case "durable-public-stale":
7542
+ return {
7543
+ kind: "durable-public-stale",
7544
+ endpoint,
7545
+ freshTtlSec: getEndpointFreshTtlSec(endpoint),
7546
+ staleTtlSec: override.staleTtlSec
7547
+ };
7548
+ case "memory-only":
7549
+ return {
7550
+ kind: "memory-only",
7551
+ endpoint,
7552
+ freshTtlSec: getEndpointFreshTtlSec(endpoint),
7553
+ reason: override.reason
7554
+ };
7555
+ default:
7556
+ return assertNever(override);
7557
+ }
7558
+ }
7559
+ function resolveRuntimeCachePolicy(input) {
7560
+ if (input.method && input.method.toUpperCase() !== "GET") {
7561
+ return {
7562
+ kind: "live-only",
7563
+ endpoint: input.endpoint,
7564
+ reason: "non_get_request"
7565
+ };
7566
+ }
7567
+ if (!isPublicEndpointName(input.endpoint)) {
7568
+ return {
7569
+ kind: "live-only",
7570
+ endpoint: input.endpoint,
7571
+ reason: "unknown_endpoint"
7572
+ };
7573
+ }
7574
+ return resolveKnownEndpointPolicy(input.endpoint, input.params ?? {});
7575
+ }
7576
+ function toNonEmptyString(value) {
7577
+ if (value === null || value === void 0) return null;
7578
+ if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") {
7579
+ return null;
7580
+ }
7581
+ const normalized = String(value).trim();
7582
+ return normalized.length > 0 ? normalized : null;
7583
+ }
7584
+ function normalizeRuntimePublicPath(value) {
7585
+ const raw = toNonEmptyString(value) ?? "/";
7586
+ const withoutQuery = raw.split(/[?#]/, 1)[0] ?? "/";
7587
+ const withLeadingSlash = withoutQuery.startsWith("/") ? withoutQuery : `/${withoutQuery}`;
7588
+ const collapsed = withLeadingSlash.replace(/\/{2,}/g, "/");
7589
+ const withoutTrailingSlash = collapsed.length > 1 ? collapsed.replace(/\/+$/g, "") : collapsed;
7590
+ return withoutTrailingSlash || "/";
7591
+ }
7592
+ function normalizeRuntimeHostname(value) {
7593
+ const trimmed = value.trim().toLowerCase();
7594
+ const url = /^[a-z][a-z0-9+.-]*:\/\//.test(trimmed) ? new URL(trimmed) : new URL(`http://${trimmed}`);
7595
+ return url.hostname.replace(/\.$/, "");
7596
+ }
7597
+ function normalizeScalar(value) {
7598
+ return value.trim().toLowerCase();
7599
+ }
7600
+ function encodeKeyPart(key, value) {
7601
+ return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`;
7602
+ }
7603
+ function unsafeAsPublishedRuntimeCacheKey(value) {
7604
+ return value;
7605
+ }
7606
+ function buildPublishedRuntimeCacheKey(endpoint, normalizedParams) {
7607
+ const encodedParams = Object.entries(normalizedParams).sort(([left], [right]) => left.localeCompare(right)).map(([key, value]) => encodeKeyPart(key, value)).join(":");
7608
+ return unsafeAsPublishedRuntimeCacheKey(
7609
+ `published-runtime:v1:${endpoint}:${encodedParams}`
7610
+ );
7611
+ }
7612
+ function selectSiteRuntimeIdentity(params) {
7613
+ const slug = toNonEmptyString(params.slug);
7614
+ if (slug !== null) return { slug: normalizeScalar(slug) };
7615
+ const domain = toNonEmptyString(params.domain);
7616
+ if (domain !== null) return { domain: normalizeRuntimeHostname(domain) };
7617
+ const id = toNonEmptyString(params.id);
7618
+ if (id !== null) return { id: normalizeScalar(id) };
7619
+ return null;
7620
+ }
7621
+ function deriveGetSiteKey(params) {
7622
+ const identity = selectSiteRuntimeIdentity(params);
7623
+ if (identity === null) {
7624
+ return {
7625
+ ok: false,
7626
+ error: {
7627
+ kind: "missing_site_identity",
7628
+ acceptedParams: ["slug", "domain", "id"]
7629
+ }
7630
+ };
7631
+ }
7632
+ const normalizedParams = {
7633
+ ...identity,
7634
+ currentPath: normalizeRuntimePublicPath(params.currentPath)
7635
+ };
7636
+ return {
7637
+ ok: true,
7638
+ endpoint: "getSite",
7639
+ key: buildPublishedRuntimeCacheKey("getSite", normalizedParams),
7640
+ normalizedParams
7641
+ };
7642
+ }
7643
+ function deriveGetContentByPathKey(params) {
7644
+ const siteId = toNonEmptyString(params.siteId);
7645
+ if (siteId === null) {
7646
+ return {
7647
+ ok: false,
7648
+ error: {
7649
+ kind: "missing_required_param",
7650
+ endpoint: "getContentByPath",
7651
+ param: "siteId"
7652
+ }
7653
+ };
7654
+ }
7655
+ const normalizedParams = {
7656
+ siteId: normalizeScalar(siteId),
7657
+ path: normalizeRuntimePublicPath(params.path)
7658
+ };
7659
+ return {
7660
+ ok: true,
7661
+ endpoint: "getContentByPath",
7662
+ key: buildPublishedRuntimeCacheKey("getContentByPath", normalizedParams),
7663
+ normalizedParams
7664
+ };
7665
+ }
7666
+ var DURABLE_RUNTIME_CACHE_KEY_DERIVERS = {
7667
+ getSite: deriveGetSiteKey,
7668
+ getContentByPath: deriveGetContentByPathKey
7669
+ };
7670
+ function derivePublishedRuntimeCacheKey(input) {
7671
+ const policy = resolveRuntimeCachePolicy({
7672
+ endpoint: input.endpoint,
7673
+ method: "GET",
7674
+ params: input.params
7675
+ });
7676
+ if (policy.kind !== "durable-public-stale") {
7677
+ return {
7678
+ ok: false,
7679
+ error: { kind: "not_durable_eligible", policy }
7680
+ };
7681
+ }
7682
+ switch (input.endpoint) {
7683
+ case "getSite":
7684
+ return DURABLE_RUNTIME_CACHE_KEY_DERIVERS.getSite(input.params);
7685
+ case "getContentByPath":
7686
+ return DURABLE_RUNTIME_CACHE_KEY_DERIVERS.getContentByPath(input.params);
7687
+ }
7688
+ }
7689
+
7158
7690
  // src/client/resilience.ts
7159
7691
  var DEFAULT_RETRY_CONFIG = {
7160
7692
  maxAttempts: 3,
@@ -7464,12 +7996,57 @@ setSdkVersion(SDK_VERSION);
7464
7996
  var DEFAULT_BROWSER_TIMEOUT_MS = 5e3;
7465
7997
  var DEFAULT_SERVER_TIMEOUT_MS = 8e3;
7466
7998
  var MAX_GET_ENTRIES_BY_IDENTIFIERS_REFS = 50;
7999
+ function isDurableRuntimeCacheTier(cacheTier) {
8000
+ return cacheTier === "durable-fresh" || cacheTier === "durable-stale";
8001
+ }
8002
+ function isDegradedResilienceStatus(source, details) {
8003
+ return source === "stale" || source === "error" || isDurableRuntimeCacheTier(details.cacheTier) && details.error !== void 0;
8004
+ }
7467
8005
  function generateRequestId2() {
7468
8006
  return `req-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
7469
8007
  }
7470
8008
  function toRecord(value) {
7471
8009
  return value && typeof value === "object" && !Array.isArray(value) ? value : {};
7472
8010
  }
8011
+ function getRuntimePayloadSiteId(value) {
8012
+ const site = toRecord(value).site;
8013
+ if (!site || typeof site !== "object" || Array.isArray(site)) {
8014
+ return null;
8015
+ }
8016
+ const id = site.id;
8017
+ return typeof id === "string" && id.trim().length > 0 ? id : null;
8018
+ }
8019
+ function getRiverbankErrorInfo(error) {
8020
+ if (error instanceof RiverbankApiError) {
8021
+ return { code: error.code, message: error.message, status: error.status };
8022
+ }
8023
+ if (error instanceof Error) {
8024
+ return { message: error.message };
8025
+ }
8026
+ return { message: String(error) };
8027
+ }
8028
+ function planPublishedRuntimeCache(input) {
8029
+ const policy = resolveRuntimeCachePolicy({
8030
+ endpoint: input.endpoint,
8031
+ method: "GET",
8032
+ params: input.params
8033
+ });
8034
+ if (policy.kind !== "durable-public-stale") {
8035
+ return null;
8036
+ }
8037
+ const keyResult = derivePublishedRuntimeCacheKey(input);
8038
+ if (!keyResult.ok) {
8039
+ return null;
8040
+ }
8041
+ return {
8042
+ cacheKey: keyResult.key,
8043
+ endpoint: keyResult.endpoint,
8044
+ normalizedParams: keyResult.normalizedParams,
8045
+ freshTtlSec: policy.freshTtlSec,
8046
+ staleTtlSec: policy.staleTtlSec,
8047
+ siteId: input.siteId ?? null
8048
+ };
8049
+ }
7473
8050
  function normalizeEntryIdentifierRefs(identifiers) {
7474
8051
  const trimmed = identifiers.map((identifier) => identifier.trim()).filter((identifier) => identifier.length > 0);
7475
8052
  if (trimmed.length === 0) {
@@ -7703,6 +8280,8 @@ function createRiverbankClient(config) {
7703
8280
  source,
7704
8281
  isPreview: details.isPreview,
7705
8282
  cacheKey: details.cacheKey,
8283
+ cacheTier: details.cacheTier,
8284
+ durableCache: details.durableCache,
7706
8285
  error: details.error,
7707
8286
  staleAgeSec: details.staleAgeSec,
7708
8287
  prebuildAgeSec: details.prebuildAgeSec,
@@ -7712,7 +8291,7 @@ function createRiverbankClient(config) {
7712
8291
  };
7713
8292
  lastStatus = status;
7714
8293
  config.resilience?.onStatusChange?.(status);
7715
- const nowDegraded = source === "stale" || source === "error";
8294
+ const nowDegraded = isDegradedResilienceStatus(source, details);
7716
8295
  if (nowDegraded !== isDegraded) {
7717
8296
  isDegraded = nowDegraded;
7718
8297
  config.resilience?.onDegradedMode?.(nowDegraded, status);
@@ -7722,6 +8301,80 @@ function createRiverbankClient(config) {
7722
8301
  resilience: status
7723
8302
  };
7724
8303
  }
8304
+ async function tryPublishedRuntimeCacheFallback(plan, statusDetails, errorInfo) {
8305
+ const reader = config.publishedRuntimeCache?.read;
8306
+ if (!plan || !reader) {
8307
+ return null;
8308
+ }
8309
+ try {
8310
+ const result = await reader({
8311
+ cacheKey: plan.cacheKey,
8312
+ endpoint: plan.endpoint,
8313
+ payloadSchemaVersion: DEFAULT_PUBLISHED_RUNTIME_CACHE_PAYLOAD_SCHEMA_VERSION
8314
+ });
8315
+ if (result.kind === "miss") {
8316
+ return {
8317
+ kind: "miss",
8318
+ diagnostic: {
8319
+ outcome: "miss",
8320
+ reason: result.reason
8321
+ }
8322
+ };
8323
+ }
8324
+ if (result.kind === "error") {
8325
+ return {
8326
+ kind: "error",
8327
+ diagnostic: {
8328
+ outcome: "error",
8329
+ error: result.error
8330
+ }
8331
+ };
8332
+ }
8333
+ return {
8334
+ kind: "hit",
8335
+ result: emitStatus(
8336
+ result.freshness === "fresh" ? "cache" : "stale",
8337
+ result.payload,
8338
+ statusDetails({
8339
+ error: errorInfo,
8340
+ staleAgeSec: result.staleAgeSec,
8341
+ cacheTier: result.freshness === "fresh" ? "durable-fresh" : "durable-stale"
8342
+ })
8343
+ )
8344
+ };
8345
+ } catch (error) {
8346
+ return {
8347
+ kind: "error",
8348
+ diagnostic: {
8349
+ outcome: "error",
8350
+ error: {
8351
+ kind: "adapter_exception",
8352
+ message: error instanceof Error ? error.message : String(error)
8353
+ }
8354
+ }
8355
+ };
8356
+ }
8357
+ }
8358
+ async function writePublishedRuntimeCache(plan, payload) {
8359
+ const writer = config.publishedRuntimeCache?.write;
8360
+ if (!plan || !writer) {
8361
+ return;
8362
+ }
8363
+ try {
8364
+ await writer({
8365
+ cacheKey: plan.cacheKey,
8366
+ endpoint: plan.endpoint,
8367
+ normalizedParams: plan.normalizedParams,
8368
+ payload,
8369
+ siteId: plan.siteId ?? getRuntimePayloadSiteId(payload),
8370
+ freshTtlSec: plan.freshTtlSec,
8371
+ staleTtlSec: plan.staleTtlSec,
8372
+ payloadSchemaVersion: DEFAULT_PUBLISHED_RUNTIME_CACHE_PAYLOAD_SCHEMA_VERSION,
8373
+ writeReason: "live_success"
8374
+ });
8375
+ } catch {
8376
+ }
8377
+ }
7725
8378
  async function resilientFetch(cacheKey, fetcher, options) {
7726
8379
  const requestId = generateRequestId2();
7727
8380
  const startTime = Date.now();
@@ -7737,7 +8390,11 @@ function createRiverbankClient(config) {
7737
8390
  if (cacheEnabled && !options.force) {
7738
8391
  const fresh = cache.getFresh(cacheKey);
7739
8392
  if (fresh !== null) {
7740
- return emitStatus("cache", fresh, statusDetails());
8393
+ return emitStatus(
8394
+ "cache",
8395
+ fresh,
8396
+ statusDetails({ cacheTier: "memory-fresh" })
8397
+ );
7741
8398
  }
7742
8399
  }
7743
8400
  if (resilienceEnabled && circuitBreaker.isOpen()) {
@@ -7749,6 +8406,7 @@ function createRiverbankClient(config) {
7749
8406
  stale.value,
7750
8407
  statusDetails({
7751
8408
  staleAgeSec: stale.staleAgeSec,
8409
+ cacheTier: "memory-stale",
7752
8410
  error: {
7753
8411
  code: "circuit_open",
7754
8412
  message: "Circuit breaker is open"
@@ -7757,6 +8415,15 @@ function createRiverbankClient(config) {
7757
8415
  );
7758
8416
  }
7759
8417
  }
8418
+ const durableFallback = allowFallbacks && !isPreview ? await tryPublishedRuntimeCacheFallback(
8419
+ options.publishedRuntimeCache,
8420
+ statusDetails,
8421
+ { code: "circuit_open", message: "Circuit breaker is open" }
8422
+ ) : null;
8423
+ const durableCache = durableFallback?.kind === "miss" || durableFallback?.kind === "error" ? durableFallback.diagnostic : void 0;
8424
+ if (durableFallback?.kind === "hit") {
8425
+ return durableFallback.result;
8426
+ }
7760
8427
  if (allowFallbacks && !isPreview && options.prebuildFallback) {
7761
8428
  const prebuildResult = options.prebuildFallback();
7762
8429
  if (prebuildResult) {
@@ -7765,6 +8432,8 @@ function createRiverbankClient(config) {
7765
8432
  prebuildResult.data,
7766
8433
  statusDetails({
7767
8434
  prebuildAgeSec: prebuildResult.prebuildAgeSec,
8435
+ cacheTier: "prebuild",
8436
+ durableCache,
7768
8437
  error: {
7769
8438
  code: "circuit_open",
7770
8439
  message: "Circuit breaker is open"
@@ -7778,6 +8447,7 @@ function createRiverbankClient(config) {
7778
8447
  "error",
7779
8448
  null,
7780
8449
  statusDetails({
8450
+ durableCache,
7781
8451
  error: { code: "circuit_open", message: "Circuit breaker is open" }
7782
8452
  })
7783
8453
  );
@@ -7818,6 +8488,9 @@ function createRiverbankClient(config) {
7818
8488
  if (cacheEnabled) {
7819
8489
  cache.set(cacheKey, data);
7820
8490
  }
8491
+ if (allowFallbacks && !isPreview) {
8492
+ await writePublishedRuntimeCache(options.publishedRuntimeCache, data);
8493
+ }
7821
8494
  return emitStatus("live", data, statusDetails());
7822
8495
  } catch (error) {
7823
8496
  if (resilienceEnabled && error instanceof Error) {
@@ -7826,44 +8499,47 @@ function createRiverbankClient(config) {
7826
8499
  if (allowFallbacks && !isPreview && staleIfError && cacheEnabled) {
7827
8500
  const stale = cache.getStale(cacheKey);
7828
8501
  if (stale) {
7829
- const errorInfo2 = error instanceof RiverbankApiError ? {
7830
- code: error.code,
7831
- message: error.message,
7832
- status: error.status
7833
- } : { message: error.message };
8502
+ const errorInfo2 = getRiverbankErrorInfo(error);
7834
8503
  return emitStatus(
7835
8504
  "stale",
7836
8505
  stale.value,
7837
8506
  statusDetails({
7838
8507
  staleAgeSec: stale.staleAgeSec,
8508
+ cacheTier: "memory-stale",
7839
8509
  error: errorInfo2
7840
8510
  })
7841
8511
  );
7842
8512
  }
7843
8513
  }
8514
+ const errorInfo = getRiverbankErrorInfo(error);
8515
+ const durableFallback = allowFallbacks && !isPreview ? await tryPublishedRuntimeCacheFallback(
8516
+ options.publishedRuntimeCache,
8517
+ statusDetails,
8518
+ errorInfo
8519
+ ) : null;
8520
+ const durableCache = durableFallback?.kind === "miss" || durableFallback?.kind === "error" ? durableFallback.diagnostic : void 0;
8521
+ if (durableFallback?.kind === "hit") {
8522
+ return durableFallback.result;
8523
+ }
7844
8524
  if (allowFallbacks && !isPreview && options.prebuildFallback) {
7845
8525
  const prebuildResult = options.prebuildFallback();
7846
8526
  if (prebuildResult) {
7847
- const errorInfo2 = error instanceof RiverbankApiError ? {
7848
- code: error.code,
7849
- message: error.message,
7850
- status: error.status
7851
- } : { message: error.message };
7852
8527
  return emitStatus(
7853
8528
  "prebuild",
7854
8529
  prebuildResult.data,
7855
8530
  statusDetails({
7856
8531
  prebuildAgeSec: prebuildResult.prebuildAgeSec,
7857
- error: errorInfo2
8532
+ cacheTier: "prebuild",
8533
+ durableCache,
8534
+ error: errorInfo
7858
8535
  })
7859
8536
  );
7860
8537
  }
7861
8538
  }
7862
- const errorInfo = error instanceof RiverbankApiError ? { code: error.code, message: error.message, status: error.status } : { message: error.message };
7863
8539
  const failure = emitStatus(
7864
8540
  "error",
7865
8541
  null,
7866
- statusDetails({ error: errorInfo })
8542
+ statusDetails({ error: errorInfo, durableCache })
7867
8543
  );
7868
8544
  throw attachResilienceStatusToError(error, failure.resilience);
7869
8545
  }
@@ -7913,8 +8589,12 @@ function createRiverbankClient(config) {
7913
8589
  );
7914
8590
  }
7915
8591
  const siteIdentifier = slug || domain || id;
7916
- const cacheKey = `site:${siteIdentifier ?? "unknown"}:${currentPath ?? ""}`;
7917
8592
  const siteId = id || slug || domain;
8593
+ const publishedRuntimeCache = planPublishedRuntimeCache({
8594
+ endpoint: "getSite",
8595
+ params: { slug, domain, id, currentPath, force }
8596
+ });
8597
+ const cacheKey = publishedRuntimeCache?.cacheKey ?? `site:${siteIdentifier ?? "unknown"}:${currentPath ?? ""}`;
7918
8598
  return resilientFetch(
7919
8599
  cacheKey,
7920
8600
  async (sig) => {
@@ -7937,13 +8617,19 @@ function createRiverbankClient(config) {
7937
8617
  {
7938
8618
  signal,
7939
8619
  force,
8620
+ publishedRuntimeCache,
7940
8621
  prebuildFallback: prebuildLoader && siteId ? () => prebuildLoader.loadSite(siteId) : void 0
7941
8622
  }
7942
8623
  );
7943
8624
  }
7944
8625
  async function getPageWithResilienceInternal(params) {
7945
8626
  const { siteId, path, preview = false, signal } = params;
7946
- const cacheKey = `page:${siteId}:${path}:${preview}`;
8627
+ const publishedRuntimeCache = planPublishedRuntimeCache({
8628
+ endpoint: "getContentByPath",
8629
+ params: { siteId, path, preview },
8630
+ siteId
8631
+ });
8632
+ const cacheKey = publishedRuntimeCache?.cacheKey ?? `page:${siteId}:${path}:${preview}`;
7947
8633
  return resilientFetch(
7948
8634
  cacheKey,
7949
8635
  async (sig) => {
@@ -7956,6 +8642,7 @@ function createRiverbankClient(config) {
7956
8642
  {
7957
8643
  preview,
7958
8644
  signal,
8645
+ publishedRuntimeCache,
7959
8646
  // Prebuild fallback only for published pages (not preview)
7960
8647
  prebuildFallback: prebuildLoader && !preview ? () => prebuildLoader.loadPage(siteId, path) : void 0
7961
8648
  }
@@ -8152,10 +8839,16 @@ function createRiverbankClient(config) {
8152
8839
  limit,
8153
8840
  from,
8154
8841
  to,
8842
+ afterStartsAt,
8843
+ afterId,
8155
8844
  stage,
8156
8845
  categoryIds,
8157
8846
  venueId,
8847
+ staffMemberId,
8158
8848
  kind,
8849
+ eventSurface,
8850
+ eventPresets,
8851
+ scheduleScope,
8159
8852
  entryId,
8160
8853
  seriesId,
8161
8854
  includeOccurrenceId,
@@ -8164,7 +8857,7 @@ function createRiverbankClient(config) {
8164
8857
  if (!siteId) {
8165
8858
  throw new Error("listPublicEvents() requires siteId");
8166
8859
  }
8167
- const cacheKey = `public-events:${siteId}:${limit ?? ""}:${from ?? ""}:${to ?? ""}:${stage ?? ""}:${categoryIds ?? ""}:${venueId ?? ""}:${kind ?? ""}:${entryId ?? ""}:${seriesId ?? ""}:${includeOccurrenceId ?? ""}`;
8860
+ const cacheKey = `public-events:${siteId}:${limit ?? ""}:${from ?? ""}:${to ?? ""}:${afterStartsAt ?? ""}:${afterId ?? ""}:${stage ?? ""}:${categoryIds ?? ""}:${venueId ?? ""}:${staffMemberId ?? ""}:${kind ?? ""}:${eventSurface ?? ""}:${eventPresets ?? ""}:${scheduleScope ?? ""}:${entryId ?? ""}:${seriesId ?? ""}:${includeOccurrenceId ?? ""}`;
8168
8861
  return resilientFetchData(
8169
8862
  cacheKey,
8170
8863
  async (sig) => {
@@ -8173,10 +8866,16 @@ function createRiverbankClient(config) {
8173
8866
  ...typeof limit === "number" && { limit: String(limit) },
8174
8867
  ...from && { from },
8175
8868
  ...to && { to },
8869
+ ...afterStartsAt && { afterStartsAt },
8870
+ ...afterId && { afterId },
8176
8871
  ...stage && { stage },
8177
8872
  ...categoryIds && { categoryIds },
8178
8873
  ...venueId && { venueId },
8874
+ ...staffMemberId && { staffMemberId },
8179
8875
  ...kind && { kind },
8876
+ ...eventSurface && { eventSurface },
8877
+ ...eventPresets && { eventPresets },
8878
+ ...scheduleScope && { scheduleScope },
8180
8879
  ...entryId && { entryId },
8181
8880
  ...seriesId && { seriesId },
8182
8881
  ...includeOccurrenceId && { includeOccurrenceId }
@@ -8203,6 +8902,9 @@ function createRiverbankClient(config) {
8203
8902
  venueId,
8204
8903
  staffMemberId,
8205
8904
  kind,
8905
+ eventSurface,
8906
+ eventPresets,
8907
+ scheduleScope,
8206
8908
  entryId,
8207
8909
  seriesId,
8208
8910
  includeOccurrenceId,
@@ -8211,7 +8913,7 @@ function createRiverbankClient(config) {
8211
8913
  if (!siteId) {
8212
8914
  throw new Error("getPublicEventDetails() requires siteId");
8213
8915
  }
8214
- const cacheKey = `public-event-details:${siteId}:${limit ?? ""}:${from ?? ""}:${to ?? ""}:${afterStartsAt ?? ""}:${afterId ?? ""}:${stage ?? ""}:${categoryIds ?? ""}:${venueId ?? ""}:${staffMemberId ?? ""}:${kind ?? ""}:${entryId ?? ""}:${seriesId ?? ""}:${includeOccurrenceId ?? ""}`;
8916
+ const cacheKey = `public-event-details:${siteId}:${limit ?? ""}:${from ?? ""}:${to ?? ""}:${afterStartsAt ?? ""}:${afterId ?? ""}:${stage ?? ""}:${categoryIds ?? ""}:${venueId ?? ""}:${staffMemberId ?? ""}:${kind ?? ""}:${eventSurface ?? ""}:${eventPresets ?? ""}:${scheduleScope ?? ""}:${entryId ?? ""}:${seriesId ?? ""}:${includeOccurrenceId ?? ""}`;
8215
8917
  return resilientFetchData(
8216
8918
  cacheKey,
8217
8919
  async (sig) => {
@@ -8234,6 +8936,9 @@ function createRiverbankClient(config) {
8234
8936
  ...venueId && { venueId },
8235
8937
  ...staffMemberId && { staffMemberId },
8236
8938
  ...kind && { kind },
8939
+ ...eventSurface && { eventSurface },
8940
+ ...eventPresets && { eventPresets },
8941
+ ...scheduleScope && { scheduleScope },
8237
8942
  ...entryId && { entryId },
8238
8943
  ...seriesId && { seriesId },
8239
8944
  ...includeOccurrenceId && { includeOccurrenceId }
@@ -8482,6 +9187,48 @@ function err(error) {
8482
9187
  return { ok: false, error };
8483
9188
  }
8484
9189
 
9190
+ // ../core/src/assert-never.ts
9191
+ function assertNever2(value, message = "Unexpected variant") {
9192
+ throw new Error(`${message}: ${String(value)}`);
9193
+ }
9194
+
9195
+ // ../core/src/currency-format.ts
9196
+ var CURRENCY_LOCALE_BY_CODE = {
9197
+ USD: "en-US",
9198
+ GBP: "en-GB",
9199
+ EUR: "de-DE",
9200
+ AUD: "en-AU",
9201
+ CAD: "en-CA",
9202
+ NZD: "en-NZ",
9203
+ JPY: "ja-JP",
9204
+ CNY: "zh-CN",
9205
+ CHF: "de-CH"
9206
+ };
9207
+ function resolveCurrencyLocale(currencyCode, override) {
9208
+ return override ?? CURRENCY_LOCALE_BY_CODE[currencyCode] ?? "en";
9209
+ }
9210
+ function formatCurrencyAmount(amountCents, currency, options) {
9211
+ const currencyCode = currency.toUpperCase();
9212
+ const locale = resolveCurrencyLocale(currencyCode, options?.locale);
9213
+ try {
9214
+ const exactFormatter = new Intl.NumberFormat(locale, {
9215
+ style: "currency",
9216
+ currency: currencyCode
9217
+ });
9218
+ const fractionDigits = options?.decimals === "auto" ? {
9219
+ minimumFractionDigits: 0,
9220
+ maximumFractionDigits: exactFormatter.resolvedOptions().maximumFractionDigits
9221
+ } : {};
9222
+ return new Intl.NumberFormat(locale, {
9223
+ style: "currency",
9224
+ currency: currencyCode,
9225
+ ...fractionDigits
9226
+ }).format(amountCents / 100);
9227
+ } catch {
9228
+ return `${(amountCents / 100).toFixed(2)} ${currencyCode}`;
9229
+ }
9230
+ }
9231
+
8485
9232
  // ../core/src/event-pricing.ts
8486
9233
  function publicEventPricingType(pricing) {
8487
9234
  switch (pricing.kind) {
@@ -8502,6 +9249,7 @@ function isFreePublicEventPriceDisplay(display) {
8502
9249
  return display.display.kind === "free";
8503
9250
  case "exact":
8504
9251
  case "from":
9252
+ case "range":
8505
9253
  case "mixed":
8506
9254
  case "unavailable":
8507
9255
  return false;
@@ -8660,11 +9408,6 @@ function toLocationCoordinates(value) {
8660
9408
  };
8661
9409
  }
8662
9410
 
8663
- // ../core/src/assert-never.ts
8664
- function assertNever(value, message = "Unexpected variant") {
8665
- throw new Error(`${message}: ${String(value)}`);
8666
- }
8667
-
8668
9411
  // ../api/src/accessAdmin.ts
8669
9412
  import { z } from "zod";
8670
9413
  var managedDomainAddOnPricingSnapshotSchema = z.object({
@@ -9864,7 +10607,7 @@ function makeBoundaryId(previousBlockId, nextBlockId) {
9864
10607
  const next = encodeURIComponent(nextBlockId);
9865
10608
  return asDesignBoundaryId(`boundary:${previous}:${next}`);
9866
10609
  }
9867
- function assertNever2(value, message = "Unhandled Theme V2 variant") {
10610
+ function assertNever3(value, message = "Unhandled Theme V2 variant") {
9868
10611
  throw new Error(`${message}: ${String(value)}`);
9869
10612
  }
9870
10613
  function brandNonEmptyString(value, label) {
@@ -16245,7 +16988,7 @@ function themedHeaderShadow(theme) {
16245
16988
  case "high":
16246
16989
  return { elevation: "lg" };
16247
16990
  default:
16248
- return assertNever2(
16991
+ return assertNever3(
16249
16992
  theme.shadow.elevation,
16250
16993
  "Unhandled theme shadow elevation"
16251
16994
  );
@@ -23906,15 +24649,53 @@ var newsletterFormFragment = defineFragment({
23906
24649
  title: "Newsletter Form",
23907
24650
  description: "Newsletter subscription form with preset field configurations.",
23908
24651
  fields: [
24652
+ {
24653
+ id: "destinationProvider",
24654
+ type: "select",
24655
+ label: "Send signups to",
24656
+ description: "Choose where new subscribers from this form should go.",
24657
+ defaultValue: "riverbank",
24658
+ required: true,
24659
+ ui: { intent: "behavior" },
24660
+ options: [
24661
+ { value: "riverbank", label: "Riverbank newsletter" }
24662
+ ]
24663
+ },
23909
24664
  {
23910
24665
  id: "listId",
23911
24666
  type: "reference",
23912
24667
  label: "Newsletter list",
23913
24668
  description: "Select the list new subscribers should be added to.",
23914
- required: true,
24669
+ required: false,
23915
24670
  referenceKind: "newsletterList",
23916
24671
  allowManualEntry: false,
23917
- ui: { intent: "behavior" }
24672
+ ui: {
24673
+ intent: "behavior",
24674
+ visibleWhen: { field: "destinationProvider", equals: "riverbank" }
24675
+ }
24676
+ },
24677
+ {
24678
+ id: "mailchimpAudienceId",
24679
+ type: "reference",
24680
+ label: "Mailchimp audience",
24681
+ description: "Choose the Mailchimp audience for new subscribers.",
24682
+ required: false,
24683
+ referenceKind: "mailchimpAudience",
24684
+ allowManualEntry: false,
24685
+ ui: {
24686
+ intent: "behavior",
24687
+ visibleWhen: { field: "destinationProvider", equals: "mailchimp" }
24688
+ }
24689
+ },
24690
+ {
24691
+ id: "mailchimpTags",
24692
+ type: "text",
24693
+ label: "Mailchimp tags",
24694
+ description: "Optional tags to apply in Mailchimp, separated by commas or semicolons.",
24695
+ ui: {
24696
+ intent: "behavior",
24697
+ visibleWhen: { field: "destinationProvider", equals: "mailchimp" }
24698
+ }
23918
24699
  },
23919
24700
  {
23920
24701
  id: "preset",
@@ -23961,13 +24742,18 @@ var newsletterFormFragment = defineFragment({
23961
24742
  id: "tags",
23962
24743
  type: "text",
23963
24744
  label: "Tags (optional)",
23964
- description: "Optional tags to apply on subscribe (comma or semicolon separated)."
24745
+ description: "Optional tags to apply on subscribe (comma or semicolon separated).",
24746
+ ui: {
24747
+ intent: "behavior",
24748
+ visibleWhen: { field: "destinationProvider", equals: "riverbank" }
24749
+ }
23965
24750
  }
23966
24751
  ],
23967
24752
  layout: [
23968
24753
  el(
23969
24754
  "newsletter-form",
23970
24755
  withApiBindings({
24756
+ destinationProvider: { $bind: { from: "destinationProvider" } },
23971
24757
  listId: { $bind: { from: "listId" } },
23972
24758
  preset: { $bind: { from: "preset" } },
23973
24759
  includePhone: { $bind: { from: "includePhone" } },
@@ -26657,7 +27443,7 @@ function planSiteChromePlacement(positioning) {
26657
27443
  standaloneShellClassName: "fixed left-0 right-0 top-0 z-40 w-full"
26658
27444
  };
26659
27445
  default:
26660
- return assertNever2(positioning);
27446
+ return assertNever3(positioning);
26661
27447
  }
26662
27448
  }
26663
27449
 
@@ -29811,10 +30597,10 @@ var appointmentBookingBlockDefinition = {
29811
30597
  };
29812
30598
 
29813
30599
  // ../blocks/src/system/blocks/event-registration.ts
29814
- import { z as z46 } from "zod";
30600
+ import { z as z47 } from "zod";
29815
30601
 
29816
30602
  // ../blocks/src/system/blocks/events/shared/schemas.ts
29817
- import { z as z42 } from "zod";
30603
+ import { z as z43 } from "zod";
29818
30604
 
29819
30605
  // ../blocks/src/lib/media.ts
29820
30606
  import z39 from "zod";
@@ -29892,296 +30678,346 @@ var mediaSchema2 = z39.discriminatedUnion("type", [
29892
30678
  archiveMediaSchema
29893
30679
  ]);
29894
30680
 
29895
- // ../blocks/src/system/blocks/shared/bookingPaymentTerms.ts
30681
+ // ../blocks/src/system/manifest/richTextSchema.ts
29896
30682
  import { z as z40 } from "zod";
29897
- var bookingDepositRefundPolicySchema = z40.enum([
30683
+ var TipTapMarkSchema = z40.object({
30684
+ type: z40.string(),
30685
+ attrs: z40.record(z40.string(), z40.unknown()).optional()
30686
+ });
30687
+ var TipTapNodeSchema = z40.lazy(
30688
+ () => z40.object({
30689
+ type: z40.string(),
30690
+ content: z40.array(TipTapNodeSchema).optional(),
30691
+ text: z40.string().optional(),
30692
+ attrs: z40.record(z40.string(), z40.unknown()).optional(),
30693
+ marks: z40.array(TipTapMarkSchema).optional()
30694
+ })
30695
+ );
30696
+ var RichTextValueSchema = z40.union([
30697
+ // Canonical: TipTap document directly
30698
+ TipTapNodeSchema,
30699
+ // Legacy (read-tolerance only): wrapped in { doc: {...} }
30700
+ z40.object({
30701
+ doc: TipTapNodeSchema
30702
+ })
30703
+ ]);
30704
+ var RichTextDocSchema = z40.object({
30705
+ type: z40.literal("doc"),
30706
+ content: z40.array(TipTapNodeSchema)
30707
+ });
30708
+ function unwrapRichTextRoot(value) {
30709
+ if (!isRecord2(value)) return value;
30710
+ if (!("doc" in value)) return value;
30711
+ const inner = value.doc;
30712
+ if (isRecord2(inner) && inner.type === "doc") return inner;
30713
+ return value;
30714
+ }
30715
+
30716
+ // ../blocks/src/system/blocks/shared/bookingPaymentTerms.ts
30717
+ import { z as z41 } from "zod";
30718
+ var bookingDepositRefundPolicySchema = z41.enum([
29898
30719
  "refundable",
29899
30720
  "non_refundable"
29900
30721
  ]);
29901
- var bookingInstalmentPlanSchema = z40.union([
29902
- z40.object({
29903
- kind: z40.literal("deposit_plus_one_remainder"),
29904
- depositAmountCents: z40.number().int().min(0),
30722
+ var bookingInstalmentPlanSchema = z41.union([
30723
+ z41.object({
30724
+ kind: z41.literal("deposit_plus_one_remainder"),
30725
+ depositAmountCents: z41.number().int().min(0),
29905
30726
  depositRefundability: bookingDepositRefundPolicySchema,
29906
- remainderDueCount: z40.number().int().positive(),
29907
- intervalUnit: z40.enum(["day", "week", "month"])
30727
+ remainderDueCount: z41.number().int().positive(),
30728
+ intervalUnit: z41.enum(["day", "week", "month"])
29908
30729
  }),
29909
- z40.object({
29910
- kind: z40.literal("deposit_plus_scheduled_instalments"),
29911
- depositAmountCents: z40.number().int().min(0),
30730
+ z41.object({
30731
+ kind: z41.literal("deposit_plus_scheduled_instalments"),
30732
+ depositAmountCents: z41.number().int().min(0),
29912
30733
  depositRefundability: bookingDepositRefundPolicySchema,
29913
- instalmentCount: z40.number().int().positive(),
29914
- intervalCount: z40.number().int().positive(),
29915
- intervalUnit: z40.enum(["day", "week", "month"])
30734
+ instalmentCount: z41.number().int().positive(),
30735
+ intervalCount: z41.number().int().positive(),
30736
+ intervalUnit: z41.enum(["day", "week", "month"])
29916
30737
  }),
29917
- z40.object({
29918
- kind: z40.literal("equal_scheduled_instalments"),
29919
- instalmentCount: z40.number().int().positive(),
29920
- intervalCount: z40.number().int().positive(),
29921
- intervalUnit: z40.enum(["day", "week", "month"])
30738
+ z41.object({
30739
+ kind: z41.literal("equal_scheduled_instalments"),
30740
+ instalmentCount: z41.number().int().positive(),
30741
+ intervalCount: z41.number().int().positive(),
30742
+ intervalUnit: z41.enum(["day", "week", "month"])
29922
30743
  })
29923
30744
  ]);
29924
- var bookingFlexibleBalanceDueDateRuleSchema = z40.union([
29925
- z40.object({
29926
- kind: z40.literal("relative_to_start_date"),
29927
- daysBeforeStart: z40.number().int().positive()
30745
+ var bookingFlexibleBalanceDueDateRuleSchema = z41.union([
30746
+ z41.object({
30747
+ kind: z41.literal("relative_to_start_date"),
30748
+ daysBeforeStart: z41.number().int().positive()
29928
30749
  }),
29929
- z40.object({
29930
- kind: z40.literal("fixed_calendar_date"),
29931
- dueAt: z40.string().datetime()
30750
+ z41.object({
30751
+ kind: z41.literal("fixed_calendar_date"),
30752
+ dueAt: z41.string().datetime()
29932
30753
  })
29933
30754
  ]);
29934
- var bookingFlexibleBalanceConfigSchema = z40.object({
29935
- upfrontAmountCents: z40.number().int().min(0),
30755
+ var bookingFlexibleBalanceConfigSchema = z41.object({
30756
+ upfrontAmountCents: z41.number().int().min(0),
29936
30757
  dueDateRule: bookingFlexibleBalanceDueDateRuleSchema,
29937
30758
  depositRefundability: bookingDepositRefundPolicySchema
29938
30759
  });
29939
- var blockBookingPaymentCollectionOptionSchema = z40.union([
29940
- z40.object({
29941
- kind: z40.literal("upfront")
30760
+ var blockBookingPaymentCollectionOptionSchema = z41.union([
30761
+ z41.object({
30762
+ kind: z41.literal("upfront")
29942
30763
  }),
29943
- z40.object({
29944
- kind: z40.literal("deferred_manual")
30764
+ z41.object({
30765
+ kind: z41.literal("deferred_manual")
29945
30766
  }),
29946
- z40.object({
29947
- kind: z40.literal("instalment_plan"),
30767
+ z41.object({
30768
+ kind: z41.literal("instalment_plan"),
29948
30769
  plan: bookingInstalmentPlanSchema
29949
30770
  }),
29950
- z40.object({
29951
- kind: z40.literal("flexible_balance"),
30771
+ z41.object({
30772
+ kind: z41.literal("flexible_balance"),
29952
30773
  config: bookingFlexibleBalanceConfigSchema
29953
30774
  })
29954
30775
  ]);
29955
- var blockBookingPaymentTermsSchema = z40.object({
29956
- allowedOptions: z40.array(blockBookingPaymentCollectionOptionSchema).min(1)
30776
+ var blockBookingPaymentTermsSchema = z41.object({
30777
+ allowedOptions: z41.array(blockBookingPaymentCollectionOptionSchema).min(1)
29957
30778
  });
29958
30779
 
29959
30780
  // ../blocks/src/system/blocks/courses/shared/schemas.ts
29960
- import { z as z41 } from "zod";
29961
- var courseVenueSchema = z41.object({
29962
- id: z41.string(),
29963
- name: z41.string(),
29964
- address: z41.string().nullable()
29965
- });
29966
- var courseSessionSchema = z41.object({
29967
- id: z41.string(),
29968
- startsAt: z41.string(),
29969
- endsAt: z41.string(),
29970
- timeZone: z41.string(),
29971
- capacityOverride: z41.number().nullable().optional(),
29972
- overrides: z41.record(z41.string(), z41.unknown()).nullable().optional()
29973
- });
29974
- var courseTeamMemberSummarySchema = z41.object({
29975
- id: z41.string(),
29976
- name: z41.string(),
29977
- roleLabel: z41.string().nullable(),
29978
- summary: z41.string().nullable(),
29979
- profilePath: z41.string().nullable()
29980
- });
29981
- var coursePricingOptionSchema = z41.object({
29982
- id: z41.string(),
29983
- name: z41.string(),
29984
- description: z41.string().nullable(),
29985
- priceAmount: z41.number(),
29986
- isActive: z41.boolean(),
29987
- sortOrder: z41.number(),
29988
- capacityLimit: z41.number().nullable(),
29989
- saleStartsAt: z41.string().nullable(),
29990
- saleEndsAt: z41.string().nullable(),
29991
- attendanceScope: z41.enum(["in_person", "online", "both"]).nullable().optional()
29992
- });
29993
- var coursePricingSchema = z41.object({
29994
- bookingRequirement: z41.enum(["none", "required"]),
29995
- pricingStrategy: z41.enum(["free", "single", "tiered"]),
29996
- currency: z41.string(),
29997
- singlePriceAmount: z41.number().nullable(),
30781
+ import { z as z42 } from "zod";
30782
+ var courseVenueSchema = z42.object({
30783
+ id: z42.string(),
30784
+ name: z42.string(),
30785
+ address: z42.string().nullable()
30786
+ });
30787
+ var courseSessionSchema = z42.object({
30788
+ id: z42.string(),
30789
+ startsAt: z42.string(),
30790
+ endsAt: z42.string(),
30791
+ timeZone: z42.string(),
30792
+ capacityOverride: z42.number().nullable().optional(),
30793
+ overrides: z42.record(z42.string(), z42.unknown()).nullable().optional()
30794
+ });
30795
+ var courseTeamMemberSummarySchema = z42.object({
30796
+ id: z42.string(),
30797
+ name: z42.string(),
30798
+ roleLabel: z42.string().nullable(),
30799
+ summary: z42.string().nullable(),
30800
+ profilePath: z42.string().nullable()
30801
+ });
30802
+ var coursePricingOptionSchema = z42.object({
30803
+ id: z42.string(),
30804
+ name: z42.string(),
30805
+ description: z42.string().nullable(),
30806
+ priceAmount: z42.number(),
30807
+ isActive: z42.boolean(),
30808
+ sortOrder: z42.number(),
30809
+ capacityLimit: z42.number().nullable(),
30810
+ saleStartsAt: z42.string().nullable(),
30811
+ saleEndsAt: z42.string().nullable(),
30812
+ attendanceScope: z42.enum(["in_person", "online", "both"]).nullable().optional()
30813
+ });
30814
+ var coursePricingSchema = z42.object({
30815
+ bookingRequirement: z42.enum(["none", "required"]),
30816
+ pricingStrategy: z42.enum(["free", "single", "tiered"]),
30817
+ currency: z42.string(),
30818
+ singlePriceAmount: z42.number().nullable(),
29998
30819
  paymentTerms: blockBookingPaymentTermsSchema,
29999
- options: z41.array(coursePricingOptionSchema)
30000
- });
30001
- var publicCourseSchema = z41.object({
30002
- id: z41.string(),
30003
- title: z41.string(),
30004
- slug: z41.string(),
30005
- description: z41.unknown().nullable(),
30006
- teamMembers: z41.array(courseTeamMemberSummarySchema).optional(),
30007
- enrollmentOpen: z41.boolean(),
30820
+ options: z42.array(coursePricingOptionSchema)
30821
+ });
30822
+ var publicCourseSchema = z42.object({
30823
+ id: z42.string(),
30824
+ title: z42.string(),
30825
+ slug: z42.string(),
30826
+ description: z42.unknown().nullable(),
30827
+ teamMembers: z42.array(courseTeamMemberSummarySchema).optional(),
30828
+ enrollmentOpen: z42.boolean(),
30008
30829
  pricing: coursePricingSchema.optional(),
30009
- priceCents: z41.number().nullable(),
30010
- currency: z41.string(),
30830
+ priceCents: z42.number().nullable(),
30831
+ currency: z42.string(),
30011
30832
  paymentTerms: blockBookingPaymentTermsSchema,
30012
- enrollmentCapacity: z41.number().nullable(),
30013
- acceptsMemberships: z41.boolean(),
30014
- status: z41.enum(["active", "draft", "cancelled"]),
30015
- sessionsCount: z41.number(),
30016
- enrolledCount: z41.number(),
30017
- availableSpots: z41.number().nullable(),
30018
- sessions: z41.array(courseSessionSchema),
30833
+ enrollmentCapacity: z42.number().nullable(),
30834
+ acceptsMemberships: z42.boolean(),
30835
+ status: z42.enum(["active", "draft", "cancelled"]),
30836
+ sessionsCount: z42.number(),
30837
+ enrolledCount: z42.number(),
30838
+ availableSpots: z42.number().nullable(),
30839
+ sessions: z42.array(courseSessionSchema),
30019
30840
  venue: courseVenueSchema.nullable(),
30020
- contentEntryId: z41.string().nullable()
30841
+ contentEntryId: z42.string().nullable()
30021
30842
  });
30022
- var publicCoursesArraySchema = z41.array(publicCourseSchema);
30843
+ var publicCoursesArraySchema = z42.array(publicCourseSchema);
30023
30844
 
30024
30845
  // ../blocks/src/system/blocks/events/shared/schemas.ts
30025
- var eventPresetSchema = z42.enum(["event", "class", "workshop", "retreat", "performance"]);
30026
- var eventScheduleScopeSchema = z42.enum(["recurring", "oneOff"]);
30027
- var eventDestinationModeSchema = z42.enum(["cms-managed", "system-managed"]);
30028
- var eventVenueSchema = z42.object({
30029
- id: z42.string(),
30030
- name: z42.string(),
30031
- address: z42.string().nullable(),
30032
- location: z42.object({
30033
- lat: z42.number(),
30034
- lng: z42.number()
30846
+ var eventPresetSchema = z43.enum(["event", "class", "workshop", "retreat", "performance"]);
30847
+ var eventScheduleScopeSchema = z43.enum(["recurring", "oneOff"]);
30848
+ var eventDestinationModeSchema = z43.enum(["cms-managed", "system-managed"]);
30849
+ var eventVenueSchema = z43.object({
30850
+ id: z43.string(),
30851
+ name: z43.string(),
30852
+ address: z43.string().nullable(),
30853
+ location: z43.object({
30854
+ lat: z43.number(),
30855
+ lng: z43.number()
30035
30856
  }).nullable()
30036
30857
  });
30037
- var eventCategorySchema = z42.object({
30038
- id: z42.string(),
30039
- name: z42.string(),
30040
- color: z42.string().nullable()
30041
- });
30042
- var pricingTypeSchema = z42.enum(["free", "paid"]);
30043
- var accessRestrictionSchema = z42.enum(["none", "category"]);
30044
- var eventPricingModeSchema = z42.enum(["single", "ticket_types"]);
30045
- var publicCoursePriceDisplaySchema = z42.discriminatedUnion("kind", [
30046
- z42.object({ kind: z42.literal("free"), currency: z42.string() }),
30047
- z42.object({ kind: z42.literal("exact"), amount: z42.number(), currency: z42.string() }),
30048
- z42.object({ kind: z42.literal("from"), amount: z42.number(), currency: z42.string() }),
30049
- z42.object({ kind: z42.literal("unavailable"), currency: z42.string() })
30858
+ var eventCategorySchema = z43.object({
30859
+ id: z43.string(),
30860
+ name: z43.string(),
30861
+ color: z43.string().nullable()
30862
+ });
30863
+ var pricingTypeSchema = z43.enum(["free", "paid"]);
30864
+ var accessRestrictionSchema = z43.enum(["none", "category"]);
30865
+ var eventPricingModeSchema = z43.enum(["single", "ticket_types"]);
30866
+ var publicCoursePriceDisplaySchema = z43.discriminatedUnion("kind", [
30867
+ z43.object({ kind: z43.literal("free"), currency: z43.string() }),
30868
+ z43.object({ kind: z43.literal("exact"), amount: z43.number(), currency: z43.string() }),
30869
+ z43.object({ kind: z43.literal("from"), amount: z43.number(), currency: z43.string() }),
30870
+ z43.object({ kind: z43.literal("unavailable"), currency: z43.string() })
30050
30871
  ]);
30051
- var publicEventPriceDisplaySchema = z42.discriminatedUnion("kind", [
30052
- z42.object({ kind: z42.literal("free"), currency: z42.string() }),
30053
- z42.object({ kind: z42.literal("exact"), amount: z42.number(), currency: z42.string() }),
30054
- z42.object({ kind: z42.literal("from"), amount: z42.number(), currency: z42.string() }),
30055
- z42.object({ kind: z42.literal("mixed"), paidFromAmount: z42.number(), currency: z42.string() }),
30056
- z42.object({ kind: z42.literal("unavailable"), currency: z42.string() }),
30057
- z42.object({ kind: z42.literal("course"), display: publicCoursePriceDisplaySchema })
30872
+ var publicEventPriceDisplaySchema = z43.discriminatedUnion("kind", [
30873
+ z43.object({ kind: z43.literal("free"), currency: z43.string() }),
30874
+ z43.object({ kind: z43.literal("exact"), amount: z43.number(), currency: z43.string() }),
30875
+ z43.object({ kind: z43.literal("from"), amount: z43.number(), currency: z43.string() }),
30876
+ z43.object({ kind: z43.literal("range"), minAmount: z43.number(), maxAmount: z43.number(), currency: z43.string() }),
30877
+ z43.object({
30878
+ kind: z43.literal("mixed"),
30879
+ paidFromAmount: z43.number(),
30880
+ paidToAmount: z43.number(),
30881
+ currency: z43.string()
30882
+ }),
30883
+ z43.object({ kind: z43.literal("unavailable"), currency: z43.string() }),
30884
+ z43.object({ kind: z43.literal("course"), display: publicCoursePriceDisplaySchema })
30058
30885
  ]);
30059
- var publicEventTicketTypePriceDisplaySchema = z42.union([
30060
- z42.object({ kind: z42.literal("free"), currency: z42.string() }),
30061
- z42.object({ kind: z42.literal("exact"), amount: z42.number(), currency: z42.string() }),
30062
- z42.object({ kind: z42.literal("from"), amount: z42.number(), currency: z42.string() }),
30063
- z42.object({ kind: z42.literal("mixed"), paidFromAmount: z42.number(), currency: z42.string() }),
30064
- z42.object({ kind: z42.literal("unavailable"), currency: z42.string() })
30886
+ var publicEventTicketTypePriceDisplaySchema = z43.union([
30887
+ z43.object({ kind: z43.literal("free"), currency: z43.string() }),
30888
+ z43.object({ kind: z43.literal("exact"), amount: z43.number(), currency: z43.string() }),
30889
+ z43.object({ kind: z43.literal("from"), amount: z43.number(), currency: z43.string() }),
30890
+ z43.object({ kind: z43.literal("range"), minAmount: z43.number(), maxAmount: z43.number(), currency: z43.string() }),
30891
+ z43.object({
30892
+ kind: z43.literal("mixed"),
30893
+ paidFromAmount: z43.number(),
30894
+ paidToAmount: z43.number(),
30895
+ currency: z43.string()
30896
+ }),
30897
+ z43.object({ kind: z43.literal("unavailable"), currency: z43.string() })
30065
30898
  ]);
30066
- var publicEventAttendanceModeSchema = z42.enum(["in_person", "online"]);
30067
- var publicEventAttendanceModeAvailabilitySchema = z42.object({
30899
+ var publicEventAttendanceModeSchema = z43.enum(["in_person", "online"]);
30900
+ var publicEventAttendanceModeAvailabilitySchema = z43.object({
30068
30901
  mode: publicEventAttendanceModeSchema,
30069
- capacity: z42.number().nullable(),
30070
- registeredCount: z42.number(),
30071
- availableSpots: z42.number().nullable(),
30072
- waitlistEnabled: z42.boolean()
30073
- });
30074
- var publicEventTicketTypeAvailabilitySchema = z42.union([
30075
- z42.object({
30076
- kind: z42.literal("available"),
30077
- remainingCapacity: z42.number().nullable()
30902
+ capacity: z43.number().nullable(),
30903
+ registeredCount: z43.number(),
30904
+ availableSpots: z43.number().nullable(),
30905
+ waitlistEnabled: z43.boolean()
30906
+ });
30907
+ var publicEventTicketTypeAvailabilitySchema = z43.union([
30908
+ z43.object({
30909
+ kind: z43.literal("available"),
30910
+ remainingCapacity: z43.number().nullable()
30078
30911
  }),
30079
- z42.object({
30080
- kind: z42.literal("unavailable"),
30081
- reason: z42.enum(["inactive", "not_on_sale_yet", "sale_ended", "sold_out", "event_sold_out"]),
30082
- remainingCapacity: z42.number().nullable()
30912
+ z43.object({
30913
+ kind: z43.literal("unavailable"),
30914
+ reason: z43.enum(["inactive", "not_on_sale_yet", "sale_ended", "sold_out", "event_sold_out"]),
30915
+ remainingCapacity: z43.number().nullable()
30083
30916
  })
30084
30917
  ]);
30085
- var publicEventTicketTypeSchema = z42.object({
30086
- id: z42.string(),
30087
- siteId: z42.string(),
30088
- eventSeriesId: z42.string(),
30089
- name: z42.string(),
30090
- description: z42.string().nullable(),
30091
- priceAmount: z42.number(),
30092
- isActive: z42.boolean(),
30093
- sortOrder: z42.number(),
30094
- capacityMode: z42.enum(["limited", "unlimited"]),
30095
- capacityLimit: z42.number().nullable(),
30096
- attendanceScope: z42.enum(["in_person", "online", "both"]).optional(),
30097
- saleStartsAt: z42.string().nullable(),
30098
- saleEndsAt: z42.string().nullable(),
30918
+ var publicEventTicketTypeSchema = z43.object({
30919
+ id: z43.string(),
30920
+ siteId: z43.string(),
30921
+ eventSeriesId: z43.string(),
30922
+ name: z43.string(),
30923
+ description: z43.string().nullable(),
30924
+ priceAmount: z43.number(),
30925
+ isActive: z43.boolean(),
30926
+ sortOrder: z43.number(),
30927
+ capacityMode: z43.enum(["limited", "unlimited"]),
30928
+ capacityLimit: z43.number().nullable(),
30929
+ attendanceScope: z43.enum(["in_person", "online", "both"]).optional(),
30930
+ saleStartsAt: z43.string().nullable(),
30931
+ saleEndsAt: z43.string().nullable(),
30099
30932
  availability: publicEventTicketTypeAvailabilitySchema,
30100
- createdAt: z42.string(),
30101
- updatedAt: z42.string()
30102
- });
30103
- var publicEventPricingSchema = z42.discriminatedUnion("kind", [
30104
- z42.object({
30105
- kind: z42.literal("drop_in"),
30106
- currency: z42.string(),
30107
- display: z42.object({ kind: z42.literal("free"), currency: z42.string() })
30933
+ createdAt: z43.string(),
30934
+ updatedAt: z43.string()
30935
+ });
30936
+ var publicEventPricingSchema = z43.discriminatedUnion("kind", [
30937
+ z43.object({
30938
+ kind: z43.literal("drop_in"),
30939
+ currency: z43.string(),
30940
+ display: z43.object({ kind: z43.literal("free"), currency: z43.string() })
30108
30941
  }),
30109
- z42.object({
30110
- kind: z42.literal("free_registration"),
30111
- currency: z42.string(),
30112
- display: z42.object({ kind: z42.literal("free"), currency: z42.string() })
30942
+ z43.object({
30943
+ kind: z43.literal("free_registration"),
30944
+ currency: z43.string(),
30945
+ display: z43.object({ kind: z43.literal("free"), currency: z43.string() })
30113
30946
  }),
30114
- z42.object({
30115
- kind: z42.literal("single_paid"),
30116
- amount: z42.number(),
30117
- currency: z42.string(),
30118
- display: z42.object({ kind: z42.literal("exact"), amount: z42.number(), currency: z42.string() })
30947
+ z43.object({
30948
+ kind: z43.literal("single_paid"),
30949
+ amount: z43.number(),
30950
+ currency: z43.string(),
30951
+ display: z43.object({ kind: z43.literal("exact"), amount: z43.number(), currency: z43.string() })
30119
30952
  }),
30120
- z42.object({
30121
- kind: z42.literal("ticket_types"),
30122
- currency: z42.string(),
30123
- ticketTypes: z42.array(publicEventTicketTypeSchema),
30953
+ z43.object({
30954
+ kind: z43.literal("ticket_types"),
30955
+ currency: z43.string(),
30956
+ ticketTypes: z43.array(publicEventTicketTypeSchema),
30124
30957
  display: publicEventTicketTypePriceDisplaySchema
30125
30958
  }),
30126
- z42.object({
30127
- kind: z42.literal("course"),
30128
- display: z42.object({ kind: z42.literal("course"), display: publicCoursePriceDisplaySchema })
30959
+ z43.object({
30960
+ kind: z43.literal("course"),
30961
+ display: z43.object({ kind: z43.literal("course"), display: publicCoursePriceDisplaySchema })
30129
30962
  })
30130
30963
  ]);
30131
- var publicTeamMemberSummarySchema = z42.object({
30132
- id: z42.string(),
30133
- name: z42.string(),
30134
- roleLabel: z42.string().nullable(),
30135
- summary: z42.string().nullable(),
30136
- profilePath: z42.string().nullable()
30964
+ var publicTeamMemberSummarySchema = z43.object({
30965
+ id: z43.string(),
30966
+ name: z43.string(),
30967
+ roleLabel: z43.string().nullable(),
30968
+ summary: z43.string().nullable(),
30969
+ profilePath: z43.string().nullable()
30137
30970
  });
30138
- var publicEventSchema = z42.object({
30139
- kind: z42.enum(["event", "course_session"]).optional(),
30971
+ var publicEventSchema = z43.object({
30972
+ kind: z43.enum(["event", "course_session"]).optional(),
30140
30973
  eventPreset: eventPresetSchema.optional(),
30141
30974
  eventDestinationMode: eventDestinationModeSchema.optional(),
30142
30975
  scheduleScope: eventScheduleScopeSchema.optional(),
30143
- id: z42.string(),
30144
- occurrenceId: z42.string(),
30145
- seriesId: z42.string(),
30146
- title: z42.string(),
30147
- description: z42.string().nullable(),
30148
- presentation: z42.object({
30149
- cardTitleOverride: z42.string().nullable().optional(),
30150
- summary: z42.string().nullable().optional(),
30976
+ id: z43.string(),
30977
+ occurrenceId: z43.string(),
30978
+ seriesId: z43.string(),
30979
+ title: z43.string(),
30980
+ description: z43.string().nullable(),
30981
+ content: z43.object({
30982
+ body: RichTextDocSchema.nullable().optional()
30983
+ }).optional(),
30984
+ presentation: z43.object({
30985
+ cardTitleOverride: z43.string().nullable().optional(),
30986
+ summary: z43.string().nullable().optional(),
30151
30987
  image: mediaSchema2.nullable().optional()
30152
30988
  }).optional(),
30153
- slug: z42.string(),
30154
- path: z42.string(),
30155
- requiresRegistration: z42.boolean(),
30156
- deliveryMode: z42.enum(["in_person", "online", "hybrid"]),
30157
- attendanceModes: z42.array(publicEventAttendanceModeAvailabilitySchema),
30158
- startsAt: z42.string(),
30159
- endsAt: z42.string(),
30160
- capacity: z42.number().nullable(),
30161
- registeredCount: z42.number(),
30162
- availableSpots: z42.number().nullable(),
30163
- waitlistEnabled: z42.boolean(),
30989
+ slug: z43.string(),
30990
+ path: z43.string(),
30991
+ requiresRegistration: z43.boolean(),
30992
+ deliveryMode: z43.enum(["in_person", "online", "hybrid"]),
30993
+ attendanceModes: z43.array(publicEventAttendanceModeAvailabilitySchema),
30994
+ startsAt: z43.string(),
30995
+ endsAt: z43.string(),
30996
+ capacity: z43.number().nullable(),
30997
+ registeredCount: z43.number(),
30998
+ availableSpots: z43.number().nullable(),
30999
+ waitlistEnabled: z43.boolean(),
30164
31000
  venue: eventVenueSchema.nullable(),
30165
31001
  eventCategory: eventCategorySchema.nullable(),
30166
- teamMembers: z42.array(publicTeamMemberSummarySchema).optional(),
30167
- status: z42.enum(["active", "draft", "archived"]).optional(),
30168
- timeZone: z42.string(),
31002
+ teamMembers: z43.array(publicTeamMemberSummarySchema).optional(),
31003
+ status: z43.enum(["active", "draft", "archived"]).optional(),
31004
+ timeZone: z43.string(),
30169
31005
  pricing: publicEventPricingSchema,
30170
31006
  paymentTerms: blockBookingPaymentTermsSchema,
30171
31007
  accessRestriction: accessRestrictionSchema,
30172
- allowedCategoryIds: z42.array(z42.string()),
30173
- requireGuestDetails: z42.boolean().optional(),
30174
- acceptsPasses: z42.boolean().optional(),
30175
- acceptsMemberships: z42.boolean().optional(),
30176
- course: z42.object({
30177
- id: z42.string(),
31008
+ allowedCategoryIds: z43.array(z43.string()),
31009
+ requireGuestDetails: z43.boolean().optional(),
31010
+ acceptsPasses: z43.boolean().optional(),
31011
+ acceptsMemberships: z43.boolean().optional(),
31012
+ course: z43.object({
31013
+ id: z43.string(),
30178
31014
  pricing: coursePricingSchema.optional(),
30179
- priceCents: z42.number().nullable(),
30180
- currency: z42.string(),
30181
- enrollmentOpen: z42.boolean()
31015
+ priceCents: z43.number().nullable(),
31016
+ currency: z43.string(),
31017
+ enrollmentOpen: z43.boolean()
30182
31018
  }).nullable().optional()
30183
31019
  });
30184
- var publicEventsArraySchema = z42.array(publicEventSchema);
31020
+ var publicEventsArraySchema = z43.array(publicEventSchema);
30185
31021
 
30186
31022
  // ../blocks/src/system/blocks/events/shared/fields.ts
30187
31023
  var cardVariantOptions2 = cardVariantRoleValues.map((value) => ({
@@ -30385,19 +31221,19 @@ function normalizeEventStaffMemberId(value) {
30385
31221
  }
30386
31222
 
30387
31223
  // ../blocks/src/system/blocks/event-registration.shared.ts
30388
- import { z as z43 } from "zod";
30389
- var occurrenceContextSchema = z43.object({
30390
- id: z43.string(),
30391
- seriesId: z43.string(),
30392
- startsAt: z43.string(),
30393
- endsAt: z43.string(),
30394
- timeZone: z43.string(),
30395
- capacityOverride: z43.number().nullable().optional(),
30396
- overrides: z43.record(z43.string(), z43.unknown()).nullable().optional()
31224
+ import { z as z44 } from "zod";
31225
+ var occurrenceContextSchema = z44.object({
31226
+ id: z44.string(),
31227
+ seriesId: z44.string(),
31228
+ startsAt: z44.string(),
31229
+ endsAt: z44.string(),
31230
+ timeZone: z44.string(),
31231
+ capacityOverride: z44.number().nullable().optional(),
31232
+ overrides: z44.record(z44.string(), z44.unknown()).nullable().optional()
30397
31233
  }).nullable();
30398
31234
 
30399
31235
  // ../blocks/src/system/runtime/nodes/event-registration.interactive.ts
30400
- import { z as z45 } from "zod";
31236
+ import { z as z46 } from "zod";
30401
31237
 
30402
31238
  // ../blocks/src/system/constants/events.ts
30403
31239
  var EVENT_CONTENT_TYPE_SLUGS = ["event", "events"];
@@ -30495,10 +31331,21 @@ function readLegacyPriceDisplay(value, currency) {
30495
31331
  amount: readAmount(value.amount) ?? 0,
30496
31332
  currency: displayCurrency
30497
31333
  } : { kind: "unavailable", currency };
31334
+ case "range": {
31335
+ const minAmount = readAmount(value.minAmount);
31336
+ const maxAmount = readAmount(value.maxAmount);
31337
+ return minAmount !== null && maxAmount !== null ? {
31338
+ kind: "range",
31339
+ minAmount,
31340
+ maxAmount,
31341
+ currency: displayCurrency
31342
+ } : { kind: "unavailable", currency };
31343
+ }
30498
31344
  case "mixed":
30499
31345
  return readAmount(value.paidFromAmount) !== null ? {
30500
31346
  kind: "mixed",
30501
31347
  paidFromAmount: readAmount(value.paidFromAmount) ?? 0,
31348
+ paidToAmount: readAmount(value.paidToAmount) ?? readAmount(value.paidFromAmount) ?? 0,
30502
31349
  currency: displayCurrency
30503
31350
  } : { kind: "unavailable", currency };
30504
31351
  case "unavailable":
@@ -30540,16 +31387,16 @@ function readAmount(value) {
30540
31387
  }
30541
31388
 
30542
31389
  // ../blocks/src/system/runtime/nodes/shared/contract-schemas.ts
30543
- import { z as z44 } from "zod";
30544
- var previewStageSchema = z44.enum(["preview", "published"]);
30545
- var registrationButtonVariantSchema = z44.enum(["primary", "secondary", "outline"]);
30546
- var eventButtonVariantSchema = z44.enum(["primary", "secondary", "outline", "link"]);
30547
- var eventLayoutSchema = z44.enum(eventCalendarListLayoutValues);
30548
- var eventCalendarDisplayModeSchema = z44.enum(eventCalendarDisplayModeValues);
30549
- var columnOptionSchema = z44.enum(["2", "3", "4"]);
30550
- var weekStartSchema = z44.enum(["sunday", "monday"]);
30551
- var filterAutoShowSchema = z44.enum(["auto", "always", "never"]);
30552
- var calendarTabViewsSchema = z44.enum(["both", "month", "week"]);
31390
+ import { z as z45 } from "zod";
31391
+ var previewStageSchema = z45.enum(["preview", "published"]);
31392
+ var registrationButtonVariantSchema = z45.enum(["primary", "secondary", "outline"]);
31393
+ var eventButtonVariantSchema = z45.enum(["primary", "secondary", "outline", "link"]);
31394
+ var eventLayoutSchema = z45.enum(eventCalendarListLayoutValues);
31395
+ var eventCalendarDisplayModeSchema = z45.enum(eventCalendarDisplayModeValues);
31396
+ var columnOptionSchema = z45.enum(["2", "3", "4"]);
31397
+ var weekStartSchema = z45.enum(["sunday", "monday"]);
31398
+ var filterAutoShowSchema = z45.enum(["auto", "always", "never"]);
31399
+ var calendarTabViewsSchema = z45.enum(["both", "month", "week"]);
30553
31400
 
30554
31401
  // ../blocks/src/system/runtime/nodes/event-registration/wizardSteps.ts
30555
31402
  function getWizardStepsForContext(hasPreSelectedContext, needsPaymentStep) {
@@ -30609,66 +31456,68 @@ function toRegistrationEvents(events) {
30609
31456
  // ../blocks/src/system/runtime/nodes/event-registration.interactive.ts
30610
31457
  var EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS = ["Date", "Tickets", "Details"];
30611
31458
  var EVENT_REGISTRATION_SHELL_STEP_LABELS = ["Event", "Date", "Tickets", "Details", "Payment"];
30612
- var contentEntrySchema = z45.object({
30613
- id: z45.string(),
30614
- slug: z45.string(),
30615
- contentTypeSlug: z45.string()
31459
+ var contentEntrySchema = z46.object({
31460
+ id: z46.string(),
31461
+ slug: z46.string(),
31462
+ contentTypeSlug: z46.string()
30616
31463
  });
30617
- var eventRegistrationPublicEventSchema = z45.preprocess(
31464
+ var eventRegistrationPublicEventSchema = z46.preprocess(
30618
31465
  normalizeEventRegistrationEventInput,
30619
31466
  publicEventSchema
30620
31467
  );
30621
- var eventRegistrationSourceSchema = z45.object({
30622
- siteId: z45.string().optional(),
30623
- apiBaseUrl: z45.string().optional(),
30624
- portalToken: z45.string().nullable().optional(),
30625
- previewToken: z45.string().nullable().optional(),
31468
+ var eventRegistrationSourceSchema = z46.object({
31469
+ siteId: z46.string().optional(),
31470
+ apiBaseUrl: z46.string().optional(),
31471
+ portalToken: z46.string().nullable().optional(),
31472
+ previewToken: z46.string().nullable().optional(),
30626
31473
  occurrenceContext: occurrenceContextSchema.optional(),
30627
31474
  contentEntry: contentEntrySchema.nullable().optional(),
30628
- events: z45.array(eventRegistrationPublicEventSchema).nullable().optional(),
30629
- className: z45.string().nullable().optional(),
30630
- buttonText: z45.string().nullable().optional(),
30631
- maxTickets: z45.string().nullable().optional(),
30632
- showVenue: z45.boolean().optional(),
30633
- showCapacity: z45.boolean().optional(),
30634
- successMessage: z45.string().optional(),
30635
- waitlistMessage: z45.string().optional(),
31475
+ events: z46.array(eventRegistrationPublicEventSchema).nullable().optional(),
31476
+ className: z46.string().nullable().optional(),
31477
+ buttonText: z46.string().nullable().optional(),
31478
+ maxTickets: z46.string().nullable().optional(),
31479
+ showVenue: z46.boolean().optional(),
31480
+ showCapacity: z46.boolean().optional(),
31481
+ successMessage: z46.string().optional(),
31482
+ waitlistMessage: z46.string().optional(),
30636
31483
  buttonVariant: registrationButtonVariantSchema.optional(),
30637
- spamProtectionEnabled: z45.boolean().optional(),
31484
+ overlayEnabled: z46.boolean().optional(),
31485
+ spamProtectionEnabled: z46.boolean().optional(),
30638
31486
  stage: previewStageSchema.optional(),
30639
- supportEmail: z45.string().optional()
30640
- });
30641
- var eventRegistrationDisplaySchema = z45.object({
30642
- kind: z45.literal("event-registration"),
30643
- state: z45.literal("generic-shell"),
30644
- className: z45.string().nullable(),
30645
- titleText: z45.string(),
30646
- bodyText: z45.string(),
30647
- stepLabels: z45.array(z45.enum(EVENT_REGISTRATION_SHELL_STEP_LABELS)).min(1),
30648
- summaryButtonText: z45.string()
30649
- });
30650
- var eventRegistrationHydrationSchema = z45.object({
31487
+ supportEmail: z46.string().optional()
31488
+ });
31489
+ var eventRegistrationDisplaySchema = z46.object({
31490
+ kind: z46.literal("event-registration"),
31491
+ state: z46.literal("generic-shell"),
31492
+ className: z46.string().nullable(),
31493
+ titleText: z46.string(),
31494
+ bodyText: z46.string(),
31495
+ stepLabels: z46.array(z46.enum(EVENT_REGISTRATION_SHELL_STEP_LABELS)).min(1),
31496
+ summaryButtonText: z46.string()
31497
+ });
31498
+ var eventRegistrationHydrationSchema = z46.object({
30651
31499
  occurrenceContext: occurrenceContextSchema.optional(),
30652
31500
  contentEntry: contentEntrySchema.nullable().optional(),
30653
- events: z45.array(eventRegistrationPublicEventSchema).nullable().optional(),
30654
- maxTickets: z45.string().optional(),
30655
- showVenue: z45.boolean().optional(),
30656
- showCapacity: z45.boolean().optional(),
30657
- successMessage: z45.string().optional(),
30658
- waitlistMessage: z45.string().optional(),
31501
+ events: z46.array(eventRegistrationPublicEventSchema).nullable().optional(),
31502
+ maxTickets: z46.string().optional(),
31503
+ showVenue: z46.boolean().optional(),
31504
+ showCapacity: z46.boolean().optional(),
31505
+ successMessage: z46.string().optional(),
31506
+ waitlistMessage: z46.string().optional(),
30659
31507
  buttonVariant: registrationButtonVariantSchema.optional(),
30660
- spamProtectionEnabled: z45.boolean().optional(),
30661
- supportEmail: z45.string().optional()
31508
+ overlayEnabled: z46.boolean().optional(),
31509
+ spamProtectionEnabled: z46.boolean().optional(),
31510
+ supportEmail: z46.string().optional()
30662
31511
  });
30663
- var eventRegistrationRenderSchema = z45.object({
31512
+ var eventRegistrationRenderSchema = z46.object({
30664
31513
  display: eventRegistrationDisplaySchema,
30665
31514
  hydration: eventRegistrationHydrationSchema
30666
31515
  });
30667
- var eventRegistrationIslandMetaCodec = createZodCodec(z45.object({
30668
- siteId: z45.string().optional(),
30669
- apiBaseUrl: z45.string().optional(),
30670
- portalToken: z45.string().nullable().optional(),
30671
- previewToken: z45.string().nullable().optional(),
31516
+ var eventRegistrationIslandMetaCodec = createZodCodec(z46.object({
31517
+ siteId: z46.string().optional(),
31518
+ apiBaseUrl: z46.string().optional(),
31519
+ portalToken: z46.string().nullable().optional(),
31520
+ previewToken: z46.string().nullable().optional(),
30672
31521
  stage: previewStageSchema.optional()
30673
31522
  }));
30674
31523
  var eventRegistrationIslandMetaKeys = defineInteractiveIslandMetaKeys(
@@ -30772,6 +31621,7 @@ var eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
30772
31621
  successMessage: source.successMessage,
30773
31622
  waitlistMessage: source.waitlistMessage,
30774
31623
  buttonVariant: source.buttonVariant,
31624
+ overlayEnabled: source.overlayEnabled,
30775
31625
  spamProtectionEnabled: source.spamProtectionEnabled,
30776
31626
  supportEmail: source.supportEmail
30777
31627
  }
@@ -30947,6 +31797,12 @@ var eventRegistrationManifest = createBlockManifest({
30947
31797
  buttonVariant: {
30948
31798
  $bind: { from: "content.buttonVariant", fallback: "primary" }
30949
31799
  },
31800
+ overlayEnabled: {
31801
+ $bind: {
31802
+ from: "$root.eventRegistrationOverlayEnabled",
31803
+ fallback: false
31804
+ }
31805
+ },
30950
31806
  // Event data from loader
30951
31807
  events: { $bind: { from: "data.events" } },
30952
31808
  // Stage for preview mode (allows registering for draft events)
@@ -30967,7 +31823,7 @@ var eventRegistrationBlockDefinition = {
30967
31823
  manifest: eventRegistrationManifest,
30968
31824
  runtime: eventRegistrationBlockRuntime,
30969
31825
  dataSchemas: {
30970
- events: z46.array(publicEventSchema).optional(),
31826
+ events: z47.array(publicEventSchema).optional(),
30971
31827
  occurrenceContext: occurrenceContextSchema.optional()
30972
31828
  },
30973
31829
  dataLoaders: {
@@ -30991,73 +31847,73 @@ var eventRegistrationBlockDefinition = {
30991
31847
  };
30992
31848
 
30993
31849
  // ../blocks/src/system/runtime/nodes/course-registration.interactive.ts
30994
- import { z as z47 } from "zod";
30995
- var contentEntrySchema2 = z47.object({
30996
- id: z47.string(),
30997
- slug: z47.string(),
30998
- contentTypeSlug: z47.string()
30999
- });
31000
- var courseEntrySubrouteContextSchema = z47.union([
31001
- z47.object({
31002
- kind: z47.literal("course-run"),
31003
- run: z47.object({
31004
- courseId: z47.string(),
31005
- seriesId: z47.string(),
31006
- runSlug: z47.string(),
31007
- runName: z47.string().nullable()
31850
+ import { z as z48 } from "zod";
31851
+ var contentEntrySchema2 = z48.object({
31852
+ id: z48.string(),
31853
+ slug: z48.string(),
31854
+ contentTypeSlug: z48.string()
31855
+ });
31856
+ var courseEntrySubrouteContextSchema = z48.union([
31857
+ z48.object({
31858
+ kind: z48.literal("course-run"),
31859
+ run: z48.object({
31860
+ courseId: z48.string(),
31861
+ seriesId: z48.string(),
31862
+ runSlug: z48.string(),
31863
+ runName: z48.string().nullable()
31008
31864
  })
31009
31865
  }),
31010
- z47.object({
31011
- kind: z47.literal("event-occurrence"),
31866
+ z48.object({
31867
+ kind: z48.literal("event-occurrence"),
31012
31868
  occurrence: occurrenceContextSchema
31013
31869
  })
31014
31870
  ]);
31015
- var courseRegistrationSourceSchema = z47.object({
31016
- siteId: z47.string().optional(),
31017
- apiBaseUrl: z47.string().optional(),
31018
- portalToken: z47.string().nullable().optional(),
31871
+ var courseRegistrationSourceSchema = z48.object({
31872
+ siteId: z48.string().optional(),
31873
+ apiBaseUrl: z48.string().optional(),
31874
+ portalToken: z48.string().nullable().optional(),
31019
31875
  contentEntry: contentEntrySchema2.nullable().optional(),
31020
31876
  entrySubrouteContext: courseEntrySubrouteContextSchema.nullable().optional(),
31021
- courses: z47.array(publicCourseSchema).nullable().optional(),
31022
- className: z47.string().nullable().optional(),
31023
- showSessions: z47.boolean().optional(),
31024
- showPrice: z47.boolean().optional(),
31025
- showCapacity: z47.boolean().optional(),
31026
- showVenue: z47.boolean().optional(),
31027
- successMessage: z47.string().optional(),
31028
- waitlistMessage: z47.string().optional(),
31029
- membershipMessage: z47.string().optional(),
31030
- buttonText: z47.string().nullable().optional(),
31877
+ courses: z48.array(publicCourseSchema).nullable().optional(),
31878
+ className: z48.string().nullable().optional(),
31879
+ showSessions: z48.boolean().optional(),
31880
+ showPrice: z48.boolean().optional(),
31881
+ showCapacity: z48.boolean().optional(),
31882
+ showVenue: z48.boolean().optional(),
31883
+ successMessage: z48.string().optional(),
31884
+ waitlistMessage: z48.string().optional(),
31885
+ membershipMessage: z48.string().optional(),
31886
+ buttonText: z48.string().nullable().optional(),
31031
31887
  buttonVariant: registrationButtonVariantSchema.optional(),
31032
31888
  stage: previewStageSchema.optional()
31033
31889
  });
31034
- var courseRegistrationDisplaySchema = z47.object({
31035
- kind: z47.literal("course-registration"),
31036
- state: z47.literal("shell"),
31037
- className: z47.string().nullable(),
31038
- summaryButtonText: z47.string()
31890
+ var courseRegistrationDisplaySchema = z48.object({
31891
+ kind: z48.literal("course-registration"),
31892
+ state: z48.literal("shell"),
31893
+ className: z48.string().nullable(),
31894
+ summaryButtonText: z48.string()
31039
31895
  });
31040
- var courseRegistrationHydrationSchema = z47.object({
31896
+ var courseRegistrationHydrationSchema = z48.object({
31041
31897
  contentEntry: contentEntrySchema2.nullable().optional(),
31042
31898
  entrySubrouteContext: courseEntrySubrouteContextSchema.nullable().optional(),
31043
- courses: z47.array(publicCourseSchema).nullable().optional(),
31044
- showSessions: z47.boolean().optional(),
31045
- showPrice: z47.boolean().optional(),
31046
- showCapacity: z47.boolean().optional(),
31047
- showVenue: z47.boolean().optional(),
31048
- successMessage: z47.string().optional(),
31049
- waitlistMessage: z47.string().optional(),
31050
- membershipMessage: z47.string().optional(),
31899
+ courses: z48.array(publicCourseSchema).nullable().optional(),
31900
+ showSessions: z48.boolean().optional(),
31901
+ showPrice: z48.boolean().optional(),
31902
+ showCapacity: z48.boolean().optional(),
31903
+ showVenue: z48.boolean().optional(),
31904
+ successMessage: z48.string().optional(),
31905
+ waitlistMessage: z48.string().optional(),
31906
+ membershipMessage: z48.string().optional(),
31051
31907
  buttonVariant: registrationButtonVariantSchema.optional()
31052
31908
  });
31053
- var courseRegistrationRenderSchema = z47.object({
31909
+ var courseRegistrationRenderSchema = z48.object({
31054
31910
  display: courseRegistrationDisplaySchema,
31055
31911
  hydration: courseRegistrationHydrationSchema
31056
31912
  });
31057
- var courseRegistrationIslandMetaCodec = createZodCodec(z47.object({
31058
- siteId: z47.string().optional(),
31059
- apiBaseUrl: z47.string().optional(),
31060
- portalToken: z47.string().nullable().optional(),
31913
+ var courseRegistrationIslandMetaCodec = createZodCodec(z48.object({
31914
+ siteId: z48.string().optional(),
31915
+ apiBaseUrl: z48.string().optional(),
31916
+ portalToken: z48.string().nullable().optional(),
31061
31917
  stage: previewStageSchema.optional()
31062
31918
  }));
31063
31919
  var courseRegistrationIslandMetaKeys = defineInteractiveIslandMetaKeys(
@@ -31317,32 +32173,32 @@ var courseRegistrationBlockDefinition = {
31317
32173
  };
31318
32174
 
31319
32175
  // ../blocks/src/system/blocks/event-details.ts
31320
- import { z as z49 } from "zod";
32176
+ import { z as z50 } from "zod";
31321
32177
 
31322
32178
  // ../blocks/src/system/blocks/shop.shared.ts
31323
- import { z as z48 } from "zod";
31324
- var publicPassProductSchema = z48.object({
31325
- id: z48.string(),
31326
- productUseCase: z48.enum(["event_pass", "appointment_package"]).default("event_pass"),
31327
- name: z48.string(),
31328
- description: z48.string().nullable(),
31329
- price: z48.number(),
31330
- currency: z48.string(),
31331
- creditsTotal: z48.number(),
31332
- pricePerCredit: z48.number(),
31333
- validDays: z48.number().nullable(),
31334
- eligibleCategoryIds: z48.array(z48.string()),
31335
- eligibleCategoryNames: z48.array(z48.string())
31336
- });
31337
- var publicMembershipProductSchema = z48.object({
31338
- id: z48.string(),
31339
- name: z48.string(),
31340
- description: z48.string().nullable(),
31341
- price: z48.number(),
31342
- currency: z48.string(),
31343
- billingInterval: z48.enum(["month", "year"]),
31344
- eligibleCategoryIds: z48.array(z48.string()),
31345
- eligibleCategoryNames: z48.array(z48.string())
32179
+ import { z as z49 } from "zod";
32180
+ var publicPassProductSchema = z49.object({
32181
+ id: z49.string(),
32182
+ productUseCase: z49.enum(["event_pass", "appointment_package"]).default("event_pass"),
32183
+ name: z49.string(),
32184
+ description: z49.string().nullable(),
32185
+ price: z49.number(),
32186
+ currency: z49.string(),
32187
+ creditsTotal: z49.number(),
32188
+ pricePerCredit: z49.number(),
32189
+ validDays: z49.number().nullable(),
32190
+ eligibleCategoryIds: z49.array(z49.string()),
32191
+ eligibleCategoryNames: z49.array(z49.string())
32192
+ });
32193
+ var publicMembershipProductSchema = z49.object({
32194
+ id: z49.string(),
32195
+ name: z49.string(),
32196
+ description: z49.string().nullable(),
32197
+ price: z49.number(),
32198
+ currency: z49.string(),
32199
+ billingInterval: z49.enum(["month", "year"]),
32200
+ eligibleCategoryIds: z49.array(z49.string()),
32201
+ eligibleCategoryNames: z49.array(z49.string())
31346
32202
  });
31347
32203
 
31348
32204
  // ../blocks/src/system/blocks/event-details.ts
@@ -31477,40 +32333,40 @@ var eventDetailsManifest = createBlockManifest({
31477
32333
  })
31478
32334
  ]
31479
32335
  });
31480
- var occurrenceContextSchema2 = z49.object({
31481
- id: z49.string(),
31482
- seriesId: z49.string(),
31483
- startsAt: z49.string(),
31484
- endsAt: z49.string(),
31485
- timeZone: z49.string(),
31486
- capacityOverride: z49.number().nullable().optional(),
31487
- overrides: z49.record(z49.string(), z49.unknown()).nullable().optional()
32336
+ var occurrenceContextSchema2 = z50.object({
32337
+ id: z50.string(),
32338
+ seriesId: z50.string(),
32339
+ startsAt: z50.string(),
32340
+ endsAt: z50.string(),
32341
+ timeZone: z50.string(),
32342
+ capacityOverride: z50.number().nullable().optional(),
32343
+ overrides: z50.record(z50.string(), z50.unknown()).nullable().optional()
31488
32344
  }).nullable();
31489
- var eventAutoApplyDiscountPreviewBaseSchema = z49.object({
31490
- id: z49.string(),
31491
- publicLabel: z49.string(),
31492
- description: z49.string().nullable(),
31493
- minTicketsRequired: z49.number().nullable()
32345
+ var eventAutoApplyDiscountPreviewBaseSchema = z50.object({
32346
+ id: z50.string(),
32347
+ publicLabel: z50.string(),
32348
+ description: z50.string().nullable(),
32349
+ minTicketsRequired: z50.number().nullable()
31494
32350
  });
31495
- var eventAutoApplyDiscountPreviewSchema = z49.discriminatedUnion("discountType", [
32351
+ var eventAutoApplyDiscountPreviewSchema = z50.discriminatedUnion("discountType", [
31496
32352
  eventAutoApplyDiscountPreviewBaseSchema.extend({
31497
- discountType: z49.literal("percent"),
31498
- discountPercent: z49.number(),
31499
- discountAmountCents: z49.null()
32353
+ discountType: z50.literal("percent"),
32354
+ discountPercent: z50.number(),
32355
+ discountAmountCents: z50.null()
31500
32356
  }),
31501
32357
  eventAutoApplyDiscountPreviewBaseSchema.extend({
31502
- discountType: z49.literal("fixed"),
31503
- discountPercent: z49.null(),
31504
- discountAmountCents: z49.number()
32358
+ discountType: z50.literal("fixed"),
32359
+ discountPercent: z50.null(),
32360
+ discountAmountCents: z50.number()
31505
32361
  })
31506
32362
  ]);
31507
32363
  var eventDetailsBlockDefinition = {
31508
32364
  manifest: eventDetailsManifest,
31509
32365
  dataSchemas: {
31510
- eventDetailsData: z49.object({
32366
+ eventDetailsData: z50.object({
31511
32367
  events: publicEventsArraySchema,
31512
- sitePasses: z49.object({ passes: z49.array(publicPassProductSchema) }),
31513
- siteMemberships: z49.object({ memberships: z49.array(publicMembershipProductSchema) }),
32368
+ sitePasses: z50.object({ passes: z50.array(publicPassProductSchema) }),
32369
+ siteMemberships: z50.object({ memberships: z50.array(publicMembershipProductSchema) }),
31514
32370
  autoApplyDiscount: eventAutoApplyDiscountPreviewSchema.nullable().optional().default(null)
31515
32371
  }).optional(),
31516
32372
  occurrenceContext: occurrenceContextSchema2.optional()
@@ -31834,7 +32690,7 @@ var eventSpotlightBlockDefinition = {
31834
32690
  };
31835
32691
 
31836
32692
  // ../blocks/src/system/runtime/nodes/events/EventListing.interactive.ts
31837
- import { z as z51 } from "zod";
32693
+ import { z as z52 } from "zod";
31838
32694
 
31839
32695
  // ../blocks/src/system/runtime/nodes/events/shared/utils.ts
31840
32696
  var COLUMN_CLASSES = {
@@ -31942,16 +32798,16 @@ function computeMediaTransformStyle(value, style, targetAspectRatio, options) {
31942
32798
  }
31943
32799
 
31944
32800
  // ../blocks/src/system/runtime/nodes/events/shared/listOptions.ts
31945
- import { z as z50 } from "zod";
32801
+ import { z as z51 } from "zod";
31946
32802
  var eventPageSizeValues = [3, 6, 10, 12, 20, 24, 30];
31947
- var eventPageSizeSchema = z50.union([
31948
- z50.literal(3),
31949
- z50.literal(6),
31950
- z50.literal(10),
31951
- z50.literal(12),
31952
- z50.literal(20),
31953
- z50.literal(24),
31954
- z50.literal(30)
32803
+ var eventPageSizeSchema = z51.union([
32804
+ z51.literal(3),
32805
+ z51.literal(6),
32806
+ z51.literal(10),
32807
+ z51.literal(12),
32808
+ z51.literal(20),
32809
+ z51.literal(24),
32810
+ z51.literal(30)
31955
32811
  ]);
31956
32812
  var eventPageSizeSet = new Set(eventPageSizeValues);
31957
32813
  function resolveEventPageSize(value, fallback = 12) {
@@ -31961,15 +32817,15 @@ function resolveEventPageSize(value, fallback = 12) {
31961
32817
  function resolveEventCalendarListPageSize(input) {
31962
32818
  return resolveEventPageSize(input.eventsPerPage);
31963
32819
  }
31964
- var eventListPaginationActionSchema = z50.discriminatedUnion("kind", [
31965
- z50.object({
31966
- kind: z50.literal("loadMore"),
31967
- label: z50.string()
32820
+ var eventListPaginationActionSchema = z51.discriminatedUnion("kind", [
32821
+ z51.object({
32822
+ kind: z51.literal("loadMore"),
32823
+ label: z51.string()
31968
32824
  }),
31969
- z50.object({
31970
- kind: z50.literal("seeAllLink"),
31971
- label: z50.string(),
31972
- href: z50.string()
32825
+ z51.object({
32826
+ kind: z51.literal("seeAllLink"),
32827
+ label: z51.string(),
32828
+ href: z51.string()
31973
32829
  })
31974
32830
  ]);
31975
32831
  function resolveEventListPaginationAction(input) {
@@ -31982,89 +32838,89 @@ function resolveEventListPaginationAction(input) {
31982
32838
  }
31983
32839
 
31984
32840
  // ../blocks/src/system/runtime/nodes/events/EventListing.interactive.ts
31985
- var legacyEventCardVariantSchema = z51.enum(["variant1", "variant2"]);
31986
- var eventCardVariantInputSchema = z51.union([
32841
+ var legacyEventCardVariantSchema = z52.enum(["variant1", "variant2"]);
32842
+ var eventCardVariantInputSchema = z52.union([
31987
32843
  cardVariantRoleSchema,
31988
32844
  legacyEventCardVariantSchema
31989
32845
  ]);
31990
- var cardOrientationSchema = z51.enum(["vertical", "horizontal"]);
31991
- var eventBlockKindSchema = z51.enum(eventBlockKindValues);
31992
- var eventSurfaceScopeSchema = z51.enum(eventSurfaceScopeValues);
31993
- var eventScheduleScopeSchema2 = z51.enum(eventScheduleScopeValues);
31994
- var eventListingSourceSchema = z51.object({
31995
- events: z51.array(publicEventSchema).nullable().optional(),
31996
- siteId: z51.string(),
31997
- apiBaseUrl: z51.string().optional(),
32846
+ var cardOrientationSchema = z52.enum(["vertical", "horizontal"]);
32847
+ var eventBlockKindSchema = z52.enum(eventBlockKindValues);
32848
+ var eventSurfaceScopeSchema = z52.enum(eventSurfaceScopeValues);
32849
+ var eventScheduleScopeSchema2 = z52.enum(eventScheduleScopeValues);
32850
+ var eventListingSourceSchema = z52.object({
32851
+ events: z52.array(publicEventSchema).nullable().optional(),
32852
+ siteId: z52.string(),
32853
+ apiBaseUrl: z52.string().optional(),
31998
32854
  stage: previewStageSchema.optional(),
31999
32855
  layout: eventLayoutSchema.optional(),
32000
32856
  columns: columnOptionSchema.optional(),
32001
- eventsPerPage: z51.string().optional(),
32002
- paginationMode: z51.enum(["loadMore", "seeAllLink"]).optional(),
32003
- seeAllUrl: z51.string().optional(),
32004
- loadMoreText: z51.string().optional(),
32857
+ eventsPerPage: z52.string().optional(),
32858
+ paginationMode: z52.enum(["loadMore", "seeAllLink"]).optional(),
32859
+ seeAllUrl: z52.string().optional(),
32860
+ loadMoreText: z52.string().optional(),
32005
32861
  cardVariant: eventCardVariantInputSchema.optional(),
32006
32862
  buttonVariant: eventButtonVariantSchema.optional(),
32007
- buttonText: z51.string().optional(),
32008
- showVenue: z51.boolean().optional(),
32009
- showMap: z51.boolean().optional(),
32010
- showCapacity: z51.boolean().optional(),
32011
- emptyMessage: z51.string().optional(),
32012
- className: z51.string().optional(),
32013
- showFilters: z51.boolean().nullable().optional(),
32863
+ buttonText: z52.string().optional(),
32864
+ showVenue: z52.boolean().optional(),
32865
+ showMap: z52.boolean().optional(),
32866
+ showCapacity: z52.boolean().optional(),
32867
+ emptyMessage: z52.string().optional(),
32868
+ className: z52.string().optional(),
32869
+ showFilters: z52.boolean().nullable().optional(),
32014
32870
  showCategoryFilter: filterAutoShowSchema.optional(),
32015
- showVenueFilter: z51.boolean().nullable().optional(),
32016
- showStaffFilter: z51.boolean().nullable().optional(),
32871
+ showVenueFilter: z52.boolean().nullable().optional(),
32872
+ showStaffFilter: z52.boolean().nullable().optional(),
32017
32873
  eventKind: eventBlockKindSchema.nullable().optional(),
32018
32874
  eventSurface: eventSurfaceScopeSchema.nullable().optional(),
32019
- filterEventPresets: z51.union([z51.string(), z51.array(z51.string())]).nullable().optional(),
32875
+ filterEventPresets: z52.union([z52.string(), z52.array(z52.string())]).nullable().optional(),
32020
32876
  scheduleScope: eventScheduleScopeSchema2.nullable().optional(),
32021
- filterCategoryIds: z51.string().nullable().optional(),
32022
- filterStaffMemberId: z51.string().nullable().optional(),
32023
- filterVenueId: z51.string().nullable().optional()
32877
+ filterCategoryIds: z52.string().nullable().optional(),
32878
+ filterStaffMemberId: z52.string().nullable().optional(),
32879
+ filterVenueId: z52.string().nullable().optional()
32024
32880
  });
32025
- var eventListingDisplaySchema = z51.object({
32026
- kind: z51.literal("event-listing"),
32027
- state: z51.enum(["loading", "empty", "ready"]),
32881
+ var eventListingDisplaySchema = z52.object({
32882
+ kind: z52.literal("event-listing"),
32883
+ state: z52.enum(["loading", "empty", "ready"]),
32028
32884
  listLayout: eventLayoutSchema,
32029
- className: z51.string().nullable(),
32030
- emptyMessage: z51.string(),
32031
- loadingMessage: z51.string(),
32032
- containerClass: z51.string(),
32885
+ className: z52.string().nullable(),
32886
+ emptyMessage: z52.string(),
32887
+ loadingMessage: z52.string(),
32888
+ containerClass: z52.string(),
32033
32889
  cardVariant: cardVariantRoleSchema,
32034
32890
  buttonVariant: eventButtonVariantSchema,
32035
- buttonText: z51.string(),
32036
- showVenue: z51.boolean(),
32037
- showMap: z51.boolean(),
32038
- showCapacity: z51.boolean(),
32891
+ buttonText: z52.string(),
32892
+ showVenue: z52.boolean(),
32893
+ showMap: z52.boolean(),
32894
+ showCapacity: z52.boolean(),
32039
32895
  orientation: cardOrientationSchema,
32040
- events: z51.array(publicEventSchema)
32896
+ events: z52.array(publicEventSchema)
32041
32897
  });
32042
- var eventListingHydrationSchema = z51.object({
32043
- siteId: z51.string(),
32898
+ var eventListingHydrationSchema = z52.object({
32899
+ siteId: z52.string(),
32044
32900
  stage: previewStageSchema.optional(),
32045
32901
  eventsPerPage: eventPageSizeSchema,
32046
32902
  paginationAction: eventListPaginationActionSchema,
32047
- showFilters: z51.boolean(),
32903
+ showFilters: z52.boolean(),
32048
32904
  showCategoryFilter: filterAutoShowSchema,
32049
- showVenueFilter: z51.boolean(),
32050
- showStaffFilter: z51.boolean(),
32905
+ showVenueFilter: z52.boolean(),
32906
+ showStaffFilter: z52.boolean(),
32051
32907
  eventKind: eventBlockKindSchema,
32052
32908
  eventSurface: eventSurfaceScopeSchema,
32053
- filterEventPresets: z51.string().nullable(),
32909
+ filterEventPresets: z52.string().nullable(),
32054
32910
  scheduleScope: eventScheduleScopeSchema2,
32055
- filterCategoryIds: z51.string().nullable().optional(),
32056
- filterStaffMemberId: z51.string().nullable().optional(),
32057
- filterVenueId: z51.string().nullable().optional(),
32058
- fetchInitialEventsOnMount: z51.boolean()
32911
+ filterCategoryIds: z52.string().nullable().optional(),
32912
+ filterStaffMemberId: z52.string().nullable().optional(),
32913
+ filterVenueId: z52.string().nullable().optional(),
32914
+ fetchInitialEventsOnMount: z52.boolean()
32059
32915
  });
32060
- var eventListingRenderSchema = z51.object({
32916
+ var eventListingRenderSchema = z52.object({
32061
32917
  display: eventListingDisplaySchema,
32062
32918
  hydration: eventListingHydrationSchema
32063
32919
  });
32064
32920
  var eventListingIslandMetaCodec = createZodCodec(
32065
- z51.object({
32066
- siteId: z51.string(),
32067
- apiBaseUrl: z51.string().optional(),
32921
+ z52.object({
32922
+ siteId: z52.string(),
32923
+ apiBaseUrl: z52.string().optional(),
32068
32924
  stage: previewStageSchema.optional()
32069
32925
  })
32070
32926
  );
@@ -32431,15 +33287,15 @@ var eventListingBlockDefinition = {
32431
33287
  };
32432
33288
 
32433
33289
  // ../blocks/src/system/runtime/nodes/events/EventCalendar.interactive.ts
32434
- import { z as z52 } from "zod";
32435
- var eventBlockKindSchema2 = z52.enum(eventBlockKindValues);
32436
- var eventSurfaceScopeSchema2 = z52.enum(eventSurfaceScopeValues);
32437
- var eventScheduleScopeSchema3 = z52.enum(eventScheduleScopeValues);
32438
- var eventCalendarSourceSchema = z52.object(
33290
+ import { z as z53 } from "zod";
33291
+ var eventBlockKindSchema2 = z53.enum(eventBlockKindValues);
33292
+ var eventSurfaceScopeSchema2 = z53.enum(eventSurfaceScopeValues);
33293
+ var eventScheduleScopeSchema3 = z53.enum(eventScheduleScopeValues);
33294
+ var eventCalendarSourceSchema = z53.object(
32439
33295
  {
32440
- events: z52.array(publicEventSchema).nullable().optional(),
32441
- siteId: z52.string(),
32442
- apiBaseUrl: z52.string().optional(),
33296
+ events: z53.array(publicEventSchema).nullable().optional(),
33297
+ siteId: z53.string(),
33298
+ apiBaseUrl: z53.string().optional(),
32443
33299
  stage: previewStageSchema.optional(),
32444
33300
  variant: eventCalendarDisplayModeSchema.nullable().optional(),
32445
33301
  displayMode: eventCalendarDisplayModeSchema.nullable().optional(),
@@ -32447,78 +33303,78 @@ var eventCalendarSourceSchema = z52.object(
32447
33303
  listColumns: columnOptionSchema.optional(),
32448
33304
  layout: eventLayoutSchema.optional(),
32449
33305
  columns: columnOptionSchema.optional(),
32450
- eventsPerPage: z52.string().optional(),
32451
- paginationMode: z52.enum(["loadMore", "seeAllLink"]).optional(),
32452
- seeAllUrl: z52.string().optional(),
32453
- loadMoreText: z52.string().optional(),
33306
+ eventsPerPage: z53.string().optional(),
33307
+ paginationMode: z53.enum(["loadMore", "seeAllLink"]).optional(),
33308
+ seeAllUrl: z53.string().optional(),
33309
+ loadMoreText: z53.string().optional(),
32454
33310
  startOfWeek: weekStartSchema.optional(),
32455
33311
  calendarTabViews: calendarTabViewsSchema.optional(),
32456
- showFilters: z52.boolean().nullable().optional(),
33312
+ showFilters: z53.boolean().nullable().optional(),
32457
33313
  showCategoryFilter: filterAutoShowSchema.optional(),
32458
- showVenueFilter: z52.boolean().nullable().optional(),
32459
- showStaffFilter: z52.boolean().nullable().optional(),
33314
+ showVenueFilter: z53.boolean().nullable().optional(),
33315
+ showStaffFilter: z53.boolean().nullable().optional(),
32460
33316
  kind: eventBlockKindSchema2.nullable().optional(),
32461
33317
  eventSurface: eventSurfaceScopeSchema2.nullable().optional(),
32462
- filterEventPresets: z52.union([z52.string(), z52.array(z52.string())]).nullable().optional(),
33318
+ filterEventPresets: z53.union([z53.string(), z53.array(z53.string())]).nullable().optional(),
32463
33319
  scheduleScope: eventScheduleScopeSchema3.nullable().optional(),
32464
- filterCategoryIds: z52.union([z52.string(), z52.array(z52.string())]).nullable().optional(),
32465
- filterStaffMemberId: z52.string().nullable().optional(),
32466
- filterVenueId: z52.string().nullable().optional(),
33320
+ filterCategoryIds: z53.union([z53.string(), z53.array(z53.string())]).nullable().optional(),
33321
+ filterStaffMemberId: z53.string().nullable().optional(),
33322
+ filterVenueId: z53.string().nullable().optional(),
32467
33323
  buttonVariant: eventButtonVariantSchema.optional(),
32468
- buttonText: z52.string().optional(),
32469
- showVenue: z52.boolean().nullable().optional(),
32470
- showMap: z52.boolean().nullable().optional(),
32471
- showCapacity: z52.boolean().nullable().optional(),
32472
- emptyMessage: z52.string().optional(),
32473
- className: z52.string().optional()
33324
+ buttonText: z53.string().optional(),
33325
+ showVenue: z53.boolean().nullable().optional(),
33326
+ showMap: z53.boolean().nullable().optional(),
33327
+ showCapacity: z53.boolean().nullable().optional(),
33328
+ emptyMessage: z53.string().optional(),
33329
+ className: z53.string().optional()
32474
33330
  }
32475
33331
  );
32476
- var eventCalendarDisplaySchema = z52.object({
32477
- kind: z52.literal("event-calendar"),
33332
+ var eventCalendarDisplaySchema = z53.object({
33333
+ kind: z53.literal("event-calendar"),
32478
33334
  displayMode: eventCalendarDisplayModeSchema,
32479
- className: z52.string().nullable(),
32480
- events: z52.array(publicEventSchema),
33335
+ className: z53.string().nullable(),
33336
+ events: z53.array(publicEventSchema),
32481
33337
  listLayout: eventLayoutSchema,
32482
33338
  listColumns: columnOptionSchema,
32483
33339
  eventsPerPage: eventPageSizeSchema,
32484
33340
  paginationAction: eventListPaginationActionSchema,
32485
33341
  startOfWeek: weekStartSchema,
32486
33342
  calendarTabViews: calendarTabViewsSchema,
32487
- showFilters: z52.boolean(),
33343
+ showFilters: z53.boolean(),
32488
33344
  showCategoryFilter: filterAutoShowSchema,
32489
- showVenueFilter: z52.boolean(),
32490
- showStaffFilter: z52.boolean(),
33345
+ showVenueFilter: z53.boolean(),
33346
+ showStaffFilter: z53.boolean(),
32491
33347
  eventKind: eventBlockKindSchema2,
32492
33348
  eventSurface: eventSurfaceScopeSchema2,
32493
- filterEventPresets: z52.string().nullable(),
33349
+ filterEventPresets: z53.string().nullable(),
32494
33350
  scheduleScope: eventScheduleScopeSchema3,
32495
- filterCategoryIds: z52.string().nullable(),
32496
- filterStaffMemberId: z52.string().nullable(),
32497
- filterVenueId: z52.string().nullable(),
33351
+ filterCategoryIds: z53.string().nullable(),
33352
+ filterStaffMemberId: z53.string().nullable(),
33353
+ filterVenueId: z53.string().nullable(),
32498
33354
  buttonVariant: eventButtonVariantSchema,
32499
- buttonText: z52.string(),
32500
- showVenue: z52.boolean(),
32501
- showMap: z52.boolean(),
32502
- showCapacity: z52.boolean(),
32503
- emptyMessage: z52.string()
32504
- });
32505
- var eventCalendarHydrationSchema = z52.object({
32506
- siteId: z52.string(),
33355
+ buttonText: z53.string(),
33356
+ showVenue: z53.boolean(),
33357
+ showMap: z53.boolean(),
33358
+ showCapacity: z53.boolean(),
33359
+ emptyMessage: z53.string()
33360
+ });
33361
+ var eventCalendarHydrationSchema = z53.object({
33362
+ siteId: z53.string(),
32507
33363
  stage: previewStageSchema.optional(),
32508
- prefetchedEvents: z52.boolean(),
33364
+ prefetchedEvents: z53.boolean(),
32509
33365
  eventKind: eventBlockKindSchema2,
32510
33366
  eventSurface: eventSurfaceScopeSchema2,
32511
- filterEventPresets: z52.string().nullable(),
33367
+ filterEventPresets: z53.string().nullable(),
32512
33368
  scheduleScope: eventScheduleScopeSchema3
32513
33369
  });
32514
- var eventCalendarRenderSchema = z52.object({
33370
+ var eventCalendarRenderSchema = z53.object({
32515
33371
  display: eventCalendarDisplaySchema,
32516
33372
  hydration: eventCalendarHydrationSchema
32517
33373
  });
32518
33374
  var eventCalendarIslandMetaCodec = createZodCodec(
32519
- z52.object({
32520
- siteId: z52.string(),
32521
- apiBaseUrl: z52.string().optional(),
33375
+ z53.object({
33376
+ siteId: z53.string(),
33377
+ apiBaseUrl: z53.string().optional(),
32522
33378
  stage: previewStageSchema.optional()
32523
33379
  })
32524
33380
  );
@@ -33227,7 +34083,7 @@ var eventCalendarBlockDefinition = {
33227
34083
  };
33228
34084
 
33229
34085
  // ../blocks/src/system/blocks/offerings-preview/index.ts
33230
- import { z as z53 } from "zod";
34086
+ import { z as z54 } from "zod";
33231
34087
 
33232
34088
  // ../blocks/src/system/blocks/offerings-preview/model.ts
33233
34089
  var OFFERINGS_PREVIEW_DEFAULT_ITEM_LIMIT = "3";
@@ -33319,13 +34175,13 @@ function isRecord5(value) {
33319
34175
  }
33320
34176
 
33321
34177
  // ../blocks/src/system/blocks/offerings-preview/index.ts
33322
- var publicRouteCandidatesSchema = z53.object({
33323
- routes: z53.array(z53.object({
33324
- entityId: z53.string(),
33325
- path: z53.string(),
33326
- title: z53.string(),
33327
- kind: z53.enum(["page", "content"]),
33328
- contentTypeKey: z53.string().nullable().optional()
34178
+ var publicRouteCandidatesSchema = z54.object({
34179
+ routes: z54.array(z54.object({
34180
+ entityId: z54.string(),
34181
+ path: z54.string(),
34182
+ title: z54.string(),
34183
+ kind: z54.enum(["page", "content"]),
34184
+ contentTypeKey: z54.string().nullable().optional()
33329
34185
  }))
33330
34186
  });
33331
34187
  var groupOverrideFields = [
@@ -33723,7 +34579,7 @@ function isRecord6(value) {
33723
34579
  }
33724
34580
 
33725
34581
  // ../blocks/src/system/blocks/embed.ts
33726
- import { z as z54 } from "zod";
34582
+ import { z as z55 } from "zod";
33727
34583
  var embedFields = [
33728
34584
  // Section heading
33729
34585
  parseFieldDefinition({
@@ -33954,18 +34810,18 @@ var embedManifest = createBlockManifest({
33954
34810
  spacing: "lg"
33955
34811
  }
33956
34812
  });
33957
- var embedEntrySchema = z54.object({
33958
- id: z54.string(),
33959
- identifier: z54.string(),
33960
- title: z54.string(),
33961
- slug: z54.string().nullable().optional(),
33962
- content: z54.record(z54.string(), z54.unknown()).optional(),
33963
- publishedAt: z54.string().nullable().optional()
34813
+ var embedEntrySchema = z55.object({
34814
+ id: z55.string(),
34815
+ identifier: z55.string(),
34816
+ title: z55.string(),
34817
+ slug: z55.string().nullable().optional(),
34818
+ content: z55.record(z55.string(), z55.unknown()).optional(),
34819
+ publishedAt: z55.string().nullable().optional()
33964
34820
  });
33965
34821
  var embedBlockDefinition = {
33966
34822
  manifest: embedManifest,
33967
34823
  dataSchemas: {
33968
- entries: z54.array(embedEntrySchema).optional()
34824
+ entries: z55.array(embedEntrySchema).optional()
33969
34825
  },
33970
34826
  dataLoaders: {
33971
34827
  entries: {
@@ -35149,56 +36005,56 @@ var fileDownloadBlockDefinition = {
35149
36005
  };
35150
36006
 
35151
36007
  // ../blocks/src/system/blocks/shop.ts
35152
- import { z as z58 } from "zod";
36008
+ import { z as z59 } from "zod";
35153
36009
 
35154
36010
  // ../blocks/src/system/runtime/nodes/shop.interactive.ts
35155
- import { z as z57 } from "zod";
36011
+ import { z as z58 } from "zod";
35156
36012
 
35157
36013
  // ../blocks/src/system/blocks/products/shared.ts
35158
- import { z as z55 } from "zod";
35159
- var publicProductVariantSchema = z55.object({
35160
- id: z55.string(),
35161
- title: z55.string(),
35162
- sku: z55.string().nullable(),
35163
- priceCents: z55.number(),
35164
- stockQuantity: z55.number().nullable(),
35165
- soldOut: z55.boolean()
35166
- });
35167
- var publicProductSchema = z55.object({
35168
- id: z55.string(),
35169
- contentEntryId: z55.string().nullable(),
35170
- title: z55.string(),
35171
- slug: z55.string(),
35172
- path: z55.string().nullable(),
35173
- status: z55.enum(["draft", "active"]),
35174
- priceCents: z55.number(),
35175
- currency: z55.string(),
35176
- productType: z55.enum(["physical", "digital"]),
35177
- requiresShipping: z55.boolean(),
35178
- hasVariants: z55.boolean(),
35179
- trackInventory: z55.boolean(),
35180
- soldOut: z55.boolean(),
35181
- category: z55.object({
35182
- id: z55.string(),
35183
- name: z55.string(),
35184
- slug: z55.string()
36014
+ import { z as z56 } from "zod";
36015
+ var publicProductVariantSchema = z56.object({
36016
+ id: z56.string(),
36017
+ title: z56.string(),
36018
+ sku: z56.string().nullable(),
36019
+ priceCents: z56.number(),
36020
+ stockQuantity: z56.number().nullable(),
36021
+ soldOut: z56.boolean()
36022
+ });
36023
+ var publicProductSchema = z56.object({
36024
+ id: z56.string(),
36025
+ contentEntryId: z56.string().nullable(),
36026
+ title: z56.string(),
36027
+ slug: z56.string(),
36028
+ path: z56.string().nullable(),
36029
+ status: z56.enum(["draft", "active"]),
36030
+ priceCents: z56.number(),
36031
+ currency: z56.string(),
36032
+ productType: z56.enum(["physical", "digital"]),
36033
+ requiresShipping: z56.boolean(),
36034
+ hasVariants: z56.boolean(),
36035
+ trackInventory: z56.boolean(),
36036
+ soldOut: z56.boolean(),
36037
+ category: z56.object({
36038
+ id: z56.string(),
36039
+ name: z56.string(),
36040
+ slug: z56.string()
35185
36041
  }).nullable(),
35186
- summary: z55.string().nullable(),
35187
- body: z55.unknown().nullable(),
35188
- gallery: z55.array(
35189
- z55.object({
35190
- url: z55.string(),
35191
- alt: z55.string().nullable()
36042
+ summary: z56.string().nullable(),
36043
+ body: z56.unknown().nullable(),
36044
+ gallery: z56.array(
36045
+ z56.object({
36046
+ url: z56.string(),
36047
+ alt: z56.string().nullable()
35192
36048
  })
35193
36049
  ),
35194
- variants: z55.array(publicProductVariantSchema)
36050
+ variants: z56.array(publicProductVariantSchema)
35195
36051
  });
35196
- var publicProductsResponseSchema = z55.object({
35197
- products: z55.array(publicProductSchema)
36052
+ var publicProductsResponseSchema = z56.object({
36053
+ products: z56.array(publicProductSchema)
35198
36054
  });
35199
36055
 
35200
36056
  // ../blocks/src/system/runtime/api/creditProducts.ts
35201
- function assertNever3(value) {
36057
+ function assertNever4(value) {
35202
36058
  throw new Error(`Unhandled credit product case: ${String(value)}`);
35203
36059
  }
35204
36060
  function useCasesFromModules(modules) {
@@ -35231,7 +36087,7 @@ function getCreditProductCreditUnit(useCase) {
35231
36087
  perCreditSuffix: "credit"
35232
36088
  };
35233
36089
  default:
35234
- return assertNever3(useCase);
36090
+ return assertNever4(useCase);
35235
36091
  }
35236
36092
  }
35237
36093
  function deriveCreditProductLabels(products, options = {}) {
@@ -35258,27 +36114,27 @@ function deriveCreditProductLabels(products, options = {}) {
35258
36114
  }
35259
36115
 
35260
36116
  // ../blocks/src/system/runtime/nodes/shop-commerce.shared.ts
35261
- import { z as z56 } from "zod";
35262
- var storedProductCartItemSchema = z56.object({
35263
- kind: z56.literal("product"),
35264
- productId: z56.string().min(1),
35265
- productCategoryId: z56.string().min(1).optional().nullable(),
35266
- variantId: z56.string().min(1).optional().nullable(),
35267
- title: z56.string().min(1),
35268
- variantTitle: z56.string().optional().nullable(),
35269
- quantity: z56.number().finite(),
35270
- unitPriceCents: z56.number().finite(),
35271
- currency: z56.string().min(1),
35272
- imageUrl: z56.string().optional().nullable(),
35273
- soldOut: z56.boolean().optional()
35274
- });
35275
- var storedPassCartItemSchema = z56.object({
35276
- kind: z56.literal("pass"),
35277
- passId: z56.string().min(1),
35278
- title: z56.string().min(1),
35279
- quantity: z56.number().finite().optional(),
35280
- unitPriceCents: z56.number().finite(),
35281
- currency: z56.string().min(1)
36117
+ import { z as z57 } from "zod";
36118
+ var storedProductCartItemSchema = z57.object({
36119
+ kind: z57.literal("product"),
36120
+ productId: z57.string().min(1),
36121
+ productCategoryId: z57.string().min(1).optional().nullable(),
36122
+ variantId: z57.string().min(1).optional().nullable(),
36123
+ title: z57.string().min(1),
36124
+ variantTitle: z57.string().optional().nullable(),
36125
+ quantity: z57.number().finite(),
36126
+ unitPriceCents: z57.number().finite(),
36127
+ currency: z57.string().min(1),
36128
+ imageUrl: z57.string().optional().nullable(),
36129
+ soldOut: z57.boolean().optional()
36130
+ });
36131
+ var storedPassCartItemSchema = z57.object({
36132
+ kind: z57.literal("pass"),
36133
+ passId: z57.string().min(1),
36134
+ title: z57.string().min(1),
36135
+ quantity: z57.number().finite().optional(),
36136
+ unitPriceCents: z57.number().finite(),
36137
+ currency: z57.string().min(1)
35282
36138
  });
35283
36139
  function deriveCommerceCheckoutState(state) {
35284
36140
  if (state.items.length === 0) {
@@ -35317,10 +36173,7 @@ function resolveSelectedProduct(products, contentEntry, productSlug) {
35317
36173
 
35318
36174
  // ../blocks/src/system/runtime/nodes/commerce/shared/display.ts
35319
36175
  function formatCommercePrice(cents, currency) {
35320
- return new Intl.NumberFormat("en-US", {
35321
- style: "currency",
35322
- currency: currency.toUpperCase()
35323
- }).format(cents / 100);
36176
+ return formatCurrencyAmount(cents, currency);
35324
36177
  }
35325
36178
  function getPassesHeading(passes, explicitHeading) {
35326
36179
  if (explicitHeading) return explicitHeading;
@@ -35515,214 +36368,214 @@ function formatValidity(days) {
35515
36368
  }
35516
36369
 
35517
36370
  // ../blocks/src/system/runtime/nodes/shop.interactive.ts
35518
- var shopModeSchema = z57.enum(["passes-memberships", "product-list", "product-detail", "cart", "checkout"]);
35519
- var contentEntrySchema3 = z57.object({
35520
- id: z57.string().nullable().optional(),
35521
- slug: z57.string().nullable().optional()
36371
+ var shopModeSchema = z58.enum(["passes-memberships", "product-list", "product-detail", "cart", "checkout"]);
36372
+ var contentEntrySchema3 = z58.object({
36373
+ id: z58.string().nullable().optional(),
36374
+ slug: z58.string().nullable().optional()
35522
36375
  }).nullable();
35523
- var shopSourceSchema = z57.object({
35524
- className: z57.string().nullable().optional(),
36376
+ var shopSourceSchema = z58.object({
36377
+ className: z58.string().nullable().optional(),
35525
36378
  mode: shopModeSchema.optional(),
35526
- heading: z57.string().nullable().optional(),
35527
- productSlug: z57.string().nullable().optional(),
35528
- showPasses: z57.boolean().optional(),
35529
- showMemberships: z57.boolean().optional(),
35530
- layout: z57.enum(["grid", "list"]).optional(),
35531
- columns: z57.string().optional(),
35532
- showDescriptions: z57.boolean().optional(),
35533
- showSummary: z57.boolean().optional(),
35534
- showBody: z57.boolean().optional(),
35535
- showPrices: z57.boolean().optional(),
35536
- showValidityPeriod: z57.boolean().optional(),
35537
- showPricePerCredit: z57.boolean().nullable().optional(),
35538
- passesHeading: z57.string().optional(),
35539
- membershipsHeading: z57.string().optional(),
35540
- buyButtonText: z57.string().optional(),
35541
- addButtonText: z57.string().optional(),
35542
- passPurchaseMode: z57.enum(["add_to_cart", "buy_now"]).optional(),
35543
- subscribeButtonText: z57.string().optional(),
35544
- emptyStateText: z57.string().optional(),
35545
- checkoutButtonText: z57.string().optional(),
35546
- clearButtonText: z57.string().optional(),
35547
- submitButtonText: z57.string().optional(),
36379
+ heading: z58.string().nullable().optional(),
36380
+ productSlug: z58.string().nullable().optional(),
36381
+ showPasses: z58.boolean().optional(),
36382
+ showMemberships: z58.boolean().optional(),
36383
+ layout: z58.enum(["grid", "list"]).optional(),
36384
+ columns: z58.string().optional(),
36385
+ showDescriptions: z58.boolean().optional(),
36386
+ showSummary: z58.boolean().optional(),
36387
+ showBody: z58.boolean().optional(),
36388
+ showPrices: z58.boolean().optional(),
36389
+ showValidityPeriod: z58.boolean().optional(),
36390
+ showPricePerCredit: z58.boolean().nullable().optional(),
36391
+ passesHeading: z58.string().optional(),
36392
+ membershipsHeading: z58.string().optional(),
36393
+ buyButtonText: z58.string().optional(),
36394
+ addButtonText: z58.string().optional(),
36395
+ passPurchaseMode: z58.enum(["add_to_cart", "buy_now"]).optional(),
36396
+ subscribeButtonText: z58.string().optional(),
36397
+ emptyStateText: z58.string().optional(),
36398
+ checkoutButtonText: z58.string().optional(),
36399
+ clearButtonText: z58.string().optional(),
36400
+ submitButtonText: z58.string().optional(),
35548
36401
  contentEntry: contentEntrySchema3.optional(),
35549
- passes: z57.array(publicPassProductSchema).nullable().optional(),
35550
- memberships: z57.array(publicMembershipProductSchema).nullable().optional(),
35551
- products: z57.array(publicProductSchema).nullable().optional(),
35552
- siteId: z57.string().optional(),
35553
- apiBaseUrl: z57.string().optional(),
36402
+ passes: z58.array(publicPassProductSchema).nullable().optional(),
36403
+ memberships: z58.array(publicMembershipProductSchema).nullable().optional(),
36404
+ products: z58.array(publicProductSchema).nullable().optional(),
36405
+ siteId: z58.string().optional(),
36406
+ apiBaseUrl: z58.string().optional(),
35554
36407
  stage: previewStageSchema.optional()
35555
36408
  });
35556
- var productVariantOptionDisplaySchema = z57.object({
35557
- id: z57.string(),
35558
- label: z57.string(),
35559
- soldOut: z57.boolean()
35560
- });
35561
- var productCardDisplaySchema = z57.object({
35562
- productId: z57.string(),
35563
- title: z57.string(),
35564
- path: z57.string().nullable(),
35565
- summary: z57.string().nullable(),
35566
- priceLabel: z57.string().nullable(),
35567
- image: z57.object({
35568
- url: z57.string(),
35569
- alt: z57.string().nullable()
36409
+ var productVariantOptionDisplaySchema = z58.object({
36410
+ id: z58.string(),
36411
+ label: z58.string(),
36412
+ soldOut: z58.boolean()
36413
+ });
36414
+ var productCardDisplaySchema = z58.object({
36415
+ productId: z58.string(),
36416
+ title: z58.string(),
36417
+ path: z58.string().nullable(),
36418
+ summary: z58.string().nullable(),
36419
+ priceLabel: z58.string().nullable(),
36420
+ image: z58.object({
36421
+ url: z58.string(),
36422
+ alt: z58.string().nullable()
35570
36423
  }).nullable(),
35571
- variantOptions: z57.array(productVariantOptionDisplaySchema),
35572
- selectedVariantId: z57.string().nullable(),
35573
- selectionLabel: z57.string(),
35574
- actionLabel: z57.string(),
35575
- soldOut: z57.boolean()
35576
- });
35577
- var productListDisplaySchema = z57.object({
35578
- kind: z57.literal("product-list"),
35579
- state: z57.enum(["empty", "ready"]),
35580
- heading: z57.string().nullable(),
35581
- className: z57.string().nullable(),
35582
- layout: z57.enum(["grid", "list"]),
35583
- columns: z57.string(),
35584
- emptyMessage: z57.string(),
35585
- cards: z57.array(productCardDisplaySchema)
35586
- });
35587
- var productDetailDisplaySchema = z57.discriminatedUnion("state", [
35588
- z57.object({
35589
- kind: z57.literal("product-detail"),
35590
- state: z57.literal("empty"),
35591
- heading: z57.string().nullable(),
35592
- className: z57.string().nullable(),
35593
- emptyMessage: z57.string()
36424
+ variantOptions: z58.array(productVariantOptionDisplaySchema),
36425
+ selectedVariantId: z58.string().nullable(),
36426
+ selectionLabel: z58.string(),
36427
+ actionLabel: z58.string(),
36428
+ soldOut: z58.boolean()
36429
+ });
36430
+ var productListDisplaySchema = z58.object({
36431
+ kind: z58.literal("product-list"),
36432
+ state: z58.enum(["empty", "ready"]),
36433
+ heading: z58.string().nullable(),
36434
+ className: z58.string().nullable(),
36435
+ layout: z58.enum(["grid", "list"]),
36436
+ columns: z58.string(),
36437
+ emptyMessage: z58.string(),
36438
+ cards: z58.array(productCardDisplaySchema)
36439
+ });
36440
+ var productDetailDisplaySchema = z58.discriminatedUnion("state", [
36441
+ z58.object({
36442
+ kind: z58.literal("product-detail"),
36443
+ state: z58.literal("empty"),
36444
+ heading: z58.string().nullable(),
36445
+ className: z58.string().nullable(),
36446
+ emptyMessage: z58.string()
35594
36447
  }),
35595
- z57.object({
35596
- kind: z57.literal("product-detail"),
35597
- state: z57.literal("ready"),
35598
- heading: z57.string().nullable(),
35599
- className: z57.string().nullable(),
35600
- title: z57.string(),
35601
- priceLabel: z57.string(),
35602
- summary: z57.string().nullable(),
35603
- categoryLabel: z57.string().nullable(),
35604
- gallery: z57.array(z57.object({
35605
- url: z57.string(),
35606
- alt: z57.string().nullable()
36448
+ z58.object({
36449
+ kind: z58.literal("product-detail"),
36450
+ state: z58.literal("ready"),
36451
+ heading: z58.string().nullable(),
36452
+ className: z58.string().nullable(),
36453
+ title: z58.string(),
36454
+ priceLabel: z58.string(),
36455
+ summary: z58.string().nullable(),
36456
+ categoryLabel: z58.string().nullable(),
36457
+ gallery: z58.array(z58.object({
36458
+ url: z58.string(),
36459
+ alt: z58.string().nullable()
35607
36460
  })),
35608
- variantOptions: z57.array(productVariantOptionDisplaySchema),
35609
- selectedVariantId: z57.string().nullable(),
35610
- selectionLabel: z57.string(),
35611
- actionLabel: z57.string(),
35612
- soldOut: z57.boolean(),
35613
- body: z57.unknown().nullable()
36461
+ variantOptions: z58.array(productVariantOptionDisplaySchema),
36462
+ selectedVariantId: z58.string().nullable(),
36463
+ selectionLabel: z58.string(),
36464
+ actionLabel: z58.string(),
36465
+ soldOut: z58.boolean(),
36466
+ body: z58.unknown().nullable()
35614
36467
  })
35615
36468
  ]);
35616
- var passCardDisplaySchema = z57.object({
35617
- id: z57.string(),
35618
- title: z57.string(),
35619
- description: z57.string().nullable(),
35620
- priceLabel: z57.string(),
35621
- creditsLabel: z57.string(),
35622
- perCreditLabel: z57.string().nullable(),
35623
- validityLabel: z57.string().nullable(),
35624
- actionLabel: z57.string()
35625
- });
35626
- var membershipCardDisplaySchema = z57.object({
35627
- id: z57.string(),
35628
- title: z57.string(),
35629
- description: z57.string().nullable(),
35630
- priceLabel: z57.string(),
35631
- intervalLabel: z57.string(),
35632
- actionLabel: z57.string()
35633
- });
35634
- var passesMembershipsDisplaySchema = z57.object({
35635
- kind: z57.literal("passes-memberships"),
35636
- state: z57.enum(["empty", "ready"]),
35637
- className: z57.string().nullable(),
35638
- layout: z57.enum(["grid", "list"]),
35639
- columns: z57.string(),
35640
- emptyMessage: z57.string(),
35641
- passesHeading: z57.string(),
35642
- membershipsHeading: z57.string(),
35643
- passes: z57.array(passCardDisplaySchema),
35644
- memberships: z57.array(membershipCardDisplaySchema)
35645
- });
35646
- var cartLineDisplaySchema = z57.object({
35647
- key: z57.string(),
35648
- title: z57.string(),
35649
- priceLabel: z57.string(),
35650
- quantity: z57.number(),
35651
- quantityEditable: z57.boolean()
35652
- });
35653
- var cartDisplaySchema = z57.object({
35654
- kind: z57.literal("cart"),
35655
- state: z57.enum(["empty", "ready"]),
35656
- heading: z57.string().nullable(),
35657
- className: z57.string().nullable(),
35658
- emptyMessage: z57.string(),
35659
- supportText: z57.string().nullable(),
35660
- items: z57.array(cartLineDisplaySchema),
35661
- subtotalLabel: z57.string().nullable(),
35662
- checkoutButtonText: z57.string(),
35663
- clearButtonText: z57.string()
35664
- });
35665
- var checkoutDisplaySchema = z57.object({
35666
- kind: z57.literal("checkout"),
35667
- state: z57.enum(["empty", "blocked", "ready"]),
35668
- heading: z57.string().nullable(),
35669
- className: z57.string().nullable(),
35670
- message: z57.string().nullable(),
35671
- submitButtonText: z57.string()
35672
- });
35673
- var passesMembershipsHydrationSchema = z57.object({
35674
- passes: z57.array(publicPassProductSchema),
35675
- memberships: z57.array(publicMembershipProductSchema),
35676
- passPurchaseMode: z57.enum(["add_to_cart", "buy_now"])
35677
- });
35678
- var productListHydrationSchema = z57.object({
35679
- products: z57.array(publicProductSchema),
35680
- showSummary: z57.boolean(),
35681
- showPrices: z57.boolean(),
35682
- addButtonText: z57.string()
35683
- });
35684
- var productDetailHydrationSchema = z57.object({
35685
- products: z57.array(publicProductSchema),
35686
- productId: z57.string().nullable(),
35687
- showSummary: z57.boolean(),
35688
- showBody: z57.boolean(),
35689
- addButtonText: z57.string()
35690
- });
35691
- var cartHydrationSchema = z57.object({
35692
- emptyStateText: z57.string(),
35693
- checkoutButtonText: z57.string(),
35694
- clearButtonText: z57.string()
35695
- });
35696
- var checkoutHydrationSchema = z57.object({
35697
- emptyStateText: z57.string(),
35698
- submitButtonText: z57.string()
35699
- });
35700
- var passesMembershipsRenderSchema = z57.object({
36469
+ var passCardDisplaySchema = z58.object({
36470
+ id: z58.string(),
36471
+ title: z58.string(),
36472
+ description: z58.string().nullable(),
36473
+ priceLabel: z58.string(),
36474
+ creditsLabel: z58.string(),
36475
+ perCreditLabel: z58.string().nullable(),
36476
+ validityLabel: z58.string().nullable(),
36477
+ actionLabel: z58.string()
36478
+ });
36479
+ var membershipCardDisplaySchema = z58.object({
36480
+ id: z58.string(),
36481
+ title: z58.string(),
36482
+ description: z58.string().nullable(),
36483
+ priceLabel: z58.string(),
36484
+ intervalLabel: z58.string(),
36485
+ actionLabel: z58.string()
36486
+ });
36487
+ var passesMembershipsDisplaySchema = z58.object({
36488
+ kind: z58.literal("passes-memberships"),
36489
+ state: z58.enum(["empty", "ready"]),
36490
+ className: z58.string().nullable(),
36491
+ layout: z58.enum(["grid", "list"]),
36492
+ columns: z58.string(),
36493
+ emptyMessage: z58.string(),
36494
+ passesHeading: z58.string(),
36495
+ membershipsHeading: z58.string(),
36496
+ passes: z58.array(passCardDisplaySchema),
36497
+ memberships: z58.array(membershipCardDisplaySchema)
36498
+ });
36499
+ var cartLineDisplaySchema = z58.object({
36500
+ key: z58.string(),
36501
+ title: z58.string(),
36502
+ priceLabel: z58.string(),
36503
+ quantity: z58.number(),
36504
+ quantityEditable: z58.boolean()
36505
+ });
36506
+ var cartDisplaySchema = z58.object({
36507
+ kind: z58.literal("cart"),
36508
+ state: z58.enum(["empty", "ready"]),
36509
+ heading: z58.string().nullable(),
36510
+ className: z58.string().nullable(),
36511
+ emptyMessage: z58.string(),
36512
+ supportText: z58.string().nullable(),
36513
+ items: z58.array(cartLineDisplaySchema),
36514
+ subtotalLabel: z58.string().nullable(),
36515
+ checkoutButtonText: z58.string(),
36516
+ clearButtonText: z58.string()
36517
+ });
36518
+ var checkoutDisplaySchema = z58.object({
36519
+ kind: z58.literal("checkout"),
36520
+ state: z58.enum(["empty", "blocked", "ready"]),
36521
+ heading: z58.string().nullable(),
36522
+ className: z58.string().nullable(),
36523
+ message: z58.string().nullable(),
36524
+ submitButtonText: z58.string()
36525
+ });
36526
+ var passesMembershipsHydrationSchema = z58.object({
36527
+ passes: z58.array(publicPassProductSchema),
36528
+ memberships: z58.array(publicMembershipProductSchema),
36529
+ passPurchaseMode: z58.enum(["add_to_cart", "buy_now"])
36530
+ });
36531
+ var productListHydrationSchema = z58.object({
36532
+ products: z58.array(publicProductSchema),
36533
+ showSummary: z58.boolean(),
36534
+ showPrices: z58.boolean(),
36535
+ addButtonText: z58.string()
36536
+ });
36537
+ var productDetailHydrationSchema = z58.object({
36538
+ products: z58.array(publicProductSchema),
36539
+ productId: z58.string().nullable(),
36540
+ showSummary: z58.boolean(),
36541
+ showBody: z58.boolean(),
36542
+ addButtonText: z58.string()
36543
+ });
36544
+ var cartHydrationSchema = z58.object({
36545
+ emptyStateText: z58.string(),
36546
+ checkoutButtonText: z58.string(),
36547
+ clearButtonText: z58.string()
36548
+ });
36549
+ var checkoutHydrationSchema = z58.object({
36550
+ emptyStateText: z58.string(),
36551
+ submitButtonText: z58.string()
36552
+ });
36553
+ var passesMembershipsRenderSchema = z58.object({
35701
36554
  display: passesMembershipsDisplaySchema,
35702
36555
  hydration: passesMembershipsHydrationSchema
35703
36556
  });
35704
- var productListRenderSchema = z57.object({
36557
+ var productListRenderSchema = z58.object({
35705
36558
  display: productListDisplaySchema,
35706
36559
  hydration: productListHydrationSchema
35707
36560
  });
35708
- var productDetailRenderSchema = z57.object({
36561
+ var productDetailRenderSchema = z58.object({
35709
36562
  display: productDetailDisplaySchema,
35710
36563
  hydration: productDetailHydrationSchema
35711
36564
  });
35712
- var cartRenderSchema = z57.object({
36565
+ var cartRenderSchema = z58.object({
35713
36566
  display: cartDisplaySchema,
35714
36567
  hydration: cartHydrationSchema
35715
36568
  });
35716
- var checkoutRenderSchema = z57.object({
36569
+ var checkoutRenderSchema = z58.object({
35717
36570
  display: checkoutDisplaySchema,
35718
36571
  hydration: checkoutHydrationSchema
35719
36572
  });
35720
36573
  function resolveShowPricePerCredit(source) {
35721
36574
  return source.showPricePerCredit ?? true;
35722
36575
  }
35723
- var shopIslandMetaCodec = createZodCodec(z57.object({
35724
- siteId: z57.string().optional(),
35725
- apiBaseUrl: z57.string().optional(),
36576
+ var shopIslandMetaCodec = createZodCodec(z58.object({
36577
+ siteId: z58.string().optional(),
36578
+ apiBaseUrl: z58.string().optional(),
35726
36579
  stage: previewStageSchema.optional()
35727
36580
  }));
35728
36581
  var shopIslandMetaKeys = defineInteractiveIslandMetaKeys("siteId", "apiBaseUrl", "stage");
@@ -36100,9 +36953,9 @@ var shopBlockDefinition = {
36100
36953
  runtime: shopBlockRuntime,
36101
36954
  dataSchemas: {
36102
36955
  // listPublicPasses returns { passes: [...] }
36103
- passes: z58.object({ passes: z58.array(publicPassProductSchema) }).optional(),
36956
+ passes: z59.object({ passes: z59.array(publicPassProductSchema) }).optional(),
36104
36957
  // listPublicMemberships returns { memberships: [...] }
36105
- memberships: z58.object({ memberships: z58.array(publicMembershipProductSchema) }).optional()
36958
+ memberships: z59.object({ memberships: z59.array(publicMembershipProductSchema) }).optional()
36106
36959
  },
36107
36960
  dataLoaders: {
36108
36961
  // Load passes for display
@@ -36125,7 +36978,7 @@ var shopBlockDefinition = {
36125
36978
  };
36126
36979
 
36127
36980
  // ../blocks/src/system/blocks/product-list.ts
36128
- import { z as z59 } from "zod";
36981
+ import { z as z60 } from "zod";
36129
36982
  var productListManifest = createBlockManifest({
36130
36983
  id: "block.product-list",
36131
36984
  version: "1.0.0",
@@ -36258,7 +37111,7 @@ var productListBlockDefinition = {
36258
37111
  }
36259
37112
  }
36260
37113
  };
36261
- var productListDataSchema = z59.object({
37114
+ var productListDataSchema = z60.object({
36262
37115
  products: publicProductsResponseSchema.optional()
36263
37116
  });
36264
37117
 
@@ -36519,72 +37372,72 @@ var checkoutBlockDefinition = {
36519
37372
  };
36520
37373
 
36521
37374
  // ../blocks/src/system/runtime/nodes/gifting.interactive.ts
36522
- import { z as z60 } from "zod";
36523
- var publicGiftCardOfferSchema = z60.object({
36524
- id: z60.string(),
36525
- kind: z60.literal("gift_card"),
36526
- title: z60.string(),
36527
- description: z60.string().nullable(),
36528
- sortOrder: z60.number().int(),
36529
- giftCard: z60.object({
36530
- fixedDenominations: z60.array(z60.number().int().positive()),
36531
- customAmountEnabled: z60.boolean(),
36532
- customAmountMinCents: z60.number().int().positive(),
36533
- customAmountMaxCents: z60.number().int().positive()
37375
+ import { z as z61 } from "zod";
37376
+ var publicGiftCardOfferSchema = z61.object({
37377
+ id: z61.string(),
37378
+ kind: z61.literal("gift_card"),
37379
+ title: z61.string(),
37380
+ description: z61.string().nullable(),
37381
+ sortOrder: z61.number().int(),
37382
+ giftCard: z61.object({
37383
+ fixedDenominations: z61.array(z61.number().int().positive()),
37384
+ customAmountEnabled: z61.boolean(),
37385
+ customAmountMinCents: z61.number().int().positive(),
37386
+ customAmountMaxCents: z61.number().int().positive()
36534
37387
  }),
36535
- voucher: z60.null()
36536
- });
36537
- var publicVoucherOfferSchema = z60.object({
36538
- id: z60.string(),
36539
- kind: z60.literal("voucher"),
36540
- title: z60.string(),
36541
- description: z60.string().nullable(),
36542
- sortOrder: z60.number().int(),
36543
- giftCard: z60.null(),
36544
- voucher: z60.object({
36545
- purchaseAmountCents: z60.number().int().positive()
37388
+ voucher: z61.null()
37389
+ });
37390
+ var publicVoucherOfferSchema = z61.object({
37391
+ id: z61.string(),
37392
+ kind: z61.literal("voucher"),
37393
+ title: z61.string(),
37394
+ description: z61.string().nullable(),
37395
+ sortOrder: z61.number().int(),
37396
+ giftCard: z61.null(),
37397
+ voucher: z61.object({
37398
+ purchaseAmountCents: z61.number().int().positive()
36546
37399
  })
36547
37400
  });
36548
- var publicGiftingOffersResponseSchema = z60.object({
36549
- currency: z60.string(),
36550
- giftCards: z60.array(publicGiftCardOfferSchema),
36551
- vouchers: z60.array(publicVoucherOfferSchema)
37401
+ var publicGiftingOffersResponseSchema = z61.object({
37402
+ currency: z61.string(),
37403
+ giftCards: z61.array(publicGiftCardOfferSchema),
37404
+ vouchers: z61.array(publicVoucherOfferSchema)
36552
37405
  });
36553
- var giftingSourceSchema = z60.object({
36554
- siteId: z60.string().optional(),
36555
- apiBaseUrl: z60.string().optional(),
37406
+ var giftingSourceSchema = z61.object({
37407
+ siteId: z61.string().optional(),
37408
+ apiBaseUrl: z61.string().optional(),
36556
37409
  offers: publicGiftingOffersResponseSchema.nullable().optional(),
36557
- className: z60.string().nullable().optional(),
36558
- heading: z60.string().nullable().optional(),
36559
- intro: z60.string().nullable().optional(),
36560
- giftCardsHeading: z60.string().nullable().optional(),
36561
- vouchersHeading: z60.string().nullable().optional(),
36562
- emptyStateText: z60.string().nullable().optional(),
36563
- checkoutButtonText: z60.string().nullable().optional(),
36564
- successMessage: z60.string().nullable().optional()
36565
- });
36566
- var giftingDisplaySchema = z60.object({
36567
- kind: z60.literal("gifting"),
36568
- state: z60.literal("ready"),
36569
- className: z60.string().nullable(),
36570
- heading: z60.string(),
36571
- intro: z60.string().nullable(),
36572
- giftCardsHeading: z60.string(),
36573
- vouchersHeading: z60.string(),
36574
- emptyStateText: z60.string()
36575
- });
36576
- var giftingHydrationSchema = z60.object({
37410
+ className: z61.string().nullable().optional(),
37411
+ heading: z61.string().nullable().optional(),
37412
+ intro: z61.string().nullable().optional(),
37413
+ giftCardsHeading: z61.string().nullable().optional(),
37414
+ vouchersHeading: z61.string().nullable().optional(),
37415
+ emptyStateText: z61.string().nullable().optional(),
37416
+ checkoutButtonText: z61.string().nullable().optional(),
37417
+ successMessage: z61.string().nullable().optional()
37418
+ });
37419
+ var giftingDisplaySchema = z61.object({
37420
+ kind: z61.literal("gifting"),
37421
+ state: z61.literal("ready"),
37422
+ className: z61.string().nullable(),
37423
+ heading: z61.string(),
37424
+ intro: z61.string().nullable(),
37425
+ giftCardsHeading: z61.string(),
37426
+ vouchersHeading: z61.string(),
37427
+ emptyStateText: z61.string()
37428
+ });
37429
+ var giftingHydrationSchema = z61.object({
36577
37430
  offers: publicGiftingOffersResponseSchema.nullable(),
36578
- checkoutButtonText: z60.string(),
36579
- successMessage: z60.string()
37431
+ checkoutButtonText: z61.string(),
37432
+ successMessage: z61.string()
36580
37433
  });
36581
- var giftingRenderSchema = z60.object({
37434
+ var giftingRenderSchema = z61.object({
36582
37435
  display: giftingDisplaySchema,
36583
37436
  hydration: giftingHydrationSchema
36584
37437
  });
36585
- var giftingIslandMetaCodec = createZodCodec(z60.object({
36586
- siteId: z60.string().optional(),
36587
- apiBaseUrl: z60.string().optional()
37438
+ var giftingIslandMetaCodec = createZodCodec(z61.object({
37439
+ siteId: z61.string().optional(),
37440
+ apiBaseUrl: z61.string().optional()
36588
37441
  }));
36589
37442
  var giftingIslandMetaKeys = defineInteractiveIslandMetaKeys(
36590
37443
  "siteId",
@@ -36755,7 +37608,89 @@ var giftingBlockDefinition = {
36755
37608
  };
36756
37609
 
36757
37610
  // ../blocks/src/system/runtime/nodes/newsletter-form.interactive.ts
36758
- import { z as z61 } from "zod";
37611
+ import { z as z62 } from "zod";
37612
+
37613
+ // ../blocks/src/system/blocks/newsletter-signup-destination.ts
37614
+ function parseNewsletterSignupBlockId(value) {
37615
+ const trimmed = parseTrimmedString(value);
37616
+ return trimmed && BLOCK_ID_PATTERN.test(trimmed) ? trimmed : null;
37617
+ }
37618
+ function parseSignedNewsletterDestinationRef(value) {
37619
+ const trimmed = parseTrimmedString(value);
37620
+ return trimmed && SIGNED_DESTINATION_REF_PATTERN.test(trimmed) ? trimmed : null;
37621
+ }
37622
+ function parseNewsletterSignupDestinationProvider(value) {
37623
+ return value === "riverbank" || value === "mailchimp" ? value : null;
37624
+ }
37625
+ function buildNewsletterSignupBlockRef(blockId) {
37626
+ const parsed = parseNewsletterSignupBlockId(blockId);
37627
+ return parsed ? { tag: "block_ref", blockId: parsed } : null;
37628
+ }
37629
+ function normalizeNewsletterSignupEditorValuesForDestination(values) {
37630
+ const destinationProvider = parseNewsletterSignupDestinationProvider(values.destinationProvider) ?? "riverbank";
37631
+ if (destinationProvider === "mailchimp") {
37632
+ return {
37633
+ destinationProvider,
37634
+ mailchimpAudienceId: values.mailchimpAudienceId,
37635
+ mailchimpTags: values.mailchimpTags
37636
+ };
37637
+ }
37638
+ return {
37639
+ destinationProvider,
37640
+ listId: values.listId,
37641
+ tags: values.tags
37642
+ };
37643
+ }
37644
+ function deriveNewsletterSignupRuntimeSource(values) {
37645
+ const normalized = normalizeNewsletterSignupEditorValuesForDestination(values);
37646
+ if (normalized.destinationProvider === "mailchimp") {
37647
+ return {
37648
+ destinationProvider: "mailchimp",
37649
+ listId: null,
37650
+ tags: null
37651
+ };
37652
+ }
37653
+ return {
37654
+ destinationProvider: "riverbank",
37655
+ listId: parseTrimmedString(normalized.listId),
37656
+ tags: parseTrimmedString(normalized.tags)
37657
+ };
37658
+ }
37659
+ function sanitizeNewsletterSignupPublicContent(content) {
37660
+ if (!isRecord7(content)) return content;
37661
+ const provider = parseNewsletterSignupDestinationProvider(content.destinationProvider) ?? getProviderFromExplicitDestination(content.destination);
37662
+ const {
37663
+ destination: _destination,
37664
+ destinationProvider: _destinationProvider,
37665
+ mailchimpAudienceId: _mailchimpAudienceId,
37666
+ mailchimpTags: _mailchimpTags,
37667
+ listId,
37668
+ tags: tags2,
37669
+ ...publicContent
37670
+ } = content;
37671
+ const mutablePublicContent = { ...publicContent };
37672
+ if (provider !== "mailchimp") {
37673
+ if ("listId" in content) mutablePublicContent.listId = listId;
37674
+ if ("tags" in content) mutablePublicContent.tags = tags2;
37675
+ }
37676
+ return mutablePublicContent;
37677
+ }
37678
+ function getProviderFromExplicitDestination(destination) {
37679
+ if (!isRecord7(destination) || typeof destination.tag !== "string") return null;
37680
+ if (destination.tag === "riverbank_list") return "riverbank";
37681
+ if (destination.tag === "mailchimp_audience") return "mailchimp";
37682
+ return null;
37683
+ }
37684
+ var BLOCK_ID_PATTERN = /^[A-Za-z0-9._:-]{1,200}$/;
37685
+ var SIGNED_DESTINATION_REF_PATTERN = /^[A-Za-z0-9._~-]{16,1000}$/;
37686
+ function parseTrimmedString(value) {
37687
+ if (typeof value !== "string") return null;
37688
+ const trimmed = value.trim();
37689
+ return trimmed.length > 0 ? trimmed : null;
37690
+ }
37691
+ function isRecord7(value) {
37692
+ return typeof value === "object" && value !== null;
37693
+ }
36759
37694
 
36760
37695
  // ../blocks/src/system/runtime/nodes/newsletter-form.types.ts
36761
37696
  function getPresetFields(preset2, options) {
@@ -36808,49 +37743,65 @@ function withOptionalPhone(fields3, includePhone) {
36808
37743
  }
36809
37744
 
36810
37745
  // ../blocks/src/system/runtime/nodes/newsletter-form.interactive.ts
36811
- var newsletterPresetSchema = z61.enum(["emailOnly", "emailName", "emailFirstLast", "emailNameCompany"]);
36812
- var newsletterFieldSchema = z61.object({
36813
- id: z61.string(),
36814
- type: z61.enum(["email", "text"]),
36815
- label: z61.string(),
36816
- required: z61.boolean(),
36817
- placeholder: z61.string().optional()
36818
- });
36819
- var newsletterSourceSchema = z61.object({
36820
- siteId: z61.string().optional(),
36821
- apiBaseUrl: z61.string().optional(),
36822
- listId: z61.string().nullable().optional(),
37746
+ var newsletterPresetSchema = z62.enum(["emailOnly", "emailName", "emailFirstLast", "emailNameCompany"]);
37747
+ var newsletterDestinationProviderSchema = z62.enum(["riverbank", "mailchimp"]);
37748
+ var newsletterFieldSchema = z62.object({
37749
+ id: z62.string(),
37750
+ type: z62.enum(["email", "text"]),
37751
+ label: z62.string(),
37752
+ required: z62.boolean(),
37753
+ placeholder: z62.string().optional()
37754
+ });
37755
+ var newsletterSignupBlockIdSchema = z62.string().trim().min(1).transform(parseRequiredNewsletterSignupBlockId);
37756
+ var signedNewsletterDestinationRefSchema = z62.string().trim().min(1).transform(parseRequiredSignedNewsletterDestinationRef);
37757
+ var newsletterPublicDestinationRefSchema = z62.discriminatedUnion("tag", [
37758
+ z62.object({
37759
+ tag: z62.literal("block_ref"),
37760
+ blockId: newsletterSignupBlockIdSchema
37761
+ }),
37762
+ z62.object({
37763
+ tag: z62.literal("signed_destination_ref"),
37764
+ token: signedNewsletterDestinationRefSchema
37765
+ })
37766
+ ]);
37767
+ var newsletterSourceSchema = z62.object({
37768
+ blockId: z62.string().nullable().optional(),
37769
+ siteId: z62.string().optional(),
37770
+ apiBaseUrl: z62.string().optional(),
37771
+ listId: z62.string().nullable().optional(),
37772
+ destinationProvider: newsletterDestinationProviderSchema.nullable().optional(),
36823
37773
  preset: newsletterPresetSchema.optional(),
36824
- includePhone: z61.boolean().optional(),
36825
- buttonLabel: z61.string().nullable().optional(),
36826
- successMessage: z61.string().nullable().optional(),
36827
- privacyNote: z61.string().nullable().optional(),
36828
- tags: z61.string().nullable().optional(),
36829
- spamProtectionEnabled: z61.boolean().optional(),
36830
- className: z61.string().nullable().optional()
36831
- });
36832
- var newsletterDisplaySchema = z61.object({
36833
- kind: z61.literal("newsletter-form"),
36834
- className: z61.string().nullable(),
36835
- buttonLabel: z61.string(),
36836
- successMessage: z61.string().nullable(),
36837
- privacyNote: z61.string().nullable(),
36838
- fields: z61.array(newsletterFieldSchema)
36839
- });
36840
- var newsletterHydrationSchema = z61.object({
36841
- listId: z61.string().nullable().optional(),
37774
+ includePhone: z62.boolean().optional(),
37775
+ buttonLabel: z62.string().nullable().optional(),
37776
+ successMessage: z62.string().nullable().optional(),
37777
+ privacyNote: z62.string().nullable().optional(),
37778
+ tags: z62.string().nullable().optional(),
37779
+ spamProtectionEnabled: z62.boolean().optional(),
37780
+ className: z62.string().nullable().optional()
37781
+ });
37782
+ var newsletterDisplaySchema = z62.object({
37783
+ kind: z62.literal("newsletter-form"),
37784
+ className: z62.string().nullable(),
37785
+ buttonLabel: z62.string(),
37786
+ successMessage: z62.string().nullable(),
37787
+ privacyNote: z62.string().nullable(),
37788
+ fields: z62.array(newsletterFieldSchema)
37789
+ });
37790
+ var newsletterHydrationSchema = z62.object({
37791
+ destinationRef: newsletterPublicDestinationRefSchema.nullable().optional(),
37792
+ listId: z62.string().nullable().optional(),
36842
37793
  preset: newsletterPresetSchema,
36843
- includePhone: z61.boolean(),
36844
- tags: z61.string().nullable().optional(),
36845
- spamProtectionEnabled: z61.boolean().optional()
37794
+ includePhone: z62.boolean(),
37795
+ tags: z62.string().nullable().optional(),
37796
+ spamProtectionEnabled: z62.boolean().optional()
36846
37797
  });
36847
- var newsletterRenderSchema = z61.object({
37798
+ var newsletterRenderSchema = z62.object({
36848
37799
  display: newsletterDisplaySchema,
36849
37800
  hydration: newsletterHydrationSchema
36850
37801
  });
36851
- var newsletterIslandMetaCodec = createZodCodec(z61.object({
36852
- siteId: z61.string().optional(),
36853
- apiBaseUrl: z61.string().optional()
37802
+ var newsletterIslandMetaCodec = createZodCodec(z62.object({
37803
+ siteId: z62.string().optional(),
37804
+ apiBaseUrl: z62.string().optional()
36854
37805
  }));
36855
37806
  var newsletterIslandMetaKeys = defineInteractiveIslandMetaKeys("siteId", "apiBaseUrl");
36856
37807
  function buildNewsletterDisplay(source) {
@@ -36871,16 +37822,20 @@ var newsletterFormBlockRuntime = defineProgressiveBlockRuntime({
36871
37822
  source: createZodCodec(newsletterSourceSchema),
36872
37823
  render: createZodCodec(newsletterRenderSchema)
36873
37824
  },
36874
- buildRender: (source) => ({
36875
- display: buildNewsletterDisplay(source),
36876
- hydration: {
36877
- listId: source.listId,
36878
- preset: source.preset ?? "emailOnly",
36879
- includePhone: source.includePhone ?? false,
36880
- tags: source.tags ?? null,
36881
- spamProtectionEnabled: source.spamProtectionEnabled
36882
- }
36883
- })
37825
+ buildRender: (source) => {
37826
+ const runtimeSource = deriveNewsletterSignupRuntimeSource(source);
37827
+ return {
37828
+ display: buildNewsletterDisplay(source),
37829
+ hydration: {
37830
+ destinationRef: buildNewsletterSignupBlockRef(source.blockId),
37831
+ listId: runtimeSource.listId,
37832
+ preset: source.preset ?? "emailOnly",
37833
+ includePhone: source.includePhone ?? false,
37834
+ tags: runtimeSource.tags,
37835
+ spamProtectionEnabled: source.spamProtectionEnabled
37836
+ }
37837
+ };
37838
+ }
36884
37839
  });
36885
37840
  var newsletterFormInteractiveIslandPropsCodec = createInteractiveIslandCodec({
36886
37841
  runtime: newsletterFormBlockRuntime,
@@ -36892,6 +37847,20 @@ var newsletterFormInteractiveIslandPropsCodec = createInteractiveIslandCodec({
36892
37847
  apiBaseUrl: value.apiBaseUrl
36893
37848
  })
36894
37849
  });
37850
+ function parseRequiredNewsletterSignupBlockId(value) {
37851
+ const parsed = parseNewsletterSignupBlockId(value);
37852
+ if (!parsed) {
37853
+ throw new Error("Newsletter signup block destination ref requires blockId");
37854
+ }
37855
+ return parsed;
37856
+ }
37857
+ function parseRequiredSignedNewsletterDestinationRef(value) {
37858
+ const parsed = parseSignedNewsletterDestinationRef(value);
37859
+ if (!parsed) {
37860
+ throw new Error("Newsletter signup signed destination ref requires token");
37861
+ }
37862
+ return parsed;
37863
+ }
36895
37864
 
36896
37865
  // ../blocks/src/system/blocks/newsletter-signup.ts
36897
37866
  var stackedComposition = composeFragments([
@@ -36971,23 +37940,23 @@ var newsletterSignupBlockDefinition = {
36971
37940
  };
36972
37941
 
36973
37942
  // ../blocks/src/system/blocks/team-members.ts
36974
- import { z as z62 } from "zod";
37943
+ import { z as z63 } from "zod";
36975
37944
  var ITEM_NAME2 = "member";
36976
37945
  var teamMemberPhotoSchema = mediaSchema2.refine((media2) => media2.type === "image", {
36977
37946
  message: "Team member photos must be image media"
36978
37947
  }).nullable();
36979
- var teamMemberDataSchema = z62.object({
36980
- _type: z62.literal("teamMember"),
36981
- id: z62.string(),
36982
- name: z62.string(),
36983
- role: z62.string().nullable(),
36984
- roleLabel: z62.string().nullable(),
36985
- bio: z62.string().nullable(),
36986
- summary: z62.string().nullable(),
37948
+ var teamMemberDataSchema = z63.object({
37949
+ _type: z63.literal("teamMember"),
37950
+ id: z63.string(),
37951
+ name: z63.string(),
37952
+ role: z63.string().nullable(),
37953
+ roleLabel: z63.string().nullable(),
37954
+ bio: z63.string().nullable(),
37955
+ summary: z63.string().nullable(),
36987
37956
  photo: teamMemberPhotoSchema,
36988
- profilePath: z62.string().nullable()
37957
+ profilePath: z63.string().nullable()
36989
37958
  });
36990
- var teamMembersDataSchema = z62.array(teamMemberDataSchema);
37959
+ var teamMembersDataSchema = z63.array(teamMemberDataSchema);
36991
37960
  var dynamicSourceWhen = { equals: "site_staff" };
36992
37961
  var manualSourceWhen = { equals: "site_staff", not: true };
36993
37962
  var headingNode = text(
@@ -38894,7 +39863,7 @@ var defaultTransforms = createTransformRegistry(builtinTransformDefinitions);
38894
39863
  // ../blocks/src/system/data/linkedContentEntries.ts
38895
39864
  var LINKED_CONTENT_ENTRY_META_KEY = "__rbLinkedContentEntry";
38896
39865
  function coerceLinkedContentEntriesPayload(payload) {
38897
- if (!isRecord7(payload)) return payload;
39866
+ if (!isRecord8(payload)) return payload;
38898
39867
  const response = payload;
38899
39868
  if (!Array.isArray(response.entries)) return payload;
38900
39869
  const contentType = parsePublicContentTypeMeta(response.contentType);
@@ -38902,12 +39871,12 @@ function coerceLinkedContentEntriesPayload(payload) {
38902
39871
  return response.entries.map((entry) => enrichLinkedContentEntry(entry, contentType));
38903
39872
  }
38904
39873
  function enrichLinkedContentEntry(entry, contentType) {
38905
- if (!isRecord7(entry)) return entry;
39874
+ if (!isRecord8(entry)) return entry;
38906
39875
  const entryId = typeof entry.id === "string" ? entry.id : null;
38907
39876
  if (!entryId) return entry;
38908
39877
  const title = typeof entry.title === "string" && entry.title.trim().length > 0 ? entry.title : entryId;
38909
39878
  const optimisticHash = typeof entry.optimisticHash === "string" && entry.optimisticHash.length > 0 ? entry.optimisticHash : null;
38910
- const content = isRecord7(entry.content) ? entry.content : {};
39879
+ const content = isRecord8(entry.content) ? entry.content : {};
38911
39880
  const meta = {
38912
39881
  kind: "linked-content-entry",
38913
39882
  entryId,
@@ -38989,7 +39958,7 @@ function resolveLinkedContentEditSupport(contentType) {
38989
39958
  case "unsupported-domain-backed":
38990
39959
  return { kind: "unsupported-domain-backed", reason: metadata.reason };
38991
39960
  default:
38992
- return assertNever(metadata);
39961
+ return assertNever2(metadata);
38993
39962
  }
38994
39963
  }
38995
39964
  function contentTypeKeyToLabel(key) {
@@ -39000,7 +39969,7 @@ function capitalize(value) {
39000
39969
  return value.charAt(0).toUpperCase() + value.slice(1).toLowerCase();
39001
39970
  }
39002
39971
  function parsePublicContentTypeMeta(value) {
39003
- if (!isRecord7(value)) return null;
39972
+ if (!isRecord8(value)) return null;
39004
39973
  if (typeof value.key !== "string" || value.key.trim().length === 0) return null;
39005
39974
  return {
39006
39975
  key: value.key,
@@ -39010,7 +39979,7 @@ function parsePublicContentTypeMeta(value) {
39010
39979
  };
39011
39980
  }
39012
39981
  function parsePublicContentTypeLinkedEntryEditing(value) {
39013
- if (!isRecord7(value) || typeof value.kind !== "string") return null;
39982
+ if (!isRecord8(value) || typeof value.kind !== "string") return null;
39014
39983
  switch (value.kind) {
39015
39984
  case "generic":
39016
39985
  return { kind: "generic" };
@@ -39024,7 +39993,7 @@ function parsePublicContentTypeLinkedEntryEditing(value) {
39024
39993
  }
39025
39994
  }
39026
39995
  function parsePublicContentTypeFieldMeta(value) {
39027
- if (!isRecord7(value)) return [];
39996
+ if (!isRecord8(value)) return [];
39028
39997
  if (typeof value.id !== "string" || typeof value.type !== "string") return [];
39029
39998
  return [{
39030
39999
  id: value.id,
@@ -39038,45 +40007,10 @@ function parseStringArray(value) {
39038
40007
  if (!Array.isArray(value)) return null;
39039
40008
  return value.filter((item) => typeof item === "string");
39040
40009
  }
39041
- function isRecord7(value) {
40010
+ function isRecord8(value) {
39042
40011
  return typeof value === "object" && value !== null && !Array.isArray(value);
39043
40012
  }
39044
40013
 
39045
- // ../blocks/src/system/manifest/richTextSchema.ts
39046
- import { z as z63 } from "zod";
39047
- var TipTapMarkSchema = z63.object({
39048
- type: z63.string(),
39049
- attrs: z63.record(z63.string(), z63.unknown()).optional()
39050
- });
39051
- var TipTapNodeSchema = z63.lazy(
39052
- () => z63.object({
39053
- type: z63.string(),
39054
- content: z63.array(TipTapNodeSchema).optional(),
39055
- text: z63.string().optional(),
39056
- attrs: z63.record(z63.string(), z63.unknown()).optional(),
39057
- marks: z63.array(TipTapMarkSchema).optional()
39058
- })
39059
- );
39060
- var RichTextValueSchema = z63.union([
39061
- // Canonical: TipTap document directly
39062
- TipTapNodeSchema,
39063
- // Legacy (read-tolerance only): wrapped in { doc: {...} }
39064
- z63.object({
39065
- doc: TipTapNodeSchema
39066
- })
39067
- ]);
39068
- var RichTextDocSchema = z63.object({
39069
- type: z63.literal("doc"),
39070
- content: z63.array(TipTapNodeSchema)
39071
- });
39072
- function unwrapRichTextRoot(value) {
39073
- if (!isRecord2(value)) return value;
39074
- if (!("doc" in value)) return value;
39075
- const inner = value.doc;
39076
- if (isRecord2(inner) && inner.type === "doc") return inner;
39077
- return value;
39078
- }
39079
-
39080
40014
  // ../theme-core/src/navigation/presets.ts
39081
40015
  var NAV_LINK_PRESETS = {
39082
40016
  /**
@@ -40838,7 +41772,7 @@ function preset(id, verticalId, canonicalBehaviour, label, pluralLabel, descript
40838
41772
  }
40839
41773
 
40840
41774
  // ../api/src/utils/isRecord.ts
40841
- function isRecord8(value) {
41775
+ function isRecord9(value) {
40842
41776
  return typeof value === "object" && value !== null && !Array.isArray(value);
40843
41777
  }
40844
41778
 
@@ -41145,7 +42079,7 @@ function sanitizeMarks(marks) {
41145
42079
  if (mark.type === "bold" || mark.type === "strong" || mark.type === "italic" || mark.type === "em") {
41146
42080
  return [{ type: mark.type }];
41147
42081
  }
41148
- if (mark.type === "link" && isRecord8(mark.attrs) && typeof mark.attrs.href === "string") {
42082
+ if (mark.type === "link" && isRecord9(mark.attrs) && typeof mark.attrs.href === "string") {
41149
42083
  const attrs = { href: mark.attrs.href };
41150
42084
  if (typeof mark.attrs.target === "string" && mark.attrs.target.trim().length > 0) {
41151
42085
  attrs.target = mark.attrs.target;
@@ -41160,10 +42094,10 @@ function sanitizeMarks(marks) {
41160
42094
  return sanitized.length > 0 ? sanitized : void 0;
41161
42095
  }
41162
42096
  function unwrapRichTextValue(value) {
41163
- if (isRecord8(value) && isRecord8(value.doc)) {
42097
+ if (isRecord9(value) && isRecord9(value.doc)) {
41164
42098
  return unwrapRichTextValue(value.doc);
41165
42099
  }
41166
- if (isRecord8(value) && value.type === "doc") {
42100
+ if (isRecord9(value) && value.type === "doc") {
41167
42101
  return {
41168
42102
  type: "doc",
41169
42103
  content: Array.isArray(value.content) ? value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) : []
@@ -41172,7 +42106,7 @@ function unwrapRichTextValue(value) {
41172
42106
  return EMPTY_SITE_BANNER_BODY;
41173
42107
  }
41174
42108
  function isTipTapNodeLike(value) {
41175
- return isRecord8(value) && typeof value.type === "string";
42109
+ return isRecord9(value) && typeof value.type === "string";
41176
42110
  }
41177
42111
  function coerceTipTapNode(value) {
41178
42112
  return {
@@ -41180,9 +42114,9 @@ function coerceTipTapNode(value) {
41180
42114
  ...Array.isArray(value.content) ? { content: value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) } : {},
41181
42115
  ...typeof value.text === "string" ? { text: value.text } : {},
41182
42116
  ...Array.isArray(value.marks) ? {
41183
- marks: value.marks.filter((mark) => isRecord8(mark) && typeof mark.type === "string").map((mark) => ({
42117
+ marks: value.marks.filter((mark) => isRecord9(mark) && typeof mark.type === "string").map((mark) => ({
41184
42118
  type: mark.type,
41185
- ...isRecord8(mark.attrs) ? { attrs: mark.attrs } : {}
42119
+ ...isRecord9(mark.attrs) ? { attrs: mark.attrs } : {}
41186
42120
  }))
41187
42121
  } : {}
41188
42122
  };
@@ -41307,21 +42241,8 @@ var MultiPageUpdateResponse = z70.object({
41307
42241
  });
41308
42242
 
41309
42243
  // src/data/prefetchBlockData.ts
41310
- var SUPPORTED_LOADER_ENDPOINTS2 = [
41311
- "listPublishedEntries",
41312
- "getPublishedEntryPreview",
41313
- "listPublicEvents",
41314
- "listPublicCourses",
41315
- "listPublicTeamMembers",
41316
- "listPublicProducts",
41317
- "listPublicPasses",
41318
- "listPublicMemberships",
41319
- "getPublicFormById",
41320
- "getPublicBookingServices",
41321
- "getPublicEventDetails"
41322
- ];
41323
42244
  function isSupportedLoaderEndpoint2(endpoint) {
41324
- return SUPPORTED_LOADER_ENDPOINTS2.includes(endpoint);
42245
+ return SUPPORTED_LOADER_ENDPOINTS.includes(endpoint);
41325
42246
  }
41326
42247
  var ENTRY_REF_KEYS = [
41327
42248
  "identifier",
@@ -41330,7 +42251,7 @@ var ENTRY_REF_KEYS = [
41330
42251
  "entryId",
41331
42252
  "slug"
41332
42253
  ];
41333
- function isRecord9(value) {
42254
+ function isRecord10(value) {
41334
42255
  return Boolean(value) && typeof value === "object" && !Array.isArray(value);
41335
42256
  }
41336
42257
  function extractManualEntryRef(item) {
@@ -41338,7 +42259,7 @@ function extractManualEntryRef(item) {
41338
42259
  const trimmed = item.trim();
41339
42260
  return trimmed.length > 0 ? trimmed : null;
41340
42261
  }
41341
- if (!isRecord9(item)) return null;
42262
+ if (!isRecord10(item)) return null;
41342
42263
  for (const key of ENTRY_REF_KEYS) {
41343
42264
  const raw = item[key];
41344
42265
  if (typeof raw === "string" && raw.trim().length > 0) {
@@ -41386,6 +42307,194 @@ function parseManualEntryRefs(...values) {
41386
42307
  }
41387
42308
  return void 0;
41388
42309
  }
42310
+ var loaderAdapters = {
42311
+ listPublishedEntries: listPublishedEntries2,
42312
+ getPublishedEntryPreview,
42313
+ listPublicEvents,
42314
+ getPublicEventDetails,
42315
+ listPublicCourses,
42316
+ listPublicRouteCandidates,
42317
+ listPublicTeamMembers,
42318
+ listPublicProducts,
42319
+ listPublicPasses,
42320
+ listPublicMemberships,
42321
+ getPublicFormById,
42322
+ getPublicBookingServices
42323
+ };
42324
+ function readStringParam(params, key) {
42325
+ const value = params[key];
42326
+ return value && value.length > 0 ? value : void 0;
42327
+ }
42328
+ function requireStringParam(params, key, endpoint) {
42329
+ const value = readStringParam(params, key);
42330
+ if (!value) {
42331
+ throw new Error(`${endpoint} requires ${key} param`);
42332
+ }
42333
+ return value;
42334
+ }
42335
+ function parsePositiveIntegerParam(params, key) {
42336
+ const value = params[key];
42337
+ const parsed = value === void 0 ? void 0 : Number.parseInt(value, 10);
42338
+ return typeof parsed === "number" && Number.isInteger(parsed) && parsed > 0 ? parsed : void 0;
42339
+ }
42340
+ function parseEntryOrder(value) {
42341
+ if (value === void 0) return void 0;
42342
+ switch (value) {
42343
+ case "order":
42344
+ return "manual";
42345
+ case "newest":
42346
+ case "oldest":
42347
+ case "title":
42348
+ return value;
42349
+ default:
42350
+ return void 0;
42351
+ }
42352
+ }
42353
+ function parsePublicEventKind(value) {
42354
+ if (value === void 0) return void 0;
42355
+ switch (value) {
42356
+ case "all":
42357
+ case "courses":
42358
+ case "events":
42359
+ return value;
42360
+ default:
42361
+ return void 0;
42362
+ }
42363
+ }
42364
+ async function listPublishedEntries2({ client, params }) {
42365
+ const siteId = requireStringParam(params, "siteId", "listPublishedEntries");
42366
+ const type = requireStringParam(params, "type", "listPublishedEntries");
42367
+ const stage = readStringParam(params, "stage");
42368
+ const mode = readStringParam(params, "mode");
42369
+ const parsedEntryRefs = mode === "manual" ? parseManualEntryRefs(params.identifiers, params.entryRefs, params.entryIds) : void 0;
42370
+ if (mode === "manual" && (!parsedEntryRefs || parsedEntryRefs.length === 0)) {
42371
+ return { entries: [] };
42372
+ }
42373
+ if (mode === "manual" && parsedEntryRefs) {
42374
+ return await client.getEntriesByIdentifiers({
42375
+ siteId,
42376
+ contentType: type,
42377
+ identifiers: parsedEntryRefs,
42378
+ preview: stage === "preview"
42379
+ });
42380
+ }
42381
+ return await client.getEntries({
42382
+ siteId,
42383
+ contentType: type,
42384
+ limit: parsePositiveIntegerParam(params, "limit"),
42385
+ order: parseEntryOrder(readStringParam(params, "orderBy")),
42386
+ preview: stage === "preview"
42387
+ });
42388
+ }
42389
+ async function getPublishedEntryPreview({ client, params }) {
42390
+ return await client.getEntry({
42391
+ siteId: requireStringParam(params, "siteId", "getPublishedEntryPreview"),
42392
+ contentType: requireStringParam(params, "type", "getPublishedEntryPreview"),
42393
+ slug: requireStringParam(params, "slug", "getPublishedEntryPreview")
42394
+ });
42395
+ }
42396
+ async function listPublicEvents({ client, params }) {
42397
+ return await client.listPublicEvents({
42398
+ siteId: requireStringParam(params, "siteId", "listPublicEvents"),
42399
+ limit: parsePositiveIntegerParam(params, "limit"),
42400
+ from: readStringParam(params, "from"),
42401
+ to: readStringParam(params, "to"),
42402
+ afterStartsAt: readStringParam(params, "afterStartsAt"),
42403
+ afterId: readStringParam(params, "afterId"),
42404
+ stage: readStringParam(params, "stage"),
42405
+ categoryIds: readStringParam(params, "categoryIds"),
42406
+ venueId: readStringParam(params, "venueId"),
42407
+ staffMemberId: readStringParam(params, "staffMemberId"),
42408
+ kind: parsePublicEventKind(readStringParam(params, "kind")),
42409
+ eventSurface: readStringParam(params, "eventSurface"),
42410
+ eventPresets: readStringParam(params, "eventPresets"),
42411
+ scheduleScope: readStringParam(params, "scheduleScope"),
42412
+ entryId: readStringParam(params, "entryId"),
42413
+ seriesId: readStringParam(params, "seriesId"),
42414
+ includeOccurrenceId: readStringParam(params, "includeOccurrenceId")
42415
+ });
42416
+ }
42417
+ async function getPublicEventDetails({ client, params }) {
42418
+ return await client.getPublicEventDetails({
42419
+ siteId: requireStringParam(params, "siteId", "getPublicEventDetails"),
42420
+ limit: parsePositiveIntegerParam(params, "limit"),
42421
+ from: readStringParam(params, "from"),
42422
+ to: readStringParam(params, "to"),
42423
+ afterStartsAt: readStringParam(params, "afterStartsAt"),
42424
+ afterId: readStringParam(params, "afterId"),
42425
+ stage: readStringParam(params, "stage"),
42426
+ categoryIds: readStringParam(params, "categoryIds"),
42427
+ venueId: readStringParam(params, "venueId"),
42428
+ staffMemberId: readStringParam(params, "staffMemberId"),
42429
+ kind: readStringParam(params, "kind"),
42430
+ eventSurface: readStringParam(params, "eventSurface"),
42431
+ eventPresets: readStringParam(params, "eventPresets"),
42432
+ scheduleScope: readStringParam(params, "scheduleScope"),
42433
+ entryId: readStringParam(params, "entryId"),
42434
+ seriesId: readStringParam(params, "seriesId"),
42435
+ includeOccurrenceId: readStringParam(params, "includeOccurrenceId")
42436
+ });
42437
+ }
42438
+ async function listPublicCourses({ client, params }) {
42439
+ return await client.listPublicCourses({
42440
+ siteId: requireStringParam(params, "siteId", "listPublicCourses"),
42441
+ limit: parsePositiveIntegerParam(params, "limit"),
42442
+ stage: readStringParam(params, "stage")
42443
+ });
42444
+ }
42445
+ async function listPublicRouteCandidates({ client, params }) {
42446
+ const siteId = requireStringParam(params, "siteId", "listPublicRouteCandidates");
42447
+ const response = await client.getAllPublishedRoutes({ siteId });
42448
+ return {
42449
+ routes: response.items.flatMap((item) => {
42450
+ if (!item.path) return [];
42451
+ return [{
42452
+ entityId: item.entityId,
42453
+ path: item.path,
42454
+ title: item.title,
42455
+ kind: item.entityType,
42456
+ contentTypeKey: item.contentTypeKey ?? null
42457
+ }];
42458
+ })
42459
+ };
42460
+ }
42461
+ async function listPublicTeamMembers({ client, params }) {
42462
+ return await client.listPublicTeamMembers({
42463
+ siteId: requireStringParam(params, "siteId", "listPublicTeamMembers"),
42464
+ stage: readStringParam(params, "stage")
42465
+ });
42466
+ }
42467
+ async function listPublicProducts({ client, params }) {
42468
+ return await client.listPublicProducts({
42469
+ siteId: requireStringParam(params, "siteId", "listPublicProducts"),
42470
+ stage: readStringParam(params, "stage") === "preview" ? "preview" : "published",
42471
+ categorySelector: parsePublicProductCategorySelector(params.categorySelector)
42472
+ });
42473
+ }
42474
+ async function listPublicPasses({ client, params }) {
42475
+ return await client.listPublicPasses({
42476
+ siteId: requireStringParam(params, "siteId", "listPublicPasses"),
42477
+ categories: readStringParam(params, "categories")
42478
+ });
42479
+ }
42480
+ async function listPublicMemberships({ client, params }) {
42481
+ return await client.listPublicMemberships({
42482
+ siteId: requireStringParam(params, "siteId", "listPublicMemberships"),
42483
+ categories: readStringParam(params, "categories")
42484
+ });
42485
+ }
42486
+ async function getPublicFormById({ client, params }) {
42487
+ return await client.getPublicFormById({
42488
+ formId: requireStringParam(params, "formId", "getPublicFormById"),
42489
+ siteId: requireStringParam(params, "siteId", "getPublicFormById")
42490
+ });
42491
+ }
42492
+ async function getPublicBookingServices({ client, params }) {
42493
+ return await client.getPublicBookingServices({
42494
+ siteId: requireStringParam(params, "siteId", "getPublicBookingServices"),
42495
+ ids: readStringParam(params, "ids")
42496
+ });
42497
+ }
41389
42498
  async function prefetchBlockData2(page, context, client, options) {
41390
42499
  const { customBlocks } = options ?? {};
41391
42500
  const customBlockMap = new Map(
@@ -41395,189 +42504,11 @@ async function prefetchBlockData2(page, context, client, options) {
41395
42504
  apiClient: async ({ endpoint, params }) => {
41396
42505
  if (!isSupportedLoaderEndpoint2(endpoint)) {
41397
42506
  throw new Error(
41398
- `Unsupported loader endpoint: ${endpoint}. SDK only supports: ${SUPPORTED_LOADER_ENDPOINTS2.join(", ")}`
42507
+ `Unsupported loader endpoint: ${endpoint}. SDK only supports: ${SUPPORTED_LOADER_ENDPOINTS.join(", ")}`
41399
42508
  );
41400
42509
  }
41401
42510
  const resolvedParams = normalizeLoaderParams(endpoint, params, context);
41402
- switch (endpoint) {
41403
- case "listPublishedEntries": {
41404
- const {
41405
- siteId,
41406
- type,
41407
- orderBy,
41408
- limit,
41409
- stage,
41410
- mode,
41411
- entryIds,
41412
- identifiers,
41413
- entryRefs
41414
- } = resolvedParams ?? {};
41415
- if (!siteId || !type) {
41416
- throw new Error("listPublishedEntries requires siteId and type params");
41417
- }
41418
- const parsedLimit = typeof limit === "string" ? Number.parseInt(limit, 10) : typeof limit === "number" ? limit : void 0;
41419
- const order = orderBy === "order" ? "manual" : orderBy === "newest" || orderBy === "oldest" || orderBy === "title" ? orderBy : void 0;
41420
- const parsedEntryRefs = mode === "manual" ? parseManualEntryRefs(identifiers, entryRefs, entryIds) : void 0;
41421
- if (mode === "manual" && (!parsedEntryRefs || parsedEntryRefs.length === 0)) {
41422
- return { entries: [] };
41423
- }
41424
- if (mode === "manual" && parsedEntryRefs) {
41425
- return await client.getEntriesByIdentifiers({
41426
- siteId,
41427
- contentType: type,
41428
- identifiers: parsedEntryRefs,
41429
- preview: stage === "preview"
41430
- });
41431
- }
41432
- return await client.getEntries({
41433
- siteId,
41434
- contentType: type,
41435
- limit: parsedLimit,
41436
- order,
41437
- preview: stage === "preview"
41438
- });
41439
- }
41440
- case "getPublishedEntryPreview": {
41441
- const { siteId, type, slug } = resolvedParams ?? {};
41442
- if (!siteId || !type || !slug) {
41443
- throw new Error("getPublishedEntryPreview requires siteId, type, and slug params");
41444
- }
41445
- return await client.getEntry({ siteId, contentType: type, slug });
41446
- }
41447
- case "listPublicEvents": {
41448
- const {
41449
- siteId,
41450
- limit,
41451
- from,
41452
- to,
41453
- stage,
41454
- categoryIds,
41455
- venueId,
41456
- kind,
41457
- entryId,
41458
- seriesId,
41459
- includeOccurrenceId
41460
- } = resolvedParams ?? {};
41461
- if (!siteId) {
41462
- throw new Error("listPublicEvents requires siteId param");
41463
- }
41464
- const parsedLimit = typeof limit === "string" ? Number.parseInt(limit, 10) : typeof limit === "number" ? limit : void 0;
41465
- return await client.listPublicEvents({
41466
- siteId,
41467
- limit: parsedLimit,
41468
- from,
41469
- to,
41470
- stage,
41471
- categoryIds: typeof categoryIds === "string" ? categoryIds : void 0,
41472
- venueId: typeof venueId === "string" ? venueId : void 0,
41473
- kind: kind === "all" || kind === "courses" || kind === "events" ? kind : void 0,
41474
- entryId: typeof entryId === "string" ? entryId : void 0,
41475
- seriesId: typeof seriesId === "string" ? seriesId : void 0,
41476
- includeOccurrenceId: typeof includeOccurrenceId === "string" ? includeOccurrenceId : void 0
41477
- });
41478
- }
41479
- case "getPublicEventDetails": {
41480
- const {
41481
- siteId,
41482
- limit,
41483
- from,
41484
- to,
41485
- afterStartsAt,
41486
- afterId,
41487
- stage,
41488
- categoryIds,
41489
- venueId,
41490
- staffMemberId,
41491
- kind,
41492
- entryId,
41493
- seriesId,
41494
- includeOccurrenceId
41495
- } = resolvedParams ?? {};
41496
- if (!siteId) {
41497
- throw new Error("getPublicEventDetails requires siteId param");
41498
- }
41499
- const parsedLimit = typeof limit === "string" ? Number.parseInt(limit, 10) : typeof limit === "number" ? limit : void 0;
41500
- return await client.getPublicEventDetails({
41501
- siteId,
41502
- limit: parsedLimit,
41503
- from: typeof from === "string" ? from : void 0,
41504
- to: typeof to === "string" ? to : void 0,
41505
- afterStartsAt: typeof afterStartsAt === "string" ? afterStartsAt : void 0,
41506
- afterId: typeof afterId === "string" ? afterId : void 0,
41507
- stage: typeof stage === "string" ? stage : void 0,
41508
- categoryIds: typeof categoryIds === "string" ? categoryIds : void 0,
41509
- venueId: typeof venueId === "string" ? venueId : void 0,
41510
- staffMemberId: typeof staffMemberId === "string" ? staffMemberId : void 0,
41511
- kind: typeof kind === "string" ? kind : void 0,
41512
- entryId: typeof entryId === "string" ? entryId : void 0,
41513
- seriesId: typeof seriesId === "string" ? seriesId : void 0,
41514
- includeOccurrenceId: typeof includeOccurrenceId === "string" ? includeOccurrenceId : void 0
41515
- });
41516
- }
41517
- case "listPublicCourses": {
41518
- const { siteId, limit, stage } = resolvedParams ?? {};
41519
- if (!siteId) {
41520
- throw new Error("listPublicCourses requires siteId param");
41521
- }
41522
- const parsedLimit = typeof limit === "string" ? Number.parseInt(limit, 10) : typeof limit === "number" ? limit : void 0;
41523
- return await client.listPublicCourses({ siteId, limit: parsedLimit, stage });
41524
- }
41525
- case "listPublicTeamMembers": {
41526
- const { siteId, stage } = resolvedParams ?? {};
41527
- if (!siteId) {
41528
- throw new Error("listPublicTeamMembers requires siteId param");
41529
- }
41530
- return await client.listPublicTeamMembers({
41531
- siteId,
41532
- stage: typeof stage === "string" ? stage : void 0
41533
- });
41534
- }
41535
- case "listPublicProducts": {
41536
- const { siteId, stage, categorySelector } = resolvedParams ?? {};
41537
- if (!siteId) {
41538
- throw new Error("listPublicProducts requires siteId param");
41539
- }
41540
- return await client.listPublicProducts({
41541
- siteId,
41542
- stage: stage === "preview" ? "preview" : "published",
41543
- categorySelector: parsePublicProductCategorySelector(categorySelector)
41544
- });
41545
- }
41546
- case "getPublicFormById": {
41547
- const { formId, siteId } = resolvedParams ?? {};
41548
- if (!formId) {
41549
- throw new Error("getPublicFormById requires formId param");
41550
- }
41551
- if (!siteId) {
41552
- throw new Error("getPublicFormById requires siteId param");
41553
- }
41554
- return await client.getPublicFormById({ formId, siteId });
41555
- }
41556
- case "getPublicBookingServices": {
41557
- const { siteId, ids } = resolvedParams ?? {};
41558
- if (!siteId) {
41559
- throw new Error("getPublicBookingServices requires siteId param");
41560
- }
41561
- return await client.getPublicBookingServices({ siteId, ids });
41562
- }
41563
- case "listPublicPasses": {
41564
- const { siteId, categories } = resolvedParams ?? {};
41565
- if (!siteId) {
41566
- throw new Error("listPublicPasses requires siteId param");
41567
- }
41568
- return await client.listPublicPasses({ siteId, categories });
41569
- }
41570
- case "listPublicMemberships": {
41571
- const { siteId, categories } = resolvedParams ?? {};
41572
- if (!siteId) {
41573
- throw new Error("listPublicMemberships requires siteId param");
41574
- }
41575
- return await client.listPublicMemberships({ siteId, categories });
41576
- }
41577
- default: {
41578
- throw new Error("Unhandled endpoint");
41579
- }
41580
- }
42511
+ return await loaderAdapters[endpoint]({ client, params: resolvedParams });
41581
42512
  },
41582
42513
  isValidEndpoint: isSupportedLoaderEndpoint2,
41583
42514
  onError: (error, { block, loader }) => {
@@ -41665,6 +42596,76 @@ function resolveSiteCustomBlocks(site) {
41665
42596
  return void 0;
41666
42597
  }
41667
42598
 
42599
+ // src/rendering/helpers/pageRuntimeSupport.ts
42600
+ function buildSiteRenderSupport(site, mediaAssets) {
42601
+ const customBlocks = resolveSiteCustomBlocks(site);
42602
+ return {
42603
+ theme: site.theme,
42604
+ site: site.site,
42605
+ sdkConfig: site.sdkConfig ?? null,
42606
+ bookingOfferingPresets: site.bookingOfferingPresets ?? [],
42607
+ ...customBlocks ? { customBlocks } : {},
42608
+ supabaseUrl: site.supabaseUrl,
42609
+ routeMap: site.routes,
42610
+ pagesByIdentifier: site.pagesByIdentifier,
42611
+ entriesByIdentifier: site.entriesByIdentifier,
42612
+ ...mediaAssets ? { mediaAssets } : {}
42613
+ };
42614
+ }
42615
+ function collectMediaAssetSidecar(mediaAssets) {
42616
+ return Array.isArray(mediaAssets) && mediaAssets.length > 0 ? mediaAssets : void 0;
42617
+ }
42618
+ function convertPageResponseBlock(block) {
42619
+ if (!isRecord11(block)) {
42620
+ throw new Error("Invalid block format in page API response");
42621
+ }
42622
+ if (typeof block.id !== "string" && block.id !== null) {
42623
+ throw new Error(`Invalid block id in page: expected string or null, got ${typeof block.id}`);
42624
+ }
42625
+ if (typeof block.kind !== "string") {
42626
+ throw new Error(`Invalid block kind in page: expected string, got ${typeof block.kind}`);
42627
+ }
42628
+ if (typeof block.purpose !== "string") {
42629
+ throw new Error(`Invalid block purpose in page: expected string, got ${typeof block.purpose}`);
42630
+ }
42631
+ return {
42632
+ id: block.id,
42633
+ kind: block.kind,
42634
+ purpose: block.purpose,
42635
+ content: sanitizeSdkRuntimeBlockContent(block.kind, readContentRecord(block.content) ?? {}),
42636
+ draftContent: sanitizeNullableSdkRuntimeBlockContent(
42637
+ block.kind,
42638
+ readNestedContentRecord(block.draftContent)
42639
+ )
42640
+ };
42641
+ }
42642
+ function buildPageOutline(input) {
42643
+ return {
42644
+ name: input.name,
42645
+ path: input.path ?? input.fallbackPath,
42646
+ purpose: input.purpose,
42647
+ blocks: input.blocks.map(convertPageResponseBlock)
42648
+ };
42649
+ }
42650
+ function isRecord11(value) {
42651
+ return Boolean(value) && typeof value === "object" && !Array.isArray(value);
42652
+ }
42653
+ function readContentRecord(value) {
42654
+ return isRecord11(value) ? value : void 0;
42655
+ }
42656
+ function readNestedContentRecord(value) {
42657
+ if (!isRecord11(value)) return null;
42658
+ return readContentRecord(value.data) ?? null;
42659
+ }
42660
+ function sanitizeSdkRuntimeBlockContent(blockKind, content) {
42661
+ if (blockKind !== "block.newsletter-signup") return content;
42662
+ const sanitized = sanitizeNewsletterSignupPublicContent(content);
42663
+ return isRecord11(sanitized) ? sanitized : {};
42664
+ }
42665
+ function sanitizeNullableSdkRuntimeBlockContent(blockKind, content) {
42666
+ return content ? sanitizeSdkRuntimeBlockContent(blockKind, content) : null;
42667
+ }
42668
+
41668
42669
  // src/rendering/helpers/loadPage.ts
41669
42670
  async function loadPage(params) {
41670
42671
  const { client, siteId, path, pageId, preview = false, dataLoaderOverrides, searchParams, forceSite } = params;
@@ -41672,45 +42673,23 @@ async function loadPage(params) {
41672
42673
  client.getSite({ id: siteId, ...forceSite ? { force: true } : {} }),
41673
42674
  client.getPage({ siteId, path, preview })
41674
42675
  ]);
41675
- const customBlocks = resolveSiteCustomBlocks(site);
41676
42676
  if ("entry" in pageResponse) {
41677
42677
  throw new Error(
41678
42678
  "This path resolves to a content entry, not a page. Use loadContent() instead, which handles both pages and entries. For entries, loadContent() returns the raw entry data for custom rendering."
41679
42679
  );
41680
42680
  }
41681
42681
  const { page: pageData } = pageResponse;
41682
- const mediaAssets = Array.isArray(pageResponse.mediaAssets) && pageResponse.mediaAssets.length > 0 ? toMediaAssetSidecar(pageResponse.mediaAssets) : void 0;
41683
- const blocks = pageData.blocks.map((block) => {
41684
- if (!block || typeof block !== "object") {
41685
- throw new Error("Invalid block format in API response");
41686
- }
41687
- if (typeof block.id !== "string" && block.id !== null) {
41688
- throw new Error(`Invalid block id: expected string or null, got ${typeof block.id}`);
41689
- }
41690
- if (typeof block.kind !== "string") {
41691
- throw new Error(`Invalid block kind: expected string, got ${typeof block.kind}`);
41692
- }
41693
- if (typeof block.purpose !== "string") {
41694
- throw new Error(`Invalid block purpose: expected string, got ${typeof block.purpose}`);
41695
- }
41696
- const typedBlock = block;
41697
- return {
41698
- id: typedBlock.id,
41699
- kind: typedBlock.kind,
41700
- purpose: typedBlock.purpose,
41701
- // Include content for PageRenderer's getRenderableContent()
41702
- content: typedBlock.content ?? {},
41703
- // Include draftContent if available (for preview mode)
41704
- draftContent: typedBlock.draftContent?.data ?? null
41705
- };
41706
- });
41707
- const canonicalPagePath = pageData.path ?? path;
41708
- const pageOutline = {
42682
+ const support = buildSiteRenderSupport(
42683
+ site,
42684
+ collectMediaAssetSidecar(pageResponse.mediaAssets)
42685
+ );
42686
+ const pageOutline = buildPageOutline({
41709
42687
  name: pageData.name,
41710
- path: canonicalPagePath,
42688
+ path: pageData.path,
42689
+ fallbackPath: path,
41711
42690
  purpose: pageData.purpose,
41712
- blocks
41713
- };
42691
+ blocks: pageData.blocks
42692
+ });
41714
42693
  const prefetchContext = {
41715
42694
  siteId,
41716
42695
  pageId: pageId ?? pageData.id,
@@ -41723,7 +42702,7 @@ async function loadPage(params) {
41723
42702
  client,
41724
42703
  {
41725
42704
  // Pass custom blocks so their config-based loaders are discovered
41726
- customBlocks
42705
+ customBlocks: support.customBlocks
41727
42706
  }
41728
42707
  );
41729
42708
  let resolvedData = configData;
@@ -41733,22 +42712,20 @@ async function loadPage(params) {
41733
42712
  }
41734
42713
  return {
41735
42714
  page: pageOutline,
41736
- theme: site.theme,
41737
- sdkConfig: site.sdkConfig ?? null,
42715
+ theme: support.theme,
42716
+ sdkConfig: support.sdkConfig,
41738
42717
  siteId,
41739
42718
  resolvedData,
41740
- supabaseUrl: site.supabaseUrl,
41741
- ...mediaAssets ? { mediaAssets } : {},
41742
- ...customBlocks ? { customBlocks } : {},
42719
+ bookingOfferingPresets: support.bookingOfferingPresets,
42720
+ supabaseUrl: support.supabaseUrl,
42721
+ ...support.mediaAssets ? { mediaAssets: support.mediaAssets } : {},
42722
+ ...support.customBlocks ? { customBlocks: support.customBlocks } : {},
41743
42723
  // Maps for CTA link resolution (e.g., { kind: 'page', identifier: 'about' })
41744
- routeMap: site.routes,
41745
- pagesByIdentifier: site.pagesByIdentifier,
41746
- entriesByIdentifier: site.entriesByIdentifier
42724
+ routeMap: support.routeMap,
42725
+ pagesByIdentifier: support.pagesByIdentifier,
42726
+ entriesByIdentifier: support.entriesByIdentifier
41747
42727
  };
41748
42728
  }
41749
- function toMediaAssetSidecar(mediaAssets) {
41750
- return mediaAssets ?? [];
41751
- }
41752
42729
 
41753
42730
  // ../blocks/src/bindings/types.ts
41754
42731
  var TRANSFORMS = {
@@ -42023,8 +43000,10 @@ async function loadContent(params) {
42023
43000
  }
42024
43001
  const site = siteResult.value;
42025
43002
  const contentResponse = contentResult.value;
42026
- const customBlocks = resolveSiteCustomBlocks(site);
42027
- const mediaAssets = Array.isArray(contentResponse.mediaAssets) && contentResponse.mediaAssets.length > 0 ? contentResponse.mediaAssets : void 0;
43003
+ const support = buildSiteRenderSupport(
43004
+ site,
43005
+ collectMediaAssetSidecar(contentResponse.mediaAssets)
43006
+ );
42028
43007
  if (isEntryResponse(contentResponse)) {
42029
43008
  const entryData = contentResponse.entry;
42030
43009
  const draftContent = entryData.draftContent;
@@ -42050,13 +43029,14 @@ async function loadContent(params) {
42050
43029
  entry,
42051
43030
  { siteId, preview },
42052
43031
  client,
42053
- { customBlocks }
43032
+ { customBlocks: support.customBlocks }
42054
43033
  );
42055
43034
  return {
42056
43035
  type: "entry",
42057
43036
  entry,
42058
43037
  templatePage,
42059
43038
  resolvedData: resolvedData2,
43039
+ bookingOfferingPresets: support.bookingOfferingPresets,
42060
43040
  dataContext: {
42061
43041
  contentEntry: {
42062
43042
  ...entry.content ?? {},
@@ -42068,29 +43048,29 @@ async function loadContent(params) {
42068
43048
  _contentTypeSlug: entry.type
42069
43049
  }
42070
43050
  },
42071
- theme: site.theme,
43051
+ theme: support.theme,
42072
43052
  siteId,
42073
- ...customBlocks ? { customBlocks } : {},
42074
- site: site.site,
42075
- sdkConfig: site.sdkConfig ?? null,
42076
- supabaseUrl: site.supabaseUrl,
42077
- routeMap: site.routes,
42078
- pagesByIdentifier: site.pagesByIdentifier,
42079
- entriesByIdentifier: site.entriesByIdentifier,
42080
- ...mediaAssets ? { mediaAssets } : {}
43053
+ ...support.customBlocks ? { customBlocks: support.customBlocks } : {},
43054
+ site: support.site,
43055
+ sdkConfig: support.sdkConfig,
43056
+ supabaseUrl: support.supabaseUrl,
43057
+ routeMap: support.routeMap,
43058
+ pagesByIdentifier: support.pagesByIdentifier,
43059
+ entriesByIdentifier: support.entriesByIdentifier,
43060
+ ...support.mediaAssets ? { mediaAssets: support.mediaAssets } : {}
42081
43061
  };
42082
43062
  }
42083
43063
  const { page: pageData } = contentResponse;
42084
43064
  const pageRecord = pageData;
42085
43065
  const canonicalPagePath = pageData.path ?? pageRecord.path ?? "/";
42086
43066
  const draftPagePath = pageRecord.draftPath ?? pageRecord.path ?? canonicalPagePath;
42087
- const blocks = pageData.blocks.map((block) => validateAndConvertBlock(block, "page"));
42088
- const pageOutline = {
43067
+ const pageOutline = buildPageOutline({
42089
43068
  name: pageData.name,
42090
43069
  path: canonicalPagePath,
43070
+ fallbackPath: "/",
42091
43071
  purpose: pageData.purpose,
42092
- blocks
42093
- };
43072
+ blocks: pageData.blocks
43073
+ });
42094
43074
  const resolvedData = await prefetchBlockData2(
42095
43075
  pageOutline,
42096
43076
  {
@@ -42099,7 +43079,7 @@ async function loadContent(params) {
42099
43079
  previewStage: preview ? "preview" : "published"
42100
43080
  },
42101
43081
  client,
42102
- { customBlocks }
43082
+ { customBlocks: support.customBlocks }
42103
43083
  );
42104
43084
  return {
42105
43085
  type: "page",
@@ -42120,56 +43100,23 @@ async function loadContent(params) {
42120
43100
  ogImageId: pageRecord.ogImageId ?? null
42121
43101
  },
42122
43102
  page: pageOutline,
42123
- theme: site.theme,
43103
+ theme: support.theme,
42124
43104
  siteId,
42125
- ...customBlocks ? { customBlocks } : {},
43105
+ ...support.customBlocks ? { customBlocks: support.customBlocks } : {},
42126
43106
  resolvedData,
42127
- site: site.site,
42128
- sdkConfig: site.sdkConfig ?? null,
42129
- supabaseUrl: site.supabaseUrl,
42130
- routeMap: site.routes,
42131
- pagesByIdentifier: site.pagesByIdentifier,
42132
- entriesByIdentifier: site.entriesByIdentifier,
42133
- ...mediaAssets ? { mediaAssets } : {}
43107
+ bookingOfferingPresets: support.bookingOfferingPresets,
43108
+ site: support.site,
43109
+ sdkConfig: support.sdkConfig,
43110
+ supabaseUrl: support.supabaseUrl,
43111
+ routeMap: support.routeMap,
43112
+ pagesByIdentifier: support.pagesByIdentifier,
43113
+ entriesByIdentifier: support.entriesByIdentifier,
43114
+ ...support.mediaAssets ? { mediaAssets: support.mediaAssets } : {}
42134
43115
  };
42135
43116
  }
42136
43117
  function isEntryResponse(response) {
42137
43118
  return "entry" in response;
42138
43119
  }
42139
- function validateAndConvertBlock(block, source) {
42140
- if (!block || typeof block !== "object") {
42141
- throw new Error(`Invalid block format in ${source} API response`);
42142
- }
42143
- const blockRecord = block;
42144
- const kindField = source === "template" ? "blockKind" : "kind";
42145
- const kindValue = blockRecord[kindField];
42146
- if (typeof blockRecord.id !== "string" && blockRecord.id !== null) {
42147
- throw new Error(`Invalid block id in ${source}: expected string or null, got ${typeof blockRecord.id}`);
42148
- }
42149
- if (typeof kindValue !== "string") {
42150
- throw new Error(`Invalid block ${kindField} in ${source}: expected string, got ${typeof kindValue}`);
42151
- }
42152
- if (source === "page") {
42153
- if (typeof blockRecord.purpose !== "string") {
42154
- throw new Error(`Invalid block purpose in ${source}: expected string, got ${typeof blockRecord.purpose}`);
42155
- }
42156
- const content2 = blockRecord.content ?? {};
42157
- return {
42158
- id: blockRecord.id,
42159
- kind: kindValue,
42160
- purpose: blockRecord.purpose,
42161
- content: content2
42162
- };
42163
- }
42164
- const scope = blockRecord.scope;
42165
- const content = blockRecord.content ?? {};
42166
- return {
42167
- id: blockRecord.id,
42168
- kind: kindValue,
42169
- purpose: scope === "entry" ? "entry-content" : "template-layout",
42170
- content
42171
- };
42172
- }
42173
43120
  async function processEntryTemplate(templates, entrySlots, entry, context, client, options) {
42174
43121
  const template = templates?.[0];
42175
43122
  if (!template || !template.blocks?.length) {
@@ -42213,7 +43160,10 @@ async function processEntryTemplate(templates, entrySlots, entry, context, clien
42213
43160
  return { templatePage, resolvedData };
42214
43161
  }
42215
43162
  function resolveTemplateBlock(block, bindingContext) {
42216
- const rawContent = block.content ?? {};
43163
+ const rawContent = sanitizeSdkRuntimeBlockContent(
43164
+ block.blockKind,
43165
+ block.content ?? {}
43166
+ );
42217
43167
  const baseContent = normalizeBindingOutput2(rawContent);
42218
43168
  if (block.scope === "template") {
42219
43169
  return {