efficient-web-builder 67.6.0 → 67.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/dist/editor/lib/document/blocks/general/HostPart/fields.d.ts +2 -0
- package/dist/editor/lib/document/blocks/general/HostPart/fields.js +1 -0
- package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
- package/dist/editor/lib/document/blocks/general/index.js +1 -1
- package/dist/editor/lib/document/blocks/shared-fields.js +1 -1
- package/dist/editor/lib/document/build-config.js +1 -1
- package/dist/editor/lib/document/controls.d.ts +5 -2
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/sections/text-layouts.js +1 -1
- package/dist/format/lib/content/box-background.d.ts +1 -0
- package/dist/format/lib/content/box-background.js +1 -1
- package/dist/format/lib/content/button-icon.d.ts +1 -1
- package/dist/format/lib/content/button-icon.js +1 -1
- package/dist/format/lib/content/card-template.d.ts +1 -0
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/count-numbers.js +1 -1
- package/dist/format/lib/content/gallery-layout.d.ts +11 -2
- package/dist/format/lib/content/gallery-layout.js +1 -1
- package/dist/format/lib/document/blocks/block-types.d.ts +4 -0
- package/dist/format/lib/document/blocks/general/HostPart/meta.d.ts +2 -0
- package/dist/format/lib/document/blocks/general/HostPart/meta.js +1 -0
- package/dist/format/lib/document/blocks/general/metas.d.ts +1 -0
- package/dist/format/lib/document/blocks/general/metas.js +1 -1
- package/dist/format/lib/document/cap-hero-groups.js +1 -1
- package/dist/format/lib/document/general-order.d.ts +1 -1
- package/dist/format/lib/document/general-order.js +1 -1
- package/dist/format/lib/document/list-search-scopes.js +1 -1
- package/dist/format/lib/document/node-lists.d.ts +9 -0
- package/dist/format/lib/document/node-lists.js +1 -0
- package/dist/format/lib/document/passes/types.d.ts +4 -0
- package/dist/format/lib/document/renamed-props.js +1 -1
- package/dist/format/lib/document/section-catalog.js +1 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +5 -0
- package/dist/format/lib/editor-words-catalogue.js +3 -3
- package/dist/format/lib/source-rules/no-hard-coded-option-rows.js +1 -1
- package/dist/format/lib/source-rules/own-key-reads.d.ts +5 -0
- package/dist/format/lib/source-rules/own-key-reads.js +9 -7
- package/dist/format/lib/source-rules/support/ts-program.d.ts +1 -0
- package/dist/format/lib/source-rules/support/ts-program.js +2 -2
- package/dist/render/components/ButtonBlock.js +1 -1
- package/dist/render/components/CardRowContext.d.ts +9 -1
- package/dist/render/components/CardRowContext.js +1 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/lib/animation/entrance.js +1 -1
- package/dist/render/lib/content/page-contents.js +1 -1
- package/dist/render/lib/document/blocks/general/HostPart/render.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/HostPart/render.js +1 -0
- package/dist/render/lib/document/blocks/general/renders.d.ts +1 -0
- package/dist/render/lib/document/blocks/general/renders.js +1 -1
- package/dist/render/lib/document/card-press-titles.js +1 -1
- package/dist/render/lib/document/head-core-boxes.js +1 -1
- package/dist/render/lib/document/passes/clickable-parts.js +1 -1
- package/dist/render/lib/document/passes/section-padding.d.ts +5 -2
- package/dist/render/lib/document/passes/section-padding.js +1 -1
- package/dist/render/lib/document/wall-labels.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 67.7.0 - 2026-11-12
|
|
4
|
+
|
|
5
|
+
From main at `2e8ecc58`: #727, #728, #725, #730, #731, #732, #733, #734. A minor: no `!`, no export is removed, the peers stay `efficient-easel` `^34.1.0` and `efficient-shell` `^12.33.0`. New exports, new icon values, one new block and optional fields, props and arguments only. No stored key or value moves.
|
|
6
|
+
|
|
7
|
+
**For hosts:**
|
|
8
|
+
- Nothing to change. A block that declares no inner padding keeps its old default (#728). Existing Button icons draw as before (#727).
|
|
9
|
+
- storefront-blocks: DetailRows, ProductGrid, Events and GalleryB can declare `innerPadding` (#728); `mapDocumentNodes` can move onto `node-lists` (#725).
|
|
10
|
+
- storefront-blocks: a lazy draw table keyed by `GeneralBlockType` (`src/render/lib/document/lazy-draws.tsx`) must add one line for `HostPart/render`, or `tsc` fails (#731). Do it in the PR that takes this release.
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **Eight more Button icons** (#727): `BUTTON_ICONS` gains `phone`, `wheel`, `chat`, `chevron-left`, `package`, `truck`, `shield-check`, `receipt-refund`.
|
|
15
|
+
- **A block declares its inner padding default** (#728): optional `BlockRender.innerPadding` and `PassBlock.innerPadding`; new export `ownPairDefault`.
|
|
16
|
+
- **One node-list walker** (#725): new format module `lib/document/node-lists` with `mapEachNode`, `mapNodeLists`, `mapPageContent` and `ListNode`. The published passes walk node lists through it.
|
|
17
|
+
- **A card part inside a copy takes no hover lift** (#730): new export `CARD_NO_LIFT_CLASS` (lib/content/box-background).
|
|
18
|
+
- **A host part a host answers inside a copy** (#731): new block `HostPart` (type `HOST_PART_TYPE` in lib/content/card-template; not offered to a merchant); optional prop `CardTemplateRows.hostParts`. A host seeds `{ type: "HostPart", props: { name, label } }` in its template and passes `hostParts`. New exports `HostParts`, `HostPartsContext`, `HostPartDrawn`, `HostPartMeta`, `HostPartRender`, `HostPartFields`; `panelNote` and `PanelNoteLine` take optional word `values`; `GENERAL_REGISTRATION_ORDER` gains a last entry.
|
|
19
|
+
- **A gallery layout has a phone value** (#734): One across on a phone. New exports `GALLERY_PHONE_LAYOUTS`, `resolveGalleryPhoneLayout`, `galleryLayoutPhoneField`; `galleryLayoutClass` and `galleryLayoutCss` take an optional phone argument.
|
|
20
|
+
- **Source rules pin an own-key exemption to one function** (#733): `OwnKeyExemption` gains optional `within`, `OwnKeyPlace` optional `fn`; new export `enclosingFunctionName` (`support/ts-program`).
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- **A card template that names HostPart is refused when it registers** (#732), the same rule `buildConfig` applies. 0 hosts do this.
|
|
25
|
+
|
|
3
26
|
## 67.6.0 - 2026-11-11
|
|
4
27
|
|
|
5
28
|
From main at `a2c1240e`: #721, #724, #722. A minor: no `!`, no export is removed, the peers stay `efficient-easel` `^34.1.0` and `efficient-shell` `^12.33.0`. New exports, one optional parameter and optional props only. No stored key or value moves.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{panelNote as r}from"../../../controls.js";function a(e){const t=typeof e?.label=="string"?e.label.trim():"",n=typeof e?.name=="string"?e.name.trim():"";return t||n}const s={fields:{},resolveFields:e=>({_nHostPart:r("The section draws {what} here, in every card.",{what:a(e.props)})})};export{s as HostPartFields};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const assembleGeneralBlocks: () => Record<"Hero" | "HeroSingle" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "Footprint" | "Cards" | "Stats" | "Chart" | "Mockup" | "Countdown" | "FeaturedCover" | "LongRead" | "Breadcrumb" | "DocBody" | "FAQ" | "ContactLocations" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Manifesto" | "Split" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Logos" | "DocMasthead" | "DocTabs" | "Prose" | "ParagraphsA" | "TitleWithButtons" | "Banner" | "CategoryBar" | "Masthead" | "Grid" | "Spacer" | "KeyFeatures" | "Series" | "DocMetaCards" | "StatsParagraph" | "Testimonials" | "PaymentBadges" | "Heading" | "Text" | "Eyebrow" | "ImageBlock" | "LogoBlock" | "LocationMap" | "Contents" | "ListSearch" | "ButtonBlock" | "CardList" | "PostCard" | "HeroSlide" | "HeroGroup" | "Integrations", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
|
|
2
|
-
export declare const generalBlocks: Record<"Hero" | "HeroSingle" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "Footprint" | "Cards" | "Stats" | "Chart" | "Mockup" | "Countdown" | "FeaturedCover" | "LongRead" | "Breadcrumb" | "DocBody" | "FAQ" | "ContactLocations" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Manifesto" | "Split" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Logos" | "DocMasthead" | "DocTabs" | "Prose" | "ParagraphsA" | "TitleWithButtons" | "Banner" | "CategoryBar" | "Masthead" | "Grid" | "Spacer" | "KeyFeatures" | "Series" | "DocMetaCards" | "StatsParagraph" | "Testimonials" | "PaymentBadges" | "Heading" | "Text" | "Eyebrow" | "ImageBlock" | "LogoBlock" | "LocationMap" | "Contents" | "ListSearch" | "ButtonBlock" | "CardList" | "PostCard" | "HeroSlide" | "HeroGroup" | "Integrations", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
|
|
1
|
+
export declare const assembleGeneralBlocks: () => Record<"Hero" | "HeroSingle" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "Footprint" | "Cards" | "Stats" | "Chart" | "Mockup" | "Countdown" | "FeaturedCover" | "LongRead" | "Breadcrumb" | "DocBody" | "FAQ" | "ContactLocations" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Manifesto" | "Split" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Logos" | "DocMasthead" | "DocTabs" | "Prose" | "ParagraphsA" | "TitleWithButtons" | "Banner" | "CategoryBar" | "Masthead" | "Grid" | "Spacer" | "KeyFeatures" | "Series" | "DocMetaCards" | "StatsParagraph" | "Testimonials" | "PaymentBadges" | "Heading" | "Text" | "Eyebrow" | "ImageBlock" | "LogoBlock" | "LocationMap" | "Contents" | "ListSearch" | "ButtonBlock" | "CardList" | "HostPart" | "PostCard" | "HeroSlide" | "HeroGroup" | "Integrations", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
|
|
2
|
+
export declare const generalBlocks: Record<"Hero" | "HeroSingle" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "Footprint" | "Cards" | "Stats" | "Chart" | "Mockup" | "Countdown" | "FeaturedCover" | "LongRead" | "Breadcrumb" | "DocBody" | "FAQ" | "ContactLocations" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Manifesto" | "Split" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Logos" | "DocMasthead" | "DocTabs" | "Prose" | "ParagraphsA" | "TitleWithButtons" | "Banner" | "CategoryBar" | "Masthead" | "Grid" | "Spacer" | "KeyFeatures" | "Series" | "DocMetaCards" | "StatsParagraph" | "Testimonials" | "PaymentBadges" | "Heading" | "Text" | "Eyebrow" | "ImageBlock" | "LogoBlock" | "LocationMap" | "Contents" | "ListSearch" | "ButtonBlock" | "CardList" | "HostPart" | "PostCard" | "HeroSlide" | "HeroGroup" | "Integrations", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{assembleBlocks as o}from"../../../../../format/lib/document/blocks/block-types.js";import{registerGeneralSectionRows as r}from"../../../../../render/lib/document/blocks/general/section-to-box-rows.js";import{BannerFields as e}from"./Banner/fields.js";import{BreadcrumbFields as i}from"./Breadcrumb/fields.js";import{ButtonBlockFields as t}from"./ButtonBlock/fields.js";import{CardsFields as m}from"./Cards/fields.js";import{CategoryBarFields as s}from"./CategoryBar/fields.js";import{ChartFields as d}from"./Chart/fields.js";import{ContactLocationsFields as
|
|
1
|
+
import{assembleBlocks as o}from"../../../../../format/lib/document/blocks/block-types.js";import{registerGeneralSectionRows as r}from"../../../../../render/lib/document/blocks/general/section-to-box-rows.js";import{BannerFields as e}from"./Banner/fields.js";import{BreadcrumbFields as i}from"./Breadcrumb/fields.js";import{ButtonBlockFields as t}from"./ButtonBlock/fields.js";import{CardsFields as m}from"./Cards/fields.js";import{CategoryBarFields as s}from"./CategoryBar/fields.js";import{ChartFields as d}from"./Chart/fields.js";import{ContactLocationsFields as a}from"./ContactLocations/fields.js";import{CountdownFields as l}from"./Countdown/fields.js";import{CustomHTMLFields as p}from"../../../../../format/lib/document/blocks/general/CustomHTML/fields.js";import{DividerFields as F}from"./Divider/fields.js";import{ContentsFields as f}from"./Contents/fields.js";import{ListSearchFields as n}from"./ListSearch/fields.js";import{DocBodyFields as c}from"./DocBody/fields.js";import{DocMastheadFields as S}from"./DocMasthead/fields.js";import{DocMetaCardsFields as B}from"./DocMetaCards/fields.js";import{DocTabsFields as g}from"./DocTabs/fields.js";import{EyebrowFields as C}from"./Eyebrow/fields.js";import{FAQFields as u}from"./FAQ/fields.js";import{FeaturedCoverFields as L}from"./FeaturedCover/fields.js";import{FlexFields as T}from"./Flex/fields.js";import{FootprintFields as H}from"./Footprint/fields.js";import{GridFields as k}from"./Grid/fields.js";import{HeadingFields as h}from"./Heading/fields.js";import{HeroFields as M}from"./Hero/fields.js";import{HeroGroupFields as P}from"./HeroGroup/fields.js";import{HeroSingleFields as y}from"./HeroSingle/fields.js";import{HeroSlideFields as D}from"./HeroSlide/fields.js";import{ImageBlockFields as E}from"./ImageBlock/fields.js";import{IntegrationsFields as b}from"./Integrations/fields.js";import{IntroBleedFields as G}from"./IntroBleed/fields.js";import{KeyFeaturesFields as I}from"./KeyFeatures/fields.js";import{LocationMapFields as R}from"./LocationMap/fields.js";import{LogoBlockFields as x}from"./LogoBlock/fields.js";import{LogosFields as A}from"./Logos/fields.js";import{LongReadFields as w}from"./LongRead/fields.js";import{ManifestoFields as v}from"./Manifesto/fields.js";import{MastheadFields as N}from"./Masthead/fields.js";import{MockupFields as K}from"./Mockup/fields.js";import{OrderSummaryFields as O}from"./OrderSummary/fields.js";import{CardListFields as Q}from"./CardList/fields.js";import{HostPartFields as W}from"./HostPart/fields.js";import{ParagraphsAFields as _}from"./ParagraphsA/fields.js";import{PaymentBadgesFields as j}from"./PaymentBadges/fields.js";import{PostCardFields as q}from"./PostCard/fields.js";import{ProcessStepsFields as z}from"./ProcessSteps/fields.js";import{ProseFields as J}from"./Prose/fields.js";import{SectionHeaderFields as U}from"./SectionHeader/fields.js";import{SeriesFields as V}from"./Series/fields.js";import{SpacerFields as X}from"../../../../../format/lib/document/blocks/general/Spacer/fields.js";import{SpecStripFields as Y}from"./SpecStrip/fields.js";import{SplitFields as Z}from"./Split/fields.js";import{StatsFields as $}from"./Stats/fields.js";import{StatsParagraphFields as oo}from"./StatsParagraph/fields.js";import{TestimonialsFields as ro}from"./Testimonials/fields.js";import{TextFields as eo}from"./Text/fields.js";import{TickerFields as io}from"./Ticker/fields.js";import{TimelineFields as to}from"./Timeline/fields.js";import{TimelineTrackFields as mo}from"./TimelineTrack/fields.js";import{TitleWithButtonsFields as so}from"./TitleWithButtons/fields.js";import{GENERAL_RENDERS as ao}from"../../../../../render/lib/document/blocks/general/renders.js";const lo={Banner:e,Breadcrumb:i,ButtonBlock:t,Cards:m,CategoryBar:s,Chart:d,ContactLocations:a,Countdown:l,CustomHTML:p,Divider:F,Contents:f,ListSearch:n,DocBody:c,DocMasthead:S,DocMetaCards:B,DocTabs:g,Eyebrow:C,FAQ:u,FeaturedCover:L,Flex:T,Footprint:H,Grid:k,Heading:h,Hero:M,HeroGroup:P,HeroSingle:y,HeroSlide:D,ImageBlock:E,Integrations:b,IntroBleed:G,KeyFeatures:I,LocationMap:R,LogoBlock:x,Logos:A,LongRead:w,Manifesto:v,Masthead:N,Mockup:K,OrderSummary:O,CardList:Q,HostPart:W,ParagraphsA:_,PaymentBadges:j,PostCard:q,ProcessSteps:z,Prose:J,SectionHeader:U,Series:V,Spacer:X,SpecStrip:Y,Split:Z,Stats:$,StatsParagraph:oo,Testimonials:ro,Text:eo,Ticker:io,Timeline:to,TimelineTrack:mo,TitleWithButtons:so},po=()=>(r(),o(ao,lo)),ur=po();export{po as assembleGeneralBlocks,ur as generalBlocks};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{ownPairDefault as i}from"../../../../render/lib/document/passes/section-padding.js";import n,{SlotNoticeField as p}from"../../../components/SlotChildRows.js";import{SECTION_HEIGHT as r}from"../../../../format/lib/content/section-height.js";import{usePreviewHeader as l}from"../../../../render/components/PreviewHeaderContext.js";import{IMAGE_GRAYSCALE_LABEL as m}from"../../../../format/lib/content/image-treatment.js";import{BlackAndWhiteIcon as a,ContrastIcon as d,HeightIcon as s,TypeIcon as c}from"efficient-easel/icons";import{linkField as f,spacingFields as u,text as g,toggle as h}from"../controls.js";import{segmented as x,slider as y}from"../box-fields.js";import{deviceField as F}from"efficient-easel/screen/lib/document/device-fields";import{FieldGlyph as T}from"../../../components/FieldGlyph.js";import{fieldNoun as H}from"../../../../format/lib/document/field-noun.js";import{CTA_PH as I}from"../../../../format/lib/document/blocks/placeholders.js";const w=t=>y("Height",o(s,{}),r.min,r.max,r.step,r.fallback,r.unit,t),j=t=>F(t,w());import{heroHeightFields as Q}from"./hero-shared-fields.js";const D={ctaText:g("Button",I.text),ctaHref:f("Button link")},M=()=>x("Tone",o(d,{}),[{label:"Default",value:"default"},{label:"Muted",value:"dim"}],"default"),K=t=>u({...i(t),keys:{top:"padTop",bottom:"padBottom"},group:!1}),O=(t,e)=>({type:"custom",render:()=>o(n,{parentType:t,label:e})}),W=t=>({type:"custom",render:()=>o(p,{parentType:t})});function A(t){const{photographyGrayscale:e}=l();return h(m,e===!0,o(a,{})).render(t)}function Y(){return{type:"custom",render:t=>o(A,{...t})}}function q(t){const e=H(t);return e?o(T,{noun:e}):o(c,{})}export{D as ctaField,j as heightField,Q as heroHeightFields,K as innerSpacingFields,Y as photographyToggle,W as slotNoticeField,O as slotRowsField,q as textKindGlyph,M as toneField};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cardTemplateBlocks as
|
|
1
|
+
import{HOST_PART_TYPE as k,cardTemplateBlocks as $,hasCardTemplate as O,isCardTemplateBlock as T}from"../../../format/lib/content/card-template.js";import{resolveBlockOffer as F}from"./block-offer.js";import{applyBlockPasses as E,registryPassContext as S}from"../../../render/lib/document/passes/index.js";import{PASS_INSPECTOR as v}from"./passes/inspector.js";function w(s,r,l){if(!s)return s;let i=!1;const a={};for(const[t,e]of Object.entries(s)){let o=e;if(e&&typeof e=="object")if(e.type==="slot")if(e.allow){const c=e.allow.filter(r);c.length!==e.allow.length&&(o={...e,allow:c})}else{const c=new Set(e.disallow??[]),p=l.filter(m=>!c.has(m));p.length>0&&(o={...e,disallow:[...e.disallow??[],...p]})}else{const c=w(e.arrayFields,r,l),p=w(e.objectFields,r,l);(c!==e.arrayFields||p!==e.objectFields)&&(o={...e,...c?{arrayFields:c}:null,...p?{objectFields:p}:null})}o!==e&&(i=!0),a[t]=o}return i?a:s}function C(s,r,l){const i={};for(const[o,c]of Object.entries(r.fields??{}))i[o]=c&&typeof c=="object"&&c.type==="slot"?{...c}:c;const a={...r,...r.fields?{fields:i}:null},t=E(s,a,l),e=Object.keys(i).filter(o=>t.fields?.[o]!==i[o]);if(e.length>0)throw new Error(`efficient-web-builder: blocks.host["${s}"] declares ${e.map(o=>`"${o}"`).join(", ")}, ${e.length===1?"a name":"names"} the editor gives every section a setting under. Give the block's own field another name.`);return t}function P(s,r,l){const i=new Set([...Object.keys(s.components??{}),...r.map(([t])=>t)]),a=[...Object.entries(s.categories??{}).map(([t,e])=>({key:t,components:e?.components??[]})),...l];x(s,r,a);for(const t of a){const e=t.components.filter(T);if(e.length>0)throw new Error(`efficient-web-builder: the category "${t.key}" lists ${e.map(o=>`"${o}"`).join(", ")}, a block a card template declares. A card's block is added in its card only; take it out of the category.`)}for(const t of i){if(!O(t))continue;const e=$(t).filter(o=>!i.has(o.type)).map(o=>`"${o.type}"`);if(e.length>0)throw new Error(`efficient-web-builder: the card template of "${t}" declares ${e.join(", ")}, which the editor does not register. Register it in the registry or in blocks.host.`)}}function j(s,r,l,i=""){const a=[];for(const[t,e]of Object.entries(l??{})){if(!e||typeof e!="object")continue;const o=`${i}${t}`;e.type==="slot"&&e.allow?.includes(s)&&a.push(`${r}.${o}`),a.push(...j(s,r,e.arrayFields,`${o}.`),...j(s,r,e.objectFields,`${o}.`))}return a}function x(s,r,l){const i=t=>{throw new Error(`efficient-web-builder: ${t} names "${k}". Only a host's seed puts a host part in a card template; a merchant never adds one. Take it out.`)};for(const t of l)t.components.includes(k)&&i(`the category "${t.key}"`);const a=[...Object.entries(s.components??{}),...r.map(([t,e])=>[t,e])];for(const[t,e]of a){const o=j(k,t,e?.fields);o.length>0&&i(`the slot ${o.map(c=>`"${c}"`).join(", ")}, whose allow list`)}}function _(s,r){const l=Object.entries(r?.host??{}),i=r?.categories??[],a=F(r);if(P(s,l,i),!a&&l.length===0&&i.length===0)return s;const t=s.components,e=l.map(([n])=>n).filter(n=>n in t);if(e.length>0)throw new Error(`efficient-web-builder: blocks.host registers ${e.map(n=>`"${n}"`).join(", ")}, which ${e.length===1?"is already a block":"are already blocks"} of the editor. Give a host's block a type of its own.`);const o=n=>a?a.offers(n):!0,c=Object.keys(t).filter(n=>!o(n)),p={};for(const[n,f]of Object.entries(t)){const h=a?w(f?.fields,o,c):f?.fields;p[n]=h===f?.fields?f:{...f,fields:h}}if(l.length>0){const n=new Set(l.map(([u])=>u)),f=s.categories?.structure?.components??[],y={...S(Object.keys(t),f,n),isHostBlock:u=>n.has(u),inspector:v};for(const[u,d]of l){const b=C(u,d,y),g=w(b.fields,o,c);p[u]=g===b.fields?b:{...b,fields:g}}}const m=[];for(const[n,f]of Object.entries(s.categories??{})){const h=f?.components??[],y=h.filter(o);y.length===h.length?m.push([n,f]):y.length>0&&m.push([n,{...f,components:y}])}for(const n of i){const f=n.components.filter(d=>d in p&&o(d));if(f.length===0)continue;const h=m.find(([d])=>d===n.key);if(h){const[,d]=h,b=new Set(d.components??[]);h[1]={...d,components:[...d.components??[],...f.filter(g=>!b.has(g))]};continue}const y=[n.key,{title:n.title,components:f}],u=n.before?m.findIndex(([d])=>d===n.before):-1;u===-1?m.push(y):m.splice(u,0,y)}return{...s,components:p,categories:Object.fromEntries(m)}}export{_ as buildConfig};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ReactElement, type ReactNode } from "react";
|
|
2
2
|
import { type FieldsPatch } from "efficient-easel/easel";
|
|
3
|
+
import { type WordValues } from "../../../format/lib/editor-words.js";
|
|
3
4
|
import { type MediaValue } from "../../../format/lib/media-value.js";
|
|
4
5
|
import { type KnownVideoFrame, type LoadingShows } from "../../../format/lib/hero-video.js";
|
|
5
6
|
import { readHidable, hidableText, type HidableValue } from "efficient-easel/draw";
|
|
@@ -122,9 +123,10 @@ export declare function plainTextarea(label: string, placeholder?: string, hint?
|
|
|
122
123
|
export declare const BUCKET_ICONS: Record<Bucket, (props: {
|
|
123
124
|
size?: number;
|
|
124
125
|
}) => ReactElement>;
|
|
125
|
-
export declare function panelNote(text: string): CustomField<undefined>;
|
|
126
|
-
export declare function PanelNoteLine({ text }: {
|
|
126
|
+
export declare function panelNote(text: string, values?: WordValues): CustomField<undefined>;
|
|
127
|
+
export declare function PanelNoteLine({ text, values }: {
|
|
127
128
|
text: string;
|
|
129
|
+
values?: WordValues;
|
|
128
130
|
}): import("react").JSX.Element;
|
|
129
131
|
export declare function isBucketHeader(field: unknown): boolean;
|
|
130
132
|
export declare function bucketHeader(bucket: Bucket, tabs: readonly Bucket[] | null): CustomField<undefined>;
|
|
@@ -409,3 +411,4 @@ export declare function cardImageField(row?: typeof CARD_IMAGE_RADIUS_ROW): Cust
|
|
|
409
411
|
export declare function cardImageFields(): Record<string, CustomField<unknown>>;
|
|
410
412
|
export declare function imageCornersField(): CustomField<number | null>;
|
|
411
413
|
export declare function galleryLayoutField(): CustomField<string>;
|
|
414
|
+
export declare function galleryLayoutPhoneField(): CustomField<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as i,jsxs as P,Fragment as F}from"react/jsx-runtime";import{cloneElement as _e,createContext as xn,useContext as nt,useEffect as On,useId as ot,useRef as J,useState as Z}from"react";import{useEasel as re,useSelectedHost as B}from"efficient-easel/easel";import{PIN_LENGTH as ie,toDateKey as In,fromDateKey as En}from"efficient-shell/format";import{say as a,editorEaselWords as y}from"../../../format/lib/editor-words.js";import{finiteNumber as $}from"../../../format/lib/finite-number.js";import{LOADING_SHOWS_LABELS as rt,firstFrameHint as Tn,loadingShowsOf as Rn,loadingStillHint as Nn}from"../../../format/lib/hero-video.js";import{pageFramesFor as kn,usePageVideoFrames as Pn}from"../page-video-frames.js";import{ScreenDocumentContext as Fn}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as it,hidableText as st}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as Ce,LINK_FIELD_MARKER as lt,MEDIA_FIELD_MARKER as at,SCAFFOLD_FIELD_MARKER as ct,TEXT_FIELD_MARKER as N,foldMetaOf as ye,textFieldIdentifier as An}from"efficient-easel/draw";import Ln from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as ut}from"../../../render/lib/document/show-when.js";import{CARD_IMAGE_PX_ROW as vn,CARD_IMAGE_RADIUS_ROW as dt,CARD_IMAGE_RADIUS_STEP as Bn,CORNER_RADIUS_MAX as xe,CORNER_RADIUS_MIN as A}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as Dn,IMAGE_CORNERS_LABEL as Hn,IMAGE_CORNERS_ROW as Gn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as Mn}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Wn,GALLERY_LAYOUTS as Oe,GALLERY_LAYOUT_KEYS as Un,galleryChoices as pt,galleryLayoutRatio as Kn,galleryPictureCells as Xn}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as $n}from"./shell-glyph.js";import{anchorSiblingsOf as Vn,placementPoints as jn}from"../../../format/lib/hero-group-placement.js";import zn from"../../components/AnchorField.js";import Yn from"../../components/SourceStatus.js";import{AdjustIcon as qn,EyeIcon as Jn,AnimationIcon as Zn,BackgroundIcon as ft,BorderAllIcon as Qn,BlockSectionIcon as eo,ColumnWidthsIcon as Ie,ColumnsIcon as ht,CornerIcon as mt,DirectionDownIcon as to,DirectionLeftIcon as no,DirectionRightIcon as oo,DirectionUpIcon as ro,EditIcon as io,GapIcon as so,GridIcon as lo,GroundIcon as Ee,HashIcon as ao,HeightIcon as gt,ImageIcon as co,ListIcon as uo,LocationIcon as bt,PaddingBottomIcon as wt,PaddingLeftIcon as St,PaddingRightIcon as _t,PaddingTopIcon as Te,PageIcon as po,StickyIcon as Ct,SearchIcon as fo,SquareIcon as ho,TypeIcon as mo,WidthIcon as go}from"efficient-easel/icons";import{FieldGlyph as yt}from"../../components/FieldGlyph.js";import{resolvePageBackground as bo}from"../../../format/lib/content/page-background.js";import{BOX_FILL_FADE_PROP as wo,BOX_FILL_FADES as So,BOX_SWATCH_PROP as _o,boxFillFadeOf as xt,boxFillOf as Co,boxFillSlot as Re,boxPaintOf as yo}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as Ot,CORNER_SIDE_POINTS as xo,SECTION_CORNERS_ROW as It,hasOwnSectionCorners as Oo,normalizeCornerSides as Et}from"../../../format/lib/content/section-corners.js";import{CARD_CORNERS_ROW as Tt}from"../../../format/lib/content/card-corners.js";import{enclosingPath as Io,enclosingSection as Eo}from"./enclosing-section.js";import{SettingsDefaultReset as x,SettingsDrill as To,SettingsField as _,SettingsGroup as Ro,SettingsSegmented as No,SettingsBorder as ko,SettingsSidesEach as Po,SettingsSwitch as Ne,borderSides as Fo,borderStartEach as Ao}from"efficient-easel/panel";import{ListField as Lo}from"efficient-easel/fields";import{DisplayChips as vo}from"efficient-shell/ui";import{desktopDisplayChanged as Bo,partShownOnDesktop as Do,partShownOnPhone as Ho,phoneDisplayChanged as Go,withDesktopPart as Mo,withPhonePart as Wo}from"../../../format/lib/content/part-display.js";import{ColorSwatch as Uo,CornersInput as Ko,DatePicker as Xo,DateTimePicker as $o,FOCAL_DEFAULT as Vo,IconPicker as Rt,COLUMN_COUNT_MAX as Nt,COLUMN_SHARE_MIN as jo,COLUMN_SHARES_EQUAL as zo,resolveColumnShares as kt,WidthsBar as Yo,useShellStrings as qo,IconButton as Pt,InputNumber as Ft,Slider as Jo,Tooltip as ke}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as Zo}from"./geocode-resolve.js";import{ColourRow as se,InheritedColourRow as At}from"./ColourControl.js";import{fillThemeColors as Qo,slotFill as le}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as Pe}from"../../../format/lib/document/part-inks.js";import{keptByRow as Fe}from"efficient-easel/screen/lib/document/style-fields";import Lt from"./MarkupToolbar.js";import{deviceField as E}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as er,NoControlMark as tr,noControlField as vt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as nr}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as or,PANEL_ONLY_FIELD as rr}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as ir,resolvePhoneValue as Ae}from"../../../format/lib/document/phone-override.js";import{phoneKey as V,tabletKey as Le,viewKeyAt as ve}from"efficient-easel/draw";import{viewKey as O}from"../../../format/lib/animation/views.js";import{viewRows as D}from"../animation/view-rows.js";import{SuppressibleText as sr}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as lr,CARD_OUTLINE_OPTIONS as ar,DEFAULT_CARD_INDEX_FORMAT as cr,DEFAULT_CARD_OUTLINE as ur}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as dr,DEFAULT_COVER_INDEX as pr}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as fr}from"efficient-easel/draw";import hr from"../../components/MediaUploadField.js";import mr from"../../components/MultiSelectField.js";import gr from"../../components/SectionThemePicker.js";import br from"../../components/SearchSelectField.js";import wr from"../../components/StorefrontLinkField.js";import{UiIcon as Bt}from"efficient-easel/draw/client";import{SECTION_PADDING as k}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as Sr}from"../../../render/lib/content/button-look.js";import{usePreviewParts as _r}from"efficient-easel/draw/client";import{encodePartId as Cr}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as yr,useEaselStrings as xr}from"efficient-easel/strings";import{hasPhoneHeight as Or,hasTabletHeight as Be,resolveSectionMinHeight as Ir,resolveTabletHeight as Er}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as Tr,SECTION_PIN_ABOVE_HINT as Rr,SECTION_PIN_ABOVE_KEY as Nr,SECTION_PIN_ABOVE_LABEL as kr,SECTION_PIN_GROUP as Pr,SECTION_PIN_LABEL as Dt,SECTION_PIN_SCREENS_KEY as De,SECTION_PIN_SCREENS_LABEL as Ht,SECTION_PIN_STOP_DEFAULT as Fr,SECTION_PIN_STOP_HINT as Ar,SECTION_PIN_STOP_KEY as Lr,SECTION_PIN_STOP_LABEL as vr,SECTION_PIN_STOP_OPTIONS as Br,SECTION_STICK_DISTANCE as H,SECTION_STICK_DISTANCE_ROW as He,SOME_VIEW_PINS as Gt,hasPhoneStick as Dr,hasTabletStick as Hr,resolveSectionStick as ae,sectionPinStopOf as Gr,sectionPinStopWrite as Mr}from"../../../format/lib/content/section-sticky.js";import{cssLengthOf as Wr}from"../../../format/lib/content/css-length.js";import{SECTION_HEIGHT_MODES as Ur,SECTION_MIN_HEIGHT as Kr,SECTION_MIN_HEIGHT_GROUP_LABEL as Q,SECTION_SCREEN_PCT as Xr}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as $r,resolveContainerDirection as Mt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as Vr,BOX_BLOCK_SPACING_POINTS as Wt,BOX_PHONE_ROW_LABEL as Ut,BOX_COLUMNS_MAX as jr,BOX_COLUMNS_MIN as Kt,BOX_PHONE_ROW_MAX as zr,BOX_PHONE_ROW_MIN as Ge,BOX_SHARE_CHOICES as Xt,BOX_SHARE_LABEL as j,boxShareChoiceOf as $t,boxShareWidthsOf as Me,BOX_SHARE_PHONE_DEFAULT as Yr,BOX_SHARE_PHONE_POINTS as qr}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as G}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Vt,BORDER_SIDES as Jr,SECTION_BORDER_ROW as jt,borderBySide as zt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as Zr,normalizeTheme as Yt,normalizeThemeColors as Qr,sectionBandTone as ei,surfaceTwoTone as ti}from"../../../format/lib/theme.js";import{CONTAINER_GAP as qt,CONTAINER_GAP_BUILT_IN as ni,CONTAINER_GAP_PHONE as We,GAP_FIELD_CONTAINER as Ue,followsSitePhoneGap as oi,hasOwnContainerGap as ri,hasOwnPhoneGap as Ke,resolveContainerGap as Jt,resolvePhoneContainerGap as Zt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as ii,CARD_IMAGE_BG_OFF as si,CARD_IMAGE_BG_SWATCH_NAMES as li,CARD_IMAGE_BG_SWATCHES as ai,isCardImageBackgroundInheriting as ci,cardImageBackgroundChoice as ui,THEME_CARD_IMAGE_BG as di}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as pi,SECTION_BG_NO_FILL as fi,sectionBackgroundChoice as hi,THEME_SECTION_BG as Xe,isSectionBackgroundEmpty as mi,sectionBackgroundHex as Qt}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as gi,nestedAccentValue as en,resolveSectionAccent as ce}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as bi,TYPE_SIZE_INHERIT as wi,isTypeSizeInheriting as Si}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as _i,WIDTH_CHOICE_LABEL as Ci,WIDTH_INHERIT as yi}from"../../../format/lib/content/section-width.js";import{useEaselSession as xi}from"efficient-easel/screen/lib/session-context";import{backendOf as Oi}from"../website-session.js";import{BOX_GAP as Ii,describedAs as L,group as T,iconOf as z,sharedStyleKinds as ee}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as tn,onDesktopWords as M,phoneTwinFields as $e,saidAlignmentGrid as Ei,useLengthUnit as Ti}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as Ri,directionField as Ni,gapField as Ve,iconPickerRow as ki,lengthUnitFields as ue,pickerCellIcon as Pi,pickerNoneIcon as Fi,Segmented as de,select as Y,slider as W}from"./box-fields.js";import{VIEW_ABOVE as je}from"efficient-easel/screen/lib/content/length-units";import{tierOfView as nn,viewOfTier as Ai}from"../../../format/lib/content/view-tier.js";import{ownEntry as Li}from"../../../format/lib/own-entry.js";function Ma({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?a(e):e})}function U(e,t){return a("{value} from {from}",{value:e,from:t})}function vi(){const{blockGap:e}=G();return e===null?a("this container's own spacing"):U(`${e}px`,a("Styles"))}function Bi({inherited:e,onReset:t,label:n}){return i(x,{words:y()?.panel,label:a(n),changed:!e,detail:vi(),onReset:t})}function Di(e){return Ve({...Ii,builtIn:ni[e],resolve:(t,n)=>Jt(e,t,n?.siteGap),action:(t,n)=>i(Bi,{inherited:!ri(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[Ue]:e}})}function Hi(e){return ut(E("mobile",{[Ue]:e,type:"custom",render:t=>i(Wi,{container:e,...t})}),on)}function Gi(e){return ut(E("tablet",{[Ue]:e,type:"custom",render:t=>i(Mi,{container:e,...t})}),on)}const on={not:{field:"gap",in:Array.from({length:-qt.min},(e,t)=>qt.min+t)}};function Wa(e){return{gap:E("desktop",Di(e)),[Le("gap")]:Gi(e),[V("gap")]:Hi(e)}}function Mi({container:e,...t}){const[n]=R("gap"),{siteGap:o}=t.field??{},r=Math.max(We.min,Jt(e,n,o));return Ve({...We,builtIn:r,resolve:l=>Ke(l)?l:r,action:(l,c)=>i(x,{words:y()?.panel,label:a("Gap"),changed:Ke(l),detail:M(u=>a(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function Wi({container:e,...t}){const[n]=R("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},s=Zt(e,void 0,n,o,r);return Ve({...We,builtIn:s,resolve:c=>Zt(e,c,n,o,r),action:(c,u)=>i(x,{words:y()?.panel,label:a("Gap"),changed:Ke(c),detail:U(`${s}px`,oi(e,n,r)?a("Styles"):a("Desktop")),onReset:()=>u(void 0)})}).render(t)}function Ua(e){return Ni({offered:$r(e),fallback:Mt(e,void 0),resolve:t=>Mt(e,t)})}function Ka(e,t){return jn(t?Vn(e,t):[],t)}function Ui({inherited:e,onReset:t,label:n}){return i(x,{words:y()?.panel,label:a(n),changed:!e,detail:U(a("Full"),a("the page")),onReset:t})}function K({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:s,hideable:l=!0,markup:c=!0}){const{text:u,hidden:d}=it(e),h=J(null),p=J(null),f=C=>t(l?{text:C,hidden:d}:C),m=()=>t({text:u,hidden:!d}),g=l&&d,b=ot(),S=r?ji(r)?i("span",{className:"sf-hint-while-typing",children:a(r)}):a(r):void 0,w=d?a("Show {label} on the slide",{label:a(n)}):a("Hide {label} on the slide",{label:a(n)});return i(_,{label:a(n),icon:i(mo,{}),htmlFor:b,className:g?"is-hidden":void 0,hint:S,action:l?i(ke,{content:w,children:i(Pt,{"aria-pressed":d,"aria-label":w,onClick:m,children:d?i(Bt,{name:"eye-off",size:14}):i(Bt,{name:"eye",size:14})})}):void 0,children:P("div",{className:"sf-copybox",children:[c&&i(Lt,{target:s?p:h,value:u,onChange:f}),s?i("textarea",{id:b,ref:p,value:u,placeholder:o===void 0?void 0:a(o),onChange:C=>f(C.target.value)}):i("input",{id:b,ref:h,type:"text",value:u,placeholder:o===void 0?void 0:a(o),onChange:C=>f(C.target.value)})]})})}function Xa(e,t){return{...e,[ct]:t}}function $a(e){const t=e[N];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[N]:{...t,offPage:!0}}}function Va(e){return!e||typeof e!="object"?!1:e[N]?.offPage===!0}function ja(e){if(!e[N])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[rr]:!0}}function za(e){return or(e)}function Ya(e){const t=e[N];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[N]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as iu,SCALAR_TEXT_CONTROLS as su}from"efficient-easel/draw";function qa(e,t){if(!e[N])throw new Error("inOwnBox: the field holds no authored text");const{[er]:o,...r}=e;return{...r,[nr]:!0,render:t}}const Ki=new Set(fr),pe={type:"radio",options:[{value:!0},{value:!1}]},rn={text:{type:"object",objectFields:{text:{type:"text"},hidden:pe}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:pe}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},X=(e,t)=>{const n=L({...t,[N]:e},{...rn[e.control],label:e.label});if(!Ki.has(e.control))return n;const o=t.render;return{...vt(n,"authored-copy"),render:r=>i(sr,{name:r.name,children:o(r)})}},Ja="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Xi={field:"source.slug",set:!0},Za={not:Xi},$i="Select a word, then press the highlighter.",Vi=new Set([$i]),ji=e=>Vi.has(e);function Qa(e,t,n){return X({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function ec(e,t,n){return X({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function tc(e,t,n){return X({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function nc(e,t,n){return X({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function oc(e){return{type:"custom",[lt]:{label:e},...L({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(wr,{value:st(t),onChange:n,label:e})}}function rc(e,t,n){return X({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const ic={Design:qn,Animation:Zn};function sc(e){return{type:"custom",render:()=>i(zi,{text:e})}}function zi({text:e}){return i("p",{className:"sf-note",children:a(e)})}function lc(e){return ye(e)!==null&&e?.tabs!==void 0}const sn=new Map;function ac(e,t){const n=`${e}\0${t?t.join(""):""}`,o=sn.get(n)??{type:"custom",tabs:t,[Ce]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(F,{})};return sn.set(n,o),o}const ln=new Map;function cc(e){const t=ln.get(e)??{type:"custom",[Ce]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(F,{})};return ln.set(e,t),t}function Yi(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function uc(e,t){return Yi(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(F,{})}}function dc(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>i(F,{})}}function pc({title:e,children:t}){const[n,o]=Z(()=>!ze.has(e));return i(Ro,{title:e,open:n,onToggle:r=>{o(r),r?ze.delete(e):ze.add(e)},children:t})}const ze=new Set;function qi({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),s=r?o?.[r]:void 0,l=s?a(s):t;return P("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?a(o[c]):c;return i(ke,{content:u,children:i(Uo,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:l})]})}function fc(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(Ji,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function Ji({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const s=typeof o=="string"?o:void 0,{colors:l,n:c}=Qe(),u={background:l.background,surface:l.surface,surface2:ti(l),band:ei(l)},d=n?Xe:t,h=mi(s,t,d),p=Qt(void 0,d,u),f=n?pi:void 0,m=d===Xe?a("the theme's section background"):a("Theme {n} background",{n:c}),g=Zi(s,t,l,c,u,r),b=U(p.toUpperCase(),m),S=Pe(s),w=S?le(S,l,c):null;return w?i(se,{label:a(e),icon:i(ft,{}),value:w.hex,caption:w.words,onChange:r,changed:!0,onReset:()=>r(f),resetTo:b,choices:g}):i(At,{label:a(e),icon:i(ft,{}),value:h?"":Qt(s,t,u),inherited:p,resetTo:b,onChange:r,onReset:()=>r(f),choices:g})}function Zi(e,t,n,o,r,s){const l=hi(e,t);return[{label:a("No fill"),color:"",selected:l==="none",onPick:()=>s(fi)},{label:`${a("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:l==="band",onPick:()=>s(Xe)},...Ze(Pe(e)??"",n,o,s)]}function Qi(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,s=ci(r,t);return i(_,{label:a(e),icon:i(Ee,{}),changed:!s,action:i(x,{words:y()?.panel,label:a(e),changed:!s,detail:a("the theme's image stage"),onReset:()=>o(ii)}),children:qi({swatches:ai,current:s?di:ui(r,t),onPick:o,names:li})})}}}function hc(e=n=>n,t){return ee({_gSectionTheme:T(gi),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(gr,{value:e(n),onChange:o,followLabel:t})}})}function fe(e){const t=I(),n=nn(e?.view),o=l=>ve(e.valueKey,l),r=e.numbersIn??(l=>$(t[o(l)])!==void 0),s=e.followsView??hs(n,r);return Ti({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:Ri,label:a(e.label),grid:e.grid,hasOwn:r(n),view:{tier:n,numbersIn:r,followsView:s},convertTo:e.convertTo??(l=>{const c=$(t[o(n)]);return c===void 0?{}:{[o(n)]:l(c)}})})}function q({min:e,max:t,step:n,value:o,onChange:r,suffix:s="",readout:l=!0,notch:c,ariaLabel:u,disabled:d=!1,placeholder:h,placeholderWord:p,onClear:f,units:m}){const g=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:g?"sf-slider has-notch":"sf-slider",style:g?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(Jo,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...p?{emptyLabel:a(p)}:{},suffix:s||void 0,...m?{units:m}:{},showInput:l,label:u===void 0?void 0:a(u),disabled:d,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:b=>{b===null?f?.():b!==o&&r(b)}})})}function es(e,t){const{min:n,max:o,step:r=1,unsetLabel:s,hint:l,restTrack:c,unsetMark:u,icon:d,unit:h="px"}=t;return{type:"custom",render:({value:p,onChange:f})=>{const m=typeof p=="number"?p:null,g=m===null;return i(_,{label:a(e),icon:d?z(d):void 0,value:g?u||s===void 0?void 0:a(s):`${m}${h}`,changed:!g,action:u?_e(u,{changed:!g,onReset:()=>f(null)}):i(x,{words:y()?.panel,label:a(e),changed:!g,onReset:()=>f(null)}),hint:typeof l=="string"?a(l):l,children:c?c({min:n,max:o,step:r,px:m,label:e,onChange:f}):q({min:n,max:o,step:r,value:m??n,readout:!1,ariaLabel:e,onChange:f})})}}}const te="Corners",ts={kind:"radius"};function Ye(e){return{type:"custom",render:t=>{const{value:n,onChange:o}=t,r=typeof n=="number"&&Number.isFinite(n)?n:null,s=r!==null;return i(_,{label:a(te),icon:i(mt,{}),changed:s,action:_e(e.mark,{changed:s,onReset:()=>o(null)}),hint:e.hint,children:i(ns,{tier:e,px:r,name:t.name,onRadius:o})})}}}function R(e){const t=B();return[t?.values?.[e],n=>t?.onChange(e,n)]}function an(){return vt({type:"custom",render:()=>i(tr,{})},"always")}function he(){const e=B();return t=>e?.onChangeMany(t)}function ns({tier:e,px:t,name:n,onRadius:o}){const r=e.useFollowed(),[s,l]=R(e.sidesKey),c=he(),u=fe({row:e.row??ts,label:te,grid:{min:A,max:xe,step:e.step??1},valueKey:n??"",view:"desktop"}),d=Et(s)??[...Ot];return i(Ko,{label:a(te),value:d,corners:xo,onChange:h=>{const p=Et(h)??[];l(p.length===Ot.length?null:p)},radius:t,onRadiusChange:u&&n?h=>c({[n]:h,...u.unitPatch(h===null)}):o,radiusMin:u?.grid.min??A,radiusMax:u?.grid.max??xe,radiusStep:u?.grid.step??e.step??1,radiusPlaceholder:u&&u.unit!=="px"?"–":String(r),...u?{radiusUnit:u.unit,units:u.units}:{}})}function cn(e,t){return ue(e,t)}function un(){return an()}function os({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=G(),r=typeof o=="number"?`${o}px`:a("not set");return i(x,{words:y()?.panel,label:a(e),changed:t,detail:o==null?a("the built-in corners"):U(r,a("Styles")),onReset:n})}function rs(){const{cornerRadiusPx:e}=G();return typeof e=="number"?e:A}function is(){return Ye({sidesKey:"sectionCornerSides",row:It,useFollowed:rs,mark:i(os,{label:te}),hint:ss})}const ss="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function mc(){return ee({_gShape:T("Shape"),sectionCorners:is(),...cn(It,"sectionCorners"),sectionCornerSides:un(),...D("sectionBorder",fs),...ue(jt,"sectionBorder",{tablet:!0,phone:!0})})}const ls=()=>({width:a("Border width"),sides:{top:a("Border top"),right:a("Border right"),bottom:a("Border bottom"),left:a("Border left")},style:a("Border style"),styles:{solid:a("Solid"),dashed:a("Dashed"),dotted:a("Dotted")},color:a("Border color"),unit:"px"});function as(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function cs(){let e;try{const t=Yt(G().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||Zr.line}function us({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:s=!0,above:l={},length:c}){const u=e&&typeof e=="object"?e:{},[d,h]=Z(()=>r?Ao(u,l):!1),p=ls(),f=m=>as(r&&s?m:{width:m.width,color:m.color,...s?{style:m.style}:{}});return i(_,{label:a("Border"),icon:i(Qn,{}),action:r?i(Po,{each:d,label:a("Each side"),onChange:h}):void 0,children:i(ko,{label:a("Border"),value:u,each:d,onChange:m=>t(f(m)),placeholder:n,presets:o,words:c?{...p,unit:c.unit}:p,styles:s,max:c?.grid.max??Vt,...c?{step:c.grid.step,units:c.units}:{}})})}function ds({value:e,onChange:t,view:n}){const[o]=R("sectionBorder"),[r]=R(Le("sectionBorder")),s=cs(),l=f=>f&&typeof f=="object"?f:{},c=n==="phone"?{...zt(l(o)),...zt(l(r))}:n==="tablet"?l(o):{},u=I(),d=he(),h=O("sectionBorder",n),p=fe({row:jt,label:"Border",grid:{min:0,max:Vt,step:1},valueKey:"sectionBorder",view:n,numbersIn:f=>qe(u[ve("sectionBorder",f)]),convertTo:f=>{const m=l(u[h]);return qe(m)?{[h]:ps(m,f)}:{}}});return i(us,{value:e,length:p,onChange:p?f=>d({[h]:f,...p.unitPatch(!qe(f))}):t,placeholder:{sides:Fo(c),style:c.style??"solid",color:c.color||s},presets:[s],above:c})}const dn=["width",...Jr];function qe(e){if(!e||typeof e!="object")return!1;const t=e;return dn.some(n=>$(t[n])!==void 0)}function ps(e,t){const n={...e};for(const o of dn){const r=$(n[o]);r!==void 0&&(n[o]=t(r))}return n}function fs(e){return{type:"custom",render:({value:t,onChange:n})=>i(ds,{value:t,onChange:n,view:e})}}function hs(e,t){let n=je[e];for(;n&&je[n]!==null&&!t(n);)n=je[n];return n??e}function gc(e){return{type:"custom",render:()=>i(ms,{partKey:e})}}function ms({partKey:e}){const[t]=R("id"),[n]=R("_partStyles"),{textStyles:o}=G(),r=xr();let s=null;try{s=_r().select}catch{s=null}const l=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(To,{name:a("Text"),preview:Sr(l,c,{noStyle:a("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??yr.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(Cr(t,e))}})}function pn(e){const{cornerRadiusPx:t}=G(),n=typeof t=="number"?t:e;let o=null;try{const{appState:s,selectedItem:l}=re(u=>u),c=l?.props?.id?String(l.props.id):void 0;o=c?Eo(s?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Oo(r)?r:n}function gs({label:e,changed:t=!1,onReset:n=()=>{}}){const o=pn(A);return i(x,{words:y()?.panel,label:a(e),changed:t,detail:U(`${o}px`,a("the section")),onReset:n})}function bs(){return i(F,{children:a("Follows the section's Corners until you set a number here.")})}function ws(){return Ye({sidesKey:"cardCornerSides",row:Tt,useFollowed:()=>pn(A),mark:i(gs,{label:te}),hint:i(bs,{})})}function Ss(){return{type:"custom",render:()=>i(Ln,{})}}function bc(){return{_gShape:T("Shape"),cardCorners:ws(),...cn(Tt,"cardCorners"),cardCornerSides:un(),cardCornersApplyAll:Ss()}}function _s(){return L({type:"custom",render:e=>i(ys,{...e})},{type:"select",label:j,options:[{value:"content",label:"Fit content"},{value:"equal",label:"Equal"},{value:[50],label:"Custom: the width of each block in %, the last block left out"}]})}function Cs(e,t){const n=$t(e);if(n!=="custom")return a(Xt.find(r=>r.value===n)?.label??"");const o=kt(Me(e,t),t);return o?[...o,100-o.reduce((r,s)=>r+s,0)].join(" / "):a("Custom")}function ys(e){const{value:t,onChange:n}=e,[o]=R("content"),r=Array.isArray(o)?o.length:0,s="follows"in e,l=t!=null,c=l?t:s?e.follows:void 0,u=$t(c),d=r>=2&&r<=Nt,h=()=>[...zo[r]??[]],p=J(null),f=w=>{const C=p.current;C&&JSON.stringify(w)===JSON.stringify(C.shares)?n(C.value):w&&n(w)},m=w=>{w===u||w==="custom"&&!d||n(w==="custom"?h():w)},g=a("The width bar works for 2 to {count} blocks.",{count:Nt}),b=l&&(s||t!=="content"),S=qo().widths.hint(r,jo);return i(_,{label:a(j),icon:i(Ie,{}),changed:b,hint:u!=="custom"?void 0:d?S:g,action:i(x,{words:y()?.panel,label:a(j),changed:b,disabled:e.readOnly===!0,detail:s?M(w=>a(w),Cs(e.follows,r),e.followsView):a("Fit content"),onReset:()=>n(void 0)}),children:P("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(Rt,{label:a(j),value:u,options:Xt.map(w=>({value:w.value,label:w.value==="custom"&&!d?g:a(w.label),icon:Pi(i("span",{className:"sf-gallery-pic sf-share-pic",children:fn(w.weights).map((C,v)=>i("i",{style:{gridColumn:`span ${C}`}},v))}),a(w.label),w.value==="custom"&&!d?g:a(w.label))})),onChange:m,columns:3,cell:hn,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&d?i("div",{onFocus:()=>{p.current={value:t,shares:kt(Me(c,r),r)}},onBlur:()=>{p.current=null},children:i(Yo,{label:a(j),count:r,value:Me(c,r),onChange:f,readOnly:e.readOnly===!0})}):null]})})}function fn(e){if(!e)return[3,4];const t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function wc(){return Y(Vr,i(so,{}),Wt,Wt[0].value)}function Sc(){return E("mobile",ki(j,i(Ie,{}),qr.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:fn(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),Yr,{columns:2,cell:hn}))}const hn={width:"5.75rem",height:"3.25rem"};function _c(){return $e("share",_s(),tn)[Le("share")]}function xs(){return E("mobile",W(Ut,i(ht,{}),Ge,zr,1,Ge,"",{clear:{phoneFollows:!1,hint:Ge}}))}const mn={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function Cc(){const e=W(Ut,i(ht,{}),Kt,jr,1,Kt,"",{clear:{emptyLabel:"Auto"}}),t=$e("columns",e,{...mn,tablet:tn.tablet}),n=$e("columns",e,mn,{phoneRow:xs()});return{...t,phoneRow:n.phoneRow}}function yc(e,t,n,o,r,s,l){return{type:"custom",render:({value:c,onChange:u,name:d})=>i(Os,{label:e,min:t,max:n,step:o,fallback:r,role:s,value:c,onChange:u,name:d??"",length:l})}}function Os({label:e,min:t,max:n,step:o,fallback:r,role:s,value:l,onChange:c,name:u,length:d}){const h=I(),p=he(),f=nn(d?.view),m=fe({row:d?.row??{kind:"fontSize"},label:e,grid:{min:t,max:n,step:o},valueKey:d?u:"",view:d?.view??"desktop",numbersIn:b=>b===f&&typeof h[u]=="number",followsView:f,convertTo:b=>typeof h[u]=="number"?{[u]:b(h[u])}:{}}),g=b=>m?p({[u]:b,...m.unitPatch(typeof b!="number")}):c(b);return i(_,{label:a(e),icon:i(yt,{noun:s}),action:i(x,{words:y()?.panel,label:a(e),changed:!Si(l),detail:a("the Text style in Styles"),onReset:()=>g(wi),defaultAction:{onPress:()=>g(bi),title:a("Keep this section's own built-in size"),icon:i(eo,{})}}),children:q({min:m?.grid.min??t,max:m?.grid.max??n,step:m?.grid.step??o,value:typeof l=="number"?l:r,...m?{suffix:m.unit,units:m.units}:{suffix:"px"},ariaLabel:e,onChange:g})})}function xc(){return{_gCellWidth:T("Cell width"),gridSpan:Y("Positions",i(Ie,{}),[{label:"Auto",value:""},...Array.from({length:Mn},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function I(){let e=null,t=null;try{e=nt(Is),t=re(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Is=xn(null);function Es({min:e,max:t,step:n,px:o,label:r,onChange:s,desktopKey:l,fallback:c}){const u=I()[l],d=Ae(void 0,u,c);return i(F,{children:q({min:e,max:t,step:n,value:Ae(o,u,c),readout:!1,ariaLabel:r,notch:d,onChange:s})})}function Ts({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:s=()=>{}}){const l=I()[t],c=Ae(void 0,l,n);return i(x,{words:y()?.panel,label:a(e),changed:r,detail:M(u=>a(u),`${c}${o}`),onReset:s})}function Rs(e){return es(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(Ts,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(Es,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Ns={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},ks={Top:Te,Bottom:wt,Left:St,Right:_t},Ps=e=>{const t=ks[e];return i(t,{})};function Oc(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=S=>Ns[S],s=S=>W(r("Top"),i(Te,{}),k.min,k.max,k.step,S,"px"),l=(S,w,C,v=k)=>E("mobile",Rs({label:r(S),icon:Ps(S),desktopKey:w,min:v.min,max:v.max,step:v.step,fallback:C})),c=e.top??k.min,u=e.bottom??k.min,d="sectionPaddingLeft",h="sectionPaddingRight",p=e.sideBounds??k,f=e.side??p.min,m=e.sidePhone??f,g=e.phone===!0,b=S=>g?E("desktop",S):S;return ee({...o?{_gSpacing:T("Padding")}:{},[t]:b(s(c)),...g?{[V(t)]:l("Top",t,c)}:{},...e.only==="top"?{}:{[n]:b(W(r("Bottom"),i(wt,{}),k.min,k.max,k.step,u,"px")),...g?{[V(n)]:l("Bottom",n,u)}:{}},...e.sides?{[d]:b(W(r("Left"),i(St,{}),p.min,p.max,p.step,f,"px")),...g?{[V(d)]:l("Left",d,m,p)}:{},[h]:b(W(r("Right"),i(_t,{}),p.min,p.max,p.step,f,"px")),...g?{[V(h)]:l("Right",h,m,p)}:{}}:{}})}function Ic(e,t){const n=Object.fromEntries(Object.entries(t).map(([s,l])=>[s,s in e&&ye(l)?e[s]:l])),o={};let r=!1;for(const[s,l]of Object.entries(e)){if(s in t){r||Object.assign(o,n),r=!0;continue}o[s]=l}return r||Object.assign(o,n),o}const me="Width";function Ec(e,t=_i,n=!0){const o=t.map(r=>({label:Ci[r],value:r}));return ee({...n?{_gWidth:T(me)}:{},widthMode:{type:"custom",render:({onChange:r,field:s})=>i(_,{label:a(me),icon:i(go,{}),action:n?i(Ui,{inherited:s?.inherited??!1,onReset:()=>r(yi),label:me}):void 0,children:de({options:o,value:s?.currentValue||e,onChange:r,ariaLabel:me})})}})}function Tc({fill:e=!1}={}){const t=(r,s)=>({type:"custom",render:({value:l,onChange:c})=>i(Fs,{value:l,onChange:c,view:r,badge:s,fill:e})}),n=()=>Fe("sectionHeightMode"),o=()=>Fe("sectionHeightMode");return ee({_gHeight:T(Q),...D("sectionHeightMode",r=>r==="desktop"?t(r):t(r,s=>i(Bs,{view:r,onClear:()=>s(void 0)}))),...D("sectionHeightValue",n),...D("sectionHeightUnit",o)})}function Fs({value:e,onChange:t,view:n,badge:o,fill:r=!1}){const s=I(),{mode:l,number:c,unit:u}=As(n,s,e);return i(_,{label:Q,icon:z(i(gt,{})),action:o?o(t):void 0,children:P("div",{className:"es-width-stack",children:[de({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"},...r?[{label:"Fill",value:"fill"}]:[]],value:l,onChange:t,ariaLabel:Q}),c?i(vs,{view:n,mode:l,menu:u}):null]})})}function gn(e,t){return e==="phone"&&Be(t)?Er(t):Ir(t)}function ge(e,t){return e==="desktop"||(e==="tablet"?Be(t):Or(t))?null:gn(e,t)}function As(e,t,n){const r=(s=>Ur.includes(s))(n)?n:ge(e,t)?.mode??"auto";return{mode:r,number:r!=="auto"&&r!=="fill",unit:r==="fixed"}}function Ls(e,t,n,o){const r=ge(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[O("sectionHeightMode",e)]:r.mode,...r.mode==="fixed"?{[O("sectionHeightUnit",e)]:r.unit}:{},...n==="sectionHeightUnit"?{[O("sectionHeightValue",e)]:r.value}:{},[O(n,e)]:o}}function bn(e,t,n){const o=B(),r=ge(e,I());return!o||!r?{followed:null,write:n}:{followed:r,write:l=>o.onChangeMany(c=>{const u=Ls(e,c,t,l);return u===null?{[O(t,e)]:l}:Object.keys(u).length?u:null})}}function vs({view:e,mode:t,menu:n}){const o=B(),r=I(),s=O("sectionHeightValue",e),l=O("sectionHeightUnit",e),c=S=>w=>o?.onChangeMany(()=>({[S]:w})),{followed:u,write:d}=bn(e,"sectionHeightValue",c(s)),{write:h}=bn(e,"sectionHeightUnit",c(l)),p=t==="screen"?"%":r[l],f=(u?u.unit:p)==="%"?"%":"px",m=f==="%"?Xr:Kr,g=r[s],b=n?{options:["px","%"],label:a("Unit"),onChange:S=>h(S)}:void 0;return q({min:m.min,max:m.max,step:m.step,value:u?null:typeof g=="number"?g:m.fallback,...u?{placeholder:u.value}:{},suffix:f,...b?{units:b}:{},ariaLabel:Q,onChange:d})}function Bs({view:e,onClear:t}){const n=I(),o=ge(e,n)===null,r=e==="phone"&&Be(n),s=gn(e,n),l=M(c=>a(c),s.mode==="auto"?a("Auto"):`${s.value}${s.unit}`,r?"tablet":"desktop");return i(x,{words:y()?.panel,label:a(Q),changed:o,detail:l,onReset:t})}function Rc(e={}){const t=e.intro===!0,n=s=>({type:"custom",render:({value:l,onChange:c,id:u,name:d})=>i(Ks,{value:l,onChange:c,labelId:`${u??d??"stickTop"}-label`,view:s,intro:t})}),o=s=>({type:"custom",render:({value:l,onChange:c})=>i(Ms,{value:l,onChange:c,view:s,intro:t})}),r=s=>({type:"custom",render:({value:l,onChange:c})=>i(Ws,{value:l,onChange:c,view:s,intro:t})});return{_gStick:T(Pr,{dot:t?Gs:Gt}),...D("stickTop",n),...D("stickTopDistance",o),...ue(He,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?D(De,r):{},...t?{}:{[Lr]:Ds()},...t||e.above===!1?{}:{[Nr]:Hs()}}}function Ds(){const e=Y(vr,i(Te,{}),Br,Fr);return E("desktop",{...e,render:t=>{const n=e.render({...t,value:Gr(t.value),onChange:o=>t.onChange(Mr(o))});return _e(n,{hint:a(Ar)})}})}function Hs(){const e=_n(kr,!1,i(Ct,{}),Rr);return E("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}const Gs={any:[Gt,Tr]};function wn(e,t,n,o,r){const s=B(),l=I(),c=e==="desktop"||ne(e,l)?null:Je(e,ae(l,{intro:o}));return{followed:c,write:(c||r)&&s?d=>s.onChangeMany(h=>{const p=Us(e,h,d,t,o),f=p===null?{[O(t,e)]:d}:p;return Object.keys(f).length?{...f,...r?.(d)??{}}:null}):n}}function Ms({value:e,onChange:t,view:n,intro:o}){const r=I(),s=ae(r,{intro:o}),l=h=>{const p=Ai(h);return p==="desktop"||ne(p,r)},c=fe({row:He,label:"Distance from top",grid:{min:H.min,max:H.max,step:H.step},valueKey:"stickTopDistance",view:n,numbersIn:h=>l(h)&&$(r[ve("stickTopDistance",h)])!==void 0,followsView:n==="phone"&&s.ownTablet?"tablet":"desktop"}),{followed:u,write:d}=wn(n,"stickTopDistance",t,o,c?h=>c.unitPatch(h===void 0):void 0);return i("div",{className:"sf-field",children:q({min:c?.grid.min??H.min,max:c?.grid.max??H.max,step:c?.grid.step??H.step,value:u?null:typeof e=="number"?e:H.fallback,...u?{placeholder:u.distance}:{},...c?{suffix:c.unit,units:c.units}:{suffix:"px"},ariaLabel:a("Distance from top"),onChange:d})})}function Ws({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:s}=wn(n,De,t,o);return i(_,{label:a(Ht),icon:z(i(gt,{})),children:q({min:ie.min,max:ie.max,step:ie.step,value:r?null:$(e)??ie.default,...r?{placeholder:r.screens}:{},ariaLabel:a(Ht),onChange:s})})}function ne(e,t){return e==="tablet"?Hr(t):Dr(t)}function Je(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance,unit:t.tabletUnit,screens:t.tabletScreens}:{on:t.desktop,distance:t.desktopDistance,unit:t.desktopUnit,screens:t.desktopScreens}}function Us(e,t,n,o="stickTopDistance",r=!1){if(e==="desktop"||ne(e,t))return null;if(n===void 0)return{};const s=Je(e,ae(t,{intro:r})),l=e==="phone"&&ne("tablet",t)?h=>O(h,"tablet"):h=>h,c=(h,p)=>t[l(h)]==null?{}:{[O(h,e)]:p},u=He.unitKey,d=t[l(u)]==null?{}:{[O(u,e)]:s.unit};return{[O("stickTop",e)]:!0,...c("stickTopDistance",s.distance),...d,...c(De,s.screens),[O(o,e)]:n}}function Ks({value:e,onChange:t,labelId:n,view:o,intro:r}){const s=I(),l=ae(s,{intro:r}),c=o==="phone"?l.phone:o==="tablet"?l.tablet:r?l.desktop:e===!0,u=o==="phone"&&l.ownTablet,d=o==="desktop"?null:Je(o,l),h=d?.on?Wr(d.distance,d.unit):a("Off");return i(_,{label:a(Dt),labelId:n,icon:z(i(Ct,{})),action:P(F,{children:[o!=="desktop"?i(x,{words:y()?.panel,label:a(Dt),changed:ne(o,s),detail:M(p=>a(p),h,u?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(Ne,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const Sn="e.g. about";function Nc(){return{_gAnchor:T("Anchor"),anchor:X({control:"plainText",label:"Name",placeholder:Sn},{type:"custom",render:({value:e,onChange:t})=>i(zn,{value:e,onChange:t,nameBox:(n,o)=>i(K,{value:n,onChange:o,label:"Name",placeholder:Sn,hideable:!1,markup:!1})})})}}function kc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:l})=>{const c=`${s??l??e}-datetime`,u=Date.parse(typeof o=="string"?o:"");return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i($o,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:d=>r(d?d.toISOString():"")})})}}}function Pc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:l})=>{const c=`${s??l??e}-date`;return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(Xo,{id:c,value:En(typeof o=="string"?o:null),onChange:u=>r(u?In(u):"")})})}}}function _n(e,t,n,o){return{type:"custom",...L({},{...pe,label:e}),render:r=>{const{value:s,onChange:l,id:c,name:u}=r,d="follows"in r,h=r,p=typeof s=="boolean",f=typeof h.follows=="boolean"?h.follows:t,m=p?s:d?f:t,g=`${c??u??e}-label`,b=h.readOnly===!0,S=i(Ne,{checked:m,onChange:l,disabled:b,ariaLabelledBy:g});return i(_,{label:a(e),labelId:g,icon:n,hint:o===void 0?void 0:a(o),action:d?P(F,{children:[i(x,{words:y()?.panel,label:a(e),changed:p,detail:h.followsNoView?a(f?"On":"Off"):M(w=>a(w),a(f?"On":"Off"),h.followsView),disabled:b,onReset:()=>l(void 0)}),S]}):S})}}}function Fc(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(Xs,{label:"Background",icon:i(po,{}),id:r,value:e,shown:bo(e),onChange:t})}}}function Ac(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(se,{label:a(e),icon:n,value:o||t,onChange:r})}}function Xs({label:e,icon:t,id:n,value:o,shown:r,onChange:s}){const{colors:l,n:c}=Qe(),u=Pe(o),d=u?le(u,l,c):null;return i(se,{label:a(e),icon:t,id:n,value:d?d.hex:r,caption:d?.words,onChange:s,choices:Ze(u??"",l,c,s)})}function Lc(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i($s,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function Ze(e,t,n,o){const r=Re(e);return Qo(t,n).map(s=>({label:s.label,color:s.value,selected:r===s.name,onPick:()=>o(s.name)}))}function $s({value:e,onChange:t,twin:n}){const{colors:o,n:r}=Qe(),s=o.background,l=U(s.toUpperCase(),a("Theme {n} background",{n:r})),[c,u]=R(wo),[d]=R(_o),h=typeof d=="string"&&d.trim()!=="",p=xt(c),f=oe=>u(xt(oe)||void 0),m=Re(e),g=m?le(m,o,r):null,b=Ze(e,o,r,t),S=n?()=>t(void 0):()=>t("");let w=s,C=l;if(n){const oe=Re(n.follows),we=Co(n.follows),Se=oe?le(oe,o,r):we?{hex:we,words:we.toUpperCase()}:null;w=Se?.hex??s,C=M(yn=>a(yn),Se?Se.words:l,n.view)}const v=!n&&(yo(e)||h)?i(Vs,{value:p,onChange:f}):null;return g?i(se,{label:a("Fill"),icon:i(Ee,{}),value:g.hex,caption:g.words,onChange:t,changed:!0,onReset:S,resetTo:C,choices:b,children:v}):i(At,{label:a("Fill"),icon:i(Ee,{}),value:e,inherited:w,resetTo:C,onChange:t,onReset:S,choices:b,children:v})}function Vs({value:e,onChange:t}){return de({options:So.map(n=>({label:n.label,value:n.value,hint:n.hint})),value:e,onChange:t,ariaLabel:a("Fill")})}function js(e,t,n){if((e?.content??[]).some(l=>l?.props?.id===t))return ce(n);const r=Io(e,t);if(r.length===0)return null;const s=ce(en(n));if(s!==null)return s;for(let l=r.length-1;l>0;l-=1){const c=ce(en(r[l].sectionAccent));if(c!==null)return c}return ce(r[0].sectionAccent)}function Qe(){const e=Yt(G().theme),[t]=R("sectionAccent");let n=null;try{const{appState:r,selectedItem:s}=re(c=>c),l=s?.props?.id?String(s.props.id):void 0;n=l?js(r?.data,l,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:Qr(e.themes[o]),n:o+1}}function vc(){return an()}const Bc={top:i(ro,{}),right:i(oo,{}),bottom:i(to,{}),left:i(no,{})};function Dc(e,t,n,o,r,s,l){const c=p=>t.find(f=>f.value===p),u=p=>({value:p,label:"",disabled:!0,title:o}),d=p=>{const f=t.find(g=>g.cell===p);if(!f)return u(`missing-${p}`);const m=s?.[p];return m?{value:f.value,label:f.label,icon:m}:{value:f.value,label:f.label}},h=[u("corner-top-left"),d("top"),u("corner-top-right"),d("left"),u("centre"),d("right"),u("corner-bottom-left"),d("bottom"),u("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:f})=>{const m=t.some(g=>g.value===p)?p:n;return i(_,{label:a(e),icon:r,value:c(m)?.label?a(c(m).label):l?a(l):"",children:Ei(a,{label:e,value:m,onChange:f,points:h})})}}}function Hc(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:s})=>i(mr,{label:e,options:(s.options??t).map(l=>({...l,label:a(l.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:a(n)}:{}})}}function Gc(e,t,n,o){return{type:"custom",options:t,fallback:n,...L({},{type:"select",label:e}),render:({value:r,onChange:s,field:l})=>i(br,{label:e,options:(l.options??t).map(c=>({...c,label:a(c.label)})),fallback:l.fallback??n,value:r,onChange:s,placeholder:o===void 0?void 0:a(o)})}}function Mc(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const Wc=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function Uc(e,t,n){const o=Object.keys(rt).map(r=>({label:rt[r],value:r,picture:n[r]}));return{type:"custom",...L({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(Ys,{label:e,icon:t,options:o,onChange:r})}}function zs(e,t,n){const o=Tn(e,t,n);if(o!==void 0)return o==="save-makes-frame"?a("A frame is made from this video when you save the page."):o==="starts-dark"?a("This video starts dark, so no frame was made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="outside"?a("This video is on another website, so no frame can be made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="unsupported"?a("This video's file type gives no frame. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="failed"?a("No frame could be made from this video. It is tried again the next time you save the page. The slide shows its background colour while the video loads."):o==="image-no-frame"?a("The slide shows your Image while the video loads, because this video has no frame."):void 0;const r=Nn(e);return r==="frame-missing-image"?a("This video has no frame yet. The slide shows its image until one is made."):r==="frame-missing-surface"?a("This video has no frame yet. The slide shows its background colour until one is made."):r==="image-missing-frame"?a("No image yet. The slide shows the video's frame until you choose one."):r==="image-missing-surface"?a("No image yet. The slide shows its background colour until you choose one."):void 0}function Ys({label:e,icon:t,options:n,onChange:o}){const r=B(),s=r?.values??{},l=Rn(s),c=nt(Fn),u=Pn(c?.docId??null);let d=null;try{d=re(p=>p.appState.data)}catch{d=null}const h=kn(r?.id,d,u);return i(_,{label:a(e),icon:z(t),hint:zs(s,h,c?.hasUnsavedEdits??!1),children:de({options:n,value:l,onChange:o,ariaLabel:e})})}function Kc(e,t,n,o={}){const r={type:"custom",[at]:!0,render:({value:s,onChange:l,name:c})=>i(hr,{value:s||"",onChange:l,fieldKey:c,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame}),...o.focus?{focusKey:o.focus}:{},...o.focusWhen?{focusWhen:o.focusWhen}:{}};return o.focus?E("each",r):r}const Xc={HeroSingle:["imageFocal"],HeroSlide:["videoFrame","videoFramePhone"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function qs(e){const t=a(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function $c({value:e,onChange:t,label:n}){const o=e||{},r=B(),s=r?r.values!==r.node.props:!0,l=!!o.pending&&s,c=!!o.pending&&!s,u=!!Oi(xi()).geocode,d=ot(),h=(p,f)=>t({...o,[p]:f??void 0});return P(F,{children:[i(_,{label:a(n),icon:i(bt,{}),action:u?i(ke,{content:a("Find from the address (OpenStreetMap)"),children:i(Pt,{"aria-label":a("Find from the address"),"aria-busy":l||void 0,disabled:l,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(fo,{})})}):void 0,children:u&&o.status?i(Yn,{compact:!0,oneLine:!0,spaced:!1,status:l?"busy":o.ok&&!c?"found":"notfound",statusText:l?a("Finding…"):c?a(Zo):a(o.status),hint:qs(o)}):null}),i(_,{label:a("Enter by hand"),labelId:d,icon:i(io,{}),action:i(Ne,{checked:!!o.manual,onChange:p=>t({...o,manual:p}),ariaLabelledBy:d})}),o.manual&&i(_,{label:a("Latitude, longitude"),icon:i(bt,{}),children:P("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(Ft,{value:typeof o.lat=="number"?o.lat:null,onChange:p=>h("lat",p),min:-90,max:90,step:1e-4,placeholder:a("Latitude")}),i(Ft,{value:typeof o.lng=="number"?o.lng:null,onChange:p=>h("lng",p),min:-180,max:180,step:1e-4,placeholder:a("Longitude")})]})})]})}function Js(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Zs(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,s)=>s===t?{text:n}:r)}function Vc(e,t){return e===null?null:t>e?e:null}function Qs(e,t,n){if(n===null||n>=t.length)return null;for(let o=0;o<n;o+=1)if(e[o]!==t[o])return null;return e[n]!==t[n]&&t.includes(e[n])||e[n]!==t[n]&&t.length!==e.length?null:n}const jc={label:"Ticker items",icon:i(uo,{})};function zc(e,t,n,o){return{type:"custom",[N]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...L({},{...rn.textList,label:e}),render:({value:r,onChange:s})=>i(el,{label:e,icon:z(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:s,markup:o==="markup"})}}function el({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:s=!1}){const l=J(null),[c,u]=Z(null),d=p=>p.map(f=>({text:f?.text??""})),h=p=>{const f=Qs(n,p,c);f===null&&(l.current=null),u(f),r(d(p))};return i(Lo,{label:a(e),icon:t,noun:a("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:s?i(Lt,{target:l,value:Js(n,c),onChange:p=>r(Zs(n,c??-1,p)),disabled:c===null,label:c===null?a("Formatting — click a row first"):a("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,f,m)=>i("input",{type:"text",className:s&&c===f?"sf-list-marking":void 0,value:p?.text??"",placeholder:a(o),"aria-label":a("{label} {n}",{label:a(e),n:f+1}),onChange:g=>m({text:g.target.value}),onFocus:g=>{l.current=g.currentTarget,u(f)}})})}function Yc(e,t){const n=`${e.label} — row ${t+1}`;return X({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:a("{label} — row {n}",{label:a(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function qc(e){return{_gCards:T("Cards"),coverIndex:Y("Cover image",i(co,{}),dr,String(pr),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:Qi("Image background",si),cardImage:Cn()}}function Jc(){return{outline:Y("Card outline",i(ho,{}),ar,ur),indexBadge:Y("Card number",i(ao,{}),lr,cr),showBadge:_n("Product badge",!0,i(yt,{noun:"tag"}))}}function Zc(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...pe,label:be.find(s=>s.id===r).label}),o=r=>L(Fe(et),n(r));return{_gShowOnCard:T("Show on a card"),[et]:L({type:"custom",render:()=>i(tl,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(et)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const et="showCardPrice",be=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function tl({rest:e}){const t=I(),n=he(),o=l=>typeof t[l]=="boolean"?t[l]:void 0,r=l=>o(l)??e[l],s=be.some(({id:l})=>o(l)!==void 0&&o(l)!==e[l]);return i(tt,{parts:be,changed:s,shown:r,onPress:(l,c)=>n({[l]:c}),onReset:()=>n(Object.fromEntries(be.map(({id:l})=>[l,void 0])))})}function Qc(e,t="display"){const n=V(t);return{[t]:E("desktop",{type:"custom",render:({value:o,onChange:r})=>i(tt,{parts:e,changed:Bo(o),shown:s=>Do(o,s),onPress:(s,l)=>r(Mo(o,s,l)),onReset:()=>r(void 0)})}),[n]:E("mobile",{type:"custom",render:({value:o,onChange:r})=>i(nl,{parts:e,desktopKey:t,value:o,onChange:r})})}}function tt({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:s,disabledReason:l}){const c=a("Display");return i(_,{label:c,icon:i(Jn,{}),changed:t,action:i(x,{words:y()?.panel,label:c,changed:t,detail:s,onReset:r}),children:i(vo,{label:c,items:e.map(u=>({id:u.id,label:a(u.label),shown:n(u.id),...l?{disabled:!0,disabledReason:a(l)}:{}})),onChange:o})})}function nl({parts:e,desktopKey:t,value:n,onChange:o}){const r=I()[t];return i(tt,{parts:e,changed:Go(n),shown:s=>Ho(r,n,s),onPress:(s,l)=>o(Wo(n,s,l)),onReset:()=>o(ir),detail:a("the same as Desktop")})}function Cn(e=vn){return W("Card image",i(mt,{}),A,xe,Bn,A,e,{clear:{hint:A},hint:"Rounds the picture. The card's own corner is in Styles."})}function ol(){return ue(dt,"cardImage")}function eu(){return{cardImage:Cn(dt),...ol()}}function tu(){return Ye({sidesKey:"cornerSides",row:Gn,step:Dn,useFollowed:()=>A,mark:i(rl,{label:Hn}),hint:a("Rounds the picture. Left alone it stays square.")})}function rl({label:e,changed:t=!1,onReset:n=()=>{}}){return i(x,{words:y()?.panel,label:a(e),changed:t,onReset:n})}function nu(){return{type:"custom",render:({value:e,onChange:t})=>i(al,{value:typeof e=="string"?e:"",onChange:t})}}function il({layout:e,width:t}){const n=Kn(e),o=n?`${n[0]}/${n[1]}`:void 0;return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:o?"auto":6,gridAutoFlow:"row dense",gap:2},children:Xn(e).map(([r,s],l)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${r}`,gridRow:`span ${s}`,aspectRatio:o}},l))})}const sl={width:"3.5rem",height:"2.5rem"},ll=200;function al({value:e,onChange:t}){const[n,o]=Z(null),[r,s]=Z(4),l=J(null);On(()=>{const m=l.current;if(!m||typeof ResizeObserver!="function")return;const g=()=>s(m.getBoundingClientRect().width>=ll?4:3);g();const b=new ResizeObserver(g);return b.observe(m),()=>b.disconnect()},[]);const c=e?Li(Oe,e):void 0,u=c?e:"",d=pt(n,u),h=pt(n,"").length,p=$n("no-symbol"),f=[{value:"",label:a("Not chosen"),icon:Fi(p,a("Not chosen"))},...d.map(m=>({value:m,label:a(Oe[m].label),icon:i(il,{layout:Oe[m],width:40})}))];return i(_,{label:a("Layout"),icon:i(lo,{}),value:c?a(c.label):void 0,children:i("div",{ref:l,style:{flex:"1 1 auto",minWidth:0},children:i(Rt,{label:a("Layout"),value:u,options:f,onChange:t,columns:r,cell:sl,header:P("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:a("Photos in a row")}),i(No,{options:[{id:"all",label:a("All")},...Wn.map(m=>({id:String(m),label:String(m)}))],value:n===null?"all":String(n),ariaLabel:a("Photos in a row"),onChange:m=>o(m==="all"?null:Number(m))}),i("span",{className:"text-2xs text-ink-faint",children:a("{n} of {total} layouts",{n:h,total:Un.length})})]})})})})}export{Xi as BOUND_TO_POST,Ja as BOUND_TO_POST_NOTE,ic as BUCKET_ICONS,Xc as CUSTOM_FIELD_MEDIA,$c as CoordsField,on as DESKTOP_GAP_NOT_OVERLAP,tt as DisplayRow,Bc as EDGE_ARROWS,Vo as FOCAL_DEFAULT,Ce as FOLD_FIELD_MARKER,$i as HIGHLIGHT_HINT,K as HidableTextField,lt as LINK_FIELD_MARKER,Ma as Label,at as MEDIA_FIELD_MARKER,Wc as MEDIA_TYPE_OPTIONS,Za as NOT_BOUND_TO_POST,pc as PanelBand,zi as PanelNoteLine,Is as RowPropsContext,ct as SCAFFOLD_FIELD_MARKER,su as SCALAR_TEXT_CONTROLS,Bi as SiteGapDefaultReset,q as Slider,qi as Swatches,iu as TEXT_CONTROL_KINDS,N as TEXT_FIELD_MARKER,jc as TICKER_ITEMS_ROW,el as TextListField,Xs as ThemeFillRow,me as WIDTH_LABEL,Ui as WidthDefaultReset,Qs as aimAfterListChange,Nc as anchorFields,U as backTo,fc as backgroundField,wc as boxBlockSpacingField,Cc as boxColumnsFields,Lc as boxFillField,xs as boxPhoneRowField,_s as boxShareField,Sc as boxSharePhoneField,_c as boxShareTabletField,js as boxThemeIndexOf,ac as bucketHeader,gc as buttonWordsEntryField,ws as cardCornersField,Qi as cardImageBackgroundField,Cn as cardImageField,eu as cardImageFields,qc as cardMediaFields,bc as cardShapeFields,Zc as cardShowFields,Jc as cardStyleFields,xc as cellWidthFields,Ac as colorInput,Ua as containerDirectionField,Di as containerGapField,Hi as containerGapPhoneField,Wa as containerGapRows,Gi as containerGapTabletField,qs as coordsResultTip,nc as copyText,un as cornerSidesField,Ye as cornersRowField,cn as cornersUnitFields,Pc as date,kc as dateTime,cc as designGroupHeader,Qc as displayFields,Dc as edgePad,Ze as fillSlotChoices,Vc as focusAfterRemove,vc as focusKeptField,uc as foldMarker,ye as foldMetaOf,Yi as foldTitleOf,Ls as followedHeightPatch,Us as followedStickPatch,nu as galleryLayoutField,Tc as heightFields,ge as heightFollowedBy,As as heightLayersAt,Ka as heroGroupPlacementPoints,st as hidableText,ji as hintIsWhileTyping,tu as imageCornersField,qa as inOwnBox,lc as isBucketHeader,an as keptBy,oc as linkField,zs as loadingRowHint,Uc as loadingShowsField,Hc as multiSelect,Fc as pageBackgroundField,sc as panelNote,Rs as phoneOverrideField,tc as plainText,rc as plainTextarea,es as pxField,dc as quietMarker,it as readHidable,Js as rowText,Gc as searchSelect,Zi as sectionBandChoices,is as sectionCornersField,mc as sectionShapeFields,hc as sectionThemeFields,Zs as setRowText,yc as sizeField,Mc as sourceField,Oc as spacingFields,Rc as stickFields,Ic as swapPadding,Qa as text,An as textFieldIdentifier,Va as textFieldOffPage,za as textFieldPanelOnly,zc as textList,Yc as textListRowField,ec as textarea,_n as toggle,Kc as upload,fe as useLengthRow,he as useSelectedPatch,I as useSelectedProps,R as useSelectedSibling,vi as useSiteGapDetail,Ec as widthField,Ya as withIdentifier,$a as withOffPage,ja as withPanelOnly,Xa as withScaffold};
|
|
1
|
+
"use client";import{jsx as i,jsxs as k,Fragment as L}from"react/jsx-runtime";import{cloneElement as _e,createContext as Tn,useContext as nt,useEffect as Nn,useId as ot,useRef as J,useState as Z}from"react";import{useEasel as re,useSelectedHost as B}from"efficient-easel/easel";import{PIN_LENGTH as ie,toDateKey as Pn,fromDateKey as kn}from"efficient-shell/format";import{say as a,editorEaselWords as C}from"../../../format/lib/editor-words.js";import{finiteNumber as X}from"../../../format/lib/finite-number.js";import{LOADING_SHOWS_LABELS as rt,firstFrameHint as Ln,loadingShowsOf as An,loadingStillHint as Fn}from"../../../format/lib/hero-video.js";import{pageFramesFor as vn,usePageVideoFrames as Bn}from"../page-video-frames.js";import{ScreenDocumentContext as Dn}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as it,hidableText as st}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as ye,LINK_FIELD_MARKER as lt,MEDIA_FIELD_MARKER as at,SCAFFOLD_FIELD_MARKER as ct,TEXT_FIELD_MARKER as N,foldMetaOf as Ce,textFieldIdentifier as Hn}from"efficient-easel/draw";import Gn from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as ut}from"../../../render/lib/document/show-when.js";import{CARD_IMAGE_PX_ROW as Mn,CARD_IMAGE_RADIUS_ROW as dt,CARD_IMAGE_RADIUS_STEP as Wn,CORNER_RADIUS_MAX as xe,CORNER_RADIUS_MIN as A}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as Un,IMAGE_CORNERS_LABEL as Kn,IMAGE_CORNERS_ROW as $n}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as Xn}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Vn,GALLERY_COLUMNS_PHONE as jn,GALLERY_LAYOUTS as Oe,GALLERY_LAYOUT_KEYS as Yn,GALLERY_PHONE_LAYOUTS as zn,galleryChoices as pt,galleryLayoutRatio as qn,galleryPictureCells as Jn}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as Zn}from"./shell-glyph.js";import{anchorSiblingsOf as Qn,placementPoints as eo}from"../../../format/lib/hero-group-placement.js";import to from"../../components/AnchorField.js";import no from"../../components/SourceStatus.js";import{AdjustIcon as oo,EyeIcon as ro,AnimationIcon as io,BackgroundIcon as ft,BorderAllIcon as so,BlockSectionIcon as lo,ColumnWidthsIcon as Ie,ColumnsIcon as ht,CornerIcon as mt,DirectionDownIcon as ao,DirectionLeftIcon as co,DirectionRightIcon as uo,DirectionUpIcon as po,EditIcon as fo,GapIcon as ho,GridIcon as gt,GroundIcon as Ee,HashIcon as mo,HeightIcon as bt,ImageIcon as go,ListIcon as bo,LocationIcon as wt,PaddingBottomIcon as St,PaddingLeftIcon as _t,PaddingRightIcon as yt,PaddingTopIcon as Re,PageIcon as wo,StickyIcon as Ct,SearchIcon as So,SquareIcon as _o,TypeIcon as yo,WidthIcon as Co}from"efficient-easel/icons";import{FieldGlyph as xt}from"../../components/FieldGlyph.js";import{resolvePageBackground as xo}from"../../../format/lib/content/page-background.js";import{BOX_FILL_FADE_PROP as Oo,BOX_FILL_FADES as Io,BOX_SWATCH_PROP as Eo,boxFillFadeOf as Ot,boxFillOf as Ro,boxFillSlot as Te,boxPaintOf as To}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as It,CORNER_SIDE_POINTS as No,SECTION_CORNERS_ROW as Et,hasOwnSectionCorners as Po,normalizeCornerSides as Rt}from"../../../format/lib/content/section-corners.js";import{CARD_CORNERS_ROW as Tt}from"../../../format/lib/content/card-corners.js";import{enclosingPath as ko,enclosingSection as Lo}from"./enclosing-section.js";import{SettingsDefaultReset as x,SettingsDrill as Ao,SettingsField as _,SettingsGroup as Fo,SettingsSegmented as vo,SettingsBorder as Bo,SettingsSidesEach as Do,SettingsSwitch as Ne,borderSides as Ho,borderStartEach as Go}from"efficient-easel/panel";import{ListField as Mo}from"efficient-easel/fields";import{DisplayChips as Wo}from"efficient-shell/ui";import{desktopDisplayChanged as Uo,partShownOnDesktop as Ko,partShownOnPhone as $o,phoneDisplayChanged as Xo,withDesktopPart as Vo,withPhonePart as jo}from"../../../format/lib/content/part-display.js";import{ColorSwatch as Yo,CornersInput as zo,DatePicker as qo,DateTimePicker as Jo,FOCAL_DEFAULT as Zo,IconPicker as Nt,COLUMN_COUNT_MAX as Pt,COLUMN_SHARE_MIN as Qo,COLUMN_SHARES_EQUAL as er,resolveColumnShares as kt,WidthsBar as tr,useShellStrings as nr,IconButton as Lt,InputNumber as At,Slider as or,Tooltip as Pe}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as rr}from"./geocode-resolve.js";import{ColourRow as se,InheritedColourRow as Ft}from"./ColourControl.js";import{fillThemeColors as ir,slotFill as le}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as ke}from"../../../format/lib/document/part-inks.js";import{keptByRow as Le}from"efficient-easel/screen/lib/document/style-fields";import vt from"./MarkupToolbar.js";import{deviceField as E}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as sr,NoControlMark as lr,noControlField as Bt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as ar}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as cr,PANEL_ONLY_FIELD as ur}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as dr,resolvePhoneValue as Ae}from"../../../format/lib/document/phone-override.js";import{phoneKey as V,tabletKey as Fe,viewKeyAt as ve}from"efficient-easel/draw";import{viewKey as O}from"../../../format/lib/animation/views.js";import{viewRows as D}from"../animation/view-rows.js";import{SuppressibleText as pr}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as fr,CARD_OUTLINE_OPTIONS as hr,DEFAULT_CARD_INDEX_FORMAT as mr,DEFAULT_CARD_OUTLINE as gr}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as br,DEFAULT_COVER_INDEX as wr}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Sr}from"efficient-easel/draw";import _r from"../../components/MediaUploadField.js";import yr from"../../components/MultiSelectField.js";import Cr from"../../components/SectionThemePicker.js";import xr from"../../components/SearchSelectField.js";import Or from"../../components/StorefrontLinkField.js";import{UiIcon as Dt}from"efficient-easel/draw/client";import{SECTION_PADDING as P}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as Ir}from"../../../render/lib/content/button-look.js";import{usePreviewParts as Er}from"efficient-easel/draw/client";import{encodePartId as Rr}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as Tr,useEaselStrings as Nr}from"efficient-easel/strings";import{hasPhoneHeight as Pr,hasTabletHeight as Be,resolveSectionMinHeight as kr,resolveTabletHeight as Lr}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as Ar,SECTION_PIN_ABOVE_HINT as Fr,SECTION_PIN_ABOVE_KEY as vr,SECTION_PIN_ABOVE_LABEL as Br,SECTION_PIN_GROUP as Dr,SECTION_PIN_LABEL as Ht,SECTION_PIN_SCREENS_KEY as De,SECTION_PIN_SCREENS_LABEL as Gt,SECTION_PIN_STOP_DEFAULT as Hr,SECTION_PIN_STOP_HINT as Gr,SECTION_PIN_STOP_KEY as Mr,SECTION_PIN_STOP_LABEL as Wr,SECTION_PIN_STOP_OPTIONS as Ur,SECTION_STICK_DISTANCE as H,SECTION_STICK_DISTANCE_ROW as He,SOME_VIEW_PINS as Mt,hasPhoneStick as Kr,hasTabletStick as $r,resolveSectionStick as ae,sectionPinStopOf as Xr,sectionPinStopWrite as Vr}from"../../../format/lib/content/section-sticky.js";import{cssLengthOf as jr}from"../../../format/lib/content/css-length.js";import{SECTION_HEIGHT_MODES as Yr,SECTION_MIN_HEIGHT as zr,SECTION_MIN_HEIGHT_GROUP_LABEL as Q,SECTION_SCREEN_PCT as qr}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as Jr,resolveContainerDirection as Wt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as Zr,BOX_BLOCK_SPACING_POINTS as Ut,BOX_PHONE_ROW_LABEL as Kt,BOX_COLUMNS_MAX as Qr,BOX_COLUMNS_MIN as $t,BOX_PHONE_ROW_MAX as ei,BOX_PHONE_ROW_MIN as Ge,BOX_SHARE_CHOICES as Xt,BOX_SHARE_LABEL as j,boxShareChoiceOf as Vt,boxShareWidthsOf as Me,BOX_SHARE_PHONE_DEFAULT as ti,BOX_SHARE_PHONE_POINTS as ni}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as G}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as jt,BORDER_SIDES as oi,SECTION_BORDER_ROW as Yt,borderBySide as zt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as ri,normalizeTheme as qt,normalizeThemeColors as ii,sectionBandTone as si,surfaceTwoTone as li}from"../../../format/lib/theme.js";import{CONTAINER_GAP as Jt,CONTAINER_GAP_BUILT_IN as ai,CONTAINER_GAP_PHONE as We,GAP_FIELD_CONTAINER as Ue,followsSitePhoneGap as ci,hasOwnContainerGap as ui,hasOwnPhoneGap as Ke,resolveContainerGap as Zt,resolvePhoneContainerGap as Qt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as di,CARD_IMAGE_BG_OFF as pi,CARD_IMAGE_BG_SWATCH_NAMES as fi,CARD_IMAGE_BG_SWATCHES as hi,isCardImageBackgroundInheriting as mi,cardImageBackgroundChoice as gi,THEME_CARD_IMAGE_BG as bi}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as wi,SECTION_BG_NO_FILL as Si,sectionBackgroundChoice as _i,THEME_SECTION_BG as $e,isSectionBackgroundEmpty as yi,sectionBackgroundHex as en}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Ci,nestedAccentValue as tn,resolveSectionAccent as ce}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as xi,TYPE_SIZE_INHERIT as Oi,isTypeSizeInheriting as Ii}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Ei,WIDTH_CHOICE_LABEL as Ri,WIDTH_INHERIT as Ti}from"../../../format/lib/content/section-width.js";import{useEaselSession as Ni}from"efficient-easel/screen/lib/session-context";import{backendOf as Pi}from"../website-session.js";import{BOX_GAP as ki,describedAs as F,group as R,iconOf as Y,sharedStyleKinds as ee}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as nn,onDesktopWords as M,phoneTwinFields as Xe,saidAlignmentGrid as Li,useLengthUnit as Ai}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as Fi,directionField as vi,gapField as Ve,iconPickerRow as on,lengthUnitFields as ue,pickerCellIcon as Bi,pickerNoneIcon as Di,Segmented as de,select as z,slider as W}from"./box-fields.js";import{VIEW_ABOVE as je}from"efficient-easel/screen/lib/content/length-units";import{tierOfView as rn,viewOfTier as Hi}from"../../../format/lib/content/view-tier.js";import{ownEntry as Gi}from"../../../format/lib/own-entry.js";function Xa({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?a(e):e})}function U(e,t){return a("{value} from {from}",{value:e,from:t})}function Mi(){const{blockGap:e}=G();return e===null?a("this container's own spacing"):U(`${e}px`,a("Styles"))}function Wi({inherited:e,onReset:t,label:n}){return i(x,{words:C()?.panel,label:a(n),changed:!e,detail:Mi(),onReset:t})}function Ui(e){return Ve({...ki,builtIn:ai[e],resolve:(t,n)=>Zt(e,t,n?.siteGap),action:(t,n)=>i(Wi,{inherited:!ui(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[Ue]:e}})}function Ki(e){return ut(E("mobile",{[Ue]:e,type:"custom",render:t=>i(Vi,{container:e,...t})}),sn)}function $i(e){return ut(E("tablet",{[Ue]:e,type:"custom",render:t=>i(Xi,{container:e,...t})}),sn)}const sn={not:{field:"gap",in:Array.from({length:-Jt.min},(e,t)=>Jt.min+t)}};function Va(e){return{gap:E("desktop",Ui(e)),[Fe("gap")]:$i(e),[V("gap")]:Ki(e)}}function Xi({container:e,...t}){const[n]=T("gap"),{siteGap:o}=t.field??{},r=Math.max(We.min,Zt(e,n,o));return Ve({...We,builtIn:r,resolve:l=>Ke(l)?l:r,action:(l,c)=>i(x,{words:C()?.panel,label:a("Gap"),changed:Ke(l),detail:M(u=>a(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function Vi({container:e,...t}){const[n]=T("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},s=Qt(e,void 0,n,o,r);return Ve({...We,builtIn:s,resolve:c=>Qt(e,c,n,o,r),action:(c,u)=>i(x,{words:C()?.panel,label:a("Gap"),changed:Ke(c),detail:U(`${s}px`,ci(e,n,r)?a("Styles"):a("Desktop")),onReset:()=>u(void 0)})}).render(t)}function ja(e){return vi({offered:Jr(e),fallback:Wt(e,void 0),resolve:t=>Wt(e,t)})}function Ya(e,t){return eo(t?Qn(e,t):[],t)}function ji({inherited:e,onReset:t,label:n}){return i(x,{words:C()?.panel,label:a(n),changed:!e,detail:U(a("Full"),a("the page")),onReset:t})}function K({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:s,hideable:l=!0,markup:c=!0}){const{text:u,hidden:d}=it(e),h=J(null),p=J(null),f=y=>t(l?{text:y,hidden:d}:y),m=()=>t({text:u,hidden:!d}),g=l&&d,b=ot(),S=r?Zi(r)?i("span",{className:"sf-hint-while-typing",children:a(r)}):a(r):void 0,w=d?a("Show {label} on the slide",{label:a(n)}):a("Hide {label} on the slide",{label:a(n)});return i(_,{label:a(n),icon:i(yo,{}),htmlFor:b,className:g?"is-hidden":void 0,hint:S,action:l?i(Pe,{content:w,children:i(Lt,{"aria-pressed":d,"aria-label":w,onClick:m,children:d?i(Dt,{name:"eye-off",size:14}):i(Dt,{name:"eye",size:14})})}):void 0,children:k("div",{className:"sf-copybox",children:[c&&i(vt,{target:s?p:h,value:u,onChange:f}),s?i("textarea",{id:b,ref:p,value:u,placeholder:o===void 0?void 0:a(o),onChange:y=>f(y.target.value)}):i("input",{id:b,ref:h,type:"text",value:u,placeholder:o===void 0?void 0:a(o),onChange:y=>f(y.target.value)})]})})}function za(e,t){return{...e,[ct]:t}}function qa(e){const t=e[N];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[N]:{...t,offPage:!0}}}function Ja(e){return!e||typeof e!="object"?!1:e[N]?.offPage===!0}function Za(e){if(!e[N])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[ur]:!0}}function Qa(e){return cr(e)}function ec(e){const t=e[N];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[N]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as du,SCALAR_TEXT_CONTROLS as pu}from"efficient-easel/draw";function tc(e,t){if(!e[N])throw new Error("inOwnBox: the field holds no authored text");const{[sr]:o,...r}=e;return{...r,[ar]:!0,render:t}}const Yi=new Set(Sr),pe={type:"radio",options:[{value:!0},{value:!1}]},ln={text:{type:"object",objectFields:{text:{type:"text"},hidden:pe}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:pe}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},$=(e,t)=>{const n=F({...t,[N]:e},{...ln[e.control],label:e.label});if(!Yi.has(e.control))return n;const o=t.render;return{...Bt(n,"authored-copy"),render:r=>i(pr,{name:r.name,children:o(r)})}},nc="Everything else on this block comes from the linked post. Unlink it to edit by hand.",zi={field:"source.slug",set:!0},oc={not:zi},qi="Select a word, then press the highlighter.",Ji=new Set([qi]),Zi=e=>Ji.has(e);function rc(e,t,n){return $({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function ic(e,t,n){return $({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function sc(e,t,n){return $({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function lc(e,t,n){return $({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function ac(e){return{type:"custom",[lt]:{label:e},...F({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(Or,{value:st(t),onChange:n,label:e})}}function cc(e,t,n){return $({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const uc={Design:oo,Animation:io};function dc(e,t){return{type:"custom",render:()=>i(Qi,{text:e,values:t})}}function Qi({text:e,values:t}){return i("p",{className:"sf-note",children:a(e,t)})}function pc(e){return Ce(e)!==null&&e?.tabs!==void 0}const an=new Map;function fc(e,t){const n=`${e}\0${t?t.join(""):""}`,o=an.get(n)??{type:"custom",tabs:t,[ye]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(L,{})};return an.set(n,o),o}const cn=new Map;function hc(e){const t=cn.get(e)??{type:"custom",[ye]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(L,{})};return cn.set(e,t),t}function es(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function mc(e,t){return es(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(L,{})}}function gc(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>i(L,{})}}function bc({title:e,children:t}){const[n,o]=Z(()=>!Ye.has(e));return i(Fo,{title:e,open:n,onToggle:r=>{o(r),r?Ye.delete(e):Ye.add(e)},children:t})}const Ye=new Set;function ts({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),s=r?o?.[r]:void 0,l=s?a(s):t;return k("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?a(o[c]):c;return i(Pe,{content:u,children:i(Yo,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:l})]})}function wc(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(ns,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function ns({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const s=typeof o=="string"?o:void 0,{colors:l,n:c}=Qe(),u={background:l.background,surface:l.surface,surface2:li(l),band:si(l)},d=n?$e:t,h=yi(s,t,d),p=en(void 0,d,u),f=n?wi:void 0,m=d===$e?a("the theme's section background"):a("Theme {n} background",{n:c}),g=os(s,t,l,c,u,r),b=U(p.toUpperCase(),m),S=ke(s),w=S?le(S,l,c):null;return w?i(se,{label:a(e),icon:i(ft,{}),value:w.hex,caption:w.words,onChange:r,changed:!0,onReset:()=>r(f),resetTo:b,choices:g}):i(Ft,{label:a(e),icon:i(ft,{}),value:h?"":en(s,t,u),inherited:p,resetTo:b,onChange:r,onReset:()=>r(f),choices:g})}function os(e,t,n,o,r,s){const l=_i(e,t);return[{label:a("No fill"),color:"",selected:l==="none",onPick:()=>s(Si)},{label:`${a("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:l==="band",onPick:()=>s($e)},...Ze(ke(e)??"",n,o,s)]}function rs(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,s=mi(r,t);return i(_,{label:a(e),icon:i(Ee,{}),changed:!s,action:i(x,{words:C()?.panel,label:a(e),changed:!s,detail:a("the theme's image stage"),onReset:()=>o(di)}),children:ts({swatches:hi,current:s?bi:gi(r,t),onPick:o,names:fi})})}}}function Sc(e=n=>n,t){return ee({_gSectionTheme:R(Ci),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(Cr,{value:e(n),onChange:o,followLabel:t})}})}function fe(e){const t=I(),n=rn(e?.view),o=l=>ve(e.valueKey,l),r=e.numbersIn??(l=>X(t[o(l)])!==void 0),s=e.followsView??Ss(n,r);return Ai({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:Fi,label:a(e.label),grid:e.grid,hasOwn:r(n),view:{tier:n,numbersIn:r,followsView:s},convertTo:e.convertTo??(l=>{const c=X(t[o(n)]);return c===void 0?{}:{[o(n)]:l(c)}})})}function q({min:e,max:t,step:n,value:o,onChange:r,suffix:s="",readout:l=!0,notch:c,ariaLabel:u,disabled:d=!1,placeholder:h,placeholderWord:p,onClear:f,units:m}){const g=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:g?"sf-slider has-notch":"sf-slider",style:g?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(or,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...p?{emptyLabel:a(p)}:{},suffix:s||void 0,...m?{units:m}:{},showInput:l,label:u===void 0?void 0:a(u),disabled:d,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:b=>{b===null?f?.():b!==o&&r(b)}})})}function is(e,t){const{min:n,max:o,step:r=1,unsetLabel:s,hint:l,restTrack:c,unsetMark:u,icon:d,unit:h="px"}=t;return{type:"custom",render:({value:p,onChange:f})=>{const m=typeof p=="number"?p:null,g=m===null;return i(_,{label:a(e),icon:d?Y(d):void 0,value:g?u||s===void 0?void 0:a(s):`${m}${h}`,changed:!g,action:u?_e(u,{changed:!g,onReset:()=>f(null)}):i(x,{words:C()?.panel,label:a(e),changed:!g,onReset:()=>f(null)}),hint:typeof l=="string"?a(l):l,children:c?c({min:n,max:o,step:r,px:m,label:e,onChange:f}):q({min:n,max:o,step:r,value:m??n,readout:!1,ariaLabel:e,onChange:f})})}}}const te="Corners",ss={kind:"radius"};function ze(e){return{type:"custom",render:t=>{const{value:n,onChange:o}=t,r=typeof n=="number"&&Number.isFinite(n)?n:null,s=r!==null;return i(_,{label:a(te),icon:i(mt,{}),changed:s,action:_e(e.mark,{changed:s,onReset:()=>o(null)}),hint:e.hint,children:i(ls,{tier:e,px:r,name:t.name,onRadius:o})})}}}function T(e){const t=B();return[t?.values?.[e],n=>t?.onChange(e,n)]}function un(){return Bt({type:"custom",render:()=>i(lr,{})},"always")}function he(){const e=B();return t=>e?.onChangeMany(t)}function ls({tier:e,px:t,name:n,onRadius:o}){const r=e.useFollowed(),[s,l]=T(e.sidesKey),c=he(),u=fe({row:e.row??ss,label:te,grid:{min:A,max:xe,step:e.step??1},valueKey:n??"",view:"desktop"}),d=Rt(s)??[...It];return i(zo,{label:a(te),value:d,corners:No,onChange:h=>{const p=Rt(h)??[];l(p.length===It.length?null:p)},radius:t,onRadiusChange:u&&n?h=>c({[n]:h,...u.unitPatch(h===null)}):o,radiusMin:u?.grid.min??A,radiusMax:u?.grid.max??xe,radiusStep:u?.grid.step??e.step??1,radiusPlaceholder:u&&u.unit!=="px"?"–":String(r),...u?{radiusUnit:u.unit,units:u.units}:{}})}function dn(e,t){return ue(e,t)}function pn(){return un()}function as({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=G(),r=typeof o=="number"?`${o}px`:a("not set");return i(x,{words:C()?.panel,label:a(e),changed:t,detail:o==null?a("the built-in corners"):U(r,a("Styles")),onReset:n})}function cs(){const{cornerRadiusPx:e}=G();return typeof e=="number"?e:A}function us(){return ze({sidesKey:"sectionCornerSides",row:Et,useFollowed:cs,mark:i(as,{label:te}),hint:ds})}const ds="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function _c(){return ee({_gShape:R("Shape"),sectionCorners:us(),...dn(Et,"sectionCorners"),sectionCornerSides:pn(),...D("sectionBorder",ws),...ue(Yt,"sectionBorder",{tablet:!0,phone:!0})})}const ps=()=>({width:a("Border width"),sides:{top:a("Border top"),right:a("Border right"),bottom:a("Border bottom"),left:a("Border left")},style:a("Border style"),styles:{solid:a("Solid"),dashed:a("Dashed"),dotted:a("Dotted")},color:a("Border color"),unit:"px"});function fs(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function hs(){let e;try{const t=qt(G().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||ri.line}function ms({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:s=!0,above:l={},length:c}){const u=e&&typeof e=="object"?e:{},[d,h]=Z(()=>r?Go(u,l):!1),p=ps(),f=m=>fs(r&&s?m:{width:m.width,color:m.color,...s?{style:m.style}:{}});return i(_,{label:a("Border"),icon:i(so,{}),action:r?i(Do,{each:d,label:a("Each side"),onChange:h}):void 0,children:i(Bo,{label:a("Border"),value:u,each:d,onChange:m=>t(f(m)),placeholder:n,presets:o,words:c?{...p,unit:c.unit}:p,styles:s,max:c?.grid.max??jt,...c?{step:c.grid.step,units:c.units}:{}})})}function gs({value:e,onChange:t,view:n}){const[o]=T("sectionBorder"),[r]=T(Fe("sectionBorder")),s=hs(),l=f=>f&&typeof f=="object"?f:{},c=n==="phone"?{...zt(l(o)),...zt(l(r))}:n==="tablet"?l(o):{},u=I(),d=he(),h=O("sectionBorder",n),p=fe({row:Yt,label:"Border",grid:{min:0,max:jt,step:1},valueKey:"sectionBorder",view:n,numbersIn:f=>qe(u[ve("sectionBorder",f)]),convertTo:f=>{const m=l(u[h]);return qe(m)?{[h]:bs(m,f)}:{}}});return i(ms,{value:e,length:p,onChange:p?f=>d({[h]:f,...p.unitPatch(!qe(f))}):t,placeholder:{sides:Ho(c),style:c.style??"solid",color:c.color||s},presets:[s],above:c})}const fn=["width",...oi];function qe(e){if(!e||typeof e!="object")return!1;const t=e;return fn.some(n=>X(t[n])!==void 0)}function bs(e,t){const n={...e};for(const o of fn){const r=X(n[o]);r!==void 0&&(n[o]=t(r))}return n}function ws(e){return{type:"custom",render:({value:t,onChange:n})=>i(gs,{value:t,onChange:n,view:e})}}function Ss(e,t){let n=je[e];for(;n&&je[n]!==null&&!t(n);)n=je[n];return n??e}function yc(e){return{type:"custom",render:()=>i(_s,{partKey:e})}}function _s({partKey:e}){const[t]=T("id"),[n]=T("_partStyles"),{textStyles:o}=G(),r=Nr();let s=null;try{s=Er().select}catch{s=null}const l=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(Ao,{name:a("Text"),preview:Ir(l,c,{noStyle:a("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??Tr.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(Rr(t,e))}})}function hn(e){const{cornerRadiusPx:t}=G(),n=typeof t=="number"?t:e;let o=null;try{const{appState:s,selectedItem:l}=re(u=>u),c=l?.props?.id?String(l.props.id):void 0;o=c?Lo(s?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Po(r)?r:n}function ys({label:e,changed:t=!1,onReset:n=()=>{}}){const o=hn(A);return i(x,{words:C()?.panel,label:a(e),changed:t,detail:U(`${o}px`,a("the section")),onReset:n})}function Cs(){return i(L,{children:a("Follows the section's Corners until you set a number here.")})}function xs(){return ze({sidesKey:"cardCornerSides",row:Tt,useFollowed:()=>hn(A),mark:i(ys,{label:te}),hint:i(Cs,{})})}function Os(){return{type:"custom",render:()=>i(Gn,{})}}function Cc(){return{_gShape:R("Shape"),cardCorners:xs(),...dn(Tt,"cardCorners"),cardCornerSides:pn(),cardCornersApplyAll:Os()}}function Is(){return F({type:"custom",render:e=>i(Rs,{...e})},{type:"select",label:j,options:[{value:"content",label:"Fit content"},{value:"equal",label:"Equal"},{value:[50],label:"Custom: the width of each block in %, the last block left out"}]})}function Es(e,t){const n=Vt(e);if(n!=="custom")return a(Xt.find(r=>r.value===n)?.label??"");const o=kt(Me(e,t),t);return o?[...o,100-o.reduce((r,s)=>r+s,0)].join(" / "):a("Custom")}function Rs(e){const{value:t,onChange:n}=e,[o]=T("content"),r=Array.isArray(o)?o.length:0,s="follows"in e,l=t!=null,c=l?t:s?e.follows:void 0,u=Vt(c),d=r>=2&&r<=Pt,h=()=>[...er[r]??[]],p=J(null),f=w=>{const y=p.current;y&&JSON.stringify(w)===JSON.stringify(y.shares)?n(y.value):w&&n(w)},m=w=>{w===u||w==="custom"&&!d||n(w==="custom"?h():w)},g=a("The width bar works for 2 to {count} blocks.",{count:Pt}),b=l&&(s||t!=="content"),S=nr().widths.hint(r,Qo);return i(_,{label:a(j),icon:i(Ie,{}),changed:b,hint:u!=="custom"?void 0:d?S:g,action:i(x,{words:C()?.panel,label:a(j),changed:b,disabled:e.readOnly===!0,detail:s?M(w=>a(w),Es(e.follows,r),e.followsView):a("Fit content"),onReset:()=>n(void 0)}),children:k("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(Nt,{label:a(j),value:u,options:Xt.map(w=>({value:w.value,label:w.value==="custom"&&!d?g:a(w.label),icon:Bi(i("span",{className:"sf-gallery-pic sf-share-pic",children:mn(w.weights).map((y,v)=>i("i",{style:{gridColumn:`span ${y}`}},v))}),a(w.label),w.value==="custom"&&!d?g:a(w.label))})),onChange:m,columns:3,cell:gn,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&d?i("div",{onFocus:()=>{p.current={value:t,shares:kt(Me(c,r),r)}},onBlur:()=>{p.current=null},children:i(tr,{label:a(j),count:r,value:Me(c,r),onChange:f,readOnly:e.readOnly===!0})}):null]})})}function mn(e){if(!e)return[3,4];const t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function xc(){return z(Zr,i(ho,{}),Ut,Ut[0].value)}function Oc(){return E("mobile",on(j,i(Ie,{}),ni.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:mn(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),ti,{columns:2,cell:gn}))}const gn={width:"5.75rem",height:"3.25rem"};function Ic(){return Xe("share",Is(),nn)[Fe("share")]}function Ts(){return E("mobile",W(Kt,i(ht,{}),Ge,ei,1,Ge,"",{clear:{phoneFollows:!1,hint:Ge}}))}const bn={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function Ec(){const e=W(Kt,i(ht,{}),$t,Qr,1,$t,"",{clear:{emptyLabel:"Auto"}}),t=Xe("columns",e,{...bn,tablet:nn.tablet}),n=Xe("columns",e,bn,{phoneRow:Ts()});return{...t,phoneRow:n.phoneRow}}function Rc(e,t,n,o,r,s,l){return{type:"custom",render:({value:c,onChange:u,name:d})=>i(Ns,{label:e,min:t,max:n,step:o,fallback:r,role:s,value:c,onChange:u,name:d??"",length:l})}}function Ns({label:e,min:t,max:n,step:o,fallback:r,role:s,value:l,onChange:c,name:u,length:d}){const h=I(),p=he(),f=rn(d?.view),m=fe({row:d?.row??{kind:"fontSize"},label:e,grid:{min:t,max:n,step:o},valueKey:d?u:"",view:d?.view??"desktop",numbersIn:b=>b===f&&typeof h[u]=="number",followsView:f,convertTo:b=>typeof h[u]=="number"?{[u]:b(h[u])}:{}}),g=b=>m?p({[u]:b,...m.unitPatch(typeof b!="number")}):c(b);return i(_,{label:a(e),icon:i(xt,{noun:s}),action:i(x,{words:C()?.panel,label:a(e),changed:!Ii(l),detail:a("the Text style in Styles"),onReset:()=>g(Oi),defaultAction:{onPress:()=>g(xi),title:a("Keep this section's own built-in size"),icon:i(lo,{})}}),children:q({min:m?.grid.min??t,max:m?.grid.max??n,step:m?.grid.step??o,value:typeof l=="number"?l:r,...m?{suffix:m.unit,units:m.units}:{suffix:"px"},ariaLabel:e,onChange:g})})}function Tc(){return{_gCellWidth:R("Cell width"),gridSpan:z("Positions",i(Ie,{}),[{label:"Auto",value:""},...Array.from({length:Xn},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function I(){let e=null,t=null;try{e=nt(Ps),t=re(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Ps=Tn(null);function ks({min:e,max:t,step:n,px:o,label:r,onChange:s,desktopKey:l,fallback:c}){const u=I()[l],d=Ae(void 0,u,c);return i(L,{children:q({min:e,max:t,step:n,value:Ae(o,u,c),readout:!1,ariaLabel:r,notch:d,onChange:s})})}function Ls({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:s=()=>{}}){const l=I()[t],c=Ae(void 0,l,n);return i(x,{words:C()?.panel,label:a(e),changed:r,detail:M(u=>a(u),`${c}${o}`),onReset:s})}function As(e){return is(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(Ls,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(ks,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Fs={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},vs={Top:Re,Bottom:St,Left:_t,Right:yt},Bs=e=>{const t=vs[e];return i(t,{})};function Nc(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=S=>Fs[S],s=S=>W(r("Top"),i(Re,{}),P.min,P.max,P.step,S,"px"),l=(S,w,y,v=P)=>E("mobile",As({label:r(S),icon:Bs(S),desktopKey:w,min:v.min,max:v.max,step:v.step,fallback:y})),c=e.top??P.min,u=e.bottom??P.min,d="sectionPaddingLeft",h="sectionPaddingRight",p=e.sideBounds??P,f=e.side??p.min,m=e.sidePhone??f,g=e.phone===!0,b=S=>g?E("desktop",S):S;return ee({...o?{_gSpacing:R("Padding")}:{},[t]:b(s(c)),...g?{[V(t)]:l("Top",t,c)}:{},...e.only==="top"?{}:{[n]:b(W(r("Bottom"),i(St,{}),P.min,P.max,P.step,u,"px")),...g?{[V(n)]:l("Bottom",n,u)}:{}},...e.sides?{[d]:b(W(r("Left"),i(_t,{}),p.min,p.max,p.step,f,"px")),...g?{[V(d)]:l("Left",d,m,p)}:{},[h]:b(W(r("Right"),i(yt,{}),p.min,p.max,p.step,f,"px")),...g?{[V(h)]:l("Right",h,m,p)}:{}}:{}})}function Pc(e,t){const n=Object.fromEntries(Object.entries(t).map(([s,l])=>[s,s in e&&Ce(l)?e[s]:l])),o={};let r=!1;for(const[s,l]of Object.entries(e)){if(s in t){r||Object.assign(o,n),r=!0;continue}o[s]=l}return r||Object.assign(o,n),o}const me="Width";function kc(e,t=Ei,n=!0){const o=t.map(r=>({label:Ri[r],value:r}));return ee({...n?{_gWidth:R(me)}:{},widthMode:{type:"custom",render:({onChange:r,field:s})=>i(_,{label:a(me),icon:i(Co,{}),action:n?i(ji,{inherited:s?.inherited??!1,onReset:()=>r(Ti),label:me}):void 0,children:de({options:o,value:s?.currentValue||e,onChange:r,ariaLabel:me})})}})}function Lc({fill:e=!1}={}){const t=(r,s)=>({type:"custom",render:({value:l,onChange:c})=>i(Ds,{value:l,onChange:c,view:r,badge:s,fill:e})}),n=()=>Le("sectionHeightMode"),o=()=>Le("sectionHeightMode");return ee({_gHeight:R(Q),...D("sectionHeightMode",r=>r==="desktop"?t(r):t(r,s=>i(Ws,{view:r,onClear:()=>s(void 0)}))),...D("sectionHeightValue",n),...D("sectionHeightUnit",o)})}function Ds({value:e,onChange:t,view:n,badge:o,fill:r=!1}){const s=I(),{mode:l,number:c,unit:u}=Hs(n,s,e);return i(_,{label:Q,icon:Y(i(bt,{})),action:o?o(t):void 0,children:k("div",{className:"es-width-stack",children:[de({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"},...r?[{label:"Fill",value:"fill"}]:[]],value:l,onChange:t,ariaLabel:Q}),c?i(Ms,{view:n,mode:l,menu:u}):null]})})}function wn(e,t){return e==="phone"&&Be(t)?Lr(t):kr(t)}function ge(e,t){return e==="desktop"||(e==="tablet"?Be(t):Pr(t))?null:wn(e,t)}function Hs(e,t,n){const r=(s=>Yr.includes(s))(n)?n:ge(e,t)?.mode??"auto";return{mode:r,number:r!=="auto"&&r!=="fill",unit:r==="fixed"}}function Gs(e,t,n,o){const r=ge(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[O("sectionHeightMode",e)]:r.mode,...r.mode==="fixed"?{[O("sectionHeightUnit",e)]:r.unit}:{},...n==="sectionHeightUnit"?{[O("sectionHeightValue",e)]:r.value}:{},[O(n,e)]:o}}function Sn(e,t,n){const o=B(),r=ge(e,I());return!o||!r?{followed:null,write:n}:{followed:r,write:l=>o.onChangeMany(c=>{const u=Gs(e,c,t,l);return u===null?{[O(t,e)]:l}:Object.keys(u).length?u:null})}}function Ms({view:e,mode:t,menu:n}){const o=B(),r=I(),s=O("sectionHeightValue",e),l=O("sectionHeightUnit",e),c=S=>w=>o?.onChangeMany(()=>({[S]:w})),{followed:u,write:d}=Sn(e,"sectionHeightValue",c(s)),{write:h}=Sn(e,"sectionHeightUnit",c(l)),p=t==="screen"?"%":r[l],f=(u?u.unit:p)==="%"?"%":"px",m=f==="%"?qr:zr,g=r[s],b=n?{options:["px","%"],label:a("Unit"),onChange:S=>h(S)}:void 0;return q({min:m.min,max:m.max,step:m.step,value:u?null:typeof g=="number"?g:m.fallback,...u?{placeholder:u.value}:{},suffix:f,...b?{units:b}:{},ariaLabel:Q,onChange:d})}function Ws({view:e,onClear:t}){const n=I(),o=ge(e,n)===null,r=e==="phone"&&Be(n),s=wn(e,n),l=M(c=>a(c),s.mode==="auto"?a("Auto"):`${s.value}${s.unit}`,r?"tablet":"desktop");return i(x,{words:C()?.panel,label:a(Q),changed:o,detail:l,onReset:t})}function Ac(e={}){const t=e.intro===!0,n=s=>({type:"custom",render:({value:l,onChange:c,id:u,name:d})=>i(Ys,{value:l,onChange:c,labelId:`${u??d??"stickTop"}-label`,view:s,intro:t})}),o=s=>({type:"custom",render:({value:l,onChange:c})=>i(Xs,{value:l,onChange:c,view:s,intro:t})}),r=s=>({type:"custom",render:({value:l,onChange:c})=>i(Vs,{value:l,onChange:c,view:s,intro:t})});return{_gStick:R(Dr,{dot:t?$s:Mt}),...D("stickTop",n),...D("stickTopDistance",o),...ue(He,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?D(De,r):{},...t?{}:{[Mr]:Us()},...t||e.above===!1?{}:{[vr]:Ks()}}}function Us(){const e=z(Wr,i(Re,{}),Ur,Hr);return E("desktop",{...e,render:t=>{const n=e.render({...t,value:Xr(t.value),onChange:o=>t.onChange(Vr(o))});return _e(n,{hint:a(Gr)})}})}function Ks(){const e=Cn(Br,!1,i(Ct,{}),Fr);return E("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}const $s={any:[Mt,Ar]};function _n(e,t,n,o,r){const s=B(),l=I(),c=e==="desktop"||ne(e,l)?null:Je(e,ae(l,{intro:o}));return{followed:c,write:(c||r)&&s?d=>s.onChangeMany(h=>{const p=js(e,h,d,t,o),f=p===null?{[O(t,e)]:d}:p;return Object.keys(f).length?{...f,...r?.(d)??{}}:null}):n}}function Xs({value:e,onChange:t,view:n,intro:o}){const r=I(),s=ae(r,{intro:o}),l=h=>{const p=Hi(h);return p==="desktop"||ne(p,r)},c=fe({row:He,label:"Distance from top",grid:{min:H.min,max:H.max,step:H.step},valueKey:"stickTopDistance",view:n,numbersIn:h=>l(h)&&X(r[ve("stickTopDistance",h)])!==void 0,followsView:n==="phone"&&s.ownTablet?"tablet":"desktop"}),{followed:u,write:d}=_n(n,"stickTopDistance",t,o,c?h=>c.unitPatch(h===void 0):void 0);return i("div",{className:"sf-field",children:q({min:c?.grid.min??H.min,max:c?.grid.max??H.max,step:c?.grid.step??H.step,value:u?null:typeof e=="number"?e:H.fallback,...u?{placeholder:u.distance}:{},...c?{suffix:c.unit,units:c.units}:{suffix:"px"},ariaLabel:a("Distance from top"),onChange:d})})}function Vs({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:s}=_n(n,De,t,o);return i(_,{label:a(Gt),icon:Y(i(bt,{})),children:q({min:ie.min,max:ie.max,step:ie.step,value:r?null:X(e)??ie.default,...r?{placeholder:r.screens}:{},ariaLabel:a(Gt),onChange:s})})}function ne(e,t){return e==="tablet"?$r(t):Kr(t)}function Je(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance,unit:t.tabletUnit,screens:t.tabletScreens}:{on:t.desktop,distance:t.desktopDistance,unit:t.desktopUnit,screens:t.desktopScreens}}function js(e,t,n,o="stickTopDistance",r=!1){if(e==="desktop"||ne(e,t))return null;if(n===void 0)return{};const s=Je(e,ae(t,{intro:r})),l=e==="phone"&&ne("tablet",t)?h=>O(h,"tablet"):h=>h,c=(h,p)=>t[l(h)]==null?{}:{[O(h,e)]:p},u=He.unitKey,d=t[l(u)]==null?{}:{[O(u,e)]:s.unit};return{[O("stickTop",e)]:!0,...c("stickTopDistance",s.distance),...d,...c(De,s.screens),[O(o,e)]:n}}function Ys({value:e,onChange:t,labelId:n,view:o,intro:r}){const s=I(),l=ae(s,{intro:r}),c=o==="phone"?l.phone:o==="tablet"?l.tablet:r?l.desktop:e===!0,u=o==="phone"&&l.ownTablet,d=o==="desktop"?null:Je(o,l),h=d?.on?jr(d.distance,d.unit):a("Off");return i(_,{label:a(Ht),labelId:n,icon:Y(i(Ct,{})),action:k(L,{children:[o!=="desktop"?i(x,{words:C()?.panel,label:a(Ht),changed:ne(o,s),detail:M(p=>a(p),h,u?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(Ne,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const yn="e.g. about";function Fc(){return{_gAnchor:R("Anchor"),anchor:$({control:"plainText",label:"Name",placeholder:yn},{type:"custom",render:({value:e,onChange:t})=>i(to,{value:e,onChange:t,nameBox:(n,o)=>i(K,{value:n,onChange:o,label:"Name",placeholder:yn,hideable:!1,markup:!1})})})}}function vc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:l})=>{const c=`${s??l??e}-datetime`,u=Date.parse(typeof o=="string"?o:"");return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(Jo,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:d=>r(d?d.toISOString():"")})})}}}function Bc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:l})=>{const c=`${s??l??e}-date`;return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(qo,{id:c,value:kn(typeof o=="string"?o:null),onChange:u=>r(u?Pn(u):"")})})}}}function Cn(e,t,n,o){return{type:"custom",...F({},{...pe,label:e}),render:r=>{const{value:s,onChange:l,id:c,name:u}=r,d="follows"in r,h=r,p=typeof s=="boolean",f=typeof h.follows=="boolean"?h.follows:t,m=p?s:d?f:t,g=`${c??u??e}-label`,b=h.readOnly===!0,S=i(Ne,{checked:m,onChange:l,disabled:b,ariaLabelledBy:g});return i(_,{label:a(e),labelId:g,icon:n,hint:o===void 0?void 0:a(o),action:d?k(L,{children:[i(x,{words:C()?.panel,label:a(e),changed:p,detail:h.followsNoView?a(f?"On":"Off"):M(w=>a(w),a(f?"On":"Off"),h.followsView),disabled:b,onReset:()=>l(void 0)}),S]}):S})}}}function Dc(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(zs,{label:"Background",icon:i(wo,{}),id:r,value:e,shown:xo(e),onChange:t})}}}function Hc(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(se,{label:a(e),icon:n,value:o||t,onChange:r})}}function zs({label:e,icon:t,id:n,value:o,shown:r,onChange:s}){const{colors:l,n:c}=Qe(),u=ke(o),d=u?le(u,l,c):null;return i(se,{label:a(e),icon:t,id:n,value:d?d.hex:r,caption:d?.words,onChange:s,choices:Ze(u??"",l,c,s)})}function Gc(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(qs,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function Ze(e,t,n,o){const r=Te(e);return ir(t,n).map(s=>({label:s.label,color:s.value,selected:r===s.name,onPick:()=>o(s.name)}))}function qs({value:e,onChange:t,twin:n}){const{colors:o,n:r}=Qe(),s=o.background,l=U(s.toUpperCase(),a("Theme {n} background",{n:r})),[c,u]=T(Oo),[d]=T(Eo),h=typeof d=="string"&&d.trim()!=="",p=Ot(c),f=oe=>u(Ot(oe)||void 0),m=Te(e),g=m?le(m,o,r):null,b=Ze(e,o,r,t),S=n?()=>t(void 0):()=>t("");let w=s,y=l;if(n){const oe=Te(n.follows),we=Ro(n.follows),Se=oe?le(oe,o,r):we?{hex:we,words:we.toUpperCase()}:null;w=Se?.hex??s,y=M(Rn=>a(Rn),Se?Se.words:l,n.view)}const v=!n&&(To(e)||h)?i(Js,{value:p,onChange:f}):null;return g?i(se,{label:a("Fill"),icon:i(Ee,{}),value:g.hex,caption:g.words,onChange:t,changed:!0,onReset:S,resetTo:y,choices:b,children:v}):i(Ft,{label:a("Fill"),icon:i(Ee,{}),value:e,inherited:w,resetTo:y,onChange:t,onReset:S,choices:b,children:v})}function Js({value:e,onChange:t}){return de({options:Io.map(n=>({label:n.label,value:n.value,hint:n.hint})),value:e,onChange:t,ariaLabel:a("Fill")})}function Zs(e,t,n){if((e?.content??[]).some(l=>l?.props?.id===t))return ce(n);const r=ko(e,t);if(r.length===0)return null;const s=ce(tn(n));if(s!==null)return s;for(let l=r.length-1;l>0;l-=1){const c=ce(tn(r[l].sectionAccent));if(c!==null)return c}return ce(r[0].sectionAccent)}function Qe(){const e=qt(G().theme),[t]=T("sectionAccent");let n=null;try{const{appState:r,selectedItem:s}=re(c=>c),l=s?.props?.id?String(s.props.id):void 0;n=l?Zs(r?.data,l,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:ii(e.themes[o]),n:o+1}}function Mc(){return un()}const Wc={top:i(po,{}),right:i(uo,{}),bottom:i(ao,{}),left:i(co,{})};function Uc(e,t,n,o,r,s,l){const c=p=>t.find(f=>f.value===p),u=p=>({value:p,label:"",disabled:!0,title:o}),d=p=>{const f=t.find(g=>g.cell===p);if(!f)return u(`missing-${p}`);const m=s?.[p];return m?{value:f.value,label:f.label,icon:m}:{value:f.value,label:f.label}},h=[u("corner-top-left"),d("top"),u("corner-top-right"),d("left"),u("centre"),d("right"),u("corner-bottom-left"),d("bottom"),u("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:f})=>{const m=t.some(g=>g.value===p)?p:n;return i(_,{label:a(e),icon:r,value:c(m)?.label?a(c(m).label):l?a(l):"",children:Li(a,{label:e,value:m,onChange:f,points:h})})}}}function Kc(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:s})=>i(yr,{label:e,options:(s.options??t).map(l=>({...l,label:a(l.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:a(n)}:{}})}}function $c(e,t,n,o){return{type:"custom",options:t,fallback:n,...F({},{type:"select",label:e}),render:({value:r,onChange:s,field:l})=>i(xr,{label:e,options:(l.options??t).map(c=>({...c,label:a(c.label)})),fallback:l.fallback??n,value:r,onChange:s,placeholder:o===void 0?void 0:a(o)})}}function Xc(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const Vc=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function jc(e,t,n){const o=Object.keys(rt).map(r=>({label:rt[r],value:r,picture:n[r]}));return{type:"custom",...F({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(el,{label:e,icon:t,options:o,onChange:r})}}function Qs(e,t,n){const o=Ln(e,t,n);if(o!==void 0)return o==="save-makes-frame"?a("A frame is made from this video when you save the page."):o==="starts-dark"?a("This video starts dark, so no frame was made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="outside"?a("This video is on another website, so no frame can be made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="unsupported"?a("This video's file type gives no frame. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="failed"?a("No frame could be made from this video. It is tried again the next time you save the page. The slide shows its background colour while the video loads."):o==="image-no-frame"?a("The slide shows your Image while the video loads, because this video has no frame."):void 0;const r=Fn(e);return r==="frame-missing-image"?a("This video has no frame yet. The slide shows its image until one is made."):r==="frame-missing-surface"?a("This video has no frame yet. The slide shows its background colour until one is made."):r==="image-missing-frame"?a("No image yet. The slide shows the video's frame until you choose one."):r==="image-missing-surface"?a("No image yet. The slide shows its background colour until you choose one."):void 0}function el({label:e,icon:t,options:n,onChange:o}){const r=B(),s=r?.values??{},l=An(s),c=nt(Dn),u=Bn(c?.docId??null);let d=null;try{d=re(p=>p.appState.data)}catch{d=null}const h=vn(r?.id,d,u);return i(_,{label:a(e),icon:Y(t),hint:Qs(s,h,c?.hasUnsavedEdits??!1),children:de({options:n,value:l,onChange:o,ariaLabel:e})})}function Yc(e,t,n,o={}){const r={type:"custom",[at]:!0,render:({value:s,onChange:l,name:c})=>i(_r,{value:s||"",onChange:l,fieldKey:c,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame}),...o.focus?{focusKey:o.focus}:{},...o.focusWhen?{focusWhen:o.focusWhen}:{}};return o.focus?E("each",r):r}const zc={HeroSingle:["imageFocal"],HeroSlide:["videoFrame","videoFramePhone"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function tl(e){const t=a(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function qc({value:e,onChange:t,label:n}){const o=e||{},r=B(),s=r?r.values!==r.node.props:!0,l=!!o.pending&&s,c=!!o.pending&&!s,u=!!Pi(Ni()).geocode,d=ot(),h=(p,f)=>t({...o,[p]:f??void 0});return k(L,{children:[i(_,{label:a(n),icon:i(wt,{}),action:u?i(Pe,{content:a("Find from the address (OpenStreetMap)"),children:i(Lt,{"aria-label":a("Find from the address"),"aria-busy":l||void 0,disabled:l,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(So,{})})}):void 0,children:u&&o.status?i(no,{compact:!0,oneLine:!0,spaced:!1,status:l?"busy":o.ok&&!c?"found":"notfound",statusText:l?a("Finding…"):c?a(rr):a(o.status),hint:tl(o)}):null}),i(_,{label:a("Enter by hand"),labelId:d,icon:i(fo,{}),action:i(Ne,{checked:!!o.manual,onChange:p=>t({...o,manual:p}),ariaLabelledBy:d})}),o.manual&&i(_,{label:a("Latitude, longitude"),icon:i(wt,{}),children:k("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(At,{value:typeof o.lat=="number"?o.lat:null,onChange:p=>h("lat",p),min:-90,max:90,step:1e-4,placeholder:a("Latitude")}),i(At,{value:typeof o.lng=="number"?o.lng:null,onChange:p=>h("lng",p),min:-180,max:180,step:1e-4,placeholder:a("Longitude")})]})})]})}function nl(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function ol(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,s)=>s===t?{text:n}:r)}function Jc(e,t){return e===null?null:t>e?e:null}function rl(e,t,n){if(n===null||n>=t.length)return null;for(let o=0;o<n;o+=1)if(e[o]!==t[o])return null;return e[n]!==t[n]&&t.includes(e[n])||e[n]!==t[n]&&t.length!==e.length?null:n}const Zc={label:"Ticker items",icon:i(bo,{})};function Qc(e,t,n,o){return{type:"custom",[N]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...F({},{...ln.textList,label:e}),render:({value:r,onChange:s})=>i(il,{label:e,icon:Y(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:s,markup:o==="markup"})}}function il({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:s=!1}){const l=J(null),[c,u]=Z(null),d=p=>p.map(f=>({text:f?.text??""})),h=p=>{const f=rl(n,p,c);f===null&&(l.current=null),u(f),r(d(p))};return i(Mo,{label:a(e),icon:t,noun:a("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:s?i(vt,{target:l,value:nl(n,c),onChange:p=>r(ol(n,c??-1,p)),disabled:c===null,label:c===null?a("Formatting — click a row first"):a("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,f,m)=>i("input",{type:"text",className:s&&c===f?"sf-list-marking":void 0,value:p?.text??"",placeholder:a(o),"aria-label":a("{label} {n}",{label:a(e),n:f+1}),onChange:g=>m({text:g.target.value}),onFocus:g=>{l.current=g.currentTarget,u(f)}})})}function eu(e,t){const n=`${e.label} — row ${t+1}`;return $({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:a("{label} — row {n}",{label:a(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function tu(e){return{_gCards:R("Cards"),coverIndex:z("Cover image",i(go,{}),br,String(wr),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:rs("Image background",pi),cardImage:xn()}}function nu(){return{outline:z("Card outline",i(_o,{}),hr,gr),indexBadge:z("Card number",i(mo,{}),fr,mr),showBadge:Cn("Product badge",!0,i(xt,{noun:"tag"}))}}function ou(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...pe,label:be.find(s=>s.id===r).label}),o=r=>F(Le(et),n(r));return{_gShowOnCard:R("Show on a card"),[et]:F({type:"custom",render:()=>i(sl,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(et)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const et="showCardPrice",be=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function sl({rest:e}){const t=I(),n=he(),o=l=>typeof t[l]=="boolean"?t[l]:void 0,r=l=>o(l)??e[l],s=be.some(({id:l})=>o(l)!==void 0&&o(l)!==e[l]);return i(tt,{parts:be,changed:s,shown:r,onPress:(l,c)=>n({[l]:c}),onReset:()=>n(Object.fromEntries(be.map(({id:l})=>[l,void 0])))})}function ru(e,t="display"){const n=V(t);return{[t]:E("desktop",{type:"custom",render:({value:o,onChange:r})=>i(tt,{parts:e,changed:Uo(o),shown:s=>Ko(o,s),onPress:(s,l)=>r(Vo(o,s,l)),onReset:()=>r(void 0)})}),[n]:E("mobile",{type:"custom",render:({value:o,onChange:r})=>i(ll,{parts:e,desktopKey:t,value:o,onChange:r})})}}function tt({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:s,disabledReason:l}){const c=a("Display");return i(_,{label:c,icon:i(ro,{}),changed:t,action:i(x,{words:C()?.panel,label:c,changed:t,detail:s,onReset:r}),children:i(Wo,{label:c,items:e.map(u=>({id:u.id,label:a(u.label),shown:n(u.id),...l?{disabled:!0,disabledReason:a(l)}:{}})),onChange:o})})}function ll({parts:e,desktopKey:t,value:n,onChange:o}){const r=I()[t];return i(tt,{parts:e,changed:Xo(n),shown:s=>$o(r,n,s),onPress:(s,l)=>o(jo(n,s,l)),onReset:()=>o(dr),detail:a("the same as Desktop")})}function xn(e=Mn){return W("Card image",i(mt,{}),A,xe,Wn,A,e,{clear:{hint:A},hint:"Rounds the picture. The card's own corner is in Styles."})}function al(){return ue(dt,"cardImage")}function iu(){return{cardImage:xn(dt),...al()}}function su(){return ze({sidesKey:"cornerSides",row:$n,step:Un,useFollowed:()=>A,mark:i(cl,{label:Kn}),hint:a("Rounds the picture. Left alone it stays square.")})}function cl({label:e,changed:t=!1,onReset:n=()=>{}}){return i(x,{words:C()?.panel,label:a(e),changed:t,onReset:n})}function lu(){return{type:"custom",render:({value:e,onChange:t})=>i(fl,{value:typeof e=="string"?e:"",onChange:t})}}const On="own";function au(){const e=[{value:On,label:"Layout's own",picture:i(In,{cells:ul})},...Object.entries(zn).map(([t,n])=>({value:t,label:n.label,picture:i(In,{cells:[...n.phone,...n.phone,...n.phone]})}))];return E("mobile",on("Layout",i(gt,{}),e,On,{columns:2,cell:En}))}const ul=[[3,1],[3,1],[3,1],[3,1]];function In({cells:e}){return i("span",{"aria-hidden":"true",style:{display:"grid",width:24,gridTemplateColumns:`repeat(${jn}, minmax(0, 1fr))`,gridAutoRows:6,gap:2},children:e.map(([t,n],o)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${t}`,gridRow:`span ${n}`}},o))})}function dl({layout:e,width:t}){const n=qn(e),o=n?`${n[0]}/${n[1]}`:void 0;return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:o?"auto":6,gridAutoFlow:"row dense",gap:2},children:Jn(e).map(([r,s],l)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${r}`,gridRow:`span ${s}`,aspectRatio:o}},l))})}const En={width:"3.5rem",height:"2.5rem"},pl=200;function fl({value:e,onChange:t}){const[n,o]=Z(null),[r,s]=Z(4),l=J(null);Nn(()=>{const m=l.current;if(!m||typeof ResizeObserver!="function")return;const g=()=>s(m.getBoundingClientRect().width>=pl?4:3);g();const b=new ResizeObserver(g);return b.observe(m),()=>b.disconnect()},[]);const c=e?Gi(Oe,e):void 0,u=c?e:"",d=pt(n,u),h=pt(n,"").length,p=Zn("no-symbol"),f=[{value:"",label:a("Not chosen"),icon:Di(p,a("Not chosen"))},...d.map(m=>({value:m,label:a(Oe[m].label),icon:i(dl,{layout:Oe[m],width:40})}))];return i(_,{label:a("Layout"),icon:i(gt,{}),value:c?a(c.label):void 0,children:i("div",{ref:l,style:{flex:"1 1 auto",minWidth:0},children:i(Nt,{label:a("Layout"),value:u,options:f,onChange:t,columns:r,cell:En,header:k("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:a("Photos in a row")}),i(vo,{options:[{id:"all",label:a("All")},...Vn.map(m=>({id:String(m),label:String(m)}))],value:n===null?"all":String(n),ariaLabel:a("Photos in a row"),onChange:m=>o(m==="all"?null:Number(m))}),i("span",{className:"text-2xs text-ink-faint",children:a("{n} of {total} layouts",{n:h,total:Yn.length})})]})})})})}export{zi as BOUND_TO_POST,nc as BOUND_TO_POST_NOTE,uc as BUCKET_ICONS,zc as CUSTOM_FIELD_MEDIA,qc as CoordsField,sn as DESKTOP_GAP_NOT_OVERLAP,tt as DisplayRow,Wc as EDGE_ARROWS,Zo as FOCAL_DEFAULT,ye as FOLD_FIELD_MARKER,qi as HIGHLIGHT_HINT,K as HidableTextField,lt as LINK_FIELD_MARKER,Xa as Label,at as MEDIA_FIELD_MARKER,Vc as MEDIA_TYPE_OPTIONS,oc as NOT_BOUND_TO_POST,bc as PanelBand,Qi as PanelNoteLine,Ps as RowPropsContext,ct as SCAFFOLD_FIELD_MARKER,pu as SCALAR_TEXT_CONTROLS,Wi as SiteGapDefaultReset,q as Slider,ts as Swatches,du as TEXT_CONTROL_KINDS,N as TEXT_FIELD_MARKER,Zc as TICKER_ITEMS_ROW,il as TextListField,zs as ThemeFillRow,me as WIDTH_LABEL,ji as WidthDefaultReset,rl as aimAfterListChange,Fc as anchorFields,U as backTo,wc as backgroundField,xc as boxBlockSpacingField,Ec as boxColumnsFields,Gc as boxFillField,Ts as boxPhoneRowField,Is as boxShareField,Oc as boxSharePhoneField,Ic as boxShareTabletField,Zs as boxThemeIndexOf,fc as bucketHeader,yc as buttonWordsEntryField,xs as cardCornersField,rs as cardImageBackgroundField,xn as cardImageField,iu as cardImageFields,tu as cardMediaFields,Cc as cardShapeFields,ou as cardShowFields,nu as cardStyleFields,Tc as cellWidthFields,Hc as colorInput,ja as containerDirectionField,Ui as containerGapField,Ki as containerGapPhoneField,Va as containerGapRows,$i as containerGapTabletField,tl as coordsResultTip,lc as copyText,pn as cornerSidesField,ze as cornersRowField,dn as cornersUnitFields,Bc as date,vc as dateTime,hc as designGroupHeader,ru as displayFields,Uc as edgePad,Ze as fillSlotChoices,Jc as focusAfterRemove,Mc as focusKeptField,mc as foldMarker,Ce as foldMetaOf,es as foldTitleOf,Gs as followedHeightPatch,js as followedStickPatch,lu as galleryLayoutField,au as galleryLayoutPhoneField,Lc as heightFields,ge as heightFollowedBy,Hs as heightLayersAt,Ya as heroGroupPlacementPoints,st as hidableText,Zi as hintIsWhileTyping,su as imageCornersField,tc as inOwnBox,pc as isBucketHeader,un as keptBy,ac as linkField,Qs as loadingRowHint,jc as loadingShowsField,Kc as multiSelect,Dc as pageBackgroundField,dc as panelNote,As as phoneOverrideField,sc as plainText,cc as plainTextarea,is as pxField,gc as quietMarker,it as readHidable,nl as rowText,$c as searchSelect,os as sectionBandChoices,us as sectionCornersField,_c as sectionShapeFields,Sc as sectionThemeFields,ol as setRowText,Rc as sizeField,Xc as sourceField,Nc as spacingFields,Ac as stickFields,Pc as swapPadding,rc as text,Hn as textFieldIdentifier,Ja as textFieldOffPage,Qa as textFieldPanelOnly,Qc as textList,eu as textListRowField,ic as textarea,Cn as toggle,Yc as upload,fe as useLengthRow,he as useSelectedPatch,I as useSelectedProps,T as useSelectedSibling,Mi as useSiteGapDetail,kc as widthField,ec as withIdentifier,qa as withOffPage,Za as withPanelOnly,za as withScaffold};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{convertSection as
|
|
1
|
+
import{convertSection as P,pressesAsBox as m,SECTION_TO_BOX_PRESS as R,sectionToBoxRow as u}from"../../../render/lib/sections/section-to-box.js";import{SECTION_PRESETS as _,presetFor as k}from"../../../format/lib/sections/section-presets.js";import{GENERAL_SECTION_TO_BOX as N,TEXT_PRESS_STARTERS as w}from"../../../render/lib/document/blocks/general/section-to-box-rows.js";import{SECTION_CATALOG as x}from"../../../format/lib/document/section-catalog.js";import{statsBoxSeed as T,statsPressSeed as B,statsSeedRows as C}from"../../../render/lib/document/blocks/general/section-to-box-rows-stats.js";import{footerPaymentPressStarter as L,logosPressStarter as g,paymentPressStarter as A}from"../../../render/lib/document/blocks/general/section-to-box-rows-logos.js";import{cardsPressStarter as j}from"../../../render/lib/document/blocks/general/section-to-box-rows-cards.js";import{pageHeaderPressStarter as X}from"../../../render/lib/document/blocks/general/section-to-box-rows-pageheader.js";import{tabBarPressStarter as v}from"../../../render/lib/document/blocks/general/section-to-box-rows-tabbar.js";import{milestoneTimelinePressStarter as D,storyTimelinePressStarter as G}from"../../../render/lib/document/blocks/general/section-to-box-rows-timeline.js";import{seedNodes as I}from"../../../format/lib/document/seed-parts.js";import{isNodeList as S}from"efficient-easel/data";import{mapEachNode as U,mapNodeLists as M}from"../../../format/lib/document/node-lists.js";import{ownEntry as a}from"../../../format/lib/own-entry.js";const W=Object.keys(N),l={Logos:g,DocMasthead:X,DocTabs:v,Timeline:G,TimelineTrack:D},Y={PaymentBadges:A,PaymentLogosBlock:L};function c(t,s,r){const o={};for(const n of Object.keys(s(t.type)))o[n]=void 0;for(const[n,e]of Object.entries(t.props))o[n]=S(e)?e.map(p=>c(p,s,r)):e;return o.id=r(t.type),{type:t.type,props:o}}const E=t=>({...t?.theme?{theme:t.theme}:{},...t?.site?{site:t.site}:{},press:!0});function O(t,s,r=0,o=()=>({})){return(n,e,p)=>{const{nodes:i}=P({type:t,props:{...n(t),...o(),id:e(t)}},s,E(p));return c(i[r],n,e)}}const $={Stats:q,Cards:H};function H(){const t=u("Cards");if(!t)return null;const s=O("Cards",t,0,j);return(r,o,n)=>{const e=s(r,o,n);return{...e,props:{...e.props,name:"Cards section"}}}}function q(){const t=u("StatsParagraph");return t?(s,r,o)=>{const{nodes:n}=P({type:"StatsParagraph",props:{...s("StatsParagraph"),...B(),id:r("StatsParagraph")}},t,E(o)),e=n[0],p=S(e.props.content)?e.props.content.filter(b=>b.props?.cardStyle===void 0):[],i=d(T(C(),"table")),h=p.map(y),f=c({...e,props:{...e.props,content:[...h,i]}},s,r);return{...f,props:{...f.props,name:"Stats section"}}}:null}function y(t){return t.props?.name==="Words"?{...t,props:{...t.props,widthFitPhone:"fill"}}:S(t.props?.content)?{...t,props:{...t.props,content:t.props.content.map(y)}}:t}const d=t=>I([t],(s,r)=>`${s}-seed-${r}`)[0];function z(t,s){if(!m(t,s))return null;const r=a($,t);if(r)return r();const o=u(t);return o?O(t,o,0,a(l,t)??a(w,t)??a(Y,t)):null}function J(t){return(s,r,o)=>{const n=e=>{if(e.type==="Stats"){const i=c(d(T([],"list")),s,r);return{...i,props:{...i.props,name:"Numbers"}}}const p=M(e,i=>U(i,n));return p===e?e:{type:e.type,props:p.props}};return n(t(s,r,o))}}function mt(t,s=R){const r=k(t);return r?J(r):z(t,s)}const K=t=>x.some(s=>s.key==="structure"&&s.sections.some(r=>r.type===t));function ut(){return[...Object.keys(_),...W.filter(t=>m(t)&&!K(t)),...Object.keys(l).filter(t=>m(t))]}export{l as MERGE_LAYOUTS,W as TEXT_LAYOUTS,O as conversionPreset,mt as layoutPresetFor,ut as layoutTypes};
|
|
@@ -4,6 +4,7 @@ import type { SourceRow } from "./block-sources.js";
|
|
|
4
4
|
import { BOX_ROW_IMAGE_PROP } from "./box-card-rule.js";
|
|
5
5
|
import { type ViewVarNames } from "./view-var-split.js";
|
|
6
6
|
export declare const CARD_SHADOW_CLASS = "sf-card";
|
|
7
|
+
export declare const CARD_NO_LIFT_CLASS = "[--sf-card-lift:none] [--sf-card-shadow-hover:var(--sf-card-shadow,none)]";
|
|
7
8
|
export declare const BOX_DARKEN: {
|
|
8
9
|
readonly min: 0;
|
|
9
10
|
readonly max: 100;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{parseHexColor as
|
|
1
|
+
import{parseHexColor as y}from"efficient-shell/format";import{fillColorRole as C}from"efficient-shell/markup";import{BOX_ROW_IMAGE_PROP as f}from"./box-card-rule.js";import{namedRowField as m,rowFieldText as S}from"./card-template.js";import{fillInkCss as P,fillSlotNamed as D,inkTokenOf as I,partColourName as E}from"../document/part-inks.js";import{scrim as p}from"./scrim.js";import{viewVarSplit as _}from"./view-var-split.js";const z="sf-card",G="[--sf-card-lift:none] [--sf-card-shadow-hover:var(--sf-card-shadow,none)]",F={min:0,max:100,step:5,fallback:0,unit:"%"},T=[{label:"Even",value:"even"},{label:"From the bottom",value:"bottom"}],L="68%",J={desktop:20,phone:20,side:40,sidePhone:24},U="sf-box-sides",q={min:0,max:200,step:10};function N(t){return typeof t=="string"&&t.trim()!==""}function Q(t){return N(typeof t?.bgImage=="string"?t.bgImage:null)||g(t)}function g(t){return m(t,f)!==""}function Z(t,e){return e||!g(t)?t:{...t,[f]:""}}function v(t,e){const o=S(e,m(t,f))?.trim();return o||null}function O(t,e){const n=typeof t=="number"?t:Number.parseFloat(String(t??""));if(!Number.isFinite(n)||n<=0)return null;const l=(Math.min(F.max,Math.max(F.min,n))/100).toFixed(2);return e!=="bottom"?{background:p(Number(l))}:{background:`linear-gradient(0deg, ${p(Number(l))} 0%, ${p(0)} ${L})`}}const k=[{label:"Flat",value:"",hint:"One colour from top to bottom"},{label:"Fade",value:"down",hint:"The colour fades into the page colour at the bottom"}],tt="fillFade",d=k[1].value,B=t=>t===d?d:k[0].value,R=[{mix:"12%",at:"50%"},{mix:"19%",at:"70%"},{mix:"50%",at:"95%"}];function et(t){return B(t)!==d?null:{backgroundImage:`linear-gradient(to bottom, transparent, ${R.map(n=>`color-mix(in srgb, var(--bg) ${n.mix}, transparent) ${n.at}`).join(", ")})`}}const A=t=>typeof t=="string"?y(t.trim()):null,x=t=>{const e=A(t);if(e!==null||typeof t!="string")return e;const n=t.trim();return n&&!n.startsWith("#")&&P(n)||null},nt=t=>{if(typeof t!="string")return null;const e=C(E(t.trim()));return e?.kind==="slot"?e.slot:null},X="swatch";function ot(t,e){if(!e)return null;const n=S(e,m(t,X)),o=D(n);return A(n)??(o&&I(o)||null)}const W={tabletClass:"sf-fill-tablet",tabletVar:"--sf-fill-tablet",phoneClass:"sf-fill-phone",phoneVar:"--sf-fill-phone"};function rt(t,e,n){return _(W,x(t),x(e),x(n))}const V={tabletClass:"sf-wash-tablet",tabletVar:"--sf-wash-tablet",phoneClass:"sf-wash-phone",phoneVar:"--sf-wash-phone"};function lt(t){const e=O(t.darken,t.darkenStyle);if(!e)return{className:"",style:{}};const n=(r,u)=>String(O(r,u)?.background??"none"),o=r=>(typeof r=="number"||typeof r=="string"&&r.trim()!=="")&&Number.isFinite(Number(r))?r:void 0,l=r=>T.some(u=>u.value===r)?r:void 0,[s,a,i,c]=[o(t.darkenTablet),l(t.darkenStyleTablet),o(t.darkenPhone),l(t.darkenStylePhone)],b=s??t.darken,h=a??t.darkenStyle;return _(V,String(e.background),s!==void 0||a!==void 0?n(b,h):null,i!==void 0||c!==void 0?n(i??b,c??h):null)}function st(t,e){const n={"top-left":["start","start"],"top-center":["center","start"],"top-right":["end","start"],left:["start","center"],center:["center","center"],right:["end","center"],"bottom-left":["start","end"],"bottom-center":["center","end"],"bottom-right":["end","end"]},[o,l]=n[t]??n.center,[s,a]=e==="column"?[l,o]:[o,l],i={start:"justify-start",center:"justify-center",end:"justify-end"},c={start:"items-start",center:"items-center",end:"items-end"};return`${i[s]} ${c[a]}`}export{J as BOX_CARD_PAD,q as BOX_CARD_SIDE,F as BOX_DARKEN,T as BOX_DARKEN_STYLES,k as BOX_FILL_FADES,tt as BOX_FILL_FADE_PROP,W as BOX_FILL_VIEWS,U as BOX_OWNS_SIDES_CLASS,X as BOX_SWATCH_PROP,V as BOX_WASH_VIEWS,G as CARD_NO_LIFT_CLASS,z as CARD_SHADOW_CLASS,Z as boxCardProps,O as boxDarkenStyle,B as boxFillFadeOf,et as boxFillFadeStyle,A as boxFillOf,nt as boxFillSlot,rt as boxFillViews,Q as boxIsCard,g as boxNamesRowPicture,x as boxPaintOf,st as boxPlacementClasses,v as boxRowPicture,ot as boxSwatchFill,lt as boxWashViews,N as isBackgroundBox};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const BUTTON_ICONS: readonly ["none", "arrow-right", "arrow-long-right", "arrow-up-right", "chevron-right", "external", "cart", "bag", "tag", "email", "location", "play", "download", "search", "car"];
|
|
1
|
+
export declare const BUTTON_ICONS: readonly ["none", "arrow-right", "arrow-long-right", "arrow-up-right", "chevron-right", "external", "cart", "bag", "tag", "email", "location", "play", "download", "search", "car", "phone", "wheel", "chat", "chevron-left", "package", "truck", "shield-check", "receipt-refund"];
|
|
2
2
|
export type ButtonIconChoice = (typeof BUTTON_ICONS)[number];
|
|
3
3
|
export type ButtonIconGlyph = Exclude<ButtonIconChoice, "none">;
|
|
4
4
|
export type ButtonIconSide = "before" | "after" | "end";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{buttonArrowShown as a}from"./button-arrow.js";import{nonEmptyString as r}from"../non-empty-string.js";const
|
|
1
|
+
import{buttonArrowShown as a}from"./button-arrow.js";import{nonEmptyString as r}from"../non-empty-string.js";const c=["none","arrow-right","arrow-long-right","arrow-up-right","chevron-right","external","cart","bag","tag","email","location","play","download","search","car","phone","wheel","chat","chevron-left","package","truck","shield-check","receipt-refund"];function d(t){return typeof t=="string"&&c.includes(t)?t:void 0}function h(t,e){return d(t)??(a(e)?"arrow-right":"none")}function s(t){return t==="before"?"before":t==="end"?"end":"after"}function m(t,e){return s(t)==="end"&&i(e)==="fill"}function i(t){return t==="fill"||t==="fixed"?"fill":"fit"}function v(t,e,l,{atSectionLine:u=!1}={}){const n=i(t);if(r(l)){const o=i(l),f=r(e)?i(e):o;return u?[n==="fill"?"view-desktop:w-full":"view-desktop:w-auto",o==="fill"?"view-tablet:max-view-desktop:w-full":"view-tablet:max-view-desktop:w-auto",f==="fill"?"max-view-tablet:w-full":"max-view-tablet:w-auto"].join(" "):[n==="fill"?"view-desktop:w-full":"view-desktop:w-auto",o==="fill"?"view-wide:max-view-desktop:w-full":"view-wide:max-view-desktop:w-auto",f==="fill"?"max-view-wide:w-full":"max-view-wide:w-auto"].join(" ")}const w=n==="fill"?["w-full"]:[];if(r(e)){const o=i(e);o!==n&&w.push(o==="fill"?"max-view-wide:w-full":"max-view-wide:w-auto")}return w.join(" ")}export{c as BUTTON_ICONS,m as buttonIconAtEnd,h as buttonIconChoice,s as buttonIconSide,i as buttonWidth,v as buttonWidthClass,d as storedButtonIcon};
|
|
@@ -107,4 +107,5 @@ export declare function cardListFieldsOf(appState: unknown, list: {
|
|
|
107
107
|
props?: Record<string, unknown>;
|
|
108
108
|
} | null | undefined, kind?: CardRowFieldKind): readonly CardRowFieldSpec[];
|
|
109
109
|
export declare function cardListProps(rows: readonly Record<string, unknown>[], fields: readonly CardRowFieldSpec[]): Record<string, unknown>;
|
|
110
|
+
export declare const HOST_PART_TYPE = "HostPart";
|
|
110
111
|
export {};
|