efficient-web-builder 67.8.1 → 68.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 (80) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/dist/editor/components/BlockGapField.d.ts +4 -1
  3. package/dist/editor/components/BlockGapField.js +1 -1
  4. package/dist/editor/components/CornersField.d.ts +3 -1
  5. package/dist/editor/components/CornersField.js +1 -1
  6. package/dist/editor/components/SideSpaceField.d.ts +5 -1
  7. package/dist/editor/components/SideSpaceField.js +1 -1
  8. package/dist/editor/components/StorefrontEditor.js +1 -1
  9. package/dist/editor/components/WebsiteSettingsPanel.d.ts +0 -5
  10. package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
  11. package/dist/editor/components/storefront-editor.css +6 -1
  12. package/dist/editor/components/useSiteLengthRow.d.ts +15 -0
  13. package/dist/editor/components/useSiteLengthRow.js +1 -0
  14. package/dist/editor/lib/content/site-length-rows.d.ts +15 -0
  15. package/dist/editor/lib/content/site-length-rows.js +1 -0
  16. package/dist/editor/lib/document/blocks/general/Logos/fields.js +1 -1
  17. package/dist/editor/lib/document/blocks/general/ProcessSteps/fields.js +1 -1
  18. package/dist/editor/lib/document/box-fields.d.ts +2 -0
  19. package/dist/editor/lib/document/box-fields.js +1 -1
  20. package/dist/editor/lib/document/choice-pictures.d.ts +2 -0
  21. package/dist/editor/lib/document/choice-pictures.js +1 -1
  22. package/dist/editor/lib/document/controls.js +1 -1
  23. package/dist/editor/lib/document/field-groups.js +1 -1
  24. package/dist/editor/lib/document/shape-picker.js +1 -1
  25. package/dist/format/lib/content/block-align.d.ts +2 -0
  26. package/dist/format/lib/content/block-align.js +1 -1
  27. package/dist/format/lib/content/box-shape.d.ts +1 -1
  28. package/dist/format/lib/content/container-gap.d.ts +1 -0
  29. package/dist/format/lib/content/container-gap.js +1 -1
  30. package/dist/format/lib/content/css-length.d.ts +5 -6
  31. package/dist/format/lib/content/css-length.js +1 -1
  32. package/dist/format/lib/content/gallery-layout.d.ts +25 -11
  33. package/dist/format/lib/content/gallery-layout.js +1 -1
  34. package/dist/format/lib/content/grid-span.d.ts +4 -0
  35. package/dist/format/lib/content/grid-span.js +1 -1
  36. package/dist/format/lib/content/image-text-rows.d.ts +1 -0
  37. package/dist/format/lib/content/image-text-rows.js +1 -1
  38. package/dist/format/lib/content/page-width.d.ts +2 -1
  39. package/dist/format/lib/content/page-width.js +1 -1
  40. package/dist/format/lib/content/section-min-height.d.ts +3 -1
  41. package/dist/format/lib/content/section-min-height.js +1 -1
  42. package/dist/format/lib/content/view-lines.d.ts +7 -0
  43. package/dist/format/lib/content/view-lines.js +1 -1
  44. package/dist/format/lib/editor-words-catalogue.d.ts +2 -0
  45. package/dist/format/lib/editor-words-catalogue.js +2 -2
  46. package/dist/format/lib/editor-words-kept.js +1 -1
  47. package/dist/format/lib/sections/section-head-placement.js +1 -1
  48. package/dist/format/lib/source-rules/site-length-writes.d.ts +18 -0
  49. package/dist/format/lib/source-rules/site-length-writes.js +2 -0
  50. package/dist/format/lib/theme.d.ts +5 -0
  51. package/dist/format/lib/theme.js +1 -1
  52. package/dist/render/components/ButtonBlock.js +1 -1
  53. package/dist/render/components/CardRowContext.d.ts +2 -1
  54. package/dist/render/components/CardRowContext.js +1 -1
  55. package/dist/render/components/Eyebrow.js +1 -1
  56. package/dist/render/components/Flex.js +1 -1
  57. package/dist/render/components/InBoxContext.d.ts +6 -0
  58. package/dist/render/components/InBoxContext.js +1 -1
  59. package/dist/render/components/Logo.js +1 -1
  60. package/dist/render/components/LogoBlock.js +1 -1
  61. package/dist/render/components/PreviewHeaderContext.d.ts +3 -1
  62. package/dist/render/components/PreviewHeaderContext.js +1 -1
  63. package/dist/render/components/PublishedPartStylesContext.js +1 -1
  64. package/dist/render/components/SectionAnimation.js +1 -1
  65. package/dist/render/components/Split.js +1 -1
  66. package/dist/render/components/Text.js +1 -1
  67. package/dist/render/components/ViewHideRoot.d.ts +2 -1
  68. package/dist/render/components/ViewHideRoot.js +1 -1
  69. package/dist/render/lib/content/section-edge.js +1 -1
  70. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  71. package/dist/render/lib/document/blocks/general/section-to-box-rows-docbody.js +2 -2
  72. package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +1 -1
  73. package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.js +1 -1
  74. package/dist/render/lib/document/passes/block-size.js +1 -1
  75. package/dist/render/lib/document/passes/cell-width.js +1 -1
  76. package/dist/render/lib/document/passes/section-anchor.js +1 -1
  77. package/dist/render/lib/document/passes/section-height.js +1 -1
  78. package/dist/render/lib/document/passes/section-padding.js +1 -1
  79. package/dist/render/lib/document/passes/section-width.js +1 -1
  80. package/package.json +10 -6
@@ -1 +1 @@
1
- "use client";import{jsx as i,jsxs as k,Fragment as L}from"react/jsx-runtime";import{cloneElement as _e,createContext as Tn,useContext as nt,useEffect as Rn,useId as ot,useRef as J,useState as Z}from"react";import{useEasel as re,useSelectedHost as B}from"efficient-easel/easel";import{PIN_LENGTH as ie,toDateKey as Nn,fromDateKey as Pn}from"efficient-shell/format";import{say as a,editorEaselWords as C}from"../../../format/lib/editor-words.js";import{finiteNumber as $}from"../../../format/lib/finite-number.js";import{LOADING_SHOWS_LABELS as rt,firstFrameHint as kn,loadingShowsOf as Ln,loadingStillHint as An}from"../../../format/lib/hero-video.js";import{pageFramesFor as Fn,usePageVideoFrames as vn}from"../page-video-frames.js";import{ScreenDocumentContext as Bn}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as it,hidableText as st}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as ye,LINK_FIELD_MARKER as lt,MEDIA_FIELD_MARKER as at,SCAFFOLD_FIELD_MARKER as ct,TEXT_FIELD_MARKER as N,foldMetaOf as Ce,textFieldIdentifier as Dn}from"efficient-easel/draw";import Hn from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as ut}from"../../../render/lib/document/show-when.js";import{CARD_IMAGE_PX_ROW as Gn,CARD_IMAGE_RADIUS_ROW as dt,CARD_IMAGE_RADIUS_STEP as Mn,CORNER_RADIUS_MAX as xe,CORNER_RADIUS_MIN as A}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as Wn,IMAGE_CORNERS_LABEL as Un,IMAGE_CORNERS_ROW as Kn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as Xn}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as $n,GALLERY_LAYOUTS as Oe,GALLERY_LAYOUT_KEYS as Vn,GALLERY_PHONE_LAYOUTS as jn,galleryChoices as pt,galleryLayoutRatio as Yn,galleryPictureCells as zn}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as qn}from"./shell-glyph.js";import{anchorSiblingsOf as Jn,placementPoints as Zn}from"../../../format/lib/hero-group-placement.js";import Qn from"../../components/AnchorField.js";import eo from"../../components/SourceStatus.js";import{AdjustIcon as to,EyeIcon as no,AnimationIcon as oo,BackgroundIcon as ft,BorderAllIcon as ro,BlockSectionIcon as io,ColumnWidthsIcon as Ie,ColumnsIcon as ht,CornerIcon as mt,DirectionDownIcon as so,DirectionLeftIcon as lo,DirectionRightIcon as ao,DirectionUpIcon as co,EditIcon as uo,GapIcon as po,GridIcon as gt,GroundIcon as Ee,HashIcon as fo,HeightIcon as bt,ImageIcon as ho,ListIcon as mo,LocationIcon as wt,PaddingBottomIcon as St,PaddingLeftIcon as _t,PaddingRightIcon as yt,PaddingTopIcon as Te,PageIcon as go,StickyIcon as Ct,SearchIcon as bo,SquareIcon as wo,TypeIcon as So,WidthIcon as _o}from"efficient-easel/icons";import{FieldGlyph as xt}from"../../components/FieldGlyph.js";import{resolvePageBackground as yo}from"../../../format/lib/content/page-background.js";import{BOX_FILL_FADE_PROP as Co,BOX_FILL_FADES as xo,BOX_SWATCH_PROP as Oo,boxFillFadeOf as Ot,boxFillOf as Io,boxFillSlot as Re,boxPaintOf as Eo}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as It,CORNER_SIDE_POINTS as To,SECTION_CORNERS_ROW as Et,hasOwnSectionCorners as Ro,normalizeCornerSides as Tt}from"../../../format/lib/content/section-corners.js";import{CARD_CORNERS_ROW as Rt}from"../../../format/lib/content/card-corners.js";import{enclosingPath as No,enclosingSection as Po}from"./enclosing-section.js";import{SettingsDefaultReset as x,SettingsDrill as ko,SettingsField as _,SettingsGroup as Lo,SettingsSegmented as Ao,SettingsBorder as Fo,SettingsSidesEach as vo,SettingsSwitch as Ne,borderSides as Bo,borderStartEach as Do}from"efficient-easel/panel";import{ListField as Ho}from"efficient-easel/fields";import{DisplayChips as Go}from"efficient-shell/ui";import{desktopDisplayChanged as Mo,partShownOnDesktop as Wo,partShownOnPhone as Uo,phoneDisplayChanged as Ko,withDesktopPart as Xo,withPhonePart as $o}from"../../../format/lib/content/part-display.js";import{ColorSwatch as Vo,CornersInput as jo,DatePicker as Yo,DateTimePicker as zo,FOCAL_DEFAULT as qo,IconPicker as Nt,COLUMN_COUNT_MAX as Pt,COLUMN_SHARE_MIN as Jo,COLUMN_SHARES_EQUAL as Zo,resolveColumnShares as kt,WidthsBar as Qo,useShellStrings as er,IconButton as Lt,InputNumber as At,Slider as tr,Tooltip as Pe}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as nr}from"./geocode-resolve.js";import{ColourRow as se,InheritedColourRow as Ft}from"./ColourControl.js";import{fillThemeColors as or,slotFill as le}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as ke}from"../../../format/lib/document/part-inks.js";import{keptByRow as Le}from"efficient-easel/screen/lib/document/style-fields";import vt from"./MarkupToolbar.js";import{deviceField as E}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as rr,NoControlMark as ir,noControlField as Bt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as sr}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as lr,PANEL_ONLY_FIELD as ar}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as cr,resolvePhoneValue as Ae}from"../../../format/lib/document/phone-override.js";import{phoneKey as V,tabletKey as Fe,viewKeyAt as ve}from"efficient-easel/draw";import{viewKey as O}from"../../../format/lib/animation/views.js";import{viewRows as D}from"../animation/view-rows.js";import{SuppressibleText as ur}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as dr,CARD_OUTLINE_OPTIONS as pr,DEFAULT_CARD_INDEX_FORMAT as fr,DEFAULT_CARD_OUTLINE as hr}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as mr,DEFAULT_COVER_INDEX as gr}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as br}from"efficient-easel/draw";import wr from"../../components/MediaUploadField.js";import Sr from"../../components/MultiSelectField.js";import _r from"../../components/SectionThemePicker.js";import yr from"../../components/SearchSelectField.js";import Cr from"../../components/StorefrontLinkField.js";import{UiIcon as Dt}from"efficient-easel/draw/client";import{SECTION_PADDING as P}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as xr}from"../../../render/lib/content/button-look.js";import{usePreviewParts as Or}from"efficient-easel/draw/client";import{encodePartId as Ir}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as Er,useEaselStrings as Tr}from"efficient-easel/strings";import{hasPhoneHeight as Rr,hasTabletHeight as Be,resolveSectionMinHeight as Nr,resolveTabletHeight as Pr}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as kr,SECTION_PIN_ABOVE_HINT as Lr,SECTION_PIN_ABOVE_KEY as Ar,SECTION_PIN_ABOVE_LABEL as Fr,SECTION_PIN_GROUP as vr,SECTION_PIN_LABEL as Ht,SECTION_PIN_SCREENS_KEY as De,SECTION_PIN_SCREENS_LABEL as Gt,SECTION_PIN_STOP_DEFAULT as Br,SECTION_PIN_STOP_HINT as Dr,SECTION_PIN_STOP_KEY as Hr,SECTION_PIN_STOP_LABEL as Gr,SECTION_PIN_STOP_OPTIONS as Mr,SECTION_STICK_DISTANCE as H,SECTION_STICK_DISTANCE_ROW as He,SOME_VIEW_PINS as Mt,hasPhoneStick as Wr,hasTabletStick as Ur,resolveSectionStick as ae,sectionPinStopOf as Kr,sectionPinStopWrite as Xr}from"../../../format/lib/content/section-sticky.js";import{cssLengthOf as $r}from"../../../format/lib/content/css-length.js";import{SECTION_HEIGHT_MODES as Vr,SECTION_MIN_HEIGHT as jr,SECTION_MIN_HEIGHT_GROUP_LABEL as Q,SECTION_SCREEN_PCT as Yr}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as zr,resolveContainerDirection as Wt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as qr,BOX_BLOCK_SPACING_POINTS as Ut,BOX_PHONE_ROW_LABEL as Kt,BOX_COLUMNS_MAX as Jr,BOX_COLUMNS_MIN as Xt,BOX_PHONE_ROW_MAX as Zr,BOX_PHONE_ROW_MIN as Ge,BOX_SHARE_CHOICES as $t,BOX_SHARE_LABEL as j,boxShareChoiceOf as Vt,boxShareWidthsOf as Me,BOX_SHARE_PHONE_DEFAULT as Qr,BOX_SHARE_PHONE_POINTS as ei}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as G}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as jt,BORDER_SIDES as ti,SECTION_BORDER_ROW as Yt,borderBySide as zt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as ni,normalizeTheme as qt,normalizeThemeColors as oi,sectionBandTone as ri,surfaceTwoTone as ii}from"../../../format/lib/theme.js";import{CONTAINER_GAP as Jt,CONTAINER_GAP_BUILT_IN as si,CONTAINER_GAP_PHONE as We,GAP_FIELD_CONTAINER as Ue,followsSitePhoneGap as li,hasOwnContainerGap as ai,hasOwnPhoneGap as Ke,resolveContainerGap as Zt,resolvePhoneContainerGap as Qt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as ci,CARD_IMAGE_BG_OFF as ui,CARD_IMAGE_BG_SWATCH_NAMES as di,CARD_IMAGE_BG_SWATCHES as pi,isCardImageBackgroundInheriting as fi,cardImageBackgroundChoice as hi,THEME_CARD_IMAGE_BG as mi}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as gi,SECTION_BG_NO_FILL as bi,sectionBackgroundChoice as wi,THEME_SECTION_BG as Xe,isSectionBackgroundEmpty as Si,sectionBackgroundHex as en}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as _i,nestedAccentValue as tn,resolveSectionAccent as ce}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as yi,TYPE_SIZE_INHERIT as Ci,isTypeSizeInheriting as xi}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Oi,WIDTH_CHOICE_LABEL as Ii,WIDTH_INHERIT as Ei}from"../../../format/lib/content/section-width.js";import{useEaselSession as Ti}from"efficient-easel/screen/lib/session-context";import{backendOf as Ri}from"../website-session.js";import{BOX_GAP as Ni,describedAs as F,group as T,iconOf as Y,sharedStyleKinds as ee}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as nn,onDesktopWords as M,phoneTwinFields as $e,saidAlignmentGrid as Pi,useLengthUnit as ki}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as Li,directionField as Ai,gapField as Ve,iconPickerRow as on,lengthUnitFields as ue,pickerCellIcon as Fi,pickerNoneIcon as vi,Segmented as de,select as z,slider as W}from"./box-fields.js";import{VIEW_ABOVE as je}from"efficient-easel/screen/lib/content/length-units";import{tierOfView as rn,viewOfTier as Bi}from"../../../format/lib/content/view-tier.js";import{ownEntry as Di}from"../../../format/lib/own-entry.js";import{LAYOUT_CELL as Hi,galleryPhonePicture as sn}from"./choice-pictures.js";function $a({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?a(e):e})}function U(e,t){return a("{value} from {from}",{value:e,from:t})}function Gi(){const{blockGap:e}=G();return e===null?a("this container's own spacing"):U(`${e}px`,a("Styles"))}function Mi({inherited:e,onReset:t,label:n}){return i(x,{words:C()?.panel,label:a(n),changed:!e,detail:Gi(),onReset:t})}function Wi(e){return Ve({...Ni,builtIn:si[e],resolve:(t,n)=>Zt(e,t,n?.siteGap),action:(t,n)=>i(Mi,{inherited:!ai(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[Ue]:e}})}function Ui(e){return ut(E("mobile",{[Ue]:e,type:"custom",render:t=>i($i,{container:e,...t})}),ln)}function Ki(e){return ut(E("tablet",{[Ue]:e,type:"custom",render:t=>i(Xi,{container:e,...t})}),ln)}const ln={not:{field:"gap",in:Array.from({length:-Jt.min},(e,t)=>Jt.min+t)}};function Va(e){return{gap:E("desktop",Wi(e)),[Fe("gap")]:Ki(e),[V("gap")]:Ui(e)}}function Xi({container:e,...t}){const[n]=R("gap"),{siteGap:o}=t.field??{},r=Math.max(We.min,Zt(e,n,o));return Ve({...We,builtIn:r,resolve:l=>Ke(l)?l:r,action:(l,c)=>i(x,{words:C()?.panel,label:a("Gap"),changed:Ke(l),detail:M(u=>a(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function $i({container:e,...t}){const[n]=R("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},s=Qt(e,void 0,n,o,r);return Ve({...We,builtIn:s,resolve:c=>Qt(e,c,n,o,r),action:(c,u)=>i(x,{words:C()?.panel,label:a("Gap"),changed:Ke(c),detail:U(`${s}px`,li(e,n,r)?a("Styles"):a("Desktop")),onReset:()=>u(void 0)})}).render(t)}function ja(e){return Ai({offered:zr(e),fallback:Wt(e,void 0),resolve:t=>Wt(e,t)})}function Ya(e,t){return Zn(t?Jn(e,t):[],t)}function Vi({inherited:e,onReset:t,label:n}){return i(x,{words:C()?.panel,label:a(n),changed:!e,detail:U(a("Full"),a("the page")),onReset:t})}function K({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:s,hideable:l=!0,markup:c=!0}){const{text:u,hidden:d}=it(e),h=J(null),p=J(null),f=y=>t(l?{text:y,hidden:d}:y),m=()=>t({text:u,hidden:!d}),g=l&&d,b=ot(),S=r?Ji(r)?i("span",{className:"sf-hint-while-typing",children:a(r)}):a(r):void 0,w=d?a("Show {label} on the slide",{label:a(n)}):a("Hide {label} on the slide",{label:a(n)});return i(_,{label:a(n),icon:i(So,{}),htmlFor:b,className:g?"is-hidden":void 0,hint:S,action:l?i(Pe,{content:w,children:i(Lt,{"aria-pressed":d,"aria-label":w,onClick:m,children:d?i(Dt,{name:"eye-off",size:14}):i(Dt,{name:"eye",size:14})})}):void 0,children:k("div",{className:"sf-copybox",children:[c&&i(vt,{target:s?p:h,value:u,onChange:f}),s?i("textarea",{id:b,ref:p,value:u,placeholder:o===void 0?void 0:a(o),onChange:y=>f(y.target.value)}):i("input",{id:b,ref:h,type:"text",value:u,placeholder:o===void 0?void 0:a(o),onChange:y=>f(y.target.value)})]})})}function za(e,t){return{...e,[ct]:t}}function qa(e){const t=e[N];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[N]:{...t,offPage:!0}}}function Ja(e){return!e||typeof e!="object"?!1:e[N]?.offPage===!0}function Za(e){if(!e[N])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[ar]:!0}}function Qa(e){return lr(e)}function ec(e){const t=e[N];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[N]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as du,SCALAR_TEXT_CONTROLS as pu}from"efficient-easel/draw";function tc(e,t){if(!e[N])throw new Error("inOwnBox: the field holds no authored text");const{[rr]:o,...r}=e;return{...r,[sr]:!0,render:t}}const ji=new Set(br),pe={type:"radio",options:[{value:!0},{value:!1}]},an={text:{type:"object",objectFields:{text:{type:"text"},hidden:pe}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:pe}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},X=(e,t)=>{const n=F({...t,[N]:e},{...an[e.control],label:e.label});if(!ji.has(e.control))return n;const o=t.render;return{...Bt(n,"authored-copy"),render:r=>i(ur,{name:r.name,children:o(r)})}},nc="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Yi={field:"source.slug",set:!0},oc={not:Yi},zi="Select a word, then press the highlighter.",qi=new Set([zi]),Ji=e=>qi.has(e);function rc(e,t,n){return X({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function ic(e,t,n){return X({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function sc(e,t,n){return X({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function lc(e,t,n){return X({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function ac(e){return{type:"custom",[lt]:{label:e},...F({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(Cr,{value:st(t),onChange:n,label:e})}}function cc(e,t,n){return X({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const uc={Design:to,Animation:oo};function dc(e,t){return{type:"custom",render:()=>i(Zi,{text:e,values:t})}}function Zi({text:e,values:t}){return i("p",{className:"sf-note",children:a(e,t)})}function pc(e){return Ce(e)!==null&&e?.tabs!==void 0}const cn=new Map;function fc(e,t){const n=`${e}\0${t?t.join(""):""}`,o=cn.get(n)??{type:"custom",tabs:t,[ye]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(L,{})};return cn.set(n,o),o}const un=new Map;function hc(e){const t=un.get(e)??{type:"custom",[ye]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(L,{})};return un.set(e,t),t}function Qi(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function mc(e,t){return Qi(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(L,{})}}function gc(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>i(L,{})}}function bc({title:e,children:t}){const[n,o]=Z(()=>!Ye.has(e));return i(Lo,{title:e,open:n,onToggle:r=>{o(r),r?Ye.delete(e):Ye.add(e)},children:t})}const Ye=new Set;function es({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),s=r?o?.[r]:void 0,l=s?a(s):t;return k("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?a(o[c]):c;return i(Pe,{content:u,children:i(Vo,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:l})]})}function wc(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(ts,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function ts({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const s=typeof o=="string"?o:void 0,{colors:l,n:c}=Qe(),u={background:l.background,surface:l.surface,surface2:ii(l),band:ri(l)},d=n?Xe:t,h=Si(s,t,d),p=en(void 0,d,u),f=n?gi:void 0,m=d===Xe?a("the theme's section background"):a("Theme {n} background",{n:c}),g=ns(s,t,l,c,u,r),b=U(p.toUpperCase(),m),S=ke(s),w=S?le(S,l,c):null;return w?i(se,{label:a(e),icon:i(ft,{}),value:w.hex,caption:w.words,onChange:r,changed:!0,onReset:()=>r(f),resetTo:b,choices:g}):i(Ft,{label:a(e),icon:i(ft,{}),value:h?"":en(s,t,u),inherited:p,resetTo:b,onChange:r,onReset:()=>r(f),choices:g})}function ns(e,t,n,o,r,s){const l=wi(e,t);return[{label:a("No fill"),color:"",selected:l==="none",onPick:()=>s(bi)},{label:`${a("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:l==="band",onPick:()=>s(Xe)},...Ze(ke(e)??"",n,o,s)]}function os(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,s=fi(r,t);return i(_,{label:a(e),icon:i(Ee,{}),changed:!s,action:i(x,{words:C()?.panel,label:a(e),changed:!s,detail:a("the theme's image stage"),onReset:()=>o(ci)}),children:es({swatches:pi,current:s?mi:hi(r,t),onPick:o,names:di})})}}}function Sc(e=n=>n,t){return ee({_gSectionTheme:T(_i),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(_r,{value:e(n),onChange:o,followLabel:t})}})}function fe(e){const t=I(),n=rn(e?.view),o=l=>ve(e.valueKey,l),r=e.numbersIn??(l=>$(t[o(l)])!==void 0),s=e.followsView??ws(n,r);return ki({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:Li,label:a(e.label),grid:e.grid,hasOwn:r(n),view:{tier:n,numbersIn:r,followsView:s},convertTo:e.convertTo??(l=>{const c=$(t[o(n)]);return c===void 0?{}:{[o(n)]:l(c)}})})}function q({min:e,max:t,step:n,value:o,onChange:r,suffix:s="",readout:l=!0,notch:c,ariaLabel:u,disabled:d=!1,placeholder:h,placeholderWord:p,onClear:f,units:m}){const g=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:g?"sf-slider has-notch":"sf-slider",style:g?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(tr,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...p?{emptyLabel:a(p)}:{},suffix:s||void 0,...m?{units:m}:{},showInput:l,label:u===void 0?void 0:a(u),disabled:d,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:b=>{b===null?f?.():b!==o&&r(b)}})})}function rs(e,t){const{min:n,max:o,step:r=1,unsetLabel:s,hint:l,restTrack:c,unsetMark:u,icon:d,unit:h="px"}=t;return{type:"custom",render:({value:p,onChange:f})=>{const m=typeof p=="number"?p:null,g=m===null;return i(_,{label:a(e),icon:d?Y(d):void 0,value:g?u||s===void 0?void 0:a(s):`${m}${h}`,changed:!g,action:u?_e(u,{changed:!g,onReset:()=>f(null)}):i(x,{words:C()?.panel,label:a(e),changed:!g,onReset:()=>f(null)}),hint:typeof l=="string"?a(l):l,children:c?c({min:n,max:o,step:r,px:m,label:e,onChange:f}):q({min:n,max:o,step:r,value:m??n,readout:!1,ariaLabel:e,onChange:f})})}}}const te="Corners",is={kind:"radius"};function ze(e){return{type:"custom",render:t=>{const{value:n,onChange:o}=t,r=typeof n=="number"&&Number.isFinite(n)?n:null,s=r!==null;return i(_,{label:a(te),icon:i(mt,{}),changed:s,action:_e(e.mark,{changed:s,onReset:()=>o(null)}),hint:e.hint,children:i(ss,{tier:e,px:r,name:t.name,onRadius:o})})}}}function R(e){const t=B();return[t?.values?.[e],n=>t?.onChange(e,n)]}function dn(){return Bt({type:"custom",render:()=>i(ir,{})},"always")}function he(){const e=B();return t=>e?.onChangeMany(t)}function ss({tier:e,px:t,name:n,onRadius:o}){const r=e.useFollowed(),[s,l]=R(e.sidesKey),c=he(),u=fe({row:e.row??is,label:te,grid:{min:A,max:xe,step:e.step??1},valueKey:n??"",view:"desktop"}),d=Tt(s)??[...It];return i(jo,{label:a(te),value:d,corners:To,onChange:h=>{const p=Tt(h)??[];l(p.length===It.length?null:p)},radius:t,onRadiusChange:u&&n?h=>c({[n]:h,...u.unitPatch(h===null)}):o,radiusMin:u?.grid.min??A,radiusMax:u?.grid.max??xe,radiusStep:u?.grid.step??e.step??1,radiusPlaceholder:u&&u.unit!=="px"?"–":String(r),...u?{radiusUnit:u.unit,units:u.units}:{}})}function pn(e,t){return ue(e,t)}function fn(){return dn()}function ls({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=G(),r=typeof o=="number"?`${o}px`:a("not set");return i(x,{words:C()?.panel,label:a(e),changed:t,detail:o==null?a("the built-in corners"):U(r,a("Styles")),onReset:n})}function as(){const{cornerRadiusPx:e}=G();return typeof e=="number"?e:A}function cs(){return ze({sidesKey:"sectionCornerSides",row:Et,useFollowed:as,mark:i(ls,{label:te}),hint:us})}const us="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function _c(){return ee({_gShape:T("Shape"),sectionCorners:cs(),...pn(Et,"sectionCorners"),sectionCornerSides:fn(),...D("sectionBorder",bs),...ue(Yt,"sectionBorder",{tablet:!0,phone:!0})})}const ds=()=>({width:a("Border width"),sides:{top:a("Border top"),right:a("Border right"),bottom:a("Border bottom"),left:a("Border left")},style:a("Border style"),styles:{solid:a("Solid"),dashed:a("Dashed"),dotted:a("Dotted")},color:a("Border color"),unit:"px"});function ps(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function fs(){let e;try{const t=qt(G().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||ni.line}function hs({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:s=!0,above:l={},length:c}){const u=e&&typeof e=="object"?e:{},[d,h]=Z(()=>r?Do(u,l):!1),p=ds(),f=m=>ps(r&&s?m:{width:m.width,color:m.color,...s?{style:m.style}:{}});return i(_,{label:a("Border"),icon:i(ro,{}),action:r?i(vo,{each:d,label:a("Each side"),onChange:h}):void 0,children:i(Fo,{label:a("Border"),value:u,each:d,onChange:m=>t(f(m)),placeholder:n,presets:o,words:c?{...p,unit:c.unit}:p,styles:s,max:c?.grid.max??jt,...c?{step:c.grid.step,units:c.units}:{}})})}function ms({value:e,onChange:t,view:n}){const[o]=R("sectionBorder"),[r]=R(Fe("sectionBorder")),s=fs(),l=f=>f&&typeof f=="object"?f:{},c=n==="phone"?{...zt(l(o)),...zt(l(r))}:n==="tablet"?l(o):{},u=I(),d=he(),h=O("sectionBorder",n),p=fe({row:Yt,label:"Border",grid:{min:0,max:jt,step:1},valueKey:"sectionBorder",view:n,numbersIn:f=>qe(u[ve("sectionBorder",f)]),convertTo:f=>{const m=l(u[h]);return qe(m)?{[h]:gs(m,f)}:{}}});return i(hs,{value:e,length:p,onChange:p?f=>d({[h]:f,...p.unitPatch(!qe(f))}):t,placeholder:{sides:Bo(c),style:c.style??"solid",color:c.color||s},presets:[s],above:c})}const hn=["width",...ti];function qe(e){if(!e||typeof e!="object")return!1;const t=e;return hn.some(n=>$(t[n])!==void 0)}function gs(e,t){const n={...e};for(const o of hn){const r=$(n[o]);r!==void 0&&(n[o]=t(r))}return n}function bs(e){return{type:"custom",render:({value:t,onChange:n})=>i(ms,{value:t,onChange:n,view:e})}}function ws(e,t){let n=je[e];for(;n&&je[n]!==null&&!t(n);)n=je[n];return n??e}function yc(e){return{type:"custom",render:()=>i(Ss,{partKey:e})}}function Ss({partKey:e}){const[t]=R("id"),[n]=R("_partStyles"),{textStyles:o}=G(),r=Tr();let s=null;try{s=Or().select}catch{s=null}const l=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(ko,{name:a("Text"),preview:xr(l,c,{noStyle:a("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??Er.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(Ir(t,e))}})}function mn(e){const{cornerRadiusPx:t}=G(),n=typeof t=="number"?t:e;let o=null;try{const{appState:s,selectedItem:l}=re(u=>u),c=l?.props?.id?String(l.props.id):void 0;o=c?Po(s?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Ro(r)?r:n}function _s({label:e,changed:t=!1,onReset:n=()=>{}}){const o=mn(A);return i(x,{words:C()?.panel,label:a(e),changed:t,detail:U(`${o}px`,a("the section")),onReset:n})}function ys(){return i(L,{children:a("Follows the section's Corners until you set a number here.")})}function Cs(){return ze({sidesKey:"cardCornerSides",row:Rt,useFollowed:()=>mn(A),mark:i(_s,{label:te}),hint:i(ys,{})})}function xs(){return{type:"custom",render:()=>i(Hn,{})}}function Cc(){return{_gShape:T("Shape"),cardCorners:Cs(),...pn(Rt,"cardCorners"),cardCornerSides:fn(),cardCornersApplyAll:xs()}}function Os(){return F({type:"custom",render:e=>i(Es,{...e})},{type:"select",label:j,options:[{value:"content",label:"Fit content"},{value:"equal",label:"Equal"},{value:[50],label:"Custom: the width of each block in %, the last block left out"}]})}function Is(e,t){const n=Vt(e);if(n!=="custom")return a($t.find(r=>r.value===n)?.label??"");const o=kt(Me(e,t),t);return o?[...o,100-o.reduce((r,s)=>r+s,0)].join(" / "):a("Custom")}function Es(e){const{value:t,onChange:n}=e,[o]=R("content"),r=Array.isArray(o)?o.length:0,s="follows"in e,l=t!=null,c=l?t:s?e.follows:void 0,u=Vt(c),d=r>=2&&r<=Pt,h=()=>[...Zo[r]??[]],p=J(null),f=w=>{const y=p.current;y&&JSON.stringify(w)===JSON.stringify(y.shares)?n(y.value):w&&n(w)},m=w=>{w===u||w==="custom"&&!d||n(w==="custom"?h():w)},g=a("The width bar works for 2 to {count} blocks.",{count:Pt}),b=l&&(s||t!=="content"),S=er().widths.hint(r,Jo);return i(_,{label:a(j),icon:i(Ie,{}),changed:b,hint:u!=="custom"?void 0:d?S:g,action:i(x,{words:C()?.panel,label:a(j),changed:b,disabled:e.readOnly===!0,detail:s?M(w=>a(w),Is(e.follows,r),e.followsView):a("Fit content"),onReset:()=>n(void 0)}),children:k("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(Nt,{label:a(j),value:u,options:$t.map(w=>({value:w.value,label:w.value==="custom"&&!d?g:a(w.label),icon:Fi(i("span",{className:"sf-gallery-pic sf-share-pic",children:gn(w.weights).map((y,v)=>i("i",{style:{gridColumn:`span ${y}`}},v))}),a(w.label),w.value==="custom"&&!d?g:a(w.label))})),onChange:m,columns:3,cell:bn,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&d?i("div",{onFocus:()=>{p.current={value:t,shares:kt(Me(c,r),r)}},onBlur:()=>{p.current=null},children:i(Qo,{label:a(j),count:r,value:Me(c,r),onChange:f,readOnly:e.readOnly===!0})}):null]})})}function gn(e){if(!e)return[3,4];const t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function xc(){return z(qr,i(po,{}),Ut,Ut[0].value)}function Oc(){return E("mobile",on(j,i(Ie,{}),ei.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:gn(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),Qr,{columns:2,cell:bn}))}const bn={width:"5.75rem",height:"3.25rem"};function Ic(){return $e("share",Os(),nn)[Fe("share")]}function Ts(){return E("mobile",W(Kt,i(ht,{}),Ge,Zr,1,Ge,"",{clear:{phoneFollows:!1,hint:Ge}}))}const wn={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function Ec(){const e=W(Kt,i(ht,{}),Xt,Jr,1,Xt,"",{clear:{emptyLabel:"Auto"}}),t=$e("columns",e,{...wn,tablet:nn.tablet}),n=$e("columns",e,wn,{phoneRow:Ts()});return{...t,phoneRow:n.phoneRow}}function Tc(e,t,n,o,r,s,l){return{type:"custom",render:({value:c,onChange:u,name:d})=>i(Rs,{label:e,min:t,max:n,step:o,fallback:r,role:s,value:c,onChange:u,name:d??"",length:l})}}function Rs({label:e,min:t,max:n,step:o,fallback:r,role:s,value:l,onChange:c,name:u,length:d}){const h=I(),p=he(),f=rn(d?.view),m=fe({row:d?.row??{kind:"fontSize"},label:e,grid:{min:t,max:n,step:o},valueKey:d?u:"",view:d?.view??"desktop",numbersIn:b=>b===f&&typeof h[u]=="number",followsView:f,convertTo:b=>typeof h[u]=="number"?{[u]:b(h[u])}:{}}),g=b=>m?p({[u]:b,...m.unitPatch(typeof b!="number")}):c(b);return i(_,{label:a(e),icon:i(xt,{noun:s}),action:i(x,{words:C()?.panel,label:a(e),changed:!xi(l),detail:a("the Text style in Styles"),onReset:()=>g(Ci),defaultAction:{onPress:()=>g(yi),title:a("Keep this section's own built-in size"),icon:i(io,{})}}),children:q({min:m?.grid.min??t,max:m?.grid.max??n,step:m?.grid.step??o,value:typeof l=="number"?l:r,...m?{suffix:m.unit,units:m.units}:{suffix:"px"},ariaLabel:e,onChange:g})})}function Rc(){return{_gCellWidth:T("Cell width"),gridSpan:z("Positions",i(Ie,{}),[{label:"Auto",value:""},...Array.from({length:Xn},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function I(){let e=null,t=null;try{e=nt(Ns),t=re(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Ns=Tn(null);function Ps({min:e,max:t,step:n,px:o,label:r,onChange:s,desktopKey:l,fallback:c}){const u=I()[l],d=Ae(void 0,u,c);return i(L,{children:q({min:e,max:t,step:n,value:Ae(o,u,c),readout:!1,ariaLabel:r,notch:d,onChange:s})})}function ks({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:s=()=>{}}){const l=I()[t],c=Ae(void 0,l,n);return i(x,{words:C()?.panel,label:a(e),changed:r,detail:M(u=>a(u),`${c}${o}`),onReset:s})}function Ls(e){return rs(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(ks,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(Ps,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const As={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Fs={Top:Te,Bottom:St,Left:_t,Right:yt},vs=e=>{const t=Fs[e];return i(t,{})};function Nc(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=S=>As[S],s=S=>W(r("Top"),i(Te,{}),P.min,P.max,P.step,S,"px"),l=(S,w,y,v=P)=>E("mobile",Ls({label:r(S),icon:vs(S),desktopKey:w,min:v.min,max:v.max,step:v.step,fallback:y})),c=e.top??P.min,u=e.bottom??P.min,d="sectionPaddingLeft",h="sectionPaddingRight",p=e.sideBounds??P,f=e.side??p.min,m=e.sidePhone??f,g=e.phone===!0,b=S=>g?E("desktop",S):S;return ee({...o?{_gSpacing:T("Padding")}:{},[t]:b(s(c)),...g?{[V(t)]:l("Top",t,c)}:{},...e.only==="top"?{}:{[n]:b(W(r("Bottom"),i(St,{}),P.min,P.max,P.step,u,"px")),...g?{[V(n)]:l("Bottom",n,u)}:{}},...e.sides?{[d]:b(W(r("Left"),i(_t,{}),p.min,p.max,p.step,f,"px")),...g?{[V(d)]:l("Left",d,m,p)}:{},[h]:b(W(r("Right"),i(yt,{}),p.min,p.max,p.step,f,"px")),...g?{[V(h)]:l("Right",h,m,p)}:{}}:{}})}function Pc(e,t){const n=Object.fromEntries(Object.entries(t).map(([s,l])=>[s,s in e&&Ce(l)?e[s]:l])),o={};let r=!1;for(const[s,l]of Object.entries(e)){if(s in t){r||Object.assign(o,n),r=!0;continue}o[s]=l}return r||Object.assign(o,n),o}const me="Width";function kc(e,t=Oi,n=!0){const o=t.map(r=>({label:Ii[r],value:r}));return ee({...n?{_gWidth:T(me)}:{},widthMode:{type:"custom",render:({onChange:r,field:s})=>i(_,{label:a(me),icon:i(_o,{}),action:n?i(Vi,{inherited:s?.inherited??!1,onReset:()=>r(Ei),label:me}):void 0,children:de({options:o,value:s?.currentValue||e,onChange:r,ariaLabel:me})})}})}function Lc({fill:e=!1}={}){const t=(r,s)=>({type:"custom",render:({value:l,onChange:c})=>i(Bs,{value:l,onChange:c,view:r,badge:s,fill:e})}),n=()=>Le("sectionHeightMode"),o=()=>Le("sectionHeightMode");return ee({_gHeight:T(Q),...D("sectionHeightMode",r=>r==="desktop"?t(r):t(r,s=>i(Ms,{view:r,onClear:()=>s(void 0)}))),...D("sectionHeightValue",n),...D("sectionHeightUnit",o)})}function Bs({value:e,onChange:t,view:n,badge:o,fill:r=!1}){const s=I(),{mode:l,number:c,unit:u}=Ds(n,s,e);return i(_,{label:Q,icon:Y(i(bt,{})),action:o?o(t):void 0,children:k("div",{className:"es-width-stack",children:[de({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"},...r?[{label:"Fill",value:"fill"}]:[]],value:l,onChange:t,ariaLabel:Q}),c?i(Gs,{view:n,mode:l,menu:u}):null]})})}function Sn(e,t){return e==="phone"&&Be(t)?Pr(t):Nr(t)}function ge(e,t){return e==="desktop"||(e==="tablet"?Be(t):Rr(t))?null:Sn(e,t)}function Ds(e,t,n){const r=(s=>Vr.includes(s))(n)?n:ge(e,t)?.mode??"auto";return{mode:r,number:r!=="auto"&&r!=="fill",unit:r==="fixed"}}function Hs(e,t,n,o){const r=ge(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[O("sectionHeightMode",e)]:r.mode,...r.mode==="fixed"?{[O("sectionHeightUnit",e)]:r.unit}:{},...n==="sectionHeightUnit"?{[O("sectionHeightValue",e)]:r.value}:{},[O(n,e)]:o}}function _n(e,t,n){const o=B(),r=ge(e,I());return!o||!r?{followed:null,write:n}:{followed:r,write:l=>o.onChangeMany(c=>{const u=Hs(e,c,t,l);return u===null?{[O(t,e)]:l}:Object.keys(u).length?u:null})}}function Gs({view:e,mode:t,menu:n}){const o=B(),r=I(),s=O("sectionHeightValue",e),l=O("sectionHeightUnit",e),c=S=>w=>o?.onChangeMany(()=>({[S]:w})),{followed:u,write:d}=_n(e,"sectionHeightValue",c(s)),{write:h}=_n(e,"sectionHeightUnit",c(l)),p=t==="screen"?"%":r[l],f=(u?u.unit:p)==="%"?"%":"px",m=f==="%"?Yr:jr,g=r[s],b=n?{options:["px","%"],label:a("Unit"),onChange:S=>h(S)}:void 0;return q({min:m.min,max:m.max,step:m.step,value:u?null:typeof g=="number"?g:m.fallback,...u?{placeholder:u.value}:{},suffix:f,...b?{units:b}:{},ariaLabel:Q,onChange:d})}function Ms({view:e,onClear:t}){const n=I(),o=ge(e,n)===null,r=e==="phone"&&Be(n),s=Sn(e,n),l=M(c=>a(c),s.mode==="auto"?a("Auto"):`${s.value}${s.unit}`,r?"tablet":"desktop");return i(x,{words:C()?.panel,label:a(Q),changed:o,detail:l,onReset:t})}function Ac(e={}){const t=e.intro===!0,n=s=>({type:"custom",render:({value:l,onChange:c,id:u,name:d})=>i(js,{value:l,onChange:c,labelId:`${u??d??"stickTop"}-label`,view:s,intro:t})}),o=s=>({type:"custom",render:({value:l,onChange:c})=>i(Xs,{value:l,onChange:c,view:s,intro:t})}),r=s=>({type:"custom",render:({value:l,onChange:c})=>i($s,{value:l,onChange:c,view:s,intro:t})});return{_gStick:T(vr,{dot:t?Ks:Mt}),...D("stickTop",n),...D("stickTopDistance",o),...ue(He,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?D(De,r):{},...t?{}:{[Hr]:Ws()},...t||e.above===!1?{}:{[Ar]:Us()}}}function Ws(){const e=z(Gr,i(Te,{}),Mr,Br);return E("desktop",{...e,render:t=>{const n=e.render({...t,value:Kr(t.value),onChange:o=>t.onChange(Xr(o))});return _e(n,{hint:a(Dr)})}})}function Us(){const e=xn(Fr,!1,i(Ct,{}),Lr);return E("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}const Ks={any:[Mt,kr]};function yn(e,t,n,o,r){const s=B(),l=I(),c=e==="desktop"||ne(e,l)?null:Je(e,ae(l,{intro:o}));return{followed:c,write:(c||r)&&s?d=>s.onChangeMany(h=>{const p=Vs(e,h,d,t,o),f=p===null?{[O(t,e)]:d}:p;return Object.keys(f).length?{...f,...r?.(d)??{}}:null}):n}}function Xs({value:e,onChange:t,view:n,intro:o}){const r=I(),s=ae(r,{intro:o}),l=h=>{const p=Bi(h);return p==="desktop"||ne(p,r)},c=fe({row:He,label:"Distance from top",grid:{min:H.min,max:H.max,step:H.step},valueKey:"stickTopDistance",view:n,numbersIn:h=>l(h)&&$(r[ve("stickTopDistance",h)])!==void 0,followsView:n==="phone"&&s.ownTablet?"tablet":"desktop"}),{followed:u,write:d}=yn(n,"stickTopDistance",t,o,c?h=>c.unitPatch(h===void 0):void 0);return i("div",{className:"sf-field",children:q({min:c?.grid.min??H.min,max:c?.grid.max??H.max,step:c?.grid.step??H.step,value:u?null:typeof e=="number"?e:H.fallback,...u?{placeholder:u.distance}:{},...c?{suffix:c.unit,units:c.units}:{suffix:"px"},ariaLabel:a("Distance from top"),onChange:d})})}function $s({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:s}=yn(n,De,t,o);return i(_,{label:a(Gt),icon:Y(i(bt,{})),children:q({min:ie.min,max:ie.max,step:ie.step,value:r?null:$(e)??ie.default,...r?{placeholder:r.screens}:{},ariaLabel:a(Gt),onChange:s})})}function ne(e,t){return e==="tablet"?Ur(t):Wr(t)}function Je(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance,unit:t.tabletUnit,screens:t.tabletScreens}:{on:t.desktop,distance:t.desktopDistance,unit:t.desktopUnit,screens:t.desktopScreens}}function Vs(e,t,n,o="stickTopDistance",r=!1){if(e==="desktop"||ne(e,t))return null;if(n===void 0)return{};const s=Je(e,ae(t,{intro:r})),l=e==="phone"&&ne("tablet",t)?h=>O(h,"tablet"):h=>h,c=(h,p)=>t[l(h)]==null?{}:{[O(h,e)]:p},u=He.unitKey,d=t[l(u)]==null?{}:{[O(u,e)]:s.unit};return{[O("stickTop",e)]:!0,...c("stickTopDistance",s.distance),...d,...c(De,s.screens),[O(o,e)]:n}}function js({value:e,onChange:t,labelId:n,view:o,intro:r}){const s=I(),l=ae(s,{intro:r}),c=o==="phone"?l.phone:o==="tablet"?l.tablet:r?l.desktop:e===!0,u=o==="phone"&&l.ownTablet,d=o==="desktop"?null:Je(o,l),h=d?.on?$r(d.distance,d.unit):a("Off");return i(_,{label:a(Ht),labelId:n,icon:Y(i(Ct,{})),action:k(L,{children:[o!=="desktop"?i(x,{words:C()?.panel,label:a(Ht),changed:ne(o,s),detail:M(p=>a(p),h,u?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(Ne,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const Cn="e.g. about";function Fc(){return{_gAnchor:T("Anchor"),anchor:X({control:"plainText",label:"Name",placeholder:Cn},{type:"custom",render:({value:e,onChange:t})=>i(Qn,{value:e,onChange:t,nameBox:(n,o)=>i(K,{value:n,onChange:o,label:"Name",placeholder:Cn,hideable:!1,markup:!1})})})}}function vc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:l})=>{const c=`${s??l??e}-datetime`,u=Date.parse(typeof o=="string"?o:"");return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(zo,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:d=>r(d?d.toISOString():"")})})}}}function Bc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:l})=>{const c=`${s??l??e}-date`;return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(Yo,{id:c,value:Pn(typeof o=="string"?o:null),onChange:u=>r(u?Nn(u):"")})})}}}function xn(e,t,n,o){return{type:"custom",...F({},{...pe,label:e}),render:r=>{const{value:s,onChange:l,id:c,name:u}=r,d="follows"in r,h=r,p=typeof s=="boolean",f=typeof h.follows=="boolean"?h.follows:t,m=p?s:d?f:t,g=`${c??u??e}-label`,b=h.readOnly===!0,S=i(Ne,{checked:m,onChange:l,disabled:b,ariaLabelledBy:g});return i(_,{label:a(e),labelId:g,icon:n,hint:o===void 0?void 0:a(o),action:d?k(L,{children:[i(x,{words:C()?.panel,label:a(e),changed:p,detail:h.followsNoView?a(f?"On":"Off"):M(w=>a(w),a(f?"On":"Off"),h.followsView),disabled:b,onReset:()=>l(void 0)}),S]}):S})}}}function Dc(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(Ys,{label:"Background",icon:i(go,{}),id:r,value:e,shown:yo(e),onChange:t})}}}function Hc(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(se,{label:a(e),icon:n,value:o||t,onChange:r})}}function Ys({label:e,icon:t,id:n,value:o,shown:r,onChange:s}){const{colors:l,n:c}=Qe(),u=ke(o),d=u?le(u,l,c):null;return i(se,{label:a(e),icon:t,id:n,value:d?d.hex:r,caption:d?.words,onChange:s,choices:Ze(u??"",l,c,s)})}function Gc(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(zs,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function Ze(e,t,n,o){const r=Re(e);return or(t,n).map(s=>({label:s.label,color:s.value,selected:r===s.name,onPick:()=>o(s.name)}))}function zs({value:e,onChange:t,twin:n}){const{colors:o,n:r}=Qe(),s=o.background,l=U(s.toUpperCase(),a("Theme {n} background",{n:r})),[c,u]=R(Co),[d]=R(Oo),h=typeof d=="string"&&d.trim()!=="",p=Ot(c),f=oe=>u(Ot(oe)||void 0),m=Re(e),g=m?le(m,o,r):null,b=Ze(e,o,r,t),S=n?()=>t(void 0):()=>t("");let w=s,y=l;if(n){const oe=Re(n.follows),we=Io(n.follows),Se=oe?le(oe,o,r):we?{hex:we,words:we.toUpperCase()}:null;w=Se?.hex??s,y=M(En=>a(En),Se?Se.words:l,n.view)}const v=!n&&(Eo(e)||h)?i(qs,{value:p,onChange:f}):null;return g?i(se,{label:a("Fill"),icon:i(Ee,{}),value:g.hex,caption:g.words,onChange:t,changed:!0,onReset:S,resetTo:y,choices:b,children:v}):i(Ft,{label:a("Fill"),icon:i(Ee,{}),value:e,inherited:w,resetTo:y,onChange:t,onReset:S,choices:b,children:v})}function qs({value:e,onChange:t}){return de({options:xo.map(n=>({label:n.label,value:n.value,hint:n.hint})),value:e,onChange:t,ariaLabel:a("Fill")})}function Js(e,t,n){if((e?.content??[]).some(l=>l?.props?.id===t))return ce(n);const r=No(e,t);if(r.length===0)return null;const s=ce(tn(n));if(s!==null)return s;for(let l=r.length-1;l>0;l-=1){const c=ce(tn(r[l].sectionAccent));if(c!==null)return c}return ce(r[0].sectionAccent)}function Qe(){const e=qt(G().theme),[t]=R("sectionAccent");let n=null;try{const{appState:r,selectedItem:s}=re(c=>c),l=s?.props?.id?String(s.props.id):void 0;n=l?Js(r?.data,l,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:oi(e.themes[o]),n:o+1}}function Mc(){return dn()}const Wc={top:i(co,{}),right:i(ao,{}),bottom:i(so,{}),left:i(lo,{})};function Uc(e,t,n,o,r,s,l){const c=p=>t.find(f=>f.value===p),u=p=>({value:p,label:"",disabled:!0,title:o}),d=p=>{const f=t.find(g=>g.cell===p);if(!f)return u(`missing-${p}`);const m=s?.[p];return m?{value:f.value,label:f.label,icon:m}:{value:f.value,label:f.label}},h=[u("corner-top-left"),d("top"),u("corner-top-right"),d("left"),u("centre"),d("right"),u("corner-bottom-left"),d("bottom"),u("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:f})=>{const m=t.some(g=>g.value===p)?p:n;return i(_,{label:a(e),icon:r,value:c(m)?.label?a(c(m).label):l?a(l):"",children:Pi(a,{label:e,value:m,onChange:f,points:h})})}}}function Kc(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:s})=>i(Sr,{label:e,options:(s.options??t).map(l=>({...l,label:a(l.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:a(n)}:{}})}}function Xc(e,t,n,o){return{type:"custom",options:t,fallback:n,...F({},{type:"select",label:e}),render:({value:r,onChange:s,field:l})=>i(yr,{label:e,options:(l.options??t).map(c=>({...c,label:a(c.label)})),fallback:l.fallback??n,value:r,onChange:s,placeholder:o===void 0?void 0:a(o)})}}function $c(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const Vc=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function jc(e,t,n){const o=Object.keys(rt).map(r=>({label:rt[r],value:r,picture:n[r]}));return{type:"custom",...F({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(Qs,{label:e,icon:t,options:o,onChange:r})}}function Zs(e,t,n){const o=kn(e,t,n);if(o!==void 0)return o==="save-makes-frame"?a("A frame is made from this video when you save the page."):o==="starts-dark"?a("This video starts dark, so no frame was made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="outside"?a("This video is on another website, so no frame can be made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="unsupported"?a("This video's file type gives no frame. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="failed"?a("No frame could be made from this video. It is tried again the next time you save the page. The slide shows its background colour while the video loads."):o==="image-no-frame"?a("The slide shows your Image while the video loads, because this video has no frame."):void 0;const r=An(e);return r==="frame-missing-image"?a("This video has no frame yet. The slide shows its image until one is made."):r==="frame-missing-surface"?a("This video has no frame yet. The slide shows its background colour until one is made."):r==="image-missing-frame"?a("No image yet. The slide shows the video's frame until you choose one."):r==="image-missing-surface"?a("No image yet. The slide shows its background colour until you choose one."):void 0}function Qs({label:e,icon:t,options:n,onChange:o}){const r=B(),s=r?.values??{},l=Ln(s),c=nt(Bn),u=vn(c?.docId??null);let d=null;try{d=re(p=>p.appState.data)}catch{d=null}const h=Fn(r?.id,d,u);return i(_,{label:a(e),icon:Y(t),hint:Zs(s,h,c?.hasUnsavedEdits??!1),children:de({options:n,value:l,onChange:o,ariaLabel:e})})}function Yc(e,t,n,o={}){const r={type:"custom",[at]:!0,render:({value:s,onChange:l,name:c})=>i(wr,{value:s||"",onChange:l,fieldKey:c,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame}),...o.focus?{focusKey:o.focus}:{},...o.focusWhen?{focusWhen:o.focusWhen}:{}};return o.focus?E("each",r):r}const zc={HeroSingle:["imageFocal"],HeroSlide:["videoFrame","videoFramePhone"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function el(e){const t=a(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function qc({value:e,onChange:t,label:n}){const o=e||{},r=B(),s=r?r.values!==r.node.props:!0,l=!!o.pending&&s,c=!!o.pending&&!s,u=!!Ri(Ti()).geocode,d=ot(),h=(p,f)=>t({...o,[p]:f??void 0});return k(L,{children:[i(_,{label:a(n),icon:i(wt,{}),action:u?i(Pe,{content:a("Find from the address (OpenStreetMap)"),children:i(Lt,{"aria-label":a("Find from the address"),"aria-busy":l||void 0,disabled:l,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(bo,{})})}):void 0,children:u&&o.status?i(eo,{compact:!0,oneLine:!0,spaced:!1,status:l?"busy":o.ok&&!c?"found":"notfound",statusText:l?a("Finding…"):c?a(nr):a(o.status),hint:el(o)}):null}),i(_,{label:a("Enter by hand"),labelId:d,icon:i(uo,{}),action:i(Ne,{checked:!!o.manual,onChange:p=>t({...o,manual:p}),ariaLabelledBy:d})}),o.manual&&i(_,{label:a("Latitude, longitude"),icon:i(wt,{}),children:k("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(At,{value:typeof o.lat=="number"?o.lat:null,onChange:p=>h("lat",p),min:-90,max:90,step:1e-4,placeholder:a("Latitude")}),i(At,{value:typeof o.lng=="number"?o.lng:null,onChange:p=>h("lng",p),min:-180,max:180,step:1e-4,placeholder:a("Longitude")})]})})]})}function tl(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function nl(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,s)=>s===t?{text:n}:r)}function Jc(e,t){return e===null?null:t>e?e:null}function ol(e,t,n){if(n===null||n>=t.length)return null;for(let o=0;o<n;o+=1)if(e[o]!==t[o])return null;return e[n]!==t[n]&&t.includes(e[n])||e[n]!==t[n]&&t.length!==e.length?null:n}const Zc={label:"Ticker items",icon:i(mo,{})};function Qc(e,t,n,o){return{type:"custom",[N]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...F({},{...an.textList,label:e}),render:({value:r,onChange:s})=>i(rl,{label:e,icon:Y(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:s,markup:o==="markup"})}}function rl({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:s=!1}){const l=J(null),[c,u]=Z(null),d=p=>p.map(f=>({text:f?.text??""})),h=p=>{const f=ol(n,p,c);f===null&&(l.current=null),u(f),r(d(p))};return i(Ho,{label:a(e),icon:t,noun:a("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:s?i(vt,{target:l,value:tl(n,c),onChange:p=>r(nl(n,c??-1,p)),disabled:c===null,label:c===null?a("Formatting — click a row first"):a("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,f,m)=>i("input",{type:"text",className:s&&c===f?"sf-list-marking":void 0,value:p?.text??"",placeholder:a(o),"aria-label":a("{label} {n}",{label:a(e),n:f+1}),onChange:g=>m({text:g.target.value}),onFocus:g=>{l.current=g.currentTarget,u(f)}})})}function eu(e,t){const n=`${e.label} — row ${t+1}`;return X({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:a("{label} — row {n}",{label:a(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function tu(e){return{_gCards:T("Cards"),coverIndex:z("Cover image",i(ho,{}),mr,String(gr),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:os("Image background",ui),cardImage:On()}}function nu(){return{outline:z("Card outline",i(wo,{}),pr,hr),indexBadge:z("Card number",i(fo,{}),dr,fr),showBadge:xn("Product badge",!0,i(xt,{noun:"tag"}))}}function ou(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...pe,label:be.find(s=>s.id===r).label}),o=r=>F(Le(et),n(r));return{_gShowOnCard:T("Show on a card"),[et]:F({type:"custom",render:()=>i(il,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(et)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const et="showCardPrice",be=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function il({rest:e}){const t=I(),n=he(),o=l=>typeof t[l]=="boolean"?t[l]:void 0,r=l=>o(l)??e[l],s=be.some(({id:l})=>o(l)!==void 0&&o(l)!==e[l]);return i(tt,{parts:be,changed:s,shown:r,onPress:(l,c)=>n({[l]:c}),onReset:()=>n(Object.fromEntries(be.map(({id:l})=>[l,void 0])))})}function ru(e,t="display"){const n=V(t);return{[t]:E("desktop",{type:"custom",render:({value:o,onChange:r})=>i(tt,{parts:e,changed:Mo(o),shown:s=>Wo(o,s),onPress:(s,l)=>r(Xo(o,s,l)),onReset:()=>r(void 0)})}),[n]:E("mobile",{type:"custom",render:({value:o,onChange:r})=>i(sl,{parts:e,desktopKey:t,value:o,onChange:r})})}}function tt({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:s,disabledReason:l}){const c=a("Display");return i(_,{label:c,icon:i(no,{}),changed:t,action:i(x,{words:C()?.panel,label:c,changed:t,detail:s,onReset:r}),children:i(Go,{label:c,items:e.map(u=>({id:u.id,label:a(u.label),shown:n(u.id),...l?{disabled:!0,disabledReason:a(l)}:{}})),onChange:o})})}function sl({parts:e,desktopKey:t,value:n,onChange:o}){const r=I()[t];return i(tt,{parts:e,changed:Ko(n),shown:s=>Uo(r,n,s),onPress:(s,l)=>o($o(n,s,l)),onReset:()=>o(cr),detail:a("the same as Desktop")})}function On(e=Gn){return W("Card image",i(mt,{}),A,xe,Mn,A,e,{clear:{hint:A},hint:"Rounds the picture. The card's own corner is in Styles."})}function ll(){return ue(dt,"cardImage")}function iu(){return{cardImage:On(dt),...ll()}}function su(){return ze({sidesKey:"cornerSides",row:Kn,step:Wn,useFollowed:()=>A,mark:i(al,{label:Un}),hint:a("Rounds the picture. Left alone it stays square.")})}function al({label:e,changed:t=!1,onReset:n=()=>{}}){return i(x,{words:C()?.panel,label:a(e),changed:t,onReset:n})}function lu(){return{type:"custom",render:({value:e,onChange:t})=>i(pl,{value:typeof e=="string"?e:"",onChange:t})}}const In="own";function au(){const e=[{value:In,label:"Layout's own",picture:sn(Array.from({length:8},()=>[3,1]))},...Object.entries(jn).map(([t,n])=>({value:t,label:n.label,picture:sn([...n.phone,...n.phone])}))];return E("mobile",on("Layout",i(gt,{}),e,In,{columns:2,cell:Hi}))}function cl({layout:e,width:t}){const n=Yn(e),o=n?`${n[0]}/${n[1]}`:void 0;return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:o?"auto":6,gridAutoFlow:"row dense",gap:2},children:zn(e).map(([r,s],l)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${r}`,gridRow:`span ${s}`,aspectRatio:o}},l))})}const ul={width:"3.5rem",height:"2.5rem"},dl=200;function pl({value:e,onChange:t}){const[n,o]=Z(null),[r,s]=Z(4),l=J(null);Rn(()=>{const m=l.current;if(!m||typeof ResizeObserver!="function")return;const g=()=>s(m.getBoundingClientRect().width>=dl?4:3);g();const b=new ResizeObserver(g);return b.observe(m),()=>b.disconnect()},[]);const c=e?Di(Oe,e):void 0,u=c?e:"",d=pt(n,u),h=pt(n,"").length,p=qn("no-symbol"),f=[{value:"",label:a("Not chosen"),icon:vi(p,a("Not chosen"))},...d.map(m=>({value:m,label:a(Oe[m].label),icon:i(cl,{layout:Oe[m],width:40})}))];return i(_,{label:a("Layout"),icon:i(gt,{}),value:c?a(c.label):void 0,children:i("div",{ref:l,style:{flex:"1 1 auto",minWidth:0},children:i(Nt,{label:a("Layout"),value:u,options:f,onChange:t,columns:r,cell:ul,header:k("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:a("Photos in a row")}),i(Ao,{options:[{id:"all",label:a("All")},...$n.map(m=>({id:String(m),label:String(m)}))],value:n===null?"all":String(n),ariaLabel:a("Photos in a row"),onChange:m=>o(m==="all"?null:Number(m))}),i("span",{className:"text-2xs text-ink-faint",children:a("{n} of {total} layouts",{n:h,total:Vn.length})})]})})})})}export{Yi as BOUND_TO_POST,nc as BOUND_TO_POST_NOTE,uc as BUCKET_ICONS,zc as CUSTOM_FIELD_MEDIA,qc as CoordsField,ln as DESKTOP_GAP_NOT_OVERLAP,tt as DisplayRow,Wc as EDGE_ARROWS,qo as FOCAL_DEFAULT,ye as FOLD_FIELD_MARKER,zi as HIGHLIGHT_HINT,K as HidableTextField,lt as LINK_FIELD_MARKER,$a as Label,at as MEDIA_FIELD_MARKER,Vc as MEDIA_TYPE_OPTIONS,oc as NOT_BOUND_TO_POST,bc as PanelBand,Zi as PanelNoteLine,Ns as RowPropsContext,ct as SCAFFOLD_FIELD_MARKER,pu as SCALAR_TEXT_CONTROLS,Mi as SiteGapDefaultReset,q as Slider,es as Swatches,du as TEXT_CONTROL_KINDS,N as TEXT_FIELD_MARKER,Zc as TICKER_ITEMS_ROW,rl as TextListField,Ys as ThemeFillRow,me as WIDTH_LABEL,Vi as WidthDefaultReset,ol as aimAfterListChange,Fc as anchorFields,U as backTo,wc as backgroundField,xc as boxBlockSpacingField,Ec as boxColumnsFields,Gc as boxFillField,Ts as boxPhoneRowField,Os as boxShareField,Oc as boxSharePhoneField,Ic as boxShareTabletField,Js as boxThemeIndexOf,fc as bucketHeader,yc as buttonWordsEntryField,Cs as cardCornersField,os as cardImageBackgroundField,On as cardImageField,iu as cardImageFields,tu as cardMediaFields,Cc as cardShapeFields,ou as cardShowFields,nu as cardStyleFields,Rc as cellWidthFields,Hc as colorInput,ja as containerDirectionField,Wi as containerGapField,Ui as containerGapPhoneField,Va as containerGapRows,Ki as containerGapTabletField,el as coordsResultTip,lc as copyText,fn as cornerSidesField,ze as cornersRowField,pn as cornersUnitFields,Bc as date,vc as dateTime,hc as designGroupHeader,ru as displayFields,Uc as edgePad,Ze as fillSlotChoices,Jc as focusAfterRemove,Mc as focusKeptField,mc as foldMarker,Ce as foldMetaOf,Qi as foldTitleOf,Hs as followedHeightPatch,Vs as followedStickPatch,lu as galleryLayoutField,au as galleryLayoutPhoneField,Lc as heightFields,ge as heightFollowedBy,Ds as heightLayersAt,Ya as heroGroupPlacementPoints,st as hidableText,Ji as hintIsWhileTyping,su as imageCornersField,tc as inOwnBox,pc as isBucketHeader,dn as keptBy,ac as linkField,Zs as loadingRowHint,jc as loadingShowsField,Kc as multiSelect,Dc as pageBackgroundField,dc as panelNote,Ls as phoneOverrideField,sc as plainText,cc as plainTextarea,rs as pxField,gc as quietMarker,it as readHidable,tl as rowText,Xc as searchSelect,ns as sectionBandChoices,cs as sectionCornersField,_c as sectionShapeFields,Sc as sectionThemeFields,nl as setRowText,Tc as sizeField,$c as sourceField,Nc as spacingFields,Ac as stickFields,Pc as swapPadding,rc as text,Dn as textFieldIdentifier,Ja as textFieldOffPage,Qa as textFieldPanelOnly,Qc as textList,eu as textListRowField,ic as textarea,xn as toggle,Yc as upload,fe as useLengthRow,he as useSelectedPatch,I as useSelectedProps,R as useSelectedSibling,Gi as useSiteGapDetail,kc as widthField,ec as withIdentifier,qa as withOffPage,Za as withPanelOnly,za as withScaffold};
1
+ "use client";import{jsx as i,jsxs as k,Fragment as L}from"react/jsx-runtime";import{cloneElement as _e,createContext as Tn,useContext as ot,useEffect as Nn,useId as rt,useRef as J,useState as Z}from"react";import{useEasel as re,useSelectedHost as B}from"efficient-easel/easel";import{PIN_LENGTH as ie,toDateKey as Pn,fromDateKey as kn}from"efficient-shell/format";import{say as a,editorEaselWords as y}from"../../../format/lib/editor-words.js";import{finiteNumber as V}from"../../../format/lib/finite-number.js";import{LOADING_SHOWS_LABELS as it,firstFrameHint as Ln,loadingShowsOf as An,loadingStillHint as Fn}from"../../../format/lib/hero-video.js";import{pageFramesFor as vn,usePageVideoFrames as Bn}from"../page-video-frames.js";import{ScreenDocumentContext as Dn}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as st,hidableText as lt}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as Ce,LINK_FIELD_MARKER as at,MEDIA_FIELD_MARKER as ct,SCAFFOLD_FIELD_MARKER as ut,TEXT_FIELD_MARKER as N,foldMetaOf as ye,textFieldIdentifier as Hn}from"efficient-easel/draw";import Gn from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as dt}from"../../../render/lib/document/show-when.js";import{CARD_IMAGE_PX_ROW as Mn,CARD_IMAGE_RADIUS_ROW as pt,CARD_IMAGE_RADIUS_STEP as Wn,CORNER_RADIUS_MAX as xe,CORNER_RADIUS_MIN as A}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as Un,IMAGE_CORNERS_LABEL as Kn,IMAGE_CORNERS_ROW as Xn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as $n,GRID_MAX_ROW_SPAN as Vn}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as jn,GALLERY_LAYOUTS as Oe,GALLERY_LAYOUT_KEYS as Yn,GALLERY_PHONE_LAYOUTS as zn,galleryChoices as ft,galleryLayoutRatio as qn,galleryPictureCells as Jn}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as Zn}from"./shell-glyph.js";import{anchorSiblingsOf as Qn,placementPoints as eo}from"../../../format/lib/hero-group-placement.js";import to from"../../components/AnchorField.js";import no from"../../components/SourceStatus.js";import{AdjustIcon as oo,EyeIcon as ro,AnimationIcon as io,BackgroundIcon as ht,BorderAllIcon as so,BlockSectionIcon as lo,ColumnWidthsIcon as Ie,ColumnsIcon as mt,CornerIcon as gt,DirectionDownIcon as ao,DirectionLeftIcon as co,DirectionRightIcon as uo,DirectionUpIcon as po,EditIcon as fo,GapIcon as ho,GridIcon as bt,GroundIcon as Ee,HashIcon as mo,HeightIcon as Re,ImageIcon as go,ListIcon as bo,LocationIcon as wt,PaddingBottomIcon as St,PaddingLeftIcon as _t,PaddingRightIcon as Ct,PaddingTopIcon as Te,PageIcon as wo,StickyIcon as yt,SearchIcon as So,SquareIcon as _o,TypeIcon as Co,WidthIcon as yo}from"efficient-easel/icons";import{FieldGlyph as xt}from"../../components/FieldGlyph.js";import{resolvePageBackground as xo}from"../../../format/lib/content/page-background.js";import{BOX_FILL_FADE_PROP as Oo,BOX_FILL_FADES as Io,BOX_SWATCH_PROP as Eo,boxFillFadeOf as Ot,boxFillOf as Ro,boxFillSlot as Ne,boxPaintOf as To}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as It,CORNER_SIDE_POINTS as No,SECTION_CORNERS_ROW as Et,hasOwnSectionCorners as Po,normalizeCornerSides as Rt}from"../../../format/lib/content/section-corners.js";import{CARD_CORNERS_ROW as Tt}from"../../../format/lib/content/card-corners.js";import{enclosingPath as ko,enclosingSection as Lo}from"./enclosing-section.js";import{SettingsDefaultReset as x,SettingsDrill as Ao,SettingsField as _,SettingsGroup as Fo,SettingsSegmented as vo,SettingsBorder as Bo,SettingsSidesEach as Do,SettingsSwitch as Pe,borderSides as Ho,borderStartEach as Go}from"efficient-easel/panel";import{ListField as Mo}from"efficient-easel/fields";import{DisplayChips as Wo}from"efficient-shell/ui";import{desktopDisplayChanged as Uo,partShownOnDesktop as Ko,partShownOnPhone as Xo,phoneDisplayChanged as $o,withDesktopPart as Vo,withPhonePart as jo}from"../../../format/lib/content/part-display.js";import{ColorSwatch as Yo,CornersInput as zo,DatePicker as qo,DateTimePicker as Jo,FOCAL_DEFAULT as Zo,IconPicker as Nt,COLUMN_COUNT_MAX as Pt,COLUMN_SHARE_MIN as Qo,COLUMN_SHARES_EQUAL as er,resolveColumnShares as kt,WidthsBar as tr,useShellStrings as nr,IconButton as Lt,InputNumber as At,Slider as or,Tooltip as ke}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as rr}from"./geocode-resolve.js";import{ColourRow as se,InheritedColourRow as Ft}from"./ColourControl.js";import{fillThemeColors as ir,slotFill as le}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as Le}from"../../../format/lib/document/part-inks.js";import{keptByRow as Ae}from"efficient-easel/screen/lib/document/style-fields";import vt from"./MarkupToolbar.js";import{deviceField as E}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as sr,NoControlMark as lr,noControlField as Bt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as ar}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as cr,PANEL_ONLY_FIELD as ur}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as dr,resolvePhoneValue as Fe}from"../../../format/lib/document/phone-override.js";import{phoneKey as j,tabletKey as ve,viewKeyAt as Be}from"efficient-easel/draw";import{viewKey as O}from"../../../format/lib/animation/views.js";import{viewRows as D}from"../animation/view-rows.js";import{SuppressibleText as pr}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as fr,CARD_OUTLINE_OPTIONS as hr,DEFAULT_CARD_INDEX_FORMAT as mr,DEFAULT_CARD_OUTLINE as gr}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as br,DEFAULT_COVER_INDEX as wr}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Sr}from"efficient-easel/draw";import _r from"../../components/MediaUploadField.js";import Cr from"../../components/MultiSelectField.js";import yr from"../../components/SectionThemePicker.js";import xr from"../../components/SearchSelectField.js";import Or from"../../components/StorefrontLinkField.js";import{UiIcon as Dt}from"efficient-easel/draw/client";import{SECTION_PADDING as P}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as Ir}from"../../../render/lib/content/button-look.js";import{usePreviewParts as Er}from"efficient-easel/draw/client";import{encodePartId as Rr}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as Tr,useEaselStrings as Nr}from"efficient-easel/strings";import{hasPhoneHeight as Pr,hasTabletHeight as De,resolveSectionMinHeight as kr,resolveTabletHeight as Lr}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as Ar,SECTION_PIN_ABOVE_HINT as Fr,SECTION_PIN_ABOVE_KEY as vr,SECTION_PIN_ABOVE_LABEL as Br,SECTION_PIN_GROUP as Dr,SECTION_PIN_LABEL as Ht,SECTION_PIN_SCREENS_KEY as He,SECTION_PIN_SCREENS_LABEL as Gt,SECTION_PIN_STOP_DEFAULT as Hr,SECTION_PIN_STOP_HINT as Gr,SECTION_PIN_STOP_KEY as Mr,SECTION_PIN_STOP_LABEL as Wr,SECTION_PIN_STOP_OPTIONS as Ur,SECTION_STICK_DISTANCE as H,SECTION_STICK_DISTANCE_ROW as Ge,SOME_VIEW_PINS as Mt,hasPhoneStick as Kr,hasTabletStick as Xr,resolveSectionStick as ae,sectionPinStopOf as $r,sectionPinStopWrite as Vr}from"../../../format/lib/content/section-sticky.js";import{cssLengthOf as jr}from"../../../format/lib/content/css-length.js";import{SECTION_HEIGHT_MODES as Yr,SECTION_MIN_HEIGHT as zr,SECTION_MIN_HEIGHT_GROUP_LABEL as Q,SECTION_SCREEN_PCT as qr}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as Jr,resolveContainerDirection as Wt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as Zr,BOX_BLOCK_SPACING_POINTS as Ut,BOX_PHONE_ROW_LABEL as Kt,BOX_COLUMNS_MAX as Qr,BOX_COLUMNS_MIN as Xt,BOX_PHONE_ROW_MAX as ei,BOX_PHONE_ROW_MIN as Me,BOX_SHARE_CHOICES as $t,BOX_SHARE_LABEL as Y,boxShareChoiceOf as Vt,boxShareWidthsOf as We,BOX_SHARE_PHONE_DEFAULT as ti,BOX_SHARE_PHONE_POINTS as ni}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as G}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as jt,BORDER_SIDES as oi,SECTION_BORDER_ROW as Yt,borderBySide as zt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as ri,normalizeTheme as qt,normalizeThemeColors as ii,sectionBandTone as si,surfaceTwoTone as li}from"../../../format/lib/theme.js";import{CONTAINER_GAP as Jt,CONTAINER_GAP_BUILT_IN as ai,CONTAINER_GAP_PHONE as Ue,GAP_FIELD_CONTAINER as Ke,followsSitePhoneGap as ci,hasOwnContainerGap as ui,hasOwnPhoneGap as Xe,resolveContainerGap as Zt,resolvePhoneContainerGap as Qt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as di,CARD_IMAGE_BG_OFF as pi,CARD_IMAGE_BG_SWATCH_NAMES as fi,CARD_IMAGE_BG_SWATCHES as hi,isCardImageBackgroundInheriting as mi,cardImageBackgroundChoice as gi,THEME_CARD_IMAGE_BG as bi}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as wi,SECTION_BG_NO_FILL as Si,sectionBackgroundChoice as _i,THEME_SECTION_BG as $e,isSectionBackgroundEmpty as Ci,sectionBackgroundHex as en}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as yi,nestedAccentValue as tn,resolveSectionAccent as ce}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as xi,TYPE_SIZE_INHERIT as Oi,isTypeSizeInheriting as Ii}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Ei,WIDTH_CHOICE_LABEL as Ri,WIDTH_INHERIT as Ti}from"../../../format/lib/content/section-width.js";import{useEaselSession as Ni}from"efficient-easel/screen/lib/session-context";import{backendOf as Pi}from"../website-session.js";import{BOX_GAP as ki,describedAs as F,group as R,iconOf as z,sharedStyleKinds as ee}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as nn,onDesktopWords as M,phoneTwinFields as Ve,saidAlignmentGrid as Li,useLengthUnit as Ai}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as Fi,PICTURE_PICKER_ROW as vi,directionField as Bi,gapField as je,iconPickerRow as on,lengthUnitFields as ue,pickerCellIcon as Di,pickerNoneIcon as Hi,Segmented as de,select as W,slider as U}from"./box-fields.js";import{VIEW_ABOVE as Ye}from"efficient-easel/screen/lib/content/length-units";import{tierOfView as rn,viewOfTier as Gi}from"../../../format/lib/content/view-tier.js";import{ownEntry as Mi}from"../../../format/lib/own-entry.js";import{LAYOUT_CELL as Wi,galleryPhonePicture as sn}from"./choice-pictures.js";function Ya({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?a(e):e})}function K(e,t){return a("{value} from {from}",{value:e,from:t})}function Ui(){const{blockGap:e}=G();return e===null?a("this container's own spacing"):K(`${e}px`,a("Styles"))}function Ki({inherited:e,onReset:t,label:n}){return i(x,{words:y()?.panel,label:a(n),changed:!e,detail:Ui(),onReset:t})}function Xi(e){return je({...ki,builtIn:ai[e],resolve:(t,n)=>Zt(e,t,n?.siteGap),action:(t,n)=>i(Ki,{inherited:!ui(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[Ke]:e}})}function $i(e){return dt(E("mobile",{[Ke]:e,type:"custom",render:t=>i(Yi,{container:e,...t})}),ln)}function Vi(e){return dt(E("tablet",{[Ke]:e,type:"custom",render:t=>i(ji,{container:e,...t})}),ln)}const ln={not:{field:"gap",in:Array.from({length:-Jt.min},(e,t)=>Jt.min+t)}};function za(e){return{gap:E("desktop",Xi(e)),[ve("gap")]:Vi(e),[j("gap")]:$i(e)}}function ji({container:e,...t}){const[n]=T("gap"),{siteGap:o}=t.field??{},r=Math.max(Ue.min,Zt(e,n,o));return je({...Ue,builtIn:r,resolve:l=>Xe(l)?l:r,action:(l,c)=>i(x,{words:y()?.panel,label:a("Gap"),changed:Xe(l),detail:M(u=>a(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function Yi({container:e,...t}){const[n]=T("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},s=Qt(e,void 0,n,o,r);return je({...Ue,builtIn:s,resolve:c=>Qt(e,c,n,o,r),action:(c,u)=>i(x,{words:y()?.panel,label:a("Gap"),changed:Xe(c),detail:K(`${s}px`,ci(e,n,r)?a("Styles"):a("Desktop")),onReset:()=>u(void 0)})}).render(t)}function qa(e){return Bi({offered:Jr(e),fallback:Wt(e,void 0),resolve:t=>Wt(e,t)})}function Ja(e,t){return eo(t?Qn(e,t):[],t)}function zi({inherited:e,onReset:t,label:n}){return i(x,{words:y()?.panel,label:a(n),changed:!e,detail:K(a("Full"),a("the page")),onReset:t})}function X({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:s,hideable:l=!0,markup:c=!0}){const{text:u,hidden:d}=st(e),h=J(null),p=J(null),f=C=>t(l?{text:C,hidden:d}:C),m=()=>t({text:u,hidden:!d}),g=l&&d,b=rt(),S=r?es(r)?i("span",{className:"sf-hint-while-typing",children:a(r)}):a(r):void 0,w=d?a("Show {label} on the slide",{label:a(n)}):a("Hide {label} on the slide",{label:a(n)});return i(_,{label:a(n),icon:i(Co,{}),htmlFor:b,className:g?"is-hidden":void 0,hint:S,action:l?i(ke,{content:w,children:i(Lt,{"aria-pressed":d,"aria-label":w,onClick:m,children:d?i(Dt,{name:"eye-off",size:14}):i(Dt,{name:"eye",size:14})})}):void 0,children:k("div",{className:"sf-copybox",children:[c&&i(vt,{target:s?p:h,value:u,onChange:f}),s?i("textarea",{id:b,ref:p,value:u,placeholder:o===void 0?void 0:a(o),onChange:C=>f(C.target.value)}):i("input",{id:b,ref:h,type:"text",value:u,placeholder:o===void 0?void 0:a(o),onChange:C=>f(C.target.value)})]})})}function Za(e,t){return{...e,[ut]:t}}function Qa(e){const t=e[N];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[N]:{...t,offPage:!0}}}function ec(e){return!e||typeof e!="object"?!1:e[N]?.offPage===!0}function tc(e){if(!e[N])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[ur]:!0}}function nc(e){return cr(e)}function oc(e){const t=e[N];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[N]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as hu,SCALAR_TEXT_CONTROLS as mu}from"efficient-easel/draw";function rc(e,t){if(!e[N])throw new Error("inOwnBox: the field holds no authored text");const{[sr]:o,...r}=e;return{...r,[ar]:!0,render:t}}const qi=new Set(Sr),pe={type:"radio",options:[{value:!0},{value:!1}]},an={text:{type:"object",objectFields:{text:{type:"text"},hidden:pe}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:pe}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},$=(e,t)=>{const n=F({...t,[N]:e},{...an[e.control],label:e.label});if(!qi.has(e.control))return n;const o=t.render;return{...Bt(n,"authored-copy"),render:r=>i(pr,{name:r.name,children:o(r)})}},ic="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Ji={field:"source.slug",set:!0},sc={not:Ji},Zi="Select a word, then press the highlighter.",Qi=new Set([Zi]),es=e=>Qi.has(e);function lc(e,t,n){return $({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(X,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function ac(e,t,n){return $({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(X,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function cc(e,t,n){return $({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(X,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function uc(e,t,n){return $({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(X,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function dc(e){return{type:"custom",[at]:{label:e},...F({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(Or,{value:lt(t),onChange:n,label:e})}}function pc(e,t,n){return $({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(X,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const fc={Design:oo,Animation:io};function hc(e,t){return{type:"custom",render:()=>i(ts,{text:e,values:t})}}function ts({text:e,values:t}){return i("p",{className:"sf-note",children:a(e,t)})}function mc(e){return ye(e)!==null&&e?.tabs!==void 0}const cn=new Map;function gc(e,t){const n=`${e}\0${t?t.join(""):""}`,o=cn.get(n)??{type:"custom",tabs:t,[Ce]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(L,{})};return cn.set(n,o),o}const un=new Map;function bc(e){const t=un.get(e)??{type:"custom",[Ce]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(L,{})};return un.set(e,t),t}function ns(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function wc(e,t){return ns(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(L,{})}}function Sc(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 _c({title:e,children:t}){const[n,o]=Z(()=>!ze.has(e));return i(Fo,{title:e,open:n,onToggle:r=>{o(r),r?ze.delete(e):ze.add(e)},children:t})}const ze=new Set;function os({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),s=r?o?.[r]:void 0,l=s?a(s):t;return k("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?a(o[c]):c;return i(ke,{content:u,children:i(Yo,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:l})]})}function Cc(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(rs,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function rs({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const s=typeof o=="string"?o:void 0,{colors:l,n:c}=et(),u={background:l.background,surface:l.surface,surface2:li(l),band:si(l)},d=n?$e:t,h=Ci(s,t,d),p=en(void 0,d,u),f=n?wi:void 0,m=d===$e?a("the theme's section background"):a("Theme {n} background",{n:c}),g=is(s,t,l,c,u,r),b=K(p.toUpperCase(),m),S=Le(s),w=S?le(S,l,c):null;return w?i(se,{label:a(e),icon:i(ht,{}),value:w.hex,caption:w.words,onChange:r,changed:!0,onReset:()=>r(f),resetTo:b,choices:g}):i(Ft,{label:a(e),icon:i(ht,{}),value:h?"":en(s,t,u),inherited:p,resetTo:b,onChange:r,onReset:()=>r(f),choices:g})}function is(e,t,n,o,r,s){const l=_i(e,t);return[{label:a("No fill"),color:"",selected:l==="none",onPick:()=>s(Si)},{label:`${a("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:l==="band",onPick:()=>s($e)},...Qe(Le(e)??"",n,o,s)]}function ss(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,s=mi(r,t);return i(_,{label:a(e),icon:i(Ee,{}),changed:!s,action:i(x,{words:y()?.panel,label:a(e),changed:!s,detail:a("the theme's image stage"),onReset:()=>o(di)}),children:os({swatches:hi,current:s?bi:gi(r,t),onPick:o,names:fi})})}}}function yc(e=n=>n,t){return ee({_gSectionTheme:R(yi),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(yr,{value:e(n),onChange:o,followLabel:t})}})}function fe(e){const t=I(),n=rn(e?.view),o=l=>Be(e.valueKey,l),r=e.numbersIn??(l=>V(t[o(l)])!==void 0),s=e.followsView??Cs(n,r);return Ai({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:Fi,label:a(e.label),grid:e.grid,hasOwn:r(n),view:{tier:n,numbersIn:r,followsView:s},convertTo:e.convertTo??(l=>{const c=V(t[o(n)]);return c===void 0?{}:{[o(n)]:l(c)}})})}function q({min:e,max:t,step:n,value:o,onChange:r,suffix:s="",readout:l=!0,notch:c,ariaLabel:u,disabled:d=!1,placeholder:h,placeholderWord:p,onClear:f,units:m}){const g=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:g?"sf-slider has-notch":"sf-slider",style:g?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(or,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...p?{emptyLabel:a(p)}:{},suffix:s||void 0,...m?{units:m}:{},showInput:l,label:u===void 0?void 0:a(u),disabled:d,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:b=>{b===null?f?.():b!==o&&r(b)}})})}function ls(e,t){const{min:n,max:o,step:r=1,unsetLabel:s,hint:l,restTrack:c,unsetMark:u,icon:d,unit:h="px"}=t;return{type:"custom",render:({value:p,onChange:f})=>{const m=typeof p=="number"?p:null,g=m===null;return i(_,{label:a(e),icon:d?z(d):void 0,value:g?u||s===void 0?void 0:a(s):`${m}${h}`,changed:!g,action:u?_e(u,{changed:!g,onReset:()=>f(null)}):i(x,{words:y()?.panel,label:a(e),changed:!g,onReset:()=>f(null)}),hint:typeof l=="string"?a(l):l,children:c?c({min:n,max:o,step:r,px:m,label:e,onChange:f}):q({min:n,max:o,step:r,value:m??n,readout:!1,ariaLabel:e,onChange:f})})}}}const te="Corners",as={kind:"radius"};function qe(e){return{type:"custom",render:t=>{const{value:n,onChange:o}=t,r=typeof n=="number"&&Number.isFinite(n)?n:null,s=r!==null;return i(_,{label:a(te),icon:i(gt,{}),changed:s,action:_e(e.mark,{changed:s,onReset:()=>o(null)}),hint:e.hint,children:i(cs,{tier:e,px:r,name:t.name,onRadius:o})})}}}function T(e){const t=B();return[t?.values?.[e],n=>t?.onChange(e,n)]}function dn(){return Bt({type:"custom",render:()=>i(lr,{})},"always")}function he(){const e=B();return t=>e?.onChangeMany(t)}function cs({tier:e,px:t,name:n,onRadius:o}){const r=e.useFollowed(),[s,l]=T(e.sidesKey),c=he(),u=fe({row:e.row??as,label:te,grid:{min:A,max:xe,step:e.step??1},valueKey:n??"",view:"desktop"}),d=Rt(s)??[...It];return i(zo,{label:a(te),value:d,corners:No,onChange:h=>{const p=Rt(h)??[];l(p.length===It.length?null:p)},radius:t,onRadiusChange:u&&n?h=>c({[n]:h,...u.unitPatch(h===null)}):o,radiusMin:u?.grid.min??A,radiusMax:u?.grid.max??xe,radiusStep:u?.grid.step??e.step??1,radiusPlaceholder:u&&u.unit!=="px"?"–":String(r),...u?{radiusUnit:u.unit,units:u.units}:{}})}function pn(e,t){return ue(e,t)}function fn(){return dn()}function us({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=G(),r=typeof o=="number"?`${o}px`:a("not set");return i(x,{words:y()?.panel,label:a(e),changed:t,detail:o==null?a("the built-in corners"):K(r,a("Styles")),onReset:n})}function ds(){const{cornerRadiusPx:e}=G();return typeof e=="number"?e:A}function ps(){return qe({sidesKey:"sectionCornerSides",row:Et,useFollowed:ds,mark:i(us,{label:te}),hint:fs})}const fs="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function xc(){return ee({_gShape:R("Shape"),sectionCorners:ps(),...pn(Et,"sectionCorners"),sectionCornerSides:fn(),...D("sectionBorder",_s),...ue(Yt,"sectionBorder",{tablet:!0,phone:!0})})}const hs=()=>({width:a("Border width"),sides:{top:a("Border top"),right:a("Border right"),bottom:a("Border bottom"),left:a("Border left")},style:a("Border style"),styles:{solid:a("Solid"),dashed:a("Dashed"),dotted:a("Dotted")},color:a("Border color"),unit:"px"});function ms(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function gs(){let e;try{const t=qt(G().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||ri.line}function bs({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:s=!0,above:l={},length:c}){const u=e&&typeof e=="object"?e:{},[d,h]=Z(()=>r?Go(u,l):!1),p=hs(),f=m=>ms(r&&s?m:{width:m.width,color:m.color,...s?{style:m.style}:{}});return i(_,{label:a("Border"),icon:i(so,{}),action:r?i(Do,{each:d,label:a("Each side"),onChange:h}):void 0,children:i(Bo,{label:a("Border"),value:u,each:d,onChange:m=>t(f(m)),placeholder:n,presets:o,words:c?{...p,unit:c.unit}:p,styles:s,max:c?.grid.max??jt,...c?{step:c.grid.step,units:c.units}:{}})})}function ws({value:e,onChange:t,view:n}){const[o]=T("sectionBorder"),[r]=T(ve("sectionBorder")),s=gs(),l=f=>f&&typeof f=="object"?f:{},c=n==="phone"?{...zt(l(o)),...zt(l(r))}:n==="tablet"?l(o):{},u=I(),d=he(),h=O("sectionBorder",n),p=fe({row:Yt,label:"Border",grid:{min:0,max:jt,step:1},valueKey:"sectionBorder",view:n,numbersIn:f=>Je(u[Be("sectionBorder",f)]),convertTo:f=>{const m=l(u[h]);return Je(m)?{[h]:Ss(m,f)}:{}}});return i(bs,{value:e,length:p,onChange:p?f=>d({[h]:f,...p.unitPatch(!Je(f))}):t,placeholder:{sides:Ho(c),style:c.style??"solid",color:c.color||s},presets:[s],above:c})}const hn=["width",...oi];function Je(e){if(!e||typeof e!="object")return!1;const t=e;return hn.some(n=>V(t[n])!==void 0)}function Ss(e,t){const n={...e};for(const o of hn){const r=V(n[o]);r!==void 0&&(n[o]=t(r))}return n}function _s(e){return{type:"custom",render:({value:t,onChange:n})=>i(ws,{value:t,onChange:n,view:e})}}function Cs(e,t){let n=Ye[e];for(;n&&Ye[n]!==null&&!t(n);)n=Ye[n];return n??e}function Oc(e){return{type:"custom",render:()=>i(ys,{partKey:e})}}function ys({partKey:e}){const[t]=T("id"),[n]=T("_partStyles"),{textStyles:o}=G(),r=Nr();let s=null;try{s=Er().select}catch{s=null}const l=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(Ao,{name:a("Text"),preview:Ir(l,c,{noStyle:a("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??Tr.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(Rr(t,e))}})}function mn(e){const{cornerRadiusPx:t}=G(),n=typeof t=="number"?t:e;let o=null;try{const{appState:s,selectedItem:l}=re(u=>u),c=l?.props?.id?String(l.props.id):void 0;o=c?Lo(s?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Po(r)?r:n}function xs({label:e,changed:t=!1,onReset:n=()=>{}}){const o=mn(A);return i(x,{words:y()?.panel,label:a(e),changed:t,detail:K(`${o}px`,a("the section")),onReset:n})}function Os(){return i(L,{children:a("Follows the section's Corners until you set a number here.")})}function Is(){return qe({sidesKey:"cardCornerSides",row:Tt,useFollowed:()=>mn(A),mark:i(xs,{label:te}),hint:i(Os,{})})}function Es(){return{type:"custom",render:()=>i(Gn,{})}}function Ic(){return{_gShape:R("Shape"),cardCorners:Is(),...pn(Tt,"cardCorners"),cardCornerSides:fn(),cardCornersApplyAll:Es()}}function Rs(){return F({type:"custom",[vi]:!0,render:e=>i(Ns,{...e})},{type:"select",label:Y,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 Ts(e,t){const n=Vt(e);if(n!=="custom")return a($t.find(r=>r.value===n)?.label??"");const o=kt(We(e,t),t);return o?[...o,100-o.reduce((r,s)=>r+s,0)].join(" / "):a("Custom")}function Ns(e){const{value:t,onChange:n}=e,[o]=T("content"),r=Array.isArray(o)?o.length:0,s="follows"in e,l=t!=null,c=l?t:s?e.follows:void 0,u=Vt(c),d=r>=2&&r<=Pt,h=()=>[...er[r]??[]],p=J(null),f=w=>{const C=p.current;C&&JSON.stringify(w)===JSON.stringify(C.shares)?n(C.value):w&&n(w)},m=w=>{w===u||w==="custom"&&!d||n(w==="custom"?h():w)},g=a("The width bar works for 2 to {count} blocks.",{count:Pt}),b=l&&(s||t!=="content"),S=nr().widths.hint(r,Qo);return i(_,{label:a(Y),icon:i(Ie,{}),changed:b,hint:u!=="custom"?void 0:d?S:g,action:i(x,{words:y()?.panel,label:a(Y),changed:b,disabled:e.readOnly===!0,detail:s?M(w=>a(w),Ts(e.follows,r),e.followsView):a("Fit content"),onReset:()=>n(void 0)}),children:k("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(Nt,{label:a(Y),value:u,options:$t.map(w=>({value:w.value,label:w.value==="custom"&&!d?g:a(w.label),icon:Di(i("span",{className:"sf-gallery-pic sf-share-pic",children:gn(w.weights).map((C,v)=>i("i",{style:{gridColumn:`span ${C}`}},v))}),a(w.label),w.value==="custom"&&!d?g:a(w.label))})),onChange:m,columns:3,cell:bn,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&d?i("div",{onFocus:()=>{p.current={value:t,shares:kt(We(c,r),r)}},onBlur:()=>{p.current=null},children:i(tr,{label:a(Y),count:r,value:We(c,r),onChange:f,readOnly:e.readOnly===!0})}):null]})})}function gn(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 Ec(){return W(Zr,i(ho,{}),Ut,Ut[0].value)}function Rc(){return E("mobile",on(Y,i(Ie,{}),ni.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:gn(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),ti,{columns:2,cell:bn}))}const bn={width:"5.75rem",height:"3.25rem",words:!0};function Tc(){return Ve("share",Rs(),nn)[ve("share")]}function Ps(){return E("mobile",U(Kt,i(mt,{}),Me,ei,1,Me,"",{clear:{phoneFollows:!1,hint:Me}}))}const wn={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function Nc(){const e=U(Kt,i(mt,{}),Xt,Qr,1,Xt,"",{clear:{emptyLabel:"Auto"}}),t=Ve("columns",e,{...wn,tablet:nn.tablet}),n=Ve("columns",e,wn,{phoneRow:Ps()});return{...t,phoneRow:n.phoneRow}}function Pc(e,t,n,o,r,s,l){return{type:"custom",render:({value:c,onChange:u,name:d})=>i(ks,{label:e,min:t,max:n,step:o,fallback:r,role:s,value:c,onChange:u,name:d??"",length:l})}}function ks({label:e,min:t,max:n,step:o,fallback:r,role:s,value:l,onChange:c,name:u,length:d}){const h=I(),p=he(),f=rn(d?.view),m=fe({row:d?.row??{kind:"fontSize"},label:e,grid:{min:t,max:n,step:o},valueKey:d?u:"",view:d?.view??"desktop",numbersIn:b=>b===f&&typeof h[u]=="number",followsView:f,convertTo:b=>typeof h[u]=="number"?{[u]:b(h[u])}:{}}),g=b=>m?p({[u]:b,...m.unitPatch(typeof b!="number")}):c(b);return i(_,{label:a(e),icon:i(xt,{noun:s}),action:i(x,{words:y()?.panel,label:a(e),changed:!Ii(l),detail:a("the Text style in Styles"),onReset:()=>g(Oi),defaultAction:{onPress:()=>g(xi),title:a("Keep this section's own built-in size"),icon:i(lo,{})}}),children:q({min:m?.grid.min??t,max:m?.grid.max??n,step:m?.grid.step??o,value:typeof l=="number"?l:r,...m?{suffix:m.unit,units:m.units}:{suffix:"px"},ariaLabel:e,onChange:g})})}function Sn(e,t,n){return[{label:"Auto",value:""},...Array.from({length:e},(o,r)=>({label:r===0?`1 ${t}`:`${r+1} ${n}`,value:String(r+1)}))]}function kc(){return{_gCellWidth:R("Cell size"),gridSpan:W("Positions",i(Ie,{}),Sn($n,"position","positions"),""),gridRowSpan:W("Rows tall",i(Re,{}),Sn(Vn,"row","rows"),"")}}function I(){let e=null,t=null;try{e=ot(Ls),t=re(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Ls=Tn(null);function As({min:e,max:t,step:n,px:o,label:r,onChange:s,desktopKey:l,fallback:c}){const u=I()[l],d=Fe(void 0,u,c);return i(L,{children:q({min:e,max:t,step:n,value:Fe(o,u,c),readout:!1,ariaLabel:r,notch:d,onChange:s})})}function Fs({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:s=()=>{}}){const l=I()[t],c=Fe(void 0,l,n);return i(x,{words:y()?.panel,label:a(e),changed:r,detail:M(u=>a(u),`${c}${o}`),onReset:s})}function vs(e){return ls(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(Fs,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(As,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Bs={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Ds={Top:Te,Bottom:St,Left:_t,Right:Ct},Hs=e=>{const t=Ds[e];return i(t,{})};function Lc(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=S=>Bs[S],s=S=>U(r("Top"),i(Te,{}),P.min,P.max,P.step,S,"px"),l=(S,w,C,v=P)=>E("mobile",vs({label:r(S),icon:Hs(S),desktopKey:w,min:v.min,max:v.max,step:v.step,fallback:C})),c=e.top??P.min,u=e.bottom??P.min,d="sectionPaddingLeft",h="sectionPaddingRight",p=e.sideBounds??P,f=e.side??p.min,m=e.sidePhone??f,g=e.phone===!0,b=S=>g?E("desktop",S):S;return ee({...o?{_gSpacing:R("Padding")}:{},[t]:b(s(c)),...g?{[j(t)]:l("Top",t,c)}:{},...e.only==="top"?{}:{[n]:b(U(r("Bottom"),i(St,{}),P.min,P.max,P.step,u,"px")),...g?{[j(n)]:l("Bottom",n,u)}:{}},...e.sides?{[d]:b(U(r("Left"),i(_t,{}),p.min,p.max,p.step,f,"px")),...g?{[j(d)]:l("Left",d,m,p)}:{},[h]:b(U(r("Right"),i(Ct,{}),p.min,p.max,p.step,f,"px")),...g?{[j(h)]:l("Right",h,m,p)}:{}}:{}})}function Ac(e,t){const n=Object.fromEntries(Object.entries(t).map(([s,l])=>[s,s in e&&ye(l)?e[s]:l])),o={};let r=!1;for(const[s,l]of Object.entries(e)){if(s in t){r||Object.assign(o,n),r=!0;continue}o[s]=l}return r||Object.assign(o,n),o}const me="Width";function Fc(e,t=Ei,n=!0){const o=t.map(r=>({label:Ri[r],value:r}));return ee({...n?{_gWidth:R(me)}:{},widthMode:{type:"custom",render:({onChange:r,field:s})=>i(_,{label:a(me),icon:i(yo,{}),action:n?i(zi,{inherited:s?.inherited??!1,onReset:()=>r(Ti),label:me}):void 0,children:de({options:o,value:s?.currentValue||e,onChange:r,ariaLabel:me})})}})}function vc({fill:e=!1}={}){const t=(r,s)=>({type:"custom",render:({value:l,onChange:c})=>i(Gs,{value:l,onChange:c,view:r,badge:s,fill:e})}),n=()=>Ae("sectionHeightMode"),o=()=>Ae("sectionHeightMode");return ee({_gHeight:R(Q),...D("sectionHeightMode",r=>r==="desktop"?t(r):t(r,s=>i(Ks,{view:r,onClear:()=>s(void 0)}))),...D("sectionHeightValue",n),...D("sectionHeightUnit",o)})}function Gs({value:e,onChange:t,view:n,badge:o,fill:r=!1}){const s=I(),{mode:l,number:c,unit:u}=Ms(n,s,e);return i(_,{label:Q,icon:z(i(Re,{})),action:o?o(t):void 0,children:k("div",{className:"es-width-stack",children:[de({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"},...r?[{label:"Fill",value:"fill"}]:[]],value:l,onChange:t,ariaLabel:Q}),c?i(Us,{view:n,mode:l,menu:u}):null]})})}function _n(e,t){return e==="phone"&&De(t)?Lr(t):kr(t)}function ge(e,t){return e==="desktop"||(e==="tablet"?De(t):Pr(t))?null:_n(e,t)}function Ms(e,t,n){const r=(s=>Yr.includes(s))(n)?n:ge(e,t)?.mode??"auto";return{mode:r,number:r!=="auto"&&r!=="fill",unit:r==="fixed"}}function Ws(e,t,n,o){const r=ge(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[O("sectionHeightMode",e)]:r.mode,...r.mode==="fixed"?{[O("sectionHeightUnit",e)]:r.unit}:{},...n==="sectionHeightUnit"?{[O("sectionHeightValue",e)]:r.value}:{},[O(n,e)]:o}}function Cn(e,t,n){const o=B(),r=ge(e,I());return!o||!r?{followed:null,write:n}:{followed:r,write:l=>o.onChangeMany(c=>{const u=Ws(e,c,t,l);return u===null?{[O(t,e)]:l}:Object.keys(u).length?u:null})}}function Us({view:e,mode:t,menu:n}){const o=B(),r=I(),s=O("sectionHeightValue",e),l=O("sectionHeightUnit",e),c=S=>w=>o?.onChangeMany(()=>({[S]:w})),{followed:u,write:d}=Cn(e,"sectionHeightValue",c(s)),{write:h}=Cn(e,"sectionHeightUnit",c(l)),p=t==="screen"?"%":r[l],f=(u?u.unit:p)==="%"?"%":"px",m=f==="%"?qr:zr,g=r[s],b=n?{options:["px","%"],label:a("Unit"),onChange:S=>h(S)}:void 0;return q({min:m.min,max:m.max,step:m.step,value:u?null:typeof g=="number"?g:m.fallback,...u?{placeholder:u.value}:{},suffix:f,...b?{units:b}:{},ariaLabel:Q,onChange:d})}function Ks({view:e,onClear:t}){const n=I(),o=ge(e,n)===null,r=e==="phone"&&De(n),s=_n(e,n),l=M(c=>a(c),s.mode==="auto"?a("Auto"):`${s.value}${s.unit}`,r?"tablet":"desktop");return i(x,{words:y()?.panel,label:a(Q),changed:o,detail:l,onReset:t})}function Bc(e={}){const t=e.intro===!0,n=s=>({type:"custom",render:({value:l,onChange:c,id:u,name:d})=>i(qs,{value:l,onChange:c,labelId:`${u??d??"stickTop"}-label`,view:s,intro:t})}),o=s=>({type:"custom",render:({value:l,onChange:c})=>i(js,{value:l,onChange:c,view:s,intro:t})}),r=s=>({type:"custom",render:({value:l,onChange:c})=>i(Ys,{value:l,onChange:c,view:s,intro:t})});return{_gStick:R(Dr,{dot:t?Vs:Mt}),...D("stickTop",n),...D("stickTopDistance",o),...ue(Ge,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?D(He,r):{},...t?{}:{[Mr]:Xs()},...t||e.above===!1?{}:{[vr]:$s()}}}function Xs(){const e=W(Wr,i(Te,{}),Ur,Hr);return E("desktop",{...e,render:t=>{const n=e.render({...t,value:$r(t.value),onChange:o=>t.onChange(Vr(o))});return _e(n,{hint:a(Gr)})}})}function $s(){const e=On(Br,!1,i(yt,{}),Fr);return E("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}const Vs={any:[Mt,Ar]};function yn(e,t,n,o,r){const s=B(),l=I(),c=e==="desktop"||ne(e,l)?null:Ze(e,ae(l,{intro:o}));return{followed:c,write:(c||r)&&s?d=>s.onChangeMany(h=>{const p=zs(e,h,d,t,o),f=p===null?{[O(t,e)]:d}:p;return Object.keys(f).length?{...f,...r?.(d)??{}}:null}):n}}function js({value:e,onChange:t,view:n,intro:o}){const r=I(),s=ae(r,{intro:o}),l=h=>{const p=Gi(h);return p==="desktop"||ne(p,r)},c=fe({row:Ge,label:"Distance from top",grid:{min:H.min,max:H.max,step:H.step},valueKey:"stickTopDistance",view:n,numbersIn:h=>l(h)&&V(r[Be("stickTopDistance",h)])!==void 0,followsView:n==="phone"&&s.ownTablet?"tablet":"desktop"}),{followed:u,write:d}=yn(n,"stickTopDistance",t,o,c?h=>c.unitPatch(h===void 0):void 0);return i("div",{className:"sf-field",children:q({min:c?.grid.min??H.min,max:c?.grid.max??H.max,step:c?.grid.step??H.step,value:u?null:typeof e=="number"?e:H.fallback,...u?{placeholder:u.distance}:{},...c?{suffix:c.unit,units:c.units}:{suffix:"px"},ariaLabel:a("Distance from top"),onChange:d})})}function Ys({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:s}=yn(n,He,t,o);return i(_,{label:a(Gt),icon:z(i(Re,{})),children:q({min:ie.min,max:ie.max,step:ie.step,value:r?null:V(e)??ie.default,...r?{placeholder:r.screens}:{},ariaLabel:a(Gt),onChange:s})})}function ne(e,t){return e==="tablet"?Xr(t):Kr(t)}function Ze(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance,unit:t.tabletUnit,screens:t.tabletScreens}:{on:t.desktop,distance:t.desktopDistance,unit:t.desktopUnit,screens:t.desktopScreens}}function zs(e,t,n,o="stickTopDistance",r=!1){if(e==="desktop"||ne(e,t))return null;if(n===void 0)return{};const s=Ze(e,ae(t,{intro:r})),l=e==="phone"&&ne("tablet",t)?h=>O(h,"tablet"):h=>h,c=(h,p)=>t[l(h)]==null?{}:{[O(h,e)]:p},u=Ge.unitKey,d=t[l(u)]==null?{}:{[O(u,e)]:s.unit};return{[O("stickTop",e)]:!0,...c("stickTopDistance",s.distance),...d,...c(He,s.screens),[O(o,e)]:n}}function qs({value:e,onChange:t,labelId:n,view:o,intro:r}){const s=I(),l=ae(s,{intro:r}),c=o==="phone"?l.phone:o==="tablet"?l.tablet:r?l.desktop:e===!0,u=o==="phone"&&l.ownTablet,d=o==="desktop"?null:Ze(o,l),h=d?.on?jr(d.distance,d.unit):a("Off");return i(_,{label:a(Ht),labelId:n,icon:z(i(yt,{})),action:k(L,{children:[o!=="desktop"?i(x,{words:y()?.panel,label:a(Ht),changed:ne(o,s),detail:M(p=>a(p),h,u?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(Pe,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const xn="e.g. about";function Dc(){return{_gAnchor:R("Anchor"),anchor:$({control:"plainText",label:"Name",placeholder:xn},{type:"custom",render:({value:e,onChange:t})=>i(to,{value:e,onChange:t,nameBox:(n,o)=>i(X,{value:n,onChange:o,label:"Name",placeholder:xn,hideable:!1,markup:!1})})})}}function Hc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:l})=>{const c=`${s??l??e}-datetime`,u=Date.parse(typeof o=="string"?o:"");return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(Jo,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:d=>r(d?d.toISOString():"")})})}}}function Gc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:l})=>{const c=`${s??l??e}-date`;return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(qo,{id:c,value:kn(typeof o=="string"?o:null),onChange:u=>r(u?Pn(u):"")})})}}}function On(e,t,n,o){return{type:"custom",...F({},{...pe,label:e}),render:r=>{const{value:s,onChange:l,id:c,name:u}=r,d="follows"in r,h=r,p=typeof s=="boolean",f=typeof h.follows=="boolean"?h.follows:t,m=p?s:d?f:t,g=`${c??u??e}-label`,b=h.readOnly===!0,S=i(Pe,{checked:m,onChange:l,disabled:b,ariaLabelledBy:g});return i(_,{label:a(e),labelId:g,icon:n,hint:o===void 0?void 0:a(o),action:d?k(L,{children:[i(x,{words:y()?.panel,label:a(e),changed:p,detail:h.followsNoView?a(f?"On":"Off"):M(w=>a(w),a(f?"On":"Off"),h.followsView),disabled:b,onReset:()=>l(void 0)}),S]}):S})}}}function Mc(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(Js,{label:"Background",icon:i(wo,{}),id:r,value:e,shown:xo(e),onChange:t})}}}function Wc(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(se,{label:a(e),icon:n,value:o||t,onChange:r})}}function Js({label:e,icon:t,id:n,value:o,shown:r,onChange:s}){const{colors:l,n:c}=et(),u=Le(o),d=u?le(u,l,c):null;return i(se,{label:a(e),icon:t,id:n,value:d?d.hex:r,caption:d?.words,onChange:s,choices:Qe(u??"",l,c,s)})}function Uc(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(Zs,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function Qe(e,t,n,o){const r=Ne(e);return ir(t,n).map(s=>({label:s.label,color:s.value,selected:r===s.name,onPick:()=>o(s.name)}))}function Zs({value:e,onChange:t,twin:n}){const{colors:o,n:r}=et(),s=o.background,l=K(s.toUpperCase(),a("Theme {n} background",{n:r})),[c,u]=T(Oo),[d]=T(Eo),h=typeof d=="string"&&d.trim()!=="",p=Ot(c),f=oe=>u(Ot(oe)||void 0),m=Ne(e),g=m?le(m,o,r):null,b=Qe(e,o,r,t),S=n?()=>t(void 0):()=>t("");let w=s,C=l;if(n){const oe=Ne(n.follows),we=Ro(n.follows),Se=oe?le(oe,o,r):we?{hex:we,words:we.toUpperCase()}:null;w=Se?.hex??s,C=M(Rn=>a(Rn),Se?Se.words:l,n.view)}const v=!n&&(To(e)||h)?i(Qs,{value:p,onChange:f}):null;return g?i(se,{label:a("Fill"),icon:i(Ee,{}),value:g.hex,caption:g.words,onChange:t,changed:!0,onReset:S,resetTo:C,choices:b,children:v}):i(Ft,{label:a("Fill"),icon:i(Ee,{}),value:e,inherited:w,resetTo:C,onChange:t,onReset:S,choices:b,children:v})}function Qs({value:e,onChange:t}){return de({options:Io.map(n=>({label:n.label,value:n.value,hint:n.hint})),value:e,onChange:t,ariaLabel:a("Fill")})}function el(e,t,n){if((e?.content??[]).some(l=>l?.props?.id===t))return ce(n);const r=ko(e,t);if(r.length===0)return null;const s=ce(tn(n));if(s!==null)return s;for(let l=r.length-1;l>0;l-=1){const c=ce(tn(r[l].sectionAccent));if(c!==null)return c}return ce(r[0].sectionAccent)}function et(){const e=qt(G().theme),[t]=T("sectionAccent");let n=null;try{const{appState:r,selectedItem:s}=re(c=>c),l=s?.props?.id?String(s.props.id):void 0;n=l?el(r?.data,l,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:ii(e.themes[o]),n:o+1}}function Kc(){return dn()}const Xc={top:i(po,{}),right:i(uo,{}),bottom:i(ao,{}),left:i(co,{})};function $c(e,t,n,o,r,s,l){const c=p=>t.find(f=>f.value===p),u=p=>({value:p,label:"",disabled:!0,title:o}),d=p=>{const f=t.find(g=>g.cell===p);if(!f)return u(`missing-${p}`);const m=s?.[p];return m?{value:f.value,label:f.label,icon:m}:{value:f.value,label:f.label}},h=[u("corner-top-left"),d("top"),u("corner-top-right"),d("left"),u("centre"),d("right"),u("corner-bottom-left"),d("bottom"),u("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:f})=>{const m=t.some(g=>g.value===p)?p:n;return i(_,{label:a(e),icon:r,value:c(m)?.label?a(c(m).label):l?a(l):"",children:Li(a,{label:e,value:m,onChange:f,points:h})})}}}function Vc(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:s})=>i(Cr,{label:e,options:(s.options??t).map(l=>({...l,label:a(l.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:a(n)}:{}})}}function jc(e,t,n,o){return{type:"custom",options:t,fallback:n,...F({},{type:"select",label:e}),render:({value:r,onChange:s,field:l})=>i(xr,{label:e,options:(l.options??t).map(c=>({...c,label:a(c.label)})),fallback:l.fallback??n,value:r,onChange:s,placeholder:o===void 0?void 0:a(o)})}}function Yc(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const zc=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function qc(e,t,n){const o=Object.keys(it).map(r=>({label:it[r],value:r,picture:n[r]}));return{type:"custom",...F({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(nl,{label:e,icon:t,options:o,onChange:r})}}function tl(e,t,n){const o=Ln(e,t,n);if(o!==void 0)return o==="save-makes-frame"?a("A frame is made from this video when you save the page."):o==="starts-dark"?a("This video starts dark, so no frame was made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="outside"?a("This video is on another website, so no frame can be made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="unsupported"?a("This video's file type gives no frame. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="failed"?a("No frame could be made from this video. It is tried again the next time you save the page. The slide shows its background colour while the video loads."):o==="image-no-frame"?a("The slide shows your Image while the video loads, because this video has no frame."):void 0;const r=Fn(e);return r==="frame-missing-image"?a("This video has no frame yet. The slide shows its image until one is made."):r==="frame-missing-surface"?a("This video has no frame yet. The slide shows its background colour until one is made."):r==="image-missing-frame"?a("No image yet. The slide shows the video's frame until you choose one."):r==="image-missing-surface"?a("No image yet. The slide shows its background colour until you choose one."):void 0}function nl({label:e,icon:t,options:n,onChange:o}){const r=B(),s=r?.values??{},l=An(s),c=ot(Dn),u=Bn(c?.docId??null);let d=null;try{d=re(p=>p.appState.data)}catch{d=null}const h=vn(r?.id,d,u);return i(_,{label:a(e),icon:z(t),hint:tl(s,h,c?.hasUnsavedEdits??!1),children:de({options:n,value:l,onChange:o,ariaLabel:e})})}function Jc(e,t,n,o={}){const r={type:"custom",[ct]:!0,render:({value:s,onChange:l,name:c})=>i(_r,{value:s||"",onChange:l,fieldKey:c,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame}),...o.focus?{focusKey:o.focus}:{},...o.focusWhen?{focusWhen:o.focusWhen}:{}};return o.focus?E("each",r):r}const Zc={HeroSingle:["imageFocal"],HeroSlide:["videoFrame","videoFramePhone"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function ol(e){const t=a(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function Qc({value:e,onChange:t,label:n}){const o=e||{},r=B(),s=r?r.values!==r.node.props:!0,l=!!o.pending&&s,c=!!o.pending&&!s,u=!!Pi(Ni()).geocode,d=rt(),h=(p,f)=>t({...o,[p]:f??void 0});return k(L,{children:[i(_,{label:a(n),icon:i(wt,{}),action:u?i(ke,{content:a("Find from the address (OpenStreetMap)"),children:i(Lt,{"aria-label":a("Find from the address"),"aria-busy":l||void 0,disabled:l,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(So,{})})}):void 0,children:u&&o.status?i(no,{compact:!0,oneLine:!0,spaced:!1,status:l?"busy":o.ok&&!c?"found":"notfound",statusText:l?a("Finding…"):c?a(rr):a(o.status),hint:ol(o)}):null}),i(_,{label:a("Enter by hand"),labelId:d,icon:i(fo,{}),action:i(Pe,{checked:!!o.manual,onChange:p=>t({...o,manual:p}),ariaLabelledBy:d})}),o.manual&&i(_,{label:a("Latitude, longitude"),icon:i(wt,{}),children:k("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(At,{value:typeof o.lat=="number"?o.lat:null,onChange:p=>h("lat",p),min:-90,max:90,step:1e-4,placeholder:a("Latitude")}),i(At,{value:typeof o.lng=="number"?o.lng:null,onChange:p=>h("lng",p),min:-180,max:180,step:1e-4,placeholder:a("Longitude")})]})})]})}function rl(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function il(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 eu(e,t){return e===null?null:t>e?e:null}function sl(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 tu={label:"Ticker items",icon:i(bo,{})};function nu(e,t,n,o){return{type:"custom",[N]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...F({},{...an.textList,label:e}),render:({value:r,onChange:s})=>i(ll,{label:e,icon:z(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:s,markup:o==="markup"})}}function ll({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:s=!1}){const l=J(null),[c,u]=Z(null),d=p=>p.map(f=>({text:f?.text??""})),h=p=>{const f=sl(n,p,c);f===null&&(l.current=null),u(f),r(d(p))};return i(Mo,{label:a(e),icon:t,noun:a("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:s?i(vt,{target:l,value:rl(n,c),onChange:p=>r(il(n,c??-1,p)),disabled:c===null,label:c===null?a("Formatting — click a row first"):a("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,f,m)=>i("input",{type:"text",className:s&&c===f?"sf-list-marking":void 0,value:p?.text??"",placeholder:a(o),"aria-label":a("{label} {n}",{label:a(e),n:f+1}),onChange:g=>m({text:g.target.value}),onFocus:g=>{l.current=g.currentTarget,u(f)}})})}function ou(e,t){const n=`${e.label} — row ${t+1}`;return $({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(X,{value:o,onChange:r,label:a("{label} — row {n}",{label:a(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function ru(e){return{_gCards:R("Cards"),coverIndex:W("Cover image",i(go,{}),br,String(wr),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:ss("Image background",pi),cardImage:In()}}function iu(){return{outline:W("Card outline",i(_o,{}),hr,gr),indexBadge:W("Card number",i(mo,{}),fr,mr),showBadge:On("Product badge",!0,i(xt,{noun:"tag"}))}}function su(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...pe,label:be.find(s=>s.id===r).label}),o=r=>F(Ae(tt),n(r));return{_gShowOnCard:R("Show on a card"),[tt]:F({type:"custom",render:()=>i(al,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(tt)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const tt="showCardPrice",be=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function al({rest:e}){const t=I(),n=he(),o=l=>typeof t[l]=="boolean"?t[l]:void 0,r=l=>o(l)??e[l],s=be.some(({id:l})=>o(l)!==void 0&&o(l)!==e[l]);return i(nt,{parts:be,changed:s,shown:r,onPress:(l,c)=>n({[l]:c}),onReset:()=>n(Object.fromEntries(be.map(({id:l})=>[l,void 0])))})}function lu(e,t="display"){const n=j(t);return{[t]:E("desktop",{type:"custom",render:({value:o,onChange:r})=>i(nt,{parts:e,changed:Uo(o),shown:s=>Ko(o,s),onPress:(s,l)=>r(Vo(o,s,l)),onReset:()=>r(void 0)})}),[n]:E("mobile",{type:"custom",render:({value:o,onChange:r})=>i(cl,{parts:e,desktopKey:t,value:o,onChange:r})})}}function nt({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:s,disabledReason:l}){const c=a("Display");return i(_,{label:c,icon:i(ro,{}),changed:t,action:i(x,{words:y()?.panel,label:c,changed:t,detail:s,onReset:r}),children:i(Wo,{label:c,items:e.map(u=>({id:u.id,label:a(u.label),shown:n(u.id),...l?{disabled:!0,disabledReason:a(l)}:{}})),onChange:o})})}function cl({parts:e,desktopKey:t,value:n,onChange:o}){const r=I()[t];return i(nt,{parts:e,changed:$o(n),shown:s=>Xo(r,n,s),onPress:(s,l)=>o(jo(n,s,l)),onReset:()=>o(dr),detail:a("the same as Desktop")})}function In(e=Mn){return U("Card image",i(gt,{}),A,xe,Wn,A,e,{clear:{hint:A},hint:"Rounds the picture. The card's own corner is in Styles."})}function ul(){return ue(pt,"cardImage")}function au(){return{cardImage:In(pt),...ul()}}function cu(){return qe({sidesKey:"cornerSides",row:Xn,step:Un,useFollowed:()=>A,mark:i(dl,{label:Kn}),hint:a("Rounds the picture. Left alone it stays square.")})}function dl({label:e,changed:t=!1,onReset:n=()=>{}}){return i(x,{words:y()?.panel,label:a(e),changed:t,onReset:n})}function uu(){return{type:"custom",render:({value:e,onChange:t})=>i(ml,{value:typeof e=="string"?e:"",onChange:t})}}const En="own";function du(){const e=[{value:En,label:"Layout's own",picture:sn(Array.from({length:8},()=>[3,1]))},...Object.entries(zn).map(([t,n])=>({value:t,label:n.label,picture:sn([...n.phone,...n.phone])}))];return E("mobile",on("Layout",i(bt,{}),e,En,{columns:2,cell:Wi}))}function pl({layout:e,width:t}){const n=qn(e),o=n?`${n[0]}/${n[1]}`:void 0;return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:o?"auto":6,gridAutoFlow:"row dense",gap:2},children:Jn(e).map(([r,s],l)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${r}`,gridRow:`span ${s}`,aspectRatio:o}},l))})}const fl={width:"3.5rem",height:"2.5rem",words:!1},hl=200;function ml({value:e,onChange:t}){const[n,o]=Z(null),[r,s]=Z(4),l=J(null);Nn(()=>{const m=l.current;if(!m||typeof ResizeObserver!="function")return;const g=()=>s(m.getBoundingClientRect().width>=hl?4:3);g();const b=new ResizeObserver(g);return b.observe(m),()=>b.disconnect()},[]);const c=e?Mi(Oe,e):void 0,u=c?e:"",d=ft(n,u),h=ft(n,"").length,p=Zn("no-symbol"),f=[{value:"",label:a("Not chosen"),icon:Hi(p,a("Not chosen"))},...d.map(m=>({value:m,label:a(Oe[m].label),icon:i(pl,{layout:Oe[m],width:40})}))];return i(_,{label:a("Layout"),icon:i(bt,{}),value:c?a(c.label):void 0,children:i("div",{ref:l,style:{flex:"1 1 auto",minWidth:0},children:i(Nt,{label:a("Layout"),value:u,options:f,onChange:t,columns:r,cell:fl,header:k("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:a("Photos in a row")}),i(vo,{options:[{id:"all",label:a("All")},...jn.map(m=>({id:String(m),label:String(m)}))],value:n===null?"all":String(n),ariaLabel:a("Photos in a row"),onChange:m=>o(m==="all"?null:Number(m))}),i("span",{className:"text-2xs text-ink-faint",children:a("{n} of {total} layouts",{n:h,total:Yn.length})})]})})})})}export{Ji as BOUND_TO_POST,ic as BOUND_TO_POST_NOTE,fc as BUCKET_ICONS,Zc as CUSTOM_FIELD_MEDIA,Qc as CoordsField,ln as DESKTOP_GAP_NOT_OVERLAP,nt as DisplayRow,Xc as EDGE_ARROWS,Zo as FOCAL_DEFAULT,Ce as FOLD_FIELD_MARKER,Zi as HIGHLIGHT_HINT,X as HidableTextField,at as LINK_FIELD_MARKER,Ya as Label,ct as MEDIA_FIELD_MARKER,zc as MEDIA_TYPE_OPTIONS,sc as NOT_BOUND_TO_POST,_c as PanelBand,ts as PanelNoteLine,Ls as RowPropsContext,ut as SCAFFOLD_FIELD_MARKER,mu as SCALAR_TEXT_CONTROLS,Ki as SiteGapDefaultReset,q as Slider,os as Swatches,hu as TEXT_CONTROL_KINDS,N as TEXT_FIELD_MARKER,tu as TICKER_ITEMS_ROW,ll as TextListField,Js as ThemeFillRow,me as WIDTH_LABEL,zi as WidthDefaultReset,sl as aimAfterListChange,Dc as anchorFields,K as backTo,Cc as backgroundField,Ec as boxBlockSpacingField,Nc as boxColumnsFields,Uc as boxFillField,Ps as boxPhoneRowField,Rs as boxShareField,Rc as boxSharePhoneField,Tc as boxShareTabletField,el as boxThemeIndexOf,gc as bucketHeader,Oc as buttonWordsEntryField,Is as cardCornersField,ss as cardImageBackgroundField,In as cardImageField,au as cardImageFields,ru as cardMediaFields,Ic as cardShapeFields,su as cardShowFields,iu as cardStyleFields,kc as cellWidthFields,Wc as colorInput,qa as containerDirectionField,Xi as containerGapField,$i as containerGapPhoneField,za as containerGapRows,Vi as containerGapTabletField,ol as coordsResultTip,uc as copyText,fn as cornerSidesField,qe as cornersRowField,pn as cornersUnitFields,Gc as date,Hc as dateTime,bc as designGroupHeader,lu as displayFields,$c as edgePad,Qe as fillSlotChoices,eu as focusAfterRemove,Kc as focusKeptField,wc as foldMarker,ye as foldMetaOf,ns as foldTitleOf,Ws as followedHeightPatch,zs as followedStickPatch,uu as galleryLayoutField,du as galleryLayoutPhoneField,vc as heightFields,ge as heightFollowedBy,Ms as heightLayersAt,Ja as heroGroupPlacementPoints,lt as hidableText,es as hintIsWhileTyping,cu as imageCornersField,rc as inOwnBox,mc as isBucketHeader,dn as keptBy,dc as linkField,tl as loadingRowHint,qc as loadingShowsField,Vc as multiSelect,Mc as pageBackgroundField,hc as panelNote,vs as phoneOverrideField,cc as plainText,pc as plainTextarea,ls as pxField,Sc as quietMarker,st as readHidable,rl as rowText,jc as searchSelect,is as sectionBandChoices,ps as sectionCornersField,xc as sectionShapeFields,yc as sectionThemeFields,il as setRowText,Pc as sizeField,Yc as sourceField,Lc as spacingFields,Bc as stickFields,Ac as swapPadding,lc as text,Hn as textFieldIdentifier,ec as textFieldOffPage,nc as textFieldPanelOnly,nu as textList,ou as textListRowField,ac as textarea,On as toggle,Jc as upload,fe as useLengthRow,he as useSelectedPatch,I as useSelectedProps,T as useSelectedSibling,Ui as useSiteGapDetail,Fc as widthField,oc as withIdentifier,Qa as withOffPage,tc as withPanelOnly,Za as withScaffold};
@@ -1 +1 @@
1
- import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,designGroupHeader as x,foldMarker as W,foldMetaOf as C,quietMarker as z,heightFields as w,sectionShapeFields as E,sectionThemeFields as O,stickFields as P,widthField as D}from"./controls.js";import{group as q}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as T}from"./box-fields.js";import{deviceField as J,deviceMetaOf as $}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as B}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as S,SETTINGS_BUCKETS as Q}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as p}from"efficient-easel/screen/lib/document/field-buckets";import{ownEntry as g,hasOwnEntry as V}from"../../../format/lib/own-entry.js";const A=Q;function X(t){return t==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",R={"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",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",Loop:"Animation",Scroll:"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"},H={"AlloyWheelsListing._gCards":"Design"},G={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function F(t,e,o){const a=`${t}.${e}`;return g(G,a)??g(H,a)??g(R,o)}function pe(t,e,o){const a=F(t,e,o);return a?X(a):void 0}function ee(t){return t==="Animation"?[d.Animation]:[d.Design,p[t]]}function _(...t){const e=[];for(const o of t)for(const a of Object.values(o)){const h=$(a),b=C(h?h.inner:a),l=b?g(R,b.label):void 0;if(l)for(const y of ee(l))e.includes(y)||e.push(y)}return e}const ge=[..._(T({tablet:!0,siteSide:!0}),D("full"),w(),m(),P()),...Object.keys(T({tablet:!0,siteSide:!0})),...Object.keys(D("full")),...Object.keys(w()),...Object.keys(m()),...Object.keys(P())],ye=[..._(O()),...Object.keys(O())],ke=[..._(E()),...Object.keys(E())],Se=[..._(B()),...Object.keys(B())],_e=Object.keys(Y()),ve=Object.keys(U()),te={"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)","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 t={...T({tablet:!0,siteSide:!0}),...D("full"),...w(),...m(),...O(),...E(),...B()};for(const e of Object.keys(M)){const o=C(t[e]),a=o?g(R,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 "${e}", 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 ne=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),oe=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...S.map(t=>[p[t],t])]);function ae(t){const e=`${t}.`;return Object.keys(te).filter(o=>o.startsWith(e)).map(o=>o.slice(e.length))}function ie(t,e){const o=$(t),a=q(e);return o?J(o.tier,a):a}function re(t,e){const o=C(e);return o?t==="Content"||t==="Animation"?W(e,o.label):z(e):e}function j(t){return t==="Design"?S:["Animation"]}function fe(t,e){const o=[],a=new Set(ae(e)),h=new Set;let b=!1,l=null;for(const[n,r]of Object.entries(t)){const i=C(r);if(ne.has(n))throw new Error(`${e}.${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=oe.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${e}.${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)&&(b=!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)||V(M,n)){const s=F(e,n,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${e}.${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)&&h.add(n),o.push(l={place:s,entries:[]});continue}const u=F(e,n,i.label);if(!u)throw new Error(`${e}.${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 ${[...S,"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:ie(r,i.label)]]})}const y=new Set(Object.entries(t).filter(([,n])=>C(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",G],["KEY_GROUP",H]]){const i=Object.keys(r).filter(c=>c.startsWith(`${e}.`)).filter(c=>!y.has(c.slice(e.length+1)));if(i.length)throw new Error(`${e}: ${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=b?[]:[...a].filter(n=>!h.has(n));if(v.length)throw new Error(`${e}: 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 I=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=A.filter(n=>j(n).some(r=>I.has(r))),k={};for(const n of f){k[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!I.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"&&(k[p[r]]=x(r));for(const u of i)for(const[s,N]of u.entries)k[s]=re(r,N)}}return k}function me(t){return d.Design in t?t:{[d.Design]:L("Design",null),[p.Content]:x("Content"),...t}}function Le(t){return A.some(e=>d[e]in t)}function we(t){const e=A.filter(a=>d[a]in t);if(e.length===0)return t;const o={...t};for(const a of e)o[d[a]]=L(a,a===e[0]?e:null);return o}export{G as BLOCK_KEY_GROUP,A as BUCKETS,d as BUCKET_KEY,_e as CARD_MEDIA_FIELD_KEYS,ve as CARD_SHOW_FIELD_KEYS,S as DESIGN_GROUPS,p as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,H as KEY_GROUP,R as LABEL_GROUP,ge as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,te as RETIRED,Se as SECTION_ANIM_FIELD_KEYS,ke as SECTION_SHAPE_FIELD_KEYS,ye as SECTION_THEME_FIELD_KEYS,fe as assignSectionGroups,pe as bucketOf,X as bucketOfPlace,Le as hasBucketTabs,_ as headerKeysOf,ee as headerKeysOfPlace,F as placeOf,we as reseatBucketTabs,ae as retiredHeadings,me as seatDesignBucket};
1
+ import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,designGroupHeader as x,foldMarker as W,foldMetaOf as C,quietMarker as z,heightFields as w,sectionShapeFields as E,sectionThemeFields as O,stickFields as P,widthField as D}from"./controls.js";import{group as q}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as T}from"./box-fields.js";import{deviceField as J,deviceMetaOf as $}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as B}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as S,SETTINGS_BUCKETS as Q}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as p}from"efficient-easel/screen/lib/document/field-buckets";import{ownEntry as g,hasOwnEntry as V}from"../../../format/lib/own-entry.js";const A=Q;function X(t){return t==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",R={"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",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",Loop:"Animation",Scroll:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell size":"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"},H={"AlloyWheelsListing._gCards":"Design"},G={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function F(t,e,o){const a=`${t}.${e}`;return g(G,a)??g(H,a)??g(R,o)}function pe(t,e,o){const a=F(t,e,o);return a?X(a):void 0}function ee(t){return t==="Animation"?[d.Animation]:[d.Design,p[t]]}function _(...t){const e=[];for(const o of t)for(const a of Object.values(o)){const h=$(a),b=C(h?h.inner:a),l=b?g(R,b.label):void 0;if(l)for(const y of ee(l))e.includes(y)||e.push(y)}return e}const ge=[..._(T({tablet:!0,siteSide:!0}),D("full"),w(),m(),P()),...Object.keys(T({tablet:!0,siteSide:!0})),...Object.keys(D("full")),...Object.keys(w()),...Object.keys(m()),...Object.keys(P())],ye=[..._(O()),...Object.keys(O())],ke=[..._(E()),...Object.keys(E())],Se=[..._(B()),...Object.keys(B())],_e=Object.keys(Y()),ve=Object.keys(U()),te={"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)","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 t={...T({tablet:!0,siteSide:!0}),...D("full"),...w(),...m(),...O(),...E(),...B()};for(const e of Object.keys(M)){const o=C(t[e]),a=o?g(R,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 "${e}", 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 ne=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),oe=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...S.map(t=>[p[t],t])]);function ae(t){const e=`${t}.`;return Object.keys(te).filter(o=>o.startsWith(e)).map(o=>o.slice(e.length))}function ie(t,e){const o=$(t),a=q(e);return o?J(o.tier,a):a}function re(t,e){const o=C(e);return o?t==="Content"||t==="Animation"?W(e,o.label):z(e):e}function j(t){return t==="Design"?S:["Animation"]}function fe(t,e){const o=[],a=new Set(ae(e)),h=new Set;let b=!1,l=null;for(const[n,r]of Object.entries(t)){const i=C(r);if(ne.has(n))throw new Error(`${e}.${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=oe.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${e}.${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)&&(b=!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)||V(M,n)){const s=F(e,n,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${e}.${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)&&h.add(n),o.push(l={place:s,entries:[]});continue}const u=F(e,n,i.label);if(!u)throw new Error(`${e}.${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 ${[...S,"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:ie(r,i.label)]]})}const y=new Set(Object.entries(t).filter(([,n])=>C(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",G],["KEY_GROUP",H]]){const i=Object.keys(r).filter(c=>c.startsWith(`${e}.`)).filter(c=>!y.has(c.slice(e.length+1)));if(i.length)throw new Error(`${e}: ${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=b?[]:[...a].filter(n=>!h.has(n));if(v.length)throw new Error(`${e}: 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 I=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=A.filter(n=>j(n).some(r=>I.has(r))),k={};for(const n of f){k[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!I.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"&&(k[p[r]]=x(r));for(const u of i)for(const[s,N]of u.entries)k[s]=re(r,N)}}return k}function me(t){return d.Design in t?t:{[d.Design]:L("Design",null),[p.Content]:x("Content"),...t}}function Le(t){return A.some(e=>d[e]in t)}function we(t){const e=A.filter(a=>d[a]in t);if(e.length===0)return t;const o={...t};for(const a of e)o[d[a]]=L(a,a===e[0]?e:null);return o}export{G as BLOCK_KEY_GROUP,A as BUCKETS,d as BUCKET_KEY,_e as CARD_MEDIA_FIELD_KEYS,ve as CARD_SHOW_FIELD_KEYS,S as DESIGN_GROUPS,p as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,H as KEY_GROUP,R as LABEL_GROUP,ge as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,te as RETIRED,Se as SECTION_ANIM_FIELD_KEYS,ke as SECTION_SHAPE_FIELD_KEYS,ye as SECTION_THEME_FIELD_KEYS,fe as assignSectionGroups,pe as bucketOf,X as bucketOfPlace,Le as hasBucketTabs,_ as headerKeysOf,ee as headerKeysOfPlace,F as placeOf,we as reseatBucketTabs,ae as retiredHeadings,me as seatDesignBucket};
@@ -1 +1 @@
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
+ 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",words:!0},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,6 +1,8 @@
1
1
  import { type ViewOverrides } from "./view-overrides.js";
2
2
  export type BlockAlign = "left" | "center" | "right";
3
3
  export declare const BLOCK_ALIGN_JUSTIFY: Record<BlockAlign, string>;
4
+ export declare const BLOCK_ALIGN_PLACE: Record<BlockAlign, string>;
5
+ export declare const BLOCK_ALIGN_TEXT: Record<BlockAlign, string>;
4
6
  export type AlignKind = "text" | "place" | "justify" | "items";
5
7
  export declare function blockAlignOf(value: unknown): BlockAlign | undefined;
6
8
  export declare function legacyBlockAlignOf(value: unknown): BlockAlign | undefined;
@@ -1 +1 @@
1
- import{viewOverrides as v}from"./view-overrides.js";const p={left:"justify-start",center:"justify-center",right:"justify-end"},o={text:{left:"view-wide:max-view-desktop:text-left",center:"view-wide:max-view-desktop:text-center",right:"view-wide:max-view-desktop:text-right"},place:{left:"view-wide:max-view-desktop:mx-0",center:"view-wide:max-view-desktop:mx-auto",right:"view-wide:max-view-desktop:ml-auto view-wide:max-view-desktop:mr-0"},items:{left:"view-wide:max-view-desktop:grid-cols-1 view-wide:max-view-desktop:justify-items-start",center:"view-wide:max-view-desktop:grid-cols-1 view-wide:max-view-desktop:justify-items-center",right:"view-wide:max-view-desktop:justify-items-end"},justify:{left:"view-wide:max-view-desktop:justify-start",center:"view-wide:max-view-desktop:justify-center",right:"view-wide:max-view-desktop:justify-end"}},n={text:{left:"max-view-wide:text-left",center:"max-view-wide:text-center",right:"max-view-wide:text-right"},place:{left:"max-view-wide:mx-0",center:"max-view-wide:mx-auto",right:"max-view-wide:ml-auto max-view-wide:mr-0"},items:{left:"max-view-wide:grid-cols-1 max-view-wide:justify-items-start",center:"max-view-wide:grid-cols-1 max-view-wide:justify-items-center",right:"max-view-wide:justify-items-end"},justify:{left:"max-view-wide:justify-start",center:"max-view-wide:justify-center",right:"max-view-wide:justify-end"}},l={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"}},d={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 a(e){return e==="left"||e==="center"||e==="right"?e:void 0}function u(e){return e==="start"?"left":e==="end"?"right":a(e)}function f(e,s,r){const w=a(e)??"left",t=v("same",w,a(s),a(r)),i={};return t.tablet&&t.tablet!==w&&(i.tablet=t.tablet),t.phone&&t.phone!==w&&(i.phone=t.phone),i}function b(e,s,r,w,{atSectionLine:t=!1}={}){const i=f(s,r,w),m=t?l:o,x=t?d:n;return[i.tablet?m[e][i.tablet]:"",i.phone?x[e][i.phone]:""].filter(Boolean).join(" ")}export{p as BLOCK_ALIGN_JUSTIFY,f as alignViewAnswers,b as alignViewClasses,a as blockAlignOf,u as legacyBlockAlignOf};
1
+ import{viewOverrides as o}from"./view-overrides.js";const p={left:"justify-start",center:"justify-center",right:"justify-end"},u={left:"",center:"mx-auto",right:"ml-auto"},g={left:"",center:"text-center",right:"text-right"},n={text:{left:"view-wide:max-view-desktop:text-left",center:"view-wide:max-view-desktop:text-center",right:"view-wide:max-view-desktop:text-right"},place:{left:"view-wide:max-view-desktop:mx-0",center:"view-wide:max-view-desktop:mx-auto",right:"view-wide:max-view-desktop:ml-auto view-wide:max-view-desktop:mr-0"},items:{left:"view-wide:max-view-desktop:grid-cols-1 view-wide:max-view-desktop:justify-items-start",center:"view-wide:max-view-desktop:grid-cols-1 view-wide:max-view-desktop:justify-items-center",right:"view-wide:max-view-desktop:justify-items-end"},justify:{left:"view-wide:max-view-desktop:justify-start",center:"view-wide:max-view-desktop:justify-center",right:"view-wide:max-view-desktop:justify-end"}},v={text:{left:"max-view-wide:text-left",center:"max-view-wide:text-center",right:"max-view-wide:text-right"},place:{left:"max-view-wide:mx-0",center:"max-view-wide:mx-auto",right:"max-view-wide:ml-auto max-view-wide:mr-0"},items:{left:"max-view-wide:grid-cols-1 max-view-wide:justify-items-start",center:"max-view-wide:grid-cols-1 max-view-wide:justify-items-center",right:"max-view-wide:justify-items-end"},justify:{left:"max-view-wide:justify-start",center:"max-view-wide:justify-center",right:"max-view-wide:justify-end"}},l={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"}},d={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 a(e){return e==="left"||e==="center"||e==="right"?e:void 0}function b(e){return e==="start"?"left":e==="end"?"right":a(e)}function f(e,s,r){const w=a(e)??"left",t=o("same",w,a(s),a(r)),i={};return t.tablet&&t.tablet!==w&&(i.tablet=t.tablet),t.phone&&t.phone!==w&&(i.phone=t.phone),i}function h(e,s,r,w,{atSectionLine:t=!1}={}){const i=f(s,r,w),m=t?l:n,x=t?d:v;return[i.tablet?m[e][i.tablet]:"",i.phone?x[e][i.phone]:""].filter(Boolean).join(" ")}export{p as BLOCK_ALIGN_JUSTIFY,u as BLOCK_ALIGN_PLACE,g as BLOCK_ALIGN_TEXT,f as alignViewAnswers,h as alignViewClasses,a as blockAlignOf,b as legacyBlockAlignOf};
@@ -1,4 +1,4 @@
1
- export declare const BOX_SHAPES: ("square" | "auto" | "video" | "screen" | "wide" | "tall" | "landscape" | "portrait" | "panorama" | "story" | "poster")[];
1
+ export declare const BOX_SHAPES: ("square" | "auto" | "video" | "screen" | "tall" | "wide" | "landscape" | "portrait" | "panorama" | "story" | "poster")[];
2
2
  export type BoxShape = (typeof BOX_SHAPES)[number];
3
3
  export declare function boxShapeOf(value: unknown): BoxShape;
4
4
  export declare function boxShapeClass(value: unknown): string;
@@ -26,6 +26,7 @@ export declare const SITE_BLOCK_GAP_PHONE_VAR = "--sf-block-gap-phone";
26
26
  export declare const SITE_BLOCK_GAP_PHONE_REM_VAR = "--sf-block-gap-phone-rem";
27
27
  export declare const SITE_BLOCK_GAP_ON_PHONE_VAR = "--sf-block-gap-on-phone";
28
28
  export declare const SITE_BLOCK_GAP_PHONE_CLASS = "max-view-tablet:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]";
29
+ export declare const SITE_BLOCK_GAP_PHONE_EDGE_CLASS = "max-view-wide:[&_[data-sf-line~=edge]:not([data-sf-line~=edge]_*)]:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]";
29
30
  export declare function siteBlockGapPhoneTokens(v?: number | null, unit?: unknown): Record<string, string>;
30
31
  export declare function siteBlockGapPhoneClass(v?: number | null): string;
31
32
  export declare const GAP_ZONE_CLASS = "sf-gap-zone";
@@ -1 +1 @@
1
- import{siteLengthCss as _}from"./css-length.js";const H="sf.gapContainer",r={min:-32,max:64,step:2},x={Grid:{sm:12,md:24,lg:40},Flex:{sm:12,md:24,lg:40},FooterGroup:{sm:8,md:16,lg:32},HeroGroup:null,Events:null,GalleryB:null,ProductGrid:null},m={Grid:24,Flex:24,FooterGroup:16,HeroGroup:0,Events:24,GalleryB:8,ProductGrid:2},L=new Set(["Events","GalleryB"]);function A(t,n,o){if(typeof n=="number"&&Number.isFinite(n)&&n>=r.min)return n;if(typeof n=="string"){const e=x[t]?.[n];if(typeof e=="number")return e}return typeof o=="number"&&Number.isFinite(o)?o:m[t]}const R="sf-gap-overlap",h="--sf-gap-overlap",a="--sf-block-gap",G="--sf-block-gap-rem",s={min:0,max:r.max,step:r.step};function c(t){if(typeof t!="number"||!Number.isFinite(t))return null;const n=Math.min(Math.max(Math.round(t),s.min),s.max);return n-n%s.step}function d(t,n){const o=_(t,n,"gap",s);if(o!==null)return{[a]:o,[G]:o};const e=c(t);return e===null?{}:{[a]:`${e}px`,[G]:`${e/16}rem`}}const E="--sf-block-gap-phone",P="--sf-block-gap-phone-rem",T="--sf-block-gap-on-phone",S="max-view-tablet:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]";function F(t,n){const o=_(t,n,"gap",s);if(o!==null)return{[E]:o,[P]:o};const e=c(t);return e===null?{}:{[E]:`${e}px`,[P]:`${e/16}rem`}}function w(t){return c(t)===null?"":S}const N="sf-gap-zone",g="--sf-gap-len";function b(t,n){return typeof n=="number"&&Number.isFinite(n)&&n>=r.min?!0:typeof n=="string"&&typeof x[t]?.[n]=="number"}const O="--sf-gap-len-phone",I="--sf-gap-len-tablet",$={min:0,max:r.max,step:r.step};function i(t){return typeof t=="number"&&Number.isFinite(t)&&t>=$.min}function B(t){return t/2}function k(t,n,o){return i(o)&&!b(t,n)}function K(t,n,o,e,p){return i(n)?n:k(t,o,p)?p:B(A(t,o,e))}const y={block:"sf-gap-overlap-block",inline:"sf-gap-overlap-inline",both:"sf-gap-overlap-both"};function M(t,n,o,e,p){const u={...i(e)?{[O]:`${e}px`}:null,...i(p)?{[I]:`${p}px`}:null};if(!b(t,n)){const f=`${m[t]}px`,C=L.has(t)?`var(--sf-card-gap, ${f})`:f;return{className:` ${N}`,style:{[g]:`var(${a}, ${C})`,[O]:`var(${T})`,...u}}}const l=A(t,n);return l>=0?{className:` ${N}`,style:{[g]:`${l}px`,...u}}:{className:` ${R} ${y[o]}`,style:{gap:"0px",[h]:`${-l/2}px`}}}export{L as CARD_GRID_CONTAINERS,r as CONTAINER_GAP,m as CONTAINER_GAP_BUILT_IN,x as CONTAINER_GAP_LEGACY,$ as CONTAINER_GAP_PHONE,H as GAP_FIELD_CONTAINER,g as GAP_LENGTH_VAR,R as GAP_OVERLAP_CLASS,h as GAP_OVERLAP_VAR,O as GAP_PHONE_LENGTH_VAR,I as GAP_TABLET_LENGTH_VAR,N as GAP_ZONE_CLASS,s as SITE_BLOCK_GAP,T as SITE_BLOCK_GAP_ON_PHONE_VAR,S as SITE_BLOCK_GAP_PHONE_CLASS,P as SITE_BLOCK_GAP_PHONE_REM_VAR,E as SITE_BLOCK_GAP_PHONE_VAR,G as SITE_BLOCK_GAP_REM_VAR,a as SITE_BLOCK_GAP_VAR,M as containerGapProps,k as followsSitePhoneGap,B as halfDesktopGap,b as hasOwnContainerGap,i as hasOwnPhoneGap,c as normalizeSiteBlockGap,A as resolveContainerGap,K as resolvePhoneContainerGap,w as siteBlockGapPhoneClass,F as siteBlockGapPhoneTokens,d as siteBlockGapTokens};
1
+ import{siteLengthCss as u}from"./css-length.js";const V="sf.gapContainer",r={min:-32,max:64,step:2},x={Grid:{sm:12,md:24,lg:40},Flex:{sm:12,md:24,lg:40},FooterGroup:{sm:8,md:16,lg:32},HeroGroup:null,Events:null,GalleryB:null,ProductGrid:null},A={Grid:24,Flex:24,FooterGroup:16,HeroGroup:0,Events:24,GalleryB:8,ProductGrid:2},L=new Set(["Events","GalleryB"]);function m(t,n,e){if(typeof n=="number"&&Number.isFinite(n)&&n>=r.min)return n;if(typeof n=="string"){const o=x[t]?.[n];if(typeof o=="number")return o}return typeof e=="number"&&Number.isFinite(e)?e:A[t]}const h="sf-gap-overlap",S="--sf-gap-overlap",a="--sf-block-gap",G="--sf-block-gap-rem",s={min:0,max:r.max,step:r.step};function _(t){if(typeof t!="number"||!Number.isFinite(t))return null;const n=Math.min(Math.max(Math.round(t),s.min),s.max);return n-n%s.step}function F(t,n){const e=u(t,n,"gap",s);if(e!==null)return{[a]:e,[G]:e};const o=_(t);return o===null?{}:{[a]:`${o}px`,[G]:`${o/16}rem`}}const E="--sf-block-gap-phone",P="--sf-block-gap-phone-rem",R="--sf-block-gap-on-phone",T="max-view-tablet:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]",I="max-view-wide:[&_[data-sf-line~=edge]:not([data-sf-line~=edge]_*)]:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]";function w(t,n){const e=u(t,n,"gap",s);if(e!==null)return{[E]:e,[P]:e};const o=_(t);return o===null?{}:{[E]:`${o}px`,[P]:`${o/16}rem`}}function K(t){return _(t)===null?"":`${T} ${I}`}const g="sf-gap-zone",N="--sf-gap-len";function b(t,n){return typeof n=="number"&&Number.isFinite(n)&&n>=r.min?!0:typeof n=="string"&&typeof x[t]?.[n]=="number"}const O="--sf-gap-len-phone",$="--sf-gap-len-tablet",k={min:0,max:r.max,step:r.step};function i(t){return typeof t=="number"&&Number.isFinite(t)&&t>=k.min}function B(t){return t/2}function d(t,n,e){return i(e)&&!b(t,n)}function D(t,n,e,o,p){return i(n)?n:d(t,e,p)?p:B(m(t,e,o))}const y={block:"sf-gap-overlap-block",inline:"sf-gap-overlap-inline",both:"sf-gap-overlap-both"};function M(t,n,e,o,p){const c={...i(o)?{[O]:`${o}px`}:null,...i(p)?{[$]:`${p}px`}:null};if(!b(t,n)){const f=`${A[t]}px`,C=L.has(t)?`var(--sf-card-gap, ${f})`:f;return{className:` ${g}`,style:{[N]:`var(${a}, ${C})`,[O]:`var(${R})`,...c}}}const l=m(t,n);return l>=0?{className:` ${g}`,style:{[N]:`${l}px`,...c}}:{className:` ${h} ${y[e]}`,style:{gap:"0px",[S]:`${-l/2}px`}}}export{L as CARD_GRID_CONTAINERS,r as CONTAINER_GAP,A as CONTAINER_GAP_BUILT_IN,x as CONTAINER_GAP_LEGACY,k as CONTAINER_GAP_PHONE,V as GAP_FIELD_CONTAINER,N as GAP_LENGTH_VAR,h as GAP_OVERLAP_CLASS,S as GAP_OVERLAP_VAR,O as GAP_PHONE_LENGTH_VAR,$ as GAP_TABLET_LENGTH_VAR,g as GAP_ZONE_CLASS,s as SITE_BLOCK_GAP,R as SITE_BLOCK_GAP_ON_PHONE_VAR,T as SITE_BLOCK_GAP_PHONE_CLASS,I as SITE_BLOCK_GAP_PHONE_EDGE_CLASS,P as SITE_BLOCK_GAP_PHONE_REM_VAR,E as SITE_BLOCK_GAP_PHONE_VAR,G as SITE_BLOCK_GAP_REM_VAR,a as SITE_BLOCK_GAP_VAR,M as containerGapProps,d as followsSitePhoneGap,B as halfDesktopGap,b as hasOwnContainerGap,i as hasOwnPhoneGap,_ as normalizeSiteBlockGap,m as resolveContainerGap,D as resolvePhoneContainerGap,K as siteBlockGapPhoneClass,w as siteBlockGapPhoneTokens,F as siteBlockGapTokens};
@@ -1,15 +1,13 @@
1
+ import type { SiteThemeRow } from "../site-theme-row.js";
1
2
  import { VIEW_ABOVE, type LengthGrid, type LengthKind, type LengthRow, type LengthUnit } from "efficient-easel/screen/lib/content/length-units";
2
3
  type ViewTier = keyof typeof VIEW_ABOVE;
3
4
  export declare function cssLengthOf(value: number, unit: unknown): string;
4
5
  export declare function storedUnit(stored: unknown, base?: LengthUnit): LengthUnit;
5
6
  export declare function ownRowUnit(props: Readonly<Record<string, unknown>>, row: LengthRow, view: ViewTier): LengthUnit;
6
7
  export declare function rowUnitKeys(row: LengthRow, views?: readonly ViewTier[]): readonly string[];
7
- export declare function siteLengthHeld(v: unknown, unit: unknown, kind: LengthKind, pxGrid: LengthGrid, { floor }?: {
8
- floor?: boolean;
9
- }): number | null;
10
- export declare function siteLengthCss(v: unknown, unit: unknown, kind: LengthKind, pxGrid: LengthGrid, options?: {
11
- floor?: boolean;
12
- }): string | null;
8
+ export declare function siteLengthTrack(kind: LengthKind, unit: LengthUnit, pxGrid: LengthGrid): LengthGrid;
9
+ export declare function siteLengthHeld(v: unknown, unit: unknown, kind: LengthKind, pxGrid: LengthGrid): number | null;
10
+ export declare function siteLengthCss(v: unknown, unit: unknown, kind: LengthKind, pxGrid: LengthGrid): string | null;
13
11
  export type SiteLengthUnits = Readonly<{
14
12
  cornerRadiusUnit?: unknown;
15
13
  siteWidthUnit?: unknown;
@@ -18,6 +16,7 @@ export type SiteLengthUnits = Readonly<{
18
16
  blockGapUnit?: unknown;
19
17
  blockGapPhoneUnit?: unknown;
20
18
  }>;
19
+ export declare const SITE_LENGTH_UNIT_COLUMNS: Readonly<Record<keyof SiteLengthUnits, keyof SiteThemeRow>>;
21
20
  export declare function siteLengthUnitsOfRow(row: object): SiteLengthUnits;
22
21
  export declare function siteLengthNumber<T>(v: unknown, unit: unknown, px: (v?: number | null) => T): number | T;
23
22
  export {};
@@ -1 +1 @@
1
- import{viewKeyAt as f}from"efficient-easel/screen/lib/content/view-tiers";import{finiteNumber as l}from"../finite-number.js";import{VIEW_ABOVE as o,isLengthUnit as c,lengthOf as _,rowGrid as d}from"efficient-easel/screen/lib/content/length-units";const a=(()=>{const e=Object.keys(o),t=e.filter(n=>o[n]===null);for(let n=e.find(i=>o[i]===t[0]);n&&!t.includes(n);n=e.find(i=>o[i]===t[t.length-1]))t.push(n);return t})();function m(e,t){const n=_(e,p(t));return typeof n=="number"?`${n}px`:n}function p(e,t="px"){return c(e)?e:t}function L(e,t,n){return t.unitKey?p(e[f(t.unitKey,n)],t.base??"px"):t.base??"px"}function O(e,t=a){return e.unitKey?t.map(n=>f(e.unitKey,n)):[]}function x(e,t,n,i,{floor:u=!1}={}){const r=l(e);if(!c(t)||t==="px"||r===void 0)return null;const s=d({kind:n},t,i),h=Math.min(s.max,Math.max(u?s.step:s.min,r));return Math.round(h*100)/100}function E(e,t,n,i,u){const r=x(e,t,n,i,u);return r===null?null:m(r,t)}const b={cornerRadiusUnit:"corner_radius_unit",siteWidthUnit:"site_width_unit",siteGutterUnit:"site_gutter_unit",siteGutterPhoneUnit:"site_gutter_phone_unit",blockGapUnit:"block_gap_unit",blockGapPhoneUnit:"block_gap_phone_unit"};function k(e){const t=e;return Object.fromEntries(Object.entries(b).map(([n,i])=>[n,p(t[i])]))}function G(e,t,n){const i=l(e);return c(t)&&t!=="px"&&i!==void 0?i:n(i??null)}export{m as cssLengthOf,L as ownRowUnit,O as rowUnitKeys,E as siteLengthCss,x as siteLengthHeld,G as siteLengthNumber,k as siteLengthUnitsOfRow,p as storedUnit};
1
+ import{viewKeyAt as p}from"efficient-easel/screen/lib/content/view-tiers";import{finiteNumber as f}from"../finite-number.js";import{VIEW_ABOVE as o,isLengthUnit as u,lengthOf as h,rowGrid as m}from"efficient-easel/screen/lib/content/length-units";const x=(()=>{const e=Object.keys(o),t=e.filter(n=>o[n]===null);for(let n=e.find(i=>o[i]===t[0]);n&&!t.includes(n);n=e.find(i=>o[i]===t[t.length-1]))t.push(n);return t})();function _(e,t){const n=h(e,s(t));return typeof n=="number"?`${n}px`:n}function s(e,t="px"){return u(e)?e:t}function k(e,t,n){return t.unitKey?s(e[p(t.unitKey,n)],t.base??"px"):t.base??"px"}function y(e,t=x){return e.unitKey?t.map(n=>p(e.unitKey,n)):[]}function a(e,t,n){const i=m({kind:e},t,n);return t!=="px"&&n.min>0?{...i,min:i.step}:i}function d(e,t,n,i){const r=f(e);if(!u(t)||t==="px"||r===void 0)return null;const c=a(n,t,i),l=Math.min(c.max,Math.max(c.min,r));return Math.round(l*100)/100}function O(e,t,n,i){const r=d(e,t,n,i);return r===null?null:_(r,t)}const g={cornerRadiusUnit:"corner_radius_unit",siteWidthUnit:"site_width_unit",siteGutterUnit:"site_gutter_unit",siteGutterPhoneUnit:"site_gutter_phone_unit",blockGapUnit:"block_gap_unit",blockGapPhoneUnit:"block_gap_phone_unit"};function E(e){const t=e;return Object.fromEntries(Object.entries(g).map(([n,i])=>[n,s(t[i])]))}function K(e,t,n){const i=f(e);return u(t)&&t!=="px"&&i!==void 0?i:n(i??null)}export{g as SITE_LENGTH_UNIT_COLUMNS,_ as cssLengthOf,k as ownRowUnit,y as rowUnitKeys,O as siteLengthCss,d as siteLengthHeld,K as siteLengthNumber,a as siteLengthTrack,E as siteLengthUnitsOfRow,s as storedUnit};