@riverbankcms/sdk 0.148.0 → 0.149.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/README.md +1 -1
  2. package/dist/{PreviewEditorSidebar-DvEPG3Z2.mjs → PreviewEditorSidebar-DBKln68M.mjs} +103 -66
  3. package/dist/{PreviewEditorUI-D6eb6fkx.mjs → PreviewEditorUI-DpRX4Mum.mjs} +3 -6
  4. package/dist/{PreviewQueryProvider-5znTyJuz.mjs → PreviewQueryProvider-C0mndwHB.mjs} +3 -3
  5. package/dist/{SdkPreviewModeRuntime-DJ6utQ_R.mjs → SdkPreviewModeRuntime-DJPmPY-r.mjs} +95 -67
  6. package/dist/{SiteChromeCustomizeContext-CFJYh6vo.mjs → SiteChromeCustomizeContext-JYA0cJ_Z.mjs} +982 -734
  7. package/dist/_dts/api/src/bookingConfig.d.ts +33 -48
  8. package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +2 -6
  9. package/dist/_dts/api/src/bookingOperations.d.ts +5 -7
  10. package/dist/_dts/api/src/bookingRecords.d.ts +15 -11
  11. package/dist/_dts/api/src/bookingRefundOutcomes.d.ts +5 -5
  12. package/dist/_dts/api/src/clientErrorReporting.d.ts +11 -0
  13. package/dist/_dts/api/src/commercePortalEndpoints.d.ts +0 -2
  14. package/dist/_dts/api/src/common/cancellation.d.ts +23 -0
  15. package/dist/_dts/api/src/customerMembershipOutcomes.d.ts +1 -1
  16. package/dist/_dts/api/src/endpoints.d.ts +2 -10
  17. package/dist/_dts/api/src/eventManagementContracts.d.ts +4 -7
  18. package/dist/_dts/api/src/index.d.ts +3 -3
  19. package/dist/_dts/api/src/publicAppointmentBookingContracts.d.ts +2 -2
  20. package/dist/_dts/api/src/publicExperience/commerceEndpoints.d.ts +2 -29
  21. package/dist/_dts/api/src/request.d.ts +1 -1
  22. package/dist/_dts/api/src/sdk-event-upsert.d.ts +1 -1
  23. package/dist/_dts/api/src/sdkPullEventContracts.d.ts +1 -1
  24. package/dist/_dts/api/src/siteOperations.d.ts +6 -2
  25. package/dist/_dts/blocks/src/contracts/index.d.ts +1 -1
  26. package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +2 -2
  27. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +38 -10
  28. package/dist/_dts/blocks/src/portal/types.d.ts +9 -6
  29. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +24 -24
  30. package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +1 -1
  31. package/dist/_dts/blocks/src/system/blocks/shared/bookingPaymentTerms.d.ts +84 -160
  32. package/dist/_dts/blocks/src/system/blocks/shop.d.ts +2 -2
  33. package/dist/_dts/blocks/src/system/blocks/shop.shared.d.ts +31 -4
  34. package/dist/_dts/blocks/src/system/runtime/api/types/appointments.d.ts +2 -2
  35. package/dist/_dts/blocks/src/system/runtime/api/types/core.d.ts +3 -1
  36. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +48 -6
  37. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +24 -3
  38. package/dist/_dts/blocks/src/system/runtime/hooks/useBookingNowIso.d.ts +8 -0
  39. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +2 -1
  40. package/dist/_dts/blocks/src/system/runtime/nodes/commerce/shared/display.d.ts +9 -2
  41. package/dist/_dts/blocks/src/system/runtime/nodes/event-details/presentation.d.ts +14 -2
  42. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/PaymentSelectionStep.d.ts +2 -0
  43. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +3 -3
  44. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +4 -0
  45. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +24 -24
  46. package/dist/_dts/blocks/src/system/runtime/nodes/shop.interactive.d.ts +41 -6
  47. package/dist/_dts/blocks/src/system/runtime/shared/bookingPaymentOptions.d.ts +7 -2
  48. package/dist/_dts/commerce/src/purchase/bookingPaymentSelection.d.ts +54 -0
  49. package/dist/_dts/commerce/src/purchase/checkoutCommitPlan.d.ts +58 -13
  50. package/dist/_dts/commerce/src/purchase/checkoutErrorCodes.d.ts +1 -1
  51. package/dist/_dts/commerce/src/purchase/checkoutPaymentPlanPlanning.d.ts +16 -21
  52. package/dist/_dts/commerce/src/purchase/checkoutPaymentTerms.d.ts +23 -40
  53. package/dist/_dts/commerce/src/purchase/checkoutSessionMetadata.d.ts +2 -2
  54. package/dist/_dts/commerce/src/purchase/checkoutStripeSessionPlanning.d.ts +5 -4
  55. package/dist/_dts/commerce/src/purchase/index.d.ts +1 -3
  56. package/dist/_dts/commerce/src/purchase/membershipOrderItemMetadata.d.ts +4 -0
  57. package/dist/_dts/commerce/src/purchase/oneTimeCheckoutPlanning.d.ts +9 -4
  58. package/dist/_dts/commerce/src/purchase/orderInstalmentClosure.d.ts +13 -1
  59. package/dist/_dts/commerce/src/purchase/orderInstalmentLifecycle.d.ts +5 -0
  60. package/dist/_dts/commerce/src/purchase/orderItemMetadata.d.ts +3 -1
  61. package/dist/_dts/commerce/src/purchase/orderTypes.d.ts +7 -1
  62. package/dist/_dts/commerce/src/purchase/refundRailSplit.d.ts +1 -1
  63. package/dist/_dts/commerce/src/purchase/stateTransitions.d.ts +2 -2
  64. package/dist/_dts/commerce/src/purchase/stripeMinimumCharge.d.ts +6 -0
  65. package/dist/_dts/commerce/src/purchase/types.d.ts +2 -1
  66. package/dist/_dts/content-editor/src/controller/editLeaseHandover.d.ts +30 -0
  67. package/dist/_dts/content-editor/src/lib/browserStorage.d.ts +5 -0
  68. package/dist/_dts/core/src/booking-flexible-balance.d.ts +2 -2
  69. package/dist/_dts/core/src/booking-instalment-deposit.d.ts +20 -0
  70. package/dist/_dts/core/src/booking-live-payment-terms.d.ts +72 -0
  71. package/dist/_dts/core/src/booking-payment-options.d.ts +24 -0
  72. package/dist/_dts/core/src/booking-payment-schemas.d.ts +522 -0
  73. package/dist/_dts/core/src/branded.d.ts +3 -0
  74. package/dist/_dts/core/src/edit-lease.d.ts +5 -0
  75. package/dist/_dts/core/src/index.d.ts +3 -0
  76. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +297 -36
  77. package/dist/_dts/media-editor/src/MediaPickerDialog.d.ts +3 -1
  78. package/dist/_dts/media-editor/src/MediaPickerMiniDialog.d.ts +10 -0
  79. package/dist/_dts/media-editor/src/index.d.ts +2 -0
  80. package/dist/_dts/preview-next/src/client/preview/PreviewEntryControllerProvider.d.ts +0 -1
  81. package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +1 -1
  82. package/dist/_dts/preview-next/src/client/previewAuthStore.d.ts +7 -0
  83. package/dist/_dts/preview-next/src/constants.d.ts +4 -0
  84. package/dist/_dts/preview-next/src/keepAlive.d.ts +1 -0
  85. package/dist/_dts/sdk/src/rendering/islands/types.d.ts +2 -12
  86. package/dist/_dts/sdk/src/version.d.ts +1 -1
  87. package/dist/_dts/theme-core/src/site-styles/pageDesignIntent.d.ts +0 -5
  88. package/dist/_dts/ui/src/color-picker.d.ts +1 -1
  89. package/dist/_dts/ui/src/palette/useHexDraft.d.ts +7 -0
  90. package/dist/client/{BookingMailingListNote-CzRt2dF_.mjs → BookingMailingListNote-Cr3EeTP5.mjs} +408 -69
  91. package/dist/client/{DemoBookingPortalAccess-mxqwap3f.mjs → DemoBookingPortalAccess-BFGB1Fay.mjs} +2 -2
  92. package/dist/client/{EventCombined.client-CDb11igO.mjs → EventCombined.client-DKYV0_ft.mjs} +6 -6
  93. package/dist/client/{EventListing.client-EgYhzKPa.mjs → EventListing.client-B9UIcEYc.mjs} +2 -2
  94. package/dist/client/{LeafletStaticMap-gtmtaA2b.mjs → LeafletStaticMap-CFLPkP0K.mjs} +1 -1
  95. package/dist/client/{TerminalPanel-DvNUP5ot.mjs → TerminalPanel-JjmgxEsR.mjs} +1 -1
  96. package/dist/client/{ThemedButton-C7CeUJjW.mjs → ThemedButton-CKV1Jh2m.mjs} +1 -1
  97. package/dist/client/{accordion-kjvt49rA.mjs → accordion-DXWIfT3T.mjs} +1 -1
  98. package/dist/client/{bookingForm-pbRZordh.mjs → bookingForm-CjZgHNvv.mjs} +11 -8
  99. package/dist/client/bookings.mjs +424 -320
  100. package/dist/client/{carousel-f4Zbmicv.mjs → carousel-DSLikmvZ.mjs} +1 -1
  101. package/dist/client/{cart-DO20An50.mjs → cart-HDjWReFt.mjs} +3 -3
  102. package/dist/client/{checkout-Du5amDR_.mjs → checkout-CUvRZA3W.mjs} +3 -3
  103. package/dist/client/client.mjs +963 -866
  104. package/dist/client/{context-eW97E945.mjs → context-DFmaZa-Q.mjs} +1 -1
  105. package/dist/client/{dates-jPCirRea.mjs → dates-BBep1JnF.mjs} +2 -2
  106. package/dist/client/{eventCalendar-C2M-iE4j.mjs → eventCalendar-zEobhxo4.mjs} +9 -9
  107. package/dist/client/{eventCombined-W6ns3LHg.mjs → eventCombined-Dp7bz5k-.mjs} +4 -4
  108. package/dist/client/{eventDetails-CR-GT0f0.mjs → eventDetails-FE-zqTt7.mjs} +4 -4
  109. package/dist/client/{eventListing-BK8AfYZz.mjs → eventListing-BMt5snal.mjs} +4 -4
  110. package/dist/client/{eventRegistration-BJSd4KUu.mjs → eventRegistration-O6ZxHfOb.mjs} +67 -342
  111. package/dist/client/{form-BvpfbQaT.mjs → form-DFa1D8vt.mjs} +3 -3
  112. package/dist/client/{headerSection-I5sUQ8x-.mjs → headerSection-CmjHLR-N.mjs} +3 -3
  113. package/dist/client/hooks.mjs +160 -129
  114. package/dist/client/{locationMap-BLvwf9_f.mjs → locationMap-BXKP_lGh.mjs} +3 -3
  115. package/dist/client/{newsletterForm-DrQ2weE8.mjs → newsletterForm-CU-HmxGx.mjs} +3 -3
  116. package/dist/client/{pricing-BES87mrR.mjs → pricing-KEAEsibq.mjs} +1 -1
  117. package/dist/client/{productDetail-Url9jcc5.mjs → productDetail-Ckp7MGnt.mjs} +3 -3
  118. package/dist/client/{productList-DE7ngEZJ.mjs → productList-D91V0sYa.mjs} +3 -3
  119. package/dist/client/{propsDecoder-D1OtGXDV.mjs → propsDecoder-DZd6RJeA.mjs} +155 -77
  120. package/dist/client/rendering/client.mjs +3356 -3192
  121. package/dist/client/rendering/islands.mjs +17 -17
  122. package/dist/client/rendering.mjs +956 -841
  123. package/dist/client/{routeIslandApiConfig-BG9Y-SHg.mjs → routeIslandApiConfig-E1EkhhYY.mjs} +1 -1
  124. package/dist/client/{shop-CJkuySJ3.mjs → shop-4F2jLQPI.mjs} +12 -13
  125. package/dist/client/{shop-commerce-4rKj5n9h.mjs → shop-commerce-BbfCJjB3.mjs} +6 -6
  126. package/dist/client/{shop-commerce-store-Bxm75Pg6.mjs → shop-commerce-store-vicweP2K.mjs} +1 -1
  127. package/dist/client/{shopShared-DpoQDWfz.mjs → shopShared-DlONJt0T.mjs} +4 -4
  128. package/dist/client/{useEventFilters-D8HliSqR.mjs → useEventFilters-COYyL3m7.mjs} +6 -6
  129. package/dist/preview-next/before-render.mjs +15 -22
  130. package/dist/preview-next/client/runtime.mjs +4 -4
  131. package/dist/preview-next/constants.mjs +5 -1
  132. package/dist/preview-next/index.mjs +5 -1
  133. package/dist/preview-next/keepAlive.mjs +149 -82
  134. package/dist/preview-next/middleware.mjs +15 -22
  135. package/dist/{previewAuthStore-BXXF3hhW.mjs → previewAuthStore-BBmV7UsW.mjs} +49 -29
  136. package/dist/{sdk-runtime-C2a05WjL.mjs → sdk-runtime-CwvFFjB-.mjs} +2 -2
  137. package/dist/{separator-CuNhBAhS.mjs → separator-ByL72zUT.mjs} +1 -1
  138. package/dist/server/components.mjs +167 -131
  139. package/dist/server/config-validation.mjs +160 -129
  140. package/dist/server/config.mjs +160 -129
  141. package/dist/server/data.mjs +160 -129
  142. package/dist/server/index.mjs +20 -27
  143. package/dist/server/next.mjs +174 -156
  144. package/dist/server/page-converter.mjs +145 -65
  145. package/dist/server/prebuild.mjs +1 -1
  146. package/dist/server/rendering/server.mjs +169 -131
  147. package/dist/server/rendering.mjs +167 -131
  148. package/dist/server/routing.mjs +165 -118
  149. package/dist/server/server.mjs +167 -154
  150. package/package.json +1 -1
  151. package/dist/_dts/api/src/bookingPaymentTermSchemas.d.ts +0 -123
  152. package/dist/_dts/commerce/src/purchase/checkoutPaymentTermPlanning.d.ts +0 -10
  153. package/dist/_dts/commerce/src/purchase/checkoutValidatedItemPlanning.d.ts +0 -55
  154. package/dist/_dts/commerce/src/purchase/orderInstalmentPayoff.d.ts +0 -24
@@ -344,6 +344,16 @@ function isRecord$16(value) {
344
344
  return typeof value === "object" && value !== null && !Array.isArray(value);
345
345
  }
346
346
  //#endregion
347
+ //#region ../core/src/booking-payment-options.ts
348
+ /** Automatic instalments and a flexible balance cannot share one booking offer. */
349
+ function validateBookingPaymentOptionKinds(kinds) {
350
+ if (kinds.length === 0) return err("no_options");
351
+ const uniqueKinds = new Set(kinds);
352
+ if (uniqueKinds.size !== kinds.length) return err("duplicate_kind");
353
+ if (uniqueKinds.has("instalment_plan") && uniqueKinds.has("flexible_balance")) return err("incompatible_collection_options");
354
+ return ok(void 0);
355
+ }
356
+ //#endregion
347
357
  //#region ../core/src/booking-time-zone.ts
348
358
  const TIME_ZONE_VALIDITY_CACHE_LIMIT = 100;
349
359
  const timeZoneValidityCache = /* @__PURE__ */ new Map();
@@ -8161,68 +8171,115 @@ function isRichTextDoc(value) {
8161
8171
  return RichTextDocSchema.safeParse(value).success;
8162
8172
  }
8163
8173
  //#endregion
8164
- //#region ../blocks/src/system/blocks/shared/bookingPaymentTerms.ts
8165
- const bookingDepositRefundPolicySchema$1 = z.enum(["refundable", "non_refundable"]);
8166
- const bookingInstalmentPlanSchema$1 = z.union([
8167
- z.object({
8168
- kind: z.literal("deposit_plus_one_remainder"),
8169
- depositAmountCents: z.number().int().min(0),
8170
- depositRefundability: bookingDepositRefundPolicySchema$1,
8171
- remainderDueCount: z.number().int().positive(),
8172
- intervalUnit: z.enum([
8173
- "day",
8174
- "week",
8175
- "month"
8176
- ])
8177
- }),
8178
- z.object({
8179
- kind: z.literal("deposit_plus_scheduled_instalments"),
8180
- depositAmountCents: z.number().int().min(0),
8181
- depositRefundability: bookingDepositRefundPolicySchema$1,
8182
- instalmentCount: z.number().int().positive(),
8183
- intervalCount: z.number().int().positive(),
8184
- intervalUnit: z.enum([
8185
- "day",
8186
- "week",
8187
- "month"
8188
- ])
8189
- }),
8190
- z.object({
8191
- kind: z.literal("equal_scheduled_instalments"),
8192
- instalmentCount: z.number().int().positive(),
8193
- intervalCount: z.number().int().positive(),
8194
- intervalUnit: z.enum([
8195
- "day",
8196
- "week",
8197
- "month"
8198
- ])
8199
- })
8174
+ //#region ../core/src/booking-payment-schemas.ts
8175
+ const stripObject = (shape) => z.object(shape);
8176
+ const strictObject = (shape) => z.strictObject(shape);
8177
+ const depositRefundPolicySchema = z.enum(["refundable", "non_refundable"]);
8178
+ const intervalUnitSchema = z.enum([
8179
+ "day",
8180
+ "week",
8181
+ "month"
8200
8182
  ]);
8201
- const bookingFlexibleBalanceDueDateRuleSchema$1 = z.union([z.object({
8202
- kind: z.literal("relative_to_start_date"),
8203
- daysBeforeStart: z.number().int().positive()
8204
- }), z.object({
8205
- kind: z.literal("fixed_calendar_date"),
8206
- dueAt: z.string().datetime()
8207
- })]);
8208
- const bookingFlexibleBalanceConfigSchema$1 = z.object({
8209
- upfrontAmountCents: z.number().int().min(0),
8210
- dueDateRule: bookingFlexibleBalanceDueDateRuleSchema$1,
8211
- depositRefundability: bookingDepositRefundPolicySchema$1
8212
- });
8213
- const blockBookingPaymentCollectionOptionSchema = z.union([
8214
- z.object({ kind: z.literal("upfront") }),
8215
- z.object({ kind: z.literal("deferred_manual") }),
8216
- z.object({
8217
- kind: z.literal("instalment_plan"),
8218
- plan: bookingInstalmentPlanSchema$1
8219
- }),
8220
- z.object({
8221
- kind: z.literal("flexible_balance"),
8222
- config: bookingFlexibleBalanceConfigSchema$1
8223
- })
8224
- ]);
8225
- const blockBookingPaymentTermsSchema = z.object({ allowedOptions: z.array(blockBookingPaymentCollectionOptionSchema).min(1) });
8183
+ const nonNegativeIntegerSchema = z.number().int().nonnegative();
8184
+ const positiveIntegerSchema = z.number().int().positive();
8185
+ function createInstalmentPlanSchema(object) {
8186
+ return z.discriminatedUnion("kind", [
8187
+ object({
8188
+ kind: z.literal("deposit_plus_one_remainder"),
8189
+ depositAmountCents: nonNegativeIntegerSchema,
8190
+ depositRefundability: depositRefundPolicySchema,
8191
+ remainderDueCount: positiveIntegerSchema,
8192
+ intervalUnit: intervalUnitSchema
8193
+ }),
8194
+ object({
8195
+ kind: z.literal("deposit_plus_scheduled_instalments"),
8196
+ depositAmountCents: nonNegativeIntegerSchema,
8197
+ depositRefundability: depositRefundPolicySchema,
8198
+ instalmentCount: positiveIntegerSchema,
8199
+ intervalCount: positiveIntegerSchema,
8200
+ intervalUnit: intervalUnitSchema
8201
+ }),
8202
+ object({
8203
+ kind: z.literal("equal_scheduled_instalments"),
8204
+ instalmentCount: positiveIntegerSchema,
8205
+ intervalCount: positiveIntegerSchema,
8206
+ intervalUnit: intervalUnitSchema
8207
+ })
8208
+ ]);
8209
+ }
8210
+ function createFlexibleBalanceSchemas(object) {
8211
+ const dueDateRule = z.discriminatedUnion("kind", [object({
8212
+ kind: z.literal("relative_to_start_date"),
8213
+ daysBeforeStart: positiveIntegerSchema
8214
+ }), object({
8215
+ kind: z.literal("fixed_calendar_date"),
8216
+ dueAt: z.string().datetime()
8217
+ })]);
8218
+ return {
8219
+ dueDateRule,
8220
+ config: object({
8221
+ upfrontAmountCents: nonNegativeIntegerSchema,
8222
+ dueDateRule,
8223
+ depositRefundability: depositRefundPolicySchema
8224
+ })
8225
+ };
8226
+ }
8227
+ const paymentOptionKindsMessages = {
8228
+ no_options: "Choose at least one way for customers to pay.",
8229
+ duplicate_kind: "Choose each payment option only once.",
8230
+ incompatible_collection_options: "Offer instalments or a deposit with the rest paid later, but not both."
8231
+ };
8232
+ function buildBookingPaymentOptionSchemas(object) {
8233
+ const instalmentPlan = createInstalmentPlanSchema(object);
8234
+ const flexibleBalance = createFlexibleBalanceSchemas(object);
8235
+ const paymentCollectionOption = z.discriminatedUnion("kind", [
8236
+ object({ kind: z.literal("upfront") }),
8237
+ object({ kind: z.literal("deferred_manual") }),
8238
+ object({
8239
+ kind: z.literal("instalment_plan"),
8240
+ plan: instalmentPlan
8241
+ }),
8242
+ object({
8243
+ kind: z.literal("flexible_balance"),
8244
+ config: flexibleBalance.config
8245
+ })
8246
+ ]);
8247
+ const paymentTerms = object({ allowedOptions: z.array(paymentCollectionOption) }).superRefine(({ allowedOptions }, ctx) => {
8248
+ const result = validateBookingPaymentOptionKinds(allowedOptions.map(({ kind }) => kind));
8249
+ if (!result.ok) ctx.addIssue({
8250
+ code: "custom",
8251
+ path: ["allowedOptions"],
8252
+ message: paymentOptionKindsMessages[result.error]
8253
+ });
8254
+ });
8255
+ const paymentOptionsChoice = z.discriminatedUnion("source", [z.strictObject({ source: z.literal("default") }), z.strictObject({
8256
+ source: z.literal("custom"),
8257
+ paymentTerms
8258
+ })]);
8259
+ return {
8260
+ depositRefundPolicy: depositRefundPolicySchema,
8261
+ instalmentPlan,
8262
+ flexibleBalanceDueDateRule: flexibleBalance.dueDateRule,
8263
+ flexibleBalanceConfig: flexibleBalance.config,
8264
+ paymentCollectionOption,
8265
+ paymentTerms,
8266
+ paymentOptionsChoice
8267
+ };
8268
+ }
8269
+ function createBookingPaymentOptionSchemas(mode) {
8270
+ return mode === "strict" ? buildBookingPaymentOptionSchemas(strictObject) : buildBookingPaymentOptionSchemas(stripObject);
8271
+ }
8272
+ const bookingPaymentOptionSchemas = createBookingPaymentOptionSchemas("strip");
8273
+ bookingPaymentOptionSchemas.depositRefundPolicy;
8274
+ bookingPaymentOptionSchemas.instalmentPlan;
8275
+ bookingPaymentOptionSchemas.flexibleBalanceDueDateRule;
8276
+ bookingPaymentOptionSchemas.flexibleBalanceConfig;
8277
+ bookingPaymentOptionSchemas.paymentCollectionOption;
8278
+ const bookingPaymentTermsSchema = bookingPaymentOptionSchemas.paymentTerms;
8279
+ bookingPaymentOptionSchemas.paymentOptionsChoice;
8280
+ //#endregion
8281
+ //#region ../blocks/src/system/blocks/shared/bookingPaymentTerms.ts
8282
+ const blockBookingPaymentTermsSchema = bookingPaymentTermsSchema;
8226
8283
  //#endregion
8227
8284
  //#region ../blocks/src/system/blocks/shared/bookingConsent.ts
8228
8285
  const blockBookingConsentSchema = z.object({
@@ -11458,7 +11515,8 @@ const CLIENT_ERROR_REPORT_LIMITS = {
11458
11515
  stack: 8e3,
11459
11516
  digest: 128,
11460
11517
  componentStack: 8e3,
11461
- sourceLocation: 1024
11518
+ sourceLocation: 1024,
11519
+ navigationAgeMs: 6e4
11462
11520
  };
11463
11521
  const clientErrorEventSchema = z.enum([
11464
11522
  "dashboard:route-error",
@@ -11475,7 +11533,17 @@ z.object({
11475
11533
  stack: z.string().max(CLIENT_ERROR_REPORT_LIMITS.stack).nullable(),
11476
11534
  digest: z.string().max(CLIENT_ERROR_REPORT_LIMITS.digest).nullable(),
11477
11535
  componentStack: z.string().max(CLIENT_ERROR_REPORT_LIMITS.componentStack).nullable(),
11478
- sourceLocation: z.string().max(CLIENT_ERROR_REPORT_LIMITS.sourceLocation).nullable()
11536
+ sourceLocation: z.string().max(CLIENT_ERROR_REPORT_LIMITS.sourceLocation).nullable(),
11537
+ navigation: z.object({
11538
+ fromPathname: z.string().regex(/^\/[^?#]*$/).max(CLIENT_ERROR_REPORT_LIMITS.pathname),
11539
+ toPathname: z.string().regex(/^\/[^?#]*$/).max(CLIENT_ERROR_REPORT_LIMITS.pathname),
11540
+ type: z.enum([
11541
+ "push",
11542
+ "replace",
11543
+ "traverse"
11544
+ ]),
11545
+ ageMs: z.number().int().min(0).max(CLIENT_ERROR_REPORT_LIMITS.navigationAgeMs)
11546
+ }).strict().nullable().optional()
11479
11547
  }).strict();
11480
11548
  ({
11481
11549
  ...SITE_LIFECYCLE_ENDPOINT_DEFINITIONS,
@@ -31828,7 +31896,7 @@ const publicPassProductCollectionSchema = z.object({ passes: z.array(publicPassP
31828
31896
  /**
31829
31897
  * Public membership product for shop display
31830
31898
  */
31831
- const publicMembershipProductSchema = z.object({
31899
+ const publicMembershipProductFields = {
31832
31900
  id: z.string(),
31833
31901
  name: z.string(),
31834
31902
  description: z.string().nullable(),
@@ -31837,7 +31905,16 @@ const publicMembershipProductSchema = z.object({
31837
31905
  billingInterval: z.enum(["month", "year"]),
31838
31906
  eligibleCategoryIds: z.array(z.string()),
31839
31907
  eligibleCategoryNames: z.array(z.string())
31908
+ };
31909
+ const purchasablePublicMembershipProductSchema = z.object({
31910
+ ...publicMembershipProductFields,
31911
+ purchaseAvailability: z.literal("purchasable")
31840
31912
  });
31913
+ const publicMembershipProductSchema = z.discriminatedUnion("purchaseAvailability", [purchasablePublicMembershipProductSchema, z.object({
31914
+ ...publicMembershipProductFields,
31915
+ purchaseAvailability: z.literal("display_only"),
31916
+ unavailabilityReason: z.literal("online_payments_unavailable")
31917
+ })]);
31841
31918
  const publicMembershipProductCollectionSchema = z.object({ memberships: z.array(publicMembershipProductSchema) });
31842
31919
  //#endregion
31843
31920
  //#region ../blocks/src/system/blocks/event-registration.shared.ts
@@ -37634,7 +37711,7 @@ function buildPassesMembershipsDisplay(options) {
37634
37711
  product: pass
37635
37712
  } : {
37636
37713
  kind: "unavailable",
37637
- label: "Online purchasing coming soon."
37714
+ label: "Online purchasing is unavailable."
37638
37715
  }
37639
37716
  };
37640
37717
  });
@@ -37644,7 +37721,14 @@ function buildPassesMembershipsDisplay(options) {
37644
37721
  description: options.showDescriptions ? membership.description : null,
37645
37722
  priceLabel: formatCommercePrice(membership.price, membership.currency),
37646
37723
  intervalLabel: formatInterval(membership.billingInterval),
37647
- actionLabel: options.membershipActionLabel
37724
+ action: membership.purchaseAvailability === "purchasable" ? {
37725
+ kind: "purchase",
37726
+ label: options.membershipActionLabel,
37727
+ product: membership
37728
+ } : {
37729
+ kind: "unavailable",
37730
+ label: "Online purchasing is unavailable."
37731
+ }
37648
37732
  }));
37649
37733
  return {
37650
37734
  kind: "passes-memberships",
@@ -37864,7 +37948,14 @@ const membershipCardDisplaySchema = z.object({
37864
37948
  description: z.string().nullable(),
37865
37949
  priceLabel: z.string(),
37866
37950
  intervalLabel: z.string(),
37867
- actionLabel: z.string()
37951
+ action: z.discriminatedUnion("kind", [z.object({
37952
+ kind: z.literal("purchase"),
37953
+ label: z.string(),
37954
+ product: purchasablePublicMembershipProductSchema
37955
+ }), z.object({
37956
+ kind: z.literal("unavailable"),
37957
+ label: z.string()
37958
+ })])
37868
37959
  });
37869
37960
  const passesMembershipsDisplaySchema = z.object({
37870
37961
  kind: z.literal("passes-memberships"),
@@ -42704,6 +42795,7 @@ const CANONICAL_REFUND_PLANNER_ERROR_CODES = [
42704
42795
  "refund_failed"
42705
42796
  ];
42706
42797
  const CANONICAL_ADMIN_REFUND_FAILURE_CODES = [
42798
+ "refund_blocked_by_live_payment_terms",
42707
42799
  ...CANONICAL_REFUND_PLANNER_ERROR_CODES,
42708
42800
  "payment_intent_not_found",
42709
42801
  "stripe_error",
@@ -42719,6 +42811,7 @@ const CANONICAL_ADMIN_REFUND_FAILURE_CODES = [
42719
42811
  //#endregion
42720
42812
  //#region ../api/src/bookingRefundOutcomes.ts
42721
42813
  const STANDARD_LINE_ITEM_REFUND_INVALID_CODES = [
42814
+ "refund_blocked_by_live_payment_terms",
42722
42815
  "missing_amount",
42723
42816
  "invalid_amount",
42724
42817
  "amount_exceeds_remaining",
@@ -43108,68 +43201,6 @@ function parsePublicProductCategorySelector(value) {
43108
43201
  }
43109
43202
  z.enum(["public", "unlisted"], { error: "visibility must be 'public' or 'unlisted'" });
43110
43203
  //#endregion
43111
- //#region ../api/src/bookingPaymentTermSchemas.ts
43112
- const bookingDepositRefundPolicySchema = z.enum(["refundable", "non_refundable"]);
43113
- const bookingInstalmentPlanSchema = z.discriminatedUnion("kind", [
43114
- z.object({
43115
- kind: z.literal("deposit_plus_one_remainder"),
43116
- depositAmountCents: z.number().int().nonnegative(),
43117
- depositRefundability: bookingDepositRefundPolicySchema,
43118
- remainderDueCount: z.number().int().positive(),
43119
- intervalUnit: z.enum([
43120
- "day",
43121
- "week",
43122
- "month"
43123
- ])
43124
- }),
43125
- z.object({
43126
- kind: z.literal("deposit_plus_scheduled_instalments"),
43127
- depositAmountCents: z.number().int().nonnegative(),
43128
- depositRefundability: bookingDepositRefundPolicySchema,
43129
- instalmentCount: z.number().int().positive(),
43130
- intervalCount: z.number().int().positive(),
43131
- intervalUnit: z.enum([
43132
- "day",
43133
- "week",
43134
- "month"
43135
- ])
43136
- }),
43137
- z.object({
43138
- kind: z.literal("equal_scheduled_instalments"),
43139
- instalmentCount: z.number().int().positive(),
43140
- intervalCount: z.number().int().positive(),
43141
- intervalUnit: z.enum([
43142
- "day",
43143
- "week",
43144
- "month"
43145
- ])
43146
- })
43147
- ]);
43148
- const bookingFlexibleBalanceDueDateRuleSchema = z.discriminatedUnion("kind", [z.object({
43149
- kind: z.literal("relative_to_start_date"),
43150
- daysBeforeStart: z.number().int().positive()
43151
- }), z.object({
43152
- kind: z.literal("fixed_calendar_date"),
43153
- dueAt: z.string().datetime()
43154
- })]);
43155
- const bookingFlexibleBalanceConfigSchema = z.object({
43156
- upfrontAmountCents: z.number().int().nonnegative(),
43157
- dueDateRule: bookingFlexibleBalanceDueDateRuleSchema,
43158
- depositRefundability: bookingDepositRefundPolicySchema
43159
- });
43160
- z.discriminatedUnion("kind", [
43161
- z.object({ kind: z.literal("upfront") }),
43162
- z.object({ kind: z.literal("deferred_manual") }),
43163
- z.object({
43164
- kind: z.literal("instalment_plan"),
43165
- plan: bookingInstalmentPlanSchema
43166
- }),
43167
- z.object({
43168
- kind: z.literal("flexible_balance"),
43169
- config: bookingFlexibleBalanceConfigSchema
43170
- })
43171
- ]);
43172
- //#endregion
43173
43204
  //#region ../api/src/aiPlayground.ts
43174
43205
  /**
43175
43206
  * RFC-6902 JSON Patch Operations
@@ -1,8 +1,8 @@
1
1
  import { i as textColorStyle } from "./colorStyles-j5U9v5JA.mjs";
2
- import { t as defineIslandPropsDecoder } from "./propsDecoder-D1OtGXDV.mjs";
3
- import { n as ThemedButtonLink } from "./ThemedButton-C7CeUJjW.mjs";
2
+ import { t as defineIslandPropsDecoder } from "./propsDecoder-DZd6RJeA.mjs";
3
+ import { n as ThemedButtonLink } from "./ThemedButton-CKV1Jh2m.mjs";
4
4
  import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
5
- import { t as LeafletStaticMap } from "./LeafletStaticMap-gtmtaA2b.mjs";
5
+ import { t as LeafletStaticMap } from "./LeafletStaticMap-CFLPkP0K.mjs";
6
6
  import "react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  //#region ../core/src/location.ts
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import { O as clsx } from "./colorStyles-j5U9v5JA.mjs";
3
- import { $t as parseMailingListVisitorSelection, Tn as assertNever$1, Wt as assertNever, g as newsletterBlockSubmissionMessage, h as NEWSLETTER_SIGNUPS_PAUSED_MESSAGE, t as defineIslandPropsDecoder } from "./propsDecoder-D1OtGXDV.mjs";
4
- import { n as useBlockApi, r as BlockApiError, t as BlockApiProvider } from "./context-eW97E945.mjs";
3
+ import { $t as parseMailingListVisitorSelection, Tn as assertNever$1, Wt as assertNever, g as newsletterBlockSubmissionMessage, h as NEWSLETTER_SIGNUPS_PAUSED_MESSAGE, t as defineIslandPropsDecoder } from "./propsDecoder-DZd6RJeA.mjs";
4
+ import { n as useBlockApi, r as BlockApiError, t as BlockApiProvider } from "./context-DFmaZa-Q.mjs";
5
5
  import { n as isSpamProtectionEnabled, r as AltchaWidget, t as getChallengeUrl } from "./src-B833rYRr.mjs";
6
- import { t as ThemedButton } from "./ThemedButton-C7CeUJjW.mjs";
6
+ import { t as ThemedButton } from "./ThemedButton-CKV1Jh2m.mjs";
7
7
  import { t as FeedbackMessage } from "./FeedbackMessage-CtLvvS_d.mjs";
8
8
  import { i as getFieldValidationControlProps, r as FieldValidationMessage, t as MAILING_LIST_CONFIRMATION_MESSAGE } from "./mailingListSignupCopy-DZSHZrm6.mjs";
9
9
  import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
@@ -1,4 +1,4 @@
1
- import { gn as formatEventPricing, hn as formatBookingPriceDisplay, yn as publicEventPricingDisplay } from "./propsDecoder-D1OtGXDV.mjs";
1
+ import { gn as formatEventPricing, hn as formatBookingPriceDisplay, yn as publicEventPricingDisplay } from "./propsDecoder-DZd6RJeA.mjs";
2
2
  //#region ../blocks/src/system/runtime/nodes/events/domain/capacity.ts
3
3
  /**
4
4
  * Compute remaining spots for an event from `availableSpots` with a fallback
@@ -1,6 +1,6 @@
1
- import { t as defineIslandPropsDecoder } from "./propsDecoder-D1OtGXDV.mjs";
2
- import { r as ProductDetailController } from "./shop-commerce-4rKj5n9h.mjs";
3
- import { t as mountShopBlockIsland } from "./shopShared-DpoQDWfz.mjs";
1
+ import { t as defineIslandPropsDecoder } from "./propsDecoder-DZd6RJeA.mjs";
2
+ import { r as ProductDetailController } from "./shop-commerce-BbfCJjB3.mjs";
3
+ import { t as mountShopBlockIsland } from "./shopShared-DlONJt0T.mjs";
4
4
  import "react";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  //#region ../blocks/src/system/runtime/nodes/product-detail.client.tsx
@@ -1,6 +1,6 @@
1
- import { t as defineIslandPropsDecoder } from "./propsDecoder-D1OtGXDV.mjs";
2
- import { i as ProductListController } from "./shop-commerce-4rKj5n9h.mjs";
3
- import { t as mountShopBlockIsland } from "./shopShared-DpoQDWfz.mjs";
1
+ import { t as defineIslandPropsDecoder } from "./propsDecoder-DZd6RJeA.mjs";
2
+ import { i as ProductListController } from "./shop-commerce-BbfCJjB3.mjs";
3
+ import { t as mountShopBlockIsland } from "./shopShared-DlONJt0T.mjs";
4
4
  import "react";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  //#region ../blocks/src/system/runtime/nodes/product-list.client.tsx