efficient-web-builder 47.2.0 → 48.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/dist/editor/components/HeroPartPanel.js +1 -1
- package/dist/editor/components/HoverEffectField.d.ts +1 -0
- package/dist/editor/components/HoverEffectField.js +1 -1
- package/dist/editor/components/MediaUploadField.d.ts +9 -0
- package/dist/editor/components/MediaUploadField.js +1 -1
- package/dist/editor/components/PartSettingsPanel.d.ts +2 -1
- package/dist/editor/components/PartSettingsPanel.js +1 -1
- package/dist/editor/components/PreviewPartAnchors.d.ts +3 -1
- package/dist/editor/components/PreviewPartAnchors.js +1 -1
- package/dist/editor/components/SameInEveryViewNote.d.ts +1 -0
- package/dist/editor/components/SameInEveryViewNote.js +1 -0
- package/dist/editor/components/SaveAsTemplateButton.d.ts +5 -0
- package/dist/editor/components/SaveAsTemplateButton.js +1 -0
- package/dist/editor/components/SiteFields.d.ts +4 -1
- package/dist/editor/components/SiteFields.js +1 -1
- package/dist/editor/components/SiteRestoreNotice.js +1 -1
- package/dist/editor/components/SiteTextStylesField.js +1 -1
- package/dist/editor/components/TickerSettingsPanel.js +1 -1
- package/dist/editor/components/VersionHistoryDrawer.js +1 -1
- package/dist/editor/components/WebsitePreviewButton.d.ts +2 -1
- package/dist/editor/components/WebsitePreviewButton.js +1 -1
- package/dist/editor/components/WebsiteScreenParts.js +1 -1
- package/dist/editor/components/usePartMotion.d.ts +10 -0
- package/dist/editor/components/usePartMotion.js +1 -0
- package/dist/editor/components/useSocialSettings.d.ts +2 -2
- package/dist/editor/lib/animation/AnimationDurationRow.js +1 -1
- package/dist/editor/lib/animation/fields.d.ts +1 -1
- package/dist/editor/lib/animation/fields.js +1 -1
- package/dist/editor/lib/animation/hover-fields.d.ts +1 -0
- package/dist/editor/lib/animation/hover-fields.js +1 -0
- package/dist/editor/lib/document/add-target.d.ts +2 -1
- package/dist/editor/lib/document/add-target.js +1 -1
- package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Divider/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroGroup/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
- package/dist/editor/lib/document/build-config.js +1 -1
- package/dist/editor/lib/document/card-display-chips.js +1 -1
- package/dist/editor/lib/document/controls.d.ts +7 -3
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/field-groups.js +1 -1
- package/dist/editor/lib/document/geocode-resolve.d.ts +1 -0
- package/dist/editor/lib/document/geocode-resolve.js +1 -1
- package/dist/editor/lib/document/part-motion-canvas.d.ts +10 -0
- package/dist/editor/lib/document/part-motion-canvas.js +2 -0
- package/dist/format/lib/animation/hover.d.ts +5 -0
- package/dist/format/lib/animation/hover.js +1 -0
- package/dist/format/lib/content/box-layout.d.ts +8 -0
- package/dist/format/lib/content/box-layout.js +1 -1
- package/dist/format/lib/content/box-separator.js +1 -1
- package/dist/format/lib/content/card-template.d.ts +8 -0
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/container-gap.d.ts +2 -1
- package/dist/format/lib/content/container-gap.js +1 -1
- package/dist/format/lib/document/easel-row-words.d.ts +1 -0
- package/dist/format/lib/document/easel-row-words.js +1 -1
- package/dist/format/lib/document/panel-tabs.d.ts +8 -0
- package/dist/format/lib/document/panel-tabs.js +1 -0
- package/dist/format/lib/document/part-records.d.ts +6 -0
- package/dist/format/lib/document/part-records.js +1 -0
- package/dist/format/lib/document/passes/registry-context.d.ts +1 -1
- package/dist/format/lib/document/passes/registry-context.js +1 -1
- package/dist/format/lib/document/passes/types.d.ts +2 -0
- package/dist/format/lib/document/section-groups.d.ts +1 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +6 -0
- package/dist/format/lib/editor-words-catalogue.js +3 -3
- package/dist/format/lib/hero-ticker.d.ts +1 -0
- package/dist/format/lib/hero-ticker.js +1 -1
- package/dist/format/lib/sections/strip-shape.js +1 -1
- package/dist/render/components/CardRowContext.d.ts +3 -1
- package/dist/render/components/CardRowContext.js +1 -1
- package/dist/render/components/Flex.d.ts +3 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/Grid.d.ts +2 -1
- package/dist/render/components/Grid.js +1 -1
- package/dist/render/components/HeroGroup.d.ts +2 -1
- package/dist/render/components/HeroGroup.js +1 -1
- package/dist/render/components/HeroSection.d.ts +2 -1
- package/dist/render/components/HeroSection.js +1 -1
- package/dist/render/components/HeroSingle.d.ts +2 -1
- package/dist/render/components/HeroSingle.js +1 -1
- package/dist/render/components/PartStyledKind.js +1 -1
- package/dist/render/components/PartStyledText.js +1 -1
- package/dist/render/components/PublishedPartStylesContext.d.ts +4 -1
- package/dist/render/components/PublishedPartStylesContext.js +1 -1
- package/dist/render/components/SectionAnimation.d.ts +8 -2
- package/dist/render/components/SectionAnimation.js +1 -1
- package/dist/render/lib/animation/part-motion.d.ts +21 -0
- package/dist/render/lib/animation/part-motion.js +1 -0
- package/dist/render/lib/content/button-look.js +1 -1
- package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Grid/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Hero/render.js +1 -1
- package/dist/render/lib/document/blocks/general/HeroGroup/render.js +1 -1
- package/dist/render/lib/document/blocks/general/HeroSingle/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +3 -0
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-pageheader.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-pageheader.js +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
- package/dist/render/lib/document/hero-media-parts.d.ts +2 -2
- package/dist/render/lib/document/part-styles.d.ts +10 -1
- package/dist/render/lib/document/part-styles.js +2 -2
- package/dist/render/lib/document/passes/clickable-parts.js +1 -1
- package/dist/render/lib/document/passes/section-padding.js +1 -1
- package/dist/render/lib/text-styles/site-text-styles.d.ts +16 -4
- package/dist/render/lib/text-styles/site-text-styles.js +2 -2
- package/package.json +3 -3
- package/dist/editor/lib/document/selected-host.d.ts +0 -2
- package/dist/editor/lib/document/selected-host.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{blockOfferOf as
|
|
1
|
+
import{cardTemplateBlocks as i,cardTemplateOwner as f,cardTemplatesNameBlocks as u}from"../../../format/lib/content/card-template.js";import{blockOfferOf as p}from"./block-offer.js";import{containerBlocksFor as h}from"../../../format/lib/document/container-blocks.js";import{blockChoicesFor as m,FOOTER_BLOCKS_SLOT as a}from"./footer-blocks.js";import{SLOT_SECTION_SPECS as d}from"../../../render/lib/document/slot-specs.js";function _(o,n=0,c){const e=T(y(o,n),c),r=e?p():null;return e&&r?O(e,r):e}function O(o,n){if(o.spec)return n.offers(o.spec.childType)?o:null;const c=o.choices??[],e=c.filter(r=>n.offers(r.type));return e.length===c.length?o:e.length>0?{...o,choices:e}:null}function T(o,n){if(!o||o.source!=="container"||!n||!u())return o;const c=f({data:n.data},n.id),e=typeof c?.type=="string"?i(c.type):[],r=o.choices??[],s=e.filter(t=>!r.some(l=>l.type===t.type));return s.length?{...o,choices:[...r,...s.map(t=>({type:t.type,label:t.label}))]}:o}function y(o,n){const c=d[o];if(c)return{source:"section",slot:c.slot,choices:null,spec:c};const e=h(o,n);if(e)return{source:"container",slot:e.slot,choices:e.choices,spec:null};const r=m(o);return r?{source:"footer",slot:a,choices:r,spec:null}:null}export{_ as canAddTo};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as B}from"react/jsx-runtime";import{ButtonIcon as C,ButtonIconIcon as S,IconAfterTextIcon as T,IconBeforeTextIcon as w}from"efficient-easel/icons";import{SettingsField as k}from"efficient-easel/panel";import{useSelectedFields as m}from"efficient-easel/easel";import{buttonFieldSet as F}from"efficient-easel/screen/lib/document/button-fields";import{IconPicker as v,Segmented as O}from"efficient-shell/ui";import{shellGlyphOf as P}from"../../../shell-glyph.js";import{StorefrontTextLinkField as _}from"../../../../../components/StorefrontLinkField.js";import{usePreviewHeader as a}from"../../../../../../render/components/PreviewHeaderContext.js";import{BUTTON_ICONS as N,buttonIconChoice as R,buttonIconSide as j,buttonWidth as L}from"../../../../../../format/lib/content/button-icon.js";import{BUTTON_PAD_BUILT_IN as W,buttonLook as u}from"../../../../../../render/lib/content/button-look.js";import{nonEmptyString as z}from"../../../../../../format/lib/non-empty-string.js";import{selectedThemeColors as A,siteButtonPaint as d,siteButtonRadiusPx as E}from"../../../../../../format/lib/theme.js";import{say as r}from"../../../../../../format/lib/editor-words.js";import{backTo as D,buttonWordsEntryField as U,inOwnBox as G,linkField as H,plainText as K,useSelectedSibling as f}from"../../../controls.js";import{useThemePresets as V}from"../../../ColourControl.js";import{keptByRow as c}from"efficient-easel/screen/lib/document/style-fields";import{group as p}from"efficient-easel/screen/lib/document/box-fields";import{rowSay as q}from"../../../box-fields.js";import{CARD_ROW_FACTS as J,cardRowField as h,cardRowFields as M}from"../../../card-row-fields.js";import{consentWordsKept as Q,withConsentWordsRow as X}from"../../../consent-words-field.js";const b=o=>P(o==="none"?"no-symbol":o),Y=N.map(o=>({value:o,icon:b(o)}));function Z({value:o,onChange:n}){const t=m(),i=t.values.href,s=typeof o=="string"?o:o&&typeof o=="object"&&"text"in o?String(o.text??""):"";return e(_,{label:"Button",icon:e(C,{size:18}),text:s,onTextChange:n,link:typeof i=="string"?i:"",onLinkChange:l=>t.onChange("href",l)})}function $({value:o,onChange:n}){const t=m(),i=R(o,t.values.arrow),s=j(t.values.iconPosition),l=L(t.values.widthFit)==="fill",I=b("icon-at-end");return e(k,{label:r("Icon"),icon:e(S,{size:18}),children:B("div",{className:"flex items-center gap-2",children:[e(v,{label:r("Icon"),value:i,emptyValue:"none",options:Y,onChange:n}),i!=="none"&&e(O,{size:"sm",block:!0,label:r("Icon position"),value:s==="end"&&!l?"after":s,onChange:g=>t.onChange("iconPosition",g),options:[{value:"before",icon:e(w,{size:16}),label:e("span",{className:"sr-only",children:r("Icon before text")}),title:r("Icon before text")},{value:"after",icon:e(T,{size:16}),label:e("span",{className:"sr-only",children:r("Icon after text")}),title:r("Icon after text")},...l?[{value:"end",icon:I,label:e("span",{className:"sr-only",children:r("Icon at the far end")}),title:r("Icon at the far end")}]:[]]})]})})}const x=()=>d(a().theme),y=F({follows:{useFill:()=>x().fill,useText:()=>x().ink,useBorder:()=>{const[o]=f("variant"),[n]=f("buttonColor"),{theme:t}=a(),i=u({variant:o,buttonColor:n}).border.width,s=z(n)??(o==="ghost"?A(t).text:d(t).fill);return{width:i,color:s}},useCorners:()=>E(a().cornerRadiusPx),useFillOpacity:()=>u({variant:f("variant")[0]}).fillOpacity},usePresets:V,resetTo:o=>D(o,r("Styles")),padding:{fallback:W},say:q});function oo(o,n){const t=Object.keys(o);return Object.fromEntries(t.slice(0,t.indexOf(n)+1).map(i=>[i,o[i]]))}const So={fields:{label:G(K("Button"),o=>e(Z,{value:o.value,onChange:o.onChange})),labelText:U("label"),href:{...H("Button link"),...c("label")},consentWords:Q("label"),_gButton:p("Button"),rowField:h("Shows","text"),rowLinkField:h("Link from","link"),...oo(y,"_dDesign"),_gStyle:p("Style"),variant:c("buttonColor"),icon:{type:"custom",render:o=>e($,{value:o.value,onChange:o.onChange})},iconPosition:c("icon"),arrow:c("icon"),...y},resolveFields:(o,n)=>X(M(n.fields,o,n),o.props,"label",["href"]),showWhenFacts:J};export{So as ButtonBlockFields};
|
|
1
|
+
import{jsx as e,jsxs as B}from"react/jsx-runtime";import{ButtonIcon as C,ButtonIconIcon as S,IconAfterTextIcon as T,IconBeforeTextIcon as w}from"efficient-easel/icons";import{SettingsField as k}from"efficient-easel/panel";import{useSelectedFields as m}from"efficient-easel/easel";import{buttonFieldSet as F}from"efficient-easel/screen/lib/document/button-fields";import{IconPicker as v,Segmented as O}from"efficient-shell/ui";import{shellGlyphOf as P}from"../../../shell-glyph.js";import{StorefrontTextLinkField as _}from"../../../../../components/StorefrontLinkField.js";import{usePreviewHeader as a}from"../../../../../../render/components/PreviewHeaderContext.js";import{BUTTON_ICONS as N,buttonIconChoice as R,buttonIconSide as j,buttonWidth as L}from"../../../../../../format/lib/content/button-icon.js";import{BUTTON_PAD_BUILT_IN as W,buttonLook as u}from"../../../../../../render/lib/content/button-look.js";import{nonEmptyString as z}from"../../../../../../format/lib/non-empty-string.js";import{selectedThemeColors as A,siteButtonPaint as d,siteButtonRadiusPx as E}from"../../../../../../format/lib/theme.js";import{say as r}from"../../../../../../format/lib/editor-words.js";import{backTo as D,buttonWordsEntryField as U,inOwnBox as G,linkField as H,plainText as K,useSelectedSibling as f}from"../../../controls.js";import{useThemePresets as V}from"../../../ColourControl.js";import{keptByRow as c}from"efficient-easel/screen/lib/document/style-fields";import{group as p}from"efficient-easel/screen/lib/document/box-fields";import{rowSay as q}from"../../../box-fields.js";import{CARD_ROW_FACTS as J,cardRowField as h,cardRowFields as M}from"../../../card-row-fields.js";import{consentWordsKept as Q,withConsentWordsRow as X}from"../../../consent-words-field.js";const b=o=>P(o==="none"?"no-symbol":o),Y=N.map(o=>({value:o,icon:b(o)}));function Z({value:o,onChange:n}){const t=m(),i=t.values.href,s=typeof o=="string"?o:o&&typeof o=="object"&&"text"in o?String(o.text??""):"";return e(_,{label:"Button",icon:e(C,{size:18}),text:s,onTextChange:n,link:typeof i=="string"?i:"",onLinkChange:l=>t.onChange("href",l)})}function $({value:o,onChange:n}){const t=m(),i=R(o,t.values.arrow),s=j(t.values.iconPosition),l=L(t.values.widthFit)==="fill",I=b("icon-at-end");return e(k,{label:r("Icon"),icon:e(S,{size:18}),children:B("div",{className:"flex items-center gap-2",children:[e(v,{label:r("Icon"),value:i,emptyValue:"none",options:Y,onChange:n}),i!=="none"&&e(O,{size:"sm",block:!0,label:r("Icon position"),value:s==="end"&&!l?"after":s,onChange:g=>t.onChange("iconPosition",g),options:[{value:"before",icon:e(w,{size:16}),label:e("span",{className:"sr-only",children:r("Icon before text")}),title:r("Icon before text")},{value:"after",icon:e(T,{size:16}),label:e("span",{className:"sr-only",children:r("Icon after text")}),title:r("Icon after text")},...l?[{value:"end",icon:I,label:e("span",{className:"sr-only",children:r("Icon at the far end")}),title:r("Icon at the far end")}]:[]]})]})})}const x=()=>d(a().theme),y=F({follows:{useFill:()=>x().fill,useText:()=>x().ink,useBorder:()=>{const[o]=f("variant"),[n]=f("buttonColor"),{theme:t}=a(),i=u({variant:o,buttonColor:n}).border.width,s=z(n)??(o==="ghost"?A(t).text:d(t).fill);return{width:i,color:s}},useCorners:()=>E(a().cornerRadiusPx),useFillOpacity:()=>u({variant:f("variant")[0]}).fillOpacity},usePresets:V,resetTo:o=>D(o,r("Styles")),padding:{fallback:W,tablet:!0},say:q});function oo(o,n){const t=Object.keys(o);return Object.fromEntries(t.slice(0,t.indexOf(n)+1).map(i=>[i,o[i]]))}const So={fields:{label:G(K("Button"),o=>e(Z,{value:o.value,onChange:o.onChange})),labelText:U("label"),href:{...H("Button link"),...c("label")},consentWords:Q("label"),_gButton:p("Button"),rowField:h("Shows","text"),rowLinkField:h("Link from","link"),...oo(y,"_dDesign"),_gStyle:p("Style"),variant:c("buttonColor"),icon:{type:"custom",render:o=>e($,{value:o.value,onChange:o.onChange})},iconPosition:c("icon"),arrow:c("icon"),...y},resolveFields:(o,n)=>X(M(n.fields,o,n),o.props,"label",["href"]),showWhenFacts:J};export{So as ButtonBlockFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{EyeOffIcon as r,StylesIcon as d,WeightIcon as p,WidthIcon as c}from"efficient-easel/icons";import{deviceField as m}from"efficient-easel/screen/lib/document/device-fields";import{swapPadding as f,toggle as a}from"../../../controls.js";import{keptByRow as g}from"efficient-easel/screen/lib/document/style-fields";import{select as I,sidesPaddingFields as D,slider as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{EyeOffIcon as r,StylesIcon as d,WeightIcon as p,WidthIcon as c}from"efficient-easel/icons";import{deviceField as m}from"efficient-easel/screen/lib/document/device-fields";import{swapPadding as f,toggle as a}from"../../../controls.js";import{keptByRow as g}from"efficient-easel/screen/lib/document/style-fields";import{select as I,sidesPaddingFields as D,slider as t}from"../../../box-fields.js";import{DEFAULT_DIVIDER_STYLE as o,DIVIDER_SPACE_PX as E,DIVIDER_STYLE_OPTIONS as _,parseDividerSpacing as h}from"../../../../../../format/lib/sections/divider-style.js";import{withRowRules as y}from"../../../../../../render/lib/document/show-when.js";const S={any:[{field:"style",set:!1},{field:"style",is:o}]},P={not:{field:"style",is:"none"}},v={fields:y({style:I("Style",e(d,{}),_,o),spacing:g("sectionPaddingTop"),thickness:t("Thickness",e(p,{}),1,8,1,1,"px"),lengthPct:t("Length",e(c,{}),10,100,1,100,"%"),hideOnMobile:m("mobile",a("Hide",!1,e(r,{})))},[[["thickness"],S],[["lengthPct"],P]]),resolveFields:(s,{fields:n})=>{const i=E[h(s.props.spacing)],l=D({fallback:{top:i,bottom:i},tablet:!0});return f(n,l)}};export{v as DividerFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{phoneKey as n}from"efficient-easel/draw";import{BOX_CARD_PAD as
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{phoneKey as n,tabletKey as m}from"efficient-easel/draw";import{BOX_CARD_PAD as r,BOX_DARKEN as a,BOX_DARKEN_STYLES as h,isBackgroundBox as R}from"../../../../../../format/lib/content/box-background.js";import{BOX_TAB_SHAPES as y,REEL_SHAPE_LABELS as E}from"../../../../../../format/lib/reel.js";import{deviceField as s}from"efficient-easel/screen/lib/document/device-fields";import{ClockIcon as T,CropIcon as g,LineBetweenIcon as N,LineSolidIcon as C,OpacityIcon as P,ShadowIcon as H,StylesIcon as f,TargetIcon as D}from"efficient-easel/icons";import{boxBlockSpacingField as X,boxFillField as M,boxColumnsFields as W,boxShareField as j,boxSharePhoneField as v,containerDirectionField as K,containerGapRows as U,linkField as G,plainText as z,swapPadding as S,toggle as p,upload as _,withPanelOnly as J}from"../../../controls.js";import{BOX_SHAPE_OPTIONS as u,boxShapeOf as V}from"../../../../../../format/lib/content/box-shape.js";import{BOX_COLUMNS_MAX as Y,BOX_COLUMNS_MIN as q,boxPhoneRowOneLine as Q}from"../../../../../../format/lib/content/box-layout.js";import{BOX_SEPARATOR_POINTS as b}from"../../../../../../format/lib/content/box-separator.js";import{group as i,phoneTwinFields as O}from"efficient-easel/screen/lib/document/box-fields";import{boxAlignField as Z,boxJustifyField as $,boxWrapField as x,placementField as ee,select as d,sidesPaddingFields as k,slider as oe}from"../../../box-fields.js";import{withRowRules as te}from"../../../../../../render/lib/document/show-when.js";import{separatorField as ne}from"../../../separator-field.js";import{LOOP_SCROLLS as ie}from"../../../../../../format/lib/animation/index.js";import{FlexSlots as ae}from"../../../../../../format/lib/document/blocks/general/Flex/meta.js";import{CARD_BOX_FACTS as le,cardDisplayField as re}from"../../../card-display-chips.js";const se={field:"bgImage",set:!0},A={field:"phoneRow",in:[2,3]},pe={field:"direction",is:"tabs"},de={field:"line",in:[!0,!1]},ce={field:"anchor",set:!0},w=["fixed","screen"],me={not:{any:[{field:"sectionHeightMode",in:w},{field:"sectionHeightModePhone",in:w}]}},he={context:"parent.line",is:!0},c={field:"direction",is:"row",default:"row"},l={not:ie},F={all:[c,l,{not:{field:"separator",in:b.map(e=>e.value)}},{not:{field:"line",is:!0}}]},ge={all:[l,{not:{all:[c,{field:"separator",in:b.map(e=>e.value)}]}}]},I={not:{all:[F,{field:"columns",in:Array.from({length:Y},(e,t)=>t+q)}]}};function fe(e){return{...e,render:t=>e.render({...t,value:Q(t.value)?"nowrap":"wrap"})}}const Ce={fields:te({_gContent:i("Content"),content:ae.content,_gCardDisplay:i("Display"),cardDisplay:re(),_gLayout:i("Layout"),direction:K("Flex"),tabShape:d("Tab shape",o(f,{}),y.map(e=>({label:E[e],value:e})),"tabs"),label:J(z("Tab name")),...U("Flex"),justify:$(),align:Z(),...O("wrap",x(),void 0,{phoneRow:fe(x())}),boxShape:s("desktop",d("Box shape",o(g,{}),[...u],"auto")),[n("boxShape")]:O("boxShape",d("Box shape",o(g,{}),[...u],"auto",{phoneRest:e=>V(e)}))[n("boxShape")],separator:ne(o(N,{size:18}),"none"),share:s("desktop",j()),[n("share")]:v(),...W(),blockSpacing:X(),line:p("Line",!1,o(C,{}),"A line across the blocks, with a dot on each."),upcoming:p("Upcoming",!1,o(T,{}),"Still to come: a hollow dot, and the gold line stops before it."),_gShadow:i("Shadow"),shadow:p("Shadow",!1,o(H,{})),fillColor:M(),_gBackground:i("Background image"),bgImage:s("desktop",_("Image","image/*")),bgImagePhone:s("mobile",_("Image","image/*")),darken:oe("Darken",o(P,{}),a.min,a.max,a.step,a.fallback,a.unit),darkenStyle:d("Darken style",o(f,{}),h,h[0].value),placement:ee("Content position"),_gLink:i("Link"),link:G("Link to"),jumpHighlight:p("Highlight when a link jumps here",!1,o(D,{}),"When a link lands on this Box's anchor, the Box gets an accent outline and its first block turns accent.")},[[["darken","darkenStyle","placement"],se],[[n("share")],A],[[n("wrap")],{all:[A,l]}],[["tabShape"],pe],[["separator"],c],[["columns",m("columns")],F],[[m("gap")],ge],[["justify"],l],[["wrap"],{all:[l,I]}],[["share"],I],[["line"],de],[["upcoming"],he],[["jumpHighlight"],ce],[["boxShape",n("boxShape")],me]]),resolveFields:(e,{fields:t})=>{const L=e.props;if(R(L.bgImage)){const B=k({fallback:{top:r.desktop,bottom:r.desktop,left:r.side,right:r.side},tablet:!0});return S(t,B)}return e.props.padV2!==!0?S(t,k({fallback:{top:24,bottom:24},tablet:!0})):t},showWhenFacts:le};export{Ce as FlexFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import{HERO_GROUP_NUDGE_LIMIT as n,HERO_GROUP_WIDTH_DEFAULT as u,HERO_GROUP_WIDTH_MAX as p,HERO_GROUP_WIDTH_MIN as
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{HERO_GROUP_NUDGE_LIMIT as n,HERO_GROUP_WIDTH_DEFAULT as u,HERO_GROUP_WIDTH_MAX as p,HERO_GROUP_WIDTH_MIN as l,HERO_GROUP_WIDTH_NESTED_DEFAULT as _,heroGroupNestDepth as f}from"../../../../../../format/lib/hero-group-placement.js";import{WidthIcon as m}from"efficient-easel/icons";import{containerDirectionField as c,containerGapRows as h,heroGroupPlacementPoints as G,plainText as H,withIdentifier as g,withOffPage as R,withPanelOnly as x}from"../../../controls.js";import{group as o}from"efficient-easel/screen/lib/document/box-fields";import{boxAlignField as F,boxJustifyField as O,boxWrapField as P,placementField as D,positionFields as E,sidesPaddingFields as w,slider as s}from"../../../box-fields.js";import{PH as I}from"../../../../../../format/lib/document/blocks/placeholders.js";import{withRowRules as T}from"../../../../../../render/lib/document/show-when.js";import{HeroGroupSlots as y}from"../../../../../../format/lib/document/blocks/general/HeroGroup/meta.js";const S={fields:T({_gContent:o("Content"),name:x(g(R(H("Box name",I.boxName)))),content:y.content,_gLayout:o("Layout"),placement:D("Placement",{pointsFor:G}),width:s("Width",r(m,{}),l,p,5,u,"%"),direction:c("HeroGroup"),...h("HeroGroup"),justify:O(),align:F(),wrap:P(),_gNudge:o("Nudge"),...E({keys:{x:"nudgeX",y:"nudgeY"},min:-n,max:n,label:null}),...w({tablet:!0})},[[["placement"],{context:"heroGroupDepth",is:0}]]),resolveFields:(e,{fields:t,appState:d})=>{const a=typeof e.props.id=="string"?e.props.id:"";if(f(d?.data,a)===0)return t;const i={...t};return i.width=s("Width",r(m,{}),l,p,5,_,"%"),i}};export{S as HeroGroupFields};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const assembleGeneralBlocks: () => Record<"Grid" | "
|
|
2
|
-
export declare const generalBlocks: Record<"Grid" | "
|
|
1
|
+
export declare const assembleGeneralBlocks: () => Record<"Grid" | "HeroGroup" | "HeroSlide" | "Text" | "Hero" | "HeroSingle" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "PaymentBadges" | "Footprint" | "Prose" | "ParagraphsA" | "Cards" | "Stats" | "StatsParagraph" | "Chart" | "Mockup" | "Testimonials" | "Logos" | "Banner" | "TitleWithButtons" | "Countdown" | "Masthead" | "FeaturedCover" | "LongRead" | "Series" | "Breadcrumb" | "CategoryBar" | "DocTabs" | "DocMasthead" | "DocBody" | "DocMetaCards" | "FAQ" | "ContactLocations" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Manifesto" | "Split" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Spacer" | "KeyFeatures" | "Heading" | "Eyebrow" | "ImageBlock" | "LogoBlock" | "LocationMap" | "ButtonBlock" | "PostCard" | "Integrations", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
|
|
2
|
+
export declare const generalBlocks: Record<"Grid" | "HeroGroup" | "HeroSlide" | "Text" | "Hero" | "HeroSingle" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "PaymentBadges" | "Footprint" | "Prose" | "ParagraphsA" | "Cards" | "Stats" | "StatsParagraph" | "Chart" | "Mockup" | "Testimonials" | "Logos" | "Banner" | "TitleWithButtons" | "Countdown" | "Masthead" | "FeaturedCover" | "LongRead" | "Series" | "Breadcrumb" | "CategoryBar" | "DocTabs" | "DocMasthead" | "DocBody" | "DocMetaCards" | "FAQ" | "ContactLocations" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Manifesto" | "Split" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Spacer" | "KeyFeatures" | "Heading" | "Eyebrow" | "ImageBlock" | "LogoBlock" | "LocationMap" | "ButtonBlock" | "PostCard" | "Integrations", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{resolveBlockOffer as
|
|
1
|
+
import{cardTemplateBlocks as w,hasCardTemplate as j,isCardTemplateBlock as O}from"../../../format/lib/content/card-template.js";import{resolveBlockOffer as $}from"./block-offer.js";import{applyBlockPasses as B,registryPassContext as C}from"../../../render/lib/document/passes/index.js";import{PASS_INSPECTOR as F}from"./passes/inspector.js";function k(n,a,c){if(!n)return n;let l=!1;const d={};for(const[s,e]of Object.entries(n)){let o=e;if(e&&typeof e=="object")if(e.type==="slot")if(e.allow){const r=e.allow.filter(a);r.length!==e.allow.length&&(o={...e,allow:r})}else{const r=new Set(e.disallow??[]),p=c.filter(m=>!r.has(m));p.length>0&&(o={...e,disallow:[...e.disallow??[],...p]})}else{const r=k(e.arrayFields,a,c),p=k(e.objectFields,a,c);(r!==e.arrayFields||p!==e.objectFields)&&(o={...e,...r?{arrayFields:r}:null,...p?{objectFields:p}:null})}o!==e&&(l=!0),d[s]=o}return l?d:n}function S(n,a,c){const l={};for(const[o,r]of Object.entries(a.fields??{}))l[o]=r&&typeof r=="object"&&r.type==="slot"?{...r}:r;const d={...a,...a.fields?{fields:l}:null},s=B(n,d,c),e=Object.keys(l).filter(o=>s.fields?.[o]!==l[o]);if(e.length>0)throw new Error(`efficient-web-builder: blocks.host["${n}"] declares ${e.map(o=>`"${o}"`).join(", ")}, ${e.length===1?"a name":"names"} the editor gives every section a setting under. Give the block's own field another name.`);return s}function v(n,a,c){const l=new Set([...Object.keys(n.components??{}),...a]),d=[...Object.entries(n.categories??{}).map(([s,e])=>({key:s,components:e?.components??[]})),...c];for(const s of d){const e=s.components.filter(O);if(e.length>0)throw new Error(`efficient-web-builder: the category "${s.key}" lists ${e.map(o=>`"${o}"`).join(", ")}, a block a card template declares. A card's block is added in its card only; take it out of the category.`)}for(const s of l){if(!j(s))continue;const e=w(s).filter(o=>!l.has(o.type)).map(o=>`"${o.type}"`);if(e.length>0)throw new Error(`efficient-web-builder: the card template of "${s}" declares ${e.join(", ")}, which the editor does not register. Register it in the registry or in blocks.host.`)}}function A(n,a){const c=Object.entries(a?.host??{}),l=a?.categories??[],d=$(a);if(v(n,c.map(([t])=>t),l),!d&&c.length===0&&l.length===0)return n;const s=n.components,e=c.map(([t])=>t).filter(t=>t in s);if(e.length>0)throw new Error(`efficient-web-builder: blocks.host registers ${e.map(t=>`"${t}"`).join(", ")}, which ${e.length===1?"is already a block":"are already blocks"} of the editor. Give a host's block a type of its own.`);const o=t=>d?d.offers(t):!0,r=Object.keys(s).filter(t=>!o(t)),p={};for(const[t,i]of Object.entries(s)){const h=d?k(i?.fields,o,r):i?.fields;p[t]=h===i?.fields?i:{...i,fields:h}}if(c.length>0){const t=new Set(c.map(([y])=>y)),i=n.categories?.structure?.components??[],g={...C(Object.keys(s),i,t),isHostBlock:y=>t.has(y),inspector:F};for(const[y,f]of c){const b=S(y,f,g),u=k(b.fields,o,r);p[y]=u===b.fields?b:{...b,fields:u}}}const m=[];for(const[t,i]of Object.entries(n.categories??{})){const h=i?.components??[],g=h.filter(o);g.length===h.length?m.push([t,i]):g.length>0&&m.push([t,{...i,components:g}])}for(const t of l){const i=t.components.filter(f=>f in p&&o(f));if(i.length===0)continue;const h=m.find(([f])=>f===t.key);if(h){const[,f]=h,b=new Set(f.components??[]);h[1]={...f,components:[...f.components??[],...i.filter(u=>!b.has(u))]};continue}const g=[t.key,{title:t.title,components:i}],y=t.before?m.findIndex(([f])=>f===t.before):-1;y===-1?m.push(g):m.splice(y,0,g)}return{...n,components:p,categories:Object.fromEntries(m)}}export{A as buildConfig};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as f}from"react/jsx-runtime";import{
|
|
1
|
+
"use client";import{jsx as f}from"react/jsx-runtime";import{isNodeList as x}from"efficient-easel/data";import{useEasel as N}from"efficient-easel/easel";import{slotChildName as O,slotChildRowName as g}from"efficient-easel/draw";import{cardTemplateCardOwner as y,cardTemplateField as h,namedRowField as D}from"../../../format/lib/content/card-template.js";import{DisplayRow as _,useSelectedPatch as S}from"./controls.js";import{websiteNodeIsLocked as T}from"./locked-blocks.js";import{stripMarkup as b}from"../../../format/lib/markup.js";import{sourceRowName as A}from"../../../format/lib/document/source-row-name.js";import{withShowWhen as E}from"../../../format/lib/document/show-when-attach.js";import{deviceField as F}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as L}from"efficient-easel/screen/lib/document/panel-no-control-mark";const C="notCardOfTemplate",M={not:{context:C,is:!0}},V={[C]:(e,n)=>{const t=y(n.appState,e.props?.id);return t===void 0?void 0:t===null}};function d(e){const n=e.props?.content;return x(n)?n:[]}const m=e=>!!e.props?._hidden;function R(e,n=()=>!1){return d(e).flatMap(t=>typeof t?.props?.id!="string"?[]:d(t).length&&!m(t)?R(t,n):n(t)?[]:[t])}function P(e,n,t){const i=R(e,t).map(r=>({child:r,name:n(r)})),s=new Set(i.map(r=>r.name)),u=new Set;return i.map(({child:r,name:p})=>{let o=p;if(u.has(p)){let a=2;for(;s.has(`${p} ${a}`);)a+=1;o=`${p} ${a}`,s.add(o)}return u.add(p),{id:r.props.id,label:o,shown:!m(r)}})}function l(e,n){return d(e).flatMap(t=>m(t)?n(t)?[]:[t,...l(t,n)]:l(t,n))}function w(e,n,t){const i=d(e);let s=!1;const u=i.map(r=>{if(s)return r;let p;if(r?.props?.id===n){if(t?!("_hidden"in r.props):m(r))return r;const{_hidden:o,...a}=r.props;p={...r,props:t?a:{...a,_hidden:!0}}}else p=w(r,n,t);return s=p!==r,p});return s?{...e,props:{...e.props,content:u}}:e}function k(e,n,t){return O(e).trim()?t(e):h(n,D(e.props))?.label??t(e)}const $="This page is read-only.";function B({card:e,ownerType:n,labelOf:t,write:i,readOnly:s}){const u=o=>g(o,t,b,void 0,A),r=o=>T(o.type,o),p=P(e,o=>k(o,n,u),r);return p.length?f(_,{parts:p,changed:p.some(o=>!o.shown),shown:o=>p.find(a=>a.id===o)?.shown??!0,disabledReason:s?$:void 0,onPress:(o,a)=>i(c=>w(c,o,a)),onReset:()=>i(o=>l(o,r).reduce((a,c)=>w(a,String(c.props.id),!0),o))}):f(L,{})}function I(){try{const e=N(s=>s),n=e.config.components??{},t=e.selectedItem;if(!t)return null;const i=y(e.appState,t.props?.id);return{labelOf:s=>n[s]?.label??s,card:t,ownerType:typeof i?.type=="string"?i.type:void 0}}catch{return null}}function j({readOnly:e}){const n=I(),t=S();return n?f(B,{...n,readOnly:e,write:i=>{e||t(s=>{const u={...n.card,props:s},r=i(u);return r===u?null:{content:r.props.content}})}}):f(_,{parts:[],changed:!1,shown:()=>!0,onPress:()=>{},onReset:()=>{}})}function Z(){return E(F("desktop",{type:"custom",render:({readOnly:e})=>f(j,{readOnly:e})}),M)}export{V as CARD_BOX_FACTS,B as CardDisplayChips,C as NOT_CARD_OF_TEMPLATE,k as cardChipLabel,Z as cardDisplayField,P as cardDisplayItems,R as cardDisplayParts,w as withChildShown};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ReactElement, type ReactNode } from "react";
|
|
2
|
+
import { type FieldsPatch } from "efficient-easel/easel";
|
|
2
3
|
import { type MediaValue } from "../../../format/lib/media-value.js";
|
|
3
4
|
import { type LoadingShows } from "../../../format/lib/hero-video.js";
|
|
4
5
|
import { readHidable, hidableText, type HidableValue } from "efficient-easel/draw";
|
|
@@ -56,6 +57,7 @@ export declare function SiteGapDefaultReset({ inherited, onReset, label, }: {
|
|
|
56
57
|
}): import("react").JSX.Element;
|
|
57
58
|
export declare function containerGapField(container: GapContainer): import("efficient-easel/screen/lib/document/box-fields").BoxField<string | number>;
|
|
58
59
|
export declare function containerGapPhoneField(container: GapContainer): CustomField<string | number>;
|
|
60
|
+
export declare function containerGapTabletField(container: GapContainer): CustomField<string | number>;
|
|
59
61
|
export declare const DESKTOP_GAP_NOT_OVERLAP: ShowWhenRule;
|
|
60
62
|
export declare function containerGapRows(container: GapContainer): {
|
|
61
63
|
[x: string]: import("efficient-easel/screen/lib/document/box-fields").BoxField<string | number> | CustomField<string | number>;
|
|
@@ -113,7 +115,6 @@ export declare function plainTextarea(label: string, placeholder?: string, hint?
|
|
|
113
115
|
export declare const BUCKET_ICONS: Record<Bucket, (props: {
|
|
114
116
|
size?: number;
|
|
115
117
|
}) => ReactElement>;
|
|
116
|
-
export declare function entriesHiddenForTab(buckets: readonly Bucket[], active: string): boolean | null;
|
|
117
118
|
export declare function panelNote(text: string): CustomField<undefined>;
|
|
118
119
|
export declare function PanelNoteLine({ text }: {
|
|
119
120
|
text: string;
|
|
@@ -180,7 +181,7 @@ interface CornersRowTier {
|
|
|
180
181
|
export declare function cornersRowField(tier: CornersRowTier): CustomField<number | null>;
|
|
181
182
|
export declare function useSelectedSibling(key: string): [unknown, (next: unknown) => void];
|
|
182
183
|
export declare function keptBy<T = unknown>(): CustomField<T>;
|
|
183
|
-
export declare function useSelectedPatch(): (patch:
|
|
184
|
+
export declare function useSelectedPatch(): (patch: FieldsPatch) => void;
|
|
184
185
|
export declare function cornerSidesField(): CustomField<string[] | null>;
|
|
185
186
|
export declare function sectionCornersField(): CustomField<number | null>;
|
|
186
187
|
export declare function sectionShapeFields(): Record<string, unknown>;
|
|
@@ -193,10 +194,13 @@ export declare function boxShareField(points?: readonly (typeof BOX_SHARE_POINTS
|
|
|
193
194
|
export declare function boxBlockSpacingField(): SelectField;
|
|
194
195
|
export declare function boxSharePhoneField(): CustomField<string>;
|
|
195
196
|
export declare function boxPhoneRowField(): import("efficient-easel/screen/lib/document/box-fields").BoxField<number>;
|
|
196
|
-
export declare function boxColumnsFields():
|
|
197
|
+
export declare function boxColumnsFields(): {
|
|
198
|
+
phoneRow: import("efficient-easel/screen/lib/document/box-fields").BoxField<number>;
|
|
199
|
+
};
|
|
197
200
|
export declare function sizeField(label: string, min: number, max: number, step: number, fallback: number, role: TypeRole): CustomField<TypeSizeValue>;
|
|
198
201
|
export declare function cellWidthFields(): Record<string, unknown>;
|
|
199
202
|
export declare function useSelectedProps(): Record<string, unknown>;
|
|
203
|
+
export declare const RowPropsContext: import("react").Context<Record<string, unknown> | null>;
|
|
200
204
|
export declare function phoneOverrideField(opts: {
|
|
201
205
|
label: string;
|
|
202
206
|
desktopKey: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as i,jsxs as k,Fragment as T}from"react/jsx-runtime";import{cloneElement as ge,useEffect as mt,useId as be,useRef as z,useState as G}from"react";import{useEasel as ne}from"efficient-easel/easel";import{toDateKey as ht,fromDateKey as gt}from"efficient-shell/format";import{say as l,editorEaselWords as S}from"../../../format/lib/editor-words.js";import{mediaValueSrc as xe}from"../../../format/lib/media-value.js";import{LOADING_SHOWS_LABELS as Se,loadingShowsOf as bt}from"../../../format/lib/hero-video.js";import{readHidable as ye,hidableText as _e}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as oe,LINK_FIELD_MARKER as Ce,MEDIA_FIELD_MARKER as we,SCAFFOLD_FIELD_MARKER as Ie,TEXT_FIELD_MARKER as w,foldMetaOf as re,textFieldIdentifier as xt}from"efficient-easel/draw";import St from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as yt}from"../../../render/lib/document/show-when.js";import _t from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as Ct,CORNER_RADIUS_MAX as Re,CORNER_RADIUS_MIN as L}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as wt,IMAGE_CORNERS_LABEL as It}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as Rt}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Et,GALLERY_LAYOUTS as Y,GALLERY_LAYOUT_KEYS as Ot,galleryChoices as Ee,galleryPictureCells as Tt}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as Pt}from"./shell-glyph.js";import{anchorSiblingsOf as At,placementPoints as Ft}from"../../../format/lib/hero-group-placement.js";import kt,{KEEP_HINT_CLASS as Lt}from"../../components/KeepHint.js";import Nt from"../../components/AnchorField.js";import{AdjustIcon as vt,EyeIcon as Bt,AnimationIcon as Dt,BackgroundIcon as Ht,BorderAllIcon as Gt,BlockSectionIcon as Mt,ColumnWidthsIcon as Oe,ColumnsIcon as Te,CornerIcon as Kt,DirectionDownIcon as Wt,DirectionLeftIcon as Ut,DirectionRightIcon as $t,DirectionUpIcon as Xt,EditIcon as jt,GapIcon as zt,GridIcon as Yt,GroundIcon as Pe,HashIcon as Ae,HeightIcon as Vt,ImageIcon as qt,ListIcon as Zt,LocationIcon as Fe,PaddingBottomIcon as ke,PaddingLeftIcon as Le,PaddingRightIcon as Ne,PaddingTopIcon as ve,PageIcon as Jt,StickyIcon as Qt,RotateIcon as en,SearchIcon as tn,SquareIcon as nn,TypeIcon as on,WidthIcon as rn}from"efficient-easel/icons";import{FieldGlyph as Be}from"../../components/FieldGlyph.js";import{resolvePageBackground as ln}from"../../../format/lib/content/page-background.js";import{CORNER_SIDES as De,CORNER_SIDE_POINTS as an,hasOwnSectionCorners as sn,normalizeCornerSides as He}from"../../../format/lib/content/section-corners.js";import{enclosingPath as cn,enclosingSection as dn}from"./enclosing-section.js";import{SettingsDefaultReset as y,SettingsDrill as un,SettingsField as h,SettingsGroup as pn,SettingsGroupSub as fn,SettingsSegmented as mn,SettingsBorder as hn,SettingsSidesEach as gn,SettingsSwitch as ie,borderSides as bn,borderStartEach as xn}from"efficient-easel/panel";import{ListField as Sn}from"efficient-easel/fields";import{DisplayChips as yn}from"efficient-shell/ui";import{desktopDisplayChanged as _n,partShownOnDesktop as Cn,partShownOnPhone as wn,phoneDisplayChanged as In,withDesktopPart as Rn,withPhonePart as En}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as On,Checkbox as Tn,ColorSwatch as Pn,CornersInput as An,DatePicker as Fn,DateTimePicker as kn,FOCAL_DEFAULT as Ln,PictureTiles as Nn,IconPicker as vn,IconButton as Ge,InputNumber as Me,Slider as Bn,Tooltip as V}from"efficient-shell/ui";import{ColourRow as Ke,InheritedColourRow as Dn}from"./ColourControl.js";import{keptByRow as Hn}from"efficient-easel/screen/lib/document/style-fields";import We from"./MarkupToolbar.js";import{deviceField as b}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as Gn,NoControlMark as Mn,noControlField as Ue}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as Kn}from"../../../format/lib/document/own-box.js";import{PHONE_CLEAR as Wn,resolvePhoneValue as le}from"../../../format/lib/document/phone-override.js";import{phoneKey as N}from"efficient-easel/draw";import{SuppressibleText as Un}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as $n,CARD_OUTLINE_OPTIONS as Xn,DEFAULT_CARD_INDEX_FORMAT as jn,DEFAULT_CARD_OUTLINE as zn}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Yn,DEFAULT_COVER_INDEX as Vn}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as qn}from"efficient-easel/draw";import Zn from"../../components/MediaUploadField.js";import{useSelectedHost as ae}from"./selected-host.js";import Jn from"../../components/MultiSelectField.js";import Qn from"../../components/SectionThemePicker.js";import eo from"../../components/SearchSelectField.js";import to from"../../components/StorefrontLinkField.js";import{UiIcon as $e}from"efficient-easel/draw/client";import{SECTION_PADDING as I}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as no}from"../../../render/lib/content/button-look.js";import{usePreviewParts as oo}from"efficient-easel/draw/client";import{encodePartId as ro}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as io,useEaselStrings as lo}from"efficient-easel/strings";import{hasPhoneHeight as ao,resolveSectionMinHeight as so}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as q,SECTION_STICK_LABEL as se,hasPhoneStick as co,resolveSectionStick as uo}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as po,SECTION_MIN_HEIGHT_GROUP_LABEL as M,SECTION_SCREEN_PCT as fo}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as mo,resolveContainerDirection as Xe}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as ho,BOX_BLOCK_SPACING_POINTS as je,BOX_PHONE_ROW_LABEL as ze,BOX_COLUMNS_MAX as go,BOX_COLUMNS_MIN as Ye,BOX_PHONE_ROW_MAX as bo,BOX_PHONE_ROW_MIN as ce,BOX_SHARE_LABEL as de,BOX_SHARE_PHONE_DEFAULT as xo,BOX_SHARE_PHONE_POINTS as So,BOX_SHARE_POINTS as yo}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as P}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as _o}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as Ve,normalizeTheme as qe}from"../../../format/lib/theme.js";import{CONTAINER_GAP as Ze,CONTAINER_GAP_BUILT_IN as Co,CONTAINER_GAP_PHONE as wo,GAP_FIELD_CONTAINER as Je,followsSitePhoneGap as Io,hasOwnContainerGap as Ro,hasOwnPhoneGap as Eo,resolveContainerGap as Oo,resolvePhoneContainerGap as Qe}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as To,CARD_IMAGE_BG_OFF as Po,CARD_IMAGE_BG_SWATCH_NAMES as Ao,CARD_IMAGE_BG_SWATCHES as Fo,isCardImageBackgroundInheriting as ko,cardImageBackgroundChoice as Lo,THEME_CARD_IMAGE_BG as No}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as vo,SECTION_BG_SWATCHES as Bo,SECTION_BG_SWATCH_NAMES as Do,THEME_SECTION_BG as Ho,isSectionBackgroundInheriting as Go}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Mo,nestedAccentValue as et,resolveSectionAccent as Z}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Ko,TYPE_SIZE_INHERIT as Wo,isTypeSizeInheriting as Uo}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as $o,WIDTH_CHOICE_LABEL as Xo,WIDTH_INHERIT as jo}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as zo}from"./panel-heading-scope.js";import{useEaselSession as Yo}from"efficient-easel/screen/lib/session-context";import{backendOf as Vo}from"../website-session.js";import{BOX_GAP as qo,describedAs as R,group as C,iconOf as K,sharedStyleKinds as W}from"efficient-easel/screen/lib/document/box-fields";import{phoneTwinFields as Zo}from"efficient-easel/screen/lib/document/box-fields";import{directionField as Jo,gapField as tt,Segmented as ue,segmented as Qo,select as U,slider as v}from"./box-fields.js";function Tl({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function B(e,t){return l("{value} from {from}",{value:e,from:t})}function er(){const{blockGap:e}=P();return e===null?l("this container's own spacing"):B(`${e}px`,l("Styles"))}function tr({inherited:e,onReset:t,label:n}){return i(y,{words:S()?.panel,label:l(n),changed:!e,detail:er(),onReset:t})}function nr(e){return tt({...qo,builtIn:Co[e],resolve:(t,n)=>Oo(e,t,n?.siteGap),action:(t,n)=>i(tr,{inherited:!Ro(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[Je]:e}})}function or(e){return yt(b("mobile",{[Je]:e,type:"custom",render:t=>i(ir,{container:e,...t})}),rr)}const rr={not:{field:"gap",in:Array.from({length:-Ze.min},(e,t)=>Ze.min+t)}};function Pl(e){return{gap:b("desktop",nr(e)),[N("gap")]:or(e)}}function ir({container:e,...t}){const[n]=D("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},a=Qe(e,void 0,n,o,r);return tt({...wo,builtIn:a,resolve:c=>Qe(e,c,n,o,r),action:(c,d)=>i(y,{words:S()?.panel,label:l("Gap"),changed:Eo(c),detail:B(`${a}px`,Io(e,n,r)?l("Styles"):l("Desktop")),onReset:()=>d(void 0)})}).render(t)}function Al(e){return Jo({offered:mo(e),fallback:Xe(e,void 0),resolve:t=>Xe(e,t)})}function Fl(e,t){return Ft(t?At(e,t):[],t)}function lr({inherited:e,onReset:t,label:n}){return i(y,{words:S()?.panel,label:l(n),changed:!e,detail:B(l("Full"),l("the page")),onReset:t})}function A({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:a,hideable:s=!0,markup:c=!0}){const{text:d,hidden:f}=ye(e),m=z(null),p=z(null),u=O=>t(s?{text:O,hidden:f}:O),x=()=>t({text:d,hidden:!f}),g=s&&f,E=be(),_=r?ur(r)?i("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(r)}):i(kt,{children:l(r)}):void 0,j=f?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return i(h,{label:l(n),icon:i(on,{}),htmlFor:E,className:g?"is-hidden":void 0,hint:_,action:s?i(V,{content:j,children:i(Ge,{"aria-pressed":f,"aria-label":j,onClick:x,children:f?i($e,{name:"eye-off",size:14}):i($e,{name:"eye",size:14})})}):void 0,children:k("div",{className:"sf-copybox",children:[c&&i(We,{target:a?p:m,value:d,onChange:u}),a?i("textarea",{id:E,ref:p,value:d,placeholder:o===void 0?void 0:l(o),onChange:O=>u(O.target.value)}):i("input",{id:E,ref:m,type:"text",value:d,placeholder:o===void 0?void 0:l(o),onChange:O=>u(O.target.value)})]})})}function kl(e,t){return{...e,[Ie]:t}}function Ll(e){const t=e[w];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[w]:{...t,offPage:!0}}}function Nl(e){return!e||typeof e!="object"?!1:e[w]?.offPage===!0}const nt="sfPanelOnly";function vl(e){if(!e[w])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[nt]:!0}}function Bl(e){return!!e&&typeof e=="object"&&e[nt]===!0}function Dl(e){const t=e[w];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[w]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as Va,SCALAR_TEXT_CONTROLS as qa}from"efficient-easel/draw";function Hl(e,t){if(!e[w])throw new Error("inOwnBox: the field holds no authored text");const{[Gn]:o,...r}=e;return{...r,[Kn]:!0,render:t}}const ar=new Set(qn),$={type:"radio",options:[{value:!0},{value:!1}]},ot={text:{type:"object",objectFields:{text:{type:"text"},hidden:$}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:$}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},F=(e,t)=>{const n=R({...t,[w]:e},{...ot[e.control],label:e.label});if(!ar.has(e.control))return n;const o=t.render;return{...Ue(n,"authored-copy"),render:r=>i(Un,{name:r.name,children:o(r)})}},Gl="Everything else on this block comes from the linked post. Unlink it to edit by hand.",sr={field:"source.slug",set:!0},Ml={not:sr},cr="Select a word, then press the highlighter.",dr=new Set([cr]),ur=e=>dr.has(e);function Kl(e,t,n){return F({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function Wl(e,t,n){return F({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function Ul(e,t,n){return F({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function $l(e,t,n){return F({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function Xl(e){return{type:"custom",[Ce]:{label:e},...R({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(to,{value:_e(t),onChange:n,label:e})}}function jl(e,t,n){return F({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const zl={Design:vt,Animation:Dt};function Yl(e,t){return e.includes("Design")?t!=="Design":null}function Vl(e){return{type:"custom",render:()=>i(pr,{text:e})}}function pr({text:e}){return i("p",{className:"sf-note",children:l(e)})}function ql(e){return re(e)!==null&&e?.tabs!==void 0}const rt=new Map;function Zl(e,t){const n=`${e}\0${t?t.join(""):""}`,o=rt.get(n)??{type:"custom",tabs:t,[oe]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(T,{})};return rt.set(n,o),o}const it=new Map;function Jl(e){const t=it.get(e)??{type:"custom",[oe]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(T,{})};return it.set(e,t),t}function fr(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function Ql(e,t){return fr(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(T,{})}}function ea(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(T,{})}}function ta({title:e,children:t}){const[n,o]=G(()=>!pe.has(e));return i(pn,{title:e,open:n,onToggle:r=>{o(r),r?pe.delete(e):pe.add(e)},children:t})}const pe=new Set;function na({label:e}){return i(fn,{title:l(e),level:zo(2)})}function lt({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),a=r?o?.[r]:void 0,s=a?l(a):t;return k("div",{className:"sf-swatches",children:[e.map(c=>{const d=o?.[c]?l(o[c]):c;return i(V,{content:d,children:i(Pn,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":d})},c)}),i("span",{className:"sf-swatch-hex",children:s})]})}function oa(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=Go(n,t);return i(h,{label:l(e),icon:i(Ht,{}),changed:!r,action:i(y,{words:S()?.panel,label:l(e),changed:!r,detail:l("the theme's section background"),onReset:()=>o(vo)}),children:lt({swatches:Bo,current:r?Ho:n??t??"",onPick:o,names:Do})})}}}function mr(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,a=ko(r,t);return i(h,{label:l(e),icon:i(Pe,{}),changed:!a,action:i(y,{words:S()?.panel,label:l(e),changed:!a,detail:l("the theme's image stage"),onReset:()=>o(To)}),children:lt({swatches:Fo,current:a?No:Lo(r,t),onPick:o,names:Ao})})}}}function ra(e=n=>n,t){return W({_gSectionTheme:C(Mo),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(Qn,{value:e(n),onChange:o,followLabel:t})}})}function X({min:e,max:t,step:n,value:o,onChange:r,suffix:a="",readout:s=!0,notch:c,ariaLabel:d,disabled:f=!1}){const m=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:m?"sf-slider has-notch":"sf-slider",style:m?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(Bn,{min:e,max:t,step:n,value:o,suffix:a||void 0,showInput:s,label:d===void 0?void 0:l(d),disabled:f,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:p=>{p!==null&&p!==o&&r(p)}})})}function at(e,t){const{min:n,max:o,step:r=1,unsetLabel:a,hint:s,restTrack:c,unsetMark:d,icon:f,unit:m="px"}=t;return{type:"custom",render:({value:p,onChange:u})=>{const x=typeof p=="number"?p:null,g=x===null;return i(h,{label:l(e),icon:f?K(f):void 0,value:g?d||a===void 0?void 0:l(a):`${x}${m}`,changed:!g,action:d?ge(d,{changed:!g,onReset:()=>u(null)}):i(y,{words:S()?.panel,label:l(e),changed:!g,onReset:()=>u(null)}),hint:typeof s=="string"?l(s):s,children:c?c({min:n,max:o,step:r,px:x,label:e,onChange:u}):X({min:n,max:o,step:r,value:x??n,readout:!1,ariaLabel:e,onChange:u})})}}}const J="Corners";function fe(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,r=o!==null;return i(h,{label:l(J),icon:i(Kt,{}),changed:r,action:ge(e.mark,{changed:r,onReset:()=>n(null)}),hint:e.hint,children:i(gr,{tier:e,px:o,onRadius:n})})}}}function D(e){const t=ae();return[t?.values?.[e],n=>t?.onChange(e,n)]}function st(){return Ue({type:"custom",render:()=>i(Mn,{})},"always")}function hr(){const e=ae();return t=>e?.onChangeMany(t)}function gr({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),[r,a]=D(e.sidesKey),s=He(r)??[...De];return i(An,{label:l(J),value:s,corners:an,onChange:c=>{const d=He(c)??[];a(d.length===De.length?null:d)},radius:t,onRadiusChange:n,radiusMin:L,radiusMax:Re,radiusStep:e.step??1,radiusPlaceholder:String(o)})}function ct(){return st()}function br({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=P(),r=typeof o=="number"?`${o}px`:l("not set");return i(y,{words:S()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):B(r,l("Styles")),onReset:n})}function xr(){const{cornerRadiusPx:e}=P();return typeof e=="number"?e:L}function Sr(){return fe({sidesKey:"sectionCornerSides",useFollowed:xr,mark:i(br,{label:J}),hint:yr})}const yr="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function ia(){return W({_gShape:C("Shape"),sectionCorners:Sr(),sectionCornerSides:ct(),sectionBorder:dt("desktop"),sectionBorderPhone:dt("mobile")})}const _r=()=>({width:l("Border width"),sides:{top:l("Border top"),right:l("Border right"),bottom:l("Border bottom"),left:l("Border left")},style:l("Border style"),styles:{solid:l("Solid"),dashed:l("Dashed"),dotted:l("Dotted")},color:l("Border color"),unit:"px"});function Cr(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function wr(){let e;try{const t=qe(P().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||Ve.line}function Ir({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:a=!0,above:s={}}){const c=e&&typeof e=="object"?e:{},[d,f]=G(()=>r?xn(c,s):!1),m=_r(),p=u=>Cr(r&&a?u:{width:u.width,color:u.color,...a?{style:u.style}:{}});return i(h,{label:l("Border"),icon:i(Gt,{}),action:r?i(gn,{each:d,label:l("Each side"),onChange:f}):void 0,children:i(hn,{label:l("Border"),value:c,each:d,onChange:u=>t(p(u)),placeholder:n,presets:o,words:m,styles:a,max:_o})})}function Rr({value:e,onChange:t,tier:n}){const[o]=D("sectionBorder"),r=wr(),a=n==="mobile"?o&&typeof o=="object"?o:{}:{};return i(Ir,{value:e,onChange:t,placeholder:{sides:bn(a),style:a.style??"solid",color:a.color||r},presets:[r],above:a})}function dt(e){return b(e,{type:"custom",render:({value:t,onChange:n})=>i(Rr,{value:t,onChange:n,tier:e})})}function la(e){return{type:"custom",render:()=>i(Er,{partKey:e})}}function Er({partKey:e}){const[t]=D("id"),[n]=D("_partStyles"),{textStyles:o}=P(),r=lo();let a=null;try{a=oo().select}catch{a=null}const s=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(un,{name:l("Text"),preview:no(s,c,{noStyle:l("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??io.copy.panel).cases}),onOpen:()=>{a&&typeof t=="string"&&a(ro(t,e))}})}function ut(e){const{cornerRadiusPx:t}=P(),n=typeof t=="number"?t:e;let o=null;try{const{appState:a,selectedItem:s}=ne(d=>d),c=s?.props?.id?String(s.props.id):void 0;o=c?dn(a?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return sn(r)?r:n}function Or({label:e,changed:t=!1,onReset:n=()=>{}}){const o=ut(L);return i(y,{words:S()?.panel,label:l(e),changed:t,detail:B(`${o}px`,l("the section")),onReset:n})}function Tr(){return i(T,{children:l("Follows the section's Corners until you set a number here.")})}function Pr(){return fe({sidesKey:"cardCornerSides",useFollowed:()=>ut(L),mark:i(Or,{label:J}),hint:i(Tr,{})})}function Ar(){return{type:"custom",render:()=>i(St,{})}}function aa(e){return{...e,render:t=>i(_t,{render:e.render,props:t})}}function sa(){return{_gShape:C("Shape"),cardCorners:Pr(),cardCornerSides:ct(),cardCornersApplyAll:Ar()}}function Fr(e=yo,t=e[0].value){return R({type:"custom",render:({value:n,onChange:o})=>{const r=e.find(a=>a.value===n)??e.find(a=>a.value===t)??e[0];return i(h,{label:l(de),icon:i(Oe,{}),value:l(r.label),children:i(Nn,{className:"sf-gallery-layouts",label:l(de),value:r.value,onChange:o,options:e.map(a=>({value:a.value,label:l(a.label),picture:i("span",{className:"sf-gallery-pic",children:kr(a.weights).map((s,c)=>i("i",{style:{gridColumn:`span ${s}`}},c))})}))})})}},{type:"select",label:de,options:e.map(n=>({value:n.value,label:n.label}))})}function kr(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 ca(){return U(ho,i(zt,{}),je,je[0].value)}function da(){return b("mobile",Fr(So,xo))}function Lr(){return b("mobile",v(ze,i(Te,{}),ce,bo,1,ce,"",{clear:{phoneFollows:!1,hint:ce}}))}const Nr={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function ua(){return Zo("columns",v(ze,i(Te,{}),Ye,go,1,Ye,"",{clear:{emptyLabel:"Auto"}}),Nr,{phoneRow:Lr()})}function pa(e,t,n,o,r,a){return{type:"custom",render:({value:s,onChange:c})=>i(h,{label:l(e),icon:i(Be,{noun:a}),action:i(y,{words:S()?.panel,label:l(e),changed:!Uo(s),detail:l("the Text style in Styles"),onReset:()=>c(Wo),defaultAction:{onPress:()=>c(Ko),title:l("Keep this section's own built-in size"),icon:i(Mt,{})}}),children:X({min:t,max:n,step:o,value:typeof s=="number"?s:r,suffix:"px",ariaLabel:e,onChange:c})})}}function fa(){return{_gCellWidth:C("Cell width"),gridSpan:U("Positions",i(Oe,{}),[{label:"Auto",value:""},...Array.from({length:Rt},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function H(){let e=null;try{e=ne(t=>t).selectedItem}catch{e=null}return e?.props??{}}function vr({min:e,max:t,step:n,px:o,label:r,onChange:a,desktopKey:s,fallback:c}){const d=H()[s],f=le(void 0,d,c);return i(T,{children:X({min:e,max:t,step:n,value:le(o,d,c),readout:!1,ariaLabel:r,notch:f,onChange:a})})}function Br({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:a=()=>{}}){const s=H()[t],c=le(void 0,s,n);return i(y,{words:S()?.panel,label:l(e),changed:r,detail:l("{value} on desktop",{value:`${c}${o}`}),onReset:a})}function Dr(e){return at(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(Br,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(vr,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Hr={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Gr={Top:ve,Bottom:ke,Left:Le,Right:Ne},Mr=e=>{const t=Gr[e];return i(t,{})};function ma(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=_=>Hr[_],a=_=>v(r("Top"),i(ve,{}),I.min,I.max,I.step,_,"px"),s=(_,j,O,te=I)=>b("mobile",Dr({label:r(_),icon:Mr(_),desktopKey:j,min:te.min,max:te.max,step:te.step,fallback:O})),c=e.top??I.min,d=e.bottom??I.min,f="sectionPaddingLeft",m="sectionPaddingRight",p=e.sideBounds??I,u=e.side??p.min,x=e.sidePhone??u,g=e.phone===!0,E=_=>g?b("desktop",_):_;return W({...o?{_gSpacing:C("Padding")}:{},[t]:E(a(c)),...g?{[N(t)]:s("Top",t,c)}:{},...e.only==="top"?{}:{[n]:E(v(r("Bottom"),i(ke,{}),I.min,I.max,I.step,d,"px")),...g?{[N(n)]:s("Bottom",n,d)}:{}},...e.sides?{[f]:E(v(r("Left"),i(Le,{}),p.min,p.max,p.step,u,"px")),...g?{[N(f)]:s("Left",f,x,p)}:{},[m]:E(v(r("Right"),i(Ne,{}),p.min,p.max,p.step,u,"px")),...g?{[N(m)]:s("Right",m,x,p)}:{}}:{}})}function ha(e,t){const n=Object.fromEntries(Object.entries(t).map(([a,s])=>[a,a in e&&re(s)?e[a]:s])),o={};let r=!1;for(const[a,s]of Object.entries(e)){if(a in t){r||Object.assign(o,n),r=!0;continue}o[a]=s}return r||Object.assign(o,n),o}const Q="Width";function ga(e,t=$o,n=!0){const o=t.map(r=>({label:Xo[r],value:r}));return W({...n?{_gWidth:C(Q)}:{},widthMode:{type:"custom",render:({onChange:r,field:a})=>i(h,{label:l(Q),icon:i(rn,{}),action:n?i(lr,{inherited:a?.inherited??!1,onReset:()=>r(jo),label:Q}):void 0,children:ue({options:o,value:a?.currentValue||e,onChange:r,ariaLabel:Q})})}})}function ba(){const e=o=>({type:"custom",render:({value:r,onChange:a})=>i(h,{label:M,icon:K(i(Vt,{})),action:o?o(a):void 0,children:ue({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(r)?r:"auto",onChange:a,ariaLabel:M})})}),t=()=>({type:"custom",render:({value:o,onChange:r,field:a})=>{const s=a?.unit==="%"?"%":"px",c=s==="%"?fo:po;return i("div",{className:"sf-field",children:X({min:c.min,max:c.max,step:c.step,value:typeof o=="number"?o:c.fallback,suffix:s,ariaLabel:M,onChange:r})})}}),n=()=>Qo("Unit",i(Ae,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return W({_gHeight:C(M),sectionHeightMode:b("desktop",e()),sectionHeightValue:b("desktop",t()),sectionHeightUnit:b("desktop",n()),sectionHeightModePhone:b("mobile",e(o=>i(Kr,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:b("mobile",t()),sectionHeightUnitPhone:b("mobile",n())})}function Kr({onClear:e}){const t=H(),n=ao(t),o=so(t),r=l("{value} on desktop",{value:o.mode==="auto"?l("Auto"):`${o.value}${o.unit}`});return i(y,{words:S()?.panel,label:l(M),changed:n,detail:r,onReset:e})}function xa(){const e=n=>({type:"custom",render:({value:o,onChange:r,id:a,name:s})=>i(Wr,{value:o,onChange:r,labelId:`${a??s??"stickTop"}-label`,phone:n})}),t=()=>({type:"custom",render:({value:n,onChange:o})=>i("div",{className:"sf-field",children:X({min:q.min,max:q.max,step:q.step,value:typeof n=="number"?n:q.fallback,suffix:"px",ariaLabel:l("Distance from top"),onChange:o})})});return{_gStick:C(se),stickTop:b("desktop",e(!1)),stickTopDistance:b("desktop",t()),stickTopPhone:b("mobile",e(!0)),stickTopDistancePhone:b("mobile",t())}}function Wr({value:e,onChange:t,labelId:n,phone:o}){const r=H(),a=uo(r),s=o?a.phone:e===!0;return i(h,{label:l(se),labelId:n,icon:K(i(Qt,{})),action:k(T,{children:[o?i(y,{words:S()?.panel,label:l(se),changed:co(r),detail:l("{value} on desktop",{value:a.desktop?`${a.desktopDistance}px`:l("Off")}),onReset:()=>t(void 0)}):null,i(ie,{checked:s,onChange:t,ariaLabelledBy:n})]})})}const pt="e.g. about";function Sa(){return{_gAnchor:C("Anchor"),anchor:F({control:"plainText",label:"Name",placeholder:pt},{type:"custom",render:({value:e,onChange:t})=>i(Nt,{value:e,onChange:t,nameBox:(n,o)=>i(A,{value:n,onChange:o,label:"Name",placeholder:pt,hideable:!1,markup:!1})})})}}function ya(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:a,name:s})=>{const c=`${a??s??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return i(h,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(kn,{id:c,value:Number.isFinite(d)?new Date(d):null,onChange:f=>r(f?f.toISOString():"")})})}}}function _a(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:a,name:s})=>{const c=`${a??s??e}-date`;return i(h,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(Fn,{id:c,value:gt(typeof o=="string"?o:null),onChange:d=>r(d?ht(d):"")})})}}}function ft(e,t,n,o){return{type:"custom",...R({},{...$,label:e}),render:({value:r,onChange:a,id:s,name:c})=>{const d=typeof r=="boolean"?r:t,f=`${s??c??e}-label`;return i(h,{label:l(e),labelId:f,icon:n,hint:o===void 0?void 0:l(o),action:i(ie,{checked:d,onChange:a,ariaLabelledBy:f})})}}}function Ca(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(Ke,{label:l("Background"),icon:i(Jt,{}),id:r,value:ln(e),onChange:t})}}}function wa(e,t){return{type:"custom",...R({},{...$,label:e}),render:({value:n,onChange:o,id:r})=>{const a=typeof n=="boolean"?n:t,s=`${r??e}-checkbox`;return i(h,{label:l(e),htmlFor:s,className:"sf-checkbox",action:i(Tn,{id:s,checked:a,onChange:o})})}}}function Ia(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(Ke,{label:l(e),icon:n,value:o||t,onChange:r})}}function Ra(){return{type:"custom",render:({value:e,onChange:t})=>i(Ur,{value:typeof e=="string"?e:"",onChange:t})}}function Ur({value:e,onChange:t}){const{hex:n,n:o}=Xr();return i(Dn,{label:l("Fill"),icon:i(Pe,{}),value:e,inherited:n,resetTo:B(n.toUpperCase(),l("Theme {n} background",{n:o})),onChange:t,onReset:()=>t("")})}function $r(e,t,n){if((e?.content??[]).some(s=>s?.props?.id===t))return Z(n);const r=cn(e,t);if(r.length===0)return null;const a=Z(et(n));if(a!==null)return a;for(let s=r.length-1;s>0;s-=1){const c=Z(et(r[s].sectionAccent));if(c!==null)return c}return Z(r[0].sectionAccent)}function Xr(){const e=qe(P().theme),[t]=D("sectionAccent");let n=null;try{const{appState:r,selectedItem:a}=ne(c=>c),s=a?.props?.id?String(a.props.id):void 0;n=s?$r(r?.data,s,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{hex:e.themes[o].background??Ve.background,n:o+1}}const jr=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function zr({label:e,value:t,onChange:n,points:o=jr}){const r=o.map(a=>({...a,label:l(a.label),...a.title?{title:l(a.title)}:null}));return i(On,{label:l(e),value:t,points:r,onChange:n})}function Ea(){return st()}const Oa={top:i(Xt,{}),right:i($t,{}),bottom:i(Wt,{}),left:i(Ut,{})};function Ta(e,t,n,o,r,a){const s=m=>t.find(p=>p.value===m),c=m=>({value:m,label:"",disabled:!0,title:o}),d=m=>{const p=t.find(x=>x.cell===m);if(!p)return c(`missing-${m}`);const u=a?.[m];return u?{value:p.value,label:p.label,icon:u}:{value:p.value,label:p.label}},f=[c("corner-top-left"),d("top"),c("corner-top-right"),d("left"),c("centre"),d("right"),c("corner-bottom-left"),d("bottom"),c("corner-bottom-right")];return{type:"custom",render:({value:m,onChange:p})=>{const u=t.some(x=>x.value===m)?m:n;return i(h,{label:l(e),icon:r,value:s(u)?.label?l(s(u).label):"",children:zr({label:e,value:u,onChange:p,points:f})})}}}function Pa(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:a})=>i(Jn,{label:e,options:(a.options??t).map(s=>({...s,label:l(s.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:l(n)}:{}})}}function Aa(e,t,n,o){return{type:"custom",options:t,fallback:n,...R({},{type:"select",label:e}),render:({value:r,onChange:a,field:s})=>i(eo,{label:e,options:(s.options??t).map(c=>({...c,label:l(c.label)})),fallback:s.fallback??n,value:r,onChange:a,placeholder:o===void 0?void 0:l(o)})}}function Fa(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const ka=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function La(e,t,n){const o=Object.keys(Se).map(r=>({label:Se[r],value:r,picture:n[r]}));return{type:"custom",...R({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(Yr,{label:e,icon:t,options:o,onChange:r})}}function Yr({label:e,icon:t,options:n,onChange:o}){const r=ae()?.values??{},a=bt(r),s=a==="frame"&&!!xe(r.mediaVideo)&&!xe(r.videoFrame);return i(h,{label:l(e),icon:K(t),hint:s?l("This video has no frame yet. The slide shows its background colour until one is made."):void 0,children:ue({options:n,value:a,onChange:o,ariaLabel:e})})}function Na(e,t,n,o={}){return{type:"custom",[we]:!0,render:({value:r,onChange:a,name:s})=>i(Zn,{value:r||"",onChange:a,fieldKey:s,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame})}}const va={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Vr(e){const t=l(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function Ba({value:e,onChange:t,label:n}){const o=e||{},r=!!o.pending,a=r?"var(--ink-faint)":o.ok?"var(--status-success-soft-ink)":"var(--status-danger-soft-ink)",s=!!Vo(Yo()).geocode,c=be(),d=(f,m)=>t({...o,[f]:m??void 0});return k(T,{children:[i(h,{label:l(n),icon:i(Fe,{}),action:s?i(V,{content:l("Find from the address (OpenStreetMap)"),children:i(Ge,{"aria-label":l("Find from the address"),"aria-busy":r||void 0,disabled:r,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(tn,{})})}):void 0,children:s&&o.status?i(V,{content:Vr(o),className:"sf-name-tip",children:i("div",{className:`es-field-hint ${Lt}`,style:{margin:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",minWidth:0,color:a},children:r?l("Finding…"):l(o.status)})}):null}),i(h,{label:l("Enter by hand"),labelId:c,icon:i(jt,{}),action:i(ie,{checked:!!o.manual,onChange:f=>t({...o,manual:f}),ariaLabelledBy:c})}),o.manual&&i(h,{label:l("Latitude, longitude"),icon:i(Fe,{}),children:k("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(Me,{value:typeof o.lat=="number"?o.lat:null,onChange:f=>d("lat",f),min:-90,max:90,step:1e-4,placeholder:l("Latitude")}),i(Me,{value:typeof o.lng=="number"?o.lng:null,onChange:f=>d("lng",f),min:-180,max:180,step:1e-4,placeholder:l("Longitude")})]})})]})}function qr(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Zr(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,a)=>a===t?{text:n}:r)}function Da(e,t){return e===null?null:t>e?e:null}function Jr(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 Ha={label:"Ticker items",icon:i(Zt,{})};function Ga(e,t,n,o){return{type:"custom",[w]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...R({},{...ot.textList,label:e}),render:({value:r,onChange:a})=>i(Qr,{label:e,icon:K(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:a,markup:o==="markup"})}}function Qr({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:a=!1}){const s=z(null),[c,d]=G(null),f=p=>p.map(u=>({text:u?.text??""})),m=p=>{const u=Jr(n,p,c);u===null&&(s.current=null),d(u),r(f(p))};return i(Sn,{label:l(e),icon:t,noun:l("item"),items:n,onChange:m,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:a?i(We,{target:s,value:qr(n,c),onChange:p=>r(Zr(n,c??-1,p)),disabled:c===null,label:c===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,u,x)=>i("input",{type:"text",className:a&&c===u?"sf-list-marking":void 0,value:p?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:u+1}),onChange:g=>x({text:g.target.value}),onFocus:g=>{s.current=g.currentTarget,d(u)}})})}function Ma(e,t){const n=`${e.label} — row ${t+1}`;return F({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:l("{label} — row {n}",{label:l(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function Ka(e){return{_gCards:C("Cards"),coverIndex:U("Cover image",i(qt,{}),Yn,String(Vn),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:mr("Image background",Po),cardImage:ni(),spinOnHover:ft("Rotate on hover",e?.spinDefault??!0,i(en,{}))}}function Wa(){return{outline:U("Card outline",i(nn,{}),Xn,zn),indexBadge:U("Card number",i(Ae,{}),$n,jn),showBadge:ft("Product badge",!0,i(Be,{noun:"tag"}))}}function Ua(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...$,label:ee.find(a=>a.id===r).label}),o=r=>R(Hn(me),n(r));return{_gShowOnCard:C("Show on a card"),[me]:R({type:"custom",render:()=>i(ei,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(me)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const me="showCardPrice",ee=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function ei({rest:e}){const t=H(),n=hr(),o=s=>typeof t[s]=="boolean"?t[s]:void 0,r=s=>o(s)??e[s],a=ee.some(({id:s})=>o(s)!==void 0&&o(s)!==e[s]);return i(he,{parts:ee,changed:a,shown:r,onPress:(s,c)=>n({[s]:c}),onReset:()=>n(Object.fromEntries(ee.map(({id:s})=>[s,void 0])))})}function $a(e,t="display"){const n=N(t);return{[t]:b("desktop",{type:"custom",render:({value:o,onChange:r})=>i(he,{parts:e,changed:_n(o),shown:a=>Cn(o,a),onPress:(a,s)=>r(Rn(o,a,s)),onReset:()=>r(void 0)})}),[n]:b("mobile",{type:"custom",render:({value:o,onChange:r})=>i(ti,{parts:e,desktopKey:t,value:o,onChange:r})})}}function he({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:a,disabledReason:s}){const c=l("Display");return i(h,{label:c,icon:i(Bt,{}),changed:t,action:i(y,{words:S()?.panel,label:c,changed:t,detail:a,onReset:r}),children:i(yn,{label:c,items:e.map(d=>({id:d.id,label:l(d.label),shown:n(d.id),...s?{disabled:!0,disabledReason:l(s)}:{}})),onChange:o})})}function ti({parts:e,desktopKey:t,value:n,onChange:o}){const r=H()[t];return i(he,{parts:e,changed:In(n),shown:a=>wn(r,n,a),onPress:(a,s)=>o(En(n,a,s)),onReset:()=>o(Wn),detail:l("the same as Desktop")})}function ni(){return at("Card image",{min:L,max:Re,step:Ct,hint:"Rounds the picture. The card's own corner is in Styles."})}function Xa(){return fe({sidesKey:"cornerSides",step:wt,useFollowed:()=>L,mark:i(oi,{label:It}),hint:l("Rounds the picture. Left alone it stays square.")})}function oi({label:e,changed:t=!1,onReset:n=()=>{}}){return i(y,{words:S()?.panel,label:l(e),changed:t,onReset:n})}function ja(){return{type:"custom",render:({value:e,onChange:t})=>i(ai,{value:typeof e=="string"?e:"",onChange:t})}}function ri({layout:e,width:t}){return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:6,gridAutoFlow:"row dense",gap:2},children:Tt(e).map(([n,o],r)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${n}`,gridRow:`span ${o}`}},r))})}const ii={width:"3.5rem",height:"2.5rem"},li=200;function ai({value:e,onChange:t}){const[n,o]=G(null),[r,a]=G(4),s=z(null);mt(()=>{const u=s.current;if(!u||typeof ResizeObserver!="function")return;const x=()=>a(u.getBoundingClientRect().width>=li?4:3);x();const g=new ResizeObserver(x);return g.observe(u),()=>g.disconnect()},[]);const c=e&&e in Y?e:"",d=Ee(n,c),f=Ee(n,"").length,m=Pt("no-symbol"),p=[{value:"",label:l("Not chosen"),icon:m},...d.map(u=>({value:u,label:l(Y[u].label),icon:i(ri,{layout:Y[u],width:40})}))];return i(h,{label:l("Layout"),icon:i(Yt,{}),value:c?l(Y[c].label):void 0,children:i("div",{ref:s,style:{flex:"1 1 auto",minWidth:0},children:i(vn,{label:l("Layout"),value:c,emptyValue:"",options:p,onChange:t,columns:r,cell:ii,header:k("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:l("Photos in a row")}),i(mn,{options:[{id:"all",label:l("All")},...Et.map(u=>({id:String(u),label:String(u)}))],value:n===null?"all":String(n),ariaLabel:l("Photos in a row"),onChange:u=>o(u==="all"?null:Number(u))}),i("span",{className:"text-2xs text-ink-faint",children:l("{n} of {total} layouts",{n:f,total:Ot.length})})]})})})})}export{sr as BOUND_TO_POST,Gl as BOUND_TO_POST_NOTE,zl as BUCKET_ICONS,va as CUSTOM_FIELD_MEDIA,Ba as CoordsField,rr as DESKTOP_GAP_NOT_OVERLAP,he as DisplayRow,Oa as EDGE_ARROWS,Ln as FOCAL_DEFAULT,jr as FOCAL_POINTS,oe as FOLD_FIELD_MARKER,zr as FocalPicker,na as GroupLabel,cr as HIGHLIGHT_HINT,A as HidableTextField,Ce as LINK_FIELD_MARKER,Tl as Label,we as MEDIA_FIELD_MARKER,ka as MEDIA_TYPE_OPTIONS,Ml as NOT_BOUND_TO_POST,ta as PanelBand,pr as PanelNoteLine,Ie as SCAFFOLD_FIELD_MARKER,qa as SCALAR_TEXT_CONTROLS,tr as SiteGapDefaultReset,X as Slider,lt as Swatches,Va as TEXT_CONTROL_KINDS,w as TEXT_FIELD_MARKER,Ha as TICKER_ITEMS_ROW,Qr as TextListField,Q as WIDTH_LABEL,lr as WidthDefaultReset,Jr as aimAfterListChange,Sa as anchorFields,B as backTo,oa as backgroundField,ca as boxBlockSpacingField,ua as boxColumnsFields,Ra as boxFillField,Lr as boxPhoneRowField,Fr as boxShareField,da as boxSharePhoneField,$r as boxThemeIndexOf,Zl as bucketHeader,la as buttonWordsEntryField,Pr as cardCornersField,mr as cardImageBackgroundField,ni as cardImageField,Ka as cardMediaFields,sa as cardShapeFields,Ua as cardShowFields,Wa as cardStyleFields,fa as cellWidthFields,wa as checkbox,Ia as colorInput,Al as containerDirectionField,nr as containerGapField,or as containerGapPhoneField,Pl as containerGapRows,Vr as coordsResultTip,$l as copyText,ct as cornerSidesField,fe as cornersRowField,_a as date,ya as dateTime,Jl as designGroupHeader,$a as displayFields,Ta as edgePad,Yl as entriesHiddenForTab,Da as focusAfterRemove,Ea as focusKeptField,Ql as foldMarker,re as foldMetaOf,fr as foldTitleOf,ja as galleryLayoutField,ba as heightFields,Fl as heroGroupPlacementPoints,_e as hidableText,ur as hintIsWhileTyping,Xa as imageCornersField,Hl as inOwnBox,ql as isBucketHeader,st as keptBy,Xl as linkField,La as loadingShowsField,Pa as multiSelect,Ca as pageBackgroundField,Vl as panelNote,Dr as phoneOverrideField,Ul as plainText,jl as plainTextarea,at as pxField,ea as quietMarker,ye as readHidable,qr as rowText,Aa as searchSelect,dt as sectionBorderField,Sr as sectionCornersField,ia as sectionShapeFields,ra as sectionThemeFields,Zr as setRowText,pa as sizeField,Fa as sourceField,ma as spacingFields,xa as stickFields,ha as swapPadding,aa as templateField,Kl as text,xt as textFieldIdentifier,Nl as textFieldOffPage,Bl as textFieldPanelOnly,Ga as textList,Ma as textListRowField,Wl as textarea,ft as toggle,Na as upload,hr as useSelectedPatch,H as useSelectedProps,D as useSelectedSibling,er as useSiteGapDetail,ga as widthField,Dl as withIdentifier,Ll as withOffPage,vl as withPanelOnly,kl as withScaffold};
|
|
1
|
+
"use client";import{jsx as i,jsxs as N,Fragment as T}from"react/jsx-runtime";import{cloneElement as ye,createContext as Ct,useContext as _t,useEffect as wt,useId as Ce,useRef as z,useState as H}from"react";import{useEasel as oe,useSelectedHost as Y}from"efficient-easel/easel";import{toDateKey as It,fromDateKey as Rt}from"efficient-shell/format";import{say as l,editorEaselWords as S}from"../../../format/lib/editor-words.js";import{mediaValueSrc as _e}from"../../../format/lib/media-value.js";import{LOADING_SHOWS_LABELS as we,loadingShowsOf as Et}from"../../../format/lib/hero-video.js";import{readHidable as Ie,hidableText as Re}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as re,LINK_FIELD_MARKER as Ee,MEDIA_FIELD_MARKER as Oe,SCAFFOLD_FIELD_MARKER as Te,TEXT_FIELD_MARKER as w,foldMetaOf as ie,textFieldIdentifier as Ot}from"efficient-easel/draw";import Tt from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as Pe}from"../../../render/lib/document/show-when.js";import Pt from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as At,CORNER_RADIUS_MAX as Ae,CORNER_RADIUS_MIN as v}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as Ft,IMAGE_CORNERS_LABEL as kt}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as Lt}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Nt,GALLERY_LAYOUTS as V,GALLERY_LAYOUT_KEYS as vt,galleryChoices as Fe,galleryPictureCells as Bt}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as Dt}from"./shell-glyph.js";import{anchorSiblingsOf as Gt,placementPoints as Ht}from"../../../format/lib/hero-group-placement.js";import Mt,{KEEP_HINT_CLASS as Kt}from"../../components/KeepHint.js";import Wt from"../../components/AnchorField.js";import{AdjustIcon as Ut,EyeIcon as $t,AnimationIcon as Xt,BackgroundIcon as jt,BorderAllIcon as zt,BlockSectionIcon as Yt,ColumnWidthsIcon as ke,ColumnsIcon as Le,CornerIcon as Vt,DirectionDownIcon as qt,DirectionLeftIcon as Zt,DirectionRightIcon as Jt,DirectionUpIcon as Qt,EditIcon as en,GapIcon as tn,GridIcon as nn,GroundIcon as Ne,HashIcon as ve,HeightIcon as on,ImageIcon as rn,ListIcon as ln,LocationIcon as Be,PaddingBottomIcon as De,PaddingLeftIcon as Ge,PaddingRightIcon as He,PaddingTopIcon as Me,PageIcon as an,StickyIcon as sn,RotateIcon as cn,SearchIcon as dn,SquareIcon as un,TypeIcon as pn,WidthIcon as fn}from"efficient-easel/icons";import{FieldGlyph as Ke}from"../../components/FieldGlyph.js";import{resolvePageBackground as mn}from"../../../format/lib/content/page-background.js";import{CORNER_SIDES as We,CORNER_SIDE_POINTS as hn,hasOwnSectionCorners as gn,normalizeCornerSides as Ue}from"../../../format/lib/content/section-corners.js";import{enclosingPath as bn,enclosingSection as xn}from"./enclosing-section.js";import{SettingsDefaultReset as y,SettingsDrill as Sn,SettingsField as h,SettingsGroup as yn,SettingsGroupSub as Cn,SettingsSegmented as _n,SettingsBorder as wn,SettingsSidesEach as In,SettingsSwitch as le,borderSides as Rn,borderStartEach as En}from"efficient-easel/panel";import{ListField as On}from"efficient-easel/fields";import{DisplayChips as Tn}from"efficient-shell/ui";import{desktopDisplayChanged as Pn,partShownOnDesktop as An,partShownOnPhone as Fn,phoneDisplayChanged as kn,withDesktopPart as Ln,withPhonePart as Nn}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as vn,Checkbox as Bn,ColorSwatch as Dn,CornersInput as Gn,DatePicker as Hn,DateTimePicker as Mn,FOCAL_DEFAULT as Kn,PictureTiles as Wn,IconPicker as Un,IconButton as $e,InputNumber as Xe,Slider as $n,Tooltip as q}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as Xn}from"./geocode-resolve.js";import{ColourRow as je,InheritedColourRow as jn}from"./ColourControl.js";import{keptByRow as zn}from"efficient-easel/screen/lib/document/style-fields";import ze from"./MarkupToolbar.js";import{deviceField as b}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as Yn,NoControlMark as Vn,noControlField as Ye}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as qn}from"../../../format/lib/document/own-box.js";import{PHONE_CLEAR as Zn,resolvePhoneValue as ae}from"../../../format/lib/document/phone-override.js";import{phoneKey as B,tabletKey as Jn}from"efficient-easel/draw";import{SuppressibleText as Qn}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as eo,CARD_OUTLINE_OPTIONS as to,DEFAULT_CARD_INDEX_FORMAT as no,DEFAULT_CARD_OUTLINE as oo}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as ro,DEFAULT_COVER_INDEX as io}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as lo}from"efficient-easel/draw";import ao from"../../components/MediaUploadField.js";import so from"../../components/MultiSelectField.js";import co from"../../components/SectionThemePicker.js";import uo from"../../components/SearchSelectField.js";import po from"../../components/StorefrontLinkField.js";import{UiIcon as Ve}from"efficient-easel/draw/client";import{SECTION_PADDING as I}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as fo}from"../../../render/lib/content/button-look.js";import{usePreviewParts as mo}from"efficient-easel/draw/client";import{encodePartId as ho}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as go,useEaselStrings as bo}from"efficient-easel/strings";import{hasPhoneHeight as xo,resolveSectionMinHeight as So}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as Z,SECTION_STICK_LABEL as se,hasPhoneStick as yo,resolveSectionStick as Co}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as _o,SECTION_MIN_HEIGHT_GROUP_LABEL as M,SECTION_SCREEN_PCT as wo}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as Io,resolveContainerDirection as qe}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as Ro,BOX_BLOCK_SPACING_POINTS as Ze,BOX_PHONE_ROW_LABEL as Je,BOX_COLUMNS_MAX as Eo,BOX_COLUMNS_MIN as Qe,BOX_PHONE_ROW_MAX as Oo,BOX_PHONE_ROW_MIN as ce,BOX_SHARE_LABEL as de,BOX_SHARE_PHONE_DEFAULT as To,BOX_SHARE_PHONE_POINTS as Po,BOX_SHARE_POINTS as Ao}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as P}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Fo}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as et,normalizeTheme as tt}from"../../../format/lib/theme.js";import{CONTAINER_GAP as nt,CONTAINER_GAP_BUILT_IN as ko,CONTAINER_GAP_PHONE as ue,GAP_FIELD_CONTAINER as pe,followsSitePhoneGap as Lo,hasOwnContainerGap as No,hasOwnPhoneGap as fe,resolveContainerGap as ot,resolvePhoneContainerGap as rt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as vo,CARD_IMAGE_BG_OFF as Bo,CARD_IMAGE_BG_SWATCH_NAMES as Do,CARD_IMAGE_BG_SWATCHES as Go,isCardImageBackgroundInheriting as Ho,cardImageBackgroundChoice as Mo,THEME_CARD_IMAGE_BG as Ko}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as Wo,SECTION_BG_SWATCHES as Uo,SECTION_BG_SWATCH_NAMES as $o,THEME_SECTION_BG as Xo,isSectionBackgroundInheriting as jo}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as zo,nestedAccentValue as it,resolveSectionAccent as J}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Yo,TYPE_SIZE_INHERIT as Vo,isTypeSizeInheriting as qo}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Zo,WIDTH_CHOICE_LABEL as Jo,WIDTH_INHERIT as Qo}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as er}from"./panel-heading-scope.js";import{useEaselSession as tr}from"efficient-easel/screen/lib/session-context";import{backendOf as nr}from"../website-session.js";import{BOX_GAP as or,describedAs as R,group as _,iconOf as K,sharedStyleKinds as W}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as rr,phoneTwinFields as lt}from"efficient-easel/screen/lib/document/box-fields";import{directionField as ir,gapField as me,Segmented as he,segmented as lr,select as U,slider as D}from"./box-fields.js";function Bl({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function A(e,t){return l("{value} from {from}",{value:e,from:t})}function ar(){const{blockGap:e}=P();return e===null?l("this container's own spacing"):A(`${e}px`,l("Styles"))}function sr({inherited:e,onReset:t,label:n}){return i(y,{words:S()?.panel,label:l(n),changed:!e,detail:ar(),onReset:t})}function cr(e){return me({...or,builtIn:ko[e],resolve:(t,n)=>ot(e,t,n?.siteGap),action:(t,n)=>i(sr,{inherited:!No(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[pe]:e}})}function dr(e){return Pe(b("mobile",{[pe]:e,type:"custom",render:t=>i(fr,{container:e,...t})}),at)}function ur(e){return Pe(b("tablet",{[pe]:e,type:"custom",render:t=>i(pr,{container:e,...t})}),at)}const at={not:{field:"gap",in:Array.from({length:-nt.min},(e,t)=>nt.min+t)}};function Dl(e){return{gap:b("desktop",cr(e)),[Jn("gap")]:ur(e),[B("gap")]:dr(e)}}function pr({container:e,...t}){const[n]=L("gap"),{siteGap:o}=t.field??{},r=Math.max(ue.min,ot(e,n,o));return me({...ue,builtIn:r,resolve:s=>fe(s)?s:r,action:(s,c)=>i(y,{words:S()?.panel,label:l("Gap"),changed:fe(s),detail:A(`${r}px`,l("Desktop")),onReset:()=>c(void 0)})}).render(t)}function fr({container:e,...t}){const[n]=L("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},a=rt(e,void 0,n,o,r);return me({...ue,builtIn:a,resolve:c=>rt(e,c,n,o,r),action:(c,u)=>i(y,{words:S()?.panel,label:l("Gap"),changed:fe(c),detail:A(`${a}px`,Lo(e,n,r)?l("Styles"):l("Desktop")),onReset:()=>u(void 0)})}).render(t)}function Gl(e){return ir({offered:Io(e),fallback:qe(e,void 0),resolve:t=>qe(e,t)})}function Hl(e,t){return Ht(t?Gt(e,t):[],t)}function mr({inherited:e,onReset:t,label:n}){return i(y,{words:S()?.panel,label:l(n),changed:!e,detail:A(l("Full"),l("the page")),onReset:t})}function F({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:a,hideable:s=!0,markup:c=!0}){const{text:u,hidden:f}=Ie(e),m=z(null),p=z(null),d=O=>t(s?{text:O,hidden:f}:O),g=()=>t({text:u,hidden:!f}),x=s&&f,E=Ce(),C=r?Sr(r)?i("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(r)}):i(Mt,{children:l(r)}):void 0,j=f?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return i(h,{label:l(n),icon:i(pn,{}),htmlFor:E,className:x?"is-hidden":void 0,hint:C,action:s?i(q,{content:j,children:i($e,{"aria-pressed":f,"aria-label":j,onClick:g,children:f?i(Ve,{name:"eye-off",size:14}):i(Ve,{name:"eye",size:14})})}):void 0,children:N("div",{className:"sf-copybox",children:[c&&i(ze,{target:a?p:m,value:u,onChange:d}),a?i("textarea",{id:E,ref:p,value:u,placeholder:o===void 0?void 0:l(o),onChange:O=>d(O.target.value)}):i("input",{id:E,ref:m,type:"text",value:u,placeholder:o===void 0?void 0:l(o),onChange:O=>d(O.target.value)})]})})}function Ml(e,t){return{...e,[Te]:t}}function Kl(e){const t=e[w];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[w]:{...t,offPage:!0}}}function Wl(e){return!e||typeof e!="object"?!1:e[w]?.offPage===!0}const st="sfPanelOnly";function Ul(e){if(!e[w])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[st]:!0}}function $l(e){return!!e&&typeof e=="object"&&e[st]===!0}function Xl(e){const t=e[w];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[w]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as ns,SCALAR_TEXT_CONTROLS as os}from"efficient-easel/draw";function jl(e,t){if(!e[w])throw new Error("inOwnBox: the field holds no authored text");const{[Yn]:o,...r}=e;return{...r,[qn]:!0,render:t}}const hr=new Set(lo),$={type:"radio",options:[{value:!0},{value:!1}]},ct={text:{type:"object",objectFields:{text:{type:"text"},hidden:$}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:$}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},k=(e,t)=>{const n=R({...t,[w]:e},{...ct[e.control],label:e.label});if(!hr.has(e.control))return n;const o=t.render;return{...Ye(n,"authored-copy"),render:r=>i(Qn,{name:r.name,children:o(r)})}},zl="Everything else on this block comes from the linked post. Unlink it to edit by hand.",gr={field:"source.slug",set:!0},Yl={not:gr},br="Select a word, then press the highlighter.",xr=new Set([br]),Sr=e=>xr.has(e);function Vl(e,t,n){return k({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(F,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function ql(e,t,n){return k({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(F,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function Zl(e,t,n){return k({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(F,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function Jl(e,t,n){return k({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(F,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function Ql(e){return{type:"custom",[Ee]:{label:e},...R({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(po,{value:Re(t),onChange:n,label:e})}}function ea(e,t,n){return k({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(F,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const ta={Design:Ut,Animation:Xt};function na(e){return{type:"custom",render:()=>i(yr,{text:e})}}function yr({text:e}){return i("p",{className:"sf-note",children:l(e)})}function oa(e){return ie(e)!==null&&e?.tabs!==void 0}const dt=new Map;function ra(e,t){const n=`${e}\0${t?t.join(""):""}`,o=dt.get(n)??{type:"custom",tabs:t,[re]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(T,{})};return dt.set(n,o),o}const ut=new Map;function ia(e){const t=ut.get(e)??{type:"custom",[re]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(T,{})};return ut.set(e,t),t}function Cr(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function la(e,t){return Cr(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(T,{})}}function aa(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(T,{})}}function sa({title:e,children:t}){const[n,o]=H(()=>!ge.has(e));return i(yn,{title:e,open:n,onToggle:r=>{o(r),r?ge.delete(e):ge.add(e)},children:t})}const ge=new Set;function ca({label:e}){return i(Cn,{title:l(e),level:er(2)})}function pt({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),a=r?o?.[r]:void 0,s=a?l(a):t;return N("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?l(o[c]):c;return i(q,{content:u,children:i(Dn,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:s})]})}function da(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=jo(n,t);return i(h,{label:l(e),icon:i(jt,{}),changed:!r,action:i(y,{words:S()?.panel,label:l(e),changed:!r,detail:l("the theme's section background"),onReset:()=>o(Wo)}),children:pt({swatches:Uo,current:r?Xo:n??t??"",onPick:o,names:$o})})}}}function _r(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,a=Ho(r,t);return i(h,{label:l(e),icon:i(Ne,{}),changed:!a,action:i(y,{words:S()?.panel,label:l(e),changed:!a,detail:l("the theme's image stage"),onReset:()=>o(vo)}),children:pt({swatches:Go,current:a?Ko:Mo(r,t),onPick:o,names:Do})})}}}function ua(e=n=>n,t){return W({_gSectionTheme:_(zo),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(co,{value:e(n),onChange:o,followLabel:t})}})}function X({min:e,max:t,step:n,value:o,onChange:r,suffix:a="",readout:s=!0,notch:c,ariaLabel:u,disabled:f=!1}){const m=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:m?"sf-slider has-notch":"sf-slider",style:m?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i($n,{min:e,max:t,step:n,value:o,suffix:a||void 0,showInput:s,label:u===void 0?void 0:l(u),disabled:f,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:p=>{p!==null&&p!==o&&r(p)}})})}function ft(e,t){const{min:n,max:o,step:r=1,unsetLabel:a,hint:s,restTrack:c,unsetMark:u,icon:f,unit:m="px"}=t;return{type:"custom",render:({value:p,onChange:d})=>{const g=typeof p=="number"?p:null,x=g===null;return i(h,{label:l(e),icon:f?K(f):void 0,value:x?u||a===void 0?void 0:l(a):`${g}${m}`,changed:!x,action:u?ye(u,{changed:!x,onReset:()=>d(null)}):i(y,{words:S()?.panel,label:l(e),changed:!x,onReset:()=>d(null)}),hint:typeof s=="string"?l(s):s,children:c?c({min:n,max:o,step:r,px:g,label:e,onChange:d}):X({min:n,max:o,step:r,value:g??n,readout:!1,ariaLabel:e,onChange:d})})}}}const Q="Corners";function be(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,r=o!==null;return i(h,{label:l(Q),icon:i(Vt,{}),changed:r,action:ye(e.mark,{changed:r,onReset:()=>n(null)}),hint:e.hint,children:i(Ir,{tier:e,px:o,onRadius:n})})}}}function L(e){const t=Y();return[t?.values?.[e],n=>t?.onChange(e,n)]}function mt(){return Ye({type:"custom",render:()=>i(Vn,{})},"always")}function wr(){const e=Y();return t=>e?.onChangeMany(t)}function Ir({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),[r,a]=L(e.sidesKey),s=Ue(r)??[...We];return i(Gn,{label:l(Q),value:s,corners:hn,onChange:c=>{const u=Ue(c)??[];a(u.length===We.length?null:u)},radius:t,onRadiusChange:n,radiusMin:v,radiusMax:Ae,radiusStep:e.step??1,radiusPlaceholder:String(o)})}function ht(){return mt()}function Rr({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=P(),r=typeof o=="number"?`${o}px`:l("not set");return i(y,{words:S()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):A(r,l("Styles")),onReset:n})}function Er(){const{cornerRadiusPx:e}=P();return typeof e=="number"?e:v}function Or(){return be({sidesKey:"sectionCornerSides",useFollowed:Er,mark:i(Rr,{label:Q}),hint:Tr})}const Tr="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function pa(){return W({_gShape:_("Shape"),sectionCorners:Or(),sectionCornerSides:ht(),sectionBorder:gt("desktop"),sectionBorderPhone:gt("mobile")})}const Pr=()=>({width:l("Border width"),sides:{top:l("Border top"),right:l("Border right"),bottom:l("Border bottom"),left:l("Border left")},style:l("Border style"),styles:{solid:l("Solid"),dashed:l("Dashed"),dotted:l("Dotted")},color:l("Border color"),unit:"px"});function Ar(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function Fr(){let e;try{const t=tt(P().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||et.line}function kr({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:a=!0,above:s={}}){const c=e&&typeof e=="object"?e:{},[u,f]=H(()=>r?En(c,s):!1),m=Pr(),p=d=>Ar(r&&a?d:{width:d.width,color:d.color,...a?{style:d.style}:{}});return i(h,{label:l("Border"),icon:i(zt,{}),action:r?i(In,{each:u,label:l("Each side"),onChange:f}):void 0,children:i(wn,{label:l("Border"),value:c,each:u,onChange:d=>t(p(d)),placeholder:n,presets:o,words:m,styles:a,max:Fo})})}function Lr({value:e,onChange:t,tier:n}){const[o]=L("sectionBorder"),r=Fr(),a=n==="mobile"?o&&typeof o=="object"?o:{}:{};return i(kr,{value:e,onChange:t,placeholder:{sides:Rn(a),style:a.style??"solid",color:a.color||r},presets:[r],above:a})}function gt(e){return b(e,{type:"custom",render:({value:t,onChange:n})=>i(Lr,{value:t,onChange:n,tier:e})})}function fa(e){return{type:"custom",render:()=>i(Nr,{partKey:e})}}function Nr({partKey:e}){const[t]=L("id"),[n]=L("_partStyles"),{textStyles:o}=P(),r=bo();let a=null;try{a=mo().select}catch{a=null}const s=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(Sn,{name:l("Text"),preview:fo(s,c,{noStyle:l("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??go.copy.panel).cases}),onOpen:()=>{a&&typeof t=="string"&&a(ho(t,e))}})}function bt(e){const{cornerRadiusPx:t}=P(),n=typeof t=="number"?t:e;let o=null;try{const{appState:a,selectedItem:s}=oe(u=>u),c=s?.props?.id?String(s.props.id):void 0;o=c?xn(a?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return gn(r)?r:n}function vr({label:e,changed:t=!1,onReset:n=()=>{}}){const o=bt(v);return i(y,{words:S()?.panel,label:l(e),changed:t,detail:A(`${o}px`,l("the section")),onReset:n})}function Br(){return i(T,{children:l("Follows the section's Corners until you set a number here.")})}function Dr(){return be({sidesKey:"cardCornerSides",useFollowed:()=>bt(v),mark:i(vr,{label:Q}),hint:i(Br,{})})}function Gr(){return{type:"custom",render:()=>i(Tt,{})}}function ma(e){return{...e,render:t=>i(Pt,{render:e.render,props:t})}}function ha(){return{_gShape:_("Shape"),cardCorners:Dr(),cardCornerSides:ht(),cardCornersApplyAll:Gr()}}function Hr(e=Ao,t=e[0].value){return R({type:"custom",render:({value:n,onChange:o})=>{const r=e.find(a=>a.value===n)??e.find(a=>a.value===t)??e[0];return i(h,{label:l(de),icon:i(ke,{}),value:l(r.label),children:i(Wn,{className:"sf-gallery-layouts",label:l(de),value:r.value,onChange:o,options:e.map(a=>({value:a.value,label:l(a.label),picture:i("span",{className:"sf-gallery-pic",children:Mr(a.weights).map((s,c)=>i("i",{style:{gridColumn:`span ${s}`}},c))})}))})})}},{type:"select",label:de,options:e.map(n=>({value:n.value,label:n.label}))})}function Mr(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 ga(){return U(Ro,i(tn,{}),Ze,Ze[0].value)}function ba(){return b("mobile",Hr(Po,To))}function Kr(){return b("mobile",D(Je,i(Le,{}),ce,Oo,1,ce,"",{clear:{phoneFollows:!1,hint:ce}}))}const xt={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function xa(){const e=D(Je,i(Le,{}),Qe,Eo,1,Qe,"",{clear:{emptyLabel:"Auto"}}),t=lt("columns",e,{...xt,tablet:rr.tablet}),n=lt("columns",e,xt,{phoneRow:Kr()});return{...t,phoneRow:n.phoneRow}}function Sa(e,t,n,o,r,a){return{type:"custom",render:({value:s,onChange:c})=>i(h,{label:l(e),icon:i(Ke,{noun:a}),action:i(y,{words:S()?.panel,label:l(e),changed:!qo(s),detail:l("the Text style in Styles"),onReset:()=>c(Vo),defaultAction:{onPress:()=>c(Yo),title:l("Keep this section's own built-in size"),icon:i(Yt,{})}}),children:X({min:t,max:n,step:o,value:typeof s=="number"?s:r,suffix:"px",ariaLabel:e,onChange:c})})}}function ya(){return{_gCellWidth:_("Cell width"),gridSpan:U("Positions",i(ke,{}),[{label:"Auto",value:""},...Array.from({length:Lt},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function G(){let e=null,t=null;try{e=_t(Wr),t=oe(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Wr=Ct(null);function Ur({min:e,max:t,step:n,px:o,label:r,onChange:a,desktopKey:s,fallback:c}){const u=G()[s],f=ae(void 0,u,c);return i(T,{children:X({min:e,max:t,step:n,value:ae(o,u,c),readout:!1,ariaLabel:r,notch:f,onChange:a})})}function $r({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:a=()=>{}}){const s=G()[t],c=ae(void 0,s,n);return i(y,{words:S()?.panel,label:l(e),changed:r,detail:l("{value} on desktop",{value:`${c}${o}`}),onReset:a})}function Xr(e){return ft(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i($r,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(Ur,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const jr={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},zr={Top:Me,Bottom:De,Left:Ge,Right:He},Yr=e=>{const t=zr[e];return i(t,{})};function Ca(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=C=>jr[C],a=C=>D(r("Top"),i(Me,{}),I.min,I.max,I.step,C,"px"),s=(C,j,O,ne=I)=>b("mobile",Xr({label:r(C),icon:Yr(C),desktopKey:j,min:ne.min,max:ne.max,step:ne.step,fallback:O})),c=e.top??I.min,u=e.bottom??I.min,f="sectionPaddingLeft",m="sectionPaddingRight",p=e.sideBounds??I,d=e.side??p.min,g=e.sidePhone??d,x=e.phone===!0,E=C=>x?b("desktop",C):C;return W({...o?{_gSpacing:_("Padding")}:{},[t]:E(a(c)),...x?{[B(t)]:s("Top",t,c)}:{},...e.only==="top"?{}:{[n]:E(D(r("Bottom"),i(De,{}),I.min,I.max,I.step,u,"px")),...x?{[B(n)]:s("Bottom",n,u)}:{}},...e.sides?{[f]:E(D(r("Left"),i(Ge,{}),p.min,p.max,p.step,d,"px")),...x?{[B(f)]:s("Left",f,g,p)}:{},[m]:E(D(r("Right"),i(He,{}),p.min,p.max,p.step,d,"px")),...x?{[B(m)]:s("Right",m,g,p)}:{}}:{}})}function _a(e,t){const n=Object.fromEntries(Object.entries(t).map(([a,s])=>[a,a in e&&ie(s)?e[a]:s])),o={};let r=!1;for(const[a,s]of Object.entries(e)){if(a in t){r||Object.assign(o,n),r=!0;continue}o[a]=s}return r||Object.assign(o,n),o}const ee="Width";function wa(e,t=Zo,n=!0){const o=t.map(r=>({label:Jo[r],value:r}));return W({...n?{_gWidth:_(ee)}:{},widthMode:{type:"custom",render:({onChange:r,field:a})=>i(h,{label:l(ee),icon:i(fn,{}),action:n?i(mr,{inherited:a?.inherited??!1,onReset:()=>r(Qo),label:ee}):void 0,children:he({options:o,value:a?.currentValue||e,onChange:r,ariaLabel:ee})})}})}function Ia(){const e=o=>({type:"custom",render:({value:r,onChange:a})=>i(h,{label:M,icon:K(i(on,{})),action:o?o(a):void 0,children:he({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(r)?r:"auto",onChange:a,ariaLabel:M})})}),t=()=>({type:"custom",render:({value:o,onChange:r,field:a})=>{const s=a?.unit==="%"?"%":"px",c=s==="%"?wo:_o;return i("div",{className:"sf-field",children:X({min:c.min,max:c.max,step:c.step,value:typeof o=="number"?o:c.fallback,suffix:s,ariaLabel:M,onChange:r})})}}),n=()=>lr("Unit",i(ve,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return W({_gHeight:_(M),sectionHeightMode:b("desktop",e()),sectionHeightValue:b("desktop",t()),sectionHeightUnit:b("desktop",n()),sectionHeightModePhone:b("mobile",e(o=>i(Vr,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:b("mobile",t()),sectionHeightUnitPhone:b("mobile",n())})}function Vr({onClear:e}){const t=G(),n=xo(t),o=So(t),r=l("{value} on desktop",{value:o.mode==="auto"?l("Auto"):`${o.value}${o.unit}`});return i(y,{words:S()?.panel,label:l(M),changed:n,detail:r,onReset:e})}function Ra(){const e=n=>({type:"custom",render:({value:o,onChange:r,id:a,name:s})=>i(qr,{value:o,onChange:r,labelId:`${a??s??"stickTop"}-label`,phone:n})}),t=()=>({type:"custom",render:({value:n,onChange:o})=>i("div",{className:"sf-field",children:X({min:Z.min,max:Z.max,step:Z.step,value:typeof n=="number"?n:Z.fallback,suffix:"px",ariaLabel:l("Distance from top"),onChange:o})})});return{_gStick:_(se),stickTop:b("desktop",e(!1)),stickTopDistance:b("desktop",t()),stickTopPhone:b("mobile",e(!0)),stickTopDistancePhone:b("mobile",t())}}function qr({value:e,onChange:t,labelId:n,phone:o}){const r=G(),a=Co(r),s=o?a.phone:e===!0;return i(h,{label:l(se),labelId:n,icon:K(i(sn,{})),action:N(T,{children:[o?i(y,{words:S()?.panel,label:l(se),changed:yo(r),detail:l("{value} on desktop",{value:a.desktop?`${a.desktopDistance}px`:l("Off")}),onReset:()=>t(void 0)}):null,i(le,{checked:s,onChange:t,ariaLabelledBy:n})]})})}const St="e.g. about";function Ea(){return{_gAnchor:_("Anchor"),anchor:k({control:"plainText",label:"Name",placeholder:St},{type:"custom",render:({value:e,onChange:t})=>i(Wt,{value:e,onChange:t,nameBox:(n,o)=>i(F,{value:n,onChange:o,label:"Name",placeholder:St,hideable:!1,markup:!1})})})}}function Oa(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:a,name:s})=>{const c=`${a??s??e}-datetime`,u=Date.parse(typeof o=="string"?o:"");return i(h,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(Mn,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:f=>r(f?f.toISOString():"")})})}}}function Ta(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:a,name:s})=>{const c=`${a??s??e}-date`;return i(h,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(Hn,{id:c,value:Rt(typeof o=="string"?o:null),onChange:u=>r(u?It(u):"")})})}}}function yt(e,t,n,o){return{type:"custom",...R({},{...$,label:e}),render:({value:r,onChange:a,id:s,name:c})=>{const u=typeof r=="boolean"?r:t,f=`${s??c??e}-label`;return i(h,{label:l(e),labelId:f,icon:n,hint:o===void 0?void 0:l(o),action:i(le,{checked:u,onChange:a,ariaLabelledBy:f})})}}}function Pa(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(je,{label:l("Background"),icon:i(an,{}),id:r,value:mn(e),onChange:t})}}}function Aa(e,t){return{type:"custom",...R({},{...$,label:e}),render:({value:n,onChange:o,id:r})=>{const a=typeof n=="boolean"?n:t,s=`${r??e}-checkbox`;return i(h,{label:l(e),htmlFor:s,className:"sf-checkbox",action:i(Bn,{id:s,checked:a,onChange:o})})}}}function Fa(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(je,{label:l(e),icon:n,value:o||t,onChange:r})}}function ka(){return{type:"custom",render:({value:e,onChange:t})=>i(Zr,{value:typeof e=="string"?e:"",onChange:t})}}function Zr({value:e,onChange:t}){const{hex:n,n:o}=Qr();return i(jn,{label:l("Fill"),icon:i(Ne,{}),value:e,inherited:n,resetTo:A(n.toUpperCase(),l("Theme {n} background",{n:o})),onChange:t,onReset:()=>t("")})}function Jr(e,t,n){if((e?.content??[]).some(s=>s?.props?.id===t))return J(n);const r=bn(e,t);if(r.length===0)return null;const a=J(it(n));if(a!==null)return a;for(let s=r.length-1;s>0;s-=1){const c=J(it(r[s].sectionAccent));if(c!==null)return c}return J(r[0].sectionAccent)}function Qr(){const e=tt(P().theme),[t]=L("sectionAccent");let n=null;try{const{appState:r,selectedItem:a}=oe(c=>c),s=a?.props?.id?String(a.props.id):void 0;n=s?Jr(r?.data,s,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{hex:e.themes[o].background??et.background,n:o+1}}const ei=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function ti({label:e,value:t,onChange:n,points:o=ei}){const r=o.map(a=>({...a,label:l(a.label),...a.title?{title:l(a.title)}:null}));return i(vn,{label:l(e),value:t,points:r,onChange:n})}function La(){return mt()}const Na={top:i(Qt,{}),right:i(Jt,{}),bottom:i(qt,{}),left:i(Zt,{})};function va(e,t,n,o,r,a){const s=m=>t.find(p=>p.value===m),c=m=>({value:m,label:"",disabled:!0,title:o}),u=m=>{const p=t.find(g=>g.cell===m);if(!p)return c(`missing-${m}`);const d=a?.[m];return d?{value:p.value,label:p.label,icon:d}:{value:p.value,label:p.label}},f=[c("corner-top-left"),u("top"),c("corner-top-right"),u("left"),c("centre"),u("right"),c("corner-bottom-left"),u("bottom"),c("corner-bottom-right")];return{type:"custom",render:({value:m,onChange:p})=>{const d=t.some(g=>g.value===m)?m:n;return i(h,{label:l(e),icon:r,value:s(d)?.label?l(s(d).label):"",children:ti({label:e,value:d,onChange:p,points:f})})}}}function Ba(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:a})=>i(so,{label:e,options:(a.options??t).map(s=>({...s,label:l(s.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:l(n)}:{}})}}function Da(e,t,n,o){return{type:"custom",options:t,fallback:n,...R({},{type:"select",label:e}),render:({value:r,onChange:a,field:s})=>i(uo,{label:e,options:(s.options??t).map(c=>({...c,label:l(c.label)})),fallback:s.fallback??n,value:r,onChange:a,placeholder:o===void 0?void 0:l(o)})}}function Ga(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const Ha=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function Ma(e,t,n){const o=Object.keys(we).map(r=>({label:we[r],value:r,picture:n[r]}));return{type:"custom",...R({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(ni,{label:e,icon:t,options:o,onChange:r})}}function ni({label:e,icon:t,options:n,onChange:o}){const r=Y()?.values??{},a=Et(r),s=a==="frame"&&!!_e(r.mediaVideo)&&!_e(r.videoFrame);return i(h,{label:l(e),icon:K(t),hint:s?l("This video has no frame yet. The slide shows its background colour until one is made."):void 0,children:he({options:n,value:a,onChange:o,ariaLabel:e})})}function Ka(e,t,n,o={}){return{type:"custom",[Oe]:!0,render:({value:r,onChange:a,name:s})=>i(ao,{value:r||"",onChange:a,fieldKey:s,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame})}}const Wa={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function oi(e){const t=l(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function Ua({value:e,onChange:t,label:n}){const o=e||{},r=Y(),a=r?r.values!==r.node.props:!0,s=!!o.pending&&a,c=!!o.pending&&!a,u=s?"var(--ink-faint)":o.ok&&!c?"var(--status-success-soft-ink)":"var(--status-danger-soft-ink)",f=!!nr(tr()).geocode,m=Ce(),p=(d,g)=>t({...o,[d]:g??void 0});return N(T,{children:[i(h,{label:l(n),icon:i(Be,{}),action:f?i(q,{content:l("Find from the address (OpenStreetMap)"),children:i($e,{"aria-label":l("Find from the address"),"aria-busy":s||void 0,disabled:s,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(dn,{})})}):void 0,children:f&&o.status?i(q,{content:oi(o),className:"sf-name-tip",children:i("div",{className:`es-field-hint ${Kt}`,style:{margin:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",minWidth:0,color:u},children:s?l("Finding…"):c?l(Xn):l(o.status)})}):null}),i(h,{label:l("Enter by hand"),labelId:m,icon:i(en,{}),action:i(le,{checked:!!o.manual,onChange:d=>t({...o,manual:d}),ariaLabelledBy:m})}),o.manual&&i(h,{label:l("Latitude, longitude"),icon:i(Be,{}),children:N("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(Xe,{value:typeof o.lat=="number"?o.lat:null,onChange:d=>p("lat",d),min:-90,max:90,step:1e-4,placeholder:l("Latitude")}),i(Xe,{value:typeof o.lng=="number"?o.lng:null,onChange:d=>p("lng",d),min:-180,max:180,step:1e-4,placeholder:l("Longitude")})]})})]})}function ri(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function ii(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,a)=>a===t?{text:n}:r)}function $a(e,t){return e===null?null:t>e?e:null}function li(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 Xa={label:"Ticker items",icon:i(ln,{})};function ja(e,t,n,o){return{type:"custom",[w]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...R({},{...ct.textList,label:e}),render:({value:r,onChange:a})=>i(ai,{label:e,icon:K(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:a,markup:o==="markup"})}}function ai({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:a=!1}){const s=z(null),[c,u]=H(null),f=p=>p.map(d=>({text:d?.text??""})),m=p=>{const d=li(n,p,c);d===null&&(s.current=null),u(d),r(f(p))};return i(On,{label:l(e),icon:t,noun:l("item"),items:n,onChange:m,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:a?i(ze,{target:s,value:ri(n,c),onChange:p=>r(ii(n,c??-1,p)),disabled:c===null,label:c===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,d,g)=>i("input",{type:"text",className:a&&c===d?"sf-list-marking":void 0,value:p?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:d+1}),onChange:x=>g({text:x.target.value}),onFocus:x=>{s.current=x.currentTarget,u(d)}})})}function za(e,t){const n=`${e.label} — row ${t+1}`;return k({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(F,{value:o,onChange:r,label:l("{label} — row {n}",{label:l(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function Ya(e){return{_gCards:_("Cards"),coverIndex:U("Cover image",i(rn,{}),ro,String(io),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:_r("Image background",Bo),cardImage:di(),spinOnHover:yt("Rotate on hover",e?.spinDefault??!0,i(cn,{}))}}function Va(){return{outline:U("Card outline",i(un,{}),to,oo),indexBadge:U("Card number",i(ve,{}),eo,no),showBadge:yt("Product badge",!0,i(Ke,{noun:"tag"}))}}function qa(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...$,label:te.find(a=>a.id===r).label}),o=r=>R(zn(xe),n(r));return{_gShowOnCard:_("Show on a card"),[xe]:R({type:"custom",render:()=>i(si,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(xe)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const xe="showCardPrice",te=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function si({rest:e}){const t=G(),n=wr(),o=s=>typeof t[s]=="boolean"?t[s]:void 0,r=s=>o(s)??e[s],a=te.some(({id:s})=>o(s)!==void 0&&o(s)!==e[s]);return i(Se,{parts:te,changed:a,shown:r,onPress:(s,c)=>n({[s]:c}),onReset:()=>n(Object.fromEntries(te.map(({id:s})=>[s,void 0])))})}function Za(e,t="display"){const n=B(t);return{[t]:b("desktop",{type:"custom",render:({value:o,onChange:r})=>i(Se,{parts:e,changed:Pn(o),shown:a=>An(o,a),onPress:(a,s)=>r(Ln(o,a,s)),onReset:()=>r(void 0)})}),[n]:b("mobile",{type:"custom",render:({value:o,onChange:r})=>i(ci,{parts:e,desktopKey:t,value:o,onChange:r})})}}function Se({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:a,disabledReason:s}){const c=l("Display");return i(h,{label:c,icon:i($t,{}),changed:t,action:i(y,{words:S()?.panel,label:c,changed:t,detail:a,onReset:r}),children:i(Tn,{label:c,items:e.map(u=>({id:u.id,label:l(u.label),shown:n(u.id),...s?{disabled:!0,disabledReason:l(s)}:{}})),onChange:o})})}function ci({parts:e,desktopKey:t,value:n,onChange:o}){const r=G()[t];return i(Se,{parts:e,changed:kn(n),shown:a=>Fn(r,n,a),onPress:(a,s)=>o(Nn(n,a,s)),onReset:()=>o(Zn),detail:l("the same as Desktop")})}function di(){return ft("Card image",{min:v,max:Ae,step:At,hint:"Rounds the picture. The card's own corner is in Styles."})}function Ja(){return be({sidesKey:"cornerSides",step:Ft,useFollowed:()=>v,mark:i(ui,{label:kt}),hint:l("Rounds the picture. Left alone it stays square.")})}function ui({label:e,changed:t=!1,onReset:n=()=>{}}){return i(y,{words:S()?.panel,label:l(e),changed:t,onReset:n})}function Qa(){return{type:"custom",render:({value:e,onChange:t})=>i(hi,{value:typeof e=="string"?e:"",onChange:t})}}function pi({layout:e,width:t}){return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:6,gridAutoFlow:"row dense",gap:2},children:Bt(e).map(([n,o],r)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${n}`,gridRow:`span ${o}`}},r))})}const fi={width:"3.5rem",height:"2.5rem"},mi=200;function hi({value:e,onChange:t}){const[n,o]=H(null),[r,a]=H(4),s=z(null);wt(()=>{const d=s.current;if(!d||typeof ResizeObserver!="function")return;const g=()=>a(d.getBoundingClientRect().width>=mi?4:3);g();const x=new ResizeObserver(g);return x.observe(d),()=>x.disconnect()},[]);const c=e&&e in V?e:"",u=Fe(n,c),f=Fe(n,"").length,m=Dt("no-symbol"),p=[{value:"",label:l("Not chosen"),icon:m},...u.map(d=>({value:d,label:l(V[d].label),icon:i(pi,{layout:V[d],width:40})}))];return i(h,{label:l("Layout"),icon:i(nn,{}),value:c?l(V[c].label):void 0,children:i("div",{ref:s,style:{flex:"1 1 auto",minWidth:0},children:i(Un,{label:l("Layout"),value:c,emptyValue:"",options:p,onChange:t,columns:r,cell:fi,header:N("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:l("Photos in a row")}),i(_n,{options:[{id:"all",label:l("All")},...Nt.map(d=>({id:String(d),label:String(d)}))],value:n===null?"all":String(n),ariaLabel:l("Photos in a row"),onChange:d=>o(d==="all"?null:Number(d))}),i("span",{className:"text-2xs text-ink-faint",children:l("{n} of {total} layouts",{n:f,total:vt.length})})]})})})})}export{gr as BOUND_TO_POST,zl as BOUND_TO_POST_NOTE,ta as BUCKET_ICONS,Wa as CUSTOM_FIELD_MEDIA,Ua as CoordsField,at as DESKTOP_GAP_NOT_OVERLAP,Se as DisplayRow,Na as EDGE_ARROWS,Kn as FOCAL_DEFAULT,ei as FOCAL_POINTS,re as FOLD_FIELD_MARKER,ti as FocalPicker,ca as GroupLabel,br as HIGHLIGHT_HINT,F as HidableTextField,Ee as LINK_FIELD_MARKER,Bl as Label,Oe as MEDIA_FIELD_MARKER,Ha as MEDIA_TYPE_OPTIONS,Yl as NOT_BOUND_TO_POST,sa as PanelBand,yr as PanelNoteLine,Wr as RowPropsContext,Te as SCAFFOLD_FIELD_MARKER,os as SCALAR_TEXT_CONTROLS,sr as SiteGapDefaultReset,X as Slider,pt as Swatches,ns as TEXT_CONTROL_KINDS,w as TEXT_FIELD_MARKER,Xa as TICKER_ITEMS_ROW,ai as TextListField,ee as WIDTH_LABEL,mr as WidthDefaultReset,li as aimAfterListChange,Ea as anchorFields,A as backTo,da as backgroundField,ga as boxBlockSpacingField,xa as boxColumnsFields,ka as boxFillField,Kr as boxPhoneRowField,Hr as boxShareField,ba as boxSharePhoneField,Jr as boxThemeIndexOf,ra as bucketHeader,fa as buttonWordsEntryField,Dr as cardCornersField,_r as cardImageBackgroundField,di as cardImageField,Ya as cardMediaFields,ha as cardShapeFields,qa as cardShowFields,Va as cardStyleFields,ya as cellWidthFields,Aa as checkbox,Fa as colorInput,Gl as containerDirectionField,cr as containerGapField,dr as containerGapPhoneField,Dl as containerGapRows,ur as containerGapTabletField,oi as coordsResultTip,Jl as copyText,ht as cornerSidesField,be as cornersRowField,Ta as date,Oa as dateTime,ia as designGroupHeader,Za as displayFields,va as edgePad,$a as focusAfterRemove,La as focusKeptField,la as foldMarker,ie as foldMetaOf,Cr as foldTitleOf,Qa as galleryLayoutField,Ia as heightFields,Hl as heroGroupPlacementPoints,Re as hidableText,Sr as hintIsWhileTyping,Ja as imageCornersField,jl as inOwnBox,oa as isBucketHeader,mt as keptBy,Ql as linkField,Ma as loadingShowsField,Ba as multiSelect,Pa as pageBackgroundField,na as panelNote,Xr as phoneOverrideField,Zl as plainText,ea as plainTextarea,ft as pxField,aa as quietMarker,Ie as readHidable,ri as rowText,Da as searchSelect,gt as sectionBorderField,Or as sectionCornersField,pa as sectionShapeFields,ua as sectionThemeFields,ii as setRowText,Sa as sizeField,Ga as sourceField,Ca as spacingFields,Ra as stickFields,_a as swapPadding,ma as templateField,Vl as text,Ot as textFieldIdentifier,Wl as textFieldOffPage,$l as textFieldPanelOnly,ja as textList,za as textListRowField,ql as textarea,yt as toggle,Ka as upload,wr as useSelectedPatch,G as useSelectedProps,L as useSelectedSibling,ar as useSiteGapDetail,wa as widthField,Xl as withIdentifier,Kl as withOffPage,Ul as withPanelOnly,Ml as withScaffold};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,cardStyleFields as W,designGroupHeader as F,foldMarker as z,foldMetaOf as h,quietMarker as q,heightFields as E,sectionShapeFields as w,sectionThemeFields as O,stickFields as x,widthField as D}from"./controls.js";import{group as J}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as T}from"./box-fields.js";import{deviceField as Q,deviceMetaOf as P}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as B}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as V}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"efficient-easel/screen/lib/document/field-buckets";const A=V;function X(e){return e==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content",Display:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Search:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content","Source 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","Text style":"Design",Entrance:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[Z]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},$={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},G={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,o){const a=`${e}.${t}`;return G[a]??$[a]??I[o]}function ge(e,t,o){const a=_(e,t,o);return a?X(a):void 0}function H(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const o of e)for(const a of Object.values(o)){const C=P(a),g=h(C?C.inner:a),l=g?I[g.label]:void 0;if(l)for(const p of H(l))t.includes(p)||t.push(p)}return t}const pe=[...S(T(),D("full"),E(),m(),x()),...Object.keys(T()),...Object.keys(D("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x())],ye=[...S(O()),...Object.keys(O())],ke=[...S(w()),...Object.keys(w())],_e=[...S(B()),...Object.keys(B())],ee=Object.keys(Y()),te=new Set(["cardImage","imageBackground"]),Se=[...H(_("ProductGrid","_gCards","Cards")??"Design"),...ee.filter(e=>e.startsWith("_g")||te.has(e))],ve=Object.keys(W()),fe=Object.keys(U()),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...T(),...D("full"),...E(),...m(),...O(),...w(),...B()};for(const t of Object.keys(M)){const o=h(e[t]),a=o?I[o.label]:void 0;if(!o||o.level!==2||!a||!K[a].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const oe=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function me(e){const t=new Set([...Object.values(d),b.Content]);for(const[o,a]of Object.entries(e))if(!t.has(o)&&h(a)?.level===1)return 1;return 2}function ie(e){const t=`${e}.`;return Object.keys(ne).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function re(e,t){const o=P(e),a=J(t);return o?Q(o.tier,a):a}function de(e,t){const o=h(t);return o?e==="Content"||e==="Animation"?z(t,o.label):q(t):t}function j(e){return e==="Design"?k:["Animation"]}function Le(e,t){const o=[],a=new Set(ie(t)),C=new Set;let g=!1,l=null;for(const[n,r]of Object.entries(e)){const i=h(r);if(oe.has(n))throw new Error(`${t}.${n}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=ae.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(g=!0),o.push(l={place:c,entries:[],adopted:!0});continue}if(!i){l||o.push(l={place:"Content",entries:[]}),l.entries.push([n,r]);continue}if(a.has(n)||n in M){const u=_(t,n,i.label);if(i.level!==2||!u||!K[u].includes(i.label))throw new Error(`${t}.${n}: ${a.has(n)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${u??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(n)&&C.add(n),o.push(l={place:u,entries:[]});continue}const s=_(t,n,i.label);if(!s)throw new Error(`${t}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(l={place:s,entries:[[n,i.level===2?r:re(r,i.label)]]})}const p=new Set(Object.entries(e).filter(([,n])=>h(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",G],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!p.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${n} (lib/document/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=g?[]:[...a].filter(n=>!C.has(n));if(v.length)throw new Error(`${t}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const R=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=A.filter(n=>j(n).some(r=>R.has(r))),y={};for(const n of f){y[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!R.has(r))continue;const i=o.filter(s=>s.place===r),c=i.findIndex(s=>s.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(y[b[r]]=F(r));for(const s of i)for(const[u,N]of s.entries)y[u]=de(r,N)}}return y}function Ee(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:F("Content"),...e}}function we(e){return A.some(t=>d[t]in e)}function Oe(e){const t=A.filter(a=>d[a]in e);if(t.length===0)return e;const o={...e};for(const a of t)o[d[a]]=L(a,a===t[0]?t:null);return o}export{G as BLOCK_KEY_GROUP,Se as BOUND_CARD_MEDIA_FIELD_KEYS,A as BUCKETS,d as BUCKET_KEY,ee as CARD_MEDIA_FIELD_KEYS,fe as CARD_SHOW_FIELD_KEYS,ve as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,$ as KEY_GROUP,I as LABEL_GROUP,pe as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,_e as SECTION_ANIM_FIELD_KEYS,ke as SECTION_SHAPE_FIELD_KEYS,ye as SECTION_THEME_FIELD_KEYS,Le as assignSectionGroups,ge as bucketOf,X as bucketOfPlace,me as foldTopTier,we as hasBucketTabs,S as headerKeysOf,H as headerKeysOfPlace,_ as placeOf,Oe as reseatBucketTabs,ie as retiredHeadings,Ee as seatDesignBucket};
|
|
1
|
+
import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,cardStyleFields as W,designGroupHeader as F,foldMarker as z,foldMetaOf as h,quietMarker as q,heightFields as E,sectionShapeFields as w,sectionThemeFields as O,stickFields as x,widthField as D}from"./controls.js";import{group as J}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as T}from"./box-fields.js";import{deviceField as Q,deviceMetaOf as P}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as B}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as V}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"efficient-easel/screen/lib/document/field-buckets";const A=V;function X(e){return e==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",I={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content",Display:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Search:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content","Source 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","Text style":"Design",Entrance:"Animation",Hover:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[Z]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},$={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},G={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,o){const a=`${e}.${t}`;return G[a]??$[a]??I[o]}function ge(e,t,o){const a=_(e,t,o);return a?X(a):void 0}function H(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const o of e)for(const a of Object.values(o)){const C=P(a),g=h(C?C.inner:a),l=g?I[g.label]:void 0;if(l)for(const p of H(l))t.includes(p)||t.push(p)}return t}const pe=[...S(T({tablet:!0}),D("full"),E(),m(),x()),...Object.keys(T({tablet:!0})),...Object.keys(D("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x())],ye=[...S(O()),...Object.keys(O())],ke=[...S(w()),...Object.keys(w())],_e=[...S(B()),...Object.keys(B())],ee=Object.keys(Y()),te=new Set(["cardImage","imageBackground"]),Se=[...H(_("ProductGrid","_gCards","Cards")??"Design"),...ee.filter(e=>e.startsWith("_g")||te.has(e))],ve=Object.keys(W()),fe=Object.keys(U()),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const e={...T({tablet:!0}),...D("full"),...E(),...m(),...O(),...w(),...B()};for(const t of Object.keys(M)){const o=h(e[t]),a=o?I[o.label]:void 0;if(!o||o.level!==2||!a||!K[a].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const oe=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function me(e){const t=new Set([...Object.values(d),b.Content]);for(const[o,a]of Object.entries(e))if(!t.has(o)&&h(a)?.level===1)return 1;return 2}function ie(e){const t=`${e}.`;return Object.keys(ne).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function re(e,t){const o=P(e),a=J(t);return o?Q(o.tier,a):a}function de(e,t){const o=h(t);return o?e==="Content"||e==="Animation"?z(t,o.label):q(t):t}function j(e){return e==="Design"?k:["Animation"]}function Le(e,t){const o=[],a=new Set(ie(t)),C=new Set;let g=!1,l=null;for(const[n,r]of Object.entries(e)){const i=h(r);if(oe.has(n))throw new Error(`${t}.${n}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=ae.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(g=!0),o.push(l={place:c,entries:[],adopted:!0});continue}if(!i){l||o.push(l={place:"Content",entries:[]}),l.entries.push([n,r]);continue}if(a.has(n)||n in M){const s=_(t,n,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${n}: ${a.has(n)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(n)&&C.add(n),o.push(l={place:s,entries:[]});continue}const u=_(t,n,i.label);if(!u)throw new Error(`${t}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(l={place:u,entries:[[n,i.level===2?r:re(r,i.label)]]})}const p=new Set(Object.entries(e).filter(([,n])=>h(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",G],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!p.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${n} (lib/document/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=g?[]:[...a].filter(n=>!C.has(n));if(v.length)throw new Error(`${t}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const R=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=A.filter(n=>j(n).some(r=>R.has(r))),y={};for(const n of f){y[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!R.has(r))continue;const i=o.filter(u=>u.place===r),c=i.findIndex(u=>u.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(y[b[r]]=F(r));for(const u of i)for(const[s,N]of u.entries)y[s]=de(r,N)}}return y}function Ee(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:F("Content"),...e}}function we(e){return A.some(t=>d[t]in e)}function Oe(e){const t=A.filter(a=>d[a]in e);if(t.length===0)return e;const o={...e};for(const a of t)o[d[a]]=L(a,a===t[0]?t:null);return o}export{G as BLOCK_KEY_GROUP,Se as BOUND_CARD_MEDIA_FIELD_KEYS,A as BUCKETS,d as BUCKET_KEY,ee as CARD_MEDIA_FIELD_KEYS,fe as CARD_SHOW_FIELD_KEYS,ve as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,$ as KEY_GROUP,I as LABEL_GROUP,pe as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,_e as SECTION_ANIM_FIELD_KEYS,ke as SECTION_SHAPE_FIELD_KEYS,ye as SECTION_THEME_FIELD_KEYS,Le as assignSectionGroups,ge as bucketOf,X as bucketOfPlace,me as foldTopTier,we as hasBucketTabs,S as headerKeysOf,H as headerKeysOfPlace,_ as placeOf,Oe as reseatBucketTabs,ie as retiredHeadings,Ee as seatDesignBucket};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type GeocodeResult } from "../geocode.js";
|
|
2
2
|
import type { GeocodeState } from "../../../format/lib/content/contact.js";
|
|
3
|
+
export declare const LOOKUP_BUSY_NOTE = "Lookup busy \u2014 try again in a moment.";
|
|
3
4
|
export interface Geocodable {
|
|
4
5
|
lat: number;
|
|
5
6
|
lng: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{geocodeAddress as c}from"../geocode.js";const
|
|
1
|
+
import{geocodeAddress as c}from"../geocode.js";const f="Lookup busy — try again in a moment.",g=a=>typeof a=="number"&&Number.isFinite(a);function p(a){return a.some(s=>{const l=s?.geocode;return l?l.pending||l.manual&&l.lat===void 0&&l.lng===void 0?!0:g(l.lat)&&l.lat!==s.lat||g(l.lng)&&l.lng!==s.lng:!1})}async function m(a,s,{geocode:l=c,courtesyGapMs:i=1100}={}){const u=e=>new Promise(n=>setTimeout(n,e));let d=a.slice();if(a.some(e=>e?.geocode?.pending)){const e=[];let n=!1;for(const t of a){if(!t?.geocode?.pending){e.push(t);continue}n&&i>0&&await u(i),n=!0;try{const o=await l(s(t));e.push(o?{...t,lat:o.lat,lng:o.lng,geocode:{...t.geocode,pending:!1,ok:!0,status:`Found — ${o.label.split(",").slice(0,3).join(",").trim()}`,lat:o.lat,lng:o.lng}}:{...t,geocode:{...t.geocode,pending:!1,ok:!1,status:"No match — check the address and try again."}})}catch{e.push({...t,geocode:{...t.geocode,pending:!1,ok:!1,status:f}})}}d=e}return d.map(e=>{const n=e?.geocode;if(!n)return e;if(n.manual&&n.lat===void 0&&n.lng===void 0)return{...e,geocode:{...n,lat:e.lat,lng:e.lng}};const t=g(n.lat)&&n.lat!==e.lat?n.lat:e.lat,o=g(n.lng)&&n.lng!==e.lng?n.lng:e.lng;return t!==e.lat||o!==e.lng?{...e,lat:t,lng:o}:e})}export{f as LOOKUP_BUSY_NOTE,p as needsGeocodeWork,m as resolveGeocodeRows};
|