@riverbankcms/sdk 0.125.0 → 0.126.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/README.md +3 -1
  2. package/dist/{PreviewEditorSidebar-BezDOtQ7.mjs → PreviewEditorSidebar-DcYJxTgc.mjs} +67 -266
  3. package/dist/{PreviewEditorUI-CgSqmfo2.mjs → PreviewEditorUI-Ctt1yTJr.mjs} +3 -3
  4. package/dist/{PreviewQueryProvider-BH-3-jSj.mjs → PreviewQueryProvider-DgFDIwvK.mjs} +1 -1
  5. package/dist/{SdkPreviewModeRuntime-Co3AHfj0.mjs → SdkPreviewModeRuntime-CvW1vdQ4.mjs} +27 -27
  6. package/dist/{SiteChromeCustomizeContext-BHF-KANn.mjs → SiteChromeCustomizeContext-C87qlKWw.mjs} +412 -1301
  7. package/dist/_dts/ai/src/contracts/proposals.d.ts +1354 -202
  8. package/dist/_dts/api/src/common/envelope.d.ts +1 -1
  9. package/dist/_dts/api/src/contentRuntime.d.ts +0 -2
  10. package/dist/_dts/api/src/endpoints.d.ts +0 -7
  11. package/dist/_dts/api/src/sdk-event-upsert.d.ts +42 -0
  12. package/dist/_dts/api/src/sdkContracts.d.ts +11 -9
  13. package/dist/_dts/api/src/siteOperations.d.ts +18 -1
  14. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +1 -14
  15. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +15 -2
  16. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +182 -19
  17. package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +1 -2
  18. package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +2 -3
  19. package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +1 -2
  20. package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +3 -12
  21. package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +3 -13
  22. package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +8 -100
  23. package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +1 -4
  24. package/dist/_dts/preview-next/src/client/preview/styleConfiguratorApplyPayload.d.ts +1 -15
  25. package/dist/_dts/preview-next/src/client/preview/styleConfiguratorSnapshot.d.ts +11 -21
  26. package/dist/_dts/sdk/src/cli/commands/event.d.ts +2 -2
  27. package/dist/_dts/sdk/src/cli/commands/eventOccurrenceSchedule.d.ts +12 -0
  28. package/dist/_dts/sdk/src/cli/commands/push/pushAllExtras.d.ts +6 -0
  29. package/dist/_dts/sdk/src/cli/commands/style.d.ts +1 -1
  30. package/dist/_dts/sdk/src/cli/content/legacyEventScheduleShapeError.d.ts +5 -0
  31. package/dist/_dts/sdk/src/cli/content/localEventSchedule.d.ts +17 -0
  32. package/dist/_dts/sdk/src/cli/content/reader.d.ts +5 -10
  33. package/dist/_dts/sdk/src/cli/migrations/events.d.ts +1 -1
  34. package/dist/_dts/sdk/src/cli/site-commands/eventScheduleCompiler.d.ts +24 -0
  35. package/dist/_dts/sdk/src/client/management/http.d.ts +1 -1
  36. package/dist/_dts/sdk/src/client/management/types.d.ts +3 -28
  37. package/dist/_dts/sdk/src/config/index.d.ts +1 -1
  38. package/dist/_dts/sdk/src/public-api/contracts.d.ts +5 -20
  39. package/dist/_dts/sdk/src/rendering/index.d.ts +1 -1
  40. package/dist/_dts/sdk/src/version.d.ts +1 -1
  41. package/dist/_dts/site-commands/src/commandContract.d.ts +33 -5
  42. package/dist/_dts/site-commands/src/commandDomain.d.ts +2 -2
  43. package/dist/_dts/site-commands/src/commands.d.ts +38 -9
  44. package/dist/_dts/site-commands/src/siteStyleCommandSchema.d.ts +28 -1
  45. package/dist/_dts/site-commands/src/siteStyleSelectionSchemaBuilder.d.ts +4 -4
  46. package/dist/_dts/theme-core/src/palette/concretePalette.d.ts +20 -0
  47. package/dist/_dts/theme-core/src/palette/curated/index.d.ts +2 -17
  48. package/dist/_dts/theme-core/src/palette/index.d.ts +1 -6
  49. package/dist/_dts/theme-core/src/palette/schema.d.ts +39 -0
  50. package/dist/_dts/theme-core/src/schema.d.ts +38 -26
  51. package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +4 -6
  52. package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +5 -6
  53. package/dist/cli/index.mjs +612 -522
  54. package/dist/cli/init-docs/content/cli-reference.md +6 -3
  55. package/dist/cli/init-docs/content/content-management.md +24 -13
  56. package/dist/client/{DiscountCodeDisclosure-CyPpekBp.mjs → DiscountCodeDisclosure-DS0AuFWW.mjs} +1 -1
  57. package/dist/client/{EventCombined.client-zywit-60.mjs → EventCombined.client-DtMxLr7q.mjs} +2 -2
  58. package/dist/client/{EventListing.client-J2nLhkKT.mjs → EventListing.client-BdLSRNg1.mjs} +2 -2
  59. package/dist/client/{LeafletStaticMap-CSubXWt6.mjs → LeafletStaticMap-BrpC6vsT.mjs} +1 -1
  60. package/dist/client/{MagicLinkForm-DDLIfiq9.mjs → MagicLinkForm-Bt3IuLMy.mjs} +1 -1
  61. package/dist/client/{StepIndicator-DE8EvHIp.mjs → StepIndicator-CBYPFVoy.mjs} +2 -2
  62. package/dist/client/{accordion-Ct5T5NiA.mjs → accordion-BqqwPJWM.mjs} +1 -1
  63. package/dist/client/{bookingForm-DMxtLPxw.mjs → bookingForm-SneP3yxC.mjs} +5 -6
  64. package/dist/client/bookings.mjs +190 -24
  65. package/dist/client/{carousel--FMqgvob.mjs → carousel-BTIR9L3I.mjs} +1 -1
  66. package/dist/client/{cart-BKX1bWiU.mjs → cart-bqiqd8SX.mjs} +3 -3
  67. package/dist/client/{checkout-B_jxi4WW.mjs → checkout-WbTFV5v4.mjs} +3 -3
  68. package/dist/client/client.mjs +156 -220
  69. package/dist/client/{courseRegistration-DH4MlkRD.mjs → courseRegistration-BcemLAdN.mjs} +6 -7
  70. package/dist/client/{eventCalendar-BQILwAcL.mjs → eventCalendar-CsxIw0V_.mjs} +4 -4
  71. package/dist/client/{eventCombined-DFFW_Vmo.mjs → eventCombined-B6XMoHfa.mjs} +2 -2
  72. package/dist/client/{eventDetails-B045CTSJ.mjs → eventDetails-BJaoPPfo.mjs} +3 -3
  73. package/dist/client/{eventListing-BDMYNVzS.mjs → eventListing-DgwdYHRT.mjs} +2 -2
  74. package/dist/client/{eventRegistration-CQ2-BSnB.mjs → eventRegistration-C0O3folu.mjs} +30 -22
  75. package/dist/client/{form-DJKuyZgN.mjs → form-Bk9txGFt.mjs} +1 -1
  76. package/dist/client/{headerSection-DeTjfiDo.mjs → headerSection-yIBt0yTv.mjs} +2 -2
  77. package/dist/client/hooks.mjs +50 -102
  78. package/dist/client/{locationMap-i2wDA8gB.mjs → locationMap-C-3KIpv-.mjs} +2 -2
  79. package/dist/client/{newsletterForm-DKiueauk.mjs → newsletterForm-CzB8g8h2.mjs} +1 -1
  80. package/dist/client/{pricing-C01J3Epx.mjs → pricing-C1QeDes_.mjs} +1 -1
  81. package/dist/client/{productDetail-Dfc1sZaX.mjs → productDetail-w7SBp5uc.mjs} +3 -3
  82. package/dist/client/{productList-BXbvXWTF.mjs → productList-D0tGKHGf.mjs} +3 -3
  83. package/dist/client/{propsDecoder-CIR5DQ1l.mjs → propsDecoder-Bcin2DB3.mjs} +167 -11
  84. package/dist/client/rendering/client.mjs +219 -276
  85. package/dist/client/rendering/islands.mjs +18 -18
  86. package/dist/client/rendering.mjs +128 -185
  87. package/dist/client/{useDiscountCodeUi-Bcyh4508.mjs → scrollToBlock-h-o_STf_.mjs} +18 -2
  88. package/dist/client/{shop-BbNwPKM-.mjs → shop-BGzmL8O_.mjs} +5 -6
  89. package/dist/client/{shop-commerce-XO-XMFEt.mjs → shop-commerce-lX8QxjX-.mjs} +4 -4
  90. package/dist/client/{shop-commerce-store-Byh6OUGK.mjs → shop-commerce-store-CEurARtu.mjs} +1 -1
  91. package/dist/client/{shopShared-Bbq39mwr.mjs → shopShared-DXxH8xxw.mjs} +2 -2
  92. package/dist/client/{useEventFilters-C8OOJ3el.mjs → useEventFilters-B591g9vd.mjs} +2 -2
  93. package/dist/client/{usePolling-CyJVo9kF.mjs → usePolling-BvnChV4m.mjs} +2 -2
  94. package/dist/preview-next/before-render.mjs +0 -7
  95. package/dist/preview-next/client/runtime.mjs +4 -4
  96. package/dist/preview-next/middleware.mjs +0 -7
  97. package/dist/{previewAuthStore-CJX21dGi.mjs → previewAuthStore-Dev9CdG9.mjs} +0 -7
  98. package/dist/{sdk-runtime-BGhyuE-E.mjs → sdk-runtime-M__i3Jce.mjs} +2 -2
  99. package/dist/{separator-BFs-Kmv5.mjs → separator-VSlnI9bc.mjs} +1 -1
  100. package/dist/server/components.mjs +87 -139
  101. package/dist/server/config-validation.mjs +50 -102
  102. package/dist/server/config.mjs +50 -102
  103. package/dist/server/data.mjs +50 -102
  104. package/dist/server/index.mjs +1 -8
  105. package/dist/server/next.mjs +91 -150
  106. package/dist/server/page-converter.mjs +50 -102
  107. package/dist/server/prebuild.mjs +1 -1
  108. package/dist/server/rendering/server.mjs +50 -102
  109. package/dist/server/rendering.mjs +88 -140
  110. package/dist/server/routing.mjs +71 -147
  111. package/dist/server/server.mjs +51 -110
  112. package/dist/server/theme-bridge.mjs +172 -162
  113. package/dist/server/theme.mjs +167 -11
  114. package/package.json +1 -1
  115. package/dist/_dts/theme-core/src/palette/editorState.d.ts +0 -75
  116. package/dist/_dts/theme-core/src/palette/libraryModel.d.ts +0 -64
  117. package/dist/_dts/theme-core/src/palette/persistenceReadSource.d.ts +0 -81
  118. package/dist/_dts/theme-core/src/palette/resolveSelection.d.ts +0 -75
  119. package/dist/_dts/theme-core/src/palette/selection.d.ts +0 -74
  120. package/dist/_dts/theme-core/src/palette/sitePalettePersistence.d.ts +0 -34
  121. package/dist/client/scrollToBlock-C86BYkyV.mjs +0 -17
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { d as unwrapResponse, l as ApiEnvelopeError, s as ApiRequestError, u as extractApiEnvelopeErrorDetails } from "./previewAuthStore-CJX21dGi.mjs";
2
+ import { d as unwrapResponse, l as ApiEnvelopeError, s as ApiRequestError, u as extractApiEnvelopeErrorDetails } from "./previewAuthStore-Dev9CdG9.mjs";
3
3
  import * as React$1 from "react";
4
4
  import React, { Component, Fragment, cloneElement, createContext, createElement, createRef, forwardRef, isValidElement, memo, useCallback, useContext, useDebugValue, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore } from "react";
5
5
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -51649,7 +51649,7 @@ const parseMediaAssetId = (value) => parseUuidBrand(value, unsafeAsMediaAssetId)
51649
51649
  const parseEventSeriesId = (value) => parseUuidBrand(value, unsafeAsEventSeriesId);
51650
51650
  //#endregion
51651
51651
  //#region ../core/src/assert-never.ts
51652
- function assertNever$9(value, message = "Unexpected variant") {
51652
+ function assertNever$6(value, message = "Unexpected variant") {
51653
51653
  throw new Error(`${message}: ${String(value)}`);
51654
51654
  }
51655
51655
  //#endregion
@@ -51761,7 +51761,7 @@ function formatCoursePriceDisplayLabel(display, options) {
51761
51761
  case "exact": return `Course (${formatCurrencyAmount(display.amount, display.currency, options)})`;
51762
51762
  case "from": return `Course (From ${formatCurrencyAmount(display.amount, display.currency, options)})`;
51763
51763
  case "range": return `Course (${formatCurrencyAmount(display.minAmount, display.currency, options)} - ${formatCurrencyAmount(display.maxAmount, display.currency, options)})`;
51764
- default: return assertNever$9(display);
51764
+ default: return assertNever$6(display);
51765
51765
  }
51766
51766
  }
51767
51767
  /**
@@ -51781,7 +51781,7 @@ function formatBookingPriceDisplay(display, options = {}) {
51781
51781
  case "unavailable": return "Pricing unavailable";
51782
51782
  case "external": return display.label;
51783
51783
  case "course": return formatCoursePriceDisplayLabel(display.display, options);
51784
- default: return assertNever$9(display);
51784
+ default: return assertNever$6(display);
51785
51785
  }
51786
51786
  }
51787
51787
  /** Render an event's price directly from its pricing value. */
@@ -77114,6 +77114,180 @@ const mediaSchema$1 = z.object({
77114
77114
  transform: transformSchema$1.optional()
77115
77115
  });
77116
77116
  //#endregion
77117
+ //#region ../theme-core/src/palette/colors.ts
77118
+ const HEX_COLOR_REGEX = /^#[0-9a-f]{6}$/;
77119
+ const NORMALIZABLE_HEX_REGEX = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
77120
+ const THEME_PALETTE_COLOR_ORDER = [
77121
+ "primary",
77122
+ "secondary",
77123
+ "accent",
77124
+ "success",
77125
+ "warning",
77126
+ "destructive",
77127
+ "background",
77128
+ "surface",
77129
+ "surfaceAlt",
77130
+ "muted",
77131
+ "text",
77132
+ "primaryForeground",
77133
+ "border"
77134
+ ];
77135
+ const hexColorSchema = z$1.string().regex(HEX_COLOR_REGEX, "Hex must be #RRGGBB (lowercase)").transform((value) => value);
77136
+ const paletteModeSchema = z$1.enum(["light", "dark"]);
77137
+ const PALETTE_VALUE_KEY_PREFIX = "palette-value:v1|";
77138
+ z$1.string().regex(/^[0-9a-f]{64}$/, "Palette hash must be a lowercase SHA-256 value").transform((value) => value);
77139
+ const paletteColorsSchema = z$1.object({
77140
+ primary: hexColorSchema,
77141
+ primaryForeground: hexColorSchema,
77142
+ secondary: hexColorSchema,
77143
+ accent: hexColorSchema,
77144
+ success: hexColorSchema,
77145
+ warning: hexColorSchema,
77146
+ destructive: hexColorSchema,
77147
+ background: hexColorSchema,
77148
+ surface: hexColorSchema,
77149
+ surfaceAlt: hexColorSchema,
77150
+ muted: hexColorSchema,
77151
+ text: hexColorSchema,
77152
+ border: hexColorSchema
77153
+ }).strict().transform((value) => value);
77154
+ function normalizePaletteHex(value) {
77155
+ if (!NORMALIZABLE_HEX_REGEX.test(value)) return null;
77156
+ const normalized = value.toLowerCase();
77157
+ if (normalized.length === 7) return normalized;
77158
+ const triplet = normalized.slice(1);
77159
+ const red = triplet.charAt(0);
77160
+ const green = triplet.charAt(1);
77161
+ const blue = triplet.charAt(2);
77162
+ return `#${red}${red}${green}${green}${blue}${blue}`;
77163
+ }
77164
+ function paletteColorsFromEntries(entries) {
77165
+ const values = {};
77166
+ for (const entry of entries) {
77167
+ const parsedRole = paletteTokenNameSchema.safeParse(entry.name);
77168
+ if (!parsedRole.success) return {
77169
+ ok: false,
77170
+ error: {
77171
+ kind: "unknown-role",
77172
+ role: entry.name
77173
+ }
77174
+ };
77175
+ const role = parsedRole.data;
77176
+ if (values[role] !== void 0) return {
77177
+ ok: false,
77178
+ error: {
77179
+ kind: "duplicate-role",
77180
+ role
77181
+ }
77182
+ };
77183
+ const hex = normalizePaletteHex(entry.hex);
77184
+ if (!hex) return {
77185
+ ok: false,
77186
+ error: {
77187
+ kind: "invalid-color",
77188
+ role,
77189
+ value: entry.hex
77190
+ }
77191
+ };
77192
+ values[role] = hex;
77193
+ }
77194
+ const missing = PALETTE_TOKEN_NAMES.filter((role) => values[role] === void 0);
77195
+ if (missing.length > 0) return {
77196
+ ok: false,
77197
+ error: {
77198
+ kind: "missing-roles",
77199
+ roles: missing
77200
+ }
77201
+ };
77202
+ return {
77203
+ ok: true,
77204
+ colors: paletteColorsSchema.parse(values)
77205
+ };
77206
+ }
77207
+ function requirePaletteColorsFromEntries(entries) {
77208
+ const result = paletteColorsFromEntries(entries);
77209
+ if (result.ok) return result.colors;
77210
+ throw new Error(`Invalid complete palette: ${result.error.kind}`);
77211
+ }
77212
+ function paletteColorEntries(colors) {
77213
+ return THEME_PALETTE_COLOR_ORDER.map((name) => ({
77214
+ name,
77215
+ hex: colors[name]
77216
+ }));
77217
+ }
77218
+ function paletteColorsEqual(left, right) {
77219
+ return PALETTE_TOKEN_NAMES.every((name) => left[name] === right[name]);
77220
+ }
77221
+ function paletteColorFingerprint(colors) {
77222
+ return PALETTE_TOKEN_NAMES.map((name) => `${name}:${colors[name]}`).join("|");
77223
+ }
77224
+ function canonicalPaletteHashInput(colors, mode) {
77225
+ return `${mode}|${paletteColorFingerprint(colors)}`;
77226
+ }
77227
+ /**
77228
+ * The shared TypeScript/SQL protocol. Do not reorder roles: the order comes
77229
+ * from PALETTE_TOKEN_NAMES through canonicalPaletteHashInput.
77230
+ */
77231
+ function paletteValueKey(colors, mode) {
77232
+ return `${PALETTE_VALUE_KEY_PREFIX}${canonicalPaletteHashInput(colors, mode)}`;
77233
+ }
77234
+ /** Parses only the exact v1 canonical form emitted by paletteValueKey. */
77235
+ function parsePaletteValueKey(value) {
77236
+ if (typeof value !== "string" || !value.startsWith(PALETTE_VALUE_KEY_PREFIX)) return null;
77237
+ const [rawMode, ...rawRoles] = value.slice(17).split("|");
77238
+ const mode = paletteModeSchema.safeParse(rawMode);
77239
+ if (!mode.success || rawRoles.length !== PALETTE_TOKEN_NAMES.length) return null;
77240
+ const colors = paletteColorsFromEntries(rawRoles.map((roleValue) => {
77241
+ const separator = roleValue.indexOf(":");
77242
+ return separator === -1 ? {
77243
+ name: "",
77244
+ hex: ""
77245
+ } : {
77246
+ name: roleValue.slice(0, separator),
77247
+ hex: roleValue.slice(separator + 1)
77248
+ };
77249
+ }));
77250
+ if (!colors.ok || paletteValueKey(colors.colors, mode.data) !== value) return null;
77251
+ return value;
77252
+ }
77253
+ const paletteValueKeySchema = z$1.string().transform((value, ctx) => {
77254
+ const parsed = parsePaletteValueKey(value);
77255
+ if (parsed) return parsed;
77256
+ ctx.addIssue({
77257
+ code: "custom",
77258
+ message: "Invalid canonical palette value key"
77259
+ });
77260
+ return z$1.NEVER;
77261
+ });
77262
+ //#endregion
77263
+ //#region ../theme-core/src/palette/schema.ts
77264
+ const colourHexString = z$1.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
77265
+ const paletteColorSchema = z$1.object({
77266
+ name: z$1.string().min(1),
77267
+ hex: colourHexString
77268
+ });
77269
+ const paletteMetaSchema = z$1.object({ mode: z$1.enum(["light", "dark"]) });
77270
+ const paletteSchema = z$1.object({
77271
+ colors: z$1.array(paletteColorSchema),
77272
+ meta: paletteMetaSchema
77273
+ }).transform((palette, ctx) => {
77274
+ const colors = paletteColorsFromEntries(palette.colors);
77275
+ if (!colors.ok) {
77276
+ ctx.addIssue({
77277
+ code: "custom",
77278
+ message: `Invalid complete palette: ${colors.error.kind}`
77279
+ });
77280
+ return z$1.NEVER;
77281
+ }
77282
+ return {
77283
+ colors: paletteColorEntries(colors.colors).map(({ name, hex }) => ({
77284
+ name: String(name),
77285
+ hex: String(hex)
77286
+ })),
77287
+ meta: palette.meta
77288
+ };
77289
+ });
77290
+ //#endregion
77117
77291
  //#region ../theme-core/src/cards/types.ts
77118
77292
  const cardVariantRoleValues = ["default", "alternative"];
77119
77293
  const boxlessCardVariantValue = "none";
@@ -78453,7 +78627,7 @@ function asDesignSystemTemplateId(value) {
78453
78627
  function makeBoundaryId(previousBlockId, nextBlockId) {
78454
78628
  return asDesignBoundaryId(`boundary:${encodeURIComponent(previousBlockId)}:${encodeURIComponent(nextBlockId)}`);
78455
78629
  }
78456
- function assertNever$8(value, message = "Unhandled Theme V2 variant") {
78630
+ function assertNever$5(value, message = "Unhandled Theme V2 variant") {
78457
78631
  throw new Error(`${message}: ${String(value)}`);
78458
78632
  }
78459
78633
  function brandNonEmptyString(value, label) {
@@ -78673,7 +78847,7 @@ function resolveBrandDisplay(mode, logoFacts) {
78673
78847
  case "logo-plus-title": return "logo-plus-title";
78674
78848
  case "title-only": return "title-only";
78675
78849
  case "auto": return resolveAutoBrandDisplay(logoFacts);
78676
- default: return assertNever$8(mode, "Unhandled brand display mode");
78850
+ default: return assertNever$5(mode, "Unhandled brand display mode");
78677
78851
  }
78678
78852
  }
78679
78853
  function resolveAutoBrandDisplay(logoFacts) {
@@ -78901,16 +79075,6 @@ const axesSchema = z$1.object({
78901
79075
  "expressive"
78902
79076
  ])
78903
79077
  });
78904
- const colourHexString = z$1.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
78905
- const paletteColorSchema = z$1.object({
78906
- name: z$1.string().min(1),
78907
- hex: colourHexString
78908
- });
78909
- const paletteMetaSchema = z$1.object({ mode: z$1.enum(["light", "dark"]) });
78910
- const paletteSchema = z$1.object({
78911
- colors: z$1.array(paletteColorSchema),
78912
- meta: paletteMetaSchema
78913
- });
78914
79078
  const typographyStyleSchema = z$1.object({
78915
79079
  family: z$1.string().min(1),
78916
79080
  weight: z$1.enum([
@@ -88094,7 +88258,7 @@ function planSiteChromePlacement(positioning) {
88094
88258
  headerRootClassName: "rb-fixed rb-top-0 rb-left-0 rb-right-0",
88095
88259
  standaloneShellClassName: "fixed left-0 right-0 top-0 z-40 w-full"
88096
88260
  };
88097
- default: return assertNever$8(positioning);
88261
+ default: return assertNever$5(positioning);
88098
88262
  }
88099
88263
  }
88100
88264
  function splitSiteChromePlacementClasses(className) {
@@ -90822,10 +90986,10 @@ function preferredPathsForSource(source) {
90822
90986
  case "workshop": return ["/workshops", "/workshop"];
90823
90987
  case "retreat": return ["/retreats", "/retreat"];
90824
90988
  case "performance": return ["/performances", "/performance"];
90825
- default: return assertNever$9(source.preset, "Unhandled offerings preview event preset");
90989
+ default: return assertNever$6(source.preset, "Unhandled offerings preview event preset");
90826
90990
  }
90827
90991
  case "course": return ["/courses", "/course"];
90828
- default: return assertNever$9(source, "Unhandled offerings preview source");
90992
+ default: return assertNever$6(source, "Unhandled offerings preview source");
90829
90993
  }
90830
90994
  }
90831
90995
  function normalizeRoutePath(value) {
@@ -92764,10 +92928,6 @@ const modernMinimalTheme = {
92764
92928
  name: "primary",
92765
92929
  hex: "#1f2937"
92766
92930
  },
92767
- {
92768
- name: "primaryForeground",
92769
- hex: "#ffffff"
92770
- },
92771
92931
  {
92772
92932
  name: "secondary",
92773
92933
  hex: "#6b7280"
@@ -92808,6 +92968,10 @@ const modernMinimalTheme = {
92808
92968
  name: "text",
92809
92969
  hex: "#1f2937"
92810
92970
  },
92971
+ {
92972
+ name: "primaryForeground",
92973
+ hex: "#ffffff"
92974
+ },
92811
92975
  {
92812
92976
  name: "border",
92813
92977
  hex: "#e5e7eb"
@@ -93952,398 +94116,30 @@ const pipeline = new BasicPipeline().filter.register("default", (r, g, b, a) =>
93952
94116
  //#region ../../node_modules/.pnpm/node-vibrant@4.0.4/node_modules/node-vibrant/dist/esm/browser.js
93953
94117
  Vibrant.use(pipeline);
93954
94118
  //#endregion
93955
- //#region ../theme-core/src/palette/colors.ts
93956
- const HEX_COLOR_REGEX = /^#[0-9a-f]{6}$/;
93957
- const NORMALIZABLE_HEX_REGEX = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
93958
- const THEME_PALETTE_COLOR_ORDER = [
93959
- "primary",
93960
- "secondary",
93961
- "accent",
93962
- "success",
93963
- "warning",
93964
- "destructive",
93965
- "background",
93966
- "surface",
93967
- "surfaceAlt",
93968
- "muted",
93969
- "text",
93970
- "primaryForeground",
93971
- "border"
93972
- ];
93973
- const hexColorSchema = z$1.string().regex(HEX_COLOR_REGEX, "Hex must be #RRGGBB (lowercase)").transform((value) => value);
93974
- const paletteModeSchema = z$1.enum(["light", "dark"]);
93975
- const PALETTE_VALUE_KEY_PREFIX = "palette-value:v1|";
93976
- z$1.string().regex(/^[0-9a-f]{64}$/, "Palette hash must be a lowercase SHA-256 value").transform((value) => value);
93977
- const paletteColorsSchema = z$1.object({
93978
- primary: hexColorSchema,
93979
- primaryForeground: hexColorSchema,
93980
- secondary: hexColorSchema,
93981
- accent: hexColorSchema,
93982
- success: hexColorSchema,
93983
- warning: hexColorSchema,
93984
- destructive: hexColorSchema,
93985
- background: hexColorSchema,
93986
- surface: hexColorSchema,
93987
- surfaceAlt: hexColorSchema,
93988
- muted: hexColorSchema,
93989
- text: hexColorSchema,
93990
- border: hexColorSchema
93991
- }).strict().transform((value) => value);
93992
- function normalizePaletteHex(value) {
93993
- if (!NORMALIZABLE_HEX_REGEX.test(value)) return null;
93994
- const normalized = value.toLowerCase();
93995
- if (normalized.length === 7) return normalized;
93996
- const triplet = normalized.slice(1);
93997
- const red = triplet.charAt(0);
93998
- const green = triplet.charAt(1);
93999
- const blue = triplet.charAt(2);
94000
- return `#${red}${red}${green}${green}${blue}${blue}`;
94001
- }
94002
- function paletteColorsFromEntries(entries) {
94003
- const values = {};
94004
- for (const entry of entries) {
94005
- const parsedRole = paletteTokenNameSchema.safeParse(entry.name);
94006
- if (!parsedRole.success) return {
94007
- ok: false,
94008
- error: {
94009
- kind: "unknown-role",
94010
- role: entry.name
94011
- }
94012
- };
94013
- const role = parsedRole.data;
94014
- if (values[role] !== void 0) return {
94015
- ok: false,
94016
- error: {
94017
- kind: "duplicate-role",
94018
- role
94019
- }
94020
- };
94021
- const hex = normalizePaletteHex(entry.hex);
94022
- if (!hex) return {
94023
- ok: false,
94024
- error: {
94025
- kind: "invalid-color",
94026
- role,
94027
- value: entry.hex
94028
- }
94029
- };
94030
- values[role] = hex;
94031
- }
94032
- const missing = PALETTE_TOKEN_NAMES.filter((role) => values[role] === void 0);
94033
- if (missing.length > 0) return {
94034
- ok: false,
94035
- error: {
94036
- kind: "missing-roles",
94037
- roles: missing
94038
- }
94039
- };
94040
- return {
94041
- ok: true,
94042
- colors: paletteColorsSchema.parse(values)
94043
- };
94044
- }
94045
- function requirePaletteColorsFromEntries(entries) {
94046
- const result = paletteColorsFromEntries(entries);
94047
- if (result.ok) return result.colors;
94048
- throw new Error(`Invalid complete palette: ${result.error.kind}`);
94049
- }
94050
- function paletteColorEntries(colors) {
94051
- return THEME_PALETTE_COLOR_ORDER.map((name) => ({
94052
- name,
94053
- hex: colors[name]
94054
- }));
94055
- }
94056
- function paletteColorsEqual(left, right) {
94057
- return PALETTE_TOKEN_NAMES.every((name) => left[name] === right[name]);
94058
- }
94059
- function paletteColorFingerprint(colors) {
94060
- return PALETTE_TOKEN_NAMES.map((name) => `${name}:${colors[name]}`).join("|");
94061
- }
94062
- function canonicalPaletteHashInput(colors, mode) {
94063
- return `${mode}|${paletteColorFingerprint(colors)}`;
94064
- }
94119
+ //#region ../theme-core/src/palette/concretePalette.ts
94065
94120
  /**
94066
- * The shared TypeScript/SQL protocol. Do not reorder roles: the order comes
94067
- * from PALETTE_TOKEN_NAMES through canonicalPaletteHashInput.
94121
+ * Converts an already schema-validated theme palette into the canonical
94122
+ * role-keyed representation. The theme boundary guarantees completeness and
94123
+ * mode validity; colour notation is normalised by that boundary.
94068
94124
  */
94069
- function paletteValueKey(colors, mode) {
94070
- return `${PALETTE_VALUE_KEY_PREFIX}${canonicalPaletteHashInput(colors, mode)}`;
94071
- }
94072
- /** Parses only the exact v1 canonical form emitted by paletteValueKey. */
94073
- function parsePaletteValueKey(value) {
94074
- if (typeof value !== "string" || !value.startsWith(PALETTE_VALUE_KEY_PREFIX)) return null;
94075
- const [rawMode, ...rawRoles] = value.slice(17).split("|");
94076
- const mode = paletteModeSchema.safeParse(rawMode);
94077
- if (!mode.success || rawRoles.length !== PALETTE_TOKEN_NAMES.length) return null;
94078
- const colors = paletteColorsFromEntries(rawRoles.map((roleValue) => {
94079
- const separator = roleValue.indexOf(":");
94080
- return separator === -1 ? {
94081
- name: "",
94082
- hex: ""
94083
- } : {
94084
- name: roleValue.slice(0, separator),
94085
- hex: roleValue.slice(separator + 1)
94086
- };
94087
- }));
94088
- if (!colors.ok || paletteValueKey(colors.colors, mode.data) !== value) return null;
94089
- return value;
94090
- }
94091
- const paletteValueKeySchema = z$1.string().transform((value, ctx) => {
94092
- const parsed = parsePaletteValueKey(value);
94093
- if (parsed) return parsed;
94094
- ctx.addIssue({
94095
- code: "custom",
94096
- message: "Invalid canonical palette value key"
94097
- });
94098
- return z$1.NEVER;
94099
- });
94100
- //#endregion
94101
- //#region ../theme-core/src/palette/editorState.ts
94102
- function createPaletteEditorState(committed) {
94125
+ function concretePaletteFromTheme(palette) {
94103
94126
  return {
94104
- committed,
94105
- preview: {
94106
- kind: "clean",
94107
- resolved: committed
94108
- }
94127
+ colors: requirePaletteColorsFromEntries(palette.colors),
94128
+ mode: palette.meta.mode
94109
94129
  };
94110
94130
  }
94111
- function reducePaletteEditorState(state, action) {
94112
- switch (action.kind) {
94113
- case "select": return {
94114
- ...state,
94115
- preview: paletteSelectionsEqual$1(state.committed.selection, action.resolved.selection) ? {
94116
- kind: "clean",
94117
- resolved: state.committed
94118
- } : {
94119
- kind: "selected",
94120
- resolved: action.resolved
94121
- }
94122
- };
94123
- case "edit": return {
94124
- ...state,
94125
- preview: editedPreview(state.preview, action.colors, action.mode)
94126
- };
94127
- case "create": {
94128
- const palette = previewPalette(state.preview);
94129
- return {
94130
- ...state,
94131
- preview: {
94132
- kind: "new-site",
94133
- colors: palette.colors,
94134
- mode: palette.mode
94135
- }
94136
- };
94137
- }
94138
- case "cancel": return createPaletteEditorState(state.committed);
94139
- default: return assertNever$7(action);
94140
- }
94141
- }
94142
- function previewPalette(preview) {
94143
- switch (preview.kind) {
94144
- case "clean":
94145
- case "selected": return {
94146
- colors: preview.resolved.colors,
94147
- mode: preview.resolved.mode
94148
- };
94149
- case "edited-curated":
94150
- case "edited-site":
94151
- case "new-site": return {
94152
- colors: preview.colors,
94153
- mode: preview.mode
94154
- };
94155
- default: return assertNever$7(preview);
94156
- }
94157
- }
94158
- function editedPreview(preview, colors, mode) {
94159
- switch (preview.kind) {
94160
- case "clean":
94161
- case "selected": return preview.resolved.kind === "curated" ? {
94162
- kind: "edited-curated",
94163
- sourceValueKey: preview.resolved.selection.valueKey,
94164
- colors,
94165
- mode
94166
- } : {
94167
- kind: "edited-site",
94168
- paletteId: preview.resolved.selection.paletteId,
94169
- expectedVersion: preview.resolved.version,
94170
- colors,
94171
- mode
94172
- };
94173
- case "edited-curated": return {
94174
- ...preview,
94175
- colors,
94176
- mode
94177
- };
94178
- case "edited-site": return {
94179
- ...preview,
94180
- colors,
94181
- mode
94182
- };
94183
- case "new-site": return {
94184
- ...preview,
94185
- colors,
94186
- mode
94187
- };
94188
- default: return assertNever$7(preview);
94189
- }
94190
- }
94191
- function planPaletteCommand(state) {
94192
- switch (state.preview.kind) {
94193
- case "clean": return { kind: "preserve" };
94194
- case "selected": return {
94195
- kind: "select",
94196
- selection: state.preview.resolved.selection
94197
- };
94198
- case "edited-curated": return {
94199
- kind: "create-site",
94200
- colors: state.preview.colors,
94201
- mode: state.preview.mode,
94202
- origin: {
94203
- kind: "curated-fork",
94204
- sourceValueKey: state.preview.sourceValueKey
94205
- }
94206
- };
94207
- case "edited-site": return {
94208
- kind: "update-site",
94209
- paletteId: state.preview.paletteId,
94210
- expectedVersion: state.preview.expectedVersion,
94211
- colors: state.preview.colors,
94212
- mode: state.preview.mode
94213
- };
94214
- case "new-site": return {
94215
- kind: "create-site",
94216
- colors: state.preview.colors,
94217
- mode: state.preview.mode,
94218
- origin: { kind: "manual" }
94219
- };
94220
- default: return assertNever$7(state.preview);
94221
- }
94222
- }
94223
- function completePaletteEditorPreview(state) {
94224
- switch (state.preview.kind) {
94225
- case "clean":
94226
- case "selected": return {
94227
- kind: "selected",
94228
- selection: state.preview.resolved.selection,
94229
- colors: state.preview.resolved.colors,
94230
- mode: state.preview.resolved.mode,
94231
- version: state.preview.resolved.kind === "site" ? state.preview.resolved.version : null
94232
- };
94233
- case "edited-curated": return {
94234
- kind: "edited-curated",
94235
- sourceValueKey: state.preview.sourceValueKey,
94236
- colors: state.preview.colors,
94237
- mode: state.preview.mode
94238
- };
94239
- case "edited-site": return {
94240
- kind: "edited-site",
94241
- selection: {
94242
- kind: "site",
94243
- paletteId: state.preview.paletteId
94244
- },
94245
- expectedVersion: state.preview.expectedVersion,
94246
- colors: state.preview.colors,
94247
- mode: state.preview.mode
94248
- };
94249
- case "new-site": return {
94250
- kind: "new-site",
94251
- colors: state.preview.colors,
94252
- mode: state.preview.mode
94253
- };
94254
- default: return assertNever$7(state.preview);
94255
- }
94256
- }
94257
- function paletteSelectionsEqual$1(left, right) {
94258
- if (left.kind === "curated" && right.kind === "curated") return left.valueKey === right.valueKey;
94259
- if (left.kind === "site" && right.kind === "site") return left.paletteId === right.paletteId;
94260
- return false;
94261
- }
94262
- function assertNever$7(value) {
94263
- throw new Error(`Unhandled palette editor variant: ${JSON.stringify(value)}`);
94264
- }
94265
- //#endregion
94266
- //#region ../theme-core/src/palette/libraryModel.ts
94267
- function buildPaletteLibraryReadModel(input) {
94268
- const curatedByValueKey = /* @__PURE__ */ new Map();
94269
- for (const palette of input.curatedPalettes) if (!curatedByValueKey.has(palette.valueKey)) curatedByValueKey.set(palette.valueKey, palette);
94270
- const siteById = /* @__PURE__ */ new Map();
94271
- for (const palette of input.sitePalettes) if (!siteById.has(palette.id)) siteById.set(palette.id, palette);
94272
- if (input.active.kind === "available" && input.active.selection.kind === "curated" && !curatedByValueKey.has(input.active.selection.valueKey)) return {
94273
- ok: false,
94274
- error: {
94275
- kind: "active-curated-palette-missing",
94276
- valueKey: input.active.selection.valueKey
94277
- }
94278
- };
94279
- if (input.active.kind === "available" && input.active.selection.kind === "site" && !siteById.has(input.active.selection.paletteId)) return {
94280
- ok: false,
94281
- error: {
94282
- kind: "active-site-palette-missing",
94283
- paletteId: input.active.selection.paletteId
94284
- }
94285
- };
94286
- const yours = [...siteById.values()].map((palette) => sitePaletteItem(palette, input.active)).sort((left, right) => Number(right.selected) - Number(left.selected));
94287
- const recommendedValueKeys = /* @__PURE__ */ new Set();
94288
- const suggested = [];
94289
- for (const valueKey of input.recommendations) {
94290
- if (recommendedValueKeys.has(valueKey)) continue;
94291
- recommendedValueKeys.add(valueKey);
94292
- const palette = curatedByValueKey.get(valueKey);
94293
- if (!palette) continue;
94294
- suggested.push(curatedPaletteItem(palette, input.active));
94295
- }
94296
- const more = [...curatedByValueKey.values()].filter((palette) => !recommendedValueKeys.has(palette.valueKey)).map((palette) => curatedPaletteItem(palette, input.active));
94131
+ function concretePaletteToTheme(palette) {
94297
94132
  return {
94298
- ok: true,
94299
- model: {
94300
- active: input.active,
94301
- yours,
94302
- suggested,
94303
- more
94304
- }
94305
- };
94306
- }
94307
- function curatedPaletteItem(palette, active) {
94308
- return {
94309
- kind: "curated",
94310
- valueKey: palette.valueKey,
94311
- colors: palette.colors,
94312
- mode: palette.mode,
94313
- swatch: paletteSwatch(palette.colors),
94314
- accessibleLabel: paletteAccessibleLabel("Palette", palette.colors),
94315
- selected: active.kind === "available" && active.selection.kind === "curated" && active.selection.valueKey === palette.valueKey
94133
+ colors: paletteColorEntries(palette.colors),
94134
+ meta: { mode: palette.mode }
94316
94135
  };
94317
94136
  }
94318
- function sitePaletteItem(palette, active) {
94319
- return {
94320
- kind: "site",
94321
- paletteId: palette.id,
94322
- colors: palette.colors,
94323
- mode: palette.mode,
94324
- origin: palette.origin,
94325
- version: palette.version,
94326
- swatch: paletteSwatch(palette.colors),
94327
- accessibleLabel: paletteAccessibleLabel("Your palette", palette.colors),
94328
- selected: active.kind === "available" && active.selection.kind === "site" && active.selection.paletteId === palette.id
94329
- };
94330
- }
94331
- function paletteSwatch(colors) {
94332
- return [
94333
- colors.background,
94334
- colors.surface,
94335
- colors.primary,
94336
- colors.secondary,
94337
- colors.accent
94338
- ];
94137
+ function concretePalettesEqual(left, right) {
94138
+ return left.mode === right.mode && paletteColorsEqual(left.colors, right.colors);
94339
94139
  }
94340
- function paletteAccessibleLabel(prefix, colors) {
94341
- return [
94342
- `${prefix}.`,
94343
- `Primary ${colors.primary}.`,
94344
- `Accent ${colors.accent}.`,
94345
- `Background ${colors.background}.`
94346
- ].join(" ");
94140
+ /** Exact semantic equality for two schema-validated theme palette values. */
94141
+ function themePalettesEqual(left, right) {
94142
+ return concretePalettesEqual(concretePaletteFromTheme(left), concretePaletteFromTheme(right));
94347
94143
  }
94348
94144
  //#endregion
94349
94145
  //#region ../theme-core/src/site-styles/styleTags.ts
@@ -95637,13 +95433,6 @@ const warmDarkKirtanGold = defineCuratedPalette({
95637
95433
  });
95638
95434
  //#endregion
95639
95435
  //#region ../theme-core/src/palette/curated/index.ts
95640
- /**
95641
- * Curated palette library.
95642
- *
95643
- * Authoring keys are readable source aliases. Value keys are derived from the
95644
- * complete mode and semantic colours and are the only curated identity used at
95645
- * persistence and runtime boundaries.
95646
- */
95647
95436
  function admitCuratedPaletteDefinition(definition) {
95648
95437
  return {
95649
95438
  ...definition,
@@ -95683,177 +95472,6 @@ function requireCuratedPaletteValueKey(authoringKey) {
95683
95472
  if (!palette) throw new Error(`Unknown curated palette authoring key "${authoringKey}"`);
95684
95473
  return palette.valueKey;
95685
95474
  }
95686
- /** Parses a raw persisted key into catalogue-proven curated membership. */
95687
- const knownCuratedPaletteValueKeySchema = z$1.string().transform((value, ctx) => {
95688
- const valueKey = parsePaletteValueKey(value);
95689
- if (!valueKey) {
95690
- ctx.addIssue({
95691
- code: "custom",
95692
- message: "Invalid canonical palette value key"
95693
- });
95694
- return z$1.NEVER;
95695
- }
95696
- const palette = findCuratedPalette(valueKey);
95697
- if (!palette) {
95698
- ctx.addIssue({
95699
- code: "custom",
95700
- message: "Unknown curated palette value key"
95701
- });
95702
- return z$1.NEVER;
95703
- }
95704
- return palette.valueKey;
95705
- });
95706
- //#endregion
95707
- //#region ../theme-core/src/palette/resolveSelection.ts
95708
- const resolvedPaletteSelectionBrand = Symbol("resolvedPaletteSelection");
95709
- /** Core-owned constructors keep the resolved marker out of application code. */
95710
- function resolvedCuratedPaletteSelection(palette) {
95711
- const resolved = {
95712
- kind: "curated",
95713
- selection: {
95714
- kind: "curated",
95715
- valueKey: palette.valueKey
95716
- },
95717
- colors: palette.colors,
95718
- mode: palette.mode,
95719
- [resolvedPaletteSelectionBrand]: true
95720
- };
95721
- Object.defineProperty(resolved, resolvedPaletteSelectionBrand, { enumerable: false });
95722
- return resolved;
95723
- }
95724
- function resolvedSitePaletteSelection(palette) {
95725
- return resolvedSitePaletteSelectionFromPreview({
95726
- paletteId: palette.id,
95727
- colors: palette.colors,
95728
- mode: palette.mode,
95729
- version: palette.version
95730
- });
95731
- }
95732
- /** Builds a resolved site-owned preview from the record fields it owns. */
95733
- function resolvedSitePaletteSelectionFromPreview(input) {
95734
- const resolved = {
95735
- kind: "site",
95736
- selection: {
95737
- kind: "site",
95738
- paletteId: input.paletteId
95739
- },
95740
- colors: input.colors,
95741
- mode: input.mode,
95742
- version: input.version,
95743
- [resolvedPaletteSelectionBrand]: true
95744
- };
95745
- Object.defineProperty(resolved, resolvedPaletteSelectionBrand, { enumerable: false });
95746
- return resolved;
95747
- }
95748
- function resolvedDraftPaletteSelection(input) {
95749
- const resolved = {
95750
- kind: "draft",
95751
- selection: null,
95752
- colors: input.colors,
95753
- mode: input.mode,
95754
- [resolvedPaletteSelectionBrand]: true
95755
- };
95756
- Object.defineProperty(resolved, resolvedPaletteSelectionBrand, { enumerable: false });
95757
- return resolved;
95758
- }
95759
- //#endregion
95760
- //#region ../theme-core/src/palette/selection.ts
95761
- const sitePaletteIdSchema = z$1.string().uuid().transform((value) => value);
95762
- const sitePaletteVersionSchema = z$1.number().int().nonnegative().transform((value) => value);
95763
- function parseSitePaletteVersion(value) {
95764
- const parsed = sitePaletteVersionSchema.safeParse(value);
95765
- return parsed.success ? parsed.data : null;
95766
- }
95767
- const paletteSelectionSchema = z$1.discriminatedUnion("kind", [z$1.object({
95768
- kind: z$1.literal("curated"),
95769
- valueKey: knownCuratedPaletteValueKeySchema
95770
- }), z$1.object({
95771
- kind: z$1.literal("site"),
95772
- paletteId: sitePaletteIdSchema
95773
- })]);
95774
- const onboardingPaletteOriginSchema = z$1.object({
95775
- kind: z$1.literal("onboarding"),
95776
- sourceKey: z$1.string().min(1).nullable()
95777
- });
95778
- const curatedForkPaletteOriginSchema = z$1.object({
95779
- kind: z$1.literal("curated-fork"),
95780
- sourceValueKey: paletteValueKeySchema
95781
- });
95782
- const manualPaletteOriginSchema = z$1.object({ kind: z$1.literal("manual") });
95783
- const legacyCustomizedPaletteOriginSchema = z$1.object({
95784
- kind: z$1.literal("legacy-customized"),
95785
- sourceKey: z$1.string().min(1).nullable()
95786
- });
95787
- const sitePaletteOriginSchema = z$1.discriminatedUnion("kind", [
95788
- onboardingPaletteOriginSchema,
95789
- curatedForkPaletteOriginSchema,
95790
- manualPaletteOriginSchema,
95791
- legacyCustomizedPaletteOriginSchema
95792
- ]);
95793
- const editorSitePaletteOriginSchema = z$1.discriminatedUnion("kind", [z$1.object({
95794
- kind: z$1.literal("curated-fork"),
95795
- sourceValueKey: knownCuratedPaletteValueKeySchema
95796
- }), manualPaletteOriginSchema]);
95797
- z$1.object({
95798
- id: sitePaletteIdSchema,
95799
- colors: paletteColorsSchema,
95800
- mode: paletteModeSchema,
95801
- origin: sitePaletteOriginSchema,
95802
- version: sitePaletteVersionSchema
95803
- });
95804
- z$1.discriminatedUnion("kind", [
95805
- z$1.object({ kind: z$1.literal("preserve") }),
95806
- z$1.object({
95807
- kind: z$1.literal("select"),
95808
- selection: paletteSelectionSchema
95809
- }),
95810
- z$1.object({
95811
- kind: z$1.literal("create-site"),
95812
- colors: paletteColorsSchema,
95813
- mode: paletteModeSchema,
95814
- origin: editorSitePaletteOriginSchema
95815
- }),
95816
- z$1.object({
95817
- kind: z$1.literal("update-site"),
95818
- paletteId: sitePaletteIdSchema,
95819
- expectedVersion: sitePaletteVersionSchema,
95820
- colors: paletteColorsSchema,
95821
- mode: paletteModeSchema
95822
- })
95823
- ]);
95824
- //#endregion
95825
- //#region ../theme-core/src/palette/persistenceReadSource.ts
95826
- function resolveMigratedRuntimePaletteState(state) {
95827
- if (state.authority === "site") return {
95828
- ok: true,
95829
- resolved: resolvedSitePaletteSelection({
95830
- id: state.selection.paletteId,
95831
- colors: state.colors,
95832
- mode: state.mode,
95833
- origin: { kind: "manual" },
95834
- version: state.sitePaletteVersion
95835
- })
95836
- };
95837
- const palette = findCuratedPalette(state.selection.valueKey);
95838
- if (!palette) return {
95839
- ok: false,
95840
- error: {
95841
- kind: "runtime-curated-palette-missing",
95842
- paletteId: state.selection.valueKey
95843
- }
95844
- };
95845
- if (palette.mode !== state.mode || !paletteColorsEqual(palette.colors, state.colors)) return {
95846
- ok: false,
95847
- error: {
95848
- kind: "runtime-curated-palette-mismatch",
95849
- paletteId: palette.valueKey
95850
- }
95851
- };
95852
- return {
95853
- ok: true,
95854
- resolved: resolvedCuratedPaletteSelection(palette)
95855
- };
95856
- }
95857
95475
  //#endregion
95858
95476
  //#region ../theme-core/src/tokens/tokens.ts
95859
95477
  const defaultThemeTokens = {
@@ -96097,7 +95715,7 @@ function persistenceTargetForSurface(surface) {
96097
95715
  kind: "site-chrome",
96098
95716
  surface: "footer"
96099
95717
  };
96100
- default: return assertNever$8(surface, "Unhandled customizable surface");
95718
+ default: return assertNever$5(surface, "Unhandled customizable surface");
96101
95719
  }
96102
95720
  }
96103
95721
  function writePlanForLookCustomizationCommand(command) {
@@ -96116,7 +95734,7 @@ function writePlanForLookCustomizationCommand(command) {
96116
95734
  kind: "clear-selection",
96117
95735
  target: persistenceTargetForSurface(command.surface)
96118
95736
  };
96119
- default: return assertNever$8(command, "Unhandled customization command");
95737
+ default: return assertNever$5(command, "Unhandled customization command");
96120
95738
  }
96121
95739
  }
96122
95740
  //#endregion
@@ -96269,7 +95887,7 @@ function logoFactsForHeaderContext(logo) {
96269
95887
  case "horizontal":
96270
95888
  case "square":
96271
95889
  case "tall": return deterministicLogoFactsForShape(logo.shape);
96272
- default: return assertNever$8(logo.shape, "Unhandled header logo shape");
95890
+ default: return assertNever$5(logo.shape, "Unhandled header logo shape");
96273
95891
  }
96274
95892
  }
96275
95893
  function resolveHeaderBrandPresentation(input) {
@@ -96869,7 +96487,7 @@ function applyNavTypography(style, typography) {
96869
96487
  textSize: "sm",
96870
96488
  letterSpacing: "wider"
96871
96489
  };
96872
- default: return assertNever$8(typography, "Unhandled header nav typography");
96490
+ default: return assertNever$5(typography, "Unhandled header nav typography");
96873
96491
  }
96874
96492
  }
96875
96493
  function minimalNavLinkStyle(colorToken, hoverColorToken = "primary", typography = "plain") {
@@ -97014,7 +96632,7 @@ function themedHeaderShadow(theme) {
97014
96632
  case "low": return { elevation: "sm" };
97015
96633
  case "medium": return { elevation: "md" };
97016
96634
  case "high": return { elevation: "lg" };
97017
- default: return assertNever$8(theme.shadow.elevation, "Unhandled theme shadow elevation");
96635
+ default: return assertNever$5(theme.shadow.elevation, "Unhandled theme shadow elevation");
97018
96636
  }
97019
96637
  }
97020
96638
  function brandSurfaceBase(theme, header) {
@@ -97227,7 +96845,7 @@ function applyHeaderStyle(theme, header, style) {
97227
96845
  },
97228
96846
  ctaTreatment: "default"
97229
96847
  };
97230
- default: return assertNever$8(style.id, "Unhandled header style id");
96848
+ default: return assertNever$5(style.id, "Unhandled header style id");
97231
96849
  }
97232
96850
  })(), style);
97233
96851
  }
@@ -99816,7 +99434,7 @@ function compileImageSurfaceTreatmentBackground(background, treatment, foregroun
99816
99434
  ...uniformSectionForeground("text"),
99817
99435
  ...foreground
99818
99436
  };
99819
- default: return assertNever$8(treatment);
99437
+ default: return assertNever$5(treatment);
99820
99438
  }
99821
99439
  }
99822
99440
  const imageSurfaceTreatmentOpacityByKind = {
@@ -99874,7 +99492,7 @@ function compileContainerStyles(contentFrame, rules) {
99874
99492
  rounded: "none"
99875
99493
  })
99876
99494
  };
99877
- default: return assertNever$8(contentFrame);
99495
+ default: return assertNever$5(contentFrame);
99878
99496
  }
99879
99497
  }
99880
99498
  function shouldMoveFrameToHeroContentCard(block) {
@@ -99893,7 +99511,7 @@ function compileHeroCompositionFields(composition) {
99893
99511
  verticalAlignment: "bottom",
99894
99512
  contentMaxWidth: "medium"
99895
99513
  };
99896
- default: return assertNever$8(composition);
99514
+ default: return assertNever$5(composition);
99897
99515
  }
99898
99516
  }
99899
99517
  function compileHeroRuntimeFields(input) {
@@ -99944,7 +99562,7 @@ function testimonialCardTreatmentStyles(treatment) {
99944
99562
  border: { enabled: false },
99945
99563
  rounded: "none"
99946
99564
  };
99947
- default: return assertNever$8(treatment);
99565
+ default: return assertNever$5(treatment);
99948
99566
  }
99949
99567
  }
99950
99568
  function compileCardStyles(input) {
@@ -99969,7 +99587,7 @@ function transitionTargetSurfaceForAdjacency(adjacency) {
99969
99587
  case "next-section":
99970
99588
  case "terminal-surface": return adjacency.surface;
99971
99589
  case "page-end": return null;
99972
- default: return assertNever$8(adjacency);
99590
+ default: return assertNever$5(adjacency);
99973
99591
  }
99974
99592
  }
99975
99593
  function resolveEyebrowTreatmentForRuntime(block, rules) {
@@ -100079,7 +99697,7 @@ function transitionEndpointCssValue(endpoint) {
100079
99697
  switch (endpoint.kind) {
100080
99698
  case "color-token": return themeColorTokenCssValue(endpoint.token);
100081
99699
  case "surface": return themeColorTokenCssValue(tokenForTransitionSurface(endpoint.surface));
100082
- default: return assertNever$8(endpoint);
99700
+ default: return assertNever$5(endpoint);
100083
99701
  }
100084
99702
  }
100085
99703
  function tokenForTransitionSurface(surface) {
@@ -100089,7 +99707,7 @@ function tokenForTransitionSurface(surface) {
100089
99707
  case "muted-band": return "muted";
100090
99708
  case "accent-band": return "accent";
100091
99709
  case "brand-depth-band": return "primary-800";
100092
- default: return assertNever$8(surface);
99710
+ default: return assertNever$5(surface);
100093
99711
  }
100094
99712
  }
100095
99713
  function themeColorTokenCssValue(token) {
@@ -100361,15 +99979,11 @@ const paletteByRecipe = {
100361
99979
  };
100362
99980
  /**
100363
99981
  * Resolves the full `theme.palette` (colours + light/dark mode) for a compiled
100364
- * theme. A caller that has palette authority supplies its complete resolved
100365
- * selection. Recipe-only callers retain the bounded recipe palette for static
100366
- * design compilation that has no palette selection to render.
99982
+ * theme. A caller can supply its complete concrete palette. Recipe-only callers
99983
+ * retain the bounded recipe palette for static design compilation.
100367
99984
  */
100368
99985
  function resolvePalette(recipes, options) {
100369
- if (options.resolvedPalette !== void 0) return {
100370
- colors: paletteColorEntries(options.resolvedPalette.colors),
100371
- meta: { mode: options.resolvedPalette.mode }
100372
- };
99986
+ if (options.palette !== void 0) return options.palette;
100373
99987
  return {
100374
99988
  colors: [...paletteByRecipe[recipes.palette]],
100375
99989
  meta: { mode: "light" }
@@ -100411,9 +100025,9 @@ function compileHeroTypography(recipes) {
100411
100025
  * pure and schema-validated so generated Theme V2 choices have a concrete legacy
100412
100026
  * Theme output before any persistence or Phase 5 integration consumes them.
100413
100027
  *
100414
- * Optional `options` accept an already-resolved palette selection and button
100415
- * style. Sparse overrides and legacy palette IDs are deliberately not
100416
- * compiler inputs: callers must resolve a complete palette before compiling.
100028
+ * Optional `options` accept a complete concrete palette and button style.
100029
+ * Sparse overrides and palette identities are deliberately not compiler
100030
+ * inputs.
100417
100031
  */
100418
100032
  function compileTokenRecipes(recipes, options = {}) {
100419
100033
  const theme = structuredClone(modernMinimalTheme);
@@ -102336,7 +101950,7 @@ function supportsBlockComposition(capability, composition) {
102336
101950
  switch (composition.kind) {
102337
101951
  case "intro": return supported.kind === "intro" && supported.treatments.includes(composition.treatment);
102338
101952
  case "feature-cards": return supported.kind === "feature-cards" && supported.treatments.includes(composition.treatment);
102339
- default: return assertNever$8(composition);
101953
+ default: return assertNever$5(composition);
102340
101954
  }
102341
101955
  }
102342
101956
  function isDecorativeTransition(transition) {
@@ -102959,13 +102573,13 @@ function compileSiteThemeFromSelections(input) {
102959
102573
  const siteChromeResult = applySiteChromeLooks({
102960
102574
  theme: applyTypographyToTheme(applySiteStyleThemeOverrides(compileTokenRecipes(siteStyle.template.tokenRecipes, {
102961
102575
  buttonStyleSelection: resolvedButtonStyle,
102962
- resolvedPalette: input.resolvedPalette
102576
+ palette: input.palette
102963
102577
  }), siteStyle), typography ?? siteStyle.typography, siteStyle.heroTypography),
102964
102578
  siteStyle,
102965
102579
  compilationPlan
102966
102580
  });
102967
102581
  const requestedSelections = requestedSelectionsForPlan(compilationPlan);
102968
- const commonResult = {
102582
+ return {
102969
102583
  theme: withSiteStyleMetadata(siteChromeResult.theme, siteStyle),
102970
102584
  requestedSelections,
102971
102585
  resolvedSelections: {
@@ -102977,13 +102591,6 @@ function compileSiteThemeFromSelections(input) {
102977
102591
  footerCompilation: siteChromeResult.footerCompilation,
102978
102592
  warnings
102979
102593
  };
102980
- return {
102981
- ...commonResult,
102982
- resolvedSelections: {
102983
- ...commonResult.resolvedSelections,
102984
- paletteSelection: input.resolvedPalette.selection
102985
- }
102986
- };
102987
102594
  }
102988
102595
  function requestedSelectionsForPlan(plan) {
102989
102596
  if (plan.kind === "replace-site-style") return {
@@ -103230,7 +102837,7 @@ function compositionCapabilityFor(composition) {
103230
102837
  kind: "feature-cards",
103231
102838
  treatments: [composition.treatment]
103232
102839
  };
103233
- default: return assertNever$8(composition);
102840
+ default: return assertNever$5(composition);
103234
102841
  }
103235
102842
  }
103236
102843
  //#endregion
@@ -108623,7 +108230,7 @@ const publicProductSchema = z$1.object({
108623
108230
  const publicProductsResponseSchema = z$1.object({ products: z$1.array(publicProductSchema) });
108624
108231
  //#endregion
108625
108232
  //#region ../blocks/src/system/runtime/api/creditProducts.ts
108626
- function assertNever$6(value) {
108233
+ function assertNever$4(value) {
108627
108234
  throw new Error(`Unhandled credit product case: ${String(value)}`);
108628
108235
  }
108629
108236
  function useCasesFromModules(modules) {
@@ -108646,7 +108253,7 @@ function getCreditProductCreditUnit(useCase) {
108646
108253
  plural: "credits",
108647
108254
  perCreditSuffix: "credit"
108648
108255
  };
108649
- default: return assertNever$6(useCase);
108256
+ default: return assertNever$4(useCase);
108650
108257
  }
108651
108258
  }
108652
108259
  function deriveCreditProductLabels(products, options = {}) {
@@ -113431,7 +113038,7 @@ const ALLOWED_URL_PROTOCOLS = ["http:", "https:"];
113431
113038
  const DATE_PATTERN = /^(?<year>[1-9]\d{3})-(?<month>\d{2})-(?<day>\d{2})$/;
113432
113039
  const TIME_PATTERN = /^(?<hours>[01]\d|2[0-3]):(?<minutes>[0-5]\d)$/;
113433
113040
  const DATETIME_PATTERN = /^(?<date>[1-9]\d{3}-\d{2}-\d{2})T(?<time>(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d)(?:\.\d+)?(?<offset>Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;
113434
- function assertNever$5(value) {
113041
+ function assertNever$3(value) {
113435
113042
  throw new Error(`Unhandled field validation variant: ${JSON.stringify(value)}`);
113436
113043
  }
113437
113044
  function validationContext(options = {}) {
@@ -113478,7 +113085,7 @@ function fieldIssueToMessage(issue) {
113478
113085
  case "invalidMedia": return `${issue.label} must be a media object with an identifier`;
113479
113086
  case "invalidLink": return `${issue.label} must be a valid link`;
113480
113087
  case "invalidReference": return `${issue.label} must reference a valid item`;
113481
- default: return assertNever$5(issue);
113088
+ default: return assertNever$3(issue);
113482
113089
  }
113483
113090
  }
113484
113091
  function pluralize(label, count) {
@@ -113598,7 +113205,7 @@ function deriveFieldValidationPlan(field, path = [field.id]) {
113598
113205
  case "presetOrCustom":
113599
113206
  case "contentTypeSelect":
113600
113207
  case "entryPicker": return makePlan("passthrough", "unknown", field, path, false, []);
113601
- default: return assertNever$5(field);
113208
+ default: return assertNever$3(field);
113602
113209
  }
113603
113210
  }
113604
113211
  function deriveFieldValidationPlans(fields, parentPath = []) {
@@ -113673,7 +113280,7 @@ function resolveSelectConstraintSource(field) {
113673
113280
  kind: "runtime",
113674
113281
  source: source.kind
113675
113282
  };
113676
- default: return assertNever$5(source);
113283
+ default: return assertNever$3(source);
113677
113284
  }
113678
113285
  }
113679
113286
  function normalizeStoredContentValues(plans, content, options = {}) {
@@ -113692,7 +113299,7 @@ function allGroupChildPlans(plan) {
113692
113299
  switch (plan.childSelection.kind) {
113693
113300
  case "all": return plan.childSelection.fields;
113694
113301
  case "discriminatedTabs": return plan.childSelection.tabs.flatMap((tab) => tab.fields);
113695
- default: return assertNever$5(plan.childSelection);
113302
+ default: return assertNever$3(plan.childSelection);
113696
113303
  }
113697
113304
  }
113698
113305
  function selectedGroupChildPlans(plan, value) {
@@ -113715,7 +113322,7 @@ function normalizeStoredFieldValueWithContext(plan, value, ctx) {
113715
113322
  case "link":
113716
113323
  case "select":
113717
113324
  case "passthrough": return normalizeFieldValue(plan, value, ctx);
113718
- default: return assertNever$5(plan);
113325
+ default: return assertNever$3(plan);
113719
113326
  }
113720
113327
  }
113721
113328
  function normalizeStoredObjectChildren(children, value, ctx) {
@@ -113748,7 +113355,7 @@ function normalizeFieldValue(plan, value, ctx) {
113748
113355
  case "select":
113749
113356
  case "passthrough": return value;
113750
113357
  case "media": return value;
113751
- default: return assertNever$5(plan);
113358
+ default: return assertNever$3(plan);
113752
113359
  }
113753
113360
  }
113754
113361
  function normalizeObjectChildren(children, value, ctx) {
@@ -113807,7 +113414,7 @@ function validateNormalizedFieldValue(plan, value, ctx) {
113807
113414
  case "repeater": return validateRepeaterPlan(plan, value, ctx);
113808
113415
  case "group": return validateGroupPlan(plan, value, ctx);
113809
113416
  case "passthrough": return [];
113810
- default: return assertNever$5(plan);
113417
+ default: return assertNever$3(plan);
113811
113418
  }
113812
113419
  }
113813
113420
  function shouldRequireValue(plan, value, ctx) {
@@ -113849,7 +113456,7 @@ function validateStringConstraint(plan, constraint, value) {
113849
113456
  case "timeFormat": return typeof value === "string" && isValidTimeString(value) ? [] : [issue(plan, "invalidTime")];
113850
113457
  case "datetimeFormat": return typeof value === "string" && isValidDateTimeInstantString(value) ? [] : [issue(plan, "invalidDateTime")];
113851
113458
  case "slugFormat": return typeof value === "string" && SLUG_PATTERN.test(value) ? [] : [issue(plan, "invalidSlug")];
113852
- default: return assertNever$5(constraint);
113459
+ default: return assertNever$3(constraint);
113853
113460
  }
113854
113461
  }
113855
113462
  function isValidIconPickerValue(value) {
@@ -113868,7 +113475,7 @@ function validateNumberConstraint(plan, constraint, value) {
113868
113475
  case "numberType": return [];
113869
113476
  case "numberMin": return value < constraint.minimum ? [issue(plan, "tooSmall", { minimum: constraint.minimum })] : [];
113870
113477
  case "numberMax": return value > constraint.maximum ? [issue(plan, "tooLarge", { maximum: constraint.maximum })] : [];
113871
- default: return assertNever$5(constraint);
113478
+ default: return assertNever$3(constraint);
113872
113479
  }
113873
113480
  }
113874
113481
  function validateSelectPlan(plan, value) {
@@ -113890,7 +113497,7 @@ function validateRepeaterPlan(plan, value, ctx) {
113890
113497
  maximum: constraint.maximum,
113891
113498
  itemLabel: "item"
113892
113499
  })] : [];
113893
- default: return assertNever$5(constraint);
113500
+ default: return assertNever$3(constraint);
113894
113501
  }
113895
113502
  }), ...value.flatMap((item, index) => validateRepeaterItem(plan, item, index, ctx))];
113896
113503
  }
@@ -113981,7 +113588,7 @@ function rebaseFieldPlanPath(plan, fromPrefix, toPrefix) {
113981
113588
  ...plan,
113982
113589
  path
113983
113590
  };
113984
- default: return assertNever$5(plan);
113591
+ default: return assertNever$3(plan);
113985
113592
  }
113986
113593
  }
113987
113594
  function validateInlineTextPlan(plan, value) {
@@ -114028,7 +113635,7 @@ function fieldPlanToObjectPropertyZod(plan, options = {}) {
114028
113635
  switch (presence.kind) {
114029
113636
  case "required": return schema;
114030
113637
  case "optional": return schema.optional();
114031
- default: return assertNever$5(presence);
113638
+ default: return assertNever$3(presence);
114032
113639
  }
114033
113640
  }
114034
113641
  function addFieldIssueToZodContext(zodCtx, validationIssue, rootPath) {
@@ -114098,7 +113705,7 @@ function addFieldIssueToZodContext(zodCtx, validationIssue, rootPath) {
114098
113705
  message
114099
113706
  });
114100
113707
  return;
114101
- default: assertNever$5(validationIssue);
113708
+ default: assertNever$3(validationIssue);
114102
113709
  }
114103
113710
  }
114104
113711
  function relativeZodIssuePath(path, rootPath) {
@@ -114133,7 +113740,7 @@ function findNestedFieldValidationPlan(plan, path) {
114133
113740
  case "link":
114134
113741
  case "select":
114135
113742
  case "passthrough": return null;
114136
- default: return assertNever$5(plan);
113743
+ default: return assertNever$3(plan);
114137
113744
  }
114138
113745
  }
114139
113746
  function fieldValidationDescriptor(plan) {
@@ -114246,7 +113853,7 @@ function isEmptyRichTextDoc(value) {
114246
113853
  }
114247
113854
  //#endregion
114248
113855
  //#region ../block-form/src/manifest/utils.ts
114249
- function assertNever$4(value) {
113856
+ function assertNever$2(value) {
114250
113857
  throw new Error(`Unhandled manifest variant: ${JSON.stringify(value)}`);
114251
113858
  }
114252
113859
  function getGroupChildFields$1(field) {
@@ -114295,7 +113902,7 @@ function toManifestFieldInput(field) {
114295
113902
  case "contentTypeSelect":
114296
113903
  case "entryPicker": return field;
114297
113904
  }
114298
- return assertNever$4(field);
113905
+ return assertNever$2(field);
114299
113906
  }
114300
113907
  function numberFieldToManifestInput(field) {
114301
113908
  const ui = readNumberFieldUiConfig(field.ui);
@@ -128069,7 +127676,7 @@ function sourceLabel(source) {
128069
127676
  case "managed-database": return "DB";
128070
127677
  case "sdk-synced": return "SDK-synced DB";
128071
127678
  case "sdk-config": return "SDK config";
128072
- default: return assertNever$9(source);
127679
+ default: return assertNever$6(source);
128073
127680
  }
128074
127681
  }
128075
127682
  function mergeBlockDescriptorsWithRegistry(systemBlocks, registry, onConflict) {
@@ -157654,7 +157261,7 @@ function shouldUseCanonicalSchema(field) {
157654
157261
  case "entryPicker":
157655
157262
  case "button": return false;
157656
157263
  }
157657
- return assertNever$4(field);
157264
+ return assertNever$2(field);
157658
157265
  }
157659
157266
  /**
157660
157267
  * Create validation schema from a block manifest
@@ -159213,14 +158820,14 @@ function planBlockSaveRevisionForOwner(owner, optimisticHash) {
159213
158820
  kind: "compareAndSet",
159214
158821
  optimisticHash
159215
158822
  } : { kind: "missingRequiredRevision" };
159216
- default: return assertNever$9(owner);
158823
+ default: return assertNever$6(owner);
159217
158824
  }
159218
158825
  }
159219
158826
  function optimisticHashForSave(revision) {
159220
158827
  switch (revision.kind) {
159221
158828
  case "bestEffort":
159222
158829
  case "compareAndSet": return revision.optimisticHash;
159223
- default: return assertNever$9(revision);
158830
+ default: return assertNever$6(revision);
159224
158831
  }
159225
158832
  }
159226
158833
  const MISSING_REQUIRED_BLOCK_REVISION = "This Page Content block is missing its current revision. Reload the editor and try again.";
@@ -160278,7 +159885,7 @@ function extractBlockData$1(content) {
160278
159885
  }
160279
159886
  //#endregion
160280
159887
  //#region ../content-editor/src/utils/assertNever.ts
160281
- function assertNever$3(value, message) {
159888
+ function assertNever$1(value, message) {
160282
159889
  throw new Error(message ?? `Unexpected value: ${String(value)}`);
160283
159890
  }
160284
159891
  //#endregion
@@ -160960,7 +160567,7 @@ function applyEditorCommand(snapshot, command) {
160960
160567
  for (const change of command.changes) nextSnapshot = applyEditorCommand(nextSnapshot, change);
160961
160568
  return nextSnapshot;
160962
160569
  }
160963
- default: return assertNever$3(command);
160570
+ default: return assertNever$1(command);
160964
160571
  }
160965
160572
  }
160966
160573
  function applyUserOperation(snapshot, operation) {
@@ -160994,7 +160601,7 @@ function applySystemOperation(snapshot, operation) {
160994
160601
  case "save-linked-entry-failed": return saveLinkedEntryFailed(snapshot, operation.entryId, operation.message);
160995
160602
  case "clear-linked-entry-error": return clearLinkedEntryError(snapshot, operation.entryId);
160996
160603
  case "replace-block-list": return replaceEditorBlockList(snapshot, operation.next);
160997
- default: return assertNever$3(operation);
160604
+ default: return assertNever$1(operation);
160998
160605
  }
160999
160606
  }
161000
160607
  function hydrateMetadataSnapshot(snapshot, baseline, current, published) {
@@ -161404,7 +161011,7 @@ function getFirstUnpublishedDraftChange(snapshot) {
161404
161011
  currentContent: publicationState.current,
161405
161012
  publishedContent: publicationState.published
161406
161013
  };
161407
- default: return assertNever$3(publicationState);
161014
+ default: return assertNever$1(publicationState);
161408
161015
  }
161409
161016
  }
161410
161017
  return null;
@@ -162315,7 +161922,7 @@ function previewEditorOpenDestination(current, intent, requestId) {
162315
161922
  },
162316
161923
  previewDesignOpenRequest: null
162317
161924
  };
162318
- default: return assertNever$3(intent, "Unhandled preview editor open intent");
161925
+ default: return assertNever$1(intent, "Unhandled preview editor open intent");
162319
161926
  }
162320
161927
  }
162321
161928
  const EditorUiStoreContext = createContext(null);
@@ -163788,7 +163395,7 @@ function blockEditorOwnerKey(owner) {
163788
163395
  case "page": return `page:${owner.pageId}`;
163789
163396
  case "entry-slot": return `entry-slot:${owner.type}:${owner.entryId}:${owner.slotKey}`;
163790
163397
  case "surface-slot": return `surface-slot:${owner.pageSurfaceId}:${owner.slotKey}`;
163791
- default: return assertNever$9(owner);
163398
+ default: return assertNever$6(owner);
163792
163399
  }
163793
163400
  }
163794
163401
  async function createEditableBlockForOwner(apiClient, siteId, owner, input) {
@@ -163819,7 +163426,7 @@ async function createEditableBlockForOwner(apiClient, siteId, owner, input) {
163819
163426
  purpose: input.purpose,
163820
163427
  expectedCompositionHash: owner.compositionHash
163821
163428
  });
163822
- default: return assertNever$9(owner);
163429
+ default: return assertNever$6(owner);
163823
163430
  }
163824
163431
  }
163825
163432
  async function reorderEditableBlocksForOwner(apiClient, siteId, owner, blockIds) {
@@ -163843,7 +163450,7 @@ async function reorderEditableBlocksForOwner(apiClient, siteId, owner, blockIds)
163843
163450
  blockIds,
163844
163451
  expectedCompositionHash: owner.compositionHash
163845
163452
  });
163846
- default: return assertNever$9(owner);
163453
+ default: return assertNever$6(owner);
163847
163454
  }
163848
163455
  }
163849
163456
  async function deleteEditableBlockForOwner(apiClient, siteId, owner, blockId) {
@@ -163867,7 +163474,7 @@ async function deleteEditableBlockForOwner(apiClient, siteId, owner, blockId) {
163867
163474
  blockId,
163868
163475
  expectedCompositionHash: owner.compositionHash
163869
163476
  });
163870
- default: return assertNever$9(owner);
163477
+ default: return assertNever$6(owner);
163871
163478
  }
163872
163479
  }
163873
163480
  function surfaceCompositionHashFromResponse(response) {
@@ -164540,7 +164147,7 @@ function getFeatureCardGeneratedIconStyleSummary(content, currentStyleGuideVersi
164540
164147
  case "invalid_generated":
164541
164148
  invalidGeneratedCount += 1;
164542
164149
  break;
164543
- default: assertNever$9(state);
164150
+ default: assertNever$6(state);
164544
164151
  }
164545
164152
  }
164546
164153
  return {
@@ -164602,7 +164209,7 @@ function applyGeneratedFeatureCardIconSet({ blockId, content, drafts, assets })
164602
164209
  reason: plan.kind,
164603
164210
  cardKey: plan.cardKey
164604
164211
  };
164605
- default: assertNever$9(plan);
164212
+ default: assertNever$6(plan);
164606
164213
  }
164607
164214
  for (const appliedIcon of plan.appliedIcons) drafts.setAtPath(blockId, `cards.${appliedIcon.cardIndex}.icon`, appliedIcon.iconValue);
164608
164215
  return {
@@ -165549,7 +165156,7 @@ function deriveCustomizeAction({ actionPresentation, blockId, settingsAvailable
165549
165156
  presentation: "external",
165550
165157
  blockId
165551
165158
  } : null;
165552
- default: return assertNever$9(actionPresentation.customize);
165159
+ default: return assertNever$6(actionPresentation.customize);
165553
165160
  }
165554
165161
  }
165555
165162
  function deriveIconActions({ featureCardIconActionsAvailable, generatedIconSetActionsAvailable, hasStaleGeneratedIcons, featureCardIconDialogCardsCount }) {
@@ -165816,7 +165423,7 @@ function menuActionIcon(action) {
165816
165423
  case "generated-icon-set": return action.stale ? /* @__PURE__ */ jsx(RotateCcw, { className: "mr-2 h-4 w-4" }) : /* @__PURE__ */ jsx(ImagePlus, { className: "mr-2 h-4 w-4" });
165817
165424
  case "duplicate": return /* @__PURE__ */ jsx(Copy, { className: "mr-2 h-4 w-4" });
165818
165425
  case "delete": return /* @__PURE__ */ jsx(Trash2, { className: "mr-2 h-4 w-4" });
165819
- default: return assertNever$9(action);
165426
+ default: return assertNever$6(action);
165820
165427
  }
165821
165428
  }
165822
165429
  function menuActionLabel(action) {
@@ -165825,7 +165432,7 @@ function menuActionLabel(action) {
165825
165432
  case "generated-icon-set": return "Manage icons";
165826
165433
  case "duplicate": return "Duplicate";
165827
165434
  case "delete": return "Delete";
165828
- default: return assertNever$9(action);
165435
+ default: return assertNever$6(action);
165829
165436
  }
165830
165437
  }
165831
165438
  //#endregion
@@ -189954,7 +189561,7 @@ function formatOrderMode(state) {
189954
189561
  case "custom": return "Custom order";
189955
189562
  case "legacyInferred": return "Using saved order";
189956
189563
  case "default": return "Following site offering order";
189957
- default: assertNever$9(state);
189564
+ default: assertNever$6(state);
189958
189565
  }
189959
189566
  }
189960
189567
  function siblingPath(path, siblingId) {
@@ -190171,7 +189778,7 @@ async function loadSiteOptionItemsFromApi({ apiClient, siteId, source }) {
190171
189778
  endpoint: "listAppointmentResources",
190172
189779
  params: { siteId }
190173
189780
  })));
190174
- default: return assertNever$9(source);
189781
+ default: return assertNever$6(source);
190175
189782
  }
190176
189783
  }
190177
189784
  function createSiteOptionApiLoader(apiClient) {
@@ -190345,7 +189952,7 @@ function toDrainFailure(effect, error) {
190345
189952
  kind: effect.type,
190346
189953
  message
190347
189954
  };
190348
- default: return assertNever$3(effect);
189955
+ default: return assertNever$1(effect);
190349
189956
  }
190350
189957
  }
190351
189958
  async function drainEditorEffect(effect, context) {
@@ -190353,7 +189960,7 @@ async function drainEditorEffect(effect, context) {
190353
189960
  case "persist-reorder": return drainPersistReorderEffect(effect, context);
190354
189961
  case "persist-insert": return drainPersistInsertEffect(effect, context);
190355
189962
  case "persist-remove": return drainPersistRemoveEffect(effect, context);
190356
- default: return assertNever$3(effect);
189963
+ default: return assertNever$1(effect);
190357
189964
  }
190358
189965
  }
190359
189966
  async function drainEditorEffects(effects, context) {
@@ -191633,7 +191240,7 @@ function footerModuleLabel(section) {
191633
191240
  case "social-links": return "Social links";
191634
191241
  case "supporting-text": return "Supporting text";
191635
191242
  case "legal": return "Legal text";
191636
- default: return assertNever$9(section);
191243
+ default: return assertNever$6(section);
191637
191244
  }
191638
191245
  }
191639
191246
  function sourceFor(section) {
@@ -191676,7 +191283,7 @@ function sourceFor(section) {
191676
191283
  kind: "footer-local",
191677
191284
  description: "Footer-specific content"
191678
191285
  };
191679
- default: return assertNever$9(section);
191286
+ default: return assertNever$6(section);
191680
191287
  }
191681
191288
  }
191682
191289
  function sourceAvailability(input) {
@@ -192748,7 +192355,7 @@ function deriveStagedSessionCapabilities(state) {
192748
192355
  isApplyingStaged: false,
192749
192356
  requiresReload: true
192750
192357
  };
192751
- default: return assertNever$2(state, "Unhandled editor staged session state");
192358
+ default: return assertNever(state, "Unhandled editor staged session state");
192752
192359
  }
192753
192360
  }
192754
192361
  function beginStagedSession(state, transaction) {
@@ -192761,7 +192368,7 @@ function beginStagedSession(state, transaction) {
192761
192368
  };
192762
192369
  case "applying":
192763
192370
  case "stale": return state;
192764
- default: return assertNever$2(state, "Unhandled editor staged session state");
192371
+ default: return assertNever(state, "Unhandled editor staged session state");
192765
192372
  }
192766
192373
  }
192767
192374
  function applyStagedSession(state) {
@@ -192774,7 +192381,7 @@ function applyStagedSession(state) {
192774
192381
  case "idle":
192775
192382
  case "applying":
192776
192383
  case "stale": return state;
192777
- default: return assertNever$2(state, "Unhandled editor staged session state");
192384
+ default: return assertNever(state, "Unhandled editor staged session state");
192778
192385
  }
192779
192386
  }
192780
192387
  function confirmStagedSession(state) {
@@ -192799,7 +192406,7 @@ function cancelStagedSession(state) {
192799
192406
  case "stale": return { kind: "idle" };
192800
192407
  case "idle":
192801
192408
  case "applying": return state;
192802
- default: return assertNever$2(state, "Unhandled editor staged session state");
192409
+ default: return assertNever(state, "Unhandled editor staged session state");
192803
192410
  }
192804
192411
  }
192805
192412
  function enqueueTransaction(state, transaction) {
@@ -192821,7 +192428,7 @@ function enqueueTransaction(state, transaction) {
192821
192428
  transactions: coalesceQueuedTransactions(state.transactions, transaction)
192822
192429
  };
192823
192430
  case "stale": return state;
192824
- default: return assertNever$2(state, "Unhandled editor transaction queue state");
192431
+ default: return assertNever(state, "Unhandled editor transaction queue state");
192825
192432
  }
192826
192433
  }
192827
192434
  function beginAutosaveBatch(state) {
@@ -192835,7 +192442,7 @@ function beginAutosaveBatch(state) {
192835
192442
  case "idle":
192836
192443
  case "saving":
192837
192444
  case "stale": return state;
192838
- default: return assertNever$2(state, "Unhandled editor transaction queue state");
192445
+ default: return assertNever(state, "Unhandled editor transaction queue state");
192839
192446
  }
192840
192447
  }
192841
192448
  function confirmAutosaveBatch(state) {
@@ -192864,7 +192471,7 @@ function coalesceQueuedTransactions(queue, transaction) {
192864
192471
  function mergeBatchAndFollowUpTransactions(batch, followUp) {
192865
192472
  return followUp.reduce((transactions, transaction) => coalesceQueuedTransactions(transactions, transaction), batch);
192866
192473
  }
192867
- function assertNever$2(value, message) {
192474
+ function assertNever(value, message) {
192868
192475
  throw new Error(`${message}: ${JSON.stringify(value)}`);
192869
192476
  }
192870
192477
  //#endregion
@@ -192889,22 +192496,10 @@ function createStyleConfiguratorState(base) {
192889
192496
  saveStatus: { kind: "idle" },
192890
192497
  warnings: [],
192891
192498
  notices: [],
192892
- stalePaletteConflict: null,
192893
192499
  expandedRow: null,
192894
192500
  stagedSession: idleEditorStagedSessionState()
192895
192501
  };
192896
192502
  }
192897
- function paletteMutationCapability(state) {
192898
- if (state.previewed.palette.kind === "invalid") return {
192899
- kind: "blocked",
192900
- reason: "invalid-palette",
192901
- message: "Choose a palette below to repair this site’s saved palette."
192902
- };
192903
- return { kind: "editable" };
192904
- }
192905
- function editablePaletteEditor(state) {
192906
- return state.previewed.palette.kind === "available" ? state.previewed.palette.editor : null;
192907
- }
192908
192503
  function openRow(state, row) {
192909
192504
  return state.expandedRow === row ? state : {
192910
192505
  ...state,
@@ -192920,12 +192515,7 @@ function isPreviewingChange(state) {
192920
192515
  return !selectionSnapshotsEqual(state.base, state.previewed);
192921
192516
  }
192922
192517
  function deriveStyleConfiguratorCapabilities(state) {
192923
- const staged = deriveStagedSessionCapabilities(state.stagedSession);
192924
- return state.previewed.palette.kind === "invalid" ? {
192925
- ...staged,
192926
- canPreviewStaged: false,
192927
- canApplyStaged: false
192928
- } : staged;
192518
+ return deriveStagedSessionCapabilities(state.stagedSession);
192929
192519
  }
192930
192520
  function styleConfiguratorHistoryEntryForPersistedSelection(state, persisted) {
192931
192521
  if (state.stagedSession.kind === "idle") return null;
@@ -192983,84 +192573,27 @@ function resetTypographyToSaved(state) {
192983
192573
  function previewCuratedPalette(state, valueKey) {
192984
192574
  const palette = findCuratedPalette(valueKey);
192985
192575
  if (!palette) return state;
192986
- const resolved = resolvedCuratedPaletteSelection(palette);
192987
- const editor = editablePaletteEditor(state);
192988
192576
  return withPreviewedSelection(state, {
192989
192577
  ...state.previewed,
192990
- palette: {
192991
- kind: "available",
192992
- editor: editor ? reducePaletteEditorState(editor, {
192993
- kind: "select",
192994
- resolved
192995
- }) : {
192996
- committed: resolved,
192997
- preview: {
192998
- kind: "selected",
192999
- resolved
193000
- }
193001
- }
193002
- }
193003
- });
193004
- }
193005
- function previewSitePalette(state, palette) {
193006
- const resolved = resolvedSitePaletteSelectionFromPreview({
193007
- paletteId: palette.paletteId,
193008
- colors: palette.colors,
193009
- mode: palette.mode,
193010
- version: palette.version
193011
- });
193012
- const editor = editablePaletteEditor(state);
193013
- return withPreviewedSelection(state, {
193014
- ...state.previewed,
193015
- palette: {
193016
- kind: "available",
193017
- editor: editor ? reducePaletteEditorState(editor, {
193018
- kind: "select",
193019
- resolved
193020
- }) : {
193021
- committed: resolved,
193022
- preview: {
193023
- kind: "selected",
193024
- resolved
193025
- }
193026
- }
193027
- }
193028
- });
193029
- }
193030
- /** Starts a manual palette from the active complete palette, never sparse overrides. */
193031
- function createPalette(state) {
193032
- const editor = editablePaletteEditor(state);
193033
- if (!editor) return state;
193034
- return withPreviewedSelection(state, {
193035
- ...state.previewed,
193036
- palette: {
193037
- kind: "available",
193038
- editor: reducePaletteEditorState(editor, { kind: "create" })
193039
- }
192578
+ palette: concretePaletteToTheme(palette)
193040
192579
  });
193041
192580
  }
193042
192581
  function setPaletteColors(state, colors) {
193043
- const editor = editablePaletteEditor(state);
193044
- if (!editor) return state;
193045
- const preview = completePaletteEditorPreview(editor);
192582
+ const palette = concretePaletteFromTheme(state.previewed.palette);
193046
192583
  return withPreviewedSelection(state, {
193047
192584
  ...state.previewed,
193048
- palette: {
193049
- kind: "available",
193050
- editor: reducePaletteEditorState(editor, {
193051
- kind: "edit",
193052
- colors,
193053
- mode: preview.mode
193054
- })
193055
- }
192585
+ palette: concretePaletteToTheme({
192586
+ colors,
192587
+ mode: palette.mode
192588
+ })
193056
192589
  });
193057
192590
  }
193058
192591
  /**
193059
192592
  * Records the post-compile resolved selection + any fallback warnings.
193060
192593
  * Used after `compileSiteThemeFromSelections` runs against a new site style:
193061
- * the resolver may have auto-picked a different button style if the user's
193062
- * previous selection is not offered for the new style, or a different palette
193063
- * if the persisted palette value key is no longer known.
192594
+ * the resolver may have auto-picked a different button style or chrome look
192595
+ * when the user's previous selection is not offered for the new style. The
192596
+ * concrete palette is carried independently in the compiled Theme.
193064
192597
  *
193065
192598
  */
193066
192599
  function applyResolvedSelections(state, input) {
@@ -193085,7 +192618,6 @@ function cancelPreview(state) {
193085
192618
  saveStatus: { kind: "idle" },
193086
192619
  warnings: [],
193087
192620
  notices: [],
193088
- stalePaletteConflict: null,
193089
192621
  stagedSession
193090
192622
  };
193091
192623
  }
@@ -193104,7 +192636,6 @@ function markApplySaved(state, persisted) {
193104
192636
  saveStatus: { kind: "saved" },
193105
192637
  warnings: [],
193106
192638
  notices: [],
193107
- stalePaletteConflict: null,
193108
192639
  stagedSession: confirmStagedSession(applyStagedSession(state.stagedSession))
193109
192640
  };
193110
192641
  }
@@ -193122,76 +192653,6 @@ function markApplyFailed(state, message, failureKind = "retryable") {
193122
192653
  })
193123
192654
  };
193124
192655
  }
193125
- /** Advances a stale site's CAS token only for the user's explicit retry. */
193126
- function prepareStalePaletteRetry(state, input) {
193127
- if (state.saveStatus.kind !== "failed" || state.saveStatus.failureKind !== "stale") return state;
193128
- const conflict = state.stalePaletteConflict;
193129
- if (conflict) {
193130
- if (!input) return state;
193131
- const base = committedPaletteForSnapshot(state.base.palette);
193132
- if (!base) return state;
193133
- const original = paletteSnapshotForLibraryActive({
193134
- kind: "site",
193135
- paletteId: conflict.originalPaletteId
193136
- }, input.sitePalettes);
193137
- const palette = original?.kind === "site" ? {
193138
- kind: "available",
193139
- editor: {
193140
- committed: original,
193141
- preview: {
193142
- kind: "edited-site",
193143
- ...conflict.localDraft,
193144
- expectedVersion: original.version
193145
- }
193146
- }
193147
- } : {
193148
- kind: "available",
193149
- editor: {
193150
- committed: base,
193151
- preview: {
193152
- kind: "new-site",
193153
- colors: conflict.localDraft.colors,
193154
- mode: conflict.localDraft.mode
193155
- }
193156
- }
193157
- };
193158
- const previewed = {
193159
- ...state.previewed,
193160
- palette
193161
- };
193162
- return {
193163
- ...state,
193164
- saveStatus: { kind: "idle" },
193165
- stalePaletteConflict: null,
193166
- previewed,
193167
- stagedSession: ensureStagedSessionForPreview(idleEditorStagedSessionState(), state.base, previewed)
193168
- };
193169
- }
193170
- const base = committedPaletteForSnapshot(state.base.palette);
193171
- const palette = state.previewed.palette;
193172
- if (!base || base.kind !== "site" || palette.kind !== "available" || palette.editor.preview.kind !== "edited-site" || palette.editor.preview.paletteId !== base.selection.paletteId) return state;
193173
- const previewed = {
193174
- ...state.previewed,
193175
- palette: {
193176
- kind: "available",
193177
- editor: {
193178
- ...palette.editor,
193179
- committed: base,
193180
- preview: {
193181
- ...palette.editor.preview,
193182
- expectedVersion: base.version
193183
- }
193184
- }
193185
- }
193186
- };
193187
- return {
193188
- ...state,
193189
- saveStatus: { kind: "idle" },
193190
- stalePaletteConflict: null,
193191
- previewed,
193192
- stagedSession: ensureStagedSessionForPreview(idleEditorStagedSessionState(), state.base, previewed)
193193
- };
193194
- }
193195
192656
  function toggleRow(state, row) {
193196
192657
  return {
193197
192658
  ...state,
@@ -193218,21 +192679,8 @@ function syncStyleConfiguratorState(state, base) {
193218
192679
  saveStatus: state.saveStatus.kind === "saving" ? { kind: "saved" } : state.saveStatus,
193219
192680
  warnings: [],
193220
192681
  notices: [],
193221
- stalePaletteConflict: null,
193222
192682
  stagedSession: idleEditorStagedSessionState()
193223
192683
  };
193224
- const paletteConflict = staleActivePaletteConflict(state, base);
193225
- if (paletteConflict) return stateWithStalePaletteConflict(state, base, paletteConflict);
193226
- const rebasedPreview = rebaseSitePaletteDraft(state.previewed, base);
193227
- if (rebasedPreview) return {
193228
- ...state,
193229
- base,
193230
- previewed: rebasedPreview,
193231
- warnings: [],
193232
- notices: [],
193233
- stalePaletteConflict: null,
193234
- stagedSession: ensureStagedSessionForPreview(state.stagedSession, base, rebasedPreview)
193235
- };
193236
192684
  return {
193237
192685
  ...state,
193238
192686
  base,
@@ -193240,130 +192688,9 @@ function syncStyleConfiguratorState(state, base) {
193240
192688
  saveStatus: { kind: "idle" },
193241
192689
  warnings: [],
193242
192690
  notices: [],
193243
- stalePaletteConflict: null,
193244
192691
  stagedSession: idleEditorStagedSessionState()
193245
192692
  };
193246
192693
  }
193247
- /** Reconciles typed palette-library authority with the editor's saved base. */
193248
- function reconcilePaletteLibraryActive(state, active, sitePalettes) {
193249
- if (active.kind === "invalid") return state;
193250
- const committedPalette = paletteSnapshotForLibraryActive(active.selection, sitePalettes);
193251
- if (!committedPalette) return state;
193252
- return rebasePaletteLibraryAuthority(state, committedPalette);
193253
- }
193254
- /**
193255
- * A palette-library response only refreshes palette authority. Unlike a full
193256
- * server snapshot, it must never discard the user's staged site-style work.
193257
- * Site drafts keep their complete local colours/mode and rebase their expected
193258
- * version when the same palette was changed elsewhere.
193259
- */
193260
- function rebasePaletteLibraryAuthority(state, committedPalette) {
193261
- const committed = committedPaletteForSnapshot(state.base.palette);
193262
- if (committed && resolvedPalettesEqual(committed, committedPalette)) return state;
193263
- const base = {
193264
- ...state.base,
193265
- palette: {
193266
- kind: "available",
193267
- editor: createPaletteEditorState(committedPalette)
193268
- }
193269
- };
193270
- const paletteConflict = staleActivePaletteConflict(state, base);
193271
- if (paletteConflict) return stateWithStalePaletteConflict(state, base, paletteConflict);
193272
- const previewed = {
193273
- ...state.previewed,
193274
- palette: rebasePaletteEditorAuthority(state.previewed.palette, committedPalette)
193275
- };
193276
- return {
193277
- ...state,
193278
- base,
193279
- previewed,
193280
- stagedSession: ensureStagedSessionForPreview(state.stagedSession, base, previewed)
193281
- };
193282
- }
193283
- function staleActivePaletteConflict(state, refreshedBase) {
193284
- const saved = committedPaletteForSnapshot(state.base.palette);
193285
- const refreshed = committedPaletteForSnapshot(refreshedBase.palette);
193286
- const local = state.previewed.palette;
193287
- if (saved?.kind !== "site" || !refreshed || samePaletteIdentity(saved, refreshed) || local.kind !== "available" || local.editor.preview.kind !== "edited-site" || local.editor.preview.paletteId !== saved.selection.paletteId) return null;
193288
- return {
193289
- kind: "active-palette-changed",
193290
- originalPaletteId: saved.selection.paletteId,
193291
- localDraft: local.editor.preview
193292
- };
193293
- }
193294
- function stateWithStalePaletteConflict(state, base, stalePaletteConflict) {
193295
- const previewed = {
193296
- ...base,
193297
- palette: state.previewed.palette
193298
- };
193299
- const message = "The active palette changed elsewhere. Your palette draft is still here.";
193300
- return {
193301
- ...state,
193302
- base,
193303
- previewed,
193304
- saveStatus: {
193305
- kind: "failed",
193306
- message,
193307
- failureKind: "stale"
193308
- },
193309
- warnings: [],
193310
- notices: [],
193311
- stalePaletteConflict,
193312
- stagedSession: rejectStagedSession(ensureApplyingStagedSessionForPreview(state.stagedSession, base, previewed), {
193313
- kind: "stale",
193314
- message
193315
- })
193316
- };
193317
- }
193318
- function paletteSnapshotForLibraryActive(selection, sitePalettes) {
193319
- if (selection.kind === "curated") {
193320
- const curated = findCuratedPalette(selection.valueKey);
193321
- return curated ? resolvedCuratedPaletteSelection(curated) : null;
193322
- }
193323
- const palette = sitePalettes.find((candidate) => candidate.id === selection.paletteId);
193324
- return palette ? resolvedSitePaletteSelectionFromPreview({
193325
- paletteId: palette.id,
193326
- colors: palette.colors,
193327
- mode: palette.mode,
193328
- version: palette.version
193329
- }) : null;
193330
- }
193331
- function rebaseSitePaletteDraft(previewed, refreshedBase) {
193332
- const local = previewed.palette;
193333
- const saved = committedPaletteForSnapshot(refreshedBase.palette);
193334
- if (local.kind !== "available" || !saved || saved.kind !== "site" || local.editor.preview.kind !== "edited-site" || local.editor.preview.paletteId !== saved.selection.paletteId) return null;
193335
- return {
193336
- ...refreshedBase,
193337
- palette: rebasePaletteEditorAuthority(local, saved)
193338
- };
193339
- }
193340
- /**
193341
- * Refresh changes server authority, never the local draft. This is a narrow
193342
- * adapter over the core editor ADT rather than a second palette transition
193343
- * machine: all user actions and command planning still run through core.
193344
- */
193345
- function rebasePaletteEditorAuthority(palette, committed) {
193346
- if (palette.kind === "invalid") return palette;
193347
- const editor = palette.editor;
193348
- if (editor.preview.kind === "clean") return {
193349
- kind: "available",
193350
- editor: createPaletteEditorState(committed)
193351
- };
193352
- if (editor.preview.kind === "edited-site" && committed.kind === "site" && editor.preview.paletteId === committed.selection.paletteId) return {
193353
- kind: "available",
193354
- editor: {
193355
- committed,
193356
- preview: editor.preview
193357
- }
193358
- };
193359
- return {
193360
- kind: "available",
193361
- editor: {
193362
- ...editor,
193363
- committed
193364
- }
193365
- };
193366
- }
193367
192694
  function previewHeaderSelection(state, selection) {
193368
192695
  const headerStyleId = deriveNearestCompatibleHeaderStyle(selection.headerStyleId, selection.headerLayoutId);
193369
192696
  const headerLookId = findLegacyHeaderLookIdForSelection({
@@ -193378,7 +192705,6 @@ function previewHeaderSelection(state, selection) {
193378
192705
  });
193379
192706
  }
193380
192707
  function withPreviewedSelection(state, previewed) {
193381
- if (state.previewed.palette.kind === "invalid" && previewed.palette.kind === "invalid") return state;
193382
192708
  return {
193383
192709
  ...state,
193384
192710
  previewed,
@@ -193409,7 +192735,7 @@ function createStyleConfiguratorHistoryEntry(previous, next) {
193409
192735
  };
193410
192736
  }
193411
192737
  function selectionSnapshotsEqual(a, b) {
193412
- return a.siteStyleId === b.siteStyleId && a.selectionVersion === b.selectionVersion && a.selectionUpdatedAt === b.selectionUpdatedAt && a.headerLayoutId === b.headerLayoutId && a.headerStyleId === b.headerStyleId && a.headerLookId === b.headerLookId && a.footerLookId === b.footerLookId && buttonStyleSelectionsEqual(a.buttonStyleSelection, b.buttonStyleSelection) && paletteSelectionSnapshotsEqual(a.palette, b.palette) && typographyObjectsEqual(a.typography, b.typography);
192738
+ return a.siteStyleId === b.siteStyleId && a.selectionVersion === b.selectionVersion && a.selectionUpdatedAt === b.selectionUpdatedAt && a.headerLayoutId === b.headerLayoutId && a.headerStyleId === b.headerStyleId && a.headerLookId === b.headerLookId && a.footerLookId === b.footerLookId && buttonStyleSelectionsEqual(a.buttonStyleSelection, b.buttonStyleSelection) && themePalettesEqual(a.palette, b.palette) && typographyObjectsEqual(a.typography, b.typography);
193413
192739
  }
193414
192740
  function patchTypography(typography, patch) {
193415
192741
  switch (patch.kind) {
@@ -193453,121 +192779,13 @@ function proseLinkStylesEqual(a, b) {
193453
192779
  if (a === void 0 || b === void 0) return a === b;
193454
192780
  return a.colorToken === b.colorToken && a.hoverColorToken === b.hoverColorToken && a.underline === b.underline && a.decorationColorToken === b.decorationColorToken && a.hoverDecorationColorToken === b.hoverDecorationColorToken && a.underlineStyle === b.underlineStyle && a.underlineThickness === b.underlineThickness && a.underlineOffset === b.underlineOffset;
193455
192781
  }
193456
- function paletteSelectionSnapshotFromRuntime(runtime) {
193457
- if (runtime.kind === "invalid") return {
193458
- kind: "invalid",
193459
- reason: runtime.reason
193460
- };
193461
- switch (runtime.authority) {
193462
- case "curated": {
193463
- const palette = findCuratedPalette(runtime.selection.valueKey);
193464
- if (!palette) return {
193465
- kind: "invalid",
193466
- reason: "runtime-curated-palette-missing"
193467
- };
193468
- return {
193469
- kind: "available",
193470
- editor: createPaletteEditorState(resolvedCuratedPaletteSelection(palette))
193471
- };
193472
- }
193473
- case "site": return {
193474
- kind: "available",
193475
- editor: createPaletteEditorState(resolvedSitePaletteSelectionFromPreview({
193476
- paletteId: runtime.selection.paletteId,
193477
- colors: runtime.colors,
193478
- mode: runtime.mode,
193479
- version: runtime.sitePaletteVersion
193480
- }))
193481
- };
193482
- default: return assertNever$1(runtime);
193483
- }
193484
- }
193485
- function assertNever$1(value) {
193486
- throw new Error(`Unhandled runtime palette state: ${JSON.stringify(value)}`);
193487
- }
193488
- function paletteSelectionSnapshotsEqual(left, right) {
193489
- if (left.kind !== right.kind) return false;
193490
- if (left.kind === "invalid" && right.kind === "invalid") return left.reason === right.reason;
193491
- if (left.kind === "invalid" || right.kind === "invalid") return false;
193492
- return paletteEditorStatesEqual(left.editor, right.editor);
193493
- }
193494
192782
  function palettePreviewProjection(palette) {
193495
- if (palette.kind === "invalid") return palette;
193496
- const preview = completePaletteEditorPreview(palette.editor);
193497
- switch (preview.kind) {
193498
- case "selected": return preview.selection.kind === "curated" ? {
193499
- kind: "curated",
193500
- valueKey: preview.selection.valueKey,
193501
- colors: preview.colors,
193502
- mode: preview.mode
193503
- } : preview.version === null ? (() => {
193504
- throw new Error("A selected site palette requires a version");
193505
- })() : {
193506
- kind: "site",
193507
- paletteId: preview.selection.paletteId,
193508
- colors: preview.colors,
193509
- mode: preview.mode,
193510
- version: preview.version
193511
- };
193512
- case "edited-curated": return {
193513
- kind: "curated-fork",
193514
- sourceValueKey: preview.sourceValueKey,
193515
- colors: preview.colors,
193516
- mode: preview.mode
193517
- };
193518
- case "edited-site": return {
193519
- kind: "site",
193520
- paletteId: preview.selection.paletteId,
193521
- colors: preview.colors,
193522
- mode: preview.mode,
193523
- version: preview.expectedVersion
193524
- };
193525
- case "new-site": return preview;
193526
- default: return assertNever$1(preview);
193527
- }
193528
- }
193529
- function committedPaletteForSnapshot(palette) {
193530
- return palette.kind === "available" ? palette.editor.committed : null;
193531
- }
193532
- function paletteEditorStatesEqual(left, right) {
193533
- return resolvedPalettesEqual(left.committed, right.committed) && paletteCommandsEqual(planPaletteCommand(left), planPaletteCommand(right)) && palettePreviewProjectionsEqual(palettePreviewProjection({
193534
- kind: "available",
193535
- editor: left
193536
- }), palettePreviewProjection({
193537
- kind: "available",
193538
- editor: right
193539
- }));
193540
- }
193541
- function resolvedPalettesEqual(left, right) {
193542
- return paletteSelectionsEqual(left.selection, right.selection) && paletteColorsEqual(left.colors, right.colors) && left.mode === right.mode && (left.kind !== "site" || right.kind !== "site" || left.version === right.version);
193543
- }
193544
- function samePaletteIdentity(left, right) {
193545
- return paletteSelectionsEqual(left.selection, right.selection);
193546
- }
193547
- function paletteSelectionsEqual(left, right) {
193548
- if (left.kind !== right.kind) return false;
193549
- if (left.kind === "curated" && right.kind === "curated") return left.valueKey === right.valueKey;
193550
- if (left.kind === "site" && right.kind === "site") return left.paletteId === right.paletteId;
193551
- return false;
193552
- }
193553
- function paletteCommandsEqual(left, right) {
193554
- if (left.kind !== right.kind) return false;
193555
- switch (left.kind) {
193556
- case "preserve": return true;
193557
- case "select": return right.kind === "select" && paletteSelectionsEqual(left.selection, right.selection);
193558
- case "update-site": return right.kind === "update-site" && left.paletteId === right.paletteId && left.expectedVersion === right.expectedVersion && left.mode === right.mode && paletteColorsEqual(left.colors, right.colors);
193559
- case "create-site": return right.kind === "create-site" && left.mode === right.mode && paletteColorsEqual(left.colors, right.colors) && left.origin.kind === right.origin.kind && (left.origin.kind !== "curated-fork" || right.origin.kind === "curated-fork" && left.origin.sourceValueKey === right.origin.sourceValueKey);
193560
- default: return assertNever$1(left);
193561
- }
193562
- }
193563
- function palettePreviewProjectionsEqual(left, right) {
193564
- if (left.kind !== right.kind) return false;
193565
- if (left.kind === "invalid" && right.kind === "invalid") return left.reason === right.reason;
193566
- if (left.kind === "new-site" && right.kind === "new-site") return left.mode === right.mode && paletteColorsEqual(left.colors, right.colors);
193567
- if (left.kind === "curated" && right.kind === "curated") return left.valueKey === right.valueKey && left.mode === right.mode && paletteColorsEqual(left.colors, right.colors);
193568
- if (left.kind === "curated-fork" && right.kind === "curated-fork") return left.sourceValueKey === right.sourceValueKey && left.mode === right.mode && paletteColorsEqual(left.colors, right.colors);
193569
- if (left.kind === "site" && right.kind === "site") return left.paletteId === right.paletteId && left.version === right.version && left.mode === right.mode && paletteColorsEqual(left.colors, right.colors);
193570
- return false;
192783
+ const concrete = concretePaletteFromTheme(palette);
192784
+ return {
192785
+ curatedValueKey: curatedPalettes.find((candidate) => concretePalettesEqual(concrete, candidate))?.valueKey ?? null,
192786
+ colors: concrete.colors,
192787
+ mode: concrete.mode
192788
+ };
193571
192789
  }
193572
192790
  //#endregion
193573
192791
  //#region ../preview-next/src/client/preview/previewDesignCoordinator.ts
@@ -193628,7 +192846,7 @@ function transitionPreviewDesignState(state, command) {
193628
192846
  ...state,
193629
192847
  apply: "idle"
193630
192848
  }, { kind: "none" });
193631
- default: return assertNever$8(command, "Unhandled preview design command");
192849
+ default: return assertNever$5(command, "Unhandled preview design command");
193632
192850
  }
193633
192851
  }
193634
192852
  function acceptPreview(current, next, effect) {
@@ -193870,7 +193088,7 @@ function PreviewDesignCoordinatorProvider({ children }) {
193870
193088
  case "set-theme":
193871
193089
  setOverrideTheme(transition.effect.theme, { source: transition.effect.source });
193872
193090
  break;
193873
- default: assertNever$8(transition.effect, "Unhandled preview design overlay effect");
193091
+ default: assertNever$5(transition.effect, "Unhandled preview design overlay effect");
193874
193092
  }
193875
193093
  }
193876
193094
  return transition;
@@ -193942,152 +193160,13 @@ function usePreviewDesignCoordinator() {
193942
193160
  return ctx;
193943
193161
  }
193944
193162
  //#endregion
193945
- //#region ../preview-next/src/client/preview/siteStylePreviewPlanner.ts
193946
- function deriveSiteStylePreviewUpdate(baseTheme, baseSelection) {
193947
- return {
193948
- kind: "derive-update",
193949
- baseTheme,
193950
- baseSelection
193951
- };
193952
- }
193953
- function planSiteStylePreviewChange(input) {
193954
- const resolvedPalette = resolvedPaletteForPreview(input.selection.palette, input.siteStyle);
193955
- const compiled = compileSiteThemeFromSelections({
193956
- siteStyle: input.siteStyle,
193957
- buttonStyleSelection: input.selection.buttonStyleSelection,
193958
- resolvedPalette,
193959
- typography: input.selection.typography,
193960
- compilationPlan: compilationPlanForPreview(input)
193961
- });
193962
- return {
193963
- themeOverlay: compiled.theme,
193964
- resolvedSelections: {
193965
- ...compiled.resolvedSelections,
193966
- headerLayoutId: compiled.resolvedSelections.headerLayoutId ?? input.selection.headerLayoutId ?? input.siteStyle.defaultHeaderSelection.layoutId,
193967
- headerStyleId: compiled.resolvedSelections.headerStyleId ?? input.selection.headerStyleId ?? input.siteStyle.defaultHeaderSelection.styleId
193968
- },
193969
- chromeSelection: {
193970
- headerLookId: input.selection.headerLookId,
193971
- footerLookId: input.selection.footerLookId
193972
- },
193973
- warnings: compiled.warnings
193974
- };
193975
- }
193976
- function compilationPlanForPreview(input) {
193977
- const replacement = () => replaceSiteStyleCompilationPlan({
193978
- headerLayoutId: input.selection.headerLayoutId,
193979
- headerStyleId: input.selection.headerStyleId,
193980
- headerLookId: input.selection.headerLookId,
193981
- footerLookId: input.selection.footerLookId,
193982
- headerSelectionContext: input.headerSelectionContext
193983
- });
193984
- if (input.compilation.kind === "replace-site-style") return replacement();
193985
- const baseTheme = input.compilation.baseTheme;
193986
- if (!baseTheme) return replacement();
193987
- if (input.compilation.kind === "edit-chrome") return updateCompilationPlan({
193988
- baseTheme,
193989
- selection: input.selection,
193990
- headerSelectionContext: input.headerSelectionContext,
193991
- recompileHeader: input.compilation.surface === "header",
193992
- applyFooterLook: input.compilation.surface === "footer"
193993
- });
193994
- if (input.compilation.baseSelection.siteStyleId !== input.selection.siteStyleId) return replacement();
193995
- return updateCompilationPlan({
193996
- baseTheme,
193997
- selection: input.selection,
193998
- headerSelectionContext: input.headerSelectionContext,
193999
- recompileHeader: headerSelectionChanged(input.compilation.baseSelection, input.selection),
194000
- applyFooterLook: input.compilation.baseSelection.footerLookId !== input.selection.footerLookId
194001
- });
194002
- }
194003
- function updateCompilationPlan(input) {
194004
- const selection = {
194005
- headerLookId: input.selection.headerLookId,
194006
- headerLayoutId: input.selection.headerLayoutId ?? null,
194007
- headerStyleId: input.selection.headerStyleId ?? null
194008
- };
194009
- return {
194010
- kind: "update-selection",
194011
- header: input.recompileHeader ? {
194012
- kind: "recompile",
194013
- selection,
194014
- context: completeHeaderSelectionContext(input.headerSelectionContext),
194015
- brandPresentation: { kind: "apply-logo-context" }
194016
- } : {
194017
- kind: "preserve",
194018
- header: input.baseTheme.header,
194019
- selection
194020
- },
194021
- footer: input.applyFooterLook ? {
194022
- kind: "apply-look",
194023
- footer: input.baseTheme.footer,
194024
- footerLookId: input.selection.footerLookId
194025
- } : {
194026
- kind: "preserve",
194027
- footer: input.baseTheme.footer,
194028
- footerLookId: input.selection.footerLookId
194029
- }
194030
- };
194031
- }
194032
- function headerSelectionChanged(base, previewed) {
194033
- return base.headerLookId !== previewed.headerLookId || base.headerLayoutId !== previewed.headerLayoutId || base.headerStyleId !== previewed.headerStyleId;
194034
- }
194035
- function resolvedPaletteForPreview(palette, siteStyle) {
194036
- if (palette.kind === "available") {
194037
- const preview = completePaletteEditorPreview(palette.editor);
194038
- switch (preview.kind) {
194039
- case "selected":
194040
- if (preview.selection.kind === "site") {
194041
- if (preview.version === null) throw new Error("A selected site palette requires a version");
194042
- return resolvedSitePaletteSelectionFromPreview({
194043
- paletteId: preview.selection.paletteId,
194044
- colors: preview.colors,
194045
- mode: preview.mode,
194046
- version: preview.version
194047
- });
194048
- }
194049
- {
194050
- const curated = findCuratedPalette(preview.selection.valueKey);
194051
- if (!curated) throw new Error("Selected curated palette is unavailable");
194052
- return resolvedCuratedPaletteSelection(curated);
194053
- }
194054
- case "edited-curated": return resolvedDraftPaletteSelection({
194055
- colors: preview.colors,
194056
- mode: preview.mode
194057
- });
194058
- case "edited-site": return resolvedSitePaletteSelectionFromPreview({
194059
- paletteId: preview.selection.paletteId,
194060
- colors: preview.colors,
194061
- mode: preview.mode,
194062
- version: preview.expectedVersion
194063
- });
194064
- case "new-site": return resolvedDraftPaletteSelection({
194065
- colors: preview.colors,
194066
- mode: preview.mode
194067
- });
194068
- default: return assertNever(preview);
194069
- }
194070
- }
194071
- switch (palette.kind) {
194072
- case "invalid": {
194073
- const recommendation = findCuratedPalette(siteStyle.paletteRecommendations[0].id);
194074
- if (!recommendation) throw new Error("Site style has no usable palette recommendation");
194075
- return resolvedCuratedPaletteSelection(recommendation);
194076
- }
194077
- default: return assertNever(palette);
194078
- }
194079
- }
194080
- function assertNever(value) {
194081
- throw new Error(`Unhandled palette preview: ${JSON.stringify(value)}`);
194082
- }
194083
- //#endregion
194084
193163
  //#region ../preview-next/src/client/preview/siteChromeLookRows.ts
194085
193164
  function buildSiteChromeLookModels(input) {
194086
193165
  const selection = input.state.previewed;
194087
193166
  const current = compileSiteThemeFromSelections({
194088
193167
  siteStyle: input.siteStyle,
194089
193168
  buttonStyleSelection: selection.buttonStyleSelection,
194090
- resolvedPalette: resolvedPaletteForPreview(selection.palette, input.siteStyle),
193169
+ palette: selection.palette,
194091
193170
  compilationPlan: replaceSiteStyleCompilationPlan({
194092
193171
  headerLayoutId: selection.headerLayoutId,
194093
193172
  headerStyleId: selection.headerStyleId,
@@ -194191,7 +193270,6 @@ function planSiteChromeLookSelection(command) {
194191
193270
  //#endregion
194192
193271
  //#region ../preview-next/src/client/preview/previewErrorMessages.ts
194193
193272
  const PREVIEW_DESIGN_SAVE_ERROR_MESSAGE = "We couldn’t save that change just now. Please try again in a minute or two.";
194194
- const PREVIEW_DESIGN_REFRESH_ERROR_MESSAGE = "We couldn’t refresh the latest design just now. Your changes are still here. Please try again in a minute or two.";
194195
193273
  const PREVIEW_DESIGN_LOAD_ERROR_MESSAGE = "We couldn’t load those design options just now. Please try again in a minute or two.";
194196
193274
  function reportPreviewDesignError(operation, error) {
194197
193275
  console.error(`[preview-design] ${operation}`, error);
@@ -194199,26 +193277,20 @@ function reportPreviewDesignError(operation, error) {
194199
193277
  //#endregion
194200
193278
  //#region ../preview-next/src/client/preview/styleConfiguratorSnapshot.ts
194201
193279
  /**
194202
- * Preview only accepts the modern, server-resolved palette runtime state. The
194203
- * old Theme-plus-overrides reconstruction belongs to migration tooling, never
194204
- * to a live editor where it could silently overwrite authoritative state.
193280
+ * The parsed theme is the complete palette authority for preview.
194205
193281
  */
194206
193282
  function resolveStyleConfiguratorInitialSnapshot(input) {
194207
- const siteStyleId = siteStyleIdFromTheme(input.theme);
193283
+ const theme = input.theme;
193284
+ if (!theme) return null;
193285
+ const siteStyleId = siteStyleIdFromTheme(theme);
194208
193286
  if (!siteStyleId) return null;
194209
193287
  const siteStyle = getCuratedSiteStyle(siteStyleId);
194210
193288
  if (!siteStyle) return null;
194211
- const runtimePaletteState = input.initialSelections.runtimePaletteState;
194212
- const resolvedRuntimePalette = runtimePaletteState.kind === "migrated" ? resolveMigratedRuntimePaletteState(runtimePaletteState) : null;
194213
- const palette = resolvedRuntimePalette?.ok === false ? {
194214
- kind: "invalid",
194215
- reason: resolvedRuntimePalette.error.kind
194216
- } : paletteSelectionSnapshotFromRuntime(runtimePaletteState);
194217
193289
  const compiled = compileSiteThemeFromSelections({
194218
193290
  siteStyle,
194219
193291
  buttonStyleSelection: input.initialSelections.buttonStyleSelection,
194220
- resolvedPalette: resolvedRuntimePalette?.ok ? resolvedRuntimePalette.resolved : resolvedPaletteForPreview(palette, siteStyle),
194221
- typography: input.theme?.typography ?? siteStyle.typography,
193292
+ palette: theme.palette,
193293
+ typography: theme.typography,
194222
193294
  compilationPlan: replaceSiteStyleCompilationPlan(sharedSelectionInputs(input))
194223
193295
  });
194224
193296
  return {
@@ -194230,7 +193302,7 @@ function resolveStyleConfiguratorInitialSnapshot(input) {
194230
193302
  headerLookId: compiled.requestedSelections.headerLookId,
194231
193303
  footerLookId: compiled.requestedSelections.footerLookId,
194232
193304
  buttonStyleSelection: compiled.resolvedSelections.buttonStyleSelection,
194233
- palette,
193305
+ palette: theme.palette,
194234
193306
  typography: compiled.theme.typography
194235
193307
  };
194236
193308
  }
@@ -194368,6 +193440,96 @@ function hasLogoInHeaderSelectionContext(context) {
194368
193440
  return logo.shape !== "none" && logo.shape !== "text-only";
194369
193441
  }
194370
193442
  //#endregion
193443
+ //#region ../preview-next/src/client/preview/siteStylePreviewPlanner.ts
193444
+ function deriveSiteStylePreviewUpdate(baseTheme, baseSelection) {
193445
+ return {
193446
+ kind: "derive-update",
193447
+ baseTheme,
193448
+ baseSelection
193449
+ };
193450
+ }
193451
+ function planSiteStylePreviewChange(input) {
193452
+ const compiled = compileSiteThemeFromSelections({
193453
+ siteStyle: input.siteStyle,
193454
+ buttonStyleSelection: input.selection.buttonStyleSelection,
193455
+ palette: input.selection.palette,
193456
+ typography: input.selection.typography,
193457
+ compilationPlan: compilationPlanForPreview(input)
193458
+ });
193459
+ return {
193460
+ themeOverlay: compiled.theme,
193461
+ resolvedSelections: {
193462
+ ...compiled.resolvedSelections,
193463
+ headerLayoutId: compiled.resolvedSelections.headerLayoutId ?? input.selection.headerLayoutId ?? input.siteStyle.defaultHeaderSelection.layoutId,
193464
+ headerStyleId: compiled.resolvedSelections.headerStyleId ?? input.selection.headerStyleId ?? input.siteStyle.defaultHeaderSelection.styleId
193465
+ },
193466
+ chromeSelection: {
193467
+ headerLookId: input.selection.headerLookId,
193468
+ footerLookId: input.selection.footerLookId
193469
+ },
193470
+ warnings: compiled.warnings
193471
+ };
193472
+ }
193473
+ function compilationPlanForPreview(input) {
193474
+ const replacement = () => replaceSiteStyleCompilationPlan({
193475
+ headerLayoutId: input.selection.headerLayoutId,
193476
+ headerStyleId: input.selection.headerStyleId,
193477
+ headerLookId: input.selection.headerLookId,
193478
+ footerLookId: input.selection.footerLookId,
193479
+ headerSelectionContext: input.headerSelectionContext
193480
+ });
193481
+ if (input.compilation.kind === "replace-site-style") return replacement();
193482
+ const baseTheme = input.compilation.baseTheme;
193483
+ if (!baseTheme) return replacement();
193484
+ if (input.compilation.kind === "edit-chrome") return updateCompilationPlan({
193485
+ baseTheme,
193486
+ selection: input.selection,
193487
+ headerSelectionContext: input.headerSelectionContext,
193488
+ recompileHeader: input.compilation.surface === "header",
193489
+ applyFooterLook: input.compilation.surface === "footer"
193490
+ });
193491
+ if (input.compilation.baseSelection.siteStyleId !== input.selection.siteStyleId) return replacement();
193492
+ return updateCompilationPlan({
193493
+ baseTheme,
193494
+ selection: input.selection,
193495
+ headerSelectionContext: input.headerSelectionContext,
193496
+ recompileHeader: headerSelectionChanged(input.compilation.baseSelection, input.selection),
193497
+ applyFooterLook: input.compilation.baseSelection.footerLookId !== input.selection.footerLookId
193498
+ });
193499
+ }
193500
+ function updateCompilationPlan(input) {
193501
+ const selection = {
193502
+ headerLookId: input.selection.headerLookId,
193503
+ headerLayoutId: input.selection.headerLayoutId ?? null,
193504
+ headerStyleId: input.selection.headerStyleId ?? null
193505
+ };
193506
+ return {
193507
+ kind: "update-selection",
193508
+ header: input.recompileHeader ? {
193509
+ kind: "recompile",
193510
+ selection,
193511
+ context: completeHeaderSelectionContext(input.headerSelectionContext),
193512
+ brandPresentation: { kind: "apply-logo-context" }
193513
+ } : {
193514
+ kind: "preserve",
193515
+ header: input.baseTheme.header,
193516
+ selection
193517
+ },
193518
+ footer: input.applyFooterLook ? {
193519
+ kind: "apply-look",
193520
+ footer: input.baseTheme.footer,
193521
+ footerLookId: input.selection.footerLookId
193522
+ } : {
193523
+ kind: "preserve",
193524
+ footer: input.baseTheme.footer,
193525
+ footerLookId: input.selection.footerLookId
193526
+ }
193527
+ };
193528
+ }
193529
+ function headerSelectionChanged(base, previewed) {
193530
+ return base.headerLookId !== previewed.headerLookId || base.headerLayoutId !== previewed.headerLayoutId || base.headerStyleId !== previewed.headerStyleId;
193531
+ }
193532
+ //#endregion
194371
193533
  //#region ../preview-next/src/client/preview/siteChromeSavePlan.ts
194372
193534
  function buildSiteChromeSavePlan({ surface, selectionPersistence, siteStyle, selection, baseTheme, headerSelectionContext, headerBrandPreferences, headerNavPreferences, backgroundPreferences, themeId, selectionId, baseSelectionUpdatedAt }) {
194373
193535
  const compiled = planSiteStylePreviewChange({
@@ -194413,27 +193575,6 @@ function siteChromeSavePlanBodyForBaseRevision(plan, baseSelectionUpdatedAt) {
194413
193575
  }
194414
193576
  //#endregion
194415
193577
  //#region ../preview-next/src/client/preview/styleConfiguratorApplyPayload.ts
194416
- function paletteColorsFromTheme(theme) {
194417
- const parsed = paletteColorsFromEntries(theme.palette.colors);
194418
- if (!parsed.ok) throw new Error("Apply response contains invalid palette colors");
194419
- return parsed.colors;
194420
- }
194421
- function paletteModeFromTheme(theme) {
194422
- const mode = theme.palette.meta?.mode;
194423
- if (mode !== "light" && mode !== "dark") throw new Error("Apply response contains invalid palette mode");
194424
- return mode;
194425
- }
194426
- function planPaletteApplyCommand(input) {
194427
- const palette = input.previewed.palette;
194428
- if (palette.kind === "invalid") return {
194429
- ok: false,
194430
- error: "invalid-palette-state"
194431
- };
194432
- return {
194433
- ok: true,
194434
- command: planPaletteCommand(palette.editor)
194435
- };
194436
- }
194437
193578
  function buildApplySiteStyleSelectionBody(input) {
194438
193579
  const styleChanged = input.base.siteStyleId !== input.previewed.siteStyleId;
194439
193580
  const changes = [];
@@ -194445,17 +193586,10 @@ function buildApplySiteStyleSelectionBody(input) {
194445
193586
  kind: "set-button-style",
194446
193587
  buttonStyleSelection: input.previewed.buttonStyleSelection
194447
193588
  });
194448
- if (styleChanged || !paletteSelectionSnapshotsEqual(input.base.palette, input.previewed.palette)) {
194449
- const palettePlan = planPaletteApplyCommand(input);
194450
- if (!palettePlan.ok) return {
194451
- ok: false,
194452
- error: palettePlan.error
194453
- };
194454
- changes.push({
194455
- kind: "set-palette",
194456
- command: palettePlan.command
194457
- });
194458
- }
193589
+ if (styleChanged || !themePalettesEqual(input.base.palette, input.previewed.palette)) changes.push({
193590
+ kind: "set-palette",
193591
+ palette: input.previewed.palette
193592
+ });
194459
193593
  if (styleChanged || !typographyObjectsEqual(input.base.typography, input.previewed.typography)) changes.push({
194460
193594
  kind: "set-typography",
194461
193595
  typography: input.previewed.typography
@@ -194493,7 +193627,7 @@ function selectionSnapshotFromApplySiteStyleSelectionResponse(saved, fallback) {
194493
193627
  selectionVersion: saved.selectionVersion,
194494
193628
  selectionUpdatedAt: saved.selectionUpdatedAt ?? fallback.selectionUpdatedAt ?? null,
194495
193629
  buttonStyleSelection: saved.buttonStyleSelection,
194496
- palette: paletteSnapshotFromApplyResponse(saved),
193630
+ palette: saved.theme.palette,
194497
193631
  typography: saved.theme.typography,
194498
193632
  headerLookId: saved.headerLookId,
194499
193633
  headerLayoutId: saved.headerLayoutId ?? fallback.headerLayoutId,
@@ -194501,29 +193635,6 @@ function selectionSnapshotFromApplySiteStyleSelectionResponse(saved, fallback) {
194501
193635
  footerLookId: saved.footerLookId
194502
193636
  };
194503
193637
  }
194504
- function paletteSnapshotFromApplyResponse(saved) {
194505
- if (saved.activePaletteSelection.kind === "curated") return paletteSelectionSnapshotFromRuntime({
194506
- kind: "migrated",
194507
- authority: "curated",
194508
- selection: saved.activePaletteSelection,
194509
- colors: paletteColorsFromTheme(saved.theme),
194510
- mode: paletteModeFromTheme(saved.theme),
194511
- sitePaletteVersion: null
194512
- });
194513
- const version = parseSitePaletteVersion(saved.activeSitePaletteVersion);
194514
- if (version === null) return {
194515
- kind: "invalid",
194516
- reason: "invalid-active-site-palette-version"
194517
- };
194518
- return paletteSelectionSnapshotFromRuntime({
194519
- kind: "migrated",
194520
- authority: "site",
194521
- selection: saved.activePaletteSelection,
194522
- colors: paletteColorsFromTheme(saved.theme),
194523
- mode: paletteModeFromTheme(saved.theme),
194524
- sitePaletteVersion: version
194525
- });
194526
- }
194527
193638
  //#endregion
194528
193639
  //#region ../preview-next/src/client/preview/siteStyleHistoryState.ts
194529
193640
  function createSiteStyleHistoryState(selection) {
@@ -194629,7 +193740,7 @@ function confirmSiteStyleHistoryMutation(state, persisted) {
194629
193740
  case "idle":
194630
193741
  case "failed":
194631
193742
  case "stale": return state;
194632
- default: return assertNever$8(state.mutation, "Unhandled site style history mutation");
193743
+ default: return assertNever$5(state.mutation, "Unhandled site style history mutation");
194633
193744
  }
194634
193745
  }
194635
193746
  function rejectSiteStyleHistoryMutation(state, failure) {
@@ -194665,7 +193776,7 @@ function siteStyleHistoryFailureMessage(state) {
194665
193776
  case "idle":
194666
193777
  case "undoing":
194667
193778
  case "redoing": return null;
194668
- default: return assertNever$8(state.mutation, "Unhandled site style history mutation");
193779
+ default: return assertNever$5(state.mutation, "Unhandled site style history mutation");
194669
193780
  }
194670
193781
  }
194671
193782
  function skipReasonForHistoryMutation$1(state, command) {
@@ -194722,14 +193833,14 @@ function selectPreviewDesignHistoryDomain(state, command, capabilities) {
194722
193833
  switch (command) {
194723
193834
  case "undo": return domain.canUndo ? domainId : null;
194724
193835
  case "redo": return domain.canRedo ? domainId : null;
194725
- default: return assertNever$8(command, "Unhandled preview design history command");
193836
+ default: return assertNever$5(command, "Unhandled preview design history command");
194726
193837
  }
194727
193838
  }
194728
193839
  function previewDesignHistoryDomainForCommand(state, command) {
194729
193840
  switch (command) {
194730
193841
  case "undo": return state.past[state.past.length - 1] ?? null;
194731
193842
  case "redo": return state.future[0] ?? null;
194732
- default: return assertNever$8(command, "Unhandled preview design history command");
193843
+ default: return assertNever$5(command, "Unhandled preview design history command");
194733
193844
  }
194734
193845
  }
194735
193846
  //#endregion
@@ -194821,7 +193932,7 @@ function quickControlHistoryEntryFromSelectionChange(previous, next, target) {
194821
193932
  previous: previous.footerLookId,
194822
193933
  next: next.footerLookId
194823
193934
  };
194824
- default: return assertNever$8(target, "Unhandled site chrome quick-control target");
193935
+ default: return assertNever$5(target, "Unhandled site chrome quick-control target");
194825
193936
  }
194826
193937
  }
194827
193938
  function quickControlHistoryEntryFromBrandPreferenceChange(previous, next, target) {
@@ -194836,7 +193947,7 @@ function quickControlHistoryEntryFromBrandPreferenceChange(previous, next, targe
194836
193947
  previous: previous.logoSize,
194837
193948
  next: next.logoSize
194838
193949
  };
194839
- default: return assertNever$8(target, "Unhandled site chrome brand quick-control target");
193950
+ default: return assertNever$5(target, "Unhandled site chrome brand quick-control target");
194840
193951
  }
194841
193952
  }
194842
193953
  function quickControlHistoryEntryFromBackgroundPreferenceChange(previous, next, target) {
@@ -194851,7 +193962,7 @@ function quickControlHistoryEntryFromBackgroundPreferenceChange(previous, next,
194851
193962
  previous: previous.footer,
194852
193963
  next: next.footer
194853
193964
  };
194854
- default: return assertNever$8(target, "Unhandled site chrome background quick-control target");
193965
+ default: return assertNever$5(target, "Unhandled site chrome background quick-control target");
194855
193966
  }
194856
193967
  }
194857
193968
  function quickControlHistoryEntryFromNavPreferenceChange(previous, next, target) {
@@ -194866,7 +193977,7 @@ function quickControlHistoryEntryFromNavPreferenceChange(previous, next, target)
194866
193977
  previous: previous.fontSize,
194867
193978
  next: next.fontSize
194868
193979
  };
194869
- default: return assertNever$8(target, "Unhandled site chrome nav quick-control target");
193980
+ default: return assertNever$5(target, "Unhandled site chrome nav quick-control target");
194870
193981
  }
194871
193982
  }
194872
193983
  function beginSiteChromeQuickControlHistoryUndo(state) {
@@ -194918,7 +194029,7 @@ function confirmSiteChromeQuickControlHistoryMutation(state, persisted) {
194918
194029
  case "idle":
194919
194030
  case "failed":
194920
194031
  case "stale": return state;
194921
- default: return assertNever$8(state.mutation, "Unhandled site chrome quick-control history mutation");
194032
+ default: return assertNever$5(state.mutation, "Unhandled site chrome quick-control history mutation");
194922
194033
  }
194923
194034
  }
194924
194035
  function rejectSiteChromeQuickControlHistoryMutation(state, failure) {
@@ -194961,7 +194072,7 @@ function siteChromeQuickControlHistoryFailureMessage(state) {
194961
194072
  case "idle":
194962
194073
  case "undoing":
194963
194074
  case "redoing": return null;
194964
- default: return assertNever$8(state.mutation, "Unhandled site chrome quick-control history mutation");
194075
+ default: return assertNever$5(state.mutation, "Unhandled site chrome quick-control history mutation");
194965
194076
  }
194966
194077
  }
194967
194078
  function beginSiteChromeQuickControlHistoryMutation(state, mutationKind, entry) {
@@ -195062,7 +194173,7 @@ function quickControlReplayPlanForEntry(current, entry, command) {
195062
194173
  footer: command === "undo" ? entry.previous : entry.next
195063
194174
  }
195064
194175
  };
195065
- default: return assertNever$8(entry, "Unhandled site chrome quick-control history entry");
194176
+ default: return assertNever$5(entry, "Unhandled site chrome quick-control history entry");
195066
194177
  }
195067
194178
  }
195068
194179
  function skipReasonForHistoryMutation(state, command) {
@@ -195114,7 +194225,7 @@ function siteChromeQuickControlHistoryEntryEquals(left, right) {
195114
194225
  case "header-menu-font-size": return right.kind === left.kind && left.previous === right.previous && left.next === right.next;
195115
194226
  case "header-background":
195116
194227
  case "footer-background": return right.kind === left.kind && siteChromeBackgroundOverrideEquals(left.previous, right.previous) && siteChromeBackgroundOverrideEquals(left.next, right.next);
195117
- default: return assertNever$8(left, "Unhandled site chrome quick-control history entry");
194228
+ default: return assertNever$5(left, "Unhandled site chrome quick-control history entry");
195118
194229
  }
195119
194230
  }
195120
194231
  function headerBrandPreferencesEqual(left, right) {
@@ -195770,7 +194881,7 @@ function headerBrandSizeControlLabel(state) {
195770
194881
  case "title-only": return "Site title size";
195771
194882
  case "auto":
195772
194883
  case "logo-plus-title": return "Brand size";
195773
- default: return assertNever$8(state.preferences.brandDisplay, "Unhandled header brand display mode");
194884
+ default: return assertNever$5(state.preferences.brandDisplay, "Unhandled header brand display mode");
195774
194885
  }
195775
194886
  }
195776
194887
  function saveRequestFromQuickControlReplayPlan(plan, mutation) {
@@ -195808,7 +194919,7 @@ function saveRequestFromQuickControlReplayPlan(plan, mutation) {
195808
194919
  mutation
195809
194920
  }
195810
194921
  };
195811
- default: return assertNever$8(plan, "Unhandled site chrome quick-control replay plan");
194922
+ default: return assertNever$5(plan, "Unhandled site chrome quick-control replay plan");
195812
194923
  }
195813
194924
  }
195814
194925
  function selectionSnapshotFromSiteChromeSaveResponse({ saved, fallback, savePlan }) {
@@ -195851,4 +194962,4 @@ function useSiteChromeCustomizeOptional() {
195851
194962
  return useContext(SiteChromeCustomizeContext);
195852
194963
  }
195853
194964
  //#endregion
195854
- export { beginAutosaveBatch as $, resolveRuntimeEventPricing as $a, toScheduledBookingDateTime as $c, buildPaletteLibraryReadModel as $i, layoutTransforms as $n, renderAudio as $o, reduceCommerceCart as $r, SearchInput as $s, redoHistory as $t, deriveStyleConfiguratorCapabilities as A, bindingSchema as Aa, createCollection as Ac, designRuntimeRulesForTheme as Ai, Redo2 as Al, DEFAULT_LAUNCH_READINESS_INPUT as An, isInlineTextEmpty as Ao, giftingBlockDefinition as Ar, mergeStyles as As, MediaField as At, previewButtonStyle as B, formatEventPrice as Ba, parseFooterModuleId as Bc, sectionTransitionFamilies as Bi, GripVertical as Bl, escapeStyleContent as Bn, ClockIcon as Bo, buildShopInteractiveIslandProps as Br, unmapValueFromSelect as Bs, BlockEditor as Bt, usePreviewThemeOverlay as C, buildEventRuntimeFilters as Ca, DropdownMenuContent as Cc, applyCompiledRuntimeFieldsToContent as Ci, Ticket as Cl, MediaEditorContextProvider as Cn, parseGeneratedIconSetId as Co, findPreSelectedEvent as Cr, pageDesignEditorBackgroundOverrideOwner as Cs, InlineTextField as Ct, committedPaletteForSnapshot as D, normalizeOptionalId as Da, DropdownMenuTrigger as Dc, planPageDesignLayoutLookCompatibility as Di, Smartphone as Dl, getPageDesignEditorState as Dn, logger$1 as Do, WIZARD_STEPS as Dr, normalizeBoxStylesCardVariant as Ds, ButtonVariantField as Dt, cancelPreview as E, normalizeCsvString as Ea, DropdownMenuSeparator as Ec, retargetCompiledRuntimeFieldsForContentAdjacency as Ei, Sparkles as El, applyPageDesignEditorAction as En, isRecord$10 as Eo, resolveRegistrationTarget as Er, ICON_CONFIG as Es, EntryPickerWidgetProvider as Et, markApplySaving as F, normalizeLocationMapProps as Fa, Button$1 as Fc, GRADIENT_PRESETS as Fi, Monitor as Fl, containerResponsiveThemeCss as Fn, ArrowDownIcon as Fo, cartBlockDefinition as Fr, SdkConfigProvider as Fs, RichTextWidgetProvider as Ft, previewSitePalette as G, getContainerClass as Ga, formatBookingDateTime as Gc, BACKGROUND_BODY_TEXT_MIN_CONTRAST_RATIO as Gi, CircleMinus as Gl, siteFooterManifest as Gn, FileTextIcon as Go, formatCommercePrice as Gr, TooltipTrigger as Gs, classifyHistoryShortcut as Gt, previewFooterLook as H, formatEventTeacherLine as Ha, unsafeAsEditorBlockValues as Hc, sectionTransitionVariantForBoundaryOptionId as Hi, EllipsisVertical as Hl, generateDefaultAccordionSystem as Hn, FileArchiveIcon as Ho, buildCartDisplay as Hr, useField as Hs, prepareBlockEditorManifest as Ht, openRow as I, toLocationMapHydrationProps as Ia, cva as Ic, GRADIENT_PRESET_IDS as Ii, Minus as Il, createCustomBlockRegistry as In, ArrowRightIcon as Io, buildCartInteractiveIslandProps as Ir, useSdkConfig as Is, EditorProvider as It, resetTypographyToSaved as J, resolveEventLinkProps as Ja, formatLocalScheduleDate as Jc, foregroundTokenForBackgroundAppearanceColorToken as Ji, ChevronDown as Jl, SITE_OVERLAY_HEADER_CLEARANCE_CSS_VAR as Jn, ImagePresets as Jo, buildPassCartItem as Jr, SelectItem as Js, useOptionalEditorUiStoreInstance as Jt, previewSiteStyle as K, groupEventsByDate as Ka, formatBookingInstant as Kc, backgroundAppearanceColorTokenNames as Ki, ChevronRight as Kl, siteHeaderManifest as Kn, MinusIcon as Ko, formatInterval as Kr, Select$1 as Ks, useEditorUiStore as Kt, paletteMutationCapability as L, formatDate as La, useComposedRefs as Lc, getGradientPreset as Li, Maximize2 as Ll, buildThemeRuntime as Ln, ChevronDownIcon as Lo, buildCheckoutInteractiveIslandProps as Lr, hasEmptyOption as Ls, useEditor$1 as Lt, isPreviewingChange as M, eventCalendarListLayoutCompatibleDisplayModeValues as Ma, createContextScope as Mc, surfaceResolutionContextFromTheme as Mi, Pencil as Ml, AMBIENT_BACKGROUND_ROLES as Mn, canonicalizePersistedBlockButtonRole as Mo, courseRegistrationBlockDefinition as Mr, textColorStyle as Ms, ReferenceWidgetProvider as Mt, markApplyFailed as N, eventCalendarListLayoutOptions as Na, composeEventHandlers as Nc, findFooterLook as Ni, PenLine as Nl, isSupportedLoaderEndpoint as Nn, isBlockButtonRole as No, buildCourseRegistrationInteractiveIslandProps as Nr, getFieldIntent as Ns, useRichTextImagePicker as Nt, createPalette as O, el as Oa, useId$1 as Oc, componentRuntimeRulesForTheme as Oi, SlidersHorizontal as Ol, listEntryPageContentSlots as On, coerceInlineTextWithFallback as Oo, getStepNumber as Or, normalizeCardVariantRole as Os, ButtonWidgetProvider as Ot, markApplySaved as P, buildGoogleMapsDirectionsUrl as Pa, Primitive as Pc, gradientToCss as Pi, Palette as Pl, ThemeScope as Pn, getIconComponent as Po, checkoutBlockDefinition as Pr, isHeaderField as Ps, RichTextField as Pt, toggleRow as Q, getLocalMinuteOfDay as Qa, toBookingTimeZone as Qc, findCuratedPalette as Qi, mediaTransforms as Qn, getCurrentResolveImageUrlContext as Qo, productItemKey as Qr, CalloutDescription as Qs, pushHistoryEntry as Qt, palettePreviewProjection as R, formatEventCompactDateRail as Ra, cn$2 as Rc, parseGradientPresetId as Ri, LoaderCircle as Rl, DEFAULT_THEME_RESPONSIVE_MODE as Rn, CircleMinusIcon as Ro, buildProductDetailInteractiveIslandProps as Rr, mapCurrentValueForSelect as Rs, LinkField as Rt, PreviewThemeOverlayProvider as S, eventCollectionSourceSchemaShape as Sa, DropdownMenu as Sc, formatSiteChromeBackgroundTokenLabel as Si, TriangleAlert as Sl, MediaEditor as Sn, parseGeneratedIconAssetId as So, findEventByOccurrenceId as Sr, isThemeV2NormalEditorRawStyleFieldName as Ss, OfferingsPreviewWidgetProvider as St, applyTypographyDraftPatch as T, normalizeCsvIds as Ta, DropdownMenuLabel as Tc, retargetCompiledBoundaryRuntimeForContentAdjacency as Ti, Star as Tl, useApiMediaUploader as Tn, isObjectRecord$1 as To, resolveEventRequiresPayment as Tr, assertNever$8 as Ts, EntryPickerField as Tt, previewHeaderLayout as U, formatTime as Ua, addLocalScheduleDays as Uc, getHeaderLayout as Ui, CreditCard as Ul, getBlockDefinition as Un, FileAudioIcon as Uo, buildProductCardDisplay as Ur, Tooltip as Us, stripTopLevelRoutingUi as Ut, previewCuratedPalette as V, formatEventPriceDisplay as Va, unsafeAsEditorBlockId as Vc, sectionTransitionFamilyForBoundaryOptionId as Vi, Eye as Vl, mergeContentWithBlockStyleOverrides as Vn, DownloadIcon as Vo, getShopDisplayForItems as Vr, FieldFrame as Vs, hideThemeV2RawStyleFields as Vt, previewHeaderStyle as W, getCardOrientation as Wa, formatBookingDate as Wc, getHeaderStyle as Wi, CirclePlus as Wl, projectRecurringSchedule as Wn, FileSpreadsheetIcon as Wo, buildProductDetailDisplay as Wr, TooltipContent as Ws, getBlockManifestFromSdkConfig as Wt, styleConfiguratorHistoryEntryForPersistedSelection as X, getEventAvailabilityStatus as Xa, parseBookingLocalDate as Xc, defaultThemeTokens as Xi, ArrowDown as Xl, visibleHeaderClearancePx as Xn, buildResolveImageUrlContext as Xo, deriveCommerceCheckoutState as Xr, SelectValue as Xs, canUndoHistory as Xt, setPaletteColors as Y, getEventAvailability as Ya, getBookingLocalDateKey as Yc, parseBackgroundAppearanceColorToken as Yi, Check as Yl, planSiteOverlayHeaderClearance as Yn, MediaPlaceholder as Yo, buildProductCartItem as Yr, SelectTrigger as Ys, canRedoHistory as Yt, syncStyleConfiguratorState as Z, getLocalDateKey as Za, resolveBookingTimeZoneId as Zc, curatedPalettes as Zi, __exportAll as Zl, contentTransforms as Zn, computeMediaTransformStyle as Zo, parseStoredCommerceCartState as Zr, Callout as Zs, createHistoryState as Zt, planSiteChromeLookSelection as _, buildEventCollectionDisplay as _a, Content$1 as _c, BACKGROUND_POSITION_PRESET_VALUES as _i, err as _l, createManifestFormAdapter as _n, resolveFeatureCardGeneratedIconSizePx as _o, formBlockDefinition as _r, parseThemeForPersistence as _s, createSiteOptionApiLoader as _t, previewDesignHistoryDomainForCommand as a, ctaButton as aa, TabsContent as ac, blogFeaturedPostFragment as ai, publicEventScalarPrice as al, createRoutingHelpers as an, defineInteractiveIslandMetaKeys as ao, NAV_DROPDOWN_SHIFT_PROPERTY as ar, SECTION_BACKGROUND_MIN_SOURCE_WIDTH as as, createOptimisticActionRunner as at, PreviewDesignCoordinatorProvider as b, eventCollectionDisplaySchemaShape as ba, createCollapsibleScope as bc, resolveSurfaceForegroundStyles as bi, Upload as bl, evaluateVisibility as bn, parseBlockIconValue as bo, buildEventRegistrationInteractiveIslandProps as br, resolveOnColorForThemeToken as bs, SiteOptionWidgetProvider as bt, selectionSnapshotFromApplySiteStyleSelectionResponse as c, OFFERINGS_PREVIEW_DEFAULT_FAILED_MESSAGE as ca, Dialog as cc, formCopyFragment as ci, assertNever$9 as cl, isAdapterReferenceKind as cn, defineProgressiveBlockRuntime as co, productDetailBlockDefinition as cr, siblingPath$1 as cs, PreviewRichTextEditor as ct, PREVIEW_DESIGN_REFRESH_ERROR_MESSAGE as d, normalizeOfferingsPreviewItemLimit as da, DialogFooter as dc, ctaCopyFragment as di, parseSiteId as dl, resolvePageRouteSlug as dn, markEditableSurfaceForwarding as do, eventListingBlockDefinition as dr, resolveButtonStyleSelection as ds, ContentFieldsForm as dt, paletteColorEntries as ea, Popover as ec, richTextFragment as ei, parseEventPageSurfaceSubject as el, undoHistory as en, normalizeEventRegistrationPageSurfaceSubject as eo, uiTransforms as er, renderVideo as es, confirmAutosaveBatch as et, PREVIEW_DESIGN_SAVE_ERROR_MESSAGE as f, resolveOfferingsPreviewCoursePath as fa, DialogHeader as fc, heroCtaRowFragment as fi, unsafeAsAppointmentResourceId as fl, resolveContentTitle as fn, splitPositioningClasses as fo, buildEventListingInteractiveIslandProps as fr, updateButtonStyleSelectionChoice as fs, useUISelector as ft, cycleableSiteChromeOptions as g, resolveSpacing as ga, CollapsibleTrigger as gc, defineFragment as gi, unsafeAsPassId as gl, ManifestForm as gn, FEATURE_CARD_ICON_TREATMENTS as go, buildEventCalendarListingRender as gr, themeButtonClassName as gs, useEntryEditorController as gt, cycleSiteChromeLookId as h, isSemanticSpacing as ha, CollapsibleContent as hc, bodyCopyFragment as hi, unsafeAsFormId as hl, validateBlockManifestIssues as hn, mediaSchema as ho, buildEventCalendarListingDisplay as hr, parseThemeButtonVariantId as hs, useEntryController as ht, usePreviewDesignHistoryOrder as i, runTransforms as ia, Tabs as ic, faqHeadingFragment as ii, publicEventPricingType as il, useDebouncedLatestSave as in, createInteractiveIslandCodec as io, useImageResolveContextOptional as ir, setContextResolveImageUrlContext as is, rejectAutosaveBatch as it, dismissWarnings as j, previewStageSchema as ja, useControllableState as jc, getCuratedSiteStyle as ji, Plus as jl, deriveLaunchReadiness as jn, parseInlineTextFromUnknown as jo, buildGiftingInteractiveIslandProps as jr, rgbColorValue as js, ReferenceField as jt, createStyleConfiguratorState as k, when as ka, useDirection as kc, curatedSiteStyles as ki, RotateCcw as kl, decodePublicProductCategorySelectorQuery as kn, inlineTextToPlainText as ko, getWizardStepsForContext as kr, backgroundColorStyle as ks, FileField as kt, resolveStyleConfiguratorInitialSnapshot as l, OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS as la, DialogContent as lc, testimonialsCarouselFragment as li, expectParsedBrandedId as ll, parseReferenceKind as ln, EDITABLE_SURFACE_FORWARDING_PROP as lo, newsletterSignupBlockDefinition as lr, buttonStyleSelectionParameterValue as ls, PreviewInlineTextEditor as lt, buildSiteChromeLookModels as m, resolveOfferingsPreviewGroups as ma, Collapsible as mc, heroCopyFragment as mi, unsafeAsCustomerPassId as ml, usePalette as mn, PUBLIC_DOWNLOAD_MEDIA_TYPES as mo, buildEventCalendarInteractiveIslandProps as mr, AFFORDANCE_SUPPRESS_CLASS as ms, EntryControllerProvider as mt, useSiteChromeCustomizeOptional as n, paletteColorsSchema as na, PopoverTrigger as nc, cardFragment as ni, publicEventPricingCurrency as nl, recordsEqual as nn, blockBookingPaymentTermsSchema as no, createManifestValidator as nr, resolveMediaNodeResponsiveImage as ns, enqueueTransaction as nt, selectPreviewDesignHistoryDomain as o, OFFERINGS_PREVIEW_DEFAULT_BUTTON_TEXT as oa, TabsList as oc, singleButtonFragment as oi, publicEventTicketTypes as ol, createSnapshotFromPageRecord as on, createZodCodec as oo, shopBlockDefinition as or, attachRenderableMediaAssetFields as os, resolvePreviewSidebarTab as ot, reportPreviewDesignError as p, resolveOfferingsPreviewGroupCta as pa, DialogTitle as pc, ctaRowFragment as pi, unsafeAsAppointmentServiceId as pl, PaletteProvider as pn, planSiteChromePlacement as po, eventCalendarBlockDefinition as pr, buttonStyleSelectionKey as ps, EditableBlockProvider as pt, reconcilePaletteLibraryActive as q, resolveEventCta as qa, formatBookingTime as qc, backgroundAppearanceQuickColorTokenNames as qi, ChevronLeft as ql, SITE_CHROME_VISIBLE_HEADER_SELECTOR as qn, PlusIcon as qo, EMPTY_COMMERCE_CART_STATE as qr, SelectContent as qs, useEditorUiStoreInstance as qt, PreviewDesignHistoryOrderProvider as r, createTransformRegistry as ra, Input as rc, faqAccordionFragment as ri, publicEventPricingMode as rl, useMultiAutosave as rn, buildInteractiveIslandProps as ro, ImageResolveContextProvider as rr, resolveMediaStorageUrl as rs, idleEditorTransactionQueueState as rt, buildApplySiteStyleSelectionBody as s, OFFERINGS_PREVIEW_DEFAULT_EMPTY_MESSAGE as sa, TabsTrigger as sc, formEmbedFragment as si, formatCurrencyAmount as sl, BUILT_IN_REFERENCE_KINDS as sn, defineClientOwnedBlockRuntime as so, productListBlockDefinition as sr, getAtPath as ss, FooterComposerPanel as st, SiteChromeCustomizeProvider as t, paletteColorsEqual as ta, PopoverContent as tc, headingFragment as ti, formatBookingPriceDisplay as tl, unsafeAsLinkedContentEntryId as tn, resolveEventRegistrationScopedEvents as to, formattingTransforms as tr, resolveImageUrlWithContext as ts, deriveTransactionCapabilities as tt, PREVIEW_DESIGN_LOAD_ERROR_MESSAGE as u, buildOfferingsPreviewRenderStates as ua, DialogDescription as uc, testimonialsHeadingFragment as ui, parseMediaAssetId as ul, deriveRouteMetadataPresentation as un, composeHeaderSectionWrapperClassName as uo, buildNewsletterFormInteractiveIslandProps as ur, findButtonStyleRecipe as us, PreviewTextEditor as ut, deriveSiteStylePreviewUpdate as v, buildEventCollectionHydration as va, Root$3 as vc, getAnchorClasses as vi, ok$1 as vl, createManifestValidation as vn, shouldReserveFeatureCardIconZone as vo, buildFormInteractiveIslandProps as vr, getTextColorForBackground as vs, createSiteOptionWidgetAdapters as vt, applyResolvedSelections as w, getEventRuntimeFiltersKey as wa, DropdownMenuItem as wc, compileEditorModelRuntime as wi, Tablet as wl, useMediaEditorOptional as wn, RichTextDocSchema as wo, resolveDiscountContext as wr, asDesignBlockId as ws, IconPickerField as wt, usePreviewDesignCoordinator as x, eventCollectionHydrationSchema as xa, Surface as xc, resolveBackgroundColorValue as xi, Undo2 as xl, createStoreBackend as xn, resolveBlockIconRenderValue as xo, toRegistrationEvents as xr, resolveTokenOrCssColorValue as xs, OfferingsPreviewGroupOrderField as xt, planSiteStylePreviewChange as y, buildEventCollectionListingDisplay as ya, Trigger$3 as yc, boxStylesTransforms as yi, X as yl, FormRenderer as yn, buildGeneratedBlockIconRenderAssetLookupFromUnknown as yo, eventRegistrationBlockDefinition as yr, isCssColorLiteral as ys, SiteOptionPickerField as yt, prepareStalePaletteRetry as z, formatEventDateParts as za, clsx as zc, defaultSectionTransitionVariantForFamily as zi, Image as zl, getResponsiveScopeSpec as zn, CirclePlusIcon as zo, buildProductListInteractiveIslandProps as zr, mapOptionValueForSelect as zs, LinkWidgetProvider as zt };
194965
+ export { resolvePreviewSidebarTab as $, markEditableSurfaceForwarding as $a, expectParsedBrandedId as $c, normalizeOfferingsPreviewItemLimit as $i, shopBlockDefinition as $n, resolveButtonStyleSelection as $o, singleButtonFragment as $r, DialogContent as $s, createSnapshotFromPageRecord as $t, markApplyFailed as A, formatEventTeacherLine as Aa, parseFooterModuleId as Ac, getGradientPreset as Ai, GripVertical as Al, buildThemeRuntime as An, FileArchiveIcon as Ao, buildCheckoutInteractiveIslandProps as Ar, unmapValueFromSelect as As, useEditor$1 as At, previewSiteStyle as B, getLocalMinuteOfDay as Ba, parseBookingLocalDate as Bc, backgroundAppearanceQuickColorTokenNames as Bi, ArrowDown as Bl, SITE_CHROME_VISIBLE_HEADER_SELECTOR as Bn, getCurrentResolveImageUrlContext as Bo, EMPTY_COMMERCE_CART_STATE as Br, SelectValue as Bs, useEditorUiStoreInstance as Bt, applyResolvedSelections as C, normalizeLocationMapProps as Ca, composeEventHandlers as Cc, designRuntimeRulesForTheme as Ci, PenLine as Cl, DEFAULT_LAUNCH_READINESS_INPUT as Cn, ArrowDownIcon as Co, giftingBlockDefinition as Cr, getFieldIntent as Cs, MediaField as Ct, deriveStyleConfiguratorCapabilities as D, formatEventDateParts as Da, useComposedRefs as Dc, gradientToCss as Di, Maximize2 as Dl, ThemeScope as Dn, CirclePlusIcon as Do, checkoutBlockDefinition as Dr, hasEmptyOption as Ds, RichTextField as Dt, createStyleConfiguratorState as E, formatEventCompactDateRail as Ea, cva as Ec, findFooterLook as Ei, Minus as El, isSupportedLoaderEndpoint as En, CircleMinusIcon as Eo, buildCourseRegistrationInteractiveIslandProps as Er, useSdkConfig as Es, useRichTextImagePicker as Et, previewButtonStyle as F, resolveEventCta as Fa, formatBookingDateTime as Fc, sectionTransitionVariantForBoundaryOptionId as Fi, CircleMinus as Fl, generateDefaultAccordionSystem as Fn, PlusIcon as Fo, buildCartDisplay as Fr, TooltipTrigger as Fs, prepareBlockEditorManifest as Ft, toggleRow as G, buildInteractiveIslandProps as Ga, formatBookingPriceDisplay as Gc, createTransformRegistry as Gi, mediaTransforms as Gn, resolveMediaStorageUrl as Go, productItemKey as Gr, PopoverContent as Gs, pushHistoryEntry as Gt, setPaletteColors as H, normalizeEventRegistrationPageSurfaceSubject as Ha, toBookingTimeZone as Hc, parseBackgroundAppearanceColorToken as Hi, planSiteOverlayHeaderClearance as Hn, renderVideo as Ho, buildProductCartItem as Hr, CalloutDescription as Hs, canRedoHistory as Ht, previewCuratedPalette as I, resolveEventLinkProps as Ia, formatBookingInstant as Ic, getHeaderLayout as Ii, ChevronRight as Il, getBlockDefinition as In, ImagePresets as Io, buildProductCardDisplay as Ir, Select$1 as Is, stripTopLevelRoutingUi as It, deriveTransactionCapabilities as J, createZodCodec as Ja, publicEventPricingType as Jc, OFFERINGS_PREVIEW_DEFAULT_BUTTON_TEXT as Ji, formattingTransforms as Jn, attachRenderableMediaAssetFields as Jo, headingFragment as Jr, Tabs as Js, unsafeAsLinkedContentEntryId as Jt, beginAutosaveBatch as K, createInteractiveIslandCodec as Ka, publicEventPricingCurrency as Kc, runTransforms as Ki, layoutTransforms as Kn, setContextResolveImageUrlContext as Ko, reduceCommerceCart as Kr, PopoverTrigger as Ks, redoHistory as Kt, previewFooterLook as L, getEventAvailability as La, formatBookingTime as Lc, getHeaderStyle as Li, ChevronLeft as Ll, projectRecurringSchedule as Ln, MediaPlaceholder as Lo, buildProductDetailDisplay as Lr, SelectContent as Ls, getBlockManifestFromSdkConfig as Lt, markApplySaving as M, getCardOrientation as Ma, unsafeAsEditorBlockValues as Mc, defaultSectionTransitionVariantForFamily as Mi, EllipsisVertical as Ml, getResponsiveScopeSpec as Mn, FileSpreadsheetIcon as Mo, buildProductListInteractiveIslandProps as Mr, useField as Ms, LinkWidgetProvider as Mt, openRow as N, getContainerClass as Na, addLocalScheduleDays as Nc, sectionTransitionFamilies as Ni, CreditCard as Nl, escapeStyleContent as Nn, FileTextIcon as No, buildShopInteractiveIslandProps as Nr, Tooltip as Ns, BlockEditor as Nt, dismissWarnings as O, formatEventPrice as Oa, cn$2 as Oc, GRADIENT_PRESETS as Oi, LoaderCircle as Ol, containerResponsiveThemeCss as On, ClockIcon as Oo, cartBlockDefinition as Or, mapCurrentValueForSelect as Os, RichTextWidgetProvider as Ot, palettePreviewProjection as P, groupEventsByDate as Pa, formatBookingDate as Pc, sectionTransitionFamilyForBoundaryOptionId as Pi, CirclePlus as Pl, mergeContentWithBlockStyleOverrides as Pn, MinusIcon as Po, getShopDisplayForItems as Pr, TooltipContent as Ps, hideThemeV2RawStyleFields as Pt, createOptimisticActionRunner as Q, composeHeaderSectionWrapperClassName as Qa, assertNever$6 as Qc, buildOfferingsPreviewRenderStates as Qi, NAV_DROPDOWN_SHIFT_PROPERTY as Qn, findButtonStyleRecipe as Qo, blogFeaturedPostFragment as Qr, Dialog as Qs, createRoutingHelpers as Qt, previewHeaderLayout as R, getEventAvailabilityStatus as Ra, formatLocalScheduleDate as Rc, BACKGROUND_BODY_TEXT_MIN_CONTRAST_RATIO as Ri, ChevronDown as Rl, siteFooterManifest as Rn, buildResolveImageUrlContext as Ro, formatCommercePrice as Rr, SelectItem as Rs, classifyHistoryShortcut as Rt, usePreviewThemeOverlay as S, buildGoogleMapsDirectionsUrl as Sa, createContextScope as Sc, curatedSiteStyles as Si, Pencil as Sl, decodePublicProductCategorySelectorQuery as Sn, getIconComponent as So, getWizardStepsForContext as Sr, textColorStyle as Ss, FileField as St, cancelPreview as T, formatDate as Ta, Button$1 as Tc, surfaceResolutionContextFromTheme as Ti, Monitor as Tl, AMBIENT_BACKGROUND_ROLES as Tn, ChevronDownIcon as To, courseRegistrationBlockDefinition as Tr, SdkConfigProvider as Ts, ReferenceWidgetProvider as Tt, styleConfiguratorHistoryEntryForPersistedSelection as U, resolveEventRegistrationScopedEvents as Ua, toScheduledBookingDateTime as Uc, defaultThemeTokens as Ui, visibleHeaderClearancePx as Un, resolveImageUrlWithContext as Uo, deriveCommerceCheckoutState as Ur, SearchInput as Us, canUndoHistory as Ut, resetTypographyToSaved as V, resolveRuntimeEventPricing as Va, resolveBookingTimeZoneId as Vc, foregroundTokenForBackgroundAppearanceColorToken as Vi, __exportAll as Vl, SITE_OVERLAY_HEADER_CLEARANCE_CSS_VAR as Vn, renderAudio as Vo, buildPassCartItem as Vr, Callout as Vs, useOptionalEditorUiStoreInstance as Vt, syncStyleConfiguratorState as W, blockBookingPaymentTermsSchema as Wa, parseEventPageSurfaceSubject as Wc, curatedPalettes as Wi, contentTransforms as Wn, resolveMediaNodeResponsiveImage as Wo, parseStoredCommerceCartState as Wr, Popover as Ws, createHistoryState as Wt, idleEditorTransactionQueueState as X, defineProgressiveBlockRuntime as Xa, publicEventTicketTypes as Xc, OFFERINGS_PREVIEW_DEFAULT_FAILED_MESSAGE as Xi, ImageResolveContextProvider as Xn, siblingPath$1 as Xo, faqAccordionFragment as Xr, TabsList as Xs, useMultiAutosave as Xt, enqueueTransaction as Y, defineClientOwnedBlockRuntime as Ya, publicEventScalarPrice as Yc, OFFERINGS_PREVIEW_DEFAULT_EMPTY_MESSAGE as Yi, createManifestValidator as Yn, getAtPath as Yo, cardFragment as Yr, TabsContent as Ys, recordsEqual as Yt, rejectAutosaveBatch as Z, EDITABLE_SURFACE_FORWARDING_PROP as Za, formatCurrencyAmount as Zc, OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS as Zi, useImageResolveContextOptional as Zn, buttonStyleSelectionParameterValue as Zo, faqHeadingFragment as Zr, TabsTrigger as Zs, useDebouncedLatestSave as Zt, cycleableSiteChromeOptions as _, when as _a, DropdownMenuTrigger as _c, compileEditorModelRuntime as _i, Smartphone as _l, useMediaEditorOptional as _n, inlineTextToPlainText as _o, resolveDiscountContext as _r, paletteColorEntries as _s, IconPickerField as _t, previewDesignHistoryDomainForCommand as a, buildEventCollectionDisplay as aa, CollapsibleContent as ac, heroCtaRowFragment as ai, unsafeAsFormId as al, resolveContentTitle as an, resolveFeatureCardGeneratedIconSizePx as ao, buildEventListingInteractiveIslandProps as ar, parseThemeForPersistence as as, useUISelector as at, usePreviewDesignCoordinator as b, eventCalendarListLayoutCompatibleDisplayModeValues as ba, createCollection as bc, planPageDesignLayoutLookCompatibility as bi, Redo2 as bl, getPageDesignEditorState as bn, canonicalizePersistedBlockButtonRole as bo, WIZARD_STEPS as br, mergeStyles as bs, ButtonVariantField as bt, selectionSnapshotFromApplySiteStyleSelectionResponse as c, eventCollectionDisplaySchemaShape as ca, Root$3 as cc, bodyCopyFragment as ci, ok$1 as cl, validateBlockManifestIssues as cn, parseBlockIconValue as co, buildEventCalendarListingDisplay as cr, resolveOnColorForThemeToken as cs, useEntryController as ct, resolveStyleConfiguratorInitialSnapshot as d, buildEventRuntimeFilters as da, Surface as dc, getAnchorClasses as di, Undo2 as dl, createManifestValidation as dn, parseGeneratedIconSetId as do, buildFormInteractiveIslandProps as dr, pageDesignEditorBackgroundOverrideOwner as ds, createSiteOptionWidgetAdapters as dt, resolveOfferingsPreviewCoursePath as ea, DialogDescription as ec, formEmbedFragment as ei, parseMediaAssetId as el, BUILT_IN_REFERENCE_KINDS as en, splitPositioningClasses as eo, productListBlockDefinition as er, updateButtonStyleSelectionChoice as es, FooterComposerPanel as et, PREVIEW_DESIGN_LOAD_ERROR_MESSAGE as f, getEventRuntimeFiltersKey as fa, DropdownMenu as fc, boxStylesTransforms as fi, TriangleAlert as fl, FormRenderer as fn, RichTextDocSchema as fo, eventRegistrationBlockDefinition as fr, asDesignBlockId as fs, SiteOptionPickerField as ft, cycleSiteChromeLookId as g, el as ga, DropdownMenuSeparator as gc, applyCompiledRuntimeFieldsToContent as gi, Sparkles as gl, MediaEditorContextProvider as gn, coerceInlineTextWithFallback as go, findPreSelectedEvent as gr, normalizeCardVariantRole as gs, InlineTextField as gt, buildSiteChromeLookModels as h, normalizeOptionalId as ha, DropdownMenuLabel as hc, formatSiteChromeBackgroundTokenLabel as hi, Star as hl, MediaEditor as hn, logger$1 as ho, findEventByOccurrenceId as hr, normalizeBoxStylesCardVariant as hs, OfferingsPreviewWidgetProvider as ht, usePreviewDesignHistoryOrder as i, resolveSpacing as ia, Collapsible as ic, ctaCopyFragment as ii, unsafeAsCustomerPassId as il, resolvePageRouteSlug as in, FEATURE_CARD_ICON_TREATMENTS as io, eventListingBlockDefinition as ir, themeButtonClassName as is, ContentFieldsForm as it, markApplySaved as j, formatTime as ja, unsafeAsEditorBlockId as jc, parseGradientPresetId as ji, Eye as jl, DEFAULT_THEME_RESPONSIVE_MODE as jn, FileAudioIcon as jo, buildProductDetailInteractiveIslandProps as jr, FieldFrame as js, LinkField as jt, isPreviewingChange as k, formatEventPriceDisplay as ka, clsx as kc, GRADIENT_PRESET_IDS as ki, Image as kl, createCustomBlockRegistry as kn, DownloadIcon as ko, buildCartInteractiveIslandProps as kr, mapOptionValueForSelect as ks, EditorProvider as kt, deriveSiteStylePreviewUpdate as l, eventCollectionHydrationSchema as la, Trigger$3 as lc, defineFragment as li, X as ll, ManifestForm as ln, resolveBlockIconRenderValue as lo, buildEventCalendarListingRender as lr, resolveTokenOrCssColorValue as ls, useEntryEditorController as lt, reportPreviewDesignError as m, normalizeCsvString as ma, DropdownMenuItem as mc, resolveBackgroundColorValue as mi, Tablet as ml, createStoreBackend as mn, isRecord$10 as mo, toRegistrationEvents as mr, ICON_CONFIG as ms, OfferingsPreviewGroupOrderField as mt, useSiteChromeCustomizeOptional as n, resolveOfferingsPreviewGroups as na, DialogHeader as nc, testimonialsCarouselFragment as ni, unsafeAsAppointmentResourceId as nl, parseReferenceKind as nn, PUBLIC_DOWNLOAD_MEDIA_TYPES as no, newsletterSignupBlockDefinition as nr, AFFORDANCE_SUPPRESS_CLASS as ns, PreviewInlineTextEditor as nt, selectPreviewDesignHistoryDomain as o, buildEventCollectionHydration as oa, CollapsibleTrigger as oc, ctaRowFragment as oi, unsafeAsPassId as ol, PaletteProvider as on, shouldReserveFeatureCardIconZone as oo, eventCalendarBlockDefinition as or, getTextColorForBackground as os, EditableBlockProvider as ot, PREVIEW_DESIGN_SAVE_ERROR_MESSAGE as p, normalizeCsvIds as pa, DropdownMenuContent as pc, resolveSurfaceForegroundStyles as pi, Ticket as pl, evaluateVisibility as pn, isObjectRecord$1 as po, buildEventRegistrationInteractiveIslandProps as pr, assertNever$5 as ps, SiteOptionWidgetProvider as pt, confirmAutosaveBatch as q, defineInteractiveIslandMetaKeys as qa, publicEventPricingMode as qc, ctaButton as qi, uiTransforms as qn, SECTION_BACKGROUND_MIN_SOURCE_WIDTH as qo, richTextFragment as qr, Input as qs, undoHistory as qt, PreviewDesignHistoryOrderProvider as r, isSemanticSpacing as ra, DialogTitle as rc, testimonialsHeadingFragment as ri, unsafeAsAppointmentServiceId as rl, deriveRouteMetadataPresentation as rn, mediaSchema as ro, buildNewsletterFormInteractiveIslandProps as rr, parseThemeButtonVariantId as rs, PreviewTextEditor as rt, buildApplySiteStyleSelectionBody as s, buildEventCollectionListingDisplay as sa, Content$1 as sc, heroCopyFragment as si, err as sl, usePalette as sn, buildGeneratedBlockIconRenderAssetLookupFromUnknown as so, buildEventCalendarInteractiveIslandProps as sr, isCssColorLiteral as ss, EntryControllerProvider as st, SiteChromeCustomizeProvider as t, resolveOfferingsPreviewGroupCta as ta, DialogFooter as tc, formCopyFragment as ti, parseSiteId as tl, isAdapterReferenceKind as tn, planSiteChromePlacement as to, productDetailBlockDefinition as tr, buttonStyleSelectionKey as ts, PreviewRichTextEditor as tt, planSiteStylePreviewChange as u, eventCollectionSourceSchemaShape as ua, createCollapsibleScope as uc, BACKGROUND_POSITION_PRESET_VALUES as ui, Upload as ul, createManifestFormAdapter as un, parseGeneratedIconAssetId as uo, formBlockDefinition as ur, isThemeV2NormalEditorRawStyleFieldName as us, createSiteOptionApiLoader as ut, planSiteChromeLookSelection as v, bindingSchema as va, useId$1 as vc, retargetCompiledBoundaryRuntimeForContentAdjacency as vi, SlidersHorizontal as vl, useApiMediaUploader as vn, isInlineTextEmpty as vo, resolveEventRequiresPayment as vr, paletteColorsSchema as vs, EntryPickerField as vt, applyTypographyDraftPatch as w, toLocationMapHydrationProps as wa, Primitive as wc, getCuratedSiteStyle as wi, Palette as wl, deriveLaunchReadiness as wn, ArrowRightIcon as wo, buildGiftingInteractiveIslandProps as wr, isHeaderField as ws, ReferenceField as wt, PreviewThemeOverlayProvider as x, eventCalendarListLayoutOptions as xa, useControllableState as xc, componentRuntimeRulesForTheme as xi, Plus as xl, listEntryPageContentSlots as xn, isBlockButtonRole as xo, getStepNumber as xr, rgbColorValue as xs, ButtonWidgetProvider as xt, PreviewDesignCoordinatorProvider as y, previewStageSchema as ya, useDirection as yc, retargetCompiledRuntimeFieldsForContentAdjacency as yi, RotateCcw as yl, applyPageDesignEditorAction as yn, parseInlineTextFromUnknown as yo, resolveRegistrationTarget as yr, backgroundColorStyle as ys, EntryPickerWidgetProvider as yt, previewHeaderStyle as z, getLocalDateKey as za, getBookingLocalDateKey as zc, backgroundAppearanceColorTokenNames as zi, Check as zl, siteHeaderManifest as zn, computeMediaTransformStyle as zo, formatInterval as zr, SelectTrigger as zs, useEditorUiStore as zt };