efficient-web-builder 74.9.1 → 74.11.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 +36 -0
- package/dist/editor/lib/document/blocks/general/Hero/fields.js +1 -1
- package/dist/editor/lib/document/blocks/hero-shared-fields.d.ts +6 -0
- package/dist/editor/lib/document/blocks/hero-shared-fields.js +1 -1
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/format/lib/content/section-sticky.d.ts +16 -0
- package/dist/format/lib/content/section-sticky.js +1 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +4 -0
- package/dist/format/lib/editor-words-catalogue.js +2 -2
- package/dist/format/lib/hero-phone-stack.d.ts +12 -0
- package/dist/format/lib/hero-phone-stack.js +1 -1
- package/dist/render/components/HeaderTopInkContext.d.ts +1 -0
- package/dist/render/components/HeaderTopInkContext.js +1 -0
- package/dist/render/components/HeroPoster.d.ts +2 -1
- package/dist/render/components/HeroPoster.js +1 -1
- package/dist/render/components/HeroSection.d.ts +5 -1
- package/dist/render/components/HeroSection.js +1 -1
- package/dist/render/components/HeroSlide.d.ts +5 -0
- package/dist/render/components/HeroSlide.js +1 -1
- package/dist/render/components/LogoBlock.js +1 -1
- package/dist/render/components/RMark.js +1 -1
- package/dist/render/lib/document/blocks/general/Hero/render.js +1 -1
- package/dist/render/lib/document/passes/section-sticky.js +1 -1
- package/dist/render/lib/hero-poster-sizes.d.ts +8 -0
- package/dist/render/lib/hero-poster-sizes.js +1 -0
- package/dist/routine-index.json +1 -1
- package/dist/value-index.json +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 74.11.0 - 2026-11-24
|
|
4
|
+
|
|
5
|
+
From main at `fff9d165`: #854.
|
|
6
|
+
|
|
7
|
+
A minor: one new row. No export removed. The shell peer floor rises to `^15.8.0`.
|
|
8
|
+
|
|
9
|
+
**For hosts:**
|
|
10
|
+
- ⚠️ **Peer:** `efficient-shell` peer is now `^15.8.0` (was `^14.5.1 || ^15.0.0`). A host that bumps to this version also needs efficient-shell 15.8.0.
|
|
11
|
+
- No look change: a page that stores no `stickEnd` draws the same bytes.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **Pin ends row** (`lib/content/section-sticky`, `lib/document/controls`, #854): on a pinned section with Screens, *Next slides over* (default, stores nothing) or *Scrolls away* (stores `stickEnd: "away"`; the shell's track form writes `--motion-pin-over: 0`, so the next section follows under it).
|
|
16
|
+
|
|
17
|
+
## 74.10.0 - 2026-11-24
|
|
18
|
+
|
|
19
|
+
From main at `408a60de`: #849, #850, #851, #852.
|
|
20
|
+
|
|
21
|
+
A minor: new Hero rows and a new header-ink context. No export removed, no new peer.
|
|
22
|
+
|
|
23
|
+
**For hosts:**
|
|
24
|
+
- ⚠️ **Look change (#849):** the "®" mark now draws in its words' colour, on their line, at their size. Before, it was a gold, raised `<sup>`. A host that bumps to this version changes every page that draws a ® mark.
|
|
25
|
+
- A see-through host header may provide its custom top ink with `HeaderTopInkContext`; a LogoBlock on Auto contrast then draws in that ink. No provider: the same bytes as before.
|
|
26
|
+
- Hero poster `sizes` change: a phone asks for the cover width of the Hero's real frame, capped at 1280 device px; a wide screen asks for `100vw` as before.
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
|
|
30
|
+
- **Hero words space on tablet and desktop** (`lib/hero-phone-stack` `heroWordsSpace`, #850): rows for the space above and below the words, beside the phone rows. With no row set, a hero draws the same bytes.
|
|
31
|
+
- **`HeaderTopInkContext`** (`components/HeaderTopInkContext`, #852): a host header's custom top ink while the bar is see-through; `LogoBlock` reads it.
|
|
32
|
+
- **`heroPosterSizes(phoneFrame)` and `heroPhoneFrame(heightMobile, heightFixedMobile)`** (`lib/hero-poster-sizes`, #851): the one helper for a Hero poster's `sizes`.
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- **® mark** (`components/RMark`, #849): `RMark` / `withRMark` draw a plain `<span>` in the words' colour. The names stay.
|
|
37
|
+
- **Hero poster** (`components/HeroPoster`, #849, #851): takes a `phoneFrame` prop and asks for the width it draws.
|
|
38
|
+
|
|
3
39
|
## 74.9.1 - 2026-11-23
|
|
4
40
|
|
|
5
41
|
From main at `7c260d96`: #845, #847.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{REEL_PLACEMENT_DEFAULT as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{REEL_PLACEMENT_DEFAULT as R,REEL_SHAPE_DEFAULT as d,HERO_REEL_SHAPES as m,REEL_SHAPE_LABELS as A,REEL_SHOWN_DEFAULT as O}from"../../../../../../format/lib/reel.js";import{HERO_TEXTURE_SHOWN_DEFAULT as P}from"../../../../../../format/lib/hero-texture.js";import{HERO_ARROW_SHAPE_DEFAULT as H,HERO_ARROW_SHAPE_LABELS as L,HERO_ARROW_SHAPES as h,HERO_ARROWS_PLACEMENT_DEFAULT as u,HERO_ARROWS_SHOWN_DEFAULT as w}from"../../../../../../format/lib/hero-arrows.js";import{ClockIcon as T,EyeIcon as t,OpacityIcon as W,PhoneIcon as n,PlayIcon as I,SlideArrowsBareIcon as D,SlideArrowsRoundIcon as f,SlideArrowsSquareIcon as k,SlidePickerBarIcon as U,SlidePickerCardsIcon as g,SlidePickerDotsIcon as y,SlidePickerNumbersIcon as F,SlidePickerSquaresIcon as N,SquareIcon as _}from"efficient-easel/icons";import{SlideArrowsRoundSolidIcon as x}from"efficient-shell/icons/efficient-looks";const b=x,C={cards:o(g,{}),dots:o(y,{}),numbers:o(F,{}),bar:o(U,{}),squares:o(N,{})},B={outline:o(f,{}),solid:o(b,{}),square:o(k,{}),bare:o(D,{})};import{toggle as i}from"../../../controls.js";import{HERO_PHONE_WORDS_ROWS as s,HERO_WORDS_ROWS as q,HERO_TEXTURE_COLOR_ROW as j,heroHeightFields as G}from"../../hero-shared-fields.js";import{group as e}from"efficient-easel/screen/lib/document/box-fields";import{alignmentField as M,iconPickerRow as p,placementField as l,segmented as S,slider as c}from"../../../box-fields.js";import{deviceField as E,deviceNote as X}from"efficient-easel/screen/lib/document/device-fields";import{HERO_PHONE_SIDEWAYS_DEFAULT as Y,HERO_PHONE_SIDEWAYS_LABEL as v,HERO_PHONE_UPDOWN_DEFAULT as K,HERO_PHONE_UPDOWN_LABEL as z,phoneSidewaysPoints as J,phoneUpDownPoints as Q}from"../../../../../../format/lib/hero-phone-stack.js";import{HeroSlots as a}from"../../../../../../format/lib/document/blocks/general/Hero/meta.js";const lo={fields:{_dDevice:X(),_gContent:e("Content"),slides:a.slides,strip:a.strip,_gStyle:e("Style"),alignment:M(),_gTexture:e("Texture"),showTexture:i("Show texture",P,o(t,{})),textureColor:j,textureOpacity:c("Texture opacity",o(W,{}),0,100,1,40,"%"),_gLayout:e("Layout"),...G(),...q,_gAutoplay:e("Auto-slide"),autoplay:i("Auto-advance slides",!1,o(I,{})),autoplayInterval:c("Still time per slide",o(T,{}),2,15,1,6,"s"),_gPicker:e("Slide picker"),showPicker:i("Show slide picker",O,o(t,{})),pickerShape:p("Slide picker shape",o(_,{}),m.map(r=>({label:A[r],value:r,picture:C[r]})),d),pickerPlacement:l("Slide picker placement",{fallback:R}),_gArrows:e("Arrows"),showArrows:i("Show arrows",w,o(t,{})),arrowsShape:p("Arrows shape",o(_,{}),h.map(r=>({label:L[r],value:r,picture:B[r]})),H),arrowsPlacement:l("Arrows placement",{fallback:u}),_gPhone:E("mobile",e("On a phone")),phoneUpDown:E("mobile",S(z,o(n,{}),Q(),K)),phoneSideways:E("mobile",S(v,o(n,{}),J(),Y)),phoneWordsTop:s.phoneWordsTop,phoneWordsBottom:s.phoneWordsBottom,phoneBoxGap:s.phoneBoxGap}};export{lo as HeroFields};
|
|
@@ -65,4 +65,10 @@ export declare const HERO_PHONE_WORDS_ROWS: {
|
|
|
65
65
|
phoneWordsBottom: BoxField<number>;
|
|
66
66
|
phoneBoxGap: BoxField<number>;
|
|
67
67
|
};
|
|
68
|
+
export declare const HERO_WORDS_ROWS: {
|
|
69
|
+
wordsTop: BoxField<number>;
|
|
70
|
+
wordsBottom: BoxField<number>;
|
|
71
|
+
wordsTopTablet: BoxField<number>;
|
|
72
|
+
wordsBottomTablet: BoxField<number>;
|
|
73
|
+
};
|
|
68
74
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t,jsxs as de,Fragment as se}from"react/jsx-runtime";import{HeightIcon as ce,ImageIcon as he,ImagesIcon as ue,OpacityIcon as pe,MediaLayoutSideBySideIcon as Oe,MediaLayoutStackedIcon as _e,GapIcon as me,PaddingBottomIcon as H,PaddingTopIcon as v,PlacementIcon as Y,PlayIcon as Ee,UploadIcon as ge}from"efficient-easel/icons";import{viewFocusKeys as V}from"../../../../format/lib/content/picture-focus-rows.js";import{HERO_FOCUS as _,MEDIA_LAYOUT_DEFAULT as fe,MEDIA_LAYOUT_LABELS as Re,MEDIA_LAYOUTS as be,resolvePhoneLayout as Te}from"../../../../format/lib/hero-media-layout.js";import{useEasel as Se,useSelectedHost as xe}from"efficient-easel/easel";import{SettingsDefaultReset as He,SettingsField as ve,SettingsSegmented as ye}from"efficient-easel/panel";import{describedAs as Ae,FLAT_ACCESS as Le,iconOf as Ie,onDesktopWords as De,phoneTwinFields as y,useAccessPatch as Pe}from"efficient-easel/screen/lib/document/box-fields";import{keptByRow as A}from"efficient-easel/screen/lib/document/style-fields";import{deviceField as p}from"efficient-easel/screen/lib/document/device-fields";import{HERO_WORDS_BOTTOM_DEFAULT as g,HERO_WORDS_MAX as f,HERO_WORDS_MIN as R,HERO_WORDS_TOP_DEFAULT as b,HERO_PHONE_BOX_GAP_DEFAULT as G,HERO_PHONE_BOX_GAP_LABEL as we,HERO_PHONE_WORDS_BOTTOM_DEFAULT as K,HERO_PHONE_WORDS_BOTTOM_LABEL as L,HERO_PHONE_WORDS_MAX as I,HERO_PHONE_WORDS_MIN as D,HERO_PHONE_WORDS_TOP_DEFAULT as X,HERO_PHONE_WORDS_TOP_LABEL as P}from"../../../../format/lib/hero-phone-stack.js";import{colorInput as j,edgePad as $,focusKeptField as Ce,plainText as Fe,Slider as q,upload as ke,useSelectedSibling as w}from"../controls.js";import{ColourRow as Ue,InheritedColourRow as We}from"../ColourControl.js";import{rowSay as Me,segmented as C,slider as u}from"../box-fields.js";import{CUSTOM_SHAPE as Be,SHAPE_TABLE as Ne}from"../../../../format/lib/content/gallery-card-layout.js";import{ShapePicker as Ye}from"../shape-picker.js";import{HERO_FIXED_DEFAULT as Ve,HERO_HEIGHT_PX as F,readHeroFixedHeight as Ge,SECTION_HEIGHT as h}from"../../../../format/lib/content/section-height.js";import{DEFAULT_TINT as k}from"../../../../format/lib/content/tint.js";import{editorEaselWords as Ke,say as l}from"../../../../format/lib/editor-words.js";import{nonEmptyString as U}from"../../../../format/lib/non-empty-string.js";import{findParentNode as Xe}from"../../../../format/lib/document/passes/document-position.js";import{DEFAULT_OVERLAY_POSITION as z,OVERLAY_POSITION_OPTIONS as J,slideOverlayState as Q}from"../../../../format/lib/sections/hero-overlay.js";import{VIDEO_PLAYBACK_DEFAULT as je,VIDEO_PLAYBACK_LABELS as $e,VIDEO_PLAYBACKS as qe,VIDEO_SOURCE_DEFAULT as ze,VIDEO_SOURCE_LABELS as Je,VIDEO_SOURCES as Qe}from"../../../../format/lib/hero-video.js";function Ze(){return Ne.filter(e=>e.ratio!==null||e.shape===Be)}const W={desktop:{number:"heightDesktop",fixed:"heightFixed"},tablet:{number:"heightTablet",fixed:"heightFixedTablet"},mobile:{number:"heightMobile",fixed:"heightFixedMobile"}},Z={read:e=>e.heightMobile,write:(e,o,i)=>({heightMobile:i}),fieldKey:()=>"heightMobile",ownField:!0,tablet:{read:e=>e.heightTablet,write:(e,o,i)=>({heightTablet:i}),fieldKey:()=>"heightTablet",ownField:!0}};function ee(e,{number:o,fixed:i}){const r=o===void 0?void 0:e[o];return Ge(e[i])??(typeof r=="number"?{unit:"vh",vh:r}:null)}const eo="On Tablet, this hero uses the Desktop vh. Set vh in the Desktop view.";function oo({view:e,keys:o,props:i}){const r=xe(),d=Pe(Le),{number:s}=o,m={...r?.values??{},...s?{[s]:i.value}:{}},S=ee(m,o),n=e==="tablet"?ee(m,W.desktop):null,c=S??n??{unit:"vh",vh:h.fallback},O=i.readOnly===!0,M=Ze(),ae=a=>{if(a===c.unit)return;if(a!=="vh"){d([[o.fixed,n?.unit===a?n.value:Ve[a]]]);return}const le=s!==void 0&&typeof m[s]!="number"&&n!==null&&n.unit!=="vh";d([[o.fixed,void 0],...le?[[s,h.fallback]]:[]])},E=S===null&&e!=="desktop",x=s===void 0,B=x&&n!==null&&n.unit!=="vh",N=n===null?`${h.fallback} ${h.unit}`:n.unit==="vh"?`${n.vh} ${h.unit}`:n.unit==="px"?n.value:M.find(a=>a.image===n.value)?.label??n.value;return t(ve,{label:l("Height"),icon:Ie(t(ce,{})),hint:x&&(c.unit==="vh"||B)?l(eo):void 0,action:e==="desktop"?void 0:t(He,{words:Ke()?.panel,label:l("Height"),changed:S!==null||!!m[o.fixed],detail:e==="tablet"?De(Me,N):N,disabled:O,onReset:()=>d([...s?[[s,void 0]]:[],[o.fixed,void 0]])}),children:de("div",{style:{display:"flex",flexDirection:"column",gap:"var(--space-8)",flex:"1 1 auto",minWidth:0},children:[t(ye,{options:[{id:"vh",label:l("vh"),disabled:B},{id:"ratio",label:l("Ratio")},{id:"px",label:l("px")}],value:c.unit,onChange:ae,ariaLabel:l("Unit"),disabled:O}),c.unit==="ratio"?t(Ye,{label:"Height",lines:M,column:"image",value:c.value,disabled:O,onChange:a=>d([[o.fixed,a]])}):c.unit==="px"?q({...F,value:E?null:c.px,...E?{placeholder:c.px}:{},suffix:F.unit,ariaLabel:"Height",disabled:O,onChange:a=>d([[o.fixed,`${a}${F.unit}`]])}):q({min:h.min,max:h.max,step:h.step,value:E?null:c.vh,...E?{placeholder:c.vh}:{},suffix:h.unit,ariaLabel:"Height",disabled:O||x,onChange:a=>i.onChange(a)})]})})}const T=(e,o=W[e])=>({type:"custom",...Ae({},{type:"number",label:"Height"}),render:i=>t(oo,{view:e,keys:o,props:i})}),to={read:e=>e.heightFixedTablet,write:(e,o,i)=>({heightFixedTablet:i}),fieldKey:()=>"heightFixedTablet",ownField:!0};function Mo({tabletNumber:e=!0}={}){const o=e?Z:{...Z,tablet:to},i=T("tablet",e?void 0:{fixed:W.tablet.fixed}),r=y("heightDesktop",T("desktop"),o,{phoneRow:i}),d=y("heightDesktop",T("desktop"),o,{phoneRow:T("mobile")});return{heightDesktop:r.heightDesktop,...e?{heightTablet:r.heightTablet,heightFixedTablet:A("heightTablet")}:{heightFixedTablet:r.heightFixedTablet},heightMobile:d.heightMobile,heightFixed:A("heightDesktop"),heightFixedMobile:A("heightMobile")}}const Bo={overlayColor:j("Overlay color",k),overlayPosition:$("Overlay position",J,z,"A corner would need a diagonal ramp, which this overlay does not draw.",t(Y,{}))},oe="Texture",te=e=>$("Overlay position",J,e,"A corner would need a diagonal ramp, which this overlay does not draw.",t(Y,{}),void 0,oe);function io(){try{const{appState:e,selectedItem:o}=Se(i=>i);return no(e,o?.props?.id)}catch{return}}function no(e,o){return U(Xe(e,o)?.props?.textureColor)}function ro({value:e,onChange:o}){const[i]=w("overlayPosition"),r=io(),d=U(e)??"",s=Q({overlayColor:d,overlayPosition:i},r);return t(We,{label:l("Overlay color"),value:d,inherited:s.color,resetTo:l(oe),onChange:o,onReset:()=>o("")})}const ao=te(z),lo=te("");function so(e){const[o]=w("overlayColor"),i=Q({overlayColor:o,overlayPosition:e.value}).own?ao:lo;return t(se,{children:i.render(e)})}function co(e){if(!Array.isArray(e))return;const o=e.flatMap((i,r)=>U(i?.props?.overlayColor)?[r+1]:[]);if(o.length!==0)return o.length===1?l("Slide {n}: own Overlay color.",{n:o[0]}):l("Slides {n}: own Overlay color.",{n:o.join(", ")})}function ho({value:e,onChange:o}){const[i]=w("slides");return t(Ue,{label:l("Texture color"),value:e||k,onChange:o,hint:co(i)})}const No={type:"custom",render:({value:e,onChange:o})=>t(ho,{value:e,onChange:o})},Yo={overlayColor:{type:"custom",render:({value:e,onChange:o})=>t(ro,{value:e,onChange:o})},overlayPosition:{type:"custom",render:({value:e,onChange:o})=>t(so,{value:e,onChange:o})}},uo={one:t(he,{}),side:t(Oe,{}),stacked:t(_e,{})},ie=e=>C("Layout",t(ue,{}),be.map(o=>({label:Re[o],value:o,picture:uo[o]})),fe,e?{phoneRest:o=>Te(void 0,o)}:void 0),po={mediaLayout:ie(),mediaLayoutPhone:y("mediaLayout",ie(!0)).mediaLayoutPhone},Oo=()=>u("Tint",t(pe,{}),0,100,5,0,"%"),ne=e=>Object.fromEntries(V(e).map(o=>[o,Ce()])),re=e=>ke("Background image","image/*","Upload a background image",{focus:e}),_o=()=>j("Tint color",k),Vo={mediaImage:re(_.image),...ne(_.image)},mo={mediaImage2:re(_.image2),...ne(_.image2),tintColor2:_o(),tintOpacity2:Oo()},Go=Object.keys(po),Ko=Object.keys(mo),Xo=["mediaImage",...V(_.image)],jo=e=>({mediaLayout:{all:[e,{not:{context:"device",is:"mobile"}}]},mediaLayoutPhone:{all:[e,{context:"device",is:"mobile"}]}}),$o={videoSource:C("Source",t(ge,{}),Qe.map(e=>({label:Je[e],value:e})),ze),youtubeUrl:Fe("YouTube link","https://youtu.be/…"),videoPlayback:C("Playback",t(Ee,{}),qe.map(e=>({label:$e[e],value:e})),je)},qo={phoneWordsTop:p("mobile",u(P,t(v,{}),D,I,1,X,{kind:"spacing"},{clear:{hint:X}})),phoneWordsBottom:p("mobile",u(L,t(H,{}),D,I,1,K,{kind:"spacing"},{clear:{hint:K}})),phoneBoxGap:p("mobile",u(we,t(me,{}),D,I,1,G,{kind:"spacing"},{clear:{hint:G}}))},zo={wordsTop:p("desktop",u(P,t(v,{}),R,f,1,b,{kind:"spacing"},{clear:{hint:b}})),wordsBottom:p("desktop",u(L,t(H,{}),R,f,1,g,{kind:"spacing"},{clear:{hint:g}})),wordsTopTablet:p("tablet",u(P,t(v,{}),R,f,1,b,{kind:"spacing"},{clear:{hint:b}})),wordsBottomTablet:p("tablet",u(L,t(H,{}),R,f,1,g,{kind:"spacing"},{clear:{hint:g}}))};export{Ko as HERO_IMAGE2_KEYS,mo as HERO_IMAGE2_ROWS,Xo as HERO_IMAGE_KEYS,Vo as HERO_IMAGE_ROWS,Go as HERO_LAYOUT_KEYS,po as HERO_LAYOUT_ROWS,Bo as HERO_OVERLAY_ROWS,qo as HERO_PHONE_WORDS_ROWS,Yo as HERO_SLIDE_OVERLAY_ROWS,eo as HERO_TABLET_VH_HINT,No as HERO_TEXTURE_COLOR_ROW,$o as HERO_VIDEO_ROWS,zo as HERO_WORDS_ROWS,Mo as heroHeightFields,jo as heroLayoutRules,Ze as heroRatioLines,_o as heroTintColorRow,Oo as heroTintRow,co as textureColorHint,no as textureColorOfSlide};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as i,jsxs as L,Fragment as k}from"react/jsx-runtime";import{HERO_FOCUS as An,HERO_MEDIA_TYPES as Ln}from"../../../format/lib/hero-media-layout.js";import{cloneElement as xe,createContext as kn,useContext as st,useEffect as Fn,useId as lt,useRef as J,useState as Z}from"react";import{useEasel as re,useSelectedHost as G}from"efficient-easel/easel";import{PIN_LENGTH as ie,toDateKey as vn,fromDateKey as Dn,parseOption as Bn}from"efficient-shell/format";import{say as a,editorEaselWords as x}from"../../../format/lib/editor-words.js";import{finiteNumber as Y}from"../../../format/lib/finite-number.js";import{LOADING_SHOWS_LABELS as at,firstFrameHint as Hn,loadingShowsOf as Gn,loadingStillHint as Mn}from"../../../format/lib/hero-video.js";import{pageFramesFor as Un,usePageVideoFrames as Wn}from"../page-video-frames.js";import{ScreenDocumentContext as Kn}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as ct,hidableText as ut}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as Oe,LINK_FIELD_MARKER as dt,MEDIA_FIELD_MARKER as Ie,SCAFFOLD_FIELD_MARKER as pt,TEXT_FIELD_MARKER as N,foldMetaOf as Ee,textFieldIdentifier as Xn}from"efficient-easel/draw";import $n from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as ft}from"../../../render/lib/document/show-when.js";import{CARD_IMAGE_PX_ROW as jn,CARD_IMAGE_RADIUS_ROW as ht,CARD_IMAGE_RADIUS_STEP as Vn,CORNER_RADIUS_MAX as Te,CORNER_RADIUS_MIN as F}from"../../../format/lib/content/card-image-shape.js";import{SECTION_CSS_KEY as Yn}from"../../../format/lib/content/section-css.js";import{IMAGE_CORNER_STEP as zn,IMAGE_CORNERS_LABEL as qn,IMAGE_CORNERS_ROW as Jn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as Zn,GRID_MAX_ROW_SPAN as mt,GRID_MAX_TILE_AT as Qn,GRID_MOBILE_MAX_COLUMNS as eo,GRID_TILE_AT_KEY as to}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as no,GALLERY_LAYOUTS as Re,GALLERY_LAYOUT_KEYS as oo,GALLERY_PHONE_LAYOUTS as ro,galleryChoices as gt,galleryLayoutRatio as io,galleryPictureCells as so}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as lo}from"./shell-glyph.js";import{anchorSiblingsOf as ao,placementPoints as co}from"../../../format/lib/hero-group-placement.js";import uo from"../../components/AnchorField.js";import po from"../../components/SourceStatus.js";import{AdjustIcon as fo,EyeIcon as ho,AnimationIcon as mo,BackgroundIcon as bt,BorderAllIcon as go,BlockSectionIcon as bo,ColumnWidthsIcon as se,ColumnsIcon as St,CornerIcon as wt,DirectionDownIcon as So,DirectionLeftIcon as wo,DirectionRightIcon as _o,DirectionUpIcon as Co,EditIcon as yo,GapIcon as xo,GridIcon as _t,GroundIcon as Ne,HashIcon as Ct,HeightIcon as le,ImageIcon as Oo,ListIcon as Io,LocationIcon as yt,PaddingBottomIcon as xt,PaddingLeftIcon as Ot,PaddingRightIcon as It,PaddingTopIcon as Pe,PageIcon as Eo,PhoneIcon as To,StickyIcon as Et,SearchIcon as Ro,SquareIcon as No,TypeIcon as Po,WidthIcon as Ao}from"efficient-easel/icons";import{FieldGlyph as Tt}from"../../components/FieldGlyph.js";import{resolvePageBackground as Lo}from"../../../format/lib/content/page-background.js";import{BOX_FILL_FADE_PROP as ko,BOX_FILL_FADES as Fo,BOX_SWATCH_PROP as vo,boxFillFadeOf as Rt,boxFillOf as Do,boxFillSlot as Ae,boxPaintOf as Bo}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as Nt,CORNER_SIDE_POINTS as Ho,SECTION_CORNERS_ROW as Pt,hasOwnSectionCorners as Go,normalizeCornerSides as At}from"../../../format/lib/content/section-corners.js";import{CARD_CORNERS_ROW as Lt}from"../../../format/lib/content/card-corners.js";import{enclosingPath as Mo,enclosingSection as Uo}from"./enclosing-section.js";import{SettingsDefaultReset as O,SettingsDrill as Wo,SettingsField as _,SettingsGroup as Ko,SettingsSegmented as Xo,SettingsBorder as $o,SettingsSidesEach as jo,SettingsSwitch as Le,borderSides as Vo,borderStartEach as Yo}from"efficient-easel/panel";import{ListField as zo}from"efficient-easel/fields";import{CodeIcon as qo}from"efficient-shell/icons/efficient";import{DisplayChips as Jo}from"efficient-shell/ui";import{desktopDisplayChanged as Zo,partShownOnDesktop as Qo,partShownOnPhone as er,phoneDisplayChanged as tr,withDesktopPart as nr,withPhonePart as or}from"../../../format/lib/content/part-display.js";import{ColorSwatch as rr,CornersInput as ir,DatePicker as sr,DateTimePicker as lr,FOCAL_DEFAULT as ar,IconPicker as kt,COLUMN_COUNT_MAX as Ft,COLUMN_SHARE_MIN as cr,COLUMN_SHARES_EQUAL as ur,resolveColumnShares as vt,WidthsBar as dr,useShellStrings as pr,IconButton as Dt,InputNumber as Bt,Slider as fr,Textarea as hr,Tooltip as ke}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as mr}from"./geocode-resolve.js";import{ColourRow as ae,InheritedColourRow as Ht}from"./ColourControl.js";import{fillThemeColors as gr,slotFill as ce}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as Fe}from"../../../format/lib/document/part-inks.js";import{keptByRow as ve}from"efficient-easel/screen/lib/document/style-fields";import Gt from"./MarkupToolbar.js";import{deviceField as y}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as br,NoControlMark as Sr,noControlField as Mt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as wr}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as _r,PANEL_ONLY_FIELD as Cr}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as yr,resolvePhoneValue as De}from"../../../format/lib/document/phone-override.js";import{phoneKey as B,tabletKey as Be,viewKeyAt as He}from"efficient-easel/draw";import{viewKey as I}from"../../../format/lib/animation/views.js";import{viewRows as M}from"../animation/view-rows.js";import{SuppressibleText as xr}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Or,CARD_OUTLINE_OPTIONS as Ir,DEFAULT_CARD_INDEX_FORMAT as Er,DEFAULT_CARD_OUTLINE as Tr}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Rr,DEFAULT_COVER_INDEX as Nr}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Pr}from"efficient-easel/draw";import Ar from"../../components/MediaUploadField.js";import Lr from"../../components/MultiSelectField.js";import kr from"../../components/SectionThemePicker.js";import Fr from"../../components/SearchSelectField.js";import vr from"../../components/StorefrontLinkField.js";import{UiIcon as Ut}from"efficient-easel/draw/client";import{SECTION_PADDING as P}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as Dr}from"../../../render/lib/content/button-look.js";import{usePreviewParts as Br}from"efficient-easel/draw/client";import{encodePartId as Hr}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as Gr,useEaselStrings as Mr}from"efficient-easel/strings";import{hasPhoneHeight as Ur,hasTabletHeight as Ge,resolveSectionMinHeight as Wr,resolveTabletHeight as Kr}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as Xr,SECTION_PIN_ABOVE_HINT as $r,SECTION_PIN_ABOVE_KEY as jr,SECTION_PIN_ABOVE_LABEL as Vr,SECTION_PIN_GROUP as Yr,SECTION_PIN_LABEL as Wt,SECTION_PIN_SCREENS_KEY as Me,SECTION_PIN_SCREENS_LABEL as Kt,SECTION_PIN_STOP_DEFAULT as zr,SECTION_PIN_STOP_HINT as qr,SECTION_PIN_STOP_KEY as Jr,SECTION_PIN_STOP_LABEL as Zr,SECTION_PIN_STOP_OPTIONS as Qr,SECTION_STICK_DISTANCE as U,SECTION_STICK_DISTANCE_ROW as Ue,SOME_VIEW_PINS as Xt,hasPhoneStick as ei,hasTabletStick as ti,resolveSectionStick as ue,sectionPinStopOf as ni,sectionPinStopWrite as oi}from"../../../format/lib/content/section-sticky.js";import{cssLengthOf as ri}from"../../../format/lib/content/css-length.js";import{SECTION_HEIGHT_MODES as ii,SECTION_MIN_HEIGHT as si,SECTION_MIN_HEIGHT_GROUP_LABEL as Q,SECTION_SCREEN_PCT as li,SECTION_HEIGHT_UNITS as ai}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as ci,resolveContainerDirection as $t}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as ui,BOX_BLOCK_SPACING_POINTS as jt,BOX_PHONE_ROW_LABEL as Vt,BOX_COLUMNS_MAX as di,BOX_COLUMNS_MIN as Yt,BOX_PHONE_ROW_MAX as pi,BOX_PHONE_ROW_MIN as We,BOX_SHARE_CHOICES as zt,BOX_SHARE_LABEL as z,boxShareChoiceOf as qt,boxShareWidthsOf as Ke,BOX_SHARE_PHONE_DEFAULT as fi,BOX_SHARE_PHONE_POINTS as hi}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as W}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Jt,BORDER_SIDES as mi,SECTION_BORDER_ROW as Zt,borderBySide as Qt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as gi,normalizeTheme as en,normalizeThemeColors as bi,sectionBandTone as Si,surfaceTwoTone as wi}from"../../../format/lib/theme.js";import{CONTAINER_GAP as tn,CONTAINER_GAP_BUILT_IN as _i,CONTAINER_GAP_PHONE as Xe,GAP_FIELD_CONTAINER as $e,followsSitePhoneGap as Ci,hasOwnContainerGap as yi,hasOwnPhoneGap as je,resolveContainerGap as nn,resolvePhoneContainerGap as on}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as xi,CARD_IMAGE_BG_OFF as Oi,CARD_IMAGE_BG_SWATCH_NAMES as Ii,CARD_IMAGE_BG_SWATCHES as Ei,isCardImageBackgroundInheriting as Ti,cardImageBackgroundChoice as Ri,THEME_CARD_IMAGE_BG as Ni}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as Pi,SECTION_BG_NO_FILL as Ai,sectionBackgroundChoice as Li,THEME_SECTION_BG as Ve,isSectionBackgroundEmpty as ki,sectionBackgroundHex as rn}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Fi,nestedAccentValue as sn,resolveSectionAccent as de}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as vi,TYPE_SIZE_INHERIT as Di,isTypeSizeInheriting as Bi}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Hi,WIDTH_CHOICE_LABEL as Gi,WIDTH_INHERIT as Mi}from"../../../format/lib/content/section-width.js";import{useEaselSession as Ui}from"efficient-easel/screen/lib/session-context";import{backendOf as Wi}from"../website-session.js";import{BOX_GAP as Ki,describedAs as v,group as T,iconOf as K,sharedStyleKinds as ee}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as ln,onDesktopWords as X,phoneTwinFields as Ye,saidAlignmentGrid as Xi,useLengthUnit as $i}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as ji,PICTURE_PICKER_ROW as Vi,directionField as Yi,gapField as ze,iconPickerRow as an,lengthUnitFields as pe,pickerCellIcon as zi,pickerNoneIcon as qi,Segmented as fe,select as A,slider as H}from"./box-fields.js";import{VIEW_ABOVE as qe}from"efficient-easel/screen/lib/content/length-units";import{tierOfView as cn,viewOfTier as Ji}from"../../../format/lib/content/view-tier.js";import{ownEntry as Zi}from"../../../format/lib/own-entry.js";import{LAYOUT_CELL as Qi,galleryPhonePicture as un}from"./choice-pictures.js";function dc({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?a(e):e})}function $(e,t){return a("{value} from {from}",{value:e,from:t})}function es(){const{blockGap:e}=W();return e===null?a("this container's own spacing"):$(`${e}px`,a("Styles"))}function ts({inherited:e,onReset:t,label:n}){return i(O,{words:x()?.panel,label:a(n),changed:!e,detail:es(),onReset:t})}function ns(e){return ze({...Ki,builtIn:_i[e],resolve:(t,n)=>nn(e,t,n?.siteGap),action:(t,n)=>i(ts,{inherited:!yi(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[$e]:e}})}function os(e){return ft(y("mobile",{[$e]:e,type:"custom",render:t=>i(ss,{container:e,...t})}),dn)}function rs(e){return ft(y("tablet",{[$e]:e,type:"custom",render:t=>i(is,{container:e,...t})}),dn)}const dn={not:{field:"gap",in:Array.from({length:-tn.min},(e,t)=>tn.min+t)}};function pc(e){return{gap:y("desktop",ns(e)),[Be("gap")]:rs(e),[B("gap")]:os(e)}}function is({container:e,...t}){const[n]=R("gap"),{siteGap:o}=t.field??{},r=Math.max(Xe.min,nn(e,n,o));return ze({...Xe,builtIn:r,resolve:s=>je(s)?s:r,action:(s,c)=>i(O,{words:x()?.panel,label:a("Gap"),changed:je(s),detail:X(u=>a(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function ss({container:e,...t}){const[n]=R("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},l=on(e,void 0,n,o,r);return ze({...Xe,builtIn:l,resolve:c=>on(e,c,n,o,r),action:(c,u)=>i(O,{words:x()?.panel,label:a("Gap"),changed:je(c),detail:$(`${l}px`,Ci(e,n,r)?a("Styles"):a("Desktop")),onReset:()=>u(void 0)})}).render(t)}function fc(e){return Yi({offered:ci(e),fallback:$t(e,void 0),resolve:t=>$t(e,t)})}function hc(e,t){return co(t?ao(e,t):[],t)}function ls({inherited:e,onReset:t,label:n}){return i(O,{words:x()?.panel,label:a(n),changed:!e,detail:$(a("Full"),a("the page")),onReset:t})}function j({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:l,hideable:s=!0,markup:c=!0}){const{text:u,hidden:d}=ct(e),h=J(null),p=J(null),f=C=>t(s?{text:C,hidden:d}:C),m=()=>t({text:u,hidden:!d}),g=s&&d,b=lt(),w=r?ps(r)?i("span",{className:"sf-hint-while-typing",children:a(r)}):a(r):void 0,S=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(Po,{}),htmlFor:b,className:g?"is-hidden":void 0,hint:w,action:s?i(ke,{content:S,children:i(Dt,{"aria-pressed":d,"aria-label":S,onClick:m,children:d?i(Ut,{name:"eye-off",size:14}):i(Ut,{name:"eye",size:14})})}):void 0,children:L("div",{className:"sf-copybox",children:[c&&i(Gt,{target:l?p:h,value:u,onChange:f}),l?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 mc(e,t){return{...e,[pt]:t}}function gc(e){const t=e[N];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[N]:{...t,offPage:!0}}}function bc(e){return!e||typeof e!="object"?!1:e[N]?.offPage===!0}function Sc(e){if(!e[N])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Cr]:!0}}function wc(e){return _r(e)}function _c(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 Fu,SCALAR_TEXT_CONTROLS as vu}from"efficient-easel/draw";function Cc(e,t){if(!e[N])throw new Error("inOwnBox: the field holds no authored text");const{[br]:o,...r}=e;return{...r,[wr]:!0,render:t}}const as=new Set(Pr),he={type:"radio",options:[{value:!0},{value:!1}]},pn={text:{type:"object",objectFields:{text:{type:"text"},hidden:he}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:he}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},V=(e,t)=>{const n=v({...t,[N]:e},{...pn[e.control],label:e.label});if(!as.has(e.control))return n;const o=t.render;return{...Mt(n,"authored-copy"),render:r=>i(xr,{name:r.name,children:o(r)})}},yc="Everything else on this block comes from the linked post. Unlink it to edit by hand.",cs={field:"source.slug",set:!0},xc={not:cs},us="Select a word, then press the highlighter.",ds=new Set([us]),ps=e=>ds.has(e);function Oc(e,t,n){return V({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(j,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function Ic(e,t,n){return V({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(j,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function Ec(e,t,n){return V({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(j,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function Tc(e,t,n){return V({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(j,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function Rc(e){return{type:"custom",[dt]:{label:e},...v({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(vr,{value:ut(t),onChange:n,label:e})}}function Nc(e,t,n){return V({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(j,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const Pc={Design:fo,Animation:mo};function Ac(e,t){return{type:"custom",render:()=>i(fs,{text:e,values:t})}}function fs({text:e,values:t}){return i("p",{className:"sf-note",children:a(e,t)})}function Lc(e){return Ee(e)!==null&&e?.tabs!==void 0}const fn=new Map;function kc(e,t){const n=`${e}\0${t?t.join(""):""}`,o=fn.get(n)??{type:"custom",tabs:t,[Oe]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(k,{})};return fn.set(n,o),o}const hn=new Map;function Fc(e){const t=hn.get(e)??{type:"custom",[Oe]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(k,{})};return hn.set(e,t),t}function hs(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function vc(e,t){return hs(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(k,{})}}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(k,{})}}function Bc({title:e,children:t}){const[n,o]=Z(()=>!Je.has(e));return i(Ko,{title:e,open:n,onToggle:r=>{o(r),r?Je.delete(e):Je.add(e)},children:t})}const Je=new Set;function ms({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),l=r?o?.[r]:void 0,s=l?a(l):t;return L("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?a(o[c]):c;return i(ke,{content:u,children:i(rr,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:s})]})}function Hc(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(gs,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function gs({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const l=typeof o=="string"?o:void 0,{colors:s,n:c}=nt(),u={background:s.background,surface:s.surface,surface2:wi(s),band:Si(s)},d=n?Ve:t,h=ki(l,t,d),p=rn(void 0,d,u),f=n?Pi:void 0,m=d===Ve?a("the theme's section background"):a("Theme {n} background",{n:c}),g=bs(l,t,s,c,u,r),b=$(p.toUpperCase(),m),w=Fe(l),S=w?ce(w,s,c):null;return S?i(ae,{label:a(e),icon:i(bt,{}),value:S.hex,caption:S.words,onChange:r,changed:!0,onReset:()=>r(f),resetTo:b,choices:g}):i(Ht,{label:a(e),icon:i(bt,{}),value:h?"":rn(l,t,u),inherited:p,resetTo:b,onChange:r,onReset:()=>r(f),choices:g})}function bs(e,t,n,o,r,l){const s=Li(e,t);return[{label:a("No fill"),color:"",selected:s==="none",onPick:()=>l(Ai)},{label:`${a("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:s==="band",onPick:()=>l(Ve)},...tt(Fe(e)??"",n,o,l)]}function Ss(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,l=Ti(r,t);return i(_,{label:a(e),icon:i(Ne,{}),changed:!l,action:i(O,{words:x()?.panel,label:a(e),changed:!l,detail:a("the theme's image stage"),onReset:()=>o(xi)}),children:ms({swatches:Ei,current:l?Ni:Ri(r,t),onPick:o,names:Ii})})}}}function Gc(e=n=>n,t){return ee({_gSectionTheme:T(Fi),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(kr,{value:e(n),onChange:o,followLabel:t})}})}function me(e){const t=E(),n=cn(e?.view),o=s=>He(e.valueKey,s),r=e.numbersIn??(s=>Y(t[o(s)])!==void 0),l=e.followsView??ks(n,r);return $i({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:ji,label:a(e.label),grid:e.grid,hasOwn:r(n),view:{tier:n,numbersIn:r,followsView:l},convertTo:e.convertTo??(s=>{const c=Y(t[o(n)]);return c===void 0?{}:{[o(n)]:s(c)}})})}function q({min:e,max:t,step:n,value:o,onChange:r,suffix:l="",readout:s=!0,notch:c,ariaLabel:u,disabled:d=!1,placeholder:h,placeholderWord:p,onClear:f,units:m,inputMax:g}){const b=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:b?"sf-slider has-notch":"sf-slider",style:b?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(fr,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...p?{emptyLabel:a(p)}:{},suffix:l||void 0,...m?{units:m}:{},...g!==void 0?{inputMax:g}:{},showInput:s,label:u===void 0?void 0:a(u),disabled:d,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:w=>{w===null?f?.():w!==o&&r(w)}})})}function ws(e,t){const{min:n,max:o,step:r=1,unsetLabel:l,hint:s,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?K(d):void 0,value:g?u||l===void 0?void 0:a(l):`${m}${h}`,changed:!g,action:u?xe(u,{changed:!g,onReset:()=>f(null)}):i(O,{words:x()?.panel,label:a(e),changed:!g,onReset:()=>f(null)}),hint:typeof s=="string"?a(s):s,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",_s={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,l=r!==null;return i(_,{label:a(te),icon:i(wt,{}),changed:l,action:xe(e.mark,{changed:l,onReset:()=>o(null)}),hint:e.hint,children:i(Cs,{tier:e,px:r,name:t.name,onRadius:o})})}}}function R(e){const t=G();return[t?.values?.[e],n=>t?.onChange(e,n)]}function mn(){return Mt({type:"custom",render:()=>i(Sr,{})},"always")}function ge(){const e=G();return t=>e?.onChangeMany(t)}function Cs({tier:e,px:t,name:n,onRadius:o}){const r=e.useFollowed(),[l,s]=R(e.sidesKey),c=ge(),u=me({row:e.row??_s,label:te,grid:{min:F,max:Te,step:e.step??1},valueKey:n??"",view:"desktop"}),d=At(l)??[...Nt];return i(ir,{label:a(te),value:d,corners:Ho,onChange:h=>{const p=At(h)??[];s(p.length===Nt.length?null:p)},radius:t,onRadiusChange:u&&n?h=>c({[n]:h,...u.unitPatch(h===null)}):o,radiusMin:u?.grid.min??F,radiusMax:u?.grid.max??Te,radiusStep:u?.grid.step??e.step??1,radiusPlaceholder:u&&u.unit!=="px"?"–":String(r),...u?{radiusUnit:u.unit,units:u.units}:{}})}function gn(e,t){return pe(e,t)}function bn(){return mn()}function ys({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=W(),r=typeof o=="number"?`${o}px`:a("not set");return i(O,{words:x()?.panel,label:a(e),changed:t,detail:o==null?a("the built-in corners"):$(r,a("Styles")),onReset:n})}function xs(){const{cornerRadiusPx:e}=W();return typeof e=="number"?e:F}function Os(){return Ze({sidesKey:"sectionCornerSides",row:Pt,useFollowed:xs,mark:i(ys,{label:te}),hint:Is})}const Is="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function Mc(){return ee({_gShape:T("Shape"),sectionCorners:Os(),...gn(Pt,"sectionCorners"),sectionCornerSides:bn(),...M("sectionBorder",Ls),...pe(Zt,"sectionBorder",{tablet:!0,phone:!0})})}const Es=()=>({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 Ts(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function Rs(){let e;try{const t=en(W().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||gi.line}function Ns({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:l=!0,above:s={},length:c}){const u=e&&typeof e=="object"?e:{},[d,h]=Z(()=>r?Yo(u,s):!1),p=Es(),f=m=>Ts(r&&l?m:{width:m.width,color:m.color,...l?{style:m.style}:{}});return i(_,{label:a("Border"),icon:i(go,{}),action:r?i(jo,{each:d,label:a("Each side"),onChange:h}):void 0,children:i($o,{label:a("Border"),value:u,each:d,onChange:m=>t(f(m)),placeholder:n,presets:o,words:c?{...p,unit:c.unit}:p,styles:l,max:c?.grid.max??Jt,...c?{step:c.grid.step,units:c.units}:{}})})}function Ps({value:e,onChange:t,view:n}){const[o]=R("sectionBorder"),[r]=R(Be("sectionBorder")),l=Rs(),s=f=>f&&typeof f=="object"?f:{},c=n==="phone"?{...Qt(s(o)),...Qt(s(r))}:n==="tablet"?s(o):{},u=E(),d=ge(),h=I("sectionBorder",n),p=me({row:Zt,label:"Border",grid:{min:0,max:Jt,step:1},valueKey:"sectionBorder",view:n,numbersIn:f=>Qe(u[He("sectionBorder",f)]),convertTo:f=>{const m=s(u[h]);return Qe(m)?{[h]:As(m,f)}:{}}});return i(Ns,{value:e,length:p,onChange:p?f=>d({[h]:f,...p.unitPatch(!Qe(f))}):t,placeholder:{sides:Vo(c),style:c.style??"solid",color:c.color||l},presets:[l],above:c})}const Sn=["width",...mi];function Qe(e){if(!e||typeof e!="object")return!1;const t=e;return Sn.some(n=>Y(t[n])!==void 0)}function As(e,t){const n={...e};for(const o of Sn){const r=Y(n[o]);r!==void 0&&(n[o]=t(r))}return n}function Ls(e){return{type:"custom",render:({value:t,onChange:n})=>i(Ps,{value:t,onChange:n,view:e})}}function ks(e,t){let n=qe[e];for(;n&&qe[n]!==null&&!t(n);)n=qe[n];return n??e}function Uc(e){return{type:"custom",render:()=>i(Fs,{partKey:e})}}function Fs({partKey:e}){const[t]=R("id"),[n]=R("_partStyles"),{textStyles:o}=W(),r=Mr();let l=null;try{l=Br().select}catch{l=null}const s=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(Wo,{name:a("Text"),preview:Dr(s,c,{noStyle:a("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??Gr.copy.panel).cases}),onOpen:()=>{l&&typeof t=="string"&&l(Hr(t,e))}})}function wn(e){const{cornerRadiusPx:t}=W(),n=typeof t=="number"?t:e;let o=null;try{const{appState:l,selectedItem:s}=re(u=>u),c=s?.props?.id?String(s.props.id):void 0;o=c?Uo(l?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Go(r)?r:n}function vs({label:e,changed:t=!1,onReset:n=()=>{}}){const o=wn(F);return i(O,{words:x()?.panel,label:a(e),changed:t,detail:$(`${o}px`,a("the section")),onReset:n})}function Ds(){return i(k,{children:a("Follows the section's Corners until you set a number here.")})}function Bs(){return Ze({sidesKey:"cardCornerSides",row:Lt,useFollowed:()=>wn(F),mark:i(vs,{label:te}),hint:i(Ds,{})})}function Hs(){return{type:"custom",render:()=>i($n,{})}}function Wc(){return{_gShape:T("Shape"),cardCorners:Bs(),...gn(Lt,"cardCorners"),cardCornerSides:bn(),cardCornersApplyAll:Hs()}}function Gs(){return v({type:"custom",[Vi]:!0,render:e=>i(Us,{...e})},{type:"select",label:z,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 Ms(e,t){const n=qt(e);if(n!=="custom")return a(zt.find(r=>r.value===n)?.label??"");const o=vt(Ke(e,t),t);return o?[...o,100-o.reduce((r,l)=>r+l,0)].join(" / "):a("Custom")}function Us(e){const{value:t,onChange:n}=e,[o]=R("content"),r=Array.isArray(o)?o.length:0,l="follows"in e,s=t!=null,c=s?t:l?e.follows:void 0,u=qt(c),d=r>=2&&r<=Ft,h=()=>[...ur[r]??[]],p=J(null),f=S=>{const C=p.current;C&&JSON.stringify(S)===JSON.stringify(C.shares)?n(C.value):S&&n(S)},m=S=>{S===u||S==="custom"&&!d||n(S==="custom"?h():S)},g=a("The width bar works for 2 to {count} blocks.",{count:Ft}),b=s&&(l||t!=="content"),w=pr().widths.hint(r,cr);return i(_,{label:a(z),icon:i(se,{}),changed:b,hint:u!=="custom"?void 0:d?w:g,action:i(O,{words:x()?.panel,label:a(z),changed:b,disabled:e.readOnly===!0,detail:l?X(S=>a(S),Ms(e.follows,r),e.followsView):a("Fit content"),onReset:()=>n(void 0)}),children:L("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(kt,{label:a(z),value:u,options:zt.map(S=>({value:S.value,label:S.value==="custom"&&!d?g:a(S.label),icon:zi(i("span",{className:"sf-gallery-pic sf-share-pic",children:_n(S.weights).map((C,D)=>i("i",{style:{gridColumn:`span ${C}`}},D))}),a(S.label),S.value==="custom"&&!d?g:a(S.label))})),onChange:m,columns:3,cell:Cn,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&d?i("div",{onFocus:()=>{p.current={value:t,shares:vt(Ke(c,r),r)}},onBlur:()=>{p.current=null},children:i(dr,{label:a(z),count:r,value:Ke(c,r),onChange:f,readOnly:e.readOnly===!0})}):null]})})}function _n(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 Kc(){return A(ui,i(xo,{}),jt,jt[0].value)}function Xc(e){return A("On a phone",i(To,{}),[{label:"In the header",value:"header"},{label:"In the menu",value:"menu"}],e)}function $c(){return y("mobile",an(z,i(se,{}),hi.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:_n(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),fi,{columns:2,cell:Cn}))}const Cn={width:"5.75rem",height:"3.25rem",words:!0};function jc(){return Ye("share",Gs(),ln)[Be("share")]}function Ws(){return y("mobile",H(Vt,i(St,{}),We,pi,1,We,"",{clear:{phoneFollows:!1,hint:We}}))}const yn={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function Vc(){const e=H(Vt,i(St,{}),Yt,di,1,Yt,"",{clear:{emptyLabel:"Auto"}}),t=Ye("columns",e,{...yn,tablet:ln.tablet}),n=Ye("columns",e,yn,{phoneRow:Ws()});return{...t,phoneRow:n.phoneRow}}function Yc(e,t,n,o,r,l,s){return{type:"custom",render:({value:c,onChange:u,name:d})=>i(Ks,{label:e,min:t,max:n,step:o,fallback:r,role:l,value:c,onChange:u,name:d??"",length:s})}}function Ks({label:e,min:t,max:n,step:o,fallback:r,role:l,value:s,onChange:c,name:u,length:d}){const h=E(),p=ge(),f=cn(d?.view),m=me({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(Tt,{noun:l}),action:i(O,{words:x()?.panel,label:a(e),changed:!Bi(s),detail:a("the Text style in Styles"),onReset:()=>g(Di),defaultAction:{onPress:()=>g(vi),title:a("Keep this section's own built-in size"),icon:i(bo,{})}}),children:q({min:m?.grid.min??t,max:m?.grid.max??n,step:m?.grid.step??o,value:typeof s=="number"?s:r,...m?{suffix:m.unit,units:m.units}:{suffix:"px"},ariaLabel:e,onChange:g})})}function be(e,t,n){return[{label:"Auto",value:""},...Array.from({length:e},(o,r)=>({label:r===0?`1 ${t}`:`${r+1} ${n}`,value:String(r+1)}))]}function zc(){return{_gCellWidth:T("Cell size"),gridSpan:y("desktop",A("Positions",i(se,{}),be(Zn,"position","positions"),"")),gridRowSpan:y("desktop",A("Rows tall",i(le,{}),be(mt,"row","rows"),"")),[to]:H("At card",i(Ct,{}),1,Qn,1,1,""),[B("gridSpan")]:y("mobile",A("Positions",i(se,{}),[{label:"Full row",value:""},...be(eo,"position","positions").slice(1)],"")),[B("gridRowSpan")]:y("mobile",A("Rows tall",i(le,{}),be(mt,"row","rows"),""))}}function E(){let e=null,t=null;try{e=st(Xs),t=re(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Xs=kn(null);function $s({min:e,max:t,step:n,px:o,label:r,onChange:l,desktopKey:s,fallback:c}){const u=E()[s],d=De(void 0,u,c);return i(k,{children:q({min:e,max:t,step:n,value:De(o,u,c),readout:!1,ariaLabel:r,notch:d,onChange:l})})}function js({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:l=()=>{}}){const s=E()[t],c=De(void 0,s,n);return i(O,{words:x()?.panel,label:a(e),changed:r,detail:X(u=>a(u),`${c}${o}`),onReset:l})}function Vs(e){return ws(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(js,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i($s,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Ys={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},zs={Top:Pe,Bottom:xt,Left:Ot,Right:It},qs=e=>{const t=zs[e];return i(t,{})};function qc(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=w=>Ys[w],l=w=>H(r("Top"),i(Pe,{}),P.min,P.max,P.step,w,"px"),s=(w,S,C,D=P)=>y("mobile",Vs({label:r(w),icon:qs(w),desktopKey:S,min:D.min,max:D.max,step:D.step,fallback:C})),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=w=>g?y("desktop",w):w;return ee({...o?{_gSpacing:T("Padding")}:{},[t]:b(l(c)),...g?{[B(t)]:s("Top",t,c)}:{},...e.only==="top"?{}:{[n]:b(H(r("Bottom"),i(xt,{}),P.min,P.max,P.step,u,"px")),...g?{[B(n)]:s("Bottom",n,u)}:{}},...e.sides?{[d]:b(H(r("Left"),i(Ot,{}),p.min,p.max,p.step,f,"px")),...g?{[B(d)]:s("Left",d,m,p)}:{},[h]:b(H(r("Right"),i(It,{}),p.min,p.max,p.step,f,"px")),...g?{[B(h)]:s("Right",h,m,p)}:{}}:{}})}function Jc(e,t){const n=Object.fromEntries(Object.entries(t).map(([l,s])=>[l,l in e&&Ee(s)?e[l]:s])),o={};let r=!1;for(const[l,s]of Object.entries(e)){if(l in t){r||Object.assign(o,n),r=!0;continue}o[l]=s}return r||Object.assign(o,n),o}const Se="Width";function Zc(e,t=Hi,n=!0){const o=t.map(r=>({label:Gi[r],value:r}));return ee({...n?{_gWidth:T(Se)}:{},widthMode:{type:"custom",render:({onChange:r,field:l})=>i(_,{label:a(Se),icon:i(Ao,{}),action:n?i(ls,{inherited:l?.inherited??!1,onReset:()=>r(Mi),label:Se}):void 0,children:fe({options:o,value:l?.currentValue||e,onChange:r,ariaLabel:Se})})}})}function Qc({fill:e=!1}={}){const t=(r,l)=>({type:"custom",render:({value:s,onChange:c})=>i(Js,{value:s,onChange:c,view:r,badge:l,fill:e})}),n=()=>ve("sectionHeightMode"),o=()=>ve("sectionHeightMode");return ee({_gHeight:T(Q),...M("sectionHeightMode",r=>r==="desktop"?t(r):t(r,l=>i(tl,{view:r,onClear:()=>l(void 0)}))),...M("sectionHeightValue",n),...M("sectionHeightUnit",o)})}function Js({value:e,onChange:t,view:n,badge:o,fill:r=!1}){const l=E(),{mode:s,number:c,unit:u}=Zs(n,l,e);return i(_,{label:Q,icon:K(i(le,{})),action:o?o(t):void 0,children:L("div",{className:"es-width-stack",children:[fe({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"},...r?[{label:"Fill",value:"fill"}]:[]],value:s,onChange:t,ariaLabel:Q}),c?i(el,{view:n,mode:s,menu:u}):null]})})}function xn(e,t){return e==="phone"&&Ge(t)?Kr(t):Wr(t)}function we(e,t){return e==="desktop"||(e==="tablet"?Ge(t):Ur(t))?null:xn(e,t)}function Zs(e,t,n){const r=(l=>ii.includes(l))(n)?n:we(e,t)?.mode??"auto";return{mode:r,number:r!=="auto"&&r!=="fill",unit:r==="fixed"}}function Qs(e,t,n,o){const r=we(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[I("sectionHeightMode",e)]:r.mode,...r.mode==="fixed"?{[I("sectionHeightUnit",e)]:r.unit}:{},...n==="sectionHeightUnit"?{[I("sectionHeightValue",e)]:r.value}:{},[I(n,e)]:o}}function On(e,t,n){const o=G(),r=we(e,E());return!o||!r?{followed:null,write:n}:{followed:r,write:s=>o.onChangeMany(c=>{const u=Qs(e,c,t,s);return u===null?{[I(t,e)]:s}:Object.keys(u).length?u:null})}}function el({view:e,mode:t,menu:n}){const o=G(),r=E(),l=I("sectionHeightValue",e),s=I("sectionHeightUnit",e),c=w=>S=>o?.onChangeMany(()=>({[w]:S})),{followed:u,write:d}=On(e,"sectionHeightValue",c(l)),{write:h}=On(e,"sectionHeightUnit",c(s)),p=t==="screen"?"%":r[s],f=Bn(ai,"px",u?u.unit:p),m=f==="%"?li:si,g=r[l],b=n?{options:["px","%"],label:a("Unit"),onChange:w=>h(w)}: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 tl({view:e,onClear:t}){const n=E(),o=we(e,n)===null,r=e==="phone"&&Ge(n),l=xn(e,n),s=X(c=>a(c),l.mode==="auto"?a("Auto"):`${l.value}${l.unit}`,r?"tablet":"desktop");return i(O,{words:x()?.panel,label:a(Q),changed:o,detail:s,onReset:t})}function eu(e={}){const t=e.intro===!0,n=l=>({type:"custom",render:({value:s,onChange:c,id:u,name:d})=>i(al,{value:s,onChange:c,labelId:`${u??d??"stickTop"}-label`,view:l,intro:t})}),o=l=>({type:"custom",render:({value:s,onChange:c})=>i(il,{value:s,onChange:c,view:l,intro:t})}),r=l=>({type:"custom",render:({value:s,onChange:c})=>i(sl,{value:s,onChange:c,view:l,intro:t})});return{_gStick:T(Yr,{dot:t?rl:Xt}),...M("stickTop",n),...M("stickTopDistance",o),...pe(Ue,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?M(Me,r):{},...t?{}:{[Jr]:nl()},...t||e.above===!1?{}:{[jr]:ol()}}}function nl(){const e=A(Zr,i(Pe,{}),Qr,zr);return y("desktop",{...e,render:t=>{const n=e.render({...t,value:ni(t.value),onChange:o=>t.onChange(oi(o))});return xe(n,{hint:a(qr)})}})}function ol(){const e=Tn(Vr,!1,i(Et,{}),$r);return y("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}const rl={any:[Xt,Xr]};function In(e,t,n,o,r){const l=G(),s=E(),c=e==="desktop"||ne(e,s)?null:et(e,ue(s,{intro:o}));return{followed:c,write:(c||r)&&l?d=>l.onChangeMany(h=>{const p=ll(e,h,d,t,o),f=p===null?{[I(t,e)]:d}:p;return Object.keys(f).length?{...f,...r?.(d)??{}}:null}):n}}function il({value:e,onChange:t,view:n,intro:o}){const r=E(),l=ue(r,{intro:o}),s=h=>{const p=Ji(h);return p==="desktop"||ne(p,r)},c=me({row:Ue,label:"Distance from top",grid:{min:U.min,max:U.max,step:U.step},valueKey:"stickTopDistance",view:n,numbersIn:h=>s(h)&&Y(r[He("stickTopDistance",h)])!==void 0,followsView:n==="phone"&&l.ownTablet?"tablet":"desktop"}),{followed:u,write:d}=In(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??U.min,max:c?.grid.max??U.max,step:c?.grid.step??U.step,value:u?null:typeof e=="number"?e:U.fallback,...u?{placeholder:u.distance}:{},...c?{suffix:c.unit,units:c.units}:{suffix:"px"},ariaLabel:a("Distance from top"),onChange:d})})}function sl({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:l}=In(n,Me,t,o);return i(_,{label:a(Kt),icon:K(i(le,{})),children:q({min:ie.min,max:ie.max,step:ie.step,value:r?null:Y(e)??ie.default,...r?{placeholder:r.screens}:{},ariaLabel:a(Kt),onChange:l})})}function ne(e,t){return e==="tablet"?ti(t):ei(t)}function et(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 ll(e,t,n,o="stickTopDistance",r=!1){if(e==="desktop"||ne(e,t))return null;if(n===void 0)return{};const l=et(e,ue(t,{intro:r})),s=e==="phone"&&ne("tablet",t)?h=>I(h,"tablet"):h=>h,c=(h,p)=>t[s(h)]==null?{}:{[I(h,e)]:p},u=Ue.unitKey,d=t[s(u)]==null?{}:{[I(u,e)]:l.unit};return{[I("stickTop",e)]:!0,...c("stickTopDistance",l.distance),...d,...c(Me,l.screens),[I(o,e)]:n}}function al({value:e,onChange:t,labelId:n,view:o,intro:r}){const l=E(),s=ue(l,{intro:r}),c=o==="phone"?s.phone:o==="tablet"?s.tablet:r?s.desktop:e===!0,u=o==="phone"&&s.ownTablet,d=o==="desktop"?null:et(o,s),h=d?.on?ri(d.distance,d.unit):a("Off");return i(_,{label:a(Wt),labelId:n,icon:K(i(Et,{})),action:L(k,{children:[o!=="desktop"?i(O,{words:x()?.panel,label:a(Wt),changed:ne(o,l),detail:X(p=>a(p),h,u?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(Le,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const En="e.g. about";function tu(){return{_gAnchor:T("Anchor"),anchor:V({control:"plainText",label:"Name",placeholder:En},{type:"custom",render:({value:e,onChange:t})=>i(uo,{value:e,onChange:t,nameBox:(n,o)=>i(j,{value:n,onChange:o,label:"Name",placeholder:En,hideable:!1,markup:!1})})})}}function nu(){return{_gAdvanced:T("Advanced"),[Yn]:cl}}const cl={type:"custom",render:({value:e,onChange:t})=>i(_,{label:a("Custom CSS"),icon:K(i(qo,{})),children:i(hr,{"aria-label":a("Custom CSS"),spellCheck:!1,autoGrow:!0,className:"font-mono",value:typeof e=="string"?e:"",onChange:n=>t(n.target.value)})})};function ou(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:s})=>{const c=`${l??s??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(lr,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:d=>r(d?d.toISOString():"")})})}}}function ru(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:s})=>{const c=`${l??s??e}-date`;return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(sr,{id:c,value:Dn(typeof o=="string"?o:null),onChange:u=>r(u?vn(u):"")})})}}}function Tn(e,t,n,o){return{type:"custom",...v({},{...he,label:e}),render:r=>{const{value:l,onChange:s,id:c,name:u}=r,d="follows"in r,h=r,p=typeof l=="boolean",f=typeof h.follows=="boolean"?h.follows:t,m=p?l:d?f:t,g=`${c??u??e}-label`,b=h.readOnly===!0,w=i(Le,{checked:m,onChange:s,disabled:b,ariaLabelledBy:g});return i(_,{label:a(e),labelId:g,icon:n,hint:o===void 0?void 0:a(o),action:d?L(k,{children:[i(O,{words:x()?.panel,label:a(e),changed:p,detail:h.followsNoView?a(f?"On":"Off"):X(S=>a(S),a(f?"On":"Off"),h.followsView),disabled:b,onReset:()=>s(void 0)}),w]}):w})}}}function iu(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(ul,{label:"Background",icon:i(Eo,{}),id:r,value:e,shown:Lo(e),onChange:t})}}}function su(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(ae,{label:a(e),icon:n,value:o||t,onChange:r})}}function ul({label:e,icon:t,id:n,value:o,shown:r,onChange:l}){const{colors:s,n:c}=nt(),u=Fe(o),d=u?ce(u,s,c):null;return i(ae,{label:a(e),icon:t,id:n,value:d?d.hex:r,caption:d?.words,onChange:l,choices:tt(u??"",s,c,l)})}function lu(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(dl,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function tt(e,t,n,o){const r=Ae(e);return gr(t,n).map(l=>({label:l.label,color:l.value,selected:r===l.name,onPick:()=>o(l.name)}))}function dl({value:e,onChange:t,twin:n}){const{colors:o,n:r}=nt(),l=o.background,s=$(l.toUpperCase(),a("Theme {n} background",{n:r})),[c,u]=R(ko),[d]=R(vo),h=typeof d=="string"&&d.trim()!=="",p=Rt(c),f=oe=>u(Rt(oe)||void 0),m=Ae(e),g=m?ce(m,o,r):null,b=tt(e,o,r,t),w=n?()=>t(void 0):()=>t("");let S=l,C=s;if(n){const oe=Ae(n.follows),Ce=Do(n.follows),ye=oe?ce(oe,o,r):Ce?{hex:Ce,words:Ce.toUpperCase()}:null;S=ye?.hex??l,C=X(Pn=>a(Pn),ye?ye.words:s,n.view)}const D=!n&&(Bo(e)||h)?i(pl,{value:p,onChange:f}):null;return g?i(ae,{label:a("Fill"),icon:i(Ne,{}),value:g.hex,caption:g.words,onChange:t,changed:!0,onReset:w,resetTo:C,choices:b,children:D}):i(Ht,{label:a("Fill"),icon:i(Ne,{}),value:e,inherited:S,resetTo:C,onChange:t,onReset:w,choices:b,children:D})}function pl({value:e,onChange:t}){return fe({options:Fo.map(n=>({label:n.label,value:n.value,hint:n.hint})),value:e,onChange:t,ariaLabel:a("Fill")})}function fl(e,t,n){if((e?.content??[]).some(s=>s?.props?.id===t))return de(n);const r=Mo(e,t);if(r.length===0)return null;const l=de(sn(n));if(l!==null)return l;for(let s=r.length-1;s>0;s-=1){const c=de(sn(r[s].sectionAccent));if(c!==null)return c}return de(r[0].sectionAccent)}function nt(){const e=en(W().theme),[t]=R("sectionAccent");let n=null;try{const{appState:r,selectedItem:l}=re(c=>c),s=l?.props?.id?String(l.props.id):void 0;n=s?fl(r?.data,s,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:bi(e.themes[o]),n:o+1}}function au(){return mn()}const cu={top:i(Co,{}),right:i(_o,{}),bottom:i(So,{}),left:i(wo,{})};function uu(e,t,n,o,r,l,s){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=l?.[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):s?a(s):"",children:Xi(a,{label:e,value:m,onChange:f,points:h})})}}}function du(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:l})=>i(Lr,{label:e,options:(l.options??t).map(s=>({...s,label:a(s.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:a(n)}:{}})}}function pu(e,t,n,o){return{type:"custom",options:t,fallback:n,...v({},{type:"select",label:e}),render:({value:r,onChange:l,field:s})=>i(Fr,{label:e,options:(s.options??t).map(c=>({...c,label:a(c.label)})),fallback:s.fallback??n,value:r,onChange:l,placeholder:o===void 0?void 0:a(o)})}}function fu(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const hl={image:"Image",video:"Video"},hu=Ln.map(e=>({label:hl[e],value:e}));function mu(e,t,n){const o=Object.keys(at).map(r=>({label:at[r],value:r,picture:n[r]}));return{type:"custom",...v({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(gl,{label:e,icon:t,options:o,onChange:r})}}function ml(e,t,n){const o=Hn(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=Mn(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 gl({label:e,icon:t,options:n,onChange:o}){const r=G(),l=r?.values??{},s=Gn(l),c=st(Kn),u=Wn(c?.docId??null);let d=null;try{d=re(p=>p.appState.data)}catch{d=null}const h=Un(r?.id,d,u);return i(_,{label:a(e),icon:K(t),hint:ml(l,h,c?.hasUnsavedEdits??!1),children:fe({options:n,value:s,onChange:o,ariaLabel:e})})}function gu(e,t,n,o={}){const r={type:"custom",[Ie]:!0,render:({value:l,onChange:s,name:c})=>i(Ar,{value:l||"",onChange:s,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?y("each",r):r}function bu(e){return ot(e).map(t=>t.path)}function ot(e,t="",n=[]){const o=[];for(const[r,l]of Object.entries(e??{})){const s=t?`${t}.${r}`:r,c=l;if(c&&c[Ie]){o.push({path:s,field:c,along:n});continue}c?.arrayFields&&o.push(...ot(c.arrayFields,`${s}[]`,[...n,c])),c?.objectFields&&o.push(...ot(c.objectFields,s,[...n,c]))}return o}const Su={HeroSingle:[An.image],HeroSlide:["videoFrame","videoFramePhone"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function bl(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 wu({value:e,onChange:t,label:n}){const o=e||{},r=G(),l=r?r.values!==r.node.props:!0,s=!!o.pending&&l,c=!!o.pending&&!l,u=!!Wi(Ui()).geocode,d=lt(),h=(p,f)=>t({...o,[p]:f??void 0});return L(k,{children:[i(_,{label:a(n),icon:i(yt,{}),action:u?i(ke,{content:a("Find from the address (OpenStreetMap)"),children:i(Dt,{"aria-label":a("Find from the address"),"aria-busy":s||void 0,disabled:s,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(Ro,{})})}):void 0,children:u&&o.status?i(po,{compact:!0,oneLine:!0,spaced:!1,status:s?"busy":o.ok&&!c?"found":"notfound",statusText:s?a("Finding…"):c?a(mr):a(o.status),hint:bl(o)}):null}),i(_,{label:a("Enter by hand"),labelId:d,icon:i(yo,{}),action:i(Le,{checked:!!o.manual,onChange:p=>t({...o,manual:p}),ariaLabelledBy:d})}),o.manual&&i(_,{label:a("Latitude, longitude"),icon:i(yt,{}),children:L("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(Bt,{value:typeof o.lat=="number"?o.lat:null,onChange:p=>h("lat",p),min:-90,max:90,step:1e-4,placeholder:a("Latitude")}),i(Bt,{value:typeof o.lng=="number"?o.lng:null,onChange:p=>h("lng",p),min:-180,max:180,step:1e-4,placeholder:a("Longitude")})]})})]})}function Sl(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function wl(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,l)=>l===t?{text:n}:r)}function _u(e,t){return e===null?null:t>e?e:null}function _l(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 Cu={label:"Ticker items",icon:i(Io,{})};function yu(e,t,n,o){return{type:"custom",[N]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...v({},{...pn.textList,label:e}),render:({value:r,onChange:l})=>i(Cl,{label:e,icon:K(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:l,markup:o==="markup"})}}function Cl({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:l=!1}){const s=J(null),[c,u]=Z(null),d=p=>p.map(f=>({text:f?.text??""})),h=p=>{const f=_l(n,p,c);f===null&&(s.current=null),u(f),r(d(p))};return i(zo,{label:a(e),icon:t,noun:a("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:l?i(Gt,{target:s,value:Sl(n,c),onChange:p=>r(wl(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:l&&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=>{s.current=g.currentTarget,u(f)}})})}function xu(e,t){const n=`${e.label} — row ${t+1}`;return V({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(j,{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 Ou(e){return{_gCards:T("Cards"),coverIndex:A("Cover image",i(Oo,{}),Rr,String(Nr),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:Ss("Image background",Oi),cardImage:Rn()}}function Iu(){return{outline:A("Card outline",i(No,{}),Ir,Tr),indexBadge:A("Card number",i(Ct,{}),Or,Er),showBadge:Tn("Product badge",!0,i(Tt,{noun:"tag"}))}}function Eu(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...he,label:_e.find(l=>l.id===r).label}),o=r=>v(ve(rt),n(r));return{_gShowOnCard:T("Show on a card"),[rt]:v({type:"custom",render:()=>i(yl,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(rt)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const rt="showCardPrice",_e=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function yl({rest:e}){const t=E(),n=ge(),o=s=>typeof t[s]=="boolean"?t[s]:void 0,r=s=>o(s)??e[s],l=_e.some(({id:s})=>o(s)!==void 0&&o(s)!==e[s]);return i(it,{parts:_e,changed:l,shown:r,onPress:(s,c)=>n({[s]:c}),onReset:()=>n(Object.fromEntries(_e.map(({id:s})=>[s,void 0])))})}function Tu(e,t="display"){const n=B(t);return{[t]:y("desktop",{type:"custom",render:({value:o,onChange:r})=>i(it,{parts:e,changed:Zo(o),shown:l=>Qo(o,l),onPress:(l,s)=>r(nr(o,l,s)),onReset:()=>r(void 0)})}),[n]:y("mobile",{type:"custom",render:({value:o,onChange:r})=>i(xl,{parts:e,desktopKey:t,value:o,onChange:r})})}}function it({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:l,disabledReason:s}){const c=a("Display");return i(_,{label:c,icon:i(ho,{}),changed:t,action:i(O,{words:x()?.panel,label:c,changed:t,detail:l,onReset:r}),children:i(Jo,{label:c,items:e.map(u=>({id:u.id,label:a(u.label),shown:n(u.id),...s?{disabled:!0,disabledReason:a(s)}:{}})),onChange:o})})}function xl({parts:e,desktopKey:t,value:n,onChange:o}){const r=E()[t];return i(it,{parts:e,changed:tr(n),shown:l=>er(r,n,l),onPress:(l,s)=>o(or(n,l,s)),onReset:()=>o(yr),detail:a("the same as Desktop")})}function Rn(e=jn){return H("Card image",i(wt,{}),F,Te,Vn,F,e,{clear:{hint:F},hint:"Rounds the picture. The card's own corner is in Styles."})}function Ol(){return pe(ht,"cardImage")}function Ru(){return{cardImage:Rn(ht),...Ol()}}function Nu(){return Ze({sidesKey:"cornerSides",row:Jn,step:zn,useFollowed:()=>F,mark:i(Il,{label:qn}),hint:a("Rounds the picture. Left alone it stays square.")})}function Il({label:e,changed:t=!1,onReset:n=()=>{}}){return i(O,{words:x()?.panel,label:a(e),changed:t,onReset:n})}function Pu(){return{type:"custom",render:({value:e,onChange:t})=>i(Nl,{value:typeof e=="string"?e:"",onChange:t})}}const Nn="own";function Au(){const e=[{value:Nn,label:"Layout's own",picture:un(Array.from({length:8},()=>[3,1]))},...Object.entries(ro).map(([t,n])=>({value:t,label:n.label,picture:un([...n.phone,...n.phone])}))];return y("mobile",an("Layout",i(_t,{}),e,Nn,{columns:2,cell:Qi}))}function El({layout:e,width:t}){const n=io(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:so(e).map(([r,l],s)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${r}`,gridRow:`span ${l}`,aspectRatio:o}},s))})}const Tl={width:"3.5rem",height:"2.5rem",words:!1},Rl=200;function Nl({value:e,onChange:t}){const[n,o]=Z(null),[r,l]=Z(4),s=J(null);Fn(()=>{const m=s.current;if(!m||typeof ResizeObserver!="function")return;const g=()=>l(m.getBoundingClientRect().width>=Rl?4:3);g();const b=new ResizeObserver(g);return b.observe(m),()=>b.disconnect()},[]);const c=e?Zi(Re,e):void 0,u=c?e:"",d=gt(n,u),h=gt(n,"").length,p=lo("no-symbol"),f=[{value:"",label:a("Not chosen"),icon:qi(p,a("Not chosen"))},...d.map(m=>({value:m,label:a(Re[m].label),icon:i(El,{layout:Re[m],width:40})}))];return i(_,{label:a("Layout"),icon:i(_t,{}),value:c?a(c.label):void 0,children:i("div",{ref:s,style:{flex:"1 1 auto",minWidth:0},children:i(kt,{label:a("Layout"),value:u,options:f,onChange:t,columns:r,cell:Tl,header:L("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(Xo,{options:[{id:"all",label:a("All")},...no.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:oo.length})})]})})})})}export{cs as BOUND_TO_POST,yc as BOUND_TO_POST_NOTE,Pc as BUCKET_ICONS,cl as CUSTOM_CSS_ROW,Su as CUSTOM_FIELD_MEDIA,wu as CoordsField,dn as DESKTOP_GAP_NOT_OVERLAP,it as DisplayRow,cu as EDGE_ARROWS,ar as FOCAL_DEFAULT,Oe as FOLD_FIELD_MARKER,us as HIGHLIGHT_HINT,j as HidableTextField,dt as LINK_FIELD_MARKER,dc as Label,Ie as MEDIA_FIELD_MARKER,hu as MEDIA_TYPE_OPTIONS,xc as NOT_BOUND_TO_POST,Bc as PanelBand,fs as PanelNoteLine,Xs as RowPropsContext,pt as SCAFFOLD_FIELD_MARKER,vu as SCALAR_TEXT_CONTROLS,ts as SiteGapDefaultReset,q as Slider,ms as Swatches,Fu as TEXT_CONTROL_KINDS,N as TEXT_FIELD_MARKER,Cu as TICKER_ITEMS_ROW,Cl as TextListField,ul as ThemeFillRow,Se as WIDTH_LABEL,ls as WidthDefaultReset,_l as aimAfterListChange,tu as anchorFields,$ as backTo,Hc as backgroundField,Kc as boxBlockSpacingField,Vc as boxColumnsFields,lu as boxFillField,Ws as boxPhoneRowField,Gs as boxShareField,$c as boxSharePhoneField,jc as boxShareTabletField,fl as boxThemeIndexOf,kc as bucketHeader,Uc as buttonWordsEntryField,Bs as cardCornersField,Ss as cardImageBackgroundField,Rn as cardImageField,Ru as cardImageFields,Ou as cardMediaFields,Wc as cardShapeFields,Eu as cardShowFields,Iu as cardStyleFields,zc as cellWidthFields,su as colorInput,fc as containerDirectionField,ns as containerGapField,os as containerGapPhoneField,pc as containerGapRows,rs as containerGapTabletField,bl as coordsResultTip,Tc as copyText,bn as cornerSidesField,Ze as cornersRowField,gn as cornersUnitFields,nu as customCssFields,ru as date,ou as dateTime,Fc as designGroupHeader,Tu as displayFields,uu as edgePad,tt as fillSlotChoices,_u as focusAfterRemove,au as focusKeptField,vc as foldMarker,Ee as foldMetaOf,hs as foldTitleOf,Qs as followedHeightPatch,ll as followedStickPatch,Pu as galleryLayoutField,Au as galleryLayoutPhoneField,Qc as heightFields,we as heightFollowedBy,Zs as heightLayersAt,hc as heroGroupPlacementPoints,ut as hidableText,ps as hintIsWhileTyping,Nu as imageCornersField,Cc as inOwnBox,Lc as isBucketHeader,mn as keptBy,Rc as linkField,ml as loadingRowHint,mu as loadingShowsField,bu as mediaFieldPaths,ot as mediaFields,du as multiSelect,iu as pageBackgroundField,Ac as panelNote,Vs as phoneOverrideField,Xc as phonePlaceField,Ec as plainText,Nc as plainTextarea,ws as pxField,Dc as quietMarker,ct as readHidable,Sl as rowText,pu as searchSelect,bs as sectionBandChoices,Os as sectionCornersField,Mc as sectionShapeFields,Gc as sectionThemeFields,wl as setRowText,Yc as sizeField,fu as sourceField,qc as spacingFields,eu as stickFields,Jc as swapPadding,Oc as text,Xn as textFieldIdentifier,bc as textFieldOffPage,wc as textFieldPanelOnly,yu as textList,xu as textListRowField,Ic as textarea,Tn as toggle,gu as upload,me as useLengthRow,ge as useSelectedPatch,E as useSelectedProps,R as useSelectedSibling,es as useSiteGapDetail,Zc as widthField,_c as withIdentifier,gc as withOffPage,Sc as withPanelOnly,mc as withScaffold};
|
|
1
|
+
"use client";import{jsx as i,jsxs as L,Fragment as F}from"react/jsx-runtime";import{HERO_FOCUS as Fn,HERO_MEDIA_TYPES as kn}from"../../../format/lib/hero-media-layout.js";import{cloneElement as xe,createContext as Dn,useContext as st,useEffect as vn,useId as lt,useRef as J,useState as Z}from"react";import{useEasel as re,useSelectedHost as G}from"efficient-easel/easel";import{PIN_LENGTH as ie,toDateKey as Bn,fromDateKey as Hn,parseOption as Gn}from"efficient-shell/format";import{say as a,editorEaselWords as x}from"../../../format/lib/editor-words.js";import{finiteNumber as Y}from"../../../format/lib/finite-number.js";import{LOADING_SHOWS_LABELS as at,firstFrameHint as Mn,loadingShowsOf as Un,loadingStillHint as Wn}from"../../../format/lib/hero-video.js";import{pageFramesFor as Kn,usePageVideoFrames as Xn}from"../page-video-frames.js";import{ScreenDocumentContext as $n}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as ct,hidableText as ut}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as Oe,LINK_FIELD_MARKER as dt,MEDIA_FIELD_MARKER as Ie,SCAFFOLD_FIELD_MARKER as pt,TEXT_FIELD_MARKER as P,foldMetaOf as Ee,textFieldIdentifier as jn}from"efficient-easel/draw";import Vn from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as ft}from"../../../render/lib/document/show-when.js";import{CARD_IMAGE_PX_ROW as Yn,CARD_IMAGE_RADIUS_ROW as ht,CARD_IMAGE_RADIUS_STEP as zn,CORNER_RADIUS_MAX as Te,CORNER_RADIUS_MIN as k}from"../../../format/lib/content/card-image-shape.js";import{SECTION_CSS_KEY as qn}from"../../../format/lib/content/section-css.js";import{IMAGE_CORNER_STEP as Jn,IMAGE_CORNERS_LABEL as Zn,IMAGE_CORNERS_ROW as Qn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as eo,GRID_MAX_ROW_SPAN as mt,GRID_MAX_TILE_AT as to,GRID_MOBILE_MAX_COLUMNS as no,GRID_TILE_AT_KEY as oo}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as ro,GALLERY_LAYOUTS as Re,GALLERY_LAYOUT_KEYS as io,GALLERY_PHONE_LAYOUTS as so,galleryChoices as gt,galleryLayoutRatio as lo,galleryPictureCells as ao}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as co}from"./shell-glyph.js";import{anchorSiblingsOf as uo,placementPoints as po}from"../../../format/lib/hero-group-placement.js";import fo from"../../components/AnchorField.js";import ho from"../../components/SourceStatus.js";import{AdjustIcon as mo,EyeIcon as go,AnimationIcon as bo,BackgroundIcon as bt,BorderAllIcon as So,BlockSectionIcon as _o,ColumnWidthsIcon as se,ColumnsIcon as St,CornerIcon as _t,DirectionDownIcon as wo,DirectionLeftIcon as Co,DirectionRightIcon as yo,DirectionUpIcon as wt,EditIcon as xo,GapIcon as Oo,GridIcon as Ct,GroundIcon as Ne,HashIcon as yt,HeightIcon as le,ImageIcon as Io,ListIcon as Eo,LocationIcon as xt,PaddingBottomIcon as Ot,PaddingLeftIcon as It,PaddingRightIcon as Et,PaddingTopIcon as Pe,PageIcon as To,PhoneIcon as Ro,StickyIcon as Tt,SearchIcon as No,SquareIcon as Po,TypeIcon as Ao,WidthIcon as Lo}from"efficient-easel/icons";import{FieldGlyph as Rt}from"../../components/FieldGlyph.js";import{resolvePageBackground as Fo}from"../../../format/lib/content/page-background.js";import{BOX_FILL_FADE_PROP as ko,BOX_FILL_FADES as Do,BOX_SWATCH_PROP as vo,boxFillFadeOf as Nt,boxFillOf as Bo,boxFillSlot as Ae,boxPaintOf as Ho}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as Pt,CORNER_SIDE_POINTS as Go,SECTION_CORNERS_ROW as At,hasOwnSectionCorners as Mo,normalizeCornerSides as Lt}from"../../../format/lib/content/section-corners.js";import{CARD_CORNERS_ROW as Ft}from"../../../format/lib/content/card-corners.js";import{enclosingPath as Uo,enclosingSection as Wo}from"./enclosing-section.js";import{SettingsDefaultReset as O,SettingsDrill as Ko,SettingsField as w,SettingsGroup as Xo,SettingsSegmented as $o,SettingsBorder as jo,SettingsSidesEach as Vo,SettingsSwitch as Le,borderSides as Yo,borderStartEach as zo}from"efficient-easel/panel";import{ListField as qo}from"efficient-easel/fields";import{CodeIcon as Jo}from"efficient-shell/icons/efficient";import{DisplayChips as Zo}from"efficient-shell/ui";import{desktopDisplayChanged as Qo,partShownOnDesktop as er,partShownOnPhone as tr,phoneDisplayChanged as nr,withDesktopPart as or,withPhonePart as rr}from"../../../format/lib/content/part-display.js";import{ColorSwatch as ir,CornersInput as sr,DatePicker as lr,DateTimePicker as ar,FOCAL_DEFAULT as cr,IconPicker as kt,COLUMN_COUNT_MAX as Dt,COLUMN_SHARE_MIN as ur,COLUMN_SHARES_EQUAL as dr,resolveColumnShares as vt,WidthsBar as pr,useShellStrings as fr,IconButton as Bt,InputNumber as Ht,Slider as hr,Textarea as mr,Tooltip as Fe}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as gr}from"./geocode-resolve.js";import{ColourRow as ae,InheritedColourRow as Gt}from"./ColourControl.js";import{fillThemeColors as br,slotFill as ce}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as ke}from"../../../format/lib/document/part-inks.js";import{keptByRow as De}from"efficient-easel/screen/lib/document/style-fields";import Mt from"./MarkupToolbar.js";import{deviceField as y}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as Sr,NoControlMark as _r,noControlField as Ut}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as wr}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as Cr,PANEL_ONLY_FIELD as yr}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as xr,resolvePhoneValue as ve}from"../../../format/lib/document/phone-override.js";import{phoneKey as B,tabletKey as Be,viewKeyAt as He}from"efficient-easel/draw";import{viewKey as I}from"../../../format/lib/animation/views.js";import{viewRows as M}from"../animation/view-rows.js";import{SuppressibleText as Or}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Ir,CARD_OUTLINE_OPTIONS as Er,DEFAULT_CARD_INDEX_FORMAT as Tr,DEFAULT_CARD_OUTLINE as Rr}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Nr,DEFAULT_COVER_INDEX as Pr}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Ar}from"efficient-easel/draw";import Lr from"../../components/MediaUploadField.js";import Fr from"../../components/MultiSelectField.js";import kr from"../../components/SectionThemePicker.js";import Dr from"../../components/SearchSelectField.js";import vr from"../../components/StorefrontLinkField.js";import{UiIcon as Wt}from"efficient-easel/draw/client";import{SECTION_PADDING as A}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as Br}from"../../../render/lib/content/button-look.js";import{usePreviewParts as Hr}from"efficient-easel/draw/client";import{encodePartId as Gr}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as Mr,useEaselStrings as Ur}from"efficient-easel/strings";import{hasPhoneHeight as Wr,hasTabletHeight as Ge,resolveSectionMinHeight as Kr,resolveTabletHeight as Xr}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as $r,SECTION_PIN_ABOVE_HINT as jr,SECTION_PIN_ABOVE_KEY as Vr,SECTION_PIN_ABOVE_LABEL as Yr,SECTION_PIN_END_DEFAULT as zr,SECTION_PIN_END_HINT as qr,SECTION_PIN_END_KEY as Jr,SECTION_PIN_END_LABEL as Zr,SECTION_PIN_END_OPTIONS as Qr,SECTION_PIN_GROUP as ei,SECTION_PIN_LABEL as Kt,SECTION_PIN_SCREENS_KEY as Me,SECTION_PIN_SCREENS_LABEL as Xt,SECTION_PIN_STOP_DEFAULT as ti,SECTION_PIN_STOP_HINT as ni,SECTION_PIN_STOP_KEY as oi,SECTION_PIN_STOP_LABEL as ri,SECTION_PIN_STOP_OPTIONS as ii,SECTION_STICK_DISTANCE as U,SECTION_STICK_DISTANCE_ROW as Ue,SOME_VIEW_PINS as $t,hasPhoneStick as si,hasTabletStick as li,resolveSectionStick as ue,sectionPinEndOf as ai,sectionPinEndWrite as ci,sectionPinStopOf as ui,sectionPinStopWrite as di}from"../../../format/lib/content/section-sticky.js";import{cssLengthOf as pi}from"../../../format/lib/content/css-length.js";import{SECTION_HEIGHT_MODES as fi,SECTION_MIN_HEIGHT as hi,SECTION_MIN_HEIGHT_GROUP_LABEL as Q,SECTION_SCREEN_PCT as mi,SECTION_HEIGHT_UNITS as gi}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as bi,resolveContainerDirection as jt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as Si,BOX_BLOCK_SPACING_POINTS as Vt,BOX_PHONE_ROW_LABEL as Yt,BOX_COLUMNS_MAX as _i,BOX_COLUMNS_MIN as zt,BOX_PHONE_ROW_MAX as wi,BOX_PHONE_ROW_MIN as We,BOX_SHARE_CHOICES as qt,BOX_SHARE_LABEL as z,boxShareChoiceOf as Jt,boxShareWidthsOf as Ke,BOX_SHARE_PHONE_DEFAULT as Ci,BOX_SHARE_PHONE_POINTS as yi}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as W}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Zt,BORDER_SIDES as xi,SECTION_BORDER_ROW as Qt,borderBySide as en}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as Oi,normalizeTheme as tn,normalizeThemeColors as Ii,sectionBandTone as Ei,surfaceTwoTone as Ti}from"../../../format/lib/theme.js";import{CONTAINER_GAP as nn,CONTAINER_GAP_BUILT_IN as Ri,CONTAINER_GAP_PHONE as Xe,GAP_FIELD_CONTAINER as $e,followsSitePhoneGap as Ni,hasOwnContainerGap as Pi,hasOwnPhoneGap as je,resolveContainerGap as on,resolvePhoneContainerGap as rn}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as Ai,CARD_IMAGE_BG_OFF as Li,CARD_IMAGE_BG_SWATCH_NAMES as Fi,CARD_IMAGE_BG_SWATCHES as ki,isCardImageBackgroundInheriting as Di,cardImageBackgroundChoice as vi,THEME_CARD_IMAGE_BG as Bi}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as Hi,SECTION_BG_NO_FILL as Gi,sectionBackgroundChoice as Mi,THEME_SECTION_BG as Ve,isSectionBackgroundEmpty as Ui,sectionBackgroundHex as sn}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Wi,nestedAccentValue as ln,resolveSectionAccent as de}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Ki,TYPE_SIZE_INHERIT as Xi,isTypeSizeInheriting as $i}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as ji,WIDTH_CHOICE_LABEL as Vi,WIDTH_INHERIT as Yi}from"../../../format/lib/content/section-width.js";import{useEaselSession as zi}from"efficient-easel/screen/lib/session-context";import{backendOf as qi}from"../website-session.js";import{BOX_GAP as Ji,describedAs as D,group as T,iconOf as K,sharedStyleKinds as ee}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as an,onDesktopWords as X,phoneTwinFields as Ye,saidAlignmentGrid as Zi,useLengthUnit as Qi}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as es,PICTURE_PICKER_ROW as ts,directionField as ns,gapField as ze,iconPickerRow as cn,lengthUnitFields as pe,pickerCellIcon as os,pickerNoneIcon as rs,Segmented as fe,select as R,slider as H}from"./box-fields.js";import{VIEW_ABOVE as qe}from"efficient-easel/screen/lib/content/length-units";import{tierOfView as un,viewOfTier as is}from"../../../format/lib/content/view-tier.js";import{ownEntry as ss}from"../../../format/lib/own-entry.js";import{LAYOUT_CELL as ls,galleryPhonePicture as dn}from"./choice-pictures.js";function wc({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?a(e):e})}function $(e,t){return a("{value} from {from}",{value:e,from:t})}function as(){const{blockGap:e}=W();return e===null?a("this container's own spacing"):$(`${e}px`,a("Styles"))}function cs({inherited:e,onReset:t,label:n}){return i(O,{words:x()?.panel,label:a(n),changed:!e,detail:as(),onReset:t})}function us(e){return ze({...Ji,builtIn:Ri[e],resolve:(t,n)=>on(e,t,n?.siteGap),action:(t,n)=>i(cs,{inherited:!Pi(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[$e]:e}})}function ds(e){return ft(y("mobile",{[$e]:e,type:"custom",render:t=>i(hs,{container:e,...t})}),pn)}function ps(e){return ft(y("tablet",{[$e]:e,type:"custom",render:t=>i(fs,{container:e,...t})}),pn)}const pn={not:{field:"gap",in:Array.from({length:-nn.min},(e,t)=>nn.min+t)}};function Cc(e){return{gap:y("desktop",us(e)),[Be("gap")]:ps(e),[B("gap")]:ds(e)}}function fs({container:e,...t}){const[n]=N("gap"),{siteGap:o}=t.field??{},r=Math.max(Xe.min,on(e,n,o));return ze({...Xe,builtIn:r,resolve:s=>je(s)?s:r,action:(s,c)=>i(O,{words:x()?.panel,label:a("Gap"),changed:je(s),detail:X(u=>a(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function hs({container:e,...t}){const[n]=N("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},l=rn(e,void 0,n,o,r);return ze({...Xe,builtIn:l,resolve:c=>rn(e,c,n,o,r),action:(c,u)=>i(O,{words:x()?.panel,label:a("Gap"),changed:je(c),detail:$(`${l}px`,Ni(e,n,r)?a("Styles"):a("Desktop")),onReset:()=>u(void 0)})}).render(t)}function yc(e){return ns({offered:bi(e),fallback:jt(e,void 0),resolve:t=>jt(e,t)})}function xc(e,t){return po(t?uo(e,t):[],t)}function ms({inherited:e,onReset:t,label:n}){return i(O,{words:x()?.panel,label:a(n),changed:!e,detail:$(a("Full"),a("the page")),onReset:t})}function j({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:l,hideable:s=!0,markup:c=!0}){const{text:u,hidden:d}=ct(e),h=J(null),p=J(null),f=C=>t(s?{text:C,hidden:d}:C),m=()=>t({text:u,hidden:!d}),g=s&&d,b=lt(),_=r?ws(r)?i("span",{className:"sf-hint-while-typing",children:a(r)}):a(r):void 0,S=d?a("Show {label} on the slide",{label:a(n)}):a("Hide {label} on the slide",{label:a(n)});return i(w,{label:a(n),icon:i(Ao,{}),htmlFor:b,className:g?"is-hidden":void 0,hint:_,action:s?i(Fe,{content:S,children:i(Bt,{"aria-pressed":d,"aria-label":S,onClick:m,children:d?i(Wt,{name:"eye-off",size:14}):i(Wt,{name:"eye",size:14})})}):void 0,children:L("div",{className:"sf-copybox",children:[c&&i(Mt,{target:l?p:h,value:u,onChange:f}),l?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 Oc(e,t){return{...e,[pt]:t}}function Ic(e){const t=e[P];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[P]:{...t,offPage:!0}}}function Ec(e){return!e||typeof e!="object"?!1:e[P]?.offPage===!0}function Tc(e){if(!e[P])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[yr]:!0}}function Rc(e){return Cr(e)}function Nc(e){const t=e[P];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[P]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as Ku,SCALAR_TEXT_CONTROLS as Xu}from"efficient-easel/draw";function Pc(e,t){if(!e[P])throw new Error("inOwnBox: the field holds no authored text");const{[Sr]:o,...r}=e;return{...r,[wr]:!0,render:t}}const gs=new Set(Ar),he={type:"radio",options:[{value:!0},{value:!1}]},fn={text:{type:"object",objectFields:{text:{type:"text"},hidden:he}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:he}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},V=(e,t)=>{const n=D({...t,[P]:e},{...fn[e.control],label:e.label});if(!gs.has(e.control))return n;const o=t.render;return{...Ut(n,"authored-copy"),render:r=>i(Or,{name:r.name,children:o(r)})}},Ac="Everything else on this block comes from the linked post. Unlink it to edit by hand.",bs={field:"source.slug",set:!0},Lc={not:bs},Ss="Select a word, then press the highlighter.",_s=new Set([Ss]),ws=e=>_s.has(e);function Fc(e,t,n){return V({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(j,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function kc(e,t,n){return V({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(j,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function Dc(e,t,n){return V({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(j,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function vc(e,t,n){return V({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(j,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function Bc(e){return{type:"custom",[dt]:{label:e},...D({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(vr,{value:ut(t),onChange:n,label:e})}}function Hc(e,t,n){return V({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(j,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const Gc={Design:mo,Animation:bo};function Mc(e,t){return{type:"custom",render:()=>i(Cs,{text:e,values:t})}}function Cs({text:e,values:t}){return i("p",{className:"sf-note",children:a(e,t)})}function Uc(e){return Ee(e)!==null&&e?.tabs!==void 0}const hn=new Map;function Wc(e,t){const n=`${e}\0${t?t.join(""):""}`,o=hn.get(n)??{type:"custom",tabs:t,[Oe]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(F,{})};return hn.set(n,o),o}const mn=new Map;function Kc(e){const t=mn.get(e)??{type:"custom",[Oe]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(F,{})};return mn.set(e,t),t}function ys(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function Xc(e,t){return ys(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(F,{})}}function $c(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 jc({title:e,children:t}){const[n,o]=Z(()=>!Je.has(e));return i(Xo,{title:e,open:n,onToggle:r=>{o(r),r?Je.delete(e):Je.add(e)},children:t})}const Je=new Set;function xs({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),l=r?o?.[r]:void 0,s=l?a(l):t;return L("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?a(o[c]):c;return i(Fe,{content:u,children:i(ir,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:s})]})}function Vc(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(Os,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function Os({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const l=typeof o=="string"?o:void 0,{colors:s,n:c}=nt(),u={background:s.background,surface:s.surface,surface2:Ti(s),band:Ei(s)},d=n?Ve:t,h=Ui(l,t,d),p=sn(void 0,d,u),f=n?Hi:void 0,m=d===Ve?a("the theme's section background"):a("Theme {n} background",{n:c}),g=Is(l,t,s,c,u,r),b=$(p.toUpperCase(),m),_=ke(l),S=_?ce(_,s,c):null;return S?i(ae,{label:a(e),icon:i(bt,{}),value:S.hex,caption:S.words,onChange:r,changed:!0,onReset:()=>r(f),resetTo:b,choices:g}):i(Gt,{label:a(e),icon:i(bt,{}),value:h?"":sn(l,t,u),inherited:p,resetTo:b,onChange:r,onReset:()=>r(f),choices:g})}function Is(e,t,n,o,r,l){const s=Mi(e,t);return[{label:a("No fill"),color:"",selected:s==="none",onPick:()=>l(Gi)},{label:`${a("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:s==="band",onPick:()=>l(Ve)},...tt(ke(e)??"",n,o,l)]}function Es(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,l=Di(r,t);return i(w,{label:a(e),icon:i(Ne,{}),changed:!l,action:i(O,{words:x()?.panel,label:a(e),changed:!l,detail:a("the theme's image stage"),onReset:()=>o(Ai)}),children:xs({swatches:ki,current:l?Bi:vi(r,t),onPick:o,names:Fi})})}}}function Yc(e=n=>n,t){return ee({_gSectionTheme:T(Wi),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(kr,{value:e(n),onChange:o,followLabel:t})}})}function me(e){const t=E(),n=un(e?.view),o=s=>He(e.valueKey,s),r=e.numbersIn??(s=>Y(t[o(s)])!==void 0),l=e.followsView??Us(n,r);return Qi({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:es,label:a(e.label),grid:e.grid,hasOwn:r(n),view:{tier:n,numbersIn:r,followsView:l},convertTo:e.convertTo??(s=>{const c=Y(t[o(n)]);return c===void 0?{}:{[o(n)]:s(c)}})})}function q({min:e,max:t,step:n,value:o,onChange:r,suffix:l="",readout:s=!0,notch:c,ariaLabel:u,disabled:d=!1,placeholder:h,placeholderWord:p,onClear:f,units:m,inputMax:g}){const b=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:b?"sf-slider has-notch":"sf-slider",style:b?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(hr,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...p?{emptyLabel:a(p)}:{},suffix:l||void 0,...m?{units:m}:{},...g!==void 0?{inputMax:g}:{},showInput:s,label:u===void 0?void 0:a(u),disabled:d,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:_=>{_===null?f?.():_!==o&&r(_)}})})}function Ts(e,t){const{min:n,max:o,step:r=1,unsetLabel:l,hint:s,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(w,{label:a(e),icon:d?K(d):void 0,value:g?u||l===void 0?void 0:a(l):`${m}${h}`,changed:!g,action:u?xe(u,{changed:!g,onReset:()=>f(null)}):i(O,{words:x()?.panel,label:a(e),changed:!g,onReset:()=>f(null)}),hint:typeof s=="string"?a(s):s,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",Rs={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,l=r!==null;return i(w,{label:a(te),icon:i(_t,{}),changed:l,action:xe(e.mark,{changed:l,onReset:()=>o(null)}),hint:e.hint,children:i(Ns,{tier:e,px:r,name:t.name,onRadius:o})})}}}function N(e){const t=G();return[t?.values?.[e],n=>t?.onChange(e,n)]}function gn(){return Ut({type:"custom",render:()=>i(_r,{})},"always")}function ge(){const e=G();return t=>e?.onChangeMany(t)}function Ns({tier:e,px:t,name:n,onRadius:o}){const r=e.useFollowed(),[l,s]=N(e.sidesKey),c=ge(),u=me({row:e.row??Rs,label:te,grid:{min:k,max:Te,step:e.step??1},valueKey:n??"",view:"desktop"}),d=Lt(l)??[...Pt];return i(sr,{label:a(te),value:d,corners:Go,onChange:h=>{const p=Lt(h)??[];s(p.length===Pt.length?null:p)},radius:t,onRadiusChange:u&&n?h=>c({[n]:h,...u.unitPatch(h===null)}):o,radiusMin:u?.grid.min??k,radiusMax:u?.grid.max??Te,radiusStep:u?.grid.step??e.step??1,radiusPlaceholder:u&&u.unit!=="px"?"–":String(r),...u?{radiusUnit:u.unit,units:u.units}:{}})}function bn(e,t){return pe(e,t)}function Sn(){return gn()}function Ps({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=W(),r=typeof o=="number"?`${o}px`:a("not set");return i(O,{words:x()?.panel,label:a(e),changed:t,detail:o==null?a("the built-in corners"):$(r,a("Styles")),onReset:n})}function As(){const{cornerRadiusPx:e}=W();return typeof e=="number"?e:k}function Ls(){return Ze({sidesKey:"sectionCornerSides",row:At,useFollowed:As,mark:i(Ps,{label:te}),hint:Fs})}const Fs="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function zc(){return ee({_gShape:T("Shape"),sectionCorners:Ls(),...bn(At,"sectionCorners"),sectionCornerSides:Sn(),...M("sectionBorder",Ms),...pe(Qt,"sectionBorder",{tablet:!0,phone:!0})})}const ks=()=>({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 Ds(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function vs(){let e;try{const t=tn(W().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||Oi.line}function Bs({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:l=!0,above:s={},length:c}){const u=e&&typeof e=="object"?e:{},[d,h]=Z(()=>r?zo(u,s):!1),p=ks(),f=m=>Ds(r&&l?m:{width:m.width,color:m.color,...l?{style:m.style}:{}});return i(w,{label:a("Border"),icon:i(So,{}),action:r?i(Vo,{each:d,label:a("Each side"),onChange:h}):void 0,children:i(jo,{label:a("Border"),value:u,each:d,onChange:m=>t(f(m)),placeholder:n,presets:o,words:c?{...p,unit:c.unit}:p,styles:l,max:c?.grid.max??Zt,...c?{step:c.grid.step,units:c.units}:{}})})}function Hs({value:e,onChange:t,view:n}){const[o]=N("sectionBorder"),[r]=N(Be("sectionBorder")),l=vs(),s=f=>f&&typeof f=="object"?f:{},c=n==="phone"?{...en(s(o)),...en(s(r))}:n==="tablet"?s(o):{},u=E(),d=ge(),h=I("sectionBorder",n),p=me({row:Qt,label:"Border",grid:{min:0,max:Zt,step:1},valueKey:"sectionBorder",view:n,numbersIn:f=>Qe(u[He("sectionBorder",f)]),convertTo:f=>{const m=s(u[h]);return Qe(m)?{[h]:Gs(m,f)}:{}}});return i(Bs,{value:e,length:p,onChange:p?f=>d({[h]:f,...p.unitPatch(!Qe(f))}):t,placeholder:{sides:Yo(c),style:c.style??"solid",color:c.color||l},presets:[l],above:c})}const _n=["width",...xi];function Qe(e){if(!e||typeof e!="object")return!1;const t=e;return _n.some(n=>Y(t[n])!==void 0)}function Gs(e,t){const n={...e};for(const o of _n){const r=Y(n[o]);r!==void 0&&(n[o]=t(r))}return n}function Ms(e){return{type:"custom",render:({value:t,onChange:n})=>i(Hs,{value:t,onChange:n,view:e})}}function Us(e,t){let n=qe[e];for(;n&&qe[n]!==null&&!t(n);)n=qe[n];return n??e}function qc(e){return{type:"custom",render:()=>i(Ws,{partKey:e})}}function Ws({partKey:e}){const[t]=N("id"),[n]=N("_partStyles"),{textStyles:o}=W(),r=Ur();let l=null;try{l=Hr().select}catch{l=null}const s=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(Ko,{name:a("Text"),preview:Br(s,c,{noStyle:a("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??Mr.copy.panel).cases}),onOpen:()=>{l&&typeof t=="string"&&l(Gr(t,e))}})}function wn(e){const{cornerRadiusPx:t}=W(),n=typeof t=="number"?t:e;let o=null;try{const{appState:l,selectedItem:s}=re(u=>u),c=s?.props?.id?String(s.props.id):void 0;o=c?Wo(l?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Mo(r)?r:n}function Ks({label:e,changed:t=!1,onReset:n=()=>{}}){const o=wn(k);return i(O,{words:x()?.panel,label:a(e),changed:t,detail:$(`${o}px`,a("the section")),onReset:n})}function Xs(){return i(F,{children:a("Follows the section's Corners until you set a number here.")})}function $s(){return Ze({sidesKey:"cardCornerSides",row:Ft,useFollowed:()=>wn(k),mark:i(Ks,{label:te}),hint:i(Xs,{})})}function js(){return{type:"custom",render:()=>i(Vn,{})}}function Jc(){return{_gShape:T("Shape"),cardCorners:$s(),...bn(Ft,"cardCorners"),cardCornerSides:Sn(),cardCornersApplyAll:js()}}function Vs(){return D({type:"custom",[ts]:!0,render:e=>i(zs,{...e})},{type:"select",label:z,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 Ys(e,t){const n=Jt(e);if(n!=="custom")return a(qt.find(r=>r.value===n)?.label??"");const o=vt(Ke(e,t),t);return o?[...o,100-o.reduce((r,l)=>r+l,0)].join(" / "):a("Custom")}function zs(e){const{value:t,onChange:n}=e,[o]=N("content"),r=Array.isArray(o)?o.length:0,l="follows"in e,s=t!=null,c=s?t:l?e.follows:void 0,u=Jt(c),d=r>=2&&r<=Dt,h=()=>[...dr[r]??[]],p=J(null),f=S=>{const C=p.current;C&&JSON.stringify(S)===JSON.stringify(C.shares)?n(C.value):S&&n(S)},m=S=>{S===u||S==="custom"&&!d||n(S==="custom"?h():S)},g=a("The width bar works for 2 to {count} blocks.",{count:Dt}),b=s&&(l||t!=="content"),_=fr().widths.hint(r,ur);return i(w,{label:a(z),icon:i(se,{}),changed:b,hint:u!=="custom"?void 0:d?_:g,action:i(O,{words:x()?.panel,label:a(z),changed:b,disabled:e.readOnly===!0,detail:l?X(S=>a(S),Ys(e.follows,r),e.followsView):a("Fit content"),onReset:()=>n(void 0)}),children:L("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(kt,{label:a(z),value:u,options:qt.map(S=>({value:S.value,label:S.value==="custom"&&!d?g:a(S.label),icon:os(i("span",{className:"sf-gallery-pic sf-share-pic",children:Cn(S.weights).map((C,v)=>i("i",{style:{gridColumn:`span ${C}`}},v))}),a(S.label),S.value==="custom"&&!d?g:a(S.label))})),onChange:m,columns:3,cell:yn,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&d?i("div",{onFocus:()=>{p.current={value:t,shares:vt(Ke(c,r),r)}},onBlur:()=>{p.current=null},children:i(pr,{label:a(z),count:r,value:Ke(c,r),onChange:f,readOnly:e.readOnly===!0})}):null]})})}function Cn(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 Zc(){return R(Si,i(Oo,{}),Vt,Vt[0].value)}function Qc(e){return R("On a phone",i(Ro,{}),[{label:"In the header",value:"header"},{label:"In the menu",value:"menu"}],e)}function eu(){return y("mobile",cn(z,i(se,{}),yi.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:Cn(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),Ci,{columns:2,cell:yn}))}const yn={width:"5.75rem",height:"3.25rem",words:!0};function tu(){return Ye("share",Vs(),an)[Be("share")]}function qs(){return y("mobile",H(Yt,i(St,{}),We,wi,1,We,"",{clear:{phoneFollows:!1,hint:We}}))}const xn={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function nu(){const e=H(Yt,i(St,{}),zt,_i,1,zt,"",{clear:{emptyLabel:"Auto"}}),t=Ye("columns",e,{...xn,tablet:an.tablet}),n=Ye("columns",e,xn,{phoneRow:qs()});return{...t,phoneRow:n.phoneRow}}function ou(e,t,n,o,r,l,s){return{type:"custom",render:({value:c,onChange:u,name:d})=>i(Js,{label:e,min:t,max:n,step:o,fallback:r,role:l,value:c,onChange:u,name:d??"",length:s})}}function Js({label:e,min:t,max:n,step:o,fallback:r,role:l,value:s,onChange:c,name:u,length:d}){const h=E(),p=ge(),f=un(d?.view),m=me({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(w,{label:a(e),icon:i(Rt,{noun:l}),action:i(O,{words:x()?.panel,label:a(e),changed:!$i(s),detail:a("the Text style in Styles"),onReset:()=>g(Xi),defaultAction:{onPress:()=>g(Ki),title:a("Keep this section's own built-in size"),icon:i(_o,{})}}),children:q({min:m?.grid.min??t,max:m?.grid.max??n,step:m?.grid.step??o,value:typeof s=="number"?s:r,...m?{suffix:m.unit,units:m.units}:{suffix:"px"},ariaLabel:e,onChange:g})})}function be(e,t,n){return[{label:"Auto",value:""},...Array.from({length:e},(o,r)=>({label:r===0?`1 ${t}`:`${r+1} ${n}`,value:String(r+1)}))]}function ru(){return{_gCellWidth:T("Cell size"),gridSpan:y("desktop",R("Positions",i(se,{}),be(eo,"position","positions"),"")),gridRowSpan:y("desktop",R("Rows tall",i(le,{}),be(mt,"row","rows"),"")),[oo]:H("At card",i(yt,{}),1,to,1,1,""),[B("gridSpan")]:y("mobile",R("Positions",i(se,{}),[{label:"Full row",value:""},...be(no,"position","positions").slice(1)],"")),[B("gridRowSpan")]:y("mobile",R("Rows tall",i(le,{}),be(mt,"row","rows"),""))}}function E(){let e=null,t=null;try{e=st(Zs),t=re(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Zs=Dn(null);function Qs({min:e,max:t,step:n,px:o,label:r,onChange:l,desktopKey:s,fallback:c}){const u=E()[s],d=ve(void 0,u,c);return i(F,{children:q({min:e,max:t,step:n,value:ve(o,u,c),readout:!1,ariaLabel:r,notch:d,onChange:l})})}function el({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:l=()=>{}}){const s=E()[t],c=ve(void 0,s,n);return i(O,{words:x()?.panel,label:a(e),changed:r,detail:X(u=>a(u),`${c}${o}`),onReset:l})}function tl(e){return Ts(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(el,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(Qs,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const nl={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},ol={Top:Pe,Bottom:Ot,Left:It,Right:Et},rl=e=>{const t=ol[e];return i(t,{})};function iu(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=_=>nl[_],l=_=>H(r("Top"),i(Pe,{}),A.min,A.max,A.step,_,"px"),s=(_,S,C,v=A)=>y("mobile",tl({label:r(_),icon:rl(_),desktopKey:S,min:v.min,max:v.max,step:v.step,fallback:C})),c=e.top??A.min,u=e.bottom??A.min,d="sectionPaddingLeft",h="sectionPaddingRight",p=e.sideBounds??A,f=e.side??p.min,m=e.sidePhone??f,g=e.phone===!0,b=_=>g?y("desktop",_):_;return ee({...o?{_gSpacing:T("Padding")}:{},[t]:b(l(c)),...g?{[B(t)]:s("Top",t,c)}:{},...e.only==="top"?{}:{[n]:b(H(r("Bottom"),i(Ot,{}),A.min,A.max,A.step,u,"px")),...g?{[B(n)]:s("Bottom",n,u)}:{}},...e.sides?{[d]:b(H(r("Left"),i(It,{}),p.min,p.max,p.step,f,"px")),...g?{[B(d)]:s("Left",d,m,p)}:{},[h]:b(H(r("Right"),i(Et,{}),p.min,p.max,p.step,f,"px")),...g?{[B(h)]:s("Right",h,m,p)}:{}}:{}})}function su(e,t){const n=Object.fromEntries(Object.entries(t).map(([l,s])=>[l,l in e&&Ee(s)?e[l]:s])),o={};let r=!1;for(const[l,s]of Object.entries(e)){if(l in t){r||Object.assign(o,n),r=!0;continue}o[l]=s}return r||Object.assign(o,n),o}const Se="Width";function lu(e,t=ji,n=!0){const o=t.map(r=>({label:Vi[r],value:r}));return ee({...n?{_gWidth:T(Se)}:{},widthMode:{type:"custom",render:({onChange:r,field:l})=>i(w,{label:a(Se),icon:i(Lo,{}),action:n?i(ms,{inherited:l?.inherited??!1,onReset:()=>r(Yi),label:Se}):void 0,children:fe({options:o,value:l?.currentValue||e,onChange:r,ariaLabel:Se})})}})}function au({fill:e=!1}={}){const t=(r,l)=>({type:"custom",render:({value:s,onChange:c})=>i(il,{value:s,onChange:c,view:r,badge:l,fill:e})}),n=()=>De("sectionHeightMode"),o=()=>De("sectionHeightMode");return ee({_gHeight:T(Q),...M("sectionHeightMode",r=>r==="desktop"?t(r):t(r,l=>i(cl,{view:r,onClear:()=>l(void 0)}))),...M("sectionHeightValue",n),...M("sectionHeightUnit",o)})}function il({value:e,onChange:t,view:n,badge:o,fill:r=!1}){const l=E(),{mode:s,number:c,unit:u}=sl(n,l,e);return i(w,{label:Q,icon:K(i(le,{})),action:o?o(t):void 0,children:L("div",{className:"es-width-stack",children:[fe({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"},...r?[{label:"Fill",value:"fill"}]:[]],value:s,onChange:t,ariaLabel:Q}),c?i(al,{view:n,mode:s,menu:u}):null]})})}function On(e,t){return e==="phone"&&Ge(t)?Xr(t):Kr(t)}function _e(e,t){return e==="desktop"||(e==="tablet"?Ge(t):Wr(t))?null:On(e,t)}function sl(e,t,n){const r=(l=>fi.includes(l))(n)?n:_e(e,t)?.mode??"auto";return{mode:r,number:r!=="auto"&&r!=="fill",unit:r==="fixed"}}function ll(e,t,n,o){const r=_e(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[I("sectionHeightMode",e)]:r.mode,...r.mode==="fixed"?{[I("sectionHeightUnit",e)]:r.unit}:{},...n==="sectionHeightUnit"?{[I("sectionHeightValue",e)]:r.value}:{},[I(n,e)]:o}}function In(e,t,n){const o=G(),r=_e(e,E());return!o||!r?{followed:null,write:n}:{followed:r,write:s=>o.onChangeMany(c=>{const u=ll(e,c,t,s);return u===null?{[I(t,e)]:s}:Object.keys(u).length?u:null})}}function al({view:e,mode:t,menu:n}){const o=G(),r=E(),l=I("sectionHeightValue",e),s=I("sectionHeightUnit",e),c=_=>S=>o?.onChangeMany(()=>({[_]:S})),{followed:u,write:d}=In(e,"sectionHeightValue",c(l)),{write:h}=In(e,"sectionHeightUnit",c(s)),p=t==="screen"?"%":r[s],f=Gn(gi,"px",u?u.unit:p),m=f==="%"?mi:hi,g=r[l],b=n?{options:["px","%"],label:a("Unit"),onChange:_=>h(_)}: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 cl({view:e,onClear:t}){const n=E(),o=_e(e,n)===null,r=e==="phone"&&Ge(n),l=On(e,n),s=X(c=>a(c),l.mode==="auto"?a("Auto"):`${l.value}${l.unit}`,r?"tablet":"desktop");return i(O,{words:x()?.panel,label:a(Q),changed:o,detail:s,onReset:t})}function cu(e={}){const t=e.intro===!0,n=l=>({type:"custom",render:({value:s,onChange:c,id:u,name:d})=>i(bl,{value:s,onChange:c,labelId:`${u??d??"stickTop"}-label`,view:l,intro:t})}),o=l=>({type:"custom",render:({value:s,onChange:c})=>i(hl,{value:s,onChange:c,view:l,intro:t})}),r=l=>({type:"custom",render:({value:s,onChange:c})=>i(ml,{value:s,onChange:c,view:l,intro:t})});return{_gStick:T(ei,{dot:t?fl:$t}),...M("stickTop",n),...M("stickTopDistance",o),...pe(Ue,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?M(Me,r):{},...e.screens?{[Jr]:dl()}:{},...t?{}:{[oi]:ul()},...t||e.above===!1?{}:{[Vr]:pl()}}}function ul(){return En(R(ri,i(Pe,{}),ii,ti),ni,ui,di)}function dl(){return En(R(Zr,i(wt,{}),Qr,zr),qr,ai,ci)}function En(e,t,n,o){return y("desktop",{...e,render:r=>{const l=e.render({...r,value:n(r.value),onChange:s=>r.onChange(o(s))});return xe(l,{hint:a(t)})}})}function pl(){const e=Nn(Yr,!1,i(Tt,{}),jr);return y("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}const fl={any:[$t,$r]};function Tn(e,t,n,o,r){const l=G(),s=E(),c=e==="desktop"||ne(e,s)?null:et(e,ue(s,{intro:o}));return{followed:c,write:(c||r)&&l?d=>l.onChangeMany(h=>{const p=gl(e,h,d,t,o),f=p===null?{[I(t,e)]:d}:p;return Object.keys(f).length?{...f,...r?.(d)??{}}:null}):n}}function hl({value:e,onChange:t,view:n,intro:o}){const r=E(),l=ue(r,{intro:o}),s=h=>{const p=is(h);return p==="desktop"||ne(p,r)},c=me({row:Ue,label:"Distance from top",grid:{min:U.min,max:U.max,step:U.step},valueKey:"stickTopDistance",view:n,numbersIn:h=>s(h)&&Y(r[He("stickTopDistance",h)])!==void 0,followsView:n==="phone"&&l.ownTablet?"tablet":"desktop"}),{followed:u,write:d}=Tn(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??U.min,max:c?.grid.max??U.max,step:c?.grid.step??U.step,value:u?null:typeof e=="number"?e:U.fallback,...u?{placeholder:u.distance}:{},...c?{suffix:c.unit,units:c.units}:{suffix:"px"},ariaLabel:a("Distance from top"),onChange:d})})}function ml({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:l}=Tn(n,Me,t,o);return i(w,{label:a(Xt),icon:K(i(le,{})),children:q({min:ie.min,max:ie.max,step:ie.step,value:r?null:Y(e)??ie.default,...r?{placeholder:r.screens}:{},ariaLabel:a(Xt),onChange:l})})}function ne(e,t){return e==="tablet"?li(t):si(t)}function et(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 gl(e,t,n,o="stickTopDistance",r=!1){if(e==="desktop"||ne(e,t))return null;if(n===void 0)return{};const l=et(e,ue(t,{intro:r})),s=e==="phone"&&ne("tablet",t)?h=>I(h,"tablet"):h=>h,c=(h,p)=>t[s(h)]==null?{}:{[I(h,e)]:p},u=Ue.unitKey,d=t[s(u)]==null?{}:{[I(u,e)]:l.unit};return{[I("stickTop",e)]:!0,...c("stickTopDistance",l.distance),...d,...c(Me,l.screens),[I(o,e)]:n}}function bl({value:e,onChange:t,labelId:n,view:o,intro:r}){const l=E(),s=ue(l,{intro:r}),c=o==="phone"?s.phone:o==="tablet"?s.tablet:r?s.desktop:e===!0,u=o==="phone"&&s.ownTablet,d=o==="desktop"?null:et(o,s),h=d?.on?pi(d.distance,d.unit):a("Off");return i(w,{label:a(Kt),labelId:n,icon:K(i(Tt,{})),action:L(F,{children:[o!=="desktop"?i(O,{words:x()?.panel,label:a(Kt),changed:ne(o,l),detail:X(p=>a(p),h,u?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(Le,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const Rn="e.g. about";function uu(){return{_gAnchor:T("Anchor"),anchor:V({control:"plainText",label:"Name",placeholder:Rn},{type:"custom",render:({value:e,onChange:t})=>i(fo,{value:e,onChange:t,nameBox:(n,o)=>i(j,{value:n,onChange:o,label:"Name",placeholder:Rn,hideable:!1,markup:!1})})})}}function du(){return{_gAdvanced:T("Advanced"),[qn]:Sl}}const Sl={type:"custom",render:({value:e,onChange:t})=>i(w,{label:a("Custom CSS"),icon:K(i(Jo,{})),children:i(mr,{"aria-label":a("Custom CSS"),spellCheck:!1,autoGrow:!0,className:"font-mono",value:typeof e=="string"?e:"",onChange:n=>t(n.target.value)})})};function pu(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:s})=>{const c=`${l??s??e}-datetime`,u=Date.parse(typeof o=="string"?o:"");return i(w,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(ar,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:d=>r(d?d.toISOString():"")})})}}}function fu(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:s})=>{const c=`${l??s??e}-date`;return i(w,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(lr,{id:c,value:Hn(typeof o=="string"?o:null),onChange:u=>r(u?Bn(u):"")})})}}}function Nn(e,t,n,o){return{type:"custom",...D({},{...he,label:e}),render:r=>{const{value:l,onChange:s,id:c,name:u}=r,d="follows"in r,h=r,p=typeof l=="boolean",f=typeof h.follows=="boolean"?h.follows:t,m=p?l:d?f:t,g=`${c??u??e}-label`,b=h.readOnly===!0,_=i(Le,{checked:m,onChange:s,disabled:b,ariaLabelledBy:g});return i(w,{label:a(e),labelId:g,icon:n,hint:o===void 0?void 0:a(o),action:d?L(F,{children:[i(O,{words:x()?.panel,label:a(e),changed:p,detail:h.followsNoView?a(f?"On":"Off"):X(S=>a(S),a(f?"On":"Off"),h.followsView),disabled:b,onReset:()=>s(void 0)}),_]}):_})}}}function hu(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(_l,{label:"Background",icon:i(To,{}),id:r,value:e,shown:Fo(e),onChange:t})}}}function mu(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(ae,{label:a(e),icon:n,value:o||t,onChange:r})}}function _l({label:e,icon:t,id:n,value:o,shown:r,onChange:l}){const{colors:s,n:c}=nt(),u=ke(o),d=u?ce(u,s,c):null;return i(ae,{label:a(e),icon:t,id:n,value:d?d.hex:r,caption:d?.words,onChange:l,choices:tt(u??"",s,c,l)})}function gu(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(wl,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function tt(e,t,n,o){const r=Ae(e);return br(t,n).map(l=>({label:l.label,color:l.value,selected:r===l.name,onPick:()=>o(l.name)}))}function wl({value:e,onChange:t,twin:n}){const{colors:o,n:r}=nt(),l=o.background,s=$(l.toUpperCase(),a("Theme {n} background",{n:r})),[c,u]=N(ko),[d]=N(vo),h=typeof d=="string"&&d.trim()!=="",p=Nt(c),f=oe=>u(Nt(oe)||void 0),m=Ae(e),g=m?ce(m,o,r):null,b=tt(e,o,r,t),_=n?()=>t(void 0):()=>t("");let S=l,C=s;if(n){const oe=Ae(n.follows),Ce=Bo(n.follows),ye=oe?ce(oe,o,r):Ce?{hex:Ce,words:Ce.toUpperCase()}:null;S=ye?.hex??l,C=X(Ln=>a(Ln),ye?ye.words:s,n.view)}const v=!n&&(Ho(e)||h)?i(Cl,{value:p,onChange:f}):null;return g?i(ae,{label:a("Fill"),icon:i(Ne,{}),value:g.hex,caption:g.words,onChange:t,changed:!0,onReset:_,resetTo:C,choices:b,children:v}):i(Gt,{label:a("Fill"),icon:i(Ne,{}),value:e,inherited:S,resetTo:C,onChange:t,onReset:_,choices:b,children:v})}function Cl({value:e,onChange:t}){return fe({options:Do.map(n=>({label:n.label,value:n.value,hint:n.hint})),value:e,onChange:t,ariaLabel:a("Fill")})}function yl(e,t,n){if((e?.content??[]).some(s=>s?.props?.id===t))return de(n);const r=Uo(e,t);if(r.length===0)return null;const l=de(ln(n));if(l!==null)return l;for(let s=r.length-1;s>0;s-=1){const c=de(ln(r[s].sectionAccent));if(c!==null)return c}return de(r[0].sectionAccent)}function nt(){const e=tn(W().theme),[t]=N("sectionAccent");let n=null;try{const{appState:r,selectedItem:l}=re(c=>c),s=l?.props?.id?String(l.props.id):void 0;n=s?yl(r?.data,s,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 bu(){return gn()}const Su={top:i(wt,{}),right:i(yo,{}),bottom:i(wo,{}),left:i(Co,{})};function _u(e,t,n,o,r,l,s){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=l?.[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(w,{label:a(e),icon:r,value:c(m)?.label?a(c(m).label):s?a(s):"",children:Zi(a,{label:e,value:m,onChange:f,points:h})})}}}function wu(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:l})=>i(Fr,{label:e,options:(l.options??t).map(s=>({...s,label:a(s.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:a(n)}:{}})}}function Cu(e,t,n,o){return{type:"custom",options:t,fallback:n,...D({},{type:"select",label:e}),render:({value:r,onChange:l,field:s})=>i(Dr,{label:e,options:(s.options??t).map(c=>({...c,label:a(c.label)})),fallback:s.fallback??n,value:r,onChange:l,placeholder:o===void 0?void 0:a(o)})}}function yu(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const xl={image:"Image",video:"Video"},xu=kn.map(e=>({label:xl[e],value:e}));function Ou(e,t,n){const o=Object.keys(at).map(r=>({label:at[r],value:r,picture:n[r]}));return{type:"custom",...D({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(Il,{label:e,icon:t,options:o,onChange:r})}}function Ol(e,t,n){const o=Mn(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=Wn(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 Il({label:e,icon:t,options:n,onChange:o}){const r=G(),l=r?.values??{},s=Un(l),c=st($n),u=Xn(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(w,{label:a(e),icon:K(t),hint:Ol(l,h,c?.hasUnsavedEdits??!1),children:fe({options:n,value:s,onChange:o,ariaLabel:e})})}function Iu(e,t,n,o={}){const r={type:"custom",[Ie]:!0,render:({value:l,onChange:s,name:c})=>i(Lr,{value:l||"",onChange:s,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?y("each",r):r}function Eu(e){return ot(e).map(t=>t.path)}function ot(e,t="",n=[]){const o=[];for(const[r,l]of Object.entries(e??{})){const s=t?`${t}.${r}`:r,c=l;if(c&&c[Ie]){o.push({path:s,field:c,along:n});continue}c?.arrayFields&&o.push(...ot(c.arrayFields,`${s}[]`,[...n,c])),c?.objectFields&&o.push(...ot(c.objectFields,s,[...n,c]))}return o}const Tu={HeroSingle:[Fn.image],HeroSlide:["videoFrame","videoFramePhone"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function El(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 Ru({value:e,onChange:t,label:n}){const o=e||{},r=G(),l=r?r.values!==r.node.props:!0,s=!!o.pending&&l,c=!!o.pending&&!l,u=!!qi(zi()).geocode,d=lt(),h=(p,f)=>t({...o,[p]:f??void 0});return L(F,{children:[i(w,{label:a(n),icon:i(xt,{}),action:u?i(Fe,{content:a("Find from the address (OpenStreetMap)"),children:i(Bt,{"aria-label":a("Find from the address"),"aria-busy":s||void 0,disabled:s,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(No,{})})}):void 0,children:u&&o.status?i(ho,{compact:!0,oneLine:!0,spaced:!1,status:s?"busy":o.ok&&!c?"found":"notfound",statusText:s?a("Finding…"):c?a(gr):a(o.status),hint:El(o)}):null}),i(w,{label:a("Enter by hand"),labelId:d,icon:i(xo,{}),action:i(Le,{checked:!!o.manual,onChange:p=>t({...o,manual:p}),ariaLabelledBy:d})}),o.manual&&i(w,{label:a("Latitude, longitude"),icon:i(xt,{}),children:L("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(Ht,{value:typeof o.lat=="number"?o.lat:null,onChange:p=>h("lat",p),min:-90,max:90,step:1e-4,placeholder:a("Latitude")}),i(Ht,{value:typeof o.lng=="number"?o.lng:null,onChange:p=>h("lng",p),min:-180,max:180,step:1e-4,placeholder:a("Longitude")})]})})]})}function Tl(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Rl(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,l)=>l===t?{text:n}:r)}function Nu(e,t){return e===null?null:t>e?e:null}function Nl(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 Pu={label:"Ticker items",icon:i(Eo,{})};function Au(e,t,n,o){return{type:"custom",[P]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...D({},{...fn.textList,label:e}),render:({value:r,onChange:l})=>i(Pl,{label:e,icon:K(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:l,markup:o==="markup"})}}function Pl({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:l=!1}){const s=J(null),[c,u]=Z(null),d=p=>p.map(f=>({text:f?.text??""})),h=p=>{const f=Nl(n,p,c);f===null&&(s.current=null),u(f),r(d(p))};return i(qo,{label:a(e),icon:t,noun:a("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:l?i(Mt,{target:s,value:Tl(n,c),onChange:p=>r(Rl(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:l&&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=>{s.current=g.currentTarget,u(f)}})})}function Lu(e,t){const n=`${e.label} — row ${t+1}`;return V({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(j,{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 Fu(e){return{_gCards:T("Cards"),coverIndex:R("Cover image",i(Io,{}),Nr,String(Pr),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:Es("Image background",Li),cardImage:Pn()}}function ku(){return{outline:R("Card outline",i(Po,{}),Er,Rr),indexBadge:R("Card number",i(yt,{}),Ir,Tr),showBadge:Nn("Product badge",!0,i(Rt,{noun:"tag"}))}}function Du(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...he,label:we.find(l=>l.id===r).label}),o=r=>D(De(rt),n(r));return{_gShowOnCard:T("Show on a card"),[rt]:D({type:"custom",render:()=>i(Al,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(rt)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const rt="showCardPrice",we=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function Al({rest:e}){const t=E(),n=ge(),o=s=>typeof t[s]=="boolean"?t[s]:void 0,r=s=>o(s)??e[s],l=we.some(({id:s})=>o(s)!==void 0&&o(s)!==e[s]);return i(it,{parts:we,changed:l,shown:r,onPress:(s,c)=>n({[s]:c}),onReset:()=>n(Object.fromEntries(we.map(({id:s})=>[s,void 0])))})}function vu(e,t="display"){const n=B(t);return{[t]:y("desktop",{type:"custom",render:({value:o,onChange:r})=>i(it,{parts:e,changed:Qo(o),shown:l=>er(o,l),onPress:(l,s)=>r(or(o,l,s)),onReset:()=>r(void 0)})}),[n]:y("mobile",{type:"custom",render:({value:o,onChange:r})=>i(Ll,{parts:e,desktopKey:t,value:o,onChange:r})})}}function it({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:l,disabledReason:s}){const c=a("Display");return i(w,{label:c,icon:i(go,{}),changed:t,action:i(O,{words:x()?.panel,label:c,changed:t,detail:l,onReset:r}),children:i(Zo,{label:c,items:e.map(u=>({id:u.id,label:a(u.label),shown:n(u.id),...s?{disabled:!0,disabledReason:a(s)}:{}})),onChange:o})})}function Ll({parts:e,desktopKey:t,value:n,onChange:o}){const r=E()[t];return i(it,{parts:e,changed:nr(n),shown:l=>tr(r,n,l),onPress:(l,s)=>o(rr(n,l,s)),onReset:()=>o(xr),detail:a("the same as Desktop")})}function Pn(e=Yn){return H("Card image",i(_t,{}),k,Te,zn,k,e,{clear:{hint:k},hint:"Rounds the picture. The card's own corner is in Styles."})}function Fl(){return pe(ht,"cardImage")}function Bu(){return{cardImage:Pn(ht),...Fl()}}function Hu(){return Ze({sidesKey:"cornerSides",row:Qn,step:Jn,useFollowed:()=>k,mark:i(kl,{label:Zn}),hint:a("Rounds the picture. Left alone it stays square.")})}function kl({label:e,changed:t=!1,onReset:n=()=>{}}){return i(O,{words:x()?.panel,label:a(e),changed:t,onReset:n})}function Gu(){return{type:"custom",render:({value:e,onChange:t})=>i(Hl,{value:typeof e=="string"?e:"",onChange:t})}}const An="own";function Mu(){const e=[{value:An,label:"Layout's own",picture:dn(Array.from({length:8},()=>[3,1]))},...Object.entries(so).map(([t,n])=>({value:t,label:n.label,picture:dn([...n.phone,...n.phone])}))];return y("mobile",cn("Layout",i(Ct,{}),e,An,{columns:2,cell:ls}))}function Dl({layout:e,width:t}){const n=lo(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:ao(e).map(([r,l],s)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${r}`,gridRow:`span ${l}`,aspectRatio:o}},s))})}const vl={width:"3.5rem",height:"2.5rem",words:!1},Bl=200;function Hl({value:e,onChange:t}){const[n,o]=Z(null),[r,l]=Z(4),s=J(null);vn(()=>{const m=s.current;if(!m||typeof ResizeObserver!="function")return;const g=()=>l(m.getBoundingClientRect().width>=Bl?4:3);g();const b=new ResizeObserver(g);return b.observe(m),()=>b.disconnect()},[]);const c=e?ss(Re,e):void 0,u=c?e:"",d=gt(n,u),h=gt(n,"").length,p=co("no-symbol"),f=[{value:"",label:a("Not chosen"),icon:rs(p,a("Not chosen"))},...d.map(m=>({value:m,label:a(Re[m].label),icon:i(Dl,{layout:Re[m],width:40})}))];return i(w,{label:a("Layout"),icon:i(Ct,{}),value:c?a(c.label):void 0,children:i("div",{ref:s,style:{flex:"1 1 auto",minWidth:0},children:i(kt,{label:a("Layout"),value:u,options:f,onChange:t,columns:r,cell:vl,header:L("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($o,{options:[{id:"all",label:a("All")},...ro.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:io.length})})]})})})})}export{bs as BOUND_TO_POST,Ac as BOUND_TO_POST_NOTE,Gc as BUCKET_ICONS,Sl as CUSTOM_CSS_ROW,Tu as CUSTOM_FIELD_MEDIA,Ru as CoordsField,pn as DESKTOP_GAP_NOT_OVERLAP,it as DisplayRow,Su as EDGE_ARROWS,cr as FOCAL_DEFAULT,Oe as FOLD_FIELD_MARKER,Ss as HIGHLIGHT_HINT,j as HidableTextField,dt as LINK_FIELD_MARKER,wc as Label,Ie as MEDIA_FIELD_MARKER,xu as MEDIA_TYPE_OPTIONS,Lc as NOT_BOUND_TO_POST,jc as PanelBand,Cs as PanelNoteLine,Zs as RowPropsContext,pt as SCAFFOLD_FIELD_MARKER,Xu as SCALAR_TEXT_CONTROLS,cs as SiteGapDefaultReset,q as Slider,xs as Swatches,Ku as TEXT_CONTROL_KINDS,P as TEXT_FIELD_MARKER,Pu as TICKER_ITEMS_ROW,Pl as TextListField,_l as ThemeFillRow,Se as WIDTH_LABEL,ms as WidthDefaultReset,Nl as aimAfterListChange,uu as anchorFields,$ as backTo,Vc as backgroundField,Zc as boxBlockSpacingField,nu as boxColumnsFields,gu as boxFillField,qs as boxPhoneRowField,Vs as boxShareField,eu as boxSharePhoneField,tu as boxShareTabletField,yl as boxThemeIndexOf,Wc as bucketHeader,qc as buttonWordsEntryField,$s as cardCornersField,Es as cardImageBackgroundField,Pn as cardImageField,Bu as cardImageFields,Fu as cardMediaFields,Jc as cardShapeFields,Du as cardShowFields,ku as cardStyleFields,ru as cellWidthFields,mu as colorInput,yc as containerDirectionField,us as containerGapField,ds as containerGapPhoneField,Cc as containerGapRows,ps as containerGapTabletField,El as coordsResultTip,vc as copyText,Sn as cornerSidesField,Ze as cornersRowField,bn as cornersUnitFields,du as customCssFields,fu as date,pu as dateTime,Kc as designGroupHeader,vu as displayFields,_u as edgePad,tt as fillSlotChoices,Nu as focusAfterRemove,bu as focusKeptField,Xc as foldMarker,Ee as foldMetaOf,ys as foldTitleOf,ll as followedHeightPatch,gl as followedStickPatch,Gu as galleryLayoutField,Mu as galleryLayoutPhoneField,au as heightFields,_e as heightFollowedBy,sl as heightLayersAt,xc as heroGroupPlacementPoints,ut as hidableText,ws as hintIsWhileTyping,Hu as imageCornersField,Pc as inOwnBox,Uc as isBucketHeader,gn as keptBy,Bc as linkField,Ol as loadingRowHint,Ou as loadingShowsField,Eu as mediaFieldPaths,ot as mediaFields,wu as multiSelect,hu as pageBackgroundField,Mc as panelNote,tl as phoneOverrideField,Qc as phonePlaceField,Dc as plainText,Hc as plainTextarea,Ts as pxField,$c as quietMarker,ct as readHidable,Tl as rowText,Cu as searchSelect,Is as sectionBandChoices,Ls as sectionCornersField,zc as sectionShapeFields,Yc as sectionThemeFields,Rl as setRowText,ou as sizeField,yu as sourceField,iu as spacingFields,cu as stickFields,su as swapPadding,Fc as text,jn as textFieldIdentifier,Ec as textFieldOffPage,Rc as textFieldPanelOnly,Au as textList,Lu as textListRowField,kc as textarea,Nn as toggle,Iu as upload,me as useLengthRow,ge as useSelectedPatch,E as useSelectedProps,N as useSelectedSibling,as as useSiteGapDetail,lu as widthField,Nc as withIdentifier,Ic as withOffPage,Tc as withPanelOnly,Oc as withScaffold};
|
|
@@ -44,6 +44,21 @@ export declare const SECTION_PIN_ABOVE_HINT = "On: the pinned box stays on top,
|
|
|
44
44
|
export declare function sectionPinAbove(props: {
|
|
45
45
|
stickAbove?: unknown;
|
|
46
46
|
}): boolean;
|
|
47
|
+
export declare const SECTION_PIN_END_KEY = "stickEnd";
|
|
48
|
+
export declare const SECTION_PIN_END_AWAY = "away";
|
|
49
|
+
export declare const SECTION_PIN_END_LABEL = "Pin ends";
|
|
50
|
+
export declare const SECTION_PIN_END_OPTIONS: readonly [{
|
|
51
|
+
readonly value: "over";
|
|
52
|
+
readonly label: "Next slides over";
|
|
53
|
+
}, {
|
|
54
|
+
readonly value: "away";
|
|
55
|
+
readonly label: "Scrolls away";
|
|
56
|
+
}];
|
|
57
|
+
export type SectionPinEnd = (typeof SECTION_PIN_END_OPTIONS)[number]["value"];
|
|
58
|
+
export declare const SECTION_PIN_END_DEFAULT: SectionPinEnd;
|
|
59
|
+
export declare const SECTION_PIN_END_HINT = "Next slides over: the next section covers this one before it moves. Scrolls away: this section goes up with the page, and the next section follows under it.";
|
|
60
|
+
export declare function sectionPinEndOf(value: unknown): SectionPinEnd;
|
|
61
|
+
export declare function sectionPinEndWrite(next: unknown): typeof SECTION_PIN_END_AWAY | undefined;
|
|
47
62
|
export declare const SECTION_PIN_KEYS: readonly string[];
|
|
48
63
|
export declare const PIN_AT_SCREEN_TOP: ReadonlySet<string>;
|
|
49
64
|
export declare const SECTION_STICK_EXCLUDED: ReadonlySet<string>;
|
|
@@ -59,6 +74,7 @@ export type SectionStickProps = {
|
|
|
59
74
|
stickTopScreensPhone?: unknown;
|
|
60
75
|
stickTopStop?: unknown;
|
|
61
76
|
stickAbove?: unknown;
|
|
77
|
+
stickEnd?: unknown;
|
|
62
78
|
sticky?: unknown;
|
|
63
79
|
};
|
|
64
80
|
export declare const SOME_VIEW_PINS: ShowWhenRule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{PIN_STICK_VAR as
|
|
1
|
+
import{PIN_STICK_VAR as y,PIN_TRACK_POSITION_VAR as K,pinAttrs as b,pinStickVars as m,readPin as P,readPinEnd as x}from"efficient-shell/format";import{finiteNumber as U}from"../finite-number.js";import{viewVarSplit as v}from"./view-var-split.js";import{cssLengthOf as k,rowUnitKeys as L,storedUnit as h}from"./css-length.js";const nt="Stick to top",d={min:0,max:200,step:4,fallback:0},g={kind:"position",unitKey:"stickTopDistanceUnit"},C=L(g),[w,B,R]=C,ot="Pin while scrolling",st="Scroll",i={distance:"--sf-pin-distance",position:"--sf-pin-position",on:"--sf-pin-on",length:"--sf-pin-length",stick:"--sf-pin-stick",trackPosition:"--sf-pin-track-position",header:"--sf-pin-header"},Y="stickTopScreens",V=[Y,"stickTopScreensTablet","stickTopScreensPhone"],ct="Screens",M="stickTopStop",E="screen",it="Pin stops at",rt=[{value:"header",label:"Under the header"},{value:E,label:"Screen top"}],at="header",pt="Under the header: the section stops below the site header. Screen top: it stops at the top edge of the screen, under a see-through header.";function W(t){return t===E?E:"header"}function St(t){return t===E?E:void 0}const H="stickAbove",Tt="Stays above",_t="On: the pinned box stays on top, and the sections after it scroll under it.";function j(t){return t.stickAbove===!0}const F="stickEnd",O="away",lt="Pin ends",Nt=[{value:"over",label:"Next slides over"},{value:O,label:"Scrolls away"}],Et="over",It="Next slides over: the next section covers this one before it moves. Scrolls away: this section goes up with the page, and the next section follows under it.";function $(t){return x(t)}function kt(t){return x(t)===O?O:void 0}const dt=["stickTop","stickTopDistance","stickTopTablet","stickTopDistanceTablet","stickTopPhone","stickTopDistancePhone",...C,...V,M,H,F],Pt=new Set(["IntroBleed"]),ht=new Set(["CategoryBar","DocTabs","Contents"]);function G(t){return typeof t.stickTop=="boolean"?t.stickTop:t.sticky!==!1}const u=t=>P(!0,t).length,Ot={any:["stickTop","stickTopTablet","stickTopPhone"].map(t=>({field:t,is:!0}))},ut={all:[{not:{field:"stickTop",in:[!0,!1]}},{not:{field:"sticky",is:!1}}]};function f(t,s="px"){const e=U(t)??d.fallback;return s!=="px"?Math.max(d.min,e):Math.min(d.max,Math.max(d.min,Math.round(e)))}function X(t){return typeof t.stickTopTablet=="boolean"}function q(t){return typeof t.stickTopPhone=="boolean"}function z(t,s={}){const e=s.intro?G(t):t.stickTop===!0,S=t,T=h(S[w]),r=f(t.stickTopDistance,T),_=u(t.stickTopScreens),n=X(t),p=n?t.stickTopTablet===!0:e,o=n?h(S[B]):T,I=n?f(t.stickTopDistanceTablet,o):r,c=n?u(t.stickTopScreensTablet):_,a=q(t),l=a?t.stickTopPhone===!0:p,N=a?h(S[R]):o,D=a?f(t.stickTopDistancePhone,N):I,A=a?u(t.stickTopScreensPhone):c;return{desktop:e,desktopDistance:r,desktopUnit:T,desktopScreens:_,tablet:p,tabletDistance:I,tabletUnit:o,tabletScreens:c,ownTablet:n,phone:l,phoneDistance:D,phoneUnit:N,phoneScreens:A,ownPhone:a}}function ft(t,s={}){const e=z(t,{intro:s.atScreenTop});if(!e.desktop&&!e.tablet&&!e.phone)return null;const S=s.atScreenTop===!0&&typeof t.stickTop!="boolean",T=e.desktop&&e.desktopScreens>0||e.tablet&&e.tabletScreens>0||e.phone&&e.phoneScreens>0,r=s.above===!0&&j(t),_=s.track===!0&&!S&&T&&!r,n=(c,a,l,N)=>v({tabletClass:"",tabletVar:`${c}-tablet`,phoneClass:"",phoneVar:`${c}-phone`},a,l,N).style,p={...s.atScreenTop||W(t.stickTopStop)===E?{[i.header]:"0px"}:{},[i.distance]:k(e.desktopDistance,e.desktopUnit),...n(i.distance,k(e.desktopDistance,e.desktopUnit),k(e.tabletDistance,e.tabletUnit),k(e.phoneDistance,e.phoneUnit))};if(_){const c=N=>N?"1":"0",a={...p,...e.desktop?{}:{[i.on]:"0"},...n(i.on,c(e.desktop),c(e.tablet),c(e.phone)),[i.length]:String(e.desktopScreens),...n(i.length,String(e.desktopScreens),String(e.tabletScreens),String(e.phoneScreens)),...J(e.desktop&&e.desktopScreens===0,e.tablet&&e.tabletScreens===0,e.phone&&e.phoneScreens===0,n)},l=b(P(!0),"track",{end:$(t.stickEnd)});return{attrs:l.attrs,style:{...a,...l.style}}}const o=c=>c?"sticky":"static",I={...p,...e.desktop?{}:{[i.position]:"static"},...n(i.position,o(e.desktop),o(e.tablet),o(e.phone))};return{attrs:b(P(!0),"stick",r?{above:r}:{}).attrs,style:I}}function J(t,s,e,S){const T=[[i.stick,y],[i.trackPosition,K]],[r,_,n]=[t,s,e].map(m);return Object.fromEntries(T.flatMap(([p,o])=>[...t?[[p,r[o]]]:[],...Object.entries(S(p,r[o],_[o],n[o]))]))}export{ut as INTRO_OLD_STICKY_PINS,Pt as PIN_AT_SCREEN_TOP,_t as SECTION_PIN_ABOVE_HINT,H as SECTION_PIN_ABOVE_KEY,Tt as SECTION_PIN_ABOVE_LABEL,O as SECTION_PIN_END_AWAY,Et as SECTION_PIN_END_DEFAULT,It as SECTION_PIN_END_HINT,F as SECTION_PIN_END_KEY,lt as SECTION_PIN_END_LABEL,Nt as SECTION_PIN_END_OPTIONS,st as SECTION_PIN_GROUP,dt as SECTION_PIN_KEYS,ot as SECTION_PIN_LABEL,Y as SECTION_PIN_SCREENS_KEY,V as SECTION_PIN_SCREENS_KEYS,ct as SECTION_PIN_SCREENS_LABEL,at as SECTION_PIN_STOP_DEFAULT,pt as SECTION_PIN_STOP_HINT,M as SECTION_PIN_STOP_KEY,it as SECTION_PIN_STOP_LABEL,rt as SECTION_PIN_STOP_OPTIONS,E as SECTION_PIN_STOP_SCREEN,i as SECTION_PIN_VARS,d as SECTION_STICK_DISTANCE,g as SECTION_STICK_DISTANCE_ROW,ht as SECTION_STICK_EXCLUDED,nt as SECTION_STICK_LABEL,Ot as SOME_VIEW_PINS,q as hasPhoneStick,X as hasTabletStick,z as resolveSectionStick,j as sectionPinAbove,ft as sectionPinAttrs,$ as sectionPinEndOf,kt as sectionPinEndWrite,W as sectionPinStopOf,St as sectionPinStopWrite};
|
|
@@ -829,6 +829,8 @@ export declare const WEB_BUILDER_WORDS: {
|
|
|
829
829
|
readonly "New page": "New page";
|
|
830
830
|
readonly "New popup": "New popup";
|
|
831
831
|
readonly "Next slide": "Next slide";
|
|
832
|
+
readonly "Next slides over": "Next slides over";
|
|
833
|
+
readonly "Next slides over: the next section covers this one before it moves. Scrolls away: this section goes up with the page, and the next section follows under it.": "Next slides over: the next section covers this one before it moves. Scrolls away: this section goes up with the page, and the next section follows under it.";
|
|
832
834
|
readonly "No fill": "No fill";
|
|
833
835
|
readonly "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.": "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.";
|
|
834
836
|
readonly "No image yet. The slide shows its background colour until you choose one.": "No image yet. The slide shows its background colour until you choose one.";
|
|
@@ -954,6 +956,7 @@ export declare const WEB_BUILDER_WORDS: {
|
|
|
954
956
|
readonly "Pick who to reach, then a form that routes the message.": "Pick who to reach, then a form that routes the message.";
|
|
955
957
|
readonly Picture: "Picture";
|
|
956
958
|
readonly "Picture first": "Picture first";
|
|
959
|
+
readonly "Pin ends": "Pin ends";
|
|
957
960
|
readonly "Pin stops at": "Pin stops at";
|
|
958
961
|
readonly "Pin while scrolling": "Pin while scrolling";
|
|
959
962
|
readonly Pinterest: "Pinterest";
|
|
@@ -1074,6 +1077,7 @@ export declare const WEB_BUILDER_WORDS: {
|
|
|
1074
1077
|
readonly Scroll: "Scroll";
|
|
1075
1078
|
readonly "Scroll-Over Text": "Scroll-Over Text";
|
|
1076
1079
|
readonly "Scrolling Bar": "Scrolling Bar";
|
|
1080
|
+
readonly "Scrolls away": "Scrolls away";
|
|
1077
1081
|
readonly Search: "Search";
|
|
1078
1082
|
readonly "Search all pages": "Search all pages";
|
|
1079
1083
|
readonly "Search all pages\u2026": "Search all pages…";
|