@riverbankcms/sdk 0.89.1 → 0.90.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -4
- package/dist/{PreviewEditorSidebar-JDR64FEC.mjs → PreviewEditorSidebar-FNFRVSIM.mjs} +3 -3
- package/dist/{PreviewEditorUI-67TMJMAF.mjs → PreviewEditorUI-3WXJFQXG.mjs} +3 -3
- package/dist/SdkPreviewModeRuntime-2UCIMKUB.mjs +8 -0
- package/dist/_dts/ai/src/contracts/proposals.d.ts +216 -0
- package/dist/_dts/altcha/src/AltchaWidget.d.ts +1 -1
- package/dist/_dts/api/src/bookingConfig.d.ts +3 -0
- package/dist/_dts/api/src/bookingOperations.d.ts +2 -0
- package/dist/_dts/api/src/bookingRecords.d.ts +4 -2
- package/dist/_dts/api/src/bookings.d.ts +3 -1
- package/dist/_dts/api/src/event-listing-destination.d.ts +59 -0
- package/dist/_dts/api/src/index.d.ts +10 -5
- package/dist/_dts/api/src/navigation/dashboardSettingsNav.d.ts +0 -1
- package/dist/_dts/api/src/navigation.d.ts +2 -0
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +18 -6
- package/dist/_dts/api/src/request.d.ts +21 -0
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +3 -1
- package/dist/_dts/api/src/sdkContracts.d.ts +2 -0
- package/dist/_dts/api/src/settings/permissions.d.ts +273 -0
- package/dist/_dts/api/src/types.d.ts +4 -1
- package/dist/_dts/api/src/url.d.ts +6 -3
- package/dist/_dts/block-form/src/utils/visibleWhen.d.ts +1 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterThumbnailCard.d.ts +5 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterThumbnailGrid.d.ts +9 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/index.d.ts +1 -0
- package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +7 -11
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +6 -0
- package/dist/_dts/blocks/src/index.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +14 -6
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +60 -2
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +16 -5
- package/dist/_dts/blocks/src/system/blocks/hero.d.ts +0 -2
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +9 -9
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +3 -3
- package/dist/_dts/blocks/src/system/blocks/shop.shared.d.ts +8 -0
- package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +1 -1
- package/dist/_dts/blocks/src/system/constants/events.d.ts +4 -1
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +17 -5
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +51 -6
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationWizard.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/logic.d.ts +1 -17
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details.client.d.ts +5 -9
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details.server.d.ts +5 -9
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +7 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +48 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.d.ts +4 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.state.d.ts +50 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +21 -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/EventCalendar.interactive.d.ts +11 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +11 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/calendarViewOptions.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/destination.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventProductEligibility.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/pricing.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +5 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/shop-checkout-form.d.ts +2 -2
- package/dist/_dts/content-model/src/entry-slots/index.d.ts +1 -0
- package/dist/_dts/content-model/src/entry-slots/sdkBlocks.d.ts +21 -0
- package/dist/_dts/content-model/src/entry-slots/types.d.ts +7 -0
- package/dist/_dts/core/src/event-pricing.d.ts +12 -2
- package/dist/_dts/core/src/money-input.d.ts +18 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +50 -0
- package/dist/_dts/media-editor/src/MediaEditor.d.ts +2 -1
- package/dist/_dts/media-editor/src/fieldUi.d.ts +6 -0
- package/dist/_dts/media-editor/src/index.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/index.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewThemedSiteDocument.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/SiteChromeEditableSurface.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/preview/themeRuntime.d.ts +6 -0
- package/dist/_dts/preview-next/src/client/sdk/SdkPreviewMode.d.ts +2 -1
- package/dist/_dts/sdk/src/cli/commands/pull-dated-offering-scope.d.ts +10 -0
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +12 -5
- package/dist/_dts/sdk/src/client/management/types.d.ts +6 -55
- package/dist/_dts/sdk/src/components.d.ts +1 -0
- package/dist/_dts/sdk/src/config/field-definitions.d.ts +3 -1
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +3 -1
- package/dist/_dts/sdk/src/next/types.d.ts +8 -11
- package/dist/_dts/sdk/src/preview-next/client/index.d.ts +1 -1
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +11 -1
- package/dist/_dts/sdk/src/rendering/blocks-theme-scope.d.ts +2 -1
- package/dist/_dts/sdk/src/rendering/components/Layout.d.ts +8 -7
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +5 -6
- package/dist/_dts/sdk/src/rendering/index.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +11 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/themeRuntime.d.ts +26 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +18 -0
- package/dist/_dts/theme-core/src/ResponsiveScope.d.ts +12 -0
- package/dist/_dts/theme-core/src/accordions/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/buttons/types.d.ts +5 -5
- package/dist/_dts/theme-core/src/cards/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/index.d.ts +2 -0
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +21 -21
- package/dist/_dts/theme-core/src/schema.d.ts +18 -18
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/logoBranding.d.ts +4 -4
- package/dist/_dts/theme-core/src/themeRuntime.d.ts +11 -0
- package/dist/{chunk-F645A5UV.mjs → chunk-BOQXMCSP.mjs} +129 -101
- package/dist/{chunk-7YUAXONX.mjs → chunk-CR2VX432.mjs} +1563 -877
- package/dist/{chunk-HKJQERFR.mjs → chunk-FA6LVZ7C.mjs} +91 -55
- package/dist/{chunk-TGBJWKMP.mjs → chunk-H6TT5ZXI.mjs} +9 -1
- package/dist/{chunk-ZQRBLCW5.mjs → chunk-SYYJZPKU.mjs} +2 -2
- package/dist/{chunk-7N46MZHI.mjs → chunk-UG7I7S7W.mjs} +1 -1
- package/dist/cli/index.mjs +1057 -632
- package/dist/cli/init-docs/content/cli-reference.md +6 -1
- package/dist/cli/init-docs/content/content-management.md +27 -0
- package/dist/client/{accordion-MUCVNGQ7.mjs → accordion-4K7VGZ3I.mjs} +2 -2
- package/dist/client/{bookingForm-PKD6EFIE.mjs → bookingForm-3QXA3CIS.mjs} +26 -271
- package/dist/client/bookings.mjs +1586 -825
- package/dist/client/{carousel-3TKQSNJC.mjs → carousel-BEJKNGQ7.mjs} +3 -3
- package/dist/client/{cart-6XHSZK23.mjs → cart-44BBM6XG.mjs} +7 -8
- package/dist/client/{checkout-FVSPM6FI.mjs → checkout-THMHEYKF.mjs} +7 -8
- package/dist/client/{chunk-25W2EQUN.mjs → chunk-3H5CLFKT.mjs} +8 -0
- package/dist/client/{chunk-ZJZZA5EP.mjs → chunk-4COPESPO.mjs} +13 -16
- package/dist/client/chunk-5AJIMWKS.mjs +436 -0
- package/dist/client/{chunk-UQFY4AHX.mjs → chunk-B4H6QMPY.mjs} +157 -49
- package/dist/client/{chunk-VGLXACVK.mjs → chunk-DQIRKNZE.mjs} +1 -1
- package/dist/client/{chunk-7DH35FGA.mjs → chunk-EJBHK74Y.mjs} +1 -1
- package/dist/client/{chunk-SDIYSQAY.mjs → chunk-HIHOQGIP.mjs} +2 -3
- package/dist/client/{chunk-CQKKFEQD.mjs → chunk-JV7ZNAOU.mjs} +378 -111
- package/dist/client/{chunk-FHU6PFPM.mjs → chunk-KNTLBQ3N.mjs} +1 -1
- package/dist/client/{chunk-RSQWWUAD.mjs → chunk-PEDNDLPB.mjs} +4 -4
- package/dist/client/{chunk-EY42X22F.mjs → chunk-SLY6UDAS.mjs} +157 -5
- package/dist/client/{chunk-STJ2NCQM.mjs → chunk-WHZQDPBZ.mjs} +19 -1
- package/dist/client/{chunk-ZT5XE7FK.mjs → chunk-ZIAF2DA4.mjs} +1 -1
- package/dist/client/client.mjs +3552 -2898
- package/dist/client/{courseRegistration-ATZSYDHM.mjs → courseRegistration-URX7RCCK.mjs} +20 -58
- package/dist/client/{eventCalendar-6T2UGKKP.mjs → eventCalendar-GTENOQCE.mjs} +10 -11
- package/dist/client/{eventCombined-Q4VANXVF.mjs → eventCombined-EZVB72MF.mjs} +10 -11
- package/dist/client/{eventDetails-DW37E7VW.mjs → eventDetails-CH4BJR5Z.mjs} +10 -11
- package/dist/client/{eventListing-XURTSAUW.mjs → eventListing-4BVOI5HS.mjs} +10 -11
- package/dist/client/{eventRegistration-MRKEVAXW.mjs → eventRegistration-37LPIKIE.mjs} +10 -11
- package/dist/client/{form-WZZFFGMU.mjs → form-FX3Y54YK.mjs} +7 -7
- package/dist/client/{headerSection-EQYVQBLM.mjs → headerSection-UOZZGVYL.mjs} +3 -3
- package/dist/client/hooks.mjs +1169 -1063
- package/dist/client/{locationMap-MFF5VAZR.mjs → locationMap-VSIPKV35.mjs} +3 -3
- package/dist/client/{newsletterForm-JQ77UYIE.mjs → newsletterForm-6FRJKNAF.mjs} +5 -5
- package/dist/client/{productDetail-25LMT3IZ.mjs → productDetail-6AHMLXCO.mjs} +7 -8
- package/dist/client/{productList-5ABEMKUG.mjs → productList-M2CYIZVH.mjs} +7 -8
- package/dist/client/rendering/client.mjs +2912 -2316
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +2874 -2230
- package/dist/client/{shop-OMMQZ6YO.mjs → shop-AUOT6GEX.mjs} +7 -8
- package/dist/client/spam-protection.mjs +4 -5
- package/dist/preview-next/before-render.mjs +2 -2
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/{sdk-runtime-WNLBZ3ZH.mjs → sdk-runtime-6GPJNLU6.mjs} +6 -6
- package/dist/server/components.mjs +1856 -1509
- package/dist/server/config-validation.mjs +1394 -1288
- package/dist/server/config.mjs +1394 -1288
- package/dist/server/data.mjs +1169 -1063
- package/dist/server/index.mjs +135 -100
- package/dist/server/navigation.mjs +20 -30
- package/dist/server/next.mjs +1936 -1576
- package/dist/server/page-converter.mjs +1081 -967
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1868 -1521
- package/dist/server/rendering.mjs +1878 -1531
- package/dist/server/routing.mjs +1248 -1089
- package/dist/server/server.mjs +1312 -1171
- package/dist/server/theme-bridge.mjs +8 -5
- package/package.json +3 -3
- package/dist/SdkPreviewModeRuntime-ZBEMRV7N.mjs +0 -8
- package/dist/client/chunk-LQFDYWPJ.mjs +0 -184
- package/dist/client/chunk-ZFHRN6W2.mjs +0 -66
package/dist/server/server.mjs
CHANGED
|
@@ -6519,19 +6519,23 @@ function normalizeDashboardOrigin(input) {
|
|
|
6519
6519
|
}
|
|
6520
6520
|
function deriveCmsApiUrlFromDashboardUrl(input) {
|
|
6521
6521
|
const origin = normalizeDashboardOrigin(input);
|
|
6522
|
-
return origin ? `${origin}/api` : "";
|
|
6522
|
+
return origin ? normalizeCmsApiBaseUrl(`${origin}/api`) : "";
|
|
6523
|
+
}
|
|
6524
|
+
function normalizeCmsApiBaseUrl(input) {
|
|
6525
|
+
return input.trim().replace(/\/+$/, "").replace(/(?:\/api)+$/i, "/api");
|
|
6523
6526
|
}
|
|
6524
6527
|
function getCmsApiUrl() {
|
|
6525
6528
|
if (typeof window !== "undefined") {
|
|
6526
|
-
return "/api";
|
|
6529
|
+
return normalizeCmsApiBaseUrl("/api");
|
|
6527
6530
|
}
|
|
6528
6531
|
const internalUrl = process.env.CMS_API_URL;
|
|
6529
6532
|
if (internalUrl) {
|
|
6530
|
-
return internalUrl
|
|
6533
|
+
return normalizeCmsApiBaseUrl(internalUrl);
|
|
6531
6534
|
}
|
|
6532
6535
|
const dashboardUrl = process.env.NEXT_PUBLIC_DASHBOARD_URL;
|
|
6533
6536
|
if (dashboardUrl) {
|
|
6534
|
-
|
|
6537
|
+
const apiUrl = deriveCmsApiUrlFromDashboardUrl(dashboardUrl);
|
|
6538
|
+
if (apiUrl) return apiUrl;
|
|
6535
6539
|
}
|
|
6536
6540
|
throw new Error(
|
|
6537
6541
|
"CMS_API_URL or NEXT_PUBLIC_DASHBOARD_URL is not configured. Set NEXT_PUBLIC_DASHBOARD_URL to your dashboard URL (e.g., http://localhost:4000)"
|
|
@@ -6640,6 +6644,27 @@ function serializeQueryValue(value) {
|
|
|
6640
6644
|
if (value instanceof Date) return value.toISOString();
|
|
6641
6645
|
return null;
|
|
6642
6646
|
}
|
|
6647
|
+
function normalizeHeaders(source) {
|
|
6648
|
+
const normalized = {};
|
|
6649
|
+
if (!source) return normalized;
|
|
6650
|
+
new Headers(source).forEach((value, key) => {
|
|
6651
|
+
normalized[key] = value;
|
|
6652
|
+
});
|
|
6653
|
+
return normalized;
|
|
6654
|
+
}
|
|
6655
|
+
function buildRequestHeaders(input) {
|
|
6656
|
+
const headers = {
|
|
6657
|
+
...normalizeHeaders(input.optionsHeaders),
|
|
6658
|
+
...normalizeHeaders(input.authHeaders)
|
|
6659
|
+
};
|
|
6660
|
+
if (input.sdkVersion) {
|
|
6661
|
+
headers["x-sdk-version"] = input.sdkVersion;
|
|
6662
|
+
}
|
|
6663
|
+
if (input.includeJsonContentType) {
|
|
6664
|
+
headers["Content-Type"] = "application/json";
|
|
6665
|
+
}
|
|
6666
|
+
return headers;
|
|
6667
|
+
}
|
|
6643
6668
|
function serializePathParam(endpoint, key, value) {
|
|
6644
6669
|
if (typeof value === "string") {
|
|
6645
6670
|
return value;
|
|
@@ -6775,104 +6800,20 @@ function createRawCMSClient(headers = {}, baseUrl) {
|
|
|
6775
6800
|
params,
|
|
6776
6801
|
options = {}
|
|
6777
6802
|
}) => {
|
|
6778
|
-
const
|
|
6779
|
-
|
|
6780
|
-
|
|
6781
|
-
|
|
6782
|
-
|
|
6783
|
-
|
|
6784
|
-
|
|
6785
|
-
|
|
6786
|
-
if (originalPath.includes(bracePlaceholder) || originalPath.includes(colonPlaceholder)) {
|
|
6787
|
-
const stringValue = serializePathParam(endpoint, key, value);
|
|
6788
|
-
url = url.replace(bracePlaceholder, stringValue);
|
|
6789
|
-
url = url.replace(colonPlaceholder, stringValue);
|
|
6790
|
-
} else {
|
|
6791
|
-
unusedParams[key] = value;
|
|
6792
|
-
}
|
|
6793
|
-
});
|
|
6794
|
-
}
|
|
6795
|
-
const unresolvedPathParams = [
|
|
6796
|
-
...url.match(/\{[^}]+\}/g) ?? [],
|
|
6797
|
-
...url.match(/(^|\/):([A-Za-z][A-Za-z0-9_]*)\b/g) ?? []
|
|
6798
|
-
];
|
|
6799
|
-
if (unresolvedPathParams.length > 0) {
|
|
6800
|
-
const missingParams = Array.from(
|
|
6801
|
-
new Set(
|
|
6802
|
-
unresolvedPathParams.map((token) => {
|
|
6803
|
-
if (token.startsWith("{") && token.endsWith("}")) {
|
|
6804
|
-
return token.slice(1, -1);
|
|
6805
|
-
}
|
|
6806
|
-
return token.replace(/^\//, "").slice(1);
|
|
6807
|
-
})
|
|
6808
|
-
)
|
|
6809
|
-
);
|
|
6810
|
-
throw new Error(
|
|
6811
|
-
`Missing required path params for endpoint ${String(endpoint)}: ${missingParams.join(", ")}`
|
|
6812
|
-
);
|
|
6813
|
-
}
|
|
6814
|
-
const endpointConfig = API_ENDPOINTS[endpoint];
|
|
6815
|
-
const method = endpointConfig.method;
|
|
6816
|
-
const isGetOrHead = method === "GET" || method === "HEAD";
|
|
6817
|
-
const queryParams = new URLSearchParams();
|
|
6818
|
-
Object.entries(unusedParams).forEach(([key, value]) => {
|
|
6819
|
-
appendQueryParam(queryParams, key, value);
|
|
6803
|
+
const plan = buildApiRequestPlan({
|
|
6804
|
+
endpoint,
|
|
6805
|
+
body,
|
|
6806
|
+
params,
|
|
6807
|
+
options,
|
|
6808
|
+
headers,
|
|
6809
|
+
baseUrl: normalizeCmsApiBaseUrl(baseUrl ?? resolveApiBaseUrl()),
|
|
6810
|
+
sdkVersion
|
|
6820
6811
|
});
|
|
6821
|
-
|
|
6822
|
-
|
|
6823
|
-
appendQueryParam(queryParams, key, value);
|
|
6824
|
-
});
|
|
6825
|
-
}
|
|
6826
|
-
const queryString = queryParams.toString();
|
|
6827
|
-
if (queryString) {
|
|
6828
|
-
url += (url.includes("?") ? "&" : "?") + queryString;
|
|
6829
|
-
}
|
|
6830
|
-
const formDataBody = isFormDataBody(body) ? body : void 0;
|
|
6831
|
-
const optionsNext = options?.next;
|
|
6832
|
-
const nextOptions = { ...optionsNext ?? {} };
|
|
6833
|
-
const cacheIsNoStore = options?.cache === "no-store";
|
|
6834
|
-
if (cacheIsNoStore) {
|
|
6835
|
-
delete nextOptions.revalidate;
|
|
6836
|
-
} else if (isGetOrHead && nextOptions.revalidate === void 0 && "revalidate" in endpointConfig && typeof endpointConfig.revalidate === "number") {
|
|
6837
|
-
nextOptions.revalidate = endpointConfig.revalidate;
|
|
6838
|
-
}
|
|
6839
|
-
if ("tags" in endpointConfig && Array.isArray(endpointConfig.tags)) {
|
|
6840
|
-
const processedTags = endpointConfig.tags.map((tag) => {
|
|
6841
|
-
let processedTag = tag;
|
|
6842
|
-
if (params) {
|
|
6843
|
-
Object.entries(params).forEach(([key, value]) => {
|
|
6844
|
-
processedTag = processedTag.replace(`{${key}}`, String(value));
|
|
6845
|
-
});
|
|
6846
|
-
}
|
|
6847
|
-
return /\{[^}]+\}/.test(processedTag) ? null : processedTag;
|
|
6848
|
-
}).filter((tag) => tag !== null);
|
|
6849
|
-
nextOptions.tags = Array.from(/* @__PURE__ */ new Set([...nextOptions.tags ?? [], ...processedTags]));
|
|
6850
|
-
}
|
|
6851
|
-
const requestInit = {
|
|
6852
|
-
method,
|
|
6853
|
-
...options,
|
|
6854
|
-
// Include credentials for same-origin requests (sends cookies for auth)
|
|
6855
|
-
credentials: "same-origin",
|
|
6856
|
-
// Don't include body for GET/HEAD requests
|
|
6857
|
-
// FormData is pre-narrowed via isFormDataBody() above
|
|
6858
|
-
body: isGetOrHead || body == null ? void 0 : formDataBody ?? JSON.stringify(body),
|
|
6859
|
-
headers: {
|
|
6860
|
-
...options.headers,
|
|
6861
|
-
...headers,
|
|
6862
|
-
// Include SDK version if set
|
|
6863
|
-
...sdkVersion && { "x-sdk-version": sdkVersion },
|
|
6864
|
-
// Don't set Content-Type for GET/HEAD requests without body
|
|
6865
|
-
...isGetOrHead ? {} : formDataBody ? {} : { "Content-Type": "application/json" }
|
|
6866
|
-
},
|
|
6867
|
-
// Add Next.js caching options
|
|
6868
|
-
next: Object.keys(nextOptions).length > 0 ? nextOptions : void 0
|
|
6869
|
-
};
|
|
6870
|
-
const fetchPromise = fetch(url, requestInit);
|
|
6871
|
-
if (!isGetOrHead && "tags" in endpointConfig && Array.isArray(endpointConfig.tags)) {
|
|
6872
|
-
const tags2 = endpointConfig.tags.map((tag) => tag);
|
|
6812
|
+
const fetchPromise = fetch(plan.url, plan.init);
|
|
6813
|
+
if (plan.cacheInvalidationTags) {
|
|
6873
6814
|
return fetchPromise.then((response) => {
|
|
6874
6815
|
if (response.ok) {
|
|
6875
|
-
invalidateCacheTags(
|
|
6816
|
+
invalidateCacheTags(plan.cacheInvalidationTags, params);
|
|
6876
6817
|
}
|
|
6877
6818
|
return response;
|
|
6878
6819
|
});
|
|
@@ -6880,6 +6821,100 @@ function createRawCMSClient(headers = {}, baseUrl) {
|
|
|
6880
6821
|
return fetchPromise;
|
|
6881
6822
|
};
|
|
6882
6823
|
}
|
|
6824
|
+
function buildApiRequestPlan(input) {
|
|
6825
|
+
const { endpoint, body, params, headers = {}, baseUrl } = input;
|
|
6826
|
+
const options = input.options ?? {};
|
|
6827
|
+
let url = buildEndpointURL(baseUrl, endpoint);
|
|
6828
|
+
const originalPath = API_ENDPOINTS[endpoint].path;
|
|
6829
|
+
const unusedParams = {};
|
|
6830
|
+
if (params) {
|
|
6831
|
+
Object.entries(params).forEach(([key, value]) => {
|
|
6832
|
+
const bracePlaceholder = `{${key}}`;
|
|
6833
|
+
const colonPlaceholder = `:${key}`;
|
|
6834
|
+
if (originalPath.includes(bracePlaceholder) || originalPath.includes(colonPlaceholder)) {
|
|
6835
|
+
const stringValue = serializePathParam(endpoint, key, value);
|
|
6836
|
+
url = url.replace(bracePlaceholder, stringValue);
|
|
6837
|
+
url = url.replace(colonPlaceholder, stringValue);
|
|
6838
|
+
} else {
|
|
6839
|
+
unusedParams[key] = value;
|
|
6840
|
+
}
|
|
6841
|
+
});
|
|
6842
|
+
}
|
|
6843
|
+
const unresolvedPathParams = [
|
|
6844
|
+
...url.match(/\{[^}]+\}/g) ?? [],
|
|
6845
|
+
...url.match(/(^|\/):([A-Za-z][A-Za-z0-9_]*)\b/g) ?? []
|
|
6846
|
+
];
|
|
6847
|
+
if (unresolvedPathParams.length > 0) {
|
|
6848
|
+
const missingParams = Array.from(
|
|
6849
|
+
new Set(
|
|
6850
|
+
unresolvedPathParams.map((token) => {
|
|
6851
|
+
if (token.startsWith("{") && token.endsWith("}")) {
|
|
6852
|
+
return token.slice(1, -1);
|
|
6853
|
+
}
|
|
6854
|
+
return token.replace(/^\//, "").slice(1);
|
|
6855
|
+
})
|
|
6856
|
+
)
|
|
6857
|
+
);
|
|
6858
|
+
throw new Error(
|
|
6859
|
+
`Missing required path params for endpoint ${String(endpoint)}: ${missingParams.join(", ")}`
|
|
6860
|
+
);
|
|
6861
|
+
}
|
|
6862
|
+
const endpointConfig = API_ENDPOINTS[endpoint];
|
|
6863
|
+
const method = endpointConfig.method;
|
|
6864
|
+
const isGetOrHead = method === "GET" || method === "HEAD";
|
|
6865
|
+
const queryParams = new URLSearchParams();
|
|
6866
|
+
Object.entries(unusedParams).forEach(([key, value]) => {
|
|
6867
|
+
appendQueryParam(queryParams, key, value);
|
|
6868
|
+
});
|
|
6869
|
+
if (isGetOrHead && typeof body === "object" && body !== null && !isFormDataBody(body)) {
|
|
6870
|
+
Object.entries(body).forEach(([key, value]) => {
|
|
6871
|
+
appendQueryParam(queryParams, key, value);
|
|
6872
|
+
});
|
|
6873
|
+
}
|
|
6874
|
+
const queryString = queryParams.toString();
|
|
6875
|
+
if (queryString) {
|
|
6876
|
+
url += (url.includes("?") ? "&" : "?") + queryString;
|
|
6877
|
+
}
|
|
6878
|
+
const formDataBody = isFormDataBody(body) ? body : void 0;
|
|
6879
|
+
const optionsNext = options?.next;
|
|
6880
|
+
const nextOptions = { ...optionsNext ?? {} };
|
|
6881
|
+
const cacheIsNoStore = options?.cache === "no-store";
|
|
6882
|
+
if (cacheIsNoStore) {
|
|
6883
|
+
delete nextOptions.revalidate;
|
|
6884
|
+
} else if (isGetOrHead && nextOptions.revalidate === void 0 && "revalidate" in endpointConfig && typeof endpointConfig.revalidate === "number") {
|
|
6885
|
+
nextOptions.revalidate = endpointConfig.revalidate;
|
|
6886
|
+
}
|
|
6887
|
+
if ("tags" in endpointConfig && Array.isArray(endpointConfig.tags)) {
|
|
6888
|
+
const processedTags = endpointConfig.tags.map((tag) => {
|
|
6889
|
+
let processedTag = tag;
|
|
6890
|
+
if (params) {
|
|
6891
|
+
Object.entries(params).forEach(([key, value]) => {
|
|
6892
|
+
processedTag = processedTag.replace(`{${key}}`, String(value));
|
|
6893
|
+
});
|
|
6894
|
+
}
|
|
6895
|
+
return /\{[^}]+\}/.test(processedTag) ? null : processedTag;
|
|
6896
|
+
}).filter((tag) => tag !== null);
|
|
6897
|
+
nextOptions.tags = Array.from(/* @__PURE__ */ new Set([...nextOptions.tags ?? [], ...processedTags]));
|
|
6898
|
+
}
|
|
6899
|
+
const init = {
|
|
6900
|
+
method,
|
|
6901
|
+
...options,
|
|
6902
|
+
credentials: "same-origin",
|
|
6903
|
+
body: isGetOrHead || body == null ? void 0 : formDataBody ?? JSON.stringify(body),
|
|
6904
|
+
headers: buildRequestHeaders({
|
|
6905
|
+
optionsHeaders: options.headers,
|
|
6906
|
+
authHeaders: headers,
|
|
6907
|
+
sdkVersion: input.sdkVersion,
|
|
6908
|
+
includeJsonContentType: !isGetOrHead && !formDataBody
|
|
6909
|
+
}),
|
|
6910
|
+
...Object.keys(nextOptions).length > 0 ? { next: nextOptions } : {}
|
|
6911
|
+
};
|
|
6912
|
+
return {
|
|
6913
|
+
url,
|
|
6914
|
+
init,
|
|
6915
|
+
...!isGetOrHead && "tags" in endpointConfig && Array.isArray(endpointConfig.tags) ? { cacheInvalidationTags: endpointConfig.tags.map((tag) => tag) } : {}
|
|
6916
|
+
};
|
|
6917
|
+
}
|
|
6883
6918
|
function createParsedClient(rawClient) {
|
|
6884
6919
|
return async (params) => {
|
|
6885
6920
|
const response = await rawClient(params);
|
|
@@ -7060,7 +7095,7 @@ var SimpleCache = class {
|
|
|
7060
7095
|
};
|
|
7061
7096
|
|
|
7062
7097
|
// src/version.ts
|
|
7063
|
-
var SDK_VERSION = "0.
|
|
7098
|
+
var SDK_VERSION = "0.90.1";
|
|
7064
7099
|
|
|
7065
7100
|
// src/client/error.ts
|
|
7066
7101
|
var RiverbankApiError = class _RiverbankApiError extends Error {
|
|
@@ -9239,6 +9274,8 @@ function publicEventPricingType(pricing) {
|
|
|
9239
9274
|
case "ticket_types":
|
|
9240
9275
|
case "course":
|
|
9241
9276
|
return isFreePublicEventPriceDisplay(pricing.display) ? "free" : "paid";
|
|
9277
|
+
case "external":
|
|
9278
|
+
return "external";
|
|
9242
9279
|
}
|
|
9243
9280
|
}
|
|
9244
9281
|
function isFreePublicEventPriceDisplay(display) {
|
|
@@ -9252,6 +9289,7 @@ function isFreePublicEventPriceDisplay(display) {
|
|
|
9252
9289
|
case "range":
|
|
9253
9290
|
case "mixed":
|
|
9254
9291
|
case "unavailable":
|
|
9292
|
+
case "external":
|
|
9255
9293
|
return false;
|
|
9256
9294
|
}
|
|
9257
9295
|
}
|
|
@@ -9512,7 +9550,7 @@ var navigationLinkInputSchema = z2.discriminatedUnion(
|
|
|
9512
9550
|
);
|
|
9513
9551
|
|
|
9514
9552
|
// ../api/src/sdkConfig/contracts.ts
|
|
9515
|
-
import { z as
|
|
9553
|
+
import { z as z63 } from "zod";
|
|
9516
9554
|
|
|
9517
9555
|
// ../blocks/src/system/manifest/augmentManifest.ts
|
|
9518
9556
|
function augmentManifest(manifest) {
|
|
@@ -9838,12 +9876,17 @@ var visibleWhenPredicateSchema = z4.object({
|
|
|
9838
9876
|
minItems: z4.number().int().nonnegative().optional(),
|
|
9839
9877
|
maxItems: z4.number().int().nonnegative().optional()
|
|
9840
9878
|
});
|
|
9841
|
-
var visibleWhenSchema = z4.
|
|
9842
|
-
|
|
9843
|
-
|
|
9844
|
-
|
|
9845
|
-
|
|
9846
|
-
|
|
9879
|
+
var visibleWhenSchema = z4.lazy(
|
|
9880
|
+
() => z4.union([
|
|
9881
|
+
visibleWhenPredicateSchema,
|
|
9882
|
+
z4.object({
|
|
9883
|
+
allOf: z4.array(visibleWhenSchema).min(1)
|
|
9884
|
+
}),
|
|
9885
|
+
z4.object({
|
|
9886
|
+
anyOf: z4.array(visibleWhenSchema).min(1)
|
|
9887
|
+
})
|
|
9888
|
+
])
|
|
9889
|
+
);
|
|
9847
9890
|
var uiSchema = z4.object({
|
|
9848
9891
|
widget: z4.string().optional(),
|
|
9849
9892
|
// Container/widget presets (used by Group/Repeater widgets themselves, not for widget selection)
|
|
@@ -22829,9 +22872,6 @@ var heroCopyFragment = defineFragment({
|
|
|
22829
22872
|
maxLength: 600
|
|
22830
22873
|
}
|
|
22831
22874
|
],
|
|
22832
|
-
// Layout order is [eyebrow, headline, subheadline]. The hero block's
|
|
22833
|
-
// `splitEditorial` variant reads these nodes by index; keep the order stable
|
|
22834
|
-
// (it fails fast at import if the count changes).
|
|
22835
22875
|
layout: [
|
|
22836
22876
|
text(
|
|
22837
22877
|
{
|
|
@@ -25069,32 +25109,6 @@ var splitReverseLayout = splitLayoutWith([
|
|
|
25069
25109
|
splitContentColumn,
|
|
25070
25110
|
splitImageColumn
|
|
25071
25111
|
]);
|
|
25072
|
-
var heroEyebrowNode = heroCopyFragment.layout[0];
|
|
25073
|
-
var heroHeadlineNode = heroCopyFragment.layout[1];
|
|
25074
|
-
var heroSubheadlineNode = heroCopyFragment.layout[2];
|
|
25075
|
-
var heroCtaRowNode = heroCtaRowFragment.layout[0];
|
|
25076
|
-
if (!heroEyebrowNode || !heroHeadlineNode || !heroSubheadlineNode || !heroCtaRowNode) {
|
|
25077
|
-
throw new Error("Hero copy/CTA fragments are missing their expected layout nodes.");
|
|
25078
|
-
}
|
|
25079
|
-
var heroEditorialBottomRow = inline(
|
|
25080
|
-
{
|
|
25081
|
-
gap: "lg",
|
|
25082
|
-
align: "end",
|
|
25083
|
-
justify: "start",
|
|
25084
|
-
wrap: true,
|
|
25085
|
-
className: "rb-w-full"
|
|
25086
|
-
},
|
|
25087
|
-
[heroSubheadlineNode, heroCtaRowNode]
|
|
25088
|
-
);
|
|
25089
|
-
var splitEditorialContentColumn = heroContentWrapper(
|
|
25090
|
-
[heroEyebrowNode, heroHeadlineNode, heroEditorialBottomRow],
|
|
25091
|
-
"md",
|
|
25092
|
-
"rb-w-full rb-text-left"
|
|
25093
|
-
);
|
|
25094
|
-
var splitEditorialLayout = splitLayoutWith([
|
|
25095
|
-
splitEditorialContentColumn,
|
|
25096
|
-
splitImageColumn
|
|
25097
|
-
]);
|
|
25098
25112
|
var heroConfig = {
|
|
25099
25113
|
id: "block.hero",
|
|
25100
25114
|
title: "Hero",
|
|
@@ -25118,7 +25132,8 @@ var heroConfig = {
|
|
|
25118
25132
|
id: "imageShape",
|
|
25119
25133
|
label: "Image shape",
|
|
25120
25134
|
defaultValue: "default",
|
|
25121
|
-
uiIntent: "display"
|
|
25135
|
+
uiIntent: "display",
|
|
25136
|
+
visibleWhen: { field: "variant", oneOf: ["split", "splitReverse"] }
|
|
25122
25137
|
})
|
|
25123
25138
|
],
|
|
25124
25139
|
layout: classicLayout,
|
|
@@ -25126,8 +25141,7 @@ var heroConfig = {
|
|
|
25126
25141
|
classic: classicLayout,
|
|
25127
25142
|
micro: microLayout,
|
|
25128
25143
|
split: splitLayout,
|
|
25129
|
-
splitReverse: splitReverseLayout
|
|
25130
|
-
splitEditorial: splitEditorialLayout
|
|
25144
|
+
splitReverse: splitReverseLayout
|
|
25131
25145
|
},
|
|
25132
25146
|
defaultVariant: "classic",
|
|
25133
25147
|
description: "Hero section with headline, subtitle, and repeatable CTAs.",
|
|
@@ -27003,8 +27017,10 @@ function resolveGeneratedHeroLayoutStyles(content) {
|
|
|
27003
27017
|
return isPlainObject(raw) ? raw : null;
|
|
27004
27018
|
}
|
|
27005
27019
|
function readHeroLayoutString(content, generatedKey, fallbackKey = generatedKey) {
|
|
27020
|
+
const explicitValue = readString(content, fallbackKey);
|
|
27021
|
+
if (explicitValue !== void 0) return explicitValue;
|
|
27006
27022
|
const generated = resolveGeneratedHeroLayoutStyles(content);
|
|
27007
|
-
return generated && typeof generated[generatedKey] === "string" ? generated[generatedKey] :
|
|
27023
|
+
return generated && typeof generated[generatedKey] === "string" ? generated[generatedKey] : void 0;
|
|
27008
27024
|
}
|
|
27009
27025
|
function resolveHeroVariant(content) {
|
|
27010
27026
|
const variant = readString(content, "variant");
|
|
@@ -27017,7 +27033,7 @@ function resolveHeroContentAlignment(content) {
|
|
|
27017
27033
|
const raw = readHeroLayoutString(content, "contentAlignment");
|
|
27018
27034
|
if (raw === "left" || raw === "center" || raw === "right") return raw;
|
|
27019
27035
|
const variant = resolveHeroVariant(content);
|
|
27020
|
-
if (variant === "split" || variant === "splitReverse"
|
|
27036
|
+
if (variant === "split" || variant === "splitReverse") return "left";
|
|
27021
27037
|
return "center";
|
|
27022
27038
|
}
|
|
27023
27039
|
function resolveHeroVerticalAlignment(content) {
|
|
@@ -27027,7 +27043,7 @@ function resolveHeroVerticalAlignment(content) {
|
|
|
27027
27043
|
const minHeight = sectionStyles?.minHeight;
|
|
27028
27044
|
if (minHeight === "banner" || minHeight === "hero" || minHeight === "immersive") return "center";
|
|
27029
27045
|
const variant = resolveHeroVariant(content);
|
|
27030
|
-
if (variant === "split" || variant === "splitReverse"
|
|
27046
|
+
if (variant === "split" || variant === "splitReverse") return "center";
|
|
27031
27047
|
return "top";
|
|
27032
27048
|
}
|
|
27033
27049
|
function resolveHeroContentMaxWidth(content) {
|
|
@@ -30596,9 +30612,6 @@ var appointmentBookingBlockDefinition = {
|
|
|
30596
30612
|
}
|
|
30597
30613
|
};
|
|
30598
30614
|
|
|
30599
|
-
// ../blocks/src/system/blocks/event-registration.ts
|
|
30600
|
-
import { z as z47 } from "zod";
|
|
30601
|
-
|
|
30602
30615
|
// ../blocks/src/system/blocks/events/shared/schemas.ts
|
|
30603
30616
|
import { z as z43 } from "zod";
|
|
30604
30617
|
|
|
@@ -30846,6 +30859,18 @@ var publicCoursesArraySchema = z42.array(publicCourseSchema);
|
|
|
30846
30859
|
var eventPresetSchema = z43.enum(["event", "class", "workshop", "retreat", "performance"]);
|
|
30847
30860
|
var eventScheduleScopeSchema = z43.enum(["recurring", "oneOff"]);
|
|
30848
30861
|
var eventDestinationModeSchema = z43.enum(["cms-managed", "system-managed"]);
|
|
30862
|
+
var publicEventDestinationSchema = z43.discriminatedUnion("kind", [
|
|
30863
|
+
z43.object({
|
|
30864
|
+
kind: z43.literal("native"),
|
|
30865
|
+
mode: eventDestinationModeSchema,
|
|
30866
|
+
path: z43.string()
|
|
30867
|
+
}),
|
|
30868
|
+
z43.object({
|
|
30869
|
+
kind: z43.literal("external"),
|
|
30870
|
+
url: z43.string(),
|
|
30871
|
+
label: z43.string()
|
|
30872
|
+
})
|
|
30873
|
+
]);
|
|
30849
30874
|
var eventVenueSchema = z43.object({
|
|
30850
30875
|
id: z43.string(),
|
|
30851
30876
|
name: z43.string(),
|
|
@@ -30860,7 +30885,7 @@ var eventCategorySchema = z43.object({
|
|
|
30860
30885
|
name: z43.string(),
|
|
30861
30886
|
color: z43.string().nullable()
|
|
30862
30887
|
});
|
|
30863
|
-
var pricingTypeSchema = z43.enum(["free", "paid"]);
|
|
30888
|
+
var pricingTypeSchema = z43.enum(["free", "paid", "external"]);
|
|
30864
30889
|
var accessRestrictionSchema = z43.enum(["none", "category"]);
|
|
30865
30890
|
var eventPricingModeSchema = z43.enum(["single", "ticket_types"]);
|
|
30866
30891
|
var publicCoursePriceDisplaySchema = z43.discriminatedUnion("kind", [
|
|
@@ -30881,6 +30906,7 @@ var publicEventPriceDisplaySchema = z43.discriminatedUnion("kind", [
|
|
|
30881
30906
|
currency: z43.string()
|
|
30882
30907
|
}),
|
|
30883
30908
|
z43.object({ kind: z43.literal("unavailable"), currency: z43.string() }),
|
|
30909
|
+
z43.object({ kind: z43.literal("external"), label: z43.string() }),
|
|
30884
30910
|
z43.object({ kind: z43.literal("course"), display: publicCoursePriceDisplaySchema })
|
|
30885
30911
|
]);
|
|
30886
30912
|
var publicEventTicketTypePriceDisplaySchema = z43.union([
|
|
@@ -30959,6 +30985,10 @@ var publicEventPricingSchema = z43.discriminatedUnion("kind", [
|
|
|
30959
30985
|
z43.object({
|
|
30960
30986
|
kind: z43.literal("course"),
|
|
30961
30987
|
display: z43.object({ kind: z43.literal("course"), display: publicCoursePriceDisplaySchema })
|
|
30988
|
+
}),
|
|
30989
|
+
z43.object({
|
|
30990
|
+
kind: z43.literal("external"),
|
|
30991
|
+
display: z43.object({ kind: z43.literal("external"), label: z43.string() })
|
|
30962
30992
|
})
|
|
30963
30993
|
]);
|
|
30964
30994
|
var publicTeamMemberSummarySchema = z43.object({
|
|
@@ -30987,7 +31017,8 @@ var publicEventSchema = z43.object({
|
|
|
30987
31017
|
image: mediaSchema2.nullable().optional()
|
|
30988
31018
|
}).optional(),
|
|
30989
31019
|
slug: z43.string(),
|
|
30990
|
-
path: z43.string(),
|
|
31020
|
+
path: z43.string().nullable(),
|
|
31021
|
+
destination: publicEventDestinationSchema,
|
|
30991
31022
|
requiresRegistration: z43.boolean(),
|
|
30992
31023
|
deliveryMode: z43.enum(["in_person", "online", "hybrid"]),
|
|
30993
31024
|
attendanceModes: z43.array(publicEventAttendanceModeAvailabilitySchema),
|
|
@@ -31220,24 +31251,57 @@ function normalizeEventStaffMemberId(value) {
|
|
|
31220
31251
|
return trimmed ? trimmed : null;
|
|
31221
31252
|
}
|
|
31222
31253
|
|
|
31223
|
-
// ../blocks/src/system/blocks/
|
|
31254
|
+
// ../blocks/src/system/blocks/shop.shared.ts
|
|
31224
31255
|
import { z as z44 } from "zod";
|
|
31225
|
-
var
|
|
31256
|
+
var publicPassProductSchema = z44.object({
|
|
31257
|
+
id: z44.string(),
|
|
31258
|
+
productUseCase: z44.enum(["event_pass", "appointment_package"]).default("event_pass"),
|
|
31259
|
+
name: z44.string(),
|
|
31260
|
+
description: z44.string().nullable(),
|
|
31261
|
+
price: z44.number(),
|
|
31262
|
+
currency: z44.string(),
|
|
31263
|
+
creditsTotal: z44.number(),
|
|
31264
|
+
pricePerCredit: z44.number(),
|
|
31265
|
+
validDays: z44.number().nullable(),
|
|
31266
|
+
eligibleCategoryIds: z44.array(z44.string()),
|
|
31267
|
+
eligibleCategoryNames: z44.array(z44.string())
|
|
31268
|
+
});
|
|
31269
|
+
var publicPassProductCollectionSchema = z44.object({
|
|
31270
|
+
passes: z44.array(publicPassProductSchema)
|
|
31271
|
+
});
|
|
31272
|
+
var publicMembershipProductSchema = z44.object({
|
|
31226
31273
|
id: z44.string(),
|
|
31227
|
-
|
|
31228
|
-
|
|
31229
|
-
|
|
31230
|
-
|
|
31231
|
-
|
|
31232
|
-
|
|
31274
|
+
name: z44.string(),
|
|
31275
|
+
description: z44.string().nullable(),
|
|
31276
|
+
price: z44.number(),
|
|
31277
|
+
currency: z44.string(),
|
|
31278
|
+
billingInterval: z44.enum(["month", "year"]),
|
|
31279
|
+
eligibleCategoryIds: z44.array(z44.string()),
|
|
31280
|
+
eligibleCategoryNames: z44.array(z44.string())
|
|
31281
|
+
});
|
|
31282
|
+
var publicMembershipProductCollectionSchema = z44.object({
|
|
31283
|
+
memberships: z44.array(publicMembershipProductSchema)
|
|
31284
|
+
});
|
|
31285
|
+
|
|
31286
|
+
// ../blocks/src/system/blocks/event-registration.shared.ts
|
|
31287
|
+
import { z as z45 } from "zod";
|
|
31288
|
+
var occurrenceContextSchema = z45.object({
|
|
31289
|
+
id: z45.string(),
|
|
31290
|
+
seriesId: z45.string(),
|
|
31291
|
+
startsAt: z45.string(),
|
|
31292
|
+
endsAt: z45.string(),
|
|
31293
|
+
timeZone: z45.string(),
|
|
31294
|
+
capacityOverride: z45.number().nullable().optional(),
|
|
31295
|
+
overrides: z45.record(z45.string(), z45.unknown()).nullable().optional()
|
|
31233
31296
|
}).nullable();
|
|
31234
31297
|
|
|
31235
31298
|
// ../blocks/src/system/runtime/nodes/event-registration.interactive.ts
|
|
31236
|
-
import { z as
|
|
31299
|
+
import { z as z47 } from "zod";
|
|
31237
31300
|
|
|
31238
31301
|
// ../blocks/src/system/constants/events.ts
|
|
31239
31302
|
var EVENT_CONTENT_TYPE_SLUGS = ["event", "events"];
|
|
31240
|
-
var eventCalendarDisplayModeValues = ["combined", "
|
|
31303
|
+
var eventCalendarDisplayModeValues = ["combined", "calendar", "list", "timetable"];
|
|
31304
|
+
var eventCalendarDefaultViewValues = ["month", "week"];
|
|
31241
31305
|
var eventCalendarListLayoutValues = ["stack", "grid", "compact"];
|
|
31242
31306
|
var eventCalendarListLayoutOptions = [
|
|
31243
31307
|
{ id: "stack", label: "Stack" },
|
|
@@ -31247,6 +31311,9 @@ var eventCalendarListLayoutOptions = [
|
|
|
31247
31311
|
function isEventCalendarDisplayMode(value) {
|
|
31248
31312
|
return typeof value === "string" && eventCalendarDisplayModeValues.includes(value);
|
|
31249
31313
|
}
|
|
31314
|
+
function isEventCalendarDefaultView(value) {
|
|
31315
|
+
return typeof value === "string" && eventCalendarDefaultViewValues.includes(value);
|
|
31316
|
+
}
|
|
31250
31317
|
function isEventCalendarListLayout(value) {
|
|
31251
31318
|
return typeof value === "string" && eventCalendarListLayoutValues.includes(value);
|
|
31252
31319
|
}
|
|
@@ -31255,12 +31322,41 @@ function isEventContentType(slug) {
|
|
|
31255
31322
|
return EVENT_CONTENT_TYPE_SLUGS.includes(slug);
|
|
31256
31323
|
}
|
|
31257
31324
|
|
|
31325
|
+
// ../blocks/src/system/runtime/nodes/events/shared/destination.ts
|
|
31326
|
+
function isRecord3(value) {
|
|
31327
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
31328
|
+
}
|
|
31329
|
+
function isRuntimeEventDestination(value) {
|
|
31330
|
+
if (!isRecord3(value) || typeof value.kind !== "string") return false;
|
|
31331
|
+
if (value.kind === "native") {
|
|
31332
|
+
return (value.mode === "cms-managed" || value.mode === "system-managed") && typeof value.path === "string";
|
|
31333
|
+
}
|
|
31334
|
+
return value.kind === "external" && typeof value.url === "string" && typeof value.label === "string";
|
|
31335
|
+
}
|
|
31336
|
+
function resolveRuntimeEventDestination(event) {
|
|
31337
|
+
if (isRuntimeEventDestination(event.destination)) {
|
|
31338
|
+
return event.destination;
|
|
31339
|
+
}
|
|
31340
|
+
return {
|
|
31341
|
+
kind: "native",
|
|
31342
|
+
mode: event.eventDestinationMode === "system-managed" ? "system-managed" : "cms-managed",
|
|
31343
|
+
path: typeof event.path === "string" ? event.path : ""
|
|
31344
|
+
};
|
|
31345
|
+
}
|
|
31346
|
+
|
|
31258
31347
|
// ../blocks/src/system/runtime/nodes/events/shared/pricing.ts
|
|
31259
31348
|
var DEFAULT_EVENT_CURRENCY = "USD";
|
|
31260
31349
|
function resolveRuntimeEventPricing(event) {
|
|
31261
31350
|
if (isPublicEventPricing(event.pricing)) {
|
|
31262
31351
|
return event.pricing;
|
|
31263
31352
|
}
|
|
31353
|
+
const destination = resolveRuntimeEventDestination(event);
|
|
31354
|
+
if (destination.kind === "external") {
|
|
31355
|
+
return {
|
|
31356
|
+
kind: "external",
|
|
31357
|
+
display: { kind: "external", label: "External registration" }
|
|
31358
|
+
};
|
|
31359
|
+
}
|
|
31264
31360
|
const legacy = event;
|
|
31265
31361
|
const currency = readCurrency(legacy.currency);
|
|
31266
31362
|
if (event.requiresRegistration === false) {
|
|
@@ -31297,22 +31393,22 @@ function resolveRuntimeEventPricing(event) {
|
|
|
31297
31393
|
function readCurrency(value) {
|
|
31298
31394
|
return typeof value === "string" && value.trim().length > 0 ? value : DEFAULT_EVENT_CURRENCY;
|
|
31299
31395
|
}
|
|
31300
|
-
function
|
|
31396
|
+
function isRecord4(value) {
|
|
31301
31397
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
31302
31398
|
}
|
|
31303
31399
|
function isPublicEventPricing(value) {
|
|
31304
|
-
if (!
|
|
31305
|
-
return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "ticket_types" || value.kind === "course";
|
|
31400
|
+
if (!isRecord4(value) || typeof value.kind !== "string") return false;
|
|
31401
|
+
return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "ticket_types" || value.kind === "course" || value.kind === "external";
|
|
31306
31402
|
}
|
|
31307
31403
|
function isPublicEventTicketType(value) {
|
|
31308
|
-
return
|
|
31404
|
+
return isRecord4(value) && typeof value.id === "string";
|
|
31309
31405
|
}
|
|
31310
31406
|
function readTicketTypePriceDisplay(value, currency) {
|
|
31311
31407
|
const display = readLegacyPriceDisplay(value, currency);
|
|
31312
|
-
return display.kind === "course" ? { kind: "unavailable", currency } : display;
|
|
31408
|
+
return display.kind === "course" || display.kind === "external" ? { kind: "unavailable", currency } : display;
|
|
31313
31409
|
}
|
|
31314
31410
|
function readLegacyPriceDisplay(value, currency) {
|
|
31315
|
-
if (!
|
|
31411
|
+
if (!isRecord4(value) || typeof value.kind !== "string") {
|
|
31316
31412
|
return { kind: "unavailable", currency };
|
|
31317
31413
|
}
|
|
31318
31414
|
const displayCurrency = readCurrency(value.currency);
|
|
@@ -31351,7 +31447,7 @@ function readLegacyPriceDisplay(value, currency) {
|
|
|
31351
31447
|
case "unavailable":
|
|
31352
31448
|
return { kind: "unavailable", currency: displayCurrency };
|
|
31353
31449
|
case "course":
|
|
31354
|
-
return
|
|
31450
|
+
return isRecord4(value.display) ? {
|
|
31355
31451
|
kind: "course",
|
|
31356
31452
|
display: readCoursePriceDisplay(value.display, displayCurrency)
|
|
31357
31453
|
} : {
|
|
@@ -31387,16 +31483,17 @@ function readAmount(value) {
|
|
|
31387
31483
|
}
|
|
31388
31484
|
|
|
31389
31485
|
// ../blocks/src/system/runtime/nodes/shared/contract-schemas.ts
|
|
31390
|
-
import { z as
|
|
31391
|
-
var previewStageSchema =
|
|
31392
|
-
var registrationButtonVariantSchema =
|
|
31393
|
-
var eventButtonVariantSchema =
|
|
31394
|
-
var eventLayoutSchema =
|
|
31395
|
-
var eventCalendarDisplayModeSchema =
|
|
31396
|
-
var
|
|
31397
|
-
var
|
|
31398
|
-
var
|
|
31399
|
-
var
|
|
31486
|
+
import { z as z46 } from "zod";
|
|
31487
|
+
var previewStageSchema = z46.enum(["preview", "published"]);
|
|
31488
|
+
var registrationButtonVariantSchema = z46.enum(["primary", "secondary", "outline"]);
|
|
31489
|
+
var eventButtonVariantSchema = z46.enum(["primary", "secondary", "outline", "link"]);
|
|
31490
|
+
var eventLayoutSchema = z46.enum(eventCalendarListLayoutValues);
|
|
31491
|
+
var eventCalendarDisplayModeSchema = z46.enum(eventCalendarDisplayModeValues);
|
|
31492
|
+
var eventCalendarDefaultViewSchema = z46.enum(eventCalendarDefaultViewValues);
|
|
31493
|
+
var columnOptionSchema = z46.enum(["2", "3", "4"]);
|
|
31494
|
+
var weekStartSchema = z46.enum(["sunday", "monday"]);
|
|
31495
|
+
var filterAutoShowSchema = z46.enum(["auto", "always", "never"]);
|
|
31496
|
+
var calendarTabViewsSchema = z46.enum(["both", "month", "week"]);
|
|
31400
31497
|
|
|
31401
31498
|
// ../blocks/src/system/runtime/nodes/event-registration/wizardSteps.ts
|
|
31402
31499
|
function getWizardStepsForContext(hasPreSelectedContext, needsPaymentStep) {
|
|
@@ -31414,7 +31511,7 @@ function eventMatchesOccurrenceId(event, occurrenceId) {
|
|
|
31414
31511
|
function findPreSelectedEvent(input) {
|
|
31415
31512
|
const occurrenceContext = input.occurrenceContext;
|
|
31416
31513
|
if (!occurrenceContext) {
|
|
31417
|
-
return null;
|
|
31514
|
+
return input.scopedEvents.length === 1 ? input.scopedEvents[0] ?? null : null;
|
|
31418
31515
|
}
|
|
31419
31516
|
const contextDate = getBookingLocalDateKey(toScheduledBookingDateTime({
|
|
31420
31517
|
startsAt: occurrenceContext.startsAt,
|
|
@@ -31437,7 +31534,7 @@ function resolveEventRequiresPayment(input) {
|
|
|
31437
31534
|
if (!input.event) {
|
|
31438
31535
|
return false;
|
|
31439
31536
|
}
|
|
31440
|
-
return publicEventPricingType(resolveRuntimeEventPricing(input.event))
|
|
31537
|
+
return publicEventPricingType(resolveRuntimeEventPricing(input.event)) === "paid";
|
|
31441
31538
|
}
|
|
31442
31539
|
|
|
31443
31540
|
// ../blocks/src/system/runtime/nodes/event-registration/registrationEventAdapter.ts
|
|
@@ -31456,68 +31553,72 @@ function toRegistrationEvents(events) {
|
|
|
31456
31553
|
// ../blocks/src/system/runtime/nodes/event-registration.interactive.ts
|
|
31457
31554
|
var EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS = ["Date", "Tickets", "Details"];
|
|
31458
31555
|
var EVENT_REGISTRATION_SHELL_STEP_LABELS = ["Event", "Date", "Tickets", "Details", "Payment"];
|
|
31459
|
-
var contentEntrySchema =
|
|
31460
|
-
id:
|
|
31461
|
-
slug:
|
|
31462
|
-
contentTypeSlug:
|
|
31556
|
+
var contentEntrySchema = z47.object({
|
|
31557
|
+
id: z47.string(),
|
|
31558
|
+
slug: z47.string(),
|
|
31559
|
+
contentTypeSlug: z47.string()
|
|
31463
31560
|
});
|
|
31464
|
-
var eventRegistrationPublicEventSchema =
|
|
31561
|
+
var eventRegistrationPublicEventSchema = z47.preprocess(
|
|
31465
31562
|
normalizeEventRegistrationEventInput,
|
|
31466
31563
|
publicEventSchema
|
|
31467
31564
|
);
|
|
31468
|
-
var eventRegistrationSourceSchema =
|
|
31469
|
-
siteId:
|
|
31470
|
-
apiBaseUrl:
|
|
31471
|
-
portalToken:
|
|
31472
|
-
previewToken:
|
|
31565
|
+
var eventRegistrationSourceSchema = z47.object({
|
|
31566
|
+
siteId: z47.string().optional(),
|
|
31567
|
+
apiBaseUrl: z47.string().optional(),
|
|
31568
|
+
portalToken: z47.string().nullable().optional(),
|
|
31569
|
+
previewToken: z47.string().nullable().optional(),
|
|
31473
31570
|
occurrenceContext: occurrenceContextSchema.optional(),
|
|
31474
31571
|
contentEntry: contentEntrySchema.nullable().optional(),
|
|
31475
|
-
events:
|
|
31476
|
-
className:
|
|
31477
|
-
buttonText:
|
|
31478
|
-
maxTickets:
|
|
31479
|
-
showVenue:
|
|
31480
|
-
showCapacity:
|
|
31481
|
-
successMessage:
|
|
31482
|
-
waitlistMessage:
|
|
31572
|
+
events: z47.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
31573
|
+
className: z47.string().nullable().optional(),
|
|
31574
|
+
buttonText: z47.string().nullable().optional(),
|
|
31575
|
+
maxTickets: z47.string().nullable().optional(),
|
|
31576
|
+
showVenue: z47.boolean().optional(),
|
|
31577
|
+
showCapacity: z47.boolean().optional(),
|
|
31578
|
+
successMessage: z47.string().optional(),
|
|
31579
|
+
waitlistMessage: z47.string().optional(),
|
|
31483
31580
|
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
31484
|
-
overlayEnabled:
|
|
31485
|
-
spamProtectionEnabled:
|
|
31581
|
+
overlayEnabled: z47.boolean().optional(),
|
|
31582
|
+
spamProtectionEnabled: z47.boolean().optional(),
|
|
31486
31583
|
stage: previewStageSchema.optional(),
|
|
31487
|
-
supportEmail:
|
|
31488
|
-
|
|
31489
|
-
|
|
31490
|
-
|
|
31491
|
-
|
|
31492
|
-
|
|
31493
|
-
|
|
31494
|
-
|
|
31495
|
-
|
|
31496
|
-
|
|
31497
|
-
|
|
31498
|
-
|
|
31584
|
+
supportEmail: z47.string().optional(),
|
|
31585
|
+
sitePasses: publicPassProductCollectionSchema.nullable().optional(),
|
|
31586
|
+
siteMemberships: publicMembershipProductCollectionSchema.nullable().optional()
|
|
31587
|
+
});
|
|
31588
|
+
var eventRegistrationDisplaySchema = z47.object({
|
|
31589
|
+
kind: z47.literal("event-registration"),
|
|
31590
|
+
state: z47.literal("generic-shell"),
|
|
31591
|
+
className: z47.string().nullable(),
|
|
31592
|
+
titleText: z47.string(),
|
|
31593
|
+
bodyText: z47.string(),
|
|
31594
|
+
stepLabels: z47.array(z47.enum(EVENT_REGISTRATION_SHELL_STEP_LABELS)).min(1),
|
|
31595
|
+
summaryButtonText: z47.string()
|
|
31596
|
+
});
|
|
31597
|
+
var eventRegistrationHydrationSchema = z47.object({
|
|
31499
31598
|
occurrenceContext: occurrenceContextSchema.optional(),
|
|
31500
31599
|
contentEntry: contentEntrySchema.nullable().optional(),
|
|
31501
|
-
events:
|
|
31502
|
-
maxTickets:
|
|
31503
|
-
showVenue:
|
|
31504
|
-
showCapacity:
|
|
31505
|
-
successMessage:
|
|
31506
|
-
waitlistMessage:
|
|
31600
|
+
events: z47.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
31601
|
+
maxTickets: z47.string().optional(),
|
|
31602
|
+
showVenue: z47.boolean().optional(),
|
|
31603
|
+
showCapacity: z47.boolean().optional(),
|
|
31604
|
+
successMessage: z47.string().optional(),
|
|
31605
|
+
waitlistMessage: z47.string().optional(),
|
|
31507
31606
|
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
31508
|
-
overlayEnabled:
|
|
31509
|
-
spamProtectionEnabled:
|
|
31510
|
-
supportEmail:
|
|
31607
|
+
overlayEnabled: z47.boolean().optional(),
|
|
31608
|
+
spamProtectionEnabled: z47.boolean().optional(),
|
|
31609
|
+
supportEmail: z47.string().optional(),
|
|
31610
|
+
sitePasses: publicPassProductCollectionSchema.nullable().optional(),
|
|
31611
|
+
siteMemberships: publicMembershipProductCollectionSchema.nullable().optional()
|
|
31511
31612
|
});
|
|
31512
|
-
var eventRegistrationRenderSchema =
|
|
31613
|
+
var eventRegistrationRenderSchema = z47.object({
|
|
31513
31614
|
display: eventRegistrationDisplaySchema,
|
|
31514
31615
|
hydration: eventRegistrationHydrationSchema
|
|
31515
31616
|
});
|
|
31516
|
-
var eventRegistrationIslandMetaCodec = createZodCodec(
|
|
31517
|
-
siteId:
|
|
31518
|
-
apiBaseUrl:
|
|
31519
|
-
portalToken:
|
|
31520
|
-
previewToken:
|
|
31617
|
+
var eventRegistrationIslandMetaCodec = createZodCodec(z47.object({
|
|
31618
|
+
siteId: z47.string().optional(),
|
|
31619
|
+
apiBaseUrl: z47.string().optional(),
|
|
31620
|
+
portalToken: z47.string().nullable().optional(),
|
|
31621
|
+
previewToken: z47.string().nullable().optional(),
|
|
31521
31622
|
stage: previewStageSchema.optional()
|
|
31522
31623
|
}));
|
|
31523
31624
|
var eventRegistrationIslandMetaKeys = defineInteractiveIslandMetaKeys(
|
|
@@ -31623,20 +31724,23 @@ var eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
31623
31724
|
buttonVariant: source.buttonVariant,
|
|
31624
31725
|
overlayEnabled: source.overlayEnabled,
|
|
31625
31726
|
spamProtectionEnabled: source.spamProtectionEnabled,
|
|
31626
|
-
supportEmail: source.supportEmail
|
|
31727
|
+
supportEmail: source.supportEmail,
|
|
31728
|
+
sitePasses: source.sitePasses ?? null,
|
|
31729
|
+
siteMemberships: source.siteMemberships ?? null
|
|
31627
31730
|
}
|
|
31628
31731
|
})
|
|
31629
31732
|
});
|
|
31630
31733
|
function normalizeEventRegistrationEventInput(value) {
|
|
31631
|
-
if (!
|
|
31734
|
+
if (!isRecord5(value)) {
|
|
31632
31735
|
return value;
|
|
31633
31736
|
}
|
|
31634
31737
|
return {
|
|
31635
31738
|
...value,
|
|
31739
|
+
destination: resolveRuntimeEventDestination(value),
|
|
31636
31740
|
pricing: resolveRuntimeEventPricing(value)
|
|
31637
31741
|
};
|
|
31638
31742
|
}
|
|
31639
|
-
function
|
|
31743
|
+
function isRecord5(value) {
|
|
31640
31744
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
31641
31745
|
}
|
|
31642
31746
|
var eventRegistrationInteractiveIslandPropsCodec = createInteractiveIslandCodec({
|
|
@@ -31805,6 +31909,8 @@ var eventRegistrationManifest = createBlockManifest({
|
|
|
31805
31909
|
},
|
|
31806
31910
|
// Event data from loader
|
|
31807
31911
|
events: { $bind: { from: "data.events" } },
|
|
31912
|
+
sitePasses: { $bind: { from: "data.sitePasses" } },
|
|
31913
|
+
siteMemberships: { $bind: { from: "data.siteMemberships" } },
|
|
31808
31914
|
// Stage for preview mode (allows registering for draft events)
|
|
31809
31915
|
stage: {
|
|
31810
31916
|
$bind: { from: "$root.previewStage", fallback: "published" }
|
|
@@ -31823,7 +31929,9 @@ var eventRegistrationBlockDefinition = {
|
|
|
31823
31929
|
manifest: eventRegistrationManifest,
|
|
31824
31930
|
runtime: eventRegistrationBlockRuntime,
|
|
31825
31931
|
dataSchemas: {
|
|
31826
|
-
events:
|
|
31932
|
+
events: publicEventsArraySchema.optional(),
|
|
31933
|
+
sitePasses: publicPassProductCollectionSchema.optional(),
|
|
31934
|
+
siteMemberships: publicMembershipProductCollectionSchema.optional(),
|
|
31827
31935
|
occurrenceContext: occurrenceContextSchema.optional()
|
|
31828
31936
|
},
|
|
31829
31937
|
dataLoaders: {
|
|
@@ -31842,6 +31950,20 @@ var eventRegistrationBlockDefinition = {
|
|
|
31842
31950
|
entryId: { $bind: { from: "$root.contentEntry._entryId", fallback: "" } }
|
|
31843
31951
|
},
|
|
31844
31952
|
mode: "server"
|
|
31953
|
+
},
|
|
31954
|
+
sitePasses: {
|
|
31955
|
+
endpoint: "listPublicPasses",
|
|
31956
|
+
params: {
|
|
31957
|
+
siteId: { $bind: { from: "$root.siteId" } }
|
|
31958
|
+
},
|
|
31959
|
+
mode: "server"
|
|
31960
|
+
},
|
|
31961
|
+
siteMemberships: {
|
|
31962
|
+
endpoint: "listPublicMemberships",
|
|
31963
|
+
params: {
|
|
31964
|
+
siteId: { $bind: { from: "$root.siteId" } }
|
|
31965
|
+
},
|
|
31966
|
+
mode: "server"
|
|
31845
31967
|
}
|
|
31846
31968
|
}
|
|
31847
31969
|
};
|
|
@@ -32173,35 +32295,7 @@ var courseRegistrationBlockDefinition = {
|
|
|
32173
32295
|
};
|
|
32174
32296
|
|
|
32175
32297
|
// ../blocks/src/system/blocks/event-details.ts
|
|
32176
|
-
import { z as z50 } from "zod";
|
|
32177
|
-
|
|
32178
|
-
// ../blocks/src/system/blocks/shop.shared.ts
|
|
32179
32298
|
import { z as z49 } from "zod";
|
|
32180
|
-
var publicPassProductSchema = z49.object({
|
|
32181
|
-
id: z49.string(),
|
|
32182
|
-
productUseCase: z49.enum(["event_pass", "appointment_package"]).default("event_pass"),
|
|
32183
|
-
name: z49.string(),
|
|
32184
|
-
description: z49.string().nullable(),
|
|
32185
|
-
price: z49.number(),
|
|
32186
|
-
currency: z49.string(),
|
|
32187
|
-
creditsTotal: z49.number(),
|
|
32188
|
-
pricePerCredit: z49.number(),
|
|
32189
|
-
validDays: z49.number().nullable(),
|
|
32190
|
-
eligibleCategoryIds: z49.array(z49.string()),
|
|
32191
|
-
eligibleCategoryNames: z49.array(z49.string())
|
|
32192
|
-
});
|
|
32193
|
-
var publicMembershipProductSchema = z49.object({
|
|
32194
|
-
id: z49.string(),
|
|
32195
|
-
name: z49.string(),
|
|
32196
|
-
description: z49.string().nullable(),
|
|
32197
|
-
price: z49.number(),
|
|
32198
|
-
currency: z49.string(),
|
|
32199
|
-
billingInterval: z49.enum(["month", "year"]),
|
|
32200
|
-
eligibleCategoryIds: z49.array(z49.string()),
|
|
32201
|
-
eligibleCategoryNames: z49.array(z49.string())
|
|
32202
|
-
});
|
|
32203
|
-
|
|
32204
|
-
// ../blocks/src/system/blocks/event-details.ts
|
|
32205
32299
|
var eventDetailsManifest = createBlockManifest({
|
|
32206
32300
|
id: "block.event-details",
|
|
32207
32301
|
version: "1.0.0",
|
|
@@ -32333,40 +32427,40 @@ var eventDetailsManifest = createBlockManifest({
|
|
|
32333
32427
|
})
|
|
32334
32428
|
]
|
|
32335
32429
|
});
|
|
32336
|
-
var occurrenceContextSchema2 =
|
|
32337
|
-
id:
|
|
32338
|
-
seriesId:
|
|
32339
|
-
startsAt:
|
|
32340
|
-
endsAt:
|
|
32341
|
-
timeZone:
|
|
32342
|
-
capacityOverride:
|
|
32343
|
-
overrides:
|
|
32430
|
+
var occurrenceContextSchema2 = z49.object({
|
|
32431
|
+
id: z49.string(),
|
|
32432
|
+
seriesId: z49.string(),
|
|
32433
|
+
startsAt: z49.string(),
|
|
32434
|
+
endsAt: z49.string(),
|
|
32435
|
+
timeZone: z49.string(),
|
|
32436
|
+
capacityOverride: z49.number().nullable().optional(),
|
|
32437
|
+
overrides: z49.record(z49.string(), z49.unknown()).nullable().optional()
|
|
32344
32438
|
}).nullable();
|
|
32345
|
-
var eventAutoApplyDiscountPreviewBaseSchema =
|
|
32346
|
-
id:
|
|
32347
|
-
publicLabel:
|
|
32348
|
-
description:
|
|
32349
|
-
minTicketsRequired:
|
|
32439
|
+
var eventAutoApplyDiscountPreviewBaseSchema = z49.object({
|
|
32440
|
+
id: z49.string(),
|
|
32441
|
+
publicLabel: z49.string(),
|
|
32442
|
+
description: z49.string().nullable(),
|
|
32443
|
+
minTicketsRequired: z49.number().nullable()
|
|
32350
32444
|
});
|
|
32351
|
-
var eventAutoApplyDiscountPreviewSchema =
|
|
32445
|
+
var eventAutoApplyDiscountPreviewSchema = z49.discriminatedUnion("discountType", [
|
|
32352
32446
|
eventAutoApplyDiscountPreviewBaseSchema.extend({
|
|
32353
|
-
discountType:
|
|
32354
|
-
discountPercent:
|
|
32355
|
-
discountAmountCents:
|
|
32447
|
+
discountType: z49.literal("percent"),
|
|
32448
|
+
discountPercent: z49.number(),
|
|
32449
|
+
discountAmountCents: z49.null()
|
|
32356
32450
|
}),
|
|
32357
32451
|
eventAutoApplyDiscountPreviewBaseSchema.extend({
|
|
32358
|
-
discountType:
|
|
32359
|
-
discountPercent:
|
|
32360
|
-
discountAmountCents:
|
|
32452
|
+
discountType: z49.literal("fixed"),
|
|
32453
|
+
discountPercent: z49.null(),
|
|
32454
|
+
discountAmountCents: z49.number()
|
|
32361
32455
|
})
|
|
32362
32456
|
]);
|
|
32363
32457
|
var eventDetailsBlockDefinition = {
|
|
32364
32458
|
manifest: eventDetailsManifest,
|
|
32365
32459
|
dataSchemas: {
|
|
32366
|
-
eventDetailsData:
|
|
32460
|
+
eventDetailsData: z49.object({
|
|
32367
32461
|
events: publicEventsArraySchema,
|
|
32368
|
-
sitePasses:
|
|
32369
|
-
siteMemberships:
|
|
32462
|
+
sitePasses: publicPassProductCollectionSchema,
|
|
32463
|
+
siteMemberships: publicMembershipProductCollectionSchema,
|
|
32370
32464
|
autoApplyDiscount: eventAutoApplyDiscountPreviewSchema.nullable().optional().default(null)
|
|
32371
32465
|
}).optional(),
|
|
32372
32466
|
occurrenceContext: occurrenceContextSchema2.optional()
|
|
@@ -32690,7 +32784,7 @@ var eventSpotlightBlockDefinition = {
|
|
|
32690
32784
|
};
|
|
32691
32785
|
|
|
32692
32786
|
// ../blocks/src/system/runtime/nodes/events/EventListing.interactive.ts
|
|
32693
|
-
import { z as
|
|
32787
|
+
import { z as z51 } from "zod";
|
|
32694
32788
|
|
|
32695
32789
|
// ../blocks/src/system/runtime/nodes/events/shared/utils.ts
|
|
32696
32790
|
var COLUMN_CLASSES = {
|
|
@@ -32798,16 +32892,16 @@ function computeMediaTransformStyle(value, style, targetAspectRatio, options) {
|
|
|
32798
32892
|
}
|
|
32799
32893
|
|
|
32800
32894
|
// ../blocks/src/system/runtime/nodes/events/shared/listOptions.ts
|
|
32801
|
-
import { z as
|
|
32895
|
+
import { z as z50 } from "zod";
|
|
32802
32896
|
var eventPageSizeValues = [3, 6, 10, 12, 20, 24, 30];
|
|
32803
|
-
var eventPageSizeSchema =
|
|
32804
|
-
|
|
32805
|
-
|
|
32806
|
-
|
|
32807
|
-
|
|
32808
|
-
|
|
32809
|
-
|
|
32810
|
-
|
|
32897
|
+
var eventPageSizeSchema = z50.union([
|
|
32898
|
+
z50.literal(3),
|
|
32899
|
+
z50.literal(6),
|
|
32900
|
+
z50.literal(10),
|
|
32901
|
+
z50.literal(12),
|
|
32902
|
+
z50.literal(20),
|
|
32903
|
+
z50.literal(24),
|
|
32904
|
+
z50.literal(30)
|
|
32811
32905
|
]);
|
|
32812
32906
|
var eventPageSizeSet = new Set(eventPageSizeValues);
|
|
32813
32907
|
function resolveEventPageSize(value, fallback = 12) {
|
|
@@ -32817,15 +32911,15 @@ function resolveEventPageSize(value, fallback = 12) {
|
|
|
32817
32911
|
function resolveEventCalendarListPageSize(input) {
|
|
32818
32912
|
return resolveEventPageSize(input.eventsPerPage);
|
|
32819
32913
|
}
|
|
32820
|
-
var eventListPaginationActionSchema =
|
|
32821
|
-
|
|
32822
|
-
kind:
|
|
32823
|
-
label:
|
|
32914
|
+
var eventListPaginationActionSchema = z50.discriminatedUnion("kind", [
|
|
32915
|
+
z50.object({
|
|
32916
|
+
kind: z50.literal("loadMore"),
|
|
32917
|
+
label: z50.string()
|
|
32824
32918
|
}),
|
|
32825
|
-
|
|
32826
|
-
kind:
|
|
32827
|
-
label:
|
|
32828
|
-
href:
|
|
32919
|
+
z50.object({
|
|
32920
|
+
kind: z50.literal("seeAllLink"),
|
|
32921
|
+
label: z50.string(),
|
|
32922
|
+
href: z50.string()
|
|
32829
32923
|
})
|
|
32830
32924
|
]);
|
|
32831
32925
|
function resolveEventListPaginationAction(input) {
|
|
@@ -32838,89 +32932,89 @@ function resolveEventListPaginationAction(input) {
|
|
|
32838
32932
|
}
|
|
32839
32933
|
|
|
32840
32934
|
// ../blocks/src/system/runtime/nodes/events/EventListing.interactive.ts
|
|
32841
|
-
var legacyEventCardVariantSchema =
|
|
32842
|
-
var eventCardVariantInputSchema =
|
|
32935
|
+
var legacyEventCardVariantSchema = z51.enum(["variant1", "variant2"]);
|
|
32936
|
+
var eventCardVariantInputSchema = z51.union([
|
|
32843
32937
|
cardVariantRoleSchema,
|
|
32844
32938
|
legacyEventCardVariantSchema
|
|
32845
32939
|
]);
|
|
32846
|
-
var cardOrientationSchema =
|
|
32847
|
-
var eventBlockKindSchema =
|
|
32848
|
-
var eventSurfaceScopeSchema =
|
|
32849
|
-
var eventScheduleScopeSchema2 =
|
|
32850
|
-
var eventListingSourceSchema =
|
|
32851
|
-
events:
|
|
32852
|
-
siteId:
|
|
32853
|
-
apiBaseUrl:
|
|
32940
|
+
var cardOrientationSchema = z51.enum(["vertical", "horizontal"]);
|
|
32941
|
+
var eventBlockKindSchema = z51.enum(eventBlockKindValues);
|
|
32942
|
+
var eventSurfaceScopeSchema = z51.enum(eventSurfaceScopeValues);
|
|
32943
|
+
var eventScheduleScopeSchema2 = z51.enum(eventScheduleScopeValues);
|
|
32944
|
+
var eventListingSourceSchema = z51.object({
|
|
32945
|
+
events: z51.array(publicEventSchema).nullable().optional(),
|
|
32946
|
+
siteId: z51.string(),
|
|
32947
|
+
apiBaseUrl: z51.string().optional(),
|
|
32854
32948
|
stage: previewStageSchema.optional(),
|
|
32855
32949
|
layout: eventLayoutSchema.optional(),
|
|
32856
32950
|
columns: columnOptionSchema.optional(),
|
|
32857
|
-
eventsPerPage:
|
|
32858
|
-
paginationMode:
|
|
32859
|
-
seeAllUrl:
|
|
32860
|
-
loadMoreText:
|
|
32951
|
+
eventsPerPage: z51.string().optional(),
|
|
32952
|
+
paginationMode: z51.enum(["loadMore", "seeAllLink"]).optional(),
|
|
32953
|
+
seeAllUrl: z51.string().optional(),
|
|
32954
|
+
loadMoreText: z51.string().optional(),
|
|
32861
32955
|
cardVariant: eventCardVariantInputSchema.optional(),
|
|
32862
32956
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
32863
|
-
buttonText:
|
|
32864
|
-
showVenue:
|
|
32865
|
-
showMap:
|
|
32866
|
-
showCapacity:
|
|
32867
|
-
emptyMessage:
|
|
32868
|
-
className:
|
|
32869
|
-
showFilters:
|
|
32957
|
+
buttonText: z51.string().optional(),
|
|
32958
|
+
showVenue: z51.boolean().optional(),
|
|
32959
|
+
showMap: z51.boolean().optional(),
|
|
32960
|
+
showCapacity: z51.boolean().optional(),
|
|
32961
|
+
emptyMessage: z51.string().optional(),
|
|
32962
|
+
className: z51.string().optional(),
|
|
32963
|
+
showFilters: z51.boolean().nullable().optional(),
|
|
32870
32964
|
showCategoryFilter: filterAutoShowSchema.optional(),
|
|
32871
|
-
showVenueFilter:
|
|
32872
|
-
showStaffFilter:
|
|
32965
|
+
showVenueFilter: z51.boolean().nullable().optional(),
|
|
32966
|
+
showStaffFilter: z51.boolean().nullable().optional(),
|
|
32873
32967
|
eventKind: eventBlockKindSchema.nullable().optional(),
|
|
32874
32968
|
eventSurface: eventSurfaceScopeSchema.nullable().optional(),
|
|
32875
|
-
filterEventPresets:
|
|
32969
|
+
filterEventPresets: z51.union([z51.string(), z51.array(z51.string())]).nullable().optional(),
|
|
32876
32970
|
scheduleScope: eventScheduleScopeSchema2.nullable().optional(),
|
|
32877
|
-
filterCategoryIds:
|
|
32878
|
-
filterStaffMemberId:
|
|
32879
|
-
filterVenueId:
|
|
32971
|
+
filterCategoryIds: z51.string().nullable().optional(),
|
|
32972
|
+
filterStaffMemberId: z51.string().nullable().optional(),
|
|
32973
|
+
filterVenueId: z51.string().nullable().optional()
|
|
32880
32974
|
});
|
|
32881
|
-
var eventListingDisplaySchema =
|
|
32882
|
-
kind:
|
|
32883
|
-
state:
|
|
32975
|
+
var eventListingDisplaySchema = z51.object({
|
|
32976
|
+
kind: z51.literal("event-listing"),
|
|
32977
|
+
state: z51.enum(["loading", "empty", "ready"]),
|
|
32884
32978
|
listLayout: eventLayoutSchema,
|
|
32885
|
-
className:
|
|
32886
|
-
emptyMessage:
|
|
32887
|
-
loadingMessage:
|
|
32888
|
-
containerClass:
|
|
32979
|
+
className: z51.string().nullable(),
|
|
32980
|
+
emptyMessage: z51.string(),
|
|
32981
|
+
loadingMessage: z51.string(),
|
|
32982
|
+
containerClass: z51.string(),
|
|
32889
32983
|
cardVariant: cardVariantRoleSchema,
|
|
32890
32984
|
buttonVariant: eventButtonVariantSchema,
|
|
32891
|
-
buttonText:
|
|
32892
|
-
showVenue:
|
|
32893
|
-
showMap:
|
|
32894
|
-
showCapacity:
|
|
32985
|
+
buttonText: z51.string(),
|
|
32986
|
+
showVenue: z51.boolean(),
|
|
32987
|
+
showMap: z51.boolean(),
|
|
32988
|
+
showCapacity: z51.boolean(),
|
|
32895
32989
|
orientation: cardOrientationSchema,
|
|
32896
|
-
events:
|
|
32990
|
+
events: z51.array(publicEventSchema)
|
|
32897
32991
|
});
|
|
32898
|
-
var eventListingHydrationSchema =
|
|
32899
|
-
siteId:
|
|
32992
|
+
var eventListingHydrationSchema = z51.object({
|
|
32993
|
+
siteId: z51.string(),
|
|
32900
32994
|
stage: previewStageSchema.optional(),
|
|
32901
32995
|
eventsPerPage: eventPageSizeSchema,
|
|
32902
32996
|
paginationAction: eventListPaginationActionSchema,
|
|
32903
|
-
showFilters:
|
|
32997
|
+
showFilters: z51.boolean(),
|
|
32904
32998
|
showCategoryFilter: filterAutoShowSchema,
|
|
32905
|
-
showVenueFilter:
|
|
32906
|
-
showStaffFilter:
|
|
32999
|
+
showVenueFilter: z51.boolean(),
|
|
33000
|
+
showStaffFilter: z51.boolean(),
|
|
32907
33001
|
eventKind: eventBlockKindSchema,
|
|
32908
33002
|
eventSurface: eventSurfaceScopeSchema,
|
|
32909
|
-
filterEventPresets:
|
|
33003
|
+
filterEventPresets: z51.string().nullable(),
|
|
32910
33004
|
scheduleScope: eventScheduleScopeSchema2,
|
|
32911
|
-
filterCategoryIds:
|
|
32912
|
-
filterStaffMemberId:
|
|
32913
|
-
filterVenueId:
|
|
32914
|
-
fetchInitialEventsOnMount:
|
|
33005
|
+
filterCategoryIds: z51.string().nullable().optional(),
|
|
33006
|
+
filterStaffMemberId: z51.string().nullable().optional(),
|
|
33007
|
+
filterVenueId: z51.string().nullable().optional(),
|
|
33008
|
+
fetchInitialEventsOnMount: z51.boolean()
|
|
32915
33009
|
});
|
|
32916
|
-
var eventListingRenderSchema =
|
|
33010
|
+
var eventListingRenderSchema = z51.object({
|
|
32917
33011
|
display: eventListingDisplaySchema,
|
|
32918
33012
|
hydration: eventListingHydrationSchema
|
|
32919
33013
|
});
|
|
32920
33014
|
var eventListingIslandMetaCodec = createZodCodec(
|
|
32921
|
-
|
|
32922
|
-
siteId:
|
|
32923
|
-
apiBaseUrl:
|
|
33015
|
+
z51.object({
|
|
33016
|
+
siteId: z51.string(),
|
|
33017
|
+
apiBaseUrl: z51.string().optional(),
|
|
32924
33018
|
stage: previewStageSchema.optional()
|
|
32925
33019
|
})
|
|
32926
33020
|
);
|
|
@@ -33287,15 +33381,15 @@ var eventListingBlockDefinition = {
|
|
|
33287
33381
|
};
|
|
33288
33382
|
|
|
33289
33383
|
// ../blocks/src/system/runtime/nodes/events/EventCalendar.interactive.ts
|
|
33290
|
-
import { z as
|
|
33291
|
-
var eventBlockKindSchema2 =
|
|
33292
|
-
var eventSurfaceScopeSchema2 =
|
|
33293
|
-
var eventScheduleScopeSchema3 =
|
|
33294
|
-
var eventCalendarSourceSchema =
|
|
33384
|
+
import { z as z52 } from "zod";
|
|
33385
|
+
var eventBlockKindSchema2 = z52.enum(eventBlockKindValues);
|
|
33386
|
+
var eventSurfaceScopeSchema2 = z52.enum(eventSurfaceScopeValues);
|
|
33387
|
+
var eventScheduleScopeSchema3 = z52.enum(eventScheduleScopeValues);
|
|
33388
|
+
var eventCalendarSourceSchema = z52.object(
|
|
33295
33389
|
{
|
|
33296
|
-
events:
|
|
33297
|
-
siteId:
|
|
33298
|
-
apiBaseUrl:
|
|
33390
|
+
events: z52.array(publicEventSchema).nullable().optional(),
|
|
33391
|
+
siteId: z52.string(),
|
|
33392
|
+
apiBaseUrl: z52.string().optional(),
|
|
33299
33393
|
stage: previewStageSchema.optional(),
|
|
33300
33394
|
variant: eventCalendarDisplayModeSchema.nullable().optional(),
|
|
33301
33395
|
displayMode: eventCalendarDisplayModeSchema.nullable().optional(),
|
|
@@ -33303,78 +33397,80 @@ var eventCalendarSourceSchema = z53.object(
|
|
|
33303
33397
|
listColumns: columnOptionSchema.optional(),
|
|
33304
33398
|
layout: eventLayoutSchema.optional(),
|
|
33305
33399
|
columns: columnOptionSchema.optional(),
|
|
33306
|
-
eventsPerPage:
|
|
33307
|
-
paginationMode:
|
|
33308
|
-
seeAllUrl:
|
|
33309
|
-
loadMoreText:
|
|
33400
|
+
eventsPerPage: z52.string().optional(),
|
|
33401
|
+
paginationMode: z52.enum(["loadMore", "seeAllLink"]).optional(),
|
|
33402
|
+
seeAllUrl: z52.string().optional(),
|
|
33403
|
+
loadMoreText: z52.string().optional(),
|
|
33310
33404
|
startOfWeek: weekStartSchema.optional(),
|
|
33311
33405
|
calendarTabViews: calendarTabViewsSchema.optional(),
|
|
33312
|
-
|
|
33406
|
+
defaultCalendarView: eventCalendarDefaultViewSchema.optional(),
|
|
33407
|
+
showFilters: z52.boolean().nullable().optional(),
|
|
33313
33408
|
showCategoryFilter: filterAutoShowSchema.optional(),
|
|
33314
|
-
showVenueFilter:
|
|
33315
|
-
showStaffFilter:
|
|
33409
|
+
showVenueFilter: z52.boolean().nullable().optional(),
|
|
33410
|
+
showStaffFilter: z52.boolean().nullable().optional(),
|
|
33316
33411
|
kind: eventBlockKindSchema2.nullable().optional(),
|
|
33317
33412
|
eventSurface: eventSurfaceScopeSchema2.nullable().optional(),
|
|
33318
|
-
filterEventPresets:
|
|
33413
|
+
filterEventPresets: z52.union([z52.string(), z52.array(z52.string())]).nullable().optional(),
|
|
33319
33414
|
scheduleScope: eventScheduleScopeSchema3.nullable().optional(),
|
|
33320
|
-
filterCategoryIds:
|
|
33321
|
-
filterStaffMemberId:
|
|
33322
|
-
filterVenueId:
|
|
33415
|
+
filterCategoryIds: z52.union([z52.string(), z52.array(z52.string())]).nullable().optional(),
|
|
33416
|
+
filterStaffMemberId: z52.string().nullable().optional(),
|
|
33417
|
+
filterVenueId: z52.string().nullable().optional(),
|
|
33323
33418
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
33324
|
-
buttonText:
|
|
33325
|
-
showVenue:
|
|
33326
|
-
showMap:
|
|
33327
|
-
showCapacity:
|
|
33328
|
-
emptyMessage:
|
|
33329
|
-
className:
|
|
33419
|
+
buttonText: z52.string().optional(),
|
|
33420
|
+
showVenue: z52.boolean().nullable().optional(),
|
|
33421
|
+
showMap: z52.boolean().nullable().optional(),
|
|
33422
|
+
showCapacity: z52.boolean().nullable().optional(),
|
|
33423
|
+
emptyMessage: z52.string().optional(),
|
|
33424
|
+
className: z52.string().optional()
|
|
33330
33425
|
}
|
|
33331
33426
|
);
|
|
33332
|
-
var eventCalendarDisplaySchema =
|
|
33333
|
-
kind:
|
|
33427
|
+
var eventCalendarDisplaySchema = z52.object({
|
|
33428
|
+
kind: z52.literal("event-calendar"),
|
|
33334
33429
|
displayMode: eventCalendarDisplayModeSchema,
|
|
33335
|
-
className:
|
|
33336
|
-
events:
|
|
33430
|
+
className: z52.string().nullable(),
|
|
33431
|
+
events: z52.array(publicEventSchema),
|
|
33337
33432
|
listLayout: eventLayoutSchema,
|
|
33338
33433
|
listColumns: columnOptionSchema,
|
|
33339
33434
|
eventsPerPage: eventPageSizeSchema,
|
|
33340
33435
|
paginationAction: eventListPaginationActionSchema,
|
|
33341
33436
|
startOfWeek: weekStartSchema,
|
|
33342
33437
|
calendarTabViews: calendarTabViewsSchema,
|
|
33343
|
-
|
|
33438
|
+
defaultCalendarView: eventCalendarDefaultViewSchema,
|
|
33439
|
+
showFilters: z52.boolean(),
|
|
33344
33440
|
showCategoryFilter: filterAutoShowSchema,
|
|
33345
|
-
showVenueFilter:
|
|
33346
|
-
showStaffFilter:
|
|
33441
|
+
showVenueFilter: z52.boolean(),
|
|
33442
|
+
showStaffFilter: z52.boolean(),
|
|
33347
33443
|
eventKind: eventBlockKindSchema2,
|
|
33348
33444
|
eventSurface: eventSurfaceScopeSchema2,
|
|
33349
|
-
filterEventPresets:
|
|
33445
|
+
filterEventPresets: z52.string().nullable(),
|
|
33350
33446
|
scheduleScope: eventScheduleScopeSchema3,
|
|
33351
|
-
filterCategoryIds:
|
|
33352
|
-
filterStaffMemberId:
|
|
33353
|
-
filterVenueId:
|
|
33447
|
+
filterCategoryIds: z52.string().nullable(),
|
|
33448
|
+
filterStaffMemberId: z52.string().nullable(),
|
|
33449
|
+
filterVenueId: z52.string().nullable(),
|
|
33354
33450
|
buttonVariant: eventButtonVariantSchema,
|
|
33355
|
-
buttonText:
|
|
33356
|
-
showVenue:
|
|
33357
|
-
showMap:
|
|
33358
|
-
showCapacity:
|
|
33359
|
-
emptyMessage:
|
|
33360
|
-
});
|
|
33361
|
-
var eventCalendarHydrationSchema =
|
|
33362
|
-
siteId:
|
|
33451
|
+
buttonText: z52.string(),
|
|
33452
|
+
showVenue: z52.boolean(),
|
|
33453
|
+
showMap: z52.boolean(),
|
|
33454
|
+
showCapacity: z52.boolean(),
|
|
33455
|
+
emptyMessage: z52.string()
|
|
33456
|
+
});
|
|
33457
|
+
var eventCalendarHydrationSchema = z52.object({
|
|
33458
|
+
siteId: z52.string(),
|
|
33363
33459
|
stage: previewStageSchema.optional(),
|
|
33364
|
-
prefetchedEvents:
|
|
33460
|
+
prefetchedEvents: z52.boolean(),
|
|
33365
33461
|
eventKind: eventBlockKindSchema2,
|
|
33366
33462
|
eventSurface: eventSurfaceScopeSchema2,
|
|
33367
|
-
filterEventPresets:
|
|
33463
|
+
filterEventPresets: z52.string().nullable(),
|
|
33368
33464
|
scheduleScope: eventScheduleScopeSchema3
|
|
33369
33465
|
});
|
|
33370
|
-
var eventCalendarRenderSchema =
|
|
33466
|
+
var eventCalendarRenderSchema = z52.object({
|
|
33371
33467
|
display: eventCalendarDisplaySchema,
|
|
33372
33468
|
hydration: eventCalendarHydrationSchema
|
|
33373
33469
|
});
|
|
33374
33470
|
var eventCalendarIslandMetaCodec = createZodCodec(
|
|
33375
|
-
|
|
33376
|
-
siteId:
|
|
33377
|
-
apiBaseUrl:
|
|
33471
|
+
z52.object({
|
|
33472
|
+
siteId: z52.string(),
|
|
33473
|
+
apiBaseUrl: z52.string().optional(),
|
|
33378
33474
|
stage: previewStageSchema.optional()
|
|
33379
33475
|
})
|
|
33380
33476
|
);
|
|
@@ -33404,6 +33500,7 @@ function buildEventCalendarDisplay(source) {
|
|
|
33404
33500
|
}),
|
|
33405
33501
|
startOfWeek: source.startOfWeek ?? "monday",
|
|
33406
33502
|
calendarTabViews: source.calendarTabViews ?? "both",
|
|
33503
|
+
defaultCalendarView: source.defaultCalendarView ?? "month",
|
|
33407
33504
|
showFilters: source.showFilters ?? true,
|
|
33408
33505
|
showCategoryFilter: source.showCategoryFilter ?? "auto",
|
|
33409
33506
|
showVenueFilter: source.showVenueFilter ?? false,
|
|
@@ -33466,6 +33563,9 @@ function normalizeEventCalendarContent(content) {
|
|
|
33466
33563
|
...variant ? { variant } : {},
|
|
33467
33564
|
displayMode: normalizeEventCalendarDisplayMode(record.displayMode),
|
|
33468
33565
|
listLayout: normalizeEventCalendarListLayout(record.listLayout),
|
|
33566
|
+
defaultCalendarView: normalizeEventCalendarDefaultView(
|
|
33567
|
+
record.defaultCalendarView
|
|
33568
|
+
),
|
|
33469
33569
|
kind,
|
|
33470
33570
|
eventSurface: normalizeEventSurfaceScope(record.eventSurface),
|
|
33471
33571
|
filterEventPresets: normalizeEventSurfacePresets(record.filterEventPresets),
|
|
@@ -33483,6 +33583,9 @@ function normalizeEventCalendarDisplayMode(value) {
|
|
|
33483
33583
|
function normalizeEventCalendarListLayout(value) {
|
|
33484
33584
|
return isEventCalendarListLayout(value) ? value : void 0;
|
|
33485
33585
|
}
|
|
33586
|
+
function normalizeEventCalendarDefaultView(value) {
|
|
33587
|
+
return isEventCalendarDefaultView(value) ? value : void 0;
|
|
33588
|
+
}
|
|
33486
33589
|
var eventCalendarLayout = [
|
|
33487
33590
|
styledSection({
|
|
33488
33591
|
children: sectionContainer(
|
|
@@ -33542,6 +33645,9 @@ var eventCalendarLayout = [
|
|
|
33542
33645
|
calendarTabViews: {
|
|
33543
33646
|
$bind: { from: "content.calendarTabViews", fallback: "both" }
|
|
33544
33647
|
},
|
|
33648
|
+
defaultCalendarView: {
|
|
33649
|
+
$bind: { from: "content.defaultCalendarView", fallback: "month" }
|
|
33650
|
+
},
|
|
33545
33651
|
// Filtering options
|
|
33546
33652
|
showFilters: {
|
|
33547
33653
|
$bind: { from: "content.showFilters", fallback: true }
|
|
@@ -33608,8 +33714,7 @@ var eventCalendarAdditionalFields = [
|
|
|
33608
33714
|
defaultValue: "combined",
|
|
33609
33715
|
options: [
|
|
33610
33716
|
{ value: "combined", label: "Combined (List + Calendar tabs)" },
|
|
33611
|
-
{ value: "
|
|
33612
|
-
{ value: "week", label: "Week agenda" },
|
|
33717
|
+
{ value: "calendar", label: "Calendar" },
|
|
33613
33718
|
{ value: "timetable", label: "Timetable" },
|
|
33614
33719
|
{ value: "list", label: "List" }
|
|
33615
33720
|
],
|
|
@@ -33648,7 +33753,12 @@ var eventCalendarAdditionalFields = [
|
|
|
33648
33753
|
],
|
|
33649
33754
|
ui: {
|
|
33650
33755
|
intent: "display",
|
|
33651
|
-
visibleWhen: {
|
|
33756
|
+
visibleWhen: {
|
|
33757
|
+
allOf: [
|
|
33758
|
+
{ field: "variant", oneOf: ["combined", "list"] },
|
|
33759
|
+
{ field: "listLayout", equals: "grid" }
|
|
33760
|
+
]
|
|
33761
|
+
}
|
|
33652
33762
|
}
|
|
33653
33763
|
},
|
|
33654
33764
|
{
|
|
@@ -33696,7 +33806,12 @@ var eventCalendarAdditionalFields = [
|
|
|
33696
33806
|
required: false,
|
|
33697
33807
|
ui: {
|
|
33698
33808
|
intent: "display",
|
|
33699
|
-
visibleWhen: {
|
|
33809
|
+
visibleWhen: {
|
|
33810
|
+
allOf: [
|
|
33811
|
+
{ field: "variant", oneOf: ["combined", "list"] },
|
|
33812
|
+
{ field: "paginationMode", equals: "seeAllLink" }
|
|
33813
|
+
]
|
|
33814
|
+
}
|
|
33700
33815
|
}
|
|
33701
33816
|
},
|
|
33702
33817
|
{
|
|
@@ -33729,7 +33844,7 @@ var eventCalendarAdditionalFields = [
|
|
|
33729
33844
|
intent: "display",
|
|
33730
33845
|
visibleWhen: {
|
|
33731
33846
|
field: "variant",
|
|
33732
|
-
oneOf: ["combined", "
|
|
33847
|
+
oneOf: ["combined", "calendar", "timetable"]
|
|
33733
33848
|
}
|
|
33734
33849
|
}
|
|
33735
33850
|
},
|
|
@@ -33752,6 +33867,33 @@ var eventCalendarAdditionalFields = [
|
|
|
33752
33867
|
visibleWhen: { field: "variant", equals: "combined" }
|
|
33753
33868
|
}
|
|
33754
33869
|
},
|
|
33870
|
+
{
|
|
33871
|
+
id: "defaultCalendarView",
|
|
33872
|
+
type: "select",
|
|
33873
|
+
label: "Calendar view",
|
|
33874
|
+
description: "Choose the standalone calendar view, or the first view in combined mode",
|
|
33875
|
+
required: false,
|
|
33876
|
+
multiple: false,
|
|
33877
|
+
defaultValue: "month",
|
|
33878
|
+
options: [
|
|
33879
|
+
{ value: "month", label: "Month" },
|
|
33880
|
+
{ value: "week", label: "Week" }
|
|
33881
|
+
],
|
|
33882
|
+
ui: {
|
|
33883
|
+
intent: "display",
|
|
33884
|
+
visibleWhen: {
|
|
33885
|
+
anyOf: [
|
|
33886
|
+
{ field: "variant", equals: "calendar" },
|
|
33887
|
+
{
|
|
33888
|
+
allOf: [
|
|
33889
|
+
{ field: "variant", equals: "combined" },
|
|
33890
|
+
{ field: "calendarTabViews", equals: "both" }
|
|
33891
|
+
]
|
|
33892
|
+
}
|
|
33893
|
+
]
|
|
33894
|
+
}
|
|
33895
|
+
}
|
|
33896
|
+
},
|
|
33755
33897
|
// Filtering options
|
|
33756
33898
|
{
|
|
33757
33899
|
id: "kind",
|
|
@@ -33779,7 +33921,7 @@ var eventCalendarAdditionalFields = [
|
|
|
33779
33921
|
intent: "display",
|
|
33780
33922
|
visibleWhen: {
|
|
33781
33923
|
field: "variant",
|
|
33782
|
-
oneOf: ["combined", "list", "timetable"]
|
|
33924
|
+
oneOf: ["combined", "calendar", "list", "timetable"]
|
|
33783
33925
|
}
|
|
33784
33926
|
}
|
|
33785
33927
|
},
|
|
@@ -33799,8 +33941,10 @@ var eventCalendarAdditionalFields = [
|
|
|
33799
33941
|
ui: {
|
|
33800
33942
|
intent: "display",
|
|
33801
33943
|
visibleWhen: {
|
|
33802
|
-
|
|
33803
|
-
|
|
33944
|
+
allOf: [
|
|
33945
|
+
{ field: "variant", oneOf: ["combined", "calendar", "list", "timetable"] },
|
|
33946
|
+
{ field: "showFilters", equals: true }
|
|
33947
|
+
]
|
|
33804
33948
|
}
|
|
33805
33949
|
}
|
|
33806
33950
|
},
|
|
@@ -33814,8 +33958,10 @@ var eventCalendarAdditionalFields = [
|
|
|
33814
33958
|
ui: {
|
|
33815
33959
|
intent: "display",
|
|
33816
33960
|
visibleWhen: {
|
|
33817
|
-
|
|
33818
|
-
|
|
33961
|
+
allOf: [
|
|
33962
|
+
{ field: "variant", oneOf: ["combined", "calendar", "list", "timetable"] },
|
|
33963
|
+
{ field: "showFilters", equals: true }
|
|
33964
|
+
]
|
|
33819
33965
|
}
|
|
33820
33966
|
}
|
|
33821
33967
|
},
|
|
@@ -33829,8 +33975,10 @@ var eventCalendarAdditionalFields = [
|
|
|
33829
33975
|
ui: {
|
|
33830
33976
|
intent: "display",
|
|
33831
33977
|
visibleWhen: {
|
|
33832
|
-
|
|
33833
|
-
|
|
33978
|
+
allOf: [
|
|
33979
|
+
{ field: "variant", oneOf: ["combined", "calendar", "list", "timetable"] },
|
|
33980
|
+
{ field: "showFilters", equals: true }
|
|
33981
|
+
]
|
|
33834
33982
|
}
|
|
33835
33983
|
}
|
|
33836
33984
|
},
|
|
@@ -33844,8 +33992,15 @@ var eventCalendarAdditionalFields = [
|
|
|
33844
33992
|
ui: {
|
|
33845
33993
|
intent: "display",
|
|
33846
33994
|
visibleWhen: {
|
|
33847
|
-
|
|
33848
|
-
|
|
33995
|
+
anyOf: [
|
|
33996
|
+
{ field: "variant", oneOf: ["combined", "list", "timetable"] },
|
|
33997
|
+
{
|
|
33998
|
+
allOf: [
|
|
33999
|
+
{ field: "variant", equals: "calendar" },
|
|
34000
|
+
{ field: "defaultCalendarView", equals: "week" }
|
|
34001
|
+
]
|
|
34002
|
+
}
|
|
34003
|
+
]
|
|
33849
34004
|
}
|
|
33850
34005
|
}
|
|
33851
34006
|
},
|
|
@@ -33961,8 +34116,7 @@ var eventCalendarAdditionalFields = [
|
|
|
33961
34116
|
];
|
|
33962
34117
|
var eventCalendarVariants = {
|
|
33963
34118
|
combined: eventCalendarLayout[0],
|
|
33964
|
-
|
|
33965
|
-
week: eventCalendarLayout[0],
|
|
34119
|
+
calendar: eventCalendarLayout[0],
|
|
33966
34120
|
timetable: eventCalendarLayout[0],
|
|
33967
34121
|
list: eventCalendarLayout[0]
|
|
33968
34122
|
};
|
|
@@ -33974,8 +34128,7 @@ var eventCalendarDerivedFields = [
|
|
|
33974
34128
|
multiple: false,
|
|
33975
34129
|
options: [
|
|
33976
34130
|
{ value: "combined" },
|
|
33977
|
-
{ value: "
|
|
33978
|
-
{ value: "week" },
|
|
34131
|
+
{ value: "calendar" },
|
|
33979
34132
|
{ value: "timetable" },
|
|
33980
34133
|
{ value: "list" }
|
|
33981
34134
|
]
|
|
@@ -33988,6 +34141,13 @@ var eventCalendarDerivedFields = [
|
|
|
33988
34141
|
options: eventCalendarListLayoutOptions.map((option) => ({
|
|
33989
34142
|
value: option.id
|
|
33990
34143
|
}))
|
|
34144
|
+
},
|
|
34145
|
+
{
|
|
34146
|
+
id: "defaultCalendarView",
|
|
34147
|
+
type: "select",
|
|
34148
|
+
required: false,
|
|
34149
|
+
multiple: false,
|
|
34150
|
+
options: [{ value: "month" }, { value: "week" }]
|
|
33991
34151
|
}
|
|
33992
34152
|
];
|
|
33993
34153
|
var eventCalendarContentShape = {
|
|
@@ -34036,8 +34196,7 @@ var eventCalendarConfig = {
|
|
|
34036
34196
|
defaultVariant: "combined",
|
|
34037
34197
|
variantOptions: {
|
|
34038
34198
|
combined: { label: "Combined" },
|
|
34039
|
-
|
|
34040
|
-
week: { label: "Week" },
|
|
34199
|
+
calendar: { label: "Calendar" },
|
|
34041
34200
|
timetable: { label: "Timetable" },
|
|
34042
34201
|
list: { label: "List" }
|
|
34043
34202
|
}
|
|
@@ -34083,7 +34242,7 @@ var eventCalendarBlockDefinition = {
|
|
|
34083
34242
|
};
|
|
34084
34243
|
|
|
34085
34244
|
// ../blocks/src/system/blocks/offerings-preview/index.ts
|
|
34086
|
-
import { z as
|
|
34245
|
+
import { z as z53 } from "zod";
|
|
34087
34246
|
|
|
34088
34247
|
// ../blocks/src/system/blocks/offerings-preview/model.ts
|
|
34089
34248
|
var OFFERINGS_PREVIEW_DEFAULT_ITEM_LIMIT = "3";
|
|
@@ -34143,7 +34302,7 @@ function inferLegacyOfferingsPreviewGroupOrder(overrides) {
|
|
|
34143
34302
|
return keys.length >= 2 ? keys : [];
|
|
34144
34303
|
}
|
|
34145
34304
|
function normalizeOfferingsPreviewContentForWrite(value) {
|
|
34146
|
-
if (!
|
|
34305
|
+
if (!isRecord6(value)) return null;
|
|
34147
34306
|
const groupOrderValue = value.groupOrder;
|
|
34148
34307
|
if (Array.isArray(groupOrderValue)) {
|
|
34149
34308
|
const normalized = normalizeOfferingsPreviewGroupOrder(groupOrderValue);
|
|
@@ -34156,7 +34315,7 @@ function normalizeOfferingsPreviewContentForWrite(value) {
|
|
|
34156
34315
|
return { ...value, groupOrder: [] };
|
|
34157
34316
|
}
|
|
34158
34317
|
const legacyOrder = inferLegacyOfferingsPreviewGroupOrder(
|
|
34159
|
-
Array.isArray(value.groupOverrides) ? value.groupOverrides.filter(
|
|
34318
|
+
Array.isArray(value.groupOverrides) ? value.groupOverrides.filter(isRecord6) : []
|
|
34160
34319
|
);
|
|
34161
34320
|
return legacyOrder.length > 0 ? { ...value, groupOrder: legacyOrder } : value;
|
|
34162
34321
|
}
|
|
@@ -34170,18 +34329,18 @@ function uniqueOfferingsPreviewSourceKeys(values) {
|
|
|
34170
34329
|
}
|
|
34171
34330
|
return keys;
|
|
34172
34331
|
}
|
|
34173
|
-
function
|
|
34332
|
+
function isRecord6(value) {
|
|
34174
34333
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
34175
34334
|
}
|
|
34176
34335
|
|
|
34177
34336
|
// ../blocks/src/system/blocks/offerings-preview/index.ts
|
|
34178
|
-
var publicRouteCandidatesSchema =
|
|
34179
|
-
routes:
|
|
34180
|
-
entityId:
|
|
34181
|
-
path:
|
|
34182
|
-
title:
|
|
34183
|
-
kind:
|
|
34184
|
-
contentTypeKey:
|
|
34337
|
+
var publicRouteCandidatesSchema = z53.object({
|
|
34338
|
+
routes: z53.array(z53.object({
|
|
34339
|
+
entityId: z53.string(),
|
|
34340
|
+
path: z53.string(),
|
|
34341
|
+
title: z53.string(),
|
|
34342
|
+
kind: z53.enum(["page", "content"]),
|
|
34343
|
+
contentTypeKey: z53.string().nullable().optional()
|
|
34185
34344
|
}))
|
|
34186
34345
|
});
|
|
34187
34346
|
var groupOverrideFields = [
|
|
@@ -34537,7 +34696,7 @@ function isOfferingsPreviewItemLimit(value) {
|
|
|
34537
34696
|
return value === "1" || value === "2" || value === "3" || value === "4" || value === "5" || value === "6" || value === null;
|
|
34538
34697
|
}
|
|
34539
34698
|
function normalizeOfferingsPreviewGroupOverride(value) {
|
|
34540
|
-
if (!
|
|
34699
|
+
if (!isRecord7(value)) return [];
|
|
34541
34700
|
const override = {};
|
|
34542
34701
|
if (isOfferingsPreviewSourceKey(value.sourceKey) || value.sourceKey === null) {
|
|
34543
34702
|
override.sourceKey = value.sourceKey;
|
|
@@ -34569,17 +34728,17 @@ function isButtonVariant(value) {
|
|
|
34569
34728
|
return value === "primary" || value === "secondary" || value === "outline" || value === "link" || value === null;
|
|
34570
34729
|
}
|
|
34571
34730
|
function normalizeCardStylesContent(value) {
|
|
34572
|
-
return
|
|
34731
|
+
return isRecord7(value) || value === null ? value : void 0;
|
|
34573
34732
|
}
|
|
34574
34733
|
function normalizeSectionStylesContent(value) {
|
|
34575
|
-
return
|
|
34734
|
+
return isRecord7(value) || value === null ? value : void 0;
|
|
34576
34735
|
}
|
|
34577
|
-
function
|
|
34736
|
+
function isRecord7(value) {
|
|
34578
34737
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
34579
34738
|
}
|
|
34580
34739
|
|
|
34581
34740
|
// ../blocks/src/system/blocks/embed.ts
|
|
34582
|
-
import { z as
|
|
34741
|
+
import { z as z54 } from "zod";
|
|
34583
34742
|
var embedFields = [
|
|
34584
34743
|
// Section heading
|
|
34585
34744
|
parseFieldDefinition({
|
|
@@ -34810,18 +34969,18 @@ var embedManifest = createBlockManifest({
|
|
|
34810
34969
|
spacing: "lg"
|
|
34811
34970
|
}
|
|
34812
34971
|
});
|
|
34813
|
-
var embedEntrySchema =
|
|
34814
|
-
id:
|
|
34815
|
-
identifier:
|
|
34816
|
-
title:
|
|
34817
|
-
slug:
|
|
34818
|
-
content:
|
|
34819
|
-
publishedAt:
|
|
34972
|
+
var embedEntrySchema = z54.object({
|
|
34973
|
+
id: z54.string(),
|
|
34974
|
+
identifier: z54.string(),
|
|
34975
|
+
title: z54.string(),
|
|
34976
|
+
slug: z54.string().nullable().optional(),
|
|
34977
|
+
content: z54.record(z54.string(), z54.unknown()).optional(),
|
|
34978
|
+
publishedAt: z54.string().nullable().optional()
|
|
34820
34979
|
});
|
|
34821
34980
|
var embedBlockDefinition = {
|
|
34822
34981
|
manifest: embedManifest,
|
|
34823
34982
|
dataSchemas: {
|
|
34824
|
-
entries:
|
|
34983
|
+
entries: z54.array(embedEntrySchema).optional()
|
|
34825
34984
|
},
|
|
34826
34985
|
dataLoaders: {
|
|
34827
34986
|
entries: {
|
|
@@ -36004,53 +36163,50 @@ var fileDownloadBlockDefinition = {
|
|
|
36004
36163
|
manifest: fileDownloadManifest
|
|
36005
36164
|
};
|
|
36006
36165
|
|
|
36007
|
-
// ../blocks/src/system/blocks/shop.ts
|
|
36008
|
-
import { z as z59 } from "zod";
|
|
36009
|
-
|
|
36010
36166
|
// ../blocks/src/system/runtime/nodes/shop.interactive.ts
|
|
36011
|
-
import { z as
|
|
36167
|
+
import { z as z57 } from "zod";
|
|
36012
36168
|
|
|
36013
36169
|
// ../blocks/src/system/blocks/products/shared.ts
|
|
36014
|
-
import { z as
|
|
36015
|
-
var publicProductVariantSchema =
|
|
36016
|
-
id:
|
|
36017
|
-
title:
|
|
36018
|
-
sku:
|
|
36019
|
-
priceCents:
|
|
36020
|
-
stockQuantity:
|
|
36021
|
-
soldOut:
|
|
36022
|
-
});
|
|
36023
|
-
var publicProductSchema =
|
|
36024
|
-
id:
|
|
36025
|
-
contentEntryId:
|
|
36026
|
-
title:
|
|
36027
|
-
slug:
|
|
36028
|
-
path:
|
|
36029
|
-
status:
|
|
36030
|
-
priceCents:
|
|
36031
|
-
currency:
|
|
36032
|
-
productType:
|
|
36033
|
-
requiresShipping:
|
|
36034
|
-
hasVariants:
|
|
36035
|
-
trackInventory:
|
|
36036
|
-
soldOut:
|
|
36037
|
-
category:
|
|
36038
|
-
id:
|
|
36039
|
-
name:
|
|
36040
|
-
slug:
|
|
36170
|
+
import { z as z55 } from "zod";
|
|
36171
|
+
var publicProductVariantSchema = z55.object({
|
|
36172
|
+
id: z55.string(),
|
|
36173
|
+
title: z55.string(),
|
|
36174
|
+
sku: z55.string().nullable(),
|
|
36175
|
+
priceCents: z55.number(),
|
|
36176
|
+
stockQuantity: z55.number().nullable(),
|
|
36177
|
+
soldOut: z55.boolean()
|
|
36178
|
+
});
|
|
36179
|
+
var publicProductSchema = z55.object({
|
|
36180
|
+
id: z55.string(),
|
|
36181
|
+
contentEntryId: z55.string().nullable(),
|
|
36182
|
+
title: z55.string(),
|
|
36183
|
+
slug: z55.string(),
|
|
36184
|
+
path: z55.string().nullable(),
|
|
36185
|
+
status: z55.enum(["draft", "active"]),
|
|
36186
|
+
priceCents: z55.number(),
|
|
36187
|
+
currency: z55.string(),
|
|
36188
|
+
productType: z55.enum(["physical", "digital"]),
|
|
36189
|
+
requiresShipping: z55.boolean(),
|
|
36190
|
+
hasVariants: z55.boolean(),
|
|
36191
|
+
trackInventory: z55.boolean(),
|
|
36192
|
+
soldOut: z55.boolean(),
|
|
36193
|
+
category: z55.object({
|
|
36194
|
+
id: z55.string(),
|
|
36195
|
+
name: z55.string(),
|
|
36196
|
+
slug: z55.string()
|
|
36041
36197
|
}).nullable(),
|
|
36042
|
-
summary:
|
|
36043
|
-
body:
|
|
36044
|
-
gallery:
|
|
36045
|
-
|
|
36046
|
-
url:
|
|
36047
|
-
alt:
|
|
36198
|
+
summary: z55.string().nullable(),
|
|
36199
|
+
body: z55.unknown().nullable(),
|
|
36200
|
+
gallery: z55.array(
|
|
36201
|
+
z55.object({
|
|
36202
|
+
url: z55.string(),
|
|
36203
|
+
alt: z55.string().nullable()
|
|
36048
36204
|
})
|
|
36049
36205
|
),
|
|
36050
|
-
variants:
|
|
36206
|
+
variants: z55.array(publicProductVariantSchema)
|
|
36051
36207
|
});
|
|
36052
|
-
var publicProductsResponseSchema =
|
|
36053
|
-
products:
|
|
36208
|
+
var publicProductsResponseSchema = z55.object({
|
|
36209
|
+
products: z55.array(publicProductSchema)
|
|
36054
36210
|
});
|
|
36055
36211
|
|
|
36056
36212
|
// ../blocks/src/system/runtime/api/creditProducts.ts
|
|
@@ -36114,27 +36270,27 @@ function deriveCreditProductLabels(products, options = {}) {
|
|
|
36114
36270
|
}
|
|
36115
36271
|
|
|
36116
36272
|
// ../blocks/src/system/runtime/nodes/shop-commerce.shared.ts
|
|
36117
|
-
import { z as
|
|
36118
|
-
var storedProductCartItemSchema =
|
|
36119
|
-
kind:
|
|
36120
|
-
productId:
|
|
36121
|
-
productCategoryId:
|
|
36122
|
-
variantId:
|
|
36123
|
-
title:
|
|
36124
|
-
variantTitle:
|
|
36125
|
-
quantity:
|
|
36126
|
-
unitPriceCents:
|
|
36127
|
-
currency:
|
|
36128
|
-
imageUrl:
|
|
36129
|
-
soldOut:
|
|
36130
|
-
});
|
|
36131
|
-
var storedPassCartItemSchema =
|
|
36132
|
-
kind:
|
|
36133
|
-
passId:
|
|
36134
|
-
title:
|
|
36135
|
-
quantity:
|
|
36136
|
-
unitPriceCents:
|
|
36137
|
-
currency:
|
|
36273
|
+
import { z as z56 } from "zod";
|
|
36274
|
+
var storedProductCartItemSchema = z56.object({
|
|
36275
|
+
kind: z56.literal("product"),
|
|
36276
|
+
productId: z56.string().min(1),
|
|
36277
|
+
productCategoryId: z56.string().min(1).optional().nullable(),
|
|
36278
|
+
variantId: z56.string().min(1).optional().nullable(),
|
|
36279
|
+
title: z56.string().min(1),
|
|
36280
|
+
variantTitle: z56.string().optional().nullable(),
|
|
36281
|
+
quantity: z56.number().finite(),
|
|
36282
|
+
unitPriceCents: z56.number().finite(),
|
|
36283
|
+
currency: z56.string().min(1),
|
|
36284
|
+
imageUrl: z56.string().optional().nullable(),
|
|
36285
|
+
soldOut: z56.boolean().optional()
|
|
36286
|
+
});
|
|
36287
|
+
var storedPassCartItemSchema = z56.object({
|
|
36288
|
+
kind: z56.literal("pass"),
|
|
36289
|
+
passId: z56.string().min(1),
|
|
36290
|
+
title: z56.string().min(1),
|
|
36291
|
+
quantity: z56.number().finite().optional(),
|
|
36292
|
+
unitPriceCents: z56.number().finite(),
|
|
36293
|
+
currency: z56.string().min(1)
|
|
36138
36294
|
});
|
|
36139
36295
|
function deriveCommerceCheckoutState(state) {
|
|
36140
36296
|
if (state.items.length === 0) {
|
|
@@ -36368,214 +36524,214 @@ function formatValidity(days) {
|
|
|
36368
36524
|
}
|
|
36369
36525
|
|
|
36370
36526
|
// ../blocks/src/system/runtime/nodes/shop.interactive.ts
|
|
36371
|
-
var shopModeSchema =
|
|
36372
|
-
var contentEntrySchema3 =
|
|
36373
|
-
id:
|
|
36374
|
-
slug:
|
|
36527
|
+
var shopModeSchema = z57.enum(["passes-memberships", "product-list", "product-detail", "cart", "checkout"]);
|
|
36528
|
+
var contentEntrySchema3 = z57.object({
|
|
36529
|
+
id: z57.string().nullable().optional(),
|
|
36530
|
+
slug: z57.string().nullable().optional()
|
|
36375
36531
|
}).nullable();
|
|
36376
|
-
var shopSourceSchema =
|
|
36377
|
-
className:
|
|
36532
|
+
var shopSourceSchema = z57.object({
|
|
36533
|
+
className: z57.string().nullable().optional(),
|
|
36378
36534
|
mode: shopModeSchema.optional(),
|
|
36379
|
-
heading:
|
|
36380
|
-
productSlug:
|
|
36381
|
-
showPasses:
|
|
36382
|
-
showMemberships:
|
|
36383
|
-
layout:
|
|
36384
|
-
columns:
|
|
36385
|
-
showDescriptions:
|
|
36386
|
-
showSummary:
|
|
36387
|
-
showBody:
|
|
36388
|
-
showPrices:
|
|
36389
|
-
showValidityPeriod:
|
|
36390
|
-
showPricePerCredit:
|
|
36391
|
-
passesHeading:
|
|
36392
|
-
membershipsHeading:
|
|
36393
|
-
buyButtonText:
|
|
36394
|
-
addButtonText:
|
|
36395
|
-
passPurchaseMode:
|
|
36396
|
-
subscribeButtonText:
|
|
36397
|
-
emptyStateText:
|
|
36398
|
-
checkoutButtonText:
|
|
36399
|
-
clearButtonText:
|
|
36400
|
-
submitButtonText:
|
|
36535
|
+
heading: z57.string().nullable().optional(),
|
|
36536
|
+
productSlug: z57.string().nullable().optional(),
|
|
36537
|
+
showPasses: z57.boolean().optional(),
|
|
36538
|
+
showMemberships: z57.boolean().optional(),
|
|
36539
|
+
layout: z57.enum(["grid", "list"]).optional(),
|
|
36540
|
+
columns: z57.string().optional(),
|
|
36541
|
+
showDescriptions: z57.boolean().optional(),
|
|
36542
|
+
showSummary: z57.boolean().optional(),
|
|
36543
|
+
showBody: z57.boolean().optional(),
|
|
36544
|
+
showPrices: z57.boolean().optional(),
|
|
36545
|
+
showValidityPeriod: z57.boolean().optional(),
|
|
36546
|
+
showPricePerCredit: z57.boolean().nullable().optional(),
|
|
36547
|
+
passesHeading: z57.string().optional(),
|
|
36548
|
+
membershipsHeading: z57.string().optional(),
|
|
36549
|
+
buyButtonText: z57.string().optional(),
|
|
36550
|
+
addButtonText: z57.string().optional(),
|
|
36551
|
+
passPurchaseMode: z57.enum(["add_to_cart", "buy_now"]).optional(),
|
|
36552
|
+
subscribeButtonText: z57.string().optional(),
|
|
36553
|
+
emptyStateText: z57.string().optional(),
|
|
36554
|
+
checkoutButtonText: z57.string().optional(),
|
|
36555
|
+
clearButtonText: z57.string().optional(),
|
|
36556
|
+
submitButtonText: z57.string().optional(),
|
|
36401
36557
|
contentEntry: contentEntrySchema3.optional(),
|
|
36402
|
-
passes:
|
|
36403
|
-
memberships:
|
|
36404
|
-
products:
|
|
36405
|
-
siteId:
|
|
36406
|
-
apiBaseUrl:
|
|
36558
|
+
passes: z57.array(publicPassProductSchema).nullable().optional(),
|
|
36559
|
+
memberships: z57.array(publicMembershipProductSchema).nullable().optional(),
|
|
36560
|
+
products: z57.array(publicProductSchema).nullable().optional(),
|
|
36561
|
+
siteId: z57.string().optional(),
|
|
36562
|
+
apiBaseUrl: z57.string().optional(),
|
|
36407
36563
|
stage: previewStageSchema.optional()
|
|
36408
36564
|
});
|
|
36409
|
-
var productVariantOptionDisplaySchema =
|
|
36410
|
-
id:
|
|
36411
|
-
label:
|
|
36412
|
-
soldOut:
|
|
36413
|
-
});
|
|
36414
|
-
var productCardDisplaySchema =
|
|
36415
|
-
productId:
|
|
36416
|
-
title:
|
|
36417
|
-
path:
|
|
36418
|
-
summary:
|
|
36419
|
-
priceLabel:
|
|
36420
|
-
image:
|
|
36421
|
-
url:
|
|
36422
|
-
alt:
|
|
36565
|
+
var productVariantOptionDisplaySchema = z57.object({
|
|
36566
|
+
id: z57.string(),
|
|
36567
|
+
label: z57.string(),
|
|
36568
|
+
soldOut: z57.boolean()
|
|
36569
|
+
});
|
|
36570
|
+
var productCardDisplaySchema = z57.object({
|
|
36571
|
+
productId: z57.string(),
|
|
36572
|
+
title: z57.string(),
|
|
36573
|
+
path: z57.string().nullable(),
|
|
36574
|
+
summary: z57.string().nullable(),
|
|
36575
|
+
priceLabel: z57.string().nullable(),
|
|
36576
|
+
image: z57.object({
|
|
36577
|
+
url: z57.string(),
|
|
36578
|
+
alt: z57.string().nullable()
|
|
36423
36579
|
}).nullable(),
|
|
36424
|
-
variantOptions:
|
|
36425
|
-
selectedVariantId:
|
|
36426
|
-
selectionLabel:
|
|
36427
|
-
actionLabel:
|
|
36428
|
-
soldOut:
|
|
36429
|
-
});
|
|
36430
|
-
var productListDisplaySchema =
|
|
36431
|
-
kind:
|
|
36432
|
-
state:
|
|
36433
|
-
heading:
|
|
36434
|
-
className:
|
|
36435
|
-
layout:
|
|
36436
|
-
columns:
|
|
36437
|
-
emptyMessage:
|
|
36438
|
-
cards:
|
|
36439
|
-
});
|
|
36440
|
-
var productDetailDisplaySchema =
|
|
36441
|
-
|
|
36442
|
-
kind:
|
|
36443
|
-
state:
|
|
36444
|
-
heading:
|
|
36445
|
-
className:
|
|
36446
|
-
emptyMessage:
|
|
36580
|
+
variantOptions: z57.array(productVariantOptionDisplaySchema),
|
|
36581
|
+
selectedVariantId: z57.string().nullable(),
|
|
36582
|
+
selectionLabel: z57.string(),
|
|
36583
|
+
actionLabel: z57.string(),
|
|
36584
|
+
soldOut: z57.boolean()
|
|
36585
|
+
});
|
|
36586
|
+
var productListDisplaySchema = z57.object({
|
|
36587
|
+
kind: z57.literal("product-list"),
|
|
36588
|
+
state: z57.enum(["empty", "ready"]),
|
|
36589
|
+
heading: z57.string().nullable(),
|
|
36590
|
+
className: z57.string().nullable(),
|
|
36591
|
+
layout: z57.enum(["grid", "list"]),
|
|
36592
|
+
columns: z57.string(),
|
|
36593
|
+
emptyMessage: z57.string(),
|
|
36594
|
+
cards: z57.array(productCardDisplaySchema)
|
|
36595
|
+
});
|
|
36596
|
+
var productDetailDisplaySchema = z57.discriminatedUnion("state", [
|
|
36597
|
+
z57.object({
|
|
36598
|
+
kind: z57.literal("product-detail"),
|
|
36599
|
+
state: z57.literal("empty"),
|
|
36600
|
+
heading: z57.string().nullable(),
|
|
36601
|
+
className: z57.string().nullable(),
|
|
36602
|
+
emptyMessage: z57.string()
|
|
36447
36603
|
}),
|
|
36448
|
-
|
|
36449
|
-
kind:
|
|
36450
|
-
state:
|
|
36451
|
-
heading:
|
|
36452
|
-
className:
|
|
36453
|
-
title:
|
|
36454
|
-
priceLabel:
|
|
36455
|
-
summary:
|
|
36456
|
-
categoryLabel:
|
|
36457
|
-
gallery:
|
|
36458
|
-
url:
|
|
36459
|
-
alt:
|
|
36604
|
+
z57.object({
|
|
36605
|
+
kind: z57.literal("product-detail"),
|
|
36606
|
+
state: z57.literal("ready"),
|
|
36607
|
+
heading: z57.string().nullable(),
|
|
36608
|
+
className: z57.string().nullable(),
|
|
36609
|
+
title: z57.string(),
|
|
36610
|
+
priceLabel: z57.string(),
|
|
36611
|
+
summary: z57.string().nullable(),
|
|
36612
|
+
categoryLabel: z57.string().nullable(),
|
|
36613
|
+
gallery: z57.array(z57.object({
|
|
36614
|
+
url: z57.string(),
|
|
36615
|
+
alt: z57.string().nullable()
|
|
36460
36616
|
})),
|
|
36461
|
-
variantOptions:
|
|
36462
|
-
selectedVariantId:
|
|
36463
|
-
selectionLabel:
|
|
36464
|
-
actionLabel:
|
|
36465
|
-
soldOut:
|
|
36466
|
-
body:
|
|
36617
|
+
variantOptions: z57.array(productVariantOptionDisplaySchema),
|
|
36618
|
+
selectedVariantId: z57.string().nullable(),
|
|
36619
|
+
selectionLabel: z57.string(),
|
|
36620
|
+
actionLabel: z57.string(),
|
|
36621
|
+
soldOut: z57.boolean(),
|
|
36622
|
+
body: z57.unknown().nullable()
|
|
36467
36623
|
})
|
|
36468
36624
|
]);
|
|
36469
|
-
var passCardDisplaySchema =
|
|
36470
|
-
id:
|
|
36471
|
-
title:
|
|
36472
|
-
description:
|
|
36473
|
-
priceLabel:
|
|
36474
|
-
creditsLabel:
|
|
36475
|
-
perCreditLabel:
|
|
36476
|
-
validityLabel:
|
|
36477
|
-
actionLabel:
|
|
36478
|
-
});
|
|
36479
|
-
var membershipCardDisplaySchema =
|
|
36480
|
-
id:
|
|
36481
|
-
title:
|
|
36482
|
-
description:
|
|
36483
|
-
priceLabel:
|
|
36484
|
-
intervalLabel:
|
|
36485
|
-
actionLabel:
|
|
36486
|
-
});
|
|
36487
|
-
var passesMembershipsDisplaySchema =
|
|
36488
|
-
kind:
|
|
36489
|
-
state:
|
|
36490
|
-
className:
|
|
36491
|
-
layout:
|
|
36492
|
-
columns:
|
|
36493
|
-
emptyMessage:
|
|
36494
|
-
passesHeading:
|
|
36495
|
-
membershipsHeading:
|
|
36496
|
-
passes:
|
|
36497
|
-
memberships:
|
|
36498
|
-
});
|
|
36499
|
-
var cartLineDisplaySchema =
|
|
36500
|
-
key:
|
|
36501
|
-
title:
|
|
36502
|
-
priceLabel:
|
|
36503
|
-
quantity:
|
|
36504
|
-
quantityEditable:
|
|
36505
|
-
});
|
|
36506
|
-
var cartDisplaySchema =
|
|
36507
|
-
kind:
|
|
36508
|
-
state:
|
|
36509
|
-
heading:
|
|
36510
|
-
className:
|
|
36511
|
-
emptyMessage:
|
|
36512
|
-
supportText:
|
|
36513
|
-
items:
|
|
36514
|
-
subtotalLabel:
|
|
36515
|
-
checkoutButtonText:
|
|
36516
|
-
clearButtonText:
|
|
36517
|
-
});
|
|
36518
|
-
var checkoutDisplaySchema =
|
|
36519
|
-
kind:
|
|
36520
|
-
state:
|
|
36521
|
-
heading:
|
|
36522
|
-
className:
|
|
36523
|
-
message:
|
|
36524
|
-
submitButtonText:
|
|
36525
|
-
});
|
|
36526
|
-
var passesMembershipsHydrationSchema =
|
|
36527
|
-
passes:
|
|
36528
|
-
memberships:
|
|
36529
|
-
passPurchaseMode:
|
|
36530
|
-
});
|
|
36531
|
-
var productListHydrationSchema =
|
|
36532
|
-
products:
|
|
36533
|
-
showSummary:
|
|
36534
|
-
showPrices:
|
|
36535
|
-
addButtonText:
|
|
36536
|
-
});
|
|
36537
|
-
var productDetailHydrationSchema =
|
|
36538
|
-
products:
|
|
36539
|
-
productId:
|
|
36540
|
-
showSummary:
|
|
36541
|
-
showBody:
|
|
36542
|
-
addButtonText:
|
|
36543
|
-
});
|
|
36544
|
-
var cartHydrationSchema =
|
|
36545
|
-
emptyStateText:
|
|
36546
|
-
checkoutButtonText:
|
|
36547
|
-
clearButtonText:
|
|
36548
|
-
});
|
|
36549
|
-
var checkoutHydrationSchema =
|
|
36550
|
-
emptyStateText:
|
|
36551
|
-
submitButtonText:
|
|
36552
|
-
});
|
|
36553
|
-
var passesMembershipsRenderSchema =
|
|
36625
|
+
var passCardDisplaySchema = z57.object({
|
|
36626
|
+
id: z57.string(),
|
|
36627
|
+
title: z57.string(),
|
|
36628
|
+
description: z57.string().nullable(),
|
|
36629
|
+
priceLabel: z57.string(),
|
|
36630
|
+
creditsLabel: z57.string(),
|
|
36631
|
+
perCreditLabel: z57.string().nullable(),
|
|
36632
|
+
validityLabel: z57.string().nullable(),
|
|
36633
|
+
actionLabel: z57.string()
|
|
36634
|
+
});
|
|
36635
|
+
var membershipCardDisplaySchema = z57.object({
|
|
36636
|
+
id: z57.string(),
|
|
36637
|
+
title: z57.string(),
|
|
36638
|
+
description: z57.string().nullable(),
|
|
36639
|
+
priceLabel: z57.string(),
|
|
36640
|
+
intervalLabel: z57.string(),
|
|
36641
|
+
actionLabel: z57.string()
|
|
36642
|
+
});
|
|
36643
|
+
var passesMembershipsDisplaySchema = z57.object({
|
|
36644
|
+
kind: z57.literal("passes-memberships"),
|
|
36645
|
+
state: z57.enum(["empty", "ready"]),
|
|
36646
|
+
className: z57.string().nullable(),
|
|
36647
|
+
layout: z57.enum(["grid", "list"]),
|
|
36648
|
+
columns: z57.string(),
|
|
36649
|
+
emptyMessage: z57.string(),
|
|
36650
|
+
passesHeading: z57.string(),
|
|
36651
|
+
membershipsHeading: z57.string(),
|
|
36652
|
+
passes: z57.array(passCardDisplaySchema),
|
|
36653
|
+
memberships: z57.array(membershipCardDisplaySchema)
|
|
36654
|
+
});
|
|
36655
|
+
var cartLineDisplaySchema = z57.object({
|
|
36656
|
+
key: z57.string(),
|
|
36657
|
+
title: z57.string(),
|
|
36658
|
+
priceLabel: z57.string(),
|
|
36659
|
+
quantity: z57.number(),
|
|
36660
|
+
quantityEditable: z57.boolean()
|
|
36661
|
+
});
|
|
36662
|
+
var cartDisplaySchema = z57.object({
|
|
36663
|
+
kind: z57.literal("cart"),
|
|
36664
|
+
state: z57.enum(["empty", "ready"]),
|
|
36665
|
+
heading: z57.string().nullable(),
|
|
36666
|
+
className: z57.string().nullable(),
|
|
36667
|
+
emptyMessage: z57.string(),
|
|
36668
|
+
supportText: z57.string().nullable(),
|
|
36669
|
+
items: z57.array(cartLineDisplaySchema),
|
|
36670
|
+
subtotalLabel: z57.string().nullable(),
|
|
36671
|
+
checkoutButtonText: z57.string(),
|
|
36672
|
+
clearButtonText: z57.string()
|
|
36673
|
+
});
|
|
36674
|
+
var checkoutDisplaySchema = z57.object({
|
|
36675
|
+
kind: z57.literal("checkout"),
|
|
36676
|
+
state: z57.enum(["empty", "blocked", "ready"]),
|
|
36677
|
+
heading: z57.string().nullable(),
|
|
36678
|
+
className: z57.string().nullable(),
|
|
36679
|
+
message: z57.string().nullable(),
|
|
36680
|
+
submitButtonText: z57.string()
|
|
36681
|
+
});
|
|
36682
|
+
var passesMembershipsHydrationSchema = z57.object({
|
|
36683
|
+
passes: z57.array(publicPassProductSchema),
|
|
36684
|
+
memberships: z57.array(publicMembershipProductSchema),
|
|
36685
|
+
passPurchaseMode: z57.enum(["add_to_cart", "buy_now"])
|
|
36686
|
+
});
|
|
36687
|
+
var productListHydrationSchema = z57.object({
|
|
36688
|
+
products: z57.array(publicProductSchema),
|
|
36689
|
+
showSummary: z57.boolean(),
|
|
36690
|
+
showPrices: z57.boolean(),
|
|
36691
|
+
addButtonText: z57.string()
|
|
36692
|
+
});
|
|
36693
|
+
var productDetailHydrationSchema = z57.object({
|
|
36694
|
+
products: z57.array(publicProductSchema),
|
|
36695
|
+
productId: z57.string().nullable(),
|
|
36696
|
+
showSummary: z57.boolean(),
|
|
36697
|
+
showBody: z57.boolean(),
|
|
36698
|
+
addButtonText: z57.string()
|
|
36699
|
+
});
|
|
36700
|
+
var cartHydrationSchema = z57.object({
|
|
36701
|
+
emptyStateText: z57.string(),
|
|
36702
|
+
checkoutButtonText: z57.string(),
|
|
36703
|
+
clearButtonText: z57.string()
|
|
36704
|
+
});
|
|
36705
|
+
var checkoutHydrationSchema = z57.object({
|
|
36706
|
+
emptyStateText: z57.string(),
|
|
36707
|
+
submitButtonText: z57.string()
|
|
36708
|
+
});
|
|
36709
|
+
var passesMembershipsRenderSchema = z57.object({
|
|
36554
36710
|
display: passesMembershipsDisplaySchema,
|
|
36555
36711
|
hydration: passesMembershipsHydrationSchema
|
|
36556
36712
|
});
|
|
36557
|
-
var productListRenderSchema =
|
|
36713
|
+
var productListRenderSchema = z57.object({
|
|
36558
36714
|
display: productListDisplaySchema,
|
|
36559
36715
|
hydration: productListHydrationSchema
|
|
36560
36716
|
});
|
|
36561
|
-
var productDetailRenderSchema =
|
|
36717
|
+
var productDetailRenderSchema = z57.object({
|
|
36562
36718
|
display: productDetailDisplaySchema,
|
|
36563
36719
|
hydration: productDetailHydrationSchema
|
|
36564
36720
|
});
|
|
36565
|
-
var cartRenderSchema =
|
|
36721
|
+
var cartRenderSchema = z57.object({
|
|
36566
36722
|
display: cartDisplaySchema,
|
|
36567
36723
|
hydration: cartHydrationSchema
|
|
36568
36724
|
});
|
|
36569
|
-
var checkoutRenderSchema =
|
|
36725
|
+
var checkoutRenderSchema = z57.object({
|
|
36570
36726
|
display: checkoutDisplaySchema,
|
|
36571
36727
|
hydration: checkoutHydrationSchema
|
|
36572
36728
|
});
|
|
36573
36729
|
function resolveShowPricePerCredit(source) {
|
|
36574
36730
|
return source.showPricePerCredit ?? true;
|
|
36575
36731
|
}
|
|
36576
|
-
var shopIslandMetaCodec = createZodCodec(
|
|
36577
|
-
siteId:
|
|
36578
|
-
apiBaseUrl:
|
|
36732
|
+
var shopIslandMetaCodec = createZodCodec(z57.object({
|
|
36733
|
+
siteId: z57.string().optional(),
|
|
36734
|
+
apiBaseUrl: z57.string().optional(),
|
|
36579
36735
|
stage: previewStageSchema.optional()
|
|
36580
36736
|
}));
|
|
36581
36737
|
var shopIslandMetaKeys = defineInteractiveIslandMetaKeys("siteId", "apiBaseUrl", "stage");
|
|
@@ -36953,9 +37109,9 @@ var shopBlockDefinition = {
|
|
|
36953
37109
|
runtime: shopBlockRuntime,
|
|
36954
37110
|
dataSchemas: {
|
|
36955
37111
|
// listPublicPasses returns { passes: [...] }
|
|
36956
|
-
passes:
|
|
37112
|
+
passes: publicPassProductCollectionSchema.optional(),
|
|
36957
37113
|
// listPublicMemberships returns { memberships: [...] }
|
|
36958
|
-
memberships:
|
|
37114
|
+
memberships: publicMembershipProductCollectionSchema.optional()
|
|
36959
37115
|
},
|
|
36960
37116
|
dataLoaders: {
|
|
36961
37117
|
// Load passes for display
|
|
@@ -36978,7 +37134,7 @@ var shopBlockDefinition = {
|
|
|
36978
37134
|
};
|
|
36979
37135
|
|
|
36980
37136
|
// ../blocks/src/system/blocks/product-list.ts
|
|
36981
|
-
import { z as
|
|
37137
|
+
import { z as z58 } from "zod";
|
|
36982
37138
|
var productListManifest = createBlockManifest({
|
|
36983
37139
|
id: "block.product-list",
|
|
36984
37140
|
version: "1.0.0",
|
|
@@ -37111,7 +37267,7 @@ var productListBlockDefinition = {
|
|
|
37111
37267
|
}
|
|
37112
37268
|
}
|
|
37113
37269
|
};
|
|
37114
|
-
var productListDataSchema =
|
|
37270
|
+
var productListDataSchema = z58.object({
|
|
37115
37271
|
products: publicProductsResponseSchema.optional()
|
|
37116
37272
|
});
|
|
37117
37273
|
|
|
@@ -37372,72 +37528,72 @@ var checkoutBlockDefinition = {
|
|
|
37372
37528
|
};
|
|
37373
37529
|
|
|
37374
37530
|
// ../blocks/src/system/runtime/nodes/gifting.interactive.ts
|
|
37375
|
-
import { z as
|
|
37376
|
-
var publicGiftCardOfferSchema =
|
|
37377
|
-
id:
|
|
37378
|
-
kind:
|
|
37379
|
-
title:
|
|
37380
|
-
description:
|
|
37381
|
-
sortOrder:
|
|
37382
|
-
giftCard:
|
|
37383
|
-
fixedDenominations:
|
|
37384
|
-
customAmountEnabled:
|
|
37385
|
-
customAmountMinCents:
|
|
37386
|
-
customAmountMaxCents:
|
|
37531
|
+
import { z as z59 } from "zod";
|
|
37532
|
+
var publicGiftCardOfferSchema = z59.object({
|
|
37533
|
+
id: z59.string(),
|
|
37534
|
+
kind: z59.literal("gift_card"),
|
|
37535
|
+
title: z59.string(),
|
|
37536
|
+
description: z59.string().nullable(),
|
|
37537
|
+
sortOrder: z59.number().int(),
|
|
37538
|
+
giftCard: z59.object({
|
|
37539
|
+
fixedDenominations: z59.array(z59.number().int().positive()),
|
|
37540
|
+
customAmountEnabled: z59.boolean(),
|
|
37541
|
+
customAmountMinCents: z59.number().int().positive(),
|
|
37542
|
+
customAmountMaxCents: z59.number().int().positive()
|
|
37387
37543
|
}),
|
|
37388
|
-
voucher:
|
|
37389
|
-
});
|
|
37390
|
-
var publicVoucherOfferSchema =
|
|
37391
|
-
id:
|
|
37392
|
-
kind:
|
|
37393
|
-
title:
|
|
37394
|
-
description:
|
|
37395
|
-
sortOrder:
|
|
37396
|
-
giftCard:
|
|
37397
|
-
voucher:
|
|
37398
|
-
purchaseAmountCents:
|
|
37544
|
+
voucher: z59.null()
|
|
37545
|
+
});
|
|
37546
|
+
var publicVoucherOfferSchema = z59.object({
|
|
37547
|
+
id: z59.string(),
|
|
37548
|
+
kind: z59.literal("voucher"),
|
|
37549
|
+
title: z59.string(),
|
|
37550
|
+
description: z59.string().nullable(),
|
|
37551
|
+
sortOrder: z59.number().int(),
|
|
37552
|
+
giftCard: z59.null(),
|
|
37553
|
+
voucher: z59.object({
|
|
37554
|
+
purchaseAmountCents: z59.number().int().positive()
|
|
37399
37555
|
})
|
|
37400
37556
|
});
|
|
37401
|
-
var publicGiftingOffersResponseSchema =
|
|
37402
|
-
currency:
|
|
37403
|
-
giftCards:
|
|
37404
|
-
vouchers:
|
|
37557
|
+
var publicGiftingOffersResponseSchema = z59.object({
|
|
37558
|
+
currency: z59.string(),
|
|
37559
|
+
giftCards: z59.array(publicGiftCardOfferSchema),
|
|
37560
|
+
vouchers: z59.array(publicVoucherOfferSchema)
|
|
37405
37561
|
});
|
|
37406
|
-
var giftingSourceSchema =
|
|
37407
|
-
siteId:
|
|
37408
|
-
apiBaseUrl:
|
|
37562
|
+
var giftingSourceSchema = z59.object({
|
|
37563
|
+
siteId: z59.string().optional(),
|
|
37564
|
+
apiBaseUrl: z59.string().optional(),
|
|
37409
37565
|
offers: publicGiftingOffersResponseSchema.nullable().optional(),
|
|
37410
|
-
className:
|
|
37411
|
-
heading:
|
|
37412
|
-
intro:
|
|
37413
|
-
giftCardsHeading:
|
|
37414
|
-
vouchersHeading:
|
|
37415
|
-
emptyStateText:
|
|
37416
|
-
checkoutButtonText:
|
|
37417
|
-
successMessage:
|
|
37418
|
-
});
|
|
37419
|
-
var giftingDisplaySchema =
|
|
37420
|
-
kind:
|
|
37421
|
-
state:
|
|
37422
|
-
className:
|
|
37423
|
-
heading:
|
|
37424
|
-
intro:
|
|
37425
|
-
giftCardsHeading:
|
|
37426
|
-
vouchersHeading:
|
|
37427
|
-
emptyStateText:
|
|
37428
|
-
});
|
|
37429
|
-
var giftingHydrationSchema =
|
|
37566
|
+
className: z59.string().nullable().optional(),
|
|
37567
|
+
heading: z59.string().nullable().optional(),
|
|
37568
|
+
intro: z59.string().nullable().optional(),
|
|
37569
|
+
giftCardsHeading: z59.string().nullable().optional(),
|
|
37570
|
+
vouchersHeading: z59.string().nullable().optional(),
|
|
37571
|
+
emptyStateText: z59.string().nullable().optional(),
|
|
37572
|
+
checkoutButtonText: z59.string().nullable().optional(),
|
|
37573
|
+
successMessage: z59.string().nullable().optional()
|
|
37574
|
+
});
|
|
37575
|
+
var giftingDisplaySchema = z59.object({
|
|
37576
|
+
kind: z59.literal("gifting"),
|
|
37577
|
+
state: z59.literal("ready"),
|
|
37578
|
+
className: z59.string().nullable(),
|
|
37579
|
+
heading: z59.string(),
|
|
37580
|
+
intro: z59.string().nullable(),
|
|
37581
|
+
giftCardsHeading: z59.string(),
|
|
37582
|
+
vouchersHeading: z59.string(),
|
|
37583
|
+
emptyStateText: z59.string()
|
|
37584
|
+
});
|
|
37585
|
+
var giftingHydrationSchema = z59.object({
|
|
37430
37586
|
offers: publicGiftingOffersResponseSchema.nullable(),
|
|
37431
|
-
checkoutButtonText:
|
|
37432
|
-
successMessage:
|
|
37587
|
+
checkoutButtonText: z59.string(),
|
|
37588
|
+
successMessage: z59.string()
|
|
37433
37589
|
});
|
|
37434
|
-
var giftingRenderSchema =
|
|
37590
|
+
var giftingRenderSchema = z59.object({
|
|
37435
37591
|
display: giftingDisplaySchema,
|
|
37436
37592
|
hydration: giftingHydrationSchema
|
|
37437
37593
|
});
|
|
37438
|
-
var giftingIslandMetaCodec = createZodCodec(
|
|
37439
|
-
siteId:
|
|
37440
|
-
apiBaseUrl:
|
|
37594
|
+
var giftingIslandMetaCodec = createZodCodec(z59.object({
|
|
37595
|
+
siteId: z59.string().optional(),
|
|
37596
|
+
apiBaseUrl: z59.string().optional()
|
|
37441
37597
|
}));
|
|
37442
37598
|
var giftingIslandMetaKeys = defineInteractiveIslandMetaKeys(
|
|
37443
37599
|
"siteId",
|
|
@@ -37608,7 +37764,7 @@ var giftingBlockDefinition = {
|
|
|
37608
37764
|
};
|
|
37609
37765
|
|
|
37610
37766
|
// ../blocks/src/system/runtime/nodes/newsletter-form.interactive.ts
|
|
37611
|
-
import { z as
|
|
37767
|
+
import { z as z60 } from "zod";
|
|
37612
37768
|
|
|
37613
37769
|
// ../blocks/src/system/blocks/newsletter-signup-destination.ts
|
|
37614
37770
|
function parseNewsletterSignupBlockId(value) {
|
|
@@ -37657,7 +37813,7 @@ function deriveNewsletterSignupRuntimeSource(values) {
|
|
|
37657
37813
|
};
|
|
37658
37814
|
}
|
|
37659
37815
|
function sanitizeNewsletterSignupPublicContent(content) {
|
|
37660
|
-
if (!
|
|
37816
|
+
if (!isRecord8(content)) return content;
|
|
37661
37817
|
const provider = parseNewsletterSignupDestinationProvider(content.destinationProvider) ?? getProviderFromExplicitDestination(content.destination);
|
|
37662
37818
|
const {
|
|
37663
37819
|
destination: _destination,
|
|
@@ -37676,7 +37832,7 @@ function sanitizeNewsletterSignupPublicContent(content) {
|
|
|
37676
37832
|
return mutablePublicContent;
|
|
37677
37833
|
}
|
|
37678
37834
|
function getProviderFromExplicitDestination(destination) {
|
|
37679
|
-
if (!
|
|
37835
|
+
if (!isRecord8(destination) || typeof destination.tag !== "string") return null;
|
|
37680
37836
|
if (destination.tag === "riverbank_list") return "riverbank";
|
|
37681
37837
|
if (destination.tag === "mailchimp_audience") return "mailchimp";
|
|
37682
37838
|
return null;
|
|
@@ -37688,7 +37844,7 @@ function parseTrimmedString(value) {
|
|
|
37688
37844
|
const trimmed = value.trim();
|
|
37689
37845
|
return trimmed.length > 0 ? trimmed : null;
|
|
37690
37846
|
}
|
|
37691
|
-
function
|
|
37847
|
+
function isRecord8(value) {
|
|
37692
37848
|
return typeof value === "object" && value !== null;
|
|
37693
37849
|
}
|
|
37694
37850
|
|
|
@@ -37743,65 +37899,65 @@ function withOptionalPhone(fields3, includePhone) {
|
|
|
37743
37899
|
}
|
|
37744
37900
|
|
|
37745
37901
|
// ../blocks/src/system/runtime/nodes/newsletter-form.interactive.ts
|
|
37746
|
-
var newsletterPresetSchema =
|
|
37747
|
-
var newsletterDestinationProviderSchema =
|
|
37748
|
-
var newsletterFieldSchema =
|
|
37749
|
-
id:
|
|
37750
|
-
type:
|
|
37751
|
-
label:
|
|
37752
|
-
required:
|
|
37753
|
-
placeholder:
|
|
37754
|
-
});
|
|
37755
|
-
var newsletterSignupBlockIdSchema =
|
|
37756
|
-
var signedNewsletterDestinationRefSchema =
|
|
37757
|
-
var newsletterPublicDestinationRefSchema =
|
|
37758
|
-
|
|
37759
|
-
tag:
|
|
37902
|
+
var newsletterPresetSchema = z60.enum(["emailOnly", "emailName", "emailFirstLast", "emailNameCompany"]);
|
|
37903
|
+
var newsletterDestinationProviderSchema = z60.enum(["riverbank", "mailchimp"]);
|
|
37904
|
+
var newsletterFieldSchema = z60.object({
|
|
37905
|
+
id: z60.string(),
|
|
37906
|
+
type: z60.enum(["email", "text"]),
|
|
37907
|
+
label: z60.string(),
|
|
37908
|
+
required: z60.boolean(),
|
|
37909
|
+
placeholder: z60.string().optional()
|
|
37910
|
+
});
|
|
37911
|
+
var newsletterSignupBlockIdSchema = z60.string().trim().min(1).transform(parseRequiredNewsletterSignupBlockId);
|
|
37912
|
+
var signedNewsletterDestinationRefSchema = z60.string().trim().min(1).transform(parseRequiredSignedNewsletterDestinationRef);
|
|
37913
|
+
var newsletterPublicDestinationRefSchema = z60.discriminatedUnion("tag", [
|
|
37914
|
+
z60.object({
|
|
37915
|
+
tag: z60.literal("block_ref"),
|
|
37760
37916
|
blockId: newsletterSignupBlockIdSchema
|
|
37761
37917
|
}),
|
|
37762
|
-
|
|
37763
|
-
tag:
|
|
37918
|
+
z60.object({
|
|
37919
|
+
tag: z60.literal("signed_destination_ref"),
|
|
37764
37920
|
token: signedNewsletterDestinationRefSchema
|
|
37765
37921
|
})
|
|
37766
37922
|
]);
|
|
37767
|
-
var newsletterSourceSchema =
|
|
37768
|
-
blockId:
|
|
37769
|
-
siteId:
|
|
37770
|
-
apiBaseUrl:
|
|
37771
|
-
listId:
|
|
37923
|
+
var newsletterSourceSchema = z60.object({
|
|
37924
|
+
blockId: z60.string().nullable().optional(),
|
|
37925
|
+
siteId: z60.string().optional(),
|
|
37926
|
+
apiBaseUrl: z60.string().optional(),
|
|
37927
|
+
listId: z60.string().nullable().optional(),
|
|
37772
37928
|
destinationProvider: newsletterDestinationProviderSchema.nullable().optional(),
|
|
37773
37929
|
preset: newsletterPresetSchema.optional(),
|
|
37774
|
-
includePhone:
|
|
37775
|
-
buttonLabel:
|
|
37776
|
-
successMessage:
|
|
37777
|
-
privacyNote:
|
|
37778
|
-
tags:
|
|
37779
|
-
spamProtectionEnabled:
|
|
37780
|
-
className:
|
|
37781
|
-
});
|
|
37782
|
-
var newsletterDisplaySchema =
|
|
37783
|
-
kind:
|
|
37784
|
-
className:
|
|
37785
|
-
buttonLabel:
|
|
37786
|
-
successMessage:
|
|
37787
|
-
privacyNote:
|
|
37788
|
-
fields:
|
|
37789
|
-
});
|
|
37790
|
-
var newsletterHydrationSchema =
|
|
37930
|
+
includePhone: z60.boolean().optional(),
|
|
37931
|
+
buttonLabel: z60.string().nullable().optional(),
|
|
37932
|
+
successMessage: z60.string().nullable().optional(),
|
|
37933
|
+
privacyNote: z60.string().nullable().optional(),
|
|
37934
|
+
tags: z60.string().nullable().optional(),
|
|
37935
|
+
spamProtectionEnabled: z60.boolean().optional(),
|
|
37936
|
+
className: z60.string().nullable().optional()
|
|
37937
|
+
});
|
|
37938
|
+
var newsletterDisplaySchema = z60.object({
|
|
37939
|
+
kind: z60.literal("newsletter-form"),
|
|
37940
|
+
className: z60.string().nullable(),
|
|
37941
|
+
buttonLabel: z60.string(),
|
|
37942
|
+
successMessage: z60.string().nullable(),
|
|
37943
|
+
privacyNote: z60.string().nullable(),
|
|
37944
|
+
fields: z60.array(newsletterFieldSchema)
|
|
37945
|
+
});
|
|
37946
|
+
var newsletterHydrationSchema = z60.object({
|
|
37791
37947
|
destinationRef: newsletterPublicDestinationRefSchema.nullable().optional(),
|
|
37792
|
-
listId:
|
|
37948
|
+
listId: z60.string().nullable().optional(),
|
|
37793
37949
|
preset: newsletterPresetSchema,
|
|
37794
|
-
includePhone:
|
|
37795
|
-
tags:
|
|
37796
|
-
spamProtectionEnabled:
|
|
37950
|
+
includePhone: z60.boolean(),
|
|
37951
|
+
tags: z60.string().nullable().optional(),
|
|
37952
|
+
spamProtectionEnabled: z60.boolean().optional()
|
|
37797
37953
|
});
|
|
37798
|
-
var newsletterRenderSchema =
|
|
37954
|
+
var newsletterRenderSchema = z60.object({
|
|
37799
37955
|
display: newsletterDisplaySchema,
|
|
37800
37956
|
hydration: newsletterHydrationSchema
|
|
37801
37957
|
});
|
|
37802
|
-
var newsletterIslandMetaCodec = createZodCodec(
|
|
37803
|
-
siteId:
|
|
37804
|
-
apiBaseUrl:
|
|
37958
|
+
var newsletterIslandMetaCodec = createZodCodec(z60.object({
|
|
37959
|
+
siteId: z60.string().optional(),
|
|
37960
|
+
apiBaseUrl: z60.string().optional()
|
|
37805
37961
|
}));
|
|
37806
37962
|
var newsletterIslandMetaKeys = defineInteractiveIslandMetaKeys("siteId", "apiBaseUrl");
|
|
37807
37963
|
function buildNewsletterDisplay(source) {
|
|
@@ -37940,23 +38096,23 @@ var newsletterSignupBlockDefinition = {
|
|
|
37940
38096
|
};
|
|
37941
38097
|
|
|
37942
38098
|
// ../blocks/src/system/blocks/team-members.ts
|
|
37943
|
-
import { z as
|
|
38099
|
+
import { z as z61 } from "zod";
|
|
37944
38100
|
var ITEM_NAME2 = "member";
|
|
37945
38101
|
var teamMemberPhotoSchema = mediaSchema2.refine((media2) => media2.type === "image", {
|
|
37946
38102
|
message: "Team member photos must be image media"
|
|
37947
38103
|
}).nullable();
|
|
37948
|
-
var teamMemberDataSchema =
|
|
37949
|
-
_type:
|
|
37950
|
-
id:
|
|
37951
|
-
name:
|
|
37952
|
-
role:
|
|
37953
|
-
roleLabel:
|
|
37954
|
-
bio:
|
|
37955
|
-
summary:
|
|
38104
|
+
var teamMemberDataSchema = z61.object({
|
|
38105
|
+
_type: z61.literal("teamMember"),
|
|
38106
|
+
id: z61.string(),
|
|
38107
|
+
name: z61.string(),
|
|
38108
|
+
role: z61.string().nullable(),
|
|
38109
|
+
roleLabel: z61.string().nullable(),
|
|
38110
|
+
bio: z61.string().nullable(),
|
|
38111
|
+
summary: z61.string().nullable(),
|
|
37956
38112
|
photo: teamMemberPhotoSchema,
|
|
37957
|
-
profilePath:
|
|
38113
|
+
profilePath: z61.string().nullable()
|
|
37958
38114
|
});
|
|
37959
|
-
var teamMembersDataSchema =
|
|
38115
|
+
var teamMembersDataSchema = z61.array(teamMemberDataSchema);
|
|
37960
38116
|
var dynamicSourceWhen = { equals: "site_staff" };
|
|
37961
38117
|
var manualSourceWhen = { equals: "site_staff", not: true };
|
|
37962
38118
|
var headingNode = text(
|
|
@@ -38848,13 +39004,6 @@ var systemBlockDefinitionsRaw = [
|
|
|
38848
39004
|
weight: "featured",
|
|
38849
39005
|
bias: "clear",
|
|
38850
39006
|
surfaces: heroSectionSurfaces
|
|
38851
|
-
}),
|
|
38852
|
-
layoutProfile({
|
|
38853
|
-
variantKey: "splitEditorial",
|
|
38854
|
-
family: "split",
|
|
38855
|
-
weight: "featured",
|
|
38856
|
-
bias: "clear",
|
|
38857
|
-
surfaces: heroSectionSurfaces
|
|
38858
39007
|
})
|
|
38859
39008
|
]
|
|
38860
39009
|
})),
|
|
@@ -39098,9 +39247,8 @@ var systemBlockDefinitionsRaw = [
|
|
|
39098
39247
|
flow: offeringsFlow,
|
|
39099
39248
|
layoutProfiles: [
|
|
39100
39249
|
layoutProfile({ variantKey: "combined", family: "grid", weight: "standard" }),
|
|
39250
|
+
layoutProfile({ variantKey: "calendar", family: "stack", weight: "standard" }),
|
|
39101
39251
|
layoutProfile({ variantKey: "list", family: "stack", weight: "standard" }),
|
|
39102
|
-
layoutProfile({ variantKey: "month", family: "grid", weight: "standard" }),
|
|
39103
|
-
layoutProfile({ variantKey: "week", family: "stack", weight: "standard" }),
|
|
39104
39252
|
layoutProfile({ variantKey: "timetable", family: "stack", weight: "standard" })
|
|
39105
39253
|
]
|
|
39106
39254
|
})),
|
|
@@ -39663,10 +39811,7 @@ function normalizeRenderStage(stage) {
|
|
|
39663
39811
|
return stage === "preview" ? "preview" : "published";
|
|
39664
39812
|
}
|
|
39665
39813
|
function isRouteVisibleInStage(routeEntry, stageInput) {
|
|
39666
|
-
|
|
39667
|
-
if (stage === "preview" || !isRouteRecord(routeEntry)) {
|
|
39668
|
-
return true;
|
|
39669
|
-
}
|
|
39814
|
+
if (normalizeRenderStage(stageInput) === "preview" || !isRouteRecord(routeEntry)) return true;
|
|
39670
39815
|
const status = routeEntry.status;
|
|
39671
39816
|
return !(typeof status === "string" && status !== "published");
|
|
39672
39817
|
}
|
|
@@ -39675,52 +39820,45 @@ function extractRouteHref(candidate, stageInput = "published") {
|
|
|
39675
39820
|
const trimmed = candidate.trim();
|
|
39676
39821
|
return trimmed.length > 0 ? trimmed : null;
|
|
39677
39822
|
}
|
|
39678
|
-
if (!isRouteRecord(candidate))
|
|
39679
|
-
|
|
39680
|
-
|
|
39681
|
-
|
|
39682
|
-
|
|
39823
|
+
if (!isRouteRecord(candidate)) return null;
|
|
39824
|
+
const fields3 = normalizeRenderStage(stageInput) === "preview" ? [
|
|
39825
|
+
"draftPath",
|
|
39826
|
+
"path",
|
|
39827
|
+
"href",
|
|
39828
|
+
"url"
|
|
39829
|
+
] : [
|
|
39830
|
+
"path",
|
|
39831
|
+
"href",
|
|
39832
|
+
"url"
|
|
39833
|
+
];
|
|
39683
39834
|
for (const field of fields3) {
|
|
39684
39835
|
const value = candidate[field];
|
|
39685
|
-
if (typeof value === "string" && value.trim().length > 0)
|
|
39686
|
-
return value.trim();
|
|
39687
|
-
}
|
|
39836
|
+
if (typeof value === "string" && value.trim().length > 0) return value.trim();
|
|
39688
39837
|
}
|
|
39689
39838
|
return null;
|
|
39690
39839
|
}
|
|
39691
39840
|
function extractRouteUpdatedAt(candidate) {
|
|
39692
|
-
if (!isRouteRecord(candidate))
|
|
39693
|
-
|
|
39694
|
-
}
|
|
39695
|
-
const fields3 = [
|
|
39841
|
+
if (!isRouteRecord(candidate)) return null;
|
|
39842
|
+
for (const field of [
|
|
39696
39843
|
"updatedAt",
|
|
39697
39844
|
"updated_at",
|
|
39698
39845
|
"publishedAt",
|
|
39699
39846
|
"published_at",
|
|
39700
39847
|
"modifiedAt",
|
|
39701
39848
|
"modified_at"
|
|
39702
|
-
]
|
|
39703
|
-
for (const field of fields3) {
|
|
39849
|
+
]) {
|
|
39704
39850
|
const value = candidate[field];
|
|
39705
|
-
if (typeof value === "string" && value.length > 0)
|
|
39706
|
-
return value;
|
|
39707
|
-
}
|
|
39851
|
+
if (typeof value === "string" && value.length > 0) return value;
|
|
39708
39852
|
}
|
|
39709
39853
|
return null;
|
|
39710
39854
|
}
|
|
39711
39855
|
function resolveRouteTargetForStage(routeIdValue, routes, stageInput) {
|
|
39712
39856
|
const routeId = typeof routeIdValue === "string" ? routeIdValue : null;
|
|
39713
|
-
if (!routeId || !routes)
|
|
39714
|
-
return null;
|
|
39715
|
-
}
|
|
39857
|
+
if (!routeId || !routes) return null;
|
|
39716
39858
|
const routeEntry = routes[routeId];
|
|
39717
|
-
if (!isRouteVisibleInStage(routeEntry, stageInput))
|
|
39718
|
-
return null;
|
|
39719
|
-
}
|
|
39859
|
+
if (!isRouteVisibleInStage(routeEntry, stageInput)) return null;
|
|
39720
39860
|
const href = extractRouteHref(routeEntry, stageInput);
|
|
39721
|
-
if (!href)
|
|
39722
|
-
return null;
|
|
39723
|
-
}
|
|
39861
|
+
if (!href) return null;
|
|
39724
39862
|
return {
|
|
39725
39863
|
routeId,
|
|
39726
39864
|
href,
|
|
@@ -39863,7 +40001,7 @@ var defaultTransforms = createTransformRegistry(builtinTransformDefinitions);
|
|
|
39863
40001
|
// ../blocks/src/system/data/linkedContentEntries.ts
|
|
39864
40002
|
var LINKED_CONTENT_ENTRY_META_KEY = "__rbLinkedContentEntry";
|
|
39865
40003
|
function coerceLinkedContentEntriesPayload(payload) {
|
|
39866
|
-
if (!
|
|
40004
|
+
if (!isRecord9(payload)) return payload;
|
|
39867
40005
|
const response = payload;
|
|
39868
40006
|
if (!Array.isArray(response.entries)) return payload;
|
|
39869
40007
|
const contentType = parsePublicContentTypeMeta(response.contentType);
|
|
@@ -39871,12 +40009,12 @@ function coerceLinkedContentEntriesPayload(payload) {
|
|
|
39871
40009
|
return response.entries.map((entry) => enrichLinkedContentEntry(entry, contentType));
|
|
39872
40010
|
}
|
|
39873
40011
|
function enrichLinkedContentEntry(entry, contentType) {
|
|
39874
|
-
if (!
|
|
40012
|
+
if (!isRecord9(entry)) return entry;
|
|
39875
40013
|
const entryId = typeof entry.id === "string" ? entry.id : null;
|
|
39876
40014
|
if (!entryId) return entry;
|
|
39877
40015
|
const title = typeof entry.title === "string" && entry.title.trim().length > 0 ? entry.title : entryId;
|
|
39878
40016
|
const optimisticHash = typeof entry.optimisticHash === "string" && entry.optimisticHash.length > 0 ? entry.optimisticHash : null;
|
|
39879
|
-
const content =
|
|
40017
|
+
const content = isRecord9(entry.content) ? entry.content : {};
|
|
39880
40018
|
const meta = {
|
|
39881
40019
|
kind: "linked-content-entry",
|
|
39882
40020
|
entryId,
|
|
@@ -39969,7 +40107,7 @@ function capitalize(value) {
|
|
|
39969
40107
|
return value.charAt(0).toUpperCase() + value.slice(1).toLowerCase();
|
|
39970
40108
|
}
|
|
39971
40109
|
function parsePublicContentTypeMeta(value) {
|
|
39972
|
-
if (!
|
|
40110
|
+
if (!isRecord9(value)) return null;
|
|
39973
40111
|
if (typeof value.key !== "string" || value.key.trim().length === 0) return null;
|
|
39974
40112
|
return {
|
|
39975
40113
|
key: value.key,
|
|
@@ -39979,7 +40117,7 @@ function parsePublicContentTypeMeta(value) {
|
|
|
39979
40117
|
};
|
|
39980
40118
|
}
|
|
39981
40119
|
function parsePublicContentTypeLinkedEntryEditing(value) {
|
|
39982
|
-
if (!
|
|
40120
|
+
if (!isRecord9(value) || typeof value.kind !== "string") return null;
|
|
39983
40121
|
switch (value.kind) {
|
|
39984
40122
|
case "generic":
|
|
39985
40123
|
return { kind: "generic" };
|
|
@@ -39993,7 +40131,7 @@ function parsePublicContentTypeLinkedEntryEditing(value) {
|
|
|
39993
40131
|
}
|
|
39994
40132
|
}
|
|
39995
40133
|
function parsePublicContentTypeFieldMeta(value) {
|
|
39996
|
-
if (!
|
|
40134
|
+
if (!isRecord9(value)) return [];
|
|
39997
40135
|
if (typeof value.id !== "string" || typeof value.type !== "string") return [];
|
|
39998
40136
|
return [{
|
|
39999
40137
|
id: value.id,
|
|
@@ -40007,7 +40145,7 @@ function parseStringArray(value) {
|
|
|
40007
40145
|
if (!Array.isArray(value)) return null;
|
|
40008
40146
|
return value.filter((item) => typeof item === "string");
|
|
40009
40147
|
}
|
|
40010
|
-
function
|
|
40148
|
+
function isRecord9(value) {
|
|
40011
40149
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
40012
40150
|
}
|
|
40013
40151
|
|
|
@@ -40756,42 +40894,45 @@ import { jsx as jsx5 } from "react/jsx-runtime";
|
|
|
40756
40894
|
import * as React from "react";
|
|
40757
40895
|
import { Fragment, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
40758
40896
|
|
|
40897
|
+
// ../theme-core/src/ResponsiveScope.tsx
|
|
40898
|
+
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
40899
|
+
|
|
40759
40900
|
// ../theme-core/src/fonts/uploadFormat.ts
|
|
40760
40901
|
var MAX_FONT_UPLOAD_BYTES = 5 * 1024 * 1024;
|
|
40761
40902
|
|
|
40762
40903
|
// ../theme-core/src/runtime/buildThemeRuntimeFromBridge.ts
|
|
40763
|
-
import { z as
|
|
40764
|
-
var themeBridgeConfigSchema =
|
|
40765
|
-
tokens:
|
|
40766
|
-
typography:
|
|
40767
|
-
headingFamily:
|
|
40768
|
-
bodyFamily:
|
|
40769
|
-
headingWeight:
|
|
40770
|
-
bodyWeight:
|
|
40904
|
+
import { z as z62 } from "zod";
|
|
40905
|
+
var themeBridgeConfigSchema = z62.object({
|
|
40906
|
+
tokens: z62.record(z62.string(), z62.string()),
|
|
40907
|
+
typography: z62.object({
|
|
40908
|
+
headingFamily: z62.string().optional(),
|
|
40909
|
+
bodyFamily: z62.string().optional(),
|
|
40910
|
+
headingWeight: z62.number().optional(),
|
|
40911
|
+
bodyWeight: z62.number().optional()
|
|
40771
40912
|
}).optional(),
|
|
40772
|
-
spacing:
|
|
40773
|
-
corners:
|
|
40774
|
-
shadows:
|
|
40775
|
-
components:
|
|
40776
|
-
buttons:
|
|
40777
|
-
|
|
40778
|
-
|
|
40779
|
-
variants:
|
|
40913
|
+
spacing: z62.enum(["comfortable", "standard", "dense"]).optional(),
|
|
40914
|
+
corners: z62.enum(["square", "soft", "rounded", "pill"]).optional(),
|
|
40915
|
+
shadows: z62.enum(["none", "low", "medium", "high"]).optional(),
|
|
40916
|
+
components: z62.object({
|
|
40917
|
+
buttons: z62.union([
|
|
40918
|
+
z62.boolean(),
|
|
40919
|
+
z62.object({
|
|
40920
|
+
variants: z62.array(z62.enum(["primary", "secondary", "outline", "ghost"])).optional()
|
|
40780
40921
|
})
|
|
40781
40922
|
]).optional(),
|
|
40782
|
-
cards:
|
|
40783
|
-
|
|
40784
|
-
|
|
40785
|
-
variants:
|
|
40923
|
+
cards: z62.union([
|
|
40924
|
+
z62.boolean(),
|
|
40925
|
+
z62.object({
|
|
40926
|
+
variants: z62.array(z62.enum(["default", "elevated", "outlined"])).optional()
|
|
40786
40927
|
})
|
|
40787
40928
|
]).optional(),
|
|
40788
|
-
inputs:
|
|
40929
|
+
inputs: z62.boolean().optional()
|
|
40789
40930
|
}).optional(),
|
|
40790
|
-
overrides:
|
|
40931
|
+
overrides: z62.record(z62.string(), z62.string()).optional()
|
|
40791
40932
|
}).passthrough();
|
|
40792
40933
|
|
|
40793
40934
|
// ../theme-core/src/siteChrome.tsx
|
|
40794
|
-
import { Fragment as Fragment2, jsx as
|
|
40935
|
+
import { Fragment as Fragment2, jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
40795
40936
|
|
|
40796
40937
|
// ../blocks/src/system/runtime/bindings.ts
|
|
40797
40938
|
var shouldLogWarnings = isNonProductionEnv();
|
|
@@ -41156,17 +41297,17 @@ function normalizeLoaderParams(endpoint, params, context) {
|
|
|
41156
41297
|
function unsafeRetypeZodSchema(schema) {
|
|
41157
41298
|
return schema;
|
|
41158
41299
|
}
|
|
41159
|
-
var navIdListSchema =
|
|
41300
|
+
var navIdListSchema = z63.preprocess((value) => {
|
|
41160
41301
|
if (!Array.isArray(value)) return void 0;
|
|
41161
41302
|
const filtered = value.filter((v) => typeof v === "string" && v.trim().length > 0);
|
|
41162
41303
|
return filtered.length > 0 ? filtered : void 0;
|
|
41163
|
-
},
|
|
41164
|
-
var dashboardNavVisibilityBaseSchema =
|
|
41165
|
-
mode:
|
|
41304
|
+
}, z63.array(z63.string()).max(200).optional());
|
|
41305
|
+
var dashboardNavVisibilityBaseSchema = z63.object({
|
|
41306
|
+
mode: z63.enum(["augment", "restrict"]).optional(),
|
|
41166
41307
|
allowIds: navIdListSchema,
|
|
41167
41308
|
denyIds: navIdListSchema
|
|
41168
41309
|
}).strip();
|
|
41169
|
-
var dashboardNavVisibilityRolesSchema =
|
|
41310
|
+
var dashboardNavVisibilityRolesSchema = z63.object({
|
|
41170
41311
|
administrator: dashboardNavVisibilityBaseSchema.optional(),
|
|
41171
41312
|
editor: dashboardNavVisibilityBaseSchema.optional(),
|
|
41172
41313
|
team_member: dashboardNavVisibilityBaseSchema.optional()
|
|
@@ -41174,63 +41315,63 @@ var dashboardNavVisibilityRolesSchema = z65.object({
|
|
|
41174
41315
|
var dashboardNavVisibilitySchema = dashboardNavVisibilityBaseSchema.extend({
|
|
41175
41316
|
roles: dashboardNavVisibilityRolesSchema
|
|
41176
41317
|
}).strip();
|
|
41177
|
-
var dashboardNavigationConfigSchema =
|
|
41318
|
+
var dashboardNavigationConfigSchema = z63.object({
|
|
41178
41319
|
siteNav: dashboardNavVisibilitySchema.optional(),
|
|
41179
41320
|
settingsNav: dashboardNavVisibilitySchema.optional()
|
|
41180
41321
|
}).strip();
|
|
41181
|
-
var dashboardConfigSchema =
|
|
41182
|
-
previewEditingEnabled:
|
|
41322
|
+
var dashboardConfigSchema = z63.object({
|
|
41323
|
+
previewEditingEnabled: z63.boolean().optional(),
|
|
41183
41324
|
navigation: dashboardNavigationConfigSchema.optional()
|
|
41184
41325
|
}).strip();
|
|
41185
41326
|
var fieldDefinitionInputSchema = unsafeRetypeZodSchema(fieldSchema);
|
|
41186
41327
|
var nodeDefinitionSchema = unsafeRetypeZodSchema(NodeSchema);
|
|
41187
|
-
var sdkLoaderEndpointSchema =
|
|
41188
|
-
var loaderFallbackScalarSchema =
|
|
41189
|
-
|
|
41190
|
-
|
|
41191
|
-
|
|
41192
|
-
|
|
41328
|
+
var sdkLoaderEndpointSchema = z63.enum(SUPPORTED_LOADER_ENDPOINTS);
|
|
41329
|
+
var loaderFallbackScalarSchema = z63.union([
|
|
41330
|
+
z63.string(),
|
|
41331
|
+
z63.number(),
|
|
41332
|
+
z63.boolean(),
|
|
41333
|
+
z63.null()
|
|
41193
41334
|
]);
|
|
41194
|
-
var loaderParamBindingSchema =
|
|
41195
|
-
$bind:
|
|
41196
|
-
from:
|
|
41335
|
+
var loaderParamBindingSchema = z63.object({
|
|
41336
|
+
$bind: z63.object({
|
|
41337
|
+
from: z63.string().min(1, "Binding path is required"),
|
|
41197
41338
|
fallback: loaderFallbackScalarSchema.optional()
|
|
41198
41339
|
})
|
|
41199
41340
|
});
|
|
41200
|
-
var loaderParamValueSchema =
|
|
41201
|
-
|
|
41202
|
-
|
|
41203
|
-
|
|
41341
|
+
var loaderParamValueSchema = z63.union([
|
|
41342
|
+
z63.string(),
|
|
41343
|
+
z63.number(),
|
|
41344
|
+
z63.boolean(),
|
|
41204
41345
|
loaderParamBindingSchema
|
|
41205
41346
|
]);
|
|
41206
|
-
var sdkConfigLoaderSchema =
|
|
41347
|
+
var sdkConfigLoaderSchema = z63.object({
|
|
41207
41348
|
endpoint: sdkLoaderEndpointSchema,
|
|
41208
|
-
params:
|
|
41209
|
-
mode:
|
|
41349
|
+
params: z63.record(z63.string(), loaderParamValueSchema),
|
|
41350
|
+
mode: z63.enum(["server", "client"]).default("server")
|
|
41210
41351
|
});
|
|
41211
|
-
var sdkDataLoadersSchema =
|
|
41212
|
-
var sdkCustomBlockIdSchema =
|
|
41352
|
+
var sdkDataLoadersSchema = z63.record(z63.string(), sdkConfigLoaderSchema).refine((loaders) => Object.keys(loaders).length <= 5, { message: "Maximum 5 data loaders per block" }).optional();
|
|
41353
|
+
var sdkCustomBlockIdSchema = z63.string().min(8).regex(/^custom\.[a-z][a-z0-9-]*$/, {
|
|
41213
41354
|
message: "Block ID must start with 'custom.' followed by lowercase letters, numbers, or hyphens"
|
|
41214
41355
|
}).transform((value) => value);
|
|
41215
|
-
var sdkCustomBlockInputSchema =
|
|
41356
|
+
var sdkCustomBlockInputSchema = z63.object({
|
|
41216
41357
|
id: sdkCustomBlockIdSchema,
|
|
41217
|
-
title:
|
|
41218
|
-
titleSource:
|
|
41219
|
-
description:
|
|
41358
|
+
title: z63.string().min(1),
|
|
41359
|
+
titleSource: z63.union([z63.string().min(1), z63.array(z63.string().min(1)).min(1)]).optional(),
|
|
41360
|
+
description: z63.string().optional(),
|
|
41220
41361
|
category: blockCategoryEnum,
|
|
41221
|
-
icon:
|
|
41222
|
-
tags:
|
|
41362
|
+
icon: z63.string().optional(),
|
|
41363
|
+
tags: z63.array(z63.string()).optional(),
|
|
41223
41364
|
fields: fieldDefinitionInputSchema.array().min(1),
|
|
41224
41365
|
dataLoaders: sdkDataLoadersSchema,
|
|
41225
41366
|
layout: NodeSchema.optional(),
|
|
41226
|
-
variants:
|
|
41227
|
-
defaultVariant:
|
|
41228
|
-
variantOptions:
|
|
41229
|
-
|
|
41230
|
-
|
|
41231
|
-
label:
|
|
41232
|
-
description:
|
|
41233
|
-
icon:
|
|
41367
|
+
variants: z63.record(z63.string().min(1), NodeSchema).optional(),
|
|
41368
|
+
defaultVariant: z63.string().min(1).optional(),
|
|
41369
|
+
variantOptions: z63.record(
|
|
41370
|
+
z63.string().min(1),
|
|
41371
|
+
z63.object({
|
|
41372
|
+
label: z63.string().min(1).optional(),
|
|
41373
|
+
description: z63.string().min(1).optional(),
|
|
41374
|
+
icon: z63.string().min(1).optional()
|
|
41234
41375
|
})
|
|
41235
41376
|
).optional(),
|
|
41236
41377
|
previewCustomize: previewCustomizeManifestCurationSchema.optional()
|
|
@@ -41241,7 +41382,7 @@ var sdkCustomBlockInputSchema = z65.object({
|
|
|
41241
41382
|
const exists = data.fields.some((field) => field.id === source);
|
|
41242
41383
|
if (!exists) {
|
|
41243
41384
|
ctx.addIssue({
|
|
41244
|
-
code:
|
|
41385
|
+
code: z63.ZodIssueCode.custom,
|
|
41245
41386
|
message: `titleSource must reference a valid field ID (got "${source}")`,
|
|
41246
41387
|
path: Array.isArray(data.titleSource) ? ["titleSource", index] : ["titleSource"]
|
|
41247
41388
|
});
|
|
@@ -41250,7 +41391,7 @@ var sdkCustomBlockInputSchema = z65.object({
|
|
|
41250
41391
|
}
|
|
41251
41392
|
if (data.layout && data.variants) {
|
|
41252
41393
|
ctx.addIssue({
|
|
41253
|
-
code:
|
|
41394
|
+
code: z63.ZodIssueCode.custom,
|
|
41254
41395
|
message: "Custom block must define either `layout` or `variants`, not both",
|
|
41255
41396
|
path: ["variants"]
|
|
41256
41397
|
});
|
|
@@ -41259,14 +41400,14 @@ var sdkCustomBlockInputSchema = z65.object({
|
|
|
41259
41400
|
const keys = Object.keys(data.variants);
|
|
41260
41401
|
if (keys.length === 0) {
|
|
41261
41402
|
ctx.addIssue({
|
|
41262
|
-
code:
|
|
41403
|
+
code: z63.ZodIssueCode.custom,
|
|
41263
41404
|
message: "`variants` must contain at least one variant key",
|
|
41264
41405
|
path: ["variants"]
|
|
41265
41406
|
});
|
|
41266
41407
|
}
|
|
41267
41408
|
if (data.defaultVariant && !Object.prototype.hasOwnProperty.call(data.variants, data.defaultVariant)) {
|
|
41268
41409
|
ctx.addIssue({
|
|
41269
|
-
code:
|
|
41410
|
+
code: z63.ZodIssueCode.custom,
|
|
41270
41411
|
message: "`defaultVariant` must be a key present in `variants`",
|
|
41271
41412
|
path: ["defaultVariant"]
|
|
41272
41413
|
});
|
|
@@ -41275,7 +41416,7 @@ var sdkCustomBlockInputSchema = z65.object({
|
|
|
41275
41416
|
for (const key of Object.keys(data.variantOptions)) {
|
|
41276
41417
|
if (!Object.prototype.hasOwnProperty.call(data.variants, key)) {
|
|
41277
41418
|
ctx.addIssue({
|
|
41278
|
-
code:
|
|
41419
|
+
code: z63.ZodIssueCode.custom,
|
|
41279
41420
|
message: "`variantOptions` key must exist in `variants`",
|
|
41280
41421
|
path: ["variantOptions", key]
|
|
41281
41422
|
});
|
|
@@ -41284,78 +41425,78 @@ var sdkCustomBlockInputSchema = z65.object({
|
|
|
41284
41425
|
}
|
|
41285
41426
|
}
|
|
41286
41427
|
});
|
|
41287
|
-
var sdkBlockFieldExtensionInputSchema =
|
|
41428
|
+
var sdkBlockFieldExtensionInputSchema = z63.object({
|
|
41288
41429
|
fields: fieldDefinitionInputSchema.array().min(1)
|
|
41289
41430
|
});
|
|
41290
|
-
var sdkBlockFieldExtensionsInputSchema =
|
|
41291
|
-
|
|
41431
|
+
var sdkBlockFieldExtensionsInputSchema = z63.record(
|
|
41432
|
+
z63.string().min(1),
|
|
41292
41433
|
sdkBlockFieldExtensionInputSchema
|
|
41293
41434
|
);
|
|
41294
|
-
var sdkThemePaletteSchema =
|
|
41295
|
-
var sdkThemeConfigSchema =
|
|
41435
|
+
var sdkThemePaletteSchema = z63.record(z63.string(), z63.string());
|
|
41436
|
+
var sdkThemeConfigSchema = z63.object({
|
|
41296
41437
|
palette: sdkThemePaletteSchema
|
|
41297
41438
|
});
|
|
41298
|
-
var sdkSectionBackgroundSchema =
|
|
41299
|
-
id:
|
|
41300
|
-
label:
|
|
41301
|
-
token:
|
|
41439
|
+
var sdkSectionBackgroundSchema = z63.object({
|
|
41440
|
+
id: z63.string().min(1),
|
|
41441
|
+
label: z63.string().min(1),
|
|
41442
|
+
token: z63.string().min(1)
|
|
41302
41443
|
});
|
|
41303
|
-
var sdkSectionOptionsConfigSchema =
|
|
41304
|
-
backgroundColor:
|
|
41305
|
-
backgroundImage:
|
|
41306
|
-
backgroundGradient:
|
|
41307
|
-
spacing:
|
|
41308
|
-
textColor:
|
|
41444
|
+
var sdkSectionOptionsConfigSchema = z63.object({
|
|
41445
|
+
backgroundColor: z63.boolean().optional(),
|
|
41446
|
+
backgroundImage: z63.boolean().optional(),
|
|
41447
|
+
backgroundGradient: z63.boolean().optional(),
|
|
41448
|
+
spacing: z63.union([z63.array(z63.enum(["compact", "default", "spacious"])), z63.boolean()]).optional(),
|
|
41449
|
+
textColor: z63.boolean().optional()
|
|
41309
41450
|
});
|
|
41310
|
-
var sdkContainerOptionsConfigSchema =
|
|
41311
|
-
maxWidth:
|
|
41312
|
-
alignment:
|
|
41451
|
+
var sdkContainerOptionsConfigSchema = z63.object({
|
|
41452
|
+
maxWidth: z63.union([z63.array(z63.enum(["narrow", "default", "wide", "full"])), z63.boolean()]).optional(),
|
|
41453
|
+
alignment: z63.union([z63.array(z63.enum(["left", "center", "right"])), z63.boolean()]).optional()
|
|
41313
41454
|
});
|
|
41314
|
-
var sdkSiteStyleConfigSchema =
|
|
41315
|
-
sectionBackgrounds:
|
|
41455
|
+
var sdkSiteStyleConfigSchema = z63.object({
|
|
41456
|
+
sectionBackgrounds: z63.array(sdkSectionBackgroundSchema).optional(),
|
|
41316
41457
|
sectionOptions: sdkSectionOptionsConfigSchema.optional(),
|
|
41317
41458
|
containerOptions: sdkContainerOptionsConfigSchema.optional()
|
|
41318
41459
|
});
|
|
41319
|
-
var sdkSiteLayoutConfigSchema =
|
|
41320
|
-
footerBlocks:
|
|
41321
|
-
|
|
41322
|
-
id:
|
|
41323
|
-
kind:
|
|
41324
|
-
content:
|
|
41460
|
+
var sdkSiteLayoutConfigSchema = z63.object({
|
|
41461
|
+
footerBlocks: z63.array(
|
|
41462
|
+
z63.object({
|
|
41463
|
+
id: z63.string().min(1).optional(),
|
|
41464
|
+
kind: z63.string().min(1),
|
|
41465
|
+
content: z63.record(z63.string(), z63.unknown()).optional()
|
|
41325
41466
|
})
|
|
41326
41467
|
).optional()
|
|
41327
41468
|
});
|
|
41328
|
-
var sdkFieldSelectOptionSchema =
|
|
41329
|
-
value:
|
|
41330
|
-
label:
|
|
41469
|
+
var sdkFieldSelectOptionSchema = z63.object({
|
|
41470
|
+
value: z63.string(),
|
|
41471
|
+
label: z63.string()
|
|
41331
41472
|
});
|
|
41332
|
-
var sdkBlockFieldConfigSchema =
|
|
41333
|
-
options:
|
|
41473
|
+
var sdkBlockFieldConfigSchema = z63.object({
|
|
41474
|
+
options: z63.array(sdkFieldSelectOptionSchema).optional()
|
|
41334
41475
|
});
|
|
41335
|
-
var sdkBlockFieldOptionsMapSchema =
|
|
41336
|
-
|
|
41476
|
+
var sdkBlockFieldOptionsMapSchema = z63.record(
|
|
41477
|
+
z63.string().regex(/^(block\.|custom\.)[a-z][a-z0-9-]*$/, {
|
|
41337
41478
|
message: "Block ID must be 'block.*' or 'custom.*' format"
|
|
41338
41479
|
}),
|
|
41339
|
-
|
|
41480
|
+
z63.record(z63.string().min(1), sdkBlockFieldConfigSchema)
|
|
41340
41481
|
).optional();
|
|
41341
|
-
var sdkContentTypeTemplateConfigSchema =
|
|
41342
|
-
blocks:
|
|
41482
|
+
var sdkContentTypeTemplateConfigSchema = z63.object({
|
|
41483
|
+
blocks: z63.array(z63.unknown())
|
|
41343
41484
|
}).passthrough();
|
|
41344
|
-
var sdkContentTypeOrderingConfigSchema =
|
|
41345
|
-
mode:
|
|
41485
|
+
var sdkContentTypeOrderingConfigSchema = z63.object({
|
|
41486
|
+
mode: z63.enum(["default", "manual"]).optional()
|
|
41346
41487
|
}).optional();
|
|
41347
|
-
var sdkContentTypeConfigSchema =
|
|
41348
|
-
key:
|
|
41349
|
-
fields:
|
|
41488
|
+
var sdkContentTypeConfigSchema = z63.object({
|
|
41489
|
+
key: z63.string().min(1),
|
|
41490
|
+
fields: z63.array(z63.unknown()),
|
|
41350
41491
|
ordering: sdkContentTypeOrderingConfigSchema,
|
|
41351
41492
|
template: sdkContentTypeTemplateConfigSchema.nullable().optional()
|
|
41352
41493
|
}).passthrough();
|
|
41353
|
-
var sdkContentConfigSchema =
|
|
41354
|
-
contentTypes:
|
|
41355
|
-
pages:
|
|
41356
|
-
entries:
|
|
41357
|
-
navigationMenus:
|
|
41358
|
-
settings:
|
|
41494
|
+
var sdkContentConfigSchema = z63.object({
|
|
41495
|
+
contentTypes: z63.array(sdkContentTypeConfigSchema).optional(),
|
|
41496
|
+
pages: z63.array(z63.unknown()).optional(),
|
|
41497
|
+
entries: z63.array(z63.unknown()).optional(),
|
|
41498
|
+
navigationMenus: z63.array(z63.unknown()).optional(),
|
|
41499
|
+
settings: z63.unknown().optional()
|
|
41359
41500
|
}).passthrough();
|
|
41360
41501
|
var SDK_WORKFLOW_ID_MAX_LENGTH = 120;
|
|
41361
41502
|
var SDK_WORKFLOW_TITLE_MAX_LENGTH = 120;
|
|
@@ -41370,62 +41511,62 @@ var SDK_WORKFLOW_CONFIRMATION_TITLE_MAX_LENGTH = 120;
|
|
|
41370
41511
|
var SDK_WORKFLOW_CONFIRMATION_BODY_MAX_LENGTH = 500;
|
|
41371
41512
|
var SDK_WORKFLOW_ID_PATTERN = /^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$/;
|
|
41372
41513
|
var SDK_WORKFLOW_ENDPOINT_PATTERN = /^\//;
|
|
41373
|
-
var sdkWorkflowIdSchema =
|
|
41514
|
+
var sdkWorkflowIdSchema = z63.string().min(1).max(SDK_WORKFLOW_ID_MAX_LENGTH).regex(SDK_WORKFLOW_ID_PATTERN, {
|
|
41374
41515
|
message: "Workflow ID must start with a lowercase letter and use lowercase letters, numbers, dots, underscores, or hyphens"
|
|
41375
41516
|
});
|
|
41376
|
-
var sdkWorkflowEndpointSchema =
|
|
41377
|
-
var sdkWorkflowManualTriggerSchema =
|
|
41378
|
-
type:
|
|
41517
|
+
var sdkWorkflowEndpointSchema = z63.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 "/"' });
|
|
41518
|
+
var sdkWorkflowManualTriggerSchema = z63.object({
|
|
41519
|
+
type: z63.literal("manual")
|
|
41379
41520
|
}).strict();
|
|
41380
|
-
var sdkWorkflowTriggerFieldSchema =
|
|
41521
|
+
var sdkWorkflowTriggerFieldSchema = z63.string().trim().min(1).max(SDK_WORKFLOW_TRIGGER_FIELD_MAX_LENGTH).refine((field) => !field.includes("."), {
|
|
41381
41522
|
message: "Workflow trigger fields must be top-level content field IDs, not paths"
|
|
41382
41523
|
});
|
|
41383
|
-
var sdkWorkflowFieldChangedConditionSchema =
|
|
41524
|
+
var sdkWorkflowFieldChangedConditionSchema = z63.object({
|
|
41384
41525
|
field: sdkWorkflowTriggerFieldSchema,
|
|
41385
|
-
changed:
|
|
41526
|
+
changed: z63.literal(true)
|
|
41386
41527
|
}).strict();
|
|
41387
|
-
var sdkWorkflowFieldEmptyConditionSchema =
|
|
41528
|
+
var sdkWorkflowFieldEmptyConditionSchema = z63.object({
|
|
41388
41529
|
field: sdkWorkflowTriggerFieldSchema,
|
|
41389
|
-
isEmpty:
|
|
41530
|
+
isEmpty: z63.boolean()
|
|
41390
41531
|
}).strict();
|
|
41391
|
-
var sdkWorkflowEntryDraftUpdatedTriggerSchema =
|
|
41392
|
-
type:
|
|
41393
|
-
when:
|
|
41394
|
-
|
|
41532
|
+
var sdkWorkflowEntryDraftUpdatedTriggerSchema = z63.object({
|
|
41533
|
+
type: z63.literal("entry.draft.updated"),
|
|
41534
|
+
when: z63.array(
|
|
41535
|
+
z63.union([
|
|
41395
41536
|
sdkWorkflowFieldChangedConditionSchema,
|
|
41396
41537
|
sdkWorkflowFieldEmptyConditionSchema
|
|
41397
41538
|
])
|
|
41398
41539
|
).min(1).max(SDK_WORKFLOW_TRIGGER_CONDITION_MAX_COUNT)
|
|
41399
41540
|
}).strict();
|
|
41400
|
-
var sdkWorkflowTriggerSchema =
|
|
41541
|
+
var sdkWorkflowTriggerSchema = z63.discriminatedUnion("type", [
|
|
41401
41542
|
sdkWorkflowManualTriggerSchema,
|
|
41402
41543
|
sdkWorkflowEntryDraftUpdatedTriggerSchema
|
|
41403
41544
|
]);
|
|
41404
|
-
var sdkWorkflowConfirmationSchema =
|
|
41405
|
-
title:
|
|
41406
|
-
body:
|
|
41545
|
+
var sdkWorkflowConfirmationSchema = z63.object({
|
|
41546
|
+
title: z63.string().trim().min(1).max(SDK_WORKFLOW_CONFIRMATION_TITLE_MAX_LENGTH),
|
|
41547
|
+
body: z63.string().trim().min(1).max(SDK_WORKFLOW_CONFIRMATION_BODY_MAX_LENGTH).optional()
|
|
41407
41548
|
}).strict();
|
|
41408
|
-
var sdkWorkflowConfigSchema =
|
|
41549
|
+
var sdkWorkflowConfigSchema = z63.object({
|
|
41409
41550
|
id: sdkWorkflowIdSchema,
|
|
41410
|
-
title:
|
|
41411
|
-
description:
|
|
41412
|
-
contentType:
|
|
41551
|
+
title: z63.string().trim().min(1).max(SDK_WORKFLOW_TITLE_MAX_LENGTH),
|
|
41552
|
+
description: z63.string().trim().min(1).max(SDK_WORKFLOW_DESCRIPTION_MAX_LENGTH).optional(),
|
|
41553
|
+
contentType: z63.string().trim().min(1).max(SDK_WORKFLOW_CONTENT_TYPE_MAX_LENGTH),
|
|
41413
41554
|
endpoint: sdkWorkflowEndpointSchema,
|
|
41414
|
-
triggers:
|
|
41555
|
+
triggers: z63.array(sdkWorkflowTriggerSchema).min(1).max(SDK_WORKFLOW_TRIGGER_MAX_COUNT),
|
|
41415
41556
|
confirmation: sdkWorkflowConfirmationSchema.optional()
|
|
41416
41557
|
}).strict();
|
|
41417
|
-
var sdkWorkflowsSchema =
|
|
41558
|
+
var sdkWorkflowsSchema = z63.array(sdkWorkflowConfigSchema).max(SDK_WORKFLOW_MAX_COUNT, "Maximum 50 workflows per site").refine((workflows) => {
|
|
41418
41559
|
const ids = workflows.map((workflow) => workflow.id);
|
|
41419
41560
|
return ids.length === new Set(ids).size;
|
|
41420
41561
|
}, { message: "Workflow IDs must be unique" }).optional();
|
|
41421
|
-
var riverbankSiteConfigInputSchema =
|
|
41422
|
-
siteId:
|
|
41423
|
-
previewUrl:
|
|
41424
|
-
liveUrl:
|
|
41562
|
+
var riverbankSiteConfigInputSchema = z63.object({
|
|
41563
|
+
siteId: z63.string().uuid(),
|
|
41564
|
+
previewUrl: z63.string().url().optional(),
|
|
41565
|
+
liveUrl: z63.string().url().optional(),
|
|
41425
41566
|
theme: sdkThemeConfigSchema.optional(),
|
|
41426
41567
|
styles: sdkSiteStyleConfigSchema.optional(),
|
|
41427
41568
|
layout: sdkSiteLayoutConfigSchema.optional(),
|
|
41428
|
-
customBlocks:
|
|
41569
|
+
customBlocks: z63.array(sdkCustomBlockInputSchema).max(100, "Maximum 100 custom blocks per site").refine((blocks) => {
|
|
41429
41570
|
const ids = blocks.map((b) => b.id);
|
|
41430
41571
|
return ids.length === new Set(ids).size;
|
|
41431
41572
|
}, { message: "Block IDs must be unique" }).optional(),
|
|
@@ -41433,50 +41574,50 @@ var riverbankSiteConfigInputSchema = z65.object({
|
|
|
41433
41574
|
blockFieldExtensions: sdkBlockFieldExtensionsInputSchema.optional(),
|
|
41434
41575
|
workflows: sdkWorkflowsSchema,
|
|
41435
41576
|
content: sdkContentConfigSchema.optional(),
|
|
41436
|
-
contentDir:
|
|
41437
|
-
sync:
|
|
41438
|
-
existingEntries:
|
|
41577
|
+
contentDir: z63.string().optional(),
|
|
41578
|
+
sync: z63.object({
|
|
41579
|
+
existingEntries: z63.enum(["skip", "update"]).optional()
|
|
41439
41580
|
}).optional(),
|
|
41440
|
-
deploy:
|
|
41441
|
-
verifyCommand:
|
|
41442
|
-
prebuildOutput:
|
|
41581
|
+
deploy: z63.object({
|
|
41582
|
+
verifyCommand: z63.string().optional(),
|
|
41583
|
+
prebuildOutput: z63.string().optional()
|
|
41443
41584
|
}).optional(),
|
|
41444
|
-
themeSource:
|
|
41445
|
-
activeTheme:
|
|
41446
|
-
enablePortal:
|
|
41585
|
+
themeSource: z63.enum(["local", "cms"]).optional(),
|
|
41586
|
+
activeTheme: z63.string().optional(),
|
|
41587
|
+
enablePortal: z63.boolean().optional(),
|
|
41447
41588
|
dashboard: dashboardConfigSchema.optional()
|
|
41448
41589
|
}).strict();
|
|
41449
|
-
var pushSdkConfigBodySchema =
|
|
41590
|
+
var pushSdkConfigBodySchema = z63.object({
|
|
41450
41591
|
config: riverbankSiteConfigInputSchema,
|
|
41451
|
-
forceContentTypes:
|
|
41592
|
+
forceContentTypes: z63.boolean().optional()
|
|
41452
41593
|
}).strict();
|
|
41453
41594
|
|
|
41454
41595
|
// ../api/src/siteOnboarding.ts
|
|
41455
|
-
import { z as
|
|
41596
|
+
import { z as z64 } from "zod";
|
|
41456
41597
|
var LAUNCH_REQUIREMENT_OVERRIDE_DEFINITIONS = {
|
|
41457
41598
|
configure_appointments: {
|
|
41458
41599
|
requirementId: "configure_appointments",
|
|
41459
41600
|
reason: "launch_anyway"
|
|
41460
41601
|
}
|
|
41461
41602
|
};
|
|
41462
|
-
var acknowledgeLaunchRequirementRequestSchema =
|
|
41603
|
+
var acknowledgeLaunchRequirementRequestSchema = z64.discriminatedUnion(
|
|
41463
41604
|
"requirementId",
|
|
41464
41605
|
[
|
|
41465
|
-
|
|
41466
|
-
requirementId:
|
|
41606
|
+
z64.object({
|
|
41607
|
+
requirementId: z64.literal("review_generated_site")
|
|
41467
41608
|
}),
|
|
41468
|
-
|
|
41469
|
-
requirementId:
|
|
41609
|
+
z64.object({
|
|
41610
|
+
requirementId: z64.literal(
|
|
41470
41611
|
LAUNCH_REQUIREMENT_OVERRIDE_DEFINITIONS.configure_appointments.requirementId
|
|
41471
41612
|
),
|
|
41472
|
-
overrideReason:
|
|
41613
|
+
overrideReason: z64.literal(
|
|
41473
41614
|
LAUNCH_REQUIREMENT_OVERRIDE_DEFINITIONS.configure_appointments.reason
|
|
41474
41615
|
)
|
|
41475
41616
|
})
|
|
41476
41617
|
]
|
|
41477
41618
|
);
|
|
41478
|
-
var goLiveSiteRequestSchema =
|
|
41479
|
-
acceptExtraSiteCharge:
|
|
41619
|
+
var goLiveSiteRequestSchema = z64.object({
|
|
41620
|
+
acceptExtraSiteCharge: z64.boolean().optional()
|
|
41480
41621
|
});
|
|
41481
41622
|
|
|
41482
41623
|
// ../api/src/customerMembershipOutcomes.ts
|
|
@@ -41553,7 +41694,7 @@ var COURSE_ENROLLMENT_REFUND_FAILED_CODES = [
|
|
|
41553
41694
|
];
|
|
41554
41695
|
|
|
41555
41696
|
// ../api/src/bookingVerticals.ts
|
|
41556
|
-
import { z as
|
|
41697
|
+
import { z as z65 } from "zod";
|
|
41557
41698
|
var VERTICAL_IDS = [
|
|
41558
41699
|
"yoga_wellness",
|
|
41559
41700
|
"fitness_pt",
|
|
@@ -41718,39 +41859,39 @@ function getSiteVerticalConfigIssues(rawConfig, config) {
|
|
|
41718
41859
|
}
|
|
41719
41860
|
return [...issues];
|
|
41720
41861
|
}
|
|
41721
|
-
var VerticalIdSchema =
|
|
41862
|
+
var VerticalIdSchema = z65.string().trim().transform((value, ctx) => {
|
|
41722
41863
|
const parsed = parseVerticalId(value);
|
|
41723
41864
|
if (!parsed) {
|
|
41724
41865
|
ctx.addIssue({
|
|
41725
|
-
code:
|
|
41866
|
+
code: z65.ZodIssueCode.custom,
|
|
41726
41867
|
message: "Unknown booking vertical"
|
|
41727
41868
|
});
|
|
41728
|
-
return
|
|
41869
|
+
return z65.NEVER;
|
|
41729
41870
|
}
|
|
41730
41871
|
return parsed;
|
|
41731
41872
|
});
|
|
41732
|
-
var VerticalPresetIdSchema =
|
|
41873
|
+
var VerticalPresetIdSchema = z65.string().trim().transform((value, ctx) => {
|
|
41733
41874
|
const parsed = parseVerticalPresetId(value);
|
|
41734
41875
|
if (!parsed) {
|
|
41735
41876
|
ctx.addIssue({
|
|
41736
|
-
code:
|
|
41877
|
+
code: z65.ZodIssueCode.custom,
|
|
41737
41878
|
message: "Unknown booking preset"
|
|
41738
41879
|
});
|
|
41739
|
-
return
|
|
41880
|
+
return z65.NEVER;
|
|
41740
41881
|
}
|
|
41741
41882
|
return parsed;
|
|
41742
41883
|
});
|
|
41743
|
-
var BookingVerticalConfigSchema =
|
|
41884
|
+
var BookingVerticalConfigSchema = z65.object({
|
|
41744
41885
|
verticalId: VerticalIdSchema.nullable(),
|
|
41745
|
-
selectedPresetIds:
|
|
41886
|
+
selectedPresetIds: z65.array(VerticalPresetIdSchema).max(20)
|
|
41746
41887
|
}).transform((value, ctx) => {
|
|
41747
41888
|
const resolved = resolveSiteVerticalBookingConfig(value);
|
|
41748
41889
|
if (resolved.kind === "invalid") {
|
|
41749
41890
|
ctx.addIssue({
|
|
41750
|
-
code:
|
|
41891
|
+
code: z65.ZodIssueCode.custom,
|
|
41751
41892
|
message: `Invalid booking vertical config: ${resolved.issues.join(", ")}`
|
|
41752
41893
|
});
|
|
41753
|
-
return
|
|
41894
|
+
return z65.NEVER;
|
|
41754
41895
|
}
|
|
41755
41896
|
return resolved.config;
|
|
41756
41897
|
});
|
|
@@ -41772,56 +41913,56 @@ function preset(id, verticalId, canonicalBehaviour, label, pluralLabel, descript
|
|
|
41772
41913
|
}
|
|
41773
41914
|
|
|
41774
41915
|
// ../api/src/utils/isRecord.ts
|
|
41775
|
-
function
|
|
41916
|
+
function isRecord10(value) {
|
|
41776
41917
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
41777
41918
|
}
|
|
41778
41919
|
|
|
41779
41920
|
// ../api/src/appointmentSetup.ts
|
|
41780
|
-
import { z as
|
|
41921
|
+
import { z as z66 } from "zod";
|
|
41781
41922
|
var APPOINTMENT_SETUP_MAX_MINUTES = 1440;
|
|
41782
|
-
var appointmentSetupRefSchema =
|
|
41783
|
-
|
|
41784
|
-
|
|
41923
|
+
var appointmentSetupRefSchema = z66.discriminatedUnion("kind", [
|
|
41924
|
+
z66.object({ kind: z66.literal("existing"), id: z66.string().min(1) }),
|
|
41925
|
+
z66.object({ kind: z66.literal("new"), draftId: z66.string().min(1) })
|
|
41785
41926
|
]);
|
|
41786
|
-
var appointmentSetupVenueChoiceSchema =
|
|
41787
|
-
|
|
41788
|
-
|
|
41789
|
-
|
|
41790
|
-
kind:
|
|
41791
|
-
draftId:
|
|
41792
|
-
title:
|
|
41793
|
-
description:
|
|
41794
|
-
timezone:
|
|
41795
|
-
addressJson:
|
|
41796
|
-
locationJson:
|
|
41927
|
+
var appointmentSetupVenueChoiceSchema = z66.discriminatedUnion("kind", [
|
|
41928
|
+
z66.object({ kind: z66.literal("none") }),
|
|
41929
|
+
z66.object({ kind: z66.literal("existing"), venueId: z66.string().min(1) }),
|
|
41930
|
+
z66.object({
|
|
41931
|
+
kind: z66.literal("create"),
|
|
41932
|
+
draftId: z66.string().min(1),
|
|
41933
|
+
title: z66.string().trim().min(1),
|
|
41934
|
+
description: z66.string().nullable(),
|
|
41935
|
+
timezone: z66.string().trim().min(1).nullable(),
|
|
41936
|
+
addressJson: z66.record(z66.string(), z66.unknown()),
|
|
41937
|
+
locationJson: z66.object({ lat: z66.number(), lng: z66.number() }).nullable()
|
|
41797
41938
|
})
|
|
41798
41939
|
]);
|
|
41799
|
-
var appointmentSetupPaymentDraftSchema =
|
|
41800
|
-
priceType:
|
|
41801
|
-
});
|
|
41802
|
-
var appointmentSetupServiceAssignmentDraftSchema =
|
|
41803
|
-
|
|
41804
|
-
|
|
41805
|
-
kind:
|
|
41806
|
-
resourceRefs:
|
|
41940
|
+
var appointmentSetupPaymentDraftSchema = z66.object({
|
|
41941
|
+
priceType: z66.union([z66.literal("free"), z66.literal("paid")])
|
|
41942
|
+
});
|
|
41943
|
+
var appointmentSetupServiceAssignmentDraftSchema = z66.discriminatedUnion("kind", [
|
|
41944
|
+
z66.object({ kind: z66.literal("all_practitioners") }),
|
|
41945
|
+
z66.object({
|
|
41946
|
+
kind: z66.literal("selected_practitioners"),
|
|
41947
|
+
resourceRefs: z66.array(appointmentSetupRefSchema)
|
|
41807
41948
|
})
|
|
41808
41949
|
]);
|
|
41809
|
-
var appointmentSetupServiceDraftSchema =
|
|
41950
|
+
var appointmentSetupServiceDraftSchema = z66.object({
|
|
41810
41951
|
ref: appointmentSetupRefSchema,
|
|
41811
|
-
title:
|
|
41812
|
-
description:
|
|
41813
|
-
durationMinutes:
|
|
41814
|
-
prepMinutes:
|
|
41815
|
-
cleanupMinutes:
|
|
41816
|
-
priceAmount:
|
|
41817
|
-
isActive:
|
|
41818
|
-
locationType:
|
|
41819
|
-
|
|
41820
|
-
|
|
41821
|
-
|
|
41952
|
+
title: z66.string().trim().min(1),
|
|
41953
|
+
description: z66.string().nullable(),
|
|
41954
|
+
durationMinutes: z66.number().int().positive().max(APPOINTMENT_SETUP_MAX_MINUTES),
|
|
41955
|
+
prepMinutes: z66.number().int().nonnegative().max(APPOINTMENT_SETUP_MAX_MINUTES).default(0),
|
|
41956
|
+
cleanupMinutes: z66.number().int().nonnegative().max(APPOINTMENT_SETUP_MAX_MINUTES).default(0),
|
|
41957
|
+
priceAmount: z66.number().int().nonnegative().nullable(),
|
|
41958
|
+
isActive: z66.boolean(),
|
|
41959
|
+
locationType: z66.union([
|
|
41960
|
+
z66.literal("virtual"),
|
|
41961
|
+
z66.literal("in_person"),
|
|
41962
|
+
z66.literal("hybrid")
|
|
41822
41963
|
]),
|
|
41823
41964
|
venue: appointmentSetupVenueChoiceSchema,
|
|
41824
|
-
timezone:
|
|
41965
|
+
timezone: z66.string().trim().min(1).nullable(),
|
|
41825
41966
|
payment: appointmentSetupPaymentDraftSchema,
|
|
41826
41967
|
assignment: appointmentSetupServiceAssignmentDraftSchema
|
|
41827
41968
|
}).superRefine((service, ctx) => {
|
|
@@ -41840,49 +41981,49 @@ var appointmentSetupServiceDraftSchema = z68.object({
|
|
|
41840
41981
|
});
|
|
41841
41982
|
}
|
|
41842
41983
|
});
|
|
41843
|
-
var appointmentSetupPractitionerDraftSchema =
|
|
41984
|
+
var appointmentSetupPractitionerDraftSchema = z66.object({
|
|
41844
41985
|
ref: appointmentSetupRefSchema,
|
|
41845
|
-
displayName:
|
|
41846
|
-
bio:
|
|
41847
|
-
timezone:
|
|
41848
|
-
colorHex:
|
|
41849
|
-
});
|
|
41850
|
-
var appointmentSetupWeeklyWindowDraftSchema =
|
|
41851
|
-
weekday:
|
|
41852
|
-
startTime:
|
|
41853
|
-
endTime:
|
|
41854
|
-
});
|
|
41855
|
-
var appointmentSetupStartTimePolicyDraftSchema =
|
|
41856
|
-
|
|
41857
|
-
|
|
41858
|
-
kind:
|
|
41859
|
-
intervalMinutes:
|
|
41860
|
-
|
|
41861
|
-
|
|
41862
|
-
|
|
41863
|
-
|
|
41864
|
-
|
|
41865
|
-
|
|
41986
|
+
displayName: z66.string().trim().min(1),
|
|
41987
|
+
bio: z66.string().nullable(),
|
|
41988
|
+
timezone: z66.string().trim().min(1),
|
|
41989
|
+
colorHex: z66.string().nullable()
|
|
41990
|
+
});
|
|
41991
|
+
var appointmentSetupWeeklyWindowDraftSchema = z66.object({
|
|
41992
|
+
weekday: z66.number().int().min(0).max(6),
|
|
41993
|
+
startTime: z66.string(),
|
|
41994
|
+
endTime: z66.string()
|
|
41995
|
+
});
|
|
41996
|
+
var appointmentSetupStartTimePolicyDraftSchema = z66.discriminatedUnion("kind", [
|
|
41997
|
+
z66.object({ kind: z66.literal("automatic_spacing") }),
|
|
41998
|
+
z66.object({
|
|
41999
|
+
kind: z66.literal("regular_interval"),
|
|
42000
|
+
intervalMinutes: z66.union([
|
|
42001
|
+
z66.literal(10),
|
|
42002
|
+
z66.literal(15),
|
|
42003
|
+
z66.literal(20),
|
|
42004
|
+
z66.literal(30),
|
|
42005
|
+
z66.literal(45),
|
|
42006
|
+
z66.literal(60)
|
|
41866
42007
|
])
|
|
41867
42008
|
})
|
|
41868
42009
|
]);
|
|
41869
|
-
var appointmentSetupAvailabilityDraftSchema =
|
|
41870
|
-
kind:
|
|
42010
|
+
var appointmentSetupAvailabilityDraftSchema = z66.object({
|
|
42011
|
+
kind: z66.literal("weekly_windows"),
|
|
41871
42012
|
resourceRef: appointmentSetupRefSchema,
|
|
41872
42013
|
serviceRef: appointmentSetupRefSchema.nullable(),
|
|
41873
|
-
windows:
|
|
42014
|
+
windows: z66.array(appointmentSetupWeeklyWindowDraftSchema),
|
|
41874
42015
|
startTimePolicy: appointmentSetupStartTimePolicyDraftSchema.optional()
|
|
41875
42016
|
});
|
|
41876
42017
|
var APPOINTMENT_DEFAULT_MIN_LEAD_MINUTES_MAX = 28 * 24 * 60;
|
|
41877
42018
|
var APPOINTMENT_DEFAULT_MAX_BOOKING_NOTICE_MINUTES_MAX = 10 * 365 * 24 * 60;
|
|
41878
|
-
var appointmentSetupBookingNoticeSchema =
|
|
41879
|
-
minLeadMinutes:
|
|
41880
|
-
maxBookingNoticeMinutes:
|
|
41881
|
-
});
|
|
41882
|
-
var applyAppointmentSetupRequestSchema =
|
|
41883
|
-
services:
|
|
41884
|
-
practitioners:
|
|
41885
|
-
availability:
|
|
42019
|
+
var appointmentSetupBookingNoticeSchema = z66.object({
|
|
42020
|
+
minLeadMinutes: z66.number().int().nonnegative().max(APPOINTMENT_DEFAULT_MIN_LEAD_MINUTES_MAX),
|
|
42021
|
+
maxBookingNoticeMinutes: z66.number().int().nonnegative().max(APPOINTMENT_DEFAULT_MAX_BOOKING_NOTICE_MINUTES_MAX)
|
|
42022
|
+
});
|
|
42023
|
+
var applyAppointmentSetupRequestSchema = z66.object({
|
|
42024
|
+
services: z66.array(appointmentSetupServiceDraftSchema),
|
|
42025
|
+
practitioners: z66.array(appointmentSetupPractitionerDraftSchema),
|
|
42026
|
+
availability: z66.array(appointmentSetupAvailabilityDraftSchema),
|
|
41886
42027
|
bookingNotice: appointmentSetupBookingNoticeSchema
|
|
41887
42028
|
});
|
|
41888
42029
|
|
|
@@ -41915,24 +42056,24 @@ var STAFF_CANCELLATION_CONTEXT_CATEGORIES = [
|
|
|
41915
42056
|
];
|
|
41916
42057
|
|
|
41917
42058
|
// ../api/src/siteBanner.ts
|
|
41918
|
-
import { z as
|
|
42059
|
+
import { z as z67 } from "zod";
|
|
41919
42060
|
var SITE_BANNER_SCOPE_VALUES = ["homepage", "all-pages"];
|
|
41920
42061
|
var SITE_BANNER_TONE_VALUES = ["announcement", "promotion", "notice", "warning"];
|
|
41921
42062
|
var SITE_BANNER_MAX_TEXT_LENGTH = 320;
|
|
41922
42063
|
var SITE_BANNER_MAX_PARAGRAPHS = 2;
|
|
41923
|
-
var siteBannerScopeSchema =
|
|
41924
|
-
var siteBannerToneSchema =
|
|
41925
|
-
var siteBannerBodySchema =
|
|
41926
|
-
var siteBannerCtaSchema =
|
|
41927
|
-
label:
|
|
42064
|
+
var siteBannerScopeSchema = z67.enum(SITE_BANNER_SCOPE_VALUES);
|
|
42065
|
+
var siteBannerToneSchema = z67.enum(SITE_BANNER_TONE_VALUES);
|
|
42066
|
+
var siteBannerBodySchema = z67.unknown().transform(unwrapRichTextValue);
|
|
42067
|
+
var siteBannerCtaSchema = z67.object({
|
|
42068
|
+
label: z67.string().trim().min(1),
|
|
41928
42069
|
link: linkPayloadSchema
|
|
41929
42070
|
});
|
|
41930
|
-
var siteBannerSettingsSchema =
|
|
41931
|
-
|
|
41932
|
-
enabled:
|
|
42071
|
+
var siteBannerSettingsSchema = z67.discriminatedUnion("enabled", [
|
|
42072
|
+
z67.object({
|
|
42073
|
+
enabled: z67.literal(false)
|
|
41933
42074
|
}),
|
|
41934
|
-
|
|
41935
|
-
enabled:
|
|
42075
|
+
z67.object({
|
|
42076
|
+
enabled: z67.literal(true),
|
|
41936
42077
|
scope: siteBannerScopeSchema,
|
|
41937
42078
|
tone: siteBannerToneSchema,
|
|
41938
42079
|
body: siteBannerBodySchema,
|
|
@@ -41946,7 +42087,7 @@ var siteBannerSettingsInputSchema = siteBannerSettingsSchema.superRefine((value,
|
|
|
41946
42087
|
const analysis = analyzeSiteBannerBody(value.body);
|
|
41947
42088
|
for (const issue of analysis.issues) {
|
|
41948
42089
|
ctx.addIssue({
|
|
41949
|
-
code:
|
|
42090
|
+
code: z67.ZodIssueCode.custom,
|
|
41950
42091
|
path: ["body"],
|
|
41951
42092
|
message: siteBannerBodyIssueMessage(issue)
|
|
41952
42093
|
});
|
|
@@ -42079,7 +42220,7 @@ function sanitizeMarks(marks) {
|
|
|
42079
42220
|
if (mark.type === "bold" || mark.type === "strong" || mark.type === "italic" || mark.type === "em") {
|
|
42080
42221
|
return [{ type: mark.type }];
|
|
42081
42222
|
}
|
|
42082
|
-
if (mark.type === "link" &&
|
|
42223
|
+
if (mark.type === "link" && isRecord10(mark.attrs) && typeof mark.attrs.href === "string") {
|
|
42083
42224
|
const attrs = { href: mark.attrs.href };
|
|
42084
42225
|
if (typeof mark.attrs.target === "string" && mark.attrs.target.trim().length > 0) {
|
|
42085
42226
|
attrs.target = mark.attrs.target;
|
|
@@ -42094,10 +42235,10 @@ function sanitizeMarks(marks) {
|
|
|
42094
42235
|
return sanitized.length > 0 ? sanitized : void 0;
|
|
42095
42236
|
}
|
|
42096
42237
|
function unwrapRichTextValue(value) {
|
|
42097
|
-
if (
|
|
42238
|
+
if (isRecord10(value) && isRecord10(value.doc)) {
|
|
42098
42239
|
return unwrapRichTextValue(value.doc);
|
|
42099
42240
|
}
|
|
42100
|
-
if (
|
|
42241
|
+
if (isRecord10(value) && value.type === "doc") {
|
|
42101
42242
|
return {
|
|
42102
42243
|
type: "doc",
|
|
42103
42244
|
content: Array.isArray(value.content) ? value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) : []
|
|
@@ -42106,7 +42247,7 @@ function unwrapRichTextValue(value) {
|
|
|
42106
42247
|
return EMPTY_SITE_BANNER_BODY;
|
|
42107
42248
|
}
|
|
42108
42249
|
function isTipTapNodeLike(value) {
|
|
42109
|
-
return
|
|
42250
|
+
return isRecord10(value) && typeof value.type === "string";
|
|
42110
42251
|
}
|
|
42111
42252
|
function coerceTipTapNode(value) {
|
|
42112
42253
|
return {
|
|
@@ -42114,9 +42255,9 @@ function coerceTipTapNode(value) {
|
|
|
42114
42255
|
...Array.isArray(value.content) ? { content: value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) } : {},
|
|
42115
42256
|
...typeof value.text === "string" ? { text: value.text } : {},
|
|
42116
42257
|
...Array.isArray(value.marks) ? {
|
|
42117
|
-
marks: value.marks.filter((mark) =>
|
|
42258
|
+
marks: value.marks.filter((mark) => isRecord10(mark) && typeof mark.type === "string").map((mark) => ({
|
|
42118
42259
|
type: mark.type,
|
|
42119
|
-
...
|
|
42260
|
+
...isRecord10(mark.attrs) ? { attrs: mark.attrs } : {}
|
|
42120
42261
|
}))
|
|
42121
42262
|
} : {}
|
|
42122
42263
|
};
|
|
@@ -42173,71 +42314,71 @@ function unsafeAsNavigationMenuIdentifier(identifier) {
|
|
|
42173
42314
|
var MAIN_NAVIGATION_MENU_IDENTIFIER = unsafeAsNavigationMenuIdentifier("main");
|
|
42174
42315
|
|
|
42175
42316
|
// ../api/src/aiPlayground.ts
|
|
42176
|
-
import { z as
|
|
42177
|
-
var Rfc6902PatchOp =
|
|
42317
|
+
import { z as z68 } from "zod";
|
|
42318
|
+
var Rfc6902PatchOp = z68.discriminatedUnion("op", [
|
|
42178
42319
|
// Standard RFC-6902 operations
|
|
42179
|
-
|
|
42180
|
-
op:
|
|
42181
|
-
path:
|
|
42182
|
-
value:
|
|
42320
|
+
z68.object({
|
|
42321
|
+
op: z68.literal("add"),
|
|
42322
|
+
path: z68.string(),
|
|
42323
|
+
value: z68.unknown()
|
|
42183
42324
|
}),
|
|
42184
|
-
|
|
42185
|
-
op:
|
|
42186
|
-
path:
|
|
42325
|
+
z68.object({
|
|
42326
|
+
op: z68.literal("remove"),
|
|
42327
|
+
path: z68.string()
|
|
42187
42328
|
}),
|
|
42188
|
-
|
|
42189
|
-
op:
|
|
42190
|
-
path:
|
|
42191
|
-
value:
|
|
42329
|
+
z68.object({
|
|
42330
|
+
op: z68.literal("replace"),
|
|
42331
|
+
path: z68.string(),
|
|
42332
|
+
value: z68.unknown()
|
|
42192
42333
|
}),
|
|
42193
|
-
|
|
42194
|
-
op:
|
|
42195
|
-
from:
|
|
42196
|
-
path:
|
|
42334
|
+
z68.object({
|
|
42335
|
+
op: z68.literal("move"),
|
|
42336
|
+
from: z68.string(),
|
|
42337
|
+
path: z68.string()
|
|
42197
42338
|
}),
|
|
42198
|
-
|
|
42199
|
-
op:
|
|
42200
|
-
from:
|
|
42201
|
-
path:
|
|
42339
|
+
z68.object({
|
|
42340
|
+
op: z68.literal("copy"),
|
|
42341
|
+
from: z68.string(),
|
|
42342
|
+
path: z68.string()
|
|
42202
42343
|
}),
|
|
42203
42344
|
// Block-level operations (Phase 2)
|
|
42204
|
-
|
|
42205
|
-
op:
|
|
42206
|
-
blockKind:
|
|
42207
|
-
afterBlockId:
|
|
42208
|
-
content:
|
|
42209
|
-
rationale:
|
|
42345
|
+
z68.object({
|
|
42346
|
+
op: z68.literal("add_block"),
|
|
42347
|
+
blockKind: z68.string(),
|
|
42348
|
+
afterBlockId: z68.string().nullable(),
|
|
42349
|
+
content: z68.record(z68.string(), z68.unknown()),
|
|
42350
|
+
rationale: z68.string()
|
|
42210
42351
|
}),
|
|
42211
|
-
|
|
42212
|
-
op:
|
|
42213
|
-
blockId:
|
|
42214
|
-
rationale:
|
|
42352
|
+
z68.object({
|
|
42353
|
+
op: z68.literal("delete_block"),
|
|
42354
|
+
blockId: z68.string(),
|
|
42355
|
+
rationale: z68.string()
|
|
42215
42356
|
}),
|
|
42216
|
-
|
|
42217
|
-
op:
|
|
42218
|
-
blockId:
|
|
42219
|
-
afterBlockId:
|
|
42220
|
-
rationale:
|
|
42357
|
+
z68.object({
|
|
42358
|
+
op: z68.literal("reorder_block"),
|
|
42359
|
+
blockId: z68.string(),
|
|
42360
|
+
afterBlockId: z68.string().nullable(),
|
|
42361
|
+
rationale: z68.string()
|
|
42221
42362
|
})
|
|
42222
42363
|
]);
|
|
42223
|
-
var PlaygroundProposeRequest =
|
|
42224
|
-
request:
|
|
42364
|
+
var PlaygroundProposeRequest = z68.object({
|
|
42365
|
+
request: z68.string().min(1).max(2e3)
|
|
42225
42366
|
});
|
|
42226
|
-
var MultiPagePatchEnvelope =
|
|
42227
|
-
pageId:
|
|
42228
|
-
blockId:
|
|
42367
|
+
var MultiPagePatchEnvelope = z68.object({
|
|
42368
|
+
pageId: z68.string(),
|
|
42369
|
+
blockId: z68.string().optional(),
|
|
42229
42370
|
// Not present for page-level ops
|
|
42230
|
-
blockKind:
|
|
42231
|
-
blockPurpose:
|
|
42232
|
-
ops:
|
|
42233
|
-
rationale:
|
|
42234
|
-
currentContent:
|
|
42371
|
+
blockKind: z68.string().optional(),
|
|
42372
|
+
blockPurpose: z68.string().optional().nullable(),
|
|
42373
|
+
ops: z68.array(Rfc6902PatchOp),
|
|
42374
|
+
rationale: z68.string(),
|
|
42375
|
+
currentContent: z68.record(z68.string(), z68.unknown()).optional()
|
|
42235
42376
|
});
|
|
42236
|
-
var MultiPageUpdateResponse =
|
|
42237
|
-
patches:
|
|
42238
|
-
assistantMessage:
|
|
42239
|
-
pagesModified:
|
|
42240
|
-
toolCallsUsed:
|
|
42377
|
+
var MultiPageUpdateResponse = z68.object({
|
|
42378
|
+
patches: z68.array(MultiPagePatchEnvelope),
|
|
42379
|
+
assistantMessage: z68.string(),
|
|
42380
|
+
pagesModified: z68.number(),
|
|
42381
|
+
toolCallsUsed: z68.number()
|
|
42241
42382
|
});
|
|
42242
42383
|
|
|
42243
42384
|
// src/data/prefetchBlockData.ts
|
|
@@ -42251,7 +42392,7 @@ var ENTRY_REF_KEYS = [
|
|
|
42251
42392
|
"entryId",
|
|
42252
42393
|
"slug"
|
|
42253
42394
|
];
|
|
42254
|
-
function
|
|
42395
|
+
function isRecord11(value) {
|
|
42255
42396
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
42256
42397
|
}
|
|
42257
42398
|
function extractManualEntryRef(item) {
|
|
@@ -42259,7 +42400,7 @@ function extractManualEntryRef(item) {
|
|
|
42259
42400
|
const trimmed = item.trim();
|
|
42260
42401
|
return trimmed.length > 0 ? trimmed : null;
|
|
42261
42402
|
}
|
|
42262
|
-
if (!
|
|
42403
|
+
if (!isRecord11(item)) return null;
|
|
42263
42404
|
for (const key of ENTRY_REF_KEYS) {
|
|
42264
42405
|
const raw = item[key];
|
|
42265
42406
|
if (typeof raw === "string" && raw.trim().length > 0) {
|
|
@@ -42616,7 +42757,7 @@ function collectMediaAssetSidecar(mediaAssets) {
|
|
|
42616
42757
|
return Array.isArray(mediaAssets) && mediaAssets.length > 0 ? mediaAssets : void 0;
|
|
42617
42758
|
}
|
|
42618
42759
|
function convertPageResponseBlock(block) {
|
|
42619
|
-
if (!
|
|
42760
|
+
if (!isRecord12(block)) {
|
|
42620
42761
|
throw new Error("Invalid block format in page API response");
|
|
42621
42762
|
}
|
|
42622
42763
|
if (typeof block.id !== "string" && block.id !== null) {
|
|
@@ -42647,20 +42788,20 @@ function buildPageOutline(input) {
|
|
|
42647
42788
|
blocks: input.blocks.map(convertPageResponseBlock)
|
|
42648
42789
|
};
|
|
42649
42790
|
}
|
|
42650
|
-
function
|
|
42791
|
+
function isRecord12(value) {
|
|
42651
42792
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
42652
42793
|
}
|
|
42653
42794
|
function readContentRecord(value) {
|
|
42654
|
-
return
|
|
42795
|
+
return isRecord12(value) ? value : void 0;
|
|
42655
42796
|
}
|
|
42656
42797
|
function readNestedContentRecord(value) {
|
|
42657
|
-
if (!
|
|
42798
|
+
if (!isRecord12(value)) return null;
|
|
42658
42799
|
return readContentRecord(value.data) ?? null;
|
|
42659
42800
|
}
|
|
42660
42801
|
function sanitizeSdkRuntimeBlockContent(blockKind, content) {
|
|
42661
42802
|
if (blockKind !== "block.newsletter-signup") return content;
|
|
42662
42803
|
const sanitized = sanitizeNewsletterSignupPublicContent(content);
|
|
42663
|
-
return
|
|
42804
|
+
return isRecord12(sanitized) ? sanitized : {};
|
|
42664
42805
|
}
|
|
42665
42806
|
function sanitizeNullableSdkRuntimeBlockContent(blockKind, content) {
|
|
42666
42807
|
return content ? sanitizeSdkRuntimeBlockContent(blockKind, content) : null;
|