efficient-web-builder 54.0.0 → 55.1.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 (187) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/editor/components/BlockGapField.js +1 -1
  3. package/dist/editor/components/CornersField.js +1 -1
  4. package/dist/editor/components/SectionWidthRows.d.ts +2 -1
  5. package/dist/editor/components/SectionWidthRows.js +1 -1
  6. package/dist/editor/components/SideSpaceField.js +1 -1
  7. package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
  8. package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
  9. package/dist/editor/lib/document/blocks/general/CardList/fields.d.ts +2 -0
  10. package/dist/editor/lib/document/blocks/general/CardList/fields.js +1 -0
  11. package/dist/editor/lib/document/blocks/general/Eyebrow/fields.js +1 -1
  12. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  13. package/dist/editor/lib/document/blocks/general/Hero/fields.js +1 -1
  14. package/dist/editor/lib/document/blocks/general/HeroSingle/fields.js +1 -1
  15. package/dist/editor/lib/document/blocks/general/LogoBlock/fields.js +1 -1
  16. package/dist/editor/lib/document/blocks/general/Split/fields.js +1 -1
  17. package/dist/editor/lib/document/blocks/general/Text/fields.js +1 -1
  18. package/dist/editor/lib/document/blocks/general/TitleWithButtons/fields.js +1 -1
  19. package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
  20. package/dist/editor/lib/document/blocks/general/index.js +1 -1
  21. package/dist/editor/lib/document/blocks/hero-shared-fields.d.ts +29 -2
  22. package/dist/editor/lib/document/blocks/hero-shared-fields.js +1 -1
  23. package/dist/editor/lib/document/blocks/shared-fields.d.ts +1 -5
  24. package/dist/editor/lib/document/blocks/shared-fields.js +1 -1
  25. package/dist/editor/lib/document/box-accordion-seed.d.ts +3 -0
  26. package/dist/editor/lib/document/box-accordion-seed.js +1 -0
  27. package/dist/editor/lib/document/box-fields.d.ts +11 -0
  28. package/dist/editor/lib/document/box-fields.js +1 -1
  29. package/dist/editor/lib/document/card-row-fields.js +1 -1
  30. package/dist/editor/lib/document/controls.d.ts +3 -1
  31. package/dist/editor/lib/document/controls.js +1 -1
  32. package/dist/editor/lib/document/field-groups.js +1 -1
  33. package/dist/editor/lib/document/mirror-cards-field.d.ts +1 -0
  34. package/dist/editor/lib/document/mirror-cards-field.js +1 -1
  35. package/dist/editor/lib/document/passes/inspector.js +1 -1
  36. package/dist/editor/lib/document/section-own-width-fields.d.ts +4 -0
  37. package/dist/editor/lib/document/section-own-width-fields.js +1 -0
  38. package/dist/editor/lib/document/shape-picker.d.ts +8 -0
  39. package/dist/editor/lib/document/shape-picker.js +1 -1
  40. package/dist/format/lib/content/block-align.d.ts +4 -1
  41. package/dist/format/lib/content/block-align.js +1 -1
  42. package/dist/format/lib/content/box-background.d.ts +19 -0
  43. package/dist/format/lib/content/box-background.js +1 -1
  44. package/dist/format/lib/content/box-layout.d.ts +7 -0
  45. package/dist/format/lib/content/box-layout.js +1 -1
  46. package/dist/format/lib/content/box-phone-place.d.ts +3 -3
  47. package/dist/format/lib/content/box-phone-place.js +1 -1
  48. package/dist/format/lib/content/box-separator.js +1 -1
  49. package/dist/format/lib/content/box-shadow.d.ts +4 -0
  50. package/dist/format/lib/content/box-shadow.js +1 -1
  51. package/dist/format/lib/content/box-shape.d.ts +1 -1
  52. package/dist/format/lib/content/box-shape.js +1 -1
  53. package/dist/format/lib/content/card-state.d.ts +2 -0
  54. package/dist/format/lib/content/card-state.js +1 -1
  55. package/dist/format/lib/content/card-template.d.ts +11 -2
  56. package/dist/format/lib/content/card-template.js +1 -1
  57. package/dist/format/lib/content/container-direction.d.ts +1 -1
  58. package/dist/format/lib/content/container-direction.js +1 -1
  59. package/dist/format/lib/content/gallery-card-layout.d.ts +16 -1
  60. package/dist/format/lib/content/gallery-card-layout.js +1 -1
  61. package/dist/format/lib/content/image-aspect.d.ts +2 -0
  62. package/dist/format/lib/content/image-aspect.js +1 -1
  63. package/dist/format/lib/content/page-width.d.ts +3 -0
  64. package/dist/format/lib/content/page-width.js +1 -1
  65. package/dist/format/lib/content/phone-focus.js +1 -1
  66. package/dist/format/lib/content/picture-focus-rows.js +1 -0
  67. package/dist/format/lib/content/section-height.d.ts +31 -2
  68. package/dist/format/lib/content/section-height.js +1 -1
  69. package/dist/format/lib/content/section-min-height.d.ts +2 -1
  70. package/dist/format/lib/content/section-min-height.js +1 -1
  71. package/dist/format/lib/content/section-width.d.ts +38 -1
  72. package/dist/format/lib/content/section-width.js +1 -1
  73. package/dist/format/lib/content/site-gutter.d.ts +2 -0
  74. package/dist/format/lib/content/site-gutter.js +1 -1
  75. package/dist/format/lib/content/view-overrides.d.ts +7 -0
  76. package/dist/format/lib/content/view-overrides.js +1 -0
  77. package/dist/format/lib/content/view-var-split.d.ts +11 -0
  78. package/dist/format/lib/content/view-var-split.js +1 -0
  79. package/dist/format/lib/document/blocks/general/CardList/item-seed.d.ts +4 -0
  80. package/dist/format/lib/document/blocks/general/CardList/item-seed.js +1 -0
  81. package/dist/format/lib/document/blocks/general/CardList/meta.d.ts +8 -0
  82. package/dist/format/lib/document/blocks/general/CardList/meta.js +1 -0
  83. package/dist/format/lib/document/blocks/general/Flex/meta.d.ts +4 -0
  84. package/dist/format/lib/document/blocks/general/Flex/meta.js +1 -1
  85. package/dist/format/lib/document/blocks/general/metas.d.ts +1 -0
  86. package/dist/format/lib/document/blocks/general/metas.js +1 -1
  87. package/dist/format/lib/document/general-order.d.ts +1 -1
  88. package/dist/format/lib/document/general-order.js +1 -1
  89. package/dist/format/lib/document/passes/types.d.ts +3 -0
  90. package/dist/format/lib/document/section-catalog.js +1 -1
  91. package/dist/format/lib/editor-words-catalogue.d.ts +12 -0
  92. package/dist/format/lib/editor-words-catalogue.js +5 -5
  93. package/dist/format/lib/fit-words.d.ts +8 -0
  94. package/dist/format/lib/fit-words.js +23 -12
  95. package/dist/format/lib/markup.d.ts +1 -0
  96. package/dist/format/lib/markup.js +2 -2
  97. package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
  98. package/dist/format/lib/sections/intro-bleed-layout.d.ts +1 -0
  99. package/dist/format/lib/sections/intro-bleed-layout.js +1 -1
  100. package/dist/format/lib/source-rules/padding-units-declared.d.ts +2 -0
  101. package/dist/format/lib/source-rules/padding-units-declared.js +6 -0
  102. package/dist/render/components/AccordionMark.d.ts +4 -0
  103. package/dist/render/components/AccordionMark.js +1 -0
  104. package/dist/render/components/BoxAccordionRow.d.ts +7 -0
  105. package/dist/render/components/BoxAccordionRow.js +1 -0
  106. package/dist/render/components/BoxTabPaneContext.d.ts +3 -1
  107. package/dist/render/components/BoxTabPaneContext.js +1 -1
  108. package/dist/render/components/BoxTabs.js +1 -1
  109. package/dist/render/components/ButtonBlock.d.ts +1 -0
  110. package/dist/render/components/ButtonBlock.js +1 -1
  111. package/dist/render/components/CardRowContext.d.ts +3 -2
  112. package/dist/render/components/CardRowContext.js +1 -1
  113. package/dist/render/components/Divider.js +1 -1
  114. package/dist/render/components/Eyebrow.d.ts +2 -1
  115. package/dist/render/components/Eyebrow.js +1 -1
  116. package/dist/render/components/FAQ.js +1 -1
  117. package/dist/render/components/Flex.d.ts +20 -2
  118. package/dist/render/components/Flex.js +1 -1
  119. package/dist/render/components/HeroSection.d.ts +4 -1
  120. package/dist/render/components/HeroSection.js +1 -1
  121. package/dist/render/components/HeroSingle.d.ts +4 -1
  122. package/dist/render/components/HeroSingle.js +1 -1
  123. package/dist/render/components/HeroSlide.d.ts +1 -0
  124. package/dist/render/components/HeroSlide.js +1 -1
  125. package/dist/render/components/ImageBlock.js +1 -1
  126. package/dist/render/components/IntroBleed.js +1 -1
  127. package/dist/render/components/LogoBlock.d.ts +1 -0
  128. package/dist/render/components/LogoBlock.js +1 -1
  129. package/dist/render/components/Logos.js +1 -1
  130. package/dist/render/components/ProcessSteps.d.ts +1 -0
  131. package/dist/render/components/ProcessSteps.js +1 -1
  132. package/dist/render/components/SiteGutterFrame.d.ts +18 -1
  133. package/dist/render/components/SiteGutterFrame.js +1 -1
  134. package/dist/render/components/Split.d.ts +2 -1
  135. package/dist/render/components/Split.js +1 -1
  136. package/dist/render/components/Text.d.ts +2 -1
  137. package/dist/render/components/Text.js +1 -1
  138. package/dist/render/components/TitleWithButtons.d.ts +2 -1
  139. package/dist/render/components/TitleWithButtons.js +1 -1
  140. package/dist/render/lib/content/block-size.d.ts +2 -6
  141. package/dist/render/lib/content/block-size.js +1 -1
  142. package/dist/render/lib/content/box-shared-columns.d.ts +2 -2
  143. package/dist/render/lib/content/box-shared-columns.js +1 -1
  144. package/dist/render/lib/content/box-stack-line.d.ts +15 -0
  145. package/dist/render/lib/content/box-stack-line.js +1 -0
  146. package/dist/render/lib/content/button-look.js +1 -1
  147. package/dist/render/lib/content/empty-hides.d.ts +8 -0
  148. package/dist/render/lib/content/empty-hides.js +1 -0
  149. package/dist/render/lib/content/section-edge.d.ts +1 -1
  150. package/dist/render/lib/content/section-edge.js +1 -1
  151. package/dist/render/lib/content/section-padding.d.ts +17 -3
  152. package/dist/render/lib/content/section-padding.js +1 -1
  153. package/dist/render/lib/content/view-values.d.ts +1 -7
  154. package/dist/render/lib/content/view-values.js +1 -1
  155. package/dist/render/lib/document/blocks/general/CardList/render.d.ts +2 -0
  156. package/dist/render/lib/document/blocks/general/CardList/render.js +1 -0
  157. package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
  158. package/dist/render/lib/document/blocks/general/Hero/render.js +1 -1
  159. package/dist/render/lib/document/blocks/general/HeroSingle/render.js +1 -1
  160. package/dist/render/lib/document/blocks/general/HeroSlide/render.js +1 -1
  161. package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
  162. package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
  163. package/dist/render/lib/document/blocks/general/renders.d.ts +1 -0
  164. package/dist/render/lib/document/blocks/general/renders.js +1 -1
  165. package/dist/render/lib/document/blocks/general/section-head-looks.d.ts +1 -0
  166. package/dist/render/lib/document/blocks/general/section-head-looks.js +2 -2
  167. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  168. package/dist/render/lib/document/blocks/general/section-to-box-rows-docbody.js +2 -2
  169. package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.js +1 -1
  170. package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -1
  171. package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +1 -1
  172. package/dist/render/lib/document/blocks/general/section-to-box-rows-pageheader.js +1 -1
  173. package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
  174. package/dist/render/lib/document/head-core-boxes.d.ts +1 -0
  175. package/dist/render/lib/document/head-core-boxes.js +1 -0
  176. package/dist/render/lib/document/page-render.js +1 -1
  177. package/dist/render/lib/document/passes/block-size.js +1 -1
  178. package/dist/render/lib/document/passes/clickable-parts.js +1 -1
  179. package/dist/render/lib/document/passes/head-core.d.ts +3 -0
  180. package/dist/render/lib/document/passes/head-core.js +1 -0
  181. package/dist/render/lib/document/passes/index.js +1 -1
  182. package/dist/render/lib/document/passes/section-theme.js +1 -1
  183. package/dist/render/lib/document/passes/section-width.js +1 -1
  184. package/dist/render/lib/sections/section-to-box.js +1 -1
  185. package/package.json +5 -5
  186. package/dist/render/lib/content/picture-focus-rows.js +0 -1
  187. /package/dist/{render → format}/lib/content/picture-focus-rows.d.ts +0 -0
@@ -1 +1 @@
1
- import{createElement as t}from"react";import{SettingsDefaultReset as A,SettingsField as P}from"efficient-easel/panel";import{boxFieldBuilders as O,describedAs as R,iconOf as I,onDesktopWords as V}from"efficient-easel/screen/lib/document/box-fields";import{IconPicker as C,Tooltip as E,useShellStrings as G}from"efficient-shell/ui";import{editorEaselWords as L,say as i}from"../../../format/lib/editor-words.js";const h=o=>i(o),l=O(h),z=l.slider,K=l.select,M=l.Segmented,Q=l.segmented,U=l.alignmentField,X=l.alignmentFields,Z=l.blockAlignmentField,$=l.blockAlignmentFields,ee=l.boxJustifyField,ne=l.boxAlignField,le=l.boxWrapField,oe=l.directionField,te=l.gapField,ie=l.placementField,se=l.PlacementGridView,ce=l.positionFields,de=l.sidesPaddingFields,D={width:"3.5rem",height:"2.75rem"};function J({value:o}){return G().iconNames[o]??o}function B(o,s,c){return t(E,{content:c,className:"sf-pick-tip",children:t("span",{className:"sf-pick"},t("span",{className:"sf-pick-pic"},o),t("span",{className:"sf-pick-cap"},s))})}function ae(o,s){return t("span",{className:"sf-pick"},t("span",{className:"sf-pick-pic"},o),t("span",{className:"sf-pick-cap sf-pick-cap-closed"},s))}function re(o,s,c,f,d={}){const k=e=>c.some(a=>a.value===e),r=e=>d.resolve?d.resolve(e):k(e)?e:void 0,u=c.map(e=>({value:e.value,...e.label===void 0?{}:{label:e.label},...e.showWhen?{showWhen:e.showWhen}:{}}));return{type:"custom",...R({},{type:"radio",label:o,options:u}),options:u,render:e=>{const{value:a,onChange:m,field:F}=e,g=n=>n.label===void 0?t(J,{value:n.value}):i(n.label),x=F?.options,v=c.filter(n=>!x||x.some(W=>W.value===n.value)).map(n=>({value:n.value,...n.label===void 0?{}:{label:i(n.hint??n.label)},icon:B(n.picture,g(n),n.hint===void 0?g(n):i(n.hint))})),b="follows"in e,p=b?r(d.phoneRest?d.phoneRest(e.follows):e.follows)??f:void 0,N=F?.currentValue,y=r(a)??p??r(N)??f,S=a!=null&&a!=="",w=p===void 0?void 0:c.find(n=>n.value===p);return t(P,{label:i(o),icon:I(s),action:b?t(A,{words:L()?.panel,label:i(o),changed:S,detail:w?.label!==void 0?V(h,i(w.label),e.followsView):void 0,disabled:e.readOnly===!0,onReset:()=>m(void 0)}):void 0},t(C,{label:i(o),value:y,options:v,onChange:m,columns:d.columns,cell:d.cell??D,tooltips:!1,disabled:e.readOnly===!0}))}}}export{se as PlacementGridView,M as Segmented,J as ShellIconWord,U as alignmentField,X as alignmentFields,Z as blockAlignmentField,$ as blockAlignmentFields,ne as boxAlignField,ee as boxJustifyField,le as boxWrapField,oe as directionField,te as gapField,re as iconPickerRow,B as pickerCellIcon,ae as pickerNoneIcon,ie as placementField,ce as positionFields,h as rowSay,Q as segmented,K as select,de as sidesPaddingFields,z as slider};
1
+ import{createElement as t}from"react";import{SettingsDefaultReset as A,SettingsField as P}from"efficient-easel/panel";import{boxFieldBuilders as W,describedAs as I,iconOf as O,onDesktopWords as G}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS as R}from"efficient-easel/screen/lib/content/length-units";import{IconPicker as C,Tooltip as D,useShellStrings as E}from"efficient-shell/ui";import{editorEaselWords as L,say as s}from"../../../format/lib/editor-words.js";const w=l=>s(l),T=R,o=W(w,{paddingUnits:T}),M=o.slider,Q=o.select,X=o.Segmented,Z=o.segmented,$=o.alignmentField,ee=o.alignmentFields,ne=o.blockAlignmentField,oe=o.blockAlignmentFields,le=o.boxJustifyField,te=o.boxAlignField,ie=o.boxWrapField,se=o.directionField,ce=o.gapField,de=o.placementField,re=o.PlacementGridView,ae=o.positionFields,pe=o.sidesPaddingFields,V={width:"3.5rem",height:"2.75rem"};function U({value:l}){return E().iconNames[l]??l}function _(l,i,e){return t(D,{content:e,className:"sf-pick-tip",children:t("span",{className:"sf-pick"},t("span",{className:"sf-pick-pic"},l),t("span",{className:"sf-pick-cap"},i))})}function H(l){const i=e=>e.label===void 0?t(U,{value:e.value}):s(e.label);return l.map(e=>({value:e.value,...e.label===void 0?{}:{label:s(e.hint??e.label)},icon:_(e.picture,i(e),e.hint===void 0?i(e):s(e.hint))}))}function fe(l,i){return t("span",{className:"sf-pick"},t("span",{className:"sf-pick-pic"},l),t("span",{className:"sf-pick-cap sf-pick-cap-closed"},i))}function ue(l,i,e,f,c={}){const h=n=>e.some(d=>d.value===n),r=n=>c.resolve?c.resolve(n):h(n)?n:void 0,u=e.map(n=>({value:n.value,...n.label===void 0?{}:{label:n.label},...n.showWhen?{showWhen:n.showWhen}:{}}));return{type:"custom",...I({},{type:"radio",label:l,options:u}),options:u,render:n=>{const{value:d,onChange:m,field:x}=n,F=x?.options,k=H(e.filter(p=>!F||F.some(y=>y.value===p.value))),g="follows"in n,a=g?r(c.phoneRest?c.phoneRest(n.follows):n.follows)??f:void 0,v=x?.currentValue,N=r(d)??a??r(v)??f,S=d!=null&&d!=="",b=a===void 0?void 0:e.find(p=>p.value===a);return t(P,{label:s(l),icon:O(i),action:g?t(A,{words:L()?.panel,label:s(l),changed:S,detail:b?.label!==void 0?G(w,s(b.label),n.followsView):void 0,disabled:n.readOnly===!0,onReset:()=>m(void 0)}):void 0},t(C,{label:s(l),value:N,options:k,onChange:m,columns:c.columns,cell:c.cell??V,tooltips:!1,disabled:n.readOnly===!0}))}}}export{T as PADDING_UNITS,re as PlacementGridView,X as Segmented,U as ShellIconWord,$ as alignmentField,ee as alignmentFields,ne as blockAlignmentField,oe as blockAlignmentFields,te as boxAlignField,le as boxJustifyField,ie as boxWrapField,se as directionField,ce as gapField,ue as iconPickerRow,_ as pickerCellIcon,H as pickerCellsOf,fe as pickerNoneIcon,de as placementField,ae as positionFields,w as rowSay,Z as segmented,Q as select,pe as sidesPaddingFields,M as slider};
@@ -1 +1 @@
1
- import{jsx as x}from"react/jsx-runtime";import{ListIcon as A}from"efficient-easel/icons";import{FieldGlyph as C}from"../../components/FieldGlyph.js";import{cardTemplateFieldsOf as E,cardTemplateOwner as S}from"../../../format/lib/content/card-template.js";import{recordRowFields as h}from"../../../format/lib/content/record-row.js";import{recordTypesRevision as F}from"../../../format/lib/content/record-types.js";import{editorRecordType as O}from"../../../format/lib/document/editor-page-context.js";import{blockSourcesRevision as $,declaredBlockSource as j}from"../../../format/lib/content/block-sources.js";import{select as v}from"./box-fields.js";import{withShowWhen as D}from"../../../format/lib/document/show-when-attach.js";function b(o){const e=o?.data?.root,t=O(e?.props)??"";return t&&h(t,"text").length?t:""}const g="outsideCardTemplate",K={not:{context:g,is:!0}},H={[g]:(o,e)=>{const t=S(e.appState,o.props?.id);if(t!==void 0)return t===null&&!b(e.appState)}};function J(o,e){const t=e==="link"?x(C,{noun:"link"}):x(A,{}),n={...v(o,t,[{label:"Typed here",value:""}],""),cardRowKind:e};return D(n,K)}function M(o){return!!(o&&typeof o=="object"&&"cardRowKind"in o)}const k=new WeakMap;function Q(o,e,t){const n=Object.keys(o).filter(r=>M(o[r]));if(!n.length)return o;const l=e.props??{},p=S(t.appState,l.id),m=typeof p?.type=="string"?p.type:"",c=n.map(r=>typeof l[r]=="string"?l[r].trim():""),_=j(p?.props),f=p?"":b(t.appState),y=`${m}\0${_}\0${$()}\0${f}\0${F()}\0${c.join("\0")}`;let s=k.get(o);s||k.set(o,s=new Map);const T=s.get(y);if(T)return T;const i={...o};return n.forEach((r,a)=>{const d=o[r],w=m?E(p,d.cardRowKind):h(f,d.cardRowKind);if(!m&&f&&!w.length&&!c[a]){delete i[r];return}const R=c[a]&&!w.some(u=>u.key===c[a])?c[a]:"";i[r]={...d,options:[...d.options,...w.map(u=>({label:u.label,value:u.key})),...R?[{label:R,value:R}]:[]]}}),s.set(y,i),i}export{H as CARD_ROW_FACTS,K as IN_CARD_TEMPLATE,g as OUTSIDE_CARD_TEMPLATE,J as cardRowField,Q as cardRowFields};
1
+ import{jsx as _}from"react/jsx-runtime";import{ListIcon as D}from"efficient-easel/icons";import{FieldGlyph as I}from"../../components/FieldGlyph.js";import{CARD_LIST_TYPE as b,cardListFieldsOf as M,cardListShows as P,cardTemplateFieldsOf as W,cardTemplateOwner as S}from"../../../format/lib/content/card-template.js";import{recordRowFields as k}from"../../../format/lib/content/record-row.js";import{recordTypesRevision as B}from"../../../format/lib/content/record-types.js";import{editorRecordType as $}from"../../../format/lib/document/editor-page-context.js";import{blockSourcesRevision as G,declaredBlockSource as A}from"../../../format/lib/content/block-sources.js";import{select as N}from"./box-fields.js";import{withShowWhen as U}from"../../../format/lib/document/show-when-attach.js";function C(t){const e=t?.data?.root,o=$(e?.props)??"";return o&&k(o,"text").length?o:""}const E="outsideCardTemplate",Y={not:{context:E,is:!0}},rt={[E]:(t,e)=>{const o=S(e.appState,t.props?.id);if(o!==void 0)return o===null&&!C(e.appState)}};function nt(t,e){const o=e==="link"?_(I,{noun:"link"}):_(D,{}),a={...N(t,o,[{label:"Typed here",value:""}],""),cardRowKind:e};return U(a,Y)}function q(t){return!!(t&&typeof t=="object"&&"cardRowKind"in t)}const F=new WeakMap;function pt(t,e,o){const a=Object.keys(t).filter(n=>q(t[n]));if(!a.length)return t;const m=e.props??{},r=S(o.appState,m.id),d=typeof r?.type=="string"?r.type:"",c=a.map(n=>typeof m[n]=="string"?m[n].trim():""),K=A(r?.props),s=d===b?S(o.appState,r?.props?.id):null,O=s?P(r?.props,s.type):"",L=s?A(s.props):"",j=s?`${String(s.type??"")}\0${L}`:"",w=r?"":C(o.appState),h=[d,K,O,j,G(),w,B(),...c].join("\0");let u=F.get(t);u||F.set(t,u=new Map);const x=u.get(h);if(x)return x;const f={...t};return a.forEach((n,l)=>{const i=t[n],y=d===b?M(o.appState,r,i.cardRowKind):d?W(r,i.cardRowKind):k(w,i.cardRowKind);if(!d&&w&&!y.length&&!c[l]){delete f[n];return}const R=c[l]&&!y.some(p=>p.key===c[l])?c[l]:"",g=i.cardRowKind==="list",v=(p,T)=>g&&T===0&&p.key!==c[l]?"":p.key;f[n]={...i,options:[...g?[]:i.options,...y.map((p,T)=>({label:p.label,value:v(p,T)})),...R?[{label:R,value:R}]:[]]}}),u.set(h,f),f}export{rt as CARD_ROW_FACTS,Y as IN_CARD_TEMPLATE,E as OUTSIDE_CARD_TEMPLATE,nt as cardRowField,pt as cardRowFields};
@@ -141,7 +141,7 @@ export declare function Swatches({ swatches, current, onPick, names, }: {
141
141
  export declare function backgroundField(label: string, builtIn: SectionBackground, followsBand?: boolean): CustomField<SectionBackground>;
142
142
  export declare function cardImageBackgroundField(label: string, builtIn: string): CustomField<unknown>;
143
143
  export declare function sectionThemeFields(readValue?: (v: unknown) => unknown, followLabel?: string): Record<string, CustomField<unknown>>;
144
- export declare function Slider({ min, max, step, value, onChange, suffix, readout, notch, ariaLabel, disabled, placeholder, }: {
144
+ export declare function Slider({ min, max, step, value, onChange, suffix, readout, notch, ariaLabel, disabled, placeholder, placeholderWord, onClear, }: {
145
145
  min: number;
146
146
  max: number;
147
147
  step: number;
@@ -153,6 +153,8 @@ export declare function Slider({ min, max, step, value, onChange, suffix, readou
153
153
  ariaLabel?: string;
154
154
  disabled?: boolean;
155
155
  placeholder?: number;
156
+ placeholderWord?: string;
157
+ onClear?: () => void;
156
158
  }): import("react").JSX.Element;
157
159
  export declare function pxField(label: string, opts: {
158
160
  min: number;
@@ -1 +1 @@
1
- "use client";import{jsx as i,jsxs as P,Fragment as L}from"react/jsx-runtime";import{cloneElement as Le,createContext as Ut,useContext as $t,useEffect as Xt,useId as Ne,useRef as j,useState as V}from"react";import{useEasel as ue,useSelectedHost as G}from"efficient-easel/easel";import{toDateKey as jt,fromDateKey as Vt}from"efficient-shell/format";import{say as l,editorEaselWords as S}from"../../../format/lib/editor-words.js";import{mediaValueSrc as Pe}from"../../../format/lib/media-value.js";import{LOADING_SHOWS_LABELS as Be,loadingShowsOf as zt}from"../../../format/lib/hero-video.js";import{readHidable as De,hidableText as ve}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as de,LINK_FIELD_MARKER as He,MEDIA_FIELD_MARKER as Ge,SCAFFOLD_FIELD_MARKER as Me,TEXT_FIELD_MARKER as E,foldMetaOf as pe,textFieldIdentifier as Yt}from"efficient-easel/draw";import qt from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as We}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 M}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 Ue,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 $e,CornerIcon as xn,DirectionDownIcon as Sn,DirectionLeftIcon as Cn,DirectionRightIcon as yn,DirectionUpIcon as wn,EditIcon as _n,GapIcon as Rn,GridIcon as On,GroundIcon as Xe,HashIcon as je,HeightIcon as En,ImageIcon as In,ListIcon as Tn,LocationIcon as Ve,PaddingBottomIcon as ze,PaddingLeftIcon as Ye,PaddingRightIcon as qe,PaddingTopIcon as Je,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 Ze}from"../../components/FieldGlyph.js";import{resolvePageBackground as Bn}from"../../../format/lib/content/page-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 C,SettingsDrill as Mn,SettingsField as x,SettingsGroup as Wn,SettingsGroupSub as Kn,SettingsSegmented as Un,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 io,DatePicker as lo,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 it,Slider as ho,Tooltip as ne}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as mo}from"./geocode-resolve.js";import{ColourRow as lt,InheritedColourRow as st}from"./ColourControl.js";import{keptByRow as go}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 bo,NoControlMark as xo,noControlField as ct}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 Co,resolvePhoneValue as me}from"../../../format/lib/document/phone-override.js";import{phoneKey as k,tabletKey as W}from"efficient-easel/draw";import{SuppressibleText as yo}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as wo,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 Eo,DEFAULT_COVER_INDEX as Io}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as To}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 ut}from"efficient-easel/draw/client";import{SECTION_PADDING as I}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 ge,resolveSectionMinHeight as Mo,resolveTabletHeight as Wo}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as oe,SECTION_STICK_LABEL as be,hasPhoneStick as Ko,hasTabletStick as Uo,resolveSectionStick as dt}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as $o,SECTION_MIN_HEIGHT_GROUP_LABEL as z,SECTION_SCREEN_PCT as Xo}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as jo,resolveContainerDirection as pt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as Vo,BOX_BLOCK_SPACING_POINTS as ft,BOX_PHONE_ROW_LABEL as ht,BOX_COLUMNS_MAX as zo,BOX_COLUMNS_MIN as mt,BOX_PHONE_ROW_MAX as Yo,BOX_PHONE_ROW_MIN as xe,BOX_SHARE_CHOICES as gt,BOX_SHARE_LABEL as K,boxShareChoiceOf as bt,boxShareWidthsOf as Se,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 xt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as Qo,normalizeTheme as St,normalizeThemeColors as er,sectionBandTone as tr,surfaceTwoTone as nr}from"../../../format/lib/theme.js";import{CONTAINER_GAP as Ct,CONTAINER_GAP_BUILT_IN as or,CONTAINER_GAP_PHONE as Ce,GAP_FIELD_CONTAINER as ye,followsSitePhoneGap as rr,hasOwnContainerGap as ir,hasOwnPhoneGap as we,resolveContainerGap as yt,resolvePhoneContainerGap as wt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as lr,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 _e,isSectionBackgroundEmpty as gr,sectionBackgroundHex as _t}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as br,nestedAccentValue as Rt,resolveSectionAccent as re}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as xr,TYPE_SIZE_INHERIT as Sr,isTypeSizeInheriting as Cr}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as yr,WIDTH_CHOICE_LABEL as wr,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 Er}from"../website-session.js";import{BOX_GAP as Ir,describedAs as T,group as O,iconOf as Y,sharedStyleKinds as q}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as Re,onDesktopWords as J,phoneTwinFields as ie}from"efficient-easel/screen/lib/document/box-fields";import{directionField as Tr,gapField as Oe,iconPickerRow as kr,pickerCellIcon as Fr,pickerNoneIcon as Ar,Segmented as Ee,segmented as Lr,select as Z,slider as U}from"./box-fields.js";function xs({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function D(e,t){return l("{value} from {from}",{value:e,from:t})}function Nr(){const{blockGap:e}=B();return e===null?l("this container's own spacing"):D(`${e}px`,l("Styles"))}function Pr({inherited:e,onReset:t,label:n}){return i(C,{words:S()?.panel,label:l(n),changed:!e,detail:Nr(),onReset:t})}function Br(e){return Oe({...Ir,builtIn:or[e],resolve:(t,n)=>yt(e,t,n?.siteGap),action:(t,n)=>i(Pr,{inherited:!ir(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[ye]:e}})}function Dr(e){return We(R("mobile",{[ye]:e,type:"custom",render:t=>i(Gr,{container:e,...t})}),Ot)}function vr(e){return We(R("tablet",{[ye]:e,type:"custom",render:t=>i(Hr,{container:e,...t})}),Ot)}const Ot={not:{field:"gap",in:Array.from({length:-Ct.min},(e,t)=>Ct.min+t)}};function Ss(e){return{gap:R("desktop",Br(e)),[W("gap")]:vr(e),[k("gap")]:Dr(e)}}function Hr({container:e,...t}){const[n]=F("gap"),{siteGap:o}=t.field??{},r=Math.max(Ce.min,yt(e,n,o));return Oe({...Ce,builtIn:r,resolve:a=>we(a)?a:r,action:(a,c)=>i(C,{words:S()?.panel,label:l("Gap"),changed:we(a),detail:J(u=>l(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function Gr({container:e,...t}){const[n]=F("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},s=wt(e,void 0,n,o,r);return Oe({...Ce,builtIn:s,resolve:c=>wt(e,c,n,o,r),action:(c,u)=>i(C,{words:S()?.panel,label:l("Gap"),changed:we(c),detail:D(`${s}px`,rr(e,n,r)?l("Styles"):l("Desktop")),onReset:()=>u(void 0)})}).render(t)}function Cs(e){return Tr({offered:jo(e),fallback:pt(e,void 0),resolve:t=>pt(e,t)})}function ys(e,t){return an(t?sn(e,t):[],t)}function Mr({inherited:e,onReset:t,label:n}){return i(C,{words:S()?.panel,label:l(n),changed:!e,detail:D(l("Full"),l("the page")),onReset:t})}function v({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:s,hideable:a=!0,markup:c=!0}){const{text:u,hidden:p}=De(e),m=j(null),f=j(null),d=y=>t(a?{text:y,hidden:p}:y),g=()=>t({text:u,hidden:!p}),h=a&&p,_=Ne(),w=r?Xr(r)?i("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(r)}):i(cn,{children:l(r)}):void 0,b=p?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return i(x,{label:l(n),icon:i(Nn,{}),htmlFor:_,className:h?"is-hidden":void 0,hint:w,action:a?i(ne,{content:b,children:i(rt,{"aria-pressed":p,"aria-label":b,onClick:g,children:p?i(ut,{name:"eye-off",size:14}):i(ut,{name:"eye",size:14})})}):void 0,children:P("div",{className:"sf-copybox",children:[c&&i(at,{target:s?f:m,value:u,onChange:d}),s?i("textarea",{id:_,ref:f,value:u,placeholder:o===void 0?void 0:l(o),onChange:y=>d(y.target.value)}):i("input",{id:_,ref:m,type:"text",value:u,placeholder:o===void 0?void 0:l(o),onChange:y=>d(y.target.value)})]})})}function ws(e,t){return{...e,[Me]:t}}function _s(e){const t=e[E];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[E]:{...t,offPage:!0}}}function Rs(e){return!e||typeof e!="object"?!1:e[E]?.offPage===!0}const Et="sfPanelOnly";function Os(e){if(!e[E])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Et]:!0}}function Es(e){return!!e&&typeof e=="object"&&e[Et]===!0}function Is(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 Ma,SCALAR_TEXT_CONTROLS as Wa}from"efficient-easel/draw";function Ts(e,t){if(!e[E])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(To),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"}}}},H=(e,t)=>{const n=T({...t,[E]:e},{...It[e.control],label:e.label});if(!Wr.has(e.control))return n;const o=t.render;return{...ct(n,"authored-copy"),render:r=>i(yo,{name:r.name,children:o(r)})}},ks="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Kr={field:"source.slug",set:!0},Fs={not:Kr},Ur="Select a word, then press the highlighter.",$r=new Set([Ur]),Xr=e=>$r.has(e);function As(e,t,n){return H({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(v,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function Ls(e,t,n){return H({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(v,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function Ns(e,t,n){return H({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(v,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function Ps(e,t,n){return H({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(v,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function Bs(e){return{type:"custom",[He]:{label:e},...T({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(No,{value:ve(t),onChange:n,label:e})}}function Ds(e,t,n){return H({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(v,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const vs={Design:pn,Animation:hn};function Hs(e){return{type:"custom",render:()=>i(jr,{text:e})}}function jr({text:e}){return i("p",{className:"sf-note",children:l(e)})}function Gs(e){return pe(e)!==null&&e?.tabs!==void 0}const Tt=new Map;function Ms(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:()=>i(L,{})};return Tt.set(n,o),o}const kt=new Map;function Ws(e){const t=kt.get(e)??{type:"custom",[de]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(L,{})};return kt.set(e,t),t}function Vr(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function Ks(e,t){return Vr(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(L,{})}}function Us(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>i(L,{})}}function $s({title:e,children:t}){const[n,o]=V(()=>!Ie.has(e));return i(Wn,{title:e,open:n,onToggle:r=>{o(r),r?Ie.delete(e):Ie.add(e)},children:t})}const Ie=new Set;function Xs({label:e}){return i(Kn,{title:l(e),level:Rr(2)})}function zr({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?l(s):t;return P("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?l(o[c]):c;return i(ne,{content:u,children:i(ro,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:a})]})}function js(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(Yr,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function Yr({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const s=typeof o=="string"?o:void 0,{colors:a,n:c}=Kt(),u={background:a.background,surface:a.surface,surface2:nr(a),band:tr(a)},p=n?_e:t,m=gr(s,t,p),f=_t(void 0,p,u),d=n?fr:void 0,g=mr(s,t),h=p===_e?l("the theme's section background"):l("Theme {n} background",{n:c});return i(st,{label:l(e),icon:i(mn,{}),value:m?"":_t(s,t,u),inherited:f,resetTo:D(f.toUpperCase(),h),onChange:r,onReset:()=>r(d),choices:[{label:l("No fill"),color:"",selected:g==="none",onPick:()=>r(hr)},{label:`${l("Section band")} · ${u.band.toUpperCase()}`,color:u.band,selected:g==="band",onPick:()=>r(_e)}]})}function qr(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,s=ur(r,t);return i(x,{label:l(e),icon:i(Xe,{}),changed:!s,action:i(C,{words:S()?.panel,label:l(e),changed:!s,detail:l("the theme's image stage"),onReset:()=>o(lr)}),children:zr({swatches:cr,current:s?pr:dr(r,t),onPick:o,names:ar})})}}}function Vs(e=n=>n,t){return q({_gSectionTheme:O(br),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(Ao,{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:p=!1,placeholder:m}){const f=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:f?"sf-slider has-notch":"sf-slider",style:f?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(ho,{min:e,max:t,step:n,value:o,...o===null&&m!==void 0?{placeholderValue:m}:{},suffix:s||void 0,showInput:a,label:u===void 0?void 0:l(u),disabled:p,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:d=>{d!==null&&d!==o&&r(d)}})})}function Ft(e,t){const{min:n,max:o,step:r=1,unsetLabel:s,hint:a,restTrack:c,unsetMark:u,icon:p,unit:m="px"}=t;return{type:"custom",render:({value:f,onChange:d})=>{const g=typeof f=="number"?f:null,h=g===null;return i(x,{label:l(e),icon:p?Y(p):void 0,value:h?u||s===void 0?void 0:l(s):`${g}${m}`,changed:!h,action:u?Le(u,{changed:!h,onReset:()=>d(null)}):i(C,{words:S()?.panel,label:l(e),changed:!h,onReset:()=>d(null)}),hint:typeof a=="string"?l(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 le="Corners";function Te(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,r=o!==null;return i(x,{label:l(le),icon:i(xn,{}),changed:r,action:Le(e.mark,{changed:r,onReset:()=>n(null)}),hint:e.hint,children:i(Zr,{tier:e,px:o,onRadius:n})})}}}function F(e){const t=G();return[t?.values?.[e],n=>t?.onChange(e,n)]}function At(){return ct({type:"custom",render:()=>i(xo,{})},"always")}function Jr(){const e=G();return t=>e?.onChangeMany(t)}function Zr({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),[r,s]=F(e.sidesKey),a=et(r)??[...Qe];return i(io,{label:l(le),value:a,corners:Dn,onChange:c=>{const u=et(c)??[];s(u.length===Qe.length?null:u)},radius:t,onRadiusChange:n,radiusMin:M,radiusMax:Ke,radiusStep:e.step??1,radiusPlaceholder:String(o)})}function Lt(){return At()}function Qr({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=B(),r=typeof o=="number"?`${o}px`:l("not set");return i(C,{words:S()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):D(r,l("Styles")),onReset:n})}function ei(){const{cornerRadiusPx:e}=B();return typeof e=="number"?e:M}function ti(){return Te({sidesKey:"sectionCornerSides",useFollowed:ei,mark:i(Qr,{label:le}),hint:ni})}const ni="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function zs(){return q({_gShape:O("Shape"),sectionCorners:ti(),sectionCornerSides:Lt(),...$("sectionBorder",Nt)})}const oi=()=>({width:l("Border width"),sides:{top:l("Border top"),right:l("Border right"),bottom:l("Border bottom"),left:l("Border left")},style:l("Border style"),styles:{solid:l("Solid"),dashed:l("Dashed"),dotted:l("Dotted")},color:l("Border color"),unit:"px"});function ri(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function ii(){let e;try{const t=St(B().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||Qo.line}function li({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:s=!0,above:a={}}){const c=e&&typeof e=="object"?e:{},[u,p]=V(()=>r?Vn(c,a):!1),m=oi(),f=d=>ri(r&&s?d:{width:d.width,color:d.color,...s?{style:d.style}:{}});return i(x,{label:l("Border"),icon:i(gn,{}),action:r?i(Xn,{each:u,label:l("Each side"),onChange:p}):void 0,children:i($n,{label:l("Border"),value:c,each:u,onChange:d=>t(f(d)),placeholder:n,presets:o,words:m,styles:s,max:Zo})})}function si({value:e,onChange:t,view:n}){const[o]=F("sectionBorder"),[r]=F(W("sectionBorder")),s=ii(),a=u=>u&&typeof u=="object"?u:{},c=n==="phone"?{...xt(a(o)),...xt(a(r))}:n==="tablet"?a(o):{};return i(li,{value:e,onChange:t,placeholder:{sides:jn(c),style:c.style??"solid",color:c.color||s},presets:[s],above:c})}function Ys(e){return R(e,Nt(e==="mobile"?"phone":e))}function Nt(e){return{type:"custom",render:({value:t,onChange:n})=>i(si,{value:t,onChange:n,view:e})}}function $(e,t){const n=(o,r)=>ie(e,t(o),Re)[r];return{[e]:n("desktop",e),[W(e)]:n("tablet",W(e)),[k(e)]:n("phone",k(e))}}function qs(e){return{type:"custom",render:()=>i(ai,{partKey:e})}}function ai({partKey:e}){const[t]=F("id"),[n]=F("_partStyles"),{textStyles:o}=B(),r=Ho();let s=null;try{s=Bo().select}catch{s=null}const a=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(Mn,{name:l("Text"),preview:Po(a,c,{noStyle:l("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??vo.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?Gn(s?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return vn(r)?r:n}function ci({label:e,changed:t=!1,onReset:n=()=>{}}){const o=Pt(M);return i(C,{words:S()?.panel,label:l(e),changed:t,detail:D(`${o}px`,l("the section")),onReset:n})}function ui(){return i(L,{children:l("Follows the section's Corners until you set a number here.")})}function di(){return Te({sidesKey:"cardCornerSides",useFollowed:()=>Pt(M),mark:i(ci,{label:le}),hint:i(ui,{})})}function pi(){return{type:"custom",render:()=>i(qt,{})}}function Js(e){return{...e,render:t=>i(Jt,{render:e.render,props:t})}}function Zs(){return{_gShape:O("Shape"),cardCorners:di(),cardCornerSides:Lt(),cardCornersApplyAll:pi()}}function fi(){return T({type:"custom",render:e=>i(mi,{...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 hi(e,t){const n=bt(e);if(n!=="custom")return l(gt.find(r=>r.value===n)?.label??"");const o=ot(Se(e,t),t);return o?[...o,100-o.reduce((r,s)=>r+s,0)].join(" / "):l("Custom")}function mi(e){const{value:t,onChange:n}=e,[o]=F("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),p=r>=2&&r<=nt,m=()=>[...uo[r]??[]],f=j(null),d=b=>{const y=f.current;y&&JSON.stringify(b)===JSON.stringify(y.shares)?n(y.value):b&&n(b)},g=b=>{b===u||b==="custom"&&!p||n(b==="custom"?m():b)},h=l("The width bar works for 2 to {count} blocks.",{count:nt}),_=a&&(s||t!=="content"),w=fo().widths.hint(r,co);return i(x,{label:l(K),icon:i(fe,{}),changed:_,hint:u!=="custom"?void 0:p?w:h,action:i(C,{words:S()?.panel,label:l(K),changed:_,disabled:e.readOnly===!0,detail:s?J(b=>l(b),hi(e.follows,r),e.followsView):l("Fit content"),onReset:()=>n(void 0)}),children:P("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(tt,{label:l(K),value:u,options:gt.map(b=>({value:b.value,label:b.value==="custom"&&!p?h:l(b.label),icon:Fr(i("span",{className:"sf-gallery-pic sf-share-pic",children:Bt(b.weights).map((y,X)=>i("i",{style:{gridColumn:`span ${y}`}},X))}),l(b.label),b.value==="custom"&&!p?h:l(b.label))})),onChange:g,columns:3,cell:Dt,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&p?i("div",{onFocus:()=>{f.current={value:t,shares:ot(Se(c,r),r)}},onBlur:()=>{f.current=null},children:i(po,{label:l(K),count:r,value:Se(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 Qs(){return Z(Vo,i(Rn,{}),ft,ft[0].value)}function ea(){return R("mobile",kr(K,i(fe,{}),Jo.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:Bt(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),qo,{columns:2,cell:Dt}))}const Dt={width:"5.75rem",height:"3.25rem"};function ta(){return ie("share",fi(),Re)[W("share")]}function gi(){return R("mobile",U(ht,i($e,{}),xe,Yo,1,xe,"",{clear:{phoneFollows:!1,hint:xe}}))}const vt={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function na(){const e=U(ht,i($e,{}),mt,zo,1,mt,"",{clear:{emptyLabel:"Auto"}}),t=ie("columns",e,{...vt,tablet:Re.tablet}),n=ie("columns",e,vt,{phoneRow:gi()});return{...t,phoneRow:n.phoneRow}}function oa(e,t,n,o,r,s){return{type:"custom",render:({value:a,onChange:c})=>i(x,{label:l(e),icon:i(Ze,{noun:s}),action:i(C,{words:S()?.panel,label:l(e),changed:!Cr(a),detail:l("the Text style in Styles"),onReset:()=>c(Sr),defaultAction:{onPress:()=>c(xr),title:l("Keep this section's own built-in size"),icon:i(bn,{})}}),children:ee({min:t,max:n,step:o,value:typeof a=="number"?a:r,suffix:"px",ariaLabel:e,onChange:c})})}}function ra(){return{_gCellWidth:O("Cell width"),gridSpan:Z("Positions",i(fe,{}),[{label:"Auto",value:""},...Array.from({length:tn},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function A(){let e=null,t=null;try{e=$t(bi),t=ue(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const bi=Ut(null);function xi({min:e,max:t,step:n,px:o,label:r,onChange:s,desktopKey:a,fallback:c}){const u=A()[a],p=me(void 0,u,c);return i(L,{children:ee({min:e,max:t,step:n,value:me(o,u,c),readout:!1,ariaLabel:r,notch:p,onChange:s})})}function Si({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:s=()=>{}}){const a=A()[t],c=me(void 0,a,n);return i(C,{words:S()?.panel,label:l(e),changed:r,detail:J(u=>l(u),`${c}${o}`),onReset:s})}function Ci(e){return Ft(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(Si,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(xi,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const yi={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},wi={Top:Je,Bottom:ze,Left:Ye,Right:qe},_i=e=>{const t=wi[e];return i(t,{})};function ia(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=w=>yi[w],s=w=>U(r("Top"),i(Je,{}),I.min,I.max,I.step,w,"px"),a=(w,b,y,X=I)=>R("mobile",Ci({label:r(w),icon:_i(w),desktopKey:b,min:X.min,max:X.max,step:X.step,fallback:y})),c=e.top??I.min,u=e.bottom??I.min,p="sectionPaddingLeft",m="sectionPaddingRight",f=e.sideBounds??I,d=e.side??f.min,g=e.sidePhone??d,h=e.phone===!0,_=w=>h?R("desktop",w):w;return q({...o?{_gSpacing:O("Padding")}:{},[t]:_(s(c)),...h?{[k(t)]:a("Top",t,c)}:{},...e.only==="top"?{}:{[n]:_(U(r("Bottom"),i(ze,{}),I.min,I.max,I.step,u,"px")),...h?{[k(n)]:a("Bottom",n,u)}:{}},...e.sides?{[p]:_(U(r("Left"),i(Ye,{}),f.min,f.max,f.step,d,"px")),...h?{[k(p)]:a("Left",p,g,f)}:{},[m]:_(U(r("Right"),i(qe,{}),f.min,f.max,f.step,d,"px")),...h?{[k(m)]:a("Right",m,g,f)}:{}}:{}})}function la(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 sa(e,t=yr,n=!0){const o=t.map(r=>({label:wr[r],value:r}));return q({...n?{_gWidth:O(se)}:{},widthMode:{type:"custom",render:({onChange:r,field:s})=>i(x,{label:l(se),icon:i(Pn,{}),action:n?i(Mr,{inherited:s?.inherited??!1,onReset:()=>r(_r),label:se}):void 0,children:Ee({options:o,value:s?.currentValue||e,onChange:r,ariaLabel:se})})}})}function aa(){const e=(o,r)=>({type:"custom",render:({value:s,onChange:a})=>i(Ri,{value:s,onChange:a,view:o,badge:r})}),t=o=>({type:"custom",render:({value:r,onChange:s,field:a})=>i(Ei,{value:r,onChange:s,unit:a?.unit,view:o})}),n=o=>{const r=Lr("Unit",i(je,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");if(o==="desktop")return r;const s=r.render;return{...r,render:a=>i(Ii,{props:a,draw:s,view:o})}};return q({_gHeight:O(z),...$("sectionHeightMode",o=>o==="desktop"?e(o):e(o,r=>i(Ti,{view:o,onClear:()=>r(void 0)}))),...$("sectionHeightValue",t),...$("sectionHeightUnit",n)})}function Ri({value:e,onChange:t,view:n,badge:o}){const r=A(),s=c=>["auto","fixed","screen"].includes(c),a=ae(n,r)?.mode??"auto";return i(x,{label:z,icon:Y(i(En,{})),action:o?o(t):void 0,children:Ee({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:s(e)?e:a,onChange:t,ariaLabel:z})})}function Ht(e,t){return e==="phone"&&ge(t)?Wo(t):Mo(t)}function ae(e,t){return e==="desktop"||(e==="tablet"?ge(t):Go(t))?null:Ht(e,t)}const N=(e,t)=>e==="tablet"?W(t):k(t);function Oi(e,t,n,o){const r=ae(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[N(e,"sectionHeightMode")]:r.mode,...r.mode==="fixed"?{[N(e,"sectionHeightUnit")]:r.unit}:{},...n==="sectionHeightUnit"?{[N(e,"sectionHeightValue")]:r.value}:{},[N(e,n)]:o}}function Gt(e,t,n){const o=G(),r=ae(e,A());return!o||!r?{followed:null,write:n}:{followed:r,write:a=>o.onChangeMany(c=>{const u=Oi(e,c,t,a);return u===null?{[e==="desktop"?t:N(e,t)]:a}:Object.keys(u).length?u:null})}}function Ei({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==="%"?Xo:$o;return i("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:z,onChange:s})})}function Ii({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 Ti({view:e,onClear:t}){const n=A(),o=ae(e,n)===null,r=e==="phone"&&ge(n),s=Ht(e,n),a=J(c=>l(c),s.mode==="auto"?l("Auto"):`${s.value}${s.unit}`,r?"tablet":"desktop");return i(C,{words:S()?.panel,label:l(z),changed:o,detail:a,onReset:t})}function ca(){const e=n=>({type:"custom",render:({value:o,onChange:r,id:s,name:a})=>i(Ai,{value:o,onChange:r,labelId:`${s??a??"stickTop"}-label`,view:n})}),t=n=>({type:"custom",render:({value:o,onChange:r})=>i(ki,{value:o,onChange:r,view:n})});return{_gStick:O(be),...$("stickTop",e),...$("stickTopDistance",t)}}function ki({value:e,onChange:t,view:n}){const o=G(),r=A(),s=n==="desktop"||ke(n,r)?null:Mt(n,dt(r)),a=s&&o?c=>o.onChangeMany(u=>{const p=Fi(n,u,c);return p===null?{[N(n,"stickTopDistance")]:c}:Object.keys(p).length?p:null}):t;return i("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:l("Distance from top"),onChange:a})})}function ke(e,t){return e==="tablet"?Uo(t):Ko(t)}function Mt(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance}:{on:t.desktop,distance:t.desktopDistance}}function Fi(e,t,n){return e==="desktop"||ke(e,t)?null:n===void 0?{}:{[N(e,"stickTop")]:!0,[N(e,"stickTopDistance")]:n}}function Ai({value:e,onChange:t,labelId:n,view:o}){const r=A(),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),p=u?.on?`${u.distance}px`:l("Off");return i(x,{label:l(be),labelId:n,icon:Y(i(Fn,{})),action:P(L,{children:[o!=="desktop"?i(C,{words:S()?.panel,label:l(be),changed:ke(o,r),detail:J(m=>l(m),p,c?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(he,{checked:a,onChange:t,ariaLabelledBy:n})]})})}const Wt="e.g. about";function ua(){return{_gAnchor:O("Anchor"),anchor:H({control:"plainText",label:"Name",placeholder:Wt},{type:"custom",render:({value:e,onChange:t})=>i(dn,{value:e,onChange:t,nameBox:(n,o)=>i(v,{value:n,onChange:o,label:"Name",placeholder:Wt,hideable:!1,markup:!1})})})}}function da(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 i(x,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(so,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:p=>r(p?p.toISOString():"")})})}}}function pa(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:a})=>{const c=`${s??a??e}-date`;return i(x,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(lo,{id:c,value:Vt(typeof o=="string"?o:null),onChange:u=>r(u?jt(u):"")})})}}}function Li(e,t,n,o){return{type:"custom",...T({},{...Q,label:e}),render:({value:r,onChange:s,id:a,name:c})=>{const u=typeof r=="boolean"?r:t,p=`${a??c??e}-label`;return i(x,{label:l(e),labelId:p,icon:n,hint:o===void 0?void 0:l(o),action:i(he,{checked:u,onChange:s,ariaLabelledBy:p})})}}}function fa(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(lt,{label:l("Background"),icon:i(kn,{}),id:r,value:Bn(e),onChange:t})}}}function ha(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 i(x,{label:l(e),htmlFor:a,className:"sf-checkbox",action:i(oo,{id:a,checked:s,onChange:o})})}}}function ma(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(lt,{label:l(e),icon:n,value:o||t,onChange:r})}}function ga(){return{type:"custom",render:({value:e,onChange:t})=>i(Ni,{value:typeof e=="string"?e:"",onChange:t})}}function Ni({value:e,onChange:t}){const{hex:n,n:o}=Bi();return i(st,{label:l("Fill"),icon:i(Xe,{}),value:e,inherited:n,resetTo:D(n.toUpperCase(),l("Theme {n} background",{n:o})),onChange:t,onReset:()=>t("")})}function Pi(e,t,n){if((e?.content??[]).some(a=>a?.props?.id===t))return re(n);const r=Hn(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 Bi(){const{colors:e,n:t}=Kt();return{hex:e.background,n:t}}function Kt(){const e=St(B().theme),[t]=F("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?Pi(r?.data,a,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 Di=[{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 vi({label:e,value:t,onChange:n,points:o=Di}){const r=o.map(s=>({...s,label:l(s.label),...s.title?{title:l(s.title)}:null}));return i(no,{label:l(e),value:t,points:r,onChange:n})}function ba(){return At()}const xa={top:i(wn,{}),right:i(yn,{}),bottom:i(Sn,{}),left:i(Cn,{})};function Sa(e,t,n,o,r,s,a){const c=f=>t.find(d=>d.value===f),u=f=>({value:f,label:"",disabled:!0,title:o}),p=f=>{const d=t.find(h=>h.cell===f);if(!d)return u(`missing-${f}`);const g=s?.[f];return g?{value:d.value,label:d.label,icon:g}:{value:d.value,label:d.label}},m=[u("corner-top-left"),p("top"),u("corner-top-right"),p("left"),u("centre"),p("right"),u("corner-bottom-left"),p("bottom"),u("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:d})=>{const g=t.some(h=>h.value===f)?f:n;return i(x,{label:l(e),icon:r,value:c(g)?.label?l(c(g).label):a?l(a):"",children:vi({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})=>i(Fo,{label:e,options:(s.options??t).map(a=>({...a,label:l(a.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:l(n)}:{}})}}function ya(e,t,n,o){return{type:"custom",options:t,fallback:n,...T({},{type:"select",label:e}),render:({value:r,onChange:s,field:a})=>i(Lo,{label:e,options:(a.options??t).map(c=>({...c,label:l(c.label)})),fallback:a.fallback??n,value:r,onChange:s,placeholder:o===void 0?void 0:l(o)})}}function wa(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const _a=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function Ra(e,t,n){const o=Object.keys(Be).map(r=>({label:Be[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})=>i(Hi,{label:e,icon:t,options:o,onChange:r})}}function Hi({label:e,icon:t,options:n,onChange:o}){const r=G()?.values??{},s=zt(r),a=s==="frame"&&!!Pe(r.mediaVideo)&&!Pe(r.videoFrame);return i(x,{label:l(e),icon:Y(t),hint:a?l("This video has no frame yet. The slide shows its background colour until one is made."):void 0,children:Ee({options:n,value:s,onChange:o,ariaLabel:e})})}function Oa(e,t,n,o={}){const r={type:"custom",[Ge]:!0,render:({value:s,onChange:a,name:c})=>i(ko,{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 Ea={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Gi(e){const t=l(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function Ia({value:e,onChange:t,label:n}){const o=e||{},r=G(),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)",p=!!Er(Or()).geocode,m=Ne(),f=(d,g)=>t({...o,[d]:g??void 0});return P(L,{children:[i(x,{label:l(n),icon:i(Ve,{}),action:p?i(ne,{content:l("Find from the address (OpenStreetMap)"),children:i(rt,{"aria-label":l("Find from the address"),"aria-busy":a||void 0,disabled:a,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(An,{})})}):void 0,children:p&&o.status?i(ne,{content:Gi(o),className:"sf-name-tip",children:i("div",{className:`es-field-hint ${un}`,style:{margin:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",minWidth:0,color:u},children:a?l("Finding…"):c?l(mo):l(o.status)})}):null}),i(x,{label:l("Enter by hand"),labelId:m,icon:i(_n,{}),action:i(he,{checked:!!o.manual,onChange:d=>t({...o,manual:d}),ariaLabelledBy:m})}),o.manual&&i(x,{label:l("Latitude, longitude"),icon:i(Ve,{}),children:P("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(it,{value:typeof o.lat=="number"?o.lat:null,onChange:d=>f("lat",d),min:-90,max:90,step:1e-4,placeholder:l("Latitude")}),i(it,{value:typeof o.lng=="number"?o.lng:null,onChange:d=>f("lng",d),min:-180,max:180,step:1e-4,placeholder:l("Longitude")})]})})]})}function Mi(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Wi(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 Ta(e,t){return e===null?null:t>e?e:null}function Ki(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:i(Tn,{})};function Fa(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})=>i(Ui,{label:e,icon:Y(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:s,markup:o==="markup"})}}function Ui({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:s=!1}){const a=j(null),[c,u]=V(null),p=f=>f.map(d=>({text:d?.text??""})),m=f=>{const d=Ki(n,f,c);d===null&&(a.current=null),u(d),r(p(f))};return i(zn,{label:l(e),icon:t,noun:l("item"),items:n,onChange:m,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:s?i(at,{target:a,value:Mi(n,c),onChange:f=>r(Wi(n,c??-1,f)),disabled:c===null,label:c===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(f,d,g)=>i("input",{type:"text",className:s&&c===d?"sf-list-marking":void 0,value:f?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:d+1}),onChange:h=>g({text:h.target.value}),onFocus:h=>{a.current=h.currentTarget,u(d)}})})}function Aa(e,t){const n=`${e.label} — row ${t+1}`;return H({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(v,{value:o,onChange:r,label:l("{label} — row {n}",{label:l(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",i(In,{}),Eo,String(Io),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:qr("Image background",sr),cardImage:ji()}}function Na(){return{outline:Z("Card outline",i(Ln,{}),_o,Oo),indexBadge:Z("Card number",i(je,{}),wo,Ro),showBadge:Li("Product badge",!0,i(Ze,{noun:"tag"}))}}function Pa(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(go(Fe),n(r));return{_gShowOnCard:O("Show on a card"),[Fe]:T({type:"custom",render:()=>i($i,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(Fe)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const Fe="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 $i({rest:e}){const t=A(),n=Jr(),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 i(Ae,{parts:ce,changed:s,shown:r,onPress:(a,c)=>n({[a]:c}),onReset:()=>n(Object.fromEntries(ce.map(({id:a})=>[a,void 0])))})}function Ba(e,t="display"){const n=k(t);return{[t]:R("desktop",{type:"custom",render:({value:o,onChange:r})=>i(Ae,{parts:e,changed:qn(o),shown:s=>Jn(o,s),onPress:(s,a)=>r(eo(o,s,a)),onReset:()=>r(void 0)})}),[n]:R("mobile",{type:"custom",render:({value:o,onChange:r})=>i(Xi,{parts:e,desktopKey:t,value:o,onChange:r})})}}function Ae({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:s,disabledReason:a}){const c=l("Display");return i(x,{label:c,icon:i(fn,{}),changed:t,action:i(C,{words:S()?.panel,label:c,changed:t,detail:s,onReset:r}),children:i(Yn,{label:c,items:e.map(u=>({id:u.id,label:l(u.label),shown:n(u.id),...a?{disabled:!0,disabledReason:l(a)}:{}})),onChange:o})})}function Xi({parts:e,desktopKey:t,value:n,onChange:o}){const r=A()[t];return i(Ae,{parts:e,changed:Qn(n),shown:s=>Zn(r,n,s),onPress:(s,a)=>o(to(n,s,a)),onReset:()=>o(Co),detail:l("the same as Desktop")})}function ji(){return Ft("Card image",{min:M,max:Ke,step:Zt,hint:"Rounds the picture. The card's own corner is in Styles."})}function Da(){return Te({sidesKey:"cornerSides",step:Qt,useFollowed:()=>M,mark:i(Vi,{label:en}),hint:l("Rounds the picture. Left alone it stays square.")})}function Vi({label:e,changed:t=!1,onReset:n=()=>{}}){return i(C,{words:S()?.panel,label:l(e),changed:t,onReset:n})}function va(){return{type:"custom",render:({value:e,onChange:t})=>i(Ji,{value:typeof e=="string"?e:"",onChange:t})}}function zi({layout:e,width:t}){return i("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)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${n}`,gridRow:`span ${o}`}},r))})}const Yi={width:"3.5rem",height:"2.5rem"},qi=200;function Ji({value:e,onChange:t}){const[n,o]=V(null),[r,s]=V(4),a=j(null);Xt(()=>{const d=a.current;if(!d||typeof ResizeObserver!="function")return;const g=()=>s(d.getBoundingClientRect().width>=qi?4:3);g();const h=new ResizeObserver(g);return h.observe(d),()=>h.disconnect()},[]);const c=e&&e in te?e:"",u=Ue(n,c),p=Ue(n,"").length,m=ln("no-symbol"),f=[{value:"",label:l("Not chosen"),icon:Ar(m,l("Not chosen"))},...u.map(d=>({value:d,label:l(te[d].label),icon:i(zi,{layout:te[d],width:40})}))];return i(x,{label:l("Layout"),icon:i(On,{}),value:c?l(te[c].label):void 0,children:i("div",{ref:a,style:{flex:"1 1 auto",minWidth:0},children:i(tt,{label:l("Layout"),value:c,options:f,onChange:t,columns:r,cell:Yi,header:P("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:l("Photos in a row")}),i(Un,{options:[{id:"all",label:l("All")},...nn.map(d=>({id:String(d),label:String(d)}))],value:n===null?"all":String(n),ariaLabel:l("Photos in a row"),onChange:d=>o(d==="all"?null:Number(d))}),i("span",{className:"text-2xs text-ink-faint",children:l("{n} of {total} layouts",{n:p,total:on.length})})]})})})})}export{Kr as BOUND_TO_POST,ks as BOUND_TO_POST_NOTE,vs as BUCKET_ICONS,Ea as CUSTOM_FIELD_MEDIA,Ia as CoordsField,Ot as DESKTOP_GAP_NOT_OVERLAP,Ae as DisplayRow,xa as EDGE_ARROWS,ao as FOCAL_DEFAULT,Di as FOCAL_POINTS,de as FOLD_FIELD_MARKER,vi as FocalPicker,Xs as GroupLabel,Ur as HIGHLIGHT_HINT,v as HidableTextField,He as LINK_FIELD_MARKER,xs as Label,Ge as MEDIA_FIELD_MARKER,_a as MEDIA_TYPE_OPTIONS,Fs as NOT_BOUND_TO_POST,$s as PanelBand,jr as PanelNoteLine,bi as RowPropsContext,Me as SCAFFOLD_FIELD_MARKER,Wa as SCALAR_TEXT_CONTROLS,Pr as SiteGapDefaultReset,ee as Slider,zr as Swatches,Ma as TEXT_CONTROL_KINDS,E as TEXT_FIELD_MARKER,ka as TICKER_ITEMS_ROW,Ui as TextListField,se as WIDTH_LABEL,Mr as WidthDefaultReset,Ki as aimAfterListChange,ua as anchorFields,D as backTo,js as backgroundField,Qs as boxBlockSpacingField,na as boxColumnsFields,ga as boxFillField,gi as boxPhoneRowField,fi as boxShareField,ea as boxSharePhoneField,ta as boxShareTabletField,Pi as boxThemeIndexOf,Ms as bucketHeader,qs as buttonWordsEntryField,di as cardCornersField,qr as cardImageBackgroundField,ji as cardImageField,La as cardMediaFields,Zs as cardShapeFields,Pa as cardShowFields,Na as cardStyleFields,ra as cellWidthFields,ha as checkbox,ma as colorInput,Cs as containerDirectionField,Br as containerGapField,Dr as containerGapPhoneField,Ss as containerGapRows,vr as containerGapTabletField,Gi as coordsResultTip,Ps as copyText,Lt as cornerSidesField,Te as cornersRowField,pa as date,da as dateTime,Ws as designGroupHeader,Ba as displayFields,Sa as edgePad,Ta as focusAfterRemove,ba as focusKeptField,Ks as foldMarker,pe as foldMetaOf,Vr as foldTitleOf,Oi as followedHeightPatch,Fi as followedStickPatch,va as galleryLayoutField,aa as heightFields,ae as heightFollowedBy,ys as heroGroupPlacementPoints,ve as hidableText,Xr as hintIsWhileTyping,Da as imageCornersField,Ts as inOwnBox,Gs as isBucketHeader,At as keptBy,Bs as linkField,Ra as loadingShowsField,Ca as multiSelect,fa as pageBackgroundField,Hs as panelNote,Ci as phoneOverrideField,Ns as plainText,Ds as plainTextarea,Ft as pxField,Us as quietMarker,De as readHidable,Mi as rowText,ya as searchSelect,Ys as sectionBorderField,ti as sectionCornersField,zs as sectionShapeFields,Vs as sectionThemeFields,Wi as setRowText,oa as sizeField,wa as sourceField,ia as spacingFields,ca as stickFields,la as swapPadding,Js as templateField,As as text,Yt as textFieldIdentifier,Rs as textFieldOffPage,Es as textFieldPanelOnly,Fa as textList,Aa as textListRowField,Ls as textarea,Li as toggle,Oa as upload,Jr as useSelectedPatch,A as useSelectedProps,F as useSelectedSibling,Nr as useSiteGapDetail,sa as widthField,Is as withIdentifier,_s as withOffPage,Os as withPanelOnly,ws 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 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 +1 @@
1
- import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,cardStyleFields as W,designGroupHeader as F,foldMarker as z,foldMetaOf as h,quietMarker as q,heightFields as E,sectionShapeFields as w,sectionThemeFields as O,stickFields as x,widthField as D}from"./controls.js";import{group as J}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as T}from"./box-fields.js";import{deviceField as Q,deviceMetaOf as P}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as B}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as V}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"efficient-easel/screen/lib/document/field-buckets";const A=V;function X(e){return e==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content",Display:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Search:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content",Source:"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Map:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design",Overlay:"Design","Text style":"Design",Entrance:"Animation",Hover:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[Z]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},$={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},G={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,o){const a=`${e}.${t}`;return G[a]??$[a]??I[o]}function ge(e,t,o){const a=_(e,t,o);return a?X(a):void 0}function H(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const o of e)for(const a of Object.values(o)){const C=P(a),g=h(C?C.inner:a),l=g?I[g.label]:void 0;if(l)for(const p of H(l))t.includes(p)||t.push(p)}return t}const pe=[...S(T({tablet:!0}),D("full"),E(),m(),x()),...Object.keys(T({tablet:!0})),...Object.keys(D("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x())],ye=[...S(O()),...Object.keys(O())],ke=[...S(w()),...Object.keys(w())],_e=[...S(B()),...Object.keys(B())],ee=Object.keys(Y()),te=new Set(["cardImage","imageBackground"]),Se=[...H(_("ProductGrid","_gCards","Cards")??"Design"),...ee.filter(e=>e.startsWith("_g")||te.has(e))],ve=Object.keys(W()),fe=Object.keys(U()),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...T({tablet:!0}),...D("full"),...E(),...m(),...O(),...w(),...B()};for(const t of Object.keys(M)){const o=h(e[t]),a=o?I[o.label]:void 0;if(!o||o.level!==2||!a||!K[a].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const oe=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function me(e){const t=new Set([...Object.values(d),b.Content]);for(const[o,a]of Object.entries(e))if(!t.has(o)&&h(a)?.level===1)return 1;return 2}function ie(e){const t=`${e}.`;return Object.keys(ne).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function re(e,t){const o=P(e),a=J(t);return o?Q(o.tier,a):a}function de(e,t){const o=h(t);return o?e==="Content"||e==="Animation"?z(t,o.label):q(t):t}function j(e){return e==="Design"?k:["Animation"]}function Le(e,t){const o=[],a=new Set(ie(t)),C=new Set;let g=!1,l=null;for(const[n,r]of Object.entries(e)){const i=h(r);if(oe.has(n))throw new Error(`${t}.${n}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=ae.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(g=!0),o.push(l={place:c,entries:[],adopted:!0});continue}if(!i){l||o.push(l={place:"Content",entries:[]}),l.entries.push([n,r]);continue}if(a.has(n)||n in M){const s=_(t,n,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${n}: ${a.has(n)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(n)&&C.add(n),o.push(l={place:s,entries:[]});continue}const u=_(t,n,i.label);if(!u)throw new Error(`${t}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(l={place:u,entries:[[n,i.level===2?r:re(r,i.label)]]})}const p=new Set(Object.entries(e).filter(([,n])=>h(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",G],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!p.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${n} (lib/document/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=g?[]:[...a].filter(n=>!C.has(n));if(v.length)throw new Error(`${t}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const R=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=A.filter(n=>j(n).some(r=>R.has(r))),y={};for(const n of f){y[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!R.has(r))continue;const i=o.filter(u=>u.place===r),c=i.findIndex(u=>u.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(y[b[r]]=F(r));for(const u of i)for(const[s,N]of u.entries)y[s]=de(r,N)}}return y}function Ee(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:F("Content"),...e}}function we(e){return A.some(t=>d[t]in e)}function Oe(e){const t=A.filter(a=>d[a]in e);if(t.length===0)return e;const o={...e};for(const a of t)o[d[a]]=L(a,a===t[0]?t:null);return o}export{G as BLOCK_KEY_GROUP,Se as BOUND_CARD_MEDIA_FIELD_KEYS,A as BUCKETS,d as BUCKET_KEY,ee as CARD_MEDIA_FIELD_KEYS,fe as CARD_SHOW_FIELD_KEYS,ve as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,$ as KEY_GROUP,I as LABEL_GROUP,pe as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,_e as SECTION_ANIM_FIELD_KEYS,ke as SECTION_SHAPE_FIELD_KEYS,ye as SECTION_THEME_FIELD_KEYS,Le as assignSectionGroups,ge as bucketOf,X as bucketOfPlace,me as foldTopTier,we as hasBucketTabs,S as headerKeysOf,H as headerKeysOfPlace,_ as placeOf,Oe as reseatBucketTabs,ie as retiredHeadings,Ee as seatDesignBucket};
1
+ import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,cardStyleFields as W,designGroupHeader as F,foldMarker as z,foldMetaOf as h,quietMarker as q,heightFields as E,sectionShapeFields as w,sectionThemeFields as O,stickFields as x,widthField as D}from"./controls.js";import{group as J}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as T}from"./box-fields.js";import{deviceField as Q,deviceMetaOf as P}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as B}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as V}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"efficient-easel/screen/lib/document/field-buckets";const A=V;function X(e){return e==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content","Card list":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content",Display:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Search:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content",Source:"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Map:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design",Overlay:"Design","Text style":"Design",Entrance:"Animation",Hover:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[Z]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},$={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},G={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,o){const a=`${e}.${t}`;return G[a]??$[a]??I[o]}function ge(e,t,o){const a=_(e,t,o);return a?X(a):void 0}function H(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const o of e)for(const a of Object.values(o)){const C=P(a),g=h(C?C.inner:a),l=g?I[g.label]:void 0;if(l)for(const p of H(l))t.includes(p)||t.push(p)}return t}const pe=[...S(T({tablet:!0}),D("full"),E(),m(),x()),...Object.keys(T({tablet:!0})),...Object.keys(D("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x())],ye=[...S(O()),...Object.keys(O())],ke=[...S(w()),...Object.keys(w())],_e=[...S(B()),...Object.keys(B())],ee=Object.keys(Y()),te=new Set(["cardImage","imageBackground"]),Se=[...H(_("ProductGrid","_gCards","Cards")??"Design"),...ee.filter(e=>e.startsWith("_g")||te.has(e))],ve=Object.keys(W()),fe=Object.keys(U()),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...T({tablet:!0}),...D("full"),...E(),...m(),...O(),...w(),...B()};for(const t of Object.keys(M)){const o=h(e[t]),a=o?I[o.label]:void 0;if(!o||o.level!==2||!a||!K[a].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const oe=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function me(e){const t=new Set([...Object.values(d),b.Content]);for(const[o,a]of Object.entries(e))if(!t.has(o)&&h(a)?.level===1)return 1;return 2}function ie(e){const t=`${e}.`;return Object.keys(ne).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function re(e,t){const o=P(e),a=J(t);return o?Q(o.tier,a):a}function de(e,t){const o=h(t);return o?e==="Content"||e==="Animation"?z(t,o.label):q(t):t}function j(e){return e==="Design"?k:["Animation"]}function Le(e,t){const o=[],a=new Set(ie(t)),C=new Set;let g=!1,l=null;for(const[n,r]of Object.entries(e)){const i=h(r);if(oe.has(n))throw new Error(`${t}.${n}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=ae.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(g=!0),o.push(l={place:c,entries:[],adopted:!0});continue}if(!i){l||o.push(l={place:"Content",entries:[]}),l.entries.push([n,r]);continue}if(a.has(n)||n in M){const s=_(t,n,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${n}: ${a.has(n)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(n)&&C.add(n),o.push(l={place:s,entries:[]});continue}const u=_(t,n,i.label);if(!u)throw new Error(`${t}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(l={place:u,entries:[[n,i.level===2?r:re(r,i.label)]]})}const p=new Set(Object.entries(e).filter(([,n])=>h(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",G],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!p.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${n} (lib/document/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=g?[]:[...a].filter(n=>!C.has(n));if(v.length)throw new Error(`${t}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const R=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=A.filter(n=>j(n).some(r=>R.has(r))),y={};for(const n of f){y[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!R.has(r))continue;const i=o.filter(u=>u.place===r),c=i.findIndex(u=>u.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(y[b[r]]=F(r));for(const u of i)for(const[s,N]of u.entries)y[s]=de(r,N)}}return y}function Ee(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:F("Content"),...e}}function we(e){return A.some(t=>d[t]in e)}function Oe(e){const t=A.filter(a=>d[a]in e);if(t.length===0)return e;const o={...e};for(const a of t)o[d[a]]=L(a,a===t[0]?t:null);return o}export{G as BLOCK_KEY_GROUP,Se as BOUND_CARD_MEDIA_FIELD_KEYS,A as BUCKETS,d as BUCKET_KEY,ee as CARD_MEDIA_FIELD_KEYS,fe as CARD_SHOW_FIELD_KEYS,ve as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,$ as KEY_GROUP,I as LABEL_GROUP,pe as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,_e as SECTION_ANIM_FIELD_KEYS,ke as SECTION_SHAPE_FIELD_KEYS,ye as SECTION_THEME_FIELD_KEYS,Le as assignSectionGroups,ge as bucketOf,X as bucketOfPlace,me as foldTopTier,we as hasBucketTabs,S as headerKeysOf,H as headerKeysOfPlace,_ as placeOf,Oe as reseatBucketTabs,ie as retiredHeadings,Ee as seatDesignBucket};
@@ -1,6 +1,7 @@
1
1
  import { MIRROR_CARDS_OPTIONS } from "../../../format/lib/content/mirror-cards.js";
2
2
  import { type BlockShowWhenFacts } from "../../../format/lib/document/show-when-attach.js";
3
3
  export declare const MIRROR_CARDS_IDLE = "mirrorCardsIdle";
4
+ export declare const MIRROR_CARDS_MIRRORS = "mirrorCardsMirrors";
4
5
  export declare const MIRROR_CARDS_FACTS: BlockShowWhenFacts;
5
6
  type Answer = (typeof MIRROR_CARDS_OPTIONS)[number]["value"];
6
7
  export declare function mirrorCardsOptions(disabled?: boolean): {
@@ -1 +1 @@
1
- "use client";import{jsx as n}from"react/jsx-runtime";import{SettingsDefaultReset as m,SettingsField as R}from"efficient-easel/panel";import{Segmented as u}from"efficient-shell/ui";import{SwapIcon as c}from"efficient-easel/icons";import{describedAs as f}from"efficient-easel/screen/lib/document/box-fields";import{deviceField as C}from"efficient-easel/screen/lib/document/device-fields";import{MIRROR_CARDS_LABEL as a,MIRROR_CARDS_OFF as s,MIRROR_CARDS_OPTIONS as l,MIRROR_CARDS_TITLES as S,mirrorCardsActs as O,mirrorCardsOf as _,mirrorCardsWrite as I,ownsCard as b}from"../../../format/lib/content/mirror-cards.js";import{editorEaselWords as A,say as t}from"../../../format/lib/editor-words.js";import{cardCopyPlace as v}from"../../../format/lib/content/card-template.js";import{sharedColumnsDrawn as D}from"../../../render/lib/content/box-shared-columns.js";import{withShowWhen as h}from"../../../format/lib/document/show-when-attach.js";const d="mirrorCardsIdle",z={[d]:(r,e)=>{const o=v(e.appState,r.props?.id),i=r.props??{};return o===void 0?void 0:!O(i,b(o),D(i).desktop)}};function w(r=!1){return l.map(e=>({value:e.value,label:t(e.label),title:e.value===s?void 0:t(S[e.value]),disabled:r}))}function x({value:r,onChange:e,readOnly:o}){const i=_(r)??s;return n(R,{label:t(a),icon:n(c,{}),action:n(m,{words:A()?.panel,label:t(a),changed:i!==s,detail:t("Off"),onReset:()=>e(void 0)}),children:n(u,{size:"sm",block:!0,label:t(a),value:i,onChange:p=>e(I(p)),options:w(o===!0)})})}function B(){return h(C("desktop",{type:"custom",...f({},{type:"radio",label:a,options:l.map(r=>({value:r.value,label:r.label}))}),render:({value:r,onChange:e,readOnly:o})=>n(x,{value:r,onChange:e,readOnly:o})}),{not:{context:d,is:!0}})}export{z as MIRROR_CARDS_FACTS,d as MIRROR_CARDS_IDLE,B as mirrorCardsField,w as mirrorCardsOptions};
1
+ "use client";import{jsx as i}from"react/jsx-runtime";import{SettingsDefaultReset as C,SettingsField as S}from"efficient-easel/panel";import{Segmented as O}from"efficient-shell/ui";import{SwapIcon as _}from"efficient-easel/icons";import{describedAs as I}from"efficient-easel/screen/lib/document/box-fields";import{deviceField as A}from"efficient-easel/screen/lib/document/device-fields";import{MIRROR_CARDS_LABEL as s,MIRROR_CARDS_OFF as a,MIRROR_CARDS_OPTIONS as p,MIRROR_CARDS_TITLES as b,mirrorCardsActs as d,mirrorCardsOf as l,mirrorCardsWrite as D,ownsCard as m}from"../../../format/lib/content/mirror-cards.js";import{editorEaselWords as M,say as n}from"../../../format/lib/editor-words.js";import{cardCopyPlace as R}from"../../../format/lib/content/card-template.js";import{sharedColumnsDrawn as u}from"../../../render/lib/content/box-shared-columns.js";import{withShowWhen as v}from"../../../format/lib/document/show-when-attach.js";const c="mirrorCardsIdle",h="mirrorCardsMirrors",B={[h]:(r,e)=>{const o=R(e.appState,r.props?.id),t=r.props??{};return o===void 0?void 0:d(t,m(o),u(t).desktop)&&l(t.mirrorCards)!==null},[c]:(r,e)=>{const o=R(e.appState,r.props?.id),t=r.props??{};return o===void 0?void 0:!d(t,m(o),u(t).desktop)}};function w(r=!1){return p.map(e=>({value:e.value,label:n(e.label),title:e.value===a?void 0:n(b[e.value]),disabled:r}))}function x({value:r,onChange:e,readOnly:o}){const t=l(r)??a;return i(S,{label:n(s),icon:i(_,{}),action:i(C,{words:M()?.panel,label:n(s),changed:t!==a,detail:n("Off"),onReset:()=>e(void 0)}),children:i(O,{size:"sm",block:!0,label:n(s),value:t,onChange:f=>e(D(f)),options:w(o===!0)})})}function N(){return v(A("desktop",{type:"custom",...I({},{type:"radio",label:s,options:p.map(r=>({value:r.value,label:r.label}))}),render:({value:r,onChange:e,readOnly:o})=>i(x,{value:r,onChange:e,readOnly:o})}),{not:{context:c,is:!0}})}export{B as MIRROR_CARDS_FACTS,c as MIRROR_CARDS_IDLE,h as MIRROR_CARDS_MIRRORS,N as mirrorCardsField,w as mirrorCardsOptions};
@@ -1 +1 @@
1
- import r from"../../../components/PreviewPartAnchors.js";import{animationTabFields as e}from"../../animation/fields.js";import{BLOCK_THEME_FOLLOW_LABEL as s,SECTION_THEME_FOLLOW_LABEL as t}from"../../../components/SectionThemePicker.js";import{anchorFields as m,cardShapeFields as d,cellWidthFields as p,heightFields as l,sectionShapeFields as F,sectionThemeFields as a,spacingFields as n,stickFields as S,widthField as c}from"../controls.js";import{blockSizeFieldSet as h}from"efficient-easel/screen/lib/document/block-size-fields";import{VIEW_KEY_ACCESS as E}from"efficient-easel/screen/lib/document/box-fields";import{rowSay as f,sidesPaddingFields as L}from"../box-fields.js";import{assignSectionGroups as _}from"../field-groups.js";import{boxGutterFields as O}from"../box-gutter-field.js";import{dropEmptyHeadings as A}from"../panel-drop-empty-headings.js";import{rowsShownForNode as P}from"../show-when-resolve.js";const N={spacingFields:n,sidesPaddingFields:L,sectionShapeFields:F,cardShapeFields:d,cellWidthFields:p,widthField:c,boxGutterFields:O,heightFields:l,anchorFields:m,stickFields:S,sectionThemeFields:a,animationTabFields:e,blockSizeFields:({tablet:i,...o}={})=>h({...o,say:f,...i?{phone:E}:{}}),assignSectionGroups:_,dropEmptyHeadings:A,rowsShownForNode:P,SECTION_THEME_FOLLOW_LABEL:t,BLOCK_THEME_FOLLOW_LABEL:s,PartAnchors:r};export{N as PASS_INSPECTOR};
1
+ import r from"../../../components/PreviewPartAnchors.js";import{animationTabFields as e}from"../../animation/fields.js";import{BLOCK_THEME_FOLLOW_LABEL as t,SECTION_THEME_FOLLOW_LABEL as s}from"../../../components/SectionThemePicker.js";import{anchorFields as m,cardShapeFields as d,cellWidthFields as p,heightFields as l,sectionShapeFields as F,sectionThemeFields as n,spacingFields as a,stickFields as c,widthField as S}from"../controls.js";import{blockSizeFieldSet as h}from"efficient-easel/screen/lib/document/block-size-fields";import{VIEW_KEY_ACCESS as f}from"efficient-easel/screen/lib/document/box-fields";import{rowSay as E,sidesPaddingFields as L}from"../box-fields.js";import{assignSectionGroups as _}from"../field-groups.js";import{boxGutterFields as O}from"../box-gutter-field.js";import{sectionOwnWidthFields as w}from"../section-own-width-fields.js";import{dropEmptyHeadings as A}from"../panel-drop-empty-headings.js";import{rowsShownForNode as P}from"../show-when-resolve.js";const x={spacingFields:a,sidesPaddingFields:L,sectionShapeFields:F,cardShapeFields:d,cellWidthFields:p,widthField:S,boxGutterFields:O,sectionOwnWidthFields:w,heightFields:l,anchorFields:m,stickFields:c,sectionThemeFields:n,animationTabFields:e,blockSizeFields:({tablet:i,...o}={})=>h({...o,say:E,...i?{phone:f}:{}}),assignSectionGroups:_,dropEmptyHeadings:A,rowsShownForNode:P,SECTION_THEME_FOLLOW_LABEL:s,BLOCK_THEME_FOLLOW_LABEL:t,PartAnchors:r};export{x as PASS_INSPECTOR};
@@ -0,0 +1,4 @@
1
+ export declare function sectionOwnWidthFields(options?: {
2
+ drawsFullOnItsOwn?: boolean;
3
+ }): Record<string, unknown>;
4
+ export declare function chromeOwnWidthFields(): Record<string, unknown>;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as i}from"react/jsx-runtime";import{group as k,sharedStyleKinds as l}from"efficient-easel/screen/lib/document/box-fields";import{deviceField as x}from"efficient-easel/screen/lib/document/device-fields";import{usePreviewHeader as R}from"../../../render/components/PreviewHeaderContext.js";import{BackgroundWidthRow as b,ContentWidthRow as S}from"../../components/SectionWidthRows.js";import{PAGE_WIDTH as h}from"../../../format/lib/content/page-width.js";import{SECTION_WIDTH_KEYS as s,chromeOwnWidth as _,ownSectionWidth as m,sectionBackgroundPatch as E,sectionContentMaxPatch as I,sectionContentPatch as P,sectionWidthResetPatch as f}from"../../../format/lib/content/section-width.js";import{say as F}from"../../../format/lib/editor-words.js";import{finiteNumber as N}from"../../../format/lib/finite-number.js";import{WIDTH_LABEL as T,keptBy as w,useSelectedPatch as p,useSelectedProps as g}from"./controls.js";const B="Content cannot be wider than the background.",u=t=>F(t==="content"?"Content width":"Full width");function W(t){const{siteWidth:n,sectionBackgroundWidth:r,sectionContentWidth:e,themeFromDocument:o}=R(),c=N(n)??h.default;return t.drawsFullOnItsOwn?{px:c,background:"full",content:"full"}:{px:c,background:(o?null:r)??"full",content:(o?null:e)??"content"}}const D={read:m},H={read:m,drawsFullOnItsOwn:!0},M={read:_,clearOnContent:{fullWidth:void 0}};function A({source:t}){const n=t.read(g()),r=p(),e=W(t);return i(b,{value:n.background??e.background,changed:n.background!==null,detail:u(e.background),onChange:o=>r(E(o)),onReset:()=>r(f("background"))})}function U({source:t}){const n=t.read(g()),r=p(),e=d=>r({...d,...t.clearOnContent}),o=W(t),c=(n.background??o.background)==="content",a=n.content??o.content;return i(S,{mode:c&&a==="full"?"content":a,px:n.contentMax??o.px,max:c?o.px:h.max,changed:n.content!==null,detail:o.content==="full"?u("full"):`${u("content")} ${o.px}px`,fullClosed:c,hint:c?B:void 0,onMode:d=>e(P(d)),onPx:d=>e(I(d)),onReset:()=>e(f("content"))})}const C=(t,n)=>x("desktop",{type:"custom",render:()=>i(t,{source:n})}),O=t=>({[s.background]:C(A,t),[s.content]:C(U,t),[s.contentMax]:w()});function J(t){const n=t?.drawsFullOnItsOwn?H:D;return l({_gWidth:k(T),...O(n)})}function Q(){return l({...O(M),fullWidth:w()})}export{Q as chromeOwnWidthFields,J as sectionOwnWidthFields};
@@ -11,6 +11,14 @@ export declare function fillRowCell<V extends string>(option: {
11
11
  value: V;
12
12
  showWhen: ShowWhenRule;
13
13
  };
14
+ export declare function ShapePicker<V extends string>({ label, lines, column, value, onChange, disabled }: {
15
+ label: string;
16
+ lines: readonly ShapeLine[];
17
+ column: "shape" | "image";
18
+ value: V;
19
+ onChange: (next: V) => void;
20
+ disabled?: boolean;
21
+ }): import("react").JSX.Element;
14
22
  export declare function shapePickerRow<V extends string>(label: string, icon: ReactElement, lines: readonly ShapeLine[], column: "shape" | "image", fallback: V, extra?: {
15
23
  phoneRest?: (follows: unknown) => V | undefined;
16
24
  more?: readonly {
@@ -1 +1 @@
1
- import{jsx as o,jsxs as a}from"react/jsx-runtime";import{iconPickerRow as d}from"./box-fields.js";const e=28,t=1.5;function x({ratio:r}){const[n,s]=r??[1,1],c=(e-t*2)/Math.max(n,s),h=n*c,i=s*c;return o("svg",{width:e,height:e,viewBox:`0 0 ${e} ${e}`,"aria-hidden":"true",children:o("rect",{x:(e-h)/2,y:(e-i)/2,width:h,height:i,rx:2,fill:"none",stroke:"currentColor",strokeWidth:t,strokeDasharray:r?void 0:"3 2"})})}function w(){const r=t*2;return a("svg",{width:e,height:e,viewBox:`0 0 ${e} ${e}`,"aria-hidden":"true",children:[o("line",{x1:t,y1:t/2,x2:e-t,y2:t/2,stroke:"currentColor",strokeWidth:t}),o("line",{x1:t,y1:e-t/2,x2:e-t,y2:e-t/2,stroke:"currentColor",strokeWidth:t}),o("rect",{x:e/4,y:r,width:e/2,height:e-r*2,rx:2,fill:"none",stroke:"currentColor",strokeWidth:t})]})}function m(r){return{...r,picture:o(w,{})}}const p={width:"5.25rem",height:"3.5rem"};function g(r,n,s,c,h,i={}){const u=[...s.map(l=>({value:l[c],label:l.label,picture:o(x,{ratio:l.ratio})})),...i.more??[]];return d(r,n,u,h,{columns:3,cell:p,phoneRest:i.phoneRest})}export{m as fillRowCell,g as shapePickerRow};
1
+ import{jsx as n,jsxs as d}from"react/jsx-runtime";import{IconPicker as x}from"efficient-shell/ui";import{iconPickerRow as f,pickerCellsOf as m}from"./box-fields.js";import{say as k}from"../../../format/lib/editor-words.js";const e=28,t=1.5;function w({ratio:r}){const[i,o]=r??[1,1],c=(e-t*2)/Math.max(i,o),l=i*c,s=o*c;return n("svg",{width:e,height:e,viewBox:`0 0 ${e} ${e}`,"aria-hidden":"true",children:n("rect",{x:(e-l)/2,y:(e-s)/2,width:l,height:s,rx:2,fill:"none",stroke:"currentColor",strokeWidth:t,strokeDasharray:r?void 0:"3 2"})})}function C(){const r=t*2;return d("svg",{width:e,height:e,viewBox:`0 0 ${e} ${e}`,"aria-hidden":"true",children:[n("line",{x1:t,y1:t/2,x2:e-t,y2:t/2,stroke:"currentColor",strokeWidth:t}),n("line",{x1:t,y1:e-t/2,x2:e-t,y2:e-t/2,stroke:"currentColor",strokeWidth:t}),n("rect",{x:e/4,y:r,width:e/2,height:e-r*2,rx:2,fill:"none",stroke:"currentColor",strokeWidth:t})]})}function R(r){return{...r,picture:n(C,{})}}const h={width:"5.25rem",height:"3.5rem"},u=3;function a(r,i){return r.map(o=>({value:o[i],label:o.label,picture:n(w,{ratio:o.ratio})}))}function S({label:r,lines:i,column:o,value:c,onChange:l,disabled:s}){return n(x,{label:k(r),value:c,options:m(a(i,o)),onChange:l,columns:u,cell:h,tooltips:!1,disabled:s})}function b(r,i,o,c,l,s={}){const p=[...a(o,c),...s.more??[]];return f(r,i,p,l,{columns:u,cell:h,phoneRest:s.phoneRest})}export{S as ShapePicker,R as fillRowCell,b as shapePickerRow};
@@ -1,4 +1,7 @@
1
+ import { type ViewOverrides } from "./view-overrides.js";
1
2
  export type BlockAlign = "left" | "center" | "right";
2
3
  export declare const BLOCK_ALIGN_JUSTIFY: Record<BlockAlign, string>;
4
+ export type AlignKind = "text" | "place" | "justify" | "items";
3
5
  export declare function blockAlignOf(value: unknown): BlockAlign | undefined;
4
- export declare function alignPhoneClass(kind: "text" | "place" | "justify" | "items", desktop: unknown, phone: unknown): string;
6
+ export declare function alignViewAnswers(desktop: unknown, tablet: unknown, phone: unknown): ViewOverrides<BlockAlign>;
7
+ export declare function alignViewClasses(kind: AlignKind, desktop: unknown, tablet: unknown, phone: unknown): string;
@@ -1 +1 @@
1
- const l={left:"justify-start",center:"justify-center",right:"justify-end"},n={text:{left:"max-view-tablet:text-left",center:"max-view-tablet:text-center",right:"max-view-tablet:text-right"},place:{left:"max-view-tablet:mx-0",center:"max-view-tablet:mx-auto",right:"max-view-tablet:ml-auto max-view-tablet:mr-0"},items:{left:"max-view-tablet:grid-cols-1 max-view-tablet:justify-items-start",center:"max-view-tablet:grid-cols-1 max-view-tablet:justify-items-center",right:"max-view-tablet:justify-items-end"},justify:{left:"max-view-tablet:justify-start",center:"max-view-tablet:justify-center",right:"max-view-tablet:justify-end"}};function i(t){return t==="left"||t==="center"||t==="right"?t:void 0}function s(t,a,r){const e=i(r);return!e||e===(i(a)??"left")?"":n[t][e]}export{l as BLOCK_ALIGN_JUSTIFY,s as alignPhoneClass,i as blockAlignOf};
1
+ import{viewOverrides as n}from"./view-overrides.js";const v={left:"justify-start",center:"justify-center",right:"justify-end"},o={text:{left:"view-tablet:max-view-desktop:text-left",center:"view-tablet:max-view-desktop:text-center",right:"view-tablet:max-view-desktop:text-right"},place:{left:"view-tablet:max-view-desktop:mx-0",center:"view-tablet:max-view-desktop:mx-auto",right:"view-tablet:max-view-desktop:ml-auto view-tablet:max-view-desktop:mr-0"},items:{left:"view-tablet:max-view-desktop:grid-cols-1 view-tablet:max-view-desktop:justify-items-start",center:"view-tablet:max-view-desktop:grid-cols-1 view-tablet:max-view-desktop:justify-items-center",right:"view-tablet:max-view-desktop:justify-items-end"},justify:{left:"view-tablet:max-view-desktop:justify-start",center:"view-tablet:max-view-desktop:justify-center",right:"view-tablet:max-view-desktop:justify-end"}},w={text:{left:"max-view-tablet:text-left",center:"max-view-tablet:text-center",right:"max-view-tablet:text-right"},place:{left:"max-view-tablet:mx-0",center:"max-view-tablet:mx-auto",right:"max-view-tablet:ml-auto max-view-tablet:mr-0"},items:{left:"max-view-tablet:grid-cols-1 max-view-tablet:justify-items-start",center:"max-view-tablet:grid-cols-1 max-view-tablet:justify-items-center",right:"max-view-tablet:justify-items-end"},justify:{left:"max-view-tablet:justify-start",center:"max-view-tablet:justify-center",right:"max-view-tablet:justify-end"}};function r(e){return e==="left"||e==="center"||e==="right"?e:void 0}function m(e,a,s){const i=r(e)??"left",t=n("same",i,r(a),r(s)),l={};return t.tablet&&t.tablet!==i&&(l.tablet=t.tablet),t.phone&&t.phone!==i&&(l.phone=t.phone),l}function f(e,a,s,i){const t=m(a,s,i);return[t.tablet?o[e][t.tablet]:"",t.phone?w[e][t.phone]:""].filter(Boolean).join(" ")}export{v as BLOCK_ALIGN_JUSTIFY,m as alignViewAnswers,f as alignViewClasses,r as blockAlignOf};
@@ -1,4 +1,5 @@
1
1
  import type { CSSProperties } from "react";
2
+ import { type ViewVarNames } from "./view-var-split.js";
2
3
  export declare const CARD_SHADOW_CLASS = "sf-card";
3
4
  export declare const BOX_DARKEN: {
4
5
  readonly min: 0;
@@ -28,4 +29,22 @@ export declare const BOX_CARD_SIDE: {
28
29
  };
29
30
  export declare function isBackgroundBox(src?: string | null): boolean;
30
31
  export declare function boxDarkenStyle(darken: unknown, style?: unknown): CSSProperties | null;
32
+ export declare const boxFillOf: (value: unknown) => string | null;
33
+ export declare const BOX_FILL_VIEWS: ViewVarNames;
34
+ export declare function boxFillViews(fill: unknown, fillTablet: unknown, fillPhone: unknown): {
35
+ className: string;
36
+ style: CSSProperties;
37
+ };
38
+ export declare const BOX_WASH_VIEWS: ViewVarNames;
39
+ export declare function boxWashViews(views: {
40
+ darken: unknown;
41
+ darkenStyle: unknown;
42
+ darkenTablet: unknown;
43
+ darkenStyleTablet: unknown;
44
+ darkenPhone: unknown;
45
+ darkenStylePhone: unknown;
46
+ }): {
47
+ className: string;
48
+ style: CSSProperties;
49
+ };
31
50
  export declare function boxPlacementClasses(anchor: string, direction: string): string;
@@ -1 +1 @@
1
- import{scrim as s}from"./scrim.js";const b="sf-card",c={min:0,max:100,step:5,fallback:0,unit:"%"},d=[{label:"Even",value:"even"},{label:"From the bottom",value:"bottom"}],p="68%",x={desktop:20,phone:20,side:40,sidePhone:24},f="sf-box-sides",S={min:0,max:200,step:10};function _(t){return typeof t=="string"&&t.trim()!==""}function A(t,r){const e=typeof t=="number"?t:Number.parseFloat(String(t??""));if(!Number.isFinite(e)||e<=0)return null;const n=(Math.min(c.max,Math.max(c.min,e))/100).toFixed(2);return r!=="bottom"?{background:s(Number(n))}:{background:`linear-gradient(0deg, ${s(Number(n))} 0%, ${s(0)} ${p})`}}function D(t,r){const e={"top-left":["start","start"],"top-center":["center","start"],"top-right":["end","start"],left:["start","center"],center:["center","center"],right:["end","center"],"bottom-left":["start","end"],"bottom-center":["center","end"],"bottom-right":["end","end"]},[o,n]=e[t]??e.center,[i,a]=r==="column"?[n,o]:[o,n],m={start:"justify-start",center:"justify-center",end:"justify-end"},u={start:"items-start",center:"items-center",end:"items-end"};return`${m[i]} ${u[a]}`}export{x as BOX_CARD_PAD,S as BOX_CARD_SIDE,c as BOX_DARKEN,d as BOX_DARKEN_STYLES,f as BOX_OWNS_SIDES_CLASS,b as CARD_SHADOW_CLASS,A as boxDarkenStyle,D as boxPlacementClasses,_ as isBackgroundBox};
1
+ import{parseHexColor as h}from"efficient-shell/format";import{scrim as p}from"./scrim.js";import{viewVarSplit as b}from"./view-var-split.js";const C="sf-card",S={min:0,max:100,step:5,fallback:0,unit:"%"},_=[{label:"Even",value:"even"},{label:"From the bottom",value:"bottom"}],g="68%",E={desktop:20,phone:20,side:40,sidePhone:24},B="sf-box-sides",F={min:0,max:200,step:10};function N(t){return typeof t=="string"&&t.trim()!==""}function x(t,o){const e=typeof t=="number"?t:Number.parseFloat(String(t??""));if(!Number.isFinite(e)||e<=0)return null;const r=(Math.min(S.max,Math.max(S.min,e))/100).toFixed(2);return o!=="bottom"?{background:p(Number(r))}:{background:`linear-gradient(0deg, ${p(Number(r))} 0%, ${p(0)} ${g})`}}const d=t=>typeof t=="string"?h(t.trim()):null,k={tabletClass:"sf-fill-tablet",tabletVar:"--sf-fill-tablet",phoneClass:"sf-fill-phone",phoneVar:"--sf-fill-phone"};function T(t,o,e){return b(k,d(t),d(o),d(e))}const y={tabletClass:"sf-wash-tablet",tabletVar:"--sf-wash-tablet",phoneClass:"sf-wash-phone",phoneVar:"--sf-wash-phone"};function V(t){const o=x(t.darken,t.darkenStyle);if(!o)return{className:"",style:{}};const e=(n,f)=>String(x(n,f)?.background??"none"),s=n=>(typeof n=="number"||typeof n=="string"&&n.trim()!=="")&&Number.isFinite(Number(n))?n:void 0,r=n=>_.some(f=>f.value===n)?n:void 0,[a,l,i,c]=[s(t.darkenTablet),r(t.darkenStyleTablet),s(t.darkenPhone),r(t.darkenStylePhone)],u=a??t.darken,m=l??t.darkenStyle;return b(y,String(o.background),a!==void 0||l!==void 0?e(u,m):null,i!==void 0||c!==void 0?e(i??u,c??m):null)}function P(t,o){const e={"top-left":["start","start"],"top-center":["center","start"],"top-right":["end","start"],left:["start","center"],center:["center","center"],right:["end","center"],"bottom-left":["start","end"],"bottom-center":["center","end"],"bottom-right":["end","end"]},[s,r]=e[t]??e.center,[a,l]=o==="column"?[r,s]:[s,r],i={start:"justify-start",center:"justify-center",end:"justify-end"},c={start:"items-start",center:"items-center",end:"items-end"};return`${i[a]} ${c[l]}`}export{E as BOX_CARD_PAD,F as BOX_CARD_SIDE,S as BOX_DARKEN,_ as BOX_DARKEN_STYLES,k as BOX_FILL_VIEWS,B as BOX_OWNS_SIDES_CLASS,y as BOX_WASH_VIEWS,C as CARD_SHADOW_CLASS,x as boxDarkenStyle,d as boxFillOf,T as boxFillViews,P as boxPlacementClasses,V as boxWashViews,N as isBackgroundBox};