@riverbankcms/sdk 0.84.2 → 0.88.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.
- package/dist/{PreviewEditorSidebar-4PH35ZIE.mjs → PreviewEditorSidebar-EVRS3C7T.mjs} +3 -3
- package/dist/{PreviewEditorUI-WHMCRJGM.mjs → PreviewEditorUI-54WD4IGE.mjs} +3 -3
- package/dist/SdkPreviewModeRuntime-ZALZDJEK.mjs +8 -0
- package/dist/_dts/ai/src/contracts/proposals.d.ts +684 -0
- package/dist/_dts/api/src/endpoints.d.ts +58 -14
- package/dist/_dts/api/src/index.d.ts +4 -1
- package/dist/_dts/api/src/launchReadiness.d.ts +3 -3
- package/dist/_dts/api/src/mailchimpIntegration.d.ts +215 -0
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +35 -15
- package/dist/_dts/api/src/siteInfrastructure.d.ts +0 -14
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +1 -13
- package/dist/_dts/api/src/types.d.ts +6 -3
- package/dist/_dts/blocks/src/PageRenderer.d.ts +1 -0
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +4 -0
- package/dist/_dts/blocks/src/index.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/cart.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/collection.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +42 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +4 -0
- package/dist/_dts/blocks/src/system/blocks/faq.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +42 -42
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup-destination.d.ts +300 -0
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +63 -3
- package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +288 -288
- package/dist/_dts/blocks/src/system/fragments/library/newsletterForm.d.ts +53 -1
- package/dist/_dts/blocks/src/system/manifest/richTextSchema.d.ts +27 -0
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +23 -23
- package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +10 -2
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +12 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +11 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.interactive.d.ts +15 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.submission.d.ts +32 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +5 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/ModalShell.d.ts +5 -1
- package/dist/_dts/blocks/src/system/runtime/shared/utils/formatting.d.ts +1 -1
- package/dist/_dts/content-model/src/referenceFields.d.ts +1 -1
- package/dist/_dts/core/src/currency-format.d.ts +37 -2
- package/dist/_dts/core/src/event-pricing.d.ts +24 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +551 -20
- package/dist/_dts/editor-blocks/src/widgets/reference/loaders.d.ts +3 -1
- package/dist/_dts/sdk/src/cli/canonical-entry-policy.d.ts +53 -0
- package/dist/_dts/sdk/src/cli/commands/migrate.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/commands/pull.d.ts +7 -1
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/migrations/events.d.ts +73 -0
- package/dist/_dts/sdk/src/client/types.d.ts +9 -0
- package/dist/_dts/sdk/src/config/validation.d.ts +3 -0
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +3 -0
- package/dist/_dts/sdk/src/data/prefetchBlockData.d.ts +3 -9
- package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +1 -1
- package/dist/_dts/sdk/src/manifest/three-pass-converter.d.ts +7 -18
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +3 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +7 -3
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +4 -24
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +45 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +57 -0
- package/dist/_dts/surfaces/src/index.d.ts +12 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +9 -9
- package/dist/_dts/theme-core/src/schema.d.ts +11 -11
- package/dist/{chunk-ZR2GQK2A.mjs → chunk-7KOO7RPP.mjs} +953 -315
- package/dist/{chunk-OCGTXHSO.mjs → chunk-ER4UIW4X.mjs} +7 -7
- package/dist/{chunk-WFPYN7KA.mjs → chunk-HVOBXA3Y.mjs} +2 -2
- package/dist/{chunk-NFWGLRZZ.mjs → chunk-K3JWH6HE.mjs} +37 -3
- package/dist/{chunk-4QNLOTES.mjs → chunk-O4LVYUVH.mjs} +58 -14
- package/dist/{chunk-PYDHOMEO.mjs → chunk-YDMBIIS5.mjs} +1 -1
- package/dist/cli/index.mjs +1858 -512
- package/dist/client/{accordion-2UZPBMYM.mjs → accordion-PT5CGW5N.mjs} +2 -2
- package/dist/client/{bookingForm-36CWQUMV.mjs → bookingForm-2HLRTEYS.mjs} +7 -7
- package/dist/client/bookings.mjs +51 -6
- package/dist/client/{carousel-QH77HR6X.mjs → carousel-Z2LKYSWA.mjs} +3 -3
- package/dist/client/cart-ND5IK4A6.mjs +18 -0
- package/dist/client/checkout-EYUSGAY7.mjs +18 -0
- package/dist/client/{chunk-SYIJ5JO2.mjs → chunk-6DVPO44G.mjs} +1 -1
- package/dist/client/{chunk-3C2VTPWI.mjs → chunk-BAWHZ5GM.mjs} +176 -13
- package/dist/client/{chunk-52CGCQ7B.mjs → chunk-BL66UWGD.mjs} +10 -80
- package/dist/client/{chunk-VGDBVNOO.mjs → chunk-DIRW2LNG.mjs} +241 -210
- package/dist/client/{chunk-UDNSI5PY.mjs → chunk-GOFO7HRH.mjs} +1 -2
- package/dist/client/{chunk-ZKUO52W3.mjs → chunk-H4MHEXYS.mjs} +1 -1
- package/dist/client/{chunk-ZE5G642V.mjs → chunk-LI2C6M5O.mjs} +75 -1
- package/dist/client/{chunk-3DTWLTXM.mjs → chunk-MHBEWDT7.mjs} +117 -3
- package/dist/client/{chunk-4OXKTA3D.mjs → chunk-O5JNI3E4.mjs} +2 -2
- package/dist/client/{chunk-XSV6KW4D.mjs → chunk-S4G65LGR.mjs} +1 -1
- package/dist/client/{chunk-DVNUDUVT.mjs → chunk-WBQG7VJA.mjs} +4 -1
- package/dist/client/{chunk-F5VRX5Y6.mjs → chunk-WCVK4MBJ.mjs} +1 -1
- package/dist/client/{chunk-7UCLJ5SP.mjs → chunk-X7GVFB7Y.mjs} +4 -7
- package/dist/client/client.mjs +2125 -1403
- package/dist/client/{courseRegistration-TMKU6ABO.mjs → courseRegistration-H3AZBUEG.mjs} +7 -7
- package/dist/client/{eventCalendar-G6TI32X6.mjs → eventCalendar-FPKJGLGS.mjs} +10 -11
- package/dist/client/{eventCombined-SCKEMNAR.mjs → eventCombined-QCGIZBUY.mjs} +10 -11
- package/dist/client/{eventDetails-XPIFXXPK.mjs → eventDetails-HIT3BJWU.mjs} +10 -11
- package/dist/client/{eventListing-7QFMEMGT.mjs → eventListing-R4HNWJDN.mjs} +10 -11
- package/dist/client/{eventRegistration-TOODSZUI.mjs → eventRegistration-Q7BYY5HF.mjs} +10 -11
- package/dist/client/{form-MTCMVCZT.mjs → form-NI6YOG6S.mjs} +3 -3
- package/dist/client/{headerSection-Y5TMR3TW.mjs → headerSection-SDYGII36.mjs} +4 -4
- package/dist/client/hooks.mjs +1682 -1412
- package/dist/client/{locationMap-RH2LG7FZ.mjs → locationMap-BDETEUQD.mjs} +3 -4
- package/dist/client/{newsletterForm-PCAIPFMA.mjs → newsletterForm-EKYIU67X.mjs} +70 -22
- package/dist/client/{productDetail-OIGDR4YE.mjs → productDetail-5UTGNN76.mjs} +8 -9
- package/dist/client/{productList-4MA5S2CX.mjs → productList-7YA5KXZQ.mjs} +8 -9
- package/dist/client/rendering/client.mjs +753 -329
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +3786 -3034
- package/dist/client/shop-AIMUMZYC.mjs +20 -0
- package/dist/preview-next/before-render.mjs +58 -14
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/preview-next/editor-chrome.css +56 -9
- package/dist/preview-next/middleware.mjs +58 -14
- package/dist/{sdk-runtime-QLOCYKVU.mjs → sdk-runtime-NW472WNT.mjs} +6 -6
- package/dist/server/components.mjs +1518 -1015
- package/dist/server/config-validation.mjs +1719 -1461
- package/dist/server/config.mjs +1719 -1461
- package/dist/server/data.mjs +1683 -1413
- package/dist/server/index.mjs +79 -17
- package/dist/server/next.mjs +1902 -1311
- package/dist/server/page-converter.mjs +2193 -1169
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1709 -1209
- package/dist/server/rendering.mjs +1894 -1347
- package/dist/server/routing.mjs +1872 -1499
- package/dist/server/server.mjs +1571 -1264
- package/dist/server/theme-bridge.mjs +234 -0
- package/dist/styles/index.css +232 -0
- package/package.json +1 -1
- package/dist/SdkPreviewModeRuntime-4FGSVUYI.mjs +0 -8
- package/dist/client/cart-X4YK4FTW.mjs +0 -19
- package/dist/client/checkout-OM2BEPWD.mjs +0 -19
- package/dist/client/chunk-I2MMZO53.mjs +0 -6
- package/dist/client/shop-WXSYV5QO.mjs +0 -21
package/dist/server/routing.mjs
CHANGED
|
@@ -778,6 +778,64 @@ var init_endpoints = __esm({
|
|
|
778
778
|
auth: "user",
|
|
779
779
|
responseKind: "json"
|
|
780
780
|
},
|
|
781
|
+
listMailchimpAudiences: {
|
|
782
|
+
path: "/sites/{siteId}/integrations/mailchimp/audiences",
|
|
783
|
+
method: "GET",
|
|
784
|
+
tags: [TAG_TEMPLATES.site],
|
|
785
|
+
auth: "user",
|
|
786
|
+
responseKind: "json",
|
|
787
|
+
errors: ["auth:forbidden", "server:internal_error"]
|
|
788
|
+
},
|
|
789
|
+
getMailchimpSignupSyncHealth: {
|
|
790
|
+
path: "/sites/{siteId}/integrations/mailchimp/signup-sync-health",
|
|
791
|
+
method: "GET",
|
|
792
|
+
tags: [TAG_TEMPLATES.site],
|
|
793
|
+
auth: "user",
|
|
794
|
+
responseKind: "json",
|
|
795
|
+
errors: ["auth:forbidden", "server:internal_error"]
|
|
796
|
+
},
|
|
797
|
+
getMailchimpConnection: {
|
|
798
|
+
path: "/sites/{siteId}/integrations/mailchimp/connection",
|
|
799
|
+
method: "GET",
|
|
800
|
+
tags: [TAG_TEMPLATES.site],
|
|
801
|
+
auth: "user",
|
|
802
|
+
responseKind: "json",
|
|
803
|
+
errors: ["auth:forbidden", "server:internal_error"]
|
|
804
|
+
},
|
|
805
|
+
startMailchimpOAuth: {
|
|
806
|
+
path: "/sites/{siteId}/integrations/mailchimp/oauth/start",
|
|
807
|
+
method: "POST",
|
|
808
|
+
tags: [TAG_TEMPLATES.site],
|
|
809
|
+
auth: "user",
|
|
810
|
+
responseKind: "json",
|
|
811
|
+
demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
|
|
812
|
+
errors: ["auth:forbidden", "validation:invalid_input", "server:internal_error"]
|
|
813
|
+
},
|
|
814
|
+
refreshMailchimpAudiences: {
|
|
815
|
+
path: "/sites/{siteId}/integrations/mailchimp/audiences/refresh",
|
|
816
|
+
method: "POST",
|
|
817
|
+
tags: [TAG_TEMPLATES.site],
|
|
818
|
+
auth: "user",
|
|
819
|
+
responseKind: "json",
|
|
820
|
+
demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
|
|
821
|
+
errors: ["auth:forbidden", "server:internal_error"]
|
|
822
|
+
},
|
|
823
|
+
disconnectMailchimp: {
|
|
824
|
+
path: "/sites/{siteId}/integrations/mailchimp/disconnect",
|
|
825
|
+
method: "POST",
|
|
826
|
+
tags: [TAG_TEMPLATES.site],
|
|
827
|
+
auth: "user",
|
|
828
|
+
responseKind: "json",
|
|
829
|
+
demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
|
|
830
|
+
errors: ["auth:forbidden", "server:internal_error"]
|
|
831
|
+
},
|
|
832
|
+
mailchimpOAuthCallback: {
|
|
833
|
+
path: "/auth/mailchimp/callback",
|
|
834
|
+
method: "GET",
|
|
835
|
+
auth: "public",
|
|
836
|
+
responseKind: "void",
|
|
837
|
+
errors: []
|
|
838
|
+
},
|
|
781
839
|
createNewsletterList: {
|
|
782
840
|
path: "/sites/{siteId}/newsletter/lists",
|
|
783
841
|
method: "POST",
|
|
@@ -3002,20 +3060,6 @@ var init_endpoints = __esm({
|
|
|
3002
3060
|
auth: "user",
|
|
3003
3061
|
responseKind: "json"
|
|
3004
3062
|
},
|
|
3005
|
-
instagramUploadZip: {
|
|
3006
|
-
path: "/instagram/upload-zip",
|
|
3007
|
-
method: "POST",
|
|
3008
|
-
tags: ["instagram-import"],
|
|
3009
|
-
auth: "user",
|
|
3010
|
-
responseKind: "json"
|
|
3011
|
-
},
|
|
3012
|
-
createInstagramZipUploadUrl: {
|
|
3013
|
-
path: "/instagram/upload-zip-url",
|
|
3014
|
-
method: "POST",
|
|
3015
|
-
tags: ["instagram-import"],
|
|
3016
|
-
auth: "user",
|
|
3017
|
-
responseKind: "json"
|
|
3018
|
-
},
|
|
3019
3063
|
getAnalyticsReport: {
|
|
3020
3064
|
path: "/sites/{siteId}/analytics/report",
|
|
3021
3065
|
method: "GET",
|
|
@@ -6484,6 +6528,59 @@ var init_collections = __esm({
|
|
|
6484
6528
|
}
|
|
6485
6529
|
});
|
|
6486
6530
|
|
|
6531
|
+
// ../core/src/assert-never.ts
|
|
6532
|
+
function assertNever(value, message = "Unexpected variant") {
|
|
6533
|
+
throw new Error(`${message}: ${String(value)}`);
|
|
6534
|
+
}
|
|
6535
|
+
var init_assert_never = __esm({
|
|
6536
|
+
"../core/src/assert-never.ts"() {
|
|
6537
|
+
"use strict";
|
|
6538
|
+
}
|
|
6539
|
+
});
|
|
6540
|
+
|
|
6541
|
+
// ../core/src/currency-format.ts
|
|
6542
|
+
function resolveCurrencyLocale(currencyCode, override) {
|
|
6543
|
+
return override ?? CURRENCY_LOCALE_BY_CODE[currencyCode] ?? "en";
|
|
6544
|
+
}
|
|
6545
|
+
function formatCurrencyAmount(amountCents, currency, options) {
|
|
6546
|
+
const currencyCode = currency.toUpperCase();
|
|
6547
|
+
const locale = resolveCurrencyLocale(currencyCode, options?.locale);
|
|
6548
|
+
try {
|
|
6549
|
+
const exactFormatter = new Intl.NumberFormat(locale, {
|
|
6550
|
+
style: "currency",
|
|
6551
|
+
currency: currencyCode
|
|
6552
|
+
});
|
|
6553
|
+
const fractionDigits = options?.decimals === "auto" ? {
|
|
6554
|
+
minimumFractionDigits: 0,
|
|
6555
|
+
maximumFractionDigits: exactFormatter.resolvedOptions().maximumFractionDigits
|
|
6556
|
+
} : {};
|
|
6557
|
+
return new Intl.NumberFormat(locale, {
|
|
6558
|
+
style: "currency",
|
|
6559
|
+
currency: currencyCode,
|
|
6560
|
+
...fractionDigits
|
|
6561
|
+
}).format(amountCents / 100);
|
|
6562
|
+
} catch {
|
|
6563
|
+
return `${(amountCents / 100).toFixed(2)} ${currencyCode}`;
|
|
6564
|
+
}
|
|
6565
|
+
}
|
|
6566
|
+
var CURRENCY_LOCALE_BY_CODE;
|
|
6567
|
+
var init_currency_format = __esm({
|
|
6568
|
+
"../core/src/currency-format.ts"() {
|
|
6569
|
+
"use strict";
|
|
6570
|
+
CURRENCY_LOCALE_BY_CODE = {
|
|
6571
|
+
USD: "en-US",
|
|
6572
|
+
GBP: "en-GB",
|
|
6573
|
+
EUR: "de-DE",
|
|
6574
|
+
AUD: "en-AU",
|
|
6575
|
+
CAD: "en-CA",
|
|
6576
|
+
NZD: "en-NZ",
|
|
6577
|
+
JPY: "ja-JP",
|
|
6578
|
+
CNY: "zh-CN",
|
|
6579
|
+
CHF: "de-CH"
|
|
6580
|
+
};
|
|
6581
|
+
}
|
|
6582
|
+
});
|
|
6583
|
+
|
|
6487
6584
|
// ../core/src/event-pricing.ts
|
|
6488
6585
|
function publicEventPricingType(pricing) {
|
|
6489
6586
|
switch (pricing.kind) {
|
|
@@ -6504,6 +6601,7 @@ function isFreePublicEventPriceDisplay(display) {
|
|
|
6504
6601
|
return display.display.kind === "free";
|
|
6505
6602
|
case "exact":
|
|
6506
6603
|
case "from":
|
|
6604
|
+
case "range":
|
|
6507
6605
|
case "mixed":
|
|
6508
6606
|
case "unavailable":
|
|
6509
6607
|
return false;
|
|
@@ -6728,16 +6826,6 @@ var init_business_address = __esm({
|
|
|
6728
6826
|
}
|
|
6729
6827
|
});
|
|
6730
6828
|
|
|
6731
|
-
// ../core/src/assert-never.ts
|
|
6732
|
-
function assertNever(value, message = "Unexpected variant") {
|
|
6733
|
-
throw new Error(`${message}: ${String(value)}`);
|
|
6734
|
-
}
|
|
6735
|
-
var init_assert_never = __esm({
|
|
6736
|
-
"../core/src/assert-never.ts"() {
|
|
6737
|
-
"use strict";
|
|
6738
|
-
}
|
|
6739
|
-
});
|
|
6740
|
-
|
|
6741
6829
|
// ../core/src/narrow-result.ts
|
|
6742
6830
|
var init_narrow_result = __esm({
|
|
6743
6831
|
"../core/src/narrow-result.ts"() {
|
|
@@ -6857,13 +6945,6 @@ var init_csv_types = __esm({
|
|
|
6857
6945
|
}
|
|
6858
6946
|
});
|
|
6859
6947
|
|
|
6860
|
-
// ../core/src/currency-format.ts
|
|
6861
|
-
var init_currency_format = __esm({
|
|
6862
|
-
"../core/src/currency-format.ts"() {
|
|
6863
|
-
"use strict";
|
|
6864
|
-
}
|
|
6865
|
-
});
|
|
6866
|
-
|
|
6867
6948
|
// ../core/src/email-format.ts
|
|
6868
6949
|
var init_email_format = __esm({
|
|
6869
6950
|
"../core/src/email-format.ts"() {
|
|
@@ -25501,15 +25582,53 @@ var init_newsletterForm = __esm({
|
|
|
25501
25582
|
title: "Newsletter Form",
|
|
25502
25583
|
description: "Newsletter subscription form with preset field configurations.",
|
|
25503
25584
|
fields: [
|
|
25585
|
+
{
|
|
25586
|
+
id: "destinationProvider",
|
|
25587
|
+
type: "select",
|
|
25588
|
+
label: "Send signups to",
|
|
25589
|
+
description: "Choose where new subscribers from this form should go.",
|
|
25590
|
+
defaultValue: "riverbank",
|
|
25591
|
+
required: true,
|
|
25592
|
+
ui: { intent: "behavior" },
|
|
25593
|
+
options: [
|
|
25594
|
+
{ value: "riverbank", label: "Riverbank newsletter" }
|
|
25595
|
+
]
|
|
25596
|
+
},
|
|
25504
25597
|
{
|
|
25505
25598
|
id: "listId",
|
|
25506
25599
|
type: "reference",
|
|
25507
25600
|
label: "Newsletter list",
|
|
25508
25601
|
description: "Select the list new subscribers should be added to.",
|
|
25509
|
-
required:
|
|
25602
|
+
required: false,
|
|
25510
25603
|
referenceKind: "newsletterList",
|
|
25511
25604
|
allowManualEntry: false,
|
|
25512
|
-
ui: {
|
|
25605
|
+
ui: {
|
|
25606
|
+
intent: "behavior",
|
|
25607
|
+
visibleWhen: { field: "destinationProvider", equals: "riverbank" }
|
|
25608
|
+
}
|
|
25609
|
+
},
|
|
25610
|
+
{
|
|
25611
|
+
id: "mailchimpAudienceId",
|
|
25612
|
+
type: "reference",
|
|
25613
|
+
label: "Mailchimp audience",
|
|
25614
|
+
description: "Choose the Mailchimp audience for new subscribers.",
|
|
25615
|
+
required: false,
|
|
25616
|
+
referenceKind: "mailchimpAudience",
|
|
25617
|
+
allowManualEntry: false,
|
|
25618
|
+
ui: {
|
|
25619
|
+
intent: "behavior",
|
|
25620
|
+
visibleWhen: { field: "destinationProvider", equals: "mailchimp" }
|
|
25621
|
+
}
|
|
25622
|
+
},
|
|
25623
|
+
{
|
|
25624
|
+
id: "mailchimpTags",
|
|
25625
|
+
type: "text",
|
|
25626
|
+
label: "Mailchimp tags",
|
|
25627
|
+
description: "Optional tags to apply in Mailchimp, separated by commas or semicolons.",
|
|
25628
|
+
ui: {
|
|
25629
|
+
intent: "behavior",
|
|
25630
|
+
visibleWhen: { field: "destinationProvider", equals: "mailchimp" }
|
|
25631
|
+
}
|
|
25513
25632
|
},
|
|
25514
25633
|
{
|
|
25515
25634
|
id: "preset",
|
|
@@ -25556,13 +25675,18 @@ var init_newsletterForm = __esm({
|
|
|
25556
25675
|
id: "tags",
|
|
25557
25676
|
type: "text",
|
|
25558
25677
|
label: "Tags (optional)",
|
|
25559
|
-
description: "Optional tags to apply on subscribe (comma or semicolon separated)."
|
|
25678
|
+
description: "Optional tags to apply on subscribe (comma or semicolon separated).",
|
|
25679
|
+
ui: {
|
|
25680
|
+
intent: "behavior",
|
|
25681
|
+
visibleWhen: { field: "destinationProvider", equals: "riverbank" }
|
|
25682
|
+
}
|
|
25560
25683
|
}
|
|
25561
25684
|
],
|
|
25562
25685
|
layout: [
|
|
25563
25686
|
el(
|
|
25564
25687
|
"newsletter-form",
|
|
25565
25688
|
withApiBindings({
|
|
25689
|
+
destinationProvider: { $bind: { from: "destinationProvider" } },
|
|
25566
25690
|
listId: { $bind: { from: "listId" } },
|
|
25567
25691
|
preset: { $bind: { from: "preset" } },
|
|
25568
25692
|
includePhone: { $bind: { from: "includePhone" } },
|
|
@@ -31912,317 +32036,367 @@ var init_media4 = __esm({
|
|
|
31912
32036
|
}
|
|
31913
32037
|
});
|
|
31914
32038
|
|
|
31915
|
-
// ../blocks/src/system/
|
|
32039
|
+
// ../blocks/src/system/manifest/richTextSchema.ts
|
|
31916
32040
|
import { z as z43 } from "zod";
|
|
32041
|
+
var TipTapMarkSchema, TipTapNodeSchema, RichTextValueSchema, RichTextDocSchema;
|
|
32042
|
+
var init_richTextSchema = __esm({
|
|
32043
|
+
"../blocks/src/system/manifest/richTextSchema.ts"() {
|
|
32044
|
+
"use strict";
|
|
32045
|
+
TipTapMarkSchema = z43.object({
|
|
32046
|
+
type: z43.string(),
|
|
32047
|
+
attrs: z43.record(z43.string(), z43.unknown()).optional()
|
|
32048
|
+
});
|
|
32049
|
+
TipTapNodeSchema = z43.lazy(
|
|
32050
|
+
() => z43.object({
|
|
32051
|
+
type: z43.string(),
|
|
32052
|
+
content: z43.array(TipTapNodeSchema).optional(),
|
|
32053
|
+
text: z43.string().optional(),
|
|
32054
|
+
attrs: z43.record(z43.string(), z43.unknown()).optional(),
|
|
32055
|
+
marks: z43.array(TipTapMarkSchema).optional()
|
|
32056
|
+
})
|
|
32057
|
+
);
|
|
32058
|
+
RichTextValueSchema = z43.union([
|
|
32059
|
+
// Canonical: TipTap document directly
|
|
32060
|
+
TipTapNodeSchema,
|
|
32061
|
+
// Legacy (read-tolerance only): wrapped in { doc: {...} }
|
|
32062
|
+
z43.object({
|
|
32063
|
+
doc: TipTapNodeSchema
|
|
32064
|
+
})
|
|
32065
|
+
]);
|
|
32066
|
+
RichTextDocSchema = z43.object({
|
|
32067
|
+
type: z43.literal("doc"),
|
|
32068
|
+
content: z43.array(TipTapNodeSchema)
|
|
32069
|
+
});
|
|
32070
|
+
}
|
|
32071
|
+
});
|
|
32072
|
+
|
|
32073
|
+
// ../blocks/src/system/blocks/shared/bookingPaymentTerms.ts
|
|
32074
|
+
import { z as z44 } from "zod";
|
|
31917
32075
|
var bookingDepositRefundPolicySchema, bookingInstalmentPlanSchema, bookingFlexibleBalanceDueDateRuleSchema, bookingFlexibleBalanceConfigSchema, blockBookingPaymentCollectionOptionSchema, blockBookingPaymentTermsSchema;
|
|
31918
32076
|
var init_bookingPaymentTerms = __esm({
|
|
31919
32077
|
"../blocks/src/system/blocks/shared/bookingPaymentTerms.ts"() {
|
|
31920
32078
|
"use strict";
|
|
31921
|
-
bookingDepositRefundPolicySchema =
|
|
32079
|
+
bookingDepositRefundPolicySchema = z44.enum([
|
|
31922
32080
|
"refundable",
|
|
31923
32081
|
"non_refundable"
|
|
31924
32082
|
]);
|
|
31925
|
-
bookingInstalmentPlanSchema =
|
|
31926
|
-
|
|
31927
|
-
kind:
|
|
31928
|
-
depositAmountCents:
|
|
32083
|
+
bookingInstalmentPlanSchema = z44.union([
|
|
32084
|
+
z44.object({
|
|
32085
|
+
kind: z44.literal("deposit_plus_one_remainder"),
|
|
32086
|
+
depositAmountCents: z44.number().int().min(0),
|
|
31929
32087
|
depositRefundability: bookingDepositRefundPolicySchema,
|
|
31930
|
-
remainderDueCount:
|
|
31931
|
-
intervalUnit:
|
|
32088
|
+
remainderDueCount: z44.number().int().positive(),
|
|
32089
|
+
intervalUnit: z44.enum(["day", "week", "month"])
|
|
31932
32090
|
}),
|
|
31933
|
-
|
|
31934
|
-
kind:
|
|
31935
|
-
depositAmountCents:
|
|
32091
|
+
z44.object({
|
|
32092
|
+
kind: z44.literal("deposit_plus_scheduled_instalments"),
|
|
32093
|
+
depositAmountCents: z44.number().int().min(0),
|
|
31936
32094
|
depositRefundability: bookingDepositRefundPolicySchema,
|
|
31937
|
-
instalmentCount:
|
|
31938
|
-
intervalCount:
|
|
31939
|
-
intervalUnit:
|
|
32095
|
+
instalmentCount: z44.number().int().positive(),
|
|
32096
|
+
intervalCount: z44.number().int().positive(),
|
|
32097
|
+
intervalUnit: z44.enum(["day", "week", "month"])
|
|
31940
32098
|
}),
|
|
31941
|
-
|
|
31942
|
-
kind:
|
|
31943
|
-
instalmentCount:
|
|
31944
|
-
intervalCount:
|
|
31945
|
-
intervalUnit:
|
|
32099
|
+
z44.object({
|
|
32100
|
+
kind: z44.literal("equal_scheduled_instalments"),
|
|
32101
|
+
instalmentCount: z44.number().int().positive(),
|
|
32102
|
+
intervalCount: z44.number().int().positive(),
|
|
32103
|
+
intervalUnit: z44.enum(["day", "week", "month"])
|
|
31946
32104
|
})
|
|
31947
32105
|
]);
|
|
31948
|
-
bookingFlexibleBalanceDueDateRuleSchema =
|
|
31949
|
-
|
|
31950
|
-
kind:
|
|
31951
|
-
daysBeforeStart:
|
|
32106
|
+
bookingFlexibleBalanceDueDateRuleSchema = z44.union([
|
|
32107
|
+
z44.object({
|
|
32108
|
+
kind: z44.literal("relative_to_start_date"),
|
|
32109
|
+
daysBeforeStart: z44.number().int().positive()
|
|
31952
32110
|
}),
|
|
31953
|
-
|
|
31954
|
-
kind:
|
|
31955
|
-
dueAt:
|
|
32111
|
+
z44.object({
|
|
32112
|
+
kind: z44.literal("fixed_calendar_date"),
|
|
32113
|
+
dueAt: z44.string().datetime()
|
|
31956
32114
|
})
|
|
31957
32115
|
]);
|
|
31958
|
-
bookingFlexibleBalanceConfigSchema =
|
|
31959
|
-
upfrontAmountCents:
|
|
32116
|
+
bookingFlexibleBalanceConfigSchema = z44.object({
|
|
32117
|
+
upfrontAmountCents: z44.number().int().min(0),
|
|
31960
32118
|
dueDateRule: bookingFlexibleBalanceDueDateRuleSchema,
|
|
31961
32119
|
depositRefundability: bookingDepositRefundPolicySchema
|
|
31962
32120
|
});
|
|
31963
|
-
blockBookingPaymentCollectionOptionSchema =
|
|
31964
|
-
|
|
31965
|
-
kind:
|
|
32121
|
+
blockBookingPaymentCollectionOptionSchema = z44.union([
|
|
32122
|
+
z44.object({
|
|
32123
|
+
kind: z44.literal("upfront")
|
|
31966
32124
|
}),
|
|
31967
|
-
|
|
31968
|
-
kind:
|
|
32125
|
+
z44.object({
|
|
32126
|
+
kind: z44.literal("deferred_manual")
|
|
31969
32127
|
}),
|
|
31970
|
-
|
|
31971
|
-
kind:
|
|
32128
|
+
z44.object({
|
|
32129
|
+
kind: z44.literal("instalment_plan"),
|
|
31972
32130
|
plan: bookingInstalmentPlanSchema
|
|
31973
32131
|
}),
|
|
31974
|
-
|
|
31975
|
-
kind:
|
|
32132
|
+
z44.object({
|
|
32133
|
+
kind: z44.literal("flexible_balance"),
|
|
31976
32134
|
config: bookingFlexibleBalanceConfigSchema
|
|
31977
32135
|
})
|
|
31978
32136
|
]);
|
|
31979
|
-
blockBookingPaymentTermsSchema =
|
|
31980
|
-
allowedOptions:
|
|
32137
|
+
blockBookingPaymentTermsSchema = z44.object({
|
|
32138
|
+
allowedOptions: z44.array(blockBookingPaymentCollectionOptionSchema).min(1)
|
|
31981
32139
|
});
|
|
31982
32140
|
}
|
|
31983
32141
|
});
|
|
31984
32142
|
|
|
31985
32143
|
// ../blocks/src/system/blocks/courses/shared/schemas.ts
|
|
31986
|
-
import { z as
|
|
32144
|
+
import { z as z45 } from "zod";
|
|
31987
32145
|
var courseVenueSchema, courseSessionSchema, courseTeamMemberSummarySchema, coursePricingOptionSchema, coursePricingSchema, publicCourseSchema, publicCoursesArraySchema;
|
|
31988
32146
|
var init_schemas = __esm({
|
|
31989
32147
|
"../blocks/src/system/blocks/courses/shared/schemas.ts"() {
|
|
31990
32148
|
"use strict";
|
|
31991
32149
|
init_bookingPaymentTerms();
|
|
31992
|
-
courseVenueSchema =
|
|
31993
|
-
id:
|
|
31994
|
-
name:
|
|
31995
|
-
address:
|
|
31996
|
-
});
|
|
31997
|
-
courseSessionSchema =
|
|
31998
|
-
id:
|
|
31999
|
-
startsAt:
|
|
32000
|
-
endsAt:
|
|
32001
|
-
timeZone:
|
|
32002
|
-
capacityOverride:
|
|
32003
|
-
overrides:
|
|
32004
|
-
});
|
|
32005
|
-
courseTeamMemberSummarySchema =
|
|
32006
|
-
id:
|
|
32007
|
-
name:
|
|
32008
|
-
roleLabel:
|
|
32009
|
-
summary:
|
|
32010
|
-
profilePath:
|
|
32011
|
-
});
|
|
32012
|
-
coursePricingOptionSchema =
|
|
32013
|
-
id:
|
|
32014
|
-
name:
|
|
32015
|
-
description:
|
|
32016
|
-
priceAmount:
|
|
32017
|
-
isActive:
|
|
32018
|
-
sortOrder:
|
|
32019
|
-
capacityLimit:
|
|
32020
|
-
saleStartsAt:
|
|
32021
|
-
saleEndsAt:
|
|
32022
|
-
attendanceScope:
|
|
32023
|
-
});
|
|
32024
|
-
coursePricingSchema =
|
|
32025
|
-
bookingRequirement:
|
|
32026
|
-
pricingStrategy:
|
|
32027
|
-
currency:
|
|
32028
|
-
singlePriceAmount:
|
|
32150
|
+
courseVenueSchema = z45.object({
|
|
32151
|
+
id: z45.string(),
|
|
32152
|
+
name: z45.string(),
|
|
32153
|
+
address: z45.string().nullable()
|
|
32154
|
+
});
|
|
32155
|
+
courseSessionSchema = z45.object({
|
|
32156
|
+
id: z45.string(),
|
|
32157
|
+
startsAt: z45.string(),
|
|
32158
|
+
endsAt: z45.string(),
|
|
32159
|
+
timeZone: z45.string(),
|
|
32160
|
+
capacityOverride: z45.number().nullable().optional(),
|
|
32161
|
+
overrides: z45.record(z45.string(), z45.unknown()).nullable().optional()
|
|
32162
|
+
});
|
|
32163
|
+
courseTeamMemberSummarySchema = z45.object({
|
|
32164
|
+
id: z45.string(),
|
|
32165
|
+
name: z45.string(),
|
|
32166
|
+
roleLabel: z45.string().nullable(),
|
|
32167
|
+
summary: z45.string().nullable(),
|
|
32168
|
+
profilePath: z45.string().nullable()
|
|
32169
|
+
});
|
|
32170
|
+
coursePricingOptionSchema = z45.object({
|
|
32171
|
+
id: z45.string(),
|
|
32172
|
+
name: z45.string(),
|
|
32173
|
+
description: z45.string().nullable(),
|
|
32174
|
+
priceAmount: z45.number(),
|
|
32175
|
+
isActive: z45.boolean(),
|
|
32176
|
+
sortOrder: z45.number(),
|
|
32177
|
+
capacityLimit: z45.number().nullable(),
|
|
32178
|
+
saleStartsAt: z45.string().nullable(),
|
|
32179
|
+
saleEndsAt: z45.string().nullable(),
|
|
32180
|
+
attendanceScope: z45.enum(["in_person", "online", "both"]).nullable().optional()
|
|
32181
|
+
});
|
|
32182
|
+
coursePricingSchema = z45.object({
|
|
32183
|
+
bookingRequirement: z45.enum(["none", "required"]),
|
|
32184
|
+
pricingStrategy: z45.enum(["free", "single", "tiered"]),
|
|
32185
|
+
currency: z45.string(),
|
|
32186
|
+
singlePriceAmount: z45.number().nullable(),
|
|
32029
32187
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
32030
|
-
options:
|
|
32031
|
-
});
|
|
32032
|
-
publicCourseSchema =
|
|
32033
|
-
id:
|
|
32034
|
-
title:
|
|
32035
|
-
slug:
|
|
32036
|
-
description:
|
|
32037
|
-
teamMembers:
|
|
32038
|
-
enrollmentOpen:
|
|
32188
|
+
options: z45.array(coursePricingOptionSchema)
|
|
32189
|
+
});
|
|
32190
|
+
publicCourseSchema = z45.object({
|
|
32191
|
+
id: z45.string(),
|
|
32192
|
+
title: z45.string(),
|
|
32193
|
+
slug: z45.string(),
|
|
32194
|
+
description: z45.unknown().nullable(),
|
|
32195
|
+
teamMembers: z45.array(courseTeamMemberSummarySchema).optional(),
|
|
32196
|
+
enrollmentOpen: z45.boolean(),
|
|
32039
32197
|
pricing: coursePricingSchema.optional(),
|
|
32040
|
-
priceCents:
|
|
32041
|
-
currency:
|
|
32198
|
+
priceCents: z45.number().nullable(),
|
|
32199
|
+
currency: z45.string(),
|
|
32042
32200
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
32043
|
-
enrollmentCapacity:
|
|
32044
|
-
acceptsMemberships:
|
|
32045
|
-
status:
|
|
32046
|
-
sessionsCount:
|
|
32047
|
-
enrolledCount:
|
|
32048
|
-
availableSpots:
|
|
32049
|
-
sessions:
|
|
32201
|
+
enrollmentCapacity: z45.number().nullable(),
|
|
32202
|
+
acceptsMemberships: z45.boolean(),
|
|
32203
|
+
status: z45.enum(["active", "draft", "cancelled"]),
|
|
32204
|
+
sessionsCount: z45.number(),
|
|
32205
|
+
enrolledCount: z45.number(),
|
|
32206
|
+
availableSpots: z45.number().nullable(),
|
|
32207
|
+
sessions: z45.array(courseSessionSchema),
|
|
32050
32208
|
venue: courseVenueSchema.nullable(),
|
|
32051
|
-
contentEntryId:
|
|
32209
|
+
contentEntryId: z45.string().nullable()
|
|
32052
32210
|
});
|
|
32053
|
-
publicCoursesArraySchema =
|
|
32211
|
+
publicCoursesArraySchema = z45.array(publicCourseSchema);
|
|
32054
32212
|
}
|
|
32055
32213
|
});
|
|
32056
32214
|
|
|
32057
32215
|
// ../blocks/src/system/blocks/events/shared/schemas.ts
|
|
32058
|
-
import { z as
|
|
32216
|
+
import { z as z46 } from "zod";
|
|
32059
32217
|
var eventPresetSchema, eventScheduleScopeSchema, eventDestinationModeSchema, eventVenueSchema, eventCategorySchema, pricingTypeSchema, accessRestrictionSchema, eventPricingModeSchema, publicCoursePriceDisplaySchema, publicEventPriceDisplaySchema, publicEventTicketTypePriceDisplaySchema, publicEventAttendanceModeSchema, publicEventAttendanceModeAvailabilitySchema, publicEventTicketTypeAvailabilitySchema, publicEventTicketTypeSchema, publicEventPricingSchema, publicTeamMemberSummarySchema, publicEventSchema, publicEventsArraySchema;
|
|
32060
32218
|
var init_schemas2 = __esm({
|
|
32061
32219
|
"../blocks/src/system/blocks/events/shared/schemas.ts"() {
|
|
32062
32220
|
"use strict";
|
|
32063
32221
|
init_media4();
|
|
32222
|
+
init_richTextSchema();
|
|
32064
32223
|
init_bookingPaymentTerms();
|
|
32065
32224
|
init_schemas();
|
|
32066
|
-
eventPresetSchema =
|
|
32067
|
-
eventScheduleScopeSchema =
|
|
32068
|
-
eventDestinationModeSchema =
|
|
32069
|
-
eventVenueSchema =
|
|
32070
|
-
id:
|
|
32071
|
-
name:
|
|
32072
|
-
address:
|
|
32073
|
-
location:
|
|
32074
|
-
lat:
|
|
32075
|
-
lng:
|
|
32225
|
+
eventPresetSchema = z46.enum(["event", "class", "workshop", "retreat", "performance"]);
|
|
32226
|
+
eventScheduleScopeSchema = z46.enum(["recurring", "oneOff"]);
|
|
32227
|
+
eventDestinationModeSchema = z46.enum(["cms-managed", "system-managed"]);
|
|
32228
|
+
eventVenueSchema = z46.object({
|
|
32229
|
+
id: z46.string(),
|
|
32230
|
+
name: z46.string(),
|
|
32231
|
+
address: z46.string().nullable(),
|
|
32232
|
+
location: z46.object({
|
|
32233
|
+
lat: z46.number(),
|
|
32234
|
+
lng: z46.number()
|
|
32076
32235
|
}).nullable()
|
|
32077
32236
|
});
|
|
32078
|
-
eventCategorySchema =
|
|
32079
|
-
id:
|
|
32080
|
-
name:
|
|
32081
|
-
color:
|
|
32082
|
-
});
|
|
32083
|
-
pricingTypeSchema =
|
|
32084
|
-
accessRestrictionSchema =
|
|
32085
|
-
eventPricingModeSchema =
|
|
32086
|
-
publicCoursePriceDisplaySchema =
|
|
32087
|
-
|
|
32088
|
-
|
|
32089
|
-
|
|
32090
|
-
|
|
32237
|
+
eventCategorySchema = z46.object({
|
|
32238
|
+
id: z46.string(),
|
|
32239
|
+
name: z46.string(),
|
|
32240
|
+
color: z46.string().nullable()
|
|
32241
|
+
});
|
|
32242
|
+
pricingTypeSchema = z46.enum(["free", "paid"]);
|
|
32243
|
+
accessRestrictionSchema = z46.enum(["none", "category"]);
|
|
32244
|
+
eventPricingModeSchema = z46.enum(["single", "ticket_types"]);
|
|
32245
|
+
publicCoursePriceDisplaySchema = z46.discriminatedUnion("kind", [
|
|
32246
|
+
z46.object({ kind: z46.literal("free"), currency: z46.string() }),
|
|
32247
|
+
z46.object({ kind: z46.literal("exact"), amount: z46.number(), currency: z46.string() }),
|
|
32248
|
+
z46.object({ kind: z46.literal("from"), amount: z46.number(), currency: z46.string() }),
|
|
32249
|
+
z46.object({ kind: z46.literal("unavailable"), currency: z46.string() })
|
|
32091
32250
|
]);
|
|
32092
|
-
publicEventPriceDisplaySchema =
|
|
32093
|
-
|
|
32094
|
-
|
|
32095
|
-
|
|
32096
|
-
|
|
32097
|
-
|
|
32098
|
-
|
|
32251
|
+
publicEventPriceDisplaySchema = z46.discriminatedUnion("kind", [
|
|
32252
|
+
z46.object({ kind: z46.literal("free"), currency: z46.string() }),
|
|
32253
|
+
z46.object({ kind: z46.literal("exact"), amount: z46.number(), currency: z46.string() }),
|
|
32254
|
+
z46.object({ kind: z46.literal("from"), amount: z46.number(), currency: z46.string() }),
|
|
32255
|
+
z46.object({ kind: z46.literal("range"), minAmount: z46.number(), maxAmount: z46.number(), currency: z46.string() }),
|
|
32256
|
+
z46.object({
|
|
32257
|
+
kind: z46.literal("mixed"),
|
|
32258
|
+
paidFromAmount: z46.number(),
|
|
32259
|
+
paidToAmount: z46.number(),
|
|
32260
|
+
currency: z46.string()
|
|
32261
|
+
}),
|
|
32262
|
+
z46.object({ kind: z46.literal("unavailable"), currency: z46.string() }),
|
|
32263
|
+
z46.object({ kind: z46.literal("course"), display: publicCoursePriceDisplaySchema })
|
|
32099
32264
|
]);
|
|
32100
|
-
publicEventTicketTypePriceDisplaySchema =
|
|
32101
|
-
|
|
32102
|
-
|
|
32103
|
-
|
|
32104
|
-
|
|
32105
|
-
|
|
32265
|
+
publicEventTicketTypePriceDisplaySchema = z46.union([
|
|
32266
|
+
z46.object({ kind: z46.literal("free"), currency: z46.string() }),
|
|
32267
|
+
z46.object({ kind: z46.literal("exact"), amount: z46.number(), currency: z46.string() }),
|
|
32268
|
+
z46.object({ kind: z46.literal("from"), amount: z46.number(), currency: z46.string() }),
|
|
32269
|
+
z46.object({ kind: z46.literal("range"), minAmount: z46.number(), maxAmount: z46.number(), currency: z46.string() }),
|
|
32270
|
+
z46.object({
|
|
32271
|
+
kind: z46.literal("mixed"),
|
|
32272
|
+
paidFromAmount: z46.number(),
|
|
32273
|
+
paidToAmount: z46.number(),
|
|
32274
|
+
currency: z46.string()
|
|
32275
|
+
}),
|
|
32276
|
+
z46.object({ kind: z46.literal("unavailable"), currency: z46.string() })
|
|
32106
32277
|
]);
|
|
32107
|
-
publicEventAttendanceModeSchema =
|
|
32108
|
-
publicEventAttendanceModeAvailabilitySchema =
|
|
32278
|
+
publicEventAttendanceModeSchema = z46.enum(["in_person", "online"]);
|
|
32279
|
+
publicEventAttendanceModeAvailabilitySchema = z46.object({
|
|
32109
32280
|
mode: publicEventAttendanceModeSchema,
|
|
32110
|
-
capacity:
|
|
32111
|
-
registeredCount:
|
|
32112
|
-
availableSpots:
|
|
32113
|
-
waitlistEnabled:
|
|
32114
|
-
});
|
|
32115
|
-
publicEventTicketTypeAvailabilitySchema =
|
|
32116
|
-
|
|
32117
|
-
kind:
|
|
32118
|
-
remainingCapacity:
|
|
32281
|
+
capacity: z46.number().nullable(),
|
|
32282
|
+
registeredCount: z46.number(),
|
|
32283
|
+
availableSpots: z46.number().nullable(),
|
|
32284
|
+
waitlistEnabled: z46.boolean()
|
|
32285
|
+
});
|
|
32286
|
+
publicEventTicketTypeAvailabilitySchema = z46.union([
|
|
32287
|
+
z46.object({
|
|
32288
|
+
kind: z46.literal("available"),
|
|
32289
|
+
remainingCapacity: z46.number().nullable()
|
|
32119
32290
|
}),
|
|
32120
|
-
|
|
32121
|
-
kind:
|
|
32122
|
-
reason:
|
|
32123
|
-
remainingCapacity:
|
|
32291
|
+
z46.object({
|
|
32292
|
+
kind: z46.literal("unavailable"),
|
|
32293
|
+
reason: z46.enum(["inactive", "not_on_sale_yet", "sale_ended", "sold_out", "event_sold_out"]),
|
|
32294
|
+
remainingCapacity: z46.number().nullable()
|
|
32124
32295
|
})
|
|
32125
32296
|
]);
|
|
32126
|
-
publicEventTicketTypeSchema =
|
|
32127
|
-
id:
|
|
32128
|
-
siteId:
|
|
32129
|
-
eventSeriesId:
|
|
32130
|
-
name:
|
|
32131
|
-
description:
|
|
32132
|
-
priceAmount:
|
|
32133
|
-
isActive:
|
|
32134
|
-
sortOrder:
|
|
32135
|
-
capacityMode:
|
|
32136
|
-
capacityLimit:
|
|
32137
|
-
attendanceScope:
|
|
32138
|
-
saleStartsAt:
|
|
32139
|
-
saleEndsAt:
|
|
32297
|
+
publicEventTicketTypeSchema = z46.object({
|
|
32298
|
+
id: z46.string(),
|
|
32299
|
+
siteId: z46.string(),
|
|
32300
|
+
eventSeriesId: z46.string(),
|
|
32301
|
+
name: z46.string(),
|
|
32302
|
+
description: z46.string().nullable(),
|
|
32303
|
+
priceAmount: z46.number(),
|
|
32304
|
+
isActive: z46.boolean(),
|
|
32305
|
+
sortOrder: z46.number(),
|
|
32306
|
+
capacityMode: z46.enum(["limited", "unlimited"]),
|
|
32307
|
+
capacityLimit: z46.number().nullable(),
|
|
32308
|
+
attendanceScope: z46.enum(["in_person", "online", "both"]).optional(),
|
|
32309
|
+
saleStartsAt: z46.string().nullable(),
|
|
32310
|
+
saleEndsAt: z46.string().nullable(),
|
|
32140
32311
|
availability: publicEventTicketTypeAvailabilitySchema,
|
|
32141
|
-
createdAt:
|
|
32142
|
-
updatedAt:
|
|
32143
|
-
});
|
|
32144
|
-
publicEventPricingSchema =
|
|
32145
|
-
|
|
32146
|
-
kind:
|
|
32147
|
-
currency:
|
|
32148
|
-
display:
|
|
32312
|
+
createdAt: z46.string(),
|
|
32313
|
+
updatedAt: z46.string()
|
|
32314
|
+
});
|
|
32315
|
+
publicEventPricingSchema = z46.discriminatedUnion("kind", [
|
|
32316
|
+
z46.object({
|
|
32317
|
+
kind: z46.literal("drop_in"),
|
|
32318
|
+
currency: z46.string(),
|
|
32319
|
+
display: z46.object({ kind: z46.literal("free"), currency: z46.string() })
|
|
32149
32320
|
}),
|
|
32150
|
-
|
|
32151
|
-
kind:
|
|
32152
|
-
currency:
|
|
32153
|
-
display:
|
|
32321
|
+
z46.object({
|
|
32322
|
+
kind: z46.literal("free_registration"),
|
|
32323
|
+
currency: z46.string(),
|
|
32324
|
+
display: z46.object({ kind: z46.literal("free"), currency: z46.string() })
|
|
32154
32325
|
}),
|
|
32155
|
-
|
|
32156
|
-
kind:
|
|
32157
|
-
amount:
|
|
32158
|
-
currency:
|
|
32159
|
-
display:
|
|
32326
|
+
z46.object({
|
|
32327
|
+
kind: z46.literal("single_paid"),
|
|
32328
|
+
amount: z46.number(),
|
|
32329
|
+
currency: z46.string(),
|
|
32330
|
+
display: z46.object({ kind: z46.literal("exact"), amount: z46.number(), currency: z46.string() })
|
|
32160
32331
|
}),
|
|
32161
|
-
|
|
32162
|
-
kind:
|
|
32163
|
-
currency:
|
|
32164
|
-
ticketTypes:
|
|
32332
|
+
z46.object({
|
|
32333
|
+
kind: z46.literal("ticket_types"),
|
|
32334
|
+
currency: z46.string(),
|
|
32335
|
+
ticketTypes: z46.array(publicEventTicketTypeSchema),
|
|
32165
32336
|
display: publicEventTicketTypePriceDisplaySchema
|
|
32166
32337
|
}),
|
|
32167
|
-
|
|
32168
|
-
kind:
|
|
32169
|
-
display:
|
|
32338
|
+
z46.object({
|
|
32339
|
+
kind: z46.literal("course"),
|
|
32340
|
+
display: z46.object({ kind: z46.literal("course"), display: publicCoursePriceDisplaySchema })
|
|
32170
32341
|
})
|
|
32171
32342
|
]);
|
|
32172
|
-
publicTeamMemberSummarySchema =
|
|
32173
|
-
id:
|
|
32174
|
-
name:
|
|
32175
|
-
roleLabel:
|
|
32176
|
-
summary:
|
|
32177
|
-
profilePath:
|
|
32343
|
+
publicTeamMemberSummarySchema = z46.object({
|
|
32344
|
+
id: z46.string(),
|
|
32345
|
+
name: z46.string(),
|
|
32346
|
+
roleLabel: z46.string().nullable(),
|
|
32347
|
+
summary: z46.string().nullable(),
|
|
32348
|
+
profilePath: z46.string().nullable()
|
|
32178
32349
|
});
|
|
32179
|
-
publicEventSchema =
|
|
32180
|
-
kind:
|
|
32350
|
+
publicEventSchema = z46.object({
|
|
32351
|
+
kind: z46.enum(["event", "course_session"]).optional(),
|
|
32181
32352
|
eventPreset: eventPresetSchema.optional(),
|
|
32182
32353
|
eventDestinationMode: eventDestinationModeSchema.optional(),
|
|
32183
32354
|
scheduleScope: eventScheduleScopeSchema.optional(),
|
|
32184
|
-
id:
|
|
32185
|
-
occurrenceId:
|
|
32186
|
-
seriesId:
|
|
32187
|
-
title:
|
|
32188
|
-
description:
|
|
32189
|
-
|
|
32190
|
-
|
|
32191
|
-
|
|
32355
|
+
id: z46.string(),
|
|
32356
|
+
occurrenceId: z46.string(),
|
|
32357
|
+
seriesId: z46.string(),
|
|
32358
|
+
title: z46.string(),
|
|
32359
|
+
description: z46.string().nullable(),
|
|
32360
|
+
content: z46.object({
|
|
32361
|
+
body: RichTextDocSchema.nullable().optional()
|
|
32362
|
+
}).optional(),
|
|
32363
|
+
presentation: z46.object({
|
|
32364
|
+
cardTitleOverride: z46.string().nullable().optional(),
|
|
32365
|
+
summary: z46.string().nullable().optional(),
|
|
32192
32366
|
image: mediaSchema2.nullable().optional()
|
|
32193
32367
|
}).optional(),
|
|
32194
|
-
slug:
|
|
32195
|
-
path:
|
|
32196
|
-
requiresRegistration:
|
|
32197
|
-
deliveryMode:
|
|
32198
|
-
attendanceModes:
|
|
32199
|
-
startsAt:
|
|
32200
|
-
endsAt:
|
|
32201
|
-
capacity:
|
|
32202
|
-
registeredCount:
|
|
32203
|
-
availableSpots:
|
|
32204
|
-
waitlistEnabled:
|
|
32368
|
+
slug: z46.string(),
|
|
32369
|
+
path: z46.string(),
|
|
32370
|
+
requiresRegistration: z46.boolean(),
|
|
32371
|
+
deliveryMode: z46.enum(["in_person", "online", "hybrid"]),
|
|
32372
|
+
attendanceModes: z46.array(publicEventAttendanceModeAvailabilitySchema),
|
|
32373
|
+
startsAt: z46.string(),
|
|
32374
|
+
endsAt: z46.string(),
|
|
32375
|
+
capacity: z46.number().nullable(),
|
|
32376
|
+
registeredCount: z46.number(),
|
|
32377
|
+
availableSpots: z46.number().nullable(),
|
|
32378
|
+
waitlistEnabled: z46.boolean(),
|
|
32205
32379
|
venue: eventVenueSchema.nullable(),
|
|
32206
32380
|
eventCategory: eventCategorySchema.nullable(),
|
|
32207
|
-
teamMembers:
|
|
32208
|
-
status:
|
|
32209
|
-
timeZone:
|
|
32381
|
+
teamMembers: z46.array(publicTeamMemberSummarySchema).optional(),
|
|
32382
|
+
status: z46.enum(["active", "draft", "archived"]).optional(),
|
|
32383
|
+
timeZone: z46.string(),
|
|
32210
32384
|
pricing: publicEventPricingSchema,
|
|
32211
32385
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
32212
32386
|
accessRestriction: accessRestrictionSchema,
|
|
32213
|
-
allowedCategoryIds:
|
|
32214
|
-
requireGuestDetails:
|
|
32215
|
-
acceptsPasses:
|
|
32216
|
-
acceptsMemberships:
|
|
32217
|
-
course:
|
|
32218
|
-
id:
|
|
32387
|
+
allowedCategoryIds: z46.array(z46.string()),
|
|
32388
|
+
requireGuestDetails: z46.boolean().optional(),
|
|
32389
|
+
acceptsPasses: z46.boolean().optional(),
|
|
32390
|
+
acceptsMemberships: z46.boolean().optional(),
|
|
32391
|
+
course: z46.object({
|
|
32392
|
+
id: z46.string(),
|
|
32219
32393
|
pricing: coursePricingSchema.optional(),
|
|
32220
|
-
priceCents:
|
|
32221
|
-
currency:
|
|
32222
|
-
enrollmentOpen:
|
|
32394
|
+
priceCents: z46.number().nullable(),
|
|
32395
|
+
currency: z46.string(),
|
|
32396
|
+
enrollmentOpen: z46.boolean()
|
|
32223
32397
|
}).nullable().optional()
|
|
32224
32398
|
});
|
|
32225
|
-
publicEventsArraySchema =
|
|
32399
|
+
publicEventsArraySchema = z46.array(publicEventSchema);
|
|
32226
32400
|
}
|
|
32227
32401
|
});
|
|
32228
32402
|
|
|
@@ -32459,19 +32633,19 @@ var init_shared3 = __esm({
|
|
|
32459
32633
|
});
|
|
32460
32634
|
|
|
32461
32635
|
// ../blocks/src/system/blocks/event-registration.shared.ts
|
|
32462
|
-
import { z as
|
|
32636
|
+
import { z as z47 } from "zod";
|
|
32463
32637
|
var occurrenceContextSchema;
|
|
32464
32638
|
var init_event_registration_shared = __esm({
|
|
32465
32639
|
"../blocks/src/system/blocks/event-registration.shared.ts"() {
|
|
32466
32640
|
"use strict";
|
|
32467
|
-
occurrenceContextSchema =
|
|
32468
|
-
id:
|
|
32469
|
-
seriesId:
|
|
32470
|
-
startsAt:
|
|
32471
|
-
endsAt:
|
|
32472
|
-
timeZone:
|
|
32473
|
-
capacityOverride:
|
|
32474
|
-
overrides:
|
|
32641
|
+
occurrenceContextSchema = z47.object({
|
|
32642
|
+
id: z47.string(),
|
|
32643
|
+
seriesId: z47.string(),
|
|
32644
|
+
startsAt: z47.string(),
|
|
32645
|
+
endsAt: z47.string(),
|
|
32646
|
+
timeZone: z47.string(),
|
|
32647
|
+
capacityOverride: z47.number().nullable().optional(),
|
|
32648
|
+
overrides: z47.record(z47.string(), z47.unknown()).nullable().optional()
|
|
32475
32649
|
}).nullable();
|
|
32476
32650
|
}
|
|
32477
32651
|
});
|
|
@@ -32577,10 +32751,21 @@ function readLegacyPriceDisplay(value, currency) {
|
|
|
32577
32751
|
amount: readAmount(value.amount) ?? 0,
|
|
32578
32752
|
currency: displayCurrency
|
|
32579
32753
|
} : { kind: "unavailable", currency };
|
|
32754
|
+
case "range": {
|
|
32755
|
+
const minAmount = readAmount(value.minAmount);
|
|
32756
|
+
const maxAmount = readAmount(value.maxAmount);
|
|
32757
|
+
return minAmount !== null && maxAmount !== null ? {
|
|
32758
|
+
kind: "range",
|
|
32759
|
+
minAmount,
|
|
32760
|
+
maxAmount,
|
|
32761
|
+
currency: displayCurrency
|
|
32762
|
+
} : { kind: "unavailable", currency };
|
|
32763
|
+
}
|
|
32580
32764
|
case "mixed":
|
|
32581
32765
|
return readAmount(value.paidFromAmount) !== null ? {
|
|
32582
32766
|
kind: "mixed",
|
|
32583
32767
|
paidFromAmount: readAmount(value.paidFromAmount) ?? 0,
|
|
32768
|
+
paidToAmount: readAmount(value.paidToAmount) ?? readAmount(value.paidFromAmount) ?? 0,
|
|
32584
32769
|
currency: displayCurrency
|
|
32585
32770
|
} : { kind: "unavailable", currency };
|
|
32586
32771
|
case "unavailable":
|
|
@@ -32629,21 +32814,21 @@ var init_pricing = __esm({
|
|
|
32629
32814
|
});
|
|
32630
32815
|
|
|
32631
32816
|
// ../blocks/src/system/runtime/nodes/shared/contract-schemas.ts
|
|
32632
|
-
import { z as
|
|
32817
|
+
import { z as z48 } from "zod";
|
|
32633
32818
|
var previewStageSchema, registrationButtonVariantSchema, eventButtonVariantSchema, eventLayoutSchema, eventCalendarDisplayModeSchema, columnOptionSchema, weekStartSchema, filterAutoShowSchema, calendarTabViewsSchema;
|
|
32634
32819
|
var init_contract_schemas = __esm({
|
|
32635
32820
|
"../blocks/src/system/runtime/nodes/shared/contract-schemas.ts"() {
|
|
32636
32821
|
"use strict";
|
|
32637
32822
|
init_events();
|
|
32638
|
-
previewStageSchema =
|
|
32639
|
-
registrationButtonVariantSchema =
|
|
32640
|
-
eventButtonVariantSchema =
|
|
32641
|
-
eventLayoutSchema =
|
|
32642
|
-
eventCalendarDisplayModeSchema =
|
|
32643
|
-
columnOptionSchema =
|
|
32644
|
-
weekStartSchema =
|
|
32645
|
-
filterAutoShowSchema =
|
|
32646
|
-
calendarTabViewsSchema =
|
|
32823
|
+
previewStageSchema = z48.enum(["preview", "published"]);
|
|
32824
|
+
registrationButtonVariantSchema = z48.enum(["primary", "secondary", "outline"]);
|
|
32825
|
+
eventButtonVariantSchema = z48.enum(["primary", "secondary", "outline", "link"]);
|
|
32826
|
+
eventLayoutSchema = z48.enum(eventCalendarListLayoutValues);
|
|
32827
|
+
eventCalendarDisplayModeSchema = z48.enum(eventCalendarDisplayModeValues);
|
|
32828
|
+
columnOptionSchema = z48.enum(["2", "3", "4"]);
|
|
32829
|
+
weekStartSchema = z48.enum(["sunday", "monday"]);
|
|
32830
|
+
filterAutoShowSchema = z48.enum(["auto", "always", "never"]);
|
|
32831
|
+
calendarTabViewsSchema = z48.enum(["both", "month", "week"]);
|
|
32647
32832
|
}
|
|
32648
32833
|
});
|
|
32649
32834
|
|
|
@@ -32721,7 +32906,7 @@ var init_registrationEventAdapter = __esm({
|
|
|
32721
32906
|
});
|
|
32722
32907
|
|
|
32723
32908
|
// ../blocks/src/system/runtime/nodes/event-registration.interactive.ts
|
|
32724
|
-
import { z as
|
|
32909
|
+
import { z as z49 } from "zod";
|
|
32725
32910
|
function buildEventRegistrationDisplay(source) {
|
|
32726
32911
|
const stepLabels = buildEventRegistrationShellStepLabels(source);
|
|
32727
32912
|
return {
|
|
@@ -32826,66 +33011,68 @@ var init_event_registration_interactive = __esm({
|
|
|
32826
33011
|
init_registrationEventAdapter();
|
|
32827
33012
|
EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS = ["Date", "Tickets", "Details"];
|
|
32828
33013
|
EVENT_REGISTRATION_SHELL_STEP_LABELS = ["Event", "Date", "Tickets", "Details", "Payment"];
|
|
32829
|
-
contentEntrySchema =
|
|
32830
|
-
id:
|
|
32831
|
-
slug:
|
|
32832
|
-
contentTypeSlug:
|
|
33014
|
+
contentEntrySchema = z49.object({
|
|
33015
|
+
id: z49.string(),
|
|
33016
|
+
slug: z49.string(),
|
|
33017
|
+
contentTypeSlug: z49.string()
|
|
32833
33018
|
});
|
|
32834
|
-
eventRegistrationPublicEventSchema =
|
|
33019
|
+
eventRegistrationPublicEventSchema = z49.preprocess(
|
|
32835
33020
|
normalizeEventRegistrationEventInput,
|
|
32836
33021
|
publicEventSchema
|
|
32837
33022
|
);
|
|
32838
|
-
eventRegistrationSourceSchema =
|
|
32839
|
-
siteId:
|
|
32840
|
-
apiBaseUrl:
|
|
32841
|
-
portalToken:
|
|
32842
|
-
previewToken:
|
|
33023
|
+
eventRegistrationSourceSchema = z49.object({
|
|
33024
|
+
siteId: z49.string().optional(),
|
|
33025
|
+
apiBaseUrl: z49.string().optional(),
|
|
33026
|
+
portalToken: z49.string().nullable().optional(),
|
|
33027
|
+
previewToken: z49.string().nullable().optional(),
|
|
32843
33028
|
occurrenceContext: occurrenceContextSchema.optional(),
|
|
32844
33029
|
contentEntry: contentEntrySchema.nullable().optional(),
|
|
32845
|
-
events:
|
|
32846
|
-
className:
|
|
32847
|
-
buttonText:
|
|
32848
|
-
maxTickets:
|
|
32849
|
-
showVenue:
|
|
32850
|
-
showCapacity:
|
|
32851
|
-
successMessage:
|
|
32852
|
-
waitlistMessage:
|
|
33030
|
+
events: z49.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
33031
|
+
className: z49.string().nullable().optional(),
|
|
33032
|
+
buttonText: z49.string().nullable().optional(),
|
|
33033
|
+
maxTickets: z49.string().nullable().optional(),
|
|
33034
|
+
showVenue: z49.boolean().optional(),
|
|
33035
|
+
showCapacity: z49.boolean().optional(),
|
|
33036
|
+
successMessage: z49.string().optional(),
|
|
33037
|
+
waitlistMessage: z49.string().optional(),
|
|
32853
33038
|
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
32854
|
-
|
|
33039
|
+
overlayEnabled: z49.boolean().optional(),
|
|
33040
|
+
spamProtectionEnabled: z49.boolean().optional(),
|
|
32855
33041
|
stage: previewStageSchema.optional(),
|
|
32856
|
-
supportEmail:
|
|
32857
|
-
});
|
|
32858
|
-
eventRegistrationDisplaySchema =
|
|
32859
|
-
kind:
|
|
32860
|
-
state:
|
|
32861
|
-
className:
|
|
32862
|
-
titleText:
|
|
32863
|
-
bodyText:
|
|
32864
|
-
stepLabels:
|
|
32865
|
-
summaryButtonText:
|
|
32866
|
-
});
|
|
32867
|
-
eventRegistrationHydrationSchema =
|
|
33042
|
+
supportEmail: z49.string().optional()
|
|
33043
|
+
});
|
|
33044
|
+
eventRegistrationDisplaySchema = z49.object({
|
|
33045
|
+
kind: z49.literal("event-registration"),
|
|
33046
|
+
state: z49.literal("generic-shell"),
|
|
33047
|
+
className: z49.string().nullable(),
|
|
33048
|
+
titleText: z49.string(),
|
|
33049
|
+
bodyText: z49.string(),
|
|
33050
|
+
stepLabels: z49.array(z49.enum(EVENT_REGISTRATION_SHELL_STEP_LABELS)).min(1),
|
|
33051
|
+
summaryButtonText: z49.string()
|
|
33052
|
+
});
|
|
33053
|
+
eventRegistrationHydrationSchema = z49.object({
|
|
32868
33054
|
occurrenceContext: occurrenceContextSchema.optional(),
|
|
32869
33055
|
contentEntry: contentEntrySchema.nullable().optional(),
|
|
32870
|
-
events:
|
|
32871
|
-
maxTickets:
|
|
32872
|
-
showVenue:
|
|
32873
|
-
showCapacity:
|
|
32874
|
-
successMessage:
|
|
32875
|
-
waitlistMessage:
|
|
33056
|
+
events: z49.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
33057
|
+
maxTickets: z49.string().optional(),
|
|
33058
|
+
showVenue: z49.boolean().optional(),
|
|
33059
|
+
showCapacity: z49.boolean().optional(),
|
|
33060
|
+
successMessage: z49.string().optional(),
|
|
33061
|
+
waitlistMessage: z49.string().optional(),
|
|
32876
33062
|
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
32877
|
-
|
|
32878
|
-
|
|
33063
|
+
overlayEnabled: z49.boolean().optional(),
|
|
33064
|
+
spamProtectionEnabled: z49.boolean().optional(),
|
|
33065
|
+
supportEmail: z49.string().optional()
|
|
32879
33066
|
});
|
|
32880
|
-
eventRegistrationRenderSchema =
|
|
33067
|
+
eventRegistrationRenderSchema = z49.object({
|
|
32881
33068
|
display: eventRegistrationDisplaySchema,
|
|
32882
33069
|
hydration: eventRegistrationHydrationSchema
|
|
32883
33070
|
});
|
|
32884
|
-
eventRegistrationIslandMetaCodec = createZodCodec(
|
|
32885
|
-
siteId:
|
|
32886
|
-
apiBaseUrl:
|
|
32887
|
-
portalToken:
|
|
32888
|
-
previewToken:
|
|
33071
|
+
eventRegistrationIslandMetaCodec = createZodCodec(z49.object({
|
|
33072
|
+
siteId: z49.string().optional(),
|
|
33073
|
+
apiBaseUrl: z49.string().optional(),
|
|
33074
|
+
portalToken: z49.string().nullable().optional(),
|
|
33075
|
+
previewToken: z49.string().nullable().optional(),
|
|
32889
33076
|
stage: previewStageSchema.optional()
|
|
32890
33077
|
}));
|
|
32891
33078
|
eventRegistrationIslandMetaKeys = defineInteractiveIslandMetaKeys(
|
|
@@ -32913,6 +33100,7 @@ var init_event_registration_interactive = __esm({
|
|
|
32913
33100
|
successMessage: source.successMessage,
|
|
32914
33101
|
waitlistMessage: source.waitlistMessage,
|
|
32915
33102
|
buttonVariant: source.buttonVariant,
|
|
33103
|
+
overlayEnabled: source.overlayEnabled,
|
|
32916
33104
|
spamProtectionEnabled: source.spamProtectionEnabled,
|
|
32917
33105
|
supportEmail: source.supportEmail
|
|
32918
33106
|
}
|
|
@@ -32935,7 +33123,7 @@ var init_event_registration_interactive = __esm({
|
|
|
32935
33123
|
});
|
|
32936
33124
|
|
|
32937
33125
|
// ../blocks/src/system/blocks/event-registration.ts
|
|
32938
|
-
import { z as
|
|
33126
|
+
import { z as z50 } from "zod";
|
|
32939
33127
|
var eventRegistrationManifest, eventRegistrationBlockDefinition;
|
|
32940
33128
|
var init_event_registration = __esm({
|
|
32941
33129
|
"../blocks/src/system/blocks/event-registration.ts"() {
|
|
@@ -33092,6 +33280,12 @@ var init_event_registration = __esm({
|
|
|
33092
33280
|
buttonVariant: {
|
|
33093
33281
|
$bind: { from: "content.buttonVariant", fallback: "primary" }
|
|
33094
33282
|
},
|
|
33283
|
+
overlayEnabled: {
|
|
33284
|
+
$bind: {
|
|
33285
|
+
from: "$root.eventRegistrationOverlayEnabled",
|
|
33286
|
+
fallback: false
|
|
33287
|
+
}
|
|
33288
|
+
},
|
|
33095
33289
|
// Event data from loader
|
|
33096
33290
|
events: { $bind: { from: "data.events" } },
|
|
33097
33291
|
// Stage for preview mode (allows registering for draft events)
|
|
@@ -33112,7 +33306,7 @@ var init_event_registration = __esm({
|
|
|
33112
33306
|
manifest: eventRegistrationManifest,
|
|
33113
33307
|
runtime: eventRegistrationBlockRuntime,
|
|
33114
33308
|
dataSchemas: {
|
|
33115
|
-
events:
|
|
33309
|
+
events: z50.array(publicEventSchema).optional(),
|
|
33116
33310
|
occurrenceContext: occurrenceContextSchema.optional()
|
|
33117
33311
|
},
|
|
33118
33312
|
dataLoaders: {
|
|
@@ -33162,7 +33356,7 @@ var init_shared4 = __esm({
|
|
|
33162
33356
|
});
|
|
33163
33357
|
|
|
33164
33358
|
// ../blocks/src/system/runtime/nodes/course-registration.interactive.ts
|
|
33165
|
-
import { z as
|
|
33359
|
+
import { z as z51 } from "zod";
|
|
33166
33360
|
function buildCourseRegistrationDisplay(source) {
|
|
33167
33361
|
return {
|
|
33168
33362
|
kind: "course-registration",
|
|
@@ -33180,72 +33374,72 @@ var init_course_registration_interactive = __esm({
|
|
|
33180
33374
|
init_islands();
|
|
33181
33375
|
init_runtime();
|
|
33182
33376
|
init_contract_schemas();
|
|
33183
|
-
contentEntrySchema2 =
|
|
33184
|
-
id:
|
|
33185
|
-
slug:
|
|
33186
|
-
contentTypeSlug:
|
|
33187
|
-
});
|
|
33188
|
-
courseEntrySubrouteContextSchema =
|
|
33189
|
-
|
|
33190
|
-
kind:
|
|
33191
|
-
run:
|
|
33192
|
-
courseId:
|
|
33193
|
-
seriesId:
|
|
33194
|
-
runSlug:
|
|
33195
|
-
runName:
|
|
33377
|
+
contentEntrySchema2 = z51.object({
|
|
33378
|
+
id: z51.string(),
|
|
33379
|
+
slug: z51.string(),
|
|
33380
|
+
contentTypeSlug: z51.string()
|
|
33381
|
+
});
|
|
33382
|
+
courseEntrySubrouteContextSchema = z51.union([
|
|
33383
|
+
z51.object({
|
|
33384
|
+
kind: z51.literal("course-run"),
|
|
33385
|
+
run: z51.object({
|
|
33386
|
+
courseId: z51.string(),
|
|
33387
|
+
seriesId: z51.string(),
|
|
33388
|
+
runSlug: z51.string(),
|
|
33389
|
+
runName: z51.string().nullable()
|
|
33196
33390
|
})
|
|
33197
33391
|
}),
|
|
33198
|
-
|
|
33199
|
-
kind:
|
|
33392
|
+
z51.object({
|
|
33393
|
+
kind: z51.literal("event-occurrence"),
|
|
33200
33394
|
occurrence: occurrenceContextSchema
|
|
33201
33395
|
})
|
|
33202
33396
|
]);
|
|
33203
|
-
courseRegistrationSourceSchema =
|
|
33204
|
-
siteId:
|
|
33205
|
-
apiBaseUrl:
|
|
33206
|
-
portalToken:
|
|
33397
|
+
courseRegistrationSourceSchema = z51.object({
|
|
33398
|
+
siteId: z51.string().optional(),
|
|
33399
|
+
apiBaseUrl: z51.string().optional(),
|
|
33400
|
+
portalToken: z51.string().nullable().optional(),
|
|
33207
33401
|
contentEntry: contentEntrySchema2.nullable().optional(),
|
|
33208
33402
|
entrySubrouteContext: courseEntrySubrouteContextSchema.nullable().optional(),
|
|
33209
|
-
courses:
|
|
33210
|
-
className:
|
|
33211
|
-
showSessions:
|
|
33212
|
-
showPrice:
|
|
33213
|
-
showCapacity:
|
|
33214
|
-
showVenue:
|
|
33215
|
-
successMessage:
|
|
33216
|
-
waitlistMessage:
|
|
33217
|
-
membershipMessage:
|
|
33218
|
-
buttonText:
|
|
33403
|
+
courses: z51.array(publicCourseSchema).nullable().optional(),
|
|
33404
|
+
className: z51.string().nullable().optional(),
|
|
33405
|
+
showSessions: z51.boolean().optional(),
|
|
33406
|
+
showPrice: z51.boolean().optional(),
|
|
33407
|
+
showCapacity: z51.boolean().optional(),
|
|
33408
|
+
showVenue: z51.boolean().optional(),
|
|
33409
|
+
successMessage: z51.string().optional(),
|
|
33410
|
+
waitlistMessage: z51.string().optional(),
|
|
33411
|
+
membershipMessage: z51.string().optional(),
|
|
33412
|
+
buttonText: z51.string().nullable().optional(),
|
|
33219
33413
|
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
33220
33414
|
stage: previewStageSchema.optional()
|
|
33221
33415
|
});
|
|
33222
|
-
courseRegistrationDisplaySchema =
|
|
33223
|
-
kind:
|
|
33224
|
-
state:
|
|
33225
|
-
className:
|
|
33226
|
-
summaryButtonText:
|
|
33416
|
+
courseRegistrationDisplaySchema = z51.object({
|
|
33417
|
+
kind: z51.literal("course-registration"),
|
|
33418
|
+
state: z51.literal("shell"),
|
|
33419
|
+
className: z51.string().nullable(),
|
|
33420
|
+
summaryButtonText: z51.string()
|
|
33227
33421
|
});
|
|
33228
|
-
courseRegistrationHydrationSchema =
|
|
33422
|
+
courseRegistrationHydrationSchema = z51.object({
|
|
33229
33423
|
contentEntry: contentEntrySchema2.nullable().optional(),
|
|
33230
33424
|
entrySubrouteContext: courseEntrySubrouteContextSchema.nullable().optional(),
|
|
33231
|
-
courses:
|
|
33232
|
-
showSessions:
|
|
33233
|
-
showPrice:
|
|
33234
|
-
showCapacity:
|
|
33235
|
-
showVenue:
|
|
33236
|
-
successMessage:
|
|
33237
|
-
waitlistMessage:
|
|
33238
|
-
membershipMessage:
|
|
33425
|
+
courses: z51.array(publicCourseSchema).nullable().optional(),
|
|
33426
|
+
showSessions: z51.boolean().optional(),
|
|
33427
|
+
showPrice: z51.boolean().optional(),
|
|
33428
|
+
showCapacity: z51.boolean().optional(),
|
|
33429
|
+
showVenue: z51.boolean().optional(),
|
|
33430
|
+
successMessage: z51.string().optional(),
|
|
33431
|
+
waitlistMessage: z51.string().optional(),
|
|
33432
|
+
membershipMessage: z51.string().optional(),
|
|
33239
33433
|
buttonVariant: registrationButtonVariantSchema.optional()
|
|
33240
33434
|
});
|
|
33241
|
-
courseRegistrationRenderSchema =
|
|
33435
|
+
courseRegistrationRenderSchema = z51.object({
|
|
33242
33436
|
display: courseRegistrationDisplaySchema,
|
|
33243
33437
|
hydration: courseRegistrationHydrationSchema
|
|
33244
33438
|
});
|
|
33245
|
-
courseRegistrationIslandMetaCodec = createZodCodec(
|
|
33246
|
-
siteId:
|
|
33247
|
-
apiBaseUrl:
|
|
33248
|
-
portalToken:
|
|
33439
|
+
courseRegistrationIslandMetaCodec = createZodCodec(z51.object({
|
|
33440
|
+
siteId: z51.string().optional(),
|
|
33441
|
+
apiBaseUrl: z51.string().optional(),
|
|
33442
|
+
portalToken: z51.string().nullable().optional(),
|
|
33249
33443
|
stage: previewStageSchema.optional()
|
|
33250
33444
|
}));
|
|
33251
33445
|
courseRegistrationIslandMetaKeys = defineInteractiveIslandMetaKeys(
|
|
@@ -33513,39 +33707,39 @@ var init_course_registration = __esm({
|
|
|
33513
33707
|
});
|
|
33514
33708
|
|
|
33515
33709
|
// ../blocks/src/system/blocks/shop.shared.ts
|
|
33516
|
-
import { z as
|
|
33710
|
+
import { z as z52 } from "zod";
|
|
33517
33711
|
var publicPassProductSchema, publicMembershipProductSchema;
|
|
33518
33712
|
var init_shop_shared = __esm({
|
|
33519
33713
|
"../blocks/src/system/blocks/shop.shared.ts"() {
|
|
33520
33714
|
"use strict";
|
|
33521
|
-
publicPassProductSchema =
|
|
33522
|
-
id:
|
|
33523
|
-
productUseCase:
|
|
33524
|
-
name:
|
|
33525
|
-
description:
|
|
33526
|
-
price:
|
|
33527
|
-
currency:
|
|
33528
|
-
creditsTotal:
|
|
33529
|
-
pricePerCredit:
|
|
33530
|
-
validDays:
|
|
33531
|
-
eligibleCategoryIds:
|
|
33532
|
-
eligibleCategoryNames:
|
|
33533
|
-
});
|
|
33534
|
-
publicMembershipProductSchema =
|
|
33535
|
-
id:
|
|
33536
|
-
name:
|
|
33537
|
-
description:
|
|
33538
|
-
price:
|
|
33539
|
-
currency:
|
|
33540
|
-
billingInterval:
|
|
33541
|
-
eligibleCategoryIds:
|
|
33542
|
-
eligibleCategoryNames:
|
|
33715
|
+
publicPassProductSchema = z52.object({
|
|
33716
|
+
id: z52.string(),
|
|
33717
|
+
productUseCase: z52.enum(["event_pass", "appointment_package"]).default("event_pass"),
|
|
33718
|
+
name: z52.string(),
|
|
33719
|
+
description: z52.string().nullable(),
|
|
33720
|
+
price: z52.number(),
|
|
33721
|
+
currency: z52.string(),
|
|
33722
|
+
creditsTotal: z52.number(),
|
|
33723
|
+
pricePerCredit: z52.number(),
|
|
33724
|
+
validDays: z52.number().nullable(),
|
|
33725
|
+
eligibleCategoryIds: z52.array(z52.string()),
|
|
33726
|
+
eligibleCategoryNames: z52.array(z52.string())
|
|
33727
|
+
});
|
|
33728
|
+
publicMembershipProductSchema = z52.object({
|
|
33729
|
+
id: z52.string(),
|
|
33730
|
+
name: z52.string(),
|
|
33731
|
+
description: z52.string().nullable(),
|
|
33732
|
+
price: z52.number(),
|
|
33733
|
+
currency: z52.string(),
|
|
33734
|
+
billingInterval: z52.enum(["month", "year"]),
|
|
33735
|
+
eligibleCategoryIds: z52.array(z52.string()),
|
|
33736
|
+
eligibleCategoryNames: z52.array(z52.string())
|
|
33543
33737
|
});
|
|
33544
33738
|
}
|
|
33545
33739
|
});
|
|
33546
33740
|
|
|
33547
33741
|
// ../blocks/src/system/blocks/event-details.ts
|
|
33548
|
-
import { z as
|
|
33742
|
+
import { z as z53 } from "zod";
|
|
33549
33743
|
var eventDetailsManifest, occurrenceContextSchema2, eventAutoApplyDiscountPreviewBaseSchema, eventAutoApplyDiscountPreviewSchema, eventDetailsBlockDefinition;
|
|
33550
33744
|
var init_event_details = __esm({
|
|
33551
33745
|
"../blocks/src/system/blocks/event-details.ts"() {
|
|
@@ -33688,40 +33882,40 @@ var init_event_details = __esm({
|
|
|
33688
33882
|
})
|
|
33689
33883
|
]
|
|
33690
33884
|
});
|
|
33691
|
-
occurrenceContextSchema2 =
|
|
33692
|
-
id:
|
|
33693
|
-
seriesId:
|
|
33694
|
-
startsAt:
|
|
33695
|
-
endsAt:
|
|
33696
|
-
timeZone:
|
|
33697
|
-
capacityOverride:
|
|
33698
|
-
overrides:
|
|
33885
|
+
occurrenceContextSchema2 = z53.object({
|
|
33886
|
+
id: z53.string(),
|
|
33887
|
+
seriesId: z53.string(),
|
|
33888
|
+
startsAt: z53.string(),
|
|
33889
|
+
endsAt: z53.string(),
|
|
33890
|
+
timeZone: z53.string(),
|
|
33891
|
+
capacityOverride: z53.number().nullable().optional(),
|
|
33892
|
+
overrides: z53.record(z53.string(), z53.unknown()).nullable().optional()
|
|
33699
33893
|
}).nullable();
|
|
33700
|
-
eventAutoApplyDiscountPreviewBaseSchema =
|
|
33701
|
-
id:
|
|
33702
|
-
publicLabel:
|
|
33703
|
-
description:
|
|
33704
|
-
minTicketsRequired:
|
|
33894
|
+
eventAutoApplyDiscountPreviewBaseSchema = z53.object({
|
|
33895
|
+
id: z53.string(),
|
|
33896
|
+
publicLabel: z53.string(),
|
|
33897
|
+
description: z53.string().nullable(),
|
|
33898
|
+
minTicketsRequired: z53.number().nullable()
|
|
33705
33899
|
});
|
|
33706
|
-
eventAutoApplyDiscountPreviewSchema =
|
|
33900
|
+
eventAutoApplyDiscountPreviewSchema = z53.discriminatedUnion("discountType", [
|
|
33707
33901
|
eventAutoApplyDiscountPreviewBaseSchema.extend({
|
|
33708
|
-
discountType:
|
|
33709
|
-
discountPercent:
|
|
33710
|
-
discountAmountCents:
|
|
33902
|
+
discountType: z53.literal("percent"),
|
|
33903
|
+
discountPercent: z53.number(),
|
|
33904
|
+
discountAmountCents: z53.null()
|
|
33711
33905
|
}),
|
|
33712
33906
|
eventAutoApplyDiscountPreviewBaseSchema.extend({
|
|
33713
|
-
discountType:
|
|
33714
|
-
discountPercent:
|
|
33715
|
-
discountAmountCents:
|
|
33907
|
+
discountType: z53.literal("fixed"),
|
|
33908
|
+
discountPercent: z53.null(),
|
|
33909
|
+
discountAmountCents: z53.number()
|
|
33716
33910
|
})
|
|
33717
33911
|
]);
|
|
33718
33912
|
eventDetailsBlockDefinition = {
|
|
33719
33913
|
manifest: eventDetailsManifest,
|
|
33720
33914
|
dataSchemas: {
|
|
33721
|
-
eventDetailsData:
|
|
33915
|
+
eventDetailsData: z53.object({
|
|
33722
33916
|
events: publicEventsArraySchema,
|
|
33723
|
-
sitePasses:
|
|
33724
|
-
siteMemberships:
|
|
33917
|
+
sitePasses: z53.object({ passes: z53.array(publicPassProductSchema) }),
|
|
33918
|
+
siteMemberships: z53.object({ memberships: z53.array(publicMembershipProductSchema) }),
|
|
33725
33919
|
autoApplyDiscount: eventAutoApplyDiscountPreviewSchema.nullable().optional().default(null)
|
|
33726
33920
|
}).optional(),
|
|
33727
33921
|
occurrenceContext: occurrenceContextSchema2.optional()
|
|
@@ -34205,7 +34399,7 @@ var init_shared5 = __esm({
|
|
|
34205
34399
|
});
|
|
34206
34400
|
|
|
34207
34401
|
// ../blocks/src/system/runtime/nodes/events/shared/listOptions.ts
|
|
34208
|
-
import { z as
|
|
34402
|
+
import { z as z54 } from "zod";
|
|
34209
34403
|
function resolveEventPageSize(value, fallback = 12) {
|
|
34210
34404
|
const candidate = typeof value === "number" ? value : typeof value === "string" && value.trim() !== "" ? Number(value.trim()) : null;
|
|
34211
34405
|
return candidate != null && Number.isInteger(candidate) && eventPageSizeSet.has(candidate) ? candidate : fallback;
|
|
@@ -34226,32 +34420,32 @@ var init_listOptions = __esm({
|
|
|
34226
34420
|
"../blocks/src/system/runtime/nodes/events/shared/listOptions.ts"() {
|
|
34227
34421
|
"use strict";
|
|
34228
34422
|
eventPageSizeValues = [3, 6, 10, 12, 20, 24, 30];
|
|
34229
|
-
eventPageSizeSchema =
|
|
34230
|
-
|
|
34231
|
-
|
|
34232
|
-
|
|
34233
|
-
|
|
34234
|
-
|
|
34235
|
-
|
|
34236
|
-
|
|
34423
|
+
eventPageSizeSchema = z54.union([
|
|
34424
|
+
z54.literal(3),
|
|
34425
|
+
z54.literal(6),
|
|
34426
|
+
z54.literal(10),
|
|
34427
|
+
z54.literal(12),
|
|
34428
|
+
z54.literal(20),
|
|
34429
|
+
z54.literal(24),
|
|
34430
|
+
z54.literal(30)
|
|
34237
34431
|
]);
|
|
34238
34432
|
eventPageSizeSet = new Set(eventPageSizeValues);
|
|
34239
|
-
eventListPaginationActionSchema =
|
|
34240
|
-
|
|
34241
|
-
kind:
|
|
34242
|
-
label:
|
|
34433
|
+
eventListPaginationActionSchema = z54.discriminatedUnion("kind", [
|
|
34434
|
+
z54.object({
|
|
34435
|
+
kind: z54.literal("loadMore"),
|
|
34436
|
+
label: z54.string()
|
|
34243
34437
|
}),
|
|
34244
|
-
|
|
34245
|
-
kind:
|
|
34246
|
-
label:
|
|
34247
|
-
href:
|
|
34438
|
+
z54.object({
|
|
34439
|
+
kind: z54.literal("seeAllLink"),
|
|
34440
|
+
label: z54.string(),
|
|
34441
|
+
href: z54.string()
|
|
34248
34442
|
})
|
|
34249
34443
|
]);
|
|
34250
34444
|
}
|
|
34251
34445
|
});
|
|
34252
34446
|
|
|
34253
34447
|
// ../blocks/src/system/runtime/nodes/events/EventListing.interactive.ts
|
|
34254
|
-
import { z as
|
|
34448
|
+
import { z as z55 } from "zod";
|
|
34255
34449
|
var legacyEventCardVariantSchema, eventCardVariantInputSchema, cardOrientationSchema, eventBlockKindSchema, eventSurfaceScopeSchema, eventScheduleScopeSchema2, eventListingSourceSchema, eventListingDisplaySchema, eventListingHydrationSchema, eventListingRenderSchema, eventListingIslandMetaCodec, eventListingBlockRuntime, eventListingIslandMetaKeys, eventListingInteractiveIslandPropsCodec;
|
|
34256
34450
|
var init_EventListing_interactive = __esm({
|
|
34257
34451
|
"../blocks/src/system/runtime/nodes/events/EventListing.interactive.ts"() {
|
|
@@ -34264,89 +34458,89 @@ var init_EventListing_interactive = __esm({
|
|
|
34264
34458
|
init_shared5();
|
|
34265
34459
|
init_contract_schemas();
|
|
34266
34460
|
init_listOptions();
|
|
34267
|
-
legacyEventCardVariantSchema =
|
|
34268
|
-
eventCardVariantInputSchema =
|
|
34461
|
+
legacyEventCardVariantSchema = z55.enum(["variant1", "variant2"]);
|
|
34462
|
+
eventCardVariantInputSchema = z55.union([
|
|
34269
34463
|
cardVariantRoleSchema,
|
|
34270
34464
|
legacyEventCardVariantSchema
|
|
34271
34465
|
]);
|
|
34272
|
-
cardOrientationSchema =
|
|
34273
|
-
eventBlockKindSchema =
|
|
34274
|
-
eventSurfaceScopeSchema =
|
|
34275
|
-
eventScheduleScopeSchema2 =
|
|
34276
|
-
eventListingSourceSchema =
|
|
34277
|
-
events:
|
|
34278
|
-
siteId:
|
|
34279
|
-
apiBaseUrl:
|
|
34466
|
+
cardOrientationSchema = z55.enum(["vertical", "horizontal"]);
|
|
34467
|
+
eventBlockKindSchema = z55.enum(eventBlockKindValues);
|
|
34468
|
+
eventSurfaceScopeSchema = z55.enum(eventSurfaceScopeValues);
|
|
34469
|
+
eventScheduleScopeSchema2 = z55.enum(eventScheduleScopeValues);
|
|
34470
|
+
eventListingSourceSchema = z55.object({
|
|
34471
|
+
events: z55.array(publicEventSchema).nullable().optional(),
|
|
34472
|
+
siteId: z55.string(),
|
|
34473
|
+
apiBaseUrl: z55.string().optional(),
|
|
34280
34474
|
stage: previewStageSchema.optional(),
|
|
34281
34475
|
layout: eventLayoutSchema.optional(),
|
|
34282
34476
|
columns: columnOptionSchema.optional(),
|
|
34283
|
-
eventsPerPage:
|
|
34284
|
-
paginationMode:
|
|
34285
|
-
seeAllUrl:
|
|
34286
|
-
loadMoreText:
|
|
34477
|
+
eventsPerPage: z55.string().optional(),
|
|
34478
|
+
paginationMode: z55.enum(["loadMore", "seeAllLink"]).optional(),
|
|
34479
|
+
seeAllUrl: z55.string().optional(),
|
|
34480
|
+
loadMoreText: z55.string().optional(),
|
|
34287
34481
|
cardVariant: eventCardVariantInputSchema.optional(),
|
|
34288
34482
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
34289
|
-
buttonText:
|
|
34290
|
-
showVenue:
|
|
34291
|
-
showMap:
|
|
34292
|
-
showCapacity:
|
|
34293
|
-
emptyMessage:
|
|
34294
|
-
className:
|
|
34295
|
-
showFilters:
|
|
34483
|
+
buttonText: z55.string().optional(),
|
|
34484
|
+
showVenue: z55.boolean().optional(),
|
|
34485
|
+
showMap: z55.boolean().optional(),
|
|
34486
|
+
showCapacity: z55.boolean().optional(),
|
|
34487
|
+
emptyMessage: z55.string().optional(),
|
|
34488
|
+
className: z55.string().optional(),
|
|
34489
|
+
showFilters: z55.boolean().nullable().optional(),
|
|
34296
34490
|
showCategoryFilter: filterAutoShowSchema.optional(),
|
|
34297
|
-
showVenueFilter:
|
|
34298
|
-
showStaffFilter:
|
|
34491
|
+
showVenueFilter: z55.boolean().nullable().optional(),
|
|
34492
|
+
showStaffFilter: z55.boolean().nullable().optional(),
|
|
34299
34493
|
eventKind: eventBlockKindSchema.nullable().optional(),
|
|
34300
34494
|
eventSurface: eventSurfaceScopeSchema.nullable().optional(),
|
|
34301
|
-
filterEventPresets:
|
|
34495
|
+
filterEventPresets: z55.union([z55.string(), z55.array(z55.string())]).nullable().optional(),
|
|
34302
34496
|
scheduleScope: eventScheduleScopeSchema2.nullable().optional(),
|
|
34303
|
-
filterCategoryIds:
|
|
34304
|
-
filterStaffMemberId:
|
|
34305
|
-
filterVenueId:
|
|
34497
|
+
filterCategoryIds: z55.string().nullable().optional(),
|
|
34498
|
+
filterStaffMemberId: z55.string().nullable().optional(),
|
|
34499
|
+
filterVenueId: z55.string().nullable().optional()
|
|
34306
34500
|
});
|
|
34307
|
-
eventListingDisplaySchema =
|
|
34308
|
-
kind:
|
|
34309
|
-
state:
|
|
34501
|
+
eventListingDisplaySchema = z55.object({
|
|
34502
|
+
kind: z55.literal("event-listing"),
|
|
34503
|
+
state: z55.enum(["loading", "empty", "ready"]),
|
|
34310
34504
|
listLayout: eventLayoutSchema,
|
|
34311
|
-
className:
|
|
34312
|
-
emptyMessage:
|
|
34313
|
-
loadingMessage:
|
|
34314
|
-
containerClass:
|
|
34505
|
+
className: z55.string().nullable(),
|
|
34506
|
+
emptyMessage: z55.string(),
|
|
34507
|
+
loadingMessage: z55.string(),
|
|
34508
|
+
containerClass: z55.string(),
|
|
34315
34509
|
cardVariant: cardVariantRoleSchema,
|
|
34316
34510
|
buttonVariant: eventButtonVariantSchema,
|
|
34317
|
-
buttonText:
|
|
34318
|
-
showVenue:
|
|
34319
|
-
showMap:
|
|
34320
|
-
showCapacity:
|
|
34511
|
+
buttonText: z55.string(),
|
|
34512
|
+
showVenue: z55.boolean(),
|
|
34513
|
+
showMap: z55.boolean(),
|
|
34514
|
+
showCapacity: z55.boolean(),
|
|
34321
34515
|
orientation: cardOrientationSchema,
|
|
34322
|
-
events:
|
|
34516
|
+
events: z55.array(publicEventSchema)
|
|
34323
34517
|
});
|
|
34324
|
-
eventListingHydrationSchema =
|
|
34325
|
-
siteId:
|
|
34518
|
+
eventListingHydrationSchema = z55.object({
|
|
34519
|
+
siteId: z55.string(),
|
|
34326
34520
|
stage: previewStageSchema.optional(),
|
|
34327
34521
|
eventsPerPage: eventPageSizeSchema,
|
|
34328
34522
|
paginationAction: eventListPaginationActionSchema,
|
|
34329
|
-
showFilters:
|
|
34523
|
+
showFilters: z55.boolean(),
|
|
34330
34524
|
showCategoryFilter: filterAutoShowSchema,
|
|
34331
|
-
showVenueFilter:
|
|
34332
|
-
showStaffFilter:
|
|
34525
|
+
showVenueFilter: z55.boolean(),
|
|
34526
|
+
showStaffFilter: z55.boolean(),
|
|
34333
34527
|
eventKind: eventBlockKindSchema,
|
|
34334
34528
|
eventSurface: eventSurfaceScopeSchema,
|
|
34335
|
-
filterEventPresets:
|
|
34529
|
+
filterEventPresets: z55.string().nullable(),
|
|
34336
34530
|
scheduleScope: eventScheduleScopeSchema2,
|
|
34337
|
-
filterCategoryIds:
|
|
34338
|
-
filterStaffMemberId:
|
|
34339
|
-
filterVenueId:
|
|
34340
|
-
fetchInitialEventsOnMount:
|
|
34531
|
+
filterCategoryIds: z55.string().nullable().optional(),
|
|
34532
|
+
filterStaffMemberId: z55.string().nullable().optional(),
|
|
34533
|
+
filterVenueId: z55.string().nullable().optional(),
|
|
34534
|
+
fetchInitialEventsOnMount: z55.boolean()
|
|
34341
34535
|
});
|
|
34342
|
-
eventListingRenderSchema =
|
|
34536
|
+
eventListingRenderSchema = z55.object({
|
|
34343
34537
|
display: eventListingDisplaySchema,
|
|
34344
34538
|
hydration: eventListingHydrationSchema
|
|
34345
34539
|
});
|
|
34346
34540
|
eventListingIslandMetaCodec = createZodCodec(
|
|
34347
|
-
|
|
34348
|
-
siteId:
|
|
34349
|
-
apiBaseUrl:
|
|
34541
|
+
z55.object({
|
|
34542
|
+
siteId: z55.string(),
|
|
34543
|
+
apiBaseUrl: z55.string().optional(),
|
|
34350
34544
|
stage: previewStageSchema.optional()
|
|
34351
34545
|
})
|
|
34352
34546
|
);
|
|
@@ -34730,7 +34924,7 @@ var init_event_listing = __esm({
|
|
|
34730
34924
|
});
|
|
34731
34925
|
|
|
34732
34926
|
// ../blocks/src/system/runtime/nodes/events/EventCalendar.interactive.ts
|
|
34733
|
-
import { z as
|
|
34927
|
+
import { z as z56 } from "zod";
|
|
34734
34928
|
function buildEventCalendarDisplay(source) {
|
|
34735
34929
|
const listLayout = source.listLayout ?? source.layout ?? "stack";
|
|
34736
34930
|
return {
|
|
@@ -34783,14 +34977,14 @@ var init_EventCalendar_interactive = __esm({
|
|
|
34783
34977
|
init_runtime();
|
|
34784
34978
|
init_contract_schemas();
|
|
34785
34979
|
init_listOptions();
|
|
34786
|
-
eventBlockKindSchema2 =
|
|
34787
|
-
eventSurfaceScopeSchema2 =
|
|
34788
|
-
eventScheduleScopeSchema3 =
|
|
34789
|
-
eventCalendarSourceSchema =
|
|
34980
|
+
eventBlockKindSchema2 = z56.enum(eventBlockKindValues);
|
|
34981
|
+
eventSurfaceScopeSchema2 = z56.enum(eventSurfaceScopeValues);
|
|
34982
|
+
eventScheduleScopeSchema3 = z56.enum(eventScheduleScopeValues);
|
|
34983
|
+
eventCalendarSourceSchema = z56.object(
|
|
34790
34984
|
{
|
|
34791
|
-
events:
|
|
34792
|
-
siteId:
|
|
34793
|
-
apiBaseUrl:
|
|
34985
|
+
events: z56.array(publicEventSchema).nullable().optional(),
|
|
34986
|
+
siteId: z56.string(),
|
|
34987
|
+
apiBaseUrl: z56.string().optional(),
|
|
34794
34988
|
stage: previewStageSchema.optional(),
|
|
34795
34989
|
variant: eventCalendarDisplayModeSchema.nullable().optional(),
|
|
34796
34990
|
displayMode: eventCalendarDisplayModeSchema.nullable().optional(),
|
|
@@ -34798,78 +34992,78 @@ var init_EventCalendar_interactive = __esm({
|
|
|
34798
34992
|
listColumns: columnOptionSchema.optional(),
|
|
34799
34993
|
layout: eventLayoutSchema.optional(),
|
|
34800
34994
|
columns: columnOptionSchema.optional(),
|
|
34801
|
-
eventsPerPage:
|
|
34802
|
-
paginationMode:
|
|
34803
|
-
seeAllUrl:
|
|
34804
|
-
loadMoreText:
|
|
34995
|
+
eventsPerPage: z56.string().optional(),
|
|
34996
|
+
paginationMode: z56.enum(["loadMore", "seeAllLink"]).optional(),
|
|
34997
|
+
seeAllUrl: z56.string().optional(),
|
|
34998
|
+
loadMoreText: z56.string().optional(),
|
|
34805
34999
|
startOfWeek: weekStartSchema.optional(),
|
|
34806
35000
|
calendarTabViews: calendarTabViewsSchema.optional(),
|
|
34807
|
-
showFilters:
|
|
35001
|
+
showFilters: z56.boolean().nullable().optional(),
|
|
34808
35002
|
showCategoryFilter: filterAutoShowSchema.optional(),
|
|
34809
|
-
showVenueFilter:
|
|
34810
|
-
showStaffFilter:
|
|
35003
|
+
showVenueFilter: z56.boolean().nullable().optional(),
|
|
35004
|
+
showStaffFilter: z56.boolean().nullable().optional(),
|
|
34811
35005
|
kind: eventBlockKindSchema2.nullable().optional(),
|
|
34812
35006
|
eventSurface: eventSurfaceScopeSchema2.nullable().optional(),
|
|
34813
|
-
filterEventPresets:
|
|
35007
|
+
filterEventPresets: z56.union([z56.string(), z56.array(z56.string())]).nullable().optional(),
|
|
34814
35008
|
scheduleScope: eventScheduleScopeSchema3.nullable().optional(),
|
|
34815
|
-
filterCategoryIds:
|
|
34816
|
-
filterStaffMemberId:
|
|
34817
|
-
filterVenueId:
|
|
35009
|
+
filterCategoryIds: z56.union([z56.string(), z56.array(z56.string())]).nullable().optional(),
|
|
35010
|
+
filterStaffMemberId: z56.string().nullable().optional(),
|
|
35011
|
+
filterVenueId: z56.string().nullable().optional(),
|
|
34818
35012
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
34819
|
-
buttonText:
|
|
34820
|
-
showVenue:
|
|
34821
|
-
showMap:
|
|
34822
|
-
showCapacity:
|
|
34823
|
-
emptyMessage:
|
|
34824
|
-
className:
|
|
35013
|
+
buttonText: z56.string().optional(),
|
|
35014
|
+
showVenue: z56.boolean().nullable().optional(),
|
|
35015
|
+
showMap: z56.boolean().nullable().optional(),
|
|
35016
|
+
showCapacity: z56.boolean().nullable().optional(),
|
|
35017
|
+
emptyMessage: z56.string().optional(),
|
|
35018
|
+
className: z56.string().optional()
|
|
34825
35019
|
}
|
|
34826
35020
|
);
|
|
34827
|
-
eventCalendarDisplaySchema =
|
|
34828
|
-
kind:
|
|
35021
|
+
eventCalendarDisplaySchema = z56.object({
|
|
35022
|
+
kind: z56.literal("event-calendar"),
|
|
34829
35023
|
displayMode: eventCalendarDisplayModeSchema,
|
|
34830
|
-
className:
|
|
34831
|
-
events:
|
|
35024
|
+
className: z56.string().nullable(),
|
|
35025
|
+
events: z56.array(publicEventSchema),
|
|
34832
35026
|
listLayout: eventLayoutSchema,
|
|
34833
35027
|
listColumns: columnOptionSchema,
|
|
34834
35028
|
eventsPerPage: eventPageSizeSchema,
|
|
34835
35029
|
paginationAction: eventListPaginationActionSchema,
|
|
34836
35030
|
startOfWeek: weekStartSchema,
|
|
34837
35031
|
calendarTabViews: calendarTabViewsSchema,
|
|
34838
|
-
showFilters:
|
|
35032
|
+
showFilters: z56.boolean(),
|
|
34839
35033
|
showCategoryFilter: filterAutoShowSchema,
|
|
34840
|
-
showVenueFilter:
|
|
34841
|
-
showStaffFilter:
|
|
35034
|
+
showVenueFilter: z56.boolean(),
|
|
35035
|
+
showStaffFilter: z56.boolean(),
|
|
34842
35036
|
eventKind: eventBlockKindSchema2,
|
|
34843
35037
|
eventSurface: eventSurfaceScopeSchema2,
|
|
34844
|
-
filterEventPresets:
|
|
35038
|
+
filterEventPresets: z56.string().nullable(),
|
|
34845
35039
|
scheduleScope: eventScheduleScopeSchema3,
|
|
34846
|
-
filterCategoryIds:
|
|
34847
|
-
filterStaffMemberId:
|
|
34848
|
-
filterVenueId:
|
|
35040
|
+
filterCategoryIds: z56.string().nullable(),
|
|
35041
|
+
filterStaffMemberId: z56.string().nullable(),
|
|
35042
|
+
filterVenueId: z56.string().nullable(),
|
|
34849
35043
|
buttonVariant: eventButtonVariantSchema,
|
|
34850
|
-
buttonText:
|
|
34851
|
-
showVenue:
|
|
34852
|
-
showMap:
|
|
34853
|
-
showCapacity:
|
|
34854
|
-
emptyMessage:
|
|
34855
|
-
});
|
|
34856
|
-
eventCalendarHydrationSchema =
|
|
34857
|
-
siteId:
|
|
35044
|
+
buttonText: z56.string(),
|
|
35045
|
+
showVenue: z56.boolean(),
|
|
35046
|
+
showMap: z56.boolean(),
|
|
35047
|
+
showCapacity: z56.boolean(),
|
|
35048
|
+
emptyMessage: z56.string()
|
|
35049
|
+
});
|
|
35050
|
+
eventCalendarHydrationSchema = z56.object({
|
|
35051
|
+
siteId: z56.string(),
|
|
34858
35052
|
stage: previewStageSchema.optional(),
|
|
34859
|
-
prefetchedEvents:
|
|
35053
|
+
prefetchedEvents: z56.boolean(),
|
|
34860
35054
|
eventKind: eventBlockKindSchema2,
|
|
34861
35055
|
eventSurface: eventSurfaceScopeSchema2,
|
|
34862
|
-
filterEventPresets:
|
|
35056
|
+
filterEventPresets: z56.string().nullable(),
|
|
34863
35057
|
scheduleScope: eventScheduleScopeSchema3
|
|
34864
35058
|
});
|
|
34865
|
-
eventCalendarRenderSchema =
|
|
35059
|
+
eventCalendarRenderSchema = z56.object({
|
|
34866
35060
|
display: eventCalendarDisplaySchema,
|
|
34867
35061
|
hydration: eventCalendarHydrationSchema
|
|
34868
35062
|
});
|
|
34869
35063
|
eventCalendarIslandMetaCodec = createZodCodec(
|
|
34870
|
-
|
|
34871
|
-
siteId:
|
|
34872
|
-
apiBaseUrl:
|
|
35064
|
+
z56.object({
|
|
35065
|
+
siteId: z56.string(),
|
|
35066
|
+
apiBaseUrl: z56.string().optional(),
|
|
34873
35067
|
stage: previewStageSchema.optional()
|
|
34874
35068
|
})
|
|
34875
35069
|
);
|
|
@@ -35661,7 +35855,7 @@ var init_model = __esm({
|
|
|
35661
35855
|
});
|
|
35662
35856
|
|
|
35663
35857
|
// ../blocks/src/system/blocks/offerings-preview/index.ts
|
|
35664
|
-
import { z as
|
|
35858
|
+
import { z as z57 } from "zod";
|
|
35665
35859
|
function eventPresetLoader(preset2) {
|
|
35666
35860
|
return {
|
|
35667
35861
|
endpoint: "listPublicEvents",
|
|
@@ -35784,13 +35978,13 @@ var init_offerings_preview = __esm({
|
|
|
35784
35978
|
init_shared3();
|
|
35785
35979
|
init_shared4();
|
|
35786
35980
|
init_model();
|
|
35787
|
-
publicRouteCandidatesSchema =
|
|
35788
|
-
routes:
|
|
35789
|
-
entityId:
|
|
35790
|
-
path:
|
|
35791
|
-
title:
|
|
35792
|
-
kind:
|
|
35793
|
-
contentTypeKey:
|
|
35981
|
+
publicRouteCandidatesSchema = z57.object({
|
|
35982
|
+
routes: z57.array(z57.object({
|
|
35983
|
+
entityId: z57.string(),
|
|
35984
|
+
path: z57.string(),
|
|
35985
|
+
title: z57.string(),
|
|
35986
|
+
kind: z57.enum(["page", "content"]),
|
|
35987
|
+
contentTypeKey: z57.string().nullable().optional()
|
|
35794
35988
|
}))
|
|
35795
35989
|
});
|
|
35796
35990
|
groupOverrideFields = [
|
|
@@ -36080,7 +36274,7 @@ var init_offerings_preview = __esm({
|
|
|
36080
36274
|
});
|
|
36081
36275
|
|
|
36082
36276
|
// ../blocks/src/system/blocks/embed.ts
|
|
36083
|
-
import { z as
|
|
36277
|
+
import { z as z58 } from "zod";
|
|
36084
36278
|
var embedFields, embedLayout2, embedManifest, embedEntrySchema, embedBlockDefinition;
|
|
36085
36279
|
var init_embed = __esm({
|
|
36086
36280
|
"../blocks/src/system/blocks/embed.ts"() {
|
|
@@ -36320,18 +36514,18 @@ var init_embed = __esm({
|
|
|
36320
36514
|
spacing: "lg"
|
|
36321
36515
|
}
|
|
36322
36516
|
});
|
|
36323
|
-
embedEntrySchema =
|
|
36324
|
-
id:
|
|
36325
|
-
identifier:
|
|
36326
|
-
title:
|
|
36327
|
-
slug:
|
|
36328
|
-
content:
|
|
36329
|
-
publishedAt:
|
|
36517
|
+
embedEntrySchema = z58.object({
|
|
36518
|
+
id: z58.string(),
|
|
36519
|
+
identifier: z58.string(),
|
|
36520
|
+
title: z58.string(),
|
|
36521
|
+
slug: z58.string().nullable().optional(),
|
|
36522
|
+
content: z58.record(z58.string(), z58.unknown()).optional(),
|
|
36523
|
+
publishedAt: z58.string().nullable().optional()
|
|
36330
36524
|
});
|
|
36331
36525
|
embedBlockDefinition = {
|
|
36332
36526
|
manifest: embedManifest,
|
|
36333
36527
|
dataSchemas: {
|
|
36334
|
-
entries:
|
|
36528
|
+
entries: z58.array(embedEntrySchema).optional()
|
|
36335
36529
|
},
|
|
36336
36530
|
dataLoaders: {
|
|
36337
36531
|
entries: {
|
|
@@ -37561,50 +37755,50 @@ var init_file_download = __esm({
|
|
|
37561
37755
|
});
|
|
37562
37756
|
|
|
37563
37757
|
// ../blocks/src/system/blocks/products/shared.ts
|
|
37564
|
-
import { z as
|
|
37758
|
+
import { z as z59 } from "zod";
|
|
37565
37759
|
var publicProductVariantSchema, publicProductSchema, publicProductsResponseSchema;
|
|
37566
37760
|
var init_shared6 = __esm({
|
|
37567
37761
|
"../blocks/src/system/blocks/products/shared.ts"() {
|
|
37568
37762
|
"use strict";
|
|
37569
|
-
publicProductVariantSchema =
|
|
37570
|
-
id:
|
|
37571
|
-
title:
|
|
37572
|
-
sku:
|
|
37573
|
-
priceCents:
|
|
37574
|
-
stockQuantity:
|
|
37575
|
-
soldOut:
|
|
37576
|
-
});
|
|
37577
|
-
publicProductSchema =
|
|
37578
|
-
id:
|
|
37579
|
-
contentEntryId:
|
|
37580
|
-
title:
|
|
37581
|
-
slug:
|
|
37582
|
-
path:
|
|
37583
|
-
status:
|
|
37584
|
-
priceCents:
|
|
37585
|
-
currency:
|
|
37586
|
-
productType:
|
|
37587
|
-
requiresShipping:
|
|
37588
|
-
hasVariants:
|
|
37589
|
-
trackInventory:
|
|
37590
|
-
soldOut:
|
|
37591
|
-
category:
|
|
37592
|
-
id:
|
|
37593
|
-
name:
|
|
37594
|
-
slug:
|
|
37763
|
+
publicProductVariantSchema = z59.object({
|
|
37764
|
+
id: z59.string(),
|
|
37765
|
+
title: z59.string(),
|
|
37766
|
+
sku: z59.string().nullable(),
|
|
37767
|
+
priceCents: z59.number(),
|
|
37768
|
+
stockQuantity: z59.number().nullable(),
|
|
37769
|
+
soldOut: z59.boolean()
|
|
37770
|
+
});
|
|
37771
|
+
publicProductSchema = z59.object({
|
|
37772
|
+
id: z59.string(),
|
|
37773
|
+
contentEntryId: z59.string().nullable(),
|
|
37774
|
+
title: z59.string(),
|
|
37775
|
+
slug: z59.string(),
|
|
37776
|
+
path: z59.string().nullable(),
|
|
37777
|
+
status: z59.enum(["draft", "active"]),
|
|
37778
|
+
priceCents: z59.number(),
|
|
37779
|
+
currency: z59.string(),
|
|
37780
|
+
productType: z59.enum(["physical", "digital"]),
|
|
37781
|
+
requiresShipping: z59.boolean(),
|
|
37782
|
+
hasVariants: z59.boolean(),
|
|
37783
|
+
trackInventory: z59.boolean(),
|
|
37784
|
+
soldOut: z59.boolean(),
|
|
37785
|
+
category: z59.object({
|
|
37786
|
+
id: z59.string(),
|
|
37787
|
+
name: z59.string(),
|
|
37788
|
+
slug: z59.string()
|
|
37595
37789
|
}).nullable(),
|
|
37596
|
-
summary:
|
|
37597
|
-
body:
|
|
37598
|
-
gallery:
|
|
37599
|
-
|
|
37600
|
-
url:
|
|
37601
|
-
alt:
|
|
37790
|
+
summary: z59.string().nullable(),
|
|
37791
|
+
body: z59.unknown().nullable(),
|
|
37792
|
+
gallery: z59.array(
|
|
37793
|
+
z59.object({
|
|
37794
|
+
url: z59.string(),
|
|
37795
|
+
alt: z59.string().nullable()
|
|
37602
37796
|
})
|
|
37603
37797
|
),
|
|
37604
|
-
variants:
|
|
37798
|
+
variants: z59.array(publicProductVariantSchema)
|
|
37605
37799
|
});
|
|
37606
|
-
publicProductsResponseSchema =
|
|
37607
|
-
products:
|
|
37800
|
+
publicProductsResponseSchema = z59.object({
|
|
37801
|
+
products: z59.array(publicProductSchema)
|
|
37608
37802
|
});
|
|
37609
37803
|
}
|
|
37610
37804
|
});
|
|
@@ -37675,7 +37869,7 @@ var init_creditProducts = __esm({
|
|
|
37675
37869
|
});
|
|
37676
37870
|
|
|
37677
37871
|
// ../blocks/src/system/runtime/nodes/shop-commerce.shared.ts
|
|
37678
|
-
import { z as
|
|
37872
|
+
import { z as z60 } from "zod";
|
|
37679
37873
|
function deriveCommerceCheckoutState(state) {
|
|
37680
37874
|
if (state.items.length === 0) {
|
|
37681
37875
|
return { kind: "empty" };
|
|
@@ -37714,36 +37908,33 @@ var storedProductCartItemSchema, storedPassCartItemSchema;
|
|
|
37714
37908
|
var init_shop_commerce_shared = __esm({
|
|
37715
37909
|
"../blocks/src/system/runtime/nodes/shop-commerce.shared.ts"() {
|
|
37716
37910
|
"use strict";
|
|
37717
|
-
storedProductCartItemSchema =
|
|
37718
|
-
kind:
|
|
37719
|
-
productId:
|
|
37720
|
-
productCategoryId:
|
|
37721
|
-
variantId:
|
|
37722
|
-
title:
|
|
37723
|
-
variantTitle:
|
|
37724
|
-
quantity:
|
|
37725
|
-
unitPriceCents:
|
|
37726
|
-
currency:
|
|
37727
|
-
imageUrl:
|
|
37728
|
-
soldOut:
|
|
37911
|
+
storedProductCartItemSchema = z60.object({
|
|
37912
|
+
kind: z60.literal("product"),
|
|
37913
|
+
productId: z60.string().min(1),
|
|
37914
|
+
productCategoryId: z60.string().min(1).optional().nullable(),
|
|
37915
|
+
variantId: z60.string().min(1).optional().nullable(),
|
|
37916
|
+
title: z60.string().min(1),
|
|
37917
|
+
variantTitle: z60.string().optional().nullable(),
|
|
37918
|
+
quantity: z60.number().finite(),
|
|
37919
|
+
unitPriceCents: z60.number().finite(),
|
|
37920
|
+
currency: z60.string().min(1),
|
|
37921
|
+
imageUrl: z60.string().optional().nullable(),
|
|
37922
|
+
soldOut: z60.boolean().optional()
|
|
37729
37923
|
});
|
|
37730
|
-
storedPassCartItemSchema =
|
|
37731
|
-
kind:
|
|
37732
|
-
passId:
|
|
37733
|
-
title:
|
|
37734
|
-
quantity:
|
|
37735
|
-
unitPriceCents:
|
|
37736
|
-
currency:
|
|
37924
|
+
storedPassCartItemSchema = z60.object({
|
|
37925
|
+
kind: z60.literal("pass"),
|
|
37926
|
+
passId: z60.string().min(1),
|
|
37927
|
+
title: z60.string().min(1),
|
|
37928
|
+
quantity: z60.number().finite().optional(),
|
|
37929
|
+
unitPriceCents: z60.number().finite(),
|
|
37930
|
+
currency: z60.string().min(1)
|
|
37737
37931
|
});
|
|
37738
37932
|
}
|
|
37739
37933
|
});
|
|
37740
37934
|
|
|
37741
37935
|
// ../blocks/src/system/runtime/nodes/commerce/shared/display.ts
|
|
37742
37936
|
function formatCommercePrice(cents, currency) {
|
|
37743
|
-
return
|
|
37744
|
-
style: "currency",
|
|
37745
|
-
currency: currency.toUpperCase()
|
|
37746
|
-
}).format(cents / 100);
|
|
37937
|
+
return formatCurrencyAmount(cents, currency);
|
|
37747
37938
|
}
|
|
37748
37939
|
function getPassesHeading(passes, explicitHeading) {
|
|
37749
37940
|
if (explicitHeading) return explicitHeading;
|
|
@@ -37939,13 +38130,14 @@ function formatValidity(days) {
|
|
|
37939
38130
|
var init_display = __esm({
|
|
37940
38131
|
"../blocks/src/system/runtime/nodes/commerce/shared/display.ts"() {
|
|
37941
38132
|
"use strict";
|
|
38133
|
+
init_src();
|
|
37942
38134
|
init_creditProducts();
|
|
37943
38135
|
init_shop_commerce_shared();
|
|
37944
38136
|
}
|
|
37945
38137
|
});
|
|
37946
38138
|
|
|
37947
38139
|
// ../blocks/src/system/runtime/nodes/shop.interactive.ts
|
|
37948
|
-
import { z as
|
|
38140
|
+
import { z as z61 } from "zod";
|
|
37949
38141
|
function resolveShowPricePerCredit(source) {
|
|
37950
38142
|
return source.showPricePerCredit ?? true;
|
|
37951
38143
|
}
|
|
@@ -37973,211 +38165,211 @@ var init_shop_interactive = __esm({
|
|
|
37973
38165
|
init_islands();
|
|
37974
38166
|
init_runtime();
|
|
37975
38167
|
init_contract_schemas();
|
|
37976
|
-
shopModeSchema =
|
|
37977
|
-
contentEntrySchema3 =
|
|
37978
|
-
id:
|
|
37979
|
-
slug:
|
|
38168
|
+
shopModeSchema = z61.enum(["passes-memberships", "product-list", "product-detail", "cart", "checkout"]);
|
|
38169
|
+
contentEntrySchema3 = z61.object({
|
|
38170
|
+
id: z61.string().nullable().optional(),
|
|
38171
|
+
slug: z61.string().nullable().optional()
|
|
37980
38172
|
}).nullable();
|
|
37981
|
-
shopSourceSchema =
|
|
37982
|
-
className:
|
|
38173
|
+
shopSourceSchema = z61.object({
|
|
38174
|
+
className: z61.string().nullable().optional(),
|
|
37983
38175
|
mode: shopModeSchema.optional(),
|
|
37984
|
-
heading:
|
|
37985
|
-
productSlug:
|
|
37986
|
-
showPasses:
|
|
37987
|
-
showMemberships:
|
|
37988
|
-
layout:
|
|
37989
|
-
columns:
|
|
37990
|
-
showDescriptions:
|
|
37991
|
-
showSummary:
|
|
37992
|
-
showBody:
|
|
37993
|
-
showPrices:
|
|
37994
|
-
showValidityPeriod:
|
|
37995
|
-
showPricePerCredit:
|
|
37996
|
-
passesHeading:
|
|
37997
|
-
membershipsHeading:
|
|
37998
|
-
buyButtonText:
|
|
37999
|
-
addButtonText:
|
|
38000
|
-
passPurchaseMode:
|
|
38001
|
-
subscribeButtonText:
|
|
38002
|
-
emptyStateText:
|
|
38003
|
-
checkoutButtonText:
|
|
38004
|
-
clearButtonText:
|
|
38005
|
-
submitButtonText:
|
|
38176
|
+
heading: z61.string().nullable().optional(),
|
|
38177
|
+
productSlug: z61.string().nullable().optional(),
|
|
38178
|
+
showPasses: z61.boolean().optional(),
|
|
38179
|
+
showMemberships: z61.boolean().optional(),
|
|
38180
|
+
layout: z61.enum(["grid", "list"]).optional(),
|
|
38181
|
+
columns: z61.string().optional(),
|
|
38182
|
+
showDescriptions: z61.boolean().optional(),
|
|
38183
|
+
showSummary: z61.boolean().optional(),
|
|
38184
|
+
showBody: z61.boolean().optional(),
|
|
38185
|
+
showPrices: z61.boolean().optional(),
|
|
38186
|
+
showValidityPeriod: z61.boolean().optional(),
|
|
38187
|
+
showPricePerCredit: z61.boolean().nullable().optional(),
|
|
38188
|
+
passesHeading: z61.string().optional(),
|
|
38189
|
+
membershipsHeading: z61.string().optional(),
|
|
38190
|
+
buyButtonText: z61.string().optional(),
|
|
38191
|
+
addButtonText: z61.string().optional(),
|
|
38192
|
+
passPurchaseMode: z61.enum(["add_to_cart", "buy_now"]).optional(),
|
|
38193
|
+
subscribeButtonText: z61.string().optional(),
|
|
38194
|
+
emptyStateText: z61.string().optional(),
|
|
38195
|
+
checkoutButtonText: z61.string().optional(),
|
|
38196
|
+
clearButtonText: z61.string().optional(),
|
|
38197
|
+
submitButtonText: z61.string().optional(),
|
|
38006
38198
|
contentEntry: contentEntrySchema3.optional(),
|
|
38007
|
-
passes:
|
|
38008
|
-
memberships:
|
|
38009
|
-
products:
|
|
38010
|
-
siteId:
|
|
38011
|
-
apiBaseUrl:
|
|
38199
|
+
passes: z61.array(publicPassProductSchema).nullable().optional(),
|
|
38200
|
+
memberships: z61.array(publicMembershipProductSchema).nullable().optional(),
|
|
38201
|
+
products: z61.array(publicProductSchema).nullable().optional(),
|
|
38202
|
+
siteId: z61.string().optional(),
|
|
38203
|
+
apiBaseUrl: z61.string().optional(),
|
|
38012
38204
|
stage: previewStageSchema.optional()
|
|
38013
38205
|
});
|
|
38014
|
-
productVariantOptionDisplaySchema =
|
|
38015
|
-
id:
|
|
38016
|
-
label:
|
|
38017
|
-
soldOut:
|
|
38018
|
-
});
|
|
38019
|
-
productCardDisplaySchema =
|
|
38020
|
-
productId:
|
|
38021
|
-
title:
|
|
38022
|
-
path:
|
|
38023
|
-
summary:
|
|
38024
|
-
priceLabel:
|
|
38025
|
-
image:
|
|
38026
|
-
url:
|
|
38027
|
-
alt:
|
|
38206
|
+
productVariantOptionDisplaySchema = z61.object({
|
|
38207
|
+
id: z61.string(),
|
|
38208
|
+
label: z61.string(),
|
|
38209
|
+
soldOut: z61.boolean()
|
|
38210
|
+
});
|
|
38211
|
+
productCardDisplaySchema = z61.object({
|
|
38212
|
+
productId: z61.string(),
|
|
38213
|
+
title: z61.string(),
|
|
38214
|
+
path: z61.string().nullable(),
|
|
38215
|
+
summary: z61.string().nullable(),
|
|
38216
|
+
priceLabel: z61.string().nullable(),
|
|
38217
|
+
image: z61.object({
|
|
38218
|
+
url: z61.string(),
|
|
38219
|
+
alt: z61.string().nullable()
|
|
38028
38220
|
}).nullable(),
|
|
38029
|
-
variantOptions:
|
|
38030
|
-
selectedVariantId:
|
|
38031
|
-
selectionLabel:
|
|
38032
|
-
actionLabel:
|
|
38033
|
-
soldOut:
|
|
38034
|
-
});
|
|
38035
|
-
productListDisplaySchema =
|
|
38036
|
-
kind:
|
|
38037
|
-
state:
|
|
38038
|
-
heading:
|
|
38039
|
-
className:
|
|
38040
|
-
layout:
|
|
38041
|
-
columns:
|
|
38042
|
-
emptyMessage:
|
|
38043
|
-
cards:
|
|
38044
|
-
});
|
|
38045
|
-
productDetailDisplaySchema =
|
|
38046
|
-
|
|
38047
|
-
kind:
|
|
38048
|
-
state:
|
|
38049
|
-
heading:
|
|
38050
|
-
className:
|
|
38051
|
-
emptyMessage:
|
|
38221
|
+
variantOptions: z61.array(productVariantOptionDisplaySchema),
|
|
38222
|
+
selectedVariantId: z61.string().nullable(),
|
|
38223
|
+
selectionLabel: z61.string(),
|
|
38224
|
+
actionLabel: z61.string(),
|
|
38225
|
+
soldOut: z61.boolean()
|
|
38226
|
+
});
|
|
38227
|
+
productListDisplaySchema = z61.object({
|
|
38228
|
+
kind: z61.literal("product-list"),
|
|
38229
|
+
state: z61.enum(["empty", "ready"]),
|
|
38230
|
+
heading: z61.string().nullable(),
|
|
38231
|
+
className: z61.string().nullable(),
|
|
38232
|
+
layout: z61.enum(["grid", "list"]),
|
|
38233
|
+
columns: z61.string(),
|
|
38234
|
+
emptyMessage: z61.string(),
|
|
38235
|
+
cards: z61.array(productCardDisplaySchema)
|
|
38236
|
+
});
|
|
38237
|
+
productDetailDisplaySchema = z61.discriminatedUnion("state", [
|
|
38238
|
+
z61.object({
|
|
38239
|
+
kind: z61.literal("product-detail"),
|
|
38240
|
+
state: z61.literal("empty"),
|
|
38241
|
+
heading: z61.string().nullable(),
|
|
38242
|
+
className: z61.string().nullable(),
|
|
38243
|
+
emptyMessage: z61.string()
|
|
38052
38244
|
}),
|
|
38053
|
-
|
|
38054
|
-
kind:
|
|
38055
|
-
state:
|
|
38056
|
-
heading:
|
|
38057
|
-
className:
|
|
38058
|
-
title:
|
|
38059
|
-
priceLabel:
|
|
38060
|
-
summary:
|
|
38061
|
-
categoryLabel:
|
|
38062
|
-
gallery:
|
|
38063
|
-
url:
|
|
38064
|
-
alt:
|
|
38245
|
+
z61.object({
|
|
38246
|
+
kind: z61.literal("product-detail"),
|
|
38247
|
+
state: z61.literal("ready"),
|
|
38248
|
+
heading: z61.string().nullable(),
|
|
38249
|
+
className: z61.string().nullable(),
|
|
38250
|
+
title: z61.string(),
|
|
38251
|
+
priceLabel: z61.string(),
|
|
38252
|
+
summary: z61.string().nullable(),
|
|
38253
|
+
categoryLabel: z61.string().nullable(),
|
|
38254
|
+
gallery: z61.array(z61.object({
|
|
38255
|
+
url: z61.string(),
|
|
38256
|
+
alt: z61.string().nullable()
|
|
38065
38257
|
})),
|
|
38066
|
-
variantOptions:
|
|
38067
|
-
selectedVariantId:
|
|
38068
|
-
selectionLabel:
|
|
38069
|
-
actionLabel:
|
|
38070
|
-
soldOut:
|
|
38071
|
-
body:
|
|
38258
|
+
variantOptions: z61.array(productVariantOptionDisplaySchema),
|
|
38259
|
+
selectedVariantId: z61.string().nullable(),
|
|
38260
|
+
selectionLabel: z61.string(),
|
|
38261
|
+
actionLabel: z61.string(),
|
|
38262
|
+
soldOut: z61.boolean(),
|
|
38263
|
+
body: z61.unknown().nullable()
|
|
38072
38264
|
})
|
|
38073
38265
|
]);
|
|
38074
|
-
passCardDisplaySchema =
|
|
38075
|
-
id:
|
|
38076
|
-
title:
|
|
38077
|
-
description:
|
|
38078
|
-
priceLabel:
|
|
38079
|
-
creditsLabel:
|
|
38080
|
-
perCreditLabel:
|
|
38081
|
-
validityLabel:
|
|
38082
|
-
actionLabel:
|
|
38083
|
-
});
|
|
38084
|
-
membershipCardDisplaySchema =
|
|
38085
|
-
id:
|
|
38086
|
-
title:
|
|
38087
|
-
description:
|
|
38088
|
-
priceLabel:
|
|
38089
|
-
intervalLabel:
|
|
38090
|
-
actionLabel:
|
|
38091
|
-
});
|
|
38092
|
-
passesMembershipsDisplaySchema =
|
|
38093
|
-
kind:
|
|
38094
|
-
state:
|
|
38095
|
-
className:
|
|
38096
|
-
layout:
|
|
38097
|
-
columns:
|
|
38098
|
-
emptyMessage:
|
|
38099
|
-
passesHeading:
|
|
38100
|
-
membershipsHeading:
|
|
38101
|
-
passes:
|
|
38102
|
-
memberships:
|
|
38103
|
-
});
|
|
38104
|
-
cartLineDisplaySchema =
|
|
38105
|
-
key:
|
|
38106
|
-
title:
|
|
38107
|
-
priceLabel:
|
|
38108
|
-
quantity:
|
|
38109
|
-
quantityEditable:
|
|
38110
|
-
});
|
|
38111
|
-
cartDisplaySchema =
|
|
38112
|
-
kind:
|
|
38113
|
-
state:
|
|
38114
|
-
heading:
|
|
38115
|
-
className:
|
|
38116
|
-
emptyMessage:
|
|
38117
|
-
supportText:
|
|
38118
|
-
items:
|
|
38119
|
-
subtotalLabel:
|
|
38120
|
-
checkoutButtonText:
|
|
38121
|
-
clearButtonText:
|
|
38122
|
-
});
|
|
38123
|
-
checkoutDisplaySchema =
|
|
38124
|
-
kind:
|
|
38125
|
-
state:
|
|
38126
|
-
heading:
|
|
38127
|
-
className:
|
|
38128
|
-
message:
|
|
38129
|
-
submitButtonText:
|
|
38130
|
-
});
|
|
38131
|
-
passesMembershipsHydrationSchema =
|
|
38132
|
-
passes:
|
|
38133
|
-
memberships:
|
|
38134
|
-
passPurchaseMode:
|
|
38135
|
-
});
|
|
38136
|
-
productListHydrationSchema =
|
|
38137
|
-
products:
|
|
38138
|
-
showSummary:
|
|
38139
|
-
showPrices:
|
|
38140
|
-
addButtonText:
|
|
38141
|
-
});
|
|
38142
|
-
productDetailHydrationSchema =
|
|
38143
|
-
products:
|
|
38144
|
-
productId:
|
|
38145
|
-
showSummary:
|
|
38146
|
-
showBody:
|
|
38147
|
-
addButtonText:
|
|
38148
|
-
});
|
|
38149
|
-
cartHydrationSchema =
|
|
38150
|
-
emptyStateText:
|
|
38151
|
-
checkoutButtonText:
|
|
38152
|
-
clearButtonText:
|
|
38153
|
-
});
|
|
38154
|
-
checkoutHydrationSchema =
|
|
38155
|
-
emptyStateText:
|
|
38156
|
-
submitButtonText:
|
|
38157
|
-
});
|
|
38158
|
-
passesMembershipsRenderSchema =
|
|
38266
|
+
passCardDisplaySchema = z61.object({
|
|
38267
|
+
id: z61.string(),
|
|
38268
|
+
title: z61.string(),
|
|
38269
|
+
description: z61.string().nullable(),
|
|
38270
|
+
priceLabel: z61.string(),
|
|
38271
|
+
creditsLabel: z61.string(),
|
|
38272
|
+
perCreditLabel: z61.string().nullable(),
|
|
38273
|
+
validityLabel: z61.string().nullable(),
|
|
38274
|
+
actionLabel: z61.string()
|
|
38275
|
+
});
|
|
38276
|
+
membershipCardDisplaySchema = z61.object({
|
|
38277
|
+
id: z61.string(),
|
|
38278
|
+
title: z61.string(),
|
|
38279
|
+
description: z61.string().nullable(),
|
|
38280
|
+
priceLabel: z61.string(),
|
|
38281
|
+
intervalLabel: z61.string(),
|
|
38282
|
+
actionLabel: z61.string()
|
|
38283
|
+
});
|
|
38284
|
+
passesMembershipsDisplaySchema = z61.object({
|
|
38285
|
+
kind: z61.literal("passes-memberships"),
|
|
38286
|
+
state: z61.enum(["empty", "ready"]),
|
|
38287
|
+
className: z61.string().nullable(),
|
|
38288
|
+
layout: z61.enum(["grid", "list"]),
|
|
38289
|
+
columns: z61.string(),
|
|
38290
|
+
emptyMessage: z61.string(),
|
|
38291
|
+
passesHeading: z61.string(),
|
|
38292
|
+
membershipsHeading: z61.string(),
|
|
38293
|
+
passes: z61.array(passCardDisplaySchema),
|
|
38294
|
+
memberships: z61.array(membershipCardDisplaySchema)
|
|
38295
|
+
});
|
|
38296
|
+
cartLineDisplaySchema = z61.object({
|
|
38297
|
+
key: z61.string(),
|
|
38298
|
+
title: z61.string(),
|
|
38299
|
+
priceLabel: z61.string(),
|
|
38300
|
+
quantity: z61.number(),
|
|
38301
|
+
quantityEditable: z61.boolean()
|
|
38302
|
+
});
|
|
38303
|
+
cartDisplaySchema = z61.object({
|
|
38304
|
+
kind: z61.literal("cart"),
|
|
38305
|
+
state: z61.enum(["empty", "ready"]),
|
|
38306
|
+
heading: z61.string().nullable(),
|
|
38307
|
+
className: z61.string().nullable(),
|
|
38308
|
+
emptyMessage: z61.string(),
|
|
38309
|
+
supportText: z61.string().nullable(),
|
|
38310
|
+
items: z61.array(cartLineDisplaySchema),
|
|
38311
|
+
subtotalLabel: z61.string().nullable(),
|
|
38312
|
+
checkoutButtonText: z61.string(),
|
|
38313
|
+
clearButtonText: z61.string()
|
|
38314
|
+
});
|
|
38315
|
+
checkoutDisplaySchema = z61.object({
|
|
38316
|
+
kind: z61.literal("checkout"),
|
|
38317
|
+
state: z61.enum(["empty", "blocked", "ready"]),
|
|
38318
|
+
heading: z61.string().nullable(),
|
|
38319
|
+
className: z61.string().nullable(),
|
|
38320
|
+
message: z61.string().nullable(),
|
|
38321
|
+
submitButtonText: z61.string()
|
|
38322
|
+
});
|
|
38323
|
+
passesMembershipsHydrationSchema = z61.object({
|
|
38324
|
+
passes: z61.array(publicPassProductSchema),
|
|
38325
|
+
memberships: z61.array(publicMembershipProductSchema),
|
|
38326
|
+
passPurchaseMode: z61.enum(["add_to_cart", "buy_now"])
|
|
38327
|
+
});
|
|
38328
|
+
productListHydrationSchema = z61.object({
|
|
38329
|
+
products: z61.array(publicProductSchema),
|
|
38330
|
+
showSummary: z61.boolean(),
|
|
38331
|
+
showPrices: z61.boolean(),
|
|
38332
|
+
addButtonText: z61.string()
|
|
38333
|
+
});
|
|
38334
|
+
productDetailHydrationSchema = z61.object({
|
|
38335
|
+
products: z61.array(publicProductSchema),
|
|
38336
|
+
productId: z61.string().nullable(),
|
|
38337
|
+
showSummary: z61.boolean(),
|
|
38338
|
+
showBody: z61.boolean(),
|
|
38339
|
+
addButtonText: z61.string()
|
|
38340
|
+
});
|
|
38341
|
+
cartHydrationSchema = z61.object({
|
|
38342
|
+
emptyStateText: z61.string(),
|
|
38343
|
+
checkoutButtonText: z61.string(),
|
|
38344
|
+
clearButtonText: z61.string()
|
|
38345
|
+
});
|
|
38346
|
+
checkoutHydrationSchema = z61.object({
|
|
38347
|
+
emptyStateText: z61.string(),
|
|
38348
|
+
submitButtonText: z61.string()
|
|
38349
|
+
});
|
|
38350
|
+
passesMembershipsRenderSchema = z61.object({
|
|
38159
38351
|
display: passesMembershipsDisplaySchema,
|
|
38160
38352
|
hydration: passesMembershipsHydrationSchema
|
|
38161
38353
|
});
|
|
38162
|
-
productListRenderSchema =
|
|
38354
|
+
productListRenderSchema = z61.object({
|
|
38163
38355
|
display: productListDisplaySchema,
|
|
38164
38356
|
hydration: productListHydrationSchema
|
|
38165
38357
|
});
|
|
38166
|
-
productDetailRenderSchema =
|
|
38358
|
+
productDetailRenderSchema = z61.object({
|
|
38167
38359
|
display: productDetailDisplaySchema,
|
|
38168
38360
|
hydration: productDetailHydrationSchema
|
|
38169
38361
|
});
|
|
38170
|
-
cartRenderSchema =
|
|
38362
|
+
cartRenderSchema = z61.object({
|
|
38171
38363
|
display: cartDisplaySchema,
|
|
38172
38364
|
hydration: cartHydrationSchema
|
|
38173
38365
|
});
|
|
38174
|
-
checkoutRenderSchema =
|
|
38366
|
+
checkoutRenderSchema = z61.object({
|
|
38175
38367
|
display: checkoutDisplaySchema,
|
|
38176
38368
|
hydration: checkoutHydrationSchema
|
|
38177
38369
|
});
|
|
38178
|
-
shopIslandMetaCodec = createZodCodec(
|
|
38179
|
-
siteId:
|
|
38180
|
-
apiBaseUrl:
|
|
38370
|
+
shopIslandMetaCodec = createZodCodec(z61.object({
|
|
38371
|
+
siteId: z61.string().optional(),
|
|
38372
|
+
apiBaseUrl: z61.string().optional(),
|
|
38181
38373
|
stage: previewStageSchema.optional()
|
|
38182
38374
|
}));
|
|
38183
38375
|
shopIslandMetaKeys = defineInteractiveIslandMetaKeys("siteId", "apiBaseUrl", "stage");
|
|
@@ -38349,7 +38541,7 @@ var init_shop_interactive = __esm({
|
|
|
38349
38541
|
});
|
|
38350
38542
|
|
|
38351
38543
|
// ../blocks/src/system/blocks/shop.ts
|
|
38352
|
-
import { z as
|
|
38544
|
+
import { z as z62 } from "zod";
|
|
38353
38545
|
var shopManifest, shopBlockDefinition;
|
|
38354
38546
|
var init_shop = __esm({
|
|
38355
38547
|
"../blocks/src/system/blocks/shop.ts"() {
|
|
@@ -38557,9 +38749,9 @@ var init_shop = __esm({
|
|
|
38557
38749
|
runtime: shopBlockRuntime,
|
|
38558
38750
|
dataSchemas: {
|
|
38559
38751
|
// listPublicPasses returns { passes: [...] }
|
|
38560
|
-
passes:
|
|
38752
|
+
passes: z62.object({ passes: z62.array(publicPassProductSchema) }).optional(),
|
|
38561
38753
|
// listPublicMemberships returns { memberships: [...] }
|
|
38562
|
-
memberships:
|
|
38754
|
+
memberships: z62.object({ memberships: z62.array(publicMembershipProductSchema) }).optional()
|
|
38563
38755
|
},
|
|
38564
38756
|
dataLoaders: {
|
|
38565
38757
|
// Load passes for display
|
|
@@ -38584,7 +38776,7 @@ var init_shop = __esm({
|
|
|
38584
38776
|
});
|
|
38585
38777
|
|
|
38586
38778
|
// ../blocks/src/system/blocks/product-list.ts
|
|
38587
|
-
import { z as
|
|
38779
|
+
import { z as z63 } from "zod";
|
|
38588
38780
|
var productListManifest, productListBlockDefinition, productListDataSchema;
|
|
38589
38781
|
var init_product_list = __esm({
|
|
38590
38782
|
"../blocks/src/system/blocks/product-list.ts"() {
|
|
@@ -38729,7 +38921,7 @@ var init_product_list = __esm({
|
|
|
38729
38921
|
}
|
|
38730
38922
|
}
|
|
38731
38923
|
};
|
|
38732
|
-
productListDataSchema =
|
|
38924
|
+
productListDataSchema = z63.object({
|
|
38733
38925
|
products: publicProductsResponseSchema.optional()
|
|
38734
38926
|
});
|
|
38735
38927
|
}
|
|
@@ -39032,7 +39224,7 @@ var init_checkout = __esm({
|
|
|
39032
39224
|
});
|
|
39033
39225
|
|
|
39034
39226
|
// ../blocks/src/system/runtime/nodes/gifting.interactive.ts
|
|
39035
|
-
import { z as
|
|
39227
|
+
import { z as z64 } from "zod";
|
|
39036
39228
|
function buildGiftingDisplay(source) {
|
|
39037
39229
|
return {
|
|
39038
39230
|
kind: "gifting",
|
|
@@ -39051,71 +39243,71 @@ var init_gifting_interactive = __esm({
|
|
|
39051
39243
|
"use strict";
|
|
39052
39244
|
init_islands();
|
|
39053
39245
|
init_runtime();
|
|
39054
|
-
publicGiftCardOfferSchema =
|
|
39055
|
-
id:
|
|
39056
|
-
kind:
|
|
39057
|
-
title:
|
|
39058
|
-
description:
|
|
39059
|
-
sortOrder:
|
|
39060
|
-
giftCard:
|
|
39061
|
-
fixedDenominations:
|
|
39062
|
-
customAmountEnabled:
|
|
39063
|
-
customAmountMinCents:
|
|
39064
|
-
customAmountMaxCents:
|
|
39246
|
+
publicGiftCardOfferSchema = z64.object({
|
|
39247
|
+
id: z64.string(),
|
|
39248
|
+
kind: z64.literal("gift_card"),
|
|
39249
|
+
title: z64.string(),
|
|
39250
|
+
description: z64.string().nullable(),
|
|
39251
|
+
sortOrder: z64.number().int(),
|
|
39252
|
+
giftCard: z64.object({
|
|
39253
|
+
fixedDenominations: z64.array(z64.number().int().positive()),
|
|
39254
|
+
customAmountEnabled: z64.boolean(),
|
|
39255
|
+
customAmountMinCents: z64.number().int().positive(),
|
|
39256
|
+
customAmountMaxCents: z64.number().int().positive()
|
|
39065
39257
|
}),
|
|
39066
|
-
voucher:
|
|
39067
|
-
});
|
|
39068
|
-
publicVoucherOfferSchema =
|
|
39069
|
-
id:
|
|
39070
|
-
kind:
|
|
39071
|
-
title:
|
|
39072
|
-
description:
|
|
39073
|
-
sortOrder:
|
|
39074
|
-
giftCard:
|
|
39075
|
-
voucher:
|
|
39076
|
-
purchaseAmountCents:
|
|
39258
|
+
voucher: z64.null()
|
|
39259
|
+
});
|
|
39260
|
+
publicVoucherOfferSchema = z64.object({
|
|
39261
|
+
id: z64.string(),
|
|
39262
|
+
kind: z64.literal("voucher"),
|
|
39263
|
+
title: z64.string(),
|
|
39264
|
+
description: z64.string().nullable(),
|
|
39265
|
+
sortOrder: z64.number().int(),
|
|
39266
|
+
giftCard: z64.null(),
|
|
39267
|
+
voucher: z64.object({
|
|
39268
|
+
purchaseAmountCents: z64.number().int().positive()
|
|
39077
39269
|
})
|
|
39078
39270
|
});
|
|
39079
|
-
publicGiftingOffersResponseSchema =
|
|
39080
|
-
currency:
|
|
39081
|
-
giftCards:
|
|
39082
|
-
vouchers:
|
|
39271
|
+
publicGiftingOffersResponseSchema = z64.object({
|
|
39272
|
+
currency: z64.string(),
|
|
39273
|
+
giftCards: z64.array(publicGiftCardOfferSchema),
|
|
39274
|
+
vouchers: z64.array(publicVoucherOfferSchema)
|
|
39083
39275
|
});
|
|
39084
|
-
giftingSourceSchema =
|
|
39085
|
-
siteId:
|
|
39086
|
-
apiBaseUrl:
|
|
39276
|
+
giftingSourceSchema = z64.object({
|
|
39277
|
+
siteId: z64.string().optional(),
|
|
39278
|
+
apiBaseUrl: z64.string().optional(),
|
|
39087
39279
|
offers: publicGiftingOffersResponseSchema.nullable().optional(),
|
|
39088
|
-
className:
|
|
39089
|
-
heading:
|
|
39090
|
-
intro:
|
|
39091
|
-
giftCardsHeading:
|
|
39092
|
-
vouchersHeading:
|
|
39093
|
-
emptyStateText:
|
|
39094
|
-
checkoutButtonText:
|
|
39095
|
-
successMessage:
|
|
39096
|
-
});
|
|
39097
|
-
giftingDisplaySchema =
|
|
39098
|
-
kind:
|
|
39099
|
-
state:
|
|
39100
|
-
className:
|
|
39101
|
-
heading:
|
|
39102
|
-
intro:
|
|
39103
|
-
giftCardsHeading:
|
|
39104
|
-
vouchersHeading:
|
|
39105
|
-
emptyStateText:
|
|
39106
|
-
});
|
|
39107
|
-
giftingHydrationSchema =
|
|
39280
|
+
className: z64.string().nullable().optional(),
|
|
39281
|
+
heading: z64.string().nullable().optional(),
|
|
39282
|
+
intro: z64.string().nullable().optional(),
|
|
39283
|
+
giftCardsHeading: z64.string().nullable().optional(),
|
|
39284
|
+
vouchersHeading: z64.string().nullable().optional(),
|
|
39285
|
+
emptyStateText: z64.string().nullable().optional(),
|
|
39286
|
+
checkoutButtonText: z64.string().nullable().optional(),
|
|
39287
|
+
successMessage: z64.string().nullable().optional()
|
|
39288
|
+
});
|
|
39289
|
+
giftingDisplaySchema = z64.object({
|
|
39290
|
+
kind: z64.literal("gifting"),
|
|
39291
|
+
state: z64.literal("ready"),
|
|
39292
|
+
className: z64.string().nullable(),
|
|
39293
|
+
heading: z64.string(),
|
|
39294
|
+
intro: z64.string().nullable(),
|
|
39295
|
+
giftCardsHeading: z64.string(),
|
|
39296
|
+
vouchersHeading: z64.string(),
|
|
39297
|
+
emptyStateText: z64.string()
|
|
39298
|
+
});
|
|
39299
|
+
giftingHydrationSchema = z64.object({
|
|
39108
39300
|
offers: publicGiftingOffersResponseSchema.nullable(),
|
|
39109
|
-
checkoutButtonText:
|
|
39110
|
-
successMessage:
|
|
39301
|
+
checkoutButtonText: z64.string(),
|
|
39302
|
+
successMessage: z64.string()
|
|
39111
39303
|
});
|
|
39112
|
-
giftingRenderSchema =
|
|
39304
|
+
giftingRenderSchema = z64.object({
|
|
39113
39305
|
display: giftingDisplaySchema,
|
|
39114
39306
|
hydration: giftingHydrationSchema
|
|
39115
39307
|
});
|
|
39116
|
-
giftingIslandMetaCodec = createZodCodec(
|
|
39117
|
-
siteId:
|
|
39118
|
-
apiBaseUrl:
|
|
39308
|
+
giftingIslandMetaCodec = createZodCodec(z64.object({
|
|
39309
|
+
siteId: z64.string().optional(),
|
|
39310
|
+
apiBaseUrl: z64.string().optional()
|
|
39119
39311
|
}));
|
|
39120
39312
|
giftingIslandMetaKeys = defineInteractiveIslandMetaKeys(
|
|
39121
39313
|
"siteId",
|
|
@@ -39288,6 +39480,94 @@ var init_gifting = __esm({
|
|
|
39288
39480
|
}
|
|
39289
39481
|
});
|
|
39290
39482
|
|
|
39483
|
+
// ../blocks/src/system/blocks/newsletter-signup-destination.ts
|
|
39484
|
+
function parseNewsletterSignupBlockId(value) {
|
|
39485
|
+
const trimmed = parseTrimmedString(value);
|
|
39486
|
+
return trimmed && BLOCK_ID_PATTERN.test(trimmed) ? trimmed : null;
|
|
39487
|
+
}
|
|
39488
|
+
function parseSignedNewsletterDestinationRef(value) {
|
|
39489
|
+
const trimmed = parseTrimmedString(value);
|
|
39490
|
+
return trimmed && SIGNED_DESTINATION_REF_PATTERN.test(trimmed) ? trimmed : null;
|
|
39491
|
+
}
|
|
39492
|
+
function parseNewsletterSignupDestinationProvider(value) {
|
|
39493
|
+
return value === "riverbank" || value === "mailchimp" ? value : null;
|
|
39494
|
+
}
|
|
39495
|
+
function buildNewsletterSignupBlockRef(blockId) {
|
|
39496
|
+
const parsed = parseNewsletterSignupBlockId(blockId);
|
|
39497
|
+
return parsed ? { tag: "block_ref", blockId: parsed } : null;
|
|
39498
|
+
}
|
|
39499
|
+
function normalizeNewsletterSignupEditorValuesForDestination(values) {
|
|
39500
|
+
const destinationProvider = parseNewsletterSignupDestinationProvider(values.destinationProvider) ?? "riverbank";
|
|
39501
|
+
if (destinationProvider === "mailchimp") {
|
|
39502
|
+
return {
|
|
39503
|
+
destinationProvider,
|
|
39504
|
+
mailchimpAudienceId: values.mailchimpAudienceId,
|
|
39505
|
+
mailchimpTags: values.mailchimpTags
|
|
39506
|
+
};
|
|
39507
|
+
}
|
|
39508
|
+
return {
|
|
39509
|
+
destinationProvider,
|
|
39510
|
+
listId: values.listId,
|
|
39511
|
+
tags: values.tags
|
|
39512
|
+
};
|
|
39513
|
+
}
|
|
39514
|
+
function deriveNewsletterSignupRuntimeSource(values) {
|
|
39515
|
+
const normalized = normalizeNewsletterSignupEditorValuesForDestination(values);
|
|
39516
|
+
if (normalized.destinationProvider === "mailchimp") {
|
|
39517
|
+
return {
|
|
39518
|
+
destinationProvider: "mailchimp",
|
|
39519
|
+
listId: null,
|
|
39520
|
+
tags: null
|
|
39521
|
+
};
|
|
39522
|
+
}
|
|
39523
|
+
return {
|
|
39524
|
+
destinationProvider: "riverbank",
|
|
39525
|
+
listId: parseTrimmedString(normalized.listId),
|
|
39526
|
+
tags: parseTrimmedString(normalized.tags)
|
|
39527
|
+
};
|
|
39528
|
+
}
|
|
39529
|
+
function sanitizeNewsletterSignupPublicContent(content) {
|
|
39530
|
+
if (!isRecord7(content)) return content;
|
|
39531
|
+
const provider = parseNewsletterSignupDestinationProvider(content.destinationProvider) ?? getProviderFromExplicitDestination(content.destination);
|
|
39532
|
+
const {
|
|
39533
|
+
destination: _destination,
|
|
39534
|
+
destinationProvider: _destinationProvider,
|
|
39535
|
+
mailchimpAudienceId: _mailchimpAudienceId,
|
|
39536
|
+
mailchimpTags: _mailchimpTags,
|
|
39537
|
+
listId,
|
|
39538
|
+
tags: tags2,
|
|
39539
|
+
...publicContent
|
|
39540
|
+
} = content;
|
|
39541
|
+
const mutablePublicContent = { ...publicContent };
|
|
39542
|
+
if (provider !== "mailchimp") {
|
|
39543
|
+
if ("listId" in content) mutablePublicContent.listId = listId;
|
|
39544
|
+
if ("tags" in content) mutablePublicContent.tags = tags2;
|
|
39545
|
+
}
|
|
39546
|
+
return mutablePublicContent;
|
|
39547
|
+
}
|
|
39548
|
+
function getProviderFromExplicitDestination(destination) {
|
|
39549
|
+
if (!isRecord7(destination) || typeof destination.tag !== "string") return null;
|
|
39550
|
+
if (destination.tag === "riverbank_list") return "riverbank";
|
|
39551
|
+
if (destination.tag === "mailchimp_audience") return "mailchimp";
|
|
39552
|
+
return null;
|
|
39553
|
+
}
|
|
39554
|
+
function parseTrimmedString(value) {
|
|
39555
|
+
if (typeof value !== "string") return null;
|
|
39556
|
+
const trimmed = value.trim();
|
|
39557
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
39558
|
+
}
|
|
39559
|
+
function isRecord7(value) {
|
|
39560
|
+
return typeof value === "object" && value !== null;
|
|
39561
|
+
}
|
|
39562
|
+
var BLOCK_ID_PATTERN, SIGNED_DESTINATION_REF_PATTERN;
|
|
39563
|
+
var init_newsletter_signup_destination = __esm({
|
|
39564
|
+
"../blocks/src/system/blocks/newsletter-signup-destination.ts"() {
|
|
39565
|
+
"use strict";
|
|
39566
|
+
BLOCK_ID_PATTERN = /^[A-Za-z0-9._:-]{1,200}$/;
|
|
39567
|
+
SIGNED_DESTINATION_REF_PATTERN = /^[A-Za-z0-9._~-]{16,1000}$/;
|
|
39568
|
+
}
|
|
39569
|
+
});
|
|
39570
|
+
|
|
39291
39571
|
// ../blocks/src/system/runtime/nodes/newsletter-form.types.ts
|
|
39292
39572
|
function getPresetFields(preset2, options) {
|
|
39293
39573
|
const includePhone = Boolean(options?.includePhone);
|
|
@@ -39344,7 +39624,7 @@ var init_newsletter_form_types = __esm({
|
|
|
39344
39624
|
});
|
|
39345
39625
|
|
|
39346
39626
|
// ../blocks/src/system/runtime/nodes/newsletter-form.interactive.ts
|
|
39347
|
-
import { z as
|
|
39627
|
+
import { z as z65 } from "zod";
|
|
39348
39628
|
function buildNewsletterDisplay(source) {
|
|
39349
39629
|
const preset2 = source.preset ?? "emailOnly";
|
|
39350
39630
|
const includePhone = source.includePhone ?? false;
|
|
@@ -39357,56 +39637,87 @@ function buildNewsletterDisplay(source) {
|
|
|
39357
39637
|
fields: getPresetFields(preset2, { includePhone })
|
|
39358
39638
|
};
|
|
39359
39639
|
}
|
|
39360
|
-
|
|
39640
|
+
function parseRequiredNewsletterSignupBlockId(value) {
|
|
39641
|
+
const parsed = parseNewsletterSignupBlockId(value);
|
|
39642
|
+
if (!parsed) {
|
|
39643
|
+
throw new Error("Newsletter signup block destination ref requires blockId");
|
|
39644
|
+
}
|
|
39645
|
+
return parsed;
|
|
39646
|
+
}
|
|
39647
|
+
function parseRequiredSignedNewsletterDestinationRef(value) {
|
|
39648
|
+
const parsed = parseSignedNewsletterDestinationRef(value);
|
|
39649
|
+
if (!parsed) {
|
|
39650
|
+
throw new Error("Newsletter signup signed destination ref requires token");
|
|
39651
|
+
}
|
|
39652
|
+
return parsed;
|
|
39653
|
+
}
|
|
39654
|
+
var newsletterPresetSchema, newsletterDestinationProviderSchema, newsletterFieldSchema, newsletterSignupBlockIdSchema, signedNewsletterDestinationRefSchema, newsletterPublicDestinationRefSchema, newsletterSourceSchema, newsletterDisplaySchema, newsletterHydrationSchema, newsletterRenderSchema, newsletterIslandMetaCodec, newsletterIslandMetaKeys, newsletterFormBlockRuntime, newsletterFormInteractiveIslandPropsCodec;
|
|
39361
39655
|
var init_newsletter_form_interactive = __esm({
|
|
39362
39656
|
"../blocks/src/system/runtime/nodes/newsletter-form.interactive.ts"() {
|
|
39363
39657
|
"use strict";
|
|
39364
39658
|
init_islands();
|
|
39365
39659
|
init_runtime();
|
|
39660
|
+
init_newsletter_signup_destination();
|
|
39366
39661
|
init_newsletter_form_types();
|
|
39367
|
-
newsletterPresetSchema =
|
|
39368
|
-
|
|
39369
|
-
|
|
39370
|
-
|
|
39371
|
-
|
|
39372
|
-
|
|
39373
|
-
|
|
39374
|
-
|
|
39375
|
-
|
|
39376
|
-
|
|
39377
|
-
|
|
39378
|
-
|
|
39662
|
+
newsletterPresetSchema = z65.enum(["emailOnly", "emailName", "emailFirstLast", "emailNameCompany"]);
|
|
39663
|
+
newsletterDestinationProviderSchema = z65.enum(["riverbank", "mailchimp"]);
|
|
39664
|
+
newsletterFieldSchema = z65.object({
|
|
39665
|
+
id: z65.string(),
|
|
39666
|
+
type: z65.enum(["email", "text"]),
|
|
39667
|
+
label: z65.string(),
|
|
39668
|
+
required: z65.boolean(),
|
|
39669
|
+
placeholder: z65.string().optional()
|
|
39670
|
+
});
|
|
39671
|
+
newsletterSignupBlockIdSchema = z65.string().trim().min(1).transform(parseRequiredNewsletterSignupBlockId);
|
|
39672
|
+
signedNewsletterDestinationRefSchema = z65.string().trim().min(1).transform(parseRequiredSignedNewsletterDestinationRef);
|
|
39673
|
+
newsletterPublicDestinationRefSchema = z65.discriminatedUnion("tag", [
|
|
39674
|
+
z65.object({
|
|
39675
|
+
tag: z65.literal("block_ref"),
|
|
39676
|
+
blockId: newsletterSignupBlockIdSchema
|
|
39677
|
+
}),
|
|
39678
|
+
z65.object({
|
|
39679
|
+
tag: z65.literal("signed_destination_ref"),
|
|
39680
|
+
token: signedNewsletterDestinationRefSchema
|
|
39681
|
+
})
|
|
39682
|
+
]);
|
|
39683
|
+
newsletterSourceSchema = z65.object({
|
|
39684
|
+
blockId: z65.string().nullable().optional(),
|
|
39685
|
+
siteId: z65.string().optional(),
|
|
39686
|
+
apiBaseUrl: z65.string().optional(),
|
|
39687
|
+
listId: z65.string().nullable().optional(),
|
|
39688
|
+
destinationProvider: newsletterDestinationProviderSchema.nullable().optional(),
|
|
39379
39689
|
preset: newsletterPresetSchema.optional(),
|
|
39380
|
-
includePhone:
|
|
39381
|
-
buttonLabel:
|
|
39382
|
-
successMessage:
|
|
39383
|
-
privacyNote:
|
|
39384
|
-
tags:
|
|
39385
|
-
spamProtectionEnabled:
|
|
39386
|
-
className:
|
|
39387
|
-
});
|
|
39388
|
-
newsletterDisplaySchema =
|
|
39389
|
-
kind:
|
|
39390
|
-
className:
|
|
39391
|
-
buttonLabel:
|
|
39392
|
-
successMessage:
|
|
39393
|
-
privacyNote:
|
|
39394
|
-
fields:
|
|
39395
|
-
});
|
|
39396
|
-
newsletterHydrationSchema =
|
|
39397
|
-
|
|
39690
|
+
includePhone: z65.boolean().optional(),
|
|
39691
|
+
buttonLabel: z65.string().nullable().optional(),
|
|
39692
|
+
successMessage: z65.string().nullable().optional(),
|
|
39693
|
+
privacyNote: z65.string().nullable().optional(),
|
|
39694
|
+
tags: z65.string().nullable().optional(),
|
|
39695
|
+
spamProtectionEnabled: z65.boolean().optional(),
|
|
39696
|
+
className: z65.string().nullable().optional()
|
|
39697
|
+
});
|
|
39698
|
+
newsletterDisplaySchema = z65.object({
|
|
39699
|
+
kind: z65.literal("newsletter-form"),
|
|
39700
|
+
className: z65.string().nullable(),
|
|
39701
|
+
buttonLabel: z65.string(),
|
|
39702
|
+
successMessage: z65.string().nullable(),
|
|
39703
|
+
privacyNote: z65.string().nullable(),
|
|
39704
|
+
fields: z65.array(newsletterFieldSchema)
|
|
39705
|
+
});
|
|
39706
|
+
newsletterHydrationSchema = z65.object({
|
|
39707
|
+
destinationRef: newsletterPublicDestinationRefSchema.nullable().optional(),
|
|
39708
|
+
listId: z65.string().nullable().optional(),
|
|
39398
39709
|
preset: newsletterPresetSchema,
|
|
39399
|
-
includePhone:
|
|
39400
|
-
tags:
|
|
39401
|
-
spamProtectionEnabled:
|
|
39710
|
+
includePhone: z65.boolean(),
|
|
39711
|
+
tags: z65.string().nullable().optional(),
|
|
39712
|
+
spamProtectionEnabled: z65.boolean().optional()
|
|
39402
39713
|
});
|
|
39403
|
-
newsletterRenderSchema =
|
|
39714
|
+
newsletterRenderSchema = z65.object({
|
|
39404
39715
|
display: newsletterDisplaySchema,
|
|
39405
39716
|
hydration: newsletterHydrationSchema
|
|
39406
39717
|
});
|
|
39407
|
-
newsletterIslandMetaCodec = createZodCodec(
|
|
39408
|
-
siteId:
|
|
39409
|
-
apiBaseUrl:
|
|
39718
|
+
newsletterIslandMetaCodec = createZodCodec(z65.object({
|
|
39719
|
+
siteId: z65.string().optional(),
|
|
39720
|
+
apiBaseUrl: z65.string().optional()
|
|
39410
39721
|
}));
|
|
39411
39722
|
newsletterIslandMetaKeys = defineInteractiveIslandMetaKeys("siteId", "apiBaseUrl");
|
|
39412
39723
|
newsletterFormBlockRuntime = defineProgressiveBlockRuntime({
|
|
@@ -39415,16 +39726,20 @@ var init_newsletter_form_interactive = __esm({
|
|
|
39415
39726
|
source: createZodCodec(newsletterSourceSchema),
|
|
39416
39727
|
render: createZodCodec(newsletterRenderSchema)
|
|
39417
39728
|
},
|
|
39418
|
-
buildRender: (source) =>
|
|
39419
|
-
|
|
39420
|
-
|
|
39421
|
-
|
|
39422
|
-
|
|
39423
|
-
|
|
39424
|
-
|
|
39425
|
-
|
|
39426
|
-
|
|
39427
|
-
|
|
39729
|
+
buildRender: (source) => {
|
|
39730
|
+
const runtimeSource = deriveNewsletterSignupRuntimeSource(source);
|
|
39731
|
+
return {
|
|
39732
|
+
display: buildNewsletterDisplay(source),
|
|
39733
|
+
hydration: {
|
|
39734
|
+
destinationRef: buildNewsletterSignupBlockRef(source.blockId),
|
|
39735
|
+
listId: runtimeSource.listId,
|
|
39736
|
+
preset: source.preset ?? "emailOnly",
|
|
39737
|
+
includePhone: source.includePhone ?? false,
|
|
39738
|
+
tags: runtimeSource.tags,
|
|
39739
|
+
spamProtectionEnabled: source.spamProtectionEnabled
|
|
39740
|
+
}
|
|
39741
|
+
};
|
|
39742
|
+
}
|
|
39428
39743
|
});
|
|
39429
39744
|
newsletterFormInteractiveIslandPropsCodec = createInteractiveIslandCodec({
|
|
39430
39745
|
runtime: newsletterFormBlockRuntime,
|
|
@@ -39449,6 +39764,7 @@ var init_newsletter_signup = __esm({
|
|
|
39449
39764
|
init_defineBlock();
|
|
39450
39765
|
init_fragments2();
|
|
39451
39766
|
init_newsletter_form_interactive();
|
|
39767
|
+
init_newsletter_signup_destination();
|
|
39452
39768
|
stackedComposition = composeFragments([
|
|
39453
39769
|
{ fragment: newsletterCopyFragment },
|
|
39454
39770
|
{ fragment: newsletterFormFragment }
|
|
@@ -39528,7 +39844,7 @@ var init_newsletter_signup = __esm({
|
|
|
39528
39844
|
});
|
|
39529
39845
|
|
|
39530
39846
|
// ../blocks/src/system/blocks/team-members.ts
|
|
39531
|
-
import { z as
|
|
39847
|
+
import { z as z66 } from "zod";
|
|
39532
39848
|
var ITEM_NAME2, teamMemberPhotoSchema, teamMemberDataSchema, teamMembersDataSchema, dynamicSourceWhen, manualSourceWhen, headingNode, wrapVariant3, teamMemberStackLayout, manualGridMembersNode, dynamicGridMembersNode, gridVariant, manualStackMembersNode, dynamicStackMembersNode, stackVariant, teamMembersManifest, teamMembersBlockDefinition;
|
|
39533
39849
|
var init_team_members = __esm({
|
|
39534
39850
|
"../blocks/src/system/blocks/team-members.ts"() {
|
|
@@ -39545,18 +39861,18 @@ var init_team_members = __esm({
|
|
|
39545
39861
|
teamMemberPhotoSchema = mediaSchema2.refine((media2) => media2.type === "image", {
|
|
39546
39862
|
message: "Team member photos must be image media"
|
|
39547
39863
|
}).nullable();
|
|
39548
|
-
teamMemberDataSchema =
|
|
39549
|
-
_type:
|
|
39550
|
-
id:
|
|
39551
|
-
name:
|
|
39552
|
-
role:
|
|
39553
|
-
roleLabel:
|
|
39554
|
-
bio:
|
|
39555
|
-
summary:
|
|
39864
|
+
teamMemberDataSchema = z66.object({
|
|
39865
|
+
_type: z66.literal("teamMember"),
|
|
39866
|
+
id: z66.string(),
|
|
39867
|
+
name: z66.string(),
|
|
39868
|
+
role: z66.string().nullable(),
|
|
39869
|
+
roleLabel: z66.string().nullable(),
|
|
39870
|
+
bio: z66.string().nullable(),
|
|
39871
|
+
summary: z66.string().nullable(),
|
|
39556
39872
|
photo: teamMemberPhotoSchema,
|
|
39557
|
-
profilePath:
|
|
39873
|
+
profilePath: z66.string().nullable()
|
|
39558
39874
|
});
|
|
39559
|
-
teamMembersDataSchema =
|
|
39875
|
+
teamMembersDataSchema = z66.array(teamMemberDataSchema);
|
|
39560
39876
|
dynamicSourceWhen = { equals: "site_staff" };
|
|
39561
39877
|
manualSourceWhen = { equals: "site_staff", not: true };
|
|
39562
39878
|
headingNode = text(
|
|
@@ -41670,7 +41986,7 @@ var init_transforms = __esm({
|
|
|
41670
41986
|
|
|
41671
41987
|
// ../blocks/src/system/data/linkedContentEntries.ts
|
|
41672
41988
|
function coerceLinkedContentEntriesPayload(payload) {
|
|
41673
|
-
if (!
|
|
41989
|
+
if (!isRecord8(payload)) return payload;
|
|
41674
41990
|
const response = payload;
|
|
41675
41991
|
if (!Array.isArray(response.entries)) return payload;
|
|
41676
41992
|
const contentType = parsePublicContentTypeMeta(response.contentType);
|
|
@@ -41678,12 +41994,12 @@ function coerceLinkedContentEntriesPayload(payload) {
|
|
|
41678
41994
|
return response.entries.map((entry) => enrichLinkedContentEntry(entry, contentType));
|
|
41679
41995
|
}
|
|
41680
41996
|
function enrichLinkedContentEntry(entry, contentType) {
|
|
41681
|
-
if (!
|
|
41997
|
+
if (!isRecord8(entry)) return entry;
|
|
41682
41998
|
const entryId = typeof entry.id === "string" ? entry.id : null;
|
|
41683
41999
|
if (!entryId) return entry;
|
|
41684
42000
|
const title = typeof entry.title === "string" && entry.title.trim().length > 0 ? entry.title : entryId;
|
|
41685
42001
|
const optimisticHash = typeof entry.optimisticHash === "string" && entry.optimisticHash.length > 0 ? entry.optimisticHash : null;
|
|
41686
|
-
const content =
|
|
42002
|
+
const content = isRecord8(entry.content) ? entry.content : {};
|
|
41687
42003
|
const meta = {
|
|
41688
42004
|
kind: "linked-content-entry",
|
|
41689
42005
|
entryId,
|
|
@@ -41776,7 +42092,7 @@ function capitalize(value) {
|
|
|
41776
42092
|
return value.charAt(0).toUpperCase() + value.slice(1).toLowerCase();
|
|
41777
42093
|
}
|
|
41778
42094
|
function parsePublicContentTypeMeta(value) {
|
|
41779
|
-
if (!
|
|
42095
|
+
if (!isRecord8(value)) return null;
|
|
41780
42096
|
if (typeof value.key !== "string" || value.key.trim().length === 0) return null;
|
|
41781
42097
|
return {
|
|
41782
42098
|
key: value.key,
|
|
@@ -41786,7 +42102,7 @@ function parsePublicContentTypeMeta(value) {
|
|
|
41786
42102
|
};
|
|
41787
42103
|
}
|
|
41788
42104
|
function parsePublicContentTypeLinkedEntryEditing(value) {
|
|
41789
|
-
if (!
|
|
42105
|
+
if (!isRecord8(value) || typeof value.kind !== "string") return null;
|
|
41790
42106
|
switch (value.kind) {
|
|
41791
42107
|
case "generic":
|
|
41792
42108
|
return { kind: "generic" };
|
|
@@ -41800,7 +42116,7 @@ function parsePublicContentTypeLinkedEntryEditing(value) {
|
|
|
41800
42116
|
}
|
|
41801
42117
|
}
|
|
41802
42118
|
function parsePublicContentTypeFieldMeta(value) {
|
|
41803
|
-
if (!
|
|
42119
|
+
if (!isRecord8(value)) return [];
|
|
41804
42120
|
if (typeof value.id !== "string" || typeof value.type !== "string") return [];
|
|
41805
42121
|
return [{
|
|
41806
42122
|
id: value.id,
|
|
@@ -41814,7 +42130,7 @@ function parseStringArray(value) {
|
|
|
41814
42130
|
if (!Array.isArray(value)) return null;
|
|
41815
42131
|
return value.filter((item) => typeof item === "string");
|
|
41816
42132
|
}
|
|
41817
|
-
function
|
|
42133
|
+
function isRecord8(value) {
|
|
41818
42134
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
41819
42135
|
}
|
|
41820
42136
|
var LINKED_CONTENT_ENTRY_META_KEY;
|
|
@@ -43607,30 +43923,30 @@ var init_Button = __esm({
|
|
|
43607
43923
|
});
|
|
43608
43924
|
|
|
43609
43925
|
// ../blocks/src/structure/schema.ts
|
|
43610
|
-
import
|
|
43926
|
+
import z67 from "zod";
|
|
43611
43927
|
var BlockKind, blockSchema, pagePath, pageOutlineSchema;
|
|
43612
43928
|
var init_schema4 = __esm({
|
|
43613
43929
|
"../blocks/src/structure/schema.ts"() {
|
|
43614
43930
|
"use strict";
|
|
43615
|
-
BlockKind =
|
|
43616
|
-
blockSchema =
|
|
43617
|
-
id:
|
|
43931
|
+
BlockKind = z67.string();
|
|
43932
|
+
blockSchema = z67.object({
|
|
43933
|
+
id: z67.string().nullable(),
|
|
43618
43934
|
// optional ID for reference in toggle ops
|
|
43619
43935
|
kind: BlockKind,
|
|
43620
|
-
purpose:
|
|
43936
|
+
purpose: z67.string().min(1),
|
|
43621
43937
|
// Optional content fields used by PageRenderer / block runtime.
|
|
43622
|
-
content:
|
|
43938
|
+
content: z67.record(z67.string(), z67.unknown()).optional(),
|
|
43623
43939
|
// Nullable because some persisted sources store "no draft" as null.
|
|
43624
|
-
draftContent:
|
|
43940
|
+
draftContent: z67.record(z67.string(), z67.unknown()).nullable().optional(),
|
|
43625
43941
|
// Optional template bindings for reverse field mapping (entry editing)
|
|
43626
|
-
bindings:
|
|
43942
|
+
bindings: z67.record(z67.string(), z67.unknown()).optional()
|
|
43627
43943
|
}).passthrough();
|
|
43628
|
-
pagePath =
|
|
43629
|
-
pageOutlineSchema =
|
|
43630
|
-
name:
|
|
43944
|
+
pagePath = z67.string().regex(/^\/[\S]*$/, 'path must start with "/" and contain no spaces');
|
|
43945
|
+
pageOutlineSchema = z67.object({
|
|
43946
|
+
name: z67.string().min(1),
|
|
43631
43947
|
path: pagePath,
|
|
43632
|
-
purpose:
|
|
43633
|
-
blocks:
|
|
43948
|
+
purpose: z67.string().min(1),
|
|
43949
|
+
blocks: z67.array(blockSchema).min(1)
|
|
43634
43950
|
});
|
|
43635
43951
|
}
|
|
43636
43952
|
});
|
|
@@ -43742,7 +44058,7 @@ var init_fonts = __esm({
|
|
|
43742
44058
|
});
|
|
43743
44059
|
|
|
43744
44060
|
// ../theme-core/src/runtime/buildThemeRuntimeFromBridge.ts
|
|
43745
|
-
import { z as
|
|
44061
|
+
import { z as z68 } from "zod";
|
|
43746
44062
|
var themeBridgeConfigSchema;
|
|
43747
44063
|
var init_buildThemeRuntimeFromBridge = __esm({
|
|
43748
44064
|
"../theme-core/src/runtime/buildThemeRuntimeFromBridge.ts"() {
|
|
@@ -43757,33 +44073,33 @@ var init_buildThemeRuntimeFromBridge = __esm({
|
|
|
43757
44073
|
init_progress();
|
|
43758
44074
|
init_blocks2();
|
|
43759
44075
|
init_themeCssVarNames();
|
|
43760
|
-
themeBridgeConfigSchema =
|
|
43761
|
-
tokens:
|
|
43762
|
-
typography:
|
|
43763
|
-
headingFamily:
|
|
43764
|
-
bodyFamily:
|
|
43765
|
-
headingWeight:
|
|
43766
|
-
bodyWeight:
|
|
44076
|
+
themeBridgeConfigSchema = z68.object({
|
|
44077
|
+
tokens: z68.record(z68.string(), z68.string()),
|
|
44078
|
+
typography: z68.object({
|
|
44079
|
+
headingFamily: z68.string().optional(),
|
|
44080
|
+
bodyFamily: z68.string().optional(),
|
|
44081
|
+
headingWeight: z68.number().optional(),
|
|
44082
|
+
bodyWeight: z68.number().optional()
|
|
43767
44083
|
}).optional(),
|
|
43768
|
-
spacing:
|
|
43769
|
-
corners:
|
|
43770
|
-
shadows:
|
|
43771
|
-
components:
|
|
43772
|
-
buttons:
|
|
43773
|
-
|
|
43774
|
-
|
|
43775
|
-
variants:
|
|
44084
|
+
spacing: z68.enum(["comfortable", "standard", "dense"]).optional(),
|
|
44085
|
+
corners: z68.enum(["square", "soft", "rounded", "pill"]).optional(),
|
|
44086
|
+
shadows: z68.enum(["none", "low", "medium", "high"]).optional(),
|
|
44087
|
+
components: z68.object({
|
|
44088
|
+
buttons: z68.union([
|
|
44089
|
+
z68.boolean(),
|
|
44090
|
+
z68.object({
|
|
44091
|
+
variants: z68.array(z68.enum(["primary", "secondary", "outline", "ghost"])).optional()
|
|
43776
44092
|
})
|
|
43777
44093
|
]).optional(),
|
|
43778
|
-
cards:
|
|
43779
|
-
|
|
43780
|
-
|
|
43781
|
-
variants:
|
|
44094
|
+
cards: z68.union([
|
|
44095
|
+
z68.boolean(),
|
|
44096
|
+
z68.object({
|
|
44097
|
+
variants: z68.array(z68.enum(["default", "elevated", "outlined"])).optional()
|
|
43782
44098
|
})
|
|
43783
44099
|
]).optional(),
|
|
43784
|
-
inputs:
|
|
44100
|
+
inputs: z68.boolean().optional()
|
|
43785
44101
|
}).optional(),
|
|
43786
|
-
overrides:
|
|
44102
|
+
overrides: z68.record(z68.string(), z68.string()).optional()
|
|
43787
44103
|
}).passthrough();
|
|
43788
44104
|
}
|
|
43789
44105
|
});
|
|
@@ -44253,7 +44569,7 @@ var init_src3 = __esm({
|
|
|
44253
44569
|
});
|
|
44254
44570
|
|
|
44255
44571
|
// ../api/src/sdkConfig/contracts.ts
|
|
44256
|
-
import { z as
|
|
44572
|
+
import { z as z69 } from "zod";
|
|
44257
44573
|
function unsafeRetypeZodSchema(schema) {
|
|
44258
44574
|
return schema;
|
|
44259
44575
|
}
|
|
@@ -44262,17 +44578,17 @@ var init_contracts2 = __esm({
|
|
|
44262
44578
|
"../api/src/sdkConfig/contracts.ts"() {
|
|
44263
44579
|
"use strict";
|
|
44264
44580
|
init_src3();
|
|
44265
|
-
navIdListSchema =
|
|
44581
|
+
navIdListSchema = z69.preprocess((value) => {
|
|
44266
44582
|
if (!Array.isArray(value)) return void 0;
|
|
44267
44583
|
const filtered = value.filter((v) => typeof v === "string" && v.trim().length > 0);
|
|
44268
44584
|
return filtered.length > 0 ? filtered : void 0;
|
|
44269
|
-
},
|
|
44270
|
-
dashboardNavVisibilityBaseSchema =
|
|
44271
|
-
mode:
|
|
44585
|
+
}, z69.array(z69.string()).max(200).optional());
|
|
44586
|
+
dashboardNavVisibilityBaseSchema = z69.object({
|
|
44587
|
+
mode: z69.enum(["augment", "restrict"]).optional(),
|
|
44272
44588
|
allowIds: navIdListSchema,
|
|
44273
44589
|
denyIds: navIdListSchema
|
|
44274
44590
|
}).strip();
|
|
44275
|
-
dashboardNavVisibilityRolesSchema =
|
|
44591
|
+
dashboardNavVisibilityRolesSchema = z69.object({
|
|
44276
44592
|
administrator: dashboardNavVisibilityBaseSchema.optional(),
|
|
44277
44593
|
editor: dashboardNavVisibilityBaseSchema.optional(),
|
|
44278
44594
|
team_member: dashboardNavVisibilityBaseSchema.optional()
|
|
@@ -44280,63 +44596,63 @@ var init_contracts2 = __esm({
|
|
|
44280
44596
|
dashboardNavVisibilitySchema = dashboardNavVisibilityBaseSchema.extend({
|
|
44281
44597
|
roles: dashboardNavVisibilityRolesSchema
|
|
44282
44598
|
}).strip();
|
|
44283
|
-
dashboardNavigationConfigSchema =
|
|
44599
|
+
dashboardNavigationConfigSchema = z69.object({
|
|
44284
44600
|
siteNav: dashboardNavVisibilitySchema.optional(),
|
|
44285
44601
|
settingsNav: dashboardNavVisibilitySchema.optional()
|
|
44286
44602
|
}).strip();
|
|
44287
|
-
dashboardConfigSchema =
|
|
44288
|
-
previewEditingEnabled:
|
|
44603
|
+
dashboardConfigSchema = z69.object({
|
|
44604
|
+
previewEditingEnabled: z69.boolean().optional(),
|
|
44289
44605
|
navigation: dashboardNavigationConfigSchema.optional()
|
|
44290
44606
|
}).strip();
|
|
44291
44607
|
fieldDefinitionInputSchema = unsafeRetypeZodSchema(fieldSchema);
|
|
44292
44608
|
nodeDefinitionSchema = unsafeRetypeZodSchema(NodeSchema);
|
|
44293
|
-
sdkLoaderEndpointSchema =
|
|
44294
|
-
loaderFallbackScalarSchema =
|
|
44295
|
-
|
|
44296
|
-
|
|
44297
|
-
|
|
44298
|
-
|
|
44609
|
+
sdkLoaderEndpointSchema = z69.enum(SUPPORTED_LOADER_ENDPOINTS);
|
|
44610
|
+
loaderFallbackScalarSchema = z69.union([
|
|
44611
|
+
z69.string(),
|
|
44612
|
+
z69.number(),
|
|
44613
|
+
z69.boolean(),
|
|
44614
|
+
z69.null()
|
|
44299
44615
|
]);
|
|
44300
|
-
loaderParamBindingSchema =
|
|
44301
|
-
$bind:
|
|
44302
|
-
from:
|
|
44616
|
+
loaderParamBindingSchema = z69.object({
|
|
44617
|
+
$bind: z69.object({
|
|
44618
|
+
from: z69.string().min(1, "Binding path is required"),
|
|
44303
44619
|
fallback: loaderFallbackScalarSchema.optional()
|
|
44304
44620
|
})
|
|
44305
44621
|
});
|
|
44306
|
-
loaderParamValueSchema =
|
|
44307
|
-
|
|
44308
|
-
|
|
44309
|
-
|
|
44622
|
+
loaderParamValueSchema = z69.union([
|
|
44623
|
+
z69.string(),
|
|
44624
|
+
z69.number(),
|
|
44625
|
+
z69.boolean(),
|
|
44310
44626
|
loaderParamBindingSchema
|
|
44311
44627
|
]);
|
|
44312
|
-
sdkConfigLoaderSchema =
|
|
44628
|
+
sdkConfigLoaderSchema = z69.object({
|
|
44313
44629
|
endpoint: sdkLoaderEndpointSchema,
|
|
44314
|
-
params:
|
|
44315
|
-
mode:
|
|
44630
|
+
params: z69.record(z69.string(), loaderParamValueSchema),
|
|
44631
|
+
mode: z69.enum(["server", "client"]).default("server")
|
|
44316
44632
|
});
|
|
44317
|
-
sdkDataLoadersSchema =
|
|
44318
|
-
sdkCustomBlockIdSchema =
|
|
44633
|
+
sdkDataLoadersSchema = z69.record(z69.string(), sdkConfigLoaderSchema).refine((loaders) => Object.keys(loaders).length <= 5, { message: "Maximum 5 data loaders per block" }).optional();
|
|
44634
|
+
sdkCustomBlockIdSchema = z69.string().min(8).regex(/^custom\.[a-z][a-z0-9-]*$/, {
|
|
44319
44635
|
message: "Block ID must start with 'custom.' followed by lowercase letters, numbers, or hyphens"
|
|
44320
44636
|
}).transform((value) => value);
|
|
44321
|
-
sdkCustomBlockInputSchema =
|
|
44637
|
+
sdkCustomBlockInputSchema = z69.object({
|
|
44322
44638
|
id: sdkCustomBlockIdSchema,
|
|
44323
|
-
title:
|
|
44324
|
-
titleSource:
|
|
44325
|
-
description:
|
|
44639
|
+
title: z69.string().min(1),
|
|
44640
|
+
titleSource: z69.union([z69.string().min(1), z69.array(z69.string().min(1)).min(1)]).optional(),
|
|
44641
|
+
description: z69.string().optional(),
|
|
44326
44642
|
category: blockCategoryEnum,
|
|
44327
|
-
icon:
|
|
44328
|
-
tags:
|
|
44643
|
+
icon: z69.string().optional(),
|
|
44644
|
+
tags: z69.array(z69.string()).optional(),
|
|
44329
44645
|
fields: fieldDefinitionInputSchema.array().min(1),
|
|
44330
44646
|
dataLoaders: sdkDataLoadersSchema,
|
|
44331
44647
|
layout: NodeSchema.optional(),
|
|
44332
|
-
variants:
|
|
44333
|
-
defaultVariant:
|
|
44334
|
-
variantOptions:
|
|
44335
|
-
|
|
44336
|
-
|
|
44337
|
-
label:
|
|
44338
|
-
description:
|
|
44339
|
-
icon:
|
|
44648
|
+
variants: z69.record(z69.string().min(1), NodeSchema).optional(),
|
|
44649
|
+
defaultVariant: z69.string().min(1).optional(),
|
|
44650
|
+
variantOptions: z69.record(
|
|
44651
|
+
z69.string().min(1),
|
|
44652
|
+
z69.object({
|
|
44653
|
+
label: z69.string().min(1).optional(),
|
|
44654
|
+
description: z69.string().min(1).optional(),
|
|
44655
|
+
icon: z69.string().min(1).optional()
|
|
44340
44656
|
})
|
|
44341
44657
|
).optional(),
|
|
44342
44658
|
previewCustomize: previewCustomizeManifestCurationSchema.optional()
|
|
@@ -44347,7 +44663,7 @@ var init_contracts2 = __esm({
|
|
|
44347
44663
|
const exists = data.fields.some((field) => field.id === source);
|
|
44348
44664
|
if (!exists) {
|
|
44349
44665
|
ctx.addIssue({
|
|
44350
|
-
code:
|
|
44666
|
+
code: z69.ZodIssueCode.custom,
|
|
44351
44667
|
message: `titleSource must reference a valid field ID (got "${source}")`,
|
|
44352
44668
|
path: Array.isArray(data.titleSource) ? ["titleSource", index] : ["titleSource"]
|
|
44353
44669
|
});
|
|
@@ -44356,7 +44672,7 @@ var init_contracts2 = __esm({
|
|
|
44356
44672
|
}
|
|
44357
44673
|
if (data.layout && data.variants) {
|
|
44358
44674
|
ctx.addIssue({
|
|
44359
|
-
code:
|
|
44675
|
+
code: z69.ZodIssueCode.custom,
|
|
44360
44676
|
message: "Custom block must define either `layout` or `variants`, not both",
|
|
44361
44677
|
path: ["variants"]
|
|
44362
44678
|
});
|
|
@@ -44365,14 +44681,14 @@ var init_contracts2 = __esm({
|
|
|
44365
44681
|
const keys = Object.keys(data.variants);
|
|
44366
44682
|
if (keys.length === 0) {
|
|
44367
44683
|
ctx.addIssue({
|
|
44368
|
-
code:
|
|
44684
|
+
code: z69.ZodIssueCode.custom,
|
|
44369
44685
|
message: "`variants` must contain at least one variant key",
|
|
44370
44686
|
path: ["variants"]
|
|
44371
44687
|
});
|
|
44372
44688
|
}
|
|
44373
44689
|
if (data.defaultVariant && !Object.prototype.hasOwnProperty.call(data.variants, data.defaultVariant)) {
|
|
44374
44690
|
ctx.addIssue({
|
|
44375
|
-
code:
|
|
44691
|
+
code: z69.ZodIssueCode.custom,
|
|
44376
44692
|
message: "`defaultVariant` must be a key present in `variants`",
|
|
44377
44693
|
path: ["defaultVariant"]
|
|
44378
44694
|
});
|
|
@@ -44381,7 +44697,7 @@ var init_contracts2 = __esm({
|
|
|
44381
44697
|
for (const key of Object.keys(data.variantOptions)) {
|
|
44382
44698
|
if (!Object.prototype.hasOwnProperty.call(data.variants, key)) {
|
|
44383
44699
|
ctx.addIssue({
|
|
44384
|
-
code:
|
|
44700
|
+
code: z69.ZodIssueCode.custom,
|
|
44385
44701
|
message: "`variantOptions` key must exist in `variants`",
|
|
44386
44702
|
path: ["variantOptions", key]
|
|
44387
44703
|
});
|
|
@@ -44390,78 +44706,78 @@ var init_contracts2 = __esm({
|
|
|
44390
44706
|
}
|
|
44391
44707
|
}
|
|
44392
44708
|
});
|
|
44393
|
-
sdkBlockFieldExtensionInputSchema =
|
|
44709
|
+
sdkBlockFieldExtensionInputSchema = z69.object({
|
|
44394
44710
|
fields: fieldDefinitionInputSchema.array().min(1)
|
|
44395
44711
|
});
|
|
44396
|
-
sdkBlockFieldExtensionsInputSchema =
|
|
44397
|
-
|
|
44712
|
+
sdkBlockFieldExtensionsInputSchema = z69.record(
|
|
44713
|
+
z69.string().min(1),
|
|
44398
44714
|
sdkBlockFieldExtensionInputSchema
|
|
44399
44715
|
);
|
|
44400
|
-
sdkThemePaletteSchema =
|
|
44401
|
-
sdkThemeConfigSchema =
|
|
44716
|
+
sdkThemePaletteSchema = z69.record(z69.string(), z69.string());
|
|
44717
|
+
sdkThemeConfigSchema = z69.object({
|
|
44402
44718
|
palette: sdkThemePaletteSchema
|
|
44403
44719
|
});
|
|
44404
|
-
sdkSectionBackgroundSchema =
|
|
44405
|
-
id:
|
|
44406
|
-
label:
|
|
44407
|
-
token:
|
|
44720
|
+
sdkSectionBackgroundSchema = z69.object({
|
|
44721
|
+
id: z69.string().min(1),
|
|
44722
|
+
label: z69.string().min(1),
|
|
44723
|
+
token: z69.string().min(1)
|
|
44408
44724
|
});
|
|
44409
|
-
sdkSectionOptionsConfigSchema =
|
|
44410
|
-
backgroundColor:
|
|
44411
|
-
backgroundImage:
|
|
44412
|
-
backgroundGradient:
|
|
44413
|
-
spacing:
|
|
44414
|
-
textColor:
|
|
44725
|
+
sdkSectionOptionsConfigSchema = z69.object({
|
|
44726
|
+
backgroundColor: z69.boolean().optional(),
|
|
44727
|
+
backgroundImage: z69.boolean().optional(),
|
|
44728
|
+
backgroundGradient: z69.boolean().optional(),
|
|
44729
|
+
spacing: z69.union([z69.array(z69.enum(["compact", "default", "spacious"])), z69.boolean()]).optional(),
|
|
44730
|
+
textColor: z69.boolean().optional()
|
|
44415
44731
|
});
|
|
44416
|
-
sdkContainerOptionsConfigSchema =
|
|
44417
|
-
maxWidth:
|
|
44418
|
-
alignment:
|
|
44732
|
+
sdkContainerOptionsConfigSchema = z69.object({
|
|
44733
|
+
maxWidth: z69.union([z69.array(z69.enum(["narrow", "default", "wide", "full"])), z69.boolean()]).optional(),
|
|
44734
|
+
alignment: z69.union([z69.array(z69.enum(["left", "center", "right"])), z69.boolean()]).optional()
|
|
44419
44735
|
});
|
|
44420
|
-
sdkSiteStyleConfigSchema =
|
|
44421
|
-
sectionBackgrounds:
|
|
44736
|
+
sdkSiteStyleConfigSchema = z69.object({
|
|
44737
|
+
sectionBackgrounds: z69.array(sdkSectionBackgroundSchema).optional(),
|
|
44422
44738
|
sectionOptions: sdkSectionOptionsConfigSchema.optional(),
|
|
44423
44739
|
containerOptions: sdkContainerOptionsConfigSchema.optional()
|
|
44424
44740
|
});
|
|
44425
|
-
sdkSiteLayoutConfigSchema =
|
|
44426
|
-
footerBlocks:
|
|
44427
|
-
|
|
44428
|
-
id:
|
|
44429
|
-
kind:
|
|
44430
|
-
content:
|
|
44741
|
+
sdkSiteLayoutConfigSchema = z69.object({
|
|
44742
|
+
footerBlocks: z69.array(
|
|
44743
|
+
z69.object({
|
|
44744
|
+
id: z69.string().min(1).optional(),
|
|
44745
|
+
kind: z69.string().min(1),
|
|
44746
|
+
content: z69.record(z69.string(), z69.unknown()).optional()
|
|
44431
44747
|
})
|
|
44432
44748
|
).optional()
|
|
44433
44749
|
});
|
|
44434
|
-
sdkFieldSelectOptionSchema =
|
|
44435
|
-
value:
|
|
44436
|
-
label:
|
|
44750
|
+
sdkFieldSelectOptionSchema = z69.object({
|
|
44751
|
+
value: z69.string(),
|
|
44752
|
+
label: z69.string()
|
|
44437
44753
|
});
|
|
44438
|
-
sdkBlockFieldConfigSchema =
|
|
44439
|
-
options:
|
|
44754
|
+
sdkBlockFieldConfigSchema = z69.object({
|
|
44755
|
+
options: z69.array(sdkFieldSelectOptionSchema).optional()
|
|
44440
44756
|
});
|
|
44441
|
-
sdkBlockFieldOptionsMapSchema =
|
|
44442
|
-
|
|
44757
|
+
sdkBlockFieldOptionsMapSchema = z69.record(
|
|
44758
|
+
z69.string().regex(/^(block\.|custom\.)[a-z][a-z0-9-]*$/, {
|
|
44443
44759
|
message: "Block ID must be 'block.*' or 'custom.*' format"
|
|
44444
44760
|
}),
|
|
44445
|
-
|
|
44761
|
+
z69.record(z69.string().min(1), sdkBlockFieldConfigSchema)
|
|
44446
44762
|
).optional();
|
|
44447
|
-
sdkContentTypeTemplateConfigSchema =
|
|
44448
|
-
blocks:
|
|
44763
|
+
sdkContentTypeTemplateConfigSchema = z69.object({
|
|
44764
|
+
blocks: z69.array(z69.unknown())
|
|
44449
44765
|
}).passthrough();
|
|
44450
|
-
sdkContentTypeOrderingConfigSchema =
|
|
44451
|
-
mode:
|
|
44766
|
+
sdkContentTypeOrderingConfigSchema = z69.object({
|
|
44767
|
+
mode: z69.enum(["default", "manual"]).optional()
|
|
44452
44768
|
}).optional();
|
|
44453
|
-
sdkContentTypeConfigSchema =
|
|
44454
|
-
key:
|
|
44455
|
-
fields:
|
|
44769
|
+
sdkContentTypeConfigSchema = z69.object({
|
|
44770
|
+
key: z69.string().min(1),
|
|
44771
|
+
fields: z69.array(z69.unknown()),
|
|
44456
44772
|
ordering: sdkContentTypeOrderingConfigSchema,
|
|
44457
44773
|
template: sdkContentTypeTemplateConfigSchema.nullable().optional()
|
|
44458
44774
|
}).passthrough();
|
|
44459
|
-
sdkContentConfigSchema =
|
|
44460
|
-
contentTypes:
|
|
44461
|
-
pages:
|
|
44462
|
-
entries:
|
|
44463
|
-
navigationMenus:
|
|
44464
|
-
settings:
|
|
44775
|
+
sdkContentConfigSchema = z69.object({
|
|
44776
|
+
contentTypes: z69.array(sdkContentTypeConfigSchema).optional(),
|
|
44777
|
+
pages: z69.array(z69.unknown()).optional(),
|
|
44778
|
+
entries: z69.array(z69.unknown()).optional(),
|
|
44779
|
+
navigationMenus: z69.array(z69.unknown()).optional(),
|
|
44780
|
+
settings: z69.unknown().optional()
|
|
44465
44781
|
}).passthrough();
|
|
44466
44782
|
SDK_WORKFLOW_ID_MAX_LENGTH = 120;
|
|
44467
44783
|
SDK_WORKFLOW_TITLE_MAX_LENGTH = 120;
|
|
@@ -44476,62 +44792,62 @@ var init_contracts2 = __esm({
|
|
|
44476
44792
|
SDK_WORKFLOW_CONFIRMATION_BODY_MAX_LENGTH = 500;
|
|
44477
44793
|
SDK_WORKFLOW_ID_PATTERN = /^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$/;
|
|
44478
44794
|
SDK_WORKFLOW_ENDPOINT_PATTERN = /^\//;
|
|
44479
|
-
sdkWorkflowIdSchema =
|
|
44795
|
+
sdkWorkflowIdSchema = z69.string().min(1).max(SDK_WORKFLOW_ID_MAX_LENGTH).regex(SDK_WORKFLOW_ID_PATTERN, {
|
|
44480
44796
|
message: "Workflow ID must start with a lowercase letter and use lowercase letters, numbers, dots, underscores, or hyphens"
|
|
44481
44797
|
});
|
|
44482
|
-
sdkWorkflowEndpointSchema =
|
|
44483
|
-
sdkWorkflowManualTriggerSchema =
|
|
44484
|
-
type:
|
|
44798
|
+
sdkWorkflowEndpointSchema = z69.string().min(1).max(SDK_WORKFLOW_ENDPOINT_MAX_LENGTH).regex(SDK_WORKFLOW_ENDPOINT_PATTERN, { message: 'Workflow endpoint must be a site-relative path starting with "/"' });
|
|
44799
|
+
sdkWorkflowManualTriggerSchema = z69.object({
|
|
44800
|
+
type: z69.literal("manual")
|
|
44485
44801
|
}).strict();
|
|
44486
|
-
sdkWorkflowTriggerFieldSchema =
|
|
44802
|
+
sdkWorkflowTriggerFieldSchema = z69.string().trim().min(1).max(SDK_WORKFLOW_TRIGGER_FIELD_MAX_LENGTH).refine((field) => !field.includes("."), {
|
|
44487
44803
|
message: "Workflow trigger fields must be top-level content field IDs, not paths"
|
|
44488
44804
|
});
|
|
44489
|
-
sdkWorkflowFieldChangedConditionSchema =
|
|
44805
|
+
sdkWorkflowFieldChangedConditionSchema = z69.object({
|
|
44490
44806
|
field: sdkWorkflowTriggerFieldSchema,
|
|
44491
|
-
changed:
|
|
44807
|
+
changed: z69.literal(true)
|
|
44492
44808
|
}).strict();
|
|
44493
|
-
sdkWorkflowFieldEmptyConditionSchema =
|
|
44809
|
+
sdkWorkflowFieldEmptyConditionSchema = z69.object({
|
|
44494
44810
|
field: sdkWorkflowTriggerFieldSchema,
|
|
44495
|
-
isEmpty:
|
|
44811
|
+
isEmpty: z69.boolean()
|
|
44496
44812
|
}).strict();
|
|
44497
|
-
sdkWorkflowEntryDraftUpdatedTriggerSchema =
|
|
44498
|
-
type:
|
|
44499
|
-
when:
|
|
44500
|
-
|
|
44813
|
+
sdkWorkflowEntryDraftUpdatedTriggerSchema = z69.object({
|
|
44814
|
+
type: z69.literal("entry.draft.updated"),
|
|
44815
|
+
when: z69.array(
|
|
44816
|
+
z69.union([
|
|
44501
44817
|
sdkWorkflowFieldChangedConditionSchema,
|
|
44502
44818
|
sdkWorkflowFieldEmptyConditionSchema
|
|
44503
44819
|
])
|
|
44504
44820
|
).min(1).max(SDK_WORKFLOW_TRIGGER_CONDITION_MAX_COUNT)
|
|
44505
44821
|
}).strict();
|
|
44506
|
-
sdkWorkflowTriggerSchema =
|
|
44822
|
+
sdkWorkflowTriggerSchema = z69.discriminatedUnion("type", [
|
|
44507
44823
|
sdkWorkflowManualTriggerSchema,
|
|
44508
44824
|
sdkWorkflowEntryDraftUpdatedTriggerSchema
|
|
44509
44825
|
]);
|
|
44510
|
-
sdkWorkflowConfirmationSchema =
|
|
44511
|
-
title:
|
|
44512
|
-
body:
|
|
44826
|
+
sdkWorkflowConfirmationSchema = z69.object({
|
|
44827
|
+
title: z69.string().trim().min(1).max(SDK_WORKFLOW_CONFIRMATION_TITLE_MAX_LENGTH),
|
|
44828
|
+
body: z69.string().trim().min(1).max(SDK_WORKFLOW_CONFIRMATION_BODY_MAX_LENGTH).optional()
|
|
44513
44829
|
}).strict();
|
|
44514
|
-
sdkWorkflowConfigSchema =
|
|
44830
|
+
sdkWorkflowConfigSchema = z69.object({
|
|
44515
44831
|
id: sdkWorkflowIdSchema,
|
|
44516
|
-
title:
|
|
44517
|
-
description:
|
|
44518
|
-
contentType:
|
|
44832
|
+
title: z69.string().trim().min(1).max(SDK_WORKFLOW_TITLE_MAX_LENGTH),
|
|
44833
|
+
description: z69.string().trim().min(1).max(SDK_WORKFLOW_DESCRIPTION_MAX_LENGTH).optional(),
|
|
44834
|
+
contentType: z69.string().trim().min(1).max(SDK_WORKFLOW_CONTENT_TYPE_MAX_LENGTH),
|
|
44519
44835
|
endpoint: sdkWorkflowEndpointSchema,
|
|
44520
|
-
triggers:
|
|
44836
|
+
triggers: z69.array(sdkWorkflowTriggerSchema).min(1).max(SDK_WORKFLOW_TRIGGER_MAX_COUNT),
|
|
44521
44837
|
confirmation: sdkWorkflowConfirmationSchema.optional()
|
|
44522
44838
|
}).strict();
|
|
44523
|
-
sdkWorkflowsSchema =
|
|
44839
|
+
sdkWorkflowsSchema = z69.array(sdkWorkflowConfigSchema).max(SDK_WORKFLOW_MAX_COUNT, "Maximum 50 workflows per site").refine((workflows) => {
|
|
44524
44840
|
const ids = workflows.map((workflow) => workflow.id);
|
|
44525
44841
|
return ids.length === new Set(ids).size;
|
|
44526
44842
|
}, { message: "Workflow IDs must be unique" }).optional();
|
|
44527
|
-
riverbankSiteConfigInputSchema =
|
|
44528
|
-
siteId:
|
|
44529
|
-
previewUrl:
|
|
44530
|
-
liveUrl:
|
|
44843
|
+
riverbankSiteConfigInputSchema = z69.object({
|
|
44844
|
+
siteId: z69.string().uuid(),
|
|
44845
|
+
previewUrl: z69.string().url().optional(),
|
|
44846
|
+
liveUrl: z69.string().url().optional(),
|
|
44531
44847
|
theme: sdkThemeConfigSchema.optional(),
|
|
44532
44848
|
styles: sdkSiteStyleConfigSchema.optional(),
|
|
44533
44849
|
layout: sdkSiteLayoutConfigSchema.optional(),
|
|
44534
|
-
customBlocks:
|
|
44850
|
+
customBlocks: z69.array(sdkCustomBlockInputSchema).max(100, "Maximum 100 custom blocks per site").refine((blocks) => {
|
|
44535
44851
|
const ids = blocks.map((b) => b.id);
|
|
44536
44852
|
return ids.length === new Set(ids).size;
|
|
44537
44853
|
}, { message: "Block IDs must be unique" }).optional(),
|
|
@@ -44539,22 +44855,22 @@ var init_contracts2 = __esm({
|
|
|
44539
44855
|
blockFieldExtensions: sdkBlockFieldExtensionsInputSchema.optional(),
|
|
44540
44856
|
workflows: sdkWorkflowsSchema,
|
|
44541
44857
|
content: sdkContentConfigSchema.optional(),
|
|
44542
|
-
contentDir:
|
|
44543
|
-
sync:
|
|
44544
|
-
existingEntries:
|
|
44858
|
+
contentDir: z69.string().optional(),
|
|
44859
|
+
sync: z69.object({
|
|
44860
|
+
existingEntries: z69.enum(["skip", "update"]).optional()
|
|
44545
44861
|
}).optional(),
|
|
44546
|
-
deploy:
|
|
44547
|
-
verifyCommand:
|
|
44548
|
-
prebuildOutput:
|
|
44862
|
+
deploy: z69.object({
|
|
44863
|
+
verifyCommand: z69.string().optional(),
|
|
44864
|
+
prebuildOutput: z69.string().optional()
|
|
44549
44865
|
}).optional(),
|
|
44550
|
-
themeSource:
|
|
44551
|
-
activeTheme:
|
|
44552
|
-
enablePortal:
|
|
44866
|
+
themeSource: z69.enum(["local", "cms"]).optional(),
|
|
44867
|
+
activeTheme: z69.string().optional(),
|
|
44868
|
+
enablePortal: z69.boolean().optional(),
|
|
44553
44869
|
dashboard: dashboardConfigSchema.optional()
|
|
44554
44870
|
}).strict();
|
|
44555
|
-
pushSdkConfigBodySchema =
|
|
44871
|
+
pushSdkConfigBodySchema = z69.object({
|
|
44556
44872
|
config: riverbankSiteConfigInputSchema,
|
|
44557
|
-
forceContentTypes:
|
|
44873
|
+
forceContentTypes: z69.boolean().optional()
|
|
44558
44874
|
}).strict();
|
|
44559
44875
|
}
|
|
44560
44876
|
});
|
|
@@ -44573,8 +44889,15 @@ var init_incrementalJson = __esm({
|
|
|
44573
44889
|
}
|
|
44574
44890
|
});
|
|
44575
44891
|
|
|
44892
|
+
// ../api/src/mailchimpIntegration.ts
|
|
44893
|
+
var init_mailchimpIntegration = __esm({
|
|
44894
|
+
"../api/src/mailchimpIntegration.ts"() {
|
|
44895
|
+
"use strict";
|
|
44896
|
+
}
|
|
44897
|
+
});
|
|
44898
|
+
|
|
44576
44899
|
// ../api/src/siteOnboarding.ts
|
|
44577
|
-
import { z as
|
|
44900
|
+
import { z as z70 } from "zod";
|
|
44578
44901
|
var LAUNCH_REQUIREMENT_OVERRIDE_DEFINITIONS, acknowledgeLaunchRequirementRequestSchema, goLiveSiteRequestSchema;
|
|
44579
44902
|
var init_siteOnboarding = __esm({
|
|
44580
44903
|
"../api/src/siteOnboarding.ts"() {
|
|
@@ -44585,24 +44908,24 @@ var init_siteOnboarding = __esm({
|
|
|
44585
44908
|
reason: "launch_anyway"
|
|
44586
44909
|
}
|
|
44587
44910
|
};
|
|
44588
|
-
acknowledgeLaunchRequirementRequestSchema =
|
|
44911
|
+
acknowledgeLaunchRequirementRequestSchema = z70.discriminatedUnion(
|
|
44589
44912
|
"requirementId",
|
|
44590
44913
|
[
|
|
44591
|
-
|
|
44592
|
-
requirementId:
|
|
44914
|
+
z70.object({
|
|
44915
|
+
requirementId: z70.literal("review_generated_site")
|
|
44593
44916
|
}),
|
|
44594
|
-
|
|
44595
|
-
requirementId:
|
|
44917
|
+
z70.object({
|
|
44918
|
+
requirementId: z70.literal(
|
|
44596
44919
|
LAUNCH_REQUIREMENT_OVERRIDE_DEFINITIONS.configure_appointments.requirementId
|
|
44597
44920
|
),
|
|
44598
|
-
overrideReason:
|
|
44921
|
+
overrideReason: z70.literal(
|
|
44599
44922
|
LAUNCH_REQUIREMENT_OVERRIDE_DEFINITIONS.configure_appointments.reason
|
|
44600
44923
|
)
|
|
44601
44924
|
})
|
|
44602
44925
|
]
|
|
44603
44926
|
);
|
|
44604
|
-
goLiveSiteRequestSchema =
|
|
44605
|
-
acceptExtraSiteCharge:
|
|
44927
|
+
goLiveSiteRequestSchema = z70.object({
|
|
44928
|
+
acceptExtraSiteCharge: z70.boolean().optional()
|
|
44606
44929
|
});
|
|
44607
44930
|
}
|
|
44608
44931
|
});
|
|
@@ -44756,7 +45079,7 @@ var init_bookingRefundOutcomes = __esm({
|
|
|
44756
45079
|
});
|
|
44757
45080
|
|
|
44758
45081
|
// ../api/src/bookingVerticals.ts
|
|
44759
|
-
import { z as
|
|
45082
|
+
import { z as z71 } from "zod";
|
|
44760
45083
|
function parseVerticalId(value) {
|
|
44761
45084
|
return typeof value === "string" && VERTICAL_ID_SET.has(value) ? value : null;
|
|
44762
45085
|
}
|
|
@@ -44937,39 +45260,39 @@ var init_bookingVerticals = __esm({
|
|
|
44937
45260
|
VERTICAL_PRESET_ID_SET = new Set(
|
|
44938
45261
|
VERTICAL_BOOKING_PRESETS.map((presetDefinition) => presetDefinition.id)
|
|
44939
45262
|
);
|
|
44940
|
-
VerticalIdSchema =
|
|
45263
|
+
VerticalIdSchema = z71.string().trim().transform((value, ctx) => {
|
|
44941
45264
|
const parsed = parseVerticalId(value);
|
|
44942
45265
|
if (!parsed) {
|
|
44943
45266
|
ctx.addIssue({
|
|
44944
|
-
code:
|
|
45267
|
+
code: z71.ZodIssueCode.custom,
|
|
44945
45268
|
message: "Unknown booking vertical"
|
|
44946
45269
|
});
|
|
44947
|
-
return
|
|
45270
|
+
return z71.NEVER;
|
|
44948
45271
|
}
|
|
44949
45272
|
return parsed;
|
|
44950
45273
|
});
|
|
44951
|
-
VerticalPresetIdSchema =
|
|
45274
|
+
VerticalPresetIdSchema = z71.string().trim().transform((value, ctx) => {
|
|
44952
45275
|
const parsed = parseVerticalPresetId(value);
|
|
44953
45276
|
if (!parsed) {
|
|
44954
45277
|
ctx.addIssue({
|
|
44955
|
-
code:
|
|
45278
|
+
code: z71.ZodIssueCode.custom,
|
|
44956
45279
|
message: "Unknown booking preset"
|
|
44957
45280
|
});
|
|
44958
|
-
return
|
|
45281
|
+
return z71.NEVER;
|
|
44959
45282
|
}
|
|
44960
45283
|
return parsed;
|
|
44961
45284
|
});
|
|
44962
|
-
BookingVerticalConfigSchema =
|
|
45285
|
+
BookingVerticalConfigSchema = z71.object({
|
|
44963
45286
|
verticalId: VerticalIdSchema.nullable(),
|
|
44964
|
-
selectedPresetIds:
|
|
45287
|
+
selectedPresetIds: z71.array(VerticalPresetIdSchema).max(20)
|
|
44965
45288
|
}).transform((value, ctx) => {
|
|
44966
45289
|
const resolved = resolveSiteVerticalBookingConfig(value);
|
|
44967
45290
|
if (resolved.kind === "invalid") {
|
|
44968
45291
|
ctx.addIssue({
|
|
44969
|
-
code:
|
|
45292
|
+
code: z71.ZodIssueCode.custom,
|
|
44970
45293
|
message: `Invalid booking vertical config: ${resolved.issues.join(", ")}`
|
|
44971
45294
|
});
|
|
44972
|
-
return
|
|
45295
|
+
return z71.NEVER;
|
|
44973
45296
|
}
|
|
44974
45297
|
return resolved.config;
|
|
44975
45298
|
});
|
|
@@ -44988,7 +45311,7 @@ var init_event_destination_policy = __esm({
|
|
|
44988
45311
|
});
|
|
44989
45312
|
|
|
44990
45313
|
// ../api/src/utils/isRecord.ts
|
|
44991
|
-
function
|
|
45314
|
+
function isRecord9(value) {
|
|
44992
45315
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
44993
45316
|
}
|
|
44994
45317
|
var init_isRecord = __esm({
|
|
@@ -45007,7 +45330,7 @@ var init_error_propagation = __esm({
|
|
|
45007
45330
|
});
|
|
45008
45331
|
|
|
45009
45332
|
// ../api/src/appointmentSetup.ts
|
|
45010
|
-
import { z as
|
|
45333
|
+
import { z as z72 } from "zod";
|
|
45011
45334
|
var APPOINTMENT_SETUP_MAX_MINUTES, appointmentSetupRefSchema, appointmentSetupVenueChoiceSchema, appointmentSetupPaymentDraftSchema, appointmentSetupServiceAssignmentDraftSchema, appointmentSetupServiceDraftSchema, appointmentSetupPractitionerDraftSchema, appointmentSetupWeeklyWindowDraftSchema, appointmentSetupStartTimePolicyDraftSchema, appointmentSetupAvailabilityDraftSchema, APPOINTMENT_DEFAULT_MIN_LEAD_MINUTES_MAX, APPOINTMENT_DEFAULT_MAX_BOOKING_NOTICE_MINUTES_MAX, appointmentSetupBookingNoticeSchema, applyAppointmentSetupRequestSchema;
|
|
45012
45335
|
var init_appointmentSetup = __esm({
|
|
45013
45336
|
"../api/src/appointmentSetup.ts"() {
|
|
@@ -45015,49 +45338,49 @@ var init_appointmentSetup = __esm({
|
|
|
45015
45338
|
init_envelope();
|
|
45016
45339
|
init_error_propagation();
|
|
45017
45340
|
APPOINTMENT_SETUP_MAX_MINUTES = 1440;
|
|
45018
|
-
appointmentSetupRefSchema =
|
|
45019
|
-
|
|
45020
|
-
|
|
45341
|
+
appointmentSetupRefSchema = z72.discriminatedUnion("kind", [
|
|
45342
|
+
z72.object({ kind: z72.literal("existing"), id: z72.string().min(1) }),
|
|
45343
|
+
z72.object({ kind: z72.literal("new"), draftId: z72.string().min(1) })
|
|
45021
45344
|
]);
|
|
45022
|
-
appointmentSetupVenueChoiceSchema =
|
|
45023
|
-
|
|
45024
|
-
|
|
45025
|
-
|
|
45026
|
-
kind:
|
|
45027
|
-
draftId:
|
|
45028
|
-
title:
|
|
45029
|
-
description:
|
|
45030
|
-
timezone:
|
|
45031
|
-
addressJson:
|
|
45032
|
-
locationJson:
|
|
45345
|
+
appointmentSetupVenueChoiceSchema = z72.discriminatedUnion("kind", [
|
|
45346
|
+
z72.object({ kind: z72.literal("none") }),
|
|
45347
|
+
z72.object({ kind: z72.literal("existing"), venueId: z72.string().min(1) }),
|
|
45348
|
+
z72.object({
|
|
45349
|
+
kind: z72.literal("create"),
|
|
45350
|
+
draftId: z72.string().min(1),
|
|
45351
|
+
title: z72.string().trim().min(1),
|
|
45352
|
+
description: z72.string().nullable(),
|
|
45353
|
+
timezone: z72.string().trim().min(1).nullable(),
|
|
45354
|
+
addressJson: z72.record(z72.string(), z72.unknown()),
|
|
45355
|
+
locationJson: z72.object({ lat: z72.number(), lng: z72.number() }).nullable()
|
|
45033
45356
|
})
|
|
45034
45357
|
]);
|
|
45035
|
-
appointmentSetupPaymentDraftSchema =
|
|
45036
|
-
priceType:
|
|
45037
|
-
});
|
|
45038
|
-
appointmentSetupServiceAssignmentDraftSchema =
|
|
45039
|
-
|
|
45040
|
-
|
|
45041
|
-
kind:
|
|
45042
|
-
resourceRefs:
|
|
45358
|
+
appointmentSetupPaymentDraftSchema = z72.object({
|
|
45359
|
+
priceType: z72.union([z72.literal("free"), z72.literal("paid")])
|
|
45360
|
+
});
|
|
45361
|
+
appointmentSetupServiceAssignmentDraftSchema = z72.discriminatedUnion("kind", [
|
|
45362
|
+
z72.object({ kind: z72.literal("all_practitioners") }),
|
|
45363
|
+
z72.object({
|
|
45364
|
+
kind: z72.literal("selected_practitioners"),
|
|
45365
|
+
resourceRefs: z72.array(appointmentSetupRefSchema)
|
|
45043
45366
|
})
|
|
45044
45367
|
]);
|
|
45045
|
-
appointmentSetupServiceDraftSchema =
|
|
45368
|
+
appointmentSetupServiceDraftSchema = z72.object({
|
|
45046
45369
|
ref: appointmentSetupRefSchema,
|
|
45047
|
-
title:
|
|
45048
|
-
description:
|
|
45049
|
-
durationMinutes:
|
|
45050
|
-
prepMinutes:
|
|
45051
|
-
cleanupMinutes:
|
|
45052
|
-
priceAmount:
|
|
45053
|
-
isActive:
|
|
45054
|
-
locationType:
|
|
45055
|
-
|
|
45056
|
-
|
|
45057
|
-
|
|
45370
|
+
title: z72.string().trim().min(1),
|
|
45371
|
+
description: z72.string().nullable(),
|
|
45372
|
+
durationMinutes: z72.number().int().positive().max(APPOINTMENT_SETUP_MAX_MINUTES),
|
|
45373
|
+
prepMinutes: z72.number().int().nonnegative().max(APPOINTMENT_SETUP_MAX_MINUTES).default(0),
|
|
45374
|
+
cleanupMinutes: z72.number().int().nonnegative().max(APPOINTMENT_SETUP_MAX_MINUTES).default(0),
|
|
45375
|
+
priceAmount: z72.number().int().nonnegative().nullable(),
|
|
45376
|
+
isActive: z72.boolean(),
|
|
45377
|
+
locationType: z72.union([
|
|
45378
|
+
z72.literal("virtual"),
|
|
45379
|
+
z72.literal("in_person"),
|
|
45380
|
+
z72.literal("hybrid")
|
|
45058
45381
|
]),
|
|
45059
45382
|
venue: appointmentSetupVenueChoiceSchema,
|
|
45060
|
-
timezone:
|
|
45383
|
+
timezone: z72.string().trim().min(1).nullable(),
|
|
45061
45384
|
payment: appointmentSetupPaymentDraftSchema,
|
|
45062
45385
|
assignment: appointmentSetupServiceAssignmentDraftSchema
|
|
45063
45386
|
}).superRefine((service, ctx) => {
|
|
@@ -45076,49 +45399,49 @@ var init_appointmentSetup = __esm({
|
|
|
45076
45399
|
});
|
|
45077
45400
|
}
|
|
45078
45401
|
});
|
|
45079
|
-
appointmentSetupPractitionerDraftSchema =
|
|
45402
|
+
appointmentSetupPractitionerDraftSchema = z72.object({
|
|
45080
45403
|
ref: appointmentSetupRefSchema,
|
|
45081
|
-
displayName:
|
|
45082
|
-
bio:
|
|
45083
|
-
timezone:
|
|
45084
|
-
colorHex:
|
|
45085
|
-
});
|
|
45086
|
-
appointmentSetupWeeklyWindowDraftSchema =
|
|
45087
|
-
weekday:
|
|
45088
|
-
startTime:
|
|
45089
|
-
endTime:
|
|
45090
|
-
});
|
|
45091
|
-
appointmentSetupStartTimePolicyDraftSchema =
|
|
45092
|
-
|
|
45093
|
-
|
|
45094
|
-
kind:
|
|
45095
|
-
intervalMinutes:
|
|
45096
|
-
|
|
45097
|
-
|
|
45098
|
-
|
|
45099
|
-
|
|
45100
|
-
|
|
45101
|
-
|
|
45404
|
+
displayName: z72.string().trim().min(1),
|
|
45405
|
+
bio: z72.string().nullable(),
|
|
45406
|
+
timezone: z72.string().trim().min(1),
|
|
45407
|
+
colorHex: z72.string().nullable()
|
|
45408
|
+
});
|
|
45409
|
+
appointmentSetupWeeklyWindowDraftSchema = z72.object({
|
|
45410
|
+
weekday: z72.number().int().min(0).max(6),
|
|
45411
|
+
startTime: z72.string(),
|
|
45412
|
+
endTime: z72.string()
|
|
45413
|
+
});
|
|
45414
|
+
appointmentSetupStartTimePolicyDraftSchema = z72.discriminatedUnion("kind", [
|
|
45415
|
+
z72.object({ kind: z72.literal("automatic_spacing") }),
|
|
45416
|
+
z72.object({
|
|
45417
|
+
kind: z72.literal("regular_interval"),
|
|
45418
|
+
intervalMinutes: z72.union([
|
|
45419
|
+
z72.literal(10),
|
|
45420
|
+
z72.literal(15),
|
|
45421
|
+
z72.literal(20),
|
|
45422
|
+
z72.literal(30),
|
|
45423
|
+
z72.literal(45),
|
|
45424
|
+
z72.literal(60)
|
|
45102
45425
|
])
|
|
45103
45426
|
})
|
|
45104
45427
|
]);
|
|
45105
|
-
appointmentSetupAvailabilityDraftSchema =
|
|
45106
|
-
kind:
|
|
45428
|
+
appointmentSetupAvailabilityDraftSchema = z72.object({
|
|
45429
|
+
kind: z72.literal("weekly_windows"),
|
|
45107
45430
|
resourceRef: appointmentSetupRefSchema,
|
|
45108
45431
|
serviceRef: appointmentSetupRefSchema.nullable(),
|
|
45109
|
-
windows:
|
|
45432
|
+
windows: z72.array(appointmentSetupWeeklyWindowDraftSchema),
|
|
45110
45433
|
startTimePolicy: appointmentSetupStartTimePolicyDraftSchema.optional()
|
|
45111
45434
|
});
|
|
45112
45435
|
APPOINTMENT_DEFAULT_MIN_LEAD_MINUTES_MAX = 28 * 24 * 60;
|
|
45113
45436
|
APPOINTMENT_DEFAULT_MAX_BOOKING_NOTICE_MINUTES_MAX = 10 * 365 * 24 * 60;
|
|
45114
|
-
appointmentSetupBookingNoticeSchema =
|
|
45115
|
-
minLeadMinutes:
|
|
45116
|
-
maxBookingNoticeMinutes:
|
|
45117
|
-
});
|
|
45118
|
-
applyAppointmentSetupRequestSchema =
|
|
45119
|
-
services:
|
|
45120
|
-
practitioners:
|
|
45121
|
-
availability:
|
|
45437
|
+
appointmentSetupBookingNoticeSchema = z72.object({
|
|
45438
|
+
minLeadMinutes: z72.number().int().nonnegative().max(APPOINTMENT_DEFAULT_MIN_LEAD_MINUTES_MAX),
|
|
45439
|
+
maxBookingNoticeMinutes: z72.number().int().nonnegative().max(APPOINTMENT_DEFAULT_MAX_BOOKING_NOTICE_MINUTES_MAX)
|
|
45440
|
+
});
|
|
45441
|
+
applyAppointmentSetupRequestSchema = z72.object({
|
|
45442
|
+
services: z72.array(appointmentSetupServiceDraftSchema),
|
|
45443
|
+
practitioners: z72.array(appointmentSetupPractitionerDraftSchema),
|
|
45444
|
+
availability: z72.array(appointmentSetupAvailabilityDraftSchema),
|
|
45122
45445
|
bookingNotice: appointmentSetupBookingNoticeSchema
|
|
45123
45446
|
});
|
|
45124
45447
|
}
|
|
@@ -45233,7 +45556,7 @@ var init_eventAttendanceLabels = __esm({
|
|
|
45233
45556
|
});
|
|
45234
45557
|
|
|
45235
45558
|
// ../api/src/siteBanner.ts
|
|
45236
|
-
import { z as
|
|
45559
|
+
import { z as z73 } from "zod";
|
|
45237
45560
|
function analyzeSiteBannerBody(body) {
|
|
45238
45561
|
const sanitizedBody = sanitizeSiteBannerBodyInternal(body, { limitParagraphs: false });
|
|
45239
45562
|
const paragraphs = collectParagraphs(sanitizedBody);
|
|
@@ -45352,7 +45675,7 @@ function sanitizeMarks(marks) {
|
|
|
45352
45675
|
if (mark.type === "bold" || mark.type === "strong" || mark.type === "italic" || mark.type === "em") {
|
|
45353
45676
|
return [{ type: mark.type }];
|
|
45354
45677
|
}
|
|
45355
|
-
if (mark.type === "link" &&
|
|
45678
|
+
if (mark.type === "link" && isRecord9(mark.attrs) && typeof mark.attrs.href === "string") {
|
|
45356
45679
|
const attrs = { href: mark.attrs.href };
|
|
45357
45680
|
if (typeof mark.attrs.target === "string" && mark.attrs.target.trim().length > 0) {
|
|
45358
45681
|
attrs.target = mark.attrs.target;
|
|
@@ -45367,10 +45690,10 @@ function sanitizeMarks(marks) {
|
|
|
45367
45690
|
return sanitized.length > 0 ? sanitized : void 0;
|
|
45368
45691
|
}
|
|
45369
45692
|
function unwrapRichTextValue(value) {
|
|
45370
|
-
if (
|
|
45693
|
+
if (isRecord9(value) && isRecord9(value.doc)) {
|
|
45371
45694
|
return unwrapRichTextValue(value.doc);
|
|
45372
45695
|
}
|
|
45373
|
-
if (
|
|
45696
|
+
if (isRecord9(value) && value.type === "doc") {
|
|
45374
45697
|
return {
|
|
45375
45698
|
type: "doc",
|
|
45376
45699
|
content: Array.isArray(value.content) ? value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) : []
|
|
@@ -45379,7 +45702,7 @@ function unwrapRichTextValue(value) {
|
|
|
45379
45702
|
return EMPTY_SITE_BANNER_BODY;
|
|
45380
45703
|
}
|
|
45381
45704
|
function isTipTapNodeLike(value) {
|
|
45382
|
-
return
|
|
45705
|
+
return isRecord9(value) && typeof value.type === "string";
|
|
45383
45706
|
}
|
|
45384
45707
|
function coerceTipTapNode(value) {
|
|
45385
45708
|
return {
|
|
@@ -45387,9 +45710,9 @@ function coerceTipTapNode(value) {
|
|
|
45387
45710
|
...Array.isArray(value.content) ? { content: value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) } : {},
|
|
45388
45711
|
...typeof value.text === "string" ? { text: value.text } : {},
|
|
45389
45712
|
...Array.isArray(value.marks) ? {
|
|
45390
|
-
marks: value.marks.filter((mark) =>
|
|
45713
|
+
marks: value.marks.filter((mark) => isRecord9(mark) && typeof mark.type === "string").map((mark) => ({
|
|
45391
45714
|
type: mark.type,
|
|
45392
|
-
...
|
|
45715
|
+
...isRecord9(mark.attrs) ? { attrs: mark.attrs } : {}
|
|
45393
45716
|
}))
|
|
45394
45717
|
} : {}
|
|
45395
45718
|
};
|
|
@@ -45416,19 +45739,19 @@ var init_siteBanner = __esm({
|
|
|
45416
45739
|
SITE_BANNER_TONE_VALUES = ["announcement", "promotion", "notice", "warning"];
|
|
45417
45740
|
SITE_BANNER_MAX_TEXT_LENGTH = 320;
|
|
45418
45741
|
SITE_BANNER_MAX_PARAGRAPHS = 2;
|
|
45419
|
-
siteBannerScopeSchema =
|
|
45420
|
-
siteBannerToneSchema =
|
|
45421
|
-
siteBannerBodySchema =
|
|
45422
|
-
siteBannerCtaSchema =
|
|
45423
|
-
label:
|
|
45742
|
+
siteBannerScopeSchema = z73.enum(SITE_BANNER_SCOPE_VALUES);
|
|
45743
|
+
siteBannerToneSchema = z73.enum(SITE_BANNER_TONE_VALUES);
|
|
45744
|
+
siteBannerBodySchema = z73.unknown().transform(unwrapRichTextValue);
|
|
45745
|
+
siteBannerCtaSchema = z73.object({
|
|
45746
|
+
label: z73.string().trim().min(1),
|
|
45424
45747
|
link: linkPayloadSchema
|
|
45425
45748
|
});
|
|
45426
|
-
siteBannerSettingsSchema =
|
|
45427
|
-
|
|
45428
|
-
enabled:
|
|
45749
|
+
siteBannerSettingsSchema = z73.discriminatedUnion("enabled", [
|
|
45750
|
+
z73.object({
|
|
45751
|
+
enabled: z73.literal(false)
|
|
45429
45752
|
}),
|
|
45430
|
-
|
|
45431
|
-
enabled:
|
|
45753
|
+
z73.object({
|
|
45754
|
+
enabled: z73.literal(true),
|
|
45432
45755
|
scope: siteBannerScopeSchema,
|
|
45433
45756
|
tone: siteBannerToneSchema,
|
|
45434
45757
|
body: siteBannerBodySchema,
|
|
@@ -45442,7 +45765,7 @@ var init_siteBanner = __esm({
|
|
|
45442
45765
|
const analysis = analyzeSiteBannerBody(value.body);
|
|
45443
45766
|
for (const issue of analysis.issues) {
|
|
45444
45767
|
ctx.addIssue({
|
|
45445
|
-
code:
|
|
45768
|
+
code: z73.ZodIssueCode.custom,
|
|
45446
45769
|
path: ["body"],
|
|
45447
45770
|
message: siteBannerBodyIssueMessage(issue)
|
|
45448
45771
|
});
|
|
@@ -45832,75 +46155,75 @@ var init_aiPatch = __esm({
|
|
|
45832
46155
|
});
|
|
45833
46156
|
|
|
45834
46157
|
// ../api/src/aiPlayground.ts
|
|
45835
|
-
import { z as
|
|
46158
|
+
import { z as z74 } from "zod";
|
|
45836
46159
|
var Rfc6902PatchOp, PlaygroundProposeRequest, MultiPagePatchEnvelope, MultiPageUpdateResponse;
|
|
45837
46160
|
var init_aiPlayground = __esm({
|
|
45838
46161
|
"../api/src/aiPlayground.ts"() {
|
|
45839
46162
|
"use strict";
|
|
45840
|
-
Rfc6902PatchOp =
|
|
46163
|
+
Rfc6902PatchOp = z74.discriminatedUnion("op", [
|
|
45841
46164
|
// Standard RFC-6902 operations
|
|
45842
|
-
|
|
45843
|
-
op:
|
|
45844
|
-
path:
|
|
45845
|
-
value:
|
|
46165
|
+
z74.object({
|
|
46166
|
+
op: z74.literal("add"),
|
|
46167
|
+
path: z74.string(),
|
|
46168
|
+
value: z74.unknown()
|
|
45846
46169
|
}),
|
|
45847
|
-
|
|
45848
|
-
op:
|
|
45849
|
-
path:
|
|
46170
|
+
z74.object({
|
|
46171
|
+
op: z74.literal("remove"),
|
|
46172
|
+
path: z74.string()
|
|
45850
46173
|
}),
|
|
45851
|
-
|
|
45852
|
-
op:
|
|
45853
|
-
path:
|
|
45854
|
-
value:
|
|
46174
|
+
z74.object({
|
|
46175
|
+
op: z74.literal("replace"),
|
|
46176
|
+
path: z74.string(),
|
|
46177
|
+
value: z74.unknown()
|
|
45855
46178
|
}),
|
|
45856
|
-
|
|
45857
|
-
op:
|
|
45858
|
-
from:
|
|
45859
|
-
path:
|
|
46179
|
+
z74.object({
|
|
46180
|
+
op: z74.literal("move"),
|
|
46181
|
+
from: z74.string(),
|
|
46182
|
+
path: z74.string()
|
|
45860
46183
|
}),
|
|
45861
|
-
|
|
45862
|
-
op:
|
|
45863
|
-
from:
|
|
45864
|
-
path:
|
|
46184
|
+
z74.object({
|
|
46185
|
+
op: z74.literal("copy"),
|
|
46186
|
+
from: z74.string(),
|
|
46187
|
+
path: z74.string()
|
|
45865
46188
|
}),
|
|
45866
46189
|
// Block-level operations (Phase 2)
|
|
45867
|
-
|
|
45868
|
-
op:
|
|
45869
|
-
blockKind:
|
|
45870
|
-
afterBlockId:
|
|
45871
|
-
content:
|
|
45872
|
-
rationale:
|
|
46190
|
+
z74.object({
|
|
46191
|
+
op: z74.literal("add_block"),
|
|
46192
|
+
blockKind: z74.string(),
|
|
46193
|
+
afterBlockId: z74.string().nullable(),
|
|
46194
|
+
content: z74.record(z74.string(), z74.unknown()),
|
|
46195
|
+
rationale: z74.string()
|
|
45873
46196
|
}),
|
|
45874
|
-
|
|
45875
|
-
op:
|
|
45876
|
-
blockId:
|
|
45877
|
-
rationale:
|
|
46197
|
+
z74.object({
|
|
46198
|
+
op: z74.literal("delete_block"),
|
|
46199
|
+
blockId: z74.string(),
|
|
46200
|
+
rationale: z74.string()
|
|
45878
46201
|
}),
|
|
45879
|
-
|
|
45880
|
-
op:
|
|
45881
|
-
blockId:
|
|
45882
|
-
afterBlockId:
|
|
45883
|
-
rationale:
|
|
46202
|
+
z74.object({
|
|
46203
|
+
op: z74.literal("reorder_block"),
|
|
46204
|
+
blockId: z74.string(),
|
|
46205
|
+
afterBlockId: z74.string().nullable(),
|
|
46206
|
+
rationale: z74.string()
|
|
45884
46207
|
})
|
|
45885
46208
|
]);
|
|
45886
|
-
PlaygroundProposeRequest =
|
|
45887
|
-
request:
|
|
46209
|
+
PlaygroundProposeRequest = z74.object({
|
|
46210
|
+
request: z74.string().min(1).max(2e3)
|
|
45888
46211
|
});
|
|
45889
|
-
MultiPagePatchEnvelope =
|
|
45890
|
-
pageId:
|
|
45891
|
-
blockId:
|
|
46212
|
+
MultiPagePatchEnvelope = z74.object({
|
|
46213
|
+
pageId: z74.string(),
|
|
46214
|
+
blockId: z74.string().optional(),
|
|
45892
46215
|
// Not present for page-level ops
|
|
45893
|
-
blockKind:
|
|
45894
|
-
blockPurpose:
|
|
45895
|
-
ops:
|
|
45896
|
-
rationale:
|
|
45897
|
-
currentContent:
|
|
46216
|
+
blockKind: z74.string().optional(),
|
|
46217
|
+
blockPurpose: z74.string().optional().nullable(),
|
|
46218
|
+
ops: z74.array(Rfc6902PatchOp),
|
|
46219
|
+
rationale: z74.string(),
|
|
46220
|
+
currentContent: z74.record(z74.string(), z74.unknown()).optional()
|
|
45898
46221
|
});
|
|
45899
|
-
MultiPageUpdateResponse =
|
|
45900
|
-
patches:
|
|
45901
|
-
assistantMessage:
|
|
45902
|
-
pagesModified:
|
|
45903
|
-
toolCallsUsed:
|
|
46222
|
+
MultiPageUpdateResponse = z74.object({
|
|
46223
|
+
patches: z74.array(MultiPagePatchEnvelope),
|
|
46224
|
+
assistantMessage: z74.string(),
|
|
46225
|
+
pagesModified: z74.number(),
|
|
46226
|
+
toolCallsUsed: z74.number()
|
|
45904
46227
|
});
|
|
45905
46228
|
}
|
|
45906
46229
|
});
|
|
@@ -45971,6 +46294,7 @@ var init_src5 = __esm({
|
|
|
45971
46294
|
init_contracts2();
|
|
45972
46295
|
init_sdkContracts();
|
|
45973
46296
|
init_incrementalJson();
|
|
46297
|
+
init_mailchimpIntegration();
|
|
45974
46298
|
init_launchReadiness();
|
|
45975
46299
|
init_url();
|
|
45976
46300
|
init_envelope();
|
|
@@ -46039,9 +46363,9 @@ var init_src5 = __esm({
|
|
|
46039
46363
|
|
|
46040
46364
|
// src/data/prefetchBlockData.ts
|
|
46041
46365
|
function isSupportedLoaderEndpoint2(endpoint) {
|
|
46042
|
-
return
|
|
46366
|
+
return SUPPORTED_LOADER_ENDPOINTS.includes(endpoint);
|
|
46043
46367
|
}
|
|
46044
|
-
function
|
|
46368
|
+
function isRecord10(value) {
|
|
46045
46369
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
46046
46370
|
}
|
|
46047
46371
|
function extractManualEntryRef(item) {
|
|
@@ -46049,7 +46373,7 @@ function extractManualEntryRef(item) {
|
|
|
46049
46373
|
const trimmed = item.trim();
|
|
46050
46374
|
return trimmed.length > 0 ? trimmed : null;
|
|
46051
46375
|
}
|
|
46052
|
-
if (!
|
|
46376
|
+
if (!isRecord10(item)) return null;
|
|
46053
46377
|
for (const key of ENTRY_REF_KEYS) {
|
|
46054
46378
|
const raw = item[key];
|
|
46055
46379
|
if (typeof raw === "string" && raw.trim().length > 0) {
|
|
@@ -46097,6 +46421,180 @@ function parseManualEntryRefs(...values) {
|
|
|
46097
46421
|
}
|
|
46098
46422
|
return void 0;
|
|
46099
46423
|
}
|
|
46424
|
+
function readStringParam(params, key) {
|
|
46425
|
+
const value = params[key];
|
|
46426
|
+
return value && value.length > 0 ? value : void 0;
|
|
46427
|
+
}
|
|
46428
|
+
function requireStringParam(params, key, endpoint) {
|
|
46429
|
+
const value = readStringParam(params, key);
|
|
46430
|
+
if (!value) {
|
|
46431
|
+
throw new Error(`${endpoint} requires ${key} param`);
|
|
46432
|
+
}
|
|
46433
|
+
return value;
|
|
46434
|
+
}
|
|
46435
|
+
function parsePositiveIntegerParam(params, key) {
|
|
46436
|
+
const value = params[key];
|
|
46437
|
+
const parsed = value === void 0 ? void 0 : Number.parseInt(value, 10);
|
|
46438
|
+
return typeof parsed === "number" && Number.isInteger(parsed) && parsed > 0 ? parsed : void 0;
|
|
46439
|
+
}
|
|
46440
|
+
function parseEntryOrder(value) {
|
|
46441
|
+
if (value === void 0) return void 0;
|
|
46442
|
+
switch (value) {
|
|
46443
|
+
case "order":
|
|
46444
|
+
return "manual";
|
|
46445
|
+
case "newest":
|
|
46446
|
+
case "oldest":
|
|
46447
|
+
case "title":
|
|
46448
|
+
return value;
|
|
46449
|
+
default:
|
|
46450
|
+
return void 0;
|
|
46451
|
+
}
|
|
46452
|
+
}
|
|
46453
|
+
function parsePublicEventKind(value) {
|
|
46454
|
+
if (value === void 0) return void 0;
|
|
46455
|
+
switch (value) {
|
|
46456
|
+
case "all":
|
|
46457
|
+
case "courses":
|
|
46458
|
+
case "events":
|
|
46459
|
+
return value;
|
|
46460
|
+
default:
|
|
46461
|
+
return void 0;
|
|
46462
|
+
}
|
|
46463
|
+
}
|
|
46464
|
+
async function listPublishedEntries2({ client, params }) {
|
|
46465
|
+
const siteId = requireStringParam(params, "siteId", "listPublishedEntries");
|
|
46466
|
+
const type = requireStringParam(params, "type", "listPublishedEntries");
|
|
46467
|
+
const stage = readStringParam(params, "stage");
|
|
46468
|
+
const mode = readStringParam(params, "mode");
|
|
46469
|
+
const parsedEntryRefs = mode === "manual" ? parseManualEntryRefs(params.identifiers, params.entryRefs, params.entryIds) : void 0;
|
|
46470
|
+
if (mode === "manual" && (!parsedEntryRefs || parsedEntryRefs.length === 0)) {
|
|
46471
|
+
return { entries: [] };
|
|
46472
|
+
}
|
|
46473
|
+
if (mode === "manual" && parsedEntryRefs) {
|
|
46474
|
+
return await client.getEntriesByIdentifiers({
|
|
46475
|
+
siteId,
|
|
46476
|
+
contentType: type,
|
|
46477
|
+
identifiers: parsedEntryRefs,
|
|
46478
|
+
preview: stage === "preview"
|
|
46479
|
+
});
|
|
46480
|
+
}
|
|
46481
|
+
return await client.getEntries({
|
|
46482
|
+
siteId,
|
|
46483
|
+
contentType: type,
|
|
46484
|
+
limit: parsePositiveIntegerParam(params, "limit"),
|
|
46485
|
+
order: parseEntryOrder(readStringParam(params, "orderBy")),
|
|
46486
|
+
preview: stage === "preview"
|
|
46487
|
+
});
|
|
46488
|
+
}
|
|
46489
|
+
async function getPublishedEntryPreview({ client, params }) {
|
|
46490
|
+
return await client.getEntry({
|
|
46491
|
+
siteId: requireStringParam(params, "siteId", "getPublishedEntryPreview"),
|
|
46492
|
+
contentType: requireStringParam(params, "type", "getPublishedEntryPreview"),
|
|
46493
|
+
slug: requireStringParam(params, "slug", "getPublishedEntryPreview")
|
|
46494
|
+
});
|
|
46495
|
+
}
|
|
46496
|
+
async function listPublicEvents({ client, params }) {
|
|
46497
|
+
return await client.listPublicEvents({
|
|
46498
|
+
siteId: requireStringParam(params, "siteId", "listPublicEvents"),
|
|
46499
|
+
limit: parsePositiveIntegerParam(params, "limit"),
|
|
46500
|
+
from: readStringParam(params, "from"),
|
|
46501
|
+
to: readStringParam(params, "to"),
|
|
46502
|
+
afterStartsAt: readStringParam(params, "afterStartsAt"),
|
|
46503
|
+
afterId: readStringParam(params, "afterId"),
|
|
46504
|
+
stage: readStringParam(params, "stage"),
|
|
46505
|
+
categoryIds: readStringParam(params, "categoryIds"),
|
|
46506
|
+
venueId: readStringParam(params, "venueId"),
|
|
46507
|
+
staffMemberId: readStringParam(params, "staffMemberId"),
|
|
46508
|
+
kind: parsePublicEventKind(readStringParam(params, "kind")),
|
|
46509
|
+
eventSurface: readStringParam(params, "eventSurface"),
|
|
46510
|
+
eventPresets: readStringParam(params, "eventPresets"),
|
|
46511
|
+
scheduleScope: readStringParam(params, "scheduleScope"),
|
|
46512
|
+
entryId: readStringParam(params, "entryId"),
|
|
46513
|
+
seriesId: readStringParam(params, "seriesId"),
|
|
46514
|
+
includeOccurrenceId: readStringParam(params, "includeOccurrenceId")
|
|
46515
|
+
});
|
|
46516
|
+
}
|
|
46517
|
+
async function getPublicEventDetails({ client, params }) {
|
|
46518
|
+
return await client.getPublicEventDetails({
|
|
46519
|
+
siteId: requireStringParam(params, "siteId", "getPublicEventDetails"),
|
|
46520
|
+
limit: parsePositiveIntegerParam(params, "limit"),
|
|
46521
|
+
from: readStringParam(params, "from"),
|
|
46522
|
+
to: readStringParam(params, "to"),
|
|
46523
|
+
afterStartsAt: readStringParam(params, "afterStartsAt"),
|
|
46524
|
+
afterId: readStringParam(params, "afterId"),
|
|
46525
|
+
stage: readStringParam(params, "stage"),
|
|
46526
|
+
categoryIds: readStringParam(params, "categoryIds"),
|
|
46527
|
+
venueId: readStringParam(params, "venueId"),
|
|
46528
|
+
staffMemberId: readStringParam(params, "staffMemberId"),
|
|
46529
|
+
kind: readStringParam(params, "kind"),
|
|
46530
|
+
eventSurface: readStringParam(params, "eventSurface"),
|
|
46531
|
+
eventPresets: readStringParam(params, "eventPresets"),
|
|
46532
|
+
scheduleScope: readStringParam(params, "scheduleScope"),
|
|
46533
|
+
entryId: readStringParam(params, "entryId"),
|
|
46534
|
+
seriesId: readStringParam(params, "seriesId"),
|
|
46535
|
+
includeOccurrenceId: readStringParam(params, "includeOccurrenceId")
|
|
46536
|
+
});
|
|
46537
|
+
}
|
|
46538
|
+
async function listPublicCourses({ client, params }) {
|
|
46539
|
+
return await client.listPublicCourses({
|
|
46540
|
+
siteId: requireStringParam(params, "siteId", "listPublicCourses"),
|
|
46541
|
+
limit: parsePositiveIntegerParam(params, "limit"),
|
|
46542
|
+
stage: readStringParam(params, "stage")
|
|
46543
|
+
});
|
|
46544
|
+
}
|
|
46545
|
+
async function listPublicRouteCandidates({ client, params }) {
|
|
46546
|
+
const siteId = requireStringParam(params, "siteId", "listPublicRouteCandidates");
|
|
46547
|
+
const response = await client.getAllPublishedRoutes({ siteId });
|
|
46548
|
+
return {
|
|
46549
|
+
routes: response.items.flatMap((item) => {
|
|
46550
|
+
if (!item.path) return [];
|
|
46551
|
+
return [{
|
|
46552
|
+
entityId: item.entityId,
|
|
46553
|
+
path: item.path,
|
|
46554
|
+
title: item.title,
|
|
46555
|
+
kind: item.entityType,
|
|
46556
|
+
contentTypeKey: item.contentTypeKey ?? null
|
|
46557
|
+
}];
|
|
46558
|
+
})
|
|
46559
|
+
};
|
|
46560
|
+
}
|
|
46561
|
+
async function listPublicTeamMembers({ client, params }) {
|
|
46562
|
+
return await client.listPublicTeamMembers({
|
|
46563
|
+
siteId: requireStringParam(params, "siteId", "listPublicTeamMembers"),
|
|
46564
|
+
stage: readStringParam(params, "stage")
|
|
46565
|
+
});
|
|
46566
|
+
}
|
|
46567
|
+
async function listPublicProducts({ client, params }) {
|
|
46568
|
+
return await client.listPublicProducts({
|
|
46569
|
+
siteId: requireStringParam(params, "siteId", "listPublicProducts"),
|
|
46570
|
+
stage: readStringParam(params, "stage") === "preview" ? "preview" : "published",
|
|
46571
|
+
categorySelector: parsePublicProductCategorySelector(params.categorySelector)
|
|
46572
|
+
});
|
|
46573
|
+
}
|
|
46574
|
+
async function listPublicPasses({ client, params }) {
|
|
46575
|
+
return await client.listPublicPasses({
|
|
46576
|
+
siteId: requireStringParam(params, "siteId", "listPublicPasses"),
|
|
46577
|
+
categories: readStringParam(params, "categories")
|
|
46578
|
+
});
|
|
46579
|
+
}
|
|
46580
|
+
async function listPublicMemberships({ client, params }) {
|
|
46581
|
+
return await client.listPublicMemberships({
|
|
46582
|
+
siteId: requireStringParam(params, "siteId", "listPublicMemberships"),
|
|
46583
|
+
categories: readStringParam(params, "categories")
|
|
46584
|
+
});
|
|
46585
|
+
}
|
|
46586
|
+
async function getPublicFormById({ client, params }) {
|
|
46587
|
+
return await client.getPublicFormById({
|
|
46588
|
+
formId: requireStringParam(params, "formId", "getPublicFormById"),
|
|
46589
|
+
siteId: requireStringParam(params, "siteId", "getPublicFormById")
|
|
46590
|
+
});
|
|
46591
|
+
}
|
|
46592
|
+
async function getPublicBookingServices({ client, params }) {
|
|
46593
|
+
return await client.getPublicBookingServices({
|
|
46594
|
+
siteId: requireStringParam(params, "siteId", "getPublicBookingServices"),
|
|
46595
|
+
ids: readStringParam(params, "ids")
|
|
46596
|
+
});
|
|
46597
|
+
}
|
|
46100
46598
|
async function prefetchBlockData2(page, context, client, options) {
|
|
46101
46599
|
const { customBlocks } = options ?? {};
|
|
46102
46600
|
const customBlockMap = new Map(
|
|
@@ -46106,189 +46604,11 @@ async function prefetchBlockData2(page, context, client, options) {
|
|
|
46106
46604
|
apiClient: async ({ endpoint, params }) => {
|
|
46107
46605
|
if (!isSupportedLoaderEndpoint2(endpoint)) {
|
|
46108
46606
|
throw new Error(
|
|
46109
|
-
`Unsupported loader endpoint: ${endpoint}. SDK only supports: ${
|
|
46607
|
+
`Unsupported loader endpoint: ${endpoint}. SDK only supports: ${SUPPORTED_LOADER_ENDPOINTS.join(", ")}`
|
|
46110
46608
|
);
|
|
46111
46609
|
}
|
|
46112
46610
|
const resolvedParams = normalizeLoaderParams(endpoint, params, context);
|
|
46113
|
-
|
|
46114
|
-
case "listPublishedEntries": {
|
|
46115
|
-
const {
|
|
46116
|
-
siteId,
|
|
46117
|
-
type,
|
|
46118
|
-
orderBy,
|
|
46119
|
-
limit,
|
|
46120
|
-
stage,
|
|
46121
|
-
mode,
|
|
46122
|
-
entryIds,
|
|
46123
|
-
identifiers,
|
|
46124
|
-
entryRefs
|
|
46125
|
-
} = resolvedParams ?? {};
|
|
46126
|
-
if (!siteId || !type) {
|
|
46127
|
-
throw new Error("listPublishedEntries requires siteId and type params");
|
|
46128
|
-
}
|
|
46129
|
-
const parsedLimit = typeof limit === "string" ? Number.parseInt(limit, 10) : typeof limit === "number" ? limit : void 0;
|
|
46130
|
-
const order = orderBy === "order" ? "manual" : orderBy === "newest" || orderBy === "oldest" || orderBy === "title" ? orderBy : void 0;
|
|
46131
|
-
const parsedEntryRefs = mode === "manual" ? parseManualEntryRefs(identifiers, entryRefs, entryIds) : void 0;
|
|
46132
|
-
if (mode === "manual" && (!parsedEntryRefs || parsedEntryRefs.length === 0)) {
|
|
46133
|
-
return { entries: [] };
|
|
46134
|
-
}
|
|
46135
|
-
if (mode === "manual" && parsedEntryRefs) {
|
|
46136
|
-
return await client.getEntriesByIdentifiers({
|
|
46137
|
-
siteId,
|
|
46138
|
-
contentType: type,
|
|
46139
|
-
identifiers: parsedEntryRefs,
|
|
46140
|
-
preview: stage === "preview"
|
|
46141
|
-
});
|
|
46142
|
-
}
|
|
46143
|
-
return await client.getEntries({
|
|
46144
|
-
siteId,
|
|
46145
|
-
contentType: type,
|
|
46146
|
-
limit: parsedLimit,
|
|
46147
|
-
order,
|
|
46148
|
-
preview: stage === "preview"
|
|
46149
|
-
});
|
|
46150
|
-
}
|
|
46151
|
-
case "getPublishedEntryPreview": {
|
|
46152
|
-
const { siteId, type, slug } = resolvedParams ?? {};
|
|
46153
|
-
if (!siteId || !type || !slug) {
|
|
46154
|
-
throw new Error("getPublishedEntryPreview requires siteId, type, and slug params");
|
|
46155
|
-
}
|
|
46156
|
-
return await client.getEntry({ siteId, contentType: type, slug });
|
|
46157
|
-
}
|
|
46158
|
-
case "listPublicEvents": {
|
|
46159
|
-
const {
|
|
46160
|
-
siteId,
|
|
46161
|
-
limit,
|
|
46162
|
-
from,
|
|
46163
|
-
to,
|
|
46164
|
-
stage,
|
|
46165
|
-
categoryIds,
|
|
46166
|
-
venueId,
|
|
46167
|
-
kind,
|
|
46168
|
-
entryId,
|
|
46169
|
-
seriesId,
|
|
46170
|
-
includeOccurrenceId
|
|
46171
|
-
} = resolvedParams ?? {};
|
|
46172
|
-
if (!siteId) {
|
|
46173
|
-
throw new Error("listPublicEvents requires siteId param");
|
|
46174
|
-
}
|
|
46175
|
-
const parsedLimit = typeof limit === "string" ? Number.parseInt(limit, 10) : typeof limit === "number" ? limit : void 0;
|
|
46176
|
-
return await client.listPublicEvents({
|
|
46177
|
-
siteId,
|
|
46178
|
-
limit: parsedLimit,
|
|
46179
|
-
from,
|
|
46180
|
-
to,
|
|
46181
|
-
stage,
|
|
46182
|
-
categoryIds: typeof categoryIds === "string" ? categoryIds : void 0,
|
|
46183
|
-
venueId: typeof venueId === "string" ? venueId : void 0,
|
|
46184
|
-
kind: kind === "all" || kind === "courses" || kind === "events" ? kind : void 0,
|
|
46185
|
-
entryId: typeof entryId === "string" ? entryId : void 0,
|
|
46186
|
-
seriesId: typeof seriesId === "string" ? seriesId : void 0,
|
|
46187
|
-
includeOccurrenceId: typeof includeOccurrenceId === "string" ? includeOccurrenceId : void 0
|
|
46188
|
-
});
|
|
46189
|
-
}
|
|
46190
|
-
case "getPublicEventDetails": {
|
|
46191
|
-
const {
|
|
46192
|
-
siteId,
|
|
46193
|
-
limit,
|
|
46194
|
-
from,
|
|
46195
|
-
to,
|
|
46196
|
-
afterStartsAt,
|
|
46197
|
-
afterId,
|
|
46198
|
-
stage,
|
|
46199
|
-
categoryIds,
|
|
46200
|
-
venueId,
|
|
46201
|
-
staffMemberId,
|
|
46202
|
-
kind,
|
|
46203
|
-
entryId,
|
|
46204
|
-
seriesId,
|
|
46205
|
-
includeOccurrenceId
|
|
46206
|
-
} = resolvedParams ?? {};
|
|
46207
|
-
if (!siteId) {
|
|
46208
|
-
throw new Error("getPublicEventDetails requires siteId param");
|
|
46209
|
-
}
|
|
46210
|
-
const parsedLimit = typeof limit === "string" ? Number.parseInt(limit, 10) : typeof limit === "number" ? limit : void 0;
|
|
46211
|
-
return await client.getPublicEventDetails({
|
|
46212
|
-
siteId,
|
|
46213
|
-
limit: parsedLimit,
|
|
46214
|
-
from: typeof from === "string" ? from : void 0,
|
|
46215
|
-
to: typeof to === "string" ? to : void 0,
|
|
46216
|
-
afterStartsAt: typeof afterStartsAt === "string" ? afterStartsAt : void 0,
|
|
46217
|
-
afterId: typeof afterId === "string" ? afterId : void 0,
|
|
46218
|
-
stage: typeof stage === "string" ? stage : void 0,
|
|
46219
|
-
categoryIds: typeof categoryIds === "string" ? categoryIds : void 0,
|
|
46220
|
-
venueId: typeof venueId === "string" ? venueId : void 0,
|
|
46221
|
-
staffMemberId: typeof staffMemberId === "string" ? staffMemberId : void 0,
|
|
46222
|
-
kind: typeof kind === "string" ? kind : void 0,
|
|
46223
|
-
entryId: typeof entryId === "string" ? entryId : void 0,
|
|
46224
|
-
seriesId: typeof seriesId === "string" ? seriesId : void 0,
|
|
46225
|
-
includeOccurrenceId: typeof includeOccurrenceId === "string" ? includeOccurrenceId : void 0
|
|
46226
|
-
});
|
|
46227
|
-
}
|
|
46228
|
-
case "listPublicCourses": {
|
|
46229
|
-
const { siteId, limit, stage } = resolvedParams ?? {};
|
|
46230
|
-
if (!siteId) {
|
|
46231
|
-
throw new Error("listPublicCourses requires siteId param");
|
|
46232
|
-
}
|
|
46233
|
-
const parsedLimit = typeof limit === "string" ? Number.parseInt(limit, 10) : typeof limit === "number" ? limit : void 0;
|
|
46234
|
-
return await client.listPublicCourses({ siteId, limit: parsedLimit, stage });
|
|
46235
|
-
}
|
|
46236
|
-
case "listPublicTeamMembers": {
|
|
46237
|
-
const { siteId, stage } = resolvedParams ?? {};
|
|
46238
|
-
if (!siteId) {
|
|
46239
|
-
throw new Error("listPublicTeamMembers requires siteId param");
|
|
46240
|
-
}
|
|
46241
|
-
return await client.listPublicTeamMembers({
|
|
46242
|
-
siteId,
|
|
46243
|
-
stage: typeof stage === "string" ? stage : void 0
|
|
46244
|
-
});
|
|
46245
|
-
}
|
|
46246
|
-
case "listPublicProducts": {
|
|
46247
|
-
const { siteId, stage, categorySelector } = resolvedParams ?? {};
|
|
46248
|
-
if (!siteId) {
|
|
46249
|
-
throw new Error("listPublicProducts requires siteId param");
|
|
46250
|
-
}
|
|
46251
|
-
return await client.listPublicProducts({
|
|
46252
|
-
siteId,
|
|
46253
|
-
stage: stage === "preview" ? "preview" : "published",
|
|
46254
|
-
categorySelector: parsePublicProductCategorySelector(categorySelector)
|
|
46255
|
-
});
|
|
46256
|
-
}
|
|
46257
|
-
case "getPublicFormById": {
|
|
46258
|
-
const { formId, siteId } = resolvedParams ?? {};
|
|
46259
|
-
if (!formId) {
|
|
46260
|
-
throw new Error("getPublicFormById requires formId param");
|
|
46261
|
-
}
|
|
46262
|
-
if (!siteId) {
|
|
46263
|
-
throw new Error("getPublicFormById requires siteId param");
|
|
46264
|
-
}
|
|
46265
|
-
return await client.getPublicFormById({ formId, siteId });
|
|
46266
|
-
}
|
|
46267
|
-
case "getPublicBookingServices": {
|
|
46268
|
-
const { siteId, ids } = resolvedParams ?? {};
|
|
46269
|
-
if (!siteId) {
|
|
46270
|
-
throw new Error("getPublicBookingServices requires siteId param");
|
|
46271
|
-
}
|
|
46272
|
-
return await client.getPublicBookingServices({ siteId, ids });
|
|
46273
|
-
}
|
|
46274
|
-
case "listPublicPasses": {
|
|
46275
|
-
const { siteId, categories } = resolvedParams ?? {};
|
|
46276
|
-
if (!siteId) {
|
|
46277
|
-
throw new Error("listPublicPasses requires siteId param");
|
|
46278
|
-
}
|
|
46279
|
-
return await client.listPublicPasses({ siteId, categories });
|
|
46280
|
-
}
|
|
46281
|
-
case "listPublicMemberships": {
|
|
46282
|
-
const { siteId, categories } = resolvedParams ?? {};
|
|
46283
|
-
if (!siteId) {
|
|
46284
|
-
throw new Error("listPublicMemberships requires siteId param");
|
|
46285
|
-
}
|
|
46286
|
-
return await client.listPublicMemberships({ siteId, categories });
|
|
46287
|
-
}
|
|
46288
|
-
default: {
|
|
46289
|
-
throw new Error("Unhandled endpoint");
|
|
46290
|
-
}
|
|
46291
|
-
}
|
|
46611
|
+
return await loaderAdapters[endpoint]({ client, params: resolvedParams });
|
|
46292
46612
|
},
|
|
46293
46613
|
isValidEndpoint: isSupportedLoaderEndpoint2,
|
|
46294
46614
|
onError: (error, { block, loader }) => {
|
|
@@ -46315,26 +46635,12 @@ async function prefetchBlockData2(page, context, client, options) {
|
|
|
46315
46635
|
}
|
|
46316
46636
|
});
|
|
46317
46637
|
}
|
|
46318
|
-
var
|
|
46638
|
+
var ENTRY_REF_KEYS, loaderAdapters;
|
|
46319
46639
|
var init_prefetchBlockData2 = __esm({
|
|
46320
46640
|
"src/data/prefetchBlockData.ts"() {
|
|
46321
46641
|
"use strict";
|
|
46322
46642
|
init_src5();
|
|
46323
46643
|
init_data();
|
|
46324
|
-
init_data();
|
|
46325
|
-
SUPPORTED_LOADER_ENDPOINTS2 = [
|
|
46326
|
-
"listPublishedEntries",
|
|
46327
|
-
"getPublishedEntryPreview",
|
|
46328
|
-
"listPublicEvents",
|
|
46329
|
-
"listPublicCourses",
|
|
46330
|
-
"listPublicTeamMembers",
|
|
46331
|
-
"listPublicProducts",
|
|
46332
|
-
"listPublicPasses",
|
|
46333
|
-
"listPublicMemberships",
|
|
46334
|
-
"getPublicFormById",
|
|
46335
|
-
"getPublicBookingServices",
|
|
46336
|
-
"getPublicEventDetails"
|
|
46337
|
-
];
|
|
46338
46644
|
ENTRY_REF_KEYS = [
|
|
46339
46645
|
"identifier",
|
|
46340
46646
|
"entryIdentifier",
|
|
@@ -46342,6 +46648,20 @@ var init_prefetchBlockData2 = __esm({
|
|
|
46342
46648
|
"entryId",
|
|
46343
46649
|
"slug"
|
|
46344
46650
|
];
|
|
46651
|
+
loaderAdapters = {
|
|
46652
|
+
listPublishedEntries: listPublishedEntries2,
|
|
46653
|
+
getPublishedEntryPreview,
|
|
46654
|
+
listPublicEvents,
|
|
46655
|
+
getPublicEventDetails,
|
|
46656
|
+
listPublicCourses,
|
|
46657
|
+
listPublicRouteCandidates,
|
|
46658
|
+
listPublicTeamMembers,
|
|
46659
|
+
listPublicProducts,
|
|
46660
|
+
listPublicPasses,
|
|
46661
|
+
listPublicMemberships,
|
|
46662
|
+
getPublicFormById,
|
|
46663
|
+
getPublicBookingServices
|
|
46664
|
+
};
|
|
46345
46665
|
}
|
|
46346
46666
|
});
|
|
46347
46667
|
|
|
@@ -46415,6 +46735,83 @@ var init_siteCustomBlocks = __esm({
|
|
|
46415
46735
|
}
|
|
46416
46736
|
});
|
|
46417
46737
|
|
|
46738
|
+
// src/rendering/helpers/pageRuntimeSupport.ts
|
|
46739
|
+
function buildSiteRenderSupport(site, mediaAssets) {
|
|
46740
|
+
const customBlocks = resolveSiteCustomBlocks(site);
|
|
46741
|
+
return {
|
|
46742
|
+
theme: site.theme,
|
|
46743
|
+
site: site.site,
|
|
46744
|
+
sdkConfig: site.sdkConfig ?? null,
|
|
46745
|
+
bookingOfferingPresets: site.bookingOfferingPresets ?? [],
|
|
46746
|
+
...customBlocks ? { customBlocks } : {},
|
|
46747
|
+
supabaseUrl: site.supabaseUrl,
|
|
46748
|
+
routeMap: site.routes,
|
|
46749
|
+
pagesByIdentifier: site.pagesByIdentifier,
|
|
46750
|
+
entriesByIdentifier: site.entriesByIdentifier,
|
|
46751
|
+
...mediaAssets ? { mediaAssets } : {}
|
|
46752
|
+
};
|
|
46753
|
+
}
|
|
46754
|
+
function collectMediaAssetSidecar(mediaAssets) {
|
|
46755
|
+
return Array.isArray(mediaAssets) && mediaAssets.length > 0 ? mediaAssets : void 0;
|
|
46756
|
+
}
|
|
46757
|
+
function convertPageResponseBlock(block) {
|
|
46758
|
+
if (!isRecord11(block)) {
|
|
46759
|
+
throw new Error("Invalid block format in page API response");
|
|
46760
|
+
}
|
|
46761
|
+
if (typeof block.id !== "string" && block.id !== null) {
|
|
46762
|
+
throw new Error(`Invalid block id in page: expected string or null, got ${typeof block.id}`);
|
|
46763
|
+
}
|
|
46764
|
+
if (typeof block.kind !== "string") {
|
|
46765
|
+
throw new Error(`Invalid block kind in page: expected string, got ${typeof block.kind}`);
|
|
46766
|
+
}
|
|
46767
|
+
if (typeof block.purpose !== "string") {
|
|
46768
|
+
throw new Error(`Invalid block purpose in page: expected string, got ${typeof block.purpose}`);
|
|
46769
|
+
}
|
|
46770
|
+
return {
|
|
46771
|
+
id: block.id,
|
|
46772
|
+
kind: block.kind,
|
|
46773
|
+
purpose: block.purpose,
|
|
46774
|
+
content: sanitizeSdkRuntimeBlockContent(block.kind, readContentRecord(block.content) ?? {}),
|
|
46775
|
+
draftContent: sanitizeNullableSdkRuntimeBlockContent(
|
|
46776
|
+
block.kind,
|
|
46777
|
+
readNestedContentRecord(block.draftContent)
|
|
46778
|
+
)
|
|
46779
|
+
};
|
|
46780
|
+
}
|
|
46781
|
+
function buildPageOutline(input) {
|
|
46782
|
+
return {
|
|
46783
|
+
name: input.name,
|
|
46784
|
+
path: input.path ?? input.fallbackPath,
|
|
46785
|
+
purpose: input.purpose,
|
|
46786
|
+
blocks: input.blocks.map(convertPageResponseBlock)
|
|
46787
|
+
};
|
|
46788
|
+
}
|
|
46789
|
+
function isRecord11(value) {
|
|
46790
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
46791
|
+
}
|
|
46792
|
+
function readContentRecord(value) {
|
|
46793
|
+
return isRecord11(value) ? value : void 0;
|
|
46794
|
+
}
|
|
46795
|
+
function readNestedContentRecord(value) {
|
|
46796
|
+
if (!isRecord11(value)) return null;
|
|
46797
|
+
return readContentRecord(value.data) ?? null;
|
|
46798
|
+
}
|
|
46799
|
+
function sanitizeSdkRuntimeBlockContent(blockKind, content) {
|
|
46800
|
+
if (blockKind !== "block.newsletter-signup") return content;
|
|
46801
|
+
const sanitized = sanitizeNewsletterSignupPublicContent(content);
|
|
46802
|
+
return isRecord11(sanitized) ? sanitized : {};
|
|
46803
|
+
}
|
|
46804
|
+
function sanitizeNullableSdkRuntimeBlockContent(blockKind, content) {
|
|
46805
|
+
return content ? sanitizeSdkRuntimeBlockContent(blockKind, content) : null;
|
|
46806
|
+
}
|
|
46807
|
+
var init_pageRuntimeSupport = __esm({
|
|
46808
|
+
"src/rendering/helpers/pageRuntimeSupport.ts"() {
|
|
46809
|
+
"use strict";
|
|
46810
|
+
init_newsletter_signup();
|
|
46811
|
+
init_siteCustomBlocks();
|
|
46812
|
+
}
|
|
46813
|
+
});
|
|
46814
|
+
|
|
46418
46815
|
// src/rendering/helpers/loadPage.ts
|
|
46419
46816
|
var loadPage_exports = {};
|
|
46420
46817
|
__export(loadPage_exports, {
|
|
@@ -46426,45 +46823,23 @@ async function loadPage(params) {
|
|
|
46426
46823
|
client.getSite({ id: siteId, ...forceSite ? { force: true } : {} }),
|
|
46427
46824
|
client.getPage({ siteId, path, preview })
|
|
46428
46825
|
]);
|
|
46429
|
-
const customBlocks = resolveSiteCustomBlocks(site);
|
|
46430
46826
|
if ("entry" in pageResponse) {
|
|
46431
46827
|
throw new Error(
|
|
46432
46828
|
"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."
|
|
46433
46829
|
);
|
|
46434
46830
|
}
|
|
46435
46831
|
const { page: pageData } = pageResponse;
|
|
46436
|
-
const
|
|
46437
|
-
|
|
46438
|
-
|
|
46439
|
-
|
|
46440
|
-
|
|
46441
|
-
if (typeof block.id !== "string" && block.id !== null) {
|
|
46442
|
-
throw new Error(`Invalid block id: expected string or null, got ${typeof block.id}`);
|
|
46443
|
-
}
|
|
46444
|
-
if (typeof block.kind !== "string") {
|
|
46445
|
-
throw new Error(`Invalid block kind: expected string, got ${typeof block.kind}`);
|
|
46446
|
-
}
|
|
46447
|
-
if (typeof block.purpose !== "string") {
|
|
46448
|
-
throw new Error(`Invalid block purpose: expected string, got ${typeof block.purpose}`);
|
|
46449
|
-
}
|
|
46450
|
-
const typedBlock = block;
|
|
46451
|
-
return {
|
|
46452
|
-
id: typedBlock.id,
|
|
46453
|
-
kind: typedBlock.kind,
|
|
46454
|
-
purpose: typedBlock.purpose,
|
|
46455
|
-
// Include content for PageRenderer's getRenderableContent()
|
|
46456
|
-
content: typedBlock.content ?? {},
|
|
46457
|
-
// Include draftContent if available (for preview mode)
|
|
46458
|
-
draftContent: typedBlock.draftContent?.data ?? null
|
|
46459
|
-
};
|
|
46460
|
-
});
|
|
46461
|
-
const canonicalPagePath = pageData.path ?? path;
|
|
46462
|
-
const pageOutline = {
|
|
46832
|
+
const support = buildSiteRenderSupport(
|
|
46833
|
+
site,
|
|
46834
|
+
collectMediaAssetSidecar(pageResponse.mediaAssets)
|
|
46835
|
+
);
|
|
46836
|
+
const pageOutline = buildPageOutline({
|
|
46463
46837
|
name: pageData.name,
|
|
46464
|
-
path:
|
|
46838
|
+
path: pageData.path,
|
|
46839
|
+
fallbackPath: path,
|
|
46465
46840
|
purpose: pageData.purpose,
|
|
46466
|
-
blocks
|
|
46467
|
-
};
|
|
46841
|
+
blocks: pageData.blocks
|
|
46842
|
+
});
|
|
46468
46843
|
const prefetchContext = {
|
|
46469
46844
|
siteId,
|
|
46470
46845
|
pageId: pageId ?? pageData.id,
|
|
@@ -46477,7 +46852,7 @@ async function loadPage(params) {
|
|
|
46477
46852
|
client,
|
|
46478
46853
|
{
|
|
46479
46854
|
// Pass custom blocks so their config-based loaders are discovered
|
|
46480
|
-
customBlocks
|
|
46855
|
+
customBlocks: support.customBlocks
|
|
46481
46856
|
}
|
|
46482
46857
|
);
|
|
46483
46858
|
let resolvedData = configData;
|
|
@@ -46487,28 +46862,26 @@ async function loadPage(params) {
|
|
|
46487
46862
|
}
|
|
46488
46863
|
return {
|
|
46489
46864
|
page: pageOutline,
|
|
46490
|
-
theme:
|
|
46491
|
-
sdkConfig:
|
|
46865
|
+
theme: support.theme,
|
|
46866
|
+
sdkConfig: support.sdkConfig,
|
|
46492
46867
|
siteId,
|
|
46493
46868
|
resolvedData,
|
|
46494
|
-
|
|
46495
|
-
|
|
46496
|
-
...
|
|
46869
|
+
bookingOfferingPresets: support.bookingOfferingPresets,
|
|
46870
|
+
supabaseUrl: support.supabaseUrl,
|
|
46871
|
+
...support.mediaAssets ? { mediaAssets: support.mediaAssets } : {},
|
|
46872
|
+
...support.customBlocks ? { customBlocks: support.customBlocks } : {},
|
|
46497
46873
|
// Maps for CTA link resolution (e.g., { kind: 'page', identifier: 'about' })
|
|
46498
|
-
routeMap:
|
|
46499
|
-
pagesByIdentifier:
|
|
46500
|
-
entriesByIdentifier:
|
|
46874
|
+
routeMap: support.routeMap,
|
|
46875
|
+
pagesByIdentifier: support.pagesByIdentifier,
|
|
46876
|
+
entriesByIdentifier: support.entriesByIdentifier
|
|
46501
46877
|
};
|
|
46502
46878
|
}
|
|
46503
|
-
function toMediaAssetSidecar(mediaAssets) {
|
|
46504
|
-
return mediaAssets ?? [];
|
|
46505
|
-
}
|
|
46506
46879
|
var init_loadPage = __esm({
|
|
46507
46880
|
"src/rendering/helpers/loadPage.ts"() {
|
|
46508
46881
|
"use strict";
|
|
46509
46882
|
init_prefetchBlockData2();
|
|
46510
46883
|
init_executeCodeLoaders();
|
|
46511
|
-
|
|
46884
|
+
init_pageRuntimeSupport();
|
|
46512
46885
|
}
|
|
46513
46886
|
});
|
|
46514
46887
|
|