@charisol/plexo-sdk 2.0.24 → 2.0.26
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/dist/index.js +4 -0
- package/dist/plexo-sdk.css +1 -1
- package/dist/{v1--XVVNQh9.js → v1-CvbzlaB_.js} +916 -785
- package/dist/v2/components/properties/ProductPicker.d.ts +9 -0
- package/dist/v2/data/insertableComponents.d.ts +1 -1
- package/dist/v2/host/HostContext.d.ts +22 -0
- package/dist/v2/index.d.ts +1 -1
- package/dist/v2/render/dynamicBlocks.d.ts +7 -3
- package/dist/v2/render/elementProps.d.ts +1 -1
- package/dist/v2/sections/catalog/productOffer.d.ts +2 -0
- package/dist/v2/sections/types.d.ts +2 -2
- package/dist/v2/types/editor.d.ts +1 -1
- package/dist/v2-compile.js +1 -1
- package/dist/v2.js +454 -247
- package/package.json +1 -1
|
@@ -6351,7 +6351,8 @@ var Dt = (e, t = "x") => (typeof e == "string" ? e.replace(/[^A-Za-z0-9_-]/g, "-
|
|
|
6351
6351
|
"checkout",
|
|
6352
6352
|
"orderConfirmation",
|
|
6353
6353
|
"orderTracking",
|
|
6354
|
-
"signupForm"
|
|
6354
|
+
"signupForm",
|
|
6355
|
+
"contentList"
|
|
6355
6356
|
], jt = (e) => At.includes(e), Mt = (e, t, n, ...r) => ({
|
|
6356
6357
|
...A(e, { class: t }, ...r),
|
|
6357
6358
|
style: n
|
|
@@ -6461,7 +6462,7 @@ var Dt = (e, t = "x") => (typeof e == "string" ? e.replace(/[^A-Za-z0-9_-]/g, "-
|
|
|
6461
6462
|
label: "Product",
|
|
6462
6463
|
note: "The product’s pictures, price and buy button appear here.",
|
|
6463
6464
|
uses: ["productId", "mode"],
|
|
6464
|
-
sample: () => [A("div", { class: "plx-dyn-row" }, Nt("1 / 1"), A("div", { class: "plx-dyn-stack" }, P("65%", !0), P("25%"), P("100%"), P("80%"), Pt("Add to cart")))]
|
|
6465
|
+
sample: (e) => e.mode === "buy" ? [A("div", { class: "plx-dyn-row" }, Nt("1 / 1"), A("div", { class: "plx-dyn-stack" }, A("strong", null, "Your product"), A("span", { class: "plx-dyn-text" }, "$49.00"), P("100%"), P("80%"), Pt("Buy now")))] : [A("div", { class: "plx-dyn-row" }, Nt("1 / 1"), A("div", { class: "plx-dyn-stack" }, P("65%", !0), P("25%"), P("100%"), P("80%"), Pt("Add to cart")))]
|
|
6465
6466
|
},
|
|
6466
6467
|
booking: {
|
|
6467
6468
|
group: "Store",
|
|
@@ -6522,6 +6523,19 @@ var Dt = (e, t = "x") => (typeof e == "string" ? e.replace(/[^A-Za-z0-9_-]/g, "-
|
|
|
6522
6523
|
uses: ["mode"],
|
|
6523
6524
|
sample: () => [Lt("Order number"), Pt("Track order")]
|
|
6524
6525
|
},
|
|
6526
|
+
contentList: {
|
|
6527
|
+
group: "Content",
|
|
6528
|
+
attr: "data-plexo-content",
|
|
6529
|
+
label: "Content list",
|
|
6530
|
+
note: "What you post under Content appears here: videos, stories, events and more.",
|
|
6531
|
+
uses: [
|
|
6532
|
+
"contentType",
|
|
6533
|
+
"layout",
|
|
6534
|
+
"limit",
|
|
6535
|
+
"itemsPerRow"
|
|
6536
|
+
],
|
|
6537
|
+
sample: (e) => e.layout === "events" ? [0, 1].map(() => A("div", { class: "plx-dyn-row" }, Nt("1 / 1"), A("div", { class: "plx-dyn-stack" }, P("60%", !0), P("100%"), P("35%")))) : It(Ot(e.itemsPerRow, 1, 4, 3))
|
|
6538
|
+
},
|
|
6525
6539
|
signupForm: {
|
|
6526
6540
|
group: "Funnel",
|
|
6527
6541
|
attr: "data-plexo-lms-signup",
|
|
@@ -6542,6 +6556,11 @@ function Ut(e) {
|
|
|
6542
6556
|
storeMode: !0,
|
|
6543
6557
|
itemsPerRow: 3
|
|
6544
6558
|
};
|
|
6559
|
+
case "contentList": return {
|
|
6560
|
+
contentType: "videos",
|
|
6561
|
+
layout: "gallery",
|
|
6562
|
+
itemsPerRow: 3
|
|
6563
|
+
};
|
|
6545
6564
|
case "blogDate":
|
|
6546
6565
|
case "blogAuthor":
|
|
6547
6566
|
case "blogCategories": return { prefix: "" };
|
|
@@ -6556,12 +6575,24 @@ var Wt = (e, t = 200) => typeof e == "string" && e.trim() ? e.trim().slice(0, t)
|
|
|
6556
6575
|
return Number.isFinite(n) && n >= 1 ? String(Math.min(t, Math.round(n))) : void 0;
|
|
6557
6576
|
};
|
|
6558
6577
|
function qt(e, t, n) {
|
|
6559
|
-
let r = zt[e]
|
|
6578
|
+
let r = zt[e];
|
|
6579
|
+
if (e === "contentList") return {
|
|
6580
|
+
"data-plexo-content": Gt(t.contentType)?.toLowerCase() ?? "videos",
|
|
6581
|
+
"data-plexo-content-layout": Gt(t.layout),
|
|
6582
|
+
"data-plexo-content-limit": Kt(t.limit, 96),
|
|
6583
|
+
"data-plexo-content-columns": Kt(t.itemsPerRow, 4)
|
|
6584
|
+
};
|
|
6585
|
+
let i = e === "signupForm" ? { [r.attr]: !0 } : { [r.attr]: "true" }, a = (e) => r.uses.includes(e);
|
|
6560
6586
|
return e === "signupForm" ? (i["data-plexo-template-id"] = Gt(t.templateId) ?? Gt(n.templateId), i) : (a("prefix") && (i["data-plexo-blog-prefix"] = Wt(t.prefix, 80)), a("productId") && (i["data-plexo-product-id"] = Gt(t.productId)), a("serviceId") && (i["data-plexo-service-id"] = Gt(t.serviceId)), a("mode") && (i["data-plexo-commerce-mode"] = Gt(t.mode)), a("storeMode") && t.storeMode === !1 && (i["data-plexo-commerce-store-mode"] = "false"), a("limit") && (i["data-plexo-commerce-limit"] = Kt(t.limit, 96)), a("category") && (i["data-plexo-commerce-category"] = Wt(t.category, 100)), a("sort") && (i["data-plexo-commerce-sort"] = Wt(t.sort, 100)), a("itemsPerRow") && (i["data-plexo-commerce-items-per-row"] = Kt(t.itemsPerRow, 6)), a("itemsPerPage") && (i["data-plexo-commerce-items-per-page"] = Kt(t.itemsPerPage, 96)), a("paginated") && t.paginated && (i["data-plexo-commerce-paginated"] = "true"), i);
|
|
6561
6587
|
}
|
|
6562
6588
|
function Jt(e, t) {
|
|
6563
6589
|
if (!jt(e.type)) return null;
|
|
6564
|
-
let n = zt[e.type], r = e.props ?? {}
|
|
6590
|
+
let n = zt[e.type], r = e.props ?? {};
|
|
6591
|
+
if (e.type === "product" && r.mode === "buy" && !Gt(r.productId)) return t.placeholders ? A("div", {
|
|
6592
|
+
class: "plx-el plx-dyn",
|
|
6593
|
+
"data-plx-dynamic": e.type
|
|
6594
|
+
}, A("div", { class: "plx-dyn-head" }, A("span", { class: "plx-dyn-tag" }, n.group), A("strong", null, "Pick a product to sell")), A("div", { class: "plx-dyn-note" }, "Choose which product this section sells, and a buy-now card appears here.")) : A("div", { "aria-hidden": "true" });
|
|
6595
|
+
let i = qt(e.type, r, t);
|
|
6565
6596
|
return t.placeholders ? A("div", {
|
|
6566
6597
|
...i,
|
|
6567
6598
|
class: "plx-el plx-dyn",
|
|
@@ -6738,7 +6769,7 @@ function Qt(e) {
|
|
|
6738
6769
|
}
|
|
6739
6770
|
//#endregion
|
|
6740
6771
|
//#region src/v2/render/socialIcons.ts
|
|
6741
|
-
var
|
|
6772
|
+
var F = {
|
|
6742
6773
|
facebook: {
|
|
6743
6774
|
label: "Facebook",
|
|
6744
6775
|
path: "M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z",
|
|
@@ -6811,7 +6842,7 @@ var $t = {
|
|
|
6811
6842
|
outline: !0,
|
|
6812
6843
|
brand: "#6B7280"
|
|
6813
6844
|
}
|
|
6814
|
-
},
|
|
6845
|
+
}, $t = [
|
|
6815
6846
|
{
|
|
6816
6847
|
key: "eyebrow",
|
|
6817
6848
|
label: "Small label above",
|
|
@@ -6868,7 +6899,7 @@ var $t = {
|
|
|
6868
6899
|
key: "network",
|
|
6869
6900
|
label: "Network",
|
|
6870
6901
|
type: "select",
|
|
6871
|
-
options: Object.keys(
|
|
6902
|
+
options: Object.keys(F).map((e) => [e, F[e].label])
|
|
6872
6903
|
}, {
|
|
6873
6904
|
key: "url",
|
|
6874
6905
|
label: "Link",
|
|
@@ -6907,8 +6938,8 @@ var $t = {
|
|
|
6907
6938
|
max: 120,
|
|
6908
6939
|
hint: "What people read once their message is sent."
|
|
6909
6940
|
}
|
|
6910
|
-
],
|
|
6911
|
-
function
|
|
6941
|
+
], en = (e) => typeof e == "string" && e.trim().length > 0;
|
|
6942
|
+
function tn(e, t, n = !1) {
|
|
6912
6943
|
let r = n || e.align === "center" ? { align: "center" } : {};
|
|
6913
6944
|
return [
|
|
6914
6945
|
e.text("eyebrow", t.eyebrow, "eyebrow", r),
|
|
@@ -6919,14 +6950,14 @@ function nn(e, t, n = !1) {
|
|
|
6919
6950
|
})
|
|
6920
6951
|
];
|
|
6921
6952
|
}
|
|
6922
|
-
var
|
|
6953
|
+
var nn = {
|
|
6923
6954
|
name: "Your full name",
|
|
6924
6955
|
email: "name@email.com",
|
|
6925
6956
|
message: "Tell us a little about what you need"
|
|
6926
|
-
},
|
|
6957
|
+
}, rn = (e, t) => {
|
|
6927
6958
|
let n = typeof e == "string" ? e : t;
|
|
6928
6959
|
return n.trim() ? { placeholder: n.trim() } : {};
|
|
6929
|
-
},
|
|
6960
|
+
}, an = (e, t) => ({
|
|
6930
6961
|
id: e.id("form"),
|
|
6931
6962
|
type: "form",
|
|
6932
6963
|
name: "Contact form",
|
|
@@ -6938,33 +6969,33 @@ var rn = {
|
|
|
6938
6969
|
label: "Your name",
|
|
6939
6970
|
type: "text",
|
|
6940
6971
|
required: !0,
|
|
6941
|
-
...
|
|
6972
|
+
...rn(t.namePlaceholder, nn.name)
|
|
6942
6973
|
},
|
|
6943
6974
|
{
|
|
6944
6975
|
id: "email",
|
|
6945
6976
|
label: "Email",
|
|
6946
6977
|
type: "email",
|
|
6947
6978
|
required: !0,
|
|
6948
|
-
...
|
|
6979
|
+
...rn(t.emailPlaceholder, nn.email)
|
|
6949
6980
|
},
|
|
6950
6981
|
{
|
|
6951
6982
|
id: "message",
|
|
6952
6983
|
label: "How can we help?",
|
|
6953
6984
|
type: "textarea",
|
|
6954
6985
|
required: !0,
|
|
6955
|
-
...
|
|
6986
|
+
...rn(t.messagePlaceholder, nn.message)
|
|
6956
6987
|
}
|
|
6957
6988
|
],
|
|
6958
|
-
submitLabel:
|
|
6959
|
-
successMessage:
|
|
6989
|
+
submitLabel: en(t.submitLabel) ? t.submitLabel : "Send message",
|
|
6990
|
+
successMessage: en(t.successMessage) ? t.successMessage : "Thanks! We got your message and will reply soon."
|
|
6960
6991
|
},
|
|
6961
6992
|
styles: {
|
|
6962
6993
|
width: "100%",
|
|
6963
6994
|
textColor: e.tone.heading
|
|
6964
6995
|
}
|
|
6965
|
-
}),
|
|
6996
|
+
}), on = (e, t, n) => {
|
|
6966
6997
|
let r = "clamp(1.25rem, 4vw, 2.25rem)";
|
|
6967
|
-
return e.card("form-card", [
|
|
6998
|
+
return e.card("form-card", [an(e, t)], {
|
|
6968
6999
|
paddingTop: r,
|
|
6969
7000
|
paddingBottom: r,
|
|
6970
7001
|
paddingLeft: r,
|
|
@@ -6976,7 +7007,7 @@ var rn = {
|
|
|
6976
7007
|
margin: "0 auto"
|
|
6977
7008
|
} : {}
|
|
6978
7009
|
});
|
|
6979
|
-
},
|
|
7010
|
+
}, sn = (e, t, n, r, i = !1) => ({
|
|
6980
7011
|
id: e.id(t),
|
|
6981
7012
|
type: "button",
|
|
6982
7013
|
name: We(t),
|
|
@@ -6990,20 +7021,20 @@ var rn = {
|
|
|
6990
7021
|
textAlign: i ? "center" : "left",
|
|
6991
7022
|
display: "inline-block"
|
|
6992
7023
|
}
|
|
6993
|
-
}),
|
|
6994
|
-
function
|
|
7024
|
+
}), cn = (e) => `tel:${e.replace(/[^\d+]/g, "")}`;
|
|
7025
|
+
function ln(e, t, n = !1) {
|
|
6995
7026
|
return [
|
|
6996
7027
|
{
|
|
6997
7028
|
slot: "email",
|
|
6998
7029
|
icon: "mail",
|
|
6999
7030
|
title: "Email",
|
|
7000
|
-
node:
|
|
7031
|
+
node: en(t.email) ? sn(e, "email-link", t.email.trim(), `mailto:${t.email.trim()}`, n) : null
|
|
7001
7032
|
},
|
|
7002
7033
|
{
|
|
7003
7034
|
slot: "phone",
|
|
7004
7035
|
icon: "phone",
|
|
7005
7036
|
title: "Phone",
|
|
7006
|
-
node:
|
|
7037
|
+
node: en(t.phone) ? sn(e, "phone-link", t.phone.trim(), cn(t.phone), n) : null
|
|
7007
7038
|
},
|
|
7008
7039
|
{
|
|
7009
7040
|
slot: "address",
|
|
@@ -7017,10 +7048,10 @@ function un(e, t, n = !1) {
|
|
|
7017
7048
|
}
|
|
7018
7049
|
].filter((e) => e.node);
|
|
7019
7050
|
}
|
|
7020
|
-
var
|
|
7051
|
+
var un = (e, t, n = !1) => e.text("hours", t.hours, "small", {
|
|
7021
7052
|
color: e.tone.muted,
|
|
7022
7053
|
align: n ? "center" : "left"
|
|
7023
|
-
}),
|
|
7054
|
+
}), dn = (e, t) => e.row(`row-${t.slot}`, [e.icon(`${t.slot}-icon`, t.icon, {
|
|
7024
7055
|
circle: !0,
|
|
7025
7056
|
size: "22px"
|
|
7026
7057
|
}), e.stack(`row-${t.slot}-text`, [{
|
|
@@ -7040,8 +7071,8 @@ var dn = (e, t, n = !1) => e.text("hours", t.hours, "small", {
|
|
|
7040
7071
|
})], {
|
|
7041
7072
|
gap: "var(--semantic-space-md)",
|
|
7042
7073
|
align: "center"
|
|
7043
|
-
}),
|
|
7044
|
-
let n = (Array.isArray(t.socials) ? t.socials : []).filter((e) => e && e.network && e.network in
|
|
7074
|
+
}), fn = (e, t) => {
|
|
7075
|
+
let n = (Array.isArray(t.socials) ? t.socials : []).filter((e) => e && e.network && e.network in F && en(e.url));
|
|
7045
7076
|
return n.length ? {
|
|
7046
7077
|
id: e.id("socials"),
|
|
7047
7078
|
type: "social",
|
|
@@ -7058,12 +7089,12 @@ var dn = (e, t, n = !1) => e.text("hours", t.hours, "small", {
|
|
|
7058
7089
|
width: "fit-content"
|
|
7059
7090
|
}
|
|
7060
7091
|
} : null;
|
|
7061
|
-
},
|
|
7092
|
+
}, pn = {
|
|
7062
7093
|
kind: "contact",
|
|
7063
7094
|
label: "Contact",
|
|
7064
7095
|
description: "Help people reach you: a message form, your details, or both.",
|
|
7065
7096
|
group: "Convert",
|
|
7066
|
-
fields:
|
|
7097
|
+
fields: $t,
|
|
7067
7098
|
defaults: {
|
|
7068
7099
|
eyebrow: "Contact",
|
|
7069
7100
|
heading: "Let’s talk",
|
|
@@ -7086,9 +7117,9 @@ var dn = (e, t, n = !1) => e.text("hours", t.hours, "small", {
|
|
|
7086
7117
|
url: "https://linkedin.com/"
|
|
7087
7118
|
}
|
|
7088
7119
|
],
|
|
7089
|
-
namePlaceholder:
|
|
7090
|
-
emailPlaceholder:
|
|
7091
|
-
messagePlaceholder:
|
|
7120
|
+
namePlaceholder: nn.name,
|
|
7121
|
+
emailPlaceholder: nn.email,
|
|
7122
|
+
messagePlaceholder: nn.message,
|
|
7092
7123
|
submitLabel: "Send message",
|
|
7093
7124
|
successMessage: "Thanks! We got your message and will reply soon."
|
|
7094
7125
|
},
|
|
@@ -7109,19 +7140,19 @@ var dn = (e, t, n = !1) => e.text("hours", t.hours, "small", {
|
|
|
7109
7140
|
...e.style,
|
|
7110
7141
|
align: "left"
|
|
7111
7142
|
}
|
|
7112
|
-
}), n = e.content, r =
|
|
7113
|
-
...
|
|
7114
|
-
t.stack("details", [...r,
|
|
7143
|
+
}), n = e.content, r = ln(t, n).map((e) => dn(t, e)), i = t.stack("info", [
|
|
7144
|
+
...tn(t, n),
|
|
7145
|
+
t.stack("details", [...r, un(t, n)], {
|
|
7115
7146
|
gap: "var(--semantic-space-lg)",
|
|
7116
7147
|
align: "flex-start",
|
|
7117
7148
|
styles: { marginTop: "var(--semantic-space-md)" }
|
|
7118
7149
|
}),
|
|
7119
|
-
|
|
7150
|
+
fn(t, n)
|
|
7120
7151
|
], {
|
|
7121
7152
|
gap: "var(--semantic-space-md)",
|
|
7122
7153
|
align: "flex-start"
|
|
7123
7154
|
});
|
|
7124
|
-
return [t.container([t.split("split", i,
|
|
7155
|
+
return [t.container([t.split("split", i, on(t, n), {
|
|
7125
7156
|
ratio: [1, 1.1],
|
|
7126
7157
|
align: "flex-start"
|
|
7127
7158
|
})])];
|
|
@@ -7154,10 +7185,10 @@ var dn = (e, t, n = !1) => e.text("hours", t.hours, "small", {
|
|
|
7154
7185
|
align: "center"
|
|
7155
7186
|
}
|
|
7156
7187
|
}), n = e.content;
|
|
7157
|
-
return [t.container([t.stack("head",
|
|
7188
|
+
return [t.container([t.stack("head", tn(t, n, !0), {
|
|
7158
7189
|
align: "center",
|
|
7159
7190
|
gap: "var(--semantic-space-sm)"
|
|
7160
|
-
}),
|
|
7191
|
+
}), on(t, n, "38rem")], {
|
|
7161
7192
|
gap: "calc(var(--semantic-space-xl) * 1.5)",
|
|
7162
7193
|
alignItems: "center"
|
|
7163
7194
|
})];
|
|
@@ -7179,7 +7210,7 @@ var dn = (e, t, n = !1) => e.text("hours", t.hours, "small", {
|
|
|
7179
7210
|
...e.style,
|
|
7180
7211
|
align: "center"
|
|
7181
7212
|
}
|
|
7182
|
-
}), n = e.content, r =
|
|
7213
|
+
}), n = e.content, r = ln(t, n, !0).map((e) => t.card(`card-${e.slot}`, [
|
|
7183
7214
|
t.icon(`${e.slot}-icon`, e.icon, {
|
|
7184
7215
|
circle: !0,
|
|
7185
7216
|
size: "22px"
|
|
@@ -7205,14 +7236,14 @@ var dn = (e, t, n = !1) => e.text("hours", t.hours, "small", {
|
|
|
7205
7236
|
i,
|
|
7206
7237
|
Math.min(i, 2),
|
|
7207
7238
|
1
|
|
7208
|
-
], { gap: "var(--semantic-space-lg)" }) : null, o = t.stack("head", [...
|
|
7239
|
+
], { gap: "var(--semantic-space-lg)" }) : null, o = t.stack("head", [...tn(t, n, !0), un(t, n, !0)], {
|
|
7209
7240
|
align: "center",
|
|
7210
7241
|
gap: "var(--semantic-space-sm)"
|
|
7211
7242
|
});
|
|
7212
7243
|
return [t.container([
|
|
7213
7244
|
o,
|
|
7214
7245
|
a,
|
|
7215
|
-
|
|
7246
|
+
on(t, n, "40rem")
|
|
7216
7247
|
], {
|
|
7217
7248
|
gap: "var(--semantic-space-xl)",
|
|
7218
7249
|
alignItems: "stretch"
|
|
@@ -7245,17 +7276,17 @@ var dn = (e, t, n = !1) => e.text("hours", t.hours, "small", {
|
|
|
7245
7276
|
...e.style,
|
|
7246
7277
|
align: "left"
|
|
7247
7278
|
}
|
|
7248
|
-
}), n = e.content, r =
|
|
7279
|
+
}), n = e.content, r = ln(t, n), i = [];
|
|
7249
7280
|
r.forEach((e, n) => {
|
|
7250
|
-
n && i.push(t.divider(`rule-${e.slot}`)), i.push(
|
|
7281
|
+
n && i.push(t.divider(`rule-${e.slot}`)), i.push(dn(t, e));
|
|
7251
7282
|
});
|
|
7252
|
-
let a = t.stack("head", [...
|
|
7283
|
+
let a = t.stack("head", [...tn(t, n), fn(t, n)], {
|
|
7253
7284
|
gap: "var(--semantic-space-md)",
|
|
7254
7285
|
align: "flex-start"
|
|
7255
7286
|
}), o = t.stack("details", [
|
|
7256
7287
|
...i,
|
|
7257
|
-
r.length &&
|
|
7258
|
-
|
|
7288
|
+
r.length && en(n.hours) ? t.divider("rule-hours") : null,
|
|
7289
|
+
un(t, n)
|
|
7259
7290
|
], {
|
|
7260
7291
|
gap: "var(--semantic-space-lg)",
|
|
7261
7292
|
align: "stretch"
|
|
@@ -7267,7 +7298,7 @@ var dn = (e, t, n = !1) => e.text("hours", t.hours, "small", {
|
|
|
7267
7298
|
}
|
|
7268
7299
|
}
|
|
7269
7300
|
]
|
|
7270
|
-
},
|
|
7301
|
+
}, mn = [
|
|
7271
7302
|
{
|
|
7272
7303
|
key: "eyebrow",
|
|
7273
7304
|
label: "Small label above",
|
|
@@ -7304,7 +7335,7 @@ var dn = (e, t, n = !1) => e.text("hours", t.hours, "small", {
|
|
|
7304
7335
|
type: "image"
|
|
7305
7336
|
}
|
|
7306
7337
|
];
|
|
7307
|
-
function
|
|
7338
|
+
function hn(e, t, n = {}) {
|
|
7308
7339
|
let r = n.centered || e.align === "center" ? { align: "center" } : {};
|
|
7309
7340
|
return [
|
|
7310
7341
|
e.text("eyebrow", t.eyebrow, "eyebrow", r),
|
|
@@ -7318,13 +7349,13 @@ function gn(e, t, n = {}) {
|
|
|
7318
7349
|
})
|
|
7319
7350
|
];
|
|
7320
7351
|
}
|
|
7321
|
-
function
|
|
7352
|
+
function gn(e, t, n) {
|
|
7322
7353
|
return !t.cta?.label?.trim() && !t.cta2?.label?.trim() ? null : e.row("buttons", [e.button("cta", t.cta, "primary"), e.button("cta2", t.cta2, "secondary")], {
|
|
7323
7354
|
wrap: !0,
|
|
7324
7355
|
justify: n ? "center" : "flex-start"
|
|
7325
7356
|
});
|
|
7326
7357
|
}
|
|
7327
|
-
var
|
|
7358
|
+
var _n = (e, t) => ({
|
|
7328
7359
|
id: e.id("signup"),
|
|
7329
7360
|
type: "form",
|
|
7330
7361
|
name: "Sign-up form",
|
|
@@ -7346,12 +7377,12 @@ var vn = (e, t) => ({
|
|
|
7346
7377
|
margin: "0 auto",
|
|
7347
7378
|
textColor: e.tone.heading
|
|
7348
7379
|
}
|
|
7349
|
-
}),
|
|
7380
|
+
}), vn = {
|
|
7350
7381
|
kind: "cta",
|
|
7351
7382
|
label: "Call to action",
|
|
7352
7383
|
description: "A bold prompt that nudges visitors to take the next step.",
|
|
7353
7384
|
group: "Convert",
|
|
7354
|
-
fields:
|
|
7385
|
+
fields: mn,
|
|
7355
7386
|
defaults: {
|
|
7356
7387
|
eyebrow: "Ready when you are",
|
|
7357
7388
|
heading: "Let’s get started today",
|
|
@@ -7393,7 +7424,7 @@ var vn = (e, t) => ({
|
|
|
7393
7424
|
align: "center"
|
|
7394
7425
|
}
|
|
7395
7426
|
}), n = e.content;
|
|
7396
|
-
return [t.container([t.stack("copy", [...
|
|
7427
|
+
return [t.container([t.stack("copy", [...hn(t, n, { centered: !0 }), gn(t, n, !0)], {
|
|
7397
7428
|
gap: "var(--semantic-space-lg)",
|
|
7398
7429
|
align: "center"
|
|
7399
7430
|
})], { alignItems: "center" })];
|
|
@@ -7409,7 +7440,7 @@ var vn = (e, t) => ({
|
|
|
7409
7440
|
"primary"
|
|
7410
7441
|
],
|
|
7411
7442
|
build(e) {
|
|
7412
|
-
let t = k(e), n = e.content, r = t.stack("copy", [...
|
|
7443
|
+
let t = k(e), n = e.content, r = t.stack("copy", [...hn(t, n), gn(t, n, t.align === "center")], { gap: "var(--semantic-space-lg)" }), i = t.image("image", n.image, n.imageAlt, {
|
|
7413
7444
|
ratio: "5 / 4",
|
|
7414
7445
|
radius: "var(--radius-2xl)"
|
|
7415
7446
|
});
|
|
@@ -7440,7 +7471,7 @@ var vn = (e, t) => ({
|
|
|
7440
7471
|
...e.style,
|
|
7441
7472
|
align: "center"
|
|
7442
7473
|
}
|
|
7443
|
-
}), r = e.content, i = "clamp(2rem, 6vw, 4.5rem)", a = n.box("panel", [n.stack("copy", [...
|
|
7474
|
+
}), r = e.content, i = "clamp(2rem, 6vw, 4.5rem)", a = n.box("panel", [n.stack("copy", [...hn(n, r, { centered: !0 }), gn(n, r, !0)], {
|
|
7444
7475
|
gap: "var(--semantic-space-lg)",
|
|
7445
7476
|
align: "center"
|
|
7446
7477
|
})], {
|
|
@@ -7479,7 +7510,7 @@ var vn = (e, t) => ({
|
|
|
7479
7510
|
align: "center"
|
|
7480
7511
|
}
|
|
7481
7512
|
}), n = e.content;
|
|
7482
|
-
return [t.container([t.stack("copy", [...
|
|
7513
|
+
return [t.container([t.stack("copy", [...hn(t, n, { centered: !0 }), _n(t, n)], {
|
|
7483
7514
|
gap: "var(--semantic-space-lg)",
|
|
7484
7515
|
align: "center"
|
|
7485
7516
|
})], { alignItems: "center" })];
|
|
@@ -7531,7 +7562,7 @@ var vn = (e, t) => ({
|
|
|
7531
7562
|
}
|
|
7532
7563
|
}
|
|
7533
7564
|
]
|
|
7534
|
-
},
|
|
7565
|
+
}, yn = [
|
|
7535
7566
|
{
|
|
7536
7567
|
key: "eyebrow",
|
|
7537
7568
|
label: "Small label above",
|
|
@@ -7576,8 +7607,8 @@ var vn = (e, t) => ({
|
|
|
7576
7607
|
type: "button",
|
|
7577
7608
|
hint: "Optional — for people who still have questions. Leave the text empty to hide it."
|
|
7578
7609
|
}
|
|
7579
|
-
],
|
|
7580
|
-
function
|
|
7610
|
+
], bn = (e) => (Array.isArray(e.items) ? e.items : []).filter((e) => e && (e.question?.trim() || e.answer?.trim()));
|
|
7611
|
+
function xn(e, t, n = {}) {
|
|
7581
7612
|
let r = n.centered || e.align === "center" ? { align: "center" } : {};
|
|
7582
7613
|
return [
|
|
7583
7614
|
e.text("eyebrow", t.eyebrow, "eyebrow", r),
|
|
@@ -7591,8 +7622,8 @@ function Sn(e, t, n = {}) {
|
|
|
7591
7622
|
})
|
|
7592
7623
|
];
|
|
7593
7624
|
}
|
|
7594
|
-
var
|
|
7595
|
-
let n =
|
|
7625
|
+
var Sn = (e, t) => {
|
|
7626
|
+
let n = bn(t);
|
|
7596
7627
|
return n.length ? {
|
|
7597
7628
|
id: e.id("accordion"),
|
|
7598
7629
|
type: "accordion",
|
|
@@ -7611,19 +7642,19 @@ var Cn = (e, t) => {
|
|
|
7611
7642
|
textColor: e.tone.heading
|
|
7612
7643
|
}
|
|
7613
7644
|
} : null;
|
|
7614
|
-
},
|
|
7645
|
+
}, Cn = (e, t, n) => e.stack(`item-${n}`, [e.text(`items.${n}.question`, t.items[n].question, "h4"), e.text(`items.${n}.answer`, t.items[n].answer, "body")], {
|
|
7615
7646
|
gap: "var(--semantic-space-xs)",
|
|
7616
7647
|
align: "flex-start",
|
|
7617
7648
|
styles: { textAlign: "left" }
|
|
7618
|
-
}),
|
|
7649
|
+
}), wn = (e) => (Array.isArray(e.items) ? e.items : []).map((e, t) => e && (e.question?.trim() || e.answer?.trim()) ? t : -1).filter((e) => e >= 0), Tn = (e, t, n = "flex-start") => {
|
|
7619
7650
|
let r = e.button("cta", t.cta, "primary");
|
|
7620
7651
|
return r ? e.row("more", [r], { justify: n }) : null;
|
|
7621
|
-
},
|
|
7652
|
+
}, En = {
|
|
7622
7653
|
kind: "faq",
|
|
7623
7654
|
label: "Questions",
|
|
7624
7655
|
description: "Answer the things people ask most, so they don’t have to.",
|
|
7625
7656
|
group: "Content",
|
|
7626
|
-
fields:
|
|
7657
|
+
fields: yn,
|
|
7627
7658
|
defaults: {
|
|
7628
7659
|
eyebrow: "FAQ",
|
|
7629
7660
|
heading: "Questions, answered",
|
|
@@ -7676,10 +7707,10 @@ var Cn = (e, t) => {
|
|
|
7676
7707
|
...e.style,
|
|
7677
7708
|
align: "center"
|
|
7678
7709
|
}
|
|
7679
|
-
}), n = e.content, r = t.stack("head",
|
|
7710
|
+
}), n = e.content, r = t.stack("head", xn(t, n, { centered: !0 }), {
|
|
7680
7711
|
align: "center",
|
|
7681
7712
|
gap: "var(--semantic-space-sm)"
|
|
7682
|
-
}), i = t.stack("body", [
|
|
7713
|
+
}), i = t.stack("body", [Sn(t, n), Tn(t, n, "center")], {
|
|
7683
7714
|
gap: "var(--semantic-space-xl)",
|
|
7684
7715
|
align: "stretch",
|
|
7685
7716
|
styles: {
|
|
@@ -7709,11 +7740,11 @@ var Cn = (e, t) => {
|
|
|
7709
7740
|
...e.style,
|
|
7710
7741
|
align: "left"
|
|
7711
7742
|
}
|
|
7712
|
-
}), n = e.content, r = t.stack("head", [...
|
|
7743
|
+
}), n = e.content, r = t.stack("head", [...xn(t, n), Tn(t, n)], {
|
|
7713
7744
|
gap: "var(--semantic-space-md)",
|
|
7714
7745
|
align: "flex-start"
|
|
7715
7746
|
});
|
|
7716
|
-
return [t.container([t.split("split", r, t.box("body", [
|
|
7747
|
+
return [t.container([t.split("split", r, t.box("body", [Sn(t, n)]), {
|
|
7717
7748
|
ratio: [1, 1.5],
|
|
7718
7749
|
align: "flex-start"
|
|
7719
7750
|
})])];
|
|
@@ -7735,10 +7766,10 @@ var Cn = (e, t) => {
|
|
|
7735
7766
|
...e.style,
|
|
7736
7767
|
align: "center"
|
|
7737
7768
|
}
|
|
7738
|
-
}), n = e.content, r = t.stack("head",
|
|
7769
|
+
}), n = e.content, r = t.stack("head", xn(t, n, { centered: !0 }), {
|
|
7739
7770
|
align: "center",
|
|
7740
7771
|
gap: "var(--semantic-space-sm)"
|
|
7741
|
-
}), i = "clamp(1.25rem, 4vw, 2.5rem)", a = t.card("card", [
|
|
7772
|
+
}), i = "clamp(1.25rem, 4vw, 2.5rem)", a = t.card("card", [Sn(t, n), Tn(t, n, "center")], {
|
|
7742
7773
|
paddingTop: i,
|
|
7743
7774
|
paddingBottom: i,
|
|
7744
7775
|
paddingLeft: i,
|
|
@@ -7772,8 +7803,8 @@ var Cn = (e, t) => {
|
|
|
7772
7803
|
align: "left"
|
|
7773
7804
|
}
|
|
7774
7805
|
}), n = e.content, r = [];
|
|
7775
|
-
for (let e of
|
|
7776
|
-
let i = t.stack("head", [...
|
|
7806
|
+
for (let e of wn(n)) r.length && r.push(t.divider(`rule-${e}`)), r.push(Cn(t, n, e));
|
|
7807
|
+
let i = t.stack("head", [...xn(t, n), Tn(t, n)], {
|
|
7777
7808
|
gap: "var(--semantic-space-md)",
|
|
7778
7809
|
align: "flex-start"
|
|
7779
7810
|
}), a = t.stack("list", r, {
|
|
@@ -7796,7 +7827,7 @@ var Cn = (e, t) => {
|
|
|
7796
7827
|
"surface"
|
|
7797
7828
|
],
|
|
7798
7829
|
build(e) {
|
|
7799
|
-
let t = k(e), n = e.content, r = t.align === "center", i = t.stack("head",
|
|
7830
|
+
let t = k(e), n = e.content, r = t.align === "center", i = t.stack("head", xn(t, n), { gap: "var(--semantic-space-sm)" }), a = wn(n).map((e) => t.card(`cell-${e}`, [Cn(t, n, e)], {
|
|
7800
7831
|
paddingTop: "1.5rem",
|
|
7801
7832
|
paddingBottom: "1.5rem"
|
|
7802
7833
|
}));
|
|
@@ -7807,12 +7838,12 @@ var Cn = (e, t) => {
|
|
|
7807
7838
|
1,
|
|
7808
7839
|
1
|
|
7809
7840
|
], { gap: "var(--semantic-space-lg)" }),
|
|
7810
|
-
|
|
7841
|
+
Tn(t, n, r ? "center" : "flex-start")
|
|
7811
7842
|
], { gap: "calc(var(--semantic-space-xl) * 1.5)" })];
|
|
7812
7843
|
}
|
|
7813
7844
|
}
|
|
7814
7845
|
]
|
|
7815
|
-
},
|
|
7846
|
+
}, Dn = [
|
|
7816
7847
|
{
|
|
7817
7848
|
key: "eyebrow",
|
|
7818
7849
|
label: "Small label above",
|
|
@@ -7872,8 +7903,8 @@ var Cn = (e, t) => {
|
|
|
7872
7903
|
}
|
|
7873
7904
|
]
|
|
7874
7905
|
}
|
|
7875
|
-
],
|
|
7876
|
-
function
|
|
7906
|
+
], On = (e) => Array.isArray(e.items) ? e.items : [], kn = (e, t) => `items.${e}.${t}`;
|
|
7907
|
+
function An(e, t, n = {}) {
|
|
7877
7908
|
let r = !!n.centered || e.align === "center", i = [
|
|
7878
7909
|
e.text("eyebrow", t.eyebrow, "eyebrow", { align: r ? "center" : "left" }),
|
|
7879
7910
|
e.text("heading", t.heading, "h2", { align: r ? "center" : "left" }),
|
|
@@ -7891,17 +7922,17 @@ function jn(e, t, n = {}) {
|
|
|
7891
7922
|
}
|
|
7892
7923
|
}) : null;
|
|
7893
7924
|
}
|
|
7894
|
-
var
|
|
7925
|
+
var jn = (e, t, n) => e.button(kn(n, "link"), t.link, "ghost"), Mn = (e, t, n, r = {}) => t.icon ? e.icon(kn(n, "icon"), t.icon, r) : null, Nn = (e, t, n, r = "h4", i = {}) => e.text(kn(n, "title"), t.title, r, i), Pn = (e, t, n, r = {}) => e.text(kn(n, "text"), t.text, "body", r), Fn = (e, t) => e <= Math.min(3, t) ? Math.max(e, 1) : e === 4 ? Math.min(4, t) : e <= 6 ? 3 : t, In = "calc(var(--plx-gap) * 2)", Ln = {
|
|
7895
7926
|
paddingTop: "2rem",
|
|
7896
7927
|
paddingBottom: "2rem",
|
|
7897
7928
|
paddingLeft: "2rem",
|
|
7898
7929
|
paddingRight: "2rem"
|
|
7899
|
-
},
|
|
7930
|
+
}, Rn = {
|
|
7900
7931
|
kind: "features",
|
|
7901
7932
|
label: "Features",
|
|
7902
7933
|
description: "What you offer: a handful of benefits or services, each with an icon and a few words.",
|
|
7903
7934
|
group: "Content",
|
|
7904
|
-
fields:
|
|
7935
|
+
fields: Dn,
|
|
7905
7936
|
defaults: {
|
|
7906
7937
|
eyebrow: "What we offer",
|
|
7907
7938
|
heading: "Everything you need, nothing you don’t",
|
|
@@ -7992,20 +8023,20 @@ var Mn = (e, t, n) => e.button(An(n, "link"), t.link, "ghost"), Nn = (e, t, n, r
|
|
|
7992
8023
|
"items"
|
|
7993
8024
|
],
|
|
7994
8025
|
build(e) {
|
|
7995
|
-
let t = k(e), n =
|
|
7996
|
-
|
|
8026
|
+
let t = k(e), n = On(e.content).map((e, n) => t.stack(`item-${n}`, [
|
|
8027
|
+
Mn(t, e, n, {
|
|
7997
8028
|
circle: !0,
|
|
7998
8029
|
size: "26px"
|
|
7999
8030
|
}),
|
|
8031
|
+
Nn(t, e, n),
|
|
8000
8032
|
Pn(t, e, n),
|
|
8001
|
-
|
|
8002
|
-
Mn(t, e, n)
|
|
8033
|
+
jn(t, e, n)
|
|
8003
8034
|
], { gap: "var(--semantic-space-sm)" }));
|
|
8004
|
-
return [t.container([
|
|
8005
|
-
|
|
8035
|
+
return [t.container([An(t, e.content), t.grid("items", n, [
|
|
8036
|
+
Fn(n.length, 3),
|
|
8006
8037
|
2,
|
|
8007
8038
|
1
|
|
8008
|
-
], { gap:
|
|
8039
|
+
], { gap: In })], { gap: In })];
|
|
8009
8040
|
}
|
|
8010
8041
|
},
|
|
8011
8042
|
{
|
|
@@ -8024,17 +8055,17 @@ var Mn = (e, t, n) => e.button(An(n, "link"), t.link, "ghost"), Nn = (e, t, n, r
|
|
|
8024
8055
|
"items"
|
|
8025
8056
|
],
|
|
8026
8057
|
build(e) {
|
|
8027
|
-
let t = k(e), n =
|
|
8028
|
-
t.row(`head-${n}`, [
|
|
8058
|
+
let t = k(e), n = On(e.content).map((e, n) => t.stack(`item-${n}`, [
|
|
8059
|
+
t.row(`head-${n}`, [Mn(t, e, n, {
|
|
8029
8060
|
size: "22px",
|
|
8030
8061
|
styles: { flexShrink: 0 }
|
|
8031
|
-
}),
|
|
8062
|
+
}), Nn(t, e, n)], {
|
|
8032
8063
|
gap: "var(--semantic-space-sm)",
|
|
8033
8064
|
align: "center",
|
|
8034
8065
|
styles: { width: "100%" }
|
|
8035
8066
|
}),
|
|
8036
|
-
|
|
8037
|
-
|
|
8067
|
+
Pn(t, e, n),
|
|
8068
|
+
jn(t, e, n)
|
|
8038
8069
|
], {
|
|
8039
8070
|
gap: "var(--semantic-space-sm)",
|
|
8040
8071
|
styles: {
|
|
@@ -8044,11 +8075,11 @@ var Mn = (e, t, n) => e.button(An(n, "link"), t.link, "ghost"), Nn = (e, t, n, r
|
|
|
8044
8075
|
paddingTop: "var(--semantic-space-md)"
|
|
8045
8076
|
}
|
|
8046
8077
|
}));
|
|
8047
|
-
return [t.container([
|
|
8048
|
-
|
|
8078
|
+
return [t.container([An(t, e.content), t.grid("items", n, [
|
|
8079
|
+
Fn(n.length, 4),
|
|
8049
8080
|
2,
|
|
8050
8081
|
1
|
|
8051
|
-
], { gap:
|
|
8082
|
+
], { gap: In })], { gap: In })];
|
|
8052
8083
|
}
|
|
8053
8084
|
},
|
|
8054
8085
|
{
|
|
@@ -8067,24 +8098,24 @@ var Mn = (e, t, n) => e.button(An(n, "link"), t.link, "ghost"), Nn = (e, t, n, r
|
|
|
8067
8098
|
"items"
|
|
8068
8099
|
],
|
|
8069
8100
|
build(e) {
|
|
8070
|
-
let t = k(e), n =
|
|
8071
|
-
|
|
8101
|
+
let t = k(e), n = On(e.content).map((e, n) => t.card(`item-${n}`, [
|
|
8102
|
+
Mn(t, e, n, {
|
|
8072
8103
|
circle: !0,
|
|
8073
8104
|
size: "26px"
|
|
8074
8105
|
}),
|
|
8106
|
+
Nn(t, e, n),
|
|
8075
8107
|
Pn(t, e, n),
|
|
8076
|
-
|
|
8077
|
-
Mn(t, e, n)
|
|
8108
|
+
jn(t, e, n)
|
|
8078
8109
|
], {
|
|
8079
|
-
...
|
|
8110
|
+
...Ln,
|
|
8080
8111
|
alignItems: "flex-start",
|
|
8081
8112
|
gap: "var(--semantic-space-sm)"
|
|
8082
8113
|
}));
|
|
8083
|
-
return [t.container([
|
|
8114
|
+
return [t.container([An(t, e.content), t.grid("items", n, [
|
|
8084
8115
|
2,
|
|
8085
8116
|
2,
|
|
8086
8117
|
1
|
|
8087
|
-
], { gap: "var(--plx-gap)" })], { gap:
|
|
8118
|
+
], { gap: "var(--plx-gap)" })], { gap: In })];
|
|
8088
8119
|
}
|
|
8089
8120
|
},
|
|
8090
8121
|
{
|
|
@@ -8109,13 +8140,13 @@ var Mn = (e, t, n) => e.button(An(n, "link"), t.link, "ghost"), Nn = (e, t, n, r
|
|
|
8109
8140
|
...e.style,
|
|
8110
8141
|
align: "left"
|
|
8111
8142
|
}
|
|
8112
|
-
}), n =
|
|
8143
|
+
}), n = On(e.content).flatMap((e, n) => [n > 0 ? t.divider(`rule-${n}`) : null, t.row(`item-${n}`, [Mn(t, e, n, {
|
|
8113
8144
|
circle: !0,
|
|
8114
8145
|
size: "24px"
|
|
8115
8146
|
}), t.stack(`copy-${n}`, [
|
|
8147
|
+
Nn(t, e, n),
|
|
8116
8148
|
Pn(t, e, n),
|
|
8117
|
-
|
|
8118
|
-
Mn(t, e, n)
|
|
8149
|
+
jn(t, e, n)
|
|
8119
8150
|
], {
|
|
8120
8151
|
gap: "var(--semantic-space-xs)",
|
|
8121
8152
|
styles: {
|
|
@@ -8133,7 +8164,7 @@ var Mn = (e, t, n) => e.button(An(n, "link"), t.link, "ghost"), Nn = (e, t, n, r
|
|
|
8133
8164
|
gap: "var(--semantic-space-md)",
|
|
8134
8165
|
align: "stretch"
|
|
8135
8166
|
});
|
|
8136
|
-
return [t.container([t.split("split",
|
|
8167
|
+
return [t.container([t.split("split", An(t, e.content, { maxWidth: "26rem" }) ?? t.box("intro", []), r, {
|
|
8137
8168
|
ratio: [1, 1.5],
|
|
8138
8169
|
align: "flex-start"
|
|
8139
8170
|
})])];
|
|
@@ -8155,16 +8186,16 @@ var Mn = (e, t, n) => e.button(An(n, "link"), t.link, "ghost"), Nn = (e, t, n, r
|
|
|
8155
8186
|
...e.style,
|
|
8156
8187
|
align: "left"
|
|
8157
8188
|
}
|
|
8158
|
-
}), n =
|
|
8189
|
+
}), n = On(e.content).map((e, n) => {
|
|
8159
8190
|
let r = t.stack(`copy-${n}`, [
|
|
8160
|
-
|
|
8191
|
+
Mn(t, e, n, {
|
|
8161
8192
|
circle: !0,
|
|
8162
8193
|
size: "24px"
|
|
8163
8194
|
}),
|
|
8164
|
-
|
|
8165
|
-
t.text(
|
|
8166
|
-
|
|
8167
|
-
], { gap: "var(--semantic-space-md)" }), i = t.image(
|
|
8195
|
+
Nn(t, e, n, "h3"),
|
|
8196
|
+
t.text(kn(n, "text"), e.text, "lead"),
|
|
8197
|
+
jn(t, e, n)
|
|
8198
|
+
], { gap: "var(--semantic-space-md)" }), i = t.image(kn(n, "image"), e.image, e.imageAlt || e.title, {
|
|
8168
8199
|
ratio: "4 / 3",
|
|
8169
8200
|
radius: "var(--radius-2xl)"
|
|
8170
8201
|
});
|
|
@@ -8173,7 +8204,7 @@ var Mn = (e, t, n) => e.button(An(n, "link"), t.link, "ghost"), Nn = (e, t, n, r
|
|
|
8173
8204
|
gap: "calc(var(--plx-gap) * 3)"
|
|
8174
8205
|
});
|
|
8175
8206
|
});
|
|
8176
|
-
return [t.container([
|
|
8207
|
+
return [t.container([An(t, e.content, { centered: !0 }), t.stack("rows", n, {
|
|
8177
8208
|
gap: "calc(var(--plx-gap) * 3)",
|
|
8178
8209
|
align: "stretch"
|
|
8179
8210
|
})], { gap: "calc(var(--plx-gap) * 3)" })];
|
|
@@ -8201,7 +8232,7 @@ var Mn = (e, t, n) => e.button(An(n, "link"), t.link, "ghost"), Nn = (e, t, n, r
|
|
|
8201
8232
|
...e.style,
|
|
8202
8233
|
align: "center"
|
|
8203
8234
|
}
|
|
8204
|
-
}), n =
|
|
8235
|
+
}), n = On(e.content).map((e, n) => t.card(`item-${n}`, [
|
|
8205
8236
|
t.box(`bar-${n}`, [], {
|
|
8206
8237
|
width: "3rem",
|
|
8207
8238
|
height: "4px",
|
|
@@ -8209,20 +8240,20 @@ var Mn = (e, t, n) => e.button(An(n, "link"), t.link, "ghost"), Nn = (e, t, n, r
|
|
|
8209
8240
|
backgroundColor: t.tone.accent,
|
|
8210
8241
|
flexShrink: 0
|
|
8211
8242
|
}),
|
|
8212
|
-
|
|
8213
|
-
|
|
8214
|
-
|
|
8215
|
-
|
|
8243
|
+
Mn(t, e, n, { size: "30px" }),
|
|
8244
|
+
Nn(t, e, n, "h4", { align: "left" }),
|
|
8245
|
+
Pn(t, e, n, { align: "left" }),
|
|
8246
|
+
jn(t, e, n)
|
|
8216
8247
|
], {
|
|
8217
|
-
...
|
|
8248
|
+
...Ln,
|
|
8218
8249
|
alignItems: "flex-start",
|
|
8219
8250
|
gap: "var(--semantic-space-sm)"
|
|
8220
8251
|
}));
|
|
8221
|
-
return [t.container([
|
|
8222
|
-
|
|
8252
|
+
return [t.container([An(t, e.content, { centered: !0 }), t.grid("items", n, [
|
|
8253
|
+
Fn(n.length, 3),
|
|
8223
8254
|
2,
|
|
8224
8255
|
1
|
|
8225
|
-
], { gap: "var(--plx-gap)" })], { gap:
|
|
8256
|
+
], { gap: "var(--plx-gap)" })], { gap: In })];
|
|
8226
8257
|
}
|
|
8227
8258
|
},
|
|
8228
8259
|
{
|
|
@@ -8235,21 +8266,21 @@ var Mn = (e, t, n) => e.button(An(n, "link"), t.link, "ghost"), Nn = (e, t, n, r
|
|
|
8235
8266
|
"surface"
|
|
8236
8267
|
],
|
|
8237
8268
|
build(e) {
|
|
8238
|
-
let t = k(e), n =
|
|
8239
|
-
let a = r[i] === 2, o = e.image ? t.image(
|
|
8269
|
+
let t = k(e), n = On(e.content), r = zn(n.length), i = n.map((e, i) => {
|
|
8270
|
+
let a = r[i] === 2, o = e.image ? t.image(kn(i, "image"), e.image, e.imageAlt || e.title, {
|
|
8240
8271
|
ratio: a ? "16 / 7" : "16 / 9",
|
|
8241
8272
|
radius: "var(--radius-lg)"
|
|
8242
8273
|
}) : null, s = t.card(`item-${i}`, [
|
|
8243
8274
|
o,
|
|
8244
|
-
|
|
8275
|
+
Mn(t, e, i, {
|
|
8245
8276
|
circle: !0,
|
|
8246
8277
|
size: "24px"
|
|
8247
8278
|
}),
|
|
8248
|
-
|
|
8249
|
-
|
|
8250
|
-
|
|
8279
|
+
Nn(t, e, i, a ? "h3" : "h4"),
|
|
8280
|
+
Pn(t, e, i),
|
|
8281
|
+
jn(t, e, i)
|
|
8251
8282
|
], {
|
|
8252
|
-
...
|
|
8283
|
+
...Ln,
|
|
8253
8284
|
alignItems: "flex-start",
|
|
8254
8285
|
gap: "var(--semantic-space-sm)",
|
|
8255
8286
|
minHeight: a ? "15rem" : "12rem",
|
|
@@ -8263,16 +8294,16 @@ var Mn = (e, t, n) => e.button(An(n, "link"), t.link, "ghost"), Nn = (e, t, n, r
|
|
|
8263
8294
|
}
|
|
8264
8295
|
};
|
|
8265
8296
|
});
|
|
8266
|
-
return [t.container([
|
|
8297
|
+
return [t.container([An(t, e.content), t.grid("items", i, [
|
|
8267
8298
|
3,
|
|
8268
8299
|
2,
|
|
8269
8300
|
1
|
|
8270
|
-
], { gap: "var(--plx-gap)" })], { gap:
|
|
8301
|
+
], { gap: "var(--plx-gap)" })], { gap: In })];
|
|
8271
8302
|
}
|
|
8272
8303
|
}
|
|
8273
8304
|
]
|
|
8274
8305
|
};
|
|
8275
|
-
function
|
|
8306
|
+
function zn(e) {
|
|
8276
8307
|
let t = [
|
|
8277
8308
|
2,
|
|
8278
8309
|
1,
|
|
@@ -8287,7 +8318,7 @@ function Bn(e) {
|
|
|
8287
8318
|
}
|
|
8288
8319
|
//#endregion
|
|
8289
8320
|
//#region src/v2/sections/catalog/footer.ts
|
|
8290
|
-
var
|
|
8321
|
+
var Bn = [
|
|
8291
8322
|
{
|
|
8292
8323
|
key: "brand",
|
|
8293
8324
|
label: "Site name",
|
|
@@ -8332,7 +8363,7 @@ var Vn = [
|
|
|
8332
8363
|
key: "network",
|
|
8333
8364
|
label: "Network",
|
|
8334
8365
|
type: "select",
|
|
8335
|
-
options: Object.keys(
|
|
8366
|
+
options: Object.keys(F).map((e) => [e, F[e].label])
|
|
8336
8367
|
}, {
|
|
8337
8368
|
key: "url",
|
|
8338
8369
|
label: "Link",
|
|
@@ -8359,7 +8390,7 @@ var Vn = [
|
|
|
8359
8390
|
max: 120
|
|
8360
8391
|
}
|
|
8361
8392
|
];
|
|
8362
|
-
function
|
|
8393
|
+
function Vn(e) {
|
|
8363
8394
|
return typeof e == "string" ? e.split(/\r?\n/).map((e) => {
|
|
8364
8395
|
let [t, ...n] = e.split("|");
|
|
8365
8396
|
return {
|
|
@@ -8368,11 +8399,11 @@ function Hn(e) {
|
|
|
8368
8399
|
};
|
|
8369
8400
|
}).filter((e) => e.label).slice(0, 10) : [];
|
|
8370
8401
|
}
|
|
8371
|
-
var
|
|
8402
|
+
var Hn = (e) => (Array.isArray(e.columns) ? e.columns : []).map((e, t) => ({
|
|
8372
8403
|
index: t,
|
|
8373
8404
|
title: e?.title?.trim() ?? "",
|
|
8374
|
-
links:
|
|
8375
|
-
})).filter((e) => e.title || e.links.length),
|
|
8405
|
+
links: Vn(e?.links)
|
|
8406
|
+
})).filter((e) => e.title || e.links.length), Un = (e, t, n, r) => n.length ? {
|
|
8376
8407
|
id: e.id(t),
|
|
8377
8408
|
type: "menu",
|
|
8378
8409
|
name: "Links",
|
|
@@ -8385,15 +8416,15 @@ var Un = (e) => (Array.isArray(e.columns) ? e.columns : []).map((e, t) => ({
|
|
|
8385
8416
|
textColor: e.tone.body,
|
|
8386
8417
|
width: r === "horizontal" ? "100%" : "fit-content"
|
|
8387
8418
|
}
|
|
8388
|
-
} : null,
|
|
8419
|
+
} : null, Wn = (e, t, n = !1) => e.text("brand", t.brand, "lead", {
|
|
8389
8420
|
color: e.tone.heading,
|
|
8390
8421
|
align: n ? "center" : "left",
|
|
8391
8422
|
styles: { fontWeight: "700" }
|
|
8392
|
-
}),
|
|
8423
|
+
}), Gn = (e, t, n = !1) => e.text("text", t.text, "body", {
|
|
8393
8424
|
align: n ? "center" : "left",
|
|
8394
8425
|
maxWidth: "24rem"
|
|
8395
|
-
}),
|
|
8396
|
-
let n = (Array.isArray(t.socials) ? t.socials : []).filter((e) => e && e.network && e.network in
|
|
8426
|
+
}), Kn = (e, t) => {
|
|
8427
|
+
let n = (Array.isArray(t.socials) ? t.socials : []).filter((e) => e && e.network && e.network in F && typeof e.url == "string" && e.url.trim());
|
|
8397
8428
|
return n.length ? {
|
|
8398
8429
|
id: e.id("socials"),
|
|
8399
8430
|
type: "social",
|
|
@@ -8410,17 +8441,17 @@ var Un = (e) => (Array.isArray(e.columns) ? e.columns : []).map((e, t) => ({
|
|
|
8410
8441
|
width: "fit-content"
|
|
8411
8442
|
}
|
|
8412
8443
|
} : null;
|
|
8413
|
-
},
|
|
8444
|
+
}, qn = (e, t, n = !1) => e.text("copyright", t.copyright, "small", {
|
|
8414
8445
|
color: e.tone.muted,
|
|
8415
8446
|
align: n ? "center" : "left"
|
|
8416
8447
|
});
|
|
8417
|
-
function
|
|
8418
|
-
let n =
|
|
8448
|
+
function Jn(e, t) {
|
|
8449
|
+
let n = Hn(t);
|
|
8419
8450
|
if (!n.length) return null;
|
|
8420
8451
|
let r = n.map((t) => e.stack(`col-${t.index}`, [e.text(`columns.${t.index}.title`, t.title, "eyebrow", {
|
|
8421
8452
|
color: e.tone.heading,
|
|
8422
8453
|
align: "left"
|
|
8423
|
-
}),
|
|
8454
|
+
}), Un(e, `col-${t.index}-links`, t.links, "vertical")], {
|
|
8424
8455
|
gap: "var(--semantic-space-md)",
|
|
8425
8456
|
align: "flex-start"
|
|
8426
8457
|
}));
|
|
@@ -8430,8 +8461,8 @@ function Yn(e, t) {
|
|
|
8430
8461
|
2
|
|
8431
8462
|
], { gap: "var(--semantic-space-xl)" });
|
|
8432
8463
|
}
|
|
8433
|
-
var
|
|
8434
|
-
let r = [
|
|
8464
|
+
var Yn = (e, t, n) => {
|
|
8465
|
+
let r = [qn(e, t), n ? Kn(e, t) : null].filter(Boolean);
|
|
8435
8466
|
return r.length ? e.stack("bottom", [e.divider("rule"), e.row("legal", r, {
|
|
8436
8467
|
justify: "space-between",
|
|
8437
8468
|
gap: "var(--semantic-space-md)",
|
|
@@ -8440,12 +8471,12 @@ var Xn = (e, t, n) => {
|
|
|
8440
8471
|
gap: "var(--semantic-space-lg)",
|
|
8441
8472
|
align: "stretch"
|
|
8442
8473
|
}) : null;
|
|
8443
|
-
},
|
|
8474
|
+
}, Xn = (e) => Hn(e).flatMap((e) => e.links).slice(0, 5), Zn = {
|
|
8444
8475
|
kind: "footer",
|
|
8445
8476
|
label: "Footer",
|
|
8446
8477
|
description: "The closing strip of your page: links, a short description and the small print.",
|
|
8447
8478
|
group: "Footer",
|
|
8448
|
-
fields:
|
|
8479
|
+
fields: Bn,
|
|
8449
8480
|
defaults: {
|
|
8450
8481
|
brand: "Your brand",
|
|
8451
8482
|
text: "Friendly, reliable help for people and small businesses. We’re here whenever you need us.",
|
|
@@ -8504,13 +8535,13 @@ var Xn = (e, t, n) => {
|
|
|
8504
8535
|
...e.style,
|
|
8505
8536
|
align: "left"
|
|
8506
8537
|
}
|
|
8507
|
-
}), n = e.content, r =
|
|
8508
|
-
|
|
8538
|
+
}), n = e.content, r = Un(t, "links", Xn(n), "horizontal"), i = t.row("bar", [
|
|
8539
|
+
Wn(t, n),
|
|
8509
8540
|
r ? t.box("links-wrap", [r], {
|
|
8510
8541
|
flexGrow: 1,
|
|
8511
8542
|
alignItems: "center"
|
|
8512
8543
|
}) : null,
|
|
8513
|
-
|
|
8544
|
+
qn(t, n)
|
|
8514
8545
|
].filter(Boolean), {
|
|
8515
8546
|
justify: "space-between",
|
|
8516
8547
|
gap: "var(--semantic-space-xl)",
|
|
@@ -8538,17 +8569,17 @@ var Xn = (e, t, n) => {
|
|
|
8538
8569
|
align: "left"
|
|
8539
8570
|
}
|
|
8540
8571
|
}), n = e.content, r = t.stack("about", [
|
|
8572
|
+
Wn(t, n),
|
|
8541
8573
|
Gn(t, n),
|
|
8542
|
-
Kn(t, n)
|
|
8543
|
-
qn(t, n)
|
|
8574
|
+
Kn(t, n)
|
|
8544
8575
|
], {
|
|
8545
8576
|
gap: "var(--semantic-space-md)",
|
|
8546
8577
|
align: "flex-start"
|
|
8547
|
-
}), i =
|
|
8578
|
+
}), i = Jn(t, n), a = i ? t.split("top", r, i, {
|
|
8548
8579
|
ratio: [1, 1.6],
|
|
8549
8580
|
align: "flex-start"
|
|
8550
8581
|
}) : r;
|
|
8551
|
-
return [t.container([a,
|
|
8582
|
+
return [t.container([a, Yn(t, n, !1)], { gap: "calc(var(--semantic-space-xl) * 1.5)" })];
|
|
8552
8583
|
}
|
|
8553
8584
|
},
|
|
8554
8585
|
{
|
|
@@ -8575,15 +8606,15 @@ var Xn = (e, t, n) => {
|
|
|
8575
8606
|
...e.style,
|
|
8576
8607
|
align: "center"
|
|
8577
8608
|
}
|
|
8578
|
-
}), n = e.content, r =
|
|
8609
|
+
}), n = e.content, r = Un(t, "links", Xn(n), "horizontal"), i = t.stack("top", [
|
|
8610
|
+
Wn(t, n, !0),
|
|
8579
8611
|
Gn(t, n, !0),
|
|
8580
|
-
Kn(t, n, !0),
|
|
8581
8612
|
r ? t.box("links-wrap", [r], {
|
|
8582
8613
|
width: "fit-content",
|
|
8583
8614
|
alignItems: "center",
|
|
8584
8615
|
margin: "0 auto"
|
|
8585
8616
|
}) : null,
|
|
8586
|
-
|
|
8617
|
+
Kn(t, n)
|
|
8587
8618
|
], {
|
|
8588
8619
|
gap: "var(--semantic-space-lg)",
|
|
8589
8620
|
align: "center"
|
|
@@ -8591,7 +8622,7 @@ var Xn = (e, t, n) => {
|
|
|
8591
8622
|
return [t.container([
|
|
8592
8623
|
i,
|
|
8593
8624
|
t.divider("rule"),
|
|
8594
|
-
|
|
8625
|
+
qn(t, n, !0)
|
|
8595
8626
|
], {
|
|
8596
8627
|
gap: "var(--semantic-space-xl)",
|
|
8597
8628
|
alignItems: "center"
|
|
@@ -8637,8 +8668,8 @@ var Xn = (e, t, n) => {
|
|
|
8637
8668
|
textColor: t.tone.heading
|
|
8638
8669
|
}
|
|
8639
8670
|
}, i = t.stack("about", [
|
|
8671
|
+
Wn(t, n),
|
|
8640
8672
|
Gn(t, n),
|
|
8641
|
-
Kn(t, n),
|
|
8642
8673
|
t.text("signupTitle", n.signupTitle, "small", {
|
|
8643
8674
|
color: t.tone.heading,
|
|
8644
8675
|
styles: {
|
|
@@ -8647,19 +8678,19 @@ var Xn = (e, t, n) => {
|
|
|
8647
8678
|
}
|
|
8648
8679
|
}),
|
|
8649
8680
|
r,
|
|
8650
|
-
|
|
8681
|
+
Kn(t, n)
|
|
8651
8682
|
], {
|
|
8652
8683
|
gap: "var(--semantic-space-md)",
|
|
8653
8684
|
align: "flex-start"
|
|
8654
|
-
}), a =
|
|
8685
|
+
}), a = Jn(t, n), o = a ? t.split("top", i, a, {
|
|
8655
8686
|
ratio: [1.1, 1.3],
|
|
8656
8687
|
align: "flex-start"
|
|
8657
8688
|
}) : i;
|
|
8658
|
-
return [t.container([o,
|
|
8689
|
+
return [t.container([o, Yn(t, n, !1)], { gap: "calc(var(--semantic-space-xl) * 1.5)" })];
|
|
8659
8690
|
}
|
|
8660
8691
|
}
|
|
8661
8692
|
]
|
|
8662
|
-
},
|
|
8693
|
+
}, Qn = [
|
|
8663
8694
|
{
|
|
8664
8695
|
key: "eyebrow",
|
|
8665
8696
|
label: "Small label above",
|
|
@@ -8697,8 +8728,8 @@ var Xn = (e, t, n) => {
|
|
|
8697
8728
|
hint: "Optional."
|
|
8698
8729
|
}]
|
|
8699
8730
|
}
|
|
8700
|
-
],
|
|
8701
|
-
function
|
|
8731
|
+
], $n = (e) => Array.isArray(e.content.items) ? e.content.items : [];
|
|
8732
|
+
function er(e, t = !1) {
|
|
8702
8733
|
let n = k(t ? {
|
|
8703
8734
|
...e,
|
|
8704
8735
|
style: {
|
|
@@ -8718,7 +8749,7 @@ function tr(e, t = !1) {
|
|
|
8718
8749
|
}
|
|
8719
8750
|
});
|
|
8720
8751
|
}
|
|
8721
|
-
var
|
|
8752
|
+
var tr = (e, t, n, r = {}) => {
|
|
8722
8753
|
let i = e.image(`items.${t}.image`, n.image, n.imageAlt || n.caption || "", {
|
|
8723
8754
|
ratio: r.ratio ?? "4 / 3",
|
|
8724
8755
|
radius: r.radius ?? "var(--radius-xl)"
|
|
@@ -8742,12 +8773,12 @@ var nr = (e, t, n, r = {}) => {
|
|
|
8742
8773
|
gridRowSpan: 1
|
|
8743
8774
|
}
|
|
8744
8775
|
} } : {});
|
|
8745
|
-
},
|
|
8776
|
+
}, nr = {
|
|
8746
8777
|
kind: "gallery",
|
|
8747
8778
|
label: "Gallery",
|
|
8748
8779
|
description: "A collection of pictures — your work, your place, your people.",
|
|
8749
8780
|
group: "Content",
|
|
8750
|
-
fields:
|
|
8781
|
+
fields: Qn,
|
|
8751
8782
|
defaults: {
|
|
8752
8783
|
eyebrow: "Gallery",
|
|
8753
8784
|
heading: "A closer look",
|
|
@@ -8791,7 +8822,7 @@ var nr = (e, t, n, r = {}) => {
|
|
|
8791
8822
|
],
|
|
8792
8823
|
build(e) {
|
|
8793
8824
|
let t = k(e);
|
|
8794
|
-
return [t.container([
|
|
8825
|
+
return [t.container([er(e), t.grid("grid", $n(e).map((e, n) => tr(t, n, e)), [
|
|
8795
8826
|
3,
|
|
8796
8827
|
2,
|
|
8797
8828
|
1
|
|
@@ -8814,7 +8845,7 @@ var nr = (e, t, n, r = {}) => {
|
|
|
8814
8845
|
"inverted"
|
|
8815
8846
|
],
|
|
8816
8847
|
build(e) {
|
|
8817
|
-
let t = k(e), n = t.grid("grid",
|
|
8848
|
+
let t = k(e), n = t.grid("grid", $n(e).map((e, n) => tr(t, n, e, {
|
|
8818
8849
|
ratio: "1 / 1",
|
|
8819
8850
|
radius: "var(--radius-md)",
|
|
8820
8851
|
caption: !1
|
|
@@ -8823,7 +8854,7 @@ var nr = (e, t, n, r = {}) => {
|
|
|
8823
8854
|
3,
|
|
8824
8855
|
2
|
|
8825
8856
|
], { gap: "var(--semantic-space-sm)" });
|
|
8826
|
-
return [t.container([
|
|
8857
|
+
return [t.container([er(e), n], { gap: "var(--semantic-space-xl)" })];
|
|
8827
8858
|
}
|
|
8828
8859
|
},
|
|
8829
8860
|
{
|
|
@@ -8832,20 +8863,20 @@ var nr = (e, t, n, r = {}) => {
|
|
|
8832
8863
|
description: "The first picture big, the others around it — a magazine-style spread.",
|
|
8833
8864
|
backgrounds: ["canvas", "sunken"],
|
|
8834
8865
|
build(e) {
|
|
8835
|
-
let t = k(e), n =
|
|
8866
|
+
let t = k(e), n = $n(e).slice(0, 9), r = n.length > 5 && (n.length - 5) % 4 == 1, i = n.map((e, i) => i === 0 ? tr(t, i, e, {
|
|
8836
8867
|
ratio: "1 / 1",
|
|
8837
8868
|
span: {
|
|
8838
8869
|
cols: 2,
|
|
8839
8870
|
rows: 2
|
|
8840
8871
|
}
|
|
8841
|
-
}) : r && i === n.length - 1 ?
|
|
8872
|
+
}) : r && i === n.length - 1 ? tr(t, i, e, {
|
|
8842
8873
|
ratio: "3 / 1",
|
|
8843
8874
|
span: {
|
|
8844
8875
|
cols: 4,
|
|
8845
8876
|
rows: 1
|
|
8846
8877
|
}
|
|
8847
|
-
}) :
|
|
8848
|
-
return [t.container([
|
|
8878
|
+
}) : tr(t, i, e, { ratio: "4 / 3" }));
|
|
8879
|
+
return [t.container([er(e), t.grid("grid", i, [
|
|
8849
8880
|
4,
|
|
8850
8881
|
2,
|
|
8851
8882
|
1
|
|
@@ -8862,7 +8893,7 @@ var nr = (e, t, n, r = {}) => {
|
|
|
8862
8893
|
"inverted"
|
|
8863
8894
|
],
|
|
8864
8895
|
build(e) {
|
|
8865
|
-
let t = k(e), n =
|
|
8896
|
+
let t = k(e), n = $n(e).map((e) => ({
|
|
8866
8897
|
src: e.image ?? "",
|
|
8867
8898
|
alt: e.imageAlt || e.caption || "",
|
|
8868
8899
|
caption: e.caption ?? ""
|
|
@@ -8886,11 +8917,11 @@ var nr = (e, t, n, r = {}) => {
|
|
|
8886
8917
|
textColor: e.tone.heading
|
|
8887
8918
|
}
|
|
8888
8919
|
};
|
|
8889
|
-
return [t.container([
|
|
8920
|
+
return [t.container([er(e, !0), r], { gap: "var(--semantic-space-xl)" })];
|
|
8890
8921
|
}
|
|
8891
8922
|
}
|
|
8892
8923
|
]
|
|
8893
|
-
},
|
|
8924
|
+
}, rr = [
|
|
8894
8925
|
{
|
|
8895
8926
|
key: "brand",
|
|
8896
8927
|
label: "Site name",
|
|
@@ -8928,7 +8959,7 @@ var nr = (e, t, n, r = {}) => {
|
|
|
8928
8959
|
hint: "Optional."
|
|
8929
8960
|
}
|
|
8930
8961
|
];
|
|
8931
|
-
function
|
|
8962
|
+
function ir(e) {
|
|
8932
8963
|
let t = k(e), n = e.content;
|
|
8933
8964
|
return {
|
|
8934
8965
|
k: t,
|
|
@@ -8962,7 +8993,7 @@ function ar(e) {
|
|
|
8962
8993
|
cta: t.button("cta", n.cta, "primary")
|
|
8963
8994
|
};
|
|
8964
8995
|
}
|
|
8965
|
-
var
|
|
8996
|
+
var ar = (e, t, n = "space-between") => t.container([t.row("bar", e, {
|
|
8966
8997
|
justify: n,
|
|
8967
8998
|
gap: "var(--semantic-space-xl)",
|
|
8968
8999
|
align: "center",
|
|
@@ -8970,13 +9001,13 @@ var or = (e, t, n = "space-between") => t.container([t.row("bar", e, {
|
|
|
8970
9001
|
paddingTop: "0px",
|
|
8971
9002
|
paddingBottom: "0px"
|
|
8972
9003
|
}
|
|
8973
|
-
})], { gap: "0px" }),
|
|
9004
|
+
})], { gap: "0px" }), or = {
|
|
8974
9005
|
kind: "header",
|
|
8975
9006
|
label: "Header & menu",
|
|
8976
9007
|
description: "Your logo and navigation, at the top of the page.",
|
|
8977
9008
|
group: "Navigation",
|
|
8978
9009
|
compact: !0,
|
|
8979
|
-
fields:
|
|
9010
|
+
fields: rr,
|
|
8980
9011
|
defaults: {
|
|
8981
9012
|
brand: "Your brand",
|
|
8982
9013
|
logo: "",
|
|
@@ -9015,8 +9046,8 @@ var or = (e, t, n = "space-between") => t.container([t.row("bar", e, {
|
|
|
9015
9046
|
borderColor: "var(--color-border-subtle)"
|
|
9016
9047
|
},
|
|
9017
9048
|
build(e) {
|
|
9018
|
-
let { k: t, brand: n, links: r, cta: i } =
|
|
9019
|
-
return [
|
|
9049
|
+
let { k: t, brand: n, links: r, cta: i } = ir(e);
|
|
9050
|
+
return [ar([n, t.row("right", [r, i], {
|
|
9020
9051
|
gap: "var(--semantic-space-xl)",
|
|
9021
9052
|
align: "center",
|
|
9022
9053
|
justify: "flex-end",
|
|
@@ -9035,7 +9066,7 @@ var or = (e, t, n = "space-between") => t.container([t.row("bar", e, {
|
|
|
9035
9066
|
borderColor: "var(--color-border-subtle)"
|
|
9036
9067
|
},
|
|
9037
9068
|
build(e) {
|
|
9038
|
-
let { k: t, brand: n, links: r, cta: i } =
|
|
9069
|
+
let { k: t, brand: n, links: r, cta: i } = ir({
|
|
9039
9070
|
...e,
|
|
9040
9071
|
style: {
|
|
9041
9072
|
...e.style,
|
|
@@ -9066,7 +9097,7 @@ var or = (e, t, n = "space-between") => t.container([t.row("bar", e, {
|
|
|
9066
9097
|
borderColor: "var(--color-border-subtle)"
|
|
9067
9098
|
},
|
|
9068
9099
|
build(e) {
|
|
9069
|
-
let { k: t, brand: n, links: r, cta: i } =
|
|
9100
|
+
let { k: t, brand: n, links: r, cta: i } = ir(e), a = t.box("bar", [
|
|
9070
9101
|
t.box("l", [r], { alignItems: "flex-start" }),
|
|
9071
9102
|
t.box("c", [n], { alignItems: "center" }),
|
|
9072
9103
|
t.box("r", [i], { alignItems: "flex-end" })
|
|
@@ -9096,12 +9127,12 @@ var or = (e, t, n = "space-between") => t.container([t.row("bar", e, {
|
|
|
9096
9127
|
borderColor: "var(--color-border-subtle)"
|
|
9097
9128
|
},
|
|
9098
9129
|
build(e) {
|
|
9099
|
-
let { k: t, brand: n, cta: r } =
|
|
9100
|
-
return [
|
|
9130
|
+
let { k: t, brand: n, cta: r } = ir(e);
|
|
9131
|
+
return [ar([n, r], t)];
|
|
9101
9132
|
}
|
|
9102
9133
|
}
|
|
9103
9134
|
]
|
|
9104
|
-
},
|
|
9135
|
+
}, sr = [
|
|
9105
9136
|
{
|
|
9106
9137
|
key: "eyebrow",
|
|
9107
9138
|
label: "Small label above",
|
|
@@ -9143,7 +9174,7 @@ var or = (e, t, n = "space-between") => t.container([t.row("bar", e, {
|
|
|
9143
9174
|
label: "Picture",
|
|
9144
9175
|
type: "image"
|
|
9145
9176
|
}
|
|
9146
|
-
],
|
|
9177
|
+
], cr = (e, t, n = {}) => {
|
|
9147
9178
|
let r = n.centered || t.align === "center", i = t.row("buttons", [t.button("cta", e.cta, "primary"), t.button("cta2", e.cta2, "secondary")], {
|
|
9148
9179
|
gap: "var(--semantic-space-md)",
|
|
9149
9180
|
wrap: !0,
|
|
@@ -9166,21 +9197,21 @@ var or = (e, t, n = "space-between") => t.container([t.row("bar", e, {
|
|
|
9166
9197
|
})
|
|
9167
9198
|
];
|
|
9168
9199
|
};
|
|
9169
|
-
function
|
|
9200
|
+
function lr(e) {
|
|
9170
9201
|
return (t) => {
|
|
9171
|
-
let n = k(t), r = t.content, i = n.stack("copy",
|
|
9202
|
+
let n = k(t), r = t.content, i = n.stack("copy", cr(r, n), { gap: "var(--semantic-space-lg)" }), a = n.image("image", r.image, r.imageAlt, {
|
|
9172
9203
|
ratio: "5 / 4",
|
|
9173
9204
|
radius: "var(--radius-2xl)"
|
|
9174
9205
|
});
|
|
9175
9206
|
return [n.container([n.split("split", e ? a : i, e ? i : a, { ratio: [1.05, 1] })])];
|
|
9176
9207
|
};
|
|
9177
9208
|
}
|
|
9178
|
-
var
|
|
9209
|
+
var ur = {
|
|
9179
9210
|
kind: "hero",
|
|
9180
9211
|
label: "Hero",
|
|
9181
9212
|
description: "The big opening of a page: a headline, a line of text and a button.",
|
|
9182
9213
|
group: "Intro",
|
|
9183
|
-
fields:
|
|
9214
|
+
fields: sr,
|
|
9184
9215
|
defaults: {
|
|
9185
9216
|
eyebrow: "Welcome",
|
|
9186
9217
|
headline: "Build something your customers will love",
|
|
@@ -9203,14 +9234,14 @@ var dr = {
|
|
|
9203
9234
|
label: "Text left, picture right",
|
|
9204
9235
|
description: "The classic: words on one side, a picture on the other.",
|
|
9205
9236
|
backgrounds: ["canvas", "sunken"],
|
|
9206
|
-
build:
|
|
9237
|
+
build: lr(!1)
|
|
9207
9238
|
},
|
|
9208
9239
|
{
|
|
9209
9240
|
id: "image-left",
|
|
9210
9241
|
label: "Picture left, text right",
|
|
9211
9242
|
description: "The same, mirrored.",
|
|
9212
9243
|
backgrounds: ["canvas", "sunken"],
|
|
9213
|
-
build:
|
|
9244
|
+
build: lr(!0)
|
|
9214
9245
|
},
|
|
9215
9246
|
{
|
|
9216
9247
|
id: "centered",
|
|
@@ -9228,7 +9259,7 @@ var dr = {
|
|
|
9228
9259
|
...e.style,
|
|
9229
9260
|
align: "center"
|
|
9230
9261
|
}
|
|
9231
|
-
}), n = e.content, r = [t.stack("copy",
|
|
9262
|
+
}), n = e.content, r = [t.stack("copy", cr(n, t, { centered: !0 }), {
|
|
9232
9263
|
gap: "var(--semantic-space-lg)",
|
|
9233
9264
|
align: "center"
|
|
9234
9265
|
}), n.image ? t.image("image", n.image, n.imageAlt, {
|
|
@@ -9258,7 +9289,7 @@ var dr = {
|
|
|
9258
9289
|
],
|
|
9259
9290
|
build(e) {
|
|
9260
9291
|
let t = k(e);
|
|
9261
|
-
return [t.container([t.stack("copy",
|
|
9292
|
+
return [t.container([t.stack("copy", cr(e.content, t), {
|
|
9262
9293
|
gap: "var(--semantic-space-lg)",
|
|
9263
9294
|
styles: {
|
|
9264
9295
|
minHeight: "26rem",
|
|
@@ -9287,7 +9318,7 @@ var dr = {
|
|
|
9287
9318
|
],
|
|
9288
9319
|
build(e) {
|
|
9289
9320
|
let t = k(e);
|
|
9290
|
-
return [t.container([t.stack("copy",
|
|
9321
|
+
return [t.container([t.stack("copy", cr(e.content, t), {
|
|
9291
9322
|
gap: "var(--semantic-space-lg)",
|
|
9292
9323
|
styles: { maxWidth: "52rem" }
|
|
9293
9324
|
})])];
|
|
@@ -9340,7 +9371,7 @@ var dr = {
|
|
|
9340
9371
|
}
|
|
9341
9372
|
};
|
|
9342
9373
|
return [t.container([t.stack("copy", [
|
|
9343
|
-
...
|
|
9374
|
+
...cr(n, t, { centered: !0 }).slice(0, 3),
|
|
9344
9375
|
r,
|
|
9345
9376
|
t.text("note", n.note, "small", {
|
|
9346
9377
|
color: e.tone.muted,
|
|
@@ -9353,7 +9384,7 @@ var dr = {
|
|
|
9353
9384
|
}
|
|
9354
9385
|
}
|
|
9355
9386
|
]
|
|
9356
|
-
},
|
|
9387
|
+
}, dr = [{
|
|
9357
9388
|
key: "heading",
|
|
9358
9389
|
label: "Heading",
|
|
9359
9390
|
type: "text",
|
|
@@ -9377,9 +9408,9 @@ var dr = {
|
|
|
9377
9408
|
type: "text",
|
|
9378
9409
|
max: 32
|
|
9379
9410
|
}]
|
|
9380
|
-
}],
|
|
9381
|
-
function
|
|
9382
|
-
let i =
|
|
9411
|
+
}], fr = (e) => Array.isArray(e.items) ? e.items : [];
|
|
9412
|
+
function pr(e, t, n, r = {}) {
|
|
9413
|
+
let i = fr(t)[n];
|
|
9383
9414
|
return i.image ? e.image(`items.${n}.image`, i.image, i.imageAlt || i.name, {
|
|
9384
9415
|
ratio: "auto",
|
|
9385
9416
|
radius: "0px",
|
|
@@ -9396,16 +9427,16 @@ function mr(e, t, n, r = {}) {
|
|
|
9396
9427
|
styles: { width: "auto" }
|
|
9397
9428
|
});
|
|
9398
9429
|
}
|
|
9399
|
-
var
|
|
9430
|
+
var mr = (e, t, n, r = {}) => e.box(`item-${n}`, [pr(e, t, n)], {
|
|
9400
9431
|
alignItems: "center",
|
|
9401
9432
|
justifyContent: "center",
|
|
9402
9433
|
...r
|
|
9403
|
-
}),
|
|
9434
|
+
}), hr = (e) => e <= 4 ? Math.max(e, 1) : e <= 6 ? 3 : 4, gr = (e, t, n = {}) => fr(t).map((r, i) => mr(e, t, i, n)), _r = {
|
|
9404
9435
|
kind: "logos",
|
|
9405
9436
|
label: "Logos",
|
|
9406
9437
|
description: "A “trusted by” strip of customer, partner or press logos.",
|
|
9407
9438
|
group: "Proof",
|
|
9408
|
-
fields:
|
|
9439
|
+
fields: dr,
|
|
9409
9440
|
defaults: {
|
|
9410
9441
|
heading: "Trusted by teams at",
|
|
9411
9442
|
items: [
|
|
@@ -9458,7 +9489,7 @@ var hr = (e, t, n, r = {}) => e.box(`item-${n}`, [mr(e, t, n)], {
|
|
|
9458
9489
|
...e.style,
|
|
9459
9490
|
align: "center"
|
|
9460
9491
|
}
|
|
9461
|
-
}), n = t.row("logos",
|
|
9492
|
+
}), n = t.row("logos", gr(t, e.content, { width: "auto" }), {
|
|
9462
9493
|
gap: "var(--semantic-space-lg) calc(var(--plx-gap) * 1.5)",
|
|
9463
9494
|
justify: "center",
|
|
9464
9495
|
wrap: !0
|
|
@@ -9488,7 +9519,7 @@ var hr = (e, t, n, r = {}) => e.box(`item-${n}`, [mr(e, t, n)], {
|
|
|
9488
9519
|
...e.style,
|
|
9489
9520
|
align: "center"
|
|
9490
9521
|
}
|
|
9491
|
-
}), n =
|
|
9522
|
+
}), n = fr(e.content).length, r = hr(n), i = fr(e.content).map((n, r) => t.card(`card-${r}`, [pr(t, e.content, r)], {
|
|
9492
9523
|
alignItems: "center",
|
|
9493
9524
|
justifyContent: "center",
|
|
9494
9525
|
minHeight: "5.5rem",
|
|
@@ -9521,7 +9552,7 @@ var hr = (e, t, n, r = {}) => e.box(`item-${n}`, [mr(e, t, n)], {
|
|
|
9521
9552
|
...e.style,
|
|
9522
9553
|
align: "left"
|
|
9523
9554
|
}
|
|
9524
|
-
}), n = t.stack("copy", [t.text("heading", e.content.heading, "h3", { maxWidth: "18rem" })], { align: "flex-start" }), r = t.grid("logos",
|
|
9555
|
+
}), n = t.stack("copy", [t.text("heading", e.content.heading, "h3", { maxWidth: "18rem" })], { align: "flex-start" }), r = t.grid("logos", gr(t, e.content, { minHeight: "4rem" }), [
|
|
9525
9556
|
3,
|
|
9526
9557
|
3,
|
|
9527
9558
|
2
|
|
@@ -9548,7 +9579,7 @@ var hr = (e, t, n, r = {}) => e.box(`item-${n}`, [mr(e, t, n)], {
|
|
|
9548
9579
|
...e.style,
|
|
9549
9580
|
align: "center"
|
|
9550
9581
|
}
|
|
9551
|
-
}), n =
|
|
9582
|
+
}), n = fr(e.content).length, r = Math.min(Math.max(Math.ceil(n / 2), 1), 6), i = fr(e.content).map((n, r) => mr(t, e.content, r, {
|
|
9552
9583
|
backgroundColor: t.tone.card,
|
|
9553
9584
|
minHeight: "6rem",
|
|
9554
9585
|
paddingLeft: "var(--semantic-space-md)",
|
|
@@ -9574,7 +9605,7 @@ var hr = (e, t, n, r = {}) => e.box(`item-${n}`, [mr(e, t, n)], {
|
|
|
9574
9605
|
}
|
|
9575
9606
|
}
|
|
9576
9607
|
]
|
|
9577
|
-
},
|
|
9608
|
+
}, vr = [
|
|
9578
9609
|
{
|
|
9579
9610
|
key: "eyebrow",
|
|
9580
9611
|
label: "Small label above",
|
|
@@ -9654,7 +9685,7 @@ var hr = (e, t, n, r = {}) => e.box(`item-${n}`, [mr(e, t, n)], {
|
|
|
9654
9685
|
}
|
|
9655
9686
|
]
|
|
9656
9687
|
}
|
|
9657
|
-
],
|
|
9688
|
+
], yr = (e) => Array.isArray(e.content.items) ? e.content.items : [], br = (e) => typeof e == "string" ? e.split(/\r?\n/).map((e) => e.trim()).filter(Boolean) : [], xr = (e) => (e?.props && (delete e.props.bind, Object.keys(e.props).length || delete e.props), e), Sr = (e) => e >= 4 ? [
|
|
9658
9689
|
4,
|
|
9659
9690
|
2,
|
|
9660
9691
|
1
|
|
@@ -9671,7 +9702,7 @@ var hr = (e, t, n, r = {}) => e.box(`item-${n}`, [mr(e, t, n)], {
|
|
|
9671
9702
|
1,
|
|
9672
9703
|
1
|
|
9673
9704
|
];
|
|
9674
|
-
function
|
|
9705
|
+
function Cr(e, t = !0) {
|
|
9675
9706
|
let n = k(t ? {
|
|
9676
9707
|
...e,
|
|
9677
9708
|
style: {
|
|
@@ -9691,15 +9722,15 @@ function wr(e, t = !0) {
|
|
|
9691
9722
|
}
|
|
9692
9723
|
});
|
|
9693
9724
|
}
|
|
9694
|
-
function
|
|
9725
|
+
function wr(e) {
|
|
9695
9726
|
let t = e.tone.inverse;
|
|
9696
9727
|
return {
|
|
9697
9728
|
tone: Ge(t ? "canvas" : "primary"),
|
|
9698
9729
|
bg: t ? "var(--color-bg-canvas)" : "var(--color-action-primary-bg)"
|
|
9699
9730
|
};
|
|
9700
9731
|
}
|
|
9701
|
-
function
|
|
9702
|
-
let r =
|
|
9732
|
+
function Tr(e, t, n) {
|
|
9733
|
+
let r = br(n);
|
|
9703
9734
|
if (!r.length) return null;
|
|
9704
9735
|
let i = (n) => ({
|
|
9705
9736
|
id: e.id(`i${t}t${n}`),
|
|
@@ -9717,7 +9748,7 @@ function Er(e, t, n) {
|
|
|
9717
9748
|
flexShrink: 0,
|
|
9718
9749
|
backgroundColor: e.tone.inverse ? e.tone.card : "color-mix(in srgb, var(--color-brand-primary-500) 14%, var(--color-bg-canvas))"
|
|
9719
9750
|
}
|
|
9720
|
-
}), a = r.flatMap((n, r) => [i(r),
|
|
9751
|
+
}), a = r.flatMap((n, r) => [i(r), xr(e.text(`items.${t}.features.${r}`, n, "body", {
|
|
9721
9752
|
color: e.tone.body,
|
|
9722
9753
|
align: "left"
|
|
9723
9754
|
}))]);
|
|
@@ -9731,7 +9762,7 @@ function Er(e, t, n) {
|
|
|
9731
9762
|
flexGrow: 1
|
|
9732
9763
|
});
|
|
9733
9764
|
}
|
|
9734
|
-
function
|
|
9765
|
+
function Er(e, t, n, r = "h1") {
|
|
9735
9766
|
return !n.price?.trim() && !n.period?.trim() ? null : e.row(`items-${t}-priceline`, [e.text(`items.${t}.price`, n.price, r, {
|
|
9736
9767
|
align: "left",
|
|
9737
9768
|
styles: { width: "auto" }
|
|
@@ -9747,7 +9778,7 @@ function Dr(e, t, n, r = "h1") {
|
|
|
9747
9778
|
align: "flex-end"
|
|
9748
9779
|
});
|
|
9749
9780
|
}
|
|
9750
|
-
var
|
|
9781
|
+
var Dr = (e, t) => {
|
|
9751
9782
|
let n = t.content.badge;
|
|
9752
9783
|
return typeof n != "string" || !n.trim() ? null : e.box("badge-wrap", [e.text("badge", n, "eyebrow", {
|
|
9753
9784
|
color: e.tone.accent,
|
|
@@ -9766,15 +9797,15 @@ var Or = (e, t) => {
|
|
|
9766
9797
|
borderColor: e.tone.line
|
|
9767
9798
|
});
|
|
9768
9799
|
};
|
|
9769
|
-
function
|
|
9770
|
-
let i = !!n.highlighted, a =
|
|
9800
|
+
function Or(e, t, n, r = {}) {
|
|
9801
|
+
let i = !!n.highlighted, a = wr(e), o = k(i ? {
|
|
9771
9802
|
...e,
|
|
9772
9803
|
tone: a.tone
|
|
9773
9804
|
} : e), s = r.pad ?? "2rem", c = [
|
|
9774
|
-
i ?
|
|
9805
|
+
i ? Dr(o, e) : null,
|
|
9775
9806
|
o.stack(`items-${t}-top`, [
|
|
9776
9807
|
o.text(`items.${t}.name`, n.name, "h3", { align: "left" }),
|
|
9777
|
-
|
|
9808
|
+
Er(o, t, n, r.big),
|
|
9778
9809
|
o.text(`items.${t}.description`, n.description, "small", {
|
|
9779
9810
|
color: o.tone.muted,
|
|
9780
9811
|
align: "left"
|
|
@@ -9784,7 +9815,7 @@ function kr(e, t, n, r = {}) {
|
|
|
9784
9815
|
align: "flex-start"
|
|
9785
9816
|
}),
|
|
9786
9817
|
o.divider(`items-${t}-rule`),
|
|
9787
|
-
|
|
9818
|
+
Tr(o, t, n.features),
|
|
9788
9819
|
o.button(`items.${t}.cta`, n.cta, "primary")
|
|
9789
9820
|
], l = o.card(`items-${t}-card`, c, {
|
|
9790
9821
|
paddingTop: s,
|
|
@@ -9824,12 +9855,12 @@ function kr(e, t, n, r = {}) {
|
|
|
9824
9855
|
}
|
|
9825
9856
|
} : u;
|
|
9826
9857
|
}
|
|
9827
|
-
var
|
|
9858
|
+
var kr = {
|
|
9828
9859
|
kind: "pricing",
|
|
9829
9860
|
label: "Pricing",
|
|
9830
9861
|
description: "Your plans and prices, side by side, with what each one includes.",
|
|
9831
9862
|
group: "Convert",
|
|
9832
|
-
fields:
|
|
9863
|
+
fields: vr,
|
|
9833
9864
|
defaults: {
|
|
9834
9865
|
eyebrow: "Pricing",
|
|
9835
9866
|
heading: "Simple plans that grow with you",
|
|
@@ -9886,8 +9917,8 @@ var Ar = {
|
|
|
9886
9917
|
"gradient"
|
|
9887
9918
|
],
|
|
9888
9919
|
build(e) {
|
|
9889
|
-
let t = k(e), n =
|
|
9890
|
-
return [t.container([
|
|
9920
|
+
let t = k(e), n = yr(e).slice(0, 4);
|
|
9921
|
+
return [t.container([Cr(e), t.grid("plans", n.map((t, r) => Or(e, r, t, { raise: n.some((e) => e.highlighted) })), Sr(n.length), { styles: { alignItems: "stretch" } })], { gap: "calc(var(--plx-gap) * 2)" })];
|
|
9891
9922
|
}
|
|
9892
9923
|
},
|
|
9893
9924
|
{
|
|
@@ -9900,11 +9931,11 @@ var Ar = {
|
|
|
9900
9931
|
"surface"
|
|
9901
9932
|
],
|
|
9902
9933
|
build(e) {
|
|
9903
|
-
let t = k(e), n =
|
|
9934
|
+
let t = k(e), n = yr(e).slice(0, 2).map((t, n) => Or(e, n, t, {
|
|
9904
9935
|
big: "display",
|
|
9905
9936
|
pad: "2.5rem"
|
|
9906
9937
|
}));
|
|
9907
|
-
return [t.container([
|
|
9938
|
+
return [t.container([Cr(e), t.grid("plans", n, [
|
|
9908
9939
|
2,
|
|
9909
9940
|
1,
|
|
9910
9941
|
1
|
|
@@ -9925,12 +9956,12 @@ var Ar = {
|
|
|
9925
9956
|
"surface"
|
|
9926
9957
|
],
|
|
9927
9958
|
build(e) {
|
|
9928
|
-
let t = k(e), n =
|
|
9929
|
-
let r = !!t.highlighted, i =
|
|
9959
|
+
let t = k(e), n = yr(e).map((t, n) => {
|
|
9960
|
+
let r = !!t.highlighted, i = wr(e), a = k(r ? {
|
|
9930
9961
|
...e,
|
|
9931
9962
|
tone: i.tone
|
|
9932
9963
|
} : e), o = a.stack(`items-${n}-left`, [
|
|
9933
|
-
r ?
|
|
9964
|
+
r ? Dr(a, e) : null,
|
|
9934
9965
|
a.text(`items.${n}.name`, t.name, "h3", { align: "left" }),
|
|
9935
9966
|
a.text(`items.${n}.description`, t.description, "small", {
|
|
9936
9967
|
color: a.tone.muted,
|
|
@@ -9939,7 +9970,7 @@ var Ar = {
|
|
|
9939
9970
|
], {
|
|
9940
9971
|
gap: "var(--semantic-space-sm)",
|
|
9941
9972
|
align: "flex-start"
|
|
9942
|
-
}), s = a.stack(`items-${n}-right`, [
|
|
9973
|
+
}), s = a.stack(`items-${n}-right`, [Er(a, n, t), t.cta?.label ? {
|
|
9943
9974
|
...a.button(`items.${n}.cta`, t.cta, "primary"),
|
|
9944
9975
|
styles: {
|
|
9945
9976
|
...a.button(`items.${n}.cta`, t.cta, "primary").styles,
|
|
@@ -9950,7 +9981,7 @@ var Ar = {
|
|
|
9950
9981
|
align: "stretch"
|
|
9951
9982
|
}), c = a.box(`items-${n}-grid`, [
|
|
9952
9983
|
o,
|
|
9953
|
-
|
|
9984
|
+
Tr(a, n, t.features),
|
|
9954
9985
|
s
|
|
9955
9986
|
], {
|
|
9956
9987
|
layoutMode: "grid",
|
|
@@ -9974,7 +10005,7 @@ var Ar = {
|
|
|
9974
10005
|
} : {}
|
|
9975
10006
|
});
|
|
9976
10007
|
});
|
|
9977
|
-
return [t.container([
|
|
10008
|
+
return [t.container([Cr(e), t.stack("plans", n, {
|
|
9978
10009
|
gap: "var(--semantic-space-md)",
|
|
9979
10010
|
align: "stretch"
|
|
9980
10011
|
})], { gap: "calc(var(--plx-gap) * 2)" })];
|
|
@@ -9996,9 +10027,9 @@ var Ar = {
|
|
|
9996
10027
|
"surface"
|
|
9997
10028
|
],
|
|
9998
10029
|
build(e) {
|
|
9999
|
-
let t = k(e), n =
|
|
10000
|
-
for (let e of n) for (let t of
|
|
10001
|
-
let i = (e, t) =>
|
|
10030
|
+
let t = k(e), n = yr(e).slice(0, 4), r = [];
|
|
10031
|
+
for (let e of n) for (let t of br(e.features)) r.some((e) => e.toLowerCase() === t.toLowerCase()) || r.push(t);
|
|
10032
|
+
let i = (e, t) => br(e.features).some((e) => e.toLowerCase() === t.toLowerCase()), a = [
|
|
10002
10033
|
["", ...n.map((e) => e.name ?? "")],
|
|
10003
10034
|
["Price", ...n.map((e) => [e.price, e.period].filter(Boolean).join(" "))],
|
|
10004
10035
|
...r.map((e) => [e, ...n.map((t) => i(t, e) ? "✓" : "—")])
|
|
@@ -10025,14 +10056,14 @@ var Ar = {
|
|
|
10025
10056
|
justifyItems: "center"
|
|
10026
10057
|
} });
|
|
10027
10058
|
return [t.container([
|
|
10028
|
-
|
|
10059
|
+
Cr(e),
|
|
10029
10060
|
o,
|
|
10030
10061
|
n.some((e) => e.cta?.label) ? s : null
|
|
10031
10062
|
], { gap: "var(--semantic-space-xl)" })];
|
|
10032
10063
|
}
|
|
10033
10064
|
}
|
|
10034
10065
|
]
|
|
10035
|
-
},
|
|
10066
|
+
}, Ar = [
|
|
10036
10067
|
{
|
|
10037
10068
|
key: "heading",
|
|
10038
10069
|
label: "Heading",
|
|
@@ -10067,8 +10098,8 @@ var Ar = {
|
|
|
10067
10098
|
max: 40
|
|
10068
10099
|
}]
|
|
10069
10100
|
}
|
|
10070
|
-
],
|
|
10071
|
-
function
|
|
10101
|
+
], jr = (e) => Array.isArray(e.items) ? e.items : [], Mr = (e) => e <= 4 ? Math.max(e, 1) : e === 5 ? 5 : 3;
|
|
10102
|
+
function Nr(e, t, n, r, i, a = 1.3) {
|
|
10072
10103
|
let o = e.text(`items.${t}.value`, n, "body", {
|
|
10073
10104
|
color: r,
|
|
10074
10105
|
align: i,
|
|
@@ -10084,7 +10115,7 @@ function Pr(e, t, n, r, i, a = 1.3) {
|
|
|
10084
10115
|
responsive: { mobile: { fontSize: "var(--font-size-4xl)" } }
|
|
10085
10116
|
};
|
|
10086
10117
|
}
|
|
10087
|
-
function
|
|
10118
|
+
function Pr(e, t, n) {
|
|
10088
10119
|
let r = n ? "center" : "left", i = [e.text("heading", t.heading, "h2", { align: r }), e.text("text", t.text, "lead", {
|
|
10089
10120
|
align: r,
|
|
10090
10121
|
maxWidth: "36rem"
|
|
@@ -10098,18 +10129,18 @@ function Fr(e, t, n) {
|
|
|
10098
10129
|
}
|
|
10099
10130
|
}) : null;
|
|
10100
10131
|
}
|
|
10101
|
-
var
|
|
10132
|
+
var Fr = (e, t, n, r, i = {}) => {
|
|
10102
10133
|
let a = r ? "center" : "left";
|
|
10103
|
-
return [
|
|
10134
|
+
return [Nr(e, n, t.value, i.valueColor ?? e.tone.accent, a, i.scale), e.text(`items.${n}.label`, t.label, "body", {
|
|
10104
10135
|
color: e.tone.body,
|
|
10105
10136
|
align: a
|
|
10106
10137
|
})];
|
|
10107
|
-
},
|
|
10138
|
+
}, Ir = {
|
|
10108
10139
|
kind: "stats",
|
|
10109
10140
|
label: "Numbers",
|
|
10110
10141
|
description: "A few big numbers that show your track record at a glance.",
|
|
10111
10142
|
group: "Proof",
|
|
10112
|
-
fields:
|
|
10143
|
+
fields: Ar,
|
|
10113
10144
|
defaults: {
|
|
10114
10145
|
heading: "Trusted by people who care about quality",
|
|
10115
10146
|
text: "",
|
|
@@ -10149,13 +10180,13 @@ var Ir = (e, t, n, r, i = {}) => {
|
|
|
10149
10180
|
...e.style,
|
|
10150
10181
|
align: "center"
|
|
10151
10182
|
}
|
|
10152
|
-
}), n =
|
|
10183
|
+
}), n = jr(e.content).map((e, n) => t.stack(`stat-${n}`, Fr(t, e, n, !0), {
|
|
10153
10184
|
gap: "var(--semantic-space-xs)",
|
|
10154
10185
|
align: "center"
|
|
10155
10186
|
}));
|
|
10156
|
-
return [t.container([
|
|
10157
|
-
|
|
10158
|
-
Math.min(
|
|
10187
|
+
return [t.container([Pr(t, e.content, !0), t.grid("items", n, [
|
|
10188
|
+
Mr(n.length),
|
|
10189
|
+
Math.min(Mr(n.length), 2),
|
|
10159
10190
|
2
|
|
10160
10191
|
], { gap: "calc(var(--plx-gap) * 1.5)" })], { gap: "calc(var(--plx-gap) * 2)" })];
|
|
10161
10192
|
}
|
|
@@ -10176,15 +10207,15 @@ var Ir = (e, t, n, r, i = {}) => {
|
|
|
10176
10207
|
...e.style,
|
|
10177
10208
|
align: "center"
|
|
10178
10209
|
}
|
|
10179
|
-
}), n =
|
|
10210
|
+
}), n = jr(e.content).map((e, n) => t.card(`stat-${n}`, Fr(t, e, n, !0, { scale: 1.1 }), {
|
|
10180
10211
|
alignItems: "center",
|
|
10181
10212
|
gap: "var(--semantic-space-xs)",
|
|
10182
10213
|
paddingTop: "2rem",
|
|
10183
10214
|
paddingBottom: "2rem"
|
|
10184
10215
|
}));
|
|
10185
|
-
return [t.container([
|
|
10186
|
-
|
|
10187
|
-
Math.min(
|
|
10216
|
+
return [t.container([Pr(t, e.content, !0), t.grid("items", n, [
|
|
10217
|
+
Mr(n.length),
|
|
10218
|
+
Math.min(Mr(n.length), 2),
|
|
10188
10219
|
1
|
|
10189
10220
|
], { gap: "var(--plx-gap)" })], { gap: "calc(var(--plx-gap) * 2)" })];
|
|
10190
10221
|
}
|
|
@@ -10205,7 +10236,7 @@ var Ir = (e, t, n, r, i = {}) => {
|
|
|
10205
10236
|
...e.style,
|
|
10206
10237
|
align: "left"
|
|
10207
10238
|
}
|
|
10208
|
-
}), n =
|
|
10239
|
+
}), n = jr(e.content).map((e, n) => t.stack(`stat-${n}`, Fr(t, e, n, !1, { scale: 1.1 }), {
|
|
10209
10240
|
gap: "var(--semantic-space-xs)",
|
|
10210
10241
|
styles: {
|
|
10211
10242
|
borderWidth: "2px 0 0 0",
|
|
@@ -10218,7 +10249,7 @@ var Ir = (e, t, n, r, i = {}) => {
|
|
|
10218
10249
|
2,
|
|
10219
10250
|
1
|
|
10220
10251
|
], { gap: "calc(var(--plx-gap) * 1.5)" });
|
|
10221
|
-
return [t.container([t.split("split",
|
|
10252
|
+
return [t.container([t.split("split", Pr(t, e.content, !1) ?? t.box("intro", []), r, { ratio: [1, 1.3] })])];
|
|
10222
10253
|
}
|
|
10223
10254
|
},
|
|
10224
10255
|
{
|
|
@@ -10237,7 +10268,7 @@ var Ir = (e, t, n, r, i = {}) => {
|
|
|
10237
10268
|
...e.style,
|
|
10238
10269
|
align: "center"
|
|
10239
10270
|
}
|
|
10240
|
-
}), n =
|
|
10271
|
+
}), n = jr(e.content).map((e, n) => t.stack(`stat-${n}`, Fr(t, e, n, !0, {
|
|
10241
10272
|
valueColor: t.tone.heading,
|
|
10242
10273
|
scale: 1.5
|
|
10243
10274
|
}), {
|
|
@@ -10249,15 +10280,15 @@ var Ir = (e, t, n, r, i = {}) => {
|
|
|
10249
10280
|
borderColor: t.tone.line
|
|
10250
10281
|
} : {}
|
|
10251
10282
|
}));
|
|
10252
|
-
return [t.container([
|
|
10253
|
-
|
|
10254
|
-
Math.min(
|
|
10283
|
+
return [t.container([Pr(t, e.content, !0), t.grid("items", n, [
|
|
10284
|
+
Mr(n.length),
|
|
10285
|
+
Math.min(Mr(n.length), 2),
|
|
10255
10286
|
2
|
|
10256
10287
|
], { gap: "var(--plx-gap)" })], { gap: "calc(var(--plx-gap) * 2)" })];
|
|
10257
10288
|
}
|
|
10258
10289
|
}
|
|
10259
10290
|
]
|
|
10260
|
-
},
|
|
10291
|
+
}, Lr = [
|
|
10261
10292
|
{
|
|
10262
10293
|
key: "eyebrow",
|
|
10263
10294
|
label: "Small label above",
|
|
@@ -10305,8 +10336,8 @@ var Ir = (e, t, n, r, i = {}) => {
|
|
|
10305
10336
|
}
|
|
10306
10337
|
]
|
|
10307
10338
|
}
|
|
10308
|
-
],
|
|
10309
|
-
function
|
|
10339
|
+
], Rr = (e) => Array.isArray(e.items) ? e.items : [], zr = (e) => e <= 4 ? Math.max(e, 1) : 3, Br = "calc(var(--plx-gap) * 2)";
|
|
10340
|
+
function Vr(e, t, n, r = "44rem") {
|
|
10310
10341
|
let i = n ? "center" : "left", a = [
|
|
10311
10342
|
e.text("eyebrow", t.eyebrow, "eyebrow", { align: i }),
|
|
10312
10343
|
e.text("heading", t.heading, "h2", { align: i }),
|
|
@@ -10324,7 +10355,7 @@ function Hr(e, t, n, r = "44rem") {
|
|
|
10324
10355
|
}
|
|
10325
10356
|
}) : null;
|
|
10326
10357
|
}
|
|
10327
|
-
function
|
|
10358
|
+
function Hr(e, t, n) {
|
|
10328
10359
|
let r = String(t + 1), i = {
|
|
10329
10360
|
id: e.id(`num-${t}`),
|
|
10330
10361
|
type: "paragraph",
|
|
@@ -10363,12 +10394,12 @@ function Ur(e, t, n) {
|
|
|
10363
10394
|
flexShrink: 0
|
|
10364
10395
|
});
|
|
10365
10396
|
}
|
|
10366
|
-
var
|
|
10397
|
+
var Ur = (e, t, n, r, i = "h4") => [e.text(`items.${n}.title`, t.title, i, { align: r }), e.text(`items.${n}.text`, t.text, "body", { align: r })], Wr = {
|
|
10367
10398
|
kind: "steps",
|
|
10368
10399
|
label: "Steps",
|
|
10369
10400
|
description: "“How it works”: a few simple steps from start to finish.",
|
|
10370
10401
|
group: "Content",
|
|
10371
|
-
fields:
|
|
10402
|
+
fields: Lr,
|
|
10372
10403
|
defaults: {
|
|
10373
10404
|
eyebrow: "How it works",
|
|
10374
10405
|
heading: "Up and running in four simple steps",
|
|
@@ -10413,12 +10444,12 @@ var Wr = (e, t, n, r, i = "h4") => [e.text(`items.${n}.title`, t.title, i, { ali
|
|
|
10413
10444
|
"items"
|
|
10414
10445
|
],
|
|
10415
10446
|
build(e) {
|
|
10416
|
-
let t = k(e), n = t.align === "center" ? "center" : "left", r =
|
|
10417
|
-
return [t.container([
|
|
10418
|
-
|
|
10447
|
+
let t = k(e), n = t.align === "center" ? "center" : "left", r = Rr(e.content).map((e, r) => t.stack(`step-${r}`, [Hr(t, r, "badge"), ...Ur(t, e, r, n)], { gap: "var(--semantic-space-sm)" }));
|
|
10448
|
+
return [t.container([Vr(t, e.content, t.align === "center"), t.grid("items", r, [
|
|
10449
|
+
zr(r.length),
|
|
10419
10450
|
2,
|
|
10420
10451
|
1
|
|
10421
|
-
], { gap:
|
|
10452
|
+
], { gap: Br })], { gap: Br })];
|
|
10422
10453
|
}
|
|
10423
10454
|
},
|
|
10424
10455
|
{
|
|
@@ -10443,8 +10474,8 @@ var Wr = (e, t, n, r, i = "h4") => [e.text(`items.${n}.title`, t.title, i, { ali
|
|
|
10443
10474
|
...e.style,
|
|
10444
10475
|
align: "left"
|
|
10445
10476
|
}
|
|
10446
|
-
}), n =
|
|
10447
|
-
let i = t.stack(`rail-${r}`, [
|
|
10477
|
+
}), n = Rr(e.content), r = n.map((e, r) => {
|
|
10478
|
+
let i = t.stack(`rail-${r}`, [Hr(t, r, "badge"), r < n.length - 1 ? t.box(`line-${r}`, [], {
|
|
10448
10479
|
width: "2px",
|
|
10449
10480
|
flexGrow: 1,
|
|
10450
10481
|
minHeight: "1.5rem",
|
|
@@ -10457,7 +10488,7 @@ var Wr = (e, t, n, r, i = "h4") => [e.text(`items.${n}.title`, t.title, i, { ali
|
|
|
10457
10488
|
flexShrink: 0
|
|
10458
10489
|
}
|
|
10459
10490
|
});
|
|
10460
|
-
return t.row(`step-${r}`, [i, t.stack(`copy-${r}`,
|
|
10491
|
+
return t.row(`step-${r}`, [i, t.stack(`copy-${r}`, Ur(t, e, r, "left"), {
|
|
10461
10492
|
gap: "var(--semantic-space-xs)",
|
|
10462
10493
|
styles: {
|
|
10463
10494
|
paddingTop: "0.5rem",
|
|
@@ -10472,7 +10503,7 @@ var Wr = (e, t, n, r, i = "h4") => [e.text(`items.${n}.title`, t.title, i, { ali
|
|
|
10472
10503
|
}), i = t.stack("items", r, {
|
|
10473
10504
|
gap: "0px",
|
|
10474
10505
|
align: "stretch"
|
|
10475
|
-
}), a =
|
|
10506
|
+
}), a = Vr(t, e.content, !1, "26rem");
|
|
10476
10507
|
return [t.container([a ? t.split("split", a, i, {
|
|
10477
10508
|
ratio: [1, 1.3],
|
|
10478
10509
|
align: "flex-start"
|
|
@@ -10495,7 +10526,7 @@ var Wr = (e, t, n, r, i = "h4") => [e.text(`items.${n}.title`, t.title, i, { ali
|
|
|
10495
10526
|
"items"
|
|
10496
10527
|
],
|
|
10497
10528
|
build(e) {
|
|
10498
|
-
let t = k(e), n =
|
|
10529
|
+
let t = k(e), n = Rr(e.content).map((e, n) => t.card(`step-${n}`, [Hr(t, n, "big"), ...Ur(t, e, n, "left")], {
|
|
10499
10530
|
alignItems: "flex-start",
|
|
10500
10531
|
gap: "var(--semantic-space-sm)",
|
|
10501
10532
|
paddingTop: "2rem",
|
|
@@ -10503,11 +10534,11 @@ var Wr = (e, t, n, r, i = "h4") => [e.text(`items.${n}.title`, t.title, i, { ali
|
|
|
10503
10534
|
paddingLeft: "2rem",
|
|
10504
10535
|
paddingRight: "2rem"
|
|
10505
10536
|
}));
|
|
10506
|
-
return [t.container([
|
|
10507
|
-
|
|
10537
|
+
return [t.container([Vr(t, e.content, t.align === "center"), t.grid("items", n, [
|
|
10538
|
+
zr(n.length),
|
|
10508
10539
|
2,
|
|
10509
10540
|
1
|
|
10510
|
-
], { gap: "var(--plx-gap)" })], { gap:
|
|
10541
|
+
], { gap: "var(--plx-gap)" })], { gap: Br })];
|
|
10511
10542
|
}
|
|
10512
10543
|
},
|
|
10513
10544
|
{
|
|
@@ -10526,7 +10557,7 @@ var Wr = (e, t, n, r, i = "h4") => [e.text(`items.${n}.title`, t.title, i, { ali
|
|
|
10526
10557
|
...e.style,
|
|
10527
10558
|
align: "center"
|
|
10528
10559
|
}
|
|
10529
|
-
}), n =
|
|
10560
|
+
}), n = Rr(e.content).map((e, n) => {
|
|
10530
10561
|
let r = {
|
|
10531
10562
|
id: t.id(`label-${n}`),
|
|
10532
10563
|
type: "paragraph",
|
|
@@ -10545,21 +10576,21 @@ var Wr = (e, t, n, r, i = "h4") => [e.text(`items.${n}.title`, t.title, i, { ali
|
|
|
10545
10576
|
size: "26px"
|
|
10546
10577
|
}) : null,
|
|
10547
10578
|
r,
|
|
10548
|
-
...
|
|
10579
|
+
...Ur(t, e, n, "center")
|
|
10549
10580
|
], {
|
|
10550
10581
|
gap: "var(--semantic-space-sm)",
|
|
10551
10582
|
align: "center"
|
|
10552
10583
|
});
|
|
10553
10584
|
});
|
|
10554
|
-
return [t.container([
|
|
10555
|
-
|
|
10585
|
+
return [t.container([Vr(t, e.content, !0), t.grid("items", n, [
|
|
10586
|
+
zr(n.length),
|
|
10556
10587
|
2,
|
|
10557
10588
|
1
|
|
10558
|
-
], { gap:
|
|
10589
|
+
], { gap: Br })], { gap: Br })];
|
|
10559
10590
|
}
|
|
10560
10591
|
}
|
|
10561
10592
|
]
|
|
10562
|
-
},
|
|
10593
|
+
}, Gr = [
|
|
10563
10594
|
{
|
|
10564
10595
|
key: "eyebrow",
|
|
10565
10596
|
label: "Small label above",
|
|
@@ -10613,11 +10644,11 @@ var Wr = (e, t, n, r, i = "h4") => [e.text(`items.${n}.title`, t.title, i, { ali
|
|
|
10613
10644
|
}
|
|
10614
10645
|
]
|
|
10615
10646
|
}
|
|
10616
|
-
],
|
|
10647
|
+
], Kr = "color-mix(in srgb, var(--color-brand-primary-500) 16%, var(--color-bg-canvas))", qr = (e) => Array.isArray(e.content.items) ? e.content.items : [], Jr = (e) => {
|
|
10617
10648
|
let t = (typeof e == "string" ? e : "").trim().split(/\s+/).filter(Boolean);
|
|
10618
10649
|
return t.length ? ((t[0][0] ?? "") + (t.length > 1 ? t[t.length - 1][0] ?? "" : "")).toUpperCase() : "";
|
|
10619
10650
|
};
|
|
10620
|
-
function
|
|
10651
|
+
function Yr(e, t = !1) {
|
|
10621
10652
|
let n = k(t ? {
|
|
10622
10653
|
...e,
|
|
10623
10654
|
style: {
|
|
@@ -10637,7 +10668,7 @@ function Xr(e, t = !1) {
|
|
|
10637
10668
|
}
|
|
10638
10669
|
});
|
|
10639
10670
|
}
|
|
10640
|
-
function
|
|
10671
|
+
function Xr(e, t, n, r = {}) {
|
|
10641
10672
|
let i = n.imageAlt || n.name || "", a = r.circle ? {
|
|
10642
10673
|
width: r.circle,
|
|
10643
10674
|
height: r.circle,
|
|
@@ -10657,7 +10688,7 @@ function Zr(e, t, n, r = {}) {
|
|
|
10657
10688
|
id: e.id(`items-${t}-initials`),
|
|
10658
10689
|
type: "paragraph",
|
|
10659
10690
|
name: "Initials",
|
|
10660
|
-
content:
|
|
10691
|
+
content: Jr(n.name) || "·",
|
|
10661
10692
|
styles: {
|
|
10662
10693
|
textStyle: "h2",
|
|
10663
10694
|
fontSize: r.circle ? `calc(${r.circle} * 0.34)` : "var(--font-size-4xl)",
|
|
@@ -10670,13 +10701,13 @@ function Zr(e, t, n, r = {}) {
|
|
|
10670
10701
|
...a,
|
|
10671
10702
|
alignItems: "center",
|
|
10672
10703
|
justifyContent: "center",
|
|
10673
|
-
backgroundColor: e.tone.inverse ? e.tone.card :
|
|
10704
|
+
backgroundColor: e.tone.inverse ? e.tone.card : Kr,
|
|
10674
10705
|
borderWidth: e.tone.inverse ? "1px" : "0px",
|
|
10675
10706
|
borderStyle: "solid",
|
|
10676
10707
|
borderColor: e.tone.line
|
|
10677
10708
|
});
|
|
10678
10709
|
}
|
|
10679
|
-
function
|
|
10710
|
+
function Zr(e, t, n, r = {}) {
|
|
10680
10711
|
let i = r.center ? "center" : "left";
|
|
10681
10712
|
return e.stack(`items-${t}-words`, [
|
|
10682
10713
|
e.text(`items.${t}.name`, n.name, r.nameStyle ?? "h4", { align: i }),
|
|
@@ -10694,16 +10725,16 @@ function Qr(e, t, n, r = {}) {
|
|
|
10694
10725
|
align: r.center ? "center" : "flex-start"
|
|
10695
10726
|
});
|
|
10696
10727
|
}
|
|
10697
|
-
var
|
|
10728
|
+
var Qr = (e, t = 3) => [
|
|
10698
10729
|
Math.max(1, Math.min(e, t)),
|
|
10699
10730
|
Math.min(e, 2) || 1,
|
|
10700
10731
|
1
|
|
10701
|
-
],
|
|
10732
|
+
], $r = {
|
|
10702
10733
|
kind: "team",
|
|
10703
10734
|
label: "Team",
|
|
10704
10735
|
description: "Introduce the people behind your business.",
|
|
10705
10736
|
group: "Content",
|
|
10706
|
-
fields:
|
|
10737
|
+
fields: Gr,
|
|
10707
10738
|
defaults: {
|
|
10708
10739
|
eyebrow: "Our team",
|
|
10709
10740
|
heading: "Meet the people behind the work",
|
|
@@ -10746,8 +10777,8 @@ var $r = (e, t = 3) => [
|
|
|
10746
10777
|
"surface"
|
|
10747
10778
|
],
|
|
10748
10779
|
build(e) {
|
|
10749
|
-
let t = k(e), n =
|
|
10750
|
-
return [t.container([
|
|
10780
|
+
let t = k(e), n = qr(e), r = n.map((e, n) => t.box(`items-${n}-card`, [Xr(t, n, e, { ratio: "4 / 5" }), Zr(t, n, e)], { gap: "var(--semantic-space-md)" }));
|
|
10781
|
+
return [t.container([Yr(e), t.grid("grid", r, Qr(n.length, 4), { styles: { alignItems: "flex-start" } })], { gap: "var(--semantic-space-xl)" })];
|
|
10751
10782
|
}
|
|
10752
10783
|
},
|
|
10753
10784
|
{
|
|
@@ -10762,7 +10793,7 @@ var $r = (e, t = 3) => [
|
|
|
10762
10793
|
...e.style,
|
|
10763
10794
|
align: "center"
|
|
10764
10795
|
}
|
|
10765
|
-
}), n =
|
|
10796
|
+
}), n = qr(e), r = n.map((e, n) => t.stack(`items-${n}-card`, [Xr(t, n, e, { circle: "8rem" }), Zr(t, n, e, { center: !0 })], {
|
|
10766
10797
|
gap: "var(--semantic-space-md)",
|
|
10767
10798
|
align: "center"
|
|
10768
10799
|
})), i = [
|
|
@@ -10770,7 +10801,7 @@ var $r = (e, t = 3) => [
|
|
|
10770
10801
|
2,
|
|
10771
10802
|
1
|
|
10772
10803
|
];
|
|
10773
|
-
return [t.container([
|
|
10804
|
+
return [t.container([Yr(e, !0), t.grid("grid", r, i, { gap: "var(--semantic-space-xl)" })], { gap: "calc(var(--plx-gap) * 2)" })];
|
|
10774
10805
|
}
|
|
10775
10806
|
},
|
|
10776
10807
|
{
|
|
@@ -10779,8 +10810,8 @@ var $r = (e, t = 3) => [
|
|
|
10779
10810
|
description: "One person per row: picture and name on the left, their story on the right.",
|
|
10780
10811
|
backgrounds: ["canvas", "surface"],
|
|
10781
10812
|
build(e) {
|
|
10782
|
-
let t = k(e), n =
|
|
10783
|
-
let r = t.row(`items-${n}-who`, [
|
|
10813
|
+
let t = k(e), n = qr(e).flatMap((e, n) => {
|
|
10814
|
+
let r = t.row(`items-${n}-who`, [Xr(t, n, e, { circle: "4.5rem" }), t.stack(`items-${n}-id`, [t.text(`items.${n}.name`, e.name, "h4", { align: "left" }), t.text(`items.${n}.role`, e.role, "small", {
|
|
10784
10815
|
color: t.tone.accent,
|
|
10785
10816
|
align: "left",
|
|
10786
10817
|
styles: { fontWeight: "var(--font-weight-semibold)" }
|
|
@@ -10794,7 +10825,7 @@ var $r = (e, t = 3) => [
|
|
|
10794
10825
|
gap: "var(--semantic-space-lg)"
|
|
10795
10826
|
})];
|
|
10796
10827
|
});
|
|
10797
|
-
return [t.container([
|
|
10828
|
+
return [t.container([Yr(e), t.stack("list", n, {
|
|
10798
10829
|
gap: "var(--semantic-space-lg)",
|
|
10799
10830
|
align: "stretch"
|
|
10800
10831
|
})], { gap: "var(--semantic-space-xl)" })];
|
|
@@ -10810,18 +10841,18 @@ var $r = (e, t = 3) => [
|
|
|
10810
10841
|
"inverted"
|
|
10811
10842
|
],
|
|
10812
10843
|
build(e) {
|
|
10813
|
-
let t = k(e), [n, ...r] =
|
|
10814
|
-
if (!n) return [t.container([
|
|
10815
|
-
let i = t.split("feature",
|
|
10844
|
+
let t = k(e), [n, ...r] = qr(e);
|
|
10845
|
+
if (!n) return [t.container([Yr(e)])];
|
|
10846
|
+
let i = t.split("feature", Xr(t, 0, n, {
|
|
10816
10847
|
ratio: "1 / 1",
|
|
10817
10848
|
radius: "var(--radius-2xl)"
|
|
10818
|
-
}),
|
|
10849
|
+
}), Zr(t, 0, n, {
|
|
10819
10850
|
nameStyle: "h3",
|
|
10820
10851
|
bio: "body"
|
|
10821
10852
|
}), {
|
|
10822
10853
|
ratio: [.8, 1],
|
|
10823
10854
|
gap: "calc(var(--plx-gap) * 2)"
|
|
10824
|
-
}), a = r.map((e, n) => t.card(`items-${n + 1}-card`, [t.row(`items-${n + 1}-line`, [
|
|
10855
|
+
}), a = r.map((e, n) => t.card(`items-${n + 1}-card`, [t.row(`items-${n + 1}-line`, [Xr(t, n + 1, e, { circle: "4.5rem" }), Zr(t, n + 1, e, { bio: "small" })], {
|
|
10825
10856
|
gap: "var(--semantic-space-md)",
|
|
10826
10857
|
align: "flex-start"
|
|
10827
10858
|
})], {
|
|
@@ -10835,14 +10866,14 @@ var $r = (e, t = 3) => [
|
|
|
10835
10866
|
1
|
|
10836
10867
|
];
|
|
10837
10868
|
return [t.container([
|
|
10838
|
-
|
|
10869
|
+
Yr(e),
|
|
10839
10870
|
i,
|
|
10840
10871
|
r.length ? t.grid("others", a, o, { styles: { alignItems: "flex-start" } }) : null
|
|
10841
10872
|
], { gap: "calc(var(--plx-gap) * 2)" })];
|
|
10842
10873
|
}
|
|
10843
10874
|
}
|
|
10844
10875
|
]
|
|
10845
|
-
},
|
|
10876
|
+
}, ei = [
|
|
10846
10877
|
{
|
|
10847
10878
|
key: "eyebrow",
|
|
10848
10879
|
label: "Small label above",
|
|
@@ -10890,11 +10921,11 @@ var $r = (e, t = 3) => [
|
|
|
10890
10921
|
}
|
|
10891
10922
|
]
|
|
10892
10923
|
}
|
|
10893
|
-
],
|
|
10924
|
+
], ti = "color-mix(in srgb, var(--color-brand-primary-500) 16%, var(--color-bg-canvas))", ni = (e) => {
|
|
10894
10925
|
let t = (typeof e == "string" ? e : "").trim().split(/\s+/).filter(Boolean);
|
|
10895
10926
|
return t.length ? ((t[0][0] ?? "") + (t.length > 1 ? t[t.length - 1][0] ?? "" : "")).toUpperCase() : "";
|
|
10896
10927
|
};
|
|
10897
|
-
function
|
|
10928
|
+
function ri(e, t, n, r = "3.5rem") {
|
|
10898
10929
|
let i = {
|
|
10899
10930
|
width: r,
|
|
10900
10931
|
height: r,
|
|
@@ -10910,7 +10941,7 @@ function ii(e, t, n, r = "3.5rem") {
|
|
|
10910
10941
|
id: e.id(`items-${t}-initials`),
|
|
10911
10942
|
type: "paragraph",
|
|
10912
10943
|
name: "Initials",
|
|
10913
|
-
content:
|
|
10944
|
+
content: ni(n.name) || "·",
|
|
10914
10945
|
styles: {
|
|
10915
10946
|
textStyle: "h4",
|
|
10916
10947
|
fontSize: `calc(${r} * 0.36)`,
|
|
@@ -10923,13 +10954,13 @@ function ii(e, t, n, r = "3.5rem") {
|
|
|
10923
10954
|
...i,
|
|
10924
10955
|
alignItems: "center",
|
|
10925
10956
|
justifyContent: "center",
|
|
10926
|
-
backgroundColor: e.tone.inverse ? e.tone.card :
|
|
10957
|
+
backgroundColor: e.tone.inverse ? e.tone.card : ti,
|
|
10927
10958
|
borderWidth: e.tone.inverse ? "1px" : "0px",
|
|
10928
10959
|
borderStyle: "solid",
|
|
10929
10960
|
borderColor: e.tone.line
|
|
10930
10961
|
});
|
|
10931
10962
|
}
|
|
10932
|
-
function
|
|
10963
|
+
function ii(e, t, n, r = {}) {
|
|
10933
10964
|
let i = r.center ?? !1, a = e.stack(`items-${t}-who`, [e.text(`items.${t}.name`, n.name, "body", {
|
|
10934
10965
|
color: e.tone.heading,
|
|
10935
10966
|
align: i ? "center" : "left",
|
|
@@ -10944,7 +10975,7 @@ function ai(e, t, n, r = {}) {
|
|
|
10944
10975
|
width: "auto",
|
|
10945
10976
|
flexShrink: 1
|
|
10946
10977
|
}
|
|
10947
|
-
}), o = [r.showAvatar === !1 ? null :
|
|
10978
|
+
}), o = [r.showAvatar === !1 ? null : ri(e, t, n, r.avatarSize), a];
|
|
10948
10979
|
return i ? e.stack(`items-${t}-person`, o, {
|
|
10949
10980
|
gap: "var(--semantic-space-sm)",
|
|
10950
10981
|
align: "center"
|
|
@@ -10953,8 +10984,8 @@ function ai(e, t, n, r = {}) {
|
|
|
10953
10984
|
align: "center"
|
|
10954
10985
|
});
|
|
10955
10986
|
}
|
|
10956
|
-
var
|
|
10957
|
-
function
|
|
10987
|
+
var ai = (e) => Array.isArray(e.content.items) ? e.content.items : [];
|
|
10988
|
+
function oi(e, t = !1) {
|
|
10958
10989
|
let n = k(t ? {
|
|
10959
10990
|
...e,
|
|
10960
10991
|
style: {
|
|
@@ -10970,10 +11001,10 @@ function si(e, t = !1) {
|
|
|
10970
11001
|
}
|
|
10971
11002
|
});
|
|
10972
11003
|
}
|
|
10973
|
-
var
|
|
11004
|
+
var si = (e, t, n = "2rem") => {
|
|
10974
11005
|
let r = e.icon(t, "quote", { size: n });
|
|
10975
11006
|
return delete r.props.bind, r.props.iconName = "quote", r;
|
|
10976
|
-
},
|
|
11007
|
+
}, ci = (e, t, n = {}) => {
|
|
10977
11008
|
let r = e.text("items.0.quote", t, "lead", {
|
|
10978
11009
|
color: e.tone.heading,
|
|
10979
11010
|
...n,
|
|
@@ -10990,18 +11021,18 @@ var ci = (e, t, n = "2rem") => {
|
|
|
10990
11021
|
mobile: { fontSize: "var(--font-size-xl)" }
|
|
10991
11022
|
}
|
|
10992
11023
|
};
|
|
10993
|
-
},
|
|
10994
|
-
|
|
11024
|
+
}, li = (e, t, n, r = {}) => e.card(`items-${t}-card`, [
|
|
11025
|
+
si(e, `mark-${t}`, "1.75rem"),
|
|
10995
11026
|
e.text(`items.${t}.quote`, n.quote, r.quoteStyle ?? "body", {
|
|
10996
11027
|
color: e.tone.heading,
|
|
10997
11028
|
styles: { flexGrow: 1 }
|
|
10998
11029
|
}),
|
|
10999
|
-
|
|
11030
|
+
ii(e, t, n)
|
|
11000
11031
|
], {
|
|
11001
11032
|
justifyContent: "space-between",
|
|
11002
11033
|
gap: "var(--semantic-space-lg)",
|
|
11003
11034
|
...r.styles ?? {}
|
|
11004
|
-
}),
|
|
11035
|
+
}), ui = (e) => e >= 3 ? [
|
|
11005
11036
|
3,
|
|
11006
11037
|
2,
|
|
11007
11038
|
1
|
|
@@ -11013,12 +11044,12 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11013
11044
|
1,
|
|
11014
11045
|
1,
|
|
11015
11046
|
1
|
|
11016
|
-
],
|
|
11047
|
+
], di = {
|
|
11017
11048
|
kind: "testimonials",
|
|
11018
11049
|
label: "Testimonials",
|
|
11019
11050
|
description: "What happy customers say about you — builds trust at a glance.",
|
|
11020
11051
|
group: "Proof",
|
|
11021
|
-
fields:
|
|
11052
|
+
fields: ei,
|
|
11022
11053
|
defaults: {
|
|
11023
11054
|
eyebrow: "Kind words",
|
|
11024
11055
|
heading: "Loved by the people we work with",
|
|
@@ -11080,15 +11111,15 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11080
11111
|
...e.style,
|
|
11081
11112
|
align: "center"
|
|
11082
11113
|
}
|
|
11083
|
-
}), n =
|
|
11084
|
-
if (!n) return [t.container([
|
|
11114
|
+
}), n = ai(e)[0];
|
|
11115
|
+
if (!n) return [t.container([oi(e, !0)])];
|
|
11085
11116
|
let r = t.stack("feature", [
|
|
11086
|
-
|
|
11087
|
-
|
|
11117
|
+
si(t, "mark-0", "2.5rem"),
|
|
11118
|
+
ci(t, n.quote, {
|
|
11088
11119
|
align: "center",
|
|
11089
11120
|
maxWidth: "44rem"
|
|
11090
11121
|
}),
|
|
11091
|
-
|
|
11122
|
+
ii(t, 0, n, {
|
|
11092
11123
|
center: !0,
|
|
11093
11124
|
avatarSize: "4rem"
|
|
11094
11125
|
})
|
|
@@ -11096,7 +11127,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11096
11127
|
gap: "var(--semantic-space-lg)",
|
|
11097
11128
|
align: "center"
|
|
11098
11129
|
});
|
|
11099
|
-
return [t.container([
|
|
11130
|
+
return [t.container([oi(e, !0), r], {
|
|
11100
11131
|
alignItems: "center",
|
|
11101
11132
|
gap: "var(--semantic-space-xl)"
|
|
11102
11133
|
})];
|
|
@@ -11112,8 +11143,8 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11112
11143
|
"surface"
|
|
11113
11144
|
],
|
|
11114
11145
|
build(e) {
|
|
11115
|
-
let t = k(e), n =
|
|
11116
|
-
return [t.container([
|
|
11146
|
+
let t = k(e), n = ai(e).slice(0, 6), r = t.grid("grid", n.map((e, n) => li(t, n, e)), ui(n.length));
|
|
11147
|
+
return [t.container([oi(e), r], { gap: "var(--semantic-space-xl)" })];
|
|
11117
11148
|
}
|
|
11118
11149
|
},
|
|
11119
11150
|
{
|
|
@@ -11122,12 +11153,12 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11122
11153
|
description: "A tidy list: who said it on the left, their words on the right.",
|
|
11123
11154
|
backgrounds: ["canvas", "surface"],
|
|
11124
11155
|
build(e) {
|
|
11125
|
-
let t = k(e), n =
|
|
11156
|
+
let t = k(e), n = ai(e).flatMap((e, n) => [n > 0 ? t.divider(`rule-${n}`) : null, t.split(`row-${n}`, ii(t, n, e, { avatarSize: "4rem" }), t.stack(`items-${n}-words`, [t.text(`items.${n}.quote`, e.quote, "lead", { color: t.tone.heading })], { align: "flex-start" }), {
|
|
11126
11157
|
ratio: [1, 2.2],
|
|
11127
11158
|
align: "flex-start",
|
|
11128
11159
|
gap: "var(--semantic-space-lg)"
|
|
11129
11160
|
})]);
|
|
11130
|
-
return [t.container([
|
|
11161
|
+
return [t.container([oi(e), t.stack("list", n, {
|
|
11131
11162
|
gap: "var(--semantic-space-xl)",
|
|
11132
11163
|
align: "stretch"
|
|
11133
11164
|
})], { gap: "var(--semantic-space-xl)" })];
|
|
@@ -11139,8 +11170,8 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11139
11170
|
description: "A relaxed, staggered wall of cards — great when you have lots of quotes.",
|
|
11140
11171
|
backgrounds: ["sunken", "canvas"],
|
|
11141
11172
|
build(e) {
|
|
11142
|
-
let t = k(e), n =
|
|
11143
|
-
let r =
|
|
11173
|
+
let t = k(e), n = ai(e).map((e, n) => {
|
|
11174
|
+
let r = li(t, n, e, { styles: { justifyContent: "flex-start" } });
|
|
11144
11175
|
return n % 3 == 1 ? {
|
|
11145
11176
|
...r,
|
|
11146
11177
|
styles: {
|
|
@@ -11153,7 +11184,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11153
11184
|
}
|
|
11154
11185
|
} : r;
|
|
11155
11186
|
});
|
|
11156
|
-
return [t.container([
|
|
11187
|
+
return [t.container([oi(e), t.grid("wall", n, [
|
|
11157
11188
|
3,
|
|
11158
11189
|
2,
|
|
11159
11190
|
1
|
|
@@ -11170,30 +11201,30 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11170
11201
|
"sunken"
|
|
11171
11202
|
],
|
|
11172
11203
|
build(e) {
|
|
11173
|
-
let t = k(e), [n, ...r] =
|
|
11174
|
-
if (!n) return [t.container([
|
|
11204
|
+
let t = k(e), [n, ...r] = ai(e);
|
|
11205
|
+
if (!n) return [t.container([oi(e)])];
|
|
11175
11206
|
let i = t.stack("feature", [
|
|
11176
|
-
|
|
11177
|
-
|
|
11178
|
-
|
|
11207
|
+
si(t, "mark-0", "2.5rem"),
|
|
11208
|
+
ci(t, n.quote),
|
|
11209
|
+
ii(t, 0, n, { avatarSize: "4rem" })
|
|
11179
11210
|
], {
|
|
11180
11211
|
gap: "var(--semantic-space-lg)",
|
|
11181
11212
|
align: "flex-start"
|
|
11182
|
-
}), a = t.stack("others", r.slice(0, 3).map((e, n) =>
|
|
11213
|
+
}), a = t.stack("others", r.slice(0, 3).map((e, n) => li(t, n + 1, e, { styles: {
|
|
11183
11214
|
paddingTop: "1.25rem",
|
|
11184
11215
|
paddingBottom: "1.25rem"
|
|
11185
11216
|
} })), {
|
|
11186
11217
|
gap: "var(--semantic-space-md)",
|
|
11187
11218
|
align: "stretch"
|
|
11188
11219
|
});
|
|
11189
|
-
return [t.container([
|
|
11220
|
+
return [t.container([oi(e), r.length ? t.split("split", i, a, {
|
|
11190
11221
|
ratio: [1.2, 1],
|
|
11191
11222
|
align: "flex-start"
|
|
11192
11223
|
}) : i], { gap: "var(--semantic-space-xl)" })];
|
|
11193
11224
|
}
|
|
11194
11225
|
}
|
|
11195
11226
|
]
|
|
11196
|
-
},
|
|
11227
|
+
}, fi = [
|
|
11197
11228
|
{
|
|
11198
11229
|
key: "eyebrow",
|
|
11199
11230
|
label: "Small label above",
|
|
@@ -11230,7 +11261,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11230
11261
|
type: "button",
|
|
11231
11262
|
hint: "Optional — leave the text empty to hide it."
|
|
11232
11263
|
}
|
|
11233
|
-
],
|
|
11264
|
+
], pi = (e, t, n = {}) => ({
|
|
11234
11265
|
id: e.id("video"),
|
|
11235
11266
|
type: "video",
|
|
11236
11267
|
name: "Video",
|
|
@@ -11247,29 +11278,29 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11247
11278
|
boxShadow: "var(--shadow-lg)",
|
|
11248
11279
|
...n
|
|
11249
11280
|
}
|
|
11250
|
-
}),
|
|
11281
|
+
}), mi = (e, t, n = {}) => [
|
|
11251
11282
|
e.text("eyebrow", t.eyebrow, "eyebrow"),
|
|
11252
11283
|
e.text("heading", t.heading, "h2"),
|
|
11253
11284
|
e.text("text", t.text, "lead", n.lead === !1 ? {} : { maxWidth: "38rem" }),
|
|
11254
11285
|
e.button("cta", t.cta, "primary")
|
|
11255
|
-
],
|
|
11286
|
+
], hi = (e) => (t) => {
|
|
11256
11287
|
let n = k({
|
|
11257
11288
|
...t,
|
|
11258
11289
|
style: {
|
|
11259
11290
|
...t.style,
|
|
11260
11291
|
align: "left"
|
|
11261
11292
|
}
|
|
11262
|
-
}), r = n.stack("copy",
|
|
11293
|
+
}), r = n.stack("copy", mi(n, t.content), {
|
|
11263
11294
|
gap: "var(--semantic-space-md)",
|
|
11264
11295
|
align: "flex-start"
|
|
11265
|
-
}), i =
|
|
11296
|
+
}), i = pi(n, t.content);
|
|
11266
11297
|
return [n.container([n.split("split", e ? i : r, e ? r : i, { ratio: e ? [1.35, 1] : [1, 1.35] })])];
|
|
11267
|
-
},
|
|
11298
|
+
}, gi = {
|
|
11268
11299
|
kind: "video",
|
|
11269
11300
|
label: "Video",
|
|
11270
11301
|
description: "Show a video — a welcome, a product tour, a story.",
|
|
11271
11302
|
group: "Content",
|
|
11272
|
-
fields:
|
|
11303
|
+
fields: fi,
|
|
11273
11304
|
defaults: {
|
|
11274
11305
|
eyebrow: "See it in action",
|
|
11275
11306
|
heading: "Watch how it works in two minutes",
|
|
@@ -11307,7 +11338,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11307
11338
|
});
|
|
11308
11339
|
return [t.container([
|
|
11309
11340
|
n.eyebrow || n.heading || n.text ? r : null,
|
|
11310
|
-
|
|
11341
|
+
pi(t, n, {
|
|
11311
11342
|
maxWidth: "58rem",
|
|
11312
11343
|
margin: "0 auto"
|
|
11313
11344
|
}),
|
|
@@ -11323,14 +11354,14 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11323
11354
|
label: "Text left, video right",
|
|
11324
11355
|
description: "Words on one side, the video on the other.",
|
|
11325
11356
|
backgrounds: ["canvas", "sunken"],
|
|
11326
|
-
build:
|
|
11357
|
+
build: hi(!1)
|
|
11327
11358
|
},
|
|
11328
11359
|
{
|
|
11329
11360
|
id: "video-left",
|
|
11330
11361
|
label: "Video left, text right",
|
|
11331
11362
|
description: "The same, mirrored.",
|
|
11332
11363
|
backgrounds: ["canvas", "sunken"],
|
|
11333
|
-
build:
|
|
11364
|
+
build: hi(!0)
|
|
11334
11365
|
},
|
|
11335
11366
|
{
|
|
11336
11367
|
id: "band",
|
|
@@ -11348,7 +11379,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11348
11379
|
...e.style,
|
|
11349
11380
|
align: "center"
|
|
11350
11381
|
}
|
|
11351
|
-
}), n = e.content, r = t.stack("copy", [...
|
|
11382
|
+
}), n = e.content, r = t.stack("copy", [...mi(t, n, { lead: !0 }).slice(0, 3)], {
|
|
11352
11383
|
gap: "var(--semantic-space-sm)",
|
|
11353
11384
|
align: "center",
|
|
11354
11385
|
styles: {
|
|
@@ -11358,7 +11389,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11358
11389
|
});
|
|
11359
11390
|
return [t.container([
|
|
11360
11391
|
n.eyebrow || n.heading || n.text ? r : null,
|
|
11361
|
-
|
|
11392
|
+
pi(t, n, { borderRadius: "var(--radius-xl)" }),
|
|
11362
11393
|
n.cta?.label ? t.stack("action", [t.button("cta", n.cta, e.style.background === "inverted" ? "secondary" : "primary")], { align: "center" }) : null
|
|
11363
11394
|
], {
|
|
11364
11395
|
gap: "var(--semantic-space-xl)",
|
|
@@ -11368,7 +11399,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11368
11399
|
}
|
|
11369
11400
|
}
|
|
11370
11401
|
]
|
|
11371
|
-
},
|
|
11402
|
+
}, I = (e, t, n, r = {}, i = {}) => ({
|
|
11372
11403
|
id: e.id(t),
|
|
11373
11404
|
type: n,
|
|
11374
11405
|
name: Bt(n),
|
|
@@ -11380,14 +11411,14 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11380
11411
|
width: "100%",
|
|
11381
11412
|
...i
|
|
11382
11413
|
}
|
|
11383
|
-
}),
|
|
11414
|
+
}), L = (e, t, n = {}) => {
|
|
11384
11415
|
let r = [
|
|
11385
11416
|
e.text("eyebrow", t.eyebrow, "eyebrow"),
|
|
11386
11417
|
e.text("heading", t.heading, "h2"),
|
|
11387
11418
|
e.text("text", t.text, "lead", { maxWidth: n.maxWidth ?? "40rem" })
|
|
11388
11419
|
].filter((e) => !!e);
|
|
11389
11420
|
return r.length ? e.stack("copy", r, { gap: "var(--semantic-space-sm)" }) : null;
|
|
11390
|
-
},
|
|
11421
|
+
}, _i = {
|
|
11391
11422
|
kind: "blogList",
|
|
11392
11423
|
label: "Blog post list",
|
|
11393
11424
|
description: "Shows your latest blog posts — they fill in by themselves as you write.",
|
|
@@ -11431,7 +11462,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11431
11462
|
align: "center"
|
|
11432
11463
|
}
|
|
11433
11464
|
});
|
|
11434
|
-
return [t.container([
|
|
11465
|
+
return [t.container([L(t, e.content), I(t, "posts", "blogPostList")], {
|
|
11435
11466
|
alignItems: "center",
|
|
11436
11467
|
gap: "var(--semantic-space-xl)"
|
|
11437
11468
|
})];
|
|
@@ -11450,7 +11481,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11450
11481
|
align: "left"
|
|
11451
11482
|
}
|
|
11452
11483
|
});
|
|
11453
|
-
return [t.container([
|
|
11484
|
+
return [t.container([L(t, e.content), I(t, "posts", "blogPostList")], { gap: "var(--semantic-space-xl)" })];
|
|
11454
11485
|
}
|
|
11455
11486
|
},
|
|
11456
11487
|
{
|
|
@@ -11466,31 +11497,31 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11466
11497
|
align: "left"
|
|
11467
11498
|
}
|
|
11468
11499
|
});
|
|
11469
|
-
return [t.container([t.split("split", t.stack("copy-col", [
|
|
11500
|
+
return [t.container([t.split("split", t.stack("copy-col", [L(t, e.content)], { align: "flex-start" }), I(t, "posts", "blogPostList"), {
|
|
11470
11501
|
ratio: [1, 2],
|
|
11471
11502
|
align: "flex-start"
|
|
11472
11503
|
})])];
|
|
11473
11504
|
}
|
|
11474
11505
|
}
|
|
11475
11506
|
]
|
|
11476
|
-
},
|
|
11507
|
+
}, vi = [{
|
|
11477
11508
|
key: "back",
|
|
11478
11509
|
label: "Link back to the blog",
|
|
11479
11510
|
type: "button",
|
|
11480
11511
|
hint: "Leave the text empty to hide it."
|
|
11481
|
-
}],
|
|
11482
|
-
|
|
11483
|
-
|
|
11484
|
-
|
|
11512
|
+
}], yi = (e) => e.row("meta", [
|
|
11513
|
+
I(e, "author", "blogAuthor", { prefix: "By " }, { width: "auto" }),
|
|
11514
|
+
I(e, "date", "blogDate", {}, { width: "auto" }),
|
|
11515
|
+
I(e, "topics", "blogCategories", {}, { width: "auto" })
|
|
11485
11516
|
], {
|
|
11486
11517
|
gap: "var(--semantic-space-lg)",
|
|
11487
11518
|
wrap: !0
|
|
11488
|
-
}),
|
|
11519
|
+
}), bi = {
|
|
11489
11520
|
kind: "blogArticle",
|
|
11490
11521
|
label: "Blog article",
|
|
11491
11522
|
description: "The page every blog post uses: title, picture, text and comments, filled in from each post.",
|
|
11492
11523
|
group: "Blog",
|
|
11493
|
-
fields:
|
|
11524
|
+
fields: vi,
|
|
11494
11525
|
defaults: { back: {
|
|
11495
11526
|
label: "Back to all posts",
|
|
11496
11527
|
href: "/blog"
|
|
@@ -11511,11 +11542,11 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11511
11542
|
});
|
|
11512
11543
|
return [t.container([
|
|
11513
11544
|
t.button("back", e.content.back, "ghost"),
|
|
11514
|
-
|
|
11515
|
-
|
|
11516
|
-
|
|
11517
|
-
|
|
11518
|
-
|
|
11545
|
+
I(t, "title", "blogTitle"),
|
|
11546
|
+
yi(t),
|
|
11547
|
+
I(t, "picture", "blogFeaturedImage"),
|
|
11548
|
+
I(t, "body", "blogContent"),
|
|
11549
|
+
I(t, "comments", "blogComments")
|
|
11519
11550
|
], {
|
|
11520
11551
|
maxWidth: "48rem",
|
|
11521
11552
|
gap: "var(--semantic-space-lg)"
|
|
@@ -11536,10 +11567,10 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11536
11567
|
}
|
|
11537
11568
|
}), n = t.stack("article", [
|
|
11538
11569
|
t.button("back", e.content.back, "ghost"),
|
|
11539
|
-
|
|
11540
|
-
|
|
11541
|
-
|
|
11542
|
-
|
|
11570
|
+
I(t, "title", "blogTitle"),
|
|
11571
|
+
yi(t),
|
|
11572
|
+
I(t, "body", "blogContent"),
|
|
11573
|
+
I(t, "comments", "blogComments")
|
|
11543
11574
|
], {
|
|
11544
11575
|
align: "stretch",
|
|
11545
11576
|
gap: "var(--semantic-space-lg)",
|
|
@@ -11548,7 +11579,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11548
11579
|
margin: "0 auto"
|
|
11549
11580
|
}
|
|
11550
11581
|
});
|
|
11551
|
-
return [t.container([
|
|
11582
|
+
return [t.container([I(t, "picture", "blogFeaturedImage"), n], { gap: "var(--semantic-space-xl)" })];
|
|
11552
11583
|
}
|
|
11553
11584
|
},
|
|
11554
11585
|
{
|
|
@@ -11563,7 +11594,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11563
11594
|
...e.style,
|
|
11564
11595
|
align: "center"
|
|
11565
11596
|
}
|
|
11566
|
-
}), n = t.stack("head", [
|
|
11597
|
+
}), n = t.stack("head", [I(t, "title", "blogTitle"), t.row("meta", [I(t, "author", "blogAuthor", { prefix: "By " }, { width: "auto" }), I(t, "date", "blogDate", {}, { width: "auto" })], {
|
|
11567
11598
|
gap: "var(--semantic-space-lg)",
|
|
11568
11599
|
justify: "center",
|
|
11569
11600
|
wrap: !0
|
|
@@ -11571,12 +11602,12 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11571
11602
|
return [t.container([
|
|
11572
11603
|
t.button("back", e.content.back, "ghost"),
|
|
11573
11604
|
n,
|
|
11574
|
-
|
|
11575
|
-
|
|
11605
|
+
I(t, "picture", "blogFeaturedImage"),
|
|
11606
|
+
I(t, "body", "blogContent", {}, {
|
|
11576
11607
|
maxWidth: "48rem",
|
|
11577
11608
|
margin: "0 auto"
|
|
11578
11609
|
}),
|
|
11579
|
-
|
|
11610
|
+
I(t, "comments", "blogComments", {}, {
|
|
11580
11611
|
maxWidth: "48rem",
|
|
11581
11612
|
margin: "0 auto"
|
|
11582
11613
|
})
|
|
@@ -11601,10 +11632,10 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11601
11632
|
});
|
|
11602
11633
|
return [t.container([
|
|
11603
11634
|
t.button("back", e.content.back, "ghost"),
|
|
11604
|
-
|
|
11605
|
-
|
|
11606
|
-
|
|
11607
|
-
|
|
11635
|
+
I(t, "title", "blogTitle"),
|
|
11636
|
+
yi(t),
|
|
11637
|
+
I(t, "body", "blogContent"),
|
|
11638
|
+
I(t, "comments", "blogComments")
|
|
11608
11639
|
], {
|
|
11609
11640
|
maxWidth: "44rem",
|
|
11610
11641
|
gap: "var(--semantic-space-lg)"
|
|
@@ -11612,7 +11643,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11612
11643
|
}
|
|
11613
11644
|
}
|
|
11614
11645
|
]
|
|
11615
|
-
},
|
|
11646
|
+
}, xi = {
|
|
11616
11647
|
kind: "shop",
|
|
11617
11648
|
label: "Shop",
|
|
11618
11649
|
description: "Your products, filled in from your store — the whole shop, or a small hand-picked selection.",
|
|
@@ -11666,7 +11697,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11666
11697
|
align: "center"
|
|
11667
11698
|
}
|
|
11668
11699
|
});
|
|
11669
|
-
return [t.container([
|
|
11700
|
+
return [t.container([L(t, e.content), I(t, "shop", "shopGrid", {
|
|
11670
11701
|
storeMode: !0,
|
|
11671
11702
|
itemsPerRow: 3
|
|
11672
11703
|
})], {
|
|
@@ -11689,8 +11720,8 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11689
11720
|
}
|
|
11690
11721
|
});
|
|
11691
11722
|
return [t.container([
|
|
11692
|
-
|
|
11693
|
-
|
|
11723
|
+
L(t, e.content),
|
|
11724
|
+
I(t, "shop", "shopGrid", {
|
|
11694
11725
|
storeMode: !1,
|
|
11695
11726
|
category: "best_seller",
|
|
11696
11727
|
limit: 3,
|
|
@@ -11717,8 +11748,8 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11717
11748
|
}
|
|
11718
11749
|
});
|
|
11719
11750
|
return [t.container([
|
|
11720
|
-
|
|
11721
|
-
|
|
11751
|
+
L(t, e.content),
|
|
11752
|
+
I(t, "shop", "shopGrid", {
|
|
11722
11753
|
storeMode: !1,
|
|
11723
11754
|
category: "most_recent",
|
|
11724
11755
|
limit: 4,
|
|
@@ -11729,7 +11760,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11729
11760
|
}
|
|
11730
11761
|
}
|
|
11731
11762
|
]
|
|
11732
|
-
},
|
|
11763
|
+
}, Si = {
|
|
11733
11764
|
kind: "productPage",
|
|
11734
11765
|
label: "Product page",
|
|
11735
11766
|
description: "The page every product uses: pictures, price and a buy button, filled in from each product.",
|
|
@@ -11765,7 +11796,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11765
11796
|
align: "left"
|
|
11766
11797
|
}
|
|
11767
11798
|
});
|
|
11768
|
-
return [t.container([t.button("back", e.content.back, "ghost"),
|
|
11799
|
+
return [t.container([t.button("back", e.content.back, "ghost"), I(t, "product", "product", { mode: "detail" })], { gap: "var(--semantic-space-lg)" })];
|
|
11769
11800
|
}
|
|
11770
11801
|
}, {
|
|
11771
11802
|
id: "with-more",
|
|
@@ -11779,10 +11810,10 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11779
11810
|
...e.style,
|
|
11780
11811
|
align: "left"
|
|
11781
11812
|
}
|
|
11782
|
-
}), n = t.stack("top", [t.button("back", e.content.back, "ghost"),
|
|
11813
|
+
}), n = t.stack("top", [t.button("back", e.content.back, "ghost"), I(t, "product", "product", { mode: "detail" })], {
|
|
11783
11814
|
align: "stretch",
|
|
11784
11815
|
gap: "var(--semantic-space-lg)"
|
|
11785
|
-
}), r = t.stack("related", [t.text("relatedHeading", e.content.relatedHeading, "h3"),
|
|
11816
|
+
}), r = t.stack("related", [t.text("relatedHeading", e.content.relatedHeading, "h3"), I(t, "more", "shopGrid", {
|
|
11786
11817
|
storeMode: !1,
|
|
11787
11818
|
category: "most_recent",
|
|
11788
11819
|
limit: 3,
|
|
@@ -11794,6 +11825,100 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11794
11825
|
return [t.container([n, r], { gap: "var(--semantic-space-xl)" })];
|
|
11795
11826
|
}
|
|
11796
11827
|
}]
|
|
11828
|
+
}, Ci = {
|
|
11829
|
+
kind: "productOffer",
|
|
11830
|
+
label: "Sell a product",
|
|
11831
|
+
description: "Sell one product on this page — a heading and a buy-now card that takes payment right here.",
|
|
11832
|
+
group: "Store",
|
|
11833
|
+
fields: [
|
|
11834
|
+
{
|
|
11835
|
+
key: "eyebrow",
|
|
11836
|
+
label: "Small label above",
|
|
11837
|
+
type: "text",
|
|
11838
|
+
max: 40
|
|
11839
|
+
},
|
|
11840
|
+
{
|
|
11841
|
+
key: "heading",
|
|
11842
|
+
label: "Heading",
|
|
11843
|
+
type: "text",
|
|
11844
|
+
max: 90
|
|
11845
|
+
},
|
|
11846
|
+
{
|
|
11847
|
+
key: "text",
|
|
11848
|
+
label: "Text",
|
|
11849
|
+
type: "longtext",
|
|
11850
|
+
max: 300
|
|
11851
|
+
},
|
|
11852
|
+
{
|
|
11853
|
+
key: "productId",
|
|
11854
|
+
label: "Product to sell",
|
|
11855
|
+
type: "product",
|
|
11856
|
+
hint: "Visitors can buy it right here, without leaving the page."
|
|
11857
|
+
}
|
|
11858
|
+
],
|
|
11859
|
+
defaults: {
|
|
11860
|
+
eyebrow: "",
|
|
11861
|
+
heading: "Get it today",
|
|
11862
|
+
text: "",
|
|
11863
|
+
productId: ""
|
|
11864
|
+
},
|
|
11865
|
+
variants: [{
|
|
11866
|
+
id: "centered",
|
|
11867
|
+
label: "Centred",
|
|
11868
|
+
description: "A short introduction, then the buy-now card in the middle.",
|
|
11869
|
+
backgrounds: [
|
|
11870
|
+
"canvas",
|
|
11871
|
+
"surface",
|
|
11872
|
+
"sunken"
|
|
11873
|
+
],
|
|
11874
|
+
build(e) {
|
|
11875
|
+
let t = k({
|
|
11876
|
+
...e,
|
|
11877
|
+
style: {
|
|
11878
|
+
...e.style,
|
|
11879
|
+
align: "center"
|
|
11880
|
+
}
|
|
11881
|
+
});
|
|
11882
|
+
return [t.container([L(t, e.content), t.stack("offer-wrap", [I(t, "offer", "product", {
|
|
11883
|
+
productId: e.content.productId,
|
|
11884
|
+
mode: "buy"
|
|
11885
|
+
})], {
|
|
11886
|
+
align: "stretch",
|
|
11887
|
+
styles: { maxWidth: "32rem" }
|
|
11888
|
+
})], {
|
|
11889
|
+
alignItems: "center",
|
|
11890
|
+
gap: "var(--semantic-space-xl)"
|
|
11891
|
+
})];
|
|
11892
|
+
}
|
|
11893
|
+
}, {
|
|
11894
|
+
id: "split",
|
|
11895
|
+
label: "Words and card side by side",
|
|
11896
|
+
description: "Your words on the left, the buy-now card on the right.",
|
|
11897
|
+
backgrounds: [
|
|
11898
|
+
"canvas",
|
|
11899
|
+
"surface",
|
|
11900
|
+
"sunken"
|
|
11901
|
+
],
|
|
11902
|
+
build(e) {
|
|
11903
|
+
let t = k({
|
|
11904
|
+
...e,
|
|
11905
|
+
style: {
|
|
11906
|
+
...e.style,
|
|
11907
|
+
align: "left"
|
|
11908
|
+
}
|
|
11909
|
+
}), n = I(t, "offer", "product", {
|
|
11910
|
+
productId: e.content.productId,
|
|
11911
|
+
mode: "buy"
|
|
11912
|
+
}), r = L(t, e.content);
|
|
11913
|
+
return [t.container([r ? t.split("split", r, n, { ratio: [1, 1] }) : t.stack("offer-wrap", [n], {
|
|
11914
|
+
align: "stretch",
|
|
11915
|
+
styles: {
|
|
11916
|
+
maxWidth: "32rem",
|
|
11917
|
+
margin: "0 auto"
|
|
11918
|
+
}
|
|
11919
|
+
})])];
|
|
11920
|
+
}
|
|
11921
|
+
}]
|
|
11797
11922
|
}, wi = {
|
|
11798
11923
|
kind: "cartCheckout",
|
|
11799
11924
|
label: "Cart & checkout",
|
|
@@ -11841,9 +11966,9 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11841
11966
|
return [t.container([
|
|
11842
11967
|
t.text("heading", e.content.heading, "h2"),
|
|
11843
11968
|
t.text("text", e.content.text, "lead"),
|
|
11844
|
-
|
|
11969
|
+
I(t, "cart", "cart"),
|
|
11845
11970
|
t.text("checkoutHeading", e.content.checkoutHeading, "h2"),
|
|
11846
|
-
|
|
11971
|
+
I(t, "checkout", "checkout")
|
|
11847
11972
|
], {
|
|
11848
11973
|
maxWidth: "52rem",
|
|
11849
11974
|
gap: "var(--semantic-space-lg)"
|
|
@@ -11865,8 +11990,8 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11865
11990
|
}), n = t.stack("cart-col", [
|
|
11866
11991
|
t.text("heading", e.content.heading, "h2"),
|
|
11867
11992
|
t.text("text", e.content.text, "lead"),
|
|
11868
|
-
|
|
11869
|
-
], { align: "stretch" }), r = t.card("checkout-col", [t.text("checkoutHeading", e.content.checkoutHeading, "h3"),
|
|
11993
|
+
I(t, "cart", "cart")
|
|
11994
|
+
], { align: "stretch" }), r = t.card("checkout-col", [t.text("checkoutHeading", e.content.checkoutHeading, "h3"), I(t, "checkout", "checkout")]);
|
|
11870
11995
|
return [t.container([t.split("split", n, r, {
|
|
11871
11996
|
ratio: [1, 1],
|
|
11872
11997
|
align: "flex-start"
|
|
@@ -11889,7 +12014,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11889
12014
|
return [t.container([
|
|
11890
12015
|
t.text("heading", e.content.heading, "h2"),
|
|
11891
12016
|
t.text("text", e.content.text, "lead"),
|
|
11892
|
-
|
|
12017
|
+
I(t, "cart", "cart")
|
|
11893
12018
|
], {
|
|
11894
12019
|
maxWidth: "52rem",
|
|
11895
12020
|
gap: "var(--semantic-space-lg)"
|
|
@@ -11944,8 +12069,8 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11944
12069
|
}
|
|
11945
12070
|
});
|
|
11946
12071
|
return [t.container([
|
|
11947
|
-
|
|
11948
|
-
|
|
12072
|
+
L(t, e.content),
|
|
12073
|
+
I(t, "order", "orderConfirmation", {}, { maxWidth: "40rem" }),
|
|
11949
12074
|
e.content.cta?.label ? t.button("cta", e.content.cta, "primary") : null
|
|
11950
12075
|
], {
|
|
11951
12076
|
alignItems: "center",
|
|
@@ -11964,11 +12089,11 @@ var ci = (e, t, n = "2rem") => {
|
|
|
11964
12089
|
...e.style,
|
|
11965
12090
|
align: "left"
|
|
11966
12091
|
}
|
|
11967
|
-
}), n = t.stack("copy-col", [
|
|
12092
|
+
}), n = t.stack("copy-col", [L(t, e.content), e.content.cta?.label ? t.button("cta", e.content.cta, "secondary") : null], {
|
|
11968
12093
|
align: "flex-start",
|
|
11969
12094
|
gap: "var(--semantic-space-lg)"
|
|
11970
12095
|
});
|
|
11971
|
-
return [t.container([t.split("split", n, t.card("order-card", [
|
|
12096
|
+
return [t.container([t.split("split", n, t.card("order-card", [I(t, "order", "orderConfirmation")]), {
|
|
11972
12097
|
ratio: [1, 1.2],
|
|
11973
12098
|
align: "flex-start"
|
|
11974
12099
|
})])];
|
|
@@ -12007,7 +12132,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12007
12132
|
align: "center"
|
|
12008
12133
|
}
|
|
12009
12134
|
});
|
|
12010
|
-
return [t.container([
|
|
12135
|
+
return [t.container([L(t, e.content), I(t, "tracking", "orderTracking", {}, { maxWidth: "40rem" })], {
|
|
12011
12136
|
alignItems: "center",
|
|
12012
12137
|
gap: "var(--semantic-space-xl)"
|
|
12013
12138
|
})];
|
|
@@ -12025,7 +12150,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12025
12150
|
align: "left"
|
|
12026
12151
|
}
|
|
12027
12152
|
});
|
|
12028
|
-
return [t.container([t.split("split", t.stack("copy-col", [
|
|
12153
|
+
return [t.container([t.split("split", t.stack("copy-col", [L(t, e.content)], { align: "flex-start" }), t.card("tracking-card", [I(t, "tracking", "orderTracking")]), {
|
|
12029
12154
|
ratio: [1, 1],
|
|
12030
12155
|
align: "flex-start"
|
|
12031
12156
|
})])];
|
|
@@ -12050,7 +12175,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12050
12175
|
type: "longtext",
|
|
12051
12176
|
max: 300
|
|
12052
12177
|
}
|
|
12053
|
-
], Oi = (e, t = {}) =>
|
|
12178
|
+
], Oi = (e, t = {}) => I(e, "signup", "signupForm", {}, {
|
|
12054
12179
|
minHeight: "280px",
|
|
12055
12180
|
...t
|
|
12056
12181
|
}), ki = {
|
|
@@ -12082,7 +12207,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12082
12207
|
align: "center"
|
|
12083
12208
|
}
|
|
12084
12209
|
});
|
|
12085
|
-
return [t.container([
|
|
12210
|
+
return [t.container([L(t, e.content), Oi(t, { maxWidth: "32rem" })], {
|
|
12086
12211
|
alignItems: "center",
|
|
12087
12212
|
gap: "var(--semantic-space-xl)"
|
|
12088
12213
|
})];
|
|
@@ -12105,7 +12230,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12105
12230
|
align: "left"
|
|
12106
12231
|
}
|
|
12107
12232
|
});
|
|
12108
|
-
return [t.container([t.split("split", t.stack("copy-col", [
|
|
12233
|
+
return [t.container([t.split("split", t.stack("copy-col", [L(t, e.content)], { align: "flex-start" }), Oi(t), {
|
|
12109
12234
|
ratio: [1, 1],
|
|
12110
12235
|
align: "center"
|
|
12111
12236
|
})])];
|
|
@@ -12128,7 +12253,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12128
12253
|
align: "center"
|
|
12129
12254
|
}
|
|
12130
12255
|
});
|
|
12131
|
-
return [t.container([t.card("signup-card", [
|
|
12256
|
+
return [t.container([t.card("signup-card", [L(t, e.content, { maxWidth: "28rem" }), Oi(t)], {
|
|
12132
12257
|
maxWidth: "34rem",
|
|
12133
12258
|
margin: "0 auto",
|
|
12134
12259
|
alignItems: "center"
|
|
@@ -12136,7 +12261,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12136
12261
|
}
|
|
12137
12262
|
}
|
|
12138
12263
|
]
|
|
12139
|
-
},
|
|
12264
|
+
}, R = {
|
|
12140
12265
|
paddingTop: "0px",
|
|
12141
12266
|
paddingBottom: "0px"
|
|
12142
12267
|
}, Ai = (e) => {
|
|
@@ -12146,7 +12271,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12146
12271
|
styles: r,
|
|
12147
12272
|
...e.children ? { children: e.children.map(Ai) } : {}
|
|
12148
12273
|
};
|
|
12149
|
-
},
|
|
12274
|
+
}, z = (e, t, n = {
|
|
12150
12275
|
top: 32,
|
|
12151
12276
|
bottom: 32
|
|
12152
12277
|
}) => Ai(e.box("column", t, {
|
|
@@ -12202,7 +12327,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12202
12327
|
"inverted",
|
|
12203
12328
|
"primary"
|
|
12204
12329
|
],
|
|
12205
|
-
sectionStyles:
|
|
12330
|
+
sectionStyles: R,
|
|
12206
12331
|
build(e) {
|
|
12207
12332
|
let t = k({
|
|
12208
12333
|
...e,
|
|
@@ -12211,7 +12336,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12211
12336
|
align: "center"
|
|
12212
12337
|
}
|
|
12213
12338
|
}), n = e.content;
|
|
12214
|
-
return [
|
|
12339
|
+
return [z(t, [n.logo ? t.image("logo", n.logo, n.logoAlt, {
|
|
12215
12340
|
ratio: "auto",
|
|
12216
12341
|
radius: "0px",
|
|
12217
12342
|
styles: {
|
|
@@ -12233,7 +12358,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12233
12358
|
"inverted",
|
|
12234
12359
|
"primary"
|
|
12235
12360
|
],
|
|
12236
|
-
sectionStyles:
|
|
12361
|
+
sectionStyles: R,
|
|
12237
12362
|
build(e) {
|
|
12238
12363
|
let t = k({
|
|
12239
12364
|
...e,
|
|
@@ -12249,7 +12374,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12249
12374
|
aspectRatio: void 0
|
|
12250
12375
|
}
|
|
12251
12376
|
}) : t.text("name", n.name, "h3"), i = t.button("link", n.link, "ghost");
|
|
12252
|
-
return [
|
|
12377
|
+
return [z(t, [t.row("bar", [r, i], {
|
|
12253
12378
|
gap: "16px",
|
|
12254
12379
|
align: "center",
|
|
12255
12380
|
stack: !1
|
|
@@ -12316,7 +12441,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12316
12441
|
"sunken",
|
|
12317
12442
|
"primary"
|
|
12318
12443
|
],
|
|
12319
|
-
sectionStyles:
|
|
12444
|
+
sectionStyles: R,
|
|
12320
12445
|
build(e) {
|
|
12321
12446
|
let t = k({
|
|
12322
12447
|
...e,
|
|
@@ -12325,7 +12450,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12325
12450
|
align: "center"
|
|
12326
12451
|
}
|
|
12327
12452
|
}), n = e.content;
|
|
12328
|
-
return [
|
|
12453
|
+
return [z(t, [
|
|
12329
12454
|
n.image ? t.image("image", n.image, n.imageAlt, {
|
|
12330
12455
|
ratio: "auto",
|
|
12331
12456
|
radius: "8px",
|
|
@@ -12355,7 +12480,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12355
12480
|
"sunken",
|
|
12356
12481
|
"primary"
|
|
12357
12482
|
],
|
|
12358
|
-
sectionStyles:
|
|
12483
|
+
sectionStyles: R,
|
|
12359
12484
|
build(e) {
|
|
12360
12485
|
let t = k({
|
|
12361
12486
|
...e,
|
|
@@ -12368,7 +12493,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12368
12493
|
radius: "8px",
|
|
12369
12494
|
styles: { aspectRatio: void 0 }
|
|
12370
12495
|
}) : null;
|
|
12371
|
-
return [
|
|
12496
|
+
return [z(t, [
|
|
12372
12497
|
t.text("eyebrow", n.eyebrow, "eyebrow"),
|
|
12373
12498
|
t.text("headline", n.headline, "h1"),
|
|
12374
12499
|
t.text("text", n.text, "lead"),
|
|
@@ -12411,10 +12536,10 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12411
12536
|
"surface",
|
|
12412
12537
|
"sunken"
|
|
12413
12538
|
],
|
|
12414
|
-
sectionStyles:
|
|
12539
|
+
sectionStyles: R,
|
|
12415
12540
|
build(e) {
|
|
12416
12541
|
let t = k(e);
|
|
12417
|
-
return [
|
|
12542
|
+
return [z(t, [t.text("heading", e.content.heading, "h2"), t.text("text", e.content.text, "body")])];
|
|
12418
12543
|
}
|
|
12419
12544
|
}, {
|
|
12420
12545
|
id: "centered",
|
|
@@ -12425,7 +12550,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12425
12550
|
"surface",
|
|
12426
12551
|
"sunken"
|
|
12427
12552
|
],
|
|
12428
|
-
sectionStyles:
|
|
12553
|
+
sectionStyles: R,
|
|
12429
12554
|
build(e) {
|
|
12430
12555
|
let t = k({
|
|
12431
12556
|
...e,
|
|
@@ -12434,7 +12559,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12434
12559
|
align: "center"
|
|
12435
12560
|
}
|
|
12436
12561
|
});
|
|
12437
|
-
return [
|
|
12562
|
+
return [z(t, [t.text("heading", e.content.heading, "h2", { align: "center" }), t.text("text", e.content.text, "body", { align: "center" })])];
|
|
12438
12563
|
}
|
|
12439
12564
|
}]
|
|
12440
12565
|
},
|
|
@@ -12507,7 +12632,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12507
12632
|
"surface",
|
|
12508
12633
|
"sunken"
|
|
12509
12634
|
],
|
|
12510
|
-
sectionStyles:
|
|
12635
|
+
sectionStyles: R,
|
|
12511
12636
|
build(e) {
|
|
12512
12637
|
let t = k(e), n = (Array.isArray(e.content.items) ? e.content.items : []).map((e, n) => t.stack(`item-${n}`, [
|
|
12513
12638
|
e.image ? t.image(`items.${n}.image`, e.image, e.imageAlt, {
|
|
@@ -12518,7 +12643,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12518
12643
|
t.text(`items.${n}.title`, e.title, "h4"),
|
|
12519
12644
|
t.text(`items.${n}.text`, e.text, "body")
|
|
12520
12645
|
], { gap: "8px" }));
|
|
12521
|
-
return [
|
|
12646
|
+
return [z(t, [t.text("heading", e.content.heading, "h2"), t.row("points", n, {
|
|
12522
12647
|
gap: "24px",
|
|
12523
12648
|
align: "flex-start"
|
|
12524
12649
|
})])];
|
|
@@ -12532,10 +12657,10 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12532
12657
|
"surface",
|
|
12533
12658
|
"sunken"
|
|
12534
12659
|
],
|
|
12535
|
-
sectionStyles:
|
|
12660
|
+
sectionStyles: R,
|
|
12536
12661
|
build(e) {
|
|
12537
12662
|
let t = k(e), n = (Array.isArray(e.content.items) ? e.content.items : []).map((e, n) => t.stack(`item-${n}`, [t.text(`items.${n}.title`, e.title, "h4"), t.text(`items.${n}.text`, e.text, "body")], { gap: "6px" }));
|
|
12538
|
-
return [
|
|
12663
|
+
return [z(t, [t.text("heading", e.content.heading, "h2"), ...n])];
|
|
12539
12664
|
}
|
|
12540
12665
|
}]
|
|
12541
12666
|
},
|
|
@@ -12580,7 +12705,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12580
12705
|
"inverted",
|
|
12581
12706
|
"sunken"
|
|
12582
12707
|
],
|
|
12583
|
-
sectionStyles:
|
|
12708
|
+
sectionStyles: R,
|
|
12584
12709
|
build(e) {
|
|
12585
12710
|
let t = k({
|
|
12586
12711
|
...e,
|
|
@@ -12589,7 +12714,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12589
12714
|
align: "center"
|
|
12590
12715
|
}
|
|
12591
12716
|
}), n = e.content, r = t.button("cta", n.cta, "primary");
|
|
12592
|
-
return [
|
|
12717
|
+
return [z(t, [
|
|
12593
12718
|
t.text("heading", n.heading, "h2", { align: "center" }),
|
|
12594
12719
|
t.text("text", n.text, "body", { align: "center" }),
|
|
12595
12720
|
r ? {
|
|
@@ -12609,7 +12734,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12609
12734
|
label: "Plain",
|
|
12610
12735
|
description: "On the page colour.",
|
|
12611
12736
|
backgrounds: ["canvas", "surface"],
|
|
12612
|
-
sectionStyles:
|
|
12737
|
+
sectionStyles: R,
|
|
12613
12738
|
build(e) {
|
|
12614
12739
|
let t = k({
|
|
12615
12740
|
...e,
|
|
@@ -12618,7 +12743,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12618
12743
|
align: "center"
|
|
12619
12744
|
}
|
|
12620
12745
|
}), n = e.content, r = t.button("cta", n.cta, "primary");
|
|
12621
|
-
return [
|
|
12746
|
+
return [z(t, [
|
|
12622
12747
|
t.text("heading", n.heading, "h2", { align: "center" }),
|
|
12623
12748
|
t.text("text", n.text, "body", { align: "center" }),
|
|
12624
12749
|
r ? {
|
|
@@ -12657,10 +12782,10 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12657
12782
|
label: "Full width",
|
|
12658
12783
|
description: "Fills the email.",
|
|
12659
12784
|
backgrounds: ["canvas", "sunken"],
|
|
12660
|
-
sectionStyles:
|
|
12785
|
+
sectionStyles: R,
|
|
12661
12786
|
build(e) {
|
|
12662
12787
|
let t = k(e);
|
|
12663
|
-
return [
|
|
12788
|
+
return [z(t, [t.image("image", e.content.image, e.content.imageAlt, {
|
|
12664
12789
|
ratio: "auto",
|
|
12665
12790
|
radius: "8px",
|
|
12666
12791
|
styles: { aspectRatio: void 0 }
|
|
@@ -12721,7 +12846,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12721
12846
|
"canvas",
|
|
12722
12847
|
"inverted"
|
|
12723
12848
|
],
|
|
12724
|
-
sectionStyles:
|
|
12849
|
+
sectionStyles: R,
|
|
12725
12850
|
build(e) {
|
|
12726
12851
|
let t = k({
|
|
12727
12852
|
...e,
|
|
@@ -12730,7 +12855,7 @@ var ci = (e, t, n = "2rem") => {
|
|
|
12730
12855
|
align: "center"
|
|
12731
12856
|
}
|
|
12732
12857
|
}), n = e.content, r = t.button("link", n.link, "ghost");
|
|
12733
|
-
return [
|
|
12858
|
+
return [z(t, [
|
|
12734
12859
|
t.text("name", n.name, "small", {
|
|
12735
12860
|
align: "center",
|
|
12736
12861
|
color: t.tone.body
|
|
@@ -12763,23 +12888,24 @@ new Set(ji.map((e) => e.kind));
|
|
|
12763
12888
|
//#region src/v2/sections/registry.ts
|
|
12764
12889
|
var Mi = [
|
|
12765
12890
|
ut,
|
|
12766
|
-
|
|
12767
|
-
|
|
12768
|
-
|
|
12769
|
-
|
|
12891
|
+
or,
|
|
12892
|
+
ur,
|
|
12893
|
+
_r,
|
|
12894
|
+
Rn,
|
|
12770
12895
|
$e,
|
|
12771
|
-
|
|
12772
|
-
|
|
12773
|
-
|
|
12896
|
+
Ir,
|
|
12897
|
+
Wr,
|
|
12898
|
+
nr,
|
|
12899
|
+
gi,
|
|
12900
|
+
di,
|
|
12901
|
+
kr,
|
|
12902
|
+
$r,
|
|
12903
|
+
En,
|
|
12904
|
+
vn,
|
|
12905
|
+
pn,
|
|
12906
|
+
Zn,
|
|
12774
12907
|
_i,
|
|
12775
|
-
|
|
12776
|
-
Ar,
|
|
12777
|
-
ei,
|
|
12778
|
-
Dn,
|
|
12779
|
-
yn,
|
|
12780
|
-
mn,
|
|
12781
|
-
Qn,
|
|
12782
|
-
vi,
|
|
12908
|
+
bi,
|
|
12783
12909
|
xi,
|
|
12784
12910
|
Si,
|
|
12785
12911
|
Ci,
|
|
@@ -12788,7 +12914,7 @@ var Mi = [
|
|
|
12788
12914
|
Ei,
|
|
12789
12915
|
ki
|
|
12790
12916
|
], Ni = new Map([...Mi, ...ji].map((e) => [e.kind, e]));
|
|
12791
|
-
function
|
|
12917
|
+
function B(e) {
|
|
12792
12918
|
let t = Ni.get(e);
|
|
12793
12919
|
if (!t) throw Error(`Unknown section kind "${e}".`);
|
|
12794
12920
|
return t;
|
|
@@ -12813,12 +12939,12 @@ var Pi = (e) => Ni.has(e), Fi = (e) => JSON.parse(JSON.stringify(e)), Ii = {
|
|
|
12813
12939
|
normal: 1,
|
|
12814
12940
|
airy: 1.5
|
|
12815
12941
|
};
|
|
12816
|
-
function
|
|
12942
|
+
function V(e) {
|
|
12817
12943
|
let t = e?.type === "section" ? e.props?.block : void 0;
|
|
12818
12944
|
return t && typeof t == "object" && typeof t.kind == "string" ? t : null;
|
|
12819
12945
|
}
|
|
12820
12946
|
function Ri(e, t) {
|
|
12821
|
-
let n =
|
|
12947
|
+
let n = B(e), r = n.variants.find((e) => e.id === t) ?? n.variants[0];
|
|
12822
12948
|
return {
|
|
12823
12949
|
kind: e,
|
|
12824
12950
|
variant: r.id,
|
|
@@ -12922,7 +13048,7 @@ function Zi(e, t = D("section")) {
|
|
|
12922
13048
|
...e,
|
|
12923
13049
|
content: n,
|
|
12924
13050
|
...e.overrides ? { overrides: Yi(e.overrides, n) } : {}
|
|
12925
|
-
}, i =
|
|
13051
|
+
}, i = B(r.kind), a = i.variants.find((e) => e.id === r.variant) ?? i.variants[0], o = r.style?.background ?? a.backgrounds?.[0] ?? "canvas", s = {
|
|
12926
13052
|
...r.style,
|
|
12927
13053
|
background: o,
|
|
12928
13054
|
align: r.style?.align ?? "left",
|
|
@@ -12984,7 +13110,7 @@ function Zi(e, t = D("section")) {
|
|
|
12984
13110
|
};
|
|
12985
13111
|
}
|
|
12986
13112
|
function Qi(e) {
|
|
12987
|
-
let t =
|
|
13113
|
+
let t = V(e);
|
|
12988
13114
|
if (!t) return e;
|
|
12989
13115
|
let n = Zi(t, e.id), { block: r, ...i } = e.props ?? {};
|
|
12990
13116
|
return {
|
|
@@ -13013,14 +13139,14 @@ var ta = (e, t) => Qi({
|
|
|
13013
13139
|
}
|
|
13014
13140
|
});
|
|
13015
13141
|
function na(e, t, n) {
|
|
13016
|
-
let r =
|
|
13142
|
+
let r = V(e);
|
|
13017
13143
|
return r ? ta(e, {
|
|
13018
13144
|
...r,
|
|
13019
13145
|
content: ea(r.content, t, n)
|
|
13020
13146
|
}) : e;
|
|
13021
13147
|
}
|
|
13022
13148
|
function ra(e, t) {
|
|
13023
|
-
let n =
|
|
13149
|
+
let n = V(e);
|
|
13024
13150
|
return n ? ta(e, {
|
|
13025
13151
|
...n,
|
|
13026
13152
|
content: {
|
|
@@ -13030,9 +13156,9 @@ function ra(e, t) {
|
|
|
13030
13156
|
}) : e;
|
|
13031
13157
|
}
|
|
13032
13158
|
function ia(e, t) {
|
|
13033
|
-
let n =
|
|
13159
|
+
let n = V(e);
|
|
13034
13160
|
if (!n) return e;
|
|
13035
|
-
let r =
|
|
13161
|
+
let r = B(n.kind), i = r.variants.find((e) => e.id === t);
|
|
13036
13162
|
if (!i || i.id === n.variant) return e;
|
|
13037
13163
|
let a = r.variants.find((e) => e.id === n.variant), o = n.style?.background && n.style.background !== (a?.backgrounds?.[0] ?? "canvas"), s = {
|
|
13038
13164
|
...n.style,
|
|
@@ -13052,7 +13178,7 @@ function ia(e, t) {
|
|
|
13052
13178
|
});
|
|
13053
13179
|
}
|
|
13054
13180
|
function aa(e, t) {
|
|
13055
|
-
let n =
|
|
13181
|
+
let n = V(e);
|
|
13056
13182
|
return n ? ta(e, {
|
|
13057
13183
|
...n,
|
|
13058
13184
|
style: {
|
|
@@ -13062,7 +13188,7 @@ function aa(e, t) {
|
|
|
13062
13188
|
}) : e;
|
|
13063
13189
|
}
|
|
13064
13190
|
function oa(e) {
|
|
13065
|
-
if (!
|
|
13191
|
+
if (!V(e)) return e;
|
|
13066
13192
|
let { block: t, ...n } = e.props ?? {}, r = (e) => {
|
|
13067
13193
|
let { bind: t, ...n } = e.props ?? {};
|
|
13068
13194
|
return {
|
|
@@ -13080,7 +13206,7 @@ function oa(e) {
|
|
|
13080
13206
|
function sa(e, t) {
|
|
13081
13207
|
let n = (e, r) => {
|
|
13082
13208
|
if (e.id === t) return e.type === "section" ? null : r;
|
|
13083
|
-
let i =
|
|
13209
|
+
let i = V(e) ? e : r;
|
|
13084
13210
|
for (let t of e.children ?? []) {
|
|
13085
13211
|
let e = n(t, i);
|
|
13086
13212
|
if (e) return e;
|
|
@@ -13119,10 +13245,10 @@ function ca(e, t, n) {
|
|
|
13119
13245
|
}
|
|
13120
13246
|
function la(e, t) {
|
|
13121
13247
|
let n = Vi(e.id, t);
|
|
13122
|
-
return n === "@section" ? n : Ji(n, Ki(
|
|
13248
|
+
return n === "@section" ? n : Ji(n, Ki(V(e)?.content ?? {}));
|
|
13123
13249
|
}
|
|
13124
13250
|
function ua(e, t, n) {
|
|
13125
|
-
let r =
|
|
13251
|
+
let r = V(e);
|
|
13126
13252
|
if (!r) return e;
|
|
13127
13253
|
let i = la(e, t), a = r.overrides?.[i] ?? {}, o = {
|
|
13128
13254
|
...a,
|
|
@@ -13159,7 +13285,7 @@ function ua(e, t, n) {
|
|
|
13159
13285
|
});
|
|
13160
13286
|
}
|
|
13161
13287
|
function da(e, t) {
|
|
13162
|
-
let n =
|
|
13288
|
+
let n = V(e);
|
|
13163
13289
|
if (!n?.overrides) return e;
|
|
13164
13290
|
if (!t) {
|
|
13165
13291
|
let { overrides: t, ...r } = n;
|
|
@@ -13172,7 +13298,7 @@ function da(e, t) {
|
|
|
13172
13298
|
});
|
|
13173
13299
|
}
|
|
13174
13300
|
var fa = (e) => {
|
|
13175
|
-
let t =
|
|
13301
|
+
let t = V(e), n = Object.keys(t?.overrides ?? {});
|
|
13176
13302
|
if (!t || !n.length) return 0;
|
|
13177
13303
|
let r = /* @__PURE__ */ new Set([Bi]), i = (n) => {
|
|
13178
13304
|
r.add(Ji(Vi(e.id, n.id), t.content)), n.children?.forEach(i);
|
|
@@ -13185,7 +13311,7 @@ function pa(e, t) {
|
|
|
13185
13311
|
let r = null, i = (e) => {
|
|
13186
13312
|
e.id === t ? r = e : e.children?.forEach(i);
|
|
13187
13313
|
};
|
|
13188
|
-
return i(e), r &&
|
|
13314
|
+
return i(e), r && V(r) ? r : null;
|
|
13189
13315
|
}
|
|
13190
13316
|
function ma(e, t, n) {
|
|
13191
13317
|
let r = pa(e, t);
|
|
@@ -13264,11 +13390,11 @@ var ya = [
|
|
|
13264
13390
|
for (let e of ya) delete t[e];
|
|
13265
13391
|
return t;
|
|
13266
13392
|
}, xa = (e) => {
|
|
13267
|
-
let t =
|
|
13393
|
+
let t = V(e)?.overrides?.[Bi];
|
|
13268
13394
|
return !!t && (t.styles?.position === "absolute" || typeof t.styles?.x == "number" || typeof t.styles?.y == "number");
|
|
13269
13395
|
};
|
|
13270
13396
|
function Sa(e) {
|
|
13271
|
-
let t =
|
|
13397
|
+
let t = V(e);
|
|
13272
13398
|
if (!t) return e;
|
|
13273
13399
|
let n = t.overrides?.[Bi];
|
|
13274
13400
|
if (!n) return Qi(e);
|
|
@@ -13564,6 +13690,7 @@ var wa = (e, t = "#") => ({
|
|
|
13564
13690
|
blogArticle: "Blog article",
|
|
13565
13691
|
shop: "Shop",
|
|
13566
13692
|
productPage: "Product",
|
|
13693
|
+
productOffer: "Sell a product",
|
|
13567
13694
|
cartCheckout: "Cart & checkout",
|
|
13568
13695
|
orderConfirmation: "Order confirmed",
|
|
13569
13696
|
orderTracking: "Order tracking",
|
|
@@ -13621,7 +13748,7 @@ function Na(e, t = {}) {
|
|
|
13621
13748
|
});
|
|
13622
13749
|
}
|
|
13623
13750
|
function Pa(e) {
|
|
13624
|
-
return xe(e).every((e) => !
|
|
13751
|
+
return xe(e).every((e) => !V(e) && !e.children?.length);
|
|
13625
13752
|
}
|
|
13626
13753
|
function Fa(e, t) {
|
|
13627
13754
|
let n = Da(e), r = t.seed ?? ja(n.id), i = {
|
|
@@ -14147,9 +14274,9 @@ function ho(e, t = 0) {
|
|
|
14147
14274
|
return "";
|
|
14148
14275
|
}
|
|
14149
14276
|
function go(e) {
|
|
14150
|
-
let t =
|
|
14277
|
+
let t = V(e);
|
|
14151
14278
|
if (!t) return "";
|
|
14152
|
-
let n = Pi(t.kind) ?
|
|
14279
|
+
let n = Pi(t.kind) ? B(t.kind).fields : [];
|
|
14153
14280
|
for (let e of n) {
|
|
14154
14281
|
let n = t.content?.[e.key];
|
|
14155
14282
|
if ((e.type === "text" || e.type === "longtext") && typeof n == "string" && n.trim()) return mo(n.trim());
|
|
@@ -14200,7 +14327,7 @@ function yo(e) {
|
|
|
14200
14327
|
return (e.children ?? []).map((e) => n(e, 0)).filter((e) => !!e);
|
|
14201
14328
|
}
|
|
14202
14329
|
function bo(e) {
|
|
14203
|
-
let t =
|
|
14330
|
+
let t = V(e);
|
|
14204
14331
|
return t ? {
|
|
14205
14332
|
id: e.id,
|
|
14206
14333
|
kind: t.kind,
|
|
@@ -14539,10 +14666,10 @@ var Go = a({
|
|
|
14539
14666
|
function $o(e) {
|
|
14540
14667
|
Qo = e;
|
|
14541
14668
|
}
|
|
14542
|
-
var
|
|
14669
|
+
var H = (e) => ({
|
|
14543
14670
|
ok: !1,
|
|
14544
14671
|
message: e
|
|
14545
|
-
}),
|
|
14672
|
+
}), U = (e, t) => ({
|
|
14546
14673
|
ok: !0,
|
|
14547
14674
|
message: e,
|
|
14548
14675
|
...t ? { sectionId: t } : {}
|
|
@@ -14561,9 +14688,9 @@ var V = (e) => ({
|
|
|
14561
14688
|
...e.rootNode,
|
|
14562
14689
|
children: n
|
|
14563
14690
|
}
|
|
14564
|
-
} : e),
|
|
14565
|
-
let t =
|
|
14566
|
-
return t && Pi(t.kind) ?
|
|
14691
|
+
} : e), W = (e) => e.rootNode.children ?? [], as = (e) => H(`I couldn't find a section called "${e}". It may have been removed already.`), os = (e) => {
|
|
14692
|
+
let t = V(e);
|
|
14693
|
+
return t && Pi(t.kind) ? B(t.kind).label : e.name || "section";
|
|
14567
14694
|
};
|
|
14568
14695
|
function ss(e, t, n) {
|
|
14569
14696
|
if (t.afterSectionId !== void 0) {
|
|
@@ -14598,7 +14725,8 @@ function fs(e, t, n) {
|
|
|
14598
14725
|
case "longtext":
|
|
14599
14726
|
case "image":
|
|
14600
14727
|
case "link":
|
|
14601
|
-
case "icon":
|
|
14728
|
+
case "icon":
|
|
14729
|
+
case "product": return typeof t == "string" ? null : `"${n}" should be text.`;
|
|
14602
14730
|
case "toggle": return typeof t == "boolean" ? null : `"${n}" should be on or off.`;
|
|
14603
14731
|
case "select": {
|
|
14604
14732
|
let r = (e.options ?? []).map(([e]) => e);
|
|
@@ -14629,7 +14757,7 @@ function ps(e, t, n) {
|
|
|
14629
14757
|
return null;
|
|
14630
14758
|
}
|
|
14631
14759
|
function ms(e, t) {
|
|
14632
|
-
let n =
|
|
14760
|
+
let n = B(e);
|
|
14633
14761
|
for (let [e, r] of Object.entries(t)) {
|
|
14634
14762
|
let t = us(n.fields, e.split(".").filter(Boolean));
|
|
14635
14763
|
if (!t) return `A ${n.label.toLowerCase()} section has no "${e}" field. The fields are: ${n.fields.map((e) => e.key).join(", ")}.`;
|
|
@@ -14660,7 +14788,7 @@ function vs(e, t) {
|
|
|
14660
14788
|
case "secondaryColor":
|
|
14661
14789
|
if (!Ba(t)) return {
|
|
14662
14790
|
ds: e,
|
|
14663
|
-
result:
|
|
14791
|
+
result: H(`"${t}" doesn't look like a colour I can use. Try something like #1D4ED8.`)
|
|
14664
14792
|
};
|
|
14665
14793
|
n = i === "primaryColor" ? Za(n, t) : Qa(n, t), r.push(i === "primaryColor" ? "main colour" : "second colour");
|
|
14666
14794
|
break;
|
|
@@ -14669,7 +14797,7 @@ function vs(e, t) {
|
|
|
14669
14797
|
let a = ne.find((e) => e.name.toLowerCase() === t.toLowerCase());
|
|
14670
14798
|
if (!a) return {
|
|
14671
14799
|
ds: e,
|
|
14672
|
-
result:
|
|
14800
|
+
result: H(`I don't have a font called "${t}". Try one of: ${ne.map((e) => e.name).join(", ")}.`)
|
|
14673
14801
|
};
|
|
14674
14802
|
n = co(n, i === "headingFont" ? { heading: a.name } : { body: a.name }), r.push(i === "headingFont" ? "heading font" : "text font");
|
|
14675
14803
|
break;
|
|
@@ -14681,7 +14809,7 @@ function vs(e, t) {
|
|
|
14681
14809
|
"dark"
|
|
14682
14810
|
].includes(t)) return {
|
|
14683
14811
|
ds: e,
|
|
14684
|
-
result:
|
|
14812
|
+
result: H("The background feel should be \"cool\", \"warm\" or \"dark\".")
|
|
14685
14813
|
};
|
|
14686
14814
|
n = no(n, t), r.push("background feel");
|
|
14687
14815
|
break;
|
|
@@ -14692,19 +14820,19 @@ function vs(e, t) {
|
|
|
14692
14820
|
"round"
|
|
14693
14821
|
].includes(t)) return {
|
|
14694
14822
|
ds: e,
|
|
14695
|
-
result:
|
|
14823
|
+
result: H("Corner roundness should be \"sharp\", \"soft\" or \"round\".")
|
|
14696
14824
|
};
|
|
14697
14825
|
n = oo(n, t), r.push("corner roundness");
|
|
14698
14826
|
break;
|
|
14699
14827
|
default: {
|
|
14700
14828
|
if (!i.startsWith("--")) return {
|
|
14701
14829
|
ds: e,
|
|
14702
|
-
result:
|
|
14830
|
+
result: H(`I don't know the brand setting "${i}". I can change: ${gs.join(", ")}.`)
|
|
14703
14831
|
};
|
|
14704
14832
|
let a = ie(n, i);
|
|
14705
14833
|
if (!a) return {
|
|
14706
14834
|
ds: e,
|
|
14707
|
-
result:
|
|
14835
|
+
result: H(`There's no brand setting called "${i}" on this site.`)
|
|
14708
14836
|
};
|
|
14709
14837
|
n = E(n, i, t), r.push(a.name || i);
|
|
14710
14838
|
}
|
|
@@ -14712,15 +14840,15 @@ function vs(e, t) {
|
|
|
14712
14840
|
}
|
|
14713
14841
|
if (!r.length) return {
|
|
14714
14842
|
ds: e,
|
|
14715
|
-
result:
|
|
14843
|
+
result: H("There was nothing to change in the brand.")
|
|
14716
14844
|
};
|
|
14717
14845
|
let i = _s(e), a = w(n).filter((e) => !i.has(`${e.kind}:${e.key}`));
|
|
14718
14846
|
return a.length ? {
|
|
14719
14847
|
ds: e,
|
|
14720
|
-
result:
|
|
14848
|
+
result: H(`That brand change wouldn't work: ${a[0].message}`)
|
|
14721
14849
|
} : {
|
|
14722
14850
|
ds: x(n),
|
|
14723
|
-
result:
|
|
14851
|
+
result: U(`Updated the brand (${r.join(", ")}).`)
|
|
14724
14852
|
};
|
|
14725
14853
|
}
|
|
14726
14854
|
var ys = /* @__PURE__ */ new Set([
|
|
@@ -14731,7 +14859,7 @@ var ys = /* @__PURE__ */ new Set([
|
|
|
14731
14859
|
]);
|
|
14732
14860
|
function bs(e, t) {
|
|
14733
14861
|
for (let n of e) {
|
|
14734
|
-
let e =
|
|
14862
|
+
let e = W(n);
|
|
14735
14863
|
for (let r = 0; r < e.length; r++) {
|
|
14736
14864
|
let i = Vo(e[r], t);
|
|
14737
14865
|
if (i) return {
|
|
@@ -14758,7 +14886,7 @@ var Cs = (e) => {
|
|
|
14758
14886
|
let t = /* @__PURE__ */ new Set();
|
|
14759
14887
|
for (let n of e) Bo(n.rootNode, t);
|
|
14760
14888
|
return t;
|
|
14761
|
-
}, ws = "That belongs to a ready-made section, so change it through the section (its wording and layout) — or rebuild the whole section with replaceSection if it needs a different structure.", Ts = (e) => e.length ? ` (I left out settings I don't know: ${e.slice(0, 5).join(", ")}.)` : "", Es = (e, t, n, r) => is(e, t.id,
|
|
14889
|
+
}, ws = "That belongs to a ready-made section, so change it through the section (its wording and layout) — or rebuild the whole section with replaceSection if it needs a different structure.", Ts = (e) => e.length ? ` (I left out settings I don't know: ${e.slice(0, 5).join(", ")}.)` : "", Es = (e, t, n, r) => is(e, t.id, W(t).map((e, t) => t === n ? r : e));
|
|
14762
14890
|
function Ds(e, t) {
|
|
14763
14891
|
if (t.afterNodeId !== void 0) {
|
|
14764
14892
|
let n = e.findIndex((e) => e.id === t.afterNodeId);
|
|
@@ -14775,13 +14903,13 @@ function Os(e, t, n, r) {
|
|
|
14775
14903
|
switch (n.op) {
|
|
14776
14904
|
case "addSection": {
|
|
14777
14905
|
let r = ns(e, n.pageId);
|
|
14778
|
-
if (!r) return i(
|
|
14779
|
-
if (!Pi(n.kind)) return i(
|
|
14780
|
-
let a =
|
|
14781
|
-
if (n.variant && !a.variants.some((e) => e.id === n.variant)) return i(
|
|
14906
|
+
if (!r) return i(H(`I couldn't find a page called "${n.pageId}".`));
|
|
14907
|
+
if (!Pi(n.kind)) return i(H(`I don't know a "${n.kind}" section. The ones I can add are: ${es()}.`));
|
|
14908
|
+
let a = B(n.kind);
|
|
14909
|
+
if (n.variant && !a.variants.some((e) => e.id === n.variant)) return i(H(`A ${a.label.toLowerCase()} section doesn't have a "${n.variant}" layout. Choose from: ${a.variants.map((e) => e.id).join(", ")}.`));
|
|
14782
14910
|
if (n.content) {
|
|
14783
14911
|
let e = ms(n.kind, n.content);
|
|
14784
|
-
if (e) return i(
|
|
14912
|
+
if (e) return i(H(e));
|
|
14785
14913
|
}
|
|
14786
14914
|
let o = Ri(n.kind, n.variant), s = {
|
|
14787
14915
|
...o,
|
|
@@ -14790,8 +14918,8 @@ function Os(e, t, n, r) {
|
|
|
14790
14918
|
...o.style,
|
|
14791
14919
|
...n.style
|
|
14792
14920
|
}
|
|
14793
|
-
}, c =
|
|
14794
|
-
if ("error" in d) return i(
|
|
14921
|
+
}, c = W(r), l = new Set(e.flatMap((e) => W(e).map((e) => e.id))), u = n.id && /^[A-Za-z0-9_-]{1,40}$/.test(n.id) && !l.has(n.id) ? n.id : D("section"), d = ss(c, n, n.kind === "header" ? 0 : n.kind !== "footer" && c[c.length - 1] && V(c[c.length - 1])?.kind === "footer" ? c.length - 1 : c.length);
|
|
14922
|
+
if ("error" in d) return i(H(d.error));
|
|
14795
14923
|
let f = [
|
|
14796
14924
|
...c.slice(0, d.index),
|
|
14797
14925
|
Zi(s, u),
|
|
@@ -14800,43 +14928,43 @@ function Os(e, t, n, r) {
|
|
|
14800
14928
|
return {
|
|
14801
14929
|
pages: is(e, r.id, f),
|
|
14802
14930
|
ds: t,
|
|
14803
|
-
result:
|
|
14931
|
+
result: U(`Added a ${a.label.toLowerCase()} section to ${r.name}.`, u)
|
|
14804
14932
|
};
|
|
14805
14933
|
}
|
|
14806
14934
|
case "updateSection": {
|
|
14807
14935
|
let r = rs(e, n.sectionId);
|
|
14808
14936
|
if (!r) return i(as(n.sectionId));
|
|
14809
|
-
let a =
|
|
14810
|
-
if (!o) return i(
|
|
14811
|
-
if (n.content === void 0 && n.variant === void 0 && n.style === void 0) return i(
|
|
14812
|
-
let s =
|
|
14813
|
-
if (n.variant && !s.variants.some((e) => e.id === n.variant)) return i(
|
|
14937
|
+
let a = W(r.page)[r.index], o = V(a);
|
|
14938
|
+
if (!o) return i(H("That section was designed by hand, so its words aren't fields: change the elements inside it one at a time instead."));
|
|
14939
|
+
if (n.content === void 0 && n.variant === void 0 && n.style === void 0) return i(H("There was nothing to change in that section."));
|
|
14940
|
+
let s = B(o.kind);
|
|
14941
|
+
if (n.variant && !s.variants.some((e) => e.id === n.variant)) return i(H(`A ${s.label.toLowerCase()} section doesn't have a "${n.variant}" layout. Choose from: ${s.variants.map((e) => e.id).join(", ")}.`));
|
|
14814
14942
|
if (n.content) {
|
|
14815
14943
|
let e = ms(o.kind, n.content);
|
|
14816
|
-
if (e) return i(
|
|
14944
|
+
if (e) return i(H(e));
|
|
14817
14945
|
}
|
|
14818
14946
|
let c = a;
|
|
14819
14947
|
if (n.variant && (c = ia(c, n.variant)), n.content) {
|
|
14820
|
-
let e =
|
|
14948
|
+
let e = V(c);
|
|
14821
14949
|
c = ta(c, {
|
|
14822
14950
|
...e,
|
|
14823
14951
|
content: hs(e.content, n.content)
|
|
14824
14952
|
});
|
|
14825
14953
|
}
|
|
14826
14954
|
n.style && (c = aa(c, n.style));
|
|
14827
|
-
let l =
|
|
14955
|
+
let l = W(r.page).map((e, t) => t === r.index ? c : e);
|
|
14828
14956
|
return {
|
|
14829
14957
|
pages: is(e, r.page.id, l),
|
|
14830
14958
|
ds: t,
|
|
14831
|
-
result:
|
|
14959
|
+
result: U(`Updated the ${s.label.toLowerCase()} section on ${r.page.name}.`, a.id)
|
|
14832
14960
|
};
|
|
14833
14961
|
}
|
|
14834
14962
|
case "updateElement": {
|
|
14835
14963
|
let r = bs(e, n.nodeId);
|
|
14836
|
-
if (!r) return i(
|
|
14837
|
-
let a =
|
|
14838
|
-
if (
|
|
14839
|
-
if (r.node.id === a.id && (n.text !== void 0 || n.href !== void 0 || n.alt !== void 0 || n.src !== void 0)) return i(
|
|
14964
|
+
if (!r) return i(H(`I couldn't find an element called "${n.nodeId}" on the site. It may have been removed already.`));
|
|
14965
|
+
let a = W(r.page)[r.index];
|
|
14966
|
+
if (V(a)) return i(H(ws));
|
|
14967
|
+
if (r.node.id === a.id && (n.text !== void 0 || n.href !== void 0 || n.alt !== void 0 || n.src !== void 0)) return i(H("A section has no words of its own; change the elements inside it."));
|
|
14840
14968
|
if ([
|
|
14841
14969
|
"text",
|
|
14842
14970
|
"href",
|
|
@@ -14846,13 +14974,13 @@ function Os(e, t, n, r) {
|
|
|
14846
14974
|
"hidden",
|
|
14847
14975
|
"style",
|
|
14848
14976
|
"responsive"
|
|
14849
|
-
].every((e) => n[e] === void 0)) return i(
|
|
14977
|
+
].every((e) => n[e] === void 0)) return i(H("There was nothing to change in that element."));
|
|
14850
14978
|
let o = r.node;
|
|
14851
|
-
if (n.text !== void 0 && !ys.has(o.type) && typeof o.content != "string") return i(
|
|
14852
|
-
if (n.href !== void 0 && /^\s*(javascript|data|vbscript):/i.test(n.href)) return i(
|
|
14853
|
-
if ((n.alt !== void 0 || n.src !== void 0) && o.type !== "image") return i(
|
|
14979
|
+
if (n.text !== void 0 && !ys.has(o.type) && typeof o.content != "string") return i(H(`That ${o.type} has no words to change.`));
|
|
14980
|
+
if (n.href !== void 0 && /^\s*(javascript|data|vbscript):/i.test(n.href)) return i(H("That link isn't one I can use. Use a page address like /about or a full https:// address."));
|
|
14981
|
+
if ((n.alt !== void 0 || n.src !== void 0) && o.type !== "image") return i(H("Only a picture has a picture address and description."));
|
|
14854
14982
|
let s = n.style ? jo(n.style) : null, c = ["tablet", "mobile"].map((e) => [e, n.responsive?.[e] ? jo(n.responsive[e]) : null]), l = [...s?.dropped ?? [], ...c.flatMap(([, e]) => e?.dropped ?? [])];
|
|
14855
|
-
if (s && !Object.keys(s.styles).length && n.style && Object.keys(n.style).length && n.text === void 0 && n.href === void 0 && n.alt === void 0 && n.src === void 0 && !c.some(([, e]) => e && Object.keys(e.styles).length)) return i(
|
|
14983
|
+
if (s && !Object.keys(s.styles).length && n.style && Object.keys(n.style).length && n.text === void 0 && n.href === void 0 && n.alt === void 0 && n.src === void 0 && !c.some(([, e]) => e && Object.keys(e.styles).length)) return i(H(`None of those look settings are ones I know${Ts(l)}`));
|
|
14856
14984
|
let u = xs(o), d = Mo({
|
|
14857
14985
|
href: n.href,
|
|
14858
14986
|
alt: n.alt,
|
|
@@ -14889,50 +15017,50 @@ function Os(e, t, n, r) {
|
|
|
14889
15017
|
return {
|
|
14890
15018
|
pages: Es(e, r.page, r.index, Ro(a, n.nodeId, f)),
|
|
14891
15019
|
ds: t,
|
|
14892
|
-
result:
|
|
15020
|
+
result: U(`Changed the ${p} of ${u} on ${r.page.name}.${Ts(l)}`, a.id)
|
|
14893
15021
|
};
|
|
14894
15022
|
}
|
|
14895
15023
|
case "addElement": {
|
|
14896
15024
|
let r = bs(e, n.parentId);
|
|
14897
|
-
if (!r) return i(
|
|
14898
|
-
let a =
|
|
14899
|
-
if (
|
|
15025
|
+
if (!r) return i(H(`I couldn't find the group "${n.parentId}" to add it to.`));
|
|
15026
|
+
let a = W(r.page)[r.index];
|
|
15027
|
+
if (V(a)) return i(H(ws));
|
|
14900
15028
|
if (![
|
|
14901
15029
|
"section",
|
|
14902
15030
|
"container",
|
|
14903
15031
|
"card"
|
|
14904
|
-
].includes(r.node.type)) return i(
|
|
15032
|
+
].includes(r.node.type)) return i(H(`A ${r.node.type} can't hold other elements. Add it to a section, container or card.`));
|
|
14905
15033
|
let o = Ds(r.node.children ?? [], n);
|
|
14906
|
-
if (typeof o == "string") return i(
|
|
15034
|
+
if (typeof o == "string") return i(H(o));
|
|
14907
15035
|
let s;
|
|
14908
15036
|
try {
|
|
14909
15037
|
s = Lo(n.element, Cs(e));
|
|
14910
15038
|
} catch (e) {
|
|
14911
|
-
return i(
|
|
15039
|
+
return i(H(e.message));
|
|
14912
15040
|
}
|
|
14913
15041
|
let c = Uo(a, n.parentId, s.node, o);
|
|
14914
15042
|
return {
|
|
14915
15043
|
pages: Es(e, r.page, r.index, c),
|
|
14916
15044
|
ds: t,
|
|
14917
|
-
result:
|
|
15045
|
+
result: U(`Added ${xs(s.node)} to ${r.page.name}.${Ts(s.dropped)}`, a.id)
|
|
14918
15046
|
};
|
|
14919
15047
|
}
|
|
14920
15048
|
case "removeElement": {
|
|
14921
15049
|
let r = bs(e, n.nodeId);
|
|
14922
|
-
if (!r) return i(
|
|
14923
|
-
let a =
|
|
14924
|
-
return r.node.id === a.id ? i(
|
|
15050
|
+
if (!r) return i(H(`I couldn't find an element called "${n.nodeId}". It may have been removed already.`));
|
|
15051
|
+
let a = W(r.page)[r.index];
|
|
15052
|
+
return r.node.id === a.id ? i(H("That is a whole section. Use removeSection to take it out.")) : V(a) ? i(H(ws)) : {
|
|
14925
15053
|
pages: Es(e, r.page, r.index, Ho(a, n.nodeId)),
|
|
14926
15054
|
ds: t,
|
|
14927
|
-
result:
|
|
15055
|
+
result: U(`Removed ${xs(r.node)} from ${r.page.name}.`, a.id)
|
|
14928
15056
|
};
|
|
14929
15057
|
}
|
|
14930
15058
|
case "duplicateElement": {
|
|
14931
15059
|
let r = bs(e, n.nodeId);
|
|
14932
|
-
if (!r) return i(
|
|
14933
|
-
let a =
|
|
14934
|
-
if (r.node.id === a.id) return i(
|
|
14935
|
-
if (
|
|
15060
|
+
if (!r) return i(H(`I couldn't find an element called "${n.nodeId}".`));
|
|
15061
|
+
let a = W(r.page)[r.index];
|
|
15062
|
+
if (r.node.id === a.id) return i(H("That is a whole section. Use duplicateSection to copy it."));
|
|
15063
|
+
if (V(a)) return i(H(ws));
|
|
14936
15064
|
let o = (function e(t) {
|
|
14937
15065
|
if (t.children?.some((e) => e.id === n.nodeId)) return t;
|
|
14938
15066
|
for (let n of t.children ?? []) {
|
|
@@ -14944,16 +15072,16 @@ function Os(e, t, n, r) {
|
|
|
14944
15072
|
return {
|
|
14945
15073
|
pages: Es(e, r.page, r.index, Uo(a, o.id, c, s + 1)),
|
|
14946
15074
|
ds: t,
|
|
14947
|
-
result:
|
|
15075
|
+
result: U(`Copied ${xs(r.node)} on ${r.page.name}.`, a.id)
|
|
14948
15076
|
};
|
|
14949
15077
|
}
|
|
14950
15078
|
case "moveElement": {
|
|
14951
15079
|
let r = bs(e, n.nodeId);
|
|
14952
|
-
if (!r) return i(
|
|
14953
|
-
let a =
|
|
14954
|
-
if (r.node.id === a.id) return i(
|
|
14955
|
-
if (
|
|
14956
|
-
if (n.parentId === void 0 && n.index === void 0 && n.afterNodeId === void 0) return i(
|
|
15080
|
+
if (!r) return i(H(`I couldn't find an element called "${n.nodeId}".`));
|
|
15081
|
+
let a = W(r.page)[r.index];
|
|
15082
|
+
if (r.node.id === a.id) return i(H("That is a whole section. Use moveSection to move it."));
|
|
15083
|
+
if (V(a)) return i(H(ws));
|
|
15084
|
+
if (n.parentId === void 0 && n.index === void 0 && n.afterNodeId === void 0) return i(H("I need to know where to move it to."));
|
|
14957
15085
|
let o = (function e(t) {
|
|
14958
15086
|
if (t.children?.some((e) => e.id === n.nodeId)) return t;
|
|
14959
15087
|
for (let n of t.children ?? []) {
|
|
@@ -14962,34 +15090,34 @@ function Os(e, t, n, r) {
|
|
|
14962
15090
|
}
|
|
14963
15091
|
return null;
|
|
14964
15092
|
})(a), s = n.parentId ?? o.id;
|
|
14965
|
-
if (zo(r.node, s)) return i(
|
|
15093
|
+
if (zo(r.node, s)) return i(H("An element can't be moved inside itself."));
|
|
14966
15094
|
let c = bs(e, s);
|
|
14967
|
-
if (!c) return i(
|
|
14968
|
-
let l =
|
|
14969
|
-
if (
|
|
15095
|
+
if (!c) return i(H(`I couldn't find the group "${s}" to move it into.`));
|
|
15096
|
+
let l = W(c.page)[c.index];
|
|
15097
|
+
if (V(l)) return i(H(ws));
|
|
14970
15098
|
if (![
|
|
14971
15099
|
"section",
|
|
14972
15100
|
"container",
|
|
14973
15101
|
"card"
|
|
14974
|
-
].includes(c.node.type)) return i(
|
|
15102
|
+
].includes(c.node.type)) return i(H(`A ${c.node.type} can't hold other elements.`));
|
|
14975
15103
|
let u = Es(e, r.page, r.index, Ho(a, n.nodeId)), d = bs(u, s), f = Ds(d.node.children ?? [], n);
|
|
14976
|
-
return typeof f == "string" ? i(
|
|
14977
|
-
pages: Es(u, d.page, d.index, Uo(
|
|
15104
|
+
return typeof f == "string" ? i(H(f)) : {
|
|
15105
|
+
pages: Es(u, d.page, d.index, Uo(W(d.page)[d.index], s, r.node, f)),
|
|
14978
15106
|
ds: t,
|
|
14979
|
-
result:
|
|
15107
|
+
result: U(`Moved ${xs(r.node)} on ${r.page.name}.`, a.id)
|
|
14980
15108
|
};
|
|
14981
15109
|
}
|
|
14982
15110
|
case "addCustomSection": {
|
|
14983
15111
|
let r = ns(e, n.pageId);
|
|
14984
|
-
if (!r) return i(
|
|
15112
|
+
if (!r) return i(H(`I couldn't find a page called "${n.pageId}".`));
|
|
14985
15113
|
let a;
|
|
14986
15114
|
try {
|
|
14987
15115
|
a = Lo(n.element, Cs(e), { section: !0 });
|
|
14988
15116
|
} catch (e) {
|
|
14989
|
-
return i(
|
|
15117
|
+
return i(H(e.message));
|
|
14990
15118
|
}
|
|
14991
|
-
let o =
|
|
14992
|
-
if ("error" in s) return i(
|
|
15119
|
+
let o = W(r), s = ss(o, n, o.length);
|
|
15120
|
+
if ("error" in s) return i(H(s.error));
|
|
14993
15121
|
let c = [
|
|
14994
15122
|
...o.slice(0, s.index),
|
|
14995
15123
|
a.node,
|
|
@@ -14998,13 +15126,13 @@ function Os(e, t, n, r) {
|
|
|
14998
15126
|
return {
|
|
14999
15127
|
pages: is(e, r.id, c),
|
|
15000
15128
|
ds: t,
|
|
15001
|
-
result:
|
|
15129
|
+
result: U(`Added a new ${a.node.name.toLowerCase()} to ${r.name}.${Ts(a.dropped)}`, a.node.id)
|
|
15002
15130
|
};
|
|
15003
15131
|
}
|
|
15004
15132
|
case "replaceSection": {
|
|
15005
15133
|
let r = rs(e, n.sectionId);
|
|
15006
15134
|
if (!r) return i(as(n.sectionId));
|
|
15007
|
-
let a =
|
|
15135
|
+
let a = W(r.page)[r.index], o = Cs(e);
|
|
15008
15136
|
o.delete(a.id), Bo(a).forEach((e) => o.delete(e));
|
|
15009
15137
|
let s;
|
|
15010
15138
|
try {
|
|
@@ -15013,36 +15141,36 @@ function Os(e, t, n, r) {
|
|
|
15013
15141
|
id: a.id
|
|
15014
15142
|
}, o, { section: !0 });
|
|
15015
15143
|
} catch (e) {
|
|
15016
|
-
return i(
|
|
15144
|
+
return i(H(e.message));
|
|
15017
15145
|
}
|
|
15018
|
-
let c =
|
|
15146
|
+
let c = V(a) ? " It is hand-designed now, so it's changed element by element instead of through its fields." : "";
|
|
15019
15147
|
return {
|
|
15020
15148
|
pages: Es(e, r.page, r.index, {
|
|
15021
15149
|
...s.node,
|
|
15022
15150
|
id: a.id
|
|
15023
15151
|
}),
|
|
15024
15152
|
ds: t,
|
|
15025
|
-
result:
|
|
15153
|
+
result: U(`Rebuilt the ${os(a).toLowerCase()} section on ${r.page.name}.${c}${Ts(s.dropped)}`, a.id)
|
|
15026
15154
|
};
|
|
15027
15155
|
}
|
|
15028
15156
|
case "removeSection": {
|
|
15029
15157
|
let r = rs(e, n.sectionId);
|
|
15030
15158
|
if (!r) return i(as(n.sectionId));
|
|
15031
|
-
let a =
|
|
15159
|
+
let a = W(r.page)[r.index];
|
|
15032
15160
|
return {
|
|
15033
|
-
pages: is(e, r.page.id,
|
|
15161
|
+
pages: is(e, r.page.id, W(r.page).filter((e, t) => t !== r.index)),
|
|
15034
15162
|
ds: t,
|
|
15035
|
-
result:
|
|
15163
|
+
result: U(`Removed the ${os(a).toLowerCase()} section from ${r.page.name}.`)
|
|
15036
15164
|
};
|
|
15037
15165
|
}
|
|
15038
15166
|
case "moveSection": {
|
|
15039
15167
|
let r = rs(e, n.sectionId);
|
|
15040
15168
|
if (!r) return i(as(n.sectionId));
|
|
15041
|
-
if (n.index === void 0 && n.afterSectionId === void 0) return i(
|
|
15042
|
-
let a =
|
|
15043
|
-
if (n.afterSectionId === n.sectionId) return i(
|
|
15044
|
-
let o =
|
|
15045
|
-
if ("error" in s) return i(
|
|
15169
|
+
if (n.index === void 0 && n.afterSectionId === void 0) return i(H("I need to know where to move it to."));
|
|
15170
|
+
let a = W(r.page)[r.index];
|
|
15171
|
+
if (n.afterSectionId === n.sectionId) return i(H("A section can't be moved after itself."));
|
|
15172
|
+
let o = W(r.page).filter((e, t) => t !== r.index), s = ss(o, n, o.length);
|
|
15173
|
+
if ("error" in s) return i(H(s.error));
|
|
15046
15174
|
let c = [
|
|
15047
15175
|
...o.slice(0, s.index),
|
|
15048
15176
|
a,
|
|
@@ -15051,13 +15179,13 @@ function Os(e, t, n, r) {
|
|
|
15051
15179
|
return {
|
|
15052
15180
|
pages: is(e, r.page.id, c),
|
|
15053
15181
|
ds: t,
|
|
15054
|
-
result:
|
|
15182
|
+
result: U(`Moved the ${os(a).toLowerCase()} section on ${r.page.name}.`, a.id)
|
|
15055
15183
|
};
|
|
15056
15184
|
}
|
|
15057
15185
|
case "duplicateSection": {
|
|
15058
15186
|
let r = rs(e, n.sectionId);
|
|
15059
15187
|
if (!r) return i(as(n.sectionId));
|
|
15060
|
-
let a =
|
|
15188
|
+
let a = W(r.page), o = a[r.index], s = D("section"), c = V(o), l = c ? Zi(c, s) : {
|
|
15061
15189
|
...ls(o),
|
|
15062
15190
|
id: s
|
|
15063
15191
|
};
|
|
@@ -15068,7 +15196,7 @@ function Os(e, t, n, r) {
|
|
|
15068
15196
|
...a.slice(r.index + 1)
|
|
15069
15197
|
]),
|
|
15070
15198
|
ds: t,
|
|
15071
|
-
result:
|
|
15199
|
+
result: U(`Copied the ${os(o).toLowerCase()} section on ${r.page.name}.`, s)
|
|
15072
15200
|
};
|
|
15073
15201
|
}
|
|
15074
15202
|
case "setBrand": {
|
|
@@ -15081,8 +15209,8 @@ function Os(e, t, n, r) {
|
|
|
15081
15209
|
}
|
|
15082
15210
|
case "addPage": {
|
|
15083
15211
|
let a = n.name.trim();
|
|
15084
|
-
if (!a) return i(
|
|
15085
|
-
if (e.some((e) => e.name.trim().toLowerCase() === a.toLowerCase())) return i(
|
|
15212
|
+
if (!a) return i(H("The new page needs a name."));
|
|
15213
|
+
if (e.some((e) => e.name.trim().toLowerCase() === a.toLowerCase())) return i(H(`There's already a page called "${a}".`));
|
|
15086
15214
|
let o = [], s = "";
|
|
15087
15215
|
if (n.templateId) {
|
|
15088
15216
|
let e = null;
|
|
@@ -15108,20 +15236,20 @@ function Os(e, t, n, r) {
|
|
|
15108
15236
|
return {
|
|
15109
15237
|
pages: [...e, f],
|
|
15110
15238
|
ds: t,
|
|
15111
|
-
result:
|
|
15239
|
+
result: U(`Added a new page called ${a}.${s}`)
|
|
15112
15240
|
};
|
|
15113
15241
|
}
|
|
15114
15242
|
case "renamePage": {
|
|
15115
15243
|
let r = ns(e, n.pageId);
|
|
15116
|
-
if (!r) return i(
|
|
15244
|
+
if (!r) return i(H(`I couldn't find a page called "${n.pageId}".`));
|
|
15117
15245
|
let a = n.name.trim();
|
|
15118
|
-
return e.some((e) => e.id !== r.id && e.name.trim().toLowerCase() === a.toLowerCase()) ? i(
|
|
15246
|
+
return e.some((e) => e.id !== r.id && e.name.trim().toLowerCase() === a.toLowerCase()) ? i(H(`There's already a page called "${a}".`)) : {
|
|
15119
15247
|
pages: e.map((e) => e.id === r.id ? {
|
|
15120
15248
|
...e,
|
|
15121
15249
|
name: a
|
|
15122
15250
|
} : e),
|
|
15123
15251
|
ds: t,
|
|
15124
|
-
result:
|
|
15252
|
+
result: U(`Renamed ${r.name} to ${a}.`)
|
|
15125
15253
|
};
|
|
15126
15254
|
}
|
|
15127
15255
|
}
|
|
@@ -15132,14 +15260,14 @@ function ks(e, t, n, r = {}) {
|
|
|
15132
15260
|
let t = Zo.safeParse(e);
|
|
15133
15261
|
if (!t.success) {
|
|
15134
15262
|
let t = ds(e) && typeof e.op == "string" ? e.op : "";
|
|
15135
|
-
o.push(
|
|
15263
|
+
o.push(H(t ? `I didn't understand one of the "${t}" changes, so I skipped it.` : "I didn't understand one of the changes, so I skipped it."));
|
|
15136
15264
|
continue;
|
|
15137
15265
|
}
|
|
15138
15266
|
try {
|
|
15139
15267
|
let e = Os(i, a, t.data, r);
|
|
15140
15268
|
i = e.pages, a = e.ds, o.push(e.result);
|
|
15141
15269
|
} catch {
|
|
15142
|
-
o.push(
|
|
15270
|
+
o.push(H("Something went wrong with one of the changes, so I skipped it."));
|
|
15143
15271
|
}
|
|
15144
15272
|
}
|
|
15145
15273
|
return {
|
|
@@ -15281,14 +15409,14 @@ function zs(e, t) {
|
|
|
15281
15409
|
}
|
|
15282
15410
|
return null;
|
|
15283
15411
|
}, i = (e) => {
|
|
15284
|
-
let t = r(e), n = t &&
|
|
15285
|
-
return n && Pi(n.kind) ? `the ${
|
|
15412
|
+
let t = r(e), n = t && V(t.s);
|
|
15413
|
+
return n && Pi(n.kind) ? `the ${B(n.kind).label.toLowerCase()} section` : "a section";
|
|
15286
15414
|
}, a = (e) => {
|
|
15287
15415
|
let t = r(e);
|
|
15288
15416
|
return t ? ` on ${t.p.name}` : "";
|
|
15289
15417
|
};
|
|
15290
15418
|
switch (e.op) {
|
|
15291
|
-
case "addSection": return `Add a ${Pi(e.kind) ?
|
|
15419
|
+
case "addSection": return `Add a ${Pi(e.kind) ? B(e.kind).label.toLowerCase() : e.kind} section to ${n(e.pageId)?.name ?? "a page"}`;
|
|
15292
15420
|
case "updateSection": return `Change ${[
|
|
15293
15421
|
e.content && "the wording",
|
|
15294
15422
|
e.variant && "the layout",
|
|
@@ -18570,13 +18698,13 @@ function Nl(e, t) {
|
|
|
18570
18698
|
}));
|
|
18571
18699
|
}
|
|
18572
18700
|
function Pl(e) {
|
|
18573
|
-
let t = Dl(e), n = kt(t.links, 20).filter((e) => e && e.network in
|
|
18701
|
+
let t = Dl(e), n = kt(t.links, 20).filter((e) => e && e.network in F), r = Ot(t.size, 20, 96, 40), i = t.shape === "square" || t.shape === "plain" ? t.shape : "circle", a = t.colorMode === "mono";
|
|
18574
18702
|
return n.length ? {
|
|
18575
18703
|
...A("nav", {
|
|
18576
18704
|
class: `plx-el plx-social plx-social--${i}`,
|
|
18577
18705
|
"aria-label": "Social links"
|
|
18578
18706
|
}, n.map((e) => {
|
|
18579
|
-
let t =
|
|
18707
|
+
let t = F[e.network], n = M(e.url), r = /^https?:/i.test(n);
|
|
18580
18708
|
return {
|
|
18581
18709
|
...A("a", {
|
|
18582
18710
|
href: n,
|
|
@@ -19197,7 +19325,7 @@ function Su(e, t) {
|
|
|
19197
19325
|
let [r, i, a] = bu(n);
|
|
19198
19326
|
return e === "bg" ? a >= .55 ? xu(r, Math.min(i, .35) * .6, .045 + (a - .55) * .2) : null : e === "text" || e === "border" ? a >= .5 ? null : i > .25 ? xu(r, Math.min(i, .7), Math.max(a, .64)) : e === "border" ? xu(r, i, Math.max(a, .55)) : xu(r, i * .8, Math.min(.93, .93 - a * .5)) : e === "btnbg" ? a < .2 && i < .25 ? xu(r, i * .3, .92) : a < .34 ? xu(r, i, .44) : null : e === "btntext" ? a > .8 ? xu(r, Math.min(i, .3), .1) : null : a > .6 ? xu(r, i * .5, .2 + (a - .6) * .15) : null;
|
|
19199
19327
|
}
|
|
19200
|
-
var Cu = "Arial, Helvetica, sans-serif",
|
|
19328
|
+
var Cu = "Arial, Helvetica, sans-serif", G = (e) => `${Math.round(e * 100) / 100}px`;
|
|
19201
19329
|
function wu(e) {
|
|
19202
19330
|
if (typeof e == "number" && Number.isFinite(e)) return e;
|
|
19203
19331
|
if (typeof e != "string") return;
|
|
@@ -19291,10 +19419,10 @@ function Du(e, t = {}) {
|
|
|
19291
19419
|
};
|
|
19292
19420
|
}, ee = (e) => vt(e).replace(/\r?\n/g, "<br>"), y = (e) => e.replace(/\s+/g, " ").trim(), te = (e) => Eu(e.padding, e.paddingTop, e.paddingRight, e.paddingBottom, e.paddingLeft), S = (e) => e === "center" ? "center" : e === "right" || e === "flex-end" ? "right" : e === "left" || e === "flex-start" ? "left" : void 0, C = (e) => {
|
|
19293
19421
|
let t = f(e.borderWidth), n = u(e.borderColor), r = e.borderStyle && e.borderStyle !== "none" ? e.borderStyle : void 0;
|
|
19294
|
-
return t && n && r ? `border:${
|
|
19422
|
+
return t && n && r ? `border:${G(t)} ${r} ${n};` : "";
|
|
19295
19423
|
}, w = (e) => {
|
|
19296
19424
|
let t = f(e.borderRadius);
|
|
19297
|
-
return t ? `border-radius:${
|
|
19425
|
+
return t ? `border-radius:${G(Math.min(t, 999))};` : "";
|
|
19298
19426
|
}, ne = (e) => f(e.gap) ?? 0, T = (e) => {
|
|
19299
19427
|
if (typeof e.backgroundGradient != "string") return "";
|
|
19300
19428
|
let t = /^\s*linear-gradient\(\s*((?:\d{1,3}deg)|(?:to (?:top|bottom|left|right)(?: (?:left|right|top|bottom))?))\s*,(.+)\)\s*$/i.exec(e.backgroundGradient);
|
|
@@ -19317,10 +19445,10 @@ function Du(e, t = {}) {
|
|
|
19317
19445
|
case "badge": {
|
|
19318
19446
|
let t = _(e, r), n = u(r.textColor) ?? u("var(--color-text-primary)") ?? "#111827", i = e.type === "heading" ? `h${Math.min(6, Math.max(1, Math.round(Number(e.props?.level) || 2)))}` : "p", a = typeof e.content == "string" ? e.content : "";
|
|
19319
19447
|
o.push(y(a));
|
|
19320
|
-
let s = S(r.textAlign) ?? "left", d = f(r.letterSpacing), p = `margin:0;padding:0;font-family:${t.family};font-size:${
|
|
19448
|
+
let s = S(r.textAlign) ?? "left", d = f(r.letterSpacing), p = `margin:0;padding:0;font-family:${t.family};font-size:${G(t.size)};line-height:${G(t.lh)};font-weight:${t.weight};color:${n};text-align:${s};${r.isItalic ? "font-style:italic;" : ""}${r.isUnderline ? "text-decoration:underline;" : ""}${r.textTransform && r.textTransform !== "none" ? `text-transform:${r.textTransform};` : ""}${d ? `letter-spacing:${G(d)};` : ""}`, m = u(r.backgroundColor), h = `<${i}${l(c("text", n))} style="${j(p)}">${ee(a)}</${i}>`;
|
|
19321
19449
|
if (e.type === "badge" || m) {
|
|
19322
19450
|
let [e, t, n, i] = te(r);
|
|
19323
|
-
return `<table role="presentation" cellpadding="0" cellspacing="0" border="0"${s === "left" ? "" : ` align="${s}"`}><tr><td${m ? ` bgcolor="${m}"` : ""}${l(c("bg", m))} style="${j(`${m ? `background-color:${m};` : ""}padding:${
|
|
19451
|
+
return `<table role="presentation" cellpadding="0" cellspacing="0" border="0"${s === "left" ? "" : ` align="${s}"`}><tr><td${m ? ` bgcolor="${m}"` : ""}${l(c("bg", m))} style="${j(`${m ? `background-color:${m};` : ""}padding:${G(e)} ${G(t)} ${G(n)} ${G(i)};${w(r)}${C(r)}`)}">${h}</td></tr></table>`;
|
|
19324
19452
|
}
|
|
19325
19453
|
return h;
|
|
19326
19454
|
}
|
|
@@ -19333,21 +19461,21 @@ function Du(e, t = {}) {
|
|
|
19333
19461
|
p || 14,
|
|
19334
19462
|
m || 28
|
|
19335
19463
|
], b = S(r.textAlign) ?? S(r.alignSelf) ?? "left", x = r.backgroundColor === "transparent", ne = w(r) || "border-radius:8px;", T = C(r), E = `${x ? "" : `background-color:${a};`}${ne}${T}`, re = x ? null : Su("btnbg", a), ie = re ? yu(re) : null, ae = !!ie && bu(ie)[2] > .8 && !!Su("btntext", s), oe = r.widthSizing === "fill" || r.width === "100%" || r.isFullWidth;
|
|
19336
|
-
return `<table role="presentation" cellpadding="0" cellspacing="0" border="0"${oe ? " width=\"100%\"" : ""} align="${b}"><tr><td${x ? "" : ` bgcolor="${a}"`}${l([x ? "" : c("btnbg", a), T && u(r.borderColor) ? c("border", u(r.borderColor)) : ""].filter(Boolean).join(" "))} align="center" style="${j(E)}"><a href="${j(i)}" target="_blank"${l(x ? c("text", u(r.textColor) ?? a) : ae ? c("btntext", s) : "")} style="${j(`display:${oe ? "block" : "inline-block"};padding:${
|
|
19464
|
+
return `<table role="presentation" cellpadding="0" cellspacing="0" border="0"${oe ? " width=\"100%\"" : ""} align="${b}"><tr><td${x ? "" : ` bgcolor="${a}"`}${l([x ? "" : c("btnbg", a), T && u(r.borderColor) ? c("border", u(r.borderColor)) : ""].filter(Boolean).join(" "))} align="center" style="${j(E)}"><a href="${j(i)}" target="_blank"${l(x ? c("text", u(r.textColor) ?? a) : ae ? c("btntext", s) : "")} style="${j(`display:${oe ? "block" : "inline-block"};padding:${G(h)} ${G(g)} ${G(v)} ${G(ee)};font-family:${t.family};font-size:${G(t.size)};line-height:${G(Math.round(t.size * 1.2))};font-weight:${t.weight === "400" ? "600" : t.weight};color:${x ? u(r.textColor) ?? a : s};text-decoration:none;white-space:nowrap;${ne}`)}">${vt(n)}</a></td></tr></table>`;
|
|
19337
19465
|
}
|
|
19338
19466
|
case "image": {
|
|
19339
19467
|
let i = xt(e.props?.src);
|
|
19340
19468
|
if (!i) return "";
|
|
19341
|
-
let a = typeof e.props?.alt == "string" ? e.props.alt : "", o = f(r.customWidth ?? r.width), s = Tu(r.customWidth ?? r.width), c = Math.round(Math.min(n, o ?? (s ? n * s / 100 : n))), l = S(r.alignSelf) ?? S(r.textAlign), u = `display:block;border:0;outline:none;text-decoration:none;width:${
|
|
19469
|
+
let a = typeof e.props?.alt == "string" ? e.props.alt : "", o = f(r.customWidth ?? r.width), s = Tu(r.customWidth ?? r.width), c = Math.round(Math.min(n, o ?? (s ? n * s / 100 : n))), l = S(r.alignSelf) ?? S(r.textAlign), u = `display:block;border:0;outline:none;text-decoration:none;width:${G(c)};max-width:100%;height:auto;${w(r)}`, d = t.dark === "off" ? "" : xt(e.props?.srcDark), p = d ? `<img class="plx-light" src="${j(i)}" alt="${j(a)}" width="${c}" style="${j(u)}"><img class="plx-dark" src="${j(d)}" alt="${j(a)}" width="${c}" style="${j(`${u}display:none;max-height:0;overflow:hidden;`)}">` : `<img src="${j(i)}" alt="${j(a)}" width="${c}" style="${j(u)}">`;
|
|
19342
19470
|
return l && l !== "left" ? `<table role="presentation" cellpadding="0" cellspacing="0" border="0" align="${l}"><tr><td>${p}</td></tr></table>` : p;
|
|
19343
19471
|
}
|
|
19344
19472
|
case "divider": {
|
|
19345
19473
|
let e = u(r.borderColor) ?? u("var(--color-border-default)") ?? "#e5e7eb", t = f(r.borderWidth?.toString().split(/\s+/).find((e) => wu(e))) ?? 1;
|
|
19346
|
-
return `<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td height="${t}"${l(c("line", e))} style="font-size:1px;line-height:1px;border-top:${
|
|
19474
|
+
return `<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td height="${t}"${l(c("line", e))} style="font-size:1px;line-height:1px;border-top:${G(t)} solid ${e};"> </td></tr></table>`;
|
|
19347
19475
|
}
|
|
19348
19476
|
case "spacer": {
|
|
19349
19477
|
let e = Math.min(400, Math.max(1, f(r.height) ?? f(r.minHeight) ?? 24));
|
|
19350
|
-
return `<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td height="${e}" style="height:${
|
|
19478
|
+
return `<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td height="${e}" style="height:${G(e)};font-size:1px;line-height:${G(e)};"> </td></tr></table>`;
|
|
19351
19479
|
}
|
|
19352
19480
|
default: return re(e, n);
|
|
19353
19481
|
}
|
|
@@ -19360,17 +19488,17 @@ function Du(e, t = {}) {
|
|
|
19360
19488
|
return n === void 0 ? r !== void 0 && r < 99 ? g * r / 100 : void 0 : n;
|
|
19361
19489
|
}), t = e.reduce((e, t) => e + (t ?? 0), 0), n = e.filter((e) => e === void 0).length, c = n ? Math.max(40, (g - t - _ * (i.length - 1)) / n) : 0, l = i.map((t, n) => {
|
|
19362
19490
|
let a = Math.floor(e[n] ?? c), o = n === i.length - 1, s = E(t, a);
|
|
19363
|
-
return `<td${r.stackOnMobile === !1 ? "" : " class=\"plx-col\""} width="${a}" valign="${y}" style="${j(`width:${
|
|
19491
|
+
return `<td${r.stackOnMobile === !1 ? "" : " class=\"plx-col\""} width="${a}" valign="${y}" style="${j(`width:${G(a)};${o ? "" : `padding-right:${G(_)};`}vertical-align:${y};`)}">${s}</td>`;
|
|
19364
19492
|
});
|
|
19365
|
-
b = `<tr><td style="${j(`padding:${
|
|
19493
|
+
b = `<tr><td style="${j(`padding:${G(a)} ${G(o)} ${G(s)} ${G(d)};`)}"><table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0"><tr>${l.join("")}</tr></table></td></tr>`;
|
|
19366
19494
|
} else b = i.map((e, t) => {
|
|
19367
19495
|
let n = e.styles ?? {}, r = S(n.alignSelf) ?? ee ?? (e.type === "button" || e.type, void 0), c = r === "center" || n.marginLeft === "auto" && n.marginRight === "auto" || n.margin === "0 auto" ? " align=\"center\"" : r === "right" || n.marginLeft === "auto" ? " align=\"right\"" : "", l = E(e, g);
|
|
19368
19496
|
if (!l) return "";
|
|
19369
19497
|
let u = t === 0 ? a : _, [f, , p] = Eu(n.margin, n.marginTop, n.marginRight, n.marginBottom, n.marginLeft);
|
|
19370
|
-
return `<tr><td${c} style="${j(`padding:${
|
|
19498
|
+
return `<tr><td${c} style="${j(`padding:${G(u + f)} ${G(o)} ${G(t === i.length - 1 ? s + p : p)} ${G(d)};`)}">${l}</td></tr>`;
|
|
19371
19499
|
}).join("");
|
|
19372
|
-
else a + s > 0 && (b = `<tr><td height="${a + s}" style="font-size:1px;line-height:${
|
|
19373
|
-
let x = `${p ? `background-color:${p};` : ""}${T(r)}${w(r)}${C(r)}`, re = n ? " width=\"100%\"" : ` width="${Math.round(h)}"`, ie = n ? "" : `max-width:${
|
|
19500
|
+
else a + s > 0 && (b = `<tr><td height="${a + s}" style="font-size:1px;line-height:${G(a + s)};"> </td></tr>`);
|
|
19501
|
+
let x = `${p ? `background-color:${p};` : ""}${T(r)}${w(r)}${C(r)}`, re = n ? " width=\"100%\"" : ` width="${Math.round(h)}"`, ie = n ? "" : `max-width:${G(h)};width:100%;`;
|
|
19374
19502
|
return `<table role="presentation"${re}${p ? ` bgcolor="${p}"` : ""}${l(c("bg", p))} cellpadding="0" cellspacing="0" border="0" style="${j(`${ie}${x}`)}">${b}</table>`;
|
|
19375
19503
|
}
|
|
19376
19504
|
let ie = n.rootNode, oe = u((ie.styles ?? {}).backgroundColor) ?? u("var(--color-bg-canvas)") ?? "#ffffff", se = (ie.children ?? []).filter((e) => hu(e.type)).map((e) => {
|
|
@@ -19466,7 +19594,7 @@ var ju = 1400, Mu = (e) => {
|
|
|
19466
19594
|
sm: "0 1px 3px rgba(15,23,42,0.14)",
|
|
19467
19595
|
md: "0 6px 16px rgba(15,23,42,0.18)",
|
|
19468
19596
|
lg: "0 16px 40px rgba(15,23,42,0.24)"
|
|
19469
|
-
},
|
|
19597
|
+
}, K = (e) => typeof e == "number" && Number.isFinite(e) ? e : void 0, q = (e) => typeof e == "string" && e ? e : void 0, Pu = (e) => `${Math.round(e * 100) / 100}px`, Fu = [
|
|
19470
19598
|
{
|
|
19471
19599
|
name: "desktop",
|
|
19472
19600
|
k: he.desktop / ju,
|
|
@@ -19489,13 +19617,13 @@ function Iu(e, t, n) {
|
|
|
19489
19617
|
}
|
|
19490
19618
|
function Lu(e, t) {
|
|
19491
19619
|
let { nodes: n } = e, r = /* @__PURE__ */ new Set(), i = (e) => {
|
|
19492
|
-
let t = {}, n =
|
|
19620
|
+
let t = {}, n = K(e.borderWidth);
|
|
19493
19621
|
n && n > 0 && (t.borderWidth = Pu(n), t.borderStyle = [
|
|
19494
19622
|
"solid",
|
|
19495
19623
|
"dashed",
|
|
19496
19624
|
"dotted"
|
|
19497
|
-
].includes(String(e.borderStyle)) ? e.borderStyle : "solid", t.borderColor =
|
|
19498
|
-
let r =
|
|
19625
|
+
].includes(String(e.borderStyle)) ? e.borderStyle : "solid", t.borderColor = q(e.borderColor) ?? "#0f172a");
|
|
19626
|
+
let r = K(e.borderRadius);
|
|
19499
19627
|
r !== void 0 && (t.borderRadius = Pu(r));
|
|
19500
19628
|
let i = Nu[String(e.boxShadowPreset)];
|
|
19501
19629
|
return i && (t.boxShadow = i), t;
|
|
@@ -19512,11 +19640,11 @@ function Lu(e, t) {
|
|
|
19512
19640
|
}
|
|
19513
19641
|
};
|
|
19514
19642
|
}, o = (e) => ({
|
|
19515
|
-
x:
|
|
19516
|
-
y:
|
|
19517
|
-
width:
|
|
19518
|
-
height:
|
|
19519
|
-
fontSize:
|
|
19643
|
+
x: K(e.x),
|
|
19644
|
+
y: K(e.y),
|
|
19645
|
+
width: K(e.width),
|
|
19646
|
+
height: K(e.height),
|
|
19647
|
+
fontSize: K(e.fontSize)
|
|
19520
19648
|
}), s = (e) => {
|
|
19521
19649
|
let t = e.id;
|
|
19522
19650
|
for (; r.has(t);) t = `${t}-x`;
|
|
@@ -19555,7 +19683,7 @@ function Lu(e, t) {
|
|
|
19555
19683
|
return {
|
|
19556
19684
|
id: s(e),
|
|
19557
19685
|
type: t,
|
|
19558
|
-
name:
|
|
19686
|
+
name: q(e.props.name) ?? e.type,
|
|
19559
19687
|
...c
|
|
19560
19688
|
};
|
|
19561
19689
|
};
|
|
@@ -19564,7 +19692,7 @@ function Lu(e, t) {
|
|
|
19564
19692
|
let t = /^h[1-6]$/.test(String(r.htmlTag)) ? Number(String(r.htmlTag)[1]) : null;
|
|
19565
19693
|
return {
|
|
19566
19694
|
...u(t ? "heading" : "paragraph", {
|
|
19567
|
-
textColor:
|
|
19695
|
+
textColor: q(r.color),
|
|
19568
19696
|
textAlign: [
|
|
19569
19697
|
"left",
|
|
19570
19698
|
"center",
|
|
@@ -19586,8 +19714,8 @@ function Lu(e, t) {
|
|
|
19586
19714
|
};
|
|
19587
19715
|
case "Button": return {
|
|
19588
19716
|
...u("button", {
|
|
19589
|
-
backgroundColor:
|
|
19590
|
-
textColor:
|
|
19717
|
+
backgroundColor: q(r.backgroundColor),
|
|
19718
|
+
textColor: q(r.color),
|
|
19591
19719
|
fontWeight: String(r.fontWeight ?? 600),
|
|
19592
19720
|
display: "flex",
|
|
19593
19721
|
alignItems: "center",
|
|
@@ -19601,7 +19729,7 @@ function Lu(e, t) {
|
|
|
19601
19729
|
display: "flex",
|
|
19602
19730
|
flexDirection: "row",
|
|
19603
19731
|
layoutMode: "flow",
|
|
19604
|
-
backgroundColor:
|
|
19732
|
+
backgroundColor: q(r.backgroundColor),
|
|
19605
19733
|
...c ? {
|
|
19606
19734
|
position: "absolute",
|
|
19607
19735
|
x: 0,
|
|
@@ -19615,7 +19743,7 @@ function Lu(e, t) {
|
|
|
19615
19743
|
width: void 0
|
|
19616
19744
|
} : o.geo, f = a({
|
|
19617
19745
|
...d,
|
|
19618
|
-
gap:
|
|
19746
|
+
gap: K(r.gap)
|
|
19619
19747
|
}, c ? !0 : o.free, {
|
|
19620
19748
|
...o.base,
|
|
19621
19749
|
...i(r),
|
|
@@ -19633,7 +19761,7 @@ function Lu(e, t) {
|
|
|
19633
19761
|
...u("video"),
|
|
19634
19762
|
props: {
|
|
19635
19763
|
url: String(e.props.url ?? ""),
|
|
19636
|
-
poster:
|
|
19764
|
+
poster: q(e.props.coverImage),
|
|
19637
19765
|
ratio: "16:9"
|
|
19638
19766
|
}
|
|
19639
19767
|
} : {
|
|
@@ -19645,7 +19773,7 @@ function Lu(e, t) {
|
|
|
19645
19773
|
};
|
|
19646
19774
|
case "Menu": return {
|
|
19647
19775
|
...u("menu", {
|
|
19648
|
-
textColor:
|
|
19776
|
+
textColor: q(r.color),
|
|
19649
19777
|
fontSize: void 0
|
|
19650
19778
|
}),
|
|
19651
19779
|
props: {
|
|
@@ -19662,7 +19790,7 @@ function Lu(e, t) {
|
|
|
19662
19790
|
}, u = (e, t) => {
|
|
19663
19791
|
let n = t.filter((e) => e.type === "Input");
|
|
19664
19792
|
if (!n.length) return null;
|
|
19665
|
-
let r = n.slice().sort((e, t) => (
|
|
19793
|
+
let r = n.slice().sort((e, t) => (K(e.styles.y) ?? 0) - (K(t.styles.y) ?? 0) || (K(e.styles.x) ?? 0) - (K(t.styles.x) ?? 0)), i = r.map((e) => o(e.styles)), c = Math.max(...i.map((e) => (e.y ?? 0) + (e.height ?? 0))), l = t.find((e) => e.type === "Button" && (K(e.styles.y) ?? 0) >= c - 6), u = [...i, ...l ? [o(l.styles)] : []], d = Math.min(...u.map((e) => e.x ?? 0)), f = Math.min(...u.map((e) => e.y ?? 0)), p = Math.max(...u.map((e) => (e.x ?? 0) + (e.width ?? 0))) - d, m = r[0], h = r.map((e, t) => ({
|
|
19666
19794
|
id: `${String(e.props.label ?? "field").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "") || "field"}-${t + 1}`,
|
|
19667
19795
|
label: String(e.props.label ?? "Field"),
|
|
19668
19796
|
type: [
|
|
@@ -19671,7 +19799,7 @@ function Lu(e, t) {
|
|
|
19671
19799
|
"tel",
|
|
19672
19800
|
"textarea"
|
|
19673
19801
|
].includes(String(e.props.fieldType)) ? e.props.fieldType : "text",
|
|
19674
|
-
placeholder:
|
|
19802
|
+
placeholder: q(e.props.placeholder),
|
|
19675
19803
|
required: !!e.props.required
|
|
19676
19804
|
})), g = a({
|
|
19677
19805
|
x: d,
|
|
@@ -19681,7 +19809,7 @@ function Lu(e, t) {
|
|
|
19681
19809
|
position: "absolute",
|
|
19682
19810
|
horizontalConstraint: "left",
|
|
19683
19811
|
verticalConstraint: "top",
|
|
19684
|
-
textColor:
|
|
19812
|
+
textColor: q(m.styles.color),
|
|
19685
19813
|
padding: "0px"
|
|
19686
19814
|
});
|
|
19687
19815
|
return {
|
|
@@ -19701,18 +19829,18 @@ function Lu(e, t) {
|
|
|
19701
19829
|
}, d = e.pageOrder.map((e) => n[e]).filter((e) => !!e && e.type === "Section").map((e) => {
|
|
19702
19830
|
let t = e.styles, r = e.children.map((e) => n[e]).filter(Boolean), i = u(e, r), o = r.filter((e) => !i?.consumed.has(e.id)).map((t) => l(t, e)).filter((e) => !!e);
|
|
19703
19831
|
i && o.push(i.node);
|
|
19704
|
-
let c =
|
|
19832
|
+
let c = K(t.height) ?? 400, d = a({ minHeight: c }, !1, {
|
|
19705
19833
|
layoutMode: "free",
|
|
19706
|
-
backgroundColor:
|
|
19834
|
+
backgroundColor: q(t.backgroundColor),
|
|
19707
19835
|
...t.pinned === "true" ? { pinned: !0 } : {},
|
|
19708
|
-
backgroundImage:
|
|
19836
|
+
backgroundImage: q(t.backgroundImage),
|
|
19709
19837
|
backgroundSize: t.backgroundImage ? "cover" : void 0,
|
|
19710
19838
|
backgroundPosition: t.backgroundImage ? "center" : void 0
|
|
19711
19839
|
});
|
|
19712
19840
|
return {
|
|
19713
19841
|
id: s(e),
|
|
19714
19842
|
type: "section",
|
|
19715
|
-
name:
|
|
19843
|
+
name: q(e.props.name) ?? "Section",
|
|
19716
19844
|
...d,
|
|
19717
19845
|
children: o
|
|
19718
19846
|
};
|
|
@@ -20088,7 +20216,7 @@ var sd = /* @__PURE__ */ new Set(/* @__PURE__ */ "html.head.body.div.span.sectio
|
|
|
20088
20216
|
"class",
|
|
20089
20217
|
"title",
|
|
20090
20218
|
"hidden"
|
|
20091
|
-
]),
|
|
20219
|
+
]), J = /^\d{1,5}(?:\.\d+)?(?:px|%|em|rem)?$/, pd = /^[\w:.[\]-]{1,200}$/, md = /* @__PURE__ */ new Set([
|
|
20092
20220
|
"text",
|
|
20093
20221
|
"email",
|
|
20094
20222
|
"tel",
|
|
@@ -20118,8 +20246,8 @@ var sd = /* @__PURE__ */ new Set(/* @__PURE__ */ "html.head.body.div.span.sectio
|
|
|
20118
20246
|
alt: "plain",
|
|
20119
20247
|
loading: /^(lazy|eager)$/,
|
|
20120
20248
|
decoding: /^(async|sync|auto)$/,
|
|
20121
|
-
width:
|
|
20122
|
-
height:
|
|
20249
|
+
width: J,
|
|
20250
|
+
height: J
|
|
20123
20251
|
},
|
|
20124
20252
|
video: {
|
|
20125
20253
|
src: "media",
|
|
@@ -20130,8 +20258,8 @@ var sd = /* @__PURE__ */ new Set(/* @__PURE__ */ "html.head.body.div.span.sectio
|
|
|
20130
20258
|
loop: "bool",
|
|
20131
20259
|
autoplay: "bool",
|
|
20132
20260
|
muted: "bool",
|
|
20133
|
-
width:
|
|
20134
|
-
height:
|
|
20261
|
+
width: J,
|
|
20262
|
+
height: J
|
|
20135
20263
|
},
|
|
20136
20264
|
button: {
|
|
20137
20265
|
type: /^(submit|button|reset)$/,
|
|
@@ -20199,8 +20327,8 @@ var sd = /* @__PURE__ */ new Set(/* @__PURE__ */ "html.head.body.div.span.sectio
|
|
|
20199
20327
|
name: pd
|
|
20200
20328
|
},
|
|
20201
20329
|
table: {
|
|
20202
|
-
width:
|
|
20203
|
-
height:
|
|
20330
|
+
width: J,
|
|
20331
|
+
height: J,
|
|
20204
20332
|
align: /^(left|center|right)$/,
|
|
20205
20333
|
cellpadding: /^\d{1,3}$/,
|
|
20206
20334
|
cellspacing: /^\d{1,3}$/,
|
|
@@ -20211,8 +20339,8 @@ var sd = /* @__PURE__ */ new Set(/* @__PURE__ */ "html.head.body.div.span.sectio
|
|
|
20211
20339
|
scope: /^(col|row|colgroup|rowgroup)$/,
|
|
20212
20340
|
colspan: /^\d{1,3}$/,
|
|
20213
20341
|
rowspan: /^\d{1,3}$/,
|
|
20214
|
-
width:
|
|
20215
|
-
height:
|
|
20342
|
+
width: J,
|
|
20343
|
+
height: J,
|
|
20216
20344
|
align: /^(left|center|right)$/,
|
|
20217
20345
|
valign: /^(top|middle|bottom|baseline)$/,
|
|
20218
20346
|
bgcolor: hd
|
|
@@ -20220,8 +20348,8 @@ var sd = /* @__PURE__ */ new Set(/* @__PURE__ */ "html.head.body.div.span.sectio
|
|
|
20220
20348
|
td: {
|
|
20221
20349
|
colspan: /^\d{1,3}$/,
|
|
20222
20350
|
rowspan: /^\d{1,3}$/,
|
|
20223
|
-
width:
|
|
20224
|
-
height:
|
|
20351
|
+
width: J,
|
|
20352
|
+
height: J,
|
|
20225
20353
|
align: /^(left|center|right)$/,
|
|
20226
20354
|
valign: /^(top|middle|bottom|baseline)$/,
|
|
20227
20355
|
bgcolor: hd
|
|
@@ -20288,7 +20416,7 @@ function Dd(e, t) {
|
|
|
20288
20416
|
let e = Cd(n, n.name === "loading" ? /^(lazy|eager)$/ : n.name === "referrerpolicy" ? /^[a-z-]{1,40}$/ : n.name === "allowfullscreen" ? "bool" : "plain");
|
|
20289
20417
|
e !== null && (t += ` ${n.name}${e}`);
|
|
20290
20418
|
} else if (n.name === "allow" && xd.test(e)) t += ` allow${Cd(n, "plain")}`;
|
|
20291
|
-
else if (n.name === "width" || n.name === "height")
|
|
20419
|
+
else if (n.name === "width" || n.name === "height") J.test(e) && (t += ` ${n.name}="${Bu(e)}"`);
|
|
20292
20420
|
else if (n.name === "class") t += ` class${Cd(n, "plain")}`;
|
|
20293
20421
|
else if (n.name === "style") {
|
|
20294
20422
|
let e = wd(n);
|
|
@@ -20363,7 +20491,7 @@ function Od(e, t = {}) {
|
|
|
20363
20491
|
}
|
|
20364
20492
|
//#endregion
|
|
20365
20493
|
//#region src/v2/compile/schema.ts
|
|
20366
|
-
var kd = 5e3, Ad = 40, jd = /* @__PURE__ */ "page.section.container.columns.column.heading.paragraph.button.image.badge.divider.spacer.card.icon.carousel.video.social.menu.html.table.timer.form.accordion.blogTitle.blogContent.blogFeaturedImage.blogDate.blogAuthor.blogCategories.blogComments.blogPostList.shopGrid.product.booking.cart.checkout.orderConfirmation.orderTracking.signupForm".split("."), Md = [
|
|
20494
|
+
var kd = 5e3, Ad = 40, jd = /* @__PURE__ */ "page.section.container.columns.column.heading.paragraph.button.image.badge.divider.spacer.card.icon.carousel.video.social.menu.html.table.timer.form.accordion.blogTitle.blogContent.blogFeaturedImage.blogDate.blogAuthor.blogCategories.blogComments.blogPostList.shopGrid.product.booking.cart.checkout.orderConfirmation.orderTracking.signupForm.contentList".split("."), Md = [
|
|
20367
20495
|
"blogTitle",
|
|
20368
20496
|
"blogContent",
|
|
20369
20497
|
"blogFeaturedImage",
|
|
@@ -20379,7 +20507,8 @@ var kd = 5e3, Ad = 40, jd = /* @__PURE__ */ "page.section.container.columns.colu
|
|
|
20379
20507
|
"checkout",
|
|
20380
20508
|
"orderConfirmation",
|
|
20381
20509
|
"orderTracking",
|
|
20382
|
-
"signupForm"
|
|
20510
|
+
"signupForm",
|
|
20511
|
+
"contentList"
|
|
20383
20512
|
], Nd = r([t().int().min(1).max(96), n().max(4)]), Pd = a({
|
|
20384
20513
|
prefix: n().max(80),
|
|
20385
20514
|
productId: n().max(100),
|
|
@@ -20392,7 +20521,9 @@ var kd = 5e3, Ad = 40, jd = /* @__PURE__ */ "page.section.container.columns.colu
|
|
|
20392
20521
|
itemsPerRow: Nd,
|
|
20393
20522
|
itemsPerPage: Nd,
|
|
20394
20523
|
paginated: i(),
|
|
20395
|
-
templateId: n().max(100)
|
|
20524
|
+
templateId: n().max(100),
|
|
20525
|
+
contentType: n().max(100),
|
|
20526
|
+
layout: n().max(40)
|
|
20396
20527
|
}).partial().passthrough(), Fd = r([
|
|
20397
20528
|
n().max(2e3),
|
|
20398
20529
|
t(),
|
|
@@ -20514,7 +20645,7 @@ var Vd = {
|
|
|
20514
20645
|
checkout_flow: "checkout",
|
|
20515
20646
|
order_confirmation: "order confirmation",
|
|
20516
20647
|
order_tracking: "order tracking"
|
|
20517
|
-
}, Gd = (e) => !!e && typeof e == "object" && !Array.isArray(e),
|
|
20648
|
+
}, Gd = (e) => !!e && typeof e == "object" && !Array.isArray(e), Y = (e) => Gd(e) ? e : {}, X = (e, t = 500) => Array.isArray(e) ? e.slice(0, t) : [], Z = (e) => typeof e == "string" ? e : typeof e == "number" && Number.isFinite(e) ? String(e) : "", Kd = {
|
|
20518
20649
|
amp: "&",
|
|
20519
20650
|
lt: "<",
|
|
20520
20651
|
gt: ">",
|
|
@@ -20540,35 +20671,35 @@ var Vd = {
|
|
|
20540
20671
|
}
|
|
20541
20672
|
return Kd[t.toLowerCase()] ?? e;
|
|
20542
20673
|
});
|
|
20543
|
-
function
|
|
20674
|
+
function Jd(e) {
|
|
20544
20675
|
let t = /<(a|b|strong|i|em|u|s|span|font|ul|ol|li|img|sup|sub|mark|code)\b/i.test(e);
|
|
20545
20676
|
return {
|
|
20546
20677
|
text: qd(e.replace(/<\s*br\s*\/?>/gi, "\n").replace(/<\/(p|div|li|h[1-6])\s*>/gi, "\n").replace(/<[^>]*>/g, "")).replace(/[ \t\f\v]+/g, " ").replace(/ ?\n ?/g, "\n").replace(/\n{3,}/g, "\n\n").trim().slice(0, 2e4),
|
|
20547
20678
|
rich: t
|
|
20548
20679
|
};
|
|
20549
20680
|
}
|
|
20550
|
-
var
|
|
20551
|
-
let t =
|
|
20552
|
-
return t && t.length <= 300 && !
|
|
20553
|
-
},
|
|
20681
|
+
var Yd = /[;{}<>\\]|\/\*|javascript:|expression\s*\(|@import|behavior\s*:|-moz-binding/i, Xd = (e) => {
|
|
20682
|
+
let t = Z(e).trim();
|
|
20683
|
+
return t && t.length <= 300 && !Yd.test(t) ? t : void 0;
|
|
20684
|
+
}, Zd = /* @__PURE__ */ new Set([
|
|
20554
20685
|
"left",
|
|
20555
20686
|
"center",
|
|
20556
20687
|
"right",
|
|
20557
20688
|
"justify"
|
|
20558
|
-
]),
|
|
20689
|
+
]), Qd = /* @__PURE__ */ new Set([
|
|
20559
20690
|
"solid",
|
|
20560
20691
|
"dashed",
|
|
20561
20692
|
"dotted",
|
|
20562
20693
|
"none"
|
|
20563
|
-
]),
|
|
20694
|
+
]), $d = /* @__PURE__ */ new Set([
|
|
20564
20695
|
"none",
|
|
20565
20696
|
"uppercase",
|
|
20566
20697
|
"lowercase",
|
|
20567
20698
|
"capitalize"
|
|
20568
|
-
]),
|
|
20699
|
+
]), ef = (e) => {
|
|
20569
20700
|
let t = /url\(\s*(?:"([^"]*)"|'([^']*)'|([^)]*))\s*\)/i.exec(e), n = (t?.[1] ?? t?.[2] ?? t?.[3] ?? "").trim();
|
|
20570
20701
|
return n && xt(n) || void 0;
|
|
20571
|
-
},
|
|
20702
|
+
}, tf = /* @__PURE__ */ new Set([
|
|
20572
20703
|
"autoHeight",
|
|
20573
20704
|
"autoWidth",
|
|
20574
20705
|
"position",
|
|
@@ -20586,13 +20717,13 @@ var Jd = /[;{}<>\\]|\/\*|javascript:|expression\s*\(|@import|behavior\s*:|-moz-b
|
|
|
20586
20717
|
"verticalAlign",
|
|
20587
20718
|
"float"
|
|
20588
20719
|
]);
|
|
20589
|
-
function
|
|
20590
|
-
let t =
|
|
20720
|
+
function nf(e) {
|
|
20721
|
+
let t = Y(e), n = {}, r = [], i = (e, t) => {
|
|
20591
20722
|
t !== void 0 && (n[e] = t);
|
|
20592
20723
|
};
|
|
20593
20724
|
for (let [e, a] of Object.entries(t)) {
|
|
20594
|
-
if (a == null || a === "" ||
|
|
20595
|
-
let t =
|
|
20725
|
+
if (a == null || a === "" || tf.has(e)) continue;
|
|
20726
|
+
let t = Xd(a);
|
|
20596
20727
|
switch (e) {
|
|
20597
20728
|
case "color":
|
|
20598
20729
|
i("textColor", t);
|
|
@@ -20613,7 +20744,7 @@ function tf(e) {
|
|
|
20613
20744
|
i("letterSpacing", t);
|
|
20614
20745
|
break;
|
|
20615
20746
|
case "textTransform":
|
|
20616
|
-
t &&
|
|
20747
|
+
t && $d.has(t) && (n.textTransform = t);
|
|
20617
20748
|
break;
|
|
20618
20749
|
case "fontStyle":
|
|
20619
20750
|
t === "italic" && (n.isItalic = !0);
|
|
@@ -20622,7 +20753,7 @@ function tf(e) {
|
|
|
20622
20753
|
t && /underline/.test(t) && (n.isUnderline = !0);
|
|
20623
20754
|
break;
|
|
20624
20755
|
case "textAlign":
|
|
20625
|
-
t &&
|
|
20756
|
+
t && Zd.has(t) && (n.textAlign = t);
|
|
20626
20757
|
break;
|
|
20627
20758
|
case "backgroundColor":
|
|
20628
20759
|
i("backgroundColor", t);
|
|
@@ -20631,7 +20762,7 @@ function tf(e) {
|
|
|
20631
20762
|
case "backgroundImage":
|
|
20632
20763
|
if (t && /gradient\(/i.test(t)) n.backgroundGradient = t;
|
|
20633
20764
|
else if (t && /url\(/i.test(t)) {
|
|
20634
|
-
let i =
|
|
20765
|
+
let i = ef(t);
|
|
20635
20766
|
i ? (n.backgroundImage = i, n.backgroundSize ??= "cover", n.backgroundPosition ??= "center") : r.push(e);
|
|
20636
20767
|
} else e === "background" ? i("backgroundColor", t) : t && r.push(e);
|
|
20637
20768
|
break;
|
|
@@ -20669,7 +20800,7 @@ function tf(e) {
|
|
|
20669
20800
|
i("gap", t);
|
|
20670
20801
|
break;
|
|
20671
20802
|
case "borderStyle":
|
|
20672
|
-
t &&
|
|
20803
|
+
t && Qd.has(t) && (n.borderStyle = t);
|
|
20673
20804
|
break;
|
|
20674
20805
|
case "border": {
|
|
20675
20806
|
let i = t ? /^([\d.]+(?:px|rem|em)?)\s+(solid|dashed|dotted|none)\s*(.*)$/i.exec(t) : null;
|
|
@@ -20692,11 +20823,11 @@ function tf(e) {
|
|
|
20692
20823
|
unmapped: r
|
|
20693
20824
|
};
|
|
20694
20825
|
}
|
|
20695
|
-
var
|
|
20826
|
+
var rf = (e, ...t) => t.some((t) => Z(e[t]).trim() !== ""), Q = (e, t) => {
|
|
20696
20827
|
e.seen.has(t) || (e.seen.add(t), e.warnings.push(t));
|
|
20697
|
-
},
|
|
20698
|
-
function
|
|
20699
|
-
let r =
|
|
20828
|
+
}, af = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
|
|
20829
|
+
function of(e, t, n) {
|
|
20830
|
+
let r = nf(t.style), i = nf(t.styleTablet), a = nf(t.styleMobile), o = [.../* @__PURE__ */ new Set([
|
|
20700
20831
|
...r.unmapped,
|
|
20701
20832
|
...i.unmapped,
|
|
20702
20833
|
...a.unmapped
|
|
@@ -20708,7 +20839,7 @@ function af(e, t, n) {
|
|
|
20708
20839
|
responsive: Object.keys(s).length ? s : void 0
|
|
20709
20840
|
};
|
|
20710
20841
|
}
|
|
20711
|
-
function
|
|
20842
|
+
function sf(e, t) {
|
|
20712
20843
|
t !== "center" && t !== "right" || (!e.width && !e.widthSizing && (e.widthSizing = "hug"), e.marginLeft ||= "auto", !e.marginRight && t === "center" && (e.marginRight = "auto"));
|
|
20713
20844
|
}
|
|
20714
20845
|
var $ = (e, t, n, r, i = {}) => ({
|
|
@@ -20717,12 +20848,12 @@ var $ = (e, t, n, r, i = {}) => ({
|
|
|
20717
20848
|
name: n,
|
|
20718
20849
|
styles: r,
|
|
20719
20850
|
...i
|
|
20720
|
-
}),
|
|
20851
|
+
}), cf = {
|
|
20721
20852
|
layoutMode: "flow",
|
|
20722
20853
|
display: "flex",
|
|
20723
20854
|
flexDirection: "column",
|
|
20724
20855
|
width: "100%"
|
|
20725
|
-
},
|
|
20856
|
+
}, lf = {
|
|
20726
20857
|
1: "32px",
|
|
20727
20858
|
2: "24px",
|
|
20728
20859
|
3: "19px",
|
|
@@ -20730,45 +20861,45 @@ var $ = (e, t, n, r, i = {}) => ({
|
|
|
20730
20861
|
5: "13px",
|
|
20731
20862
|
6: "11px"
|
|
20732
20863
|
};
|
|
20733
|
-
function
|
|
20734
|
-
let r =
|
|
20864
|
+
function uf(e, t, n) {
|
|
20865
|
+
let r = Z(t.type), i = Y(t.attributes), { styles: a, responsive: o } = of(e, t, `${Wd[r] ?? r.replace(/_/g, " ")} block`), s = a.textAlign, c = (e, t, r = {}, i = a) => $(n, e, t, i, {
|
|
20735
20866
|
...o ? { responsive: o } : {},
|
|
20736
20867
|
...r
|
|
20737
20868
|
});
|
|
20738
20869
|
switch (r) {
|
|
20739
20870
|
case "heading": {
|
|
20740
|
-
let { text: n, rich: r } = Z(
|
|
20871
|
+
let { text: n, rich: r } = Jd(Z(i.text) || "Heading");
|
|
20741
20872
|
r && (e.approx = !0, Q(e, "Bold, italic and links inside text are simplified to plain text."));
|
|
20742
|
-
let o = /^h([1-6])$/i.exec(
|
|
20743
|
-
return l.fontSize ??=
|
|
20873
|
+
let o = /^h([1-6])$/i.exec(Z(i.headingType)), s = o ? Number(o[1]) : 2, l = { ...a };
|
|
20874
|
+
return l.fontSize ??= lf[s], l.fontWeight ??= "700", rf(Y(t.style), "margin", "marginBottom") || (l.marginBottom = "8px"), [c("heading", n.slice(0, 40) || "Heading", {
|
|
20744
20875
|
content: n,
|
|
20745
20876
|
props: { level: s }
|
|
20746
20877
|
}, l)];
|
|
20747
20878
|
}
|
|
20748
20879
|
case "paragraph":
|
|
20749
20880
|
case "text": {
|
|
20750
|
-
let s =
|
|
20881
|
+
let s = Z(i.text) || (r === "paragraph" ? "Paragraph text content." : ""), { rich: l } = Jd(s);
|
|
20751
20882
|
l && (e.approx = !0, Q(e, "Bold, italic and links inside text are simplified to plain text."));
|
|
20752
|
-
let u = s.split(/<\/p\s*>|(?:<br\s*\/?>\s*){2,}/i).map((e) =>
|
|
20753
|
-
return r === "paragraph" && !
|
|
20883
|
+
let u = s.split(/<\/p\s*>|(?:<br\s*\/?>\s*){2,}/i).map((e) => Jd(e).text).filter(Boolean), d = u.length ? u : [""], f = { ...a };
|
|
20884
|
+
return r === "paragraph" && !rf(Y(t.style), "margin", "marginBottom") && (f.marginBottom = "12px"), d.map((e, t) => t === 0 ? c("paragraph", e.slice(0, 40) || "Text", { content: e }, f) : $(`${n}-p${t + 1}`, "paragraph", e.slice(0, 40) || "Text", f, {
|
|
20754
20885
|
content: e,
|
|
20755
20886
|
...o ? { responsive: o } : {}
|
|
20756
20887
|
}));
|
|
20757
20888
|
}
|
|
20758
20889
|
case "button": {
|
|
20759
20890
|
let t = { ...a };
|
|
20760
|
-
|
|
20761
|
-
let n =
|
|
20891
|
+
sf(t, s), !t.widthSizing && !t.width && (t.widthSizing = "hug");
|
|
20892
|
+
let n = Z(i.href).trim();
|
|
20762
20893
|
return i.openInNewTab && (e.approx = !0, Q(e, "Buttons can't open in a new tab yet, so they open in the same one.")), [c("button", "Button", {
|
|
20763
|
-
content: Z(
|
|
20894
|
+
content: Jd(Z(i.text) || "Button").text,
|
|
20764
20895
|
props: { href: n ? M(n) : "#" }
|
|
20765
20896
|
}, t)];
|
|
20766
20897
|
}
|
|
20767
20898
|
case "image": {
|
|
20768
20899
|
let e = { ...a };
|
|
20769
|
-
return i.autoHeight !== !1 && delete e.height, e.width ??= "100%",
|
|
20900
|
+
return i.autoHeight !== !1 && delete e.height, e.width ??= "100%", sf(e, s), [c("image", Z(i.alt).slice(0, 40) || "Image", { props: {
|
|
20770
20901
|
src: xt(i.src),
|
|
20771
|
-
alt:
|
|
20902
|
+
alt: Z(i.alt)
|
|
20772
20903
|
} }, e)];
|
|
20773
20904
|
}
|
|
20774
20905
|
case "divider": return [c("divider", "Divider", {}, {
|
|
@@ -20780,84 +20911,84 @@ function lf(e, t, n) {
|
|
|
20780
20911
|
case "spacer": return [c("spacer", "Spacer", {}, { height: a.height ?? "24px" })];
|
|
20781
20912
|
case "card": {
|
|
20782
20913
|
let e = {
|
|
20783
|
-
...
|
|
20914
|
+
...cf,
|
|
20784
20915
|
gap: "8px",
|
|
20785
20916
|
...a
|
|
20786
20917
|
};
|
|
20787
|
-
return [c("card",
|
|
20918
|
+
return [c("card", Z(i.title).slice(0, 40) || "Card", { children: [$(`${n}-title`, "heading", "Card title", {
|
|
20788
20919
|
fontSize: "19px",
|
|
20789
20920
|
fontWeight: "700",
|
|
20790
20921
|
textColor: "#ffffff"
|
|
20791
20922
|
}, {
|
|
20792
|
-
content: Z(
|
|
20923
|
+
content: Jd(Z(i.title) || "Card Title").text,
|
|
20793
20924
|
props: { level: 3 }
|
|
20794
20925
|
}), $(`${n}-text`, "paragraph", "Card text", {
|
|
20795
20926
|
fontSize: "14px",
|
|
20796
20927
|
textColor: "#94a3b8"
|
|
20797
|
-
}, { content: Z(
|
|
20928
|
+
}, { content: Jd(Z(i.description) || "Card description.").text })] }, e)];
|
|
20798
20929
|
}
|
|
20799
20930
|
case "icon": {
|
|
20800
|
-
let t =
|
|
20801
|
-
n || (e.approx = !0, Q(e, `The icon "${
|
|
20931
|
+
let t = af(Z(i.iconName)), n = t in Sl;
|
|
20932
|
+
n || (e.approx = !0, Q(e, `The icon "${Z(i.iconName) || "unnamed"}" isn't in the V2 icon set, so a star stands in for it.`)), Z(i.href).trim() && (e.approx = !0, Q(e, "Icons can't be links yet; the icon is kept without its link."));
|
|
20802
20933
|
let r = { ...a };
|
|
20803
|
-
return r.fontSize ??= `${parseInt(
|
|
20934
|
+
return r.fontSize ??= `${parseInt(Z(i.iconSize), 10) || 48}px`, r.textColor ??= "#1e293b", sf(r, s === "left" ? void 0 : s ?? "center"), [c("icon", "Icon", { props: {
|
|
20804
20935
|
iconName: n ? t : "star",
|
|
20805
20936
|
strokeWidth: 2,
|
|
20806
|
-
label:
|
|
20937
|
+
label: Z(i.alt) || Z(i.label)
|
|
20807
20938
|
} }, r)];
|
|
20808
20939
|
}
|
|
20809
20940
|
case "carousel": return [c("carousel", "Carousel", { props: {
|
|
20810
|
-
slides:
|
|
20941
|
+
slides: X(i.images, 30).map((e) => Y(e)).map((e) => ({
|
|
20811
20942
|
src: xt(e.src),
|
|
20812
|
-
alt:
|
|
20813
|
-
caption:
|
|
20943
|
+
alt: Z(e.alt),
|
|
20944
|
+
caption: Z(e.caption)
|
|
20814
20945
|
})),
|
|
20815
20946
|
showArrows: i.showArrows !== !1,
|
|
20816
20947
|
showDots: i.showDots !== !1,
|
|
20817
20948
|
autoplay: !0,
|
|
20818
20949
|
interval: 5
|
|
20819
20950
|
} })];
|
|
20820
|
-
case "video": return
|
|
20821
|
-
url:
|
|
20951
|
+
case "video": return Z(i.videoUrl).trim() ? [c("video", "Video", { props: {
|
|
20952
|
+
url: Z(i.videoUrl),
|
|
20822
20953
|
ratio: "16:9"
|
|
20823
20954
|
} })] : (e.lost = !0, Q(e, "A video block had no video address, so it was left out."), []);
|
|
20824
20955
|
case "social": {
|
|
20825
|
-
let n =
|
|
20826
|
-
network:
|
|
20827
|
-
url: M(
|
|
20828
|
-
})).filter((e) => e.network in
|
|
20956
|
+
let n = X(i.links, 20).map(Y), r = n.map((e) => ({
|
|
20957
|
+
network: Z(e.provider) === "twitter" ? "x" : Z(e.provider),
|
|
20958
|
+
url: M(Z(e.url))
|
|
20959
|
+
})).filter((e) => e.network in F);
|
|
20829
20960
|
r.length < n.length && (e.approx = !0, Q(e, "A social link to a network V2 has no icon for was left out."));
|
|
20830
|
-
let o = parseInt(
|
|
20831
|
-
return
|
|
20961
|
+
let o = parseInt(Z(Y(n[0]).size) || Z(Y(t.style).iconSize), 10), l = { ...a };
|
|
20962
|
+
return sf(l, s), [c("social", "Social links", { props: {
|
|
20832
20963
|
links: r,
|
|
20833
20964
|
size: Number.isFinite(o) ? Math.min(96, Math.max(20, o)) : 40,
|
|
20834
|
-
shape:
|
|
20965
|
+
shape: Z(i.iconType ?? Y(n[0]).iconType) === "square" ? "square" : "circle",
|
|
20835
20966
|
colorMode: i.colorMode === "branded" ? "brand" : "mono"
|
|
20836
20967
|
} }, l)];
|
|
20837
20968
|
}
|
|
20838
20969
|
case "menu": {
|
|
20839
|
-
let e =
|
|
20840
|
-
label:
|
|
20841
|
-
href: M(
|
|
20970
|
+
let e = X(i.links, 40).map(Y).map((e) => ({
|
|
20971
|
+
label: Z(e.label).trim() || "Link",
|
|
20972
|
+
href: M(Z(e.href) || "#")
|
|
20842
20973
|
})), t = { ...a };
|
|
20843
|
-
return (s === "center" || s === "right") &&
|
|
20974
|
+
return (s === "center" || s === "right") && sf(t, s), [c("menu", "Menu", { props: {
|
|
20844
20975
|
links: e,
|
|
20845
20976
|
layout: "horizontal",
|
|
20846
20977
|
mobile: "hamburger"
|
|
20847
20978
|
} }, t)];
|
|
20848
20979
|
}
|
|
20849
20980
|
case "html": {
|
|
20850
|
-
let t =
|
|
20981
|
+
let t = Z(i.htmlContent);
|
|
20851
20982
|
return t.trim() ? (e.approx = !0, Q(e, "HTML blocks now sit in their own box on the page, so they no longer pick up the site’s styles. Check each one."), [c("html", "Embed", { props: {
|
|
20852
20983
|
code: t,
|
|
20853
|
-
title:
|
|
20984
|
+
title: Z(i.title) || "Embedded content"
|
|
20854
20985
|
} }, {
|
|
20855
20986
|
...a,
|
|
20856
20987
|
height: a.height ?? "300px"
|
|
20857
20988
|
})]) : (e.lost = !0, Q(e, "An empty HTML block was left out."), []);
|
|
20858
20989
|
}
|
|
20859
20990
|
case "table": {
|
|
20860
|
-
let t = Math.max(1, Math.min(200, Number(i.rowCount) || 2)), n = Math.max(1, Math.min(30, Number(i.colCount) || 2)), r =
|
|
20991
|
+
let t = Math.max(1, Math.min(200, Number(i.rowCount) || 2)), n = Math.max(1, Math.min(30, Number(i.colCount) || 2)), r = X(i.cells, 200).map((e) => X(e, 30)), a = Array.from({ length: t }, (e, t) => Array.from({ length: n }, (e, n) => Jd(Z(r[t]?.[n])).text));
|
|
20861
20992
|
return i.enableFooter && (e.approx = !0, Q(e, "A table footer row is now an ordinary row.")), [c("table", "Table", { props: {
|
|
20862
20993
|
rows: a,
|
|
20863
20994
|
headerRow: i.enableHeader !== !1,
|
|
@@ -20865,31 +20996,31 @@ function lf(e, t, n) {
|
|
|
20865
20996
|
} })];
|
|
20866
20997
|
}
|
|
20867
20998
|
case "timer": {
|
|
20868
|
-
let t = Date.parse(
|
|
20869
|
-
return Number.isFinite(t) ? (
|
|
20999
|
+
let t = Date.parse(Z(i.targetDate));
|
|
21000
|
+
return Number.isFinite(t) ? (Z(i.timezone) && !/^(utc|gmt)?$/i.test(Z(i.timezone)) && (e.approx = !0, Q(e, "Countdown times now use the date as written, in the visitor’s own time zone. Check the end time.")), [c("timer", "Countdown", { props: {
|
|
20870
21001
|
target: new Date(t).toISOString(),
|
|
20871
|
-
expiredMessage:
|
|
21002
|
+
expiredMessage: Z(i.expiredMessage) || "This offer has ended",
|
|
20872
21003
|
showLabels: i.showLabels !== !1
|
|
20873
21004
|
} })]) : (e.lost = !0, Q(e, "A countdown timer had no valid end date, so it was left out."), []);
|
|
20874
21005
|
}
|
|
20875
21006
|
case "accordion": {
|
|
20876
|
-
let t =
|
|
20877
|
-
t.some((e) =>
|
|
21007
|
+
let t = X(i.items, 50).map(Y);
|
|
21008
|
+
t.some((e) => X(e.children).length) && (e.approx = !0, Q(e, "Questions nested inside other questions were left out of an accordion."));
|
|
20878
21009
|
let n = t.findIndex((e) => !!e.defaultOpen);
|
|
20879
21010
|
return n > 0 && (e.approx = !0, Q(e, "An accordion opens its first question by default now, not the one it used to.")), [c("accordion", "Accordion", { props: {
|
|
20880
21011
|
items: t.map((e, t) => ({
|
|
20881
|
-
title: Z(
|
|
20882
|
-
content: Z(
|
|
21012
|
+
title: Jd(Z(e.title) || `Item ${t + 1}`).text,
|
|
21013
|
+
content: Jd(Z(e.content)).text
|
|
20883
21014
|
})),
|
|
20884
21015
|
allowMultiple: i.mode === "multi",
|
|
20885
21016
|
openFirst: n === 0
|
|
20886
21017
|
} })];
|
|
20887
21018
|
}
|
|
20888
|
-
case "form_container": return
|
|
20889
|
-
default: return r in Vd ?
|
|
21019
|
+
case "form_container": return Z(i.provider) === "maildrip" ? df(e, "maildrip_form", "a MailDrip sign-up form", n, i) : [pf(e, n, i, X(i.fields, 40).map(Y), a, o)];
|
|
21020
|
+
default: return r in Vd ? df(e, r, Wd[r] ?? r, n, i, a, o) : (e.lost = !0, Q(e, `A "${r || "unknown"}" block isn't supported in the new editor and was left out.`), []);
|
|
20890
21021
|
}
|
|
20891
21022
|
}
|
|
20892
|
-
function
|
|
21023
|
+
function df(e, t, n, r, i, a = {}, o) {
|
|
20893
21024
|
let s = Vd[t];
|
|
20894
21025
|
if (s) {
|
|
20895
21026
|
let e = {};
|
|
@@ -20906,11 +21037,11 @@ function uf(e, t, n, r, i, a = {}, o) {
|
|
|
20906
21037
|
})];
|
|
20907
21038
|
}
|
|
20908
21039
|
return e.lost = !0, Q(e, `The ${n} can't be carried over automatically and was left out. Add it again from the new editor's Add panel.`), [$(r, "container", `Needs attention: ${n}`, {
|
|
20909
|
-
...
|
|
21040
|
+
...cf,
|
|
20910
21041
|
minHeight: "40px"
|
|
20911
21042
|
}, { hidden: !0 })];
|
|
20912
21043
|
}
|
|
20913
|
-
var
|
|
21044
|
+
var ff = {
|
|
20914
21045
|
text: "text",
|
|
20915
21046
|
email: "email",
|
|
20916
21047
|
tel: "tel",
|
|
@@ -20922,34 +21053,34 @@ var df = {
|
|
|
20922
21053
|
number: "text",
|
|
20923
21054
|
date: "text"
|
|
20924
21055
|
};
|
|
20925
|
-
function
|
|
21056
|
+
function pf(e, t, n, r, i, a) {
|
|
20926
21057
|
let o = /* @__PURE__ */ new Set(), s = [];
|
|
20927
21058
|
for (let t of r) {
|
|
20928
|
-
let n =
|
|
20929
|
-
(n === "radio" || n === "number" || n === "date" || !(n in
|
|
20930
|
-
let i = Z(
|
|
21059
|
+
let n = Z(t.kind) || Z(t.type) || Z(t.inputType) || "text", r = ff[n] ?? "text";
|
|
21060
|
+
(n === "radio" || n === "number" || n === "date" || !(n in ff)) && (e.approx = !0, Q(e, `A "${n}" form field is now a ${r === "select" ? "drop-down" : "text"} field.`));
|
|
21061
|
+
let i = Jd(Z(t.label) || Z(t.placeholder) || Z(t.name) || "Field").text, a = (Z(t.name) || Z(t.fieldName) || i).toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "field", c = a;
|
|
20931
21062
|
for (let e = 2; o.has(a); e++) a = `${c}-${e}`;
|
|
20932
21063
|
o.add(a);
|
|
20933
|
-
let l =
|
|
21064
|
+
let l = X(t.options, 50).map((e) => Gd(e) ? Z(e.label) || Z(e.value) : Z(e)).filter(Boolean);
|
|
20934
21065
|
s.push({
|
|
20935
21066
|
id: a,
|
|
20936
21067
|
label: i,
|
|
20937
21068
|
type: r,
|
|
20938
|
-
...
|
|
21069
|
+
...Z(t.placeholder) ? { placeholder: Z(t.placeholder) } : {},
|
|
20939
21070
|
...t.required ? { required: !0 } : {},
|
|
20940
21071
|
...r === "select" ? { options: l } : {}
|
|
20941
21072
|
});
|
|
20942
21073
|
}
|
|
20943
21074
|
e.approx = !0, Q(e, "Forms use the new form style, so field and button colours need a quick check.");
|
|
20944
|
-
let c =
|
|
21075
|
+
let c = Z(n.actionUrl) || Z(n.action), l = {
|
|
20945
21076
|
fields: s.length ? s : [{
|
|
20946
21077
|
id: "email",
|
|
20947
21078
|
label: "Email",
|
|
20948
21079
|
type: "email",
|
|
20949
21080
|
required: !0
|
|
20950
21081
|
}],
|
|
20951
|
-
submitLabel:
|
|
20952
|
-
successMessage:
|
|
21082
|
+
submitLabel: Z(n.submitLabel) || "Submit",
|
|
21083
|
+
successMessage: Z(n.successMessage) || "Thanks! We got your message."
|
|
20953
21084
|
};
|
|
20954
21085
|
c && M(c) !== "#" && (l.action = M(c)), s.length || (e.approx = !0, Q(e, "A form had no fields, so it starts with an email field."));
|
|
20955
21086
|
let u = { ...i };
|
|
@@ -20958,35 +21089,35 @@ function ff(e, t, n, r, i, a) {
|
|
|
20958
21089
|
...a ? { responsive: a } : {}
|
|
20959
21090
|
});
|
|
20960
21091
|
}
|
|
20961
|
-
var
|
|
21092
|
+
var mf = /* @__PURE__ */ new Set([
|
|
20962
21093
|
"input",
|
|
20963
21094
|
"textarea",
|
|
20964
21095
|
"select"
|
|
20965
21096
|
]);
|
|
20966
|
-
function
|
|
20967
|
-
let t =
|
|
21097
|
+
function hf(e) {
|
|
21098
|
+
let t = Y(e.attributes), n = Z(e.type);
|
|
20968
21099
|
return {
|
|
20969
|
-
kind: n === "input" ?
|
|
20970
|
-
name:
|
|
20971
|
-
label:
|
|
20972
|
-
placeholder:
|
|
21100
|
+
kind: n === "input" ? Z(t.inputType) || Z(t.type) || "text" : n,
|
|
21101
|
+
name: Z(t.name) || Z(t.fieldName),
|
|
21102
|
+
label: Z(t.label) || Z(t.placeholder),
|
|
21103
|
+
placeholder: Z(t.placeholder),
|
|
20973
21104
|
required: t.required,
|
|
20974
21105
|
options: t.options
|
|
20975
21106
|
};
|
|
20976
21107
|
}
|
|
20977
|
-
function
|
|
20978
|
-
let t =
|
|
20979
|
-
for (let e of t) r.set(
|
|
21108
|
+
function gf(e) {
|
|
21109
|
+
let t = X(e.elements, 200).filter(Gd), n = X(e.nestedRows, 50).filter(Gd), r = /* @__PURE__ */ new Map();
|
|
21110
|
+
for (let e of t) r.set(Z(e.id), {
|
|
20980
21111
|
kind: "el",
|
|
20981
21112
|
item: e
|
|
20982
21113
|
});
|
|
20983
|
-
for (let e of n) r.set(
|
|
21114
|
+
for (let e of n) r.set(Z(e.id), {
|
|
20984
21115
|
kind: "row",
|
|
20985
21116
|
item: e
|
|
20986
21117
|
});
|
|
20987
21118
|
let i = [], a = /* @__PURE__ */ new Set();
|
|
20988
|
-
for (let t of
|
|
20989
|
-
let e = r.get(
|
|
21119
|
+
for (let t of X(e.childOrder, 250)) {
|
|
21120
|
+
let e = r.get(Z(t));
|
|
20990
21121
|
e && !a.has(e.item) && (i.push(e), a.add(e.item));
|
|
20991
21122
|
}
|
|
20992
21123
|
for (let e of t) a.has(e) || i.push({
|
|
@@ -20999,11 +21130,11 @@ function hf(e) {
|
|
|
20999
21130
|
});
|
|
21000
21131
|
return i;
|
|
21001
21132
|
}
|
|
21002
|
-
function
|
|
21133
|
+
function _f(e, t = 1) {
|
|
21003
21134
|
return e.nodes + t > 4980 ? (e.capped || (e.capped = !0, e.lost = !0, Q(e, "This design is very large, so the last part of it was left out.")), !1) : (e.nodes += t, !0);
|
|
21004
21135
|
}
|
|
21005
|
-
function
|
|
21006
|
-
let i = [], a =
|
|
21136
|
+
function vf(e, t, n, r) {
|
|
21137
|
+
let i = [], a = gf(t), o = 0;
|
|
21007
21138
|
for (let t = 0; t < a.length; t++) {
|
|
21008
21139
|
let s = a[t];
|
|
21009
21140
|
if (o += 1, s.kind === "row") {
|
|
@@ -21011,35 +21142,35 @@ function _f(e, t, n, r) {
|
|
|
21011
21142
|
e.lost = !0, Q(e, "Rows nested very deeply were left out.");
|
|
21012
21143
|
continue;
|
|
21013
21144
|
}
|
|
21014
|
-
let t =
|
|
21145
|
+
let t = bf(e, s.item, `${n}-r${o}`, r + 1, !1);
|
|
21015
21146
|
t && i.push(t);
|
|
21016
21147
|
continue;
|
|
21017
21148
|
}
|
|
21018
|
-
if (
|
|
21149
|
+
if (mf.has(Z(s.item.type))) {
|
|
21019
21150
|
let r = [s.item];
|
|
21020
|
-
for (; t + 1 < a.length && a[t + 1].kind === "el" &&
|
|
21021
|
-
if (!
|
|
21022
|
-
e.approx = !0, Q(e, "Separate form fields were grouped into one form. Check its button and where it sends messages."), i.push(
|
|
21151
|
+
for (; t + 1 < a.length && a[t + 1].kind === "el" && mf.has(Z(a[t + 1].item.type));) r.push(a[t + 1].item), t += 1;
|
|
21152
|
+
if (!_f(e)) continue;
|
|
21153
|
+
e.approx = !0, Q(e, "Separate form fields were grouped into one form. Check its button and where it sends messages."), i.push(pf(e, `${n}-e${o}`, {}, r.map(hf), of(e, r[0], "form field").styles, void 0));
|
|
21023
21154
|
continue;
|
|
21024
21155
|
}
|
|
21025
|
-
|
|
21156
|
+
_f(e, 2) && i.push(...uf(e, s.item, `${n}-e${o}`));
|
|
21026
21157
|
}
|
|
21027
21158
|
return i;
|
|
21028
21159
|
}
|
|
21029
|
-
var
|
|
21030
|
-
let t = parseFloat(
|
|
21160
|
+
var yf = (e) => {
|
|
21161
|
+
let t = parseFloat(Z(e));
|
|
21031
21162
|
return Number.isFinite(t) && t > 0 ? t : 0;
|
|
21032
21163
|
};
|
|
21033
|
-
function
|
|
21034
|
-
if (!
|
|
21035
|
-
let { styles: a, responsive: o } =
|
|
21164
|
+
function bf(e, t, n, r, i) {
|
|
21165
|
+
if (!_f(e, 3)) return null;
|
|
21166
|
+
let { styles: a, responsive: o } = of(e, {
|
|
21036
21167
|
style: t.style,
|
|
21037
21168
|
styleTablet: t.styleTablet,
|
|
21038
21169
|
styleMobile: t.styleMobile
|
|
21039
|
-
}, "row"), s =
|
|
21170
|
+
}, "row"), s = X(t.columns, 12).filter(Gd), c = a.gap ?? (s.length > 1 ? "16px" : void 0);
|
|
21040
21171
|
delete a.gap;
|
|
21041
21172
|
let l = s.map((t, i) => {
|
|
21042
|
-
let a = `${n}-c${i + 1}`, { styles: o, responsive: s } =
|
|
21173
|
+
let a = `${n}-c${i + 1}`, { styles: o, responsive: s } = of(e, {
|
|
21043
21174
|
style: t.styles,
|
|
21044
21175
|
styleTablet: t.stylesTablet,
|
|
21045
21176
|
styleMobile: t.stylesMobile
|
|
@@ -21048,13 +21179,13 @@ function yf(e, t, n, r, i) {
|
|
|
21048
21179
|
cid: a,
|
|
21049
21180
|
cs: o,
|
|
21050
21181
|
cr: s,
|
|
21051
|
-
children:
|
|
21182
|
+
children: vf(e, t, a, r)
|
|
21052
21183
|
};
|
|
21053
21184
|
}), u;
|
|
21054
21185
|
if (l.length === 1) {
|
|
21055
21186
|
let e = l[0];
|
|
21056
21187
|
u = $(`${n}-body`, "container", "Content", {
|
|
21057
|
-
...
|
|
21188
|
+
...cf,
|
|
21058
21189
|
...e.cs,
|
|
21059
21190
|
width: "100%"
|
|
21060
21191
|
}, {
|
|
@@ -21062,7 +21193,7 @@ function yf(e, t, n, r, i) {
|
|
|
21062
21193
|
...e.cr ? { responsive: e.cr } : {}
|
|
21063
21194
|
});
|
|
21064
21195
|
} else {
|
|
21065
|
-
let e = s.map((e) =>
|
|
21196
|
+
let e = s.map((e) => yf(e.width)), t = e.reduce((e, t) => e + t, 0), r = l.map((n, r) => t > 0 && e[r] > 0 ? Math.round(e[r] / t * 1e3) / 10 : 100 / Math.max(1, l.length)).map((e) => `minmax(0, ${e}fr)`).join(" "), i = l.length <= 2 ? r : "minmax(0, 1fr) minmax(0, 1fr)";
|
|
21066
21197
|
u = $(`${n}-cols`, "columns", "Columns", {
|
|
21067
21198
|
layoutMode: "grid",
|
|
21068
21199
|
display: "grid",
|
|
@@ -21076,7 +21207,7 @@ function yf(e, t, n, r, i) {
|
|
|
21076
21207
|
mobile: { gridTemplateColumns: "minmax(0, 1fr)" }
|
|
21077
21208
|
},
|
|
21078
21209
|
children: l.map((e) => $(e.cid, "column", "Column", {
|
|
21079
|
-
...
|
|
21210
|
+
...cf,
|
|
21080
21211
|
...e.cs,
|
|
21081
21212
|
width: "100%"
|
|
21082
21213
|
}, {
|
|
@@ -21091,15 +21222,15 @@ function yf(e, t, n, r, i) {
|
|
|
21091
21222
|
marginLeft: "auto",
|
|
21092
21223
|
marginRight: "auto"
|
|
21093
21224
|
});
|
|
21094
|
-
let d =
|
|
21225
|
+
let d = Z(t.htmlId).trim(), f = (function e(t) {
|
|
21095
21226
|
for (let n of t) {
|
|
21096
21227
|
if (n.type === "heading" && n.content) return n.content.split("\n")[0].slice(0, 40);
|
|
21097
21228
|
let t = n.children ? e(n.children) : "";
|
|
21098
21229
|
if (t) return t;
|
|
21099
21230
|
}
|
|
21100
21231
|
return "";
|
|
21101
|
-
})(u.children ?? []), p = d && d.replace(/[-_]+/g, " ") || f || (i ? "Section" : "Row"), m = Et(
|
|
21102
|
-
...
|
|
21232
|
+
})(u.children ?? []), p = d && d.replace(/[-_]+/g, " ") || f || (i ? "Section" : "Row"), m = Et(Z(t.htmlClass)), h = {
|
|
21233
|
+
...cf,
|
|
21103
21234
|
...a,
|
|
21104
21235
|
...m ? { customClasses: m } : {}
|
|
21105
21236
|
};
|
|
@@ -21112,7 +21243,7 @@ function yf(e, t, n, r, i) {
|
|
|
21112
21243
|
...o ? { responsive: o } : {}
|
|
21113
21244
|
});
|
|
21114
21245
|
}
|
|
21115
|
-
var
|
|
21246
|
+
var xf = (e, t = {}) => ({
|
|
21116
21247
|
id: e.id ?? "v1-page",
|
|
21117
21248
|
name: e.name ?? "Home",
|
|
21118
21249
|
slug: e.slug ?? "home",
|
|
@@ -21125,7 +21256,7 @@ var bf = (e, t = {}) => ({
|
|
|
21125
21256
|
children: []
|
|
21126
21257
|
}
|
|
21127
21258
|
});
|
|
21128
|
-
function
|
|
21259
|
+
function Sf(e, t = {}) {
|
|
21129
21260
|
let n = {
|
|
21130
21261
|
warnings: [],
|
|
21131
21262
|
seen: /* @__PURE__ */ new Set(),
|
|
@@ -21135,33 +21266,33 @@ function xf(e, t = {}) {
|
|
|
21135
21266
|
capped: !1
|
|
21136
21267
|
}, r = {};
|
|
21137
21268
|
try {
|
|
21138
|
-
let i =
|
|
21269
|
+
let i = Y(e), a = Gd(i.body) ? i.body : null;
|
|
21139
21270
|
if (!a) return Q(n, "This doesn't look like a design from the old editor, so an empty page was made instead."), {
|
|
21140
|
-
page:
|
|
21271
|
+
page: xf(t),
|
|
21141
21272
|
warnings: n.warnings,
|
|
21142
21273
|
fidelity: "partial",
|
|
21143
21274
|
extras: r
|
|
21144
21275
|
};
|
|
21145
|
-
let o =
|
|
21276
|
+
let o = Y(a.style), { styles: s, unmapped: c } = nf(Object.fromEntries(Object.entries(o).filter(([e]) => ![
|
|
21146
21277
|
"customJs",
|
|
21147
21278
|
"customCss",
|
|
21148
21279
|
"favicon",
|
|
21149
21280
|
"contentMaxWidth"
|
|
21150
21281
|
].includes(e))));
|
|
21151
21282
|
c.length && (n.approx = !0, Q(n, `Some page-wide styling (${c.slice(0, 4).join(", ")}) can't be carried over.`));
|
|
21152
|
-
let l =
|
|
21153
|
-
l && (r.customJs = l),
|
|
21154
|
-
let u =
|
|
21283
|
+
let l = Z(o.customJs).trim();
|
|
21284
|
+
l && (r.customJs = l), Z(o.customCss).trim() && (n.approx = !0, Q(n, "The page's custom CSS can't be carried over; check the page's look.")), Z(o.favicon).trim() && (n.approx = !0, Q(n, "Set the site icon again in the site settings."));
|
|
21285
|
+
let u = xf(t, { ...s }), d = Z(o.contentMaxWidth).trim();
|
|
21155
21286
|
u.rootNode.styles.layoutMode = "flow", u.rootNode.styles.display = "flex", u.rootNode.styles.flexDirection = "column";
|
|
21156
|
-
let f =
|
|
21287
|
+
let f = X(a.rows, 200).filter(Gd), p = [];
|
|
21157
21288
|
if (f.forEach((e, t) => {
|
|
21158
|
-
let r =
|
|
21289
|
+
let r = bf(n, e, `v1-s${t + 1}`, 0, !0);
|
|
21159
21290
|
r && p.push(r);
|
|
21160
21291
|
}), d && d !== "1200px") {
|
|
21161
|
-
let e = d.toLowerCase() === "none" ? "100%" :
|
|
21292
|
+
let e = d.toLowerCase() === "none" ? "100%" : Xd(d);
|
|
21162
21293
|
if (e) for (let t of p) for (let n of t.children ?? []) n.styles.maxWidth = e;
|
|
21163
21294
|
}
|
|
21164
|
-
u.rootNode.children = p,
|
|
21295
|
+
u.rootNode.children = p, Cf(u.rootNode) > 40 && (n.lost = !0, Q(n, "Rows nested too deeply were left out."), u.rootNode.children = p.map((e) => wf(e, 0)));
|
|
21165
21296
|
let m = n.lost ? "partial" : n.approx ? "approximate" : "exact";
|
|
21166
21297
|
return {
|
|
21167
21298
|
page: u,
|
|
@@ -21171,26 +21302,26 @@ function xf(e, t = {}) {
|
|
|
21171
21302
|
};
|
|
21172
21303
|
} catch {
|
|
21173
21304
|
return {
|
|
21174
|
-
page:
|
|
21305
|
+
page: xf(t),
|
|
21175
21306
|
warnings: [...n.warnings, "This design could not be read, so an empty page was made instead."],
|
|
21176
21307
|
fidelity: "partial",
|
|
21177
21308
|
extras: r
|
|
21178
21309
|
};
|
|
21179
21310
|
}
|
|
21180
21311
|
}
|
|
21181
|
-
function
|
|
21312
|
+
function Cf(e) {
|
|
21182
21313
|
let t = 0;
|
|
21183
|
-
for (let n of e.children ?? []) t = Math.max(t,
|
|
21314
|
+
for (let n of e.children ?? []) t = Math.max(t, Cf(n));
|
|
21184
21315
|
return t + 1;
|
|
21185
21316
|
}
|
|
21186
|
-
function
|
|
21317
|
+
function wf(e, t) {
|
|
21187
21318
|
return t >= 38 ? {
|
|
21188
21319
|
...e,
|
|
21189
21320
|
children: []
|
|
21190
21321
|
} : {
|
|
21191
21322
|
...e,
|
|
21192
|
-
children: e.children?.map((e) =>
|
|
21323
|
+
children: e.children?.map((e) => wf(e, t + 1))
|
|
21193
21324
|
};
|
|
21194
21325
|
}
|
|
21195
21326
|
//#endregion
|
|
21196
|
-
export { Qs as $, ua as $t, tl as A, ye as An, Fa as At, Pc as B, Zi as Bt, ql as C, Fe as Cn, Qa as Ct, Sl as D, ve as Dn, Ka as Dt, Ml as E, De as En, Va as Et, $c as F, ge as Fn, ja as Ft, Kc as G, ha as Gt, Ac as H, Ri as Ht, lc as I, me as In, Ca as It, sc as J, Qi as Jt, cc as K, la as Kt, uc as L, pe as Ln, ma as Lt, rl as M, Te as Mn, Da as Mt, nl as N, be as Nn, Pa as Nt, Cl as O, we as On, La as Ot, el as P, he as Pn, ka as Pt, Vs as Q, ra as Qt, Jc as R, D as Rn, ca as Rt, Jl as S, Re as Sn, oo as St, Gl as T, Ae as Tn, Ba as Tt, Qc as U, oa as Ut, Gc as V, fa as Vt, Yc as W, sa as Wt, oc as X, da as Xt, nc as Y, ga as Yt, tc as Z, na as Zt, du as _, Me as _n, io as _t, kd as a, ji as an, Ls as at, $l as b, Pe as bn, no as bt, Od as c, Xt as cn, Zo as ct, ku as d, Bt as dn, bo as dt, aa as en, Us as et, Au as f, Ht as fn, lo as ft, fu as g, pt as gn, so as gt, vu as h, dt as hn, ao as ht, Ad as i,
|
|
21327
|
+
export { Qs as $, ua as $t, tl as A, ye as An, Fa as At, Pc as B, Zi as Bt, ql as C, Fe as Cn, Qa as Ct, Sl as D, ve as Dn, Ka as Dt, Ml as E, De as En, Va as Et, $c as F, ge as Fn, ja as Ft, Kc as G, ha as Gt, Ac as H, Ri as Ht, lc as I, me as In, Ca as It, sc as J, Qi as Jt, cc as K, la as Kt, uc as L, pe as Ln, ma as Lt, rl as M, Te as Mn, Da as Mt, nl as N, be as Nn, Pa as Nt, Cl as O, we as On, La as Ot, el as P, he as Pn, ka as Pt, Vs as Q, ra as Qt, Jc as R, D as Rn, ca as Rt, Jl as S, Re as Sn, oo as St, Gl as T, Ae as Tn, Ba as Tt, Qc as U, oa as Ut, Gc as V, fa as Vt, Yc as W, sa as Wt, oc as X, da as Xt, nc as Y, ga as Yt, tc as Z, na as Zt, du as _, Me as _n, io as _t, kd as a, ji as an, Ls as at, $l as b, Pe as bn, no as bt, Od as c, Xt as cn, Zo as ct, ku as d, Bt as dn, bo as dt, aa as en, Us as et, Au as f, Ht as fn, lo as ft, fu as g, pt as gn, so as gt, vu as h, dt as hn, ao as ht, Ad as i, B as in, Ns as it, il as j, xe as jn, Na as jt, xl as k, Se as kn, Ta as kt, Lu as l, At as ln, So as lt, gu as m, Dt as mn, eo as mt, Hd as n, va as nn, Bs as nt, Bd as o, F as on, ks as ot, Du as p, jt as pn, uo as pt, ec as q, Sa as qt, Sf as r, Mi as rn, zs as rt, td as s, Qt as sn, $o as st, Vd as t, ia as tn, Xs as tt, Mu as u, Vt as un, xo as ut, lu as v, Ne as vn, po as vt, Kl as w, Le as wn, fo as wt, Xl as x, ze as xn, Za as xt, Ql as y, Be as yn, co as yt, Wc as z, V as zt };
|