riverbankcms 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/acceptance/matrix.mjs +3 -3
- package/dist/cli/index.mjs +1043 -861
- package/dist/cli/init-docs/content/cli-reference.md +7 -1
- package/dist/cli/init-docs/content/content-management.md +7 -1
- package/dist/cli/init-docs/content/workflow-add-block.md +6 -0
- package/dist/cli/init-docs/content/workflow-create-page.md +6 -0
- package/dist/cli/init-docs/content/workflow-editor-workflows.md +2 -2
- package/dist/{eventUpsertInputSchema-BpS5YBiA.mjs → eventUpsertInputSchema-XM4oaNoq.mjs} +37 -85
- package/dist/load-config-CoGYSr5z.mjs +4 -0
- package/dist/{load-config-BhUqNoQL.mjs → load-config-DidU5HfW.mjs} +2 -2
- package/dist/{local-sync-CCfQzCgJ.mjs → local-sync-DQcLxBg3.mjs} +68 -26
- package/dist/{plan-DzYyb_iu.mjs → plan-mb_YslEh.mjs} +1 -1
- package/dist/scaffold/index.mjs +2 -2
- package/dist/{sdk-event-upsert-CuDl9Gk1.mjs → sdk-event-upsert-D48eLVOi.mjs} +18 -16
- package/dist/{src-9YtMip19.mjs → src-CxEAuQpf.mjs} +242 -14
- package/dist/testing.mjs +3 -3
- package/package.json +1 -1
- package/dist/load-config-BmF4zLjw.mjs +0 -4
package/dist/cli/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as getCuratedSiteStyle, $n as rgbColorValue, $t as themeButtonVariantClassNames, A as createBlockRef, An as stripStaleTransitionStyleGroup, Ar as offeringsPreviewCompositionTreatmentValues, At as INPUT_SPACING_MAP, B as createSiteCommandSiteRef, Bn as getTextColorForBackground, Br as oklchToHexGamut, Bt as resolvedButtonColourDeclarations, C as pagePathForCommand, Cn as boxBackgroundSchema, Cr as defineNoBlockDesignCapability, Ct as NAV_LINK_TEXT_SIZE_MAP, D as require_react, Dn as resolveTokenOrCssColorValue, Dr as headingDecorationColorTokenValues, Dt as navEffectPolicy, E as require_jsx_runtime, En as resolveThemeColorReferenceValue, Er as featureCardCompositionTreatmentValues, Et as navLinkOwnsUnderline, F as createEventSeriesRef, Fn as generateCardCoreCss, Fr as onColorTokenName, Ft as ACCORDION_TRIGGER_LETTER_SPACING, G as headerForegroundCandidates, Gn as backgroundAppearanceColorTokenNames, Gt as resolveContextualButtonRole, H as refSlug, Hn as cardRoleSchema, Ht as contextualButtonSurfaceResetStyles, I as createFooterRef, In as getDefaultCardVariants, Ir as ORDINARY_TEXT_MIN_CONTRAST_RATIO, It as ICON_CONFIG, J as readOpeningForegroundProjection, Jn as TokenResolver, Jt as generateBaseInteractiveCSS, K as headerLeafTextColor, Kn as backgroundAppearanceQuickColorTokenNames, Kt as generateDefaultButtonSystem, L as createFormRef, Ln as generateCardCss, Lr as contrastRatio, Lt as ICON_SIZE_PX, M as createCommandRef, Mn as mediaSchema, Mr as tileTreatmentValues, Mt as ACCORDION_OPEN_ACCENT_THICKNESS, N as createContentEntryRef, Nn as mediaTypeDiscriminants, Nr as visibleHeadingDecorationFamilyValues, Nt as ACCORDION_SPACING_MAP, O as pickShadeTowardBackground, On as pageDesignEditorBackgroundOverrideOwner, Or as introCompositionTreatmentValues, Ot as FONT_WEIGHT_MAP, P as createEventCategoryRef, Pn as persistableMediaSchema, Pr as isOnColorBackgroundCandidateToken, Pt as ACCORDION_TRIGGER_FONT_SCALE, Q as headerRootPaint, Qn as mergeStyles, Qt as themeButtonSizeClassName, R as createNavigationRef, Rn as renderCssDeclarations, Rr as featuresFromHex, Rt as generateButtonCss, S as pageIdentifierForCommand, Sn as boxBackgroundOverlaySchema, Sr as defineFrameCapability, St as NAV_LINK_PADDING_X_MAP, Tn as resolveOnColorForThemeToken, Tr as eyebrowTreatmentValues, Tt as navLinkOwnsHoverForeground, U as slugPart, Un as cardVariantRoleValues, Ut as contextualButtonSurfaceStyles, V as createVenueRef, Vn as generateShadowValue$1, Vr as __toESM, Vt as resolvedButtonFocusDeclarations, W as effectiveHeaderNavLinkStyle, Wn as normalizeCardRole, Wt as deriveButtonSurfaceContext, X as mergeHeaderNavTypographyPreference, Xn as borderColorStyle, Xt as parseThemeButtonVariantId, Y as getNavLinkPreset, Yn as backgroundColorStyle, Yt as generateInteractiveChildInheritanceCSS, Z as readHeaderNavFontSizePreference, Zn as cssVarValue, Zt as themeButtonExtraClassesWithTrailingIcon, _ as getSiteCommandMetadata, _n as composeBoundary, _r as asDesignBlockId, _t as parseBlockCustomCssRules, an as gradientToCss, ar as DEFAULT_SURFACE_TEXT_COLOR, at as BREAKPOINT_LG, b as entryIdentifierForCommand, bn as anglePolygonCss, br as assertNever$4, bt as NAV_LINK_LETTER_SPACING_MAP, c as isEventVisibility, cn as parseGradientPresetId, cr as surfaceForegroundStyle, ct as BREAKPOINT_XL, d as stableStringify, dn as VARIANT_ROLES, dr as parseBlockColorToken, dt as MQ_SM_DOWN, en as parseThemeForPersistence, er as textColorStyle, et as themeSchema, f as createDryRunReport, fn as buttonVariantIdSchema, fr as parseColorTokenParts, ft as MQ_SM_UP, g as evaluateSiteCommandExposure, gn as boundaryLayout, gt as getComponentShadowVar, h as evaluateSiteCommandBatchExposure, hr as defineBlockDesignMetadata, ht as getComponentBorderWidthPx, in as footerModeSchema, ir as resolveSurfaceForeground, it as renderHeaderPaintTargetRules, j as createBlocksRef, jn as mediaIdentifierSchema, jr as testimonialsCompositionTreatmentValues, jt as LABEL_FONT_SIZE_MAP, k as generateCssVars, kn as siteChromeBackgroundOverrideOwner, kr as makeBoundaryId, kt as INPUT_FONT_SIZE_MAP, l as venueManagementFields, lr as surfaceForegroundValue, lt as MQ_LG_UP, m as mapEventCommandContent, mr as defaultThemeTokens, mt as headerVariantValues, nn as formatButtonColourContractError, nr as selectLogoVariant, nt as generateMobileOverlayBackdropFilterFix, o as classifySdkEventBookingOffer, on as GRADIENT_PRESET_IDS, or as surfaceForegroundDeclarations, ot as BREAKPOINT_MD, p as parseAndPlanCommandBatchForTypes, pn as unsafeAsOpaqueButtonColourToken, pr as buildThemeTokens, pt as MQ_TABLET_ONLY, q as transparentHeaderForegroundInput, qn as parseBackgroundAppearanceColorToken, qt as generateEffectsCSS, rn as generateShadowValue, rr as surfaceToneFromForegroundToken, rt as getHeaderPaintTargets, sn as getGradientPreset, sr as surfaceForegroundInputFromResolved, st as BREAKPOINT_SM, t as classifySdkEventTiming, tn as compileButtonColourStates, tr as textColorValue, tt as generateHeaderScrollTreatmentStyles, u as sortRecord, un as PUBLIC_BUTTON_ROLES, ur as parseThemeColorToken, ut as MQ_MD_DOWN, v as blockIdentifierForCommand, vn as sectionFactsForContent, vt as parseCustomCssRules, w as hasConfiguredBookingVertical, wn as isCssColorLiteral, wr as eventListTreatmentValues, wt as navLinkHoverColorCandidate, x as pageIdentifierForBlockCommand, xn as transitionCatalogueEntries, xr as defineBlockDesignCapability, xt as NAV_LINK_PADDING_MAP, y as blockOrderIdentifiersForCommand, yn as boundaryRuntimeMetricsForDecorativeTransition, yt as NAV_LINK_BORDER_RADIUS_MAP, z as createPageRef, zn as expandPalette, zr as hexToRgb, zt as RESOLVED_BUTTON_DISABLED_DECLARATIONS } from "../sdk-event-upsert-
|
|
3
|
-
import { $ as parseEventPageSurfaceSubject, B as formatBookingDate, C as parseMailingListContentVersionId, D as sameMailingListPlacementTargeting, E as planMailingListChoicePresentation, G as getBookingLocalDateKey, H as formatBookingTime, I as normalizeLocationAddressText, K as getLocalScheduleDate, L as toLocationCoordinates, M as parseMailingListPlacementTargeting, O as DEFAULT_MAILING_LIST_SUCCESS_MESSAGE, Ot as unsafeAsMediaAssetId, P as assertAllowedPublicUrl, R as selectCategoryView, Rt as unsafeAsStaffMemberId, S as parseMailingListBlockId, St as unsafeAsDemoCapability, T as parseMailingListRuntimeContext, U as formatLocalScheduleDate, Ut as err, V as formatBookingDateParts, W as formatLocalScheduleTime, Wt as ok, X as toScheduledBookingDateRange, Y as toBookingTimeZone, Z as toScheduledBookingDateTime, _ as createSecret, _t as parseUserId, at as publicEventPricingType, c as DEFAULT_EVENT_TYPE_PRESETS, d as SURFACE_EVENT_PRESET_VALUES, dt as assertNever, et as formatBookingPriceDisplay, f as WHOLE_SERIES_EVENT_PRESET_VALUES, ft as parseApiKeyId, g as resolveWholeSeriesBookingPhase, gt as parseSiteId, h as orderedLiveRunSessions, ht as parsePageId, it as publicEventPricingDisplay, j as parseFooterCompositionV1, jt as unsafeAsPositiveByteCount, k as parseMailingListProviderScope, l as EVENT_PRESET_VALUES, m as CANCELLED_SESSION_STATUS, mt as parseMediaAssetId, n as NAVIGATION_LOCATIONS, nt as isPublicEventPricingOptionDisplayable, ot as resolveExactOrFreePriceDisplay, p as publicReadFreshnessSeconds, pt as parseEventSeriesId, q as getLocalScheduleTime, r as areConfiguredBookingVerticalConfigsEqual, rt as publicEventPricingCurrency, s as resolveSiteVerticalBookingConfig, st as resolvePricingOptionsPriceDisplay, t as resolveEventCatalogue, tt as formatEventPricing, ut as formatCurrencyAmount, v as exposeSecret, vt as unsafeAsAppointmentResourceId, w as parseMailingListSignedSourceToken, x as buildMailingListSignupBlockSourceRef, y as parseManagementKey, z as buildBookingUtcDateWindow } from "../src-
|
|
4
|
-
import { $ as sdkListEventsResponseSchema, A as resolveMediaTransformForAspect, B as asRecord$1, C as walkAndCollectImageAttrs, D as normalizeWidthCandidates, E as rotateNormalizedPoint, F as buildMediaIdentifierFromFilename, G as parseSafeDownloadFilename, H as FILE_SIZE_LIMITS, I as parseMediaIdentifier, J as createHttpClient, K as ManagementApiError, L as deriveVideoSlotPolicy, M as getDirectImageUrlForSiteScopedPath, N as getImageUrl, O as isExplicitRectCrop, P as isSiteScopedDirectImageStoragePath, Q as sdkGetEventResponseSchema, R as resolveVideoSelectionIntentForMediaField, S as buildRenderableMediaAssetIndex, St as sdkConfiguredBookingVerticalConfigSchema, T as looksLikeUuid$1, U as classifyKnownMimeType, V as parseRelativeStoragePath, W as managementMediaLibraryUploadLimitForMimeType, X as managementTransportError, Y as is404Error, Z as sdkConfigureBookingVerticalResponseSchema, _ as buildSettingsUpdateInput, _t as sdkSavePageDesignResponseSchema, a as prepareLocalMediaForPush, at as customLinkSchema$1, b as isMediaValue, bt as sdkListEventOccurrencesResponseSchema, c as writeBinaryFileAtomic, ct as internalLinkSchema, d as normalizeMediaValueToIdentifierOnly, dt as isInternalResolvedLinkValue, et as sdkTakeEventOfflineResponseSchema, f as walkLocalContentMedia, ft as isResolvedInternalLinkEntityType, g as SETTINGS_FILE_FIELDS, gt as sdkGetPageDesignResponseSchema, h as extractMediaIdentifiers, ht as portablePageDesignSchema, i as applyLocalMediaPush, it as RESOLVED_INTERNAL_LINK_ENTITY_TYPES, j as getDirectImageUrlForRelativePath, k as parseAspectRatioValue, l as sha256, lt as internalResolvedLinkSchema, m as downloadMedia, mt as pageLinkSchema$1, nt as sdkSettingsUpdateSchema, o as admitBinaryWriteDestination, ot as entryLinkSchema$1, p as buildStorageUrl, pt as linkSchema, q as buildRequestInfo, r as syncLocalMediaForPull, rt as linkPayloadSchema, s as readStableBinaryFile, st as externalLinkSchema$1, t as revalidateLocalMediaPushPlan, tt as sdkUpsertEventResponseSchema, u as normalizeMediaIdentifierInput, ut as internalRouteOnlyLinkSchema, v as hasOwnSettingsField, vt as sdkDeleteEventOccurrenceResponseSchema, w as deleteEnvSpecificKeys, x as attachRenderableMediaAssetFields, xt as sdkReorderResponseSchema, y as writeMediaManifest, yt as sdkEventOccurrenceResponseSchema, z as getMimeType } from "../local-sync-
|
|
5
|
-
import { n as CliSdkPeerError, r as CLI_VERSION, t as loadConfigFile } from "../load-config-
|
|
6
|
-
import { a as RichTextDocSchema, c as isRecord$
|
|
7
|
-
import { a as prepareScaffoldExecution, c as LOCAL_PACKAGE_VENDOR_DIR, d as loadGeneratedPackageRanges, i as preflightScaffoldTargets, n as createScaffoldCompletion, s as deriveScaffoldLocalManifest, t as deriveScaffoldPlan } from "../plan-
|
|
2
|
+
import { $ as getCuratedSiteStyle, $n as rgbColorValue, $t as themeButtonVariantClassNames, A as createBlockRef, An as stripStaleTransitionStyleGroup, Ar as offeringsPreviewCompositionTreatmentValues, At as INPUT_SPACING_MAP, B as createSiteCommandSiteRef, Bn as getTextColorForBackground, Br as oklchToHexGamut, Bt as resolvedButtonColourDeclarations, C as pagePathForCommand, Cn as boxBackgroundSchema, Cr as defineNoBlockDesignCapability, Ct as NAV_LINK_TEXT_SIZE_MAP, D as require_react, Dn as resolveTokenOrCssColorValue, Dr as headingDecorationColorTokenValues, Dt as navEffectPolicy, E as require_jsx_runtime, En as resolveThemeColorReferenceValue, Er as featureCardCompositionTreatmentValues, Et as navLinkOwnsUnderline, F as createEventSeriesRef, Fn as generateCardCoreCss, Fr as onColorTokenName, Ft as ACCORDION_TRIGGER_LETTER_SPACING, G as headerForegroundCandidates, Gn as backgroundAppearanceColorTokenNames, Gt as resolveContextualButtonRole, H as refSlug, Hn as cardRoleSchema, Ht as contextualButtonSurfaceResetStyles, I as createFooterRef, In as getDefaultCardVariants, Ir as ORDINARY_TEXT_MIN_CONTRAST_RATIO, It as ICON_CONFIG, J as readOpeningForegroundProjection, Jn as TokenResolver, Jt as generateBaseInteractiveCSS, K as headerLeafTextColor, Kn as backgroundAppearanceQuickColorTokenNames, Kt as generateDefaultButtonSystem, L as createFormRef, Ln as generateCardCss, Lr as contrastRatio, Lt as ICON_SIZE_PX, M as createCommandRef, Mn as mediaSchema, Mr as tileTreatmentValues, Mt as ACCORDION_OPEN_ACCENT_THICKNESS, N as createContentEntryRef, Nn as mediaTypeDiscriminants, Nr as visibleHeadingDecorationFamilyValues, Nt as ACCORDION_SPACING_MAP, O as pickShadeTowardBackground, On as pageDesignEditorBackgroundOverrideOwner, Or as introCompositionTreatmentValues, Ot as FONT_WEIGHT_MAP, P as createEventCategoryRef, Pn as persistableMediaSchema, Pr as isOnColorBackgroundCandidateToken, Pt as ACCORDION_TRIGGER_FONT_SCALE, Q as headerRootPaint, Qn as mergeStyles, Qt as themeButtonSizeClassName, R as createNavigationRef, Rn as renderCssDeclarations, Rr as featuresFromHex, Rt as generateButtonCss, S as pageIdentifierForCommand, Sn as boxBackgroundOverlaySchema, Sr as defineFrameCapability, St as NAV_LINK_PADDING_X_MAP, Tn as resolveOnColorForThemeToken, Tr as eyebrowTreatmentValues, Tt as navLinkOwnsHoverForeground, U as slugPart, Un as cardVariantRoleValues, Ut as contextualButtonSurfaceStyles, V as createVenueRef, Vn as generateShadowValue$1, Vr as __toESM, Vt as resolvedButtonFocusDeclarations, W as effectiveHeaderNavLinkStyle, Wn as normalizeCardRole, Wt as deriveButtonSurfaceContext, X as mergeHeaderNavTypographyPreference, Xn as borderColorStyle, Xt as parseThemeButtonVariantId, Y as getNavLinkPreset, Yn as backgroundColorStyle, Yt as generateInteractiveChildInheritanceCSS, Z as readHeaderNavFontSizePreference, Zn as cssVarValue, Zt as themeButtonExtraClassesWithTrailingIcon, _ as getSiteCommandMetadata, _n as composeBoundary, _r as asDesignBlockId, _t as parseBlockCustomCssRules, an as gradientToCss, ar as DEFAULT_SURFACE_TEXT_COLOR, at as BREAKPOINT_LG, b as entryIdentifierForCommand, bn as anglePolygonCss, br as assertNever$4, bt as NAV_LINK_LETTER_SPACING_MAP, c as isEventVisibility, cn as parseGradientPresetId, cr as surfaceForegroundStyle, ct as BREAKPOINT_XL, d as stableStringify, dn as VARIANT_ROLES, dr as parseBlockColorToken, dt as MQ_SM_DOWN, en as parseThemeForPersistence, er as textColorStyle, et as themeSchema, f as createDryRunReport, fn as buttonVariantIdSchema, fr as parseColorTokenParts, ft as MQ_SM_UP, g as evaluateSiteCommandExposure, gn as boundaryLayout, gt as getComponentShadowVar, h as evaluateSiteCommandBatchExposure, hr as defineBlockDesignMetadata, ht as getComponentBorderWidthPx, in as footerModeSchema, ir as resolveSurfaceForeground, it as renderHeaderPaintTargetRules, j as createBlocksRef, jn as mediaIdentifierSchema, jr as testimonialsCompositionTreatmentValues, jt as LABEL_FONT_SIZE_MAP, k as generateCssVars, kn as siteChromeBackgroundOverrideOwner, kr as makeBoundaryId, kt as INPUT_FONT_SIZE_MAP, l as venueManagementFields, lr as surfaceForegroundValue, lt as MQ_LG_UP, m as mapEventCommandContent, mr as defaultThemeTokens, mt as headerVariantValues, nn as formatButtonColourContractError, nr as selectLogoVariant, nt as generateMobileOverlayBackdropFilterFix, o as classifySdkEventBookingOffer, on as GRADIENT_PRESET_IDS, or as surfaceForegroundDeclarations, ot as BREAKPOINT_MD, p as parseAndPlanCommandBatchForTypes, pn as unsafeAsOpaqueButtonColourToken, pr as buildThemeTokens, pt as MQ_TABLET_ONLY, q as transparentHeaderForegroundInput, qn as parseBackgroundAppearanceColorToken, qt as generateEffectsCSS, rn as generateShadowValue, rr as surfaceToneFromForegroundToken, rt as getHeaderPaintTargets, sn as getGradientPreset, sr as surfaceForegroundInputFromResolved, st as BREAKPOINT_SM, t as classifySdkEventTiming, tn as compileButtonColourStates, tr as textColorValue, tt as generateHeaderScrollTreatmentStyles, u as sortRecord, un as PUBLIC_BUTTON_ROLES, ur as parseThemeColorToken, ut as MQ_MD_DOWN, v as blockIdentifierForCommand, vn as sectionFactsForContent, vt as parseCustomCssRules, w as hasConfiguredBookingVertical, wn as isCssColorLiteral, wr as eventListTreatmentValues, wt as navLinkHoverColorCandidate, x as pageIdentifierForBlockCommand, xn as transitionCatalogueEntries, xr as defineBlockDesignCapability, xt as NAV_LINK_PADDING_MAP, y as blockOrderIdentifiersForCommand, yn as boundaryRuntimeMetricsForDecorativeTransition, yt as NAV_LINK_BORDER_RADIUS_MAP, z as createPageRef, zn as expandPalette, zr as hexToRgb, zt as RESOLVED_BUTTON_DISABLED_DECLARATIONS } from "../sdk-event-upsert-D48eLVOi.mjs";
|
|
3
|
+
import { $ as parseEventPageSurfaceSubject, B as formatBookingDate, C as parseMailingListContentVersionId, D as sameMailingListPlacementTargeting, E as planMailingListChoicePresentation, G as getBookingLocalDateKey, H as formatBookingTime, I as normalizeLocationAddressText, K as getLocalScheduleDate, L as toLocationCoordinates, M as parseMailingListPlacementTargeting, O as DEFAULT_MAILING_LIST_SUCCESS_MESSAGE, Ot as unsafeAsMediaAssetId, P as assertAllowedPublicUrl, R as selectCategoryView, Rt as unsafeAsStaffMemberId, S as parseMailingListBlockId, St as unsafeAsDemoCapability, T as parseMailingListRuntimeContext, U as formatLocalScheduleDate, Ut as err, V as formatBookingDateParts, W as formatLocalScheduleTime, Wt as ok, X as toScheduledBookingDateRange, Y as toBookingTimeZone, Z as toScheduledBookingDateTime, _ as createSecret, _t as parseUserId, at as publicEventPricingType, c as DEFAULT_EVENT_TYPE_PRESETS, d as SURFACE_EVENT_PRESET_VALUES, dt as assertNever, et as formatBookingPriceDisplay, f as WHOLE_SERIES_EVENT_PRESET_VALUES, ft as parseApiKeyId, g as resolveWholeSeriesBookingPhase, gt as parseSiteId, h as orderedLiveRunSessions, ht as parsePageId, it as publicEventPricingDisplay, j as parseFooterCompositionV1, jt as unsafeAsPositiveByteCount, k as parseMailingListProviderScope, l as EVENT_PRESET_VALUES, m as CANCELLED_SESSION_STATUS, mt as parseMediaAssetId, n as NAVIGATION_LOCATIONS, nt as isPublicEventPricingOptionDisplayable, ot as resolveExactOrFreePriceDisplay, p as publicReadFreshnessSeconds, pt as parseEventSeriesId, q as getLocalScheduleTime, r as areConfiguredBookingVerticalConfigsEqual, rt as publicEventPricingCurrency, s as resolveSiteVerticalBookingConfig, st as resolvePricingOptionsPriceDisplay, t as resolveEventCatalogue, tt as formatEventPricing, ut as formatCurrencyAmount, v as exposeSecret, vt as unsafeAsAppointmentResourceId, w as parseMailingListSignedSourceToken, x as buildMailingListSignupBlockSourceRef, y as parseManagementKey, z as buildBookingUtcDateWindow } from "../src-CxEAuQpf.mjs";
|
|
4
|
+
import { $ as sdkListEventsResponseSchema, A as resolveMediaTransformForAspect, B as asRecord$1, C as walkAndCollectImageAttrs, D as normalizeWidthCandidates, E as rotateNormalizedPoint, F as buildMediaIdentifierFromFilename, G as parseSafeDownloadFilename, H as FILE_SIZE_LIMITS, I as parseMediaIdentifier, J as createHttpClient, K as ManagementApiError, L as deriveVideoSlotPolicy, M as getDirectImageUrlForSiteScopedPath, N as getImageUrl, O as isExplicitRectCrop, P as isSiteScopedDirectImageStoragePath, Q as sdkGetEventResponseSchema, R as resolveVideoSelectionIntentForMediaField, S as buildRenderableMediaAssetIndex, St as sdkConfiguredBookingVerticalConfigSchema, T as looksLikeUuid$1, U as classifyKnownMimeType, V as parseRelativeStoragePath, W as managementMediaLibraryUploadLimitForMimeType, X as managementTransportError, Y as is404Error, Z as sdkConfigureBookingVerticalResponseSchema, _ as buildSettingsUpdateInput, _t as sdkSavePageDesignResponseSchema, a as prepareLocalMediaForPush, at as customLinkSchema$1, b as isMediaValue, bt as sdkListEventOccurrencesResponseSchema, c as writeBinaryFileAtomic, ct as internalLinkSchema, d as normalizeMediaValueToIdentifierOnly, dt as isInternalResolvedLinkValue, et as sdkTakeEventOfflineResponseSchema, f as walkLocalContentMedia, ft as isResolvedInternalLinkEntityType, g as SETTINGS_FILE_FIELDS, gt as sdkGetPageDesignResponseSchema, h as extractMediaIdentifiers, ht as portablePageDesignSchema, i as applyLocalMediaPush, it as RESOLVED_INTERNAL_LINK_ENTITY_TYPES, j as getDirectImageUrlForRelativePath, k as parseAspectRatioValue, l as sha256, lt as internalResolvedLinkSchema, m as downloadMedia, mt as pageLinkSchema$1, nt as sdkSettingsUpdateSchema, o as admitBinaryWriteDestination, ot as entryLinkSchema$1, p as buildStorageUrl, pt as linkSchema, q as buildRequestInfo, r as syncLocalMediaForPull, rt as linkPayloadSchema, s as readStableBinaryFile, st as externalLinkSchema$1, t as revalidateLocalMediaPushPlan, tt as sdkUpsertEventResponseSchema, u as normalizeMediaIdentifierInput, ut as internalRouteOnlyLinkSchema, v as hasOwnSettingsField, vt as sdkDeleteEventOccurrenceResponseSchema, w as deleteEnvSpecificKeys, x as attachRenderableMediaAssetFields, xt as sdkReorderResponseSchema, y as writeMediaManifest, yt as sdkEventOccurrenceResponseSchema, z as getMimeType } from "../local-sync-DQcLxBg3.mjs";
|
|
5
|
+
import { n as CliSdkPeerError, r as CLI_VERSION, t as loadConfigFile } from "../load-config-DidU5HfW.mjs";
|
|
6
|
+
import { a as RichTextDocSchema, c as isRecord$16, i as findUnfilledSentinels, n as buildEntryScaffold, o as isRichTextDoc, r as validateEntryInstance, s as isObjectRecord, t as eventUpsertInputSchema } from "../eventUpsertInputSchema-XM4oaNoq.mjs";
|
|
7
|
+
import { a as prepareScaffoldExecution, c as LOCAL_PACKAGE_VENDOR_DIR, d as loadGeneratedPackageRanges, i as preflightScaffoldTargets, n as createScaffoldCompletion, s as deriveScaffoldLocalManifest, t as deriveScaffoldPlan } from "../plan-mb_YslEh.mjs";
|
|
8
8
|
import { config } from "dotenv";
|
|
9
9
|
import { Command, CommanderError } from "commander";
|
|
10
10
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
@@ -189,16 +189,16 @@ var BlockPatchStaleContentError = class extends ManagementApiError {
|
|
|
189
189
|
function isBlockPatchStaleContentError(error$1) {
|
|
190
190
|
return error$1 instanceof BlockPatchStaleContentError;
|
|
191
191
|
}
|
|
192
|
-
function isRecord$
|
|
192
|
+
function isRecord$36(value) {
|
|
193
193
|
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
194
194
|
}
|
|
195
195
|
function extractStaleContentCurrentHash(error$1) {
|
|
196
196
|
if (error$1.statusCode !== 409) return null;
|
|
197
|
-
if (!isRecord$
|
|
197
|
+
if (!isRecord$36(error$1.details)) return null;
|
|
198
198
|
const fieldErrors = error$1.details.fieldErrors;
|
|
199
199
|
if (!Array.isArray(fieldErrors)) return null;
|
|
200
200
|
for (const fieldError of fieldErrors) {
|
|
201
|
-
if (isRecord$
|
|
201
|
+
if (isRecord$36(fieldError) && fieldError.field === SDK_PATCH_STALE_CONTENT_FIELD && fieldError.code === SDK_PATCH_STALE_CONTENT_CODE && typeof fieldError.message === "string") {
|
|
202
202
|
return fieldError.message;
|
|
203
203
|
}
|
|
204
204
|
}
|
|
@@ -251,7 +251,7 @@ function createBlockOperations(http) {
|
|
|
251
251
|
}
|
|
252
252
|
},
|
|
253
253
|
async reorder(pageIdentifier, blockIdentifiers) {
|
|
254
|
-
|
|
254
|
+
return http.postValidated(`/pages/${encodeURIComponent(pageIdentifier)}/blocks/reorder`, sdkReorderResponseSchema, { identifiers: blockIdentifiers }, "write");
|
|
255
255
|
},
|
|
256
256
|
async delete(pageIdentifier, blockIdentifier$1) {
|
|
257
257
|
return http.delete(blockPath(pageIdentifier, blockIdentifier$1));
|
|
@@ -464,8 +464,8 @@ function createEventOccurrenceOperations(http) {
|
|
|
464
464
|
const result = await http.patchValidated(occurrencePath(eventIdentifier, runIdentifier, occurrenceId), sdkEventOccurrenceResponseSchema, input);
|
|
465
465
|
return result.occurrence;
|
|
466
466
|
},
|
|
467
|
-
async cancel(eventIdentifier, runIdentifier, occurrenceId) {
|
|
468
|
-
const result = await http.postValidated(`${occurrencePath(eventIdentifier, runIdentifier, occurrenceId)}/cancel`, sdkEventOccurrenceResponseSchema, undefined, "write");
|
|
467
|
+
async cancel(eventIdentifier, runIdentifier, occurrenceId, options) {
|
|
468
|
+
const result = await http.postValidated(`${occurrencePath(eventIdentifier, runIdentifier, occurrenceId)}/cancel`, sdkEventOccurrenceResponseSchema, options?.notifyAttendees === undefined ? undefined : { notifyAttendees: options.notifyAttendees }, "write");
|
|
469
469
|
return result.occurrence;
|
|
470
470
|
},
|
|
471
471
|
async delete(eventIdentifier, runIdentifier, occurrenceId) {
|
|
@@ -617,12 +617,12 @@ const productionMediaOperationsDeps = {
|
|
|
617
617
|
fetch
|
|
618
618
|
};
|
|
619
619
|
const DEFAULT_TRANSFER_TIMEOUT_MS = 10 * 60 * 1e3;
|
|
620
|
-
function transferRequestInfo(context, method, intent, path$
|
|
620
|
+
function transferRequestInfo(context, method, intent, path$4) {
|
|
621
621
|
return buildRequestInfo({
|
|
622
622
|
method,
|
|
623
623
|
intent,
|
|
624
|
-
path: path$
|
|
625
|
-
url: `${context.baseUrl}${path$
|
|
624
|
+
path: path$4,
|
|
625
|
+
url: `${context.baseUrl}${path$4}`,
|
|
626
626
|
baseUrl: context.baseUrl,
|
|
627
627
|
dashboardUrl: context.config.dashboardUrl,
|
|
628
628
|
siteId: context.config.siteId
|
|
@@ -679,9 +679,9 @@ function createMediaOperations(config$1, deps = productionMediaOperationsDeps) {
|
|
|
679
679
|
};
|
|
680
680
|
}
|
|
681
681
|
async function downloadMedia$1(context, identifier, maxBytes) {
|
|
682
|
-
const path$
|
|
683
|
-
const transfer = await context.http.get(path$
|
|
684
|
-
const requestInfo = transferRequestInfo(context, "GET", "read", path$
|
|
682
|
+
const path$4 = `/media/${encodeURIComponent(identifier)}/download`;
|
|
683
|
+
const transfer = await context.http.get(path$4);
|
|
684
|
+
const requestInfo = transferRequestInfo(context, "GET", "read", path$4);
|
|
685
685
|
const response = await getMediaFile(transfer.transferUrl, context.timeoutMs, requestInfo, context.fetch);
|
|
686
686
|
return {
|
|
687
687
|
data: await readBoundedResponseBody(response, maxBytes, {
|
|
@@ -4442,6 +4442,7 @@ const SDK_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
4442
4442
|
responseKind: "json",
|
|
4443
4443
|
errors: [
|
|
4444
4444
|
"resource:not_found",
|
|
4445
|
+
"validation:invalid_input",
|
|
4445
4446
|
"resource:conflict",
|
|
4446
4447
|
"server:internal_error"
|
|
4447
4448
|
]
|
|
@@ -4899,24 +4900,6 @@ const EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
4899
4900
|
"resource:conflict",
|
|
4900
4901
|
"server:internal_error"
|
|
4901
4902
|
]
|
|
4902
|
-
},
|
|
4903
|
-
saveEventPageWords: {
|
|
4904
|
-
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/words",
|
|
4905
|
-
method: "PUT",
|
|
4906
|
-
tags: [
|
|
4907
|
-
TAG_TEMPLATES.siteCollection,
|
|
4908
|
-
TAG_TEMPLATES.siteRoutableContent,
|
|
4909
|
-
TAG_TEMPLATES.pageSurfaceById
|
|
4910
|
-
],
|
|
4911
|
-
auth: "user",
|
|
4912
|
-
responseKind: "json",
|
|
4913
|
-
errors: [
|
|
4914
|
-
"auth:forbidden",
|
|
4915
|
-
"validation:invalid_input",
|
|
4916
|
-
"resource:not_found",
|
|
4917
|
-
"resource:conflict",
|
|
4918
|
-
"server:internal_error"
|
|
4919
|
-
]
|
|
4920
4903
|
}
|
|
4921
4904
|
});
|
|
4922
4905
|
|
|
@@ -5347,6 +5330,14 @@ const BILLING_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
5347
5330
|
auth: "user",
|
|
5348
5331
|
responseKind: "json"
|
|
5349
5332
|
},
|
|
5333
|
+
continueOnboardingOnFree: {
|
|
5334
|
+
path: "/onboarding/attempts/{attemptToken}/plan/free",
|
|
5335
|
+
method: "POST",
|
|
5336
|
+
tags: ["billing"],
|
|
5337
|
+
auth: "user",
|
|
5338
|
+
errors: [],
|
|
5339
|
+
responseKind: "json"
|
|
5340
|
+
},
|
|
5350
5341
|
createBillingPortalSession: {
|
|
5351
5342
|
path: "/billing/portal/session",
|
|
5352
5343
|
method: "POST",
|
|
@@ -5356,6 +5347,163 @@ const BILLING_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
5356
5347
|
}
|
|
5357
5348
|
});
|
|
5358
5349
|
|
|
5350
|
+
//#endregion
|
|
5351
|
+
//#region ../api/src/editLeaseEndpoints.ts
|
|
5352
|
+
const path$3 = "/sites/{siteId}/edit-leases/{nodeType}/{nodeId}";
|
|
5353
|
+
const lifecycleErrors = [
|
|
5354
|
+
"auth:lease_required",
|
|
5355
|
+
"auth:forbidden",
|
|
5356
|
+
"resource:not_found",
|
|
5357
|
+
"validation:invalid_input",
|
|
5358
|
+
"server:internal_error"
|
|
5359
|
+
];
|
|
5360
|
+
const EDIT_LEASE_ENDPOINT_DEFINITIONS = {
|
|
5361
|
+
readEditLease: {
|
|
5362
|
+
path: path$3,
|
|
5363
|
+
method: "GET",
|
|
5364
|
+
editLease: "lifecycle",
|
|
5365
|
+
errors: lifecycleErrors,
|
|
5366
|
+
auth: "user",
|
|
5367
|
+
responseKind: "json"
|
|
5368
|
+
},
|
|
5369
|
+
acquireEditLease: {
|
|
5370
|
+
path: path$3,
|
|
5371
|
+
method: "POST",
|
|
5372
|
+
editLease: "lifecycle",
|
|
5373
|
+
errors: lifecycleErrors,
|
|
5374
|
+
auth: "user",
|
|
5375
|
+
responseKind: "json"
|
|
5376
|
+
},
|
|
5377
|
+
takeOverEditLease: {
|
|
5378
|
+
path: path$3,
|
|
5379
|
+
method: "PUT",
|
|
5380
|
+
editLease: "lifecycle",
|
|
5381
|
+
errors: lifecycleErrors,
|
|
5382
|
+
auth: "user",
|
|
5383
|
+
responseKind: "json"
|
|
5384
|
+
},
|
|
5385
|
+
heartbeatEditLease: {
|
|
5386
|
+
path: path$3,
|
|
5387
|
+
method: "PATCH",
|
|
5388
|
+
editLease: "lifecycle",
|
|
5389
|
+
errors: [...lifecycleErrors, "auth:lease_lost"],
|
|
5390
|
+
auth: "user",
|
|
5391
|
+
responseKind: "json"
|
|
5392
|
+
},
|
|
5393
|
+
releaseEditLease: {
|
|
5394
|
+
path: path$3,
|
|
5395
|
+
method: "DELETE",
|
|
5396
|
+
editLease: "lifecycle",
|
|
5397
|
+
errors: lifecycleErrors,
|
|
5398
|
+
auth: "user",
|
|
5399
|
+
responseKind: "json"
|
|
5400
|
+
}
|
|
5401
|
+
};
|
|
5402
|
+
|
|
5403
|
+
//#endregion
|
|
5404
|
+
//#region ../api/src/pageSurfaceEditorEndpoints.ts
|
|
5405
|
+
const surfaceTags = [TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById];
|
|
5406
|
+
const PAGE_SURFACE_EDITOR_ENDPOINT_DEFINITIONS = {
|
|
5407
|
+
getPageSurfaceEditorDocument: {
|
|
5408
|
+
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/content",
|
|
5409
|
+
method: "GET",
|
|
5410
|
+
errors: [
|
|
5411
|
+
"auth:forbidden",
|
|
5412
|
+
"validation:invalid_input",
|
|
5413
|
+
"resource:not_found",
|
|
5414
|
+
"resource:conflict",
|
|
5415
|
+
"server:internal_error"
|
|
5416
|
+
],
|
|
5417
|
+
tags: surfaceTags,
|
|
5418
|
+
auth: "user",
|
|
5419
|
+
responseKind: "json"
|
|
5420
|
+
},
|
|
5421
|
+
updatePageSurfaceDraftContent: {
|
|
5422
|
+
editLease: "managed",
|
|
5423
|
+
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/content",
|
|
5424
|
+
method: "PUT",
|
|
5425
|
+
errors: [
|
|
5426
|
+
"validation:invalid_input",
|
|
5427
|
+
"resource:not_found",
|
|
5428
|
+
"resource:conflict",
|
|
5429
|
+
"server:internal_error"
|
|
5430
|
+
],
|
|
5431
|
+
tags: surfaceTags,
|
|
5432
|
+
auth: "user",
|
|
5433
|
+
responseKind: "json"
|
|
5434
|
+
},
|
|
5435
|
+
discardPageSurfaceDraftContent: {
|
|
5436
|
+
editLease: "managed",
|
|
5437
|
+
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/content/draft",
|
|
5438
|
+
method: "DELETE",
|
|
5439
|
+
errors: [
|
|
5440
|
+
"validation:invalid_input",
|
|
5441
|
+
"resource:not_found",
|
|
5442
|
+
"resource:conflict",
|
|
5443
|
+
"server:internal_error"
|
|
5444
|
+
],
|
|
5445
|
+
tags: surfaceTags,
|
|
5446
|
+
auth: "user",
|
|
5447
|
+
responseKind: "json"
|
|
5448
|
+
},
|
|
5449
|
+
updatePageSurfaceRouteMetadata: {
|
|
5450
|
+
editLease: "managed",
|
|
5451
|
+
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/metadata",
|
|
5452
|
+
method: "PATCH",
|
|
5453
|
+
errors: [
|
|
5454
|
+
"validation:invalid_input",
|
|
5455
|
+
"resource:not_found",
|
|
5456
|
+
"resource:conflict",
|
|
5457
|
+
"server:internal_error"
|
|
5458
|
+
],
|
|
5459
|
+
tags: [
|
|
5460
|
+
TAG_TEMPLATES.siteCollection,
|
|
5461
|
+
TAG_TEMPLATES.siteRoutableContent,
|
|
5462
|
+
TAG_TEMPLATES.pageSurfaceById
|
|
5463
|
+
],
|
|
5464
|
+
auth: "user",
|
|
5465
|
+
responseKind: "json"
|
|
5466
|
+
},
|
|
5467
|
+
publishPageSurface: {
|
|
5468
|
+
editLease: "managed",
|
|
5469
|
+
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/publication",
|
|
5470
|
+
method: "POST",
|
|
5471
|
+
errors: [
|
|
5472
|
+
"auth:forbidden",
|
|
5473
|
+
"validation:invalid_input",
|
|
5474
|
+
"resource:not_found",
|
|
5475
|
+
"resource:conflict",
|
|
5476
|
+
"server:internal_error"
|
|
5477
|
+
],
|
|
5478
|
+
tags: [
|
|
5479
|
+
TAG_TEMPLATES.siteCollection,
|
|
5480
|
+
TAG_TEMPLATES.siteRoutableContent,
|
|
5481
|
+
TAG_TEMPLATES.pageSurfaceById
|
|
5482
|
+
],
|
|
5483
|
+
auth: "user",
|
|
5484
|
+
responseKind: "json"
|
|
5485
|
+
},
|
|
5486
|
+
saveEventContentTab: {
|
|
5487
|
+
editLease: "managed",
|
|
5488
|
+
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/event-content",
|
|
5489
|
+
method: "PUT",
|
|
5490
|
+
errors: [
|
|
5491
|
+
"auth:forbidden",
|
|
5492
|
+
"validation:invalid_input",
|
|
5493
|
+
"resource:not_found",
|
|
5494
|
+
"resource:conflict",
|
|
5495
|
+
"server:internal_error"
|
|
5496
|
+
],
|
|
5497
|
+
tags: [
|
|
5498
|
+
TAG_TEMPLATES.siteCollection,
|
|
5499
|
+
TAG_TEMPLATES.siteRoutableContent,
|
|
5500
|
+
TAG_TEMPLATES.pageSurfaceById
|
|
5501
|
+
],
|
|
5502
|
+
auth: "user",
|
|
5503
|
+
responseKind: "json"
|
|
5504
|
+
}
|
|
5505
|
+
};
|
|
5506
|
+
|
|
5359
5507
|
//#endregion
|
|
5360
5508
|
//#region ../api/src/bookingPeopleEndpointDefinitions.ts
|
|
5361
5509
|
/**
|
|
@@ -5453,6 +5601,8 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
5453
5601
|
...GIFTING_ENDPOINT_DEFINITIONS,
|
|
5454
5602
|
...PUBLIC_READ_ENDPOINT_DEFINITIONS,
|
|
5455
5603
|
...BILLING_ENDPOINT_DEFINITIONS,
|
|
5604
|
+
...EDIT_LEASE_ENDPOINT_DEFINITIONS,
|
|
5605
|
+
...PAGE_SURFACE_EDITOR_ENDPOINT_DEFINITIONS,
|
|
5456
5606
|
...SITE_MANAGEMENT_ENDPOINT_DEFINITIONS,
|
|
5457
5607
|
aiContentUpdateChat: {
|
|
5458
5608
|
path: "/ai/content-update-chat",
|
|
@@ -5474,6 +5624,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
5474
5624
|
responseKind: "json"
|
|
5475
5625
|
},
|
|
5476
5626
|
aiDesignerPageOpsApply: {
|
|
5627
|
+
editLease: "managed",
|
|
5477
5628
|
path: "/sites/{siteId}/ai/designer/page/apply",
|
|
5478
5629
|
method: "POST",
|
|
5479
5630
|
tags: [TAG_TEMPLATES.siteCollection],
|
|
@@ -6308,6 +6459,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
6308
6459
|
responseKind: "json"
|
|
6309
6460
|
},
|
|
6310
6461
|
restoreContentEntryVersion: {
|
|
6462
|
+
editLease: "managed",
|
|
6311
6463
|
path: "/sites/{siteId}/content/{type}/{entryId}/versions/{versionId}/restore",
|
|
6312
6464
|
method: "POST",
|
|
6313
6465
|
errors: [
|
|
@@ -6325,6 +6477,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
6325
6477
|
responseKind: "json"
|
|
6326
6478
|
},
|
|
6327
6479
|
updateContentEntryContent: {
|
|
6480
|
+
editLease: "managed",
|
|
6328
6481
|
path: "/sites/{siteId}/content/{type}/{entryId}/content",
|
|
6329
6482
|
method: "PUT",
|
|
6330
6483
|
tags: [
|
|
@@ -6341,67 +6494,6 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
6341
6494
|
],
|
|
6342
6495
|
responseKind: "json"
|
|
6343
6496
|
},
|
|
6344
|
-
updatePageSurfaceDraftContent: {
|
|
6345
|
-
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/content",
|
|
6346
|
-
method: "PUT",
|
|
6347
|
-
errors: [
|
|
6348
|
-
"validation:invalid_input",
|
|
6349
|
-
"resource:not_found",
|
|
6350
|
-
"resource:conflict",
|
|
6351
|
-
"server:internal_error"
|
|
6352
|
-
],
|
|
6353
|
-
tags: [TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById],
|
|
6354
|
-
auth: "user",
|
|
6355
|
-
responseKind: "json"
|
|
6356
|
-
},
|
|
6357
|
-
discardPageSurfaceDraftContent: {
|
|
6358
|
-
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/content/draft",
|
|
6359
|
-
method: "DELETE",
|
|
6360
|
-
errors: [
|
|
6361
|
-
"validation:invalid_input",
|
|
6362
|
-
"resource:not_found",
|
|
6363
|
-
"resource:conflict",
|
|
6364
|
-
"server:internal_error"
|
|
6365
|
-
],
|
|
6366
|
-
tags: [TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById],
|
|
6367
|
-
auth: "user",
|
|
6368
|
-
responseKind: "json"
|
|
6369
|
-
},
|
|
6370
|
-
updatePageSurfaceRouteMetadata: {
|
|
6371
|
-
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/metadata",
|
|
6372
|
-
method: "PATCH",
|
|
6373
|
-
errors: [
|
|
6374
|
-
"validation:invalid_input",
|
|
6375
|
-
"resource:not_found",
|
|
6376
|
-
"resource:conflict",
|
|
6377
|
-
"server:internal_error"
|
|
6378
|
-
],
|
|
6379
|
-
tags: [
|
|
6380
|
-
TAG_TEMPLATES.siteCollection,
|
|
6381
|
-
TAG_TEMPLATES.siteRoutableContent,
|
|
6382
|
-
TAG_TEMPLATES.pageSurfaceById
|
|
6383
|
-
],
|
|
6384
|
-
auth: "user",
|
|
6385
|
-
responseKind: "json"
|
|
6386
|
-
},
|
|
6387
|
-
publishPageSurface: {
|
|
6388
|
-
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/publication",
|
|
6389
|
-
method: "POST",
|
|
6390
|
-
errors: [
|
|
6391
|
-
"auth:forbidden",
|
|
6392
|
-
"validation:invalid_input",
|
|
6393
|
-
"resource:not_found",
|
|
6394
|
-
"resource:conflict",
|
|
6395
|
-
"server:internal_error"
|
|
6396
|
-
],
|
|
6397
|
-
tags: [
|
|
6398
|
-
TAG_TEMPLATES.siteCollection,
|
|
6399
|
-
TAG_TEMPLATES.siteRoutableContent,
|
|
6400
|
-
TAG_TEMPLATES.pageSurfaceById
|
|
6401
|
-
],
|
|
6402
|
-
auth: "user",
|
|
6403
|
-
responseKind: "json"
|
|
6404
|
-
},
|
|
6405
6497
|
runSdkWorkflow: {
|
|
6406
6498
|
path: "/sites/{siteId}/content/{type}/{entryId}/workflows/{workflowId}/run",
|
|
6407
6499
|
method: "POST",
|
|
@@ -6438,6 +6530,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
6438
6530
|
responseKind: "json"
|
|
6439
6531
|
},
|
|
6440
6532
|
updateRouteMetadata: {
|
|
6533
|
+
editLease: "managed",
|
|
6441
6534
|
path: "/sites/{siteId}/routes/{routeId}/metadata",
|
|
6442
6535
|
method: "PATCH",
|
|
6443
6536
|
tags: [
|
|
@@ -6455,6 +6548,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
6455
6548
|
responseKind: "json"
|
|
6456
6549
|
},
|
|
6457
6550
|
publishContentEntry: {
|
|
6551
|
+
editLease: "managed",
|
|
6458
6552
|
path: "/sites/{siteId}/content/{type}/{entryId}/publish",
|
|
6459
6553
|
method: "POST",
|
|
6460
6554
|
tags: [
|
|
@@ -6466,6 +6560,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
6466
6560
|
responseKind: "json"
|
|
6467
6561
|
},
|
|
6468
6562
|
scheduleContentEntry: {
|
|
6563
|
+
editLease: "managed",
|
|
6469
6564
|
path: "/sites/{siteId}/content/{type}/{entryId}/schedule",
|
|
6470
6565
|
method: "POST",
|
|
6471
6566
|
tags: [
|
|
@@ -6483,6 +6578,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
6483
6578
|
responseKind: "json"
|
|
6484
6579
|
},
|
|
6485
6580
|
cancelScheduledContentEntry: {
|
|
6581
|
+
editLease: "managed",
|
|
6486
6582
|
path: "/sites/{siteId}/content/{type}/{entryId}/schedule",
|
|
6487
6583
|
method: "DELETE",
|
|
6488
6584
|
tags: [
|
|
@@ -6500,6 +6596,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
6500
6596
|
responseKind: "json"
|
|
6501
6597
|
},
|
|
6502
6598
|
discardContentEntry: {
|
|
6599
|
+
editLease: "managed",
|
|
6503
6600
|
path: "/sites/{siteId}/content/{type}/{entryId}/discard",
|
|
6504
6601
|
method: "POST",
|
|
6505
6602
|
tags: [
|
|
@@ -6518,6 +6615,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
6518
6615
|
responseKind: "json"
|
|
6519
6616
|
},
|
|
6520
6617
|
unpublishContentEntry: {
|
|
6618
|
+
editLease: "managed",
|
|
6521
6619
|
path: "/sites/{siteId}/content/{type}/{entryId}/unpublish",
|
|
6522
6620
|
method: "POST",
|
|
6523
6621
|
tags: [
|
|
@@ -6559,6 +6657,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
6559
6657
|
responseKind: "json"
|
|
6560
6658
|
},
|
|
6561
6659
|
deleteContentEntry: {
|
|
6660
|
+
editLease: "managed",
|
|
6562
6661
|
path: "/sites/{siteId}/content/{type}/{entryId}",
|
|
6563
6662
|
method: "DELETE",
|
|
6564
6663
|
tags: [
|
|
@@ -7768,6 +7867,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
7768
7867
|
responseKind: "json"
|
|
7769
7868
|
},
|
|
7770
7869
|
saveBlockContent: {
|
|
7870
|
+
editLease: "owner-derived",
|
|
7771
7871
|
path: "/blocks/{blockId}/content",
|
|
7772
7872
|
method: "POST",
|
|
7773
7873
|
tags: [
|
|
@@ -7805,6 +7905,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
7805
7905
|
errors: ["resource:not_found", "resource:conflict"]
|
|
7806
7906
|
},
|
|
7807
7907
|
createEntrySlotBlock: {
|
|
7908
|
+
editLease: "managed",
|
|
7808
7909
|
path: "/sites/{siteId}/content/{type}/{entryId}/slots/{slotKey}/blocks",
|
|
7809
7910
|
method: "POST",
|
|
7810
7911
|
tags: [
|
|
@@ -7822,6 +7923,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
7822
7923
|
]
|
|
7823
7924
|
},
|
|
7824
7925
|
reorderEntrySlotBlocks: {
|
|
7926
|
+
editLease: "managed",
|
|
7825
7927
|
path: "/sites/{siteId}/content/{type}/{entryId}/slots/{slotKey}/blocks/reorder",
|
|
7826
7928
|
method: "POST",
|
|
7827
7929
|
tags: [
|
|
@@ -7839,6 +7941,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
7839
7941
|
]
|
|
7840
7942
|
},
|
|
7841
7943
|
deleteEntrySlotBlock: {
|
|
7944
|
+
editLease: "managed",
|
|
7842
7945
|
path: "/sites/{siteId}/content/{type}/{entryId}/slots/{slotKey}/blocks/{blockId}",
|
|
7843
7946
|
method: "DELETE",
|
|
7844
7947
|
tags: [
|
|
@@ -7869,6 +7972,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
7869
7972
|
]
|
|
7870
7973
|
},
|
|
7871
7974
|
createPageSurfaceSlotBlock: {
|
|
7975
|
+
editLease: "managed",
|
|
7872
7976
|
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/slots/{slotKey}/blocks",
|
|
7873
7977
|
method: "POST",
|
|
7874
7978
|
tags: [
|
|
@@ -7887,6 +7991,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
7887
7991
|
]
|
|
7888
7992
|
},
|
|
7889
7993
|
reorderPageSurfaceSlotBlocks: {
|
|
7994
|
+
editLease: "managed",
|
|
7890
7995
|
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/slots/{slotKey}/blocks/reorder",
|
|
7891
7996
|
method: "POST",
|
|
7892
7997
|
tags: [
|
|
@@ -7905,6 +8010,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
7905
8010
|
]
|
|
7906
8011
|
},
|
|
7907
8012
|
deletePageSurfaceSlotBlock: {
|
|
8013
|
+
editLease: "managed",
|
|
7908
8014
|
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/slots/{slotKey}/blocks/{blockId}",
|
|
7909
8015
|
method: "DELETE",
|
|
7910
8016
|
tags: [
|
|
@@ -7922,6 +8028,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
7922
8028
|
]
|
|
7923
8029
|
},
|
|
7924
8030
|
createBlock: {
|
|
8031
|
+
editLease: "managed",
|
|
7925
8032
|
path: "/sites/{siteId}/pages/{pageId}/blocks",
|
|
7926
8033
|
method: "POST",
|
|
7927
8034
|
tags: [
|
|
@@ -7933,6 +8040,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
7933
8040
|
responseKind: "json"
|
|
7934
8041
|
},
|
|
7935
8042
|
reorderBlocks: {
|
|
8043
|
+
editLease: "managed",
|
|
7936
8044
|
path: "/sites/{siteId}/pages/{pageId}/blocks/reorder",
|
|
7937
8045
|
method: "POST",
|
|
7938
8046
|
tags: [
|
|
@@ -7944,6 +8052,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
7944
8052
|
responseKind: "json"
|
|
7945
8053
|
},
|
|
7946
8054
|
deleteBlock: {
|
|
8055
|
+
editLease: "managed",
|
|
7947
8056
|
path: "/sites/{siteId}/pages/{pageId}/blocks/{blockId}",
|
|
7948
8057
|
method: "DELETE",
|
|
7949
8058
|
tags: [
|
|
@@ -7989,6 +8098,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
7989
8098
|
responseKind: "json"
|
|
7990
8099
|
},
|
|
7991
8100
|
publishPageDraft: {
|
|
8101
|
+
editLease: "managed",
|
|
7992
8102
|
path: "/sites/{siteId}/pages/{pageId}/publish",
|
|
7993
8103
|
method: "POST",
|
|
7994
8104
|
tags: [TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById],
|
|
@@ -7996,6 +8106,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
7996
8106
|
responseKind: "json"
|
|
7997
8107
|
},
|
|
7998
8108
|
discardPageDraft: {
|
|
8109
|
+
editLease: "managed",
|
|
7999
8110
|
path: "/sites/{siteId}/pages/{pageId}/discard",
|
|
8000
8111
|
method: "POST",
|
|
8001
8112
|
tags: [TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById],
|
|
@@ -8011,6 +8122,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
8011
8122
|
errors: ["resource:not_found", "server:internal_error"]
|
|
8012
8123
|
},
|
|
8013
8124
|
savePageDesignState: {
|
|
8125
|
+
editLease: "managed",
|
|
8014
8126
|
path: "/sites/{siteId}/pages/{pageId}/design-state",
|
|
8015
8127
|
method: "POST",
|
|
8016
8128
|
tags: [TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById],
|
|
@@ -8040,6 +8152,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
8040
8152
|
responseKind: "json"
|
|
8041
8153
|
},
|
|
8042
8154
|
restorePageVersion: {
|
|
8155
|
+
editLease: "managed",
|
|
8043
8156
|
path: "/sites/{siteId}/pages/{pageId}/versions/{versionId}/restore",
|
|
8044
8157
|
method: "POST",
|
|
8045
8158
|
errors: [
|
|
@@ -8053,6 +8166,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
8053
8166
|
responseKind: "json"
|
|
8054
8167
|
},
|
|
8055
8168
|
applyPageDesignEditorAction: {
|
|
8169
|
+
editLease: "managed",
|
|
8056
8170
|
path: "/sites/{siteId}/pages/{pageId}/design/actions",
|
|
8057
8171
|
method: "POST",
|
|
8058
8172
|
tags: [TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById],
|
|
@@ -11139,9 +11253,9 @@ function getCmsApiUrl() {
|
|
|
11139
11253
|
}
|
|
11140
11254
|
throw new Error("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)");
|
|
11141
11255
|
}
|
|
11142
|
-
function getAbsoluteDashboardUrl(path$
|
|
11256
|
+
function getAbsoluteDashboardUrl(path$4, options) {
|
|
11143
11257
|
const base = getDashboardBaseUrl();
|
|
11144
|
-
const raw = (path$
|
|
11258
|
+
const raw = (path$4 ?? "").trim();
|
|
11145
11259
|
const cleaned = raw ? raw.replace(/^\/+/, "").replace(/^dashboard\/+/, "") : "";
|
|
11146
11260
|
const surfaceAwareBase = applySurfaceToBase(base, options);
|
|
11147
11261
|
return cleaned ? `${surfaceAwareBase}/dashboard/${cleaned}` : `${surfaceAwareBase}/dashboard`;
|
|
@@ -11191,6 +11305,8 @@ const API_ERROR_CODES = [
|
|
|
11191
11305
|
"auth:sudo_required",
|
|
11192
11306
|
"auth:insufficient_permissions",
|
|
11193
11307
|
"auth:impersonation_restricted",
|
|
11308
|
+
"auth:lease_required",
|
|
11309
|
+
"auth:lease_lost",
|
|
11194
11310
|
"validation:invalid_input",
|
|
11195
11311
|
"validation:missing_field",
|
|
11196
11312
|
"validation:invalid_format",
|
|
@@ -11221,20 +11337,20 @@ function isApiError(result) {
|
|
|
11221
11337
|
function isApiSuccess(result) {
|
|
11222
11338
|
return result.success === true;
|
|
11223
11339
|
}
|
|
11224
|
-
function isRecord$
|
|
11340
|
+
function isRecord$35(value) {
|
|
11225
11341
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
11226
11342
|
}
|
|
11227
11343
|
function isFieldError(value) {
|
|
11228
|
-
return isRecord$
|
|
11344
|
+
return isRecord$35(value) && typeof value.field === "string" && typeof value.code === "string" && typeof value.message === "string";
|
|
11229
11345
|
}
|
|
11230
11346
|
function fieldErrorsFromUnknown(value) {
|
|
11231
11347
|
if (!Array.isArray(value)) return null;
|
|
11232
11348
|
return value.every(isFieldError) ? value : null;
|
|
11233
11349
|
}
|
|
11234
11350
|
function extractEnvelopeErrorObject(body) {
|
|
11235
|
-
if (!isRecord$
|
|
11351
|
+
if (!isRecord$35(body)) return null;
|
|
11236
11352
|
const error$1 = body.error;
|
|
11237
|
-
if (!isRecord$
|
|
11353
|
+
if (!isRecord$35(error$1)) return null;
|
|
11238
11354
|
if ("success" in body && body.success !== false) {
|
|
11239
11355
|
return null;
|
|
11240
11356
|
}
|
|
@@ -11844,7 +11960,7 @@ const DEFAULT_CONFIG_PATH = "./riverbank.config.ts";
|
|
|
11844
11960
|
function formatPushConfigActionFailure() {
|
|
11845
11961
|
return "push-config failed";
|
|
11846
11962
|
}
|
|
11847
|
-
function isRecord$
|
|
11963
|
+
function isRecord$34(value) {
|
|
11848
11964
|
return typeof value === "object" && value !== null;
|
|
11849
11965
|
}
|
|
11850
11966
|
function parseErrorDetails(value) {
|
|
@@ -11852,10 +11968,10 @@ function parseErrorDetails(value) {
|
|
|
11852
11968
|
if (typeof value === "string") {
|
|
11853
11969
|
return { message: value };
|
|
11854
11970
|
}
|
|
11855
|
-
if (!isRecord$
|
|
11971
|
+
if (!isRecord$34(value)) return {};
|
|
11856
11972
|
const message = typeof value.message === "string" ? value.message : undefined;
|
|
11857
11973
|
const fieldErrorsRaw = value.fieldErrors;
|
|
11858
|
-
const fieldErrors = Array.isArray(fieldErrorsRaw) ? fieldErrorsRaw.filter(isRecord$
|
|
11974
|
+
const fieldErrors = Array.isArray(fieldErrorsRaw) ? fieldErrorsRaw.filter(isRecord$34).map((d) => ({
|
|
11859
11975
|
field: typeof d.field === "string" ? d.field : "",
|
|
11860
11976
|
message: typeof d.message === "string" ? d.message : ""
|
|
11861
11977
|
})).filter((d) => d.field.length > 0 && d.message.length > 0) : undefined;
|
|
@@ -11870,7 +11986,7 @@ function formatFieldErrors(fieldErrors) {
|
|
|
11870
11986
|
}
|
|
11871
11987
|
function getDashboardErrorMessage(responseJson, fallback) {
|
|
11872
11988
|
if (!responseJson) return fallback;
|
|
11873
|
-
if (isRecord$
|
|
11989
|
+
if (isRecord$34(responseJson) && "error" in responseJson) {
|
|
11874
11990
|
const parsed = parseErrorDetails(responseJson.error);
|
|
11875
11991
|
const msg = parsed.message ?? fallback;
|
|
11876
11992
|
return msg + formatFieldErrors(parsed.fieldErrors);
|
|
@@ -11883,12 +11999,12 @@ function getDashboardErrorMessage(responseJson, fallback) {
|
|
|
11883
11999
|
async function pushToDashboard(dashboardUrl, siteId, apiKey, config$1, options) {
|
|
11884
12000
|
const normalizedDashboardUrl = dashboardUrl.replace(/\/+$/, "");
|
|
11885
12001
|
const baseUrl = `${normalizedDashboardUrl}/api`;
|
|
11886
|
-
const path$
|
|
11887
|
-
const pushUrl = `${baseUrl}${path$
|
|
12002
|
+
const path$4 = `/sites/${siteId}/sdk-config`;
|
|
12003
|
+
const pushUrl = `${baseUrl}${path$4}`;
|
|
11888
12004
|
const requestInfo = {
|
|
11889
12005
|
method: "POST",
|
|
11890
12006
|
intent: "write",
|
|
11891
|
-
path: path$
|
|
12007
|
+
path: path$4,
|
|
11892
12008
|
url: pushUrl,
|
|
11893
12009
|
baseUrl,
|
|
11894
12010
|
dashboardUrl: normalizedDashboardUrl,
|
|
@@ -14130,14 +14246,14 @@ function buildDashboardTeamMemberNavPlan(ctx) {
|
|
|
14130
14246
|
}
|
|
14131
14247
|
return items;
|
|
14132
14248
|
}
|
|
14133
|
-
function isTeamMemberAccessiblePath(path$
|
|
14134
|
-
if (path$
|
|
14249
|
+
function isTeamMemberAccessiblePath(path$4, ownAppointmentResourceId) {
|
|
14250
|
+
if (path$4 === "bookings" || path$4 === "bookings/resources") {
|
|
14135
14251
|
return true;
|
|
14136
14252
|
}
|
|
14137
|
-
if (path$
|
|
14253
|
+
if (path$4 === "bookings/appointments" || path$4.startsWith("bookings/appointments/")) {
|
|
14138
14254
|
return true;
|
|
14139
14255
|
}
|
|
14140
|
-
if (ownAppointmentResourceId && path$
|
|
14256
|
+
if (ownAppointmentResourceId && path$4.startsWith(`bookings/resources/${ownAppointmentResourceId}`)) {
|
|
14141
14257
|
return true;
|
|
14142
14258
|
}
|
|
14143
14259
|
return false;
|
|
@@ -16117,27 +16233,27 @@ function scopePropValue(value, scope) {
|
|
|
16117
16233
|
}
|
|
16118
16234
|
return value;
|
|
16119
16235
|
}
|
|
16120
|
-
function scopeContentPath(path$
|
|
16236
|
+
function scopeContentPath(path$4, scope) {
|
|
16121
16237
|
if (!scope || scope.length === 0) {
|
|
16122
|
-
return path$
|
|
16238
|
+
return path$4;
|
|
16123
16239
|
}
|
|
16124
|
-
if (path$
|
|
16240
|
+
if (path$4 === "content") {
|
|
16125
16241
|
return `content.${scope}`;
|
|
16126
16242
|
}
|
|
16127
|
-
if (path$
|
|
16128
|
-
const remainder = path$
|
|
16243
|
+
if (path$4.startsWith("content.")) {
|
|
16244
|
+
const remainder = path$4.slice("content.".length);
|
|
16129
16245
|
return remainder.length > 0 ? `content.${scope}.${remainder}` : `content.${scope}`;
|
|
16130
16246
|
}
|
|
16131
|
-
if (path$
|
|
16132
|
-
return path$
|
|
16247
|
+
if (path$4.startsWith("content[")) {
|
|
16248
|
+
return path$4.replace(/^content/, `content.${scope}`);
|
|
16133
16249
|
}
|
|
16134
|
-
if (path$
|
|
16135
|
-
return path$
|
|
16250
|
+
if (path$4.startsWith("$root.")) {
|
|
16251
|
+
return path$4;
|
|
16136
16252
|
}
|
|
16137
|
-
if (path$
|
|
16138
|
-
return path$
|
|
16253
|
+
if (path$4.includes(".")) {
|
|
16254
|
+
return path$4;
|
|
16139
16255
|
}
|
|
16140
|
-
return `content.${scope}.${path$
|
|
16256
|
+
return `content.${scope}.${path$4}`;
|
|
16141
16257
|
}
|
|
16142
16258
|
|
|
16143
16259
|
//#endregion
|
|
@@ -16383,11 +16499,11 @@ function bind(from, options) {
|
|
|
16383
16499
|
}
|
|
16384
16500
|
});
|
|
16385
16501
|
}
|
|
16386
|
-
function when(path$
|
|
16502
|
+
function when(path$4, options) {
|
|
16387
16503
|
return (node) => ({
|
|
16388
16504
|
...node,
|
|
16389
16505
|
$when: {
|
|
16390
|
-
when: { from: path$
|
|
16506
|
+
when: { from: path$4 },
|
|
16391
16507
|
...options?.equals !== undefined ? { equals: options.equals } : {},
|
|
16392
16508
|
...options?.not ? { not: true } : {},
|
|
16393
16509
|
...options?.authoringPresence ? { authoringPresence: options.authoringPresence } : {}
|
|
@@ -16572,23 +16688,23 @@ const BACKGROUND_FRAME_BASE_CLASS = "rb-background-frame rb-absolute rb-inset-0
|
|
|
16572
16688
|
* ]
|
|
16573
16689
|
* )
|
|
16574
16690
|
*/
|
|
16575
|
-
function backgroundLayer(path$
|
|
16691
|
+
function backgroundLayer(path$4, options = {}) {
|
|
16576
16692
|
const { styleClassName = "background-style rb-absolute rb-inset-0 rb-z-neg-10 rb-h-full rb-w-full rb-pointer-events-none", imageClassName, overlayClassName = "background-overlay rb-absolute rb-inset-0 rb-z-neg-10 rb-h-full rb-w-full rb-pointer-events-none", fallbackToken, omitImageLayer = false, imageLoading, imageFetchPriority } = options;
|
|
16577
16693
|
const styleLayer = el("div", {
|
|
16578
16694
|
className: styleClassName,
|
|
16579
16695
|
style: { $bind: {
|
|
16580
|
-
from: path$
|
|
16696
|
+
from: path$4,
|
|
16581
16697
|
transforms: [{
|
|
16582
16698
|
id: "background.resolveStyle",
|
|
16583
16699
|
...typeof fallbackToken === "string" && fallbackToken.trim().length > 0 ? { options: { fallbackToken: fallbackToken.trim() } } : {}
|
|
16584
16700
|
}]
|
|
16585
16701
|
} }
|
|
16586
16702
|
});
|
|
16587
|
-
const imageLayer = createBackgroundImageNode(path$
|
|
16703
|
+
const imageLayer = createBackgroundImageNode(path$4, imageClassName, {
|
|
16588
16704
|
loading: imageLoading,
|
|
16589
16705
|
fetchPriority: imageFetchPriority
|
|
16590
16706
|
});
|
|
16591
|
-
const overlayLayer = createBackgroundOverlayNode(path$
|
|
16707
|
+
const overlayLayer = createBackgroundOverlayNode(path$4, overlayClassName);
|
|
16592
16708
|
return omitImageLayer ? [styleLayer, overlayLayer] : [
|
|
16593
16709
|
styleLayer,
|
|
16594
16710
|
imageLayer,
|
|
@@ -16603,7 +16719,7 @@ function backgroundLayer(path$3, options = {}) {
|
|
|
16603
16719
|
* Backgrounds that explicitly opt into overflow keep that behavior within
|
|
16604
16720
|
* the decorative layer rather than changing the content root.
|
|
16605
16721
|
*/
|
|
16606
|
-
function backgroundFrame(path$
|
|
16722
|
+
function backgroundFrame(path$4, options = {}) {
|
|
16607
16723
|
const { leadingNodes = [], ...layerOptions } = options;
|
|
16608
16724
|
const framedLayerOptions = {
|
|
16609
16725
|
...layerOptions,
|
|
@@ -16613,7 +16729,7 @@ function backgroundFrame(path$3, options = {}) {
|
|
|
16613
16729
|
};
|
|
16614
16730
|
return el("div", {
|
|
16615
16731
|
className: { $bind: {
|
|
16616
|
-
from: path$
|
|
16732
|
+
from: path$4,
|
|
16617
16733
|
transforms: [{
|
|
16618
16734
|
id: "background.resolveFrameClassName",
|
|
16619
16735
|
options: { baseClass: BACKGROUND_FRAME_BASE_CLASS }
|
|
@@ -16621,7 +16737,7 @@ function backgroundFrame(path$3, options = {}) {
|
|
|
16621
16737
|
fallback: `${BACKGROUND_FRAME_BASE_CLASS} rb-overflow-hidden`
|
|
16622
16738
|
} },
|
|
16623
16739
|
style: { borderRadius: "inherit" }
|
|
16624
|
-
}, [...leadingNodes, ...backgroundLayer(path$
|
|
16740
|
+
}, [...leadingNodes, ...backgroundLayer(path$4, framedLayerOptions)]);
|
|
16625
16741
|
}
|
|
16626
16742
|
/**
|
|
16627
16743
|
* Creates a media node for rendering background image/video media with conditional rendering.
|
|
@@ -16649,24 +16765,24 @@ function backgroundFrame(path$3, options = {}) {
|
|
|
16649
16765
|
* 'rb-absolute rb-inset-0 rb-h-full rb-w-full'
|
|
16650
16766
|
* )
|
|
16651
16767
|
*/
|
|
16652
|
-
function createBackgroundImageNode(path$
|
|
16653
|
-
const imagePath = `${path$
|
|
16768
|
+
function createBackgroundImageNode(path$4, baseClassName = "rb-absolute rb-z-neg-10", options = {}) {
|
|
16769
|
+
const imagePath = `${path$4}.image`;
|
|
16654
16770
|
return media({
|
|
16655
16771
|
className: { $bind: {
|
|
16656
|
-
from: path$
|
|
16772
|
+
from: path$4,
|
|
16657
16773
|
transforms: [{
|
|
16658
16774
|
id: "background.resolveImageClassName",
|
|
16659
16775
|
options: { baseClass: `background-image ${baseClassName}` }
|
|
16660
16776
|
}]
|
|
16661
16777
|
} },
|
|
16662
16778
|
style: { $bind: {
|
|
16663
|
-
from: path$
|
|
16779
|
+
from: path$4,
|
|
16664
16780
|
transforms: [{ id: "background.resolveImageStyle" }]
|
|
16665
16781
|
} },
|
|
16666
16782
|
videoPlayback: "background",
|
|
16667
16783
|
...options.loading ? { loading: options.loading } : {},
|
|
16668
16784
|
...options.fetchPriority ? { fetchPriority: options.fetchPriority } : {}
|
|
16669
|
-
}, when(imagePath), bind(path$
|
|
16785
|
+
}, when(imagePath), bind(path$4, { transforms: [{ id: "background.resolveMedia" }] }));
|
|
16670
16786
|
}
|
|
16671
16787
|
/**
|
|
16672
16788
|
* Creates a div node for rendering color/gradient overlays on background images.
|
|
@@ -16689,8 +16805,8 @@ function createBackgroundImageNode(path$3, baseClassName = "rb-absolute rb-z-neg
|
|
|
16689
16805
|
* // Standalone usage
|
|
16690
16806
|
* const overlayNode = createBackgroundOverlayNode('_sectionStyles.background')
|
|
16691
16807
|
*/
|
|
16692
|
-
function createBackgroundOverlayNode(path$
|
|
16693
|
-
const overlayPath = `${path$
|
|
16808
|
+
function createBackgroundOverlayNode(path$4, className = "background-overlay rb-absolute rb-inset-0 rb-z-neg-10 rb-h-full rb-w-full rb-pointer-events-none") {
|
|
16809
|
+
const overlayPath = `${path$4}.overlay`;
|
|
16694
16810
|
return el("div", {
|
|
16695
16811
|
className,
|
|
16696
16812
|
style: { $bind: {
|
|
@@ -16734,9 +16850,9 @@ function headingGroup(opts) {
|
|
|
16734
16850
|
|
|
16735
16851
|
//#endregion
|
|
16736
16852
|
//#region ../blocks/src/system/node/fragments/richCopy.ts
|
|
16737
|
-
function richCopy(path$
|
|
16853
|
+
function richCopy(path$4, className, ...mods) {
|
|
16738
16854
|
const props$1 = className ? { className } : {};
|
|
16739
|
-
return richText(props$1, when(path$
|
|
16855
|
+
return richText(props$1, when(path$4), bind(path$4), ...mods);
|
|
16740
16856
|
}
|
|
16741
16857
|
|
|
16742
16858
|
//#endregion
|
|
@@ -18876,10 +18992,10 @@ const boxStylesBorderColorTransform = {
|
|
|
18876
18992
|
return rgbColorValue(parsedFallback ?? "border");
|
|
18877
18993
|
}
|
|
18878
18994
|
};
|
|
18879
|
-
function readPath(source, path$
|
|
18880
|
-
if (!source || !path$
|
|
18881
|
-
if (!path$
|
|
18882
|
-
return path$
|
|
18995
|
+
function readPath(source, path$4) {
|
|
18996
|
+
if (!source || !path$4) return undefined;
|
|
18997
|
+
if (!path$4.includes(".")) return source[path$4];
|
|
18998
|
+
return path$4.split(".").reduce((acc, segment) => {
|
|
18883
18999
|
if (acc && typeof acc === "object" && segment in acc) {
|
|
18884
19000
|
return acc[segment];
|
|
18885
19001
|
}
|
|
@@ -21952,7 +22068,7 @@ const teamMemberFragment = defineFragment({
|
|
|
21952
22068
|
//#region ../blocks/src/system/data/linkedContentEntries.ts
|
|
21953
22069
|
const LINKED_CONTENT_ENTRY_META_KEY = "__rbLinkedContentEntry";
|
|
21954
22070
|
function coerceLinkedContentEntriesPayload(payload) {
|
|
21955
|
-
if (!isRecord$
|
|
22071
|
+
if (!isRecord$33(payload)) return payload;
|
|
21956
22072
|
const response = payload;
|
|
21957
22073
|
if (!Array.isArray(response.entries)) return payload;
|
|
21958
22074
|
const contentType = parsePublicContentTypeMeta(response.contentType);
|
|
@@ -21960,16 +22076,16 @@ function coerceLinkedContentEntriesPayload(payload) {
|
|
|
21960
22076
|
return response.entries.map((entry) => enrichLinkedContentEntry(entry, contentType));
|
|
21961
22077
|
}
|
|
21962
22078
|
function getLinkedContentEntryMeta(value) {
|
|
21963
|
-
if (!isRecord$
|
|
22079
|
+
if (!isRecord$33(value)) return null;
|
|
21964
22080
|
const candidate = value[LINKED_CONTENT_ENTRY_META_KEY];
|
|
21965
22081
|
return isLinkedContentEntryMeta(candidate) ? candidate : null;
|
|
21966
22082
|
}
|
|
21967
22083
|
function buildLinkedContentEditTarget(input) {
|
|
21968
22084
|
const { entry, sourceBlockId, sourceBlockKind, itemIndex } = input;
|
|
21969
|
-
if (!isRecord$
|
|
22085
|
+
if (!isRecord$33(entry)) return null;
|
|
21970
22086
|
const meta = getLinkedContentEntryMeta(entry);
|
|
21971
22087
|
if (!meta || meta.support.kind !== "supported") return null;
|
|
21972
|
-
const content = isRecord$
|
|
22088
|
+
const content = isRecord$33(entry.content) ? entry.content : {};
|
|
21973
22089
|
return {
|
|
21974
22090
|
kind: "linked-content-entry",
|
|
21975
22091
|
entryId: meta.entryId,
|
|
@@ -22043,12 +22159,12 @@ function resolveLinkedEntryInlineFieldEligibility(input) {
|
|
|
22043
22159
|
};
|
|
22044
22160
|
}
|
|
22045
22161
|
function enrichLinkedContentEntry(entry, contentType) {
|
|
22046
|
-
if (!isRecord$
|
|
22162
|
+
if (!isRecord$33(entry)) return entry;
|
|
22047
22163
|
const entryId = typeof entry.id === "string" ? entry.id : null;
|
|
22048
22164
|
if (!entryId) return entry;
|
|
22049
22165
|
const title = typeof entry.title === "string" && entry.title.trim().length > 0 ? entry.title : entryId;
|
|
22050
22166
|
const optimisticHash = typeof entry.optimisticHash === "string" && entry.optimisticHash.length > 0 ? entry.optimisticHash : null;
|
|
22051
|
-
const content = isRecord$
|
|
22167
|
+
const content = isRecord$33(entry.content) ? entry.content : {};
|
|
22052
22168
|
const meta = {
|
|
22053
22169
|
kind: "linked-content-entry",
|
|
22054
22170
|
entryId,
|
|
@@ -22157,7 +22273,7 @@ function capitalize(value) {
|
|
|
22157
22273
|
return value.charAt(0).toUpperCase() + value.slice(1).toLowerCase();
|
|
22158
22274
|
}
|
|
22159
22275
|
function parsePublicContentTypeMeta(value) {
|
|
22160
|
-
if (!isRecord$
|
|
22276
|
+
if (!isRecord$33(value)) return null;
|
|
22161
22277
|
if (typeof value.key !== "string" || value.key.trim().length === 0) return null;
|
|
22162
22278
|
return {
|
|
22163
22279
|
key: value.key,
|
|
@@ -22167,7 +22283,7 @@ function parsePublicContentTypeMeta(value) {
|
|
|
22167
22283
|
};
|
|
22168
22284
|
}
|
|
22169
22285
|
function parsePublicContentTypeLinkedEntryEditing(value) {
|
|
22170
|
-
if (!isRecord$
|
|
22286
|
+
if (!isRecord$33(value) || typeof value.kind !== "string") return null;
|
|
22171
22287
|
switch (value.kind) {
|
|
22172
22288
|
case "generic": return { kind: "generic" };
|
|
22173
22289
|
case "unsupported-domain-backed": return {
|
|
@@ -22178,7 +22294,7 @@ function parsePublicContentTypeLinkedEntryEditing(value) {
|
|
|
22178
22294
|
}
|
|
22179
22295
|
}
|
|
22180
22296
|
function parsePublicContentTypeFieldMeta(value) {
|
|
22181
|
-
if (!isRecord$
|
|
22297
|
+
if (!isRecord$33(value)) return [];
|
|
22182
22298
|
if (typeof value.id !== "string" || typeof value.type !== "string") return [];
|
|
22183
22299
|
return [{
|
|
22184
22300
|
id: value.id,
|
|
@@ -22193,14 +22309,14 @@ function parseStringArray(value) {
|
|
|
22193
22309
|
return value.filter((item) => typeof item === "string");
|
|
22194
22310
|
}
|
|
22195
22311
|
function isLinkedContentEntryMeta(value) {
|
|
22196
|
-
if (!isRecord$
|
|
22312
|
+
if (!isRecord$33(value)) return false;
|
|
22197
22313
|
if (value.kind !== "linked-content-entry") return false;
|
|
22198
22314
|
if (typeof value.entryId !== "string") return false;
|
|
22199
22315
|
if (typeof value.contentTypeKey !== "string") return false;
|
|
22200
22316
|
if (typeof value.contentTypeLabel !== "string") return false;
|
|
22201
22317
|
if (typeof value.title !== "string") return false;
|
|
22202
22318
|
if (!(value.optimisticHash === null || typeof value.optimisticHash === "string")) return false;
|
|
22203
|
-
if (!isRecord$
|
|
22319
|
+
if (!isRecord$33(value.contentType)) return false;
|
|
22204
22320
|
if (!isLinkedEntryFieldSourceArray(value.fieldSources)) return false;
|
|
22205
22321
|
return isLinkedContentEditSupport(value.support);
|
|
22206
22322
|
}
|
|
@@ -22208,7 +22324,7 @@ function isLinkedEntryFieldSourceArray(value) {
|
|
|
22208
22324
|
return Array.isArray(value) && value.every(isLinkedEntryFieldSource);
|
|
22209
22325
|
}
|
|
22210
22326
|
function isLinkedEntryFieldSource(value) {
|
|
22211
|
-
if (!isRecord$
|
|
22327
|
+
if (!isRecord$33(value)) return false;
|
|
22212
22328
|
if (typeof value.displayPath !== "string") return false;
|
|
22213
22329
|
switch (value.kind) {
|
|
22214
22330
|
case "content-field": return typeof value.fieldPath === "string" && (value.fieldType === "text" || value.fieldType === "richText");
|
|
@@ -22229,7 +22345,7 @@ function isLinkedEntryInlineFieldReadOnlyReason(value) {
|
|
|
22229
22345
|
}
|
|
22230
22346
|
}
|
|
22231
22347
|
function isLinkedContentEditSupport(value) {
|
|
22232
|
-
if (!isRecord$
|
|
22348
|
+
if (!isRecord$33(value) || typeof value.kind !== "string") return false;
|
|
22233
22349
|
switch (value.kind) {
|
|
22234
22350
|
case "supported": return true;
|
|
22235
22351
|
case "unsupported-domain-backed":
|
|
@@ -22238,7 +22354,7 @@ function isLinkedContentEditSupport(value) {
|
|
|
22238
22354
|
default: return false;
|
|
22239
22355
|
}
|
|
22240
22356
|
}
|
|
22241
|
-
function isRecord$
|
|
22357
|
+
function isRecord$33(value) {
|
|
22242
22358
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
22243
22359
|
}
|
|
22244
22360
|
function describeLinkedContentEditSupport(support) {
|
|
@@ -23806,9 +23922,9 @@ function maybeBuildSupabaseTransformUrl(inputUrl, options) {
|
|
|
23806
23922
|
const remainder = url.pathname.slice(idx + marker.length);
|
|
23807
23923
|
const parts = remainder.split("/").filter(Boolean);
|
|
23808
23924
|
const bucket = parts[0];
|
|
23809
|
-
const path$
|
|
23810
|
-
if (!bucket || !path$
|
|
23811
|
-
url.pathname = `/storage/v1/render/image/public/${bucket}/${path$
|
|
23925
|
+
const path$4 = parts.slice(1).join("/");
|
|
23926
|
+
if (!bucket || !path$4) return inputUrl;
|
|
23927
|
+
url.pathname = `/storage/v1/render/image/public/${bucket}/${path$4}`;
|
|
23812
23928
|
url.search = "";
|
|
23813
23929
|
if (width) url.searchParams.set("width", String(width));
|
|
23814
23930
|
if (height) url.searchParams.set("height", String(height));
|
|
@@ -24021,8 +24137,8 @@ const SECTION_BACKGROUND_MIN_SOURCE_HEIGHT = 900;
|
|
|
24021
24137
|
const TEAM_MEMBER_MIN_SOURCE_WIDTH = 1e3;
|
|
24022
24138
|
const DEFAULT_DELIVERY_MAX_WIDTH = 2560;
|
|
24023
24139
|
const DEFAULT_MARQUEE_IMAGE_PX = 256;
|
|
24024
|
-
function normalizeSlotPath(path$
|
|
24025
|
-
return path$
|
|
24140
|
+
function normalizeSlotPath(path$4) {
|
|
24141
|
+
return path$4.split(".").map((segment) => /^\d+$/.test(segment) ? "[]" : segment).join(".");
|
|
24026
24142
|
}
|
|
24027
24143
|
function asString(value) {
|
|
24028
24144
|
return typeof value === "string" && value.trim().length > 0 ? value.trim() : undefined;
|
|
@@ -24036,8 +24152,8 @@ function asPositiveIntArray(value) {
|
|
|
24036
24152
|
const numbers = value.map((entry) => asFiniteNumber(entry)).filter((entry) => entry !== undefined && entry > 0).map((entry) => Math.round(entry));
|
|
24037
24153
|
return numbers.length > 0 ? numbers : undefined;
|
|
24038
24154
|
}
|
|
24039
|
-
function getValueAtPath(values, path$
|
|
24040
|
-
const segments = path$
|
|
24155
|
+
function getValueAtPath(values, path$4) {
|
|
24156
|
+
const segments = path$4.split(".").filter((segment) => segment.length > 0);
|
|
24041
24157
|
let current = values;
|
|
24042
24158
|
for (const segment of segments) {
|
|
24043
24159
|
if (Array.isArray(current)) {
|
|
@@ -25772,7 +25888,7 @@ function resolveFallbackHref(link$2) {
|
|
|
25772
25888
|
return href.length > 0 ? href : null;
|
|
25773
25889
|
}
|
|
25774
25890
|
function isPlainRecord$1(value) {
|
|
25775
|
-
return isRecord$
|
|
25891
|
+
return isRecord$16(value);
|
|
25776
25892
|
}
|
|
25777
25893
|
|
|
25778
25894
|
//#endregion
|
|
@@ -25859,16 +25975,16 @@ const interpolateRichTextTokensOptionsSchema = z.object({ tokens: z.array(suppor
|
|
|
25859
25975
|
const richTextTokenPattern = /\{\{\s*([a-zA-Z0-9_]+)\s*\}\}/g;
|
|
25860
25976
|
function getSiteName(context) {
|
|
25861
25977
|
const viewModel = context.viewModel;
|
|
25862
|
-
if (!isRecord$
|
|
25978
|
+
if (!isRecord$16(viewModel)) return null;
|
|
25863
25979
|
const site = viewModel.site;
|
|
25864
|
-
if (isRecord$
|
|
25980
|
+
if (isRecord$16(site) && typeof site.title === "string") {
|
|
25865
25981
|
const title = site.title.trim();
|
|
25866
25982
|
return title.length > 0 ? title : null;
|
|
25867
25983
|
}
|
|
25868
25984
|
const root = viewModel.$root;
|
|
25869
|
-
if (isRecord$
|
|
25985
|
+
if (isRecord$16(root)) {
|
|
25870
25986
|
const rootSite = root.site;
|
|
25871
|
-
if (isRecord$
|
|
25987
|
+
if (isRecord$16(rootSite) && typeof rootSite.title === "string") {
|
|
25872
25988
|
const title = rootSite.title.trim();
|
|
25873
25989
|
if (title.length > 0) return title;
|
|
25874
25990
|
}
|
|
@@ -25890,7 +26006,7 @@ function replaceTokenText(input, allowedTokens, tokenValues) {
|
|
|
25890
26006
|
});
|
|
25891
26007
|
}
|
|
25892
26008
|
function visitRichTextNode(node, allowedTokens, tokenValues) {
|
|
25893
|
-
if (!isRecord$
|
|
26009
|
+
if (!isRecord$16(node)) return node;
|
|
25894
26010
|
let changed = false;
|
|
25895
26011
|
const nextNode = { ...node };
|
|
25896
26012
|
if (nextNode.type === "text" && typeof nextNode.text === "string") {
|
|
@@ -25912,7 +26028,7 @@ function visitRichTextNode(node, allowedTokens, tokenValues) {
|
|
|
25912
26028
|
return changed ? nextNode : node;
|
|
25913
26029
|
}
|
|
25914
26030
|
function interpolateRichTextTokens(value, options, context) {
|
|
25915
|
-
if (!isRecord$
|
|
26031
|
+
if (!isRecord$16(value)) return value;
|
|
25916
26032
|
const allowedTokens = new Set(options.tokens);
|
|
25917
26033
|
const tokenValues = {
|
|
25918
26034
|
year: String(new Date().getFullYear()),
|
|
@@ -27010,7 +27126,6 @@ const publicEventBaseSchema = z.object({
|
|
|
27010
27126
|
description: z.string().nullable(),
|
|
27011
27127
|
content: z.object({ body: RichTextDocSchema.nullable().optional() }).optional(),
|
|
27012
27128
|
presentation: z.object({
|
|
27013
|
-
cardTitleOverride: z.string().nullable().optional(),
|
|
27014
27129
|
summary: z.string().nullable().optional(),
|
|
27015
27130
|
image: mediaSchema.nullable().optional()
|
|
27016
27131
|
}).optional(),
|
|
@@ -27043,6 +27158,7 @@ const publicEventBaseSchema = z.object({
|
|
|
27043
27158
|
"archived"
|
|
27044
27159
|
]).optional(),
|
|
27045
27160
|
timeZone: z.string(),
|
|
27161
|
+
siteTimeZone: z.string().optional(),
|
|
27046
27162
|
pricing: publicEventPricingSchema,
|
|
27047
27163
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
27048
27164
|
cancellationPolicy: z.object({ refunds: z.object({
|
|
@@ -27716,10 +27832,10 @@ function safeAppPathOrFallback(value, fallback) {
|
|
|
27716
27832
|
const result = parseSafeAppPath(value);
|
|
27717
27833
|
return result.ok ? result.value : fallback;
|
|
27718
27834
|
}
|
|
27719
|
-
function buildSafeRedirectUrl(path$
|
|
27835
|
+
function buildSafeRedirectUrl(path$4, baseUrl) {
|
|
27720
27836
|
const base = baseUrl instanceof URL ? baseUrl : new URL(baseUrl);
|
|
27721
27837
|
const expectedOrigin = base.origin;
|
|
27722
|
-
const resolved = new URL(path$
|
|
27838
|
+
const resolved = new URL(path$4, expectedOrigin);
|
|
27723
27839
|
if (resolved.origin !== expectedOrigin) {
|
|
27724
27840
|
throw new Error("Safe app path resolved to an unexpected origin");
|
|
27725
27841
|
}
|
|
@@ -27759,11 +27875,11 @@ function assertSafePathSegments(segments) {
|
|
|
27759
27875
|
}
|
|
27760
27876
|
}
|
|
27761
27877
|
}
|
|
27762
|
-
function isRecord$
|
|
27878
|
+
function isRecord$32(value) {
|
|
27763
27879
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
27764
27880
|
}
|
|
27765
27881
|
function isPathContainer(value) {
|
|
27766
|
-
return Array.isArray(value) || isRecord$
|
|
27882
|
+
return Array.isArray(value) || isRecord$32(value);
|
|
27767
27883
|
}
|
|
27768
27884
|
function createPathContainer(nextIsIndex) {
|
|
27769
27885
|
return nextIsIndex ? [] : {};
|
|
@@ -27786,13 +27902,13 @@ function ensureContainerProperty(container, key, nextIsIndex) {
|
|
|
27786
27902
|
Reflect.set(container, key, nextContainer);
|
|
27787
27903
|
return nextContainer;
|
|
27788
27904
|
}
|
|
27789
|
-
function parsePath(path$
|
|
27790
|
-
if (Array.isArray(path$
|
|
27791
|
-
assertSafePathSegments(path$
|
|
27792
|
-
return path$
|
|
27905
|
+
function parsePath(path$4) {
|
|
27906
|
+
if (Array.isArray(path$4)) {
|
|
27907
|
+
assertSafePathSegments(path$4);
|
|
27908
|
+
return path$4;
|
|
27793
27909
|
}
|
|
27794
27910
|
const segments = [];
|
|
27795
|
-
const parts = path$
|
|
27911
|
+
const parts = path$4.split(PATH_SEPARATOR_REGEX$1);
|
|
27796
27912
|
for (const raw of parts) {
|
|
27797
27913
|
if (!raw) continue;
|
|
27798
27914
|
const baseMatch = raw.match(/^[^\[]+/);
|
|
@@ -27826,22 +27942,22 @@ function segmentsToPath$1(segments) {
|
|
|
27826
27942
|
if (!segments.length) return undefined;
|
|
27827
27943
|
return segments.map((s) => String(s)).join(".");
|
|
27828
27944
|
}
|
|
27829
|
-
function siblingPath(path$
|
|
27830
|
-
const segments = parsePath(path$
|
|
27945
|
+
function siblingPath(path$4, siblingFieldPath) {
|
|
27946
|
+
const segments = parsePath(path$4);
|
|
27831
27947
|
const siblingSegments = parsePath(siblingFieldPath);
|
|
27832
27948
|
const parentSegments = segments.slice(0, -1);
|
|
27833
27949
|
return segmentsToPath$1([...parentSegments, ...siblingSegments]) ?? siblingFieldPath;
|
|
27834
27950
|
}
|
|
27835
|
-
function getAtPath(source, path$
|
|
27836
|
-
const segments = parsePath(path$
|
|
27951
|
+
function getAtPath(source, path$4) {
|
|
27952
|
+
const segments = parsePath(path$4);
|
|
27837
27953
|
return segments.reduce((current, segment) => {
|
|
27838
27954
|
if (current === undefined || current === null) return undefined;
|
|
27839
27955
|
if (!isPathContainer(current)) return undefined;
|
|
27840
27956
|
return getContainerValue(current, segment);
|
|
27841
27957
|
}, source);
|
|
27842
27958
|
}
|
|
27843
|
-
function setAtPath(target, path$
|
|
27844
|
-
const segments = parsePath(path$
|
|
27959
|
+
function setAtPath(target, path$4, value) {
|
|
27960
|
+
const segments = parsePath(path$4);
|
|
27845
27961
|
let current = target;
|
|
27846
27962
|
for (let index = 0; index < segments.length; index += 1) {
|
|
27847
27963
|
const segment = segments[index];
|
|
@@ -27876,8 +27992,8 @@ function setAtPath(target, path$3, value) {
|
|
|
27876
27992
|
current = ensureContainerProperty(current, segment, nextIsIndex);
|
|
27877
27993
|
}
|
|
27878
27994
|
}
|
|
27879
|
-
function toAbsolutePath(base, path$
|
|
27880
|
-
const trimmed = path$
|
|
27995
|
+
function toAbsolutePath(base, path$4) {
|
|
27996
|
+
const trimmed = path$4.trim();
|
|
27881
27997
|
if (base == null || base.length === 0 || trimmed.startsWith("$root") || trimmed.startsWith("content.") || trimmed === "content") {
|
|
27882
27998
|
return trimmed;
|
|
27883
27999
|
}
|
|
@@ -28045,10 +28161,10 @@ function renderDoc(node, key, imageResolveContext, linkTarget) {
|
|
|
28045
28161
|
}
|
|
28046
28162
|
}
|
|
28047
28163
|
const DEFAULT_RICH_TEXT_CLASS = "rb-prose rb-max-w-none";
|
|
28048
|
-
function RichText$1({ as: Comp = "div", className, doc, path: path$
|
|
28164
|
+
function RichText$1({ as: Comp = "div", className, doc, path: path$4, linkTarget = "stored" }) {
|
|
28049
28165
|
const imageResolveContext = getCurrentResolveImageUrlContext() ?? null;
|
|
28050
28166
|
const content = doc ? renderDoc(doc, "doc", imageResolveContext, linkTarget) : null;
|
|
28051
|
-
const dataAttributes = path$
|
|
28167
|
+
const dataAttributes = path$4 ? { "data-builder-richtext": path$4 } : undefined;
|
|
28052
28168
|
const resolvedClassName = className?.trim() || DEFAULT_RICH_TEXT_CLASS;
|
|
28053
28169
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp, {
|
|
28054
28170
|
className: resolvedClassName,
|
|
@@ -28059,8 +28175,8 @@ function RichText$1({ as: Comp = "div", className, doc, path: path$3, linkTarget
|
|
|
28059
28175
|
|
|
28060
28176
|
//#endregion
|
|
28061
28177
|
//#region ../blocks/src/primitives/content/components/Text.tsx
|
|
28062
|
-
function Text$1({ as: Comp = "span", children, className = "", path: path$
|
|
28063
|
-
const dataAttributes = path$
|
|
28178
|
+
function Text$1({ as: Comp = "span", children, className = "", path: path$4, maxLength: _maxLength }) {
|
|
28179
|
+
const dataAttributes = path$4 ? { "data-builder-text": path$4 } : undefined;
|
|
28064
28180
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp, {
|
|
28065
28181
|
className,
|
|
28066
28182
|
...dataAttributes,
|
|
@@ -29504,8 +29620,8 @@ function textNodeContent(value) {
|
|
|
29504
29620
|
if (typeof value === "string" || typeof value === "number") return value;
|
|
29505
29621
|
return null;
|
|
29506
29622
|
}
|
|
29507
|
-
function readStringPath(source, path$
|
|
29508
|
-
const value = getAtPath(source, path$
|
|
29623
|
+
function readStringPath(source, path$4) {
|
|
29624
|
+
const value = getAtPath(source, path$4);
|
|
29509
29625
|
return typeof value === "string" ? value : null;
|
|
29510
29626
|
}
|
|
29511
29627
|
const RichTextNode = ({ value, blockKind, ...rest }) => {
|
|
@@ -29625,7 +29741,7 @@ function parseApprovedIconExampleSetId(value) {
|
|
|
29625
29741
|
//#endregion
|
|
29626
29742
|
//#region ../blocks/src/system/icons/value.ts
|
|
29627
29743
|
const NO_BLOCK_ICON_VALUE = { kind: "none" };
|
|
29628
|
-
function isRecord$
|
|
29744
|
+
function isRecord$31(value) {
|
|
29629
29745
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
29630
29746
|
}
|
|
29631
29747
|
function parseBlockIconValue(value) {
|
|
@@ -29635,7 +29751,7 @@ function parseBlockIconValue(value) {
|
|
|
29635
29751
|
iconId: value
|
|
29636
29752
|
};
|
|
29637
29753
|
}
|
|
29638
|
-
if (!isRecord$
|
|
29754
|
+
if (!isRecord$31(value)) {
|
|
29639
29755
|
return NO_BLOCK_ICON_VALUE;
|
|
29640
29756
|
}
|
|
29641
29757
|
switch (value.kind) {
|
|
@@ -29728,7 +29844,7 @@ function buildGeneratedBlockIconRenderAssetLookupFromUnknown(value) {
|
|
|
29728
29844
|
}
|
|
29729
29845
|
const inputs = [];
|
|
29730
29846
|
for (const [index, item] of value.entries()) {
|
|
29731
|
-
if (!isRecord$
|
|
29847
|
+
if (!isRecord$31(item)) {
|
|
29732
29848
|
return {
|
|
29733
29849
|
kind: "invalid_asset_entry",
|
|
29734
29850
|
index,
|
|
@@ -29796,7 +29912,7 @@ function resolveBlockIconRenderValue(value, generatedAssets = new Map()) {
|
|
|
29796
29912
|
}
|
|
29797
29913
|
}
|
|
29798
29914
|
function getGeneratedBlockIconStyleState(value, currentStyleGuideVersionId) {
|
|
29799
|
-
if (isRecord$
|
|
29915
|
+
if (isRecord$31(value) && value.kind === "generated" && parseBlockIconValue(value).kind !== "generated") {
|
|
29800
29916
|
return { kind: "invalid_generated" };
|
|
29801
29917
|
}
|
|
29802
29918
|
const parsed = parseBlockIconValue(value);
|
|
@@ -29882,11 +29998,11 @@ function resolveFeatureCardGeneratedIconSizePx(value) {
|
|
|
29882
29998
|
const parsed = parseFeatureCardGeneratedIconSizePx(value);
|
|
29883
29999
|
return parsed.ok ? parsed.value : unsafeAsFeatureCardGeneratedIconSizePx(FEATURE_CARD_GENERATED_ICON_SIZE_PX.default);
|
|
29884
30000
|
}
|
|
29885
|
-
function isRecord$
|
|
30001
|
+
function isRecord$30(value) {
|
|
29886
30002
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
29887
30003
|
}
|
|
29888
30004
|
function toPlainTextFromTipTap(value) {
|
|
29889
|
-
if (!isRecord$
|
|
30005
|
+
if (!isRecord$30(value)) return "";
|
|
29890
30006
|
if (typeof value.text === "string") return value.text;
|
|
29891
30007
|
const content = value.content;
|
|
29892
30008
|
if (!Array.isArray(content)) return "";
|
|
@@ -29943,7 +30059,7 @@ function suggestSemanticIconForFeatureCard(card) {
|
|
|
29943
30059
|
|
|
29944
30060
|
//#endregion
|
|
29945
30061
|
//#region ../blocks/src/system/icons/generatedAssets.ts
|
|
29946
|
-
function isRecord$
|
|
30062
|
+
function isRecord$29(value) {
|
|
29947
30063
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
29948
30064
|
}
|
|
29949
30065
|
function generatedIconAssetRefKey(ref) {
|
|
@@ -29953,11 +30069,11 @@ function collectGeneratedIconAssetRefs(page) {
|
|
|
29953
30069
|
const blocks = [];
|
|
29954
30070
|
for (const block of page.blocks) {
|
|
29955
30071
|
if (block.kind !== "block.feature-cards" || typeof block.id !== "string") continue;
|
|
29956
|
-
const content = isRecord$
|
|
30072
|
+
const content = isRecord$29(block.draftContent) ? block.draftContent : isRecord$29(block.content) ? block.content : null;
|
|
29957
30073
|
const cards = Array.isArray(content?.cards) ? content.cards : [];
|
|
29958
30074
|
const refs = new Map();
|
|
29959
30075
|
for (const card of cards) {
|
|
29960
|
-
if (!isRecord$
|
|
30076
|
+
if (!isRecord$29(card)) continue;
|
|
29961
30077
|
const icon$1 = parseBlockIconValue(card.icon);
|
|
29962
30078
|
if (icon$1.kind !== "generated") continue;
|
|
29963
30079
|
const ref = {
|
|
@@ -31362,8 +31478,8 @@ function decodeFailure(issues) {
|
|
|
31362
31478
|
function isDecodeSuccess(result) {
|
|
31363
31479
|
return result.ok;
|
|
31364
31480
|
}
|
|
31365
|
-
function zodIssuePath(path$
|
|
31366
|
-
return path$
|
|
31481
|
+
function zodIssuePath(path$4) {
|
|
31482
|
+
return path$4.flatMap((segment) => {
|
|
31367
31483
|
if (typeof segment === "string" || typeof segment === "number") {
|
|
31368
31484
|
return [segment];
|
|
31369
31485
|
}
|
|
@@ -33262,7 +33378,7 @@ function getWizardLocalStorage() {
|
|
|
33262
33378
|
}
|
|
33263
33379
|
}
|
|
33264
33380
|
function parseEnvelope(raw, config$1) {
|
|
33265
|
-
if (!isRecord$
|
|
33381
|
+
if (!isRecord$28(raw)) return {
|
|
33266
33382
|
kind: "removed_invalid",
|
|
33267
33383
|
reason: "invalid_envelope"
|
|
33268
33384
|
};
|
|
@@ -33351,7 +33467,7 @@ function createWizardDraftStorage(config$1) {
|
|
|
33351
33467
|
}
|
|
33352
33468
|
};
|
|
33353
33469
|
}
|
|
33354
|
-
function isRecord$
|
|
33470
|
+
function isRecord$28(value) {
|
|
33355
33471
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
33356
33472
|
}
|
|
33357
33473
|
function deepEqualJsonValue(left, right) {
|
|
@@ -33361,8 +33477,8 @@ function deepEqualJsonValue(left, right) {
|
|
|
33361
33477
|
if (left.length !== right.length) return false;
|
|
33362
33478
|
return left.every((item, index) => deepEqualJsonValue(item, right[index]));
|
|
33363
33479
|
}
|
|
33364
|
-
if (isRecord$
|
|
33365
|
-
if (!isRecord$
|
|
33480
|
+
if (isRecord$28(left) || isRecord$28(right)) {
|
|
33481
|
+
if (!isRecord$28(left) || !isRecord$28(right)) return false;
|
|
33366
33482
|
const leftKeys = Object.keys(left).sort();
|
|
33367
33483
|
if (!deepEqualJsonValue(leftKeys, Object.keys(right).sort())) return false;
|
|
33368
33484
|
return leftKeys.every((key) => deepEqualJsonValue(left[key], right[key]));
|
|
@@ -33408,18 +33524,6 @@ function isNavActionVisible(action) {
|
|
|
33408
33524
|
function assertNever$2$1(value) {
|
|
33409
33525
|
throw new Error(`Unexpected wizard navigation action: ${String(value)}`);
|
|
33410
33526
|
}
|
|
33411
|
-
function clampStepValue(value, total) {
|
|
33412
|
-
if (!Number.isFinite(value)) return 0;
|
|
33413
|
-
if (total <= 0) return 0;
|
|
33414
|
-
return Math.min(Math.max(Math.trunc(value), 0), total);
|
|
33415
|
-
}
|
|
33416
|
-
function resolveWizardProgressState(current, total) {
|
|
33417
|
-
const currentValue = clampStepValue(current, total);
|
|
33418
|
-
return {
|
|
33419
|
-
currentValue,
|
|
33420
|
-
percent: total <= 0 ? 0 : Math.round(currentValue / total * 100)
|
|
33421
|
-
};
|
|
33422
|
-
}
|
|
33423
33527
|
const DEFAULT_VISIBLE = { kind: "visible" };
|
|
33424
33528
|
const DEFAULT_REQUIRED = { kind: "required" };
|
|
33425
33529
|
const DEFAULT_VALID = { kind: "valid" };
|
|
@@ -33734,7 +33838,7 @@ function resolveAppointmentCheckoutVerificationState(input) {
|
|
|
33734
33838
|
tag: "timeout",
|
|
33735
33839
|
sessionId: input.config.sessionId,
|
|
33736
33840
|
appointmentId,
|
|
33737
|
-
message: "
|
|
33841
|
+
message: "We’re still confirming your payment. This can take a minute – you can check again, and you won’t be charged twice."
|
|
33738
33842
|
};
|
|
33739
33843
|
}
|
|
33740
33844
|
if (input.pollingStatus === "failed") {
|
|
@@ -33811,7 +33915,7 @@ function deriveBookingFormViewState(input) {
|
|
|
33811
33915
|
message: input.verificationState.message
|
|
33812
33916
|
};
|
|
33813
33917
|
case "timeout": return {
|
|
33814
|
-
kind: "
|
|
33918
|
+
kind: "timeout",
|
|
33815
33919
|
message: input.verificationState.message
|
|
33816
33920
|
};
|
|
33817
33921
|
case "confirmed": return {
|
|
@@ -33825,12 +33929,12 @@ function resolveBookingSiteId(siteId, form$1) {
|
|
|
33825
33929
|
return siteId || form$1?.siteId || "";
|
|
33826
33930
|
}
|
|
33827
33931
|
function normalizeBookingFormConfig(form$1) {
|
|
33828
|
-
if (!isRecord$
|
|
33932
|
+
if (!isRecord$27(form$1)) return null;
|
|
33829
33933
|
const id = readNonEmptyString(form$1.id);
|
|
33830
33934
|
const name = readNonEmptyString(form$1.name);
|
|
33831
33935
|
if (!id || !name) return null;
|
|
33832
|
-
const schemaSource = isRecord$
|
|
33833
|
-
const settingsSource = isRecord$
|
|
33936
|
+
const schemaSource = isRecord$27(form$1.schema) ? form$1.schema : isRecord$27(form$1.schemaJson) ? form$1.schemaJson : null;
|
|
33937
|
+
const settingsSource = isRecord$27(form$1.settings) ? form$1.settings : isRecord$27(form$1.settingsJson) ? form$1.settingsJson : null;
|
|
33834
33938
|
return {
|
|
33835
33939
|
id,
|
|
33836
33940
|
name,
|
|
@@ -33854,10 +33958,10 @@ function normalizeBookingServices(services) {
|
|
|
33854
33958
|
if (Array.isArray(services)) {
|
|
33855
33959
|
return services.filter(isBookingFormService).map(normalizeService);
|
|
33856
33960
|
}
|
|
33857
|
-
if (isRecord$
|
|
33961
|
+
if (isRecord$27(services) && "services" in services) {
|
|
33858
33962
|
return Array.isArray(services.services) ? services.services.filter(isBookingFormService).map(normalizeService) : [];
|
|
33859
33963
|
}
|
|
33860
|
-
return isRecord$
|
|
33964
|
+
return isRecord$27(services) ? Object.values(services).filter(isBookingFormService).map(normalizeService) : [];
|
|
33861
33965
|
}
|
|
33862
33966
|
function normalizeBookingSchema(value) {
|
|
33863
33967
|
if (!value) return undefined;
|
|
@@ -33869,7 +33973,7 @@ function normalizeBookingSchema(value) {
|
|
|
33869
33973
|
};
|
|
33870
33974
|
}
|
|
33871
33975
|
function readBookingFormField(value) {
|
|
33872
|
-
if (!isRecord$
|
|
33976
|
+
if (!isRecord$27(value)) return null;
|
|
33873
33977
|
const id = readNonEmptyString(value.id);
|
|
33874
33978
|
const label = readNonEmptyString(value.label);
|
|
33875
33979
|
const type = readBookingFieldType(value.type);
|
|
@@ -33912,7 +34016,7 @@ function readBookingFieldOptions(value) {
|
|
|
33912
34016
|
return options.length > 0 ? options : undefined;
|
|
33913
34017
|
}
|
|
33914
34018
|
function readBookingFieldOption(value) {
|
|
33915
|
-
if (!isRecord$
|
|
34019
|
+
if (!isRecord$27(value)) return null;
|
|
33916
34020
|
const optionValue = readNonEmptyString(value.value);
|
|
33917
34021
|
const label = readNonEmptyString(value.label);
|
|
33918
34022
|
return optionValue && label ? {
|
|
@@ -33932,7 +34036,7 @@ function normalizeBookingSettings(value) {
|
|
|
33932
34036
|
};
|
|
33933
34037
|
}
|
|
33934
34038
|
function isBookingFormService(value) {
|
|
33935
|
-
return isRecord$
|
|
34039
|
+
return isRecord$27(value) && typeof value.id === "string" && typeof value.siteId === "string" && typeof value.title === "string" && (value.consent === undefined || blockBookingConsentSchema.safeParse(value.consent).success);
|
|
33936
34040
|
}
|
|
33937
34041
|
function collectBookingCustomFields(data) {
|
|
33938
34042
|
const customFields = {};
|
|
@@ -33988,7 +34092,7 @@ function readStringArray(value) {
|
|
|
33988
34092
|
const strings = value.filter((item) => typeof item === "string");
|
|
33989
34093
|
return strings.length > 0 ? strings : undefined;
|
|
33990
34094
|
}
|
|
33991
|
-
function isRecord$
|
|
34095
|
+
function isRecord$27(value) {
|
|
33992
34096
|
return typeof value === "object" && value !== null;
|
|
33993
34097
|
}
|
|
33994
34098
|
function getBookingServicePaymentSelectionMode(service) {
|
|
@@ -34217,17 +34321,69 @@ function formatBookingSubmissionPreparationError(error$1) {
|
|
|
34217
34321
|
default: return assertNever$7(error$1);
|
|
34218
34322
|
}
|
|
34219
34323
|
}
|
|
34220
|
-
|
|
34221
|
-
|
|
34324
|
+
const DEFAULT_BOOKING_SUCCESS_COPY = {
|
|
34325
|
+
message: "Your booking has been confirmed.",
|
|
34326
|
+
defaultEmailSentence: "Check your email for details."
|
|
34327
|
+
};
|
|
34328
|
+
const DEFAULT_BOOKING_SUCCESS_MESSAGE = "Your booking has been confirmed. Check your email for details.";
|
|
34329
|
+
const DEFAULT_REGISTRATION_SUCCESS_COPY = {
|
|
34330
|
+
message: "Thank you for registering!",
|
|
34331
|
+
defaultEmailSentence: "Check your email for confirmation details."
|
|
34332
|
+
};
|
|
34333
|
+
const DEFAULT_REGISTRATION_SUCCESS_MESSAGE = "Thank you for registering! Check your email for confirmation details.";
|
|
34334
|
+
const DEFAULT_REGISTRATION_EMAIL_SENTENCE = "Check your email for confirmation details.";
|
|
34335
|
+
function getBookingSuccessCopy(successMessage) {
|
|
34336
|
+
const customMessage = successMessage?.trim();
|
|
34337
|
+
return customMessage && customMessage !== DEFAULT_BOOKING_SUCCESS_MESSAGE ? { message: customMessage } : DEFAULT_BOOKING_SUCCESS_COPY;
|
|
34338
|
+
}
|
|
34339
|
+
function getRegistrationSuccessCopy(result, fallback) {
|
|
34340
|
+
const isWaitlist = result?.status === "waitlist";
|
|
34341
|
+
const isInfo = result?.variant === "info";
|
|
34342
|
+
const includesEmailSentence = !isWaitlist && !isInfo;
|
|
34343
|
+
const responseMessage = result?.message;
|
|
34344
|
+
const trimmedResponseMessage = responseMessage?.trim();
|
|
34345
|
+
if ((isWaitlist || isInfo) && trimmedResponseMessage) {
|
|
34346
|
+
const emailFollowupMessage = result?.emailFollowupMessage;
|
|
34347
|
+
return {
|
|
34348
|
+
message: responseMessage ?? "",
|
|
34349
|
+
...emailFollowupMessage?.trim() ? { defaultEmailSentence: emailFollowupMessage } : {}
|
|
34350
|
+
};
|
|
34351
|
+
}
|
|
34352
|
+
if (trimmedResponseMessage === DEFAULT_REGISTRATION_SUCCESS_MESSAGE) {
|
|
34353
|
+
return includesEmailSentence ? DEFAULT_REGISTRATION_SUCCESS_COPY : { message: DEFAULT_REGISTRATION_SUCCESS_COPY.message };
|
|
34354
|
+
}
|
|
34355
|
+
if (trimmedResponseMessage) {
|
|
34356
|
+
return includesEmailSentence ? registrationCopyWithEmail(trimmedResponseMessage) : { message: trimmedResponseMessage };
|
|
34357
|
+
}
|
|
34358
|
+
const fallbackMessage = fallback?.trim();
|
|
34359
|
+
if (fallbackMessage && fallbackMessage !== DEFAULT_REGISTRATION_SUCCESS_MESSAGE) {
|
|
34360
|
+
return { message: fallbackMessage };
|
|
34361
|
+
}
|
|
34362
|
+
return includesEmailSentence ? DEFAULT_REGISTRATION_SUCCESS_COPY : { message: DEFAULT_REGISTRATION_SUCCESS_COPY.message };
|
|
34363
|
+
}
|
|
34364
|
+
function registrationCopyWithEmail(message) {
|
|
34365
|
+
return {
|
|
34366
|
+
message,
|
|
34367
|
+
defaultEmailSentence: DEFAULT_REGISTRATION_EMAIL_SENTENCE
|
|
34368
|
+
};
|
|
34369
|
+
}
|
|
34370
|
+
function getShopSuccessCopy(outcome) {
|
|
34371
|
+
switch (outcome) {
|
|
34372
|
+
case "success": return {
|
|
34373
|
+
message: "",
|
|
34374
|
+
defaultEmailSentence: "Check your email for confirmation."
|
|
34375
|
+
};
|
|
34376
|
+
case "cancelled": return { message: "You can try again whenever you’re ready." };
|
|
34377
|
+
}
|
|
34222
34378
|
}
|
|
34223
34379
|
|
|
34224
34380
|
//#endregion
|
|
34225
34381
|
//#region ../blocks/src/system/runtime/nodes/booking-form.service-categories.ts
|
|
34226
|
-
function isRecord$
|
|
34382
|
+
function isRecord$26(value) {
|
|
34227
34383
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
34228
34384
|
}
|
|
34229
34385
|
function readCategory(value) {
|
|
34230
|
-
if (!isRecord$
|
|
34386
|
+
if (!isRecord$26(value)) return [];
|
|
34231
34387
|
const { id, name, description } = value;
|
|
34232
34388
|
if (typeof id !== "string" || id.trim() === "" || typeof name !== "string") {
|
|
34233
34389
|
return [];
|
|
@@ -34245,7 +34401,7 @@ function readCategory(value) {
|
|
|
34245
34401
|
* it.
|
|
34246
34402
|
*/
|
|
34247
34403
|
function normalizeBookingServiceCategories(services) {
|
|
34248
|
-
if (!isRecord$
|
|
34404
|
+
if (!isRecord$26(services) || !Array.isArray(services.categories)) return [];
|
|
34249
34405
|
return services.categories.flatMap(readCategory);
|
|
34250
34406
|
}
|
|
34251
34407
|
/**
|
|
@@ -34253,7 +34409,7 @@ function normalizeBookingServiceCategories(services) {
|
|
|
34253
34409
|
* its loader data (`data.services`).
|
|
34254
34410
|
*/
|
|
34255
34411
|
function readOverrideServiceCategories(data) {
|
|
34256
|
-
return isRecord$
|
|
34412
|
+
return isRecord$26(data) ? normalizeBookingServiceCategories(data.services) : [];
|
|
34257
34413
|
}
|
|
34258
34414
|
|
|
34259
34415
|
//#endregion
|
|
@@ -34365,8 +34521,8 @@ function validateAppointmentBookingFormSource(input) {
|
|
|
34365
34521
|
return {
|
|
34366
34522
|
ok: false,
|
|
34367
34523
|
issues: parsedForm.error.issues.map((issue$1) => {
|
|
34368
|
-
const path$
|
|
34369
|
-
return `${path$
|
|
34524
|
+
const path$4 = issue$1.path.length > 0 ? `${issue$1.path.join(".")}: ` : "";
|
|
34525
|
+
return `${path$4}${issue$1.message}`;
|
|
34370
34526
|
})
|
|
34371
34527
|
};
|
|
34372
34528
|
}
|
|
@@ -34500,6 +34656,7 @@ const bookingMailingListContextSchema = z.unknown().transform((value) => {
|
|
|
34500
34656
|
return parsed.ok ? parsed.value : undefined;
|
|
34501
34657
|
});
|
|
34502
34658
|
const bookingSourceSchema = z.object({
|
|
34659
|
+
demoEmailSuppressed: z.boolean().optional(),
|
|
34503
34660
|
mailingList: bookingMailingListContextSchema.optional(),
|
|
34504
34661
|
siteName: z.string().optional(),
|
|
34505
34662
|
siteId: z.string().optional(),
|
|
@@ -34530,6 +34687,7 @@ const bookingDisplaySchema = z.object({
|
|
|
34530
34687
|
message: z.string().nullable()
|
|
34531
34688
|
});
|
|
34532
34689
|
const bookingHydrationSchema = z.object({
|
|
34690
|
+
demoEmailSuppressed: z.boolean().optional(),
|
|
34533
34691
|
mailingList: bookingMailingListContextSchema.optional(),
|
|
34534
34692
|
siteName: z.string().optional(),
|
|
34535
34693
|
formId: z.string().nullable(),
|
|
@@ -34578,6 +34736,7 @@ const bookingFormBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
34578
34736
|
return {
|
|
34579
34737
|
display: buildBookingFormDisplay(source, form$1),
|
|
34580
34738
|
hydration: {
|
|
34739
|
+
demoEmailSuppressed: source.demoEmailSuppressed,
|
|
34581
34740
|
mailingList: source.mailingList,
|
|
34582
34741
|
siteName: source.siteName,
|
|
34583
34742
|
formId: form$1?.id ?? source.formId ?? null,
|
|
@@ -35388,11 +35547,11 @@ function isBookableEvent(event) {
|
|
|
35388
35547
|
|
|
35389
35548
|
//#endregion
|
|
35390
35549
|
//#region ../blocks/src/system/runtime/nodes/events/domain/destination.ts
|
|
35391
|
-
function isRecord$
|
|
35550
|
+
function isRecord$25(value) {
|
|
35392
35551
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
35393
35552
|
}
|
|
35394
35553
|
function isRuntimeEventDestination(value) {
|
|
35395
|
-
if (!isRecord$
|
|
35554
|
+
if (!isRecord$25(value) || typeof value.kind !== "string") return false;
|
|
35396
35555
|
if (value.kind === "native") {
|
|
35397
35556
|
return (value.mode === "cms-managed" || value.mode === "system-managed") && typeof value.path === "string";
|
|
35398
35557
|
}
|
|
@@ -35496,6 +35655,46 @@ function resolveEventCta(event, buttonText) {
|
|
|
35496
35655
|
* timestamps become strings or date buckets. Calendar-grid primitives are
|
|
35497
35656
|
* re-exported from @riverbankcms/calendar so block code has one import.
|
|
35498
35657
|
*/
|
|
35658
|
+
/**
|
|
35659
|
+
* The English locale a site's public dates are written in, read from the
|
|
35660
|
+
* site's own time zone (Will, 2026-09-26: "date style from site time zone").
|
|
35661
|
+
*
|
|
35662
|
+
* Sites don't store a locale, and every public word around a date is English,
|
|
35663
|
+
* so the only open question is which English conventions to follow: day or
|
|
35664
|
+
* month first, and a 24 or 12-hour clock. The site's time zone is the one
|
|
35665
|
+
* fact every site carries about where it is. It is the site's, never an
|
|
35666
|
+
* event's: a venue left at UTC must not turn a UK site's dates American.
|
|
35667
|
+
* Anywhere this can't place (UTC, the Americas, Asia) keeps US English, which
|
|
35668
|
+
* is what these helpers wrote before sites were placed at all.
|
|
35669
|
+
*/
|
|
35670
|
+
function eventDateLocale(siteTimeZone) {
|
|
35671
|
+
if (!siteTimeZone) return "en-US";
|
|
35672
|
+
if (siteTimeZone === "Europe/Dublin") return "en-IE";
|
|
35673
|
+
if (siteTimeZone.startsWith("Europe/")) return "en-GB";
|
|
35674
|
+
if (siteTimeZone.startsWith("Australia/")) return "en-AU";
|
|
35675
|
+
if (siteTimeZone === "Pacific/Auckland" || siteTimeZone === "Pacific/Chatham") {
|
|
35676
|
+
return "en-NZ";
|
|
35677
|
+
}
|
|
35678
|
+
return "en-US";
|
|
35679
|
+
}
|
|
35680
|
+
/**
|
|
35681
|
+
* Formatting options for an event's dates: the times in the event's own zone,
|
|
35682
|
+
* written in its site's locale. A record from an older server that doesn't
|
|
35683
|
+
* name the site's zone falls back to the event's.
|
|
35684
|
+
*/
|
|
35685
|
+
function eventDateOptions(place) {
|
|
35686
|
+
return {
|
|
35687
|
+
timeZone: place.timeZone ?? null,
|
|
35688
|
+
locale: eventDateLocale(place.siteTimeZone ?? place.timeZone)
|
|
35689
|
+
};
|
|
35690
|
+
}
|
|
35691
|
+
/**
|
|
35692
|
+
* Start and end times as cards write them, in the site's locale:
|
|
35693
|
+
* "10:00 to 16:00" in the UK, "10:00 AM to 4:00 PM" in the US.
|
|
35694
|
+
*/
|
|
35695
|
+
function formatEventTimeRange$1(times, options) {
|
|
35696
|
+
return `${formatTime(times.startsAt, options)} to ${formatTime(times.endsAt, options)}`;
|
|
35697
|
+
}
|
|
35499
35698
|
/** Use the event timezone when present, otherwise the calendar/site timezone. */
|
|
35500
35699
|
function resolveEventTimeZone(event, calendarTimeZone) {
|
|
35501
35700
|
return event.timeZone || calendarTimeZone;
|
|
@@ -35517,18 +35716,25 @@ function formatDate(isoTimestamp, options) {
|
|
|
35517
35716
|
});
|
|
35518
35717
|
}
|
|
35519
35718
|
/**
|
|
35520
|
-
*
|
|
35521
|
-
*
|
|
35719
|
+
* Whether the locale reads a 24-hour clock, where hours are written with two
|
|
35720
|
+
* digits ("09:00"), as the dashboard writes them.
|
|
35721
|
+
*/
|
|
35722
|
+
function usesTwentyFourHourClock(locale) {
|
|
35723
|
+
return new Intl.DateTimeFormat(locale, { hour: "numeric" }).resolvedOptions().hour12 === false;
|
|
35724
|
+
}
|
|
35725
|
+
/**
|
|
35726
|
+
* Format time for display, on the locale's own clock.
|
|
35727
|
+
* Returns: "9:00 AM" (en-US) or "09:00" (en-GB)
|
|
35522
35728
|
*/
|
|
35523
35729
|
function formatTime(isoTimestamp, options) {
|
|
35730
|
+
const locale = options?.locale ?? "en-US";
|
|
35524
35731
|
return formatBookingTime(toScheduledBookingDateTime({
|
|
35525
35732
|
startsAt: isoTimestamp,
|
|
35526
35733
|
timeZone: toBookingTimeZone(options?.timeZone ?? "UTC"),
|
|
35527
|
-
locale
|
|
35734
|
+
locale
|
|
35528
35735
|
}), {
|
|
35529
|
-
hour: "numeric",
|
|
35530
|
-
minute: "2-digit"
|
|
35531
|
-
hour12: true
|
|
35736
|
+
hour: usesTwentyFourHourClock(locale) ? "2-digit" : "numeric",
|
|
35737
|
+
minute: "2-digit"
|
|
35532
35738
|
});
|
|
35533
35739
|
}
|
|
35534
35740
|
function formatEventDateParts(args) {
|
|
@@ -35561,7 +35767,7 @@ function formatEventCompactDateRail(isoTimestamp, options) {
|
|
|
35561
35767
|
locale: options?.locale ?? "en-US"
|
|
35562
35768
|
});
|
|
35563
35769
|
const weekday = formatBookingDate(dateTime, { weekday: "short" }).toLocaleUpperCase(options?.locale ?? "en-US");
|
|
35564
|
-
const month = formatBookingDate(dateTime, { month: "short" }).toLocaleUpperCase(options?.locale ?? "en-US");
|
|
35770
|
+
const month = formatBookingDate(dateTime, { month: "short" }).slice(0, 3).toLocaleUpperCase(options?.locale ?? "en-US");
|
|
35565
35771
|
const day = formatBookingDate(dateTime, { day: "numeric" });
|
|
35566
35772
|
const label = formatBookingDate(dateTime, {
|
|
35567
35773
|
weekday: "long",
|
|
@@ -35583,7 +35789,7 @@ function formatEventCompactDateRail(isoTimestamp, options) {
|
|
|
35583
35789
|
* keep the fact panel on the same date and timezone rules as event rows.
|
|
35584
35790
|
*/
|
|
35585
35791
|
function formatEventNextDateFact(event) {
|
|
35586
|
-
const rail = formatEventCompactDateRail(event.startsAt,
|
|
35792
|
+
const rail = formatEventCompactDateRail(event.startsAt, eventDateOptions(event));
|
|
35587
35793
|
return {
|
|
35588
35794
|
dateTime: event.startsAt,
|
|
35589
35795
|
value: `${rail.weekday} ${rail.day} ${rail.month}`,
|
|
@@ -36494,6 +36700,13 @@ function CalendarIcon({ className, size = 16, strokeWidth = 2 }) {
|
|
|
36494
36700
|
|
|
36495
36701
|
//#endregion
|
|
36496
36702
|
//#region ../blocks/src/system/runtime/nodes/events/shared/EventCard.tsx
|
|
36703
|
+
/** The category's badge, when the event has a category. */
|
|
36704
|
+
function eventCardCategoryBadge(category) {
|
|
36705
|
+
return category ? {
|
|
36706
|
+
label: category.name,
|
|
36707
|
+
style: getCategoryBadgeStyle(category.color ?? null)
|
|
36708
|
+
} : null;
|
|
36709
|
+
}
|
|
36497
36710
|
/**
|
|
36498
36711
|
* EventCard Component
|
|
36499
36712
|
*
|
|
@@ -36502,24 +36715,19 @@ function CalendarIcon({ className, size = 16, strokeWidth = 2 }) {
|
|
|
36502
36715
|
*
|
|
36503
36716
|
* This component is server-safe (uses no client APIs like Intl).
|
|
36504
36717
|
*/
|
|
36505
|
-
const EventCard = ({ event, cardRole = "default", buttonVariant = "primary", buttonText, showVenue = true, showMap = true, mapSlot, allowMap = true, showCapacity = true, showImage = true, showCategory = true, showSummary = true, orientation = "vertical", presentation, headingLevel }) => {
|
|
36718
|
+
const EventCard = ({ event, cardRole = "default", buttonVariant = "primary", buttonText, showVenue = true, showMap = true, mapSlot, allowMap = true, showCapacity = true, showImage = true, showCategory = true, showSummary = true, orientation = "vertical", presentation, headingLevel, imageResolveContext }) => {
|
|
36506
36719
|
const { presentation: cardPresentation, presentationClass, headingLevel: cardHeadingLevel } = resolveEventCardOptions({
|
|
36507
36720
|
presentation,
|
|
36508
36721
|
headingLevel
|
|
36509
36722
|
});
|
|
36510
|
-
const
|
|
36511
|
-
const formattedDate = formatDate(event.startsAt, { timeZone });
|
|
36512
|
-
const formattedTime = `${formatTime(event.startsAt, { timeZone })} - ${formatTime(event.endsAt, { timeZone })}`;
|
|
36723
|
+
const { formattedDate, formattedTime } = formatEventCardWhen(event);
|
|
36513
36724
|
const cta = resolveEventCta(event, buttonText);
|
|
36514
36725
|
const cardClass = boxStyleClassNames({ role: cardRole }, { baseClass: "event-card" });
|
|
36515
36726
|
const title = event.title;
|
|
36516
36727
|
const summary = event.presentation?.summary ?? event.description;
|
|
36517
36728
|
const image = event.presentation?.image ?? null;
|
|
36518
36729
|
const category = event.eventCategory;
|
|
36519
|
-
const categoryBadge =
|
|
36520
|
-
label: category.name,
|
|
36521
|
-
style: getCategoryBadgeStyle(category.color ?? null)
|
|
36522
|
-
} : null;
|
|
36730
|
+
const categoryBadge = showCategory ? eventCardCategoryBadge(category) : null;
|
|
36523
36731
|
const hasImage = Boolean(showImage && image);
|
|
36524
36732
|
const dateFact = resolveEventCardDateFact({
|
|
36525
36733
|
event,
|
|
@@ -36539,7 +36747,8 @@ const EventCard = ({ event, cardRole = "default", buttonVariant = "primary", but
|
|
|
36539
36747
|
categoryId: category?.id,
|
|
36540
36748
|
dateFact,
|
|
36541
36749
|
hasImage,
|
|
36542
|
-
image
|
|
36750
|
+
image,
|
|
36751
|
+
imageResolveContext
|
|
36543
36752
|
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EventCardContent, {
|
|
36544
36753
|
allowMap,
|
|
36545
36754
|
buttonVariant,
|
|
@@ -36589,7 +36798,8 @@ function EventCardMedia(props$1) {
|
|
|
36589
36798
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(MediaNodeServer, {
|
|
36590
36799
|
value: props$1.image,
|
|
36591
36800
|
className: "event-card-image",
|
|
36592
|
-
size: ImagePresets.card
|
|
36801
|
+
size: ImagePresets.card,
|
|
36802
|
+
imageResolveContext: props$1.imageResolveContext
|
|
36593
36803
|
}),
|
|
36594
36804
|
props$1.categoryBadge && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
36595
36805
|
className: "event-category-badge event-category-badge--overlay",
|
|
@@ -36704,6 +36914,17 @@ function resolveEventCardOptions(props$1) {
|
|
|
36704
36914
|
headingLevel: props$1.headingLevel ?? 3
|
|
36705
36915
|
};
|
|
36706
36916
|
}
|
|
36917
|
+
/**
|
|
36918
|
+
* The card's date and times, written the way the event's place writes them
|
|
36919
|
+
* ("Friday, 16 October 2026" and "10:00 to 16:00" in the UK).
|
|
36920
|
+
*/
|
|
36921
|
+
function formatEventCardWhen(event) {
|
|
36922
|
+
const options = eventDateOptions(event);
|
|
36923
|
+
return {
|
|
36924
|
+
formattedDate: formatDate(event.startsAt, options),
|
|
36925
|
+
formattedTime: formatEventTimeRange$1(event, options)
|
|
36926
|
+
};
|
|
36927
|
+
}
|
|
36707
36928
|
function resolveEventCardDateFact(props$1) {
|
|
36708
36929
|
if (!props$1.showImage || props$1.image || props$1.presentation !== "catalogue") {
|
|
36709
36930
|
return null;
|
|
@@ -36966,12 +37187,12 @@ function CalendarDayHeaders({ dayNames }) {
|
|
|
36966
37187
|
* exists so a sold-out or closed offering stays reachable (issue 1372); the
|
|
36967
37188
|
* `.event-title-link` rule lives in theme-core's event-list.css.
|
|
36968
37189
|
*/
|
|
36969
|
-
function OfferingTitle({ className, path: path$
|
|
37190
|
+
function OfferingTitle({ className, path: path$4, title }) {
|
|
36970
37191
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", {
|
|
36971
37192
|
className,
|
|
36972
|
-
children: path$
|
|
37193
|
+
children: path$4 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
|
|
36973
37194
|
className: "event-title-link",
|
|
36974
|
-
href: path$
|
|
37195
|
+
href: path$4,
|
|
36975
37196
|
children: title
|
|
36976
37197
|
}) : title
|
|
36977
37198
|
});
|
|
@@ -38282,6 +38503,35 @@ function buildEventCombinedInteractiveIslandProps(props$1) {
|
|
|
38282
38503
|
});
|
|
38283
38504
|
}
|
|
38284
38505
|
|
|
38506
|
+
//#endregion
|
|
38507
|
+
//#region ../blocks/src/system/runtime/nodes/events/shared/eventCardPresentations.ts
|
|
38508
|
+
/** A booking page's catalogue card: one per series, "See dates" for dated events. */
|
|
38509
|
+
function catalogueEventCardProps(event, buttonVariant = "primary") {
|
|
38510
|
+
return {
|
|
38511
|
+
presentation: "catalogue",
|
|
38512
|
+
headingLevel: 4,
|
|
38513
|
+
buttonVariant,
|
|
38514
|
+
buttonText: event.bookingScope === "single_occurrence" ? "See dates" : undefined,
|
|
38515
|
+
showMap: false,
|
|
38516
|
+
allowMap: false,
|
|
38517
|
+
showCategory: false,
|
|
38518
|
+
orientation: "vertical"
|
|
38519
|
+
};
|
|
38520
|
+
}
|
|
38521
|
+
/** An events listing's card, from the listing's display settings. */
|
|
38522
|
+
function listingEventCardProps(display) {
|
|
38523
|
+
return {
|
|
38524
|
+
cardRole: display.cardRole,
|
|
38525
|
+
buttonVariant: display.buttonVariant,
|
|
38526
|
+
buttonText: display.buttonText,
|
|
38527
|
+
showVenue: display.showVenue,
|
|
38528
|
+
showMap: display.showMap,
|
|
38529
|
+
allowMap: false,
|
|
38530
|
+
showCapacity: display.showCapacity,
|
|
38531
|
+
orientation: display.orientation
|
|
38532
|
+
};
|
|
38533
|
+
}
|
|
38534
|
+
|
|
38285
38535
|
//#endregion
|
|
38286
38536
|
//#region ../blocks/src/system/runtime/nodes/events/shared/renderEventListItem.tsx
|
|
38287
38537
|
/**
|
|
@@ -38301,14 +38551,7 @@ function renderEventListItem(event, display) {
|
|
|
38301
38551
|
}
|
|
38302
38552
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EventCard, {
|
|
38303
38553
|
event,
|
|
38304
|
-
|
|
38305
|
-
buttonVariant: display.buttonVariant,
|
|
38306
|
-
buttonText: display.buttonText,
|
|
38307
|
-
showVenue: display.showVenue,
|
|
38308
|
-
showMap: display.showMap,
|
|
38309
|
-
allowMap: false,
|
|
38310
|
-
showCapacity: display.showCapacity,
|
|
38311
|
-
orientation: display.orientation
|
|
38554
|
+
...listingEventCardProps(display)
|
|
38312
38555
|
}, event.occurrenceId || event.id);
|
|
38313
38556
|
}
|
|
38314
38557
|
|
|
@@ -38510,7 +38753,7 @@ function inferLegacyOfferingsPreviewGroupOrder(overrides) {
|
|
|
38510
38753
|
return keys.length >= 2 ? keys : [];
|
|
38511
38754
|
}
|
|
38512
38755
|
function normalizeOfferingsPreviewContentForWrite(value) {
|
|
38513
|
-
if (!isRecord$
|
|
38756
|
+
if (!isRecord$24(value)) return null;
|
|
38514
38757
|
const groupOrderValue = value.groupOrder;
|
|
38515
38758
|
if (Array.isArray(groupOrderValue)) {
|
|
38516
38759
|
const normalized = normalizeOfferingsPreviewGroupOrder(groupOrderValue);
|
|
@@ -38525,7 +38768,7 @@ function normalizeOfferingsPreviewContentForWrite(value) {
|
|
|
38525
38768
|
groupOrder: []
|
|
38526
38769
|
};
|
|
38527
38770
|
}
|
|
38528
|
-
const legacyOrder = inferLegacyOfferingsPreviewGroupOrder(Array.isArray(value.groupOverrides) ? value.groupOverrides.filter(isRecord$
|
|
38771
|
+
const legacyOrder = inferLegacyOfferingsPreviewGroupOrder(Array.isArray(value.groupOverrides) ? value.groupOverrides.filter(isRecord$24) : []);
|
|
38529
38772
|
return legacyOrder.length > 0 ? {
|
|
38530
38773
|
...value,
|
|
38531
38774
|
groupOrder: legacyOrder
|
|
@@ -38596,7 +38839,7 @@ function uniqueOfferingsPreviewSourceKeys(values) {
|
|
|
38596
38839
|
}
|
|
38597
38840
|
return keys;
|
|
38598
38841
|
}
|
|
38599
|
-
function isRecord$
|
|
38842
|
+
function isRecord$24(value) {
|
|
38600
38843
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
38601
38844
|
}
|
|
38602
38845
|
function mergeOrderedKeysWithDefaults(orderedKeys, defaultKeys) {
|
|
@@ -38640,8 +38883,8 @@ function resolveAutoCtaPath(source, routes) {
|
|
|
38640
38883
|
routeByNormalizedPath.set(normalized, route.path);
|
|
38641
38884
|
}
|
|
38642
38885
|
}
|
|
38643
|
-
for (const path$
|
|
38644
|
-
const match = routeByNormalizedPath.get(path$
|
|
38886
|
+
for (const path$4 of preferredPathsForSource(source)) {
|
|
38887
|
+
const match = routeByNormalizedPath.get(path$4);
|
|
38645
38888
|
if (match) return match;
|
|
38646
38889
|
}
|
|
38647
38890
|
return routeByNormalizedPath.get("/offerings") ?? null;
|
|
@@ -38650,8 +38893,8 @@ function resolveOfferingsPreviewRunPath(run, routes) {
|
|
|
38650
38893
|
const routeIds = [run.eventSeriesId, run.eventOfferingId];
|
|
38651
38894
|
for (const entityId of routeIds) {
|
|
38652
38895
|
const route = (routes ?? []).find((candidate) => candidate.entityId === entityId);
|
|
38653
|
-
const path$
|
|
38654
|
-
if (path$
|
|
38896
|
+
const path$4 = normalizeRoutePath(route?.path);
|
|
38897
|
+
if (path$4) return path$4;
|
|
38655
38898
|
}
|
|
38656
38899
|
return null;
|
|
38657
38900
|
}
|
|
@@ -38671,8 +38914,8 @@ function preferredPathsForSource(source) {
|
|
|
38671
38914
|
function normalizeRoutePath(value) {
|
|
38672
38915
|
const text$1 = normalizeTextOverride(value);
|
|
38673
38916
|
if (!text$1) return null;
|
|
38674
|
-
const path$
|
|
38675
|
-
return path$
|
|
38917
|
+
const path$4 = text$1.startsWith("/") ? text$1 : `/${text$1}`;
|
|
38918
|
+
return path$4.length > 1 ? path$4.replace(/\/+$/, "") : path$4;
|
|
38676
38919
|
}
|
|
38677
38920
|
function isOfferingsPreviewEventPreset(value) {
|
|
38678
38921
|
return typeof value === "string" && OFFERINGS_PREVIEW_EVENT_PRESETS.includes(value);
|
|
@@ -38751,14 +38994,7 @@ function OfferingsCatalogue(props$1) {
|
|
|
38751
38994
|
style: { gridTemplateColumns: "repeat(auto-fill, minmax(min(100%, 18rem), 1fr))" },
|
|
38752
38995
|
children: events.map((event) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EventCard, {
|
|
38753
38996
|
event,
|
|
38754
|
-
|
|
38755
|
-
headingLevel: 4,
|
|
38756
|
-
buttonVariant: props$1.buttonVariant ?? "primary",
|
|
38757
|
-
buttonText: event.bookingScope === "single_occurrence" ? "See dates" : undefined,
|
|
38758
|
-
showMap: false,
|
|
38759
|
-
allowMap: false,
|
|
38760
|
-
showCategory: false,
|
|
38761
|
-
orientation: "vertical"
|
|
38997
|
+
...catalogueEventCardProps(event, props$1.buttonVariant ?? "primary")
|
|
38762
38998
|
}, event.seriesId))
|
|
38763
38999
|
})]
|
|
38764
39000
|
}, group.sourceKey))
|
|
@@ -39060,45 +39296,73 @@ function FeaturedOfferingSummary({ item }) {
|
|
|
39060
39296
|
}
|
|
39061
39297
|
function featuredSummaryDetails(item) {
|
|
39062
39298
|
switch (item.kind) {
|
|
39063
|
-
case "event": return formatFeaturedSummary(deriveEventScheduleSummary(item.event),
|
|
39299
|
+
case "event": return formatFeaturedSummary(deriveEventScheduleSummary(item.event), {
|
|
39300
|
+
venue: item.event.venue?.name ?? null,
|
|
39301
|
+
siteTimeZone: item.event.siteTimeZone
|
|
39302
|
+
});
|
|
39064
39303
|
case "run": {
|
|
39065
39304
|
const schedule = derivePreviewRunSchedule(item.run.run.sessions);
|
|
39066
|
-
return schedule.kind === "scheduled" ? formatFeaturedSummary(schedule.summary,
|
|
39305
|
+
return schedule.kind === "scheduled" ? formatFeaturedSummary(schedule.summary, {
|
|
39306
|
+
venue: item.run.representative.venue?.name ?? null,
|
|
39307
|
+
siteTimeZone: item.run.representative.siteTimeZone
|
|
39308
|
+
}) : null;
|
|
39067
39309
|
}
|
|
39068
39310
|
default: return assertNever(item, "Unhandled offerings preview item");
|
|
39069
39311
|
}
|
|
39070
39312
|
}
|
|
39071
|
-
function formatFeaturedSummary(summary,
|
|
39313
|
+
function formatFeaturedSummary(summary, place) {
|
|
39072
39314
|
switch (summary.kind) {
|
|
39073
|
-
case "single-occurrence": return detailsFromOccurrences(
|
|
39074
|
-
|
|
39075
|
-
|
|
39076
|
-
|
|
39315
|
+
case "single-occurrence": return detailsFromOccurrences({
|
|
39316
|
+
first: summary.occurrence,
|
|
39317
|
+
last: null,
|
|
39318
|
+
place
|
|
39319
|
+
});
|
|
39320
|
+
case "multi-day-span": return detailsFromOccurrences({
|
|
39321
|
+
first: summary.occurrence,
|
|
39322
|
+
last: summary.occurrence,
|
|
39323
|
+
place,
|
|
39324
|
+
spanUsesEndDate: true
|
|
39325
|
+
});
|
|
39326
|
+
case "fixed-recurring-run": return detailsFromOccurrences({
|
|
39327
|
+
first: summary.first,
|
|
39328
|
+
last: summary.last,
|
|
39329
|
+
place,
|
|
39330
|
+
recurrence: summary.recurrenceLabel
|
|
39331
|
+
});
|
|
39332
|
+
case "irregular-multi-session-run": return detailsFromOccurrences({
|
|
39333
|
+
first: summary.first,
|
|
39334
|
+
last: summary.last,
|
|
39335
|
+
place,
|
|
39336
|
+
sessionCount: `${summary.sessionCount} dates`
|
|
39337
|
+
});
|
|
39077
39338
|
default: return assertNever(summary, "Unhandled offerings preview schedule summary");
|
|
39078
39339
|
}
|
|
39079
39340
|
}
|
|
39080
|
-
function detailsFromOccurrences(
|
|
39081
|
-
const
|
|
39341
|
+
function detailsFromOccurrences(input) {
|
|
39342
|
+
const { first, last, place } = input;
|
|
39343
|
+
const endDateTime = input.spanUsesEndDate ? first.endsAt : last?.startsAt ?? first.startsAt;
|
|
39344
|
+
const options = eventDateOptions({
|
|
39345
|
+
timeZone: first.timeZone,
|
|
39346
|
+
siteTimeZone: place.siteTimeZone
|
|
39347
|
+
});
|
|
39348
|
+
const summaryDate = (isoTimestamp, timeZone) => formatSummaryDate(isoTimestamp, {
|
|
39349
|
+
timeZone,
|
|
39350
|
+
locale: options.locale
|
|
39351
|
+
});
|
|
39082
39352
|
return {
|
|
39083
|
-
startDate:
|
|
39353
|
+
startDate: summaryDate(first.startsAt, first.timeZone),
|
|
39084
39354
|
startDateTime: first.startsAt,
|
|
39085
|
-
endDate: last ?
|
|
39355
|
+
endDate: last ? summaryDate(endDateTime, last.timeZone) : null,
|
|
39086
39356
|
endDateTime,
|
|
39087
|
-
timeRange:
|
|
39088
|
-
|
|
39089
|
-
|
|
39090
|
-
|
|
39091
|
-
|
|
39092
|
-
|
|
39093
|
-
|
|
39094
|
-
|
|
39095
|
-
|
|
39096
|
-
venue
|
|
39097
|
-
};
|
|
39098
|
-
}
|
|
39099
|
-
function formatSummaryDate(isoTimestamp, timeZone) {
|
|
39100
|
-
return new Intl.DateTimeFormat("en-GB", {
|
|
39101
|
-
timeZone,
|
|
39357
|
+
timeRange: formatEventTimeRange$1(first, options),
|
|
39358
|
+
recurrence: input.recurrence ?? null,
|
|
39359
|
+
sessionCount: input.sessionCount ?? null,
|
|
39360
|
+
venue: place.venue
|
|
39361
|
+
};
|
|
39362
|
+
}
|
|
39363
|
+
function formatSummaryDate(isoTimestamp, options) {
|
|
39364
|
+
return new Intl.DateTimeFormat(options.locale, {
|
|
39365
|
+
timeZone: options.timeZone,
|
|
39102
39366
|
weekday: "long",
|
|
39103
39367
|
day: "numeric",
|
|
39104
39368
|
month: "long",
|
|
@@ -39138,16 +39402,19 @@ function renderSingleOfferingCard(item, options) {
|
|
|
39138
39402
|
}, item.run.eventSeriesId);
|
|
39139
39403
|
}
|
|
39140
39404
|
}
|
|
39141
|
-
function WholeSeriesRunCompactRow({ group, path: path$
|
|
39405
|
+
function WholeSeriesRunCompactRow({ group, path: path$4, now }) {
|
|
39142
39406
|
const schedule = derivePreviewRunSchedule(group.run.sessions);
|
|
39143
39407
|
if (schedule.kind === "no-live-sessions") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RunWithoutLiveDates, {
|
|
39144
39408
|
group,
|
|
39145
|
-
path: path$
|
|
39409
|
+
path: path$4
|
|
39146
39410
|
});
|
|
39147
39411
|
const { sessionCount: sessionsCount, firstSession } = schedule;
|
|
39148
|
-
const
|
|
39149
|
-
|
|
39150
|
-
|
|
39412
|
+
const options = eventDateOptions({
|
|
39413
|
+
timeZone: firstSession.timeZone,
|
|
39414
|
+
siteTimeZone: group.representative.siteTimeZone
|
|
39415
|
+
});
|
|
39416
|
+
const dateRail = formatEventCompactDateRail(firstSession.startsAt, options);
|
|
39417
|
+
const timeRange = formatEventTimeRange$1(firstSession, options);
|
|
39151
39418
|
const price = formatEventPriceDisplay(group.representative.pricing);
|
|
39152
39419
|
const statusLabel = resolveWholeSeriesBookingPhase(group.run, now).kind === "open" ? null : "Registration closed";
|
|
39153
39420
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("article", {
|
|
@@ -39176,7 +39443,7 @@ function WholeSeriesRunCompactRow({ group, path: path$3, now }) {
|
|
|
39176
39443
|
className: "event-compact-row-content",
|
|
39177
39444
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(OfferingTitle, {
|
|
39178
39445
|
className: "event-compact-row-title",
|
|
39179
|
-
path: path$
|
|
39446
|
+
path: path$4,
|
|
39180
39447
|
title: group.representative.title
|
|
39181
39448
|
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
39182
39449
|
className: "event-compact-row-meta",
|
|
@@ -39205,11 +39472,11 @@ function WholeSeriesRunCompactRow({ group, path: path$3, now }) {
|
|
|
39205
39472
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
39206
39473
|
className: "event-compact-row-datetime",
|
|
39207
39474
|
children: timeRange
|
|
39208
|
-
}), statusLabel || !path$
|
|
39475
|
+
}), statusLabel || !path$4 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
39209
39476
|
className: "event-compact-row-status",
|
|
39210
39477
|
children: statusLabel ?? "Details coming soon"
|
|
39211
39478
|
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThemedButtonLink, {
|
|
39212
|
-
href: path$
|
|
39479
|
+
href: path$4,
|
|
39213
39480
|
variant: "primary",
|
|
39214
39481
|
size: "sm",
|
|
39215
39482
|
extraClassName: "event-compact-row-cta",
|
|
@@ -39220,16 +39487,19 @@ function WholeSeriesRunCompactRow({ group, path: path$3, now }) {
|
|
|
39220
39487
|
]
|
|
39221
39488
|
});
|
|
39222
39489
|
}
|
|
39223
|
-
function WholeSeriesRunFeatureCard({ group, now, path: path$
|
|
39490
|
+
function WholeSeriesRunFeatureCard({ group, now, path: path$4, buttonVariant, buttonText }) {
|
|
39224
39491
|
const schedule = derivePreviewRunSchedule(group.run.sessions);
|
|
39225
39492
|
if (schedule.kind === "no-live-sessions") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RunWithoutLiveDates, {
|
|
39226
39493
|
group,
|
|
39227
|
-
path: path$
|
|
39494
|
+
path: path$4
|
|
39228
39495
|
});
|
|
39229
39496
|
const { firstSession } = schedule;
|
|
39230
|
-
const
|
|
39231
|
-
|
|
39232
|
-
|
|
39497
|
+
const options = eventDateOptions({
|
|
39498
|
+
timeZone: firstSession.timeZone,
|
|
39499
|
+
siteTimeZone: group.representative.siteTimeZone
|
|
39500
|
+
});
|
|
39501
|
+
const formattedDate = formatEventCompactDateRail(firstSession.startsAt, options).label;
|
|
39502
|
+
const timeRange = formatEventTimeRange$1(firstSession, options);
|
|
39233
39503
|
const price = formatEventPriceDisplay(group.representative.pricing);
|
|
39234
39504
|
const statusLabel = resolveWholeSeriesBookingPhase(group.run, now).kind === "open" ? null : "Registration closed";
|
|
39235
39505
|
const description = group.representative.description;
|
|
@@ -39240,7 +39510,7 @@ function WholeSeriesRunFeatureCard({ group, now, path: path$3, buttonVariant, bu
|
|
|
39240
39510
|
children: [
|
|
39241
39511
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(OfferingTitle, {
|
|
39242
39512
|
className: "card-title rb-mb-3",
|
|
39243
|
-
path: path$
|
|
39513
|
+
path: path$4,
|
|
39244
39514
|
title: group.representative.title
|
|
39245
39515
|
}),
|
|
39246
39516
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
@@ -39260,11 +39530,11 @@ function WholeSeriesRunFeatureCard({ group, now, path: path$3, buttonVariant, bu
|
|
|
39260
39530
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
39261
39531
|
className: "event-card-capacity rb-caption status-muted rb-text-center",
|
|
39262
39532
|
children: price
|
|
39263
|
-
}), statusLabel || !path$
|
|
39533
|
+
}), statusLabel || !path$4 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
39264
39534
|
className: "event-compact-row-status",
|
|
39265
39535
|
children: statusLabel ?? "Details coming soon"
|
|
39266
39536
|
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThemedButtonLink, {
|
|
39267
|
-
href: path$
|
|
39537
|
+
href: path$4,
|
|
39268
39538
|
variant: buttonVariant,
|
|
39269
39539
|
size: "md",
|
|
39270
39540
|
extraClassName: "event-card-cta",
|
|
@@ -39335,13 +39605,13 @@ function resolveGroupFrameStyle(cardStyles) {
|
|
|
39335
39605
|
return backgroundColor ? { backgroundColor } : undefined;
|
|
39336
39606
|
}
|
|
39337
39607
|
var offerings_preview_default = OfferingsPreviewNode;
|
|
39338
|
-
function RunWithoutLiveDates({ group, path: path$
|
|
39608
|
+
function RunWithoutLiveDates({ group, path: path$4 }) {
|
|
39339
39609
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("article", {
|
|
39340
39610
|
className: "offerings-preview-whole-series-card",
|
|
39341
39611
|
children: [
|
|
39342
39612
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(OfferingTitle, {
|
|
39343
39613
|
className: "rb-heading-xs",
|
|
39344
|
-
path: path$
|
|
39614
|
+
path: path$4,
|
|
39345
39615
|
title: group.representative.title
|
|
39346
39616
|
}),
|
|
39347
39617
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: "No dates available." }),
|
|
@@ -40391,6 +40661,7 @@ const shopSourceSchema = z.object({
|
|
|
40391
40661
|
memberships: z.array(publicMembershipProductSchema).nullable().optional(),
|
|
40392
40662
|
products: z.array(publicProductSchema).nullable().optional(),
|
|
40393
40663
|
siteId: z.string().optional(),
|
|
40664
|
+
demoEmailSuppressed: z.boolean().optional(),
|
|
40394
40665
|
apiBaseUrl: z.string().optional(),
|
|
40395
40666
|
readAuthority: browserReadAuthoritySchema.optional(),
|
|
40396
40667
|
stage: previewStageSchema.optional()
|
|
@@ -40510,7 +40781,8 @@ const checkoutDisplaySchema = z.object({
|
|
|
40510
40781
|
const passesMembershipsHydrationSchema = z.object({
|
|
40511
40782
|
memberships: z.array(publicMembershipProductSchema),
|
|
40512
40783
|
passPurchaseMode: z.enum(["add_to_cart", "buy_now"]),
|
|
40513
|
-
buttonVariant: blockButtonRoleSchema
|
|
40784
|
+
buttonVariant: blockButtonRoleSchema,
|
|
40785
|
+
demoEmailSuppressed: z.boolean().optional()
|
|
40514
40786
|
});
|
|
40515
40787
|
const productListHydrationSchema = z.object({
|
|
40516
40788
|
products: z.array(publicProductSchema),
|
|
@@ -40532,7 +40804,8 @@ const cartHydrationSchema = z.object({
|
|
|
40532
40804
|
});
|
|
40533
40805
|
const checkoutHydrationSchema = z.object({
|
|
40534
40806
|
emptyStateText: z.string(),
|
|
40535
|
-
submitButtonText: z.string()
|
|
40807
|
+
submitButtonText: z.string(),
|
|
40808
|
+
demoEmailSuppressed: z.boolean().optional()
|
|
40536
40809
|
});
|
|
40537
40810
|
const passesMembershipsRenderSchema = z.object({
|
|
40538
40811
|
display: passesMembershipsDisplaySchema,
|
|
@@ -40600,7 +40873,8 @@ const shopBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
40600
40873
|
hydration: {
|
|
40601
40874
|
memberships: source.showMemberships === false ? [] : source.memberships ?? [],
|
|
40602
40875
|
passPurchaseMode,
|
|
40603
|
-
buttonVariant: source.buttonVariant ?? "primary"
|
|
40876
|
+
buttonVariant: source.buttonVariant ?? "primary",
|
|
40877
|
+
demoEmailSuppressed: source.demoEmailSuppressed
|
|
40604
40878
|
}
|
|
40605
40879
|
};
|
|
40606
40880
|
}
|
|
@@ -40693,7 +40967,8 @@ const checkoutBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
40693
40967
|
}),
|
|
40694
40968
|
hydration: {
|
|
40695
40969
|
emptyStateText: source.emptyStateText ?? "Add something to your cart to continue.",
|
|
40696
|
-
submitButtonText: source.submitButtonText ?? "Checkout"
|
|
40970
|
+
submitButtonText: source.submitButtonText ?? "Checkout",
|
|
40971
|
+
demoEmailSuppressed: source.demoEmailSuppressed
|
|
40697
40972
|
}
|
|
40698
40973
|
})
|
|
40699
40974
|
});
|
|
@@ -40994,6 +41269,10 @@ const checkoutManifest = createBlockManifest({
|
|
|
40994
41269
|
baseClass: "",
|
|
40995
41270
|
spacing: "spacious",
|
|
40996
41271
|
children: sectionContainer([checkout(withApiBindings({
|
|
41272
|
+
demoEmailSuppressed: { $bind: {
|
|
41273
|
+
from: "$root.demoEmailSuppressed",
|
|
41274
|
+
fallback: false
|
|
41275
|
+
} },
|
|
40997
41276
|
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
40998
41277
|
mode: "checkout",
|
|
40999
41278
|
heading: { $bind: {
|
|
@@ -41523,6 +41802,7 @@ const EVENT_REGISTRATION_SHELL_STEP_LABELS = [
|
|
|
41523
41802
|
];
|
|
41524
41803
|
const eventRegistrationPublicEventSchema = z.preprocess(normalizeEventRegistrationEventInput, publicEventSchema);
|
|
41525
41804
|
const eventRegistrationHydrationSchemaShape = {
|
|
41805
|
+
demoEmailSuppressed: z.boolean().optional(),
|
|
41526
41806
|
occurrenceContext: occurrenceContextSchema.optional(),
|
|
41527
41807
|
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
41528
41808
|
maxTickets: z.string().optional(),
|
|
@@ -41715,6 +41995,7 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
41715
41995
|
...eventSource,
|
|
41716
41996
|
events: [...scopedSourceEvents]
|
|
41717
41997
|
} : eventSource,
|
|
41998
|
+
demoEmailSuppressed: source.demoEmailSuppressed,
|
|
41718
41999
|
maxTickets: source.maxTickets ?? undefined,
|
|
41719
42000
|
showVenue: source.showVenue,
|
|
41720
42001
|
showCapacity: source.showCapacity,
|
|
@@ -41732,7 +42013,7 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
41732
42013
|
}
|
|
41733
42014
|
});
|
|
41734
42015
|
function normalizeEventRegistrationEventInput(value) {
|
|
41735
|
-
if (!isRecord$
|
|
42016
|
+
if (!isRecord$23(value)) {
|
|
41736
42017
|
return value;
|
|
41737
42018
|
}
|
|
41738
42019
|
return {
|
|
@@ -41740,7 +42021,7 @@ function normalizeEventRegistrationEventInput(value) {
|
|
|
41740
42021
|
destination: resolveRuntimeEventDestination(value)
|
|
41741
42022
|
};
|
|
41742
42023
|
}
|
|
41743
|
-
function isRecord$
|
|
42024
|
+
function isRecord$23(value) {
|
|
41744
42025
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
41745
42026
|
}
|
|
41746
42027
|
const eventRegistrationInteractiveIslandPropsCodec = createInteractiveIslandCodec({
|
|
@@ -41894,8 +42175,8 @@ const eventRegistrationManifest = createBlockManifest({
|
|
|
41894
42175
|
description: "Message shown after successful registration",
|
|
41895
42176
|
required: false,
|
|
41896
42177
|
multiline: true,
|
|
41897
|
-
|
|
41898
|
-
|
|
42178
|
+
maxLength: 500,
|
|
42179
|
+
ui: { placeholder: "Thank you for registering! Check your email for confirmation details." }
|
|
41899
42180
|
},
|
|
41900
42181
|
{
|
|
41901
42182
|
id: "buttonText",
|
|
@@ -41916,6 +42197,10 @@ const eventRegistrationManifest = createBlockManifest({
|
|
|
41916
42197
|
text({ as: "h2" }, bind("content.heading"), when("content.heading")),
|
|
41917
42198
|
richText({ className: "rb-prose rb-max-w-none" }, bind("content.description"), when("content.description")),
|
|
41918
42199
|
eventRegistration(withApiBindings({
|
|
42200
|
+
demoEmailSuppressed: { $bind: {
|
|
42201
|
+
from: "$root.demoEmailSuppressed",
|
|
42202
|
+
fallback: false
|
|
42203
|
+
} },
|
|
41919
42204
|
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
41920
42205
|
occurrenceContext: { $bind: { from: "$root.occurrenceContext" } },
|
|
41921
42206
|
subject: { $bind: { from: "$root.subject" } },
|
|
@@ -43664,6 +43949,13 @@ function buildEventListingInteractiveIslandProps(props$1) {
|
|
|
43664
43949
|
source: props$1
|
|
43665
43950
|
});
|
|
43666
43951
|
}
|
|
43952
|
+
/**
|
|
43953
|
+
* The card an events listing draws when nothing on the block changes it: the
|
|
43954
|
+
* block's own defaults, read through its render.
|
|
43955
|
+
*/
|
|
43956
|
+
function defaultEventListingCardProps() {
|
|
43957
|
+
return listingEventCardProps(eventListingBlockRuntime.buildRender({ siteId: "" }).display);
|
|
43958
|
+
}
|
|
43667
43959
|
|
|
43668
43960
|
//#endregion
|
|
43669
43961
|
//#region ../blocks/src/system/blocks/events/event-listing.ts
|
|
@@ -45106,6 +45398,10 @@ const shopManifest = createBlockManifest({
|
|
|
45106
45398
|
spacing: "spacious",
|
|
45107
45399
|
children: sectionContainer([shop(withApiBindings({
|
|
45108
45400
|
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
45401
|
+
demoEmailSuppressed: { $bind: {
|
|
45402
|
+
from: "$root.demoEmailSuppressed",
|
|
45403
|
+
fallback: false
|
|
45404
|
+
} },
|
|
45109
45405
|
mode: "passes-memberships",
|
|
45110
45406
|
showPasses: { $bind: {
|
|
45111
45407
|
from: "content.showPasses",
|
|
@@ -45607,11 +45903,12 @@ var cart_server_default = CartSSR;
|
|
|
45607
45903
|
|
|
45608
45904
|
//#endregion
|
|
45609
45905
|
//#region ../blocks/src/system/runtime/nodes/checkout.server.tsx
|
|
45610
|
-
function CheckoutSSR({ blockId, siteId, apiBaseUrl, stage, children, ...rest }) {
|
|
45906
|
+
function CheckoutSSR({ blockId, siteId, apiBaseUrl, stage, demoEmailSuppressed, children, ...rest }) {
|
|
45611
45907
|
const islandProps = buildCheckoutInteractiveIslandProps({
|
|
45612
45908
|
siteId,
|
|
45613
45909
|
apiBaseUrl,
|
|
45614
45910
|
stage,
|
|
45911
|
+
demoEmailSuppressed,
|
|
45615
45912
|
...rest
|
|
45616
45913
|
});
|
|
45617
45914
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
@@ -47633,14 +47930,14 @@ function isDecoratedHeadingBlockKind(blockKind) {
|
|
|
47633
47930
|
return blockKind === "block.intro" || blockKind === "block.feature-cards" || blockKind === "block.testimonials" || blockKind === "block.faq";
|
|
47634
47931
|
}
|
|
47635
47932
|
function readVariant(blockContent) {
|
|
47636
|
-
if (!isRecord$
|
|
47933
|
+
if (!isRecord$22(blockContent)) return undefined;
|
|
47637
47934
|
const variant = blockContent.variant;
|
|
47638
47935
|
return typeof variant === "string" ? variant : undefined;
|
|
47639
47936
|
}
|
|
47640
47937
|
function isFaqDecoratedVariant(variant) {
|
|
47641
47938
|
return variant === "default" || variant === "question-columns";
|
|
47642
47939
|
}
|
|
47643
|
-
function isRecord$
|
|
47940
|
+
function isRecord$22(value) {
|
|
47644
47941
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
47645
47942
|
}
|
|
47646
47943
|
function buildHeadingDecorationWrapperClassName(className) {
|
|
@@ -47668,8 +47965,8 @@ const META_PATH_TO_STORE_KEY = {
|
|
|
47668
47965
|
metaTitle: "draftMetaTitle",
|
|
47669
47966
|
metaDescription: "draftMetaDescription"
|
|
47670
47967
|
};
|
|
47671
|
-
function mapMetaPathToStoreKey(path$
|
|
47672
|
-
return META_PATH_TO_STORE_KEY[path$
|
|
47968
|
+
function mapMetaPathToStoreKey(path$4) {
|
|
47969
|
+
return META_PATH_TO_STORE_KEY[path$4] ?? path$4;
|
|
47673
47970
|
}
|
|
47674
47971
|
const PATH_SEPARATOR_REGEX = /\./g;
|
|
47675
47972
|
const BRACKET_ACCESS_REGEX = /\[([^\]]+)\]/g;
|
|
@@ -47709,8 +48006,8 @@ function extractSegmentsFromPart(part) {
|
|
|
47709
48006
|
* Splits a path string into an array of segments.
|
|
47710
48007
|
* Supports dot notation (a.b.c), bracket notation (a[0]), and mixed (a.b[0].c).
|
|
47711
48008
|
*/
|
|
47712
|
-
function splitPath$1(path$
|
|
47713
|
-
return path$
|
|
48009
|
+
function splitPath$1(path$4) {
|
|
48010
|
+
return path$4.split(PATH_SEPARATOR_REGEX).flatMap(extractSegmentsFromPart).filter((segment) => segment !== "");
|
|
47714
48011
|
}
|
|
47715
48012
|
/**
|
|
47716
48013
|
* Converts path segments back to a dot-notation string.
|
|
@@ -47736,8 +48033,8 @@ function previewEditableTargetToFieldKey(target) {
|
|
|
47736
48033
|
fieldPath: target.fieldPath
|
|
47737
48034
|
};
|
|
47738
48035
|
}
|
|
47739
|
-
function blockIdFromEditorPath(path$
|
|
47740
|
-
const match = /^blocks\.([^.]+)\./.exec(path$
|
|
48036
|
+
function blockIdFromEditorPath(path$4) {
|
|
48037
|
+
const match = /^blocks\.([^.]+)\./.exec(path$4);
|
|
47741
48038
|
return match?.[1] ?? "";
|
|
47742
48039
|
}
|
|
47743
48040
|
function previewEditableTargetFieldConstraints(target, context) {
|
|
@@ -47789,8 +48086,8 @@ function derivePreviewLinkedEntryFieldBinding(node, parsedBinding, context) {
|
|
|
47789
48086
|
displayPath: eligibility.displayPath
|
|
47790
48087
|
};
|
|
47791
48088
|
}
|
|
47792
|
-
function stripNumericPathSegments(path$
|
|
47793
|
-
return path$
|
|
48089
|
+
function stripNumericPathSegments(path$4) {
|
|
48090
|
+
return path$4.split(".").filter((segment) => !/^\d+$/.test(segment)).join(".");
|
|
47794
48091
|
}
|
|
47795
48092
|
/**
|
|
47796
48093
|
* Resolves a binding path to absolute segments for editor/media metadata injection.
|
|
@@ -48286,8 +48583,8 @@ function resolveRepeater(node, context) {
|
|
|
48286
48583
|
* Helper to walk a nested path through a bindings object.
|
|
48287
48584
|
* Example: getNestedBinding({ ctas: { primary: { label: 'text' } } }, 'ctas.primary.label') → 'text'
|
|
48288
48585
|
*/
|
|
48289
|
-
function getNestedBinding(bindings, path$
|
|
48290
|
-
const segments = path$
|
|
48586
|
+
function getNestedBinding(bindings, path$4) {
|
|
48587
|
+
const segments = path$4.split(".");
|
|
48291
48588
|
let current = bindings;
|
|
48292
48589
|
for (const segment of segments) {
|
|
48293
48590
|
if (!isPlainObject$5(current)) return undefined;
|
|
@@ -48316,13 +48613,13 @@ function resolveBindingToEditorPath(fieldName, bindings, editableRouteMetadataFi
|
|
|
48316
48613
|
if (isPlainObject$5(binding) && "source" in binding) {
|
|
48317
48614
|
const source = binding.source;
|
|
48318
48615
|
if (source === "field" && "path" in binding) {
|
|
48319
|
-
const path$
|
|
48320
|
-
return typeof path$
|
|
48616
|
+
const path$4 = binding.path;
|
|
48617
|
+
return typeof path$4 === "string" ? `content.${path$4}` : null;
|
|
48321
48618
|
}
|
|
48322
48619
|
if (source === "meta" && "path" in binding) {
|
|
48323
|
-
const path$
|
|
48324
|
-
if (typeof path$
|
|
48325
|
-
const mappedPath = mapMetaPathToStoreKey(path$
|
|
48620
|
+
const path$4 = binding.path;
|
|
48621
|
+
if (typeof path$4 !== "string") return null;
|
|
48622
|
+
const mappedPath = mapMetaPathToStoreKey(path$4);
|
|
48326
48623
|
return isMetadataFieldEditable(mappedPath) ? "metadata." + mappedPath : null;
|
|
48327
48624
|
}
|
|
48328
48625
|
if (source === "fallback" && "options" in binding) {
|
|
@@ -48335,13 +48632,13 @@ function resolveBindingToEditorPath(fieldName, bindings, editableRouteMetadataFi
|
|
|
48335
48632
|
if (isPlainObject$5(option) && "source" in option) {
|
|
48336
48633
|
const optSource = option.source;
|
|
48337
48634
|
if (optSource === "field" && "path" in option) {
|
|
48338
|
-
const path$
|
|
48339
|
-
return typeof path$
|
|
48635
|
+
const path$4 = option.path;
|
|
48636
|
+
return typeof path$4 === "string" ? `content.${path$4}` : null;
|
|
48340
48637
|
}
|
|
48341
48638
|
if (optSource === "meta" && "path" in option) {
|
|
48342
|
-
const path$
|
|
48343
|
-
if (typeof path$
|
|
48344
|
-
const mappedPath = mapMetaPathToStoreKey(path$
|
|
48639
|
+
const path$4 = option.path;
|
|
48640
|
+
if (typeof path$4 !== "string") return null;
|
|
48641
|
+
const mappedPath = mapMetaPathToStoreKey(path$4);
|
|
48345
48642
|
return isMetadataFieldEditable(mappedPath) ? "metadata." + mappedPath : null;
|
|
48346
48643
|
}
|
|
48347
48644
|
}
|
|
@@ -48417,22 +48714,22 @@ function injectEditorPath(props$1, node, parsedBinding, context) {
|
|
|
48417
48714
|
};
|
|
48418
48715
|
}
|
|
48419
48716
|
const editableTarget = derivePreviewTextEditableTarget(parsedBinding, context);
|
|
48420
|
-
const path$
|
|
48421
|
-
if (!path$
|
|
48717
|
+
const path$4 = previewEditableTargetToPath(editableTarget);
|
|
48718
|
+
if (!path$4) return propsWithPlaceholder;
|
|
48422
48719
|
if (node.type === "text") {
|
|
48423
48720
|
const constraints = previewEditableTargetFieldConstraints(editableTarget, context);
|
|
48424
48721
|
return constraints ? {
|
|
48425
48722
|
...propsWithPlaceholder,
|
|
48426
|
-
path: path$
|
|
48723
|
+
path: path$4,
|
|
48427
48724
|
...constraints
|
|
48428
48725
|
} : {
|
|
48429
48726
|
...propsWithPlaceholder,
|
|
48430
|
-
path: path$
|
|
48727
|
+
path: path$4
|
|
48431
48728
|
};
|
|
48432
48729
|
}
|
|
48433
48730
|
return {
|
|
48434
48731
|
...propsWithPlaceholder,
|
|
48435
|
-
path: path$
|
|
48732
|
+
path: path$4
|
|
48436
48733
|
};
|
|
48437
48734
|
}
|
|
48438
48735
|
/**
|
|
@@ -48762,11 +49059,11 @@ function readTreatment(kind, value) {
|
|
|
48762
49059
|
};
|
|
48763
49060
|
}
|
|
48764
49061
|
function readBlockComposition(value) {
|
|
48765
|
-
if (!isRecord$
|
|
49062
|
+
if (!isRecord$21(value) || typeof value.kind !== "string") return null;
|
|
48766
49063
|
if (!isCompositionKind(value.kind)) return null;
|
|
48767
49064
|
return readTreatment(value.kind, value.treatment);
|
|
48768
49065
|
}
|
|
48769
|
-
function isRecord$
|
|
49066
|
+
function isRecord$21(value) {
|
|
48770
49067
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
48771
49068
|
}
|
|
48772
49069
|
|
|
@@ -52424,6 +52721,7 @@ function buildPageRendererRootRuntime(dataContext) {
|
|
|
52424
52721
|
const { siteId = null, siteName, pageId = null, pathname = null, bookingTimeZone, previewStage = "published", apiBaseUrl = null, portalToken = null, readAuthority, bookingOfferingPresets = [], appointmentServicePathPrefix = null, mailingList = { tag: "not_configured" }, eventRegistrationOverlayEnabled = false, loaderFailures = {} } = dataContext ?? {};
|
|
52425
52722
|
return {
|
|
52426
52723
|
siteId,
|
|
52724
|
+
demoEmailSuppressed: resolveDemoEmailSuppression(dataContext),
|
|
52427
52725
|
siteName,
|
|
52428
52726
|
pageId,
|
|
52429
52727
|
pathname,
|
|
@@ -52439,6 +52737,9 @@ function buildPageRendererRootRuntime(dataContext) {
|
|
|
52439
52737
|
loaderFailures
|
|
52440
52738
|
};
|
|
52441
52739
|
}
|
|
52740
|
+
function resolveDemoEmailSuppression(dataContext) {
|
|
52741
|
+
return dataContext?.demoEmailSuppressed === true;
|
|
52742
|
+
}
|
|
52442
52743
|
|
|
52443
52744
|
//#endregion
|
|
52444
52745
|
//#region ../blocks/src/pageRenderAudience.tsx
|
|
@@ -52584,11 +52885,11 @@ function shouldDebugCustomBlocks() {
|
|
|
52584
52885
|
* @param path - Dot notation path (e.g., "headline" or "nested.field")
|
|
52585
52886
|
* @returns The resolved value or undefined if not found
|
|
52586
52887
|
*/
|
|
52587
|
-
function resolveFieldPath(obj, path$
|
|
52888
|
+
function resolveFieldPath(obj, path$4) {
|
|
52588
52889
|
if (!obj || typeof obj !== "object") {
|
|
52589
52890
|
return undefined;
|
|
52590
52891
|
}
|
|
52591
|
-
const keys = path$
|
|
52892
|
+
const keys = path$4.split(".");
|
|
52592
52893
|
let current = obj;
|
|
52593
52894
|
for (const key of keys) {
|
|
52594
52895
|
if (current == null || typeof current !== "object") {
|
|
@@ -52604,8 +52905,8 @@ function resolveFieldPath(obj, path$3) {
|
|
|
52604
52905
|
* @param path - Dot notation path
|
|
52605
52906
|
* @returns String representation of the value, or empty string if not found
|
|
52606
52907
|
*/
|
|
52607
|
-
function resolveFieldPathAsString(obj, path$
|
|
52608
|
-
const value = resolveFieldPath(obj, path$
|
|
52908
|
+
function resolveFieldPathAsString(obj, path$4) {
|
|
52909
|
+
const value = resolveFieldPath(obj, path$4);
|
|
52609
52910
|
if (value == null) {
|
|
52610
52911
|
return "";
|
|
52611
52912
|
}
|
|
@@ -52818,11 +53119,11 @@ function strictValidationContext(options = {}) {
|
|
|
52818
53119
|
allowNull: options.allowNull ?? false
|
|
52819
53120
|
};
|
|
52820
53121
|
}
|
|
52821
|
-
function formatFieldPath$1(path$
|
|
52822
|
-
return path$
|
|
53122
|
+
function formatFieldPath$1(path$4) {
|
|
53123
|
+
return path$4.map((segment) => String(segment)).join(".");
|
|
52823
53124
|
}
|
|
52824
|
-
function toZodIssuePath(path$
|
|
52825
|
-
return [...path$
|
|
53125
|
+
function toZodIssuePath(path$4) {
|
|
53126
|
+
return [...path$4];
|
|
52826
53127
|
}
|
|
52827
53128
|
function parseFieldPathKey(key) {
|
|
52828
53129
|
if (!key) return [];
|
|
@@ -52866,24 +53167,24 @@ function pluralize(label, count) {
|
|
|
52866
53167
|
function valueContractForField(field) {
|
|
52867
53168
|
return field.ui?.valueContract === "boxBackground" ? { valueContract: "boxBackground" } : {};
|
|
52868
53169
|
}
|
|
52869
|
-
function deriveTabGroupValidationPlan(field, path$
|
|
53170
|
+
function deriveTabGroupValidationPlan(field, path$4, required) {
|
|
52870
53171
|
return {
|
|
52871
|
-
...makePlan("group", "object", field, path$
|
|
53172
|
+
...makePlan("group", "object", field, path$4, required, requiredConstraints(required)),
|
|
52872
53173
|
...valueContractForField(field),
|
|
52873
53174
|
childSelection: field.activeTabField ? {
|
|
52874
53175
|
kind: "discriminatedTabs",
|
|
52875
53176
|
activeTabField: field.activeTabField,
|
|
52876
53177
|
tabs: field.tabs.map((tab) => ({
|
|
52877
53178
|
typeId: tab.id,
|
|
52878
|
-
fields: deriveNestedFieldPlans(tab.fields, path$
|
|
53179
|
+
fields: deriveNestedFieldPlans(tab.fields, path$4)
|
|
52879
53180
|
}))
|
|
52880
53181
|
} : {
|
|
52881
53182
|
kind: "all",
|
|
52882
|
-
fields: field.tabs.flatMap((tab) => deriveNestedFieldPlans(tab.fields, path$
|
|
53183
|
+
fields: field.tabs.flatMap((tab) => deriveNestedFieldPlans(tab.fields, path$4))
|
|
52883
53184
|
}
|
|
52884
53185
|
};
|
|
52885
53186
|
}
|
|
52886
|
-
function deriveFieldValidationPlan(field, path$
|
|
53187
|
+
function deriveFieldValidationPlan(field, path$4 = [field.id]) {
|
|
52887
53188
|
const required = Boolean(field.required);
|
|
52888
53189
|
switch (field.type) {
|
|
52889
53190
|
case "text": {
|
|
@@ -52898,7 +53199,7 @@ function deriveFieldValidationPlan(field, path$3 = [field.id]) {
|
|
|
52898
53199
|
kind: "numberMax",
|
|
52899
53200
|
maximum: field.ui.max
|
|
52900
53201
|
});
|
|
52901
|
-
return makePlan("number", "number", field, path$
|
|
53202
|
+
return makePlan("number", "number", field, path$4, required, constraints$1);
|
|
52902
53203
|
}
|
|
52903
53204
|
const constraints = commonConstraints(required, { kind: field.ui?.widget === "iconPicker" ? "blockIconValue" : "textType" });
|
|
52904
53205
|
if (inputType === "email") constraints.push({ kind: "emailFormat" });
|
|
@@ -52911,7 +53212,7 @@ function deriveFieldValidationPlan(field, path$3 = [field.id]) {
|
|
|
52911
53212
|
kind: "maxLength",
|
|
52912
53213
|
maximum: field.maxLength
|
|
52913
53214
|
});
|
|
52914
|
-
return makePlan("string", "string", field, path$
|
|
53215
|
+
return makePlan("string", "string", field, path$4, required, constraints);
|
|
52915
53216
|
}
|
|
52916
53217
|
case "number": {
|
|
52917
53218
|
const constraints = commonConstraints(required, { kind: "numberType" });
|
|
@@ -52923,7 +53224,7 @@ function deriveFieldValidationPlan(field, path$3 = [field.id]) {
|
|
|
52923
53224
|
kind: "numberMax",
|
|
52924
53225
|
maximum: field.max
|
|
52925
53226
|
});
|
|
52926
|
-
return makePlan("number", "number", field, path$
|
|
53227
|
+
return makePlan("number", "number", field, path$4, required, constraints);
|
|
52927
53228
|
}
|
|
52928
53229
|
case "slug": {
|
|
52929
53230
|
const constraints = commonConstraints(required, { kind: "textType" }, { kind: "slugFormat" });
|
|
@@ -52931,22 +53232,22 @@ function deriveFieldValidationPlan(field, path$3 = [field.id]) {
|
|
|
52931
53232
|
kind: "maxLength",
|
|
52932
53233
|
maximum: field.maxLength
|
|
52933
53234
|
});
|
|
52934
|
-
return makePlan("string", "string", field, path$
|
|
53235
|
+
return makePlan("string", "string", field, path$4, required, constraints);
|
|
52935
53236
|
}
|
|
52936
|
-
case "url": return makePlan("string", "string", field, path$
|
|
53237
|
+
case "url": return makePlan("string", "string", field, path$4, required, commonConstraints(required, { kind: "textType" }, {
|
|
52937
53238
|
kind: "urlFormat",
|
|
52938
53239
|
allowRelative: Boolean(field.allowRelative)
|
|
52939
53240
|
}));
|
|
52940
|
-
case "reference": return makePlan("string", "string", field, path$
|
|
52941
|
-
case "date": return makePlan("string", "string", field, path$
|
|
52942
|
-
case "time": return makePlan("string", "string", field, path$
|
|
52943
|
-
case "datetime": return makePlan("string", "string", field, path$
|
|
52944
|
-
case "select": return makePlan("select", "select", field, path$
|
|
53241
|
+
case "reference": return makePlan("string", "string", field, path$4, required, commonConstraints(required, { kind: "referenceText" }));
|
|
53242
|
+
case "date": return makePlan("string", "string", field, path$4, required, commonConstraints(required, { kind: "textType" }, { kind: "dateFormat" }));
|
|
53243
|
+
case "time": return makePlan("string", "string", field, path$4, required, commonConstraints(required, { kind: "textType" }, { kind: "timeFormat" }));
|
|
53244
|
+
case "datetime": return makePlan("string", "string", field, path$4, required, commonConstraints(required, { kind: "textType" }, { kind: "datetimeFormat" }));
|
|
53245
|
+
case "select": return makePlan("select", "select", field, path$4, required, commonConstraints(required, {
|
|
52945
53246
|
kind: "selectOption",
|
|
52946
53247
|
source: resolveSelectConstraintSource(field),
|
|
52947
53248
|
multiple: Boolean(field.multiple)
|
|
52948
53249
|
}));
|
|
52949
|
-
case "richText": return makePlan("richText", "object", field, path$
|
|
53250
|
+
case "richText": return makePlan("richText", "object", field, path$4, required, commonConstraints(required, { kind: "richTextDoc" }));
|
|
52950
53251
|
case "inlineText": {
|
|
52951
53252
|
const constraints = commonConstraints(required, { kind: "inlineText" });
|
|
52952
53253
|
if (typeof field.maxLength === "number") {
|
|
@@ -52956,38 +53257,38 @@ function deriveFieldValidationPlan(field, path$3 = [field.id]) {
|
|
|
52956
53257
|
});
|
|
52957
53258
|
}
|
|
52958
53259
|
return {
|
|
52959
|
-
...makePlan("inlineText", "array", field, path$
|
|
53260
|
+
...makePlan("inlineText", "array", field, path$4, required, constraints),
|
|
52960
53261
|
...field.plainTextField ? { plainTextFallbackPath: parseFieldPathKey(field.plainTextField) } : {}
|
|
52961
53262
|
};
|
|
52962
53263
|
}
|
|
52963
53264
|
case "media":
|
|
52964
53265
|
case "file": {
|
|
52965
|
-
const plan = makePlan("media", "object", field, path$
|
|
53266
|
+
const plan = makePlan("media", "object", field, path$4, required, commonConstraints(required, { kind: "mediaObject" }));
|
|
52966
53267
|
return {
|
|
52967
53268
|
...plan,
|
|
52968
53269
|
allowedMediaTypes: field.type === "media" ? field.mediaKinds ?? DEFAULT_MEDIA_FIELD_KINDS : field.fileKinds ?? PUBLIC_FILE_FIELD_KINDS
|
|
52969
53270
|
};
|
|
52970
53271
|
}
|
|
52971
|
-
case "link": return makePlan("link", "object", field, path$
|
|
52972
|
-
case "boolean": return makePlan("boolean", "boolean", field, path$
|
|
53272
|
+
case "link": return makePlan("link", "object", field, path$4, required, commonConstraints(required, { kind: "linkObject" }));
|
|
53273
|
+
case "boolean": return makePlan("boolean", "boolean", field, path$4, required, requiredConstraints(required));
|
|
52973
53274
|
case "repeater": return {
|
|
52974
|
-
...makePlan("repeater", "array", field, path$
|
|
52975
|
-
...field.polymorphic && field.itemTypes ? { repeatedItemVariants: deriveRepeatedItemVariants(field, [...path$
|
|
53275
|
+
...makePlan("repeater", "array", field, path$4, required, commonConstraints(required, { kind: "arrayType" })),
|
|
53276
|
+
...field.polymorphic && field.itemTypes ? { repeatedItemVariants: deriveRepeatedItemVariants(field, [...path$4, 0]) } : { repeatedItemPlan: deriveNestedFieldPlans(getRepeaterFields(field), [...path$4, 0]) },
|
|
52976
53277
|
constraints: withRepeaterItemConstraints(field, commonConstraints(required, { kind: "arrayType" }))
|
|
52977
53278
|
};
|
|
52978
53279
|
case "group":
|
|
52979
53280
|
case "modal": return {
|
|
52980
|
-
...makePlan("group", "object", field, path$
|
|
53281
|
+
...makePlan("group", "object", field, path$4, required, requiredConstraints(required)),
|
|
52981
53282
|
childSelection: {
|
|
52982
53283
|
kind: "all",
|
|
52983
|
-
fields: deriveNestedFieldPlans(field.schema?.fields ?? [], path$
|
|
53284
|
+
fields: deriveNestedFieldPlans(field.schema?.fields ?? [], path$4)
|
|
52984
53285
|
},
|
|
52985
53286
|
allowNullChildren: field.type === "group" && field.ui?.widget === "locationPicker"
|
|
52986
53287
|
};
|
|
52987
|
-
case "tabGroup": return deriveTabGroupValidationPlan(field, path$
|
|
53288
|
+
case "tabGroup": return deriveTabGroupValidationPlan(field, path$4, required);
|
|
52988
53289
|
case "presetOrCustom":
|
|
52989
53290
|
case "contentTypeSelect":
|
|
52990
|
-
case "entryPicker": return makePlan("passthrough", "unknown", field, path$
|
|
53291
|
+
case "entryPicker": return makePlan("passthrough", "unknown", field, path$4, false, []);
|
|
52991
53292
|
default: return assertNever$5(field);
|
|
52992
53293
|
}
|
|
52993
53294
|
}
|
|
@@ -53000,14 +53301,14 @@ function commonConstraints(required, ...specific) {
|
|
|
53000
53301
|
function requiredConstraints(required) {
|
|
53001
53302
|
return required ? [{ kind: "required" }] : [];
|
|
53002
53303
|
}
|
|
53003
|
-
function makePlan(kind, valueKind, field, path$
|
|
53304
|
+
function makePlan(kind, valueKind, field, path$4, required, constraints) {
|
|
53004
53305
|
return {
|
|
53005
53306
|
kind,
|
|
53006
53307
|
valueKind,
|
|
53007
53308
|
fieldId: field.id,
|
|
53008
53309
|
label: field.label,
|
|
53009
53310
|
fieldType: field.type,
|
|
53010
|
-
path: path$
|
|
53311
|
+
path: path$4,
|
|
53011
53312
|
required,
|
|
53012
53313
|
visibility: fieldVisibility(field),
|
|
53013
53314
|
constraints
|
|
@@ -53238,8 +53539,8 @@ function normalizeInlineTextFallbacks(plans, values, ctx) {
|
|
|
53238
53539
|
values[plan.fieldId] = normalizeFieldValue(plan, plainTextToInlineText(fallback), ctx);
|
|
53239
53540
|
}
|
|
53240
53541
|
}
|
|
53241
|
-
function getAtFieldPath(source, path$
|
|
53242
|
-
return path$
|
|
53542
|
+
function getAtFieldPath(source, path$4) {
|
|
53543
|
+
return path$4.reduce((current, segment) => {
|
|
53243
53544
|
if (!current || typeof current !== "object" || Array.isArray(current)) return undefined;
|
|
53244
53545
|
return current[String(segment)];
|
|
53245
53546
|
}, source);
|
|
@@ -53432,11 +53733,11 @@ function materializeRepeaterItemPlan(plan, parentPath, index) {
|
|
|
53432
53733
|
return rebaseFieldPlanPath(plan, [...parentPath, 0], [...parentPath, index]);
|
|
53433
53734
|
}
|
|
53434
53735
|
function rebaseFieldPlanPath(plan, fromPrefix, toPrefix) {
|
|
53435
|
-
const path$
|
|
53736
|
+
const path$4 = rebaseFieldPath(plan.path, fromPrefix, toPrefix);
|
|
53436
53737
|
switch (plan.kind) {
|
|
53437
53738
|
case "group": return {
|
|
53438
53739
|
...plan,
|
|
53439
|
-
path: path$
|
|
53740
|
+
path: path$4,
|
|
53440
53741
|
childSelection: plan.childSelection.kind === "all" ? {
|
|
53441
53742
|
kind: "all",
|
|
53442
53743
|
fields: plan.childSelection.fields.map((childPlan) => rebaseFieldPlanPath(childPlan, fromPrefix, toPrefix))
|
|
@@ -53450,7 +53751,7 @@ function rebaseFieldPlanPath(plan, fromPrefix, toPrefix) {
|
|
|
53450
53751
|
};
|
|
53451
53752
|
case "repeater": return {
|
|
53452
53753
|
...plan,
|
|
53453
|
-
path: path$
|
|
53754
|
+
path: path$4,
|
|
53454
53755
|
...plan.repeatedItemVariants ? { repeatedItemVariants: plan.repeatedItemVariants.map((variant) => ({
|
|
53455
53756
|
...variant,
|
|
53456
53757
|
fields: variant.fields.map((fieldPlan) => rebaseFieldPlanPath(fieldPlan, fromPrefix, toPrefix))
|
|
@@ -53467,7 +53768,7 @@ function rebaseFieldPlanPath(plan, fromPrefix, toPrefix) {
|
|
|
53467
53768
|
case "select":
|
|
53468
53769
|
case "passthrough": return {
|
|
53469
53770
|
...plan,
|
|
53470
|
-
path: path$
|
|
53771
|
+
path: path$4
|
|
53471
53772
|
};
|
|
53472
53773
|
default: return assertNever$5(plan);
|
|
53473
53774
|
}
|
|
@@ -53482,14 +53783,14 @@ function validateInlineTextPlan(plan, value) {
|
|
|
53482
53783
|
}
|
|
53483
53784
|
return [];
|
|
53484
53785
|
}
|
|
53485
|
-
function rebaseFieldPath(path$
|
|
53486
|
-
if (!startsWithFieldPath(path$
|
|
53487
|
-
throw new Error(`Cannot rebase field path ${formatFieldPath$1(path$
|
|
53786
|
+
function rebaseFieldPath(path$4, fromPrefix, toPrefix) {
|
|
53787
|
+
if (!startsWithFieldPath(path$4, fromPrefix)) {
|
|
53788
|
+
throw new Error(`Cannot rebase field path ${formatFieldPath$1(path$4)} from ${formatFieldPath$1(fromPrefix)}`);
|
|
53488
53789
|
}
|
|
53489
|
-
return [...toPrefix, ...path$
|
|
53790
|
+
return [...toPrefix, ...path$4.slice(fromPrefix.length)];
|
|
53490
53791
|
}
|
|
53491
|
-
function startsWithFieldPath(path$
|
|
53492
|
-
return prefix.every((segment, index) => path$
|
|
53792
|
+
function startsWithFieldPath(path$4, prefix) {
|
|
53793
|
+
return prefix.every((segment, index) => path$4[index] === segment);
|
|
53493
53794
|
}
|
|
53494
53795
|
function issue(plan, kind, extra) {
|
|
53495
53796
|
return {
|
|
@@ -53537,8 +53838,8 @@ function fieldPlanToStoredObjectPropertyZod(plan) {
|
|
|
53537
53838
|
}
|
|
53538
53839
|
function addFieldIssueToZodContext(zodCtx, validationIssue, rootPath) {
|
|
53539
53840
|
const message = fieldIssueToMessage(validationIssue);
|
|
53540
|
-
const path$
|
|
53541
|
-
const issuePath = path$
|
|
53841
|
+
const path$4 = relativeZodIssuePath(validationIssue.path, rootPath);
|
|
53842
|
+
const issuePath = path$4.length > 0 ? { path: toZodIssuePath(path$4) } : {};
|
|
53542
53843
|
switch (validationIssue.kind) {
|
|
53543
53844
|
case "required":
|
|
53544
53845
|
if (validationIssue.emptyOrigin) {
|
|
@@ -53606,36 +53907,36 @@ function addFieldIssueToZodContext(zodCtx, validationIssue, rootPath) {
|
|
|
53606
53907
|
default: assertNever$5(validationIssue);
|
|
53607
53908
|
}
|
|
53608
53909
|
}
|
|
53609
|
-
function relativeZodIssuePath(path$
|
|
53610
|
-
return startsWithFieldPath(path$
|
|
53910
|
+
function relativeZodIssuePath(path$4, rootPath) {
|
|
53911
|
+
return startsWithFieldPath(path$4, rootPath) ? path$4.slice(rootPath.length) : path$4;
|
|
53611
53912
|
}
|
|
53612
|
-
function resolveFieldValidationDescriptor(plans, path$
|
|
53613
|
-
const plan = findFieldValidationPlan(plans, path$
|
|
53913
|
+
function resolveFieldValidationDescriptor(plans, path$4) {
|
|
53914
|
+
const plan = findFieldValidationPlan(plans, path$4);
|
|
53614
53915
|
return plan ? fieldValidationDescriptor(plan) : null;
|
|
53615
53916
|
}
|
|
53616
|
-
function findFieldValidationPlan(plans, path$
|
|
53917
|
+
function findFieldValidationPlan(plans, path$4) {
|
|
53617
53918
|
for (const plan of plans) {
|
|
53618
|
-
if (sameFieldPath(plan.path, path$
|
|
53919
|
+
if (sameFieldPath(plan.path, path$4)) {
|
|
53619
53920
|
return plan;
|
|
53620
53921
|
}
|
|
53621
|
-
const nested = findNestedFieldValidationPlan(plan, path$
|
|
53922
|
+
const nested = findNestedFieldValidationPlan(plan, path$4);
|
|
53622
53923
|
if (nested) {
|
|
53623
53924
|
return nested;
|
|
53624
53925
|
}
|
|
53625
53926
|
}
|
|
53626
53927
|
return null;
|
|
53627
53928
|
}
|
|
53628
|
-
function findNestedFieldValidationPlan(plan, path$
|
|
53929
|
+
function findNestedFieldValidationPlan(plan, path$4) {
|
|
53629
53930
|
switch (plan.kind) {
|
|
53630
|
-
case "group": return findFieldValidationPlan(allGroupChildPlans(plan), path$
|
|
53931
|
+
case "group": return findFieldValidationPlan(allGroupChildPlans(plan), path$4);
|
|
53631
53932
|
case "repeater": {
|
|
53632
|
-
const index = path$
|
|
53933
|
+
const index = path$4[plan.path.length];
|
|
53633
53934
|
if (typeof index !== "number") {
|
|
53634
53935
|
return null;
|
|
53635
53936
|
}
|
|
53636
53937
|
const childPlans = plan.repeatedItemVariants ? plan.repeatedItemVariants.flatMap((variant) => variant.fields) : plan.repeatedItemPlan ?? [];
|
|
53637
53938
|
const materialized = childPlans.map((childPlan) => materializeRepeaterItemPlan(childPlan, plan.path, index));
|
|
53638
|
-
return findFieldValidationPlan(materialized, path$
|
|
53939
|
+
return findFieldValidationPlan(materialized, path$4);
|
|
53639
53940
|
}
|
|
53640
53941
|
case "string":
|
|
53641
53942
|
case "number":
|
|
@@ -53836,8 +54137,8 @@ function compileManifestContentContract(manifestOrFields) {
|
|
|
53836
54137
|
findNonPortableMediaPaths: (content) => findNonPortableMediaPaths(plans, content)
|
|
53837
54138
|
}) });
|
|
53838
54139
|
}
|
|
53839
|
-
function resolveManifestContentFieldDescriptor(contract, path$
|
|
53840
|
-
return resolveFieldValidationDescriptor(contract[compiledManifestContentContract].plans, path$
|
|
54140
|
+
function resolveManifestContentFieldDescriptor(contract, path$4) {
|
|
54141
|
+
return resolveFieldValidationDescriptor(contract[compiledManifestContentContract].plans, path$4);
|
|
53841
54142
|
}
|
|
53842
54143
|
/**
|
|
53843
54144
|
* Reports declared media fields carrying environment-specific keys.
|
|
@@ -54014,21 +54315,21 @@ function collectNonPortablePlannedMedia(plans, content, parentPath, paths) {
|
|
|
54014
54315
|
for (const plan of plans) {
|
|
54015
54316
|
if (!(plan.fieldId in content)) continue;
|
|
54016
54317
|
const value = content[plan.fieldId];
|
|
54017
|
-
const path$
|
|
54318
|
+
const path$4 = [...parentPath, plan.fieldId];
|
|
54018
54319
|
switch (plan.kind) {
|
|
54019
54320
|
case "media":
|
|
54020
54321
|
if (isPlainRecord(value) && hasEnvironmentSpecificMediaField(value)) {
|
|
54021
|
-
paths.add(formatFieldPath$1(path$
|
|
54322
|
+
paths.add(formatFieldPath$1(path$4));
|
|
54022
54323
|
}
|
|
54023
54324
|
break;
|
|
54024
54325
|
case "richText":
|
|
54025
|
-
collectNonPortableRichTextImages(value, path$
|
|
54326
|
+
collectNonPortableRichTextImages(value, path$4, paths);
|
|
54026
54327
|
break;
|
|
54027
54328
|
case "group":
|
|
54028
|
-
collectNonPortablePlannedMedia(selectedGroupChildPlans(plan, value), value, path$
|
|
54329
|
+
collectNonPortablePlannedMedia(selectedGroupChildPlans(plan, value), value, path$4, paths);
|
|
54029
54330
|
break;
|
|
54030
54331
|
case "repeater":
|
|
54031
|
-
collectNonPortableRepeaterMedia(plan, value, path$
|
|
54332
|
+
collectNonPortableRepeaterMedia(plan, value, path$4, paths);
|
|
54032
54333
|
break;
|
|
54033
54334
|
case "string":
|
|
54034
54335
|
case "number":
|
|
@@ -54040,20 +54341,20 @@ function collectNonPortablePlannedMedia(plans, content, parentPath, paths) {
|
|
|
54040
54341
|
}
|
|
54041
54342
|
}
|
|
54042
54343
|
}
|
|
54043
|
-
function collectNonPortableRepeaterMedia(plan, value, path$
|
|
54344
|
+
function collectNonPortableRepeaterMedia(plan, value, path$4, paths) {
|
|
54044
54345
|
if (!Array.isArray(value)) return;
|
|
54045
54346
|
value.forEach((item, index) => {
|
|
54046
54347
|
if (!isPlainRecord(item)) return;
|
|
54047
54348
|
const childPlans = plan.repeatedItemVariants ? plan.repeatedItemVariants.find((variant) => variant.typeId === item._type)?.fields : plan.repeatedItemPlan;
|
|
54048
54349
|
if (childPlans) {
|
|
54049
|
-
collectNonPortablePlannedMedia(childPlans, item, [...path$
|
|
54350
|
+
collectNonPortablePlannedMedia(childPlans, item, [...path$4, index], paths);
|
|
54050
54351
|
}
|
|
54051
54352
|
});
|
|
54052
54353
|
}
|
|
54053
|
-
function collectNonPortableRichTextImages(value, path$
|
|
54354
|
+
function collectNonPortableRichTextImages(value, path$4, paths) {
|
|
54054
54355
|
const images = [];
|
|
54055
54356
|
walkAndCollectImageAttrs(value, images);
|
|
54056
|
-
const prefix = formatFieldPath$1(path$
|
|
54357
|
+
const prefix = formatFieldPath$1(path$4);
|
|
54057
54358
|
for (const reference of images) {
|
|
54058
54359
|
if (hasEnvironmentSpecificMediaField(reference.attrs)) {
|
|
54059
54360
|
paths.add(reference.location ? `${prefix}.${reference.location}` : prefix);
|
|
@@ -57587,6 +57888,10 @@ const bookingDescription = richText({}, bind("content.description"), when("conte
|
|
|
57587
57888
|
* that hydration never rewrites.
|
|
57588
57889
|
*/
|
|
57589
57890
|
const bookingWizard = bookingForm(withApiBindings({
|
|
57891
|
+
demoEmailSuppressed: { $bind: {
|
|
57892
|
+
from: "$root.demoEmailSuppressed",
|
|
57893
|
+
fallback: false
|
|
57894
|
+
} },
|
|
57590
57895
|
portalToken: { $bind: {
|
|
57591
57896
|
from: "$root.portalToken",
|
|
57592
57897
|
fallback: null
|
|
@@ -58450,14 +58755,14 @@ const eventSpotlightBlockDefinition = {
|
|
|
58450
58755
|
|
|
58451
58756
|
//#endregion
|
|
58452
58757
|
//#region ../blocks/src/system/blocks/events/migrations.ts
|
|
58453
|
-
function isRecord$
|
|
58758
|
+
function isRecord$20(value) {
|
|
58454
58759
|
return typeof value === "object" && value !== null;
|
|
58455
58760
|
}
|
|
58456
58761
|
function readString(value) {
|
|
58457
58762
|
return typeof value === "string" && value.trim().length > 0 ? value : null;
|
|
58458
58763
|
}
|
|
58459
58764
|
function isLinkValue(value) {
|
|
58460
|
-
if (!isRecord$
|
|
58765
|
+
if (!isRecord$20(value) || typeof value.kind !== "string") {
|
|
58461
58766
|
return false;
|
|
58462
58767
|
}
|
|
58463
58768
|
switch (value.kind) {
|
|
@@ -58473,7 +58778,7 @@ function readLinkValue(value) {
|
|
|
58473
58778
|
return isLinkValue(value) ? value : null;
|
|
58474
58779
|
}
|
|
58475
58780
|
function mapEventListingToEventSpotlightContent(content) {
|
|
58476
|
-
const record = isRecord$
|
|
58781
|
+
const record = isRecord$20(content) ? content : {};
|
|
58477
58782
|
const source = record;
|
|
58478
58783
|
return {
|
|
58479
58784
|
heading: source.heading ?? null,
|
|
@@ -59462,7 +59767,7 @@ function isOfferingsPreviewItemLimit(value) {
|
|
|
59462
59767
|
return value === "1" || value === "2" || value === "3" || value === "4" || value === "5" || value === "6" || value === null;
|
|
59463
59768
|
}
|
|
59464
59769
|
function normalizeOfferingsPreviewGroupOverride(value) {
|
|
59465
|
-
if (!isRecord$
|
|
59770
|
+
if (!isRecord$19(value)) return [];
|
|
59466
59771
|
const override = {};
|
|
59467
59772
|
if (isOfferingsPreviewSourceKey(value.sourceKey) || value.sourceKey === null) {
|
|
59468
59773
|
override.sourceKey = value.sourceKey;
|
|
@@ -59501,7 +59806,7 @@ function normalizeSectionStylesContent(value) {
|
|
|
59501
59806
|
}
|
|
59502
59807
|
function normalizeBoxStylesContent(value) {
|
|
59503
59808
|
if (value === null) return null;
|
|
59504
|
-
if (!isRecord$
|
|
59809
|
+
if (!isRecord$19(value)) return undefined;
|
|
59505
59810
|
const { background: _background, ...rest } = value;
|
|
59506
59811
|
const background = parseBackgroundContent(value.background);
|
|
59507
59812
|
return {
|
|
@@ -59509,7 +59814,7 @@ function normalizeBoxStylesContent(value) {
|
|
|
59509
59814
|
...background ? { background } : {}
|
|
59510
59815
|
};
|
|
59511
59816
|
}
|
|
59512
|
-
function isRecord$
|
|
59817
|
+
function isRecord$19(value) {
|
|
59513
59818
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
59514
59819
|
}
|
|
59515
59820
|
|
|
@@ -62550,21 +62855,21 @@ function buildPreviewFieldConstraints(manifest) {
|
|
|
62550
62855
|
}
|
|
62551
62856
|
function collectPreviewFieldConstraintEntries(fields$2, prefix = "") {
|
|
62552
62857
|
return fields$2.flatMap((field) => {
|
|
62553
|
-
const path$
|
|
62554
|
-
const own = field.type === "text" && typeof field.maxLength === "number" ? [[path$
|
|
62555
|
-
return [...own, ...collectNestedPreviewFieldConstraintEntries(field, path$
|
|
62858
|
+
const path$4 = prefix ? `${prefix}.${field.id}` : field.id;
|
|
62859
|
+
const own = field.type === "text" && typeof field.maxLength === "number" ? [[path$4, { maxLength: field.maxLength }]] : [];
|
|
62860
|
+
return [...own, ...collectNestedPreviewFieldConstraintEntries(field, path$4)];
|
|
62556
62861
|
});
|
|
62557
62862
|
}
|
|
62558
|
-
function collectNestedPreviewFieldConstraintEntries(field, path$
|
|
62863
|
+
function collectNestedPreviewFieldConstraintEntries(field, path$4) {
|
|
62559
62864
|
switch (field.type) {
|
|
62560
62865
|
case "group":
|
|
62561
|
-
case "modal": return collectPreviewFieldConstraintEntries(field.schema.fields, path$
|
|
62866
|
+
case "modal": return collectPreviewFieldConstraintEntries(field.schema.fields, path$4);
|
|
62562
62867
|
case "repeater": {
|
|
62563
|
-
const schemaEntries = field.schema ? collectPreviewFieldConstraintEntries(field.schema.fields, path$
|
|
62564
|
-
const itemTypeEntries = Object.values(field.itemTypes ?? {}).flatMap((itemType) => collectPreviewFieldConstraintEntries(itemType.fields, path$
|
|
62868
|
+
const schemaEntries = field.schema ? collectPreviewFieldConstraintEntries(field.schema.fields, path$4) : [];
|
|
62869
|
+
const itemTypeEntries = Object.values(field.itemTypes ?? {}).flatMap((itemType) => collectPreviewFieldConstraintEntries(itemType.fields, path$4));
|
|
62565
62870
|
return [...schemaEntries, ...itemTypeEntries];
|
|
62566
62871
|
}
|
|
62567
|
-
case "tabGroup": return field.tabs.flatMap((tab) => collectPreviewFieldConstraintEntries(tab.fields, path$
|
|
62872
|
+
case "tabGroup": return field.tabs.flatMap((tab) => collectPreviewFieldConstraintEntries(tab.fields, path$4));
|
|
62568
62873
|
case "boolean":
|
|
62569
62874
|
case "contentTypeSelect":
|
|
62570
62875
|
case "date":
|
|
@@ -62722,7 +63027,7 @@ function assertThemeConfigCanGenerateAccordionSystem(themeConfig) {
|
|
|
62722
63027
|
["shadow.elevation", themeConfig.shadow?.elevation],
|
|
62723
63028
|
["shadow.position", themeConfig.shadow?.position]
|
|
62724
63029
|
];
|
|
62725
|
-
const missingPaths = requiredPaths.flatMap(([path$
|
|
63030
|
+
const missingPaths = requiredPaths.flatMap(([path$4, value]) => value == null ? [path$4] : []);
|
|
62726
63031
|
if (missingPaths.length > 0) {
|
|
62727
63032
|
throw new Error(`Cannot generate accordion defaults from incomplete themeConfig; missing ${missingPaths.join(", ")}`);
|
|
62728
63033
|
}
|
|
@@ -63152,11 +63457,11 @@ function resolveAiFieldHint(input) {
|
|
|
63152
63457
|
|
|
63153
63458
|
//#endregion
|
|
63154
63459
|
//#region ../blocks/src/system/media/constrainedVideoMedia.ts
|
|
63155
|
-
function isRecord$
|
|
63460
|
+
function isRecord$18(value) {
|
|
63156
63461
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
63157
63462
|
}
|
|
63158
63463
|
function valueAtField(current, fieldId) {
|
|
63159
|
-
return isRecord$
|
|
63464
|
+
return isRecord$18(current) ? current[fieldId] : undefined;
|
|
63160
63465
|
}
|
|
63161
63466
|
function collectConstrainedVideoMediaValues(options) {
|
|
63162
63467
|
const { blockKind, fields: fields$2, currentValue, parentPath = [] } = options;
|
|
@@ -63167,7 +63472,7 @@ function collectConstrainedVideoMediaValues(options) {
|
|
|
63167
63472
|
const fieldValue = valueAtField(currentValue, field.id);
|
|
63168
63473
|
switch (field.type) {
|
|
63169
63474
|
case "media": {
|
|
63170
|
-
if (!isRecord$
|
|
63475
|
+
if (!isRecord$18(fieldValue) || fieldValue.type !== "video") break;
|
|
63171
63476
|
const policy = deriveVideoSlotPolicy(resolveVideoSelectionIntentForMediaField({
|
|
63172
63477
|
fieldPath,
|
|
63173
63478
|
mediaKinds: field.mediaKinds
|
|
@@ -63598,7 +63903,7 @@ function hydrateResolvedBookingConsentValue(value, context) {
|
|
|
63598
63903
|
const hydratedItems = value.map((item) => hydrateResolvedBookingConsentValue(item, context));
|
|
63599
63904
|
return hydratedItems.every((item, index) => item === value[index]) ? value : hydratedItems;
|
|
63600
63905
|
}
|
|
63601
|
-
if (!isRecord$
|
|
63906
|
+
if (!isRecord$16(value)) {
|
|
63602
63907
|
return value;
|
|
63603
63908
|
}
|
|
63604
63909
|
if (isBookingConsentCarrier(value)) {
|
|
@@ -63621,7 +63926,7 @@ function hydrateValue(value, context) {
|
|
|
63621
63926
|
const isUnchanged = resolvedItems.every((item, index) => item === value[index]);
|
|
63622
63927
|
return isUnchanged ? value : resolvedItems;
|
|
63623
63928
|
}
|
|
63624
|
-
if (isRecord$
|
|
63929
|
+
if (isRecord$16(value)) {
|
|
63625
63930
|
if (isInternalLink$1(value)) {
|
|
63626
63931
|
return hydrateInternalLink(value, context.routes);
|
|
63627
63932
|
}
|
|
@@ -63718,7 +64023,7 @@ function hydrateEntryLink(link$2, context) {
|
|
|
63718
64023
|
//#region ../blocks/src/system/manifest/resolveBlockData.ts
|
|
63719
64024
|
function resolveBlockData(blockId, dataLoaders$2, dataContext, routes) {
|
|
63720
64025
|
const raw = blockId ? dataContext?.resolvedData?.[blockId] : undefined;
|
|
63721
|
-
if (isRecord$
|
|
64026
|
+
if (isRecord$16(raw)) {
|
|
63722
64027
|
return routes ? hydrateResolvedBookingConsentLinks(raw, routes, dataContext?.pagesByIdentifier, dataContext?.entriesByIdentifier) : raw;
|
|
63723
64028
|
}
|
|
63724
64029
|
return dataLoaders$2 && typeof dataLoaders$2 === "object" && Object.keys(dataLoaders$2).length > 0 ? {} : undefined;
|
|
@@ -63735,19 +64040,19 @@ function planNewsletterBlockSubmission(placement) {
|
|
|
63735
64040
|
sourceRef
|
|
63736
64041
|
} : { tag: "unavailable" };
|
|
63737
64042
|
}
|
|
63738
|
-
|
|
63739
|
-
|
|
64043
|
+
const published = placement.publishedPlacement;
|
|
64044
|
+
if (published === null) {
|
|
64045
|
+
return placement.stage === "preview" ? { tag: "unpublished-form" } : { tag: "unavailable" };
|
|
63740
64046
|
}
|
|
63741
|
-
|
|
63742
|
-
return
|
|
64047
|
+
switch (published.kind) {
|
|
64048
|
+
case "incomplete": return { tag: "unpublished-settings" };
|
|
64049
|
+
case "published": return planNewsletterPreviewSubmission({
|
|
63743
64050
|
blockId: placement.blockId,
|
|
63744
|
-
publishedContentId:
|
|
64051
|
+
publishedContentId: published.id,
|
|
63745
64052
|
renderedContent: placement.renderedContent,
|
|
63746
|
-
publishedContent:
|
|
64053
|
+
publishedContent: published.content
|
|
63747
64054
|
});
|
|
63748
64055
|
}
|
|
63749
|
-
if (placement.stage === "preview") return { tag: "unpublished-form" };
|
|
63750
|
-
return { tag: "unavailable" };
|
|
63751
64056
|
}
|
|
63752
64057
|
/** Decide whether the visible draft can safely cite the published placement. */
|
|
63753
64058
|
function planNewsletterPreviewSubmission(placement) {
|
|
@@ -64006,21 +64311,6 @@ const BlockErrorBoundary = createBlockErrorBoundary();
|
|
|
64006
64311
|
|
|
64007
64312
|
//#endregion
|
|
64008
64313
|
//#region ../blocks/src/pageRenderAdmission.ts
|
|
64009
|
-
/** Pair a published version with the content it authorises at the render boundary. */
|
|
64010
|
-
function readPublishedBlockPlacement(id, content) {
|
|
64011
|
-
if (id == null && content == null) return null;
|
|
64012
|
-
if (id == null || content == null) {
|
|
64013
|
-
return {
|
|
64014
|
-
kind: "incomplete",
|
|
64015
|
-
id: id ?? null,
|
|
64016
|
-
content: content ?? null
|
|
64017
|
-
};
|
|
64018
|
-
}
|
|
64019
|
-
return {
|
|
64020
|
-
id,
|
|
64021
|
-
content
|
|
64022
|
-
};
|
|
64023
|
-
}
|
|
64024
64314
|
function toPresentationPage(page) {
|
|
64025
64315
|
if (!page) return null;
|
|
64026
64316
|
return {
|
|
@@ -82255,8 +82545,8 @@ function resolveParamsBindings(input, vm, meta) {
|
|
|
82255
82545
|
}
|
|
82256
82546
|
return out;
|
|
82257
82547
|
}
|
|
82258
|
-
function resolveBinding(path$
|
|
82259
|
-
const segments = splitPath(path$
|
|
82548
|
+
function resolveBinding(path$4, vm) {
|
|
82549
|
+
const segments = splitPath(path$4);
|
|
82260
82550
|
if (!segments.length) return undefined;
|
|
82261
82551
|
const [first, ...rest] = segments;
|
|
82262
82552
|
let source = vm;
|
|
@@ -82274,11 +82564,11 @@ function resolveBinding(path$3, vm) {
|
|
|
82274
82564
|
}
|
|
82275
82565
|
return readFromSource(vm, segments);
|
|
82276
82566
|
}
|
|
82277
|
-
function splitPath(path$
|
|
82567
|
+
function splitPath(path$4) {
|
|
82278
82568
|
const PATH_SEPARATOR_REGEX$2 = /\./g;
|
|
82279
82569
|
const BRACKET_ACCESS_REGEX$2 = /\[(?<token>[^\]]+)\]/g;
|
|
82280
82570
|
const segments = [];
|
|
82281
|
-
const parts = path$
|
|
82571
|
+
const parts = path$4.split(PATH_SEPARATOR_REGEX$2);
|
|
82282
82572
|
for (const raw of parts) {
|
|
82283
82573
|
if (!raw) continue;
|
|
82284
82574
|
const baseMatch = raw.match(/^([^\[]+)/);
|
|
@@ -83571,7 +83861,7 @@ function parseBackgroundOverrideFromContent(content) {
|
|
|
83571
83861
|
* Only the explicit owner marker can make a background a page-design override.
|
|
83572
83862
|
*/
|
|
83573
83863
|
function parseCanonicalSectionBackground(content) {
|
|
83574
|
-
const sectionStyles = isRecord$
|
|
83864
|
+
const sectionStyles = isRecord$17(content._sectionStyles) ? content._sectionStyles : null;
|
|
83575
83865
|
const background = sectionStyles?.background;
|
|
83576
83866
|
if (background === null || background === undefined) {
|
|
83577
83867
|
return { kind: "none" };
|
|
@@ -83596,7 +83886,7 @@ function parseBackgroundOverride(value) {
|
|
|
83596
83886
|
override: DEFAULT_BACKGROUND_OVERRIDE
|
|
83597
83887
|
};
|
|
83598
83888
|
}
|
|
83599
|
-
if (!isRecord$
|
|
83889
|
+
if (!isRecord$17(value)) {
|
|
83600
83890
|
return {
|
|
83601
83891
|
kind: "unsupported",
|
|
83602
83892
|
reason: "unsupported-shape",
|
|
@@ -83701,7 +83991,7 @@ function parseBackgroundOverride(value) {
|
|
|
83701
83991
|
}
|
|
83702
83992
|
}
|
|
83703
83993
|
function applyBackgroundOverrideContentPatch(content, override) {
|
|
83704
|
-
const sectionStyles = isRecord$
|
|
83994
|
+
const sectionStyles = isRecord$17(content._sectionStyles) ? content._sectionStyles : {};
|
|
83705
83995
|
const serialized = serializeBackgroundOverride(override);
|
|
83706
83996
|
if (serialized === null) {
|
|
83707
83997
|
const nextSectionStyles = omitRecordKey(sectionStyles, "background");
|
|
@@ -83942,7 +84232,7 @@ function imageAllowed(mediaId, pool) {
|
|
|
83942
84232
|
return pool?.some((item) => item.mediaId === mediaId) ?? false;
|
|
83943
84233
|
}
|
|
83944
84234
|
function parseImageMediaAssetId(value) {
|
|
83945
|
-
if (!isRecord$
|
|
84235
|
+
if (!isRecord$17(value)) return { kind: "missing" };
|
|
83946
84236
|
if (value.type !== undefined && value.type !== "image") return { kind: "missing" };
|
|
83947
84237
|
const parsed = parseMediaAssetId(value.assetId);
|
|
83948
84238
|
if (!parsed.ok) {
|
|
@@ -83987,7 +84277,7 @@ function withSectionStyles(content, sectionStyles) {
|
|
|
83987
84277
|
function omitRecordKey(content, key) {
|
|
83988
84278
|
return Object.fromEntries(Object.entries(content).filter(([entryKey]) => entryKey !== key));
|
|
83989
84279
|
}
|
|
83990
|
-
function isRecord$
|
|
84280
|
+
function isRecord$17(value) {
|
|
83991
84281
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
83992
84282
|
}
|
|
83993
84283
|
|
|
@@ -84419,7 +84709,7 @@ const ENV_SPECIFIC_MEDIA_KEYS = [
|
|
|
84419
84709
|
"storagePath",
|
|
84420
84710
|
"storageBucket"
|
|
84421
84711
|
];
|
|
84422
|
-
const isRecord$
|
|
84712
|
+
const isRecord$15 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
84423
84713
|
const looksLikeUuid = (value) => typeof value === "string" && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(value);
|
|
84424
84714
|
const hasCmsReference = (value) => typeof value.identifier === "string" || typeof value.assetId === "string" || looksLikeUuid(value.id) || typeof value.storagePath === "string" || typeof value.storageBucket === "string";
|
|
84425
84715
|
const stripMediaFields = (value) => {
|
|
@@ -84433,7 +84723,7 @@ const stripMediaFields = (value) => {
|
|
|
84433
84723
|
delete value.mimeType;
|
|
84434
84724
|
};
|
|
84435
84725
|
const stripRichTextImageSource = (value) => {
|
|
84436
|
-
if (value.type !== "image" || !isRecord$
|
|
84726
|
+
if (value.type !== "image" || !isRecord$15(value.attrs)) return;
|
|
84437
84727
|
const attrs = value.attrs;
|
|
84438
84728
|
const hasIdentifier = typeof attrs.identifier === "string" && attrs.identifier.trim().length > 0;
|
|
84439
84729
|
if (hasIdentifier) delete attrs.src;
|
|
@@ -84455,7 +84745,7 @@ function stripEnvSpecificMediaFieldsInPlace(value) {
|
|
|
84455
84745
|
}
|
|
84456
84746
|
return;
|
|
84457
84747
|
}
|
|
84458
|
-
if (!isRecord$
|
|
84748
|
+
if (!isRecord$15(value)) return;
|
|
84459
84749
|
stripMediaFields(value);
|
|
84460
84750
|
stripRichTextImageSource(value);
|
|
84461
84751
|
for (const entry of Object.values(value)) {
|
|
@@ -84690,65 +84980,8 @@ function pageSnapshotFileName(identifier) {
|
|
|
84690
84980
|
return `${encodeSnapshotPathPart(identifier)}.json`;
|
|
84691
84981
|
}
|
|
84692
84982
|
|
|
84693
|
-
//#endregion
|
|
84694
|
-
//#region ../api/src/event-presentation.ts
|
|
84695
|
-
const MAX_CARD_TITLE_LENGTH = 120;
|
|
84696
|
-
var InvalidEventPresentationImageError = class extends Error {
|
|
84697
|
-
constructor() {
|
|
84698
|
-
super("Event presentation image must be null or an object with a non-empty identifier");
|
|
84699
|
-
this.name = "InvalidEventPresentationImageError";
|
|
84700
|
-
}
|
|
84701
|
-
};
|
|
84702
|
-
function isRecord$15(value) {
|
|
84703
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
84704
|
-
}
|
|
84705
|
-
function normalizeTitle(value) {
|
|
84706
|
-
if (typeof value !== "string") return null;
|
|
84707
|
-
const trimmed = value.trim();
|
|
84708
|
-
if (!trimmed) return null;
|
|
84709
|
-
return trimmed.length > MAX_CARD_TITLE_LENGTH ? trimmed.slice(0, MAX_CARD_TITLE_LENGTH) : trimmed;
|
|
84710
|
-
}
|
|
84711
|
-
function normalizeImage(value) {
|
|
84712
|
-
if (value == null) return null;
|
|
84713
|
-
if (isRecord$15(value) && typeof value.identifier === "string" && value.identifier.trim().length > 0) return value;
|
|
84714
|
-
throw new InvalidEventPresentationImageError();
|
|
84715
|
-
}
|
|
84716
|
-
function hasOwnKey(value, key) {
|
|
84717
|
-
return Object.prototype.hasOwnProperty.call(value, key);
|
|
84718
|
-
}
|
|
84719
|
-
/**
|
|
84720
|
-
* Normalizes event card/list presentation without deriving it from page
|
|
84721
|
-
* content. Native page surfaces and presentation are separate authorities.
|
|
84722
|
-
*/
|
|
84723
|
-
function deriveEventPresentation(input) {
|
|
84724
|
-
const base = isRecord$15(input.storedPresentation) ? { ...input.storedPresentation } : {};
|
|
84725
|
-
const legacyTitle = base.title;
|
|
84726
|
-
delete base.title;
|
|
84727
|
-
if (!normalizeTitle(base.cardTitleOverride) && input.allowLegacyTitleInput) {
|
|
84728
|
-
const cardTitleOverride = normalizeTitle(legacyTitle);
|
|
84729
|
-
if (cardTitleOverride) {
|
|
84730
|
-
base.cardTitleOverride = cardTitleOverride;
|
|
84731
|
-
} else {
|
|
84732
|
-
delete base.cardTitleOverride;
|
|
84733
|
-
}
|
|
84734
|
-
}
|
|
84735
|
-
if (hasOwnKey(base, "image")) {
|
|
84736
|
-
base.image = normalizeImage(base.image);
|
|
84737
|
-
}
|
|
84738
|
-
return Object.keys(base).length > 0 ? base : null;
|
|
84739
|
-
}
|
|
84740
|
-
|
|
84741
84983
|
//#endregion
|
|
84742
84984
|
//#region src/content/eventLocalProjection.ts
|
|
84743
|
-
/**
|
|
84744
|
-
* The single definition of "what a pulled event looks like on disk".
|
|
84745
|
-
*
|
|
84746
|
-
* `writeEvents` uses these projections to write `content/events/*.json` and
|
|
84747
|
-
* `content/event-runs/*.json`, and the scoped push uses them to ask the reverse
|
|
84748
|
-
* question: are the local files still exactly what a pull of the current remote
|
|
84749
|
-
* would write? Both sides must stay on the same projection, so it lives here
|
|
84750
|
-
* rather than in either caller.
|
|
84751
|
-
*/
|
|
84752
84985
|
function toWritableLocalEvent(event) {
|
|
84753
84986
|
return {
|
|
84754
84987
|
identifier: event.identifier,
|
|
@@ -84764,14 +84997,8 @@ function toWritableLocalEvent(event) {
|
|
|
84764
84997
|
};
|
|
84765
84998
|
}
|
|
84766
84999
|
function toWritableLocalEventRun(run) {
|
|
84767
|
-
const { createdAt: _createdAt, updatedAt: _updatedAt, presentation, ...localRun } = structuredClone(run);
|
|
84768
|
-
return
|
|
84769
|
-
...localRun,
|
|
84770
|
-
presentation: deriveEventPresentation({
|
|
84771
|
-
storedPresentation: presentation ?? null,
|
|
84772
|
-
allowLegacyTitleInput: false
|
|
84773
|
-
})
|
|
84774
|
-
};
|
|
85000
|
+
const { createdAt: _createdAt, updatedAt: _updatedAt, presentation: _presentation, ...localRun } = structuredClone(run);
|
|
85001
|
+
return localRun;
|
|
84775
85002
|
}
|
|
84776
85003
|
/**
|
|
84777
85004
|
* The event file a pull would write for this remote event, as the reader would
|
|
@@ -86163,8 +86390,9 @@ function parseLocalEventRun(raw, filePath) {
|
|
|
86163
86390
|
const fields$2 = raw;
|
|
86164
86391
|
assertLocalEventRunRefs(fields$2, filePath);
|
|
86165
86392
|
assertLocalEventRunVisibility(fields$2, filePath);
|
|
86393
|
+
const { presentation: _retiredPresentation, ...run } = raw;
|
|
86166
86394
|
return {
|
|
86167
|
-
...
|
|
86395
|
+
...run,
|
|
86168
86396
|
...identity
|
|
86169
86397
|
};
|
|
86170
86398
|
}
|
|
@@ -86917,11 +87145,11 @@ function itemSegment(key) {
|
|
|
86917
87145
|
function collectSortedKeys(local, remote) {
|
|
86918
87146
|
return Array.from(new Set([...Object.keys(remote), ...Object.keys(local)])).sort((a, b) => a.localeCompare(b));
|
|
86919
87147
|
}
|
|
86920
|
-
function arrayIdentityMap(items, path$
|
|
87148
|
+
function arrayIdentityMap(items, path$4, identifyArrayItem) {
|
|
86921
87149
|
const result = new Map();
|
|
86922
87150
|
for (let index = 0; index < items.length; index++) {
|
|
86923
87151
|
const key = identifyArrayItem({
|
|
86924
|
-
path: path$
|
|
87152
|
+
path: path$4,
|
|
86925
87153
|
item: items[index],
|
|
86926
87154
|
index
|
|
86927
87155
|
});
|
|
@@ -86948,8 +87176,8 @@ function isSensitivePropertyKey(key) {
|
|
|
86948
87176
|
const normalized = key.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase();
|
|
86949
87177
|
return /(^|[_-])(secret|token|password|credential|api_key|webhook_secret|mgmt_api_key|management_api_key)s?($|[_-])/.test(normalized);
|
|
86950
87178
|
}
|
|
86951
|
-
function hasSensitivePropertyPath(path$
|
|
86952
|
-
return path$
|
|
87179
|
+
function hasSensitivePropertyPath(path$4) {
|
|
87180
|
+
return path$4.some((segment) => segment.type === "property" && isSensitivePropertyKey(segment.key));
|
|
86953
87181
|
}
|
|
86954
87182
|
function sameMultiset(left, right) {
|
|
86955
87183
|
if (left.length !== right.length) return false;
|
|
@@ -86970,25 +87198,25 @@ function sameMultiset(left, right) {
|
|
|
86970
87198
|
function collectSortedIdentityKeys(localOrder, remoteOrder) {
|
|
86971
87199
|
return Array.from(new Set([...remoteOrder, ...localOrder])).sort((a, b) => a.localeCompare(b));
|
|
86972
87200
|
}
|
|
86973
|
-
function buildReorderDiff(localOrder, remoteOrder, remoteById, path$
|
|
87201
|
+
function buildReorderDiff(localOrder, remoteOrder, remoteById, path$4) {
|
|
86974
87202
|
const sameItems = localOrder.length === remoteOrder.length && localOrder.every((key) => remoteById.has(key));
|
|
86975
87203
|
if (!sameItems || equal(localOrder, remoteOrder)) return null;
|
|
86976
87204
|
return {
|
|
86977
87205
|
kind: "list_reordered",
|
|
86978
|
-
path: path$
|
|
87206
|
+
path: path$4,
|
|
86979
87207
|
before: remoteOrder,
|
|
86980
87208
|
after: localOrder
|
|
86981
87209
|
};
|
|
86982
87210
|
}
|
|
86983
|
-
function diffIdentifiedArrays(localById, remoteById, path$
|
|
87211
|
+
function diffIdentifiedArrays(localById, remoteById, path$4, options) {
|
|
86984
87212
|
const localOrder = Array.from(localById.keys());
|
|
86985
87213
|
const remoteOrder = Array.from(remoteById.keys());
|
|
86986
|
-
const reorderDiff = buildReorderDiff(localOrder, remoteOrder, remoteById, path$
|
|
87214
|
+
const reorderDiff = buildReorderDiff(localOrder, remoteOrder, remoteById, path$4);
|
|
86987
87215
|
const itemDiffs = [];
|
|
86988
87216
|
for (const id of collectSortedIdentityKeys(localOrder, remoteOrder)) {
|
|
86989
87217
|
const local = localById.get(id);
|
|
86990
87218
|
const remote = remoteById.get(id);
|
|
86991
|
-
const nextPath = [...path$
|
|
87219
|
+
const nextPath = [...path$4, itemSegment(id)];
|
|
86992
87220
|
if (local && !remote) {
|
|
86993
87221
|
itemDiffs.push({
|
|
86994
87222
|
kind: "added",
|
|
@@ -87009,56 +87237,56 @@ function diffIdentifiedArrays(localById, remoteById, path$3, options) {
|
|
|
87009
87237
|
}
|
|
87010
87238
|
return reorderDiff ? [reorderDiff, ...itemDiffs] : itemDiffs;
|
|
87011
87239
|
}
|
|
87012
|
-
function diffArraysByIdentity(local, remote, path$
|
|
87240
|
+
function diffArraysByIdentity(local, remote, path$4, options) {
|
|
87013
87241
|
const identifyArrayItem = options.identifyArrayItem;
|
|
87014
87242
|
if (!identifyArrayItem) return null;
|
|
87015
|
-
const localById = arrayIdentityMap(local, path$
|
|
87016
|
-
const remoteById = arrayIdentityMap(remote, path$
|
|
87243
|
+
const localById = arrayIdentityMap(local, path$4, identifyArrayItem);
|
|
87244
|
+
const remoteById = arrayIdentityMap(remote, path$4, identifyArrayItem);
|
|
87017
87245
|
if (!localById || !remoteById) return null;
|
|
87018
|
-
return diffIdentifiedArrays(localById, remoteById, path$
|
|
87246
|
+
return diffIdentifiedArrays(localById, remoteById, path$4, options);
|
|
87019
87247
|
}
|
|
87020
|
-
function diffSameLengthArrays(local, remote, path$
|
|
87248
|
+
function diffSameLengthArrays(local, remote, path$4, options) {
|
|
87021
87249
|
const diffs = [];
|
|
87022
87250
|
for (let index = 0; index < local.length; index++) {
|
|
87023
|
-
diffs.push(...diffValues(local[index], remote[index], [...path$
|
|
87251
|
+
diffs.push(...diffValues(local[index], remote[index], [...path$4, indexSegment(index)], options));
|
|
87024
87252
|
}
|
|
87025
87253
|
return diffs.length > 0 ? diffs : [{
|
|
87026
87254
|
kind: "changed",
|
|
87027
|
-
path: path$
|
|
87255
|
+
path: path$4,
|
|
87028
87256
|
before: remote,
|
|
87029
87257
|
after: local
|
|
87030
87258
|
}];
|
|
87031
87259
|
}
|
|
87032
|
-
function diffArraysByPosition(local, remote, path$
|
|
87260
|
+
function diffArraysByPosition(local, remote, path$4, options) {
|
|
87033
87261
|
if (sameMultiset(local, remote)) {
|
|
87034
87262
|
return [{
|
|
87035
87263
|
kind: "list_reordered",
|
|
87036
|
-
path: path$
|
|
87264
|
+
path: path$4,
|
|
87037
87265
|
before: remote,
|
|
87038
87266
|
after: local
|
|
87039
87267
|
}];
|
|
87040
87268
|
}
|
|
87041
|
-
if (local.length === remote.length) return diffSameLengthArrays(local, remote, path$
|
|
87269
|
+
if (local.length === remote.length) return diffSameLengthArrays(local, remote, path$4, options);
|
|
87042
87270
|
return [{
|
|
87043
87271
|
kind: "changed",
|
|
87044
|
-
path: path$
|
|
87272
|
+
path: path$4,
|
|
87045
87273
|
before: remote,
|
|
87046
87274
|
after: local
|
|
87047
87275
|
}];
|
|
87048
87276
|
}
|
|
87049
|
-
function diffValues(local, remote, path$
|
|
87277
|
+
function diffValues(local, remote, path$4, options) {
|
|
87050
87278
|
const normalizedLocal = normalizeComparable(local);
|
|
87051
87279
|
const normalizedRemote = normalizeComparable(remote);
|
|
87052
87280
|
if (equal(normalizedLocal, normalizedRemote)) return [];
|
|
87053
87281
|
if (Array.isArray(normalizedLocal) && Array.isArray(normalizedRemote)) {
|
|
87054
|
-
return diffArrays(normalizedLocal, normalizedRemote, path$
|
|
87282
|
+
return diffArrays(normalizedLocal, normalizedRemote, path$4, options);
|
|
87055
87283
|
}
|
|
87056
87284
|
if (isRecord$12(normalizedLocal) && isRecord$12(normalizedRemote)) {
|
|
87057
87285
|
const diffs = [];
|
|
87058
87286
|
for (const key of collectSortedKeys(normalizedLocal, normalizedRemote)) {
|
|
87059
87287
|
const localHasKey = Object.prototype.hasOwnProperty.call(normalizedLocal, key);
|
|
87060
87288
|
const remoteHasKey = Object.prototype.hasOwnProperty.call(normalizedRemote, key);
|
|
87061
|
-
const nextPath = [...path$
|
|
87289
|
+
const nextPath = [...path$4, propertySegment(key)];
|
|
87062
87290
|
if (!remoteHasKey && localHasKey) {
|
|
87063
87291
|
diffs.push({
|
|
87064
87292
|
kind: "added",
|
|
@@ -87083,21 +87311,21 @@ function diffValues(local, remote, path$3, options) {
|
|
|
87083
87311
|
}
|
|
87084
87312
|
return [{
|
|
87085
87313
|
kind: "changed",
|
|
87086
|
-
path: path$
|
|
87314
|
+
path: path$4,
|
|
87087
87315
|
before: normalizedRemote,
|
|
87088
87316
|
after: normalizedLocal
|
|
87089
87317
|
}];
|
|
87090
87318
|
}
|
|
87091
|
-
function diffArrays(local, remote, path$
|
|
87092
|
-
return diffArraysByIdentity(local, remote, path$
|
|
87319
|
+
function diffArrays(local, remote, path$4, options) {
|
|
87320
|
+
return diffArraysByIdentity(local, remote, path$4, options) ?? diffArraysByPosition(local, remote, path$4, options);
|
|
87093
87321
|
}
|
|
87094
87322
|
function buildFieldDiffs(local, remote, options = {}) {
|
|
87095
87323
|
return diffValues(local, remote, [], options);
|
|
87096
87324
|
}
|
|
87097
|
-
function formatFieldPath(path$
|
|
87098
|
-
if (path$
|
|
87325
|
+
function formatFieldPath(path$4) {
|
|
87326
|
+
if (path$4.length === 0) return "(root)";
|
|
87099
87327
|
let result = "";
|
|
87100
|
-
for (const segment of path$
|
|
87328
|
+
for (const segment of path$4) {
|
|
87101
87329
|
switch (segment.type) {
|
|
87102
87330
|
case "property":
|
|
87103
87331
|
result += result ? `.${segment.key}` : segment.key;
|
|
@@ -87134,8 +87362,8 @@ function findChangedFieldPaths(local, remote, prefix = "") {
|
|
|
87134
87362
|
const changes = [];
|
|
87135
87363
|
const allKeys = new Set([...Object.keys(local), ...Object.keys(remote)]);
|
|
87136
87364
|
for (const key of allKeys) {
|
|
87137
|
-
const path$
|
|
87138
|
-
if (!equal(local[key], remote[key])) changes.push(path$
|
|
87365
|
+
const path$4 = prefix ? `${prefix}.${key}` : key;
|
|
87366
|
+
if (!equal(local[key], remote[key])) changes.push(path$4);
|
|
87139
87367
|
}
|
|
87140
87368
|
return changes;
|
|
87141
87369
|
}
|
|
@@ -87458,6 +87686,7 @@ function classifyPage(localPage, remotePage, options, blockSummary) {
|
|
|
87458
87686
|
type: "create",
|
|
87459
87687
|
identifier: localPage.identifier,
|
|
87460
87688
|
blocks: blockDiffs$1,
|
|
87689
|
+
remoteBlockIdentifiers: [],
|
|
87461
87690
|
statusChange: determineStatusChange(localPage.status, undefined)
|
|
87462
87691
|
};
|
|
87463
87692
|
}
|
|
@@ -87478,6 +87707,7 @@ function classifyPage(localPage, remotePage, options, blockSummary) {
|
|
|
87478
87707
|
identifier: localPage.identifier,
|
|
87479
87708
|
changes: changes.length > 0 ? changes : undefined,
|
|
87480
87709
|
blocks: blockDiffs,
|
|
87710
|
+
remoteBlockIdentifiers: (remotePage.blocks ?? []).map((block) => block.identifier),
|
|
87481
87711
|
statusChange: statusChange$1
|
|
87482
87712
|
};
|
|
87483
87713
|
}
|
|
@@ -89207,7 +89437,6 @@ function mapEventRunToComparable(run) {
|
|
|
89207
89437
|
categoryRef: run.categoryRef,
|
|
89208
89438
|
formRef: run.formRef,
|
|
89209
89439
|
settings: run.settings,
|
|
89210
|
-
presentation: run.presentation,
|
|
89211
89440
|
tags: run.tags
|
|
89212
89441
|
};
|
|
89213
89442
|
}
|
|
@@ -91105,7 +91334,6 @@ function normalizeRemoteRun(run) {
|
|
|
91105
91334
|
categoryRef: run.categoryRef,
|
|
91106
91335
|
formRef: run.formRef,
|
|
91107
91336
|
settings: run.settings,
|
|
91108
|
-
presentation: run.presentation,
|
|
91109
91337
|
tags: [...run.tags]
|
|
91110
91338
|
};
|
|
91111
91339
|
}
|
|
@@ -91126,7 +91354,6 @@ function normalizeLocalRun(local, remote) {
|
|
|
91126
91354
|
categoryRef: overrideWhenDefined(local.categoryRef, base.categoryRef, normalizeNullableString),
|
|
91127
91355
|
formRef: overrideWhenDefined(local.formRef, base.formRef, normalizeNullableString),
|
|
91128
91356
|
settings: overrideWhenDefined(local.settings, base.settings, (value) => isRecord$11(value) ? value : {}),
|
|
91129
|
-
presentation: overrideWhenDefined(local.presentation, base.presentation, (value) => isRecord$11(value) ? value : null),
|
|
91130
91357
|
tags: overrideWhenDefined(local.tags, base.tags, (value) => Array.isArray(value) ? value : [])
|
|
91131
91358
|
};
|
|
91132
91359
|
}
|
|
@@ -91175,7 +91402,6 @@ function normalizeLocalEventGraph(graph, remote) {
|
|
|
91175
91402
|
categoryRef: run.categoryRef ?? null,
|
|
91176
91403
|
formRef: run.formRef ?? null,
|
|
91177
91404
|
settings: run.settings ?? {},
|
|
91178
|
-
presentation: run.presentation ?? null,
|
|
91179
91405
|
tags: run.tags ?? [],
|
|
91180
91406
|
createdAt: "",
|
|
91181
91407
|
updatedAt: ""
|
|
@@ -92221,10 +92447,6 @@ function buildEventSeriesCommand(event, run, schedule, offer) {
|
|
|
92221
92447
|
occurrences: schedule.occurrences,
|
|
92222
92448
|
content: eventContent(event.content),
|
|
92223
92449
|
settings: run.settings,
|
|
92224
|
-
presentation: deriveEventPresentation({
|
|
92225
|
-
storedPresentation: run.presentation ?? null,
|
|
92226
|
-
allowLegacyTitleInput: true
|
|
92227
|
-
}),
|
|
92228
92450
|
tags: run.tags,
|
|
92229
92451
|
blocks: event.blocks
|
|
92230
92452
|
}
|
|
@@ -92473,7 +92695,6 @@ function eventRunUpsertInput(command, eventIdentifier) {
|
|
|
92473
92695
|
categoryRef: preferredRef(input.categoryIdentifier, input.categoryRef),
|
|
92474
92696
|
formRef: preferredRef(input.formIdentifier, input.formRef),
|
|
92475
92697
|
settings: input.settings,
|
|
92476
|
-
presentation: input.presentation,
|
|
92477
92698
|
tags: input.tags ? [...input.tags] : undefined
|
|
92478
92699
|
};
|
|
92479
92700
|
}
|
|
@@ -93503,10 +93724,10 @@ function validateBlockContent(data, manifest, customFields) {
|
|
|
93503
93724
|
const admission = admitManifestContentForWrite(compileManifestContentContract(normalizedFields), data);
|
|
93504
93725
|
if (admission.ok) return [];
|
|
93505
93726
|
if (admission.error.kind === "non_portable_media") {
|
|
93506
|
-
return admission.error.paths.map((path$
|
|
93727
|
+
return admission.error.paths.map((path$4) => ({
|
|
93507
93728
|
type: "invalid_content",
|
|
93508
|
-
field: path$
|
|
93509
|
-
message: `Invalid content in "${path$
|
|
93729
|
+
field: path$4 || "(root)",
|
|
93730
|
+
message: `Invalid content in "${path$4 || "(root)"}": Media content contains environment-specific fields`
|
|
93510
93731
|
}));
|
|
93511
93732
|
}
|
|
93512
93733
|
const requiredIds = extractRequiredFieldIds(normalizedFields);
|
|
@@ -93628,6 +93849,8 @@ function sdkCustomBlockManifest(block) {
|
|
|
93628
93849
|
function compilePageBlockCommands(input) {
|
|
93629
93850
|
const changedBlockDiffs = (input.pageDiff.blocks ?? []).filter((blockDiff) => blockDiff.type !== "unchanged");
|
|
93630
93851
|
if (changedBlockDiffs.length === 0) return ok(emptyPageBlockCommandCompileFragment());
|
|
93852
|
+
const membership = validateReorderMembership(input.pageDiff, input.localPage);
|
|
93853
|
+
if (!membership.ok) return membership;
|
|
93631
93854
|
const localBlocks = input.localPage.blocks ?? [];
|
|
93632
93855
|
const blockLookup = new Map(localBlocks.map((block) => [unsafeAsCliBlockIdentifier(block.identifier), block]));
|
|
93633
93856
|
const commandBindings = [];
|
|
@@ -93806,41 +94029,72 @@ function emptyPageBlockCommandCompileFragment() {
|
|
|
93806
94029
|
warnings: []
|
|
93807
94030
|
};
|
|
93808
94031
|
}
|
|
94032
|
+
/** Validate the selected writes before any page mutation executes. */
|
|
94033
|
+
function validateReorderMembership(diff, page) {
|
|
94034
|
+
if (!diff.blocks?.some((block) => block.type === "reorder")) return ok(undefined);
|
|
94035
|
+
const remote = diff.remoteBlockIdentifiers;
|
|
94036
|
+
if (!remote) return ok(undefined);
|
|
94037
|
+
const deleted = new Set(diff.blocks.filter((block) => block.type === "delete").map((block) => block.identifier));
|
|
94038
|
+
const created = diff.blocks.filter((block) => block.type === "create").map((block) => block.identifier);
|
|
94039
|
+
const finalIds = new Set([...remote.filter((id) => !deleted.has(id)), ...created]);
|
|
94040
|
+
const requested = new Set((page.blocks ?? []).map((block) => block.identifier));
|
|
94041
|
+
const missing = [...finalIds].filter((id) => !requested.has(id));
|
|
94042
|
+
const unavailable = [...requested].filter((id) => !finalIds.has(id));
|
|
94043
|
+
if (missing.length === 0 && unavailable.length === 0) return ok(undefined);
|
|
94044
|
+
return err({
|
|
94045
|
+
code: "incomplete_block_order",
|
|
94046
|
+
identifier: unsafeAsCliPageIdentifier(page.identifier),
|
|
94047
|
+
message: `Cannot reorder ${page.identifier}: ${[...missing.length ? [`include or select deletion of blocks: ${missing.join(", ")}`] : [], ...unavailable.length ? [`select creation of blocks: ${unavailable.join(", ")}`] : []].join("; ")}. No changes were applied.`
|
|
94048
|
+
});
|
|
94049
|
+
}
|
|
93809
94050
|
|
|
93810
94051
|
//#endregion
|
|
93811
94052
|
//#region src/site-commands/pageCommandExecution.ts
|
|
93812
94053
|
async function executePageCommandPlan(input) {
|
|
93813
94054
|
return executeCliCommandPlan({
|
|
93814
94055
|
commands: input.plan.commands,
|
|
93815
|
-
applyCommand:
|
|
93816
|
-
switch (command.type) {
|
|
93817
|
-
case "upsertPage": return (await input.client.pages.upsert({
|
|
93818
|
-
identifier: pageIdentifierForCommand(command),
|
|
93819
|
-
title: command.input.title,
|
|
93820
|
-
path: pagePathForCommand(command),
|
|
93821
|
-
seoTitle: command.input.seoTitle,
|
|
93822
|
-
seoDescription: command.input.seoDescription
|
|
93823
|
-
})).effect;
|
|
93824
|
-
case "upsertPageBlock": {
|
|
93825
|
-
const result = await input.client.blocks.upsert(pageIdentifierForBlockCommand(command), {
|
|
93826
|
-
identifier: blockIdentifierForCommand(command),
|
|
93827
|
-
kind: command.input.type,
|
|
93828
|
-
data: command.input.props ?? {}
|
|
93829
|
-
});
|
|
93830
|
-
input.onWarnings?.((result.warnings ?? []).map((warning) => `${warning.field}: ${warning.message}`));
|
|
93831
|
-
return result.effect;
|
|
93832
|
-
}
|
|
93833
|
-
case "deletePageBlock": return (await input.client.blocks.delete(pageIdentifierForBlockCommand(command), blockIdentifierForCommand(command))).effect;
|
|
93834
|
-
case "reorderPageBlocks":
|
|
93835
|
-
await input.client.blocks.reorder(pageIdentifierForBlockCommand(command), [...blockOrderIdentifiersForCommand(command)]);
|
|
93836
|
-
return null;
|
|
93837
|
-
case "publishPage": return (await input.client.pages.publish(pageIdentifierForCommand(command))).effect;
|
|
93838
|
-
case "unpublishPage": return (await input.client.pages.unpublish(pageIdentifierForCommand(command))).effect;
|
|
93839
|
-
default: assertNever(command);
|
|
93840
|
-
}
|
|
93841
|
-
}
|
|
94056
|
+
applyCommand: (command) => applyPageCommand(input, command)
|
|
93842
94057
|
});
|
|
93843
94058
|
}
|
|
94059
|
+
async function applyPageCommand(input, command) {
|
|
94060
|
+
switch (command.type) {
|
|
94061
|
+
case "upsertPage": return (await input.client.pages.upsert({
|
|
94062
|
+
identifier: pageIdentifierForCommand(command),
|
|
94063
|
+
title: command.input.title,
|
|
94064
|
+
path: pagePathForCommand(command),
|
|
94065
|
+
seoTitle: command.input.seoTitle,
|
|
94066
|
+
seoDescription: command.input.seoDescription
|
|
94067
|
+
})).effect;
|
|
94068
|
+
case "publishPage": return (await input.client.pages.publish(pageIdentifierForCommand(command))).effect;
|
|
94069
|
+
case "unpublishPage": return (await input.client.pages.unpublish(pageIdentifierForCommand(command))).effect;
|
|
94070
|
+
case "upsertPageBlock":
|
|
94071
|
+
case "deletePageBlock":
|
|
94072
|
+
case "reorderPageBlocks": return applyPageBlockCommand(input, command);
|
|
94073
|
+
default: return assertNever(command);
|
|
94074
|
+
}
|
|
94075
|
+
}
|
|
94076
|
+
async function applyPageBlockCommand(input, command) {
|
|
94077
|
+
const result = await mutatePageBlock(input, command);
|
|
94078
|
+
if (result.designSyncWarning) input.onWarnings?.([result.designSyncWarning.message]);
|
|
94079
|
+
return result.effect;
|
|
94080
|
+
}
|
|
94081
|
+
async function mutatePageBlock(input, command) {
|
|
94082
|
+
const pageIdentifier = pageIdentifierForBlockCommand(command);
|
|
94083
|
+
switch (command.type) {
|
|
94084
|
+
case "upsertPageBlock": {
|
|
94085
|
+
const result = await input.client.blocks.upsert(pageIdentifier, {
|
|
94086
|
+
identifier: blockIdentifierForCommand(command),
|
|
94087
|
+
kind: command.input.type,
|
|
94088
|
+
data: command.input.props ?? {}
|
|
94089
|
+
});
|
|
94090
|
+
input.onWarnings?.((result.warnings ?? []).map((warning) => `${warning.field}: ${warning.message}`));
|
|
94091
|
+
return result;
|
|
94092
|
+
}
|
|
94093
|
+
case "deletePageBlock": return input.client.blocks.delete(pageIdentifier, blockIdentifierForCommand(command));
|
|
94094
|
+
case "reorderPageBlocks": return input.client.blocks.reorder(pageIdentifier, [...blockOrderIdentifiersForCommand(command)]);
|
|
94095
|
+
default: return assertNever(command);
|
|
94096
|
+
}
|
|
94097
|
+
}
|
|
93844
94098
|
async function executePageCommandPlanAsReport(input) {
|
|
93845
94099
|
const runtimeWarnings = [];
|
|
93846
94100
|
const report = await executeCompiledCliCommandPlanAsReport({
|
|
@@ -93974,6 +94228,7 @@ function preflightPageCommandPlanAsReport(input) {
|
|
|
93974
94228
|
}
|
|
93975
94229
|
function preflightFailureFromPageCompileError(input) {
|
|
93976
94230
|
switch (input.error.code) {
|
|
94231
|
+
case "incomplete_block_order":
|
|
93977
94232
|
case "missing_local_page": return {
|
|
93978
94233
|
outcome: {
|
|
93979
94234
|
status: "preflight_failed",
|
|
@@ -94104,7 +94359,6 @@ function emptyPageCommandCompileFragment() {
|
|
|
94104
94359
|
}
|
|
94105
94360
|
function incrementPageSuccess(result, subject, effect) {
|
|
94106
94361
|
if (!effect) {
|
|
94107
|
-
if (subject.resource === "block" && subject.counter === "reordered") return;
|
|
94108
94362
|
throw new Error(`Missing command effect for ${subject.resource} ${subject.identifier}.`);
|
|
94109
94363
|
}
|
|
94110
94364
|
switch (subject.resource) {
|
|
@@ -94133,6 +94387,7 @@ function incrementPageSuccess(result, subject, effect) {
|
|
|
94133
94387
|
}
|
|
94134
94388
|
return;
|
|
94135
94389
|
case "block":
|
|
94390
|
+
if (subject.counter === "reordered") return;
|
|
94136
94391
|
switch (effect.kind) {
|
|
94137
94392
|
case "created":
|
|
94138
94393
|
result.blocks.created++;
|
|
@@ -95831,7 +96086,7 @@ function firstNestedContainerChange(localChanges, remoteChanges) {
|
|
|
95831
96086
|
}
|
|
95832
96087
|
function firstSameFieldConflictPath(localChanges, remoteChanges) {
|
|
95833
96088
|
const remotePaths = new Set(remoteChanges.keys());
|
|
95834
|
-
return [...localChanges.keys()].filter((path$
|
|
96089
|
+
return [...localChanges.keys()].filter((path$4) => remotePaths.has(path$4)).sort()[0] ?? null;
|
|
95835
96090
|
}
|
|
95836
96091
|
function scalarMergeChanges(changes, label) {
|
|
95837
96092
|
return [...changes.values()].map((change) => {
|
|
@@ -95847,11 +96102,11 @@ function mergeValueKind(value) {
|
|
|
95847
96102
|
if (typeof value === "object") return "object";
|
|
95848
96103
|
return "scalar";
|
|
95849
96104
|
}
|
|
95850
|
-
function mergeChange(path$
|
|
96105
|
+
function mergeChange(path$4, value, containerKind) {
|
|
95851
96106
|
switch (containerKind) {
|
|
95852
96107
|
case "array":
|
|
95853
96108
|
if (Array.isArray(value)) return {
|
|
95854
|
-
path: path$
|
|
96109
|
+
path: path$4,
|
|
95855
96110
|
value,
|
|
95856
96111
|
containerKind
|
|
95857
96112
|
};
|
|
@@ -95859,7 +96114,7 @@ function mergeChange(path$3, value, containerKind) {
|
|
|
95859
96114
|
case "object":
|
|
95860
96115
|
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
95861
96116
|
return {
|
|
95862
|
-
path: path$
|
|
96117
|
+
path: path$4,
|
|
95863
96118
|
value,
|
|
95864
96119
|
containerKind
|
|
95865
96120
|
};
|
|
@@ -95867,20 +96122,20 @@ function mergeChange(path$3, value, containerKind) {
|
|
|
95867
96122
|
break;
|
|
95868
96123
|
case "null":
|
|
95869
96124
|
if (value === null || value === undefined) return {
|
|
95870
|
-
path: path$
|
|
96125
|
+
path: path$4,
|
|
95871
96126
|
value,
|
|
95872
96127
|
containerKind
|
|
95873
96128
|
};
|
|
95874
96129
|
break;
|
|
95875
96130
|
case "scalar":
|
|
95876
96131
|
if (isScalarMergeChangeValue(value)) return {
|
|
95877
|
-
path: path$
|
|
96132
|
+
path: path$4,
|
|
95878
96133
|
value,
|
|
95879
96134
|
containerKind
|
|
95880
96135
|
};
|
|
95881
96136
|
break;
|
|
95882
96137
|
}
|
|
95883
|
-
throw new Error(`Invalid merge change at ${path$
|
|
96138
|
+
throw new Error(`Invalid merge change at ${path$4}.`);
|
|
95884
96139
|
}
|
|
95885
96140
|
function isScalarMergeChangeValue(value) {
|
|
95886
96141
|
return value === undefined || value === null || [
|
|
@@ -96230,13 +96485,13 @@ function setPath(target, pathParts, value) {
|
|
|
96230
96485
|
}
|
|
96231
96486
|
setPath(target[head], rest, value);
|
|
96232
96487
|
}
|
|
96233
|
-
function expectStringValue$1(path$
|
|
96488
|
+
function expectStringValue$1(path$4, value) {
|
|
96234
96489
|
if (typeof value === "string") return value;
|
|
96235
|
-
throw new Error(`Entry merge expected ${path$
|
|
96490
|
+
throw new Error(`Entry merge expected ${path$4} to be a string.`);
|
|
96236
96491
|
}
|
|
96237
|
-
function expectBooleanValue$1(path$
|
|
96492
|
+
function expectBooleanValue$1(path$4, value) {
|
|
96238
96493
|
if (typeof value === "boolean") return value;
|
|
96239
|
-
throw new Error(`Entry merge expected ${path$
|
|
96494
|
+
throw new Error(`Entry merge expected ${path$4} to be a boolean.`);
|
|
96240
96495
|
}
|
|
96241
96496
|
function expectStatusValue$1(value) {
|
|
96242
96497
|
if (value === "draft" || value === "published") return value;
|
|
@@ -96988,13 +97243,13 @@ function setPagePath(page, pathParts, value) {
|
|
|
96988
97243
|
default: throw new Error(`Unsupported page merge path: ${pathParts.join(".")}`);
|
|
96989
97244
|
}
|
|
96990
97245
|
}
|
|
96991
|
-
function expectStringValue(path$
|
|
97246
|
+
function expectStringValue(path$4, value) {
|
|
96992
97247
|
if (typeof value === "string") return value;
|
|
96993
|
-
throw new Error(`Page merge expected ${path$
|
|
97248
|
+
throw new Error(`Page merge expected ${path$4} to be a string.`);
|
|
96994
97249
|
}
|
|
96995
|
-
function expectBooleanValue(path$
|
|
97250
|
+
function expectBooleanValue(path$4, value) {
|
|
96996
97251
|
if (typeof value === "boolean") return value;
|
|
96997
|
-
throw new Error(`Page merge expected ${path$
|
|
97252
|
+
throw new Error(`Page merge expected ${path$4} to be a boolean.`);
|
|
96998
97253
|
}
|
|
96999
97254
|
function expectStatusValue(value) {
|
|
97000
97255
|
if (value === "draft" || value === "published") return value;
|
|
@@ -103424,7 +103679,7 @@ async function loadConfig(configPath, output) {
|
|
|
103424
103679
|
return { errorMessage: "No config path provided." };
|
|
103425
103680
|
}
|
|
103426
103681
|
try {
|
|
103427
|
-
const { loadConfigFile: loadConfigFile$1 } = await import("../load-config-
|
|
103682
|
+
const { loadConfigFile: loadConfigFile$1 } = await import("../load-config-CoGYSr5z.mjs");
|
|
103428
103683
|
const rawConfig = await loadConfigFile$1(configPath);
|
|
103429
103684
|
const parsed = riverbankSiteConfigSchema.safeParse(rawConfig);
|
|
103430
103685
|
if (!parsed.success) {
|
|
@@ -103610,7 +103865,7 @@ async function loadDeployConfig() {
|
|
|
103610
103865
|
}
|
|
103611
103866
|
async function checkWorkingDirectoryClean(git, prebuildOutput) {
|
|
103612
103867
|
const status = await git.status();
|
|
103613
|
-
const dirtyFiles = status.files.map((file) => file.path).filter((path$
|
|
103868
|
+
const dirtyFiles = status.files.map((file) => file.path).filter((path$4) => !isPathInside(path$4, prebuildOutput));
|
|
103614
103869
|
return {
|
|
103615
103870
|
clean: dirtyFiles.length === 0,
|
|
103616
103871
|
dirtyFiles
|
|
@@ -104638,25 +104893,25 @@ function mapMediaGuardDiagnosticsToAuditIssues(diagnostics) {
|
|
|
104638
104893
|
* Extract all embed block references from content data recursively.
|
|
104639
104894
|
* Exported for testing.
|
|
104640
104895
|
*/
|
|
104641
|
-
function extractEmbedReferences(data, path$
|
|
104896
|
+
function extractEmbedReferences(data, path$4 = []) {
|
|
104642
104897
|
const refs = [];
|
|
104643
104898
|
if (!data || typeof data !== "object") return refs;
|
|
104644
104899
|
if (Array.isArray(data)) {
|
|
104645
104900
|
data.forEach((item, index) => {
|
|
104646
|
-
refs.push(...extractEmbedReferences(item, [...path$
|
|
104901
|
+
refs.push(...extractEmbedReferences(item, [...path$4, String(index)]));
|
|
104647
104902
|
});
|
|
104648
104903
|
return refs;
|
|
104649
104904
|
}
|
|
104650
104905
|
const obj = data;
|
|
104651
104906
|
if (obj.kind === "embed" && typeof obj.contentType === "string" && typeof obj.identifier === "string") {
|
|
104652
104907
|
refs.push({
|
|
104653
|
-
path: path$
|
|
104908
|
+
path: path$4.join("."),
|
|
104654
104909
|
contentType: obj.contentType,
|
|
104655
104910
|
identifier: obj.identifier
|
|
104656
104911
|
});
|
|
104657
104912
|
}
|
|
104658
104913
|
for (const [key, value] of Object.entries(obj)) {
|
|
104659
|
-
refs.push(...extractEmbedReferences(value, [...path$
|
|
104914
|
+
refs.push(...extractEmbedReferences(value, [...path$4, key]));
|
|
104660
104915
|
}
|
|
104661
104916
|
return refs;
|
|
104662
104917
|
}
|
|
@@ -107057,8 +107312,8 @@ function parseContentFieldPath(value) {
|
|
|
107057
107312
|
path: segments
|
|
107058
107313
|
};
|
|
107059
107314
|
}
|
|
107060
|
-
function formatContentFieldPath(path$
|
|
107061
|
-
return formatFieldPath(path$
|
|
107315
|
+
function formatContentFieldPath(path$4) {
|
|
107316
|
+
return formatFieldPath(path$4);
|
|
107062
107317
|
}
|
|
107063
107318
|
|
|
107064
107319
|
//#endregion
|
|
@@ -107121,8 +107376,8 @@ function changedPlan(operation, before, after) {
|
|
|
107121
107376
|
operation,
|
|
107122
107377
|
before,
|
|
107123
107378
|
after,
|
|
107124
|
-
changes: buildFieldChanges(pageDiffRecord(after), pageDiffRecord(before), { identifyArrayItem: ({ path: path$
|
|
107125
|
-
const last = path$
|
|
107379
|
+
changes: buildFieldChanges(pageDiffRecord(after), pageDiffRecord(before), { identifyArrayItem: ({ path: path$4, item }) => {
|
|
107380
|
+
const last = path$4[path$4.length - 1];
|
|
107126
107381
|
if (last?.type !== "property" || last.key !== "blocks") return null;
|
|
107127
107382
|
return blockIdentifier(item);
|
|
107128
107383
|
} })
|
|
@@ -107208,11 +107463,11 @@ function normalizeBlockPositions(blocks) {
|
|
|
107208
107463
|
block.position = index;
|
|
107209
107464
|
});
|
|
107210
107465
|
}
|
|
107211
|
-
function setFieldPath(target, path$
|
|
107466
|
+
function setFieldPath(target, path$4, value) {
|
|
107212
107467
|
let current = target;
|
|
107213
|
-
for (let index = 0; index < path$
|
|
107214
|
-
const segment = path$
|
|
107215
|
-
const isLast = index === path$
|
|
107468
|
+
for (let index = 0; index < path$4.length; index++) {
|
|
107469
|
+
const segment = path$4[index];
|
|
107470
|
+
const isLast = index === path$4.length - 1;
|
|
107216
107471
|
if (!segment) return {
|
|
107217
107472
|
ok: false,
|
|
107218
107473
|
error: "Invalid empty path segment."
|
|
@@ -107221,7 +107476,7 @@ function setFieldPath(target, path$3, value) {
|
|
|
107221
107476
|
if (!isRecord$7(current)) {
|
|
107222
107477
|
return {
|
|
107223
107478
|
ok: false,
|
|
107224
|
-
error: `Cannot set ${formatContentFieldPath(path$
|
|
107479
|
+
error: `Cannot set ${formatContentFieldPath(path$4)} because ${segment.key} is not inside an object.`
|
|
107225
107480
|
};
|
|
107226
107481
|
}
|
|
107227
107482
|
if (isLast) {
|
|
@@ -110075,8 +110330,8 @@ async function reclaimExpiredClaim(claimPath, at, staleLockMs, probeProcess, own
|
|
|
110075
110330
|
if (!isMissing$2(error$1)) throw error$1;
|
|
110076
110331
|
});
|
|
110077
110332
|
}
|
|
110078
|
-
async function reclaimStale(path$
|
|
110079
|
-
const claimPath = `${path$
|
|
110333
|
+
async function reclaimStale(path$4, at, staleLockMs, probeProcess, ownerIdentity, randomNonce) {
|
|
110334
|
+
const claimPath = `${path$4}.reclaim`;
|
|
110080
110335
|
let claim;
|
|
110081
110336
|
let claimOwned = false;
|
|
110082
110337
|
try {
|
|
@@ -110093,17 +110348,17 @@ async function reclaimStale(path$3, at, staleLockMs, probeProcess, ownerIdentity
|
|
|
110093
110348
|
claim = undefined;
|
|
110094
110349
|
let stats;
|
|
110095
110350
|
try {
|
|
110096
|
-
stats = await lstat(path$
|
|
110351
|
+
stats = await lstat(path$4);
|
|
110097
110352
|
} catch (error$1) {
|
|
110098
110353
|
return isMissing$2(error$1);
|
|
110099
110354
|
}
|
|
110100
|
-
const raw = await readFile(path$
|
|
110355
|
+
const raw = await readFile(path$4, "utf8").catch(() => null);
|
|
110101
110356
|
const metadata = raw === null ? null : parseMetadata(raw);
|
|
110102
110357
|
const createdAt = metadata?.createdAt ?? stats.mtimeMs;
|
|
110103
110358
|
if (at - createdAt < staleLockMs || !metadata || isUnknownIdentity(metadata)) return false;
|
|
110104
110359
|
const probe = await probeProcess(metadata);
|
|
110105
110360
|
if (probe !== "dead" && probe !== "different_instance") return false;
|
|
110106
|
-
await unlink$1(path$
|
|
110361
|
+
await unlink$1(path$4).catch((error$1) => {
|
|
110107
110362
|
if (!isMissing$2(error$1)) throw error$1;
|
|
110108
110363
|
});
|
|
110109
110364
|
return true;
|
|
@@ -110140,7 +110395,7 @@ function createFilesystemOwnerLock(options) {
|
|
|
110140
110395
|
return ownerIdentityPromise;
|
|
110141
110396
|
};
|
|
110142
110397
|
return { async acquire(key, timeoutMs) {
|
|
110143
|
-
const path$
|
|
110398
|
+
const path$4 = options.keyToPath(key);
|
|
110144
110399
|
const boundedTimeout = Math.max(0, timeoutMs);
|
|
110145
110400
|
const deadline = now() + boundedTimeout;
|
|
110146
110401
|
try {
|
|
@@ -110155,7 +110410,7 @@ function createFilesystemOwnerLock(options) {
|
|
|
110155
110410
|
...identity
|
|
110156
110411
|
};
|
|
110157
110412
|
try {
|
|
110158
|
-
handle = await open(path$
|
|
110413
|
+
handle = await open(path$4, "wx", LOCK_FILE_MODE);
|
|
110159
110414
|
await handle.writeFile(JSON.stringify(metadata), "utf8");
|
|
110160
110415
|
await handle.sync();
|
|
110161
110416
|
await handle.close();
|
|
@@ -110164,10 +110419,10 @@ function createFilesystemOwnerLock(options) {
|
|
|
110164
110419
|
const lockHandle = { release: async () => {
|
|
110165
110420
|
if (released) return;
|
|
110166
110421
|
released = true;
|
|
110167
|
-
const current = await readFile(path$
|
|
110422
|
+
const current = await readFile(path$4, "utf8").catch(() => null);
|
|
110168
110423
|
const parsed = current === null ? null : parseMetadata(current);
|
|
110169
110424
|
if (!parsed || parsed.pid !== metadata.pid || parsed.host !== metadata.host || parsed.instance !== metadata.instance || parsed.nonce !== metadata.nonce) return;
|
|
110170
|
-
await unlink$1(path$
|
|
110425
|
+
await unlink$1(path$4).catch((error$1) => {
|
|
110171
110426
|
if (!isMissing$2(error$1)) throw error$1;
|
|
110172
110427
|
});
|
|
110173
110428
|
} };
|
|
@@ -110179,7 +110434,7 @@ function createFilesystemOwnerLock(options) {
|
|
|
110179
110434
|
if (handle) await handle.close().catch(() => undefined);
|
|
110180
110435
|
if (!isAlreadyExists(error$1)) return { tag: "failed" };
|
|
110181
110436
|
const at = now();
|
|
110182
|
-
if (await reclaimStale(path$
|
|
110437
|
+
if (await reclaimStale(path$4, at, staleLockMs, probeProcess, identity, randomNonce)) continue;
|
|
110183
110438
|
if (at >= deadline) return { tag: "busy" };
|
|
110184
110439
|
await sleep(Math.min(50, Math.max(1, deadline - at)));
|
|
110185
110440
|
}
|
|
@@ -110316,9 +110571,9 @@ function isMissing$1(error$1) {
|
|
|
110316
110571
|
function hasOwnerOnlyMode(stats, expected) {
|
|
110317
110572
|
return (stats.mode & 511) === expected && (stats.mode & 63) === 0;
|
|
110318
110573
|
}
|
|
110319
|
-
async function provePermissions(platform, getUid, permissionProbe, path$
|
|
110574
|
+
async function provePermissions(platform, getUid, permissionProbe, path$4, kind, stats) {
|
|
110320
110575
|
if (platform === "windows") {
|
|
110321
|
-
if (!permissionProbe || !await permissionProbe(path$
|
|
110576
|
+
if (!permissionProbe || !await permissionProbe(path$4, kind)) {
|
|
110322
110577
|
throw new PermissionError("current-user ACL proof unavailable");
|
|
110323
110578
|
}
|
|
110324
110579
|
return;
|
|
@@ -110347,16 +110602,16 @@ async function secureDirectory(options, platform, getUid) {
|
|
|
110347
110602
|
function credentialPath(rootDir, key) {
|
|
110348
110603
|
return join(rootDir, `${credentialStoreIdentity(key)}.json`);
|
|
110349
110604
|
}
|
|
110350
|
-
async function secureFile(path$
|
|
110351
|
-
const stats = await lstat(path$
|
|
110605
|
+
async function secureFile(path$4, platform, getUid, permissionProbe) {
|
|
110606
|
+
const stats = await lstat(path$4);
|
|
110352
110607
|
if (!stats.isFile()) throw new PermissionError("credential path is not a regular file");
|
|
110353
|
-
await provePermissions(platform, getUid, permissionProbe, path$
|
|
110608
|
+
await provePermissions(platform, getUid, permissionProbe, path$4, "file", stats);
|
|
110354
110609
|
}
|
|
110355
|
-
async function proveRemovableFile(path$
|
|
110356
|
-
const stats = await lstat(path$
|
|
110610
|
+
async function proveRemovableFile(path$4, platform, getUid, permissionProbe) {
|
|
110611
|
+
const stats = await lstat(path$4);
|
|
110357
110612
|
if (!stats.isFile()) throw new PermissionError("credential path is not a regular file");
|
|
110358
110613
|
if (platform === "windows") {
|
|
110359
|
-
if (!permissionProbe || !await permissionProbe(path$
|
|
110614
|
+
if (!permissionProbe || !await permissionProbe(path$4, "file")) {
|
|
110360
110615
|
throw new PermissionError("current-user ACL proof unavailable");
|
|
110361
110616
|
}
|
|
110362
110617
|
return;
|
|
@@ -110376,14 +110631,14 @@ function createPermissionLockedCredentialStore(options) {
|
|
|
110376
110631
|
async load(key) {
|
|
110377
110632
|
try {
|
|
110378
110633
|
await secureDirectory(options, platform, getUid);
|
|
110379
|
-
const path$
|
|
110634
|
+
const path$4 = options.pathFor?.(key) ?? credentialPath(options.rootDir, key);
|
|
110380
110635
|
try {
|
|
110381
|
-
await secureFile(path$
|
|
110636
|
+
await secureFile(path$4, platform, getUid, options.permissionProbe);
|
|
110382
110637
|
} catch (error$1) {
|
|
110383
110638
|
if (isMissing$1(error$1)) return { tag: "missing" };
|
|
110384
110639
|
throw error$1;
|
|
110385
110640
|
}
|
|
110386
|
-
const raw = await readFile(path$
|
|
110641
|
+
const raw = await readFile(path$4, "utf8");
|
|
110387
110642
|
const parsed = parseStoredAccountCredential(raw);
|
|
110388
110643
|
return parsed.ok ? {
|
|
110389
110644
|
tag: "found",
|
|
@@ -110455,14 +110710,14 @@ function createPermissionLockedCredentialStore(options) {
|
|
|
110455
110710
|
async remove(key) {
|
|
110456
110711
|
try {
|
|
110457
110712
|
await secureDirectory(options, platform, getUid);
|
|
110458
|
-
const path$
|
|
110713
|
+
const path$4 = options.pathFor?.(key) ?? credentialPath(options.rootDir, key);
|
|
110459
110714
|
try {
|
|
110460
|
-
await proveRemovableFile(path$
|
|
110715
|
+
await proveRemovableFile(path$4, platform, getUid, options.permissionProbe);
|
|
110461
110716
|
} catch (error$1) {
|
|
110462
110717
|
if (isMissing$1(error$1)) return { tag: "missing" };
|
|
110463
110718
|
throw error$1;
|
|
110464
110719
|
}
|
|
110465
|
-
await unlink$1(path$
|
|
110720
|
+
await unlink$1(path$4);
|
|
110466
110721
|
return { tag: "removed" };
|
|
110467
110722
|
} catch (error$1) {
|
|
110468
110723
|
if (error$1 instanceof PermissionError) {
|
|
@@ -111459,9 +111714,9 @@ async function requestIdentity(state, access$1) {
|
|
|
111459
111714
|
...parsed.data.email ? { email: parsed.data.email } : {}
|
|
111460
111715
|
});
|
|
111461
111716
|
}
|
|
111462
|
-
async function requestNoContent(state, path$
|
|
111717
|
+
async function requestNoContent(state, path$4, access$1, init, operation) {
|
|
111463
111718
|
try {
|
|
111464
|
-
const response = await state.fetcher(endpoint(state, path$
|
|
111719
|
+
const response = await state.fetcher(endpoint(state, path$4), {
|
|
111465
111720
|
...init,
|
|
111466
111721
|
headers: {
|
|
111467
111722
|
...authHeaders(state, access$1),
|
|
@@ -111509,8 +111764,8 @@ function providerErrorCode(payload) {
|
|
|
111509
111764
|
parsed.data.code
|
|
111510
111765
|
].filter((value) => typeof value === "string").join(" ").toLowerCase();
|
|
111511
111766
|
}
|
|
111512
|
-
function endpoint(state, path$
|
|
111513
|
-
return `${state.baseUrl}${path$
|
|
111767
|
+
function endpoint(state, path$4) {
|
|
111768
|
+
return `${state.baseUrl}${path$4}`;
|
|
111514
111769
|
}
|
|
111515
111770
|
function parseBaseUrl(value, environment) {
|
|
111516
111771
|
if (value.length === 0 || value.length > MAX_ISSUER_LENGTH) return null;
|
|
@@ -113067,16 +113322,16 @@ function projectNameFromPath(projectPath) {
|
|
|
113067
113322
|
return value.length > 0 ? value.slice(0, 120) : "Riverbank project";
|
|
113068
113323
|
}
|
|
113069
113324
|
function parseProjectConfigPath(value, projectPath) {
|
|
113070
|
-
return parseTarget(value, projectPath, CONFIG_FILENAME, (path$
|
|
113325
|
+
return parseTarget(value, projectPath, CONFIG_FILENAME, (path$4) => path$4);
|
|
113071
113326
|
}
|
|
113072
113327
|
function parseProjectEnvPath(value, projectPath) {
|
|
113073
|
-
return parseTarget(value, projectPath, ENV_FILENAME, (path$
|
|
113328
|
+
return parseTarget(value, projectPath, ENV_FILENAME, (path$4) => path$4);
|
|
113074
113329
|
}
|
|
113075
113330
|
function parseProjectGitignorePath(value, projectPath) {
|
|
113076
|
-
return parseTarget(value, projectPath, GITIGNORE_FILENAME, (path$
|
|
113331
|
+
return parseTarget(value, projectPath, GITIGNORE_FILENAME, (path$4) => path$4);
|
|
113077
113332
|
}
|
|
113078
113333
|
function parseProjectLinkagePath(value, projectPath) {
|
|
113079
|
-
return parseTarget(value, projectPath, LINKAGE_FILENAME, (path$
|
|
113334
|
+
return parseTarget(value, projectPath, LINKAGE_FILENAME, (path$4) => path$4);
|
|
113080
113335
|
}
|
|
113081
113336
|
function isRecord$6(value) {
|
|
113082
113337
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -114897,6 +115152,7 @@ const allowedPathPrefixes = [
|
|
|
114897
115152
|
"/sites/{siteId}/bookings/person-records",
|
|
114898
115153
|
"/sites/{siteId}/bookings/waitlist-entries",
|
|
114899
115154
|
"/sites/{siteId}/content",
|
|
115155
|
+
"/sites/{siteId}/edit-leases",
|
|
114900
115156
|
"/sites/{siteId}/content-types",
|
|
114901
115157
|
"/sites/{siteId}/routes",
|
|
114902
115158
|
"/sites/{siteId}/settings/general",
|
|
@@ -115041,11 +115297,11 @@ function matchesClassificationRule(descriptor, rule$2) {
|
|
|
115041
115297
|
function isDashboardSiteMutation(descriptor) {
|
|
115042
115298
|
return descriptor.auth === "user" && mutatingMethods.includes(descriptor.method) && descriptor.path.includes("{siteId}");
|
|
115043
115299
|
}
|
|
115044
|
-
function pathContainsAnySegmentSequence(path$
|
|
115045
|
-
return fragments.some((fragment) => pathContainsSegmentSequence(path$
|
|
115300
|
+
function pathContainsAnySegmentSequence(path$4, fragments) {
|
|
115301
|
+
return fragments.some((fragment) => pathContainsSegmentSequence(path$4, fragment));
|
|
115046
115302
|
}
|
|
115047
|
-
function pathContainsSegmentSequence(path$
|
|
115048
|
-
const pathSegments = path$
|
|
115303
|
+
function pathContainsSegmentSequence(path$4, fragment) {
|
|
115304
|
+
const pathSegments = path$4.split("/").filter(Boolean);
|
|
115049
115305
|
const fragmentSegments = fragment.split("/").filter(Boolean);
|
|
115050
115306
|
if (fragmentSegments.length === 0) {
|
|
115051
115307
|
return false;
|
|
@@ -115742,11 +115998,11 @@ const DEFAULT_LAUNCH_READINESS_INPUT = {
|
|
|
115742
115998
|
publicContact: { kind: "missing" },
|
|
115743
115999
|
overrides: []
|
|
115744
116000
|
};
|
|
115745
|
-
function makeDashboardPath(siteId, path$
|
|
116001
|
+
function makeDashboardPath(siteId, path$4) {
|
|
115746
116002
|
if (!siteId) {
|
|
115747
116003
|
return null;
|
|
115748
116004
|
}
|
|
115749
|
-
return `/dashboard/sites/${siteId}${path$
|
|
116005
|
+
return `/dashboard/sites/${siteId}${path$4}`;
|
|
115750
116006
|
}
|
|
115751
116007
|
function informationalAction(label) {
|
|
115752
116008
|
return {
|
|
@@ -115754,8 +116010,8 @@ function informationalAction(label) {
|
|
|
115754
116010
|
label
|
|
115755
116011
|
};
|
|
115756
116012
|
}
|
|
115757
|
-
function openDashboardPathAction(siteId, path$
|
|
115758
|
-
const dashboardPath = makeDashboardPath(siteId, path$
|
|
116013
|
+
function openDashboardPathAction(siteId, path$4, label) {
|
|
116014
|
+
const dashboardPath = makeDashboardPath(siteId, path$4);
|
|
115759
116015
|
if (!dashboardPath) {
|
|
115760
116016
|
return informationalAction(label);
|
|
115761
116017
|
}
|
|
@@ -115765,7 +116021,7 @@ function openDashboardPathAction(siteId, path$3, label) {
|
|
|
115765
116021
|
path: dashboardPath
|
|
115766
116022
|
};
|
|
115767
116023
|
}
|
|
115768
|
-
function appendQueryString(path$
|
|
116024
|
+
function appendQueryString(path$4, query) {
|
|
115769
116025
|
const params = new URLSearchParams();
|
|
115770
116026
|
for (const [key, value] of Object.entries(query)) {
|
|
115771
116027
|
if (value) {
|
|
@@ -115773,7 +116029,7 @@ function appendQueryString(path$3, query) {
|
|
|
115773
116029
|
}
|
|
115774
116030
|
}
|
|
115775
116031
|
const queryString = params.toString();
|
|
115776
|
-
return queryString ? `${path$
|
|
116032
|
+
return queryString ? `${path$4}?${queryString}` : path$4;
|
|
115777
116033
|
}
|
|
115778
116034
|
function evidenceFromDerivedState(state) {
|
|
115779
116035
|
return state === "complete" ? { kind: "derived" } : {
|
|
@@ -115901,7 +116157,7 @@ function appointmentsRequirements(context, input) {
|
|
|
115901
116157
|
if (appointments.kind === "disabled") return [];
|
|
115902
116158
|
const override = appointmentsOverrideFor(context, input);
|
|
115903
116159
|
const state = appointments.kind === "ready" ? "complete" : "pending";
|
|
115904
|
-
const path$
|
|
116160
|
+
const path$4 = appointments.kind === "pending_setup" ? appendQueryString("/bookings/appointments/setup", {
|
|
115905
116161
|
step: appointments.targetStep,
|
|
115906
116162
|
returnTo: "launch"
|
|
115907
116163
|
}) : "/bookings/services";
|
|
@@ -115916,7 +116172,7 @@ function appointmentsRequirements(context, input) {
|
|
|
115916
116172
|
owner: "admin",
|
|
115917
116173
|
title: "Configure appointments",
|
|
115918
116174
|
description: appointmentsDescription(appointments, override),
|
|
115919
|
-
action: openDashboardPathAction(context.siteId, path$
|
|
116175
|
+
action: openDashboardPathAction(context.siteId, path$4, "Set up appointments"),
|
|
115920
116176
|
secondaryAction: appointmentsSecondaryAction(context, appointments, override),
|
|
115921
116177
|
evidence
|
|
115922
116178
|
};
|
|
@@ -116976,8 +117232,8 @@ function serializeSiteBannerDraft(value) {
|
|
|
116976
117232
|
}
|
|
116977
117233
|
};
|
|
116978
117234
|
}
|
|
116979
|
-
function toDraftIssuePath(path$
|
|
116980
|
-
const sanitized = path$
|
|
117235
|
+
function toDraftIssuePath(path$4) {
|
|
117236
|
+
const sanitized = path$4.flatMap((segment) => typeof segment === "string" || typeof segment === "number" ? [segment] : []);
|
|
116981
117237
|
return sanitized.length > 0 ? sanitized : ["body"];
|
|
116982
117238
|
}
|
|
116983
117239
|
function paragraphTextLength(paragraph) {
|
|
@@ -117391,92 +117647,6 @@ async function updateContentEntryContent(apiClient, { siteId, type, entryId, bod
|
|
|
117391
117647
|
return normalizeApiError(error$1, "Failed to update content entry content");
|
|
117392
117648
|
}
|
|
117393
117649
|
}
|
|
117394
|
-
async function mutateContentEntryUnified(apiClient, { siteId, type, entryId, metadata, content, options }) {
|
|
117395
|
-
let entryDetail;
|
|
117396
|
-
try {
|
|
117397
|
-
entryDetail = unwrapResponse(await apiClient({
|
|
117398
|
-
endpoint: "getContentEntry",
|
|
117399
|
-
params: {
|
|
117400
|
-
siteId,
|
|
117401
|
-
type,
|
|
117402
|
-
entryId
|
|
117403
|
-
},
|
|
117404
|
-
options
|
|
117405
|
-
}));
|
|
117406
|
-
} catch (error$1) {
|
|
117407
|
-
return normalizeApiError(error$1, "Failed to load content entry");
|
|
117408
|
-
}
|
|
117409
|
-
const routeId = entryDetail.entry.route?.id;
|
|
117410
|
-
if (metadata && routeId) {
|
|
117411
|
-
const routePayload = {};
|
|
117412
|
-
if (metadata.title !== undefined) routePayload.draftTitle = metadata.title;
|
|
117413
|
-
if (metadata.slug !== undefined) routePayload.draftSlug = metadata.slug;
|
|
117414
|
-
if (metadata.metaTitle !== undefined) routePayload.draftMetaTitle = metadata.metaTitle;
|
|
117415
|
-
if (metadata.metaDescription !== undefined) routePayload.draftMetaDescription = metadata.metaDescription;
|
|
117416
|
-
if (metadata.status !== undefined) routePayload.draftStatus = metadata.status;
|
|
117417
|
-
if (metadata.publishAt !== undefined) routePayload.scheduledPublishAt = metadata.publishAt;
|
|
117418
|
-
if (metadata.ogImageId !== undefined) routePayload.ogImageId = metadata.ogImageId;
|
|
117419
|
-
if (Object.keys(routePayload).length > 0) {
|
|
117420
|
-
try {
|
|
117421
|
-
await unwrapResponse(await apiClient({
|
|
117422
|
-
endpoint: "updateRouteMetadata",
|
|
117423
|
-
params: {
|
|
117424
|
-
siteId,
|
|
117425
|
-
routeId
|
|
117426
|
-
},
|
|
117427
|
-
body: routePayload,
|
|
117428
|
-
options
|
|
117429
|
-
}));
|
|
117430
|
-
} catch (error$1) {
|
|
117431
|
-
return normalizeApiError(error$1, "Failed to update content entry metadata");
|
|
117432
|
-
}
|
|
117433
|
-
}
|
|
117434
|
-
}
|
|
117435
|
-
if (content) {
|
|
117436
|
-
const optimisticHash = content.optimistic_hash ?? undefined;
|
|
117437
|
-
try {
|
|
117438
|
-
if ("data" in content) {
|
|
117439
|
-
await updateContentEntryContent(apiClient, {
|
|
117440
|
-
siteId,
|
|
117441
|
-
type,
|
|
117442
|
-
entryId,
|
|
117443
|
-
body: {
|
|
117444
|
-
data: content.data,
|
|
117445
|
-
optimistic_hash: optimisticHash
|
|
117446
|
-
},
|
|
117447
|
-
options
|
|
117448
|
-
});
|
|
117449
|
-
} else if ("path" in content && "value" in content) {
|
|
117450
|
-
await updateContentEntryContent(apiClient, {
|
|
117451
|
-
siteId,
|
|
117452
|
-
type,
|
|
117453
|
-
entryId,
|
|
117454
|
-
body: {
|
|
117455
|
-
path: content.path,
|
|
117456
|
-
value: content.value,
|
|
117457
|
-
optimistic_hash: optimisticHash
|
|
117458
|
-
},
|
|
117459
|
-
options
|
|
117460
|
-
});
|
|
117461
|
-
}
|
|
117462
|
-
} catch (error$1) {
|
|
117463
|
-
return normalizeApiError(error$1, "Failed to update content entry content");
|
|
117464
|
-
}
|
|
117465
|
-
}
|
|
117466
|
-
try {
|
|
117467
|
-
return unwrapResponse(await apiClient({
|
|
117468
|
-
endpoint: "getContentEntry",
|
|
117469
|
-
params: {
|
|
117470
|
-
siteId,
|
|
117471
|
-
type,
|
|
117472
|
-
entryId
|
|
117473
|
-
},
|
|
117474
|
-
options
|
|
117475
|
-
}));
|
|
117476
|
-
} catch (error$1) {
|
|
117477
|
-
return normalizeApiError(error$1, "Failed to load content entry");
|
|
117478
|
-
}
|
|
117479
|
-
}
|
|
117480
117650
|
async function listPublishedEntries(apiClient, { siteId, type, limit, offset, order, stage, meta, mode, entryIds, options }) {
|
|
117481
117651
|
const params = {
|
|
117482
117652
|
endpoint: "listPublishedEntries",
|
|
@@ -117584,7 +117754,20 @@ const blocksKeys = {
|
|
|
117584
117754
|
siteId,
|
|
117585
117755
|
pageId
|
|
117586
117756
|
],
|
|
117587
|
-
item: (blockId) => ["block", blockId]
|
|
117757
|
+
item: (blockId) => ["block", blockId],
|
|
117758
|
+
entrySlots: (siteId, typeKey, entryId) => [
|
|
117759
|
+
"page-content-slots",
|
|
117760
|
+
siteId,
|
|
117761
|
+
"contentEntry",
|
|
117762
|
+
typeKey,
|
|
117763
|
+
entryId
|
|
117764
|
+
],
|
|
117765
|
+
surfaceSlots: (siteId, pageSurfaceId) => [
|
|
117766
|
+
"page-content-slots",
|
|
117767
|
+
siteId,
|
|
117768
|
+
"pageSurface",
|
|
117769
|
+
pageSurfaceId
|
|
117770
|
+
]
|
|
117588
117771
|
};
|
|
117589
117772
|
|
|
117590
117773
|
//#endregion
|
|
@@ -117861,10 +118044,10 @@ function toPageRecord(response) {
|
|
|
117861
118044
|
}
|
|
117862
118045
|
return entry;
|
|
117863
118046
|
}
|
|
117864
|
-
async function createPage(apiClient, { siteId, name, path: path$
|
|
118047
|
+
async function createPage(apiClient, { siteId, name, path: path$4, purpose, options }) {
|
|
117865
118048
|
const body = {};
|
|
117866
118049
|
if (typeof name === "string") body.name = name;
|
|
117867
|
-
if (typeof path$
|
|
118050
|
+
if (typeof path$4 === "string") body.path = path$4;
|
|
117868
118051
|
if (typeof purpose === "string") body.purpose = purpose;
|
|
117869
118052
|
try {
|
|
117870
118053
|
const data = unwrapResponse(await apiClient({
|
|
@@ -117897,6 +118080,7 @@ async function discardPageDraft(apiClient, { siteId, pageId, options }) {
|
|
|
117897
118080
|
entryId: pageId,
|
|
117898
118081
|
options
|
|
117899
118082
|
});
|
|
118083
|
+
if (!(result.blockState.kind === "page")) throw new Error("Expected a page discard response");
|
|
117900
118084
|
return { page: toPageRecord(result) };
|
|
117901
118085
|
}
|
|
117902
118086
|
async function savePageDesignState(apiClient, { siteId, pageId, body, options }) {
|
|
@@ -118756,19 +118940,17 @@ async function createBillingPortalSession(apiClient, options) {
|
|
|
118756
118940
|
return normalizeApiError(error$1, "Failed to open billing details");
|
|
118757
118941
|
}
|
|
118758
118942
|
}
|
|
118759
|
-
async function billingCheckout(apiClient, { attemptId, planId,
|
|
118943
|
+
async function billingCheckout(apiClient, { attemptId, planId, continuation, options }) {
|
|
118760
118944
|
try {
|
|
118761
118945
|
return unwrapResponse(await apiClient({
|
|
118762
118946
|
endpoint: "billingCheckout",
|
|
118763
118947
|
body: continuation ? {
|
|
118764
118948
|
attemptId,
|
|
118765
118949
|
planId,
|
|
118766
|
-
interval,
|
|
118767
118950
|
continuation
|
|
118768
118951
|
} : {
|
|
118769
118952
|
attemptId,
|
|
118770
|
-
planId
|
|
118771
|
-
interval
|
|
118953
|
+
planId
|
|
118772
118954
|
},
|
|
118773
118955
|
options
|
|
118774
118956
|
}));
|
|
@@ -119693,16 +119875,16 @@ function isUnsafeFileTarget(stats) {
|
|
|
119693
119875
|
return stats.isSymbolicLink() || !stats.isFile();
|
|
119694
119876
|
}
|
|
119695
119877
|
/** Read an optional project-local file without following an unsafe target. */
|
|
119696
|
-
async function readSafeFile(path$
|
|
119878
|
+
async function readSafeFile(path$4) {
|
|
119697
119879
|
try {
|
|
119698
|
-
const stats = await lstat(path$
|
|
119880
|
+
const stats = await lstat(path$4);
|
|
119699
119881
|
if (isUnsafeFileTarget(stats)) return {
|
|
119700
119882
|
ok: false,
|
|
119701
119883
|
error: "unsafe_target"
|
|
119702
119884
|
};
|
|
119703
119885
|
return {
|
|
119704
119886
|
ok: true,
|
|
119705
|
-
value: await readFile(path$
|
|
119887
|
+
value: await readFile(path$4, "utf8")
|
|
119706
119888
|
};
|
|
119707
119889
|
} catch (error$1) {
|
|
119708
119890
|
if (isMissing(error$1)) return {
|
|
@@ -119715,9 +119897,9 @@ async function readSafeFile(path$3) {
|
|
|
119715
119897
|
};
|
|
119716
119898
|
}
|
|
119717
119899
|
}
|
|
119718
|
-
async function targetIsSafe(path$
|
|
119900
|
+
async function targetIsSafe(path$4) {
|
|
119719
119901
|
try {
|
|
119720
|
-
const stats = await lstat(path$
|
|
119902
|
+
const stats = await lstat(path$4);
|
|
119721
119903
|
return !isUnsafeFileTarget(stats);
|
|
119722
119904
|
} catch (error$1) {
|
|
119723
119905
|
if (isMissing(error$1)) return true;
|
|
@@ -119740,30 +119922,30 @@ async function syncDirectory(directory) {
|
|
|
119740
119922
|
* temporary file. Existing symlinks and non-regular files are rejected so a
|
|
119741
119923
|
* project-local write cannot follow an attacker-controlled target.
|
|
119742
119924
|
*/
|
|
119743
|
-
async function writeFileAtomic(path$
|
|
119925
|
+
async function writeFileAtomic(path$4, content, options = {}) {
|
|
119744
119926
|
const mode = options.mode ?? 384;
|
|
119745
119927
|
const randomSuffix = options.randomSuffix ?? (() => `${process.pid}-${Date.now()}-${randomUUID()}`);
|
|
119746
|
-
const parent = dirname$1(path$
|
|
119928
|
+
const parent = dirname$1(path$4);
|
|
119747
119929
|
let handle;
|
|
119748
119930
|
let temporaryPath;
|
|
119749
119931
|
try {
|
|
119750
119932
|
if (options.ensureParent === true) {
|
|
119751
119933
|
await mkdir(parent, { recursive: true });
|
|
119752
119934
|
}
|
|
119753
|
-
if (!await targetIsSafe(path$
|
|
119935
|
+
if (!await targetIsSafe(path$4)) {
|
|
119754
119936
|
return {
|
|
119755
119937
|
ok: false,
|
|
119756
119938
|
error: { tag: "unsafe_target" }
|
|
119757
119939
|
};
|
|
119758
119940
|
}
|
|
119759
|
-
temporaryPath = join(parent, `.${basename(path$
|
|
119941
|
+
temporaryPath = join(parent, `.${basename(path$4)}.${randomSuffix()}.tmp`);
|
|
119760
119942
|
handle = await open(temporaryPath, "wx", mode);
|
|
119761
119943
|
await handle.writeFile(content, "utf8");
|
|
119762
119944
|
await handle.sync();
|
|
119763
119945
|
await handle.close();
|
|
119764
119946
|
handle = undefined;
|
|
119765
119947
|
await chmod(temporaryPath, mode);
|
|
119766
|
-
await rename(temporaryPath, path$
|
|
119948
|
+
await rename(temporaryPath, path$4);
|
|
119767
119949
|
temporaryPath = undefined;
|
|
119768
119950
|
await syncDirectory(parent);
|
|
119769
119951
|
return { ok: true };
|
|
@@ -119820,9 +120002,9 @@ function parseState(value, statePath) {
|
|
|
119820
120002
|
});
|
|
119821
120003
|
}
|
|
119822
120004
|
const receipts = {};
|
|
119823
|
-
for (const [path$
|
|
119824
|
-
const pathResult = canonicalRecoveryProjectPath(path$
|
|
119825
|
-
if (!pathResult.ok || pathResult.value !== path$
|
|
120005
|
+
for (const [path$4, valueForPath] of Object.entries(value.receipts)) {
|
|
120006
|
+
const pathResult = canonicalRecoveryProjectPath(path$4);
|
|
120007
|
+
if (!pathResult.ok || pathResult.value !== path$4) return err({
|
|
119826
120008
|
tag: "state_malformed",
|
|
119827
120009
|
path: statePath
|
|
119828
120010
|
});
|
|
@@ -119831,7 +120013,7 @@ function parseState(value, statePath) {
|
|
|
119831
120013
|
tag: "state_malformed",
|
|
119832
120014
|
path: statePath
|
|
119833
120015
|
});
|
|
119834
|
-
receipts[path$
|
|
120016
|
+
receipts[path$4] = parsed.value;
|
|
119835
120017
|
}
|
|
119836
120018
|
return ok({
|
|
119837
120019
|
version: RECOVERY_RECEIPT_VERSION,
|
|
@@ -119866,7 +120048,7 @@ async function readState(stateDirectory) {
|
|
|
119866
120048
|
async function writeState(stateDirectory, state) {
|
|
119867
120049
|
const raw = `${JSON.stringify({
|
|
119868
120050
|
version: state.version,
|
|
119869
|
-
receipts: Object.fromEntries(Object.entries(state.receipts).map(([path$
|
|
120051
|
+
receipts: Object.fromEntries(Object.entries(state.receipts).map(([path$4, receipt]) => [path$4, serializeRecoveryReceipt(receipt)]))
|
|
119870
120052
|
}, null, 2)}\n`;
|
|
119871
120053
|
const result = await writeFileAtomic(recoveryReceiptStatePath(stateDirectory), raw, {
|
|
119872
120054
|
ensureParent: true,
|
|
@@ -119899,9 +120081,9 @@ async function saveRecoveryReceiptState(stateDirectory, receipt, now) {
|
|
|
119899
120081
|
const prunedReceipts = pruneRecoveryReceipts(Object.values(before), now);
|
|
119900
120082
|
const retained = new Set(prunedReceipts.map((item) => item.projectPath));
|
|
119901
120083
|
const pruned = [];
|
|
119902
|
-
for (const path$
|
|
119903
|
-
if (retained.has(path$
|
|
119904
|
-
const parsedPath = canonicalRecoveryProjectPath(path$
|
|
120084
|
+
for (const path$4 of Object.keys(before)) {
|
|
120085
|
+
if (retained.has(path$4)) continue;
|
|
120086
|
+
const parsedPath = canonicalRecoveryProjectPath(path$4);
|
|
119905
120087
|
if (!parsedPath.ok) return parsedPath;
|
|
119906
120088
|
pruned.push(recoveryReceiptKey(parsedPath.value));
|
|
119907
120089
|
}
|
|
@@ -120135,8 +120317,8 @@ function parseSerializedLinkage(raw) {
|
|
|
120135
120317
|
* parent/target is a normal first-link state; an existing non-directory parent
|
|
120136
120318
|
* or non-regular target is never safe to read or replace.
|
|
120137
120319
|
*/
|
|
120138
|
-
async function readExistingLinkage(path$
|
|
120139
|
-
const parent = dirname$1(path$
|
|
120320
|
+
async function readExistingLinkage(path$4) {
|
|
120321
|
+
const parent = dirname$1(path$4);
|
|
120140
120322
|
try {
|
|
120141
120323
|
const parentStats = await lstat(parent);
|
|
120142
120324
|
if (parentStats.isSymbolicLink() || !parentStats.isDirectory()) {
|
|
@@ -120155,16 +120337,16 @@ async function readExistingLinkage(path$3) {
|
|
|
120155
120337
|
error: { tag: "read_failed" }
|
|
120156
120338
|
};
|
|
120157
120339
|
}
|
|
120158
|
-
const target = await readSafeFile(path$
|
|
120340
|
+
const target = await readSafeFile(path$4);
|
|
120159
120341
|
return target.ok ? target : {
|
|
120160
120342
|
ok: false,
|
|
120161
120343
|
error: { tag: target.error }
|
|
120162
120344
|
};
|
|
120163
120345
|
}
|
|
120164
|
-
async function writeProjectLinkage(path$
|
|
120346
|
+
async function writeProjectLinkage(path$4, linkage) {
|
|
120165
120347
|
const serialized = serializeProjectLinkage(linkage);
|
|
120166
120348
|
if (!serialized.ok) return serialized;
|
|
120167
|
-
const existingResult = await readExistingLinkage(path$
|
|
120349
|
+
const existingResult = await readExistingLinkage(path$4);
|
|
120168
120350
|
if (!existingResult.ok) return existingResult;
|
|
120169
120351
|
const existing = existingResult.value;
|
|
120170
120352
|
if (existing !== null) {
|
|
@@ -120183,12 +120365,12 @@ async function writeProjectLinkage(path$3, linkage) {
|
|
|
120183
120365
|
return {
|
|
120184
120366
|
ok: true,
|
|
120185
120367
|
value: {
|
|
120186
|
-
path: path$
|
|
120368
|
+
path: path$4,
|
|
120187
120369
|
changed: false
|
|
120188
120370
|
}
|
|
120189
120371
|
};
|
|
120190
120372
|
}
|
|
120191
|
-
const written = await writeFileAtomic(path$
|
|
120373
|
+
const written = await writeFileAtomic(path$4, serialized.value, {
|
|
120192
120374
|
ensureParent: true,
|
|
120193
120375
|
mode: 384
|
|
120194
120376
|
});
|
|
@@ -120202,13 +120384,13 @@ async function writeProjectLinkage(path$3, linkage) {
|
|
|
120202
120384
|
return {
|
|
120203
120385
|
ok: true,
|
|
120204
120386
|
value: {
|
|
120205
|
-
path: path$
|
|
120387
|
+
path: path$4,
|
|
120206
120388
|
changed: true
|
|
120207
120389
|
}
|
|
120208
120390
|
};
|
|
120209
120391
|
}
|
|
120210
|
-
async function readProjectLinkage(path$
|
|
120211
|
-
const rawResult = await readExistingLinkage(path$
|
|
120392
|
+
async function readProjectLinkage(path$4) {
|
|
120393
|
+
const rawResult = await readExistingLinkage(path$4);
|
|
120212
120394
|
if (!rawResult.ok) return rawResult;
|
|
120213
120395
|
if (rawResult.value === null) return {
|
|
120214
120396
|
ok: true,
|
|
@@ -120410,8 +120592,8 @@ function renderEnvMergePlan(plan, render) {
|
|
|
120410
120592
|
content
|
|
120411
120593
|
};
|
|
120412
120594
|
}
|
|
120413
|
-
async function readEnvFile(path$
|
|
120414
|
-
return readSafeFile(path$
|
|
120595
|
+
async function readEnvFile(path$4) {
|
|
120596
|
+
return readSafeFile(path$4);
|
|
120415
120597
|
}
|
|
120416
120598
|
/**
|
|
120417
120599
|
* Read, plan, render, and atomically write one project env file. The caller's
|
|
@@ -120536,8 +120718,8 @@ function planGitignoreEnvRule(existingContent) {
|
|
|
120536
120718
|
function renderGitignorePlan(plan) {
|
|
120537
120719
|
return plan.action.tag === "unchanged" ? plan.existingContent ?? "" : appendGitignoreRule(plan.existingContent ?? "", plan.action.rule);
|
|
120538
120720
|
}
|
|
120539
|
-
async function readGitignoreTarget(path$
|
|
120540
|
-
const result = await readSafeFile(path$
|
|
120721
|
+
async function readGitignoreTarget(path$4) {
|
|
120722
|
+
const result = await readSafeFile(path$4);
|
|
120541
120723
|
return result.ok ? result : {
|
|
120542
120724
|
ok: false,
|
|
120543
120725
|
error: { tag: result.error }
|
|
@@ -120548,8 +120730,8 @@ async function readGitignoreTarget(path$3) {
|
|
|
120548
120730
|
* read and again by the atomic writer, so an existing symlink is never
|
|
120549
120731
|
* followed—even when its contents already appear equivalent.
|
|
120550
120732
|
*/
|
|
120551
|
-
async function writeGitignoreEnvRule(path$
|
|
120552
|
-
const existing = await readGitignoreTarget(path$
|
|
120733
|
+
async function writeGitignoreEnvRule(path$4) {
|
|
120734
|
+
const existing = await readGitignoreTarget(path$4);
|
|
120553
120735
|
if (!existing.ok) return existing;
|
|
120554
120736
|
const plan = planGitignoreEnvRule(existing.value);
|
|
120555
120737
|
if (!plan.ok) return plan;
|
|
@@ -120557,13 +120739,13 @@ async function writeGitignoreEnvRule(path$3) {
|
|
|
120557
120739
|
return {
|
|
120558
120740
|
ok: true,
|
|
120559
120741
|
value: {
|
|
120560
|
-
path: path$
|
|
120742
|
+
path: path$4,
|
|
120561
120743
|
changed: false,
|
|
120562
120744
|
action: plan.value.action
|
|
120563
120745
|
}
|
|
120564
120746
|
};
|
|
120565
120747
|
}
|
|
120566
|
-
const written = await writeFileAtomic(path$
|
|
120748
|
+
const written = await writeFileAtomic(path$4, renderGitignorePlan(plan.value), {
|
|
120567
120749
|
ensureParent: true,
|
|
120568
120750
|
mode: 420
|
|
120569
120751
|
});
|
|
@@ -120585,7 +120767,7 @@ async function writeGitignoreEnvRule(path$3) {
|
|
|
120585
120767
|
return {
|
|
120586
120768
|
ok: true,
|
|
120587
120769
|
value: {
|
|
120588
|
-
path: path$
|
|
120770
|
+
path: path$4,
|
|
120589
120771
|
changed: true,
|
|
120590
120772
|
action: plan.value.action
|
|
120591
120773
|
}
|
|
@@ -120857,8 +121039,8 @@ function classifyObservedLink(input, target, linkage, values) {
|
|
|
120857
121039
|
}
|
|
120858
121040
|
return hasCredential ? { tag: "unsafe_overwrite" } : { tag: "empty" };
|
|
120859
121041
|
}
|
|
120860
|
-
async function readObservedEnvironment(path$
|
|
120861
|
-
const content = await readEnvFile(path$
|
|
121042
|
+
async function readObservedEnvironment(path$4) {
|
|
121043
|
+
const content = await readEnvFile(path$4);
|
|
120862
121044
|
if (!content.ok) return err({ tag: "project_inspection_failed" });
|
|
120863
121045
|
const parsed = parseEnvironmentValues(content.value ?? "");
|
|
120864
121046
|
return parsed.ok ? ok({
|
|
@@ -121283,15 +121465,15 @@ async function chooseSite(deps, sites) {
|
|
|
121283
121465
|
return selected.site;
|
|
121284
121466
|
}
|
|
121285
121467
|
function dashboardRevokeGuidance(siteId, dashboardUrl) {
|
|
121286
|
-
const path$
|
|
121287
|
-
if (dashboardUrl === undefined) return { path: path$
|
|
121468
|
+
const path$4 = `/dashboard/sites/${siteId}/settings/api-keys`;
|
|
121469
|
+
if (dashboardUrl === undefined) return { path: path$4 };
|
|
121288
121470
|
try {
|
|
121289
121471
|
return {
|
|
121290
|
-
path: path$
|
|
121291
|
-
url: new URL(path$
|
|
121472
|
+
path: path$4,
|
|
121473
|
+
url: new URL(path$4, dashboardUrl).toString()
|
|
121292
121474
|
};
|
|
121293
121475
|
} catch {
|
|
121294
|
-
return { path: path$
|
|
121476
|
+
return { path: path$4 };
|
|
121295
121477
|
}
|
|
121296
121478
|
}
|
|
121297
121479
|
function recoveryCleanupSuggestion(receipt, guidance, manualCleanupKeyIds = undefined) {
|
|
@@ -121963,9 +122145,9 @@ function acceptanceTarballPath(environment, name) {
|
|
|
121963
122145
|
const value = environment[name]?.trim();
|
|
121964
122146
|
return value && value.length > 0 ? value : undefined;
|
|
121965
122147
|
}
|
|
121966
|
-
function validAcceptanceTarballPath(path$
|
|
122148
|
+
function validAcceptanceTarballPath(path$4) {
|
|
121967
122149
|
try {
|
|
121968
|
-
return isAbsolute$1(path$
|
|
122150
|
+
return isAbsolute$1(path$4) && extname(path$4) === ".tgz" && existsSync(path$4) && statSync(path$4).isFile();
|
|
121969
122151
|
} catch {
|
|
121970
122152
|
return false;
|
|
121971
122153
|
}
|
|
@@ -122106,9 +122288,9 @@ function preflightInitTarget(input, filesystem, resume) {
|
|
|
122106
122288
|
}
|
|
122107
122289
|
function productionFilesystem() {
|
|
122108
122290
|
return {
|
|
122109
|
-
inspect(path$
|
|
122291
|
+
inspect(path$4) {
|
|
122110
122292
|
try {
|
|
122111
|
-
const stat = lstatSync(path$
|
|
122293
|
+
const stat = lstatSync(path$4);
|
|
122112
122294
|
if (stat.isDirectory()) return "directory";
|
|
122113
122295
|
if (stat.isFile()) return "file";
|
|
122114
122296
|
return "other";
|
|
@@ -122117,9 +122299,9 @@ function productionFilesystem() {
|
|
|
122117
122299
|
throw error$1;
|
|
122118
122300
|
}
|
|
122119
122301
|
},
|
|
122120
|
-
listDirectory: (path$
|
|
122121
|
-
mkdir: (path$
|
|
122122
|
-
writeFile: (path$
|
|
122302
|
+
listDirectory: (path$4) => readdirSync(path$4),
|
|
122303
|
+
mkdir: (path$4) => mkdirSync(path$4, { recursive: true }),
|
|
122304
|
+
writeFile: (path$4, content, executable) => writeFileSync(path$4, content, { mode: executable ? 493 : 420 })
|
|
122123
122305
|
};
|
|
122124
122306
|
}
|
|
122125
122307
|
function productionProcess() {
|