efficient-web-builder 55.3.0 → 56.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/editor/components/BlockGapField.d.ts +1 -2
  3. package/dist/editor/components/BlockGapField.js +1 -1
  4. package/dist/editor/components/CardShadowField.d.ts +1 -2
  5. package/dist/editor/components/CardShadowField.js +1 -1
  6. package/dist/editor/components/ChatSettingsPanel.js +1 -1
  7. package/dist/editor/components/CornersField.d.ts +1 -2
  8. package/dist/editor/components/CornersField.js +1 -1
  9. package/dist/editor/components/HoverEffectField.d.ts +1 -2
  10. package/dist/editor/components/HoverEffectField.js +1 -1
  11. package/dist/editor/components/PartSettingsPanel.js +1 -1
  12. package/dist/editor/components/PhotographyField.d.ts +1 -2
  13. package/dist/editor/components/PhotographyField.js +1 -1
  14. package/dist/editor/components/SectionEditor.js +1 -1
  15. package/dist/editor/components/SectionThumbnail.js +1 -1
  16. package/dist/editor/components/ShadowColourField.d.ts +1 -2
  17. package/dist/editor/components/ShadowColourField.js +1 -1
  18. package/dist/editor/components/ShareButtonField.d.ts +1 -2
  19. package/dist/editor/components/ShareButtonField.js +1 -1
  20. package/dist/editor/components/SideSpaceField.d.ts +1 -2
  21. package/dist/editor/components/SideSpaceField.js +1 -1
  22. package/dist/editor/components/SocialLinksPanel.js +1 -1
  23. package/dist/editor/components/SourceStatus.d.ts +2 -1
  24. package/dist/editor/components/SourceStatus.js +1 -1
  25. package/dist/editor/components/StandaloneSectionEditor.js +1 -1
  26. package/dist/editor/components/StorefrontEditor.js +1 -1
  27. package/dist/editor/components/StylesPanel.js +1 -1
  28. package/dist/editor/components/WebsiteHintsProvider.d.ts +8 -0
  29. package/dist/editor/components/WebsiteHintsProvider.js +1 -0
  30. package/dist/editor/components/WebsiteSettingsPanel.d.ts +6 -17
  31. package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
  32. package/dist/editor/components/storefront-editor.css +35 -34
  33. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  34. package/dist/editor/lib/document/controls.js +1 -1
  35. package/dist/editor/lib/sections/new-section-node.js +1 -1
  36. package/dist/editor/lib/sections/text-layouts.js +1 -1
  37. package/dist/format/lib/content/box-layout.d.ts +5 -3
  38. package/dist/format/lib/content/box-layout.js +1 -1
  39. package/dist/format/lib/content/card-template.js +1 -1
  40. package/dist/format/lib/content/cell-picture-sizes.d.ts +31 -0
  41. package/dist/format/lib/content/cell-picture-sizes.js +1 -0
  42. package/dist/format/lib/content/image-aspect.d.ts +1 -0
  43. package/dist/format/lib/content/image-aspect.js +1 -1
  44. package/dist/format/lib/content/mirror-cards.d.ts +1 -1
  45. package/dist/format/lib/content/mirror-cards.js +1 -1
  46. package/dist/format/lib/document/article-body-seed.d.ts +10 -0
  47. package/dist/format/lib/document/article-body-seed.js +1 -0
  48. package/dist/format/lib/document/blocks/general/Timeline/meta.d.ts +2 -1
  49. package/dist/format/lib/document/blocks/general/Timeline/meta.js +2 -2
  50. package/dist/format/lib/document/blocks/placeholders.d.ts +1 -0
  51. package/dist/format/lib/document/blocks/placeholders.js +1 -1
  52. package/dist/format/lib/document/easel-row-words.d.ts +1 -1
  53. package/dist/format/lib/document/easel-row-words.js +1 -1
  54. package/dist/format/lib/document/section-catalog.js +2 -2
  55. package/dist/format/lib/editor-words-catalogue.d.ts +6 -0
  56. package/dist/format/lib/editor-words-catalogue.js +3 -3
  57. package/dist/format/lib/editor-words-kept.js +1 -1
  58. package/dist/format/lib/fit-words.js +2 -2
  59. package/dist/format/lib/hero-video.d.ts +2 -0
  60. package/dist/format/lib/hero-video.js +1 -1
  61. package/dist/format/lib/sections/section-presets.js +1 -1
  62. package/dist/format/lib/sections/timeline-year-shape.js +1 -1
  63. package/dist/format/lib/sized-image.d.ts +1 -0
  64. package/dist/format/lib/sized-image.js +1 -1
  65. package/dist/format/lib/source-rules/page-picture-place.d.ts +6 -0
  66. package/dist/format/lib/source-rules/page-picture-place.js +4 -0
  67. package/dist/format/lib/source-rules/part-style-naming.js +2 -2
  68. package/dist/format/lib/web-backend.d.ts +8 -0
  69. package/dist/render/components/Banner.js +1 -1
  70. package/dist/render/components/BoxCellWidthContext.d.ts +13 -0
  71. package/dist/render/components/BoxCellWidthContext.js +1 -1
  72. package/dist/render/components/Flex.d.ts +2 -1
  73. package/dist/render/components/Flex.js +1 -1
  74. package/dist/render/components/HeroPictures.d.ts +2 -1
  75. package/dist/render/components/HeroPictures.js +1 -1
  76. package/dist/render/components/HeroPoster.d.ts +4 -1
  77. package/dist/render/components/HeroPoster.js +1 -1
  78. package/dist/render/components/HeroSection.js +1 -1
  79. package/dist/render/components/HeroSlide.d.ts +3 -1
  80. package/dist/render/components/HeroSlide.js +1 -1
  81. package/dist/render/components/HeroVideoPlay.js +1 -1
  82. package/dist/render/components/ImageBlock.js +1 -1
  83. package/dist/render/components/Logos.js +1 -1
  84. package/dist/render/components/Manifesto.js +1 -1
  85. package/dist/render/components/Placeholder.d.ts +2 -1
  86. package/dist/render/components/Placeholder.js +1 -1
  87. package/dist/render/components/SectionHeader.js +1 -1
  88. package/dist/render/components/Split.js +1 -1
  89. package/dist/render/lib/content/block-size.d.ts +1 -0
  90. package/dist/render/lib/content/block-size.js +1 -1
  91. package/dist/render/lib/content/box-cell-bound.d.ts +17 -0
  92. package/dist/render/lib/content/box-cell-bound.js +1 -0
  93. package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
  94. package/dist/render/lib/document/blocks/general/HeroSlide/render.js +1 -1
  95. package/dist/render/lib/document/blocks/general/Timeline/render.js +1 -1
  96. package/dist/render/lib/document/blocks/general/section-head-looks.d.ts +1 -0
  97. package/dist/render/lib/document/blocks/general/section-head-looks.js +2 -2
  98. package/dist/render/lib/document/blocks/general/section-to-box-rows-pageheader.js +1 -1
  99. package/dist/render/lib/document/blocks/general/section-to-box-rows-timeline.d.ts +2 -0
  100. package/dist/render/lib/document/blocks/general/section-to-box-rows-timeline.js +2 -2
  101. package/dist/render/lib/document/page-render.js +1 -1
  102. package/dist/render/lib/document/passes/block-size.js +1 -1
  103. package/dist/render/lib/document/slot-counts.d.ts +8 -0
  104. package/dist/render/lib/document/slot-counts.js +1 -0
  105. package/dist/render/lib/first-screen.d.ts +28 -0
  106. package/dist/render/lib/first-screen.js +1 -0
  107. package/dist/render/lib/sections/section-to-box.js +1 -1
  108. package/dist/render/lib/site-runtime.d.ts +1 -0
  109. package/package.json +3 -3
  110. package/dist/editor/components/KeepHint.d.ts +0 -5
  111. package/dist/editor/components/KeepHint.js +0 -1
@@ -3,11 +3,6 @@ import type { SiteThemeRowPatch } from "../../format/lib/site-theme-row.js";
3
3
  import { type CardShadow, type HoverEffect } from "../../format/lib/theme.js";
4
4
  export declare const SITE_STYLES_ID_PREFIX = "sf-site-styles";
5
5
  export declare const TABPANEL_CLASS = "sf-site-styles-tabpanel";
6
- export declare const SHOW_HINTS_DEFAULT = false;
7
- export declare function HintsToggle({ shown, onChange, }: {
8
- shown: boolean;
9
- onChange: (v: boolean) => void;
10
- }): import("react").JSX.Element;
11
6
  export declare const SITE_STYLES_TEXT_TAB = "text";
12
7
  export declare const SITE_STYLES_BASICS_TAB = "basics";
13
8
  export declare const THIS_PAGE_GROUP_ID = "this-page-group";
@@ -22,34 +17,28 @@ export declare function blockGapPatch(v: number | null): SiteThemeRowPatch;
22
17
  export declare function blockGapPhonePatch(v: number | null): SiteThemeRowPatch;
23
18
  export declare function siteGutterPatch(v: number | null): SiteThemeRowPatch;
24
19
  export declare function siteGutterPhonePatch(v: number | null): SiteThemeRowPatch;
25
- export declare function SideSpaceRootField({ persist, showHint, }: {
20
+ export declare function SideSpaceRootField({ persist, }: {
26
21
  persist: (p: SiteThemeRowPatch, immediate?: boolean) => void;
27
- showHint: boolean;
28
22
  }): import("react").JSX.Element | null;
29
- export declare function BlockGapRootField({ persist, showHint, }: {
23
+ export declare function BlockGapRootField({ persist, }: {
30
24
  persist: (p: SiteThemeRowPatch, immediate?: boolean) => void;
31
- showHint: boolean;
32
25
  }): import("react").JSX.Element | null;
33
- export declare function PageGroupFields({ persist, showHint, }: {
26
+ export declare function PageGroupFields({ persist, }: {
34
27
  persist: (p: SiteThemeRowPatch, immediate?: boolean) => void;
35
- showHint?: boolean;
36
28
  }): import("react").JSX.Element;
37
29
  export declare function cardShadowPatch(v: CardShadow | null): SiteThemeRowPatch;
38
30
  export declare function shadowColourPatch(hex: string | null): SiteThemeRowPatch;
39
31
  export declare function hoverEffectPatch(v: HoverEffect | null): SiteThemeRowPatch;
40
- export declare function CardLookFields({ persist, showHint, }: {
32
+ export declare function CardLookFields({ persist, }: {
41
33
  persist: (p: SiteThemeRowPatch, immediate?: boolean) => void;
42
- showHint?: boolean;
43
34
  }): import("react").JSX.Element;
44
35
  export declare function photographyPatch(v: boolean | null): SiteThemeRowPatch;
45
- export declare function PhotographyGroupFields({ persist, showHint, }: {
36
+ export declare function PhotographyGroupFields({ persist, }: {
46
37
  persist: (p: SiteThemeRowPatch, immediate?: boolean) => void;
47
- showHint?: boolean;
48
38
  }): import("react").JSX.Element;
49
39
  export declare function shareButtonPatch(v: boolean | null): SiteThemeRowPatch;
50
- export declare function ShareButtonRootField({ persist, showHint, }: {
40
+ export declare function ShareButtonRootField({ persist, }: {
51
41
  persist: (p: SiteThemeRowPatch, immediate?: boolean) => void;
52
- showHint?: boolean;
53
42
  }): import("react").JSX.Element;
54
43
  export declare function useWebsiteName(): string;
55
44
  export declare function WebsiteNameReadonly(): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as o,Fragment as C,jsxs as T}from"react/jsx-runtime";import{useEasel as O,useRootFields as z}from"efficient-easel/easel";import{Inspector as Y}from"efficient-easel/fields";import{SettingsGroup as j}from"efficient-easel/panel";import{useEffect as U,useRef as X,useState as R}from"react";import q from"./ThemeField.js";import K from"./CornersField.js";import M from"./CardShadowField.js";import $ from"./ShadowColourField.js";import V,{blockGapRow as J}from"./BlockGapField.js";import Q from"./HoverEffectField.js";import Z from"./PhotographyField.js";import D from"./ShareButtonField.js";import{usePreviewDevice as k}from"efficient-easel/draw/client";import ee,{sideSpaceRow as te}from"./SideSpaceField.js";import{BackgroundWidthRow as oe,ContentWidthRow as ne,SITE_BACKGROUND_HINT as re,SITE_CONTENT_HINT as ie}from"./SectionWidthRows.js";import se from"./SiteAccentField.js";import ae from"./SiteTextStylesField.js";import{usePreviewHeader as g}from"../../render/components/PreviewHeaderContext.js";import{Button as ce,EmptyState as le,SliderGroup as ue,Tabs as de,Tooltip as he,tabButtonId as pe,tabPanelId as fe}from"efficient-shell/ui";import{ContrastIcon as ge,NoteIcon as me,SettingsIcon as Se,TypeIcon as _e}from"efficient-easel/icons";import{useThemeRowPersist as we}from"../lib/theme-row-persist.js";import{themeSaveNotice as xe}from"../../format/lib/theme-save-message.js";import{say as m}from"../../format/lib/editor-words.js";import{NEUTRAL_SITE_NAME as Te}from"../../format/lib/content/site-name.js";import{PAGE_WIDTH as E}from"../../format/lib/content/page-width.js";import{PAGE_STYLE_FIELDS as Ce}from"../lib/document/page-root-fields.js";import{previewFrame as be}from"efficient-easel/screen/lib/document/preview-dom";import{siteTextColourNameOf as ye,siteTextColours as Pe}from"../../format/lib/text-styles/site-text-colours.js";import{useSiteTextStylesWriter as Re}from"../lib/site-text-styles-writer.js";import{CORNER_STYLE_TO_PX as Ee,normalizeCornerRadius as Ie,normalizeCornerStyle as Ge,normalizeShadowColor as ke}from"../../format/lib/theme.js";const F="sf-site-styles",Fe="sf-site-styles-tabpanel",He=!1,Oe="Show hints";function Be({shown:e,onChange:t}){return o("div",{className:"sf-hints",children:o(ce,{type:"button",variant:"ghost","aria-pressed":e,leftIcon:o(me,{size:13}),onClick:()=>t(!e),children:m(Oe)})})}const jt="text",B="basics",N="this-page-group",I=[{id:B,label:"Basics",icon:o(Se,{})},{id:"theme",label:"Theme",icon:o(ge,{})},{id:"text",label:"Text",icon:o(_e,{})}];function Ne({themeFromDocument:e,persist:t}){const{appState:n,dispatch:r}=O(d=>d),{theme:l,setTheme:s}=g(),u=n.data,h=u.root?.props??{},i=d=>{if(e){const p={...h,theme:d};r({type:"replaceRoot",root:{...u.root,props:p},recordHistory:!0})}else s(d);t({selected_preset:d.selected,theme_presets:d.themes})};return o(q,{value:e?h.theme:l,onChange:i})}function ve({themeFromDocument:e,persist:t}){const[n,r]=R(null),{theme:l,setFonts:s,setSizes:u,setHeadingTypography:h}=g(),i=Re({themeFromDocument:e,persist:t}),{old:d,saved:p,writeRoot:f}=i,S=i.fonts,a=i.sizes,x=i.typography,b=c=>c.values.size??ze(Ae[c.id]??"body")??Le[c.kind],_=c=>i.write(c),G=Pe(l),y=ye(l),P=c=>{const w={...S,accent:c};e?f({fonts:w}):s(w),t({accent_font:c})},A=c=>{u({...a,accent:c}),t({accent_size_px:c})},L=c=>{const w={...x,weightStrong:c};e?f({headingTypography:w}):h(w),t({heading_weight_strong:c})},W=c=>{const w={...x,italicStrong:c};e?f({headingTypography:w}):h(w),t({accent_italic:c})};return T(C,{children:[o(ae,{saved:p,old:d,colours:G,colourNameOf:y,sizeOf:b,onChange:_,openId:n===H?null:n,onOpenChange:r,withoutSize:e}),o(se,{font:S.accent,size:a.accent,weight:x.weightStrong,italic:x.italicStrong,headingWeight:x.weight,open:n===H,onOpenChange:c=>r(c?H:null),onChange:c=>{c.key==="font"?P(c.value):c.key==="size"?A(c.value):c.key==="weight"?L(c.value):W(c.value)},withoutSize:e})]})}const H="accent",Ae={"heading-1":"heading","heading-2":"heading2","heading-3":"heading3","body-1":"body","body-5":"label"},Le={heading:32,body:14},We={heading:"main h1, main h2",heading2:"main h1, main h2",heading3:"main h1, main h2",accent:"main h1 em, main h2 em",body:"main p",label:"main .mono-eyebrow"};function ze(e){if(typeof document>"u")return null;const n=(be()?.contentDocument??document).querySelector(We[e]);if(!n)return null;const r=parseFloat(getComputedStyle(n).fontSize);return Number.isFinite(r)?r:null}function Ye({themeFromDocument:e,persist:t,showHint:n}){const{appState:r,dispatch:l}=O(a=>a),{cornerRadiusPx:s,setCornerRadiusPx:u}=g(),h=r.data,i=h.root?.props??{},d=i.cornerRadiusPx===void 0?Ee[Ge(i.cornerStyle)]:Ie(i.cornerRadiusPx),p=e?d:s,f=a=>l({type:"replaceRoot",root:{...h.root,props:{...i,...a}},recordHistory:!0});return o(K,{value:p,onChange:a=>{e?f({cornerRadiusPx:a}):u(a),t({corner_radius_px:a})},showHint:n})}function je(e){return{site_width:e}}function Ue({persist:e,showHint:t}){const{siteWidth:n,setSiteWidth:r,sectionBackgroundWidth:l,setSectionBackgroundWidth:s,sectionContentWidth:u,setSectionContentWidth:h}=g();if(k()!=="desktop")return null;const d=typeof n=="number"?n:E.default,p=a=>{r(a),e(je(a),a===null)},f=a=>{s(a),e({section_background_width:a},!0)},S=a=>{h(a),e({section_content_width:a},!0)};return T(C,{children:[o(oe,{value:l??"full",changed:l!==null,detail:m("Full width"),onChange:f,onReset:()=>f(null),hint:t?re:void 0}),o(ne,{mode:u??"content",px:d,min:E.min,max:E.max,changed:typeof n=="number"||u!==null,detail:`${m("Content width")} ${E.default}px`,onMode:S,onPx:a=>p(a),onReset:()=>{S(null),p(null)},hint:t?ie:void 0})]})}function Xe(e){return{block_gap:e}}function qe(e){return{block_gap_phone:e}}function Ke(e){return{site_gutter:e}}function Me(e){return{site_gutter_phone:e}}function v(e,[t,n],r){t(e),r(n(e),e===null)}function $e({persist:e,showHint:t}){const{siteGutter:n,siteGutterPhone:r,setSiteGutter:l,setSiteGutterPhone:s}=g(),u=te(k(),{gutter:n,phone:r});if(!u)return null;const h=u.key==="site_gutter_phone"?[s,Me]:[l,Ke];return o(ee,{value:u.value,onChange:i=>v(i,h,e),showHint:t,unsetPx:u.unsetPx,bounds:u.bounds})}function Ve({persist:e,showHint:t}){const{blockGap:n,blockGapPhone:r,setBlockGap:l,setBlockGapPhone:s}=g(),u=J(k(),{gap:n,phone:r});if(!u)return null;const h=u.key==="block_gap_phone"?[s,qe]:[l,Xe];return o(V,{value:u.value,onChange:i=>v(i,h,e),showHint:t,followsPx:u.followsPx})}function Je({persist:e,showHint:t=!0}){return T(C,{children:[o(Ue,{persist:e,showHint:t}),o($e,{persist:e,showHint:t}),o(Ve,{persist:e,showHint:t})]})}function Qe(e){return{card_shadow:e}}function Ze(e){return e===null?{shadow_color:null}:{shadow_color:ke(e)}}function De(e){return{hover_effect:e}}function et({persist:e,showHint:t=!0}){const{cardShadow:n,setCardShadow:r,shadowColor:l,setShadowColor:s,hoverEffect:u,setHoverEffect:h}=g();return T(C,{children:[o(M,{value:n,onChange:i=>{r(i),e(Qe(i),!0)},showHint:t}),o($,{value:l,onChange:i=>{s(i),e(Ze(i),i===null)},showHint:t}),o(Q,{value:u,onChange:i=>{h(i),e(De(i),!0)},showHint:t})]})}function tt(e){return{photography_grayscale:e}}function ot({persist:e,showHint:t}){const{photographyGrayscale:n,setPhotographyGrayscale:r}=g();return o(Z,{value:n,onChange:s=>{r(s),e(tt(s),!0)},showHint:t})}function nt({persist:e,showHint:t=!0}){return o(C,{children:o(ot,{persist:e,showHint:t})})}function rt(e){return{share_button_on_posts:e}}function it({persist:e,showHint:t=!0}){const{shareButtonOnPosts:n,setShareButtonOnPosts:r}=g();return o(D,{value:n,onChange:s=>{r(s),e(rt(s),!0)},showHint:t})}function st(){const{websiteName:e}=g();return e?.trim()||Te}function Ut(){const e=st();return o(he,{content:m("{name} — renamed in the Console: {place}.",{name:e,place:m("Storefront ▸ Sites ▸ Settings")}),className:"sf-name-tip",children:o("span",{className:"sf-panel-site",children:e})})}function at({themeFromDocument:e=!1,tokenRef:t,siteId:n,onNotify:r,tab:l,onTabChange:s,initialTab:u,revealPageGroup:h=!1,onPageGroupRevealed:i}){const{persist:d}=we({themeFromDocument:e,tokenRef:t,siteId:n,onResult:y=>{const P=xe(y);P&&r?.(P.msg,P.tone)}}),[p,f]=R(u??I[0].id),S=l!==void 0,a=S?l:p,x=S?s??(()=>{}):f,b=I.find(y=>y.id===a)??I[0],[_,G]=R(He);return T(ue,{children:[o(ut,{activeId:b.id,onSelect:x}),T("div",{id:fe(F,b.id),className:Fe,role:"tabpanel","aria-labelledby":pe(F,b.id),children:[a===B&&T(C,{children:[o(Ye,{themeFromDocument:e,persist:d,showHint:_}),!e&&o(et,{persist:d,showHint:_}),!e&&o(Je,{persist:d,showHint:_}),!e&&o(nt,{persist:d,showHint:_}),!e&&o(it,{persist:d,showHint:_}),o(ct,{reveal:h,onRevealed:i}),o(Be,{shown:_,onChange:G})]}),a==="theme"&&o(Ne,{themeFromDocument:e,persist:d}),a==="text"&&o(ve,{themeFromDocument:e,persist:d})]})]})}function ct({reveal:e,onRevealed:t}){const[n,r]=R(!0),l=X(t);return l.current=t,U(()=>{if(!e)return;r(!0);const s=requestAnimationFrame(()=>{document.getElementById(N)?.scrollIntoView({block:"start"}),l.current?.()});return()=>cancelAnimationFrame(s)},[e]),o(j,{title:m("This page"),open:n,onToggle:r,id:N,children:o(lt,{})})}function lt(){const{fields:e,values:t,readOnly:n,onChange:r}=z(),l=Object.fromEntries(Ce.filter(s=>s in e).map(s=>[s,e[s]]));return Object.keys(l).length===0?o(le,{variant:"none",icon:!1,message:m("This page has no look of its own to set.")}):o(Y,{fields:l,values:t,onChange:r,readOnly:n,tabs:!1,idPrefix:"this-page",ariaLabel:m("This page")})}function ut({activeId:e,onSelect:t}){return o("div",{className:"es-insp-tabs",children:o(de,{variant:"underline",block:!0,labelsFit:!0,"aria-label":m("Styles"),idPrefix:F,value:e,onChange:t,items:I.map(n=>{const r=m(n.label);return{id:n.id,icon:n.icon,label:r}})})})}export{Ve as BlockGapRootField,et as CardLookFields,Be as HintsToggle,Je as PageGroupFields,nt as PhotographyGroupFields,He as SHOW_HINTS_DEFAULT,B as SITE_STYLES_BASICS_TAB,F as SITE_STYLES_ID_PREFIX,I as SITE_STYLES_TABS,jt as SITE_STYLES_TEXT_TAB,it as ShareButtonRootField,$e as SideSpaceRootField,ut as SiteStylesTabStrip,Fe as TABPANEL_CLASS,N as THIS_PAGE_GROUP_ID,Ut as WebsiteNameReadonly,Xe as blockGapPatch,qe as blockGapPhonePatch,Qe as cardShadowPatch,at as default,De as hoverEffectPatch,tt as photographyPatch,Ze as shadowColourPatch,rt as shareButtonPatch,Ke as siteGutterPatch,Me as siteGutterPhonePatch,je as siteWidthPatch,st as useWebsiteName};
1
+ "use client";import{jsx as t,Fragment as T,jsxs as C}from"react/jsx-runtime";import{useEasel as I,useRootFields as H}from"efficient-easel/easel";import{Inspector as Y}from"efficient-easel/fields";import{SettingsGroup as j}from"efficient-easel/panel";import{useEffect as X,useRef as U,useState as E}from"react";import q from"./ThemeField.js";import K from"./CornersField.js";import M from"./CardShadowField.js";import $ from"./ShadowColourField.js";import V,{blockGapRow as J}from"./BlockGapField.js";import Q from"./HoverEffectField.js";import Z from"./PhotographyField.js";import D from"./ShareButtonField.js";import{usePreviewDevice as G}from"efficient-easel/draw/client";import ee,{sideSpaceRow as te}from"./SideSpaceField.js";import{BackgroundWidthRow as oe,ContentWidthRow as ne,SITE_BACKGROUND_HINT as re,SITE_CONTENT_HINT as ie}from"./SectionWidthRows.js";import se from"./SiteAccentField.js";import ae from"./SiteTextStylesField.js";import{usePreviewHeader as f}from"../../render/components/PreviewHeaderContext.js";import{EmptyState as ce,SliderGroup as le,Tabs as ue,Tooltip as de,tabButtonId as pe,tabPanelId as he}from"efficient-shell/ui";import{ContrastIcon as fe,SettingsIcon as ge,TypeIcon as me}from"efficient-easel/icons";import{useThemeRowPersist as Se}from"../lib/theme-row-persist.js";import{themeSaveNotice as _e}from"../../format/lib/theme-save-message.js";import{say as m}from"../../format/lib/editor-words.js";import{NEUTRAL_SITE_NAME as xe}from"../../format/lib/content/site-name.js";import{PAGE_WIDTH as w}from"../../format/lib/content/page-width.js";import{PAGE_STYLE_FIELDS as Ce}from"../lib/document/page-root-fields.js";import{previewFrame as Te}from"efficient-easel/screen/lib/document/preview-dom";import{siteTextColourNameOf as be,siteTextColours as Pe}from"../../format/lib/text-styles/site-text-colours.js";import{useSiteTextStylesWriter as ye}from"../lib/site-text-styles-writer.js";import{CORNER_STYLE_TO_PX as we,normalizeCornerRadius as Re,normalizeCornerStyle as Ee,normalizeShadowColor as Ge}from"../../format/lib/theme.js";const k="sf-site-styles",ke="sf-site-styles-tabpanel",Lt="text",O="basics",B="this-page-group",R=[{id:O,label:"Basics",icon:t(ge,{})},{id:"theme",label:"Theme",icon:t(fe,{})},{id:"text",label:"Text",icon:t(me,{})}];function Fe({themeFromDocument:e,persist:o}){const{appState:n,dispatch:r}=I(u=>u),{theme:s,setTheme:i}=f(),d=n.data,a=d.root?.props??{},p=u=>{if(e){const h={...a,theme:u};r({type:"replaceRoot",root:{...d.root,props:h},recordHistory:!0})}else i(u);o({selected_preset:u.selected,theme_presets:u.themes})};return t(q,{value:e?a.theme:s,onChange:p})}function Ie({themeFromDocument:e,persist:o}){const[n,r]=E(null),{theme:s,setFonts:i,setSizes:d,setHeadingTypography:a}=f(),p=ye({themeFromDocument:e,persist:o}),{old:u,saved:h,writeRoot:g}=p,l=p.fonts,_=p.sizes,x=p.typography,b=c=>c.values.size??Ae(Oe[c.id]??"body")??Be[c.kind],P=c=>p.write(c),y=Pe(s),A=be(s),N=c=>{const S={...l,accent:c};e?g({fonts:S}):i(S),o({accent_font:c})},L=c=>{d({..._,accent:c}),o({accent_size_px:c})},W=c=>{const S={...x,weightStrong:c};e?g({headingTypography:S}):a(S),o({heading_weight_strong:c})},z=c=>{const S={...x,italicStrong:c};e?g({headingTypography:S}):a(S),o({accent_italic:c})};return C(T,{children:[t(ae,{saved:h,old:u,colours:y,colourNameOf:A,sizeOf:b,onChange:P,openId:n===F?null:n,onOpenChange:r,withoutSize:e}),t(se,{font:l.accent,size:_.accent,weight:x.weightStrong,italic:x.italicStrong,headingWeight:x.weight,open:n===F,onOpenChange:c=>r(c?F:null),onChange:c=>{c.key==="font"?N(c.value):c.key==="size"?L(c.value):c.key==="weight"?W(c.value):z(c.value)},withoutSize:e})]})}const F="accent",Oe={"heading-1":"heading","heading-2":"heading2","heading-3":"heading3","body-1":"body","body-5":"label"},Be={heading:32,body:14},ve={heading:"main h1, main h2",heading2:"main h1, main h2",heading3:"main h1, main h2",accent:"main h1 em, main h2 em",body:"main p",label:"main .mono-eyebrow"};function Ae(e){if(typeof document>"u")return null;const n=(Te()?.contentDocument??document).querySelector(ve[e]);if(!n)return null;const r=parseFloat(getComputedStyle(n).fontSize);return Number.isFinite(r)?r:null}function Ne({themeFromDocument:e,persist:o}){const{appState:n,dispatch:r}=I(l=>l),{cornerRadiusPx:s,setCornerRadiusPx:i}=f(),d=n.data,a=d.root?.props??{},p=a.cornerRadiusPx===void 0?we[Ee(a.cornerStyle)]:Re(a.cornerRadiusPx),u=e?p:s,h=l=>r({type:"replaceRoot",root:{...d.root,props:{...a,...l}},recordHistory:!0});return t(K,{value:u,onChange:l=>{e?h({cornerRadiusPx:l}):i(l),o({corner_radius_px:l})}})}function Le(e){return{site_width:e}}function We({persist:e}){const{siteWidth:o,setSiteWidth:n,sectionBackgroundWidth:r,setSectionBackgroundWidth:s,sectionContentWidth:i,setSectionContentWidth:d}=f();if(G()!=="desktop")return null;const p=typeof o=="number"?o:w.default,u=l=>{n(l),e(Le(l),l===null)},h=l=>{s(l),e({section_background_width:l},!0)},g=l=>{d(l),e({section_content_width:l},!0)};return C(T,{children:[t(oe,{value:r??"full",changed:r!==null,detail:m("Full width"),onChange:h,onReset:()=>h(null),hint:re}),t(ne,{mode:i??"content",px:p,min:w.min,max:w.max,changed:typeof o=="number"||i!==null,detail:`${m("Content width")} ${w.default}px`,onMode:g,onPx:l=>u(l),onReset:()=>{g(null),u(null)},hint:ie})]})}function ze(e){return{block_gap:e}}function He(e){return{block_gap_phone:e}}function Ye(e){return{site_gutter:e}}function je(e){return{site_gutter_phone:e}}function v(e,[o,n],r){o(e),r(n(e),e===null)}function Xe({persist:e}){const{siteGutter:o,siteGutterPhone:n,setSiteGutter:r,setSiteGutterPhone:s}=f(),i=te(G(),{gutter:o,phone:n});if(!i)return null;const d=i.key==="site_gutter_phone"?[s,je]:[r,Ye];return t(ee,{value:i.value,onChange:a=>v(a,d,e),unsetPx:i.unsetPx,bounds:i.bounds})}function Ue({persist:e}){const{blockGap:o,blockGapPhone:n,setBlockGap:r,setBlockGapPhone:s}=f(),i=J(G(),{gap:o,phone:n});if(!i)return null;const d=i.key==="block_gap_phone"?[s,He]:[r,ze];return t(V,{value:i.value,onChange:a=>v(a,d,e),followsPx:i.followsPx})}function qe({persist:e}){return C(T,{children:[t(We,{persist:e}),t(Xe,{persist:e}),t(Ue,{persist:e})]})}function Ke(e){return{card_shadow:e}}function Me(e){return e===null?{shadow_color:null}:{shadow_color:Ge(e)}}function $e(e){return{hover_effect:e}}function Ve({persist:e}){const{cardShadow:o,setCardShadow:n,shadowColor:r,setShadowColor:s,hoverEffect:i,setHoverEffect:d}=f();return C(T,{children:[t(M,{value:o,onChange:a=>{n(a),e(Ke(a),!0)}}),t($,{value:r,onChange:a=>{s(a),e(Me(a),a===null)}}),t(Q,{value:i,onChange:a=>{d(a),e($e(a),!0)}})]})}function Je(e){return{photography_grayscale:e}}function Qe({persist:e}){const{photographyGrayscale:o,setPhotographyGrayscale:n}=f();return t(Z,{value:o,onChange:s=>{n(s),e(Je(s),!0)}})}function Ze({persist:e}){return t(T,{children:t(Qe,{persist:e})})}function De(e){return{share_button_on_posts:e}}function et({persist:e}){const{shareButtonOnPosts:o,setShareButtonOnPosts:n}=f();return t(D,{value:o,onChange:s=>{n(s),e(De(s),!0)}})}function tt(){const{websiteName:e}=f();return e?.trim()||xe}function Wt(){const e=tt();return t(de,{content:m("{name} — renamed in the Console: {place}.",{name:e,place:m("Storefront ▸ Sites ▸ Settings")}),className:"sf-name-tip",children:t("span",{className:"sf-panel-site",children:e})})}function ot({themeFromDocument:e=!1,tokenRef:o,siteId:n,onNotify:r,tab:s,onTabChange:i,initialTab:d,revealPageGroup:a=!1,onPageGroupRevealed:p}){const{persist:u}=Se({themeFromDocument:e,tokenRef:o,siteId:n,onResult:P=>{const y=_e(P);y&&r?.(y.msg,y.tone)}}),[h,g]=E(d??R[0].id),l=s!==void 0,_=l?s:h,x=l?i??(()=>{}):g,b=R.find(P=>P.id===_)??R[0];return C(le,{children:[t(it,{activeId:b.id,onSelect:x}),C("div",{id:he(k,b.id),className:ke,role:"tabpanel","aria-labelledby":pe(k,b.id),children:[_===O&&C(T,{children:[t(Ne,{themeFromDocument:e,persist:u}),!e&&t(Ve,{persist:u}),!e&&t(qe,{persist:u}),!e&&t(Ze,{persist:u}),!e&&t(et,{persist:u}),t(nt,{reveal:a,onRevealed:p})]}),_==="theme"&&t(Fe,{themeFromDocument:e,persist:u}),_==="text"&&t(Ie,{themeFromDocument:e,persist:u})]})]})}function nt({reveal:e,onRevealed:o}){const[n,r]=E(!0),s=U(o);return s.current=o,X(()=>{if(!e)return;r(!0);const i=requestAnimationFrame(()=>{document.getElementById(B)?.scrollIntoView({block:"start"}),s.current?.()});return()=>cancelAnimationFrame(i)},[e]),t(j,{title:m("This page"),open:n,onToggle:r,id:B,children:t(rt,{})})}function rt(){const{fields:e,values:o,readOnly:n,onChange:r}=H(),s=Object.fromEntries(Ce.filter(i=>i in e).map(i=>[i,e[i]]));return Object.keys(s).length===0?t(ce,{variant:"none",icon:!1,message:m("This page has no look of its own to set.")}):t(Y,{fields:s,values:o,onChange:r,readOnly:n,tabs:!1,idPrefix:"this-page",ariaLabel:m("This page")})}function it({activeId:e,onSelect:o}){return t("div",{className:"es-insp-tabs",children:t(ue,{variant:"underline",block:!0,labelsFit:!0,"aria-label":m("Styles"),idPrefix:k,value:e,onChange:o,items:R.map(n=>{const r=m(n.label);return{id:n.id,icon:n.icon,label:r}})})})}export{Ue as BlockGapRootField,Ve as CardLookFields,qe as PageGroupFields,Ze as PhotographyGroupFields,O as SITE_STYLES_BASICS_TAB,k as SITE_STYLES_ID_PREFIX,R as SITE_STYLES_TABS,Lt as SITE_STYLES_TEXT_TAB,et as ShareButtonRootField,Xe as SideSpaceRootField,it as SiteStylesTabStrip,ke as TABPANEL_CLASS,B as THIS_PAGE_GROUP_ID,Wt as WebsiteNameReadonly,ze as blockGapPatch,He as blockGapPhonePatch,Ke as cardShadowPatch,ot as default,$e as hoverEffectPatch,Je as photographyPatch,Me as shadowColourPatch,De as shareButtonPatch,Ye as siteGutterPatch,je as siteGutterPhonePatch,Le as siteWidthPatch,tt as useWebsiteName};
@@ -1774,35 +1774,23 @@
1774
1774
  above the box exists to act on that selection.
1775
1775
 
1776
1776
  SCOPED TO THE MODIFIER, NEVER TO .es-field-hint ITSELF. The shared caption
1777
- class also carries the anchor sentence, which is on every section and is the
1778
- only thing that says what the term of art "Anchor name" means. A rule written
1779
- one class wider would take that explanation off all of them at once. */
1780
- /* ── The section panel's own hints switch ───────────────────────────────────
1781
- [ADD] Section Panel Folds Its Hints, 2026-09-06. Owner asked for the same
1782
- control the Basics tab has had since card 66177 — a section's Style tab was
1783
- carrying two- and three-line explanations on rows a merchant has read once.
1784
-
1785
- ⚠️ IT FOLDS A ROW'S EXPLANATION, NEVER A STATE. Every quiet line is
1786
- `.es-field-hint` now, and two kinds must stay on screen: the "Anchor name"
1787
- sentence, the only place that term of art is explained, and the source note,
1788
- which tells a merchant why clicking a hydrated word gave them no caret. Both
1789
- are marked `.sf-hint-keep`, and the rule below leaves them alone. */
1790
- /* ⚠️ AND NEVER A HINT THAT HOLDS `.sf-hint-keep` ([MERGE] One Settings Row And
1791
- Hint In The Website Editor, 2026-10-06). The shop's own hint classes are
1792
- gone; every quiet line under a control is `SettingsField`'s `hint`. The few
1793
- that are a STATE rather than an explanation — loading, empty, why a control
1794
- is disabled — wrap their words in `components/KeepHint.tsx`, and a line under
1795
- no row wears `sf-hint-keep` itself; this rule leaves both on screen. `scripts/test-section-hints-fold.ts` holds both. */
1796
- .sf-panel--right.sf-hints-folded .es-field-hint:not(.sf-hint-keep):not(:has(.sf-hint-keep)) {
1797
- display: none;
1798
- }
1799
-
1777
+ class carries every row's hint; a rule one class wider would take them all
1778
+ off at once.
1779
+
1780
+ AND THE PANEL'S ONE HINTS SWITCH WINS (owner 2026-11-07). While an
1781
+ inspector's hints are folded (`.es-hints-folded`, efficient-easel/panel),
1782
+ this hint stays hidden on focus too: every hint folds, and only a line that
1783
+ says the setting does nothing now stays (`InertHint`). The fold itself is
1784
+ easel's one rule in `panel.css`, not a copy here. */
1800
1785
  .es-field-hint:has(.sf-hint-while-typing) {
1801
1786
  display: none;
1802
1787
  }
1803
1788
  .es-field:focus-within > .es-field-hint:has(.sf-hint-while-typing) {
1804
1789
  display: block;
1805
1790
  }
1791
+ .es-hints-folded .es-field:focus-within > .es-field-hint:has(.sf-hint-while-typing) {
1792
+ display: none;
1793
+ }
1806
1794
 
1807
1795
  /* ── Device-aware fields (lib/document/device-fields.tsx) ─────────────────────────
1808
1796
  The rule that collapses a row holding the device gate's marker
@@ -2218,14 +2206,6 @@
2218
2206
  height: 11px;
2219
2207
  }
2220
2208
 
2221
- /* The one control that folds the Basics tab's five explanations (card 66177).
2222
- It sits at the FOOT of the tab, under the last row's own separation, and it
2223
- is deliberately quiet: it is chrome about the panel, not one of the
2224
- merchant's settings, so it must not read as loudly as the rows above it. */
2225
- .sf-hints {
2226
- display: flex;
2227
- margin-top: var(--space-32);
2228
- }
2229
2209
  /* A heading INSIDE one control, below the row's own label: "Dark surfaces",
2230
2210
  "Light surfaces". Deliberately not `.sf-field-group`, which heads a group of
2231
2211
  settings -- these head a group of colours inside ONE setting. */
@@ -3060,6 +3040,27 @@ input.sf-list-marking {
3060
3040
  display: inline;
3061
3041
  vertical-align: baseline;
3062
3042
  }
3043
+ /* SourceStatus oneLine: the compact line on one line that gives way, and the
3044
+ map Find result's three states (a result, so the hints switch never folds
3045
+ it; owner 2026-11-07). */
3046
+ .sf-blogsource--line {
3047
+ min-width: 0;
3048
+ }
3049
+ .sf-blogsource--line .sf-blogsource-status {
3050
+ min-width: 0;
3051
+ white-space: nowrap;
3052
+ overflow: hidden;
3053
+ text-overflow: ellipsis;
3054
+ }
3055
+ .sf-blogsource--line .sf-blogsource-status[data-state="found"] {
3056
+ color: var(--status-success-soft-ink);
3057
+ }
3058
+ .sf-blogsource--line .sf-blogsource-status[data-state="busy"] {
3059
+ color: var(--ink-faint);
3060
+ }
3061
+ .sf-blogsource--line .sf-blogsource-status[data-state="notfound"] {
3062
+ color: var(--status-danger-soft-ink);
3063
+ }
3063
3064
  /* The "Open" control inside a source note — the route the sentence names.
3064
3065
  [ADD] Source Note Opens The Record, 2026-09-06.
3065
3066
 
@@ -3759,14 +3760,14 @@ input.sf-list-marking {
3759
3760
  UNDER A CONTROL is `SettingsField`'s own `hint`. A few lines sit under no
3760
3761
  row — the caption inside a linked-source card, a panel's opening sentence,
3761
3762
  the empty state of an open focus picker — and they wear the SAME class,
3762
- `<p class="es-field-hint sf-hint-keep">`: one hint line in the whole editor,
3763
+ `<p class="es-field-hint">`: one hint line in the whole editor,
3763
3764
  not a shop copy of its look. That replaces the shop's `.sf-field-hint` and
3764
3765
  `.sf-blogsource-hint`, which drew this idea twice, slightly differently.
3765
3766
 
3766
3767
  Not a NEW class, and not `.sf-note`: `test-editor-chrome-note` holds the
3767
3768
  chrome to ONE note style, and these are hints, at the hint's size.
3768
- `sf-hint-keep` on the element keeps the hints switch off them — none is a
3769
- row's explanation.
3769
+ They fold with the panel's one hints switch like every hint; a line that
3770
+ says the setting does nothing now is easel's `InertHint` instead.
3770
3771
 
3771
3772
  Inside a source card the card's own gap spaces it. */
3772
3773
  .sf-blogsource > .es-field-hint,
@@ -1 +1 @@
1
- import{jsx as i}from"react/jsx-runtime";import{phoneKey as t,tabletKey as r}from"efficient-easel/draw";import{BOX_CARD_PAD as u,BOX_SWATCH_PROP as co,isBackgroundBox as po}from"../../../../../../format/lib/content/box-background.js";import{CARD_ROW_FACTS as _o,cardRowField as So,cardRowFields as mo}from"../../../card-row-fields.js";import{darkenFields as Oo}from"../../../darken-fields.js";import{BOX_TAB_SHAPES as ho,REEL_SHAPE_LABELS as fo}from"../../../../../../format/lib/reel.js";import{LAYOUT_CELL as k,CARD_LIST_STYLE_PICTURES as Ro,TAB_SHAPE_PICTURES as Ao}from"../../../choice-pictures.js";import{CARD_STYLE_KEY as R,CARD_STYLE_POINTS as uo,applyCardStyle as Co,isCardStyle as wo}from"../../../../../../render/lib/sections/card-list-style.js";import{deviceField as d}from"efficient-easel/screen/lib/document/device-fields";import{ChevronDownIcon as Eo,ClockIcon as To,CropIcon as H,GapIcon as go,MediaLayoutStackedIcon as Do,LineBetweenIcon as No,LineSolidIcon as Lo,ShadowIcon as Io,StylesIcon as P,TableIcon as x,TargetIcon as bo,WrapIcon as Fo}from"efficient-easel/icons";import{boxBlockSpacingField as ko,boxFillField as Ho,boxColumnsFields as Po,boxShareField as xo,boxSharePhoneField as Wo,boxShareTabletField as Bo,containerDirectionField as yo,containerGapRows as Mo,linkField as Uo,plainText as Ko,swapPadding as W,toggle as S,upload as B,withPanelOnly as Xo}from"../../../controls.js";import{BOX_STACK_LINE as y,BOX_STACK_RANGE as w,STACK_BELOW_PROP as M}from"../../../../../../render/lib/content/box-stack-line.js";import{BOX_SHAPES as U,boxShapeOf as jo}from"../../../../../../format/lib/content/box-shape.js";import{shapeLines as K}from"../../../../../../format/lib/content/gallery-card-layout.js";import{shapePickerRow as X}from"../../../shape-picker.js";import{BOX_COLUMNS_MAX as E,BOX_COLUMNS_MIN as T,boxPhoneRowOneLine as Yo,boxWrapWordOf as vo}from"../../../../../../format/lib/content/box-layout.js";import{BOX_SEPARATOR_POINTS as j}from"../../../../../../format/lib/content/box-separator.js";import{BOX_WRAP_LABEL as Go,VIEW_KEY_ACCESS as s,group as m,phoneTwinFields as a}from"efficient-easel/screen/lib/document/box-fields";import{boxAlignField as Jo,boxJustifyField as Vo,boxWrapField as C,iconPickerRow as Y,placementField as zo,select as g,sidesPaddingFields as v,slider as qo}from"../../../box-fields.js";import{withRowRules as Qo}from"../../../../../../render/lib/document/show-when.js";import{separatorField as Zo}from"../../../separator-field.js";import{LOOP_SCROLLS as $o}from"../../../../../../format/lib/animation/index.js";import{DEFAULT_TICKER_JOIN as oe,TICKER_JOIN_OPTIONS as ee}from"../../../../../../format/lib/sections/ticker-join.js";import{NOT_HELD_BY_A_NODE as ne}from"../../../../../../format/lib/document/passes/document-position.js";import{accordionOnSet as te}from"../../../box-accordion-seed.js";import{FlexSlots as G}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";import{BOX_TYPE as re,CONTAINER_BLOCKS_SLOT as ie}from"../../../../../../format/lib/document/container-blocks.js";import{boxPhoneOrderField as ae}from"../../../box-phone-order-field.js";import{CARD_BOX_FACTS as le,ON_A_CARD as se,cardDisplayField as de}from"../../../card-display-chips.js";import{MIRROR_CARDS_FACTS as ce,MIRROR_CARDS_MIRRORS as pe,mirrorCardsField as _e}from"../../../mirror-cards-field.js";import{handedRowOf as J}from"../../../../../../format/lib/document/row-hand.js";import{SHOW_FOR_FACTS as Se,showForField as me,showForFields as Oe}from"../../../show-for-field.js";import{SHARED_COLUMNS_KEY as O,SHARED_COLUMNS_LABEL as V,SHARED_COLUMNS_OFF as z,sharedColumnsDrawn as q,sharedColumnsFits as Q,SHARED_COLUMNS_PHONE_POINTS as he,SHARED_COLUMNS_POINTS as fe,sharedRowsDrawn as Re}from"../../../../../../render/lib/content/box-shared-columns.js";const D={field:"bgImage",set:!0},Z={all:[{field:"phoneRow",in:[2,3]},{not:{field:"direction",is:"accordion"}}]},Ae={field:"direction",is:"tabs"},ue={field:"line",in:[!0,!1]},Ce={field:"anchor",set:!0},N=["fixed","screen"],we={not:{any:[{field:"sectionHeightMode",in:N},{field:"sectionHeightModeTablet",in:N},{field:"sectionHeightModePhone",in:N}]}},Ee={context:"parent.line",is:!0},c={not:{field:"direction",is:"accordion"}},$="notAccordionRow",Te={not:{context:$,is:!0}},ge={[$]:(o,e)=>e.parent?.props?.direction!=="accordion"},L={field:"direction",is:"row",default:"row"},p={not:$o},h={all:[L,p,{not:{field:"separator",in:j.map(o=>o.value)}},{not:{field:"line",is:!0}}]},oo={all:[h,...["columns",r("columns")].map(o=>({not:{field:o,in:Array.from({length:E},(e,n)=>n+T)}}))]},De={all:[p,{not:{all:[L,{field:"separator",in:j.map(o=>o.value)}]}}]},I={not:{all:[h,{field:"columns",in:Array.from({length:E},(o,e)=>e+T)}]}},Ne="sharedColumnsFits",eo="sharedColumnsMisfit",no="sharedColumnsDraws",to="sharedColumnsPhoneDraws",Le={[Ne]:o=>Q(o.props??{}),[eo]:o=>!Q(o.props??{}),[no]:o=>q(o.props??{}).desktop,[to]:o=>q(o.props??{}).phone};function ro(o){return{all:[{not:{context:eo,is:!0}},{any:[se,{field:o,set:!0}]}]}}const _={not:{context:no,is:!0}},f={not:{context:to,is:!0}},io="sharedRowsDraws",Ie={[io]:(o,e)=>Re(o.props??{})&&J(e.appState,o.props?.id)?.row===void 0},A={not:{context:io,is:!0}},be={any:[_,f]},b={not:D},Fe={not:{context:pe,is:!0}},ao="rowHanded",ke={not:{context:ao,is:!0}},He={[ao]:(o,e)=>{const n=J(e.appState,o.props?.id);return n===void 0?void 0:n?.row!==void 0}},lo={all:[c,b,_,f,Fe]},Pe={field:"direction",is:"row"},xe={field:"align",in:["start","center","end"]},We={all:[{field:"darken",set:!0},{not:{field:"darken",in:[0,"0"]}}]};function Be(){const{darken:o,darkenStyle:e}=Oo();return{...a("darken",o,s),...a("darkenStyle",e,s)}}const so={not:{all:[h,{field:r("columns"),in:Array.from({length:E},(o,e)=>e+T)}]}};function ye(){const o=S(Go,!1,i(Fo,{})),e=n=>{const l=vo(n);return l===void 0?void 0:l==="wrap"};return{...C(),render:n=>o.render({...n,value:e(n.value),follows:e(n.follows)??!1,onChange:l=>n.onChange(l===void 0?void 0:l?"wrap":"nowrap")})}}function Me(o){return{...o,render:e=>o.render({...e,value:Yo(e.value)?"nowrap":"wrap"})}}const Cn={fields:Qo({_gContent:m("Content"),rowTitle:G.rowTitle,content:G.content,_gCardDisplay:m("Display"),cardDisplay:de(),showFor:me(),_gLayout:m("Layout"),direction:yo("Flex"),tabShape:Y("Tab shape",i(P,{}),ho.map(o=>({label:fo[o],value:o,picture:Ao[o]})),"tabs",{columns:2,cell:k}),mirrorCards:_e(),[M]:d("desktop",qo("Stacks below",i(Do,{}),w.min,w.max,w.step,y,"px",{clear:{hint:y},hint:"Under this screen width the blocks stand one under another, with the Phone Gap and Padding."})),startsOpen:d("desktop",S("Starts open",!1,i(Eo,{}))),label:Xo(Ko("Tab name")),...Mo("Flex"),...a("justify",Vo(),s),...a("align",Jo(),s),...(()=>{const o=a("wrap",C(),void 0,{phoneRow:Me(C())}),e=a("wrap",C(),s,{phoneRow:ye()});return{wrap:o.wrap,[r("wrap")]:e[r("wrap")],[t("wrap")]:o[t("wrap")]}})(),[t("order")]:ae(),...a("boxShape",X("Box shape",i(H,{}),K(U),"shape","auto"),s,{phoneRow:X("Box shape",i(H,{}),K(U),"shape","auto",{phoneRest:o=>jo(o)})}),separator:Zo(i(No,{size:18}),"none"),[R]:d("desktop",Y("Card style",i(P,{}),uo.map(o=>({...o,picture:Ro[o.value]})),"table",{columns:2,cell:k})),share:d("desktop",xo()),[r("share")]:Bo(),[t("share")]:Wo(),[O]:d("desktop",g(V,i(x,{}),[...fe],z)),[t(O)]:d("mobile",g(V,i(x,{}),[...he],z)),...Po(),...a("blockSpacing",ko(),s),line:S("Line",!1,i(Lo,{}),"A line across the blocks, with a dot on each."),upcoming:S("Upcoming",!1,i(To,{}),"Still to come: a hollow dot, and the gold line stops before it."),join:g("Join",i(go,{}),ee,oe),_gShadow:m("Shadow"),...a("shadow",S("Shadow",!1,i(Io,{})),s),...a("fillColor",Ho(),s),[co]:So("Fill content","colour"),_gBackground:m("Background image"),bgImage:d("desktop",B("Image","image/*")),bgImagePhone:d("mobile",B("Image","image/*")),...Be(),placement:zo("Content position"),_gLink:m("Link"),link:Uo("Link to"),jumpHighlight:S("Highlight when a link jumps here",!1,i(bo,{}),"When a link lands on this Box's anchor, the Box gets a main color outline and its first block turns the main color.")},[[["darken","darkenStyle","placement"],D],[[t("share")],{all:[Z,f]}],[[O],ro(O)],[[t(O)],ro(t(O))],[[t("wrap")],{all:[Z,p,f,A]}],[[t("order")],{all:[h,f,_]}],[["phoneRow"],{all:[f,c]}],[["tabShape"],Ae],[["rowTitle","startsOpen"],Te],[["align","blockSpacing",r("blockSpacing"),t("blockSpacing")],c],[[r("justify"),t("justify")],{all:[p,lo,A]}],[[r("align"),t("align")],{all:[Pe,xe,lo]}],[[r("wrap")],{all:[p,I,so,_,c,A]}],[[r("shadow"),t("shadow")],b],[[r("darken"),t("darken"),r("darkenStyle"),t("darkenStyle")],{all:[D,We]}],[["separator"],L],[[R],{field:R,set:!0}],[["columns",r("columns")],h],[[M],{all:[h,b,so,{not:{all:[oo,{field:r("share"),set:!0}]}}]}],[[r("gap")],De],[["justify"],{all:[p,be,c,A]}],[["wrap"],{all:[p,I,_,c,A]}],[["share"],{all:[I,_,c]}],[[r("share")],{all:[oo,_]}],[["line"],ue],[["upcoming"],Ee],[["jumpHighlight"],Ce],[["boxShape",r("boxShape"),t("boxShape")],we],[["direction","share",t("order")],ke],[["join"],ne]]),resolveData:(o,e)=>{const n=o.props,l=n[R];return e.changed?.[R]===!0&&wo(l)?{...o,props:Co(n,l,re,ie)}:n.direction==="accordion"&&(e.trigger==="insert"||e.changed?.direction===!0)?{...o,props:te(n)}:o},resolveFields:(o,e)=>Oe(Ue(o,{...e,fields:mo(e.fields,o,e)}),o.props),showWhenFacts:{..._o,...le,...ce,...He,...Le,...Ie,...Se,...ge}};function Ue(...[o,{fields:e}]){{const n=o.props;if(po(n.bgImage)){const F=v({fallback:{top:u.desktop,bottom:u.desktop,left:u.side,right:u.side},tablet:!0});return W(e,F)}return o.props.padV2!==!0?W(e,v({fallback:{top:24,bottom:24},tablet:!0})):e}}export{Cn as FlexFields};
1
+ import{jsx as i}from"react/jsx-runtime";import{phoneKey as t,tabletKey as r}from"efficient-easel/draw";import{BOX_CARD_PAD as w,BOX_SWATCH_PROP as So,isBackgroundBox as mo}from"../../../../../../format/lib/content/box-background.js";import{CARD_ROW_FACTS as fo,cardRowField as ho,cardRowFields as Oo}from"../../../card-row-fields.js";import{darkenFields as uo}from"../../../darken-fields.js";import{BOX_TAB_SHAPES as Ro,REEL_SHAPE_LABELS as Ao}from"../../../../../../format/lib/reel.js";import{LAYOUT_CELL as k,CARD_LIST_STYLE_PICTURES as wo,TAB_SHAPE_PICTURES as Co}from"../../../choice-pictures.js";import{CARD_STYLE_KEY as R,CARD_STYLE_POINTS as Eo,applyCardStyle as To,isCardStyle as go}from"../../../../../../render/lib/sections/card-list-style.js";import{deviceField as d}from"efficient-easel/screen/lib/document/device-fields";import{ChevronDownIcon as Do,ClockIcon as No,CropIcon as H,GapIcon as Lo,MediaLayoutStackedIcon as bo,LineBetweenIcon as Io,LineSolidIcon as Fo,ShadowIcon as ko,StylesIcon as P,TableIcon as x,TargetIcon as Ho,WrapIcon as W}from"efficient-easel/icons";import{boxBlockSpacingField as Po,boxFillField as xo,boxColumnsFields as Wo,boxShareField as Bo,boxSharePhoneField as yo,boxShareTabletField as Mo,containerDirectionField as Uo,containerGapRows as Ko,linkField as Xo,plainText as jo,swapPadding as B,toggle as c,upload as y,withPanelOnly as Yo}from"../../../controls.js";import{BOX_STACK_LINE as M,BOX_STACK_RANGE as E,STACK_BELOW_PROP as U}from"../../../../../../render/lib/content/box-stack-line.js";import{BOX_SHAPES as K,boxShapeOf as vo}from"../../../../../../format/lib/content/box-shape.js";import{shapeLines as X}from"../../../../../../format/lib/content/gallery-card-layout.js";import{shapePickerRow as j}from"../../../shape-picker.js";import{BOX_COLUMNS_MAX as T,BOX_COLUMNS_MIN as g,boxPhoneRowOneLine as Go,boxWrapWordOf as Y}from"../../../../../../format/lib/content/box-layout.js";import{BOX_SEPARATOR_POINTS as v}from"../../../../../../format/lib/content/box-separator.js";import{BOX_WRAP_LABEL as G,VIEW_KEY_ACCESS as a,group as m,phoneTwinFields as s}from"efficient-easel/screen/lib/document/box-fields";import{boxAlignField as Vo,boxJustifyField as Jo,boxWrapField as C,iconPickerRow as V,placementField as zo,select as D,sidesPaddingFields as J,slider as qo}from"../../../box-fields.js";import{withRowRules as Qo}from"../../../../../../render/lib/document/show-when.js";import{separatorField as Zo}from"../../../separator-field.js";import{LOOP_SCROLLS as $o}from"../../../../../../format/lib/animation/index.js";import{DEFAULT_TICKER_JOIN as oe,TICKER_JOIN_OPTIONS as ee}from"../../../../../../format/lib/sections/ticker-join.js";import{NOT_HELD_BY_A_NODE as ne}from"../../../../../../format/lib/document/passes/document-position.js";import{accordionOnSet as te}from"../../../box-accordion-seed.js";import{FlexSlots as z}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";import{BOX_TYPE as re,CONTAINER_BLOCKS_SLOT as ie}from"../../../../../../format/lib/document/container-blocks.js";import{boxPhoneOrderField as le}from"../../../box-phone-order-field.js";import{CARD_BOX_FACTS as ae,ON_A_CARD as se,cardDisplayField as de}from"../../../card-display-chips.js";import{MIRROR_CARDS_FACTS as ce,MIRROR_CARDS_MIRRORS as pe,mirrorCardsField as _e}from"../../../mirror-cards-field.js";import{handedRowOf as q}from"../../../../../../format/lib/document/row-hand.js";import{SHOW_FOR_FACTS as Se,showForField as me,showForFields as fe}from"../../../show-for-field.js";import{SHARED_COLUMNS_KEY as f,SHARED_COLUMNS_LABEL as Q,SHARED_COLUMNS_OFF as Z,sharedColumnsDrawn as $,sharedColumnsFits as oo,SHARED_COLUMNS_PHONE_POINTS as he,SHARED_COLUMNS_POINTS as Oe,sharedRowsDrawn as ue}from"../../../../../../render/lib/content/box-shared-columns.js";const N={field:"bgImage",set:!0},eo={all:[{field:"phoneRow",in:[2,3]},{not:{field:"direction",is:"accordion"}}]},Re={field:"direction",is:"tabs"},Ae={field:"line",in:[!0,!1]},we={field:"anchor",set:!0},L=["fixed","screen"],Ce={not:{any:[{field:"sectionHeightMode",in:L},{field:"sectionHeightModeTablet",in:L},{field:"sectionHeightModePhone",in:L}]}},Ee={context:"parent.line",is:!0},p={not:{field:"direction",is:"accordion"}},no="notAccordionRow",Te={not:{context:no,is:!0}},ge={[no]:(o,e)=>e.parent?.props?.direction!=="accordion"},b={field:"direction",is:"row",default:"row"},_={not:$o},h={all:[b,_,{not:{field:"separator",in:v.map(o=>o.value)}},{not:{field:"line",is:!0}}]},to={all:[h,...["columns",r("columns")].map(o=>({not:{field:o,in:Array.from({length:T},(e,n)=>n+g)}}))]},De={all:[_,{not:{all:[b,{field:"separator",in:v.map(o=>o.value)}]}}]},I={not:{all:[h,{field:"columns",in:Array.from({length:T},(o,e)=>e+g)}]}},Ne="sharedColumnsFits",ro="sharedColumnsMisfit",io="sharedColumnsDraws",lo="sharedColumnsPhoneDraws",Le={[Ne]:o=>oo(o.props??{}),[ro]:o=>!oo(o.props??{}),[io]:o=>$(o.props??{}).desktop,[lo]:o=>$(o.props??{}).phone};function ao(o){return{all:[{not:{context:ro,is:!0}},{any:[se,{field:o,set:!0}]}]}}const S={not:{context:io,is:!0}},O={not:{context:lo,is:!0}},so="sharedRowsDraws",be={[so]:(o,e)=>ue(o.props??{})&&q(e.appState,o.props?.id)?.row===void 0},A={not:{context:so,is:!0}},Ie={any:[S,O]},F={not:N},Fe={not:{context:pe,is:!0}},co="rowHanded",ke={not:{context:co,is:!0}},He={[co]:(o,e)=>{const n=q(e.appState,o.props?.id);return n===void 0?void 0:n?.row!==void 0}},po={all:[p,F,S,O,Fe]},Pe={field:"direction",is:"row"},xe={field:"align",in:["start","center","end"]},We={all:[{field:"darken",set:!0},{not:{field:"darken",in:[0,"0"]}}]};function Be(){const{darken:o,darkenStyle:e}=uo();return{...s("darken",o,a),...s("darkenStyle",e,a)}}const _o={not:{all:[h,{field:r("columns"),in:Array.from({length:T},(o,e)=>e+g)}]}};function ye(){const o=c(G,!1,i(W,{})),e=n=>{const l=Y(n);return l===void 0?void 0:l==="wrap"};return{...C(),render:n=>o.render({...n,value:e(n.value),follows:e(n.follows)??!1,onChange:l=>n.onChange(l===void 0?void 0:l?"wrap":"nowrap")})}}function Me(){const o=c(G,!0,i(W,{})),e=n=>{const l=Y(n);return l===void 0?void 0:l==="wrap"};return{...C(),render:n=>{const l=n.followsView==="tablet";return o.render({...n,value:e(n.value),follows:!Go(void 0,l?n.follows:void 0),followsNoView:!l,onChange:u=>n.onChange(u===void 0?void 0:u?"wrap":"nowrap")})}}}const wn={fields:Qo({_gContent:m("Content"),rowTitle:z.rowTitle,content:z.content,_gCardDisplay:m("Display"),cardDisplay:de(),showFor:me(),_gLayout:m("Layout"),direction:Uo("Flex"),tabShape:V("Tab shape",i(P,{}),Ro.map(o=>({label:Ao[o],value:o,picture:Co[o]})),"tabs",{columns:2,cell:k}),mirrorCards:_e(),[U]:d("desktop",qo("Stacks below",i(bo,{}),E.min,E.max,E.step,M,"px",{clear:{hint:M},hint:"Under this screen width the blocks stand one under another, with the Phone Gap and Padding."})),startsOpen:d("desktop",c("Starts open",!1,i(Do,{}))),label:Yo(jo("Tab name")),...Ko("Flex"),...s("justify",Jo(),a),...s("align",Vo(),a),...(()=>{const o=s("wrap",C(),a,{phoneRow:Me()}),e=s("wrap",C(),a,{phoneRow:ye()});return{wrap:e.wrap,[r("wrap")]:e[r("wrap")],[t("wrap")]:o[t("wrap")]}})(),[t("order")]:le(),...s("boxShape",j("Box shape",i(H,{}),X(K),"shape","auto"),a,{phoneRow:j("Box shape",i(H,{}),X(K),"shape","auto",{phoneRest:o=>vo(o)})}),separator:Zo(i(Io,{size:18}),"none"),[R]:d("desktop",V("Card style",i(P,{}),Eo.map(o=>({...o,picture:wo[o.value]})),"table",{columns:2,cell:k})),share:d("desktop",Bo()),[r("share")]:Mo(),[t("share")]:yo(),[f]:d("desktop",D(Q,i(x,{}),[...Oe],Z)),[t(f)]:d("mobile",D(Q,i(x,{}),[...he],Z)),...Wo(),...s("blockSpacing",Po(),a),line:c("Line",!1,i(Fo,{}),"A line across the blocks, with a dot on each."),upcoming:c("Upcoming",!1,i(No,{}),"Still to come: a hollow dot, and the gold line stops before it."),join:D("Join",i(Lo,{}),ee,oe),_gShadow:m("Shadow"),...s("shadow",c("Shadow",!1,i(ko,{})),a),...s("fillColor",xo(),a),[So]:ho("Fill content","colour"),_gBackground:m("Background image"),bgImage:d("desktop",y("Image","image/*")),bgImagePhone:d("mobile",y("Image","image/*")),...Be(),placement:zo("Content position"),_gLink:m("Link"),link:Xo("Link to"),jumpHighlight:c("Highlight when a link jumps here",!1,i(Ho,{}),"When a link lands on this Box's anchor, the Box gets a main color outline and its first block turns the main color.")},[[["darken","darkenStyle","placement"],N],[[t("share")],{all:[eo,O]}],[[f],ao(f)],[[t(f)],ao(t(f))],[[t("wrap")],{all:[eo,_,O,A]}],[[t("order")],{all:[h,O,S]}],[["phoneRow"],{all:[O,p]}],[["tabShape"],Re],[["rowTitle","startsOpen"],Te],[["align","blockSpacing",r("blockSpacing"),t("blockSpacing")],p],[[r("justify"),t("justify")],{all:[_,po,A]}],[[r("align"),t("align")],{all:[Pe,xe,po]}],[[r("wrap")],{all:[_,I,_o,S,p,A]}],[[r("shadow"),t("shadow")],F],[[r("darken"),t("darken"),r("darkenStyle"),t("darkenStyle")],{all:[N,We]}],[["separator"],b],[[R],{field:R,set:!0}],[["columns",r("columns")],h],[[U],{all:[h,F,_o,{not:{all:[to,{field:r("share"),set:!0}]}}]}],[[r("gap")],De],[["justify"],{all:[_,Ie,p,A]}],[["wrap"],{all:[_,I,S,p,A]}],[["share"],{all:[I,S,p]}],[[r("share")],{all:[to,S]}],[["line"],Ae],[["upcoming"],Ee],[["jumpHighlight"],we],[["boxShape",r("boxShape"),t("boxShape")],Ce],[["direction","share",t("order")],ke],[["join"],ne]]),resolveData:(o,e)=>{const n=o.props,l=n[R];return e.changed?.[R]===!0&&go(l)?{...o,props:To(n,l,re,ie)}:n.direction==="accordion"&&(e.trigger==="insert"||e.changed?.direction===!0)?{...o,props:te(n)}:o},resolveFields:(o,e)=>fe(Ue(o,{...e,fields:Oo(e.fields,o,e)}),o.props),showWhenFacts:{...fo,...ae,...ce,...He,...Le,...be,...Se,...ge}};function Ue(...[o,{fields:e}]){{const n=o.props;if(mo(n.bgImage)){const u=J({fallback:{top:w.desktop,bottom:w.desktop,left:w.side,right:w.side},tablet:!0});return B(e,u)}return o.props.padV2!==!0?B(e,J({fallback:{top:24,bottom:24},tablet:!0})):e}}export{wn as FlexFields};
@@ -1 +1 @@
1
- "use client";import{jsx as l,jsxs as N,Fragment as k}from"react/jsx-runtime";import{cloneElement as Pe,createContext as Kt,useContext as $t,useEffect as Xt,useId as Be,useRef as V,useState as z}from"react";import{useEasel as ue,useSelectedHost as M}from"efficient-easel/easel";import{toDateKey as jt,fromDateKey as Vt}from"efficient-shell/format";import{say as i,editorEaselWords as w}from"../../../format/lib/editor-words.js";import{mediaValueSrc as ve}from"../../../format/lib/media-value.js";import{LOADING_SHOWS_LABELS as De,loadingShowsOf as zt}from"../../../format/lib/hero-video.js";import{readHidable as He,hidableText as Ge}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as de,LINK_FIELD_MARKER as Me,MEDIA_FIELD_MARKER as We,SCAFFOLD_FIELD_MARKER as Ue,TEXT_FIELD_MARKER as E,foldMetaOf as pe,textFieldIdentifier as Yt}from"efficient-easel/draw";import qt from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as Ke}from"../../../render/lib/document/show-when.js";import Jt from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as Zt,CORNER_RADIUS_MAX as $e,CORNER_RADIUS_MIN as W}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as Qt,IMAGE_CORNERS_LABEL as en}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as tn}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as nn,GALLERY_LAYOUTS as te,GALLERY_LAYOUT_KEYS as on,galleryChoices as Xe,galleryPictureCells as rn}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as ln}from"./shell-glyph.js";import{anchorSiblingsOf as sn,placementPoints as an}from"../../../format/lib/hero-group-placement.js";import cn,{KEEP_HINT_CLASS as un}from"../../components/KeepHint.js";import dn from"../../components/AnchorField.js";import{AdjustIcon as pn,EyeIcon as fn,AnimationIcon as hn,BackgroundIcon as mn,BorderAllIcon as gn,BlockSectionIcon as bn,ColumnWidthsIcon as fe,ColumnsIcon as je,CornerIcon as xn,DirectionDownIcon as Sn,DirectionLeftIcon as wn,DirectionRightIcon as yn,DirectionUpIcon as Cn,EditIcon as _n,GapIcon as Rn,GridIcon as On,GroundIcon as he,HashIcon as Ve,HeightIcon as En,ImageIcon as In,ListIcon as Tn,LocationIcon as ze,PaddingBottomIcon as Ye,PaddingLeftIcon as qe,PaddingRightIcon as Je,PaddingTopIcon as Ze,PageIcon as kn,StickyIcon as Fn,SearchIcon as An,SquareIcon as Ln,TypeIcon as Nn,WidthIcon as Pn}from"efficient-easel/icons";import{FieldGlyph as Qe}from"../../components/FieldGlyph.js";import{resolvePageBackground as Bn}from"../../../format/lib/content/page-background.js";import{boxFillOf as vn}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as et,CORNER_SIDE_POINTS as Dn,hasOwnSectionCorners as Hn,normalizeCornerSides as tt}from"../../../format/lib/content/section-corners.js";import{enclosingPath as Gn,enclosingSection as Mn}from"./enclosing-section.js";import{SettingsDefaultReset as y,SettingsDrill as Wn,SettingsField as x,SettingsGroup as Un,SettingsGroupSub as Kn,SettingsSegmented as $n,SettingsBorder as Xn,SettingsSidesEach as jn,SettingsSwitch as me,borderSides as Vn,borderStartEach as zn}from"efficient-easel/panel";import{ListField as Yn}from"efficient-easel/fields";import{DisplayChips as qn}from"efficient-shell/ui";import{desktopDisplayChanged as Jn,partShownOnDesktop as Zn,partShownOnPhone as Qn,phoneDisplayChanged as eo,withDesktopPart as to,withPhonePart as no}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as oo,Checkbox as ro,ColorSwatch as lo,CornersInput as io,DatePicker as so,DateTimePicker as ao,FOCAL_DEFAULT as co,IconPicker as nt,COLUMN_COUNT_MAX as ot,COLUMN_SHARE_MIN as uo,COLUMN_SHARES_EQUAL as po,resolveColumnShares as rt,WidthsBar as fo,useShellStrings as ho,IconButton as lt,InputNumber as it,Slider as mo,Tooltip as ne}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as go}from"./geocode-resolve.js";import{ColourRow as st,InheritedColourRow as ge}from"./ColourControl.js";import{keptByRow as bo}from"efficient-easel/screen/lib/document/style-fields";import at from"./MarkupToolbar.js";import{deviceField as R}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as xo,NoControlMark as So,noControlField as ct}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as wo}from"../../../format/lib/document/own-box.js";import{PHONE_CLEAR as yo,resolvePhoneValue as be}from"../../../format/lib/document/phone-override.js";import{phoneKey as F,tabletKey as U}from"efficient-easel/draw";import{SuppressibleText as Co}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as _o,CARD_OUTLINE_OPTIONS as Ro,DEFAULT_CARD_INDEX_FORMAT as Oo,DEFAULT_CARD_OUTLINE as Eo}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Io,DEFAULT_COVER_INDEX as To}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as ko}from"efficient-easel/draw";import Fo from"../../components/MediaUploadField.js";import Ao from"../../components/MultiSelectField.js";import Lo from"../../components/SectionThemePicker.js";import No from"../../components/SearchSelectField.js";import Po from"../../components/StorefrontLinkField.js";import{UiIcon as ut}from"efficient-easel/draw/client";import{SECTION_PADDING as I}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as Bo}from"../../../render/lib/content/button-look.js";import{usePreviewParts as vo}from"efficient-easel/draw/client";import{encodePartId as Do}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as Ho,useEaselStrings as Go}from"efficient-easel/strings";import{hasPhoneHeight as Mo,hasTabletHeight as xe,resolveSectionMinHeight as Wo,resolveTabletHeight as Uo}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as oe,SECTION_STICK_LABEL as Se,hasPhoneStick as Ko,hasTabletStick as $o,resolveSectionStick as dt}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as Xo,SECTION_MIN_HEIGHT_GROUP_LABEL as Y,SECTION_SCREEN_PCT as jo}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as Vo,resolveContainerDirection as pt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as zo,BOX_BLOCK_SPACING_POINTS as ft,BOX_PHONE_ROW_LABEL as ht,BOX_COLUMNS_MAX as Yo,BOX_COLUMNS_MIN as mt,BOX_PHONE_ROW_MAX as qo,BOX_PHONE_ROW_MIN as we,BOX_SHARE_CHOICES as gt,BOX_SHARE_LABEL as K,boxShareChoiceOf as bt,boxShareWidthsOf as ye,BOX_SHARE_PHONE_DEFAULT as Jo,BOX_SHARE_PHONE_POINTS as Zo}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as B}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Qo,borderBySide as xt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as er,normalizeTheme as St,normalizeThemeColors as tr,sectionBandTone as nr,surfaceTwoTone as or}from"../../../format/lib/theme.js";import{CONTAINER_GAP as wt,CONTAINER_GAP_BUILT_IN as rr,CONTAINER_GAP_PHONE as Ce,GAP_FIELD_CONTAINER as _e,followsSitePhoneGap as lr,hasOwnContainerGap as ir,hasOwnPhoneGap as Re,resolveContainerGap as yt,resolvePhoneContainerGap as Ct}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as sr,CARD_IMAGE_BG_OFF as ar,CARD_IMAGE_BG_SWATCH_NAMES as cr,CARD_IMAGE_BG_SWATCHES as ur,isCardImageBackgroundInheriting as dr,cardImageBackgroundChoice as pr,THEME_CARD_IMAGE_BG as fr}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as hr,SECTION_BG_NO_FILL as mr,sectionBackgroundChoice as gr,THEME_SECTION_BG as Oe,isSectionBackgroundEmpty as br,sectionBackgroundHex as _t}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as xr,nestedAccentValue as Rt,resolveSectionAccent as re}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Sr,TYPE_SIZE_INHERIT as wr,isTypeSizeInheriting as yr}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Cr,WIDTH_CHOICE_LABEL as _r,WIDTH_INHERIT as Rr}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as Or}from"./panel-heading-scope.js";import{useEaselSession as Er}from"efficient-easel/screen/lib/session-context";import{backendOf as Ir}from"../website-session.js";import{BOX_GAP as Tr,describedAs as T,group as O,iconOf as q,sharedStyleKinds as J}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as Ee,onDesktopWords as v,phoneTwinFields as le}from"efficient-easel/screen/lib/document/box-fields";import{directionField as kr,gapField as Ie,iconPickerRow as Fr,pickerCellIcon as Ar,pickerNoneIcon as Lr,Segmented as Te,segmented as Nr,select as Z,slider as $}from"./box-fields.js";function ws({children:e}){return l("div",{className:"sf-field-label",children:typeof e=="string"?i(e):e})}function D(e,t){return i("{value} from {from}",{value:e,from:t})}function Pr(){const{blockGap:e}=B();return e===null?i("this container's own spacing"):D(`${e}px`,i("Styles"))}function Br({inherited:e,onReset:t,label:n}){return l(y,{words:w()?.panel,label:i(n),changed:!e,detail:Pr(),onReset:t})}function vr(e){return Ie({...Tr,builtIn:rr[e],resolve:(t,n)=>yt(e,t,n?.siteGap),action:(t,n)=>l(Br,{inherited:!ir(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[_e]:e}})}function Dr(e){return Ke(R("mobile",{[_e]:e,type:"custom",render:t=>l(Mr,{container:e,...t})}),Ot)}function Hr(e){return Ke(R("tablet",{[_e]:e,type:"custom",render:t=>l(Gr,{container:e,...t})}),Ot)}const Ot={not:{field:"gap",in:Array.from({length:-wt.min},(e,t)=>wt.min+t)}};function ys(e){return{gap:R("desktop",vr(e)),[U("gap")]:Hr(e),[F("gap")]:Dr(e)}}function Gr({container:e,...t}){const[n]=A("gap"),{siteGap:o}=t.field??{},r=Math.max(Ce.min,yt(e,n,o));return Ie({...Ce,builtIn:r,resolve:a=>Re(a)?a:r,action:(a,c)=>l(y,{words:w()?.panel,label:i("Gap"),changed:Re(a),detail:v(u=>i(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function Mr({container:e,...t}){const[n]=A("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},s=Ct(e,void 0,n,o,r);return Ie({...Ce,builtIn:s,resolve:c=>Ct(e,c,n,o,r),action:(c,u)=>l(y,{words:w()?.panel,label:i("Gap"),changed:Re(c),detail:D(`${s}px`,lr(e,n,r)?i("Styles"):i("Desktop")),onReset:()=>u(void 0)})}).render(t)}function Cs(e){return kr({offered:Vo(e),fallback:pt(e,void 0),resolve:t=>pt(e,t)})}function _s(e,t){return an(t?sn(e,t):[],t)}function Wr({inherited:e,onReset:t,label:n}){return l(y,{words:w()?.panel,label:i(n),changed:!e,detail:D(i("Full"),i("the page")),onReset:t})}function H({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:s,hideable:a=!0,markup:c=!0}){const{text:u,hidden:f}=He(e),m=V(null),p=V(null),d=_=>t(a?{text:_,hidden:f}:_),g=()=>t({text:u,hidden:!f}),h=a&&f,C=Be(),S=r?jr(r)?l("span",{className:"sf-hint-keep sf-hint-while-typing",children:i(r)}):l(cn,{children:i(r)}):void 0,b=f?i("Show {label} on the slide",{label:i(n)}):i("Hide {label} on the slide",{label:i(n)});return l(x,{label:i(n),icon:l(Nn,{}),htmlFor:C,className:h?"is-hidden":void 0,hint:S,action:a?l(ne,{content:b,children:l(lt,{"aria-pressed":f,"aria-label":b,onClick:g,children:f?l(ut,{name:"eye-off",size:14}):l(ut,{name:"eye",size:14})})}):void 0,children:N("div",{className:"sf-copybox",children:[c&&l(at,{target:s?p:m,value:u,onChange:d}),s?l("textarea",{id:C,ref:p,value:u,placeholder:o===void 0?void 0:i(o),onChange:_=>d(_.target.value)}):l("input",{id:C,ref:m,type:"text",value:u,placeholder:o===void 0?void 0:i(o),onChange:_=>d(_.target.value)})]})})}function Rs(e,t){return{...e,[Ue]:t}}function Os(e){const t=e[E];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[E]:{...t,offPage:!0}}}function Es(e){return!e||typeof e!="object"?!1:e[E]?.offPage===!0}const Et="sfPanelOnly";function Is(e){if(!e[E])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Et]:!0}}function Ts(e){return!!e&&typeof e=="object"&&e[Et]===!0}function ks(e){const t=e[E];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[E]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as Ua,SCALAR_TEXT_CONTROLS as Ka}from"efficient-easel/draw";function Fs(e,t){if(!e[E])throw new Error("inOwnBox: the field holds no authored text");const{[xo]:o,...r}=e;return{...r,[wo]:!0,render:t}}const Ur=new Set(ko),Q={type:"radio",options:[{value:!0},{value:!1}]},It={text:{type:"object",objectFields:{text:{type:"text"},hidden:Q}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:Q}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},G=(e,t)=>{const n=T({...t,[E]:e},{...It[e.control],label:e.label});if(!Ur.has(e.control))return n;const o=t.render;return{...ct(n,"authored-copy"),render:r=>l(Co,{name:r.name,children:o(r)})}},As="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Kr={field:"source.slug",set:!0},Ls={not:Kr},$r="Select a word, then press the highlighter.",Xr=new Set([$r]),jr=e=>Xr.has(e);function Ns(e,t,n){return G({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>l(H,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function Ps(e,t,n){return G({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>l(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function Bs(e,t,n){return G({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>l(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function vs(e,t,n){return G({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>l(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function Ds(e){return{type:"custom",[Me]:{label:e},...T({},{type:"text",label:e}),render:({value:t,onChange:n})=>l(Po,{value:Ge(t),onChange:n,label:e})}}function Hs(e,t,n){return G({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>l(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const Gs={Design:pn,Animation:hn};function Ms(e){return{type:"custom",render:()=>l(Vr,{text:e})}}function Vr({text:e}){return l("p",{className:"sf-note",children:i(e)})}function Ws(e){return pe(e)!==null&&e?.tabs!==void 0}const Tt=new Map;function Us(e,t){const n=`${e}\0${t?t.join(""):""}`,o=Tt.get(n)??{type:"custom",tabs:t,[de]:{label:e,level:1},bucket:e,marker:!0,render:()=>l(k,{})};return Tt.set(n,o),o}const kt=new Map;function Ks(e){const t=kt.get(e)??{type:"custom",[de]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>l(k,{})};return kt.set(e,t),t}function zr(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function $s(e,t){return zr(e)===t?e:{...e,marker:!0,fold:t,render:()=>l(k,{})}}function Xs(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>l(k,{})}}function js({title:e,children:t}){const[n,o]=z(()=>!ke.has(e));return l(Un,{title:e,open:n,onToggle:r=>{o(r),r?ke.delete(e):ke.add(e)},children:t})}const ke=new Set;function Vs({label:e}){return l(Kn,{title:i(e),level:Or(2)})}function Yr({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),s=r?o?.[r]:void 0,a=s?i(s):t;return N("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?i(o[c]):c;return l(ne,{content:u,children:l(lo,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),l("span",{className:"sf-swatch-hex",children:a})]})}function zs(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>l(qr,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function qr({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const s=typeof o=="string"?o:void 0,{colors:a,n:c}=Ut(),u={background:a.background,surface:a.surface,surface2:or(a),band:nr(a)},f=n?Oe:t,m=br(s,t,f),p=_t(void 0,f,u),d=n?hr:void 0,g=gr(s,t),h=f===Oe?i("the theme's section background"):i("Theme {n} background",{n:c});return l(ge,{label:i(e),icon:l(mn,{}),value:m?"":_t(s,t,u),inherited:p,resetTo:D(p.toUpperCase(),h),onChange:r,onReset:()=>r(d),choices:[{label:i("No fill"),color:"",selected:g==="none",onPick:()=>r(mr)},{label:`${i("Section band")} · ${u.band.toUpperCase()}`,color:u.band,selected:g==="band",onPick:()=>r(Oe)}]})}function Jr(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,s=dr(r,t);return l(x,{label:i(e),icon:l(he,{}),changed:!s,action:l(y,{words:w()?.panel,label:i(e),changed:!s,detail:i("the theme's image stage"),onReset:()=>o(sr)}),children:Yr({swatches:ur,current:s?fr:pr(r,t),onPick:o,names:cr})})}}}function Ys(e=n=>n,t){return J({_gSectionTheme:O(xr),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>l(Lo,{value:e(n),onChange:o,followLabel:t})}})}function ee({min:e,max:t,step:n,value:o,onChange:r,suffix:s="",readout:a=!0,notch:c,ariaLabel:u,disabled:f=!1,placeholder:m,placeholderWord:p,onClear:d}){const g=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return l("div",{className:g?"sf-slider has-notch":"sf-slider",style:g?{"--sf-notch":(c-e)/(t-e)}:void 0,children:l(mo,{min:e,max:t,step:n,value:o,...o===null&&m!==void 0?{placeholderValue:m}:{},...p?{emptyLabel:i(p)}:{},suffix:s||void 0,showInput:a,label:u===void 0?void 0:i(u),disabled:f,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:h=>{h===null?d?.():h!==o&&r(h)}})})}function Ft(e,t){const{min:n,max:o,step:r=1,unsetLabel:s,hint:a,restTrack:c,unsetMark:u,icon:f,unit:m="px"}=t;return{type:"custom",render:({value:p,onChange:d})=>{const g=typeof p=="number"?p:null,h=g===null;return l(x,{label:i(e),icon:f?q(f):void 0,value:h?u||s===void 0?void 0:i(s):`${g}${m}`,changed:!h,action:u?Pe(u,{changed:!h,onReset:()=>d(null)}):l(y,{words:w()?.panel,label:i(e),changed:!h,onReset:()=>d(null)}),hint:typeof a=="string"?i(a):a,children:c?c({min:n,max:o,step:r,px:g,label:e,onChange:d}):ee({min:n,max:o,step:r,value:g??n,readout:!1,ariaLabel:e,onChange:d})})}}}const ie="Corners";function Fe(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,r=o!==null;return l(x,{label:i(ie),icon:l(xn,{}),changed:r,action:Pe(e.mark,{changed:r,onReset:()=>n(null)}),hint:e.hint,children:l(Qr,{tier:e,px:o,onRadius:n})})}}}function A(e){const t=M();return[t?.values?.[e],n=>t?.onChange(e,n)]}function At(){return ct({type:"custom",render:()=>l(So,{})},"always")}function Zr(){const e=M();return t=>e?.onChangeMany(t)}function Qr({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),[r,s]=A(e.sidesKey),a=tt(r)??[...et];return l(io,{label:i(ie),value:a,corners:Dn,onChange:c=>{const u=tt(c)??[];s(u.length===et.length?null:u)},radius:t,onRadiusChange:n,radiusMin:W,radiusMax:$e,radiusStep:e.step??1,radiusPlaceholder:String(o)})}function Lt(){return At()}function el({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=B(),r=typeof o=="number"?`${o}px`:i("not set");return l(y,{words:w()?.panel,label:i(e),changed:t,detail:o==null?i("the built-in corners"):D(r,i("Styles")),onReset:n})}function tl(){const{cornerRadiusPx:e}=B();return typeof e=="number"?e:W}function nl(){return Fe({sidesKey:"sectionCornerSides",useFollowed:tl,mark:l(el,{label:ie}),hint:ol})}const ol="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function qs(){return J({_gShape:O("Shape"),sectionCorners:nl(),sectionCornerSides:Lt(),...X("sectionBorder",Nt)})}const rl=()=>({width:i("Border width"),sides:{top:i("Border top"),right:i("Border right"),bottom:i("Border bottom"),left:i("Border left")},style:i("Border style"),styles:{solid:i("Solid"),dashed:i("Dashed"),dotted:i("Dotted")},color:i("Border color"),unit:"px"});function ll(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function il(){let e;try{const t=St(B().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||er.line}function sl({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:s=!0,above:a={}}){const c=e&&typeof e=="object"?e:{},[u,f]=z(()=>r?zn(c,a):!1),m=rl(),p=d=>ll(r&&s?d:{width:d.width,color:d.color,...s?{style:d.style}:{}});return l(x,{label:i("Border"),icon:l(gn,{}),action:r?l(jn,{each:u,label:i("Each side"),onChange:f}):void 0,children:l(Xn,{label:i("Border"),value:c,each:u,onChange:d=>t(p(d)),placeholder:n,presets:o,words:m,styles:s,max:Qo})})}function al({value:e,onChange:t,view:n}){const[o]=A("sectionBorder"),[r]=A(U("sectionBorder")),s=il(),a=u=>u&&typeof u=="object"?u:{},c=n==="phone"?{...xt(a(o)),...xt(a(r))}:n==="tablet"?a(o):{};return l(sl,{value:e,onChange:t,placeholder:{sides:Vn(c),style:c.style??"solid",color:c.color||s},presets:[s],above:c})}function Js(e){return R(e,Nt(e==="mobile"?"phone":e))}function Nt(e){return{type:"custom",render:({value:t,onChange:n})=>l(al,{value:t,onChange:n,view:e})}}function X(e,t){const n=(o,r)=>le(e,t(o),Ee)[r];return{[e]:n("desktop",e),[U(e)]:n("tablet",U(e)),[F(e)]:n("phone",F(e))}}function Zs(e){return{type:"custom",render:()=>l(cl,{partKey:e})}}function cl({partKey:e}){const[t]=A("id"),[n]=A("_partStyles"),{textStyles:o}=B(),r=Go();let s=null;try{s=vo().select}catch{s=null}const a=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return l(Wn,{name:i("Text"),preview:Bo(a,c,{noStyle:i("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??Ho.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(Do(t,e))}})}function Pt(e){const{cornerRadiusPx:t}=B(),n=typeof t=="number"?t:e;let o=null;try{const{appState:s,selectedItem:a}=ue(u=>u),c=a?.props?.id?String(a.props.id):void 0;o=c?Mn(s?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Hn(r)?r:n}function ul({label:e,changed:t=!1,onReset:n=()=>{}}){const o=Pt(W);return l(y,{words:w()?.panel,label:i(e),changed:t,detail:D(`${o}px`,i("the section")),onReset:n})}function dl(){return l(k,{children:i("Follows the section's Corners until you set a number here.")})}function pl(){return Fe({sidesKey:"cardCornerSides",useFollowed:()=>Pt(W),mark:l(ul,{label:ie}),hint:l(dl,{})})}function fl(){return{type:"custom",render:()=>l(qt,{})}}function Qs(e){return{...e,render:t=>l(Jt,{render:e.render,props:t})}}function ea(){return{_gShape:O("Shape"),cardCorners:pl(),cardCornerSides:Lt(),cardCornersApplyAll:fl()}}function hl(){return T({type:"custom",render:e=>l(gl,{...e})},{type:"select",label:K,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 ml(e,t){const n=bt(e);if(n!=="custom")return i(gt.find(r=>r.value===n)?.label??"");const o=rt(ye(e,t),t);return o?[...o,100-o.reduce((r,s)=>r+s,0)].join(" / "):i("Custom")}function gl(e){const{value:t,onChange:n}=e,[o]=A("content"),r=Array.isArray(o)?o.length:0,s="follows"in e,a=t!=null,c=a?t:s?e.follows:void 0,u=bt(c),f=r>=2&&r<=ot,m=()=>[...po[r]??[]],p=V(null),d=b=>{const _=p.current;_&&JSON.stringify(b)===JSON.stringify(_.shares)?n(_.value):b&&n(b)},g=b=>{b===u||b==="custom"&&!f||n(b==="custom"?m():b)},h=i("The width bar works for 2 to {count} blocks.",{count:ot}),C=a&&(s||t!=="content"),S=ho().widths.hint(r,uo);return l(x,{label:i(K),icon:l(fe,{}),changed:C,hint:u!=="custom"?void 0:f?S:h,action:l(y,{words:w()?.panel,label:i(K),changed:C,disabled:e.readOnly===!0,detail:s?v(b=>i(b),ml(e.follows,r),e.followsView):i("Fit content"),onReset:()=>n(void 0)}),children:N("div",{className:"sf-share-row",children:[l("div",{className:"sf-share-pick",children:l(nt,{label:i(K),value:u,options:gt.map(b=>({value:b.value,label:b.value==="custom"&&!f?h:i(b.label),icon:Ar(l("span",{className:"sf-gallery-pic sf-share-pic",children:Bt(b.weights).map((_,j)=>l("i",{style:{gridColumn:`span ${_}`}},j))}),i(b.label),b.value==="custom"&&!f?h:i(b.label))})),onChange:g,columns:3,cell:vt,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&f?l("div",{onFocus:()=>{p.current={value:t,shares:rt(ye(c,r),r)}},onBlur:()=>{p.current=null},children:l(fo,{label:i(K),count:r,value:ye(c,r),onChange:d,readOnly:e.readOnly===!0})}):null]})})}function Bt(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 ta(){return Z(zo,l(Rn,{}),ft,ft[0].value)}function na(){return R("mobile",Fr(K,l(fe,{}),Zo.map(e=>({label:e.label,value:e.value,picture:l("span",{className:"sf-gallery-pic sf-share-pic",children:Bt(e.weights).map((t,n)=>l("i",{style:{gridColumn:`span ${t}`}},n))})})),Jo,{columns:2,cell:vt}))}const vt={width:"5.75rem",height:"3.25rem"};function oa(){return le("share",hl(),Ee)[U("share")]}function bl(){return R("mobile",$(ht,l(je,{}),we,qo,1,we,"",{clear:{phoneFollows:!1,hint:we}}))}const Dt={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function ra(){const e=$(ht,l(je,{}),mt,Yo,1,mt,"",{clear:{emptyLabel:"Auto"}}),t=le("columns",e,{...Dt,tablet:Ee.tablet}),n=le("columns",e,Dt,{phoneRow:bl()});return{...t,phoneRow:n.phoneRow}}function la(e,t,n,o,r,s){return{type:"custom",render:({value:a,onChange:c})=>l(x,{label:i(e),icon:l(Qe,{noun:s}),action:l(y,{words:w()?.panel,label:i(e),changed:!yr(a),detail:i("the Text style in Styles"),onReset:()=>c(wr),defaultAction:{onPress:()=>c(Sr),title:i("Keep this section's own built-in size"),icon:l(bn,{})}}),children:ee({min:t,max:n,step:o,value:typeof a=="number"?a:r,suffix:"px",ariaLabel:e,onChange:c})})}}function ia(){return{_gCellWidth:O("Cell width"),gridSpan:Z("Positions",l(fe,{}),[{label:"Auto",value:""},...Array.from({length:tn},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function L(){let e=null,t=null;try{e=$t(xl),t=ue(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const xl=Kt(null);function Sl({min:e,max:t,step:n,px:o,label:r,onChange:s,desktopKey:a,fallback:c}){const u=L()[a],f=be(void 0,u,c);return l(k,{children:ee({min:e,max:t,step:n,value:be(o,u,c),readout:!1,ariaLabel:r,notch:f,onChange:s})})}function wl({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:s=()=>{}}){const a=L()[t],c=be(void 0,a,n);return l(y,{words:w()?.panel,label:i(e),changed:r,detail:v(u=>i(u),`${c}${o}`),onReset:s})}function yl(e){return Ft(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:l(wl,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>l(Sl,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Cl={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},_l={Top:Ze,Bottom:Ye,Left:qe,Right:Je},Rl=e=>{const t=_l[e];return l(t,{})};function sa(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=S=>Cl[S],s=S=>$(r("Top"),l(Ze,{}),I.min,I.max,I.step,S,"px"),a=(S,b,_,j=I)=>R("mobile",yl({label:r(S),icon:Rl(S),desktopKey:b,min:j.min,max:j.max,step:j.step,fallback:_})),c=e.top??I.min,u=e.bottom??I.min,f="sectionPaddingLeft",m="sectionPaddingRight",p=e.sideBounds??I,d=e.side??p.min,g=e.sidePhone??d,h=e.phone===!0,C=S=>h?R("desktop",S):S;return J({...o?{_gSpacing:O("Padding")}:{},[t]:C(s(c)),...h?{[F(t)]:a("Top",t,c)}:{},...e.only==="top"?{}:{[n]:C($(r("Bottom"),l(Ye,{}),I.min,I.max,I.step,u,"px")),...h?{[F(n)]:a("Bottom",n,u)}:{}},...e.sides?{[f]:C($(r("Left"),l(qe,{}),p.min,p.max,p.step,d,"px")),...h?{[F(f)]:a("Left",f,g,p)}:{},[m]:C($(r("Right"),l(Je,{}),p.min,p.max,p.step,d,"px")),...h?{[F(m)]:a("Right",m,g,p)}:{}}:{}})}function aa(e,t){const n=Object.fromEntries(Object.entries(t).map(([s,a])=>[s,s in e&&pe(a)?e[s]:a])),o={};let r=!1;for(const[s,a]of Object.entries(e)){if(s in t){r||Object.assign(o,n),r=!0;continue}o[s]=a}return r||Object.assign(o,n),o}const se="Width";function ca(e,t=Cr,n=!0){const o=t.map(r=>({label:_r[r],value:r}));return J({...n?{_gWidth:O(se)}:{},widthMode:{type:"custom",render:({onChange:r,field:s})=>l(x,{label:i(se),icon:l(Pn,{}),action:n?l(Wr,{inherited:s?.inherited??!1,onReset:()=>r(Rr),label:se}):void 0,children:Te({options:o,value:s?.currentValue||e,onChange:r,ariaLabel:se})})}})}function ua(){const e=(o,r)=>({type:"custom",render:({value:s,onChange:a})=>l(Ol,{value:s,onChange:a,view:o,badge:r})}),t=o=>({type:"custom",render:({value:r,onChange:s,field:a})=>l(Il,{value:r,onChange:s,unit:a?.unit,view:o})}),n=o=>{const r=Nr("Unit",l(Ve,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");if(o==="desktop")return r;const s=r.render;return{...r,render:a=>l(Tl,{props:a,draw:s,view:o})}};return J({_gHeight:O(Y),...X("sectionHeightMode",o=>o==="desktop"?e(o):e(o,r=>l(kl,{view:o,onClear:()=>r(void 0)}))),...X("sectionHeightValue",t),...X("sectionHeightUnit",n)})}function Ol({value:e,onChange:t,view:n,badge:o}){const r=L(),s=c=>["auto","fixed","screen"].includes(c),a=ae(n,r)?.mode??"auto";return l(x,{label:Y,icon:q(l(En,{})),action:o?o(t):void 0,children:Te({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:s(e)?e:a,onChange:t,ariaLabel:Y})})}function Ht(e,t){return e==="phone"&&xe(t)?Uo(t):Wo(t)}function ae(e,t){return e==="desktop"||(e==="tablet"?xe(t):Mo(t))?null:Ht(e,t)}const P=(e,t)=>e==="tablet"?U(t):F(t);function El(e,t,n,o){const r=ae(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[P(e,"sectionHeightMode")]:r.mode,...r.mode==="fixed"?{[P(e,"sectionHeightUnit")]:r.unit}:{},...n==="sectionHeightUnit"?{[P(e,"sectionHeightValue")]:r.value}:{},[P(e,n)]:o}}function Gt(e,t,n){const o=M(),r=ae(e,L());return!o||!r?{followed:null,write:n}:{followed:r,write:a=>o.onChangeMany(c=>{const u=El(e,c,t,a);return u===null?{[e==="desktop"?t:P(e,t)]:a}:Object.keys(u).length?u:null})}}function Il({value:e,onChange:t,unit:n,view:o}){const{followed:r,write:s}=Gt(o,"sectionHeightValue",t),a=(r?r.unit:n)==="%"?"%":"px",c=a==="%"?jo:Xo;return l("div",{className:"sf-field",children:ee({min:c.min,max:c.max,step:c.step,value:r?null:typeof e=="number"?e:c.fallback,...r?{placeholder:r.value}:{},suffix:a,ariaLabel:Y,onChange:s})})}function Tl({props:e,draw:t,view:n}){const{followed:o,write:r}=Gt(n,"sectionHeightUnit",e.onChange);return t({...e,...o?{value:void 0,storedValue:void 0,follows:o.unit}:{},onChange:r})}function kl({view:e,onClear:t}){const n=L(),o=ae(e,n)===null,r=e==="phone"&&xe(n),s=Ht(e,n),a=v(c=>i(c),s.mode==="auto"?i("Auto"):`${s.value}${s.unit}`,r?"tablet":"desktop");return l(y,{words:w()?.panel,label:i(Y),changed:o,detail:a,onReset:t})}function da(){const e=n=>({type:"custom",render:({value:o,onChange:r,id:s,name:a})=>l(Ll,{value:o,onChange:r,labelId:`${s??a??"stickTop"}-label`,view:n})}),t=n=>({type:"custom",render:({value:o,onChange:r})=>l(Fl,{value:o,onChange:r,view:n})});return{_gStick:O(Se),...X("stickTop",e),...X("stickTopDistance",t)}}function Fl({value:e,onChange:t,view:n}){const o=M(),r=L(),s=n==="desktop"||Ae(n,r)?null:Mt(n,dt(r)),a=s&&o?c=>o.onChangeMany(u=>{const f=Al(n,u,c);return f===null?{[P(n,"stickTopDistance")]:c}:Object.keys(f).length?f:null}):t;return l("div",{className:"sf-field",children:ee({min:oe.min,max:oe.max,step:oe.step,value:s?null:typeof e=="number"?e:oe.fallback,...s?{placeholder:s.distance}:{},suffix:"px",ariaLabel:i("Distance from top"),onChange:a})})}function Ae(e,t){return e==="tablet"?$o(t):Ko(t)}function Mt(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance}:{on:t.desktop,distance:t.desktopDistance}}function Al(e,t,n){return e==="desktop"||Ae(e,t)?null:n===void 0?{}:{[P(e,"stickTop")]:!0,[P(e,"stickTopDistance")]:n}}function Ll({value:e,onChange:t,labelId:n,view:o}){const r=L(),s=dt(r),a=o==="phone"?s.phone:o==="tablet"?s.tablet:e===!0,c=o==="phone"&&s.ownTablet,u=o==="desktop"?null:Mt(o,s),f=u?.on?`${u.distance}px`:i("Off");return l(x,{label:i(Se),labelId:n,icon:q(l(Fn,{})),action:N(k,{children:[o!=="desktop"?l(y,{words:w()?.panel,label:i(Se),changed:Ae(o,r),detail:v(m=>i(m),f,c?"tablet":"desktop"),onReset:()=>t(void 0)}):null,l(me,{checked:a,onChange:t,ariaLabelledBy:n})]})})}const Wt="e.g. about";function pa(){return{_gAnchor:O("Anchor"),anchor:G({control:"plainText",label:"Name",placeholder:Wt},{type:"custom",render:({value:e,onChange:t})=>l(dn,{value:e,onChange:t,nameBox:(n,o)=>l(H,{value:n,onChange:o,label:"Name",placeholder:Wt,hideable:!1,markup:!1})})})}}function fa(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:a})=>{const c=`${s??a??e}-datetime`,u=Date.parse(typeof o=="string"?o:"");return l(x,{label:i(e),icon:t,htmlFor:c,hint:n===void 0?void 0:i(n),children:l(ao,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:f=>r(f?f.toISOString():"")})})}}}function ha(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:a})=>{const c=`${s??a??e}-date`;return l(x,{label:i(e),icon:t,htmlFor:c,hint:n===void 0?void 0:i(n),children:l(so,{id:c,value:Vt(typeof o=="string"?o:null),onChange:u=>r(u?jt(u):"")})})}}}function Nl(e,t,n,o){return{type:"custom",...T({},{...Q,label:e}),render:r=>{const{value:s,onChange:a,id:c,name:u}=r,f="follows"in r,m=r,p=typeof s=="boolean",d=typeof m.follows=="boolean"?m.follows:t,g=p?s:f?d:t,h=`${c??u??e}-label`,C=m.readOnly===!0,S=l(me,{checked:g,onChange:a,disabled:C,ariaLabelledBy:h});return l(x,{label:i(e),labelId:h,icon:n,hint:o===void 0?void 0:i(o),action:f?N(k,{children:[l(y,{words:w()?.panel,label:i(e),changed:p,detail:v(b=>i(b),i(d?"On":"Off"),m.followsView),disabled:C,onReset:()=>a(void 0)}),S]}):S})}}}function ma(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return l(st,{label:i("Background"),icon:l(kn,{}),id:r,value:Bn(e),onChange:t})}}}function ga(e,t){return{type:"custom",...T({},{...Q,label:e}),render:({value:n,onChange:o,id:r})=>{const s=typeof n=="boolean"?n:t,a=`${r??e}-checkbox`;return l(x,{label:i(e),htmlFor:a,className:"sf-checkbox",action:l(ro,{id:a,checked:s,onChange:o})})}}}function ba(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>l(st,{label:i(e),icon:n,value:o||t,onChange:r})}}function xa(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return l(Pl,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function Pl({value:e,onChange:t,twin:n}){const{hex:o,n:r}=vl(),s=D(o.toUpperCase(),i("Theme {n} background",{n:r}));if(n){const a=vn(n.follows);return l(ge,{label:i("Fill"),icon:l(he,{}),value:e,inherited:a??o,resetTo:v(c=>i(c),a?a.toUpperCase():s,n.view),onChange:t,onReset:()=>t(void 0)})}return l(ge,{label:i("Fill"),icon:l(he,{}),value:e,inherited:o,resetTo:s,onChange:t,onReset:()=>t("")})}function Bl(e,t,n){if((e?.content??[]).some(a=>a?.props?.id===t))return re(n);const r=Gn(e,t);if(r.length===0)return null;const s=re(Rt(n));if(s!==null)return s;for(let a=r.length-1;a>0;a-=1){const c=re(Rt(r[a].sectionAccent));if(c!==null)return c}return re(r[0].sectionAccent)}function vl(){const{colors:e,n:t}=Ut();return{hex:e.background,n:t}}function Ut(){const e=St(B().theme),[t]=A("sectionAccent");let n=null;try{const{appState:r,selectedItem:s}=ue(c=>c),a=s?.props?.id?String(s.props.id):void 0;n=a?Bl(r?.data,a,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:tr(e.themes[o]),n:o+1}}const Dl=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function Hl({label:e,value:t,onChange:n,points:o=Dl}){const r=o.map(s=>({...s,label:i(s.label),...s.title?{title:i(s.title)}:null}));return l(oo,{label:i(e),value:t,points:r,onChange:n})}function Sa(){return At()}const wa={top:l(Cn,{}),right:l(yn,{}),bottom:l(Sn,{}),left:l(wn,{})};function ya(e,t,n,o,r,s,a){const c=p=>t.find(d=>d.value===p),u=p=>({value:p,label:"",disabled:!0,title:o}),f=p=>{const d=t.find(h=>h.cell===p);if(!d)return u(`missing-${p}`);const g=s?.[p];return g?{value:d.value,label:d.label,icon:g}:{value:d.value,label:d.label}},m=[u("corner-top-left"),f("top"),u("corner-top-right"),f("left"),u("centre"),f("right"),u("corner-bottom-left"),f("bottom"),u("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:d})=>{const g=t.some(h=>h.value===p)?p:n;return l(x,{label:i(e),icon:r,value:c(g)?.label?i(c(g).label):a?i(a):"",children:Hl({label:e,value:g,onChange:d,points:m})})}}}function Ca(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:s})=>l(Ao,{label:e,options:(s.options??t).map(a=>({...a,label:i(a.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:i(n)}:{}})}}function _a(e,t,n,o){return{type:"custom",options:t,fallback:n,...T({},{type:"select",label:e}),render:({value:r,onChange:s,field:a})=>l(No,{label:e,options:(a.options??t).map(c=>({...c,label:i(c.label)})),fallback:a.fallback??n,value:r,onChange:s,placeholder:o===void 0?void 0:i(o)})}}function Ra(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return l(e,{...r})}}}const Oa=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function Ea(e,t,n){const o=Object.keys(De).map(r=>({label:De[r],value:r,picture:n[r]}));return{type:"custom",...T({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>l(Gl,{label:e,icon:t,options:o,onChange:r})}}function Gl({label:e,icon:t,options:n,onChange:o}){const r=M()?.values??{},s=zt(r),a=s==="frame"&&!!ve(r.mediaVideo)&&!ve(r.videoFrame);return l(x,{label:i(e),icon:q(t),hint:a?i("This video has no frame yet. The slide shows its background colour until one is made."):void 0,children:Te({options:n,value:s,onChange:o,ariaLabel:e})})}function Ia(e,t,n,o={}){const r={type:"custom",[We]:!0,render:({value:s,onChange:a,name:c})=>l(Fo,{value:s||"",onChange:a,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?R("each",r):r}const Ta={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Ml(e){const t=i(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function ka({value:e,onChange:t,label:n}){const o=e||{},r=M(),s=r?r.values!==r.node.props:!0,a=!!o.pending&&s,c=!!o.pending&&!s,u=a?"var(--ink-faint)":o.ok&&!c?"var(--status-success-soft-ink)":"var(--status-danger-soft-ink)",f=!!Ir(Er()).geocode,m=Be(),p=(d,g)=>t({...o,[d]:g??void 0});return N(k,{children:[l(x,{label:i(n),icon:l(ze,{}),action:f?l(ne,{content:i("Find from the address (OpenStreetMap)"),children:l(lt,{"aria-label":i("Find from the address"),"aria-busy":a||void 0,disabled:a,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:l(An,{})})}):void 0,children:f&&o.status?l(ne,{content:Ml(o),className:"sf-name-tip",children:l("div",{className:`es-field-hint ${un}`,style:{margin:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",minWidth:0,color:u},children:a?i("Finding…"):c?i(go):i(o.status)})}):null}),l(x,{label:i("Enter by hand"),labelId:m,icon:l(_n,{}),action:l(me,{checked:!!o.manual,onChange:d=>t({...o,manual:d}),ariaLabelledBy:m})}),o.manual&&l(x,{label:i("Latitude, longitude"),icon:l(ze,{}),children:N("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[l(it,{value:typeof o.lat=="number"?o.lat:null,onChange:d=>p("lat",d),min:-90,max:90,step:1e-4,placeholder:i("Latitude")}),l(it,{value:typeof o.lng=="number"?o.lng:null,onChange:d=>p("lng",d),min:-180,max:180,step:1e-4,placeholder:i("Longitude")})]})})]})}function Wl(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Ul(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,s)=>s===t?{text:n}:r)}function Fa(e,t){return e===null?null:t>e?e:null}function Kl(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 Aa={label:"Ticker items",icon:l(Tn,{})};function La(e,t,n,o){return{type:"custom",[E]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...T({},{...It.textList,label:e}),render:({value:r,onChange:s})=>l($l,{label:e,icon:q(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:s,markup:o==="markup"})}}function $l({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:s=!1}){const a=V(null),[c,u]=z(null),f=p=>p.map(d=>({text:d?.text??""})),m=p=>{const d=Kl(n,p,c);d===null&&(a.current=null),u(d),r(f(p))};return l(Yn,{label:i(e),icon:t,noun:i("item"),items:n,onChange:m,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:s?l(at,{target:a,value:Wl(n,c),onChange:p=>r(Ul(n,c??-1,p)),disabled:c===null,label:c===null?i("Formatting — click a row first"):i("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,d,g)=>l("input",{type:"text",className:s&&c===d?"sf-list-marking":void 0,value:p?.text??"",placeholder:i(o),"aria-label":i("{label} {n}",{label:i(e),n:d+1}),onChange:h=>g({text:h.target.value}),onFocus:h=>{a.current=h.currentTarget,u(d)}})})}function Na(e,t){const n=`${e.label} — row ${t+1}`;return G({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>l(H,{value:o,onChange:r,label:i("{label} — row {n}",{label:i(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function Pa(e){return{_gCards:O("Cards"),coverIndex:Z("Cover image",l(In,{}),Io,String(To),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:Jr("Image background",ar),cardImage:Vl()}}function Ba(){return{outline:Z("Card outline",l(Ln,{}),Ro,Eo),indexBadge:Z("Card number",l(Ve,{}),_o,Oo),showBadge:Nl("Product badge",!0,l(Qe,{noun:"tag"}))}}function va(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...Q,label:ce.find(s=>s.id===r).label}),o=r=>T(bo(Le),n(r));return{_gShowOnCard:O("Show on a card"),[Le]:T({type:"custom",render:()=>l(Xl,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(Le)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const Le="showCardPrice",ce=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function Xl({rest:e}){const t=L(),n=Zr(),o=a=>typeof t[a]=="boolean"?t[a]:void 0,r=a=>o(a)??e[a],s=ce.some(({id:a})=>o(a)!==void 0&&o(a)!==e[a]);return l(Ne,{parts:ce,changed:s,shown:r,onPress:(a,c)=>n({[a]:c}),onReset:()=>n(Object.fromEntries(ce.map(({id:a})=>[a,void 0])))})}function Da(e,t="display"){const n=F(t);return{[t]:R("desktop",{type:"custom",render:({value:o,onChange:r})=>l(Ne,{parts:e,changed:Jn(o),shown:s=>Zn(o,s),onPress:(s,a)=>r(to(o,s,a)),onReset:()=>r(void 0)})}),[n]:R("mobile",{type:"custom",render:({value:o,onChange:r})=>l(jl,{parts:e,desktopKey:t,value:o,onChange:r})})}}function Ne({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:s,disabledReason:a}){const c=i("Display");return l(x,{label:c,icon:l(fn,{}),changed:t,action:l(y,{words:w()?.panel,label:c,changed:t,detail:s,onReset:r}),children:l(qn,{label:c,items:e.map(u=>({id:u.id,label:i(u.label),shown:n(u.id),...a?{disabled:!0,disabledReason:i(a)}:{}})),onChange:o})})}function jl({parts:e,desktopKey:t,value:n,onChange:o}){const r=L()[t];return l(Ne,{parts:e,changed:eo(n),shown:s=>Qn(r,n,s),onPress:(s,a)=>o(no(n,s,a)),onReset:()=>o(yo),detail:i("the same as Desktop")})}function Vl(){return Ft("Card image",{min:W,max:$e,step:Zt,hint:"Rounds the picture. The card's own corner is in Styles."})}function Ha(){return Fe({sidesKey:"cornerSides",step:Qt,useFollowed:()=>W,mark:l(zl,{label:en}),hint:i("Rounds the picture. Left alone it stays square.")})}function zl({label:e,changed:t=!1,onReset:n=()=>{}}){return l(y,{words:w()?.panel,label:i(e),changed:t,onReset:n})}function Ga(){return{type:"custom",render:({value:e,onChange:t})=>l(Zl,{value:typeof e=="string"?e:"",onChange:t})}}function Yl({layout:e,width:t}){return l("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:6,gridAutoFlow:"row dense",gap:2},children:rn(e).map(([n,o],r)=>l("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${n}`,gridRow:`span ${o}`}},r))})}const ql={width:"3.5rem",height:"2.5rem"},Jl=200;function Zl({value:e,onChange:t}){const[n,o]=z(null),[r,s]=z(4),a=V(null);Xt(()=>{const d=a.current;if(!d||typeof ResizeObserver!="function")return;const g=()=>s(d.getBoundingClientRect().width>=Jl?4:3);g();const h=new ResizeObserver(g);return h.observe(d),()=>h.disconnect()},[]);const c=e&&e in te?e:"",u=Xe(n,c),f=Xe(n,"").length,m=ln("no-symbol"),p=[{value:"",label:i("Not chosen"),icon:Lr(m,i("Not chosen"))},...u.map(d=>({value:d,label:i(te[d].label),icon:l(Yl,{layout:te[d],width:40})}))];return l(x,{label:i("Layout"),icon:l(On,{}),value:c?i(te[c].label):void 0,children:l("div",{ref:a,style:{flex:"1 1 auto",minWidth:0},children:l(nt,{label:i("Layout"),value:c,options:p,onChange:t,columns:r,cell:ql,header:N("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[l("span",{className:"text-2xs text-ink-faint",children:i("Photos in a row")}),l($n,{options:[{id:"all",label:i("All")},...nn.map(d=>({id:String(d),label:String(d)}))],value:n===null?"all":String(n),ariaLabel:i("Photos in a row"),onChange:d=>o(d==="all"?null:Number(d))}),l("span",{className:"text-2xs text-ink-faint",children:i("{n} of {total} layouts",{n:f,total:on.length})})]})})})})}export{Kr as BOUND_TO_POST,As as BOUND_TO_POST_NOTE,Gs as BUCKET_ICONS,Ta as CUSTOM_FIELD_MEDIA,ka as CoordsField,Ot as DESKTOP_GAP_NOT_OVERLAP,Ne as DisplayRow,wa as EDGE_ARROWS,co as FOCAL_DEFAULT,Dl as FOCAL_POINTS,de as FOLD_FIELD_MARKER,Hl as FocalPicker,Vs as GroupLabel,$r as HIGHLIGHT_HINT,H as HidableTextField,Me as LINK_FIELD_MARKER,ws as Label,We as MEDIA_FIELD_MARKER,Oa as MEDIA_TYPE_OPTIONS,Ls as NOT_BOUND_TO_POST,js as PanelBand,Vr as PanelNoteLine,xl as RowPropsContext,Ue as SCAFFOLD_FIELD_MARKER,Ka as SCALAR_TEXT_CONTROLS,Br as SiteGapDefaultReset,ee as Slider,Yr as Swatches,Ua as TEXT_CONTROL_KINDS,E as TEXT_FIELD_MARKER,Aa as TICKER_ITEMS_ROW,$l as TextListField,se as WIDTH_LABEL,Wr as WidthDefaultReset,Kl as aimAfterListChange,pa as anchorFields,D as backTo,zs as backgroundField,ta as boxBlockSpacingField,ra as boxColumnsFields,xa as boxFillField,bl as boxPhoneRowField,hl as boxShareField,na as boxSharePhoneField,oa as boxShareTabletField,Bl as boxThemeIndexOf,Us as bucketHeader,Zs as buttonWordsEntryField,pl as cardCornersField,Jr as cardImageBackgroundField,Vl as cardImageField,Pa as cardMediaFields,ea as cardShapeFields,va as cardShowFields,Ba as cardStyleFields,ia as cellWidthFields,ga as checkbox,ba as colorInput,Cs as containerDirectionField,vr as containerGapField,Dr as containerGapPhoneField,ys as containerGapRows,Hr as containerGapTabletField,Ml as coordsResultTip,vs as copyText,Lt as cornerSidesField,Fe as cornersRowField,ha as date,fa as dateTime,Ks as designGroupHeader,Da as displayFields,ya as edgePad,Fa as focusAfterRemove,Sa as focusKeptField,$s as foldMarker,pe as foldMetaOf,zr as foldTitleOf,El as followedHeightPatch,Al as followedStickPatch,Ga as galleryLayoutField,ua as heightFields,ae as heightFollowedBy,_s as heroGroupPlacementPoints,Ge as hidableText,jr as hintIsWhileTyping,Ha as imageCornersField,Fs as inOwnBox,Ws as isBucketHeader,At as keptBy,Ds as linkField,Ea as loadingShowsField,Ca as multiSelect,ma as pageBackgroundField,Ms as panelNote,yl as phoneOverrideField,Bs as plainText,Hs as plainTextarea,Ft as pxField,Xs as quietMarker,He as readHidable,Wl as rowText,_a as searchSelect,Js as sectionBorderField,nl as sectionCornersField,qs as sectionShapeFields,Ys as sectionThemeFields,Ul as setRowText,la as sizeField,Ra as sourceField,sa as spacingFields,da as stickFields,aa as swapPadding,Qs as templateField,Ns as text,Yt as textFieldIdentifier,Es as textFieldOffPage,Ts as textFieldPanelOnly,La as textList,Na as textListRowField,Ps as textarea,Nl as toggle,Ia as upload,Zr as useSelectedPatch,L as useSelectedProps,A as useSelectedSibling,Pr as useSiteGapDetail,ca as widthField,ks as withIdentifier,Os as withOffPage,Is as withPanelOnly,Rs as withScaffold};
1
+ "use client";import{jsx as l,jsxs as N,Fragment as k}from"react/jsx-runtime";import{cloneElement as Pe,createContext as Ut,useContext as Kt,useEffect as $t,useId as Be,useRef as V,useState as z}from"react";import{useEasel as ce,useSelectedHost as M}from"efficient-easel/easel";import{toDateKey as Xt,fromDateKey as jt}from"efficient-shell/format";import{say as i,editorEaselWords as y}from"../../../format/lib/editor-words.js";import{LOADING_SHOWS_LABELS as De,loadingShowsOf as Vt,loadingStillHint as zt}from"../../../format/lib/hero-video.js";import{readHidable as ve,hidableText as He}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as ue,LINK_FIELD_MARKER as Ge,MEDIA_FIELD_MARKER as Me,SCAFFOLD_FIELD_MARKER as We,TEXT_FIELD_MARKER as T,foldMetaOf as de,textFieldIdentifier as Yt}from"efficient-easel/draw";import qt from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as Ue}from"../../../render/lib/document/show-when.js";import Jt from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as Zt,CORNER_RADIUS_MAX as Ke,CORNER_RADIUS_MIN as W}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as Qt,IMAGE_CORNERS_LABEL as en}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as tn}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as nn,GALLERY_LAYOUTS as te,GALLERY_LAYOUT_KEYS as on,galleryChoices as $e,galleryPictureCells as rn}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as ln}from"./shell-glyph.js";import{anchorSiblingsOf as sn,placementPoints as an}from"../../../format/lib/hero-group-placement.js";import cn from"../../components/AnchorField.js";import un from"../../components/SourceStatus.js";import{AdjustIcon as dn,EyeIcon as pn,AnimationIcon as fn,BackgroundIcon as hn,BorderAllIcon as mn,BlockSectionIcon as gn,ColumnWidthsIcon as pe,ColumnsIcon as Xe,CornerIcon as bn,DirectionDownIcon as xn,DirectionLeftIcon as Sn,DirectionRightIcon as yn,DirectionUpIcon as wn,EditIcon as Cn,GapIcon as _n,GridIcon as Rn,GroundIcon as fe,HashIcon as je,HeightIcon as On,ImageIcon as Tn,ListIcon as En,LocationIcon as Ve,PaddingBottomIcon as ze,PaddingLeftIcon as Ye,PaddingRightIcon as qe,PaddingTopIcon as Je,PageIcon as In,StickyIcon as kn,SearchIcon as Fn,SquareIcon as An,TypeIcon as Ln,WidthIcon as Nn}from"efficient-easel/icons";import{FieldGlyph as Ze}from"../../components/FieldGlyph.js";import{resolvePageBackground as Pn}from"../../../format/lib/content/page-background.js";import{boxFillOf as Bn}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as Qe,CORNER_SIDE_POINTS as Dn,hasOwnSectionCorners as vn,normalizeCornerSides as et}from"../../../format/lib/content/section-corners.js";import{enclosingPath as Hn,enclosingSection as Gn}from"./enclosing-section.js";import{SettingsDefaultReset as w,SettingsDrill as Mn,SettingsField as x,SettingsGroup as Wn,SettingsGroupSub as Un,SettingsSegmented as Kn,SettingsBorder as $n,SettingsSidesEach as Xn,SettingsSwitch as he,borderSides as jn,borderStartEach as Vn}from"efficient-easel/panel";import{ListField as zn}from"efficient-easel/fields";import{DisplayChips as Yn}from"efficient-shell/ui";import{desktopDisplayChanged as qn,partShownOnDesktop as Jn,partShownOnPhone as Zn,phoneDisplayChanged as Qn,withDesktopPart as eo,withPhonePart as to}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as no,Checkbox as oo,ColorSwatch as ro,CornersInput as lo,DatePicker as io,DateTimePicker as so,FOCAL_DEFAULT as ao,IconPicker as tt,COLUMN_COUNT_MAX as nt,COLUMN_SHARE_MIN as co,COLUMN_SHARES_EQUAL as uo,resolveColumnShares as ot,WidthsBar as po,useShellStrings as fo,IconButton as rt,InputNumber as lt,Slider as ho,Tooltip as me}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as mo}from"./geocode-resolve.js";import{ColourRow as it,InheritedColourRow as ge}from"./ColourControl.js";import{keptByRow as go}from"efficient-easel/screen/lib/document/style-fields";import st from"./MarkupToolbar.js";import{deviceField as R}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as bo,NoControlMark as xo,noControlField as at}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as So}from"../../../format/lib/document/own-box.js";import{PHONE_CLEAR as yo,resolvePhoneValue as be}from"../../../format/lib/document/phone-override.js";import{phoneKey as F,tabletKey as U}from"efficient-easel/draw";import{SuppressibleText as wo}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Co,CARD_OUTLINE_OPTIONS as _o,DEFAULT_CARD_INDEX_FORMAT as Ro,DEFAULT_CARD_OUTLINE as Oo}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as To,DEFAULT_COVER_INDEX as Eo}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Io}from"efficient-easel/draw";import ko from"../../components/MediaUploadField.js";import Fo from"../../components/MultiSelectField.js";import Ao from"../../components/SectionThemePicker.js";import Lo from"../../components/SearchSelectField.js";import No from"../../components/StorefrontLinkField.js";import{UiIcon as ct}from"efficient-easel/draw/client";import{SECTION_PADDING as E}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as Po}from"../../../render/lib/content/button-look.js";import{usePreviewParts as Bo}from"efficient-easel/draw/client";import{encodePartId as Do}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as vo,useEaselStrings as Ho}from"efficient-easel/strings";import{hasPhoneHeight as Go,hasTabletHeight as xe,resolveSectionMinHeight as Mo,resolveTabletHeight as Wo}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as ne,SECTION_STICK_LABEL as Se,hasPhoneStick as Uo,hasTabletStick as Ko,resolveSectionStick as ut}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as $o,SECTION_MIN_HEIGHT_GROUP_LABEL as Y,SECTION_SCREEN_PCT as Xo}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as jo,resolveContainerDirection as dt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as Vo,BOX_BLOCK_SPACING_POINTS as pt,BOX_PHONE_ROW_LABEL as ft,BOX_COLUMNS_MAX as zo,BOX_COLUMNS_MIN as ht,BOX_PHONE_ROW_MAX as Yo,BOX_PHONE_ROW_MIN as ye,BOX_SHARE_CHOICES as mt,BOX_SHARE_LABEL as K,boxShareChoiceOf as gt,boxShareWidthsOf as we,BOX_SHARE_PHONE_DEFAULT as qo,BOX_SHARE_PHONE_POINTS as Jo}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as B}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Zo,borderBySide as bt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as Qo,normalizeTheme as xt,normalizeThemeColors as er,sectionBandTone as tr,surfaceTwoTone as nr}from"../../../format/lib/theme.js";import{CONTAINER_GAP as St,CONTAINER_GAP_BUILT_IN as or,CONTAINER_GAP_PHONE as Ce,GAP_FIELD_CONTAINER as _e,followsSitePhoneGap as rr,hasOwnContainerGap as lr,hasOwnPhoneGap as Re,resolveContainerGap as yt,resolvePhoneContainerGap as wt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as ir,CARD_IMAGE_BG_OFF as sr,CARD_IMAGE_BG_SWATCH_NAMES as ar,CARD_IMAGE_BG_SWATCHES as cr,isCardImageBackgroundInheriting as ur,cardImageBackgroundChoice as dr,THEME_CARD_IMAGE_BG as pr}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as fr,SECTION_BG_NO_FILL as hr,sectionBackgroundChoice as mr,THEME_SECTION_BG as Oe,isSectionBackgroundEmpty as gr,sectionBackgroundHex as Ct}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as br,nestedAccentValue as _t,resolveSectionAccent as oe}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as xr,TYPE_SIZE_INHERIT as Sr,isTypeSizeInheriting as yr}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as wr,WIDTH_CHOICE_LABEL as Cr,WIDTH_INHERIT as _r}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as Rr}from"./panel-heading-scope.js";import{useEaselSession as Or}from"efficient-easel/screen/lib/session-context";import{backendOf as Tr}from"../website-session.js";import{BOX_GAP as Er,describedAs as I,group as O,iconOf as q,sharedStyleKinds as J}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as Te,onDesktopWords as D,phoneTwinFields as re}from"efficient-easel/screen/lib/document/box-fields";import{directionField as Ir,gapField as Ee,iconPickerRow as kr,pickerCellIcon as Fr,pickerNoneIcon as Ar,Segmented as Ie,segmented as Lr,select as Z,slider as $}from"./box-fields.js";function xs({children:e}){return l("div",{className:"sf-field-label",children:typeof e=="string"?i(e):e})}function v(e,t){return i("{value} from {from}",{value:e,from:t})}function Nr(){const{blockGap:e}=B();return e===null?i("this container's own spacing"):v(`${e}px`,i("Styles"))}function Pr({inherited:e,onReset:t,label:n}){return l(w,{words:y()?.panel,label:i(n),changed:!e,detail:Nr(),onReset:t})}function Br(e){return Ee({...Er,builtIn:or[e],resolve:(t,n)=>yt(e,t,n?.siteGap),action:(t,n)=>l(Pr,{inherited:!lr(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[_e]:e}})}function Dr(e){return Ue(R("mobile",{[_e]:e,type:"custom",render:t=>l(Gr,{container:e,...t})}),Rt)}function vr(e){return Ue(R("tablet",{[_e]:e,type:"custom",render:t=>l(Hr,{container:e,...t})}),Rt)}const Rt={not:{field:"gap",in:Array.from({length:-St.min},(e,t)=>St.min+t)}};function Ss(e){return{gap:R("desktop",Br(e)),[U("gap")]:vr(e),[F("gap")]:Dr(e)}}function Hr({container:e,...t}){const[n]=A("gap"),{siteGap:o}=t.field??{},r=Math.max(Ce.min,yt(e,n,o));return Ee({...Ce,builtIn:r,resolve:s=>Re(s)?s:r,action:(s,c)=>l(w,{words:y()?.panel,label:i("Gap"),changed:Re(s),detail:D(u=>i(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function Gr({container:e,...t}){const[n]=A("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},a=wt(e,void 0,n,o,r);return Ee({...Ce,builtIn:a,resolve:c=>wt(e,c,n,o,r),action:(c,u)=>l(w,{words:y()?.panel,label:i("Gap"),changed:Re(c),detail:v(`${a}px`,rr(e,n,r)?i("Styles"):i("Desktop")),onReset:()=>u(void 0)})}).render(t)}function ys(e){return Ir({offered:jo(e),fallback:dt(e,void 0),resolve:t=>dt(e,t)})}function ws(e,t){return an(t?sn(e,t):[],t)}function Mr({inherited:e,onReset:t,label:n}){return l(w,{words:y()?.panel,label:i(n),changed:!e,detail:v(i("Full"),i("the page")),onReset:t})}function H({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:a,hideable:s=!0,markup:c=!0}){const{text:u,hidden:f}=ve(e),m=V(null),p=V(null),d=_=>t(s?{text:_,hidden:f}:_),g=()=>t({text:u,hidden:!f}),h=s&&f,C=Be(),S=r?Xr(r)?l("span",{className:"sf-hint-while-typing",children:i(r)}):i(r):void 0,b=f?i("Show {label} on the slide",{label:i(n)}):i("Hide {label} on the slide",{label:i(n)});return l(x,{label:i(n),icon:l(Ln,{}),htmlFor:C,className:h?"is-hidden":void 0,hint:S,action:s?l(me,{content:b,children:l(rt,{"aria-pressed":f,"aria-label":b,onClick:g,children:f?l(ct,{name:"eye-off",size:14}):l(ct,{name:"eye",size:14})})}):void 0,children:N("div",{className:"sf-copybox",children:[c&&l(st,{target:a?p:m,value:u,onChange:d}),a?l("textarea",{id:C,ref:p,value:u,placeholder:o===void 0?void 0:i(o),onChange:_=>d(_.target.value)}):l("input",{id:C,ref:m,type:"text",value:u,placeholder:o===void 0?void 0:i(o),onChange:_=>d(_.target.value)})]})})}function Cs(e,t){return{...e,[We]:t}}function _s(e){const t=e[T];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[T]:{...t,offPage:!0}}}function Rs(e){return!e||typeof e!="object"?!1:e[T]?.offPage===!0}const Ot="sfPanelOnly";function Os(e){if(!e[T])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Ot]:!0}}function Ts(e){return!!e&&typeof e=="object"&&e[Ot]===!0}function Es(e){const t=e[T];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[T]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as Ma,SCALAR_TEXT_CONTROLS as Wa}from"efficient-easel/draw";function Is(e,t){if(!e[T])throw new Error("inOwnBox: the field holds no authored text");const{[bo]:o,...r}=e;return{...r,[So]:!0,render:t}}const Wr=new Set(Io),Q={type:"radio",options:[{value:!0},{value:!1}]},Tt={text:{type:"object",objectFields:{text:{type:"text"},hidden:Q}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:Q}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},G=(e,t)=>{const n=I({...t,[T]:e},{...Tt[e.control],label:e.label});if(!Wr.has(e.control))return n;const o=t.render;return{...at(n,"authored-copy"),render:r=>l(wo,{name:r.name,children:o(r)})}},ks="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Ur={field:"source.slug",set:!0},Fs={not:Ur},Kr="Select a word, then press the highlighter.",$r=new Set([Kr]),Xr=e=>$r.has(e);function As(e,t,n){return G({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>l(H,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function Ls(e,t,n){return G({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>l(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function Ns(e,t,n){return G({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>l(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function Ps(e,t,n){return G({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>l(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function Bs(e){return{type:"custom",[Ge]:{label:e},...I({},{type:"text",label:e}),render:({value:t,onChange:n})=>l(No,{value:He(t),onChange:n,label:e})}}function Ds(e,t,n){return G({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>l(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const vs={Design:dn,Animation:fn};function Hs(e){return{type:"custom",render:()=>l(jr,{text:e})}}function jr({text:e}){return l("p",{className:"sf-note",children:i(e)})}function Gs(e){return de(e)!==null&&e?.tabs!==void 0}const Et=new Map;function Ms(e,t){const n=`${e}\0${t?t.join(""):""}`,o=Et.get(n)??{type:"custom",tabs:t,[ue]:{label:e,level:1},bucket:e,marker:!0,render:()=>l(k,{})};return Et.set(n,o),o}const It=new Map;function Ws(e){const t=It.get(e)??{type:"custom",[ue]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>l(k,{})};return It.set(e,t),t}function Vr(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function Us(e,t){return Vr(e)===t?e:{...e,marker:!0,fold:t,render:()=>l(k,{})}}function Ks(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>l(k,{})}}function $s({title:e,children:t}){const[n,o]=z(()=>!ke.has(e));return l(Wn,{title:e,open:n,onToggle:r=>{o(r),r?ke.delete(e):ke.add(e)},children:t})}const ke=new Set;function Xs({label:e}){return l(Un,{title:i(e),level:Rr(2)})}function zr({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),a=r?o?.[r]:void 0,s=a?i(a):t;return N("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?i(o[c]):c;return l(me,{content:u,children:l(ro,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),l("span",{className:"sf-swatch-hex",children:s})]})}function js(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>l(Yr,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function Yr({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const a=typeof o=="string"?o:void 0,{colors:s,n:c}=Wt(),u={background:s.background,surface:s.surface,surface2:nr(s),band:tr(s)},f=n?Oe:t,m=gr(a,t,f),p=Ct(void 0,f,u),d=n?fr:void 0,g=mr(a,t),h=f===Oe?i("the theme's section background"):i("Theme {n} background",{n:c});return l(ge,{label:i(e),icon:l(hn,{}),value:m?"":Ct(a,t,u),inherited:p,resetTo:v(p.toUpperCase(),h),onChange:r,onReset:()=>r(d),choices:[{label:i("No fill"),color:"",selected:g==="none",onPick:()=>r(hr)},{label:`${i("Section band")} · ${u.band.toUpperCase()}`,color:u.band,selected:g==="band",onPick:()=>r(Oe)}]})}function qr(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,a=ur(r,t);return l(x,{label:i(e),icon:l(fe,{}),changed:!a,action:l(w,{words:y()?.panel,label:i(e),changed:!a,detail:i("the theme's image stage"),onReset:()=>o(ir)}),children:zr({swatches:cr,current:a?pr:dr(r,t),onPick:o,names:ar})})}}}function Vs(e=n=>n,t){return J({_gSectionTheme:O(br),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>l(Ao,{value:e(n),onChange:o,followLabel:t})}})}function ee({min:e,max:t,step:n,value:o,onChange:r,suffix:a="",readout:s=!0,notch:c,ariaLabel:u,disabled:f=!1,placeholder:m,placeholderWord:p,onClear:d}){const g=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return l("div",{className:g?"sf-slider has-notch":"sf-slider",style:g?{"--sf-notch":(c-e)/(t-e)}:void 0,children:l(ho,{min:e,max:t,step:n,value:o,...o===null&&m!==void 0?{placeholderValue:m}:{},...p?{emptyLabel:i(p)}:{},suffix:a||void 0,showInput:s,label:u===void 0?void 0:i(u),disabled:f,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:h=>{h===null?d?.():h!==o&&r(h)}})})}function kt(e,t){const{min:n,max:o,step:r=1,unsetLabel:a,hint:s,restTrack:c,unsetMark:u,icon:f,unit:m="px"}=t;return{type:"custom",render:({value:p,onChange:d})=>{const g=typeof p=="number"?p:null,h=g===null;return l(x,{label:i(e),icon:f?q(f):void 0,value:h?u||a===void 0?void 0:i(a):`${g}${m}`,changed:!h,action:u?Pe(u,{changed:!h,onReset:()=>d(null)}):l(w,{words:y()?.panel,label:i(e),changed:!h,onReset:()=>d(null)}),hint:typeof s=="string"?i(s):s,children:c?c({min:n,max:o,step:r,px:g,label:e,onChange:d}):ee({min:n,max:o,step:r,value:g??n,readout:!1,ariaLabel:e,onChange:d})})}}}const le="Corners";function Fe(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,r=o!==null;return l(x,{label:i(le),icon:l(bn,{}),changed:r,action:Pe(e.mark,{changed:r,onReset:()=>n(null)}),hint:e.hint,children:l(Zr,{tier:e,px:o,onRadius:n})})}}}function A(e){const t=M();return[t?.values?.[e],n=>t?.onChange(e,n)]}function Ft(){return at({type:"custom",render:()=>l(xo,{})},"always")}function Jr(){const e=M();return t=>e?.onChangeMany(t)}function Zr({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),[r,a]=A(e.sidesKey),s=et(r)??[...Qe];return l(lo,{label:i(le),value:s,corners:Dn,onChange:c=>{const u=et(c)??[];a(u.length===Qe.length?null:u)},radius:t,onRadiusChange:n,radiusMin:W,radiusMax:Ke,radiusStep:e.step??1,radiusPlaceholder:String(o)})}function At(){return Ft()}function Qr({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=B(),r=typeof o=="number"?`${o}px`:i("not set");return l(w,{words:y()?.panel,label:i(e),changed:t,detail:o==null?i("the built-in corners"):v(r,i("Styles")),onReset:n})}function el(){const{cornerRadiusPx:e}=B();return typeof e=="number"?e:W}function tl(){return Fe({sidesKey:"sectionCornerSides",useFollowed:el,mark:l(Qr,{label:le}),hint:nl})}const nl="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function zs(){return J({_gShape:O("Shape"),sectionCorners:tl(),sectionCornerSides:At(),...X("sectionBorder",Lt)})}const ol=()=>({width:i("Border width"),sides:{top:i("Border top"),right:i("Border right"),bottom:i("Border bottom"),left:i("Border left")},style:i("Border style"),styles:{solid:i("Solid"),dashed:i("Dashed"),dotted:i("Dotted")},color:i("Border color"),unit:"px"});function rl(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function ll(){let e;try{const t=xt(B().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||Qo.line}function il({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:a=!0,above:s={}}){const c=e&&typeof e=="object"?e:{},[u,f]=z(()=>r?Vn(c,s):!1),m=ol(),p=d=>rl(r&&a?d:{width:d.width,color:d.color,...a?{style:d.style}:{}});return l(x,{label:i("Border"),icon:l(mn,{}),action:r?l(Xn,{each:u,label:i("Each side"),onChange:f}):void 0,children:l($n,{label:i("Border"),value:c,each:u,onChange:d=>t(p(d)),placeholder:n,presets:o,words:m,styles:a,max:Zo})})}function sl({value:e,onChange:t,view:n}){const[o]=A("sectionBorder"),[r]=A(U("sectionBorder")),a=ll(),s=u=>u&&typeof u=="object"?u:{},c=n==="phone"?{...bt(s(o)),...bt(s(r))}:n==="tablet"?s(o):{};return l(il,{value:e,onChange:t,placeholder:{sides:jn(c),style:c.style??"solid",color:c.color||a},presets:[a],above:c})}function Ys(e){return R(e,Lt(e==="mobile"?"phone":e))}function Lt(e){return{type:"custom",render:({value:t,onChange:n})=>l(sl,{value:t,onChange:n,view:e})}}function X(e,t){const n=(o,r)=>re(e,t(o),Te)[r];return{[e]:n("desktop",e),[U(e)]:n("tablet",U(e)),[F(e)]:n("phone",F(e))}}function qs(e){return{type:"custom",render:()=>l(al,{partKey:e})}}function al({partKey:e}){const[t]=A("id"),[n]=A("_partStyles"),{textStyles:o}=B(),r=Ho();let a=null;try{a=Bo().select}catch{a=null}const s=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return l(Mn,{name:i("Text"),preview:Po(s,c,{noStyle:i("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??vo.copy.panel).cases}),onOpen:()=>{a&&typeof t=="string"&&a(Do(t,e))}})}function Nt(e){const{cornerRadiusPx:t}=B(),n=typeof t=="number"?t:e;let o=null;try{const{appState:a,selectedItem:s}=ce(u=>u),c=s?.props?.id?String(s.props.id):void 0;o=c?Gn(a?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return vn(r)?r:n}function cl({label:e,changed:t=!1,onReset:n=()=>{}}){const o=Nt(W);return l(w,{words:y()?.panel,label:i(e),changed:t,detail:v(`${o}px`,i("the section")),onReset:n})}function ul(){return l(k,{children:i("Follows the section's Corners until you set a number here.")})}function dl(){return Fe({sidesKey:"cardCornerSides",useFollowed:()=>Nt(W),mark:l(cl,{label:le}),hint:l(ul,{})})}function pl(){return{type:"custom",render:()=>l(qt,{})}}function Js(e){return{...e,render:t=>l(Jt,{render:e.render,props:t})}}function Zs(){return{_gShape:O("Shape"),cardCorners:dl(),cardCornerSides:At(),cardCornersApplyAll:pl()}}function fl(){return I({type:"custom",render:e=>l(ml,{...e})},{type:"select",label:K,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 hl(e,t){const n=gt(e);if(n!=="custom")return i(mt.find(r=>r.value===n)?.label??"");const o=ot(we(e,t),t);return o?[...o,100-o.reduce((r,a)=>r+a,0)].join(" / "):i("Custom")}function ml(e){const{value:t,onChange:n}=e,[o]=A("content"),r=Array.isArray(o)?o.length:0,a="follows"in e,s=t!=null,c=s?t:a?e.follows:void 0,u=gt(c),f=r>=2&&r<=nt,m=()=>[...uo[r]??[]],p=V(null),d=b=>{const _=p.current;_&&JSON.stringify(b)===JSON.stringify(_.shares)?n(_.value):b&&n(b)},g=b=>{b===u||b==="custom"&&!f||n(b==="custom"?m():b)},h=i("The width bar works for 2 to {count} blocks.",{count:nt}),C=s&&(a||t!=="content"),S=fo().widths.hint(r,co);return l(x,{label:i(K),icon:l(pe,{}),changed:C,hint:u!=="custom"?void 0:f?S:h,action:l(w,{words:y()?.panel,label:i(K),changed:C,disabled:e.readOnly===!0,detail:a?D(b=>i(b),hl(e.follows,r),e.followsView):i("Fit content"),onReset:()=>n(void 0)}),children:N("div",{className:"sf-share-row",children:[l("div",{className:"sf-share-pick",children:l(tt,{label:i(K),value:u,options:mt.map(b=>({value:b.value,label:b.value==="custom"&&!f?h:i(b.label),icon:Fr(l("span",{className:"sf-gallery-pic sf-share-pic",children:Pt(b.weights).map((_,j)=>l("i",{style:{gridColumn:`span ${_}`}},j))}),i(b.label),b.value==="custom"&&!f?h:i(b.label))})),onChange:g,columns:3,cell:Bt,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&f?l("div",{onFocus:()=>{p.current={value:t,shares:ot(we(c,r),r)}},onBlur:()=>{p.current=null},children:l(po,{label:i(K),count:r,value:we(c,r),onChange:d,readOnly:e.readOnly===!0})}):null]})})}function Pt(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 Qs(){return Z(Vo,l(_n,{}),pt,pt[0].value)}function ea(){return R("mobile",kr(K,l(pe,{}),Jo.map(e=>({label:e.label,value:e.value,picture:l("span",{className:"sf-gallery-pic sf-share-pic",children:Pt(e.weights).map((t,n)=>l("i",{style:{gridColumn:`span ${t}`}},n))})})),qo,{columns:2,cell:Bt}))}const Bt={width:"5.75rem",height:"3.25rem"};function ta(){return re("share",fl(),Te)[U("share")]}function gl(){return R("mobile",$(ft,l(Xe,{}),ye,Yo,1,ye,"",{clear:{phoneFollows:!1,hint:ye}}))}const Dt={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function na(){const e=$(ft,l(Xe,{}),ht,zo,1,ht,"",{clear:{emptyLabel:"Auto"}}),t=re("columns",e,{...Dt,tablet:Te.tablet}),n=re("columns",e,Dt,{phoneRow:gl()});return{...t,phoneRow:n.phoneRow}}function oa(e,t,n,o,r,a){return{type:"custom",render:({value:s,onChange:c})=>l(x,{label:i(e),icon:l(Ze,{noun:a}),action:l(w,{words:y()?.panel,label:i(e),changed:!yr(s),detail:i("the Text style in Styles"),onReset:()=>c(Sr),defaultAction:{onPress:()=>c(xr),title:i("Keep this section's own built-in size"),icon:l(gn,{})}}),children:ee({min:t,max:n,step:o,value:typeof s=="number"?s:r,suffix:"px",ariaLabel:e,onChange:c})})}}function ra(){return{_gCellWidth:O("Cell width"),gridSpan:Z("Positions",l(pe,{}),[{label:"Auto",value:""},...Array.from({length:tn},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function L(){let e=null,t=null;try{e=Kt(bl),t=ce(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const bl=Ut(null);function xl({min:e,max:t,step:n,px:o,label:r,onChange:a,desktopKey:s,fallback:c}){const u=L()[s],f=be(void 0,u,c);return l(k,{children:ee({min:e,max:t,step:n,value:be(o,u,c),readout:!1,ariaLabel:r,notch:f,onChange:a})})}function Sl({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:a=()=>{}}){const s=L()[t],c=be(void 0,s,n);return l(w,{words:y()?.panel,label:i(e),changed:r,detail:D(u=>i(u),`${c}${o}`),onReset:a})}function yl(e){return kt(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:l(Sl,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>l(xl,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const wl={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Cl={Top:Je,Bottom:ze,Left:Ye,Right:qe},_l=e=>{const t=Cl[e];return l(t,{})};function la(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=S=>wl[S],a=S=>$(r("Top"),l(Je,{}),E.min,E.max,E.step,S,"px"),s=(S,b,_,j=E)=>R("mobile",yl({label:r(S),icon:_l(S),desktopKey:b,min:j.min,max:j.max,step:j.step,fallback:_})),c=e.top??E.min,u=e.bottom??E.min,f="sectionPaddingLeft",m="sectionPaddingRight",p=e.sideBounds??E,d=e.side??p.min,g=e.sidePhone??d,h=e.phone===!0,C=S=>h?R("desktop",S):S;return J({...o?{_gSpacing:O("Padding")}:{},[t]:C(a(c)),...h?{[F(t)]:s("Top",t,c)}:{},...e.only==="top"?{}:{[n]:C($(r("Bottom"),l(ze,{}),E.min,E.max,E.step,u,"px")),...h?{[F(n)]:s("Bottom",n,u)}:{}},...e.sides?{[f]:C($(r("Left"),l(Ye,{}),p.min,p.max,p.step,d,"px")),...h?{[F(f)]:s("Left",f,g,p)}:{},[m]:C($(r("Right"),l(qe,{}),p.min,p.max,p.step,d,"px")),...h?{[F(m)]:s("Right",m,g,p)}:{}}:{}})}function ia(e,t){const n=Object.fromEntries(Object.entries(t).map(([a,s])=>[a,a in e&&de(s)?e[a]:s])),o={};let r=!1;for(const[a,s]of Object.entries(e)){if(a in t){r||Object.assign(o,n),r=!0;continue}o[a]=s}return r||Object.assign(o,n),o}const ie="Width";function sa(e,t=wr,n=!0){const o=t.map(r=>({label:Cr[r],value:r}));return J({...n?{_gWidth:O(ie)}:{},widthMode:{type:"custom",render:({onChange:r,field:a})=>l(x,{label:i(ie),icon:l(Nn,{}),action:n?l(Mr,{inherited:a?.inherited??!1,onReset:()=>r(_r),label:ie}):void 0,children:Ie({options:o,value:a?.currentValue||e,onChange:r,ariaLabel:ie})})}})}function aa(){const e=(o,r)=>({type:"custom",render:({value:a,onChange:s})=>l(Rl,{value:a,onChange:s,view:o,badge:r})}),t=o=>({type:"custom",render:({value:r,onChange:a,field:s})=>l(Tl,{value:r,onChange:a,unit:s?.unit,view:o})}),n=o=>{const r=Lr("Unit",l(je,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");if(o==="desktop")return r;const a=r.render;return{...r,render:s=>l(El,{props:s,draw:a,view:o})}};return J({_gHeight:O(Y),...X("sectionHeightMode",o=>o==="desktop"?e(o):e(o,r=>l(Il,{view:o,onClear:()=>r(void 0)}))),...X("sectionHeightValue",t),...X("sectionHeightUnit",n)})}function Rl({value:e,onChange:t,view:n,badge:o}){const r=L(),a=c=>["auto","fixed","screen"].includes(c),s=se(n,r)?.mode??"auto";return l(x,{label:Y,icon:q(l(On,{})),action:o?o(t):void 0,children:Ie({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:a(e)?e:s,onChange:t,ariaLabel:Y})})}function vt(e,t){return e==="phone"&&xe(t)?Wo(t):Mo(t)}function se(e,t){return e==="desktop"||(e==="tablet"?xe(t):Go(t))?null:vt(e,t)}const P=(e,t)=>e==="tablet"?U(t):F(t);function Ol(e,t,n,o){const r=se(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[P(e,"sectionHeightMode")]:r.mode,...r.mode==="fixed"?{[P(e,"sectionHeightUnit")]:r.unit}:{},...n==="sectionHeightUnit"?{[P(e,"sectionHeightValue")]:r.value}:{},[P(e,n)]:o}}function Ht(e,t,n){const o=M(),r=se(e,L());return!o||!r?{followed:null,write:n}:{followed:r,write:s=>o.onChangeMany(c=>{const u=Ol(e,c,t,s);return u===null?{[e==="desktop"?t:P(e,t)]:s}:Object.keys(u).length?u:null})}}function Tl({value:e,onChange:t,unit:n,view:o}){const{followed:r,write:a}=Ht(o,"sectionHeightValue",t),s=(r?r.unit:n)==="%"?"%":"px",c=s==="%"?Xo:$o;return l("div",{className:"sf-field",children:ee({min:c.min,max:c.max,step:c.step,value:r?null:typeof e=="number"?e:c.fallback,...r?{placeholder:r.value}:{},suffix:s,ariaLabel:Y,onChange:a})})}function El({props:e,draw:t,view:n}){const{followed:o,write:r}=Ht(n,"sectionHeightUnit",e.onChange);return t({...e,...o?{value:void 0,storedValue:void 0,follows:o.unit}:{},onChange:r})}function Il({view:e,onClear:t}){const n=L(),o=se(e,n)===null,r=e==="phone"&&xe(n),a=vt(e,n),s=D(c=>i(c),a.mode==="auto"?i("Auto"):`${a.value}${a.unit}`,r?"tablet":"desktop");return l(w,{words:y()?.panel,label:i(Y),changed:o,detail:s,onReset:t})}function ca(){const e=n=>({type:"custom",render:({value:o,onChange:r,id:a,name:s})=>l(Al,{value:o,onChange:r,labelId:`${a??s??"stickTop"}-label`,view:n})}),t=n=>({type:"custom",render:({value:o,onChange:r})=>l(kl,{value:o,onChange:r,view:n})});return{_gStick:O(Se),...X("stickTop",e),...X("stickTopDistance",t)}}function kl({value:e,onChange:t,view:n}){const o=M(),r=L(),a=n==="desktop"||Ae(n,r)?null:Gt(n,ut(r)),s=a&&o?c=>o.onChangeMany(u=>{const f=Fl(n,u,c);return f===null?{[P(n,"stickTopDistance")]:c}:Object.keys(f).length?f:null}):t;return l("div",{className:"sf-field",children:ee({min:ne.min,max:ne.max,step:ne.step,value:a?null:typeof e=="number"?e:ne.fallback,...a?{placeholder:a.distance}:{},suffix:"px",ariaLabel:i("Distance from top"),onChange:s})})}function Ae(e,t){return e==="tablet"?Ko(t):Uo(t)}function Gt(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance}:{on:t.desktop,distance:t.desktopDistance}}function Fl(e,t,n){return e==="desktop"||Ae(e,t)?null:n===void 0?{}:{[P(e,"stickTop")]:!0,[P(e,"stickTopDistance")]:n}}function Al({value:e,onChange:t,labelId:n,view:o}){const r=L(),a=ut(r),s=o==="phone"?a.phone:o==="tablet"?a.tablet:e===!0,c=o==="phone"&&a.ownTablet,u=o==="desktop"?null:Gt(o,a),f=u?.on?`${u.distance}px`:i("Off");return l(x,{label:i(Se),labelId:n,icon:q(l(kn,{})),action:N(k,{children:[o!=="desktop"?l(w,{words:y()?.panel,label:i(Se),changed:Ae(o,r),detail:D(m=>i(m),f,c?"tablet":"desktop"),onReset:()=>t(void 0)}):null,l(he,{checked:s,onChange:t,ariaLabelledBy:n})]})})}const Mt="e.g. about";function ua(){return{_gAnchor:O("Anchor"),anchor:G({control:"plainText",label:"Name",placeholder:Mt},{type:"custom",render:({value:e,onChange:t})=>l(cn,{value:e,onChange:t,nameBox:(n,o)=>l(H,{value:n,onChange:o,label:"Name",placeholder:Mt,hideable:!1,markup:!1})})})}}function da(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:a,name:s})=>{const c=`${a??s??e}-datetime`,u=Date.parse(typeof o=="string"?o:"");return l(x,{label:i(e),icon:t,htmlFor:c,hint:n===void 0?void 0:i(n),children:l(so,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:f=>r(f?f.toISOString():"")})})}}}function pa(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:a,name:s})=>{const c=`${a??s??e}-date`;return l(x,{label:i(e),icon:t,htmlFor:c,hint:n===void 0?void 0:i(n),children:l(io,{id:c,value:jt(typeof o=="string"?o:null),onChange:u=>r(u?Xt(u):"")})})}}}function Ll(e,t,n,o){return{type:"custom",...I({},{...Q,label:e}),render:r=>{const{value:a,onChange:s,id:c,name:u}=r,f="follows"in r,m=r,p=typeof a=="boolean",d=typeof m.follows=="boolean"?m.follows:t,g=p?a:f?d:t,h=`${c??u??e}-label`,C=m.readOnly===!0,S=l(he,{checked:g,onChange:s,disabled:C,ariaLabelledBy:h});return l(x,{label:i(e),labelId:h,icon:n,hint:o===void 0?void 0:i(o),action:f?N(k,{children:[l(w,{words:y()?.panel,label:i(e),changed:p,detail:m.followsNoView?i(d?"On":"Off"):D(b=>i(b),i(d?"On":"Off"),m.followsView),disabled:C,onReset:()=>s(void 0)}),S]}):S})}}}function fa(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return l(it,{label:i("Background"),icon:l(In,{}),id:r,value:Pn(e),onChange:t})}}}function ha(e,t){return{type:"custom",...I({},{...Q,label:e}),render:({value:n,onChange:o,id:r})=>{const a=typeof n=="boolean"?n:t,s=`${r??e}-checkbox`;return l(x,{label:i(e),htmlFor:s,className:"sf-checkbox",action:l(oo,{id:s,checked:a,onChange:o})})}}}function ma(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>l(it,{label:i(e),icon:n,value:o||t,onChange:r})}}function ga(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return l(Nl,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function Nl({value:e,onChange:t,twin:n}){const{hex:o,n:r}=Bl(),a=v(o.toUpperCase(),i("Theme {n} background",{n:r}));if(n){const s=Bn(n.follows);return l(ge,{label:i("Fill"),icon:l(fe,{}),value:e,inherited:s??o,resetTo:D(c=>i(c),s?s.toUpperCase():a,n.view),onChange:t,onReset:()=>t(void 0)})}return l(ge,{label:i("Fill"),icon:l(fe,{}),value:e,inherited:o,resetTo:a,onChange:t,onReset:()=>t("")})}function Pl(e,t,n){if((e?.content??[]).some(s=>s?.props?.id===t))return oe(n);const r=Hn(e,t);if(r.length===0)return null;const a=oe(_t(n));if(a!==null)return a;for(let s=r.length-1;s>0;s-=1){const c=oe(_t(r[s].sectionAccent));if(c!==null)return c}return oe(r[0].sectionAccent)}function Bl(){const{colors:e,n:t}=Wt();return{hex:e.background,n:t}}function Wt(){const e=xt(B().theme),[t]=A("sectionAccent");let n=null;try{const{appState:r,selectedItem:a}=ce(c=>c),s=a?.props?.id?String(a.props.id):void 0;n=s?Pl(r?.data,s,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:er(e.themes[o]),n:o+1}}const Dl=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function vl({label:e,value:t,onChange:n,points:o=Dl}){const r=o.map(a=>({...a,label:i(a.label),...a.title?{title:i(a.title)}:null}));return l(no,{label:i(e),value:t,points:r,onChange:n})}function ba(){return Ft()}const xa={top:l(wn,{}),right:l(yn,{}),bottom:l(xn,{}),left:l(Sn,{})};function Sa(e,t,n,o,r,a,s){const c=p=>t.find(d=>d.value===p),u=p=>({value:p,label:"",disabled:!0,title:o}),f=p=>{const d=t.find(h=>h.cell===p);if(!d)return u(`missing-${p}`);const g=a?.[p];return g?{value:d.value,label:d.label,icon:g}:{value:d.value,label:d.label}},m=[u("corner-top-left"),f("top"),u("corner-top-right"),f("left"),u("centre"),f("right"),u("corner-bottom-left"),f("bottom"),u("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:d})=>{const g=t.some(h=>h.value===p)?p:n;return l(x,{label:i(e),icon:r,value:c(g)?.label?i(c(g).label):s?i(s):"",children:vl({label:e,value:g,onChange:d,points:m})})}}}function ya(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:a})=>l(Fo,{label:e,options:(a.options??t).map(s=>({...s,label:i(s.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:i(n)}:{}})}}function wa(e,t,n,o){return{type:"custom",options:t,fallback:n,...I({},{type:"select",label:e}),render:({value:r,onChange:a,field:s})=>l(Lo,{label:e,options:(s.options??t).map(c=>({...c,label:i(c.label)})),fallback:s.fallback??n,value:r,onChange:a,placeholder:o===void 0?void 0:i(o)})}}function Ca(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return l(e,{...r})}}}const _a=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function Ra(e,t,n){const o=Object.keys(De).map(r=>({label:De[r],value:r,picture:n[r]}));return{type:"custom",...I({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>l(Hl,{label:e,icon:t,options:o,onChange:r})}}function Hl({label:e,icon:t,options:n,onChange:o}){const r=M()?.values??{},a=Vt(r),s=zt(r);return l(x,{label:i(e),icon:q(t),hint:s==="frame-missing-image"?i("This video has no frame yet. The slide shows its image until one is made."):s==="frame-missing-surface"?i("This video has no frame yet. The slide shows its background colour until one is made."):s==="image-missing-frame"?i("No image yet. The slide shows the video's frame until you choose one."):s==="image-missing-surface"?i("No image yet. The slide shows its background colour until you choose one."):void 0,children:Ie({options:n,value:a,onChange:o,ariaLabel:e})})}function Oa(e,t,n,o={}){const r={type:"custom",[Me]:!0,render:({value:a,onChange:s,name:c})=>l(ko,{value:a||"",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?R("each",r):r}const Ta={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Gl(e){const t=i(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function Ea({value:e,onChange:t,label:n}){const o=e||{},r=M(),a=r?r.values!==r.node.props:!0,s=!!o.pending&&a,c=!!o.pending&&!a,u=!!Tr(Or()).geocode,f=Be(),m=(p,d)=>t({...o,[p]:d??void 0});return N(k,{children:[l(x,{label:i(n),icon:l(Ve,{}),action:u?l(me,{content:i("Find from the address (OpenStreetMap)"),children:l(rt,{"aria-label":i("Find from the address"),"aria-busy":s||void 0,disabled:s,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:l(Fn,{})})}):void 0,children:u&&o.status?l(un,{compact:!0,oneLine:!0,spaced:!1,status:s?"busy":o.ok&&!c?"found":"notfound",statusText:s?i("Finding…"):c?i(mo):i(o.status),hint:Gl(o)}):null}),l(x,{label:i("Enter by hand"),labelId:f,icon:l(Cn,{}),action:l(he,{checked:!!o.manual,onChange:p=>t({...o,manual:p}),ariaLabelledBy:f})}),o.manual&&l(x,{label:i("Latitude, longitude"),icon:l(Ve,{}),children:N("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[l(lt,{value:typeof o.lat=="number"?o.lat:null,onChange:p=>m("lat",p),min:-90,max:90,step:1e-4,placeholder:i("Latitude")}),l(lt,{value:typeof o.lng=="number"?o.lng:null,onChange:p=>m("lng",p),min:-180,max:180,step:1e-4,placeholder:i("Longitude")})]})})]})}function Ml(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,a)=>a===t?{text:n}:r)}function Ia(e,t){return e===null?null:t>e?e:null}function Ul(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 ka={label:"Ticker items",icon:l(En,{})};function Fa(e,t,n,o){return{type:"custom",[T]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...I({},{...Tt.textList,label:e}),render:({value:r,onChange:a})=>l(Kl,{label:e,icon:q(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:a,markup:o==="markup"})}}function Kl({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:a=!1}){const s=V(null),[c,u]=z(null),f=p=>p.map(d=>({text:d?.text??""})),m=p=>{const d=Ul(n,p,c);d===null&&(s.current=null),u(d),r(f(p))};return l(zn,{label:i(e),icon:t,noun:i("item"),items:n,onChange:m,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:a?l(st,{target:s,value:Ml(n,c),onChange:p=>r(Wl(n,c??-1,p)),disabled:c===null,label:c===null?i("Formatting — click a row first"):i("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,d,g)=>l("input",{type:"text",className:a&&c===d?"sf-list-marking":void 0,value:p?.text??"",placeholder:i(o),"aria-label":i("{label} {n}",{label:i(e),n:d+1}),onChange:h=>g({text:h.target.value}),onFocus:h=>{s.current=h.currentTarget,u(d)}})})}function Aa(e,t){const n=`${e.label} — row ${t+1}`;return G({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>l(H,{value:o,onChange:r,label:i("{label} — row {n}",{label:i(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function La(e){return{_gCards:O("Cards"),coverIndex:Z("Cover image",l(Tn,{}),To,String(Eo),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:qr("Image background",sr),cardImage:jl()}}function Na(){return{outline:Z("Card outline",l(An,{}),_o,Oo),indexBadge:Z("Card number",l(je,{}),Co,Ro),showBadge:Ll("Product badge",!0,l(Ze,{noun:"tag"}))}}function Pa(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...Q,label:ae.find(a=>a.id===r).label}),o=r=>I(go(Le),n(r));return{_gShowOnCard:O("Show on a card"),[Le]:I({type:"custom",render:()=>l($l,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(Le)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const Le="showCardPrice",ae=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function $l({rest:e}){const t=L(),n=Jr(),o=s=>typeof t[s]=="boolean"?t[s]:void 0,r=s=>o(s)??e[s],a=ae.some(({id:s})=>o(s)!==void 0&&o(s)!==e[s]);return l(Ne,{parts:ae,changed:a,shown:r,onPress:(s,c)=>n({[s]:c}),onReset:()=>n(Object.fromEntries(ae.map(({id:s})=>[s,void 0])))})}function Ba(e,t="display"){const n=F(t);return{[t]:R("desktop",{type:"custom",render:({value:o,onChange:r})=>l(Ne,{parts:e,changed:qn(o),shown:a=>Jn(o,a),onPress:(a,s)=>r(eo(o,a,s)),onReset:()=>r(void 0)})}),[n]:R("mobile",{type:"custom",render:({value:o,onChange:r})=>l(Xl,{parts:e,desktopKey:t,value:o,onChange:r})})}}function Ne({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:a,disabledReason:s}){const c=i("Display");return l(x,{label:c,icon:l(pn,{}),changed:t,action:l(w,{words:y()?.panel,label:c,changed:t,detail:a,onReset:r}),children:l(Yn,{label:c,items:e.map(u=>({id:u.id,label:i(u.label),shown:n(u.id),...s?{disabled:!0,disabledReason:i(s)}:{}})),onChange:o})})}function Xl({parts:e,desktopKey:t,value:n,onChange:o}){const r=L()[t];return l(Ne,{parts:e,changed:Qn(n),shown:a=>Zn(r,n,a),onPress:(a,s)=>o(to(n,a,s)),onReset:()=>o(yo),detail:i("the same as Desktop")})}function jl(){return kt("Card image",{min:W,max:Ke,step:Zt,hint:"Rounds the picture. The card's own corner is in Styles."})}function Da(){return Fe({sidesKey:"cornerSides",step:Qt,useFollowed:()=>W,mark:l(Vl,{label:en}),hint:i("Rounds the picture. Left alone it stays square.")})}function Vl({label:e,changed:t=!1,onReset:n=()=>{}}){return l(w,{words:y()?.panel,label:i(e),changed:t,onReset:n})}function va(){return{type:"custom",render:({value:e,onChange:t})=>l(Jl,{value:typeof e=="string"?e:"",onChange:t})}}function zl({layout:e,width:t}){return l("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:6,gridAutoFlow:"row dense",gap:2},children:rn(e).map(([n,o],r)=>l("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${n}`,gridRow:`span ${o}`}},r))})}const Yl={width:"3.5rem",height:"2.5rem"},ql=200;function Jl({value:e,onChange:t}){const[n,o]=z(null),[r,a]=z(4),s=V(null);$t(()=>{const d=s.current;if(!d||typeof ResizeObserver!="function")return;const g=()=>a(d.getBoundingClientRect().width>=ql?4:3);g();const h=new ResizeObserver(g);return h.observe(d),()=>h.disconnect()},[]);const c=e&&e in te?e:"",u=$e(n,c),f=$e(n,"").length,m=ln("no-symbol"),p=[{value:"",label:i("Not chosen"),icon:Ar(m,i("Not chosen"))},...u.map(d=>({value:d,label:i(te[d].label),icon:l(zl,{layout:te[d],width:40})}))];return l(x,{label:i("Layout"),icon:l(Rn,{}),value:c?i(te[c].label):void 0,children:l("div",{ref:s,style:{flex:"1 1 auto",minWidth:0},children:l(tt,{label:i("Layout"),value:c,options:p,onChange:t,columns:r,cell:Yl,header:N("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[l("span",{className:"text-2xs text-ink-faint",children:i("Photos in a row")}),l(Kn,{options:[{id:"all",label:i("All")},...nn.map(d=>({id:String(d),label:String(d)}))],value:n===null?"all":String(n),ariaLabel:i("Photos in a row"),onChange:d=>o(d==="all"?null:Number(d))}),l("span",{className:"text-2xs text-ink-faint",children:i("{n} of {total} layouts",{n:f,total:on.length})})]})})})})}export{Ur as BOUND_TO_POST,ks as BOUND_TO_POST_NOTE,vs as BUCKET_ICONS,Ta as CUSTOM_FIELD_MEDIA,Ea as CoordsField,Rt as DESKTOP_GAP_NOT_OVERLAP,Ne as DisplayRow,xa as EDGE_ARROWS,ao as FOCAL_DEFAULT,Dl as FOCAL_POINTS,ue as FOLD_FIELD_MARKER,vl as FocalPicker,Xs as GroupLabel,Kr as HIGHLIGHT_HINT,H as HidableTextField,Ge as LINK_FIELD_MARKER,xs as Label,Me as MEDIA_FIELD_MARKER,_a as MEDIA_TYPE_OPTIONS,Fs as NOT_BOUND_TO_POST,$s as PanelBand,jr as PanelNoteLine,bl as RowPropsContext,We as SCAFFOLD_FIELD_MARKER,Wa as SCALAR_TEXT_CONTROLS,Pr as SiteGapDefaultReset,ee as Slider,zr as Swatches,Ma as TEXT_CONTROL_KINDS,T as TEXT_FIELD_MARKER,ka as TICKER_ITEMS_ROW,Kl as TextListField,ie as WIDTH_LABEL,Mr as WidthDefaultReset,Ul as aimAfterListChange,ua as anchorFields,v as backTo,js as backgroundField,Qs as boxBlockSpacingField,na as boxColumnsFields,ga as boxFillField,gl as boxPhoneRowField,fl as boxShareField,ea as boxSharePhoneField,ta as boxShareTabletField,Pl as boxThemeIndexOf,Ms as bucketHeader,qs as buttonWordsEntryField,dl as cardCornersField,qr as cardImageBackgroundField,jl as cardImageField,La as cardMediaFields,Zs as cardShapeFields,Pa as cardShowFields,Na as cardStyleFields,ra as cellWidthFields,ha as checkbox,ma as colorInput,ys as containerDirectionField,Br as containerGapField,Dr as containerGapPhoneField,Ss as containerGapRows,vr as containerGapTabletField,Gl as coordsResultTip,Ps as copyText,At as cornerSidesField,Fe as cornersRowField,pa as date,da as dateTime,Ws as designGroupHeader,Ba as displayFields,Sa as edgePad,Ia as focusAfterRemove,ba as focusKeptField,Us as foldMarker,de as foldMetaOf,Vr as foldTitleOf,Ol as followedHeightPatch,Fl as followedStickPatch,va as galleryLayoutField,aa as heightFields,se as heightFollowedBy,ws as heroGroupPlacementPoints,He as hidableText,Xr as hintIsWhileTyping,Da as imageCornersField,Is as inOwnBox,Gs as isBucketHeader,Ft as keptBy,Bs as linkField,Ra as loadingShowsField,ya as multiSelect,fa as pageBackgroundField,Hs as panelNote,yl as phoneOverrideField,Ns as plainText,Ds as plainTextarea,kt as pxField,Ks as quietMarker,ve as readHidable,Ml as rowText,wa as searchSelect,Ys as sectionBorderField,tl as sectionCornersField,zs as sectionShapeFields,Vs as sectionThemeFields,Wl as setRowText,oa as sizeField,Ca as sourceField,la as spacingFields,ca as stickFields,ia as swapPadding,Js as templateField,As as text,Yt as textFieldIdentifier,Rs as textFieldOffPage,Ts as textFieldPanelOnly,Fa as textList,Aa as textListRowField,Ls as textarea,Ll as toggle,Oa as upload,Jr as useSelectedPatch,L as useSelectedProps,A as useSelectedSibling,Nr as useSiteGapDetail,sa as widthField,Es as withIdentifier,_s as withOffPage,Os as withPanelOnly,Cs as withScaffold};
@@ -1 +1 @@
1
- import{BOX_TYPE as m}from"../../../format/lib/document/container-blocks.js";import{cardsTemplateNodes as h}from"../../../format/lib/document/blocks/general/Cards/card-seed.js";import{SLOT_SECTION_SPECS as T}from"../../../render/lib/document/slot-specs.js";import{eyebrowLookFor as a}from"../../../format/lib/sections/section-eyebrow-look.js";import{SECTION_HEAD_TYPE as t,SPLITTABLE_SECTIONS as S,canSplitHead as E}from"../../../format/lib/sections/section-head-placement.js";import{layoutPresetFor as d}from"./text-layouts.js";function L(r,{nodeDefaults:i,newNodeId:o,sectionLabel:l,blockIsOffered:c}){const n=d(r);if(n)return n(i,o);if(E(r)&&c(m)&&c(t))return{type:m,props:{...i(m),id:o(m),direction:"column",name:`${l(r)} section`,content:[{type:t,props:{...i(t),id:o(t),...S[r]?.headStyle?{headStyle:S[r].headStyle}:{},...S[r]?.headRowGap?{rowGap:S[r].headRowGap}:{},...S[r]?.headDescriptionSize?{descriptionSize:S[r].headDescriptionSize}:{},...a(r)!==a(t)?{eyebrowLook:a(r)}:{}}},{type:r,props:{...i(r),id:o(r),headPlacement:"own-box",...e(r,o)}}]}};if(T[r]?.fixed===!0)return{type:r,props:{...i(r),id:o(r),layout:"boxes"}};const s=e(r,o);return Object.keys(s).length?{type:r,props:{...i(r),id:o(r),...s}}:null}function e(r,i){return r==="Cards"?{template:h(o=>i(o))}:{}}export{L as newSectionNode};
1
+ import{BOX_TYPE as a}from"../../../format/lib/document/container-blocks.js";import{cardsTemplateNodes as T}from"../../../format/lib/document/blocks/general/Cards/card-seed.js";import{ARTICLE_BODY_BLOCK as f,articleBodyTemplateNodes as h}from"../../../format/lib/document/article-body-seed.js";import{SLOT_SECTION_SPECS as p}from"../../../render/lib/document/slot-specs.js";import{eyebrowLookFor as e}from"../../../format/lib/sections/section-eyebrow-look.js";import{SECTION_HEAD_TYPE as m,SPLITTABLE_SECTIONS as t,canSplitHead as u}from"../../../format/lib/sections/section-head-placement.js";import{layoutPresetFor as E}from"./text-layouts.js";function b(r,{nodeDefaults:i,newNodeId:o,sectionLabel:l,blockIsOffered:S}){const c=E(r);if(c)return c(i,o);if(u(r)&&S(a)&&S(m))return{type:a,props:{...i(a),id:o(a),direction:"column",name:`${l(r)} section`,content:[{type:m,props:{...i(m),id:o(m),...t[r]?.headStyle?{headStyle:t[r].headStyle}:{},...t[r]?.headRowGap?{rowGap:t[r].headRowGap}:{},...t[r]?.headDescriptionSize?{descriptionSize:t[r].headDescriptionSize}:{},...e(r)!==e(m)?{eyebrowLook:e(r)}:{}}},{type:r,props:{...i(r),id:o(r),headPlacement:"own-box",...s(r,o)}}]}};if(p[r]?.fixed===!0)return{type:r,props:{...i(r),id:o(r),layout:"boxes"}};const n=s(r,o);return Object.keys(n).length?{type:r,props:{...i(r),id:o(r),...n}}:null}function s(r,i){return r==="Cards"?{template:T(o=>i(o))}:r===f?{template:h(o=>i(o))}:{}}export{b as newSectionNode};
@@ -1 +1 @@
1
- import{convertSection as S,pressesAsBox as m,SECTION_TO_BOX_PRESS as E,sectionToBoxRow as l}from"../../../render/lib/sections/section-to-box.js";import{SECTION_PRESETS as y,presetFor as g}from"../../../format/lib/sections/section-presets.js";import{GENERAL_SECTION_TO_BOX as _}from"../../../render/lib/document/blocks/general/section-to-box-rows.js";import{statsBoxSeed as O,statsPressSeed as k,statsSeedRows as N}from"../../../render/lib/document/blocks/general/section-to-box-rows-stats.js";import{logosPressStarter as B}from"../../../render/lib/document/blocks/general/section-to-box-rows-logos.js";import{pageHeaderPressStarter as L}from"../../../render/lib/document/blocks/general/section-to-box-rows-pageheader.js";import{seedNodes as R}from"../../../format/lib/document/seed-parts.js";import{propsWithPartStyleValue as j}from"../../../render/lib/document/part-styles.js";import{isNodeList as a}from"efficient-easel/data";const w=Object.keys(_),P={Logos:B,DocMasthead:L};function u(t,r,o){const e={};for(const s of Object.keys(r(t.type)))e[s]=void 0;for(const[s,n]of Object.entries(t.props))e[s]=a(n)?n.map(p=>u(p,r,o)):n;return e.id=o(t.type),{type:t.type,props:e}}function v(t,r,o=0,e=()=>({})){return(s,n)=>{const{nodes:p}=S({type:t,props:{...s(t),...e(),id:n(t)}},r,{press:!0});return u(p[o],s,n)}}const A={Stats:C};function C(){const t=l("StatsParagraph");return t?(r,o)=>{const{nodes:e}=S({type:"StatsParagraph",props:{...r("StatsParagraph"),...k(),id:o("StatsParagraph")}},t),s=e[0],n=a(s.props.content)?s.props.content.filter(f=>f.props?.cardStyle===void 0):[],p=b(O(N(),"table")),c=n.map(T),i=u({...s,props:{...s.props,content:[...c,p]}},r,o);return{...i,props:{...i.props,name:"Stats section"}}}:null}function T(t){if(t.props?.name==="Words"){const r=a(t.props.content)?t.props.content.map(U):t.props.content;return{...t,props:{...t.props,widthFitPhone:"fill",content:r}}}return a(t.props?.content)?{...t,props:{...t.props,content:t.props.content.map(T)}}:t}function U(t){return t.type!=="Text"?t:{...t,props:j({...t.props,alignTablet:"left"},"text","alignTablet","left")}}const b=t=>R([t],(r,o)=>`${r}-seed-${o}`)[0];function W(t,r){if(!m(t,r))return null;const o=A[t];if(o)return o();const e=l(t);return e?v(t,e,0,P[t]):null}function X(t){return(r,o)=>{const e=s=>{if(s.type==="Stats"){const c=u(b(O([],"list")),r,o);return{...c,props:{...c.props,name:"Numbers"}}}let n=!1;const p={};for(const[c,i]of Object.entries(s.props))if(a(i)){const f=i.map(e);n||=f.some((x,h)=>x!==i[h]),p[c]=f}else p[c]=i;return n?{type:s.type,props:p}:s};return e(t(r,o))}}function z(t,r=E){const o=g(t);return o?X(o):W(t,r)}function I(){return[...Object.keys(y),...w.filter(t=>m(t)),...Object.keys(P).filter(t=>m(t))]}export{P as MERGE_LAYOUTS,w as TEXT_LAYOUTS,v as conversionPreset,z as layoutPresetFor,I as layoutTypes};
1
+ import{convertSection as l,pressesAsBox as m,SECTION_TO_BOX_PRESS as E,sectionToBoxRow as S}from"../../../render/lib/sections/section-to-box.js";import{SECTION_PRESETS as y,presetFor as g}from"../../../format/lib/sections/section-presets.js";import{GENERAL_SECTION_TO_BOX as _}from"../../../render/lib/document/blocks/general/section-to-box-rows.js";import{statsBoxSeed as T,statsPressSeed as k,statsSeedRows as N}from"../../../render/lib/document/blocks/general/section-to-box-rows-stats.js";import{logosPressStarter as B}from"../../../render/lib/document/blocks/general/section-to-box-rows-logos.js";import{pageHeaderPressStarter as L}from"../../../render/lib/document/blocks/general/section-to-box-rows-pageheader.js";import{milestoneTimelinePressStarter as R,storyTimelinePressStarter as j}from"../../../render/lib/document/blocks/general/section-to-box-rows-timeline.js";import{seedNodes as w}from"../../../format/lib/document/seed-parts.js";import{propsWithPartStyleValue as v}from"../../../render/lib/document/part-styles.js";import{isNodeList as a}from"efficient-easel/data";const A=Object.keys(_),P={Logos:B,DocMasthead:L,Timeline:j,TimelineTrack:R};function u(t,r,e){const o={};for(const s of Object.keys(r(t.type)))o[s]=void 0;for(const[s,n]of Object.entries(t.props))o[s]=a(n)?n.map(p=>u(p,r,e)):n;return o.id=e(t.type),{type:t.type,props:o}}function C(t,r,e=0,o=()=>({})){return(s,n)=>{const{nodes:p}=l({type:t,props:{...s(t),...o(),id:n(t)}},r,{press:!0});return u(p[e],s,n)}}const U={Stats:W};function W(){const t=S("StatsParagraph");return t?(r,e)=>{const{nodes:o}=l({type:"StatsParagraph",props:{...r("StatsParagraph"),...k(),id:e("StatsParagraph")}},t),s=o[0],n=a(s.props.content)?s.props.content.filter(f=>f.props?.cardStyle===void 0):[],p=b(T(N(),"table")),i=n.map(O),c=u({...s,props:{...s.props,content:[...i,p]}},r,e);return{...c,props:{...c.props,name:"Stats section"}}}:null}function O(t){if(t.props?.name==="Words"){const r=a(t.props.content)?t.props.content.map(X):t.props.content;return{...t,props:{...t.props,widthFitPhone:"fill",content:r}}}return a(t.props?.content)?{...t,props:{...t.props,content:t.props.content.map(O)}}:t}function X(t){return t.type!=="Text"?t:{...t,props:v({...t.props,alignTablet:"left"},"text","alignTablet","left")}}const b=t=>w([t],(r,e)=>`${r}-seed-${e}`)[0];function G(t,r){if(!m(t,r))return null;const e=U[t];if(e)return e();const o=S(t);return o?C(t,o,0,P[t]):null}function M(t){return(r,e)=>{const o=s=>{if(s.type==="Stats"){const i=u(b(T([],"list")),r,e);return{...i,props:{...i.props,name:"Numbers"}}}let n=!1;const p={};for(const[i,c]of Object.entries(s.props))if(a(c)){const f=c.map(o);n||=f.some((x,h)=>x!==c[h]),p[i]=f}else p[i]=c;return n?{type:s.type,props:p}:s};return o(t(r,e))}}function K(t,r=E){const e=g(t);return e?M(e):G(t,r)}function Q(){return[...Object.keys(y),...A.filter(t=>m(t)),...Object.keys(P).filter(t=>m(t))]}export{P as MERGE_LAYOUTS,A as TEXT_LAYOUTS,C as conversionPreset,K as layoutPresetFor,Q as layoutTypes};