@charisol/plexo-sdk 1.1.2 → 1.1.4
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/{compiler-Do7SiKdp.js → compiler-BpXCk9OP.js} +177 -189
- package/dist/compiler.js +1 -1
- package/dist/compilerClient.js +94 -90
- package/dist/{iconSvgStatic-DKNX8fUj.js → iconSvgStatic-CeiuMavi.js} +62 -50
- package/dist/index.js +387 -390
- package/dist/utilities/elementResolvers.d.ts +8 -0
- package/dist/utilities/tierFeatures.d.ts +0 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l,
|
|
2
|
-
import { _ as g, a as _, b as v, c as y, d as b, f as x, g as S, h as ee, i as C, m as w, n as T, o as te, p as ne, r as re, u as ie, x as ae, y as oe } from "./compiler-
|
|
1
|
+
import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, o as u, p as d, r as f, s as p, u as m, v as h } from "./iconSvgStatic-CeiuMavi.js";
|
|
2
|
+
import { _ as g, a as _, b as v, c as y, d as b, f as x, g as S, h as ee, i as C, m as w, n as T, o as te, p as ne, r as re, u as ie, x as ae, y as oe } from "./compiler-BpXCk9OP.js";
|
|
3
3
|
import { parseJsonToTargetFormat as se } from "./compilerClient.js";
|
|
4
4
|
import ce, { createContext as le, createElement as E, forwardRef as ue, useCallback as de, useContext as fe, useEffect as D, useImperativeHandle as pe, useMemo as me, useRef as he, useState as O } from "react";
|
|
5
5
|
import { DndContext as ge, DragOverlay as k, PointerSensor as _e, TouchSensor as A, pointerWithin as ve, rectIntersection as ye, useDraggable as be, useDroppable as xe, useSensor as j, useSensors as Se } from "@dnd-kit/core";
|
|
@@ -206,47 +206,47 @@ var R = Object.defineProperty, Ee = (e, t) => {
|
|
|
206
206
|
template: r
|
|
207
207
|
} : {};
|
|
208
208
|
}),
|
|
209
|
-
addElement: (n, r, i,
|
|
210
|
-
let n = JSON.parse(JSON.stringify(t.template)),
|
|
209
|
+
addElement: (n, r, i, a) => t((t) => {
|
|
210
|
+
let n = JSON.parse(JSON.stringify(t.template)), o = (e, t) => {
|
|
211
211
|
for (let n of e) for (let e of n.columns) {
|
|
212
212
|
if (e.id === t) return e;
|
|
213
|
-
let n =
|
|
213
|
+
let n = o(e.nestedRows || [], t);
|
|
214
214
|
if (n) return n;
|
|
215
215
|
}
|
|
216
216
|
return null;
|
|
217
|
-
},
|
|
218
|
-
if (!
|
|
219
|
-
let
|
|
220
|
-
return
|
|
217
|
+
}, s = o(n.body.rows, r);
|
|
218
|
+
if (!s) return {};
|
|
219
|
+
let c = Me(i), l = e(s);
|
|
220
|
+
return s.elements.push(c), s.childOrder = h(l, c.id, a), {
|
|
221
221
|
past: [...t.past, JSON.parse(JSON.stringify(t.template))],
|
|
222
222
|
future: [],
|
|
223
223
|
template: n
|
|
224
224
|
};
|
|
225
225
|
}),
|
|
226
|
-
moveElement: (n, r, i,
|
|
227
|
-
let r = JSON.parse(JSON.stringify(t.template)),
|
|
226
|
+
moveElement: (n, r, i, a) => t((t) => {
|
|
227
|
+
let r = JSON.parse(JSON.stringify(t.template)), o = (e, t) => {
|
|
228
228
|
for (let n of e) for (let e of n.columns) {
|
|
229
229
|
if (e.id === t) return e;
|
|
230
|
-
let n =
|
|
230
|
+
let n = o(e.nestedRows || [], t);
|
|
231
231
|
if (n) return n;
|
|
232
232
|
}
|
|
233
233
|
return null;
|
|
234
|
-
},
|
|
234
|
+
}, s = o(r.body.rows, i), c = s ? e(s).indexOf(n) : -1, l = (e) => {
|
|
235
235
|
for (let t of e) for (let e of t.columns) {
|
|
236
236
|
let t = e.elements.findIndex((e) => e.id === n);
|
|
237
237
|
if (t !== -1) return e.elements.splice(t, 1)[0];
|
|
238
|
-
let r =
|
|
238
|
+
let r = l(e.nestedRows || []);
|
|
239
239
|
if (r) return r;
|
|
240
240
|
}
|
|
241
241
|
return null;
|
|
242
|
-
},
|
|
242
|
+
}, u = l(r.body.rows);
|
|
243
|
+
if (!u) return {};
|
|
244
|
+
let d = o(r.body.rows, i);
|
|
243
245
|
if (!d) return {};
|
|
244
|
-
let f =
|
|
245
|
-
|
|
246
|
-
let p
|
|
247
|
-
f.
|
|
248
|
-
let m;
|
|
249
|
-
return typeof o == "number" ? (m = o, l !== -1 && l < m && --m) : m = p.length, f.childOrder = e(p, n, m), {
|
|
246
|
+
let f = e(d).filter((e) => e !== n);
|
|
247
|
+
d.elements.push(u);
|
|
248
|
+
let p;
|
|
249
|
+
return typeof a == "number" ? (p = a, c !== -1 && c < p && --p) : p = f.length, d.childOrder = h(f, n, p), {
|
|
250
250
|
past: [...t.past, JSON.parse(JSON.stringify(t.template))],
|
|
251
251
|
future: [],
|
|
252
252
|
template: r
|
|
@@ -299,21 +299,21 @@ var R = Object.defineProperty, Ee = (e, t) => {
|
|
|
299
299
|
};
|
|
300
300
|
}),
|
|
301
301
|
duplicateElement: (n) => t((t) => {
|
|
302
|
-
let r = JSON.parse(JSON.stringify(t.template)), i = null,
|
|
302
|
+
let r = JSON.parse(JSON.stringify(t.template)), i = null, a = -1, o = null, s = (e) => {
|
|
303
303
|
for (let t of e) for (let e of t.columns) {
|
|
304
304
|
let t = e.elements.findIndex((e) => e.id === n);
|
|
305
|
-
if (t !== -1) return i = e,
|
|
306
|
-
if (
|
|
305
|
+
if (t !== -1) return i = e, a = t, o = e.elements[t], !0;
|
|
306
|
+
if (s(e.nestedRows || [])) return !0;
|
|
307
307
|
}
|
|
308
308
|
return !1;
|
|
309
309
|
};
|
|
310
|
-
if (
|
|
311
|
-
let
|
|
312
|
-
|
|
313
|
-
let
|
|
314
|
-
|
|
315
|
-
let
|
|
316
|
-
return
|
|
310
|
+
if (s(r.body.rows), !i || !o) return {};
|
|
311
|
+
let c = JSON.parse(JSON.stringify(o));
|
|
312
|
+
c.id = `elem-${c.type}-${Date.now()}`;
|
|
313
|
+
let l = i, u = e(l);
|
|
314
|
+
l.elements.splice(a + 1, 0, c);
|
|
315
|
+
let d = u.indexOf(n);
|
|
316
|
+
return l.childOrder = h(u, c.id, d === -1 ? void 0 : d + 1), {
|
|
317
317
|
past: [...t.past, JSON.parse(JSON.stringify(t.template))],
|
|
318
318
|
future: [],
|
|
319
319
|
template: r
|
|
@@ -523,19 +523,19 @@ var R = Object.defineProperty, Ee = (e, t) => {
|
|
|
523
523
|
template: i
|
|
524
524
|
}) : {};
|
|
525
525
|
}),
|
|
526
|
-
nestRowInColumn: (n, r, i,
|
|
527
|
-
let
|
|
528
|
-
if (
|
|
529
|
-
let [
|
|
526
|
+
nestRowInColumn: (n, r, i, a) => t((t) => {
|
|
527
|
+
let o = JSON.parse(JSON.stringify(t.template)), s = o.body.rows.findIndex((e) => e.id === n);
|
|
528
|
+
if (s === -1) return {};
|
|
529
|
+
let [c] = o.body.rows.splice(s, 1), l = o.body.rows.find((e) => e.id === r);
|
|
530
|
+
if (!l) return {};
|
|
531
|
+
let u = l.columns.find((e) => e.id === i);
|
|
530
532
|
if (!u) return {};
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
let f = a(d);
|
|
535
|
-
return d.nestedRows.push(l), d.childOrder = e(f, n, o), {
|
|
533
|
+
u.nestedRows ||= [];
|
|
534
|
+
let d = e(u);
|
|
535
|
+
return u.nestedRows.push(c), u.childOrder = h(d, n, a), {
|
|
536
536
|
past: [...t.past, JSON.parse(JSON.stringify(t.template))],
|
|
537
537
|
future: [],
|
|
538
|
-
template:
|
|
538
|
+
template: o
|
|
539
539
|
};
|
|
540
540
|
}),
|
|
541
541
|
moveNestedRowToTopLevel: (e, n, r, i) => t((t) => {
|
|
@@ -561,20 +561,20 @@ var R = Object.defineProperty, Ee = (e, t) => {
|
|
|
561
561
|
template: a
|
|
562
562
|
};
|
|
563
563
|
}),
|
|
564
|
-
moveNestedRowBetweenColumns: (n, r, i, o, s
|
|
565
|
-
let
|
|
564
|
+
moveNestedRowBetweenColumns: (n, r, i, a, o, s) => t((t) => {
|
|
565
|
+
let c = JSON.parse(JSON.stringify(t.template)), l = (e, t, n) => {
|
|
566
566
|
for (let r of e) {
|
|
567
567
|
if (r.id === n) {
|
|
568
568
|
let e = r.columns.find((e) => e.id === t);
|
|
569
569
|
if (e) return e;
|
|
570
570
|
}
|
|
571
571
|
for (let e of r.columns) {
|
|
572
|
-
let r =
|
|
572
|
+
let r = l(e.nestedRows || [], t, n);
|
|
573
573
|
if (r) return r;
|
|
574
574
|
}
|
|
575
575
|
}
|
|
576
576
|
return null;
|
|
577
|
-
},
|
|
577
|
+
}, u = l(c.body.rows, o, a), d = u ? e(u).indexOf(n) : -1, f = (e) => {
|
|
578
578
|
for (let t of e) for (let e of t.columns) {
|
|
579
579
|
if (e.id === i && t.id === r) {
|
|
580
580
|
let t = (e.nestedRows || []).findIndex((e) => e.id === n);
|
|
@@ -583,22 +583,22 @@ var R = Object.defineProperty, Ee = (e, t) => {
|
|
|
583
583
|
return n;
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
|
-
let a =
|
|
586
|
+
let a = f(e.nestedRows || []);
|
|
587
587
|
if (a) return a;
|
|
588
588
|
}
|
|
589
589
|
return null;
|
|
590
|
-
},
|
|
590
|
+
}, p = f(c.body.rows);
|
|
591
|
+
if (!p) return {};
|
|
592
|
+
let m = l(c.body.rows, o, a);
|
|
591
593
|
if (!m) return {};
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
let g = a(h).filter((e) => e !== n);
|
|
596
|
-
h.nestedRows.push(m);
|
|
594
|
+
m.nestedRows ||= [];
|
|
595
|
+
let g = e(m).filter((e) => e !== n);
|
|
596
|
+
m.nestedRows.push(p);
|
|
597
597
|
let _;
|
|
598
|
-
return typeof
|
|
598
|
+
return typeof s == "number" ? (_ = s, d !== -1 && d < _ && --_) : _ = g.length, m.childOrder = h(g, n, _), {
|
|
599
599
|
past: [...t.past, JSON.parse(JSON.stringify(t.template))],
|
|
600
600
|
future: [],
|
|
601
|
-
template:
|
|
601
|
+
template: c
|
|
602
602
|
};
|
|
603
603
|
})
|
|
604
604
|
})), Fe = "https://plexo.charisol.io";
|
|
@@ -45488,7 +45488,7 @@ var HV = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
|
|
|
45488
45488
|
style: a
|
|
45489
45489
|
}), /* @__PURE__ */ P(ce.Fragment, { children: [o, s] }, t);
|
|
45490
45490
|
}, GV = (e) => {
|
|
45491
|
-
let t = BV(e.style), n =
|
|
45491
|
+
let t = BV(e.style), n = i(e), r = t.textAlign === "center" ? "center" : t.textAlign === "right" ? "flex-end" : "flex-start";
|
|
45492
45492
|
return /* @__PURE__ */ N("div", {
|
|
45493
45493
|
"data-plexo-id": e.id,
|
|
45494
45494
|
style: {
|
|
@@ -45497,7 +45497,7 @@ var HV = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
|
|
|
45497
45497
|
display: "flex",
|
|
45498
45498
|
flexWrap: "wrap",
|
|
45499
45499
|
gap: e.style?.iconSpacing || "8px",
|
|
45500
|
-
justifyContent:
|
|
45500
|
+
justifyContent: r
|
|
45501
45501
|
},
|
|
45502
45502
|
children: n.map((e, t) => /* @__PURE__ */ N("a", {
|
|
45503
45503
|
href: e.url,
|
|
@@ -45518,7 +45518,7 @@ var HV = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
|
|
|
45518
45518
|
}, t))
|
|
45519
45519
|
}, e.id);
|
|
45520
45520
|
}, KV = (e) => {
|
|
45521
|
-
let t = BV(e.style), n =
|
|
45521
|
+
let t = BV(e.style), n = r(e), i = t.textAlign === "center" ? "center" : t.textAlign === "right" ? "flex-end" : "flex-start";
|
|
45522
45522
|
return /* @__PURE__ */ N("div", {
|
|
45523
45523
|
"data-plexo-id": e.id,
|
|
45524
45524
|
style: {
|
|
@@ -45526,7 +45526,7 @@ var HV = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
|
|
|
45526
45526
|
display: "flex",
|
|
45527
45527
|
flexWrap: "wrap",
|
|
45528
45528
|
gap: 16,
|
|
45529
|
-
justifyContent:
|
|
45529
|
+
justifyContent: i
|
|
45530
45530
|
},
|
|
45531
45531
|
children: n.map((e, n) => /* @__PURE__ */ N("a", {
|
|
45532
45532
|
href: e.href,
|
|
@@ -45539,7 +45539,7 @@ var HV = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
|
|
|
45539
45539
|
}, n))
|
|
45540
45540
|
}, e.id);
|
|
45541
45541
|
}, qV = (e) => {
|
|
45542
|
-
let t = BV(e.style), n = e.attributes || {}, r = t.fontSize || `${n.iconSize || 48}px`, i = t.color || "#1e293b", a = parseInt(String(r), 10) || 48, o = pN[
|
|
45542
|
+
let t = BV(e.style), n = e.attributes || {}, r = t.fontSize || `${n.iconSize || 48}px`, i = t.color || "#1e293b", a = parseInt(String(r), 10) || 48, o = pN[m(n.iconName, Object.keys(pN))] || sc, s = t.textAlign === "right" ? "flex-end" : t.textAlign === "left" ? "flex-start" : "center", c = typeof n.href == "string" ? n.href.trim() : "", l = /* @__PURE__ */ N("span", {
|
|
45543
45543
|
style: {
|
|
45544
45544
|
display: "inline-flex",
|
|
45545
45545
|
alignItems: "center",
|
|
@@ -45558,19 +45558,19 @@ var HV = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
|
|
|
45558
45558
|
display: "flex",
|
|
45559
45559
|
justifyContent: s
|
|
45560
45560
|
},
|
|
45561
|
-
children:
|
|
45561
|
+
children: c ? /* @__PURE__ */ N("a", {
|
|
45562
45562
|
"data-plexo-id": e.id,
|
|
45563
|
-
href:
|
|
45563
|
+
href: c,
|
|
45564
45564
|
target: n.openInNewTab ? "_blank" : "_self",
|
|
45565
45565
|
style: { textDecoration: "none" },
|
|
45566
|
-
children:
|
|
45566
|
+
children: l
|
|
45567
45567
|
}) : /* @__PURE__ */ N("span", {
|
|
45568
45568
|
"data-plexo-id": e.id,
|
|
45569
|
-
children:
|
|
45569
|
+
children: l
|
|
45570
45570
|
})
|
|
45571
45571
|
}, e.id);
|
|
45572
45572
|
}, JV = (e) => {
|
|
45573
|
-
let t = BV(e.style), n =
|
|
45573
|
+
let t = BV(e.style), n = d(e), r = `${t.borderWidth || "1px"} ${t.borderStyle || "solid"} ${t.borderColor || "#cbd5e1"}`, i = (e, i, a, o) => {
|
|
45574
45574
|
let s = a ? "th" : "td", c = a ? t.headerBgColor || "#f8fafc" : n.striped && i % 2 == 1 ? "#f8fafc" : t.contentBgColor || "#ffffff", l = a ? t.headerTextColor || "#1e293b" : t.contentTextColor || "#475569", u = a ? t.headerTextAlign || "left" : t.contentTextAlign || "left";
|
|
45575
45575
|
return /* @__PURE__ */ N("tr", { children: e.map((e, n) => /* @__PURE__ */ N(s, {
|
|
45576
45576
|
style: {
|
|
@@ -45585,7 +45585,7 @@ var HV = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
|
|
|
45585
45585
|
},
|
|
45586
45586
|
children: e || "\xA0"
|
|
45587
45587
|
}, n)) }, o);
|
|
45588
|
-
},
|
|
45588
|
+
}, a = +!!n.enableHeader, o = n.enableFooter ? n.cells.length - 1 : n.cells.length;
|
|
45589
45589
|
return /* @__PURE__ */ N("div", {
|
|
45590
45590
|
"data-plexo-id": e.id,
|
|
45591
45591
|
style: {
|
|
@@ -45599,14 +45599,14 @@ var HV = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
|
|
|
45599
45599
|
width: "100%"
|
|
45600
45600
|
},
|
|
45601
45601
|
children: [
|
|
45602
|
-
n.enableHeader && n.cells.length > 0 && /* @__PURE__ */ N("thead", { children:
|
|
45603
|
-
/* @__PURE__ */ N("tbody", { children: n.cells.slice(
|
|
45604
|
-
n.enableFooter && n.cells.length >
|
|
45602
|
+
n.enableHeader && n.cells.length > 0 && /* @__PURE__ */ N("thead", { children: i(n.cells[0], 0, !0, "head") }),
|
|
45603
|
+
/* @__PURE__ */ N("tbody", { children: n.cells.slice(a, Math.max(a, o)).map((e, t) => i(e, t, !1, `body-${t}`)) }),
|
|
45604
|
+
n.enableFooter && n.cells.length > a && /* @__PURE__ */ N("tfoot", { children: i(n.cells[n.cells.length - 1], n.cells.length - 1, !1, "foot") })
|
|
45605
45605
|
]
|
|
45606
45606
|
})
|
|
45607
45607
|
}, e.id);
|
|
45608
45608
|
}, YV = (e) => {
|
|
45609
|
-
let t = BV(e.style), n = e.attributes || {}, r =
|
|
45609
|
+
let t = BV(e.style), n = e.attributes || {}, r = o(n.videoUrl), i = n.linkType === "email" ? `mailto:${n.href || ""}` : n.href || n.videoUrl || "#", a = n.target || "_blank";
|
|
45610
45610
|
return /* @__PURE__ */ N("div", {
|
|
45611
45611
|
"data-plexo-id": e.id,
|
|
45612
45612
|
style: {
|
|
@@ -45661,7 +45661,7 @@ var HV = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
|
|
|
45661
45661
|
let e = setInterval(() => i(Date.now()), 1e3);
|
|
45662
45662
|
return () => clearInterval(e);
|
|
45663
45663
|
}, []);
|
|
45664
|
-
let a =
|
|
45664
|
+
let a = l(n.targetDate, n.timezone, r), o = n.showLabels !== !1, s = {
|
|
45665
45665
|
fontFamily: t.digitsFontFamily,
|
|
45666
45666
|
fontSize: t.digitsFontSize || "40px",
|
|
45667
45667
|
color: t.digitsColor || "#1e293b",
|
|
@@ -45670,7 +45670,7 @@ var HV = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
|
|
|
45670
45670
|
fontFamily: t.labelsFontFamily,
|
|
45671
45671
|
fontSize: t.labelsFontSize || "16px",
|
|
45672
45672
|
color: t.labelsColor || "#64748b"
|
|
45673
|
-
},
|
|
45673
|
+
}, u = (e, t, n) => /* @__PURE__ */ P("div", {
|
|
45674
45674
|
style: {
|
|
45675
45675
|
display: "inline-flex",
|
|
45676
45676
|
flexDirection: "column",
|
|
@@ -45694,10 +45694,10 @@ var HV = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
|
|
|
45694
45694
|
textAlign: "center"
|
|
45695
45695
|
},
|
|
45696
45696
|
children: /* @__PURE__ */ P("div", { children: [
|
|
45697
|
-
|
|
45698
|
-
|
|
45699
|
-
|
|
45700
|
-
|
|
45697
|
+
u("Days", a.days, "d"),
|
|
45698
|
+
u("Hours", a.hours, "h"),
|
|
45699
|
+
u("Mins", a.minutes, "m"),
|
|
45700
|
+
u("Secs", a.seconds, "s")
|
|
45701
45701
|
] })
|
|
45702
45702
|
});
|
|
45703
45703
|
}, ZV = ({ elem: e }) => {
|
|
@@ -45806,7 +45806,7 @@ var HV = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
|
|
|
45806
45806
|
]
|
|
45807
45807
|
});
|
|
45808
45808
|
}, QV = ({ elem: e }) => {
|
|
45809
|
-
let t = BV(e.style), n = e.attributes || {}, r = me(() =>
|
|
45809
|
+
let t = BV(e.style), n = e.attributes || {}, r = me(() => f(e), [e]), i = n.mode === "multi" ? "multi" : "single", a = n.iconStyle || "chevron", o = n.iconPosition === "left", s = n.showDividers !== !1, c = n.animation !== "none", [l, u] = O(me(() => {
|
|
45810
45810
|
let e = /* @__PURE__ */ new Set(), t = (n, r) => {
|
|
45811
45811
|
n.forEach((n, i) => {
|
|
45812
45812
|
let a = r ? `${r}.${i}` : `${i}`;
|
|
@@ -45814,8 +45814,8 @@ var HV = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
|
|
|
45814
45814
|
});
|
|
45815
45815
|
};
|
|
45816
45816
|
return t(r, ""), e;
|
|
45817
|
-
}, [r])),
|
|
45818
|
-
|
|
45817
|
+
}, [r])), d = (e, t) => {
|
|
45818
|
+
u((n) => {
|
|
45819
45819
|
let r = new Set(n), a = r.has(e);
|
|
45820
45820
|
return i !== "multi" && t.forEach((e) => r.delete(e)), a ? r.delete(e) : r.add(e), r;
|
|
45821
45821
|
});
|
|
@@ -45863,7 +45863,7 @@ var HV = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
|
|
|
45863
45863
|
children: [/* @__PURE__ */ P("button", {
|
|
45864
45864
|
type: "button",
|
|
45865
45865
|
"aria-expanded": u,
|
|
45866
|
-
onClick: () =>
|
|
45866
|
+
onClick: () => d(a, r),
|
|
45867
45867
|
style: {
|
|
45868
45868
|
width: "100%",
|
|
45869
45869
|
display: "flex",
|
|
@@ -45925,31 +45925,31 @@ var HV = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
|
|
|
45925
45925
|
function $V(e) {
|
|
45926
45926
|
return null;
|
|
45927
45927
|
}
|
|
45928
|
-
var eH = ({ template:
|
|
45929
|
-
let
|
|
45928
|
+
var eH = ({ template: r, customCss: i, className: a, style: o }) => {
|
|
45929
|
+
let s = me(() => {
|
|
45930
45930
|
try {
|
|
45931
|
-
let
|
|
45932
|
-
typeof
|
|
45933
|
-
let
|
|
45934
|
-
return
|
|
45931
|
+
let e = r;
|
|
45932
|
+
typeof r == "string" && (e = EV(r));
|
|
45933
|
+
let t = TV(e), n = RV.safeParse(t);
|
|
45934
|
+
return n.success ? n.data : (console.error("PlexoRenderer schema validation failed:", n.error), null);
|
|
45935
45935
|
} catch (e) {
|
|
45936
45936
|
return console.error("PlexoRenderer validation error:", e), null;
|
|
45937
45937
|
}
|
|
45938
|
-
}, [
|
|
45939
|
-
if (!
|
|
45940
|
-
let e =
|
|
45938
|
+
}, [r]), l = me(() => {
|
|
45939
|
+
if (!s) return null;
|
|
45940
|
+
let e = s.body;
|
|
45941
45941
|
return x(ne(e.rows, [e.style?.fontFamily]));
|
|
45942
|
-
}, [
|
|
45943
|
-
if (!
|
|
45942
|
+
}, [s]);
|
|
45943
|
+
if (!s) return /* @__PURE__ */ N("div", {
|
|
45944
45944
|
className: "p-4 border border-rose-500 bg-rose-50/50 text-rose-700 rounded text-sm font-semibold",
|
|
45945
45945
|
children: "Error loading template: Security validation failed."
|
|
45946
45946
|
});
|
|
45947
|
-
let { body:
|
|
45947
|
+
let { body: d } = s, f = BV(d.style), m = {
|
|
45948
45948
|
tablet: [],
|
|
45949
45949
|
mobile: []
|
|
45950
45950
|
}, h = (e) => {
|
|
45951
|
-
let
|
|
45952
|
-
switch (re(
|
|
45951
|
+
let r = BV(e.style), a = e.attributes || {};
|
|
45952
|
+
switch (re(m, e.id, e.style, "tablet", e.styleTablet), re(m, e.id, e.style, "mobile", e.styleMobile), e.type) {
|
|
45953
45953
|
case "text":
|
|
45954
45954
|
case "paragraph": {
|
|
45955
45955
|
let t = e.type === "paragraph" ? "p" : "div";
|
|
@@ -45957,7 +45957,7 @@ var eH = ({ template: e, customCss: r, className: i, style: o }) => {
|
|
|
45957
45957
|
dataPlexoId: e.id,
|
|
45958
45958
|
tag: t,
|
|
45959
45959
|
html: a.text || "",
|
|
45960
|
-
style:
|
|
45960
|
+
style: r,
|
|
45961
45961
|
className: "plexo-element-text"
|
|
45962
45962
|
}, e.id);
|
|
45963
45963
|
}
|
|
@@ -45974,32 +45974,32 @@ var eH = ({ template: e, customCss: r, className: i, style: o }) => {
|
|
|
45974
45974
|
dataPlexoId: e.id,
|
|
45975
45975
|
tag: n,
|
|
45976
45976
|
html: a.text || "",
|
|
45977
|
-
style:
|
|
45977
|
+
style: r,
|
|
45978
45978
|
className: "plexo-element-heading"
|
|
45979
45979
|
}, e.id);
|
|
45980
45980
|
}
|
|
45981
45981
|
case "button": {
|
|
45982
|
-
let
|
|
45983
|
-
return
|
|
45982
|
+
let n = typeof a.href == "string" ? a.href.trim() : "", i = n && !n.toLowerCase().startsWith("javascript:") && !n.toLowerCase().startsWith("data:"), o = t(e);
|
|
45983
|
+
return i ? /* @__PURE__ */ N("a", {
|
|
45984
45984
|
"data-plexo-id": e.id,
|
|
45985
|
-
href:
|
|
45985
|
+
href: n,
|
|
45986
45986
|
target: "_blank",
|
|
45987
45987
|
rel: "noopener noreferrer",
|
|
45988
45988
|
style: {
|
|
45989
45989
|
display: "inline-block",
|
|
45990
45990
|
textDecoration: "none",
|
|
45991
|
-
...
|
|
45992
|
-
width:
|
|
45993
|
-
height:
|
|
45991
|
+
...r,
|
|
45992
|
+
width: o.width,
|
|
45993
|
+
height: o.height
|
|
45994
45994
|
},
|
|
45995
45995
|
className: "plexo-element-button",
|
|
45996
45996
|
children: a.text || "Button"
|
|
45997
45997
|
}, e.id) : /* @__PURE__ */ N("button", {
|
|
45998
45998
|
"data-plexo-id": e.id,
|
|
45999
45999
|
style: {
|
|
46000
|
-
...
|
|
46001
|
-
width:
|
|
46002
|
-
height:
|
|
46000
|
+
...r,
|
|
46001
|
+
width: o.width,
|
|
46002
|
+
height: o.height
|
|
46003
46003
|
},
|
|
46004
46004
|
className: "plexo-element-button",
|
|
46005
46005
|
disabled: !0,
|
|
@@ -46007,16 +46007,16 @@ var eH = ({ template: e, customCss: r, className: i, style: o }) => {
|
|
|
46007
46007
|
}, e.id);
|
|
46008
46008
|
}
|
|
46009
46009
|
case "image": {
|
|
46010
|
-
let t = typeof a.src == "string" ? a.src.trim() : "",
|
|
46010
|
+
let t = typeof a.src == "string" ? a.src.trim() : "", n = t && !t.toLowerCase().startsWith("javascript:") && !t.toLowerCase().startsWith("data:"), i = c(e);
|
|
46011
46011
|
return /* @__PURE__ */ N("img", {
|
|
46012
46012
|
"data-plexo-id": e.id,
|
|
46013
|
-
src:
|
|
46013
|
+
src: n ? t : "",
|
|
46014
46014
|
alt: a.alt || "",
|
|
46015
46015
|
style: {
|
|
46016
46016
|
maxWidth: "100%",
|
|
46017
|
-
...
|
|
46018
|
-
width:
|
|
46019
|
-
height:
|
|
46017
|
+
...r,
|
|
46018
|
+
width: i.width,
|
|
46019
|
+
height: i.height
|
|
46020
46020
|
},
|
|
46021
46021
|
className: "plexo-element-image"
|
|
46022
46022
|
}, e.id);
|
|
@@ -46024,27 +46024,27 @@ var eH = ({ template: e, customCss: r, className: i, style: o }) => {
|
|
|
46024
46024
|
case "spacer": return /* @__PURE__ */ N("div", {
|
|
46025
46025
|
"data-plexo-id": e.id,
|
|
46026
46026
|
style: {
|
|
46027
|
-
height:
|
|
46028
|
-
...
|
|
46027
|
+
height: r.height || "24px",
|
|
46028
|
+
...r
|
|
46029
46029
|
},
|
|
46030
46030
|
className: "plexo-element-spacer"
|
|
46031
46031
|
}, e.id);
|
|
46032
46032
|
case "divider": return /* @__PURE__ */ N("div", {
|
|
46033
46033
|
"data-plexo-id": e.id,
|
|
46034
46034
|
style: {
|
|
46035
|
-
padding:
|
|
46036
|
-
...
|
|
46035
|
+
padding: r.padding || "12px 0px",
|
|
46036
|
+
...r
|
|
46037
46037
|
},
|
|
46038
46038
|
className: "plexo-element-divider",
|
|
46039
46039
|
children: /* @__PURE__ */ N("hr", { style: {
|
|
46040
46040
|
border: "none",
|
|
46041
|
-
borderTop: `${
|
|
46041
|
+
borderTop: `${r.borderWidth || "1px"} ${r.borderStyle || "solid"} ${r.borderColor || "#cbd5e1"}`,
|
|
46042
46042
|
margin: 0
|
|
46043
46043
|
} })
|
|
46044
46044
|
}, e.id);
|
|
46045
46045
|
case "card": return /* @__PURE__ */ P("div", {
|
|
46046
46046
|
"data-plexo-id": e.id,
|
|
46047
|
-
style:
|
|
46047
|
+
style: r,
|
|
46048
46048
|
className: "plexo-element-card",
|
|
46049
46049
|
children: [a.title && /* @__PURE__ */ N("h3", {
|
|
46050
46050
|
style: {
|
|
@@ -46058,17 +46058,17 @@ var eH = ({ template: e, customCss: r, className: i, style: o }) => {
|
|
|
46058
46058
|
})]
|
|
46059
46059
|
}, e.id);
|
|
46060
46060
|
case "html": {
|
|
46061
|
-
let t = `<!DOCTYPE html><html><head><meta charset="utf-8">${
|
|
46061
|
+
let t = `<!DOCTYPE html><html><head><meta charset="utf-8">${i ? `<style>${i}</style>` : ""}</head><body>${a.htmlContent || ""}</body></html>`;
|
|
46062
46062
|
return /* @__PURE__ */ N("div", {
|
|
46063
46063
|
"data-plexo-id": e.id,
|
|
46064
|
-
style:
|
|
46064
|
+
style: r,
|
|
46065
46065
|
className: "plexo-element-html",
|
|
46066
46066
|
children: /* @__PURE__ */ N("iframe", {
|
|
46067
46067
|
srcDoc: t,
|
|
46068
46068
|
sandbox: "allow-scripts",
|
|
46069
46069
|
style: {
|
|
46070
46070
|
width: "100%",
|
|
46071
|
-
height:
|
|
46071
|
+
height: n(e, "300px"),
|
|
46072
46072
|
border: "none",
|
|
46073
46073
|
backgroundColor: "transparent"
|
|
46074
46074
|
},
|
|
@@ -46077,46 +46077,46 @@ var eH = ({ template: e, customCss: r, className: i, style: o }) => {
|
|
|
46077
46077
|
}, e.id);
|
|
46078
46078
|
}
|
|
46079
46079
|
case "form_container": {
|
|
46080
|
-
let
|
|
46080
|
+
let t = e.style || {}, n = {
|
|
46081
46081
|
...y(),
|
|
46082
|
-
...
|
|
46083
|
-
},
|
|
46084
|
-
for (let e of Object.keys(
|
|
46085
|
-
|
|
46086
|
-
let
|
|
46082
|
+
...t
|
|
46083
|
+
}, r = {};
|
|
46084
|
+
for (let e of Object.keys(n)) T.includes(e) || (r[e] = n[e]);
|
|
46085
|
+
r.height = u(e);
|
|
46086
|
+
let i = BV(r), o = p(Array.isArray(a.fields) ? a.fields : []), s = n.fieldSpacing || "12px", c = a.buttonAutoWidth === !1 ? n.buttonWidth || "100%" : "auto", l = n.buttonAlign === "left" ? "flex-start" : n.buttonAlign === "right" ? "flex-end" : "center", d = {
|
|
46087
46087
|
border: 0,
|
|
46088
46088
|
cursor: "pointer",
|
|
46089
46089
|
...BV({
|
|
46090
|
-
backgroundColor:
|
|
46091
|
-
color:
|
|
46092
|
-
borderRadius:
|
|
46093
|
-
paddingTop:
|
|
46094
|
-
paddingBottom:
|
|
46095
|
-
paddingLeft:
|
|
46096
|
-
paddingRight:
|
|
46097
|
-
fontSize:
|
|
46098
|
-
fontWeight:
|
|
46099
|
-
width:
|
|
46090
|
+
backgroundColor: n.buttonBackgroundColor,
|
|
46091
|
+
color: n.buttonTextColor,
|
|
46092
|
+
borderRadius: n.buttonBorderRadius,
|
|
46093
|
+
paddingTop: n.buttonPaddingTop,
|
|
46094
|
+
paddingBottom: n.buttonPaddingBottom,
|
|
46095
|
+
paddingLeft: n.buttonPaddingLeft,
|
|
46096
|
+
paddingRight: n.buttonPaddingRight,
|
|
46097
|
+
fontSize: n.buttonFontSize,
|
|
46098
|
+
fontWeight: n.buttonFontWeight,
|
|
46099
|
+
width: c
|
|
46100
46100
|
})
|
|
46101
|
-
},
|
|
46101
|
+
}, f = typeof a.actionUrl == "string" ? a.actionUrl : typeof a.action == "string" ? a.action : "#", m = typeof a.method == "string" ? a.method : "POST", h = a.submitLabel || "Submit";
|
|
46102
46102
|
return /* @__PURE__ */ P("form", {
|
|
46103
46103
|
"data-plexo-id": e.id,
|
|
46104
|
-
action:
|
|
46104
|
+
action: f,
|
|
46105
46105
|
method: m,
|
|
46106
|
-
style:
|
|
46106
|
+
style: i,
|
|
46107
46107
|
className: "plexo-element-form",
|
|
46108
|
-
children: [
|
|
46109
|
-
style: { marginBottom:
|
|
46108
|
+
children: [o.map((e, t) => /* @__PURE__ */ N("div", {
|
|
46109
|
+
style: { marginBottom: s },
|
|
46110
46110
|
children: WV(e, t)
|
|
46111
46111
|
}, e?.name || e?.label || t)), /* @__PURE__ */ N("div", {
|
|
46112
46112
|
style: {
|
|
46113
46113
|
display: "flex",
|
|
46114
46114
|
width: "100%",
|
|
46115
|
-
justifyContent:
|
|
46115
|
+
justifyContent: l
|
|
46116
46116
|
},
|
|
46117
46117
|
children: /* @__PURE__ */ N("button", {
|
|
46118
46118
|
type: "submit",
|
|
46119
|
-
style:
|
|
46119
|
+
style: d,
|
|
46120
46120
|
children: h
|
|
46121
46121
|
})
|
|
46122
46122
|
})]
|
|
@@ -46135,7 +46135,7 @@ var eH = ({ template: e, customCss: r, className: i, style: o }) => {
|
|
|
46135
46135
|
boxSizing: "border-box",
|
|
46136
46136
|
padding: "10px 12px",
|
|
46137
46137
|
...UV,
|
|
46138
|
-
...
|
|
46138
|
+
...r
|
|
46139
46139
|
}
|
|
46140
46140
|
}, e.id);
|
|
46141
46141
|
}
|
|
@@ -46151,7 +46151,7 @@ var eH = ({ template: e, customCss: r, className: i, style: o }) => {
|
|
|
46151
46151
|
boxSizing: "border-box",
|
|
46152
46152
|
padding: "10px 12px",
|
|
46153
46153
|
...UV,
|
|
46154
|
-
...
|
|
46154
|
+
...r
|
|
46155
46155
|
}
|
|
46156
46156
|
}, e.id);
|
|
46157
46157
|
}
|
|
@@ -46166,7 +46166,7 @@ var eH = ({ template: e, customCss: r, className: i, style: o }) => {
|
|
|
46166
46166
|
boxSizing: "border-box",
|
|
46167
46167
|
padding: "10px 12px",
|
|
46168
46168
|
...UV,
|
|
46169
|
-
...
|
|
46169
|
+
...r
|
|
46170
46170
|
},
|
|
46171
46171
|
children: n.map((e, t) => /* @__PURE__ */ N("option", {
|
|
46172
46172
|
value: e?.value ?? "",
|
|
@@ -46184,27 +46184,27 @@ var eH = ({ template: e, customCss: r, className: i, style: o }) => {
|
|
|
46184
46184
|
case "accordion": return /* @__PURE__ */ N(QV, { elem: e }, e.id);
|
|
46185
46185
|
default: return $V(e.type);
|
|
46186
46186
|
}
|
|
46187
|
-
}, g = (
|
|
46188
|
-
let
|
|
46189
|
-
return re(
|
|
46190
|
-
"data-plexo-id":
|
|
46187
|
+
}, g = (t) => {
|
|
46188
|
+
let n = BV(t.styles);
|
|
46189
|
+
return re(m, t.id, t.styles, "tablet", t.stylesTablet), re(m, t.id, t.styles, "mobile", t.stylesMobile), /* @__PURE__ */ N("div", {
|
|
46190
|
+
"data-plexo-id": t.id,
|
|
46191
46191
|
style: {
|
|
46192
|
-
width:
|
|
46192
|
+
width: t.width || "100%",
|
|
46193
46193
|
display: "flex",
|
|
46194
46194
|
flexDirection: "column",
|
|
46195
|
-
...
|
|
46195
|
+
...n
|
|
46196
46196
|
},
|
|
46197
46197
|
className: "plexo-column",
|
|
46198
|
-
children:
|
|
46199
|
-
let n =
|
|
46198
|
+
children: e(t).map((e) => {
|
|
46199
|
+
let n = t.elements.find((t) => t.id === e);
|
|
46200
46200
|
if (n) return h(n);
|
|
46201
|
-
let r =
|
|
46201
|
+
let r = t.nestedRows?.find((t) => t.id === e);
|
|
46202
46202
|
return r ? _(r) : null;
|
|
46203
46203
|
})
|
|
46204
|
-
},
|
|
46204
|
+
}, t.id);
|
|
46205
46205
|
}, _ = (e) => {
|
|
46206
46206
|
let t = BV(e.style);
|
|
46207
|
-
return re(
|
|
46207
|
+
return re(m, e.id, e.style, "tablet", e.styleTablet), re(m, e.id, e.style, "mobile", e.styleMobile), /* @__PURE__ */ N("div", {
|
|
46208
46208
|
id: e.htmlId,
|
|
46209
46209
|
"data-plexo-id": e.id,
|
|
46210
46210
|
className: `plexo-row ${e.htmlClass || ""}`,
|
|
@@ -46217,13 +46217,13 @@ var eH = ({ template: e, customCss: r, className: i, style: o }) => {
|
|
|
46217
46217
|
},
|
|
46218
46218
|
children: e.columns.map(g)
|
|
46219
46219
|
}, e.id);
|
|
46220
|
-
}, v =
|
|
46220
|
+
}, v = d.rows.map(_), b = m.tablet.length ? `\n ${m.tablet.join("\n ")}` : "", S = m.mobile.length ? `\n ${m.mobile.join("\n ")}` : "";
|
|
46221
46221
|
return /* @__PURE__ */ P("div", {
|
|
46222
46222
|
style: {
|
|
46223
46223
|
...f,
|
|
46224
46224
|
...o
|
|
46225
46225
|
},
|
|
46226
|
-
className: `plexo-renderer-root ${
|
|
46226
|
+
className: `plexo-renderer-root ${a || ""}`,
|
|
46227
46227
|
children: [
|
|
46228
46228
|
l && /* @__PURE__ */ N("link", {
|
|
46229
46229
|
rel: "stylesheet",
|
|
@@ -46237,7 +46237,7 @@ var eH = ({ template: e, customCss: r, className: i, style: o }) => {
|
|
|
46237
46237
|
.plexo-column { width: 100% !important; max-width: 100% !important; margin-bottom: 16px; }${S}
|
|
46238
46238
|
}
|
|
46239
46239
|
` }),
|
|
46240
|
-
|
|
46240
|
+
i && /* @__PURE__ */ N("style", { children: i }),
|
|
46241
46241
|
v
|
|
46242
46242
|
]
|
|
46243
46243
|
});
|
|
@@ -47027,21 +47027,18 @@ var vH = [
|
|
|
47027
47027
|
FREE: {
|
|
47028
47028
|
aiEnabled: !1,
|
|
47029
47029
|
strataEnabled: !1,
|
|
47030
|
-
landingPagesEnabled: !1,
|
|
47031
47030
|
advancedBlocksEnabled: !1,
|
|
47032
47031
|
stockImagesEnabled: !1
|
|
47033
47032
|
},
|
|
47034
47033
|
PRO: {
|
|
47035
47034
|
aiEnabled: !0,
|
|
47036
47035
|
strataEnabled: !0,
|
|
47037
|
-
landingPagesEnabled: !0,
|
|
47038
47036
|
advancedBlocksEnabled: !0,
|
|
47039
47037
|
stockImagesEnabled: !0
|
|
47040
47038
|
},
|
|
47041
47039
|
ULTRA: {
|
|
47042
47040
|
aiEnabled: !0,
|
|
47043
47041
|
strataEnabled: !0,
|
|
47044
|
-
landingPagesEnabled: !0,
|
|
47045
47042
|
advancedBlocksEnabled: !0,
|
|
47046
47043
|
stockImagesEnabled: !0
|
|
47047
47044
|
}
|
|
@@ -52671,7 +52668,7 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
52671
52668
|
defaultOpen: !1,
|
|
52672
52669
|
children: []
|
|
52673
52670
|
}), ZU = (e) => {
|
|
52674
|
-
let { selectedElement: t, currentAttrs: n, currentStyles: r, openAccordions: i, toggleAccordion:
|
|
52671
|
+
let { selectedElement: t, currentAttrs: n, currentStyles: r, openAccordions: i, toggleAccordion: o, onTransientAttrChange: s, onTransientStyleChange: c, AccordionSection: l, InlineTextInput: u, InlineSelect: d, InlineColorPicker: f, InlineCounter: p, Toggle: m, InlineTextArea: h, SpacingControls: g, BorderRadiusControls: _ } = e, [v, y] = O(0), [b, x] = O(null);
|
|
52675
52672
|
if (!t || t.type !== "accordion") return null;
|
|
52676
52673
|
let S = Array.isArray(n.items) ? n.items : [], ee = n.mode === "multi" ? "multi" : "single", C = (e) => s("items", e), w = S.length ? Math.min(v, S.length - 1) : 0, T = S[w], te = Array.isArray(T?.children) ? T.children : [], ne = b !== null && te.length ? Math.min(b, te.length - 1) : null, re = ne === null ? null : te[ne], ie = () => {
|
|
52677
52674
|
let e = [...S, XU(`Item ${S.length + 1}`, "Panel content goes here.")];
|
|
@@ -52689,7 +52686,7 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
52689
52686
|
...n,
|
|
52690
52687
|
...t
|
|
52691
52688
|
} : n));
|
|
52692
|
-
}, ce = (e) => C(
|
|
52689
|
+
}, ce = (e) => C(a(S, [e], ee)), le = (e, t) => C(a(S, [e, t], ee)), E = (e) => {
|
|
52693
52690
|
let t = S.map((t, n) => {
|
|
52694
52691
|
if (n !== e) return t;
|
|
52695
52692
|
let r = Array.isArray(t.children) ? t.children : [];
|
|
@@ -52726,7 +52723,7 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
52726
52723
|
/* @__PURE__ */ N(l, {
|
|
52727
52724
|
title: "Items",
|
|
52728
52725
|
isOpen: i.link,
|
|
52729
|
-
onToggle: () =>
|
|
52726
|
+
onToggle: () => o("link"),
|
|
52730
52727
|
children: /* @__PURE__ */ P("div", {
|
|
52731
52728
|
className: "flex flex-col gap-2",
|
|
52732
52729
|
children: [
|
|
@@ -52870,7 +52867,7 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
52870
52867
|
/* @__PURE__ */ N(l, {
|
|
52871
52868
|
title: "Behavior",
|
|
52872
52869
|
isOpen: i.typography,
|
|
52873
|
-
onToggle: () =>
|
|
52870
|
+
onToggle: () => o("typography"),
|
|
52874
52871
|
children: /* @__PURE__ */ P("div", {
|
|
52875
52872
|
className: "flex flex-col gap-1",
|
|
52876
52873
|
children: [
|
|
@@ -52937,7 +52934,7 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
52937
52934
|
/* @__PURE__ */ N(l, {
|
|
52938
52935
|
title: "Header styling",
|
|
52939
52936
|
isOpen: i.styling,
|
|
52940
|
-
onToggle: () =>
|
|
52937
|
+
onToggle: () => o("styling"),
|
|
52941
52938
|
children: /* @__PURE__ */ P("div", {
|
|
52942
52939
|
className: "flex flex-col gap-1",
|
|
52943
52940
|
children: [
|
|
@@ -53012,7 +53009,7 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
53012
53009
|
/* @__PURE__ */ N(l, {
|
|
53013
53010
|
title: "Content & layout",
|
|
53014
53011
|
isOpen: i.spacing,
|
|
53015
|
-
onToggle: () =>
|
|
53012
|
+
onToggle: () => o("spacing"),
|
|
53016
53013
|
children: /* @__PURE__ */ P("div", {
|
|
53017
53014
|
className: "flex flex-col gap-1",
|
|
53018
53015
|
children: [
|
|
@@ -53267,18 +53264,18 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
53267
53264
|
...e,
|
|
53268
53265
|
parentRowId: e.parentRowId,
|
|
53269
53266
|
parentColId: e.parentColId
|
|
53270
|
-
}) : /* @__PURE__ */ N(rW, { ...e }), oW = ({ col:
|
|
53267
|
+
}) : /* @__PURE__ */ N(rW, { ...e }), oW = ({ col: t, rowId: n, parentRowId: r, parentColId: i, selectedColumnId: a, selectColumn: o, previewMode: s, children: c, deviceView: l }) => {
|
|
53271
53268
|
let { setNodeRef: u, isOver: d } = xe({
|
|
53272
|
-
id:
|
|
53269
|
+
id: t.id,
|
|
53273
53270
|
data: {
|
|
53274
53271
|
type: "column",
|
|
53275
|
-
id:
|
|
53276
|
-
rowId:
|
|
53277
|
-
parentRowId:
|
|
53278
|
-
parentColId:
|
|
53272
|
+
id: t.id,
|
|
53273
|
+
rowId: n,
|
|
53274
|
+
parentRowId: r,
|
|
53275
|
+
parentColId: i
|
|
53279
53276
|
},
|
|
53280
53277
|
disabled: s
|
|
53281
|
-
}), f =
|
|
53278
|
+
}), f = a === t.id, p = e(t), m = l === "tablet" ? "tablet" : l === "mobile" ? "mobile" : null, h = m === "tablet" ? t.stylesTablet : m === "mobile" ? t.stylesMobile : void 0, g = b(t.styles, h, m), _ = g.display, v = _ === "flex" || _ === "block" || _ === "inline-flex", y = v ? "min-h-[50px] h-full" : "flex flex-col gap-2.5 min-h-[50px] h-full", x = v ? {
|
|
53282
53279
|
display: _,
|
|
53283
53280
|
flexDirection: g.flexDirection,
|
|
53284
53281
|
flexWrap: g.flexWrap,
|
|
@@ -53288,21 +53285,21 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
53288
53285
|
} : { justifyContent: g.justifyContent || "flex-start" };
|
|
53289
53286
|
return /* @__PURE__ */ P("div", {
|
|
53290
53287
|
ref: u,
|
|
53291
|
-
id:
|
|
53288
|
+
id: t.id,
|
|
53292
53289
|
"data-plexo-node-type": "column",
|
|
53293
|
-
onClick: (
|
|
53294
|
-
s || (
|
|
53290
|
+
onClick: (e) => {
|
|
53291
|
+
s || (e.stopPropagation(), o(t.id));
|
|
53295
53292
|
},
|
|
53296
53293
|
className: `plexo-editor-col relative transition duration-150 p-2 min-h-[90px] flex flex-col gap-2 rounded ${s ? "cursor-default" : "cursor-pointer"} ${!s && d ? "outline outline-1 outline-dashed outline-indigo-500 bg-indigo-500/5" : !s && f ? "outline outline-1 outline-indigo-500 bg-indigo-500/5" : s ? "" : "hover:outline hover:outline-1 hover:outline-slate-200 bg-slate-55"}`,
|
|
53297
53294
|
style: {
|
|
53298
|
-
width:
|
|
53295
|
+
width: t.width,
|
|
53299
53296
|
...g
|
|
53300
53297
|
},
|
|
53301
53298
|
children: [!s && f && /* @__PURE__ */ P("span", {
|
|
53302
53299
|
className: "absolute -top-3 left-2 bg-[#0c1221] border border-slate-700 text-slate-200 font-mono text-[8px] px-2 py-0.5 rounded-md font-bold z-30 pointer-events-none shadow-sm",
|
|
53303
53300
|
children: [
|
|
53304
53301
|
"Column (",
|
|
53305
|
-
|
|
53302
|
+
t.width,
|
|
53306
53303
|
")"
|
|
53307
53304
|
]
|
|
53308
53305
|
}), /* @__PURE__ */ N(F, {
|
|
@@ -53671,14 +53668,14 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
53671
53668
|
]
|
|
53672
53669
|
})]
|
|
53673
53670
|
});
|
|
53674
|
-
}, lW = ({ elem: e, columnId:
|
|
53671
|
+
}, lW = ({ elem: e, columnId: r, rowId: o, selectedElementId: m, selectElement: h, deviceView: g, transientStyle: _, transientAttr: v, updateElement: y, onTransientStyleChange: x, onTransientAttrChange: S, clearTransientOverrides: ee, duplicateElement: C, deleteElement: w, previewMode: T, useAi: te, aiProvider: ne, aiTier: re, apiKey: ie, externalUserId: ae, templateKind: oe, onRequestComment: se, ICONS: le, getFormFields: E, getDefaultStyle: ue, isElementHiddenForView: de, renderSocialIcon: pe, onNotify: me, textColor: ge = "#e2e8f0", backgroundColor: k = "#0e1526", customCss: _e = "", mergeTags: A = [], themeBgColor: ve = "#273df2" }) => {
|
|
53675
53672
|
let { attributes: ye, listeners: be, setNodeRef: xe, transform: j, transition: Se, isDragging: Ce, isOver: M } = I({
|
|
53676
53673
|
id: e.id,
|
|
53677
53674
|
data: {
|
|
53678
53675
|
type: "element",
|
|
53679
53676
|
id: e.id,
|
|
53680
|
-
columnId:
|
|
53681
|
-
rowId:
|
|
53677
|
+
columnId: r,
|
|
53678
|
+
rowId: o
|
|
53682
53679
|
},
|
|
53683
53680
|
disabled: T
|
|
53684
53681
|
}), F = fe(Ae), L = M && F.overId === e.id && F.edge === "bottom", [Te, R] = O(!1), [Ee, De] = O(!1), [Oe, ke] = O(""), je = Be({
|
|
@@ -53758,7 +53755,7 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
53758
53755
|
display: rt,
|
|
53759
53756
|
verticalAlign: "top"
|
|
53760
53757
|
} : {}
|
|
53761
|
-
}, ot =
|
|
53758
|
+
}, ot = m === e.id;
|
|
53762
53759
|
if (D(() => {
|
|
53763
53760
|
if (Je.current && document.activeElement !== Je.current) {
|
|
53764
53761
|
let t = e.type === "heading" ? "Heading Title" : e.type === "text" ? "Empty Text Block" : "Paragraph layout text content.", n = U.text || t;
|
|
@@ -53789,7 +53786,7 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
53789
53786
|
"h2",
|
|
53790
53787
|
"h3",
|
|
53791
53788
|
"h4"
|
|
53792
|
-
].includes(String(U.headingType || "").toLowerCase()) ? String(U.headingType).toLowerCase() : "h2", ut = e.type === "form_container" ? ue("form_container") : null, dt = e.type === "form_container" ?
|
|
53789
|
+
].includes(String(U.headingType || "").toLowerCase()) ? String(U.headingType).toLowerCase() : "h2", ut = e.type === "form_container" ? ue("form_container") : null, dt = e.type === "form_container" ? p(E(U)).map((e) => /* @__PURE__ */ P("div", {
|
|
53793
53790
|
className: "flex flex-col gap-1.5",
|
|
53794
53791
|
children: [e.showLabel !== !1 && /* @__PURE__ */ P("label", {
|
|
53795
53792
|
className: "font-bold uppercase tracking-[0.18em]",
|
|
@@ -54421,10 +54418,10 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
54421
54418
|
marginRight: H.marginRight,
|
|
54422
54419
|
marginBottom: H.marginBottom,
|
|
54423
54420
|
marginLeft: H.marginLeft,
|
|
54424
|
-
paddingTop:
|
|
54425
|
-
paddingBottom:
|
|
54426
|
-
paddingLeft:
|
|
54427
|
-
paddingRight:
|
|
54421
|
+
paddingTop: s(H.paddingTop, H.padding, "top", "10px"),
|
|
54422
|
+
paddingBottom: s(H.paddingBottom, H.padding, "bottom", "10px"),
|
|
54423
|
+
paddingLeft: s(H.paddingLeft, H.padding, "left", "20px"),
|
|
54424
|
+
paddingRight: s(H.paddingRight, H.padding, "right", "20px"),
|
|
54428
54425
|
borderRadius: H.borderRadius,
|
|
54429
54426
|
textAlign: H.textAlign,
|
|
54430
54427
|
fontWeight: H.fontWeight,
|
|
@@ -54434,7 +54431,7 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
54434
54431
|
borderWidth: H.borderWidth,
|
|
54435
54432
|
borderStyle: H.borderStyle,
|
|
54436
54433
|
borderColor: H.borderColor,
|
|
54437
|
-
...
|
|
54434
|
+
...t(e),
|
|
54438
54435
|
maxWidth: "100%"
|
|
54439
54436
|
},
|
|
54440
54437
|
className: "inline-flex items-center justify-center",
|
|
@@ -54470,7 +54467,7 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
54470
54467
|
alt: U.alt || "",
|
|
54471
54468
|
style: {
|
|
54472
54469
|
borderRadius: H.borderRadius,
|
|
54473
|
-
...
|
|
54470
|
+
...c(e)
|
|
54474
54471
|
},
|
|
54475
54472
|
className: "pointer-events-none"
|
|
54476
54473
|
})
|
|
@@ -54513,7 +54510,7 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
54513
54510
|
backgroundColor: H.backgroundColor,
|
|
54514
54511
|
borderRadius: H.borderRadius,
|
|
54515
54512
|
width: H.width || "100%",
|
|
54516
|
-
height:
|
|
54513
|
+
height: u(e),
|
|
54517
54514
|
padding: H.padding || ut?.padding,
|
|
54518
54515
|
paddingTop: H.paddingTop || ut?.paddingTop,
|
|
54519
54516
|
paddingRight: H.paddingRight || ut?.paddingRight,
|
|
@@ -54543,14 +54540,14 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
54543
54540
|
backgroundColor: H.buttonBackgroundColor || "#0f172a",
|
|
54544
54541
|
color: H.buttonTextColor || "#ffffff",
|
|
54545
54542
|
borderRadius: H.buttonBorderRadius || "12px",
|
|
54546
|
-
paddingTop:
|
|
54547
|
-
paddingBottom:
|
|
54548
|
-
paddingLeft:
|
|
54549
|
-
paddingRight:
|
|
54550
|
-
marginTop:
|
|
54551
|
-
marginBottom:
|
|
54552
|
-
marginLeft:
|
|
54553
|
-
marginRight:
|
|
54543
|
+
paddingTop: s(H.buttonPaddingTop, H.buttonPadding, "top", "10px"),
|
|
54544
|
+
paddingBottom: s(H.buttonPaddingBottom, H.buttonPadding, "bottom", "10px"),
|
|
54545
|
+
paddingLeft: s(H.buttonPaddingLeft, H.buttonPadding, "left", "14px"),
|
|
54546
|
+
paddingRight: s(H.buttonPaddingRight, H.buttonPadding, "right", "14px"),
|
|
54547
|
+
marginTop: s(H.buttonMarginTop, H.buttonMargin, "top"),
|
|
54548
|
+
marginBottom: s(H.buttonMarginBottom, H.buttonMargin, "bottom"),
|
|
54549
|
+
marginLeft: s(H.buttonMarginLeft, H.buttonMargin, "left"),
|
|
54550
|
+
marginRight: s(H.buttonMarginRight, H.buttonMargin, "right"),
|
|
54554
54551
|
fontSize: H.buttonFontSize || "13px",
|
|
54555
54552
|
fontWeight: H.buttonFontWeight || "700",
|
|
54556
54553
|
width: U.buttonAutoWidth === !1 ? H.buttonWidth || "100%" : "auto",
|
|
@@ -54680,7 +54677,7 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
54680
54677
|
style: {
|
|
54681
54678
|
width: "100%",
|
|
54682
54679
|
border: "none",
|
|
54683
|
-
height:
|
|
54680
|
+
height: n(e, "100vh"),
|
|
54684
54681
|
backgroundColor: "transparent"
|
|
54685
54682
|
},
|
|
54686
54683
|
sandbox: "allow-scripts",
|
|
@@ -54691,10 +54688,10 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
54691
54688
|
})
|
|
54692
54689
|
}),
|
|
54693
54690
|
e.type === "table" && (() => {
|
|
54694
|
-
let t =
|
|
54691
|
+
let t = d(e), n = `${H.borderWidth || "1px"} ${H.borderStyle || "solid"} ${H.borderColor || "#cbd5e1"}`, r = (e, n, r) => {
|
|
54695
54692
|
let i = t.cells.map((e) => [...e]);
|
|
54696
54693
|
i[e][n] = r, S("cells", i);
|
|
54697
|
-
},
|
|
54694
|
+
}, i = (e, i, a, o) => {
|
|
54698
54695
|
let s = a ? "th" : "td", c = a ? H.headerBgColor || "#f8fafc" : t.striped && i % 2 == 1 ? "#f8fafc" : H.contentBgColor || "#ffffff", l = a ? H.headerTextColor || "#1e293b" : H.contentTextColor || "#475569", u = (a ? H.headerTextAlign : H.contentTextAlign) || "left";
|
|
54699
54696
|
return /* @__PURE__ */ N("tr", { children: e.map((e, t) => /* @__PURE__ */ N(s, {
|
|
54700
54697
|
contentEditable: !T,
|
|
@@ -54715,7 +54712,7 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
54715
54712
|
},
|
|
54716
54713
|
children: e
|
|
54717
54714
|
}, t)) }, o);
|
|
54718
|
-
},
|
|
54715
|
+
}, a = +!!t.enableHeader, o = t.enableFooter ? t.cells.length - 1 : t.cells.length;
|
|
54719
54716
|
return /* @__PURE__ */ N("div", {
|
|
54720
54717
|
style: {
|
|
54721
54718
|
padding: H.padding,
|
|
@@ -54728,15 +54725,15 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
54728
54725
|
width: "100%"
|
|
54729
54726
|
},
|
|
54730
54727
|
children: [
|
|
54731
|
-
t.enableHeader && t.cells.length > 0 && /* @__PURE__ */ N("thead", { children:
|
|
54732
|
-
/* @__PURE__ */ N("tbody", { children: t.cells.slice(
|
|
54733
|
-
t.enableFooter && t.cells.length >
|
|
54728
|
+
t.enableHeader && t.cells.length > 0 && /* @__PURE__ */ N("thead", { children: i(t.cells[0], 0, !0, "head") }),
|
|
54729
|
+
/* @__PURE__ */ N("tbody", { children: t.cells.slice(a, Math.max(a, o)).map((e, t) => i(e, a + t, !1, `body-${t}`)) }),
|
|
54730
|
+
t.enableFooter && t.cells.length > a && /* @__PURE__ */ N("tfoot", { children: i(t.cells[t.cells.length - 1], t.cells.length - 1, !1, "foot") })
|
|
54734
54731
|
]
|
|
54735
54732
|
})
|
|
54736
54733
|
});
|
|
54737
54734
|
})(),
|
|
54738
54735
|
e.type === "timer" && (() => {
|
|
54739
|
-
let e =
|
|
54736
|
+
let e = l(U.targetDate, U.timezone), t = U.showLabels !== !1, n = (e, n, r) => /* @__PURE__ */ P("div", {
|
|
54740
54737
|
className: "flex flex-col items-center bg-slate-100 rounded px-2.5 py-1.5 min-w-[45px]",
|
|
54741
54738
|
children: [/* @__PURE__ */ N("span", {
|
|
54742
54739
|
className: "text-sm font-extrabold",
|
|
@@ -54780,12 +54777,12 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
54780
54777
|
});
|
|
54781
54778
|
})(),
|
|
54782
54779
|
e.type === "accordion" && (() => {
|
|
54783
|
-
let t = U.mode === "multi" ? "multi" : "single", n = U.iconStyle || "chevron", r = U.iconPosition === "left", i = U.showDividers !== !1,
|
|
54780
|
+
let t = U.mode === "multi" ? "multi" : "single", n = U.iconStyle || "chevron", r = U.iconPosition === "left", i = U.showDividers !== !1, o = U.animation !== "none", s = f({
|
|
54784
54781
|
...e,
|
|
54785
54782
|
attributes: U
|
|
54786
54783
|
}), c = (n, r) => {
|
|
54787
54784
|
r.stopPropagation();
|
|
54788
|
-
let i =
|
|
54785
|
+
let i = a(U.items || [], n, t);
|
|
54789
54786
|
y(e.id, { attributes: {
|
|
54790
54787
|
...e.attributes,
|
|
54791
54788
|
items: i
|
|
@@ -54816,18 +54813,18 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
54816
54813
|
strokeLinejoin: "round",
|
|
54817
54814
|
d: "M19.5 8.25l-7.5 7.5-7.5-7.5"
|
|
54818
54815
|
})
|
|
54819
|
-
}),
|
|
54820
|
-
let s = [...t,
|
|
54816
|
+
}), u = (e, t) => /* @__PURE__ */ N("div", { children: e.map((n, a) => {
|
|
54817
|
+
let s = [...t, a], d = n.defaultOpen;
|
|
54821
54818
|
return /* @__PURE__ */ P("div", {
|
|
54822
|
-
style: { borderBottom: i &&
|
|
54819
|
+
style: { borderBottom: i && a < e.length - 1 ? `1px solid ${H.dividerColor || "#e2e8f0"}` : void 0 },
|
|
54823
54820
|
children: [/* @__PURE__ */ P("button", {
|
|
54824
54821
|
type: "button",
|
|
54825
54822
|
onClick: (e) => c(s, e),
|
|
54826
54823
|
className: "w-full flex items-center gap-2 text-left cursor-pointer transition-colors",
|
|
54827
54824
|
style: {
|
|
54828
54825
|
padding: H.padding || "14px",
|
|
54829
|
-
backgroundColor:
|
|
54830
|
-
color:
|
|
54826
|
+
backgroundColor: d ? H.headerActiveBackgroundColor || H.headerBackgroundColor || "#ffffff" : H.headerBackgroundColor || "#ffffff",
|
|
54827
|
+
color: d ? H.headerActiveTextColor || H.headerTextColor || "#0f172a" : H.headerTextColor || "#0f172a",
|
|
54831
54828
|
fontSize: H.headerFontSize || "14px",
|
|
54832
54829
|
fontWeight: H.headerFontWeight || 600,
|
|
54833
54830
|
fontFamily: H.headerFontFamily,
|
|
@@ -54836,12 +54833,12 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
54836
54833
|
children: [/* @__PURE__ */ N("span", {
|
|
54837
54834
|
className: "flex-1",
|
|
54838
54835
|
children: n.title
|
|
54839
|
-
}), l(
|
|
54836
|
+
}), l(d)]
|
|
54840
54837
|
}), /* @__PURE__ */ N("div", {
|
|
54841
54838
|
style: {
|
|
54842
54839
|
display: "grid",
|
|
54843
|
-
gridTemplateRows:
|
|
54844
|
-
transition:
|
|
54840
|
+
gridTemplateRows: d ? "1fr" : "0fr",
|
|
54841
|
+
transition: o ? "grid-template-rows 0.25s ease" : void 0,
|
|
54845
54842
|
backgroundColor: H.contentBackgroundColor || "#ffffff"
|
|
54846
54843
|
},
|
|
54847
54844
|
children: /* @__PURE__ */ N("div", {
|
|
@@ -54855,7 +54852,7 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
54855
54852
|
},
|
|
54856
54853
|
children: [n.content, n.children.length > 0 && /* @__PURE__ */ N("div", {
|
|
54857
54854
|
className: "mt-2.5",
|
|
54858
|
-
children:
|
|
54855
|
+
children: u(n.children, s)
|
|
54859
54856
|
})]
|
|
54860
54857
|
})
|
|
54861
54858
|
})
|
|
@@ -54873,7 +54870,7 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
54873
54870
|
children: s.length === 0 ? /* @__PURE__ */ N("div", {
|
|
54874
54871
|
className: "text-slate-400 italic text-[11px] p-6 text-center",
|
|
54875
54872
|
children: "No accordion items yet — add one from the properties panel."
|
|
54876
|
-
}) :
|
|
54873
|
+
}) : u(s, [])
|
|
54877
54874
|
});
|
|
54878
54875
|
})(),
|
|
54879
54876
|
e.type === "carousel" && /* @__PURE__ */ P("div", {
|
|
@@ -54988,7 +54985,7 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
54988
54985
|
justifyContent: H.textAlign === "center" ? "center" : H.textAlign === "right" ? "flex-end" : "flex-start"
|
|
54989
54986
|
},
|
|
54990
54987
|
className: "flex flex-wrap gap-2",
|
|
54991
|
-
children:
|
|
54988
|
+
children: i(e).map((e, t) => /* @__PURE__ */ N("span", {
|
|
54992
54989
|
className: "flex items-center justify-center border border-slate-200 transition overflow-hidden",
|
|
54993
54990
|
style: {
|
|
54994
54991
|
width: e.size,
|
|
@@ -55912,13 +55909,13 @@ var LW = (e) => ({ body: {
|
|
|
55912
55909
|
}, "image/jpeg", r);
|
|
55913
55910
|
}, o.onerror = () => i(e), o.src = a.target?.result;
|
|
55914
55911
|
}, a.onerror = () => i(e), a.readAsDataURL(e);
|
|
55915
|
-
}), HW = ue((
|
|
55916
|
-
let { showSaveButton:
|
|
55912
|
+
}), HW = ue((t, n) => {
|
|
55913
|
+
let { showSaveButton: r = !1, mode: i, apiKey: a, backgroundColor: o = "#0e1526", themeBgColor: s = "#4f46e5", themeFgColor: c = "#ffffff", textColor: l = "#e2e8f0", builderFontFamily: u = "'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif", initialTemplate: d, initialHtml: f, initialCss: p, initialJs: m, onSave: h, useAi: g, aiProvider: _, aiTier: v, externalUserId: y, onUpload: S, customUpload: w, disableImageUpload: T = !1, autoSave: re = !1, autoSaveDuration: ie = 3e3, unsplashKey: oe, pexelsKey: se, pixabayKey: ce, allowPublishLandingPage: le = !1, templateId: E, headerLeftContent: ue, headerRightContent: de, mergeTags: fe, readOnly: _e = !1, commentMode: A = !1, onRequestComment: ve } = t, ye = t.__internalPlan, be = FH(a, ye), xe = AH(be.plan), j = t.themeBgColor === void 0 ? be.branding?.brandColor ?? s : s, Se = he(null), { template: Ce, selectedElementId: F, selectedRowId: I, selectedColumnId: L, past: we, future: Te, selectElement: R, selectRow: Ee, selectColumn: De, undo: je, redo: Me, hydrateTemplate: Ne, addRow: Fe, moveRow: Le, addElement: z, moveElement: Re, updateElement: ze, deleteElement: Ve, duplicateElement: He, deleteRow: Ue, duplicateRow: We, updateRowStyle: Ge, updateRowAttrs: Ke, updateColumnStyle: qe, updateColumnAttrs: Je, updateTemplateBodyStyle: Ye, updateRowColumns: Xe, updateColumnWidth: B, addColumnToRow: Ze, deleteColumnFromRow: Qe, duplicateColumn: V, addUploadedImage: $e, addNestedRowToColumn: et, nestRowInColumn: tt, moveNestedRowToTopLevel: nt, moveNestedRowBetweenColumns: H } = Pe(), [U, rt] = O(null), it = Ce?.body?.publishConfig?.apiKeyOverride ?? "", at = () => it.trim() || a, ot = (e) => typeof window < "u" && (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1") && window.location.port !== "3000" ? `http://localhost:3000${e}` : e, st = (e, t) => {
|
|
55917
55914
|
rt(t), Ft(e), R(null), Ee(null), De(null);
|
|
55918
55915
|
}, ct = {
|
|
55919
55916
|
useAi: Ce.body.aiConfig?.useAi ?? g,
|
|
55920
55917
|
tier: Ce.body.aiConfig?.tier || v
|
|
55921
|
-
}, lt = _ || be.aiProvider, ut = be.status === "valid" ? be.manageLandingPagePublishing : le, dt =
|
|
55918
|
+
}, lt = _ || be.aiProvider, ut = be.status === "valid" ? be.manageLandingPagePublishing : le, dt = i === "email" ? "EMAIL" : "LANDING_PAGE", [ft, pt] = O(null), [mt, ht] = O(ke), [gt, _t] = O("desktop"), [vt, yt] = O("600px"), [bt, xt] = O("imac"), [St, Ct] = O("design"), [wt, Tt] = O(!1), Et = _e || wt, [Dt, Ot] = O("light"), { width: kt, category: At } = OW(), jt = At !== "desktop", [Mt, Nt] = O(!1), [Pt, Ft] = O("content"), [It, Lt] = O("all"), [Rt, zt] = O([]), [Bt, Vt] = O(!1), [Ht, Ut] = O(null), [Wt, Gt] = O(0), [Kt, qt] = O(""), [Jt, Yt] = O(""), [Xt, Zt] = O([]);
|
|
55922
55919
|
D(() => {
|
|
55923
55920
|
let e = !1;
|
|
55924
55921
|
return (async () => {
|
|
@@ -55943,7 +55940,7 @@ var LW = (e) => ({ body: {
|
|
|
55943
55940
|
})(), () => {
|
|
55944
55941
|
e = !0;
|
|
55945
55942
|
};
|
|
55946
|
-
}, [
|
|
55943
|
+
}, [a, Ce.body.publishConfig?.apiKeyOverride]);
|
|
55947
55944
|
let [Qt, $t] = O({
|
|
55948
55945
|
actions: !0,
|
|
55949
55946
|
rowProps: !0,
|
|
@@ -55985,12 +55982,12 @@ var LW = (e) => ({ body: {
|
|
|
55985
55982
|
}
|
|
55986
55983
|
}), gn = hn.status === "loading", [_n, vn] = O(!1), [yn, bn] = O(null), xn = he(null), Sn = he(!1), Cn = he(null), [wn, Tn] = O([]);
|
|
55987
55984
|
D(() => {
|
|
55988
|
-
if (
|
|
55985
|
+
if (i !== "landing_page" || !E) {
|
|
55989
55986
|
Tn([]);
|
|
55990
55987
|
return;
|
|
55991
55988
|
}
|
|
55992
55989
|
let e = !1;
|
|
55993
|
-
return fetch(`${Ie(
|
|
55990
|
+
return fetch(`${Ie(a)}/api/templates/${E}/pages`, { headers: { "x-api-key": a } }).then((e) => e.ok ? e.json() : Promise.reject(e)).then((t) => {
|
|
55994
55991
|
e || Tn(t.pages ?? []);
|
|
55995
55992
|
}).catch(() => {
|
|
55996
55993
|
e || Tn([]);
|
|
@@ -55998,13 +55995,13 @@ var LW = (e) => ({ body: {
|
|
|
55998
55995
|
e = !0;
|
|
55999
55996
|
};
|
|
56000
55997
|
}, [
|
|
56001
|
-
|
|
55998
|
+
i,
|
|
56002
55999
|
E,
|
|
56003
|
-
|
|
56000
|
+
a
|
|
56004
56001
|
]);
|
|
56005
56002
|
let { sensors: En, getJson: Dn, exportDesign: On, handleBuiltInSave: kn } = TW({
|
|
56006
|
-
apiKey:
|
|
56007
|
-
mode:
|
|
56003
|
+
apiKey: a,
|
|
56004
|
+
mode: i,
|
|
56008
56005
|
onSave: h,
|
|
56009
56006
|
isSavingLayout: _n,
|
|
56010
56007
|
setIsSavingLayout: vn,
|
|
@@ -56032,7 +56029,7 @@ var LW = (e) => ({ body: {
|
|
|
56032
56029
|
}));
|
|
56033
56030
|
};
|
|
56034
56031
|
return e.addEventListener("click", t, { capture: !0 }), () => e.removeEventListener("click", t, { capture: !0 });
|
|
56035
|
-
}, [A, ve]), pe(
|
|
56032
|
+
}, [A, ve]), pe(n, () => ({
|
|
56036
56033
|
exportDesign: On,
|
|
56037
56034
|
getJson: Dn,
|
|
56038
56035
|
getNodeRect: jn,
|
|
@@ -56041,7 +56038,7 @@ var LW = (e) => ({ body: {
|
|
|
56041
56038
|
if (!re || !h) return;
|
|
56042
56039
|
let e = setInterval(async () => {
|
|
56043
56040
|
try {
|
|
56044
|
-
let e = await On(
|
|
56041
|
+
let e = await On(i);
|
|
56045
56042
|
h(e);
|
|
56046
56043
|
} catch (e) {
|
|
56047
56044
|
console.warn("Auto save failed:", e);
|
|
@@ -56052,7 +56049,7 @@ var LW = (e) => ({ body: {
|
|
|
56052
56049
|
re,
|
|
56053
56050
|
ie,
|
|
56054
56051
|
On,
|
|
56055
|
-
|
|
56052
|
+
i,
|
|
56056
56053
|
h
|
|
56057
56054
|
]), D(() => {
|
|
56058
56055
|
let e = f?.trim(), t, n, r = p === void 0 ? "__undefined__" : p, i = m === void 0 ? "__undefined__" : m;
|
|
@@ -56191,7 +56188,7 @@ var LW = (e) => ({ body: {
|
|
|
56191
56188
|
Kt,
|
|
56192
56189
|
It,
|
|
56193
56190
|
Wt,
|
|
56194
|
-
|
|
56191
|
+
a,
|
|
56195
56192
|
oe,
|
|
56196
56193
|
se,
|
|
56197
56194
|
ce
|
|
@@ -56270,20 +56267,20 @@ var LW = (e) => ({ body: {
|
|
|
56270
56267
|
}
|
|
56271
56268
|
}
|
|
56272
56269
|
return null;
|
|
56273
|
-
}, Jn = (
|
|
56274
|
-
if (
|
|
56275
|
-
let
|
|
56270
|
+
}, Jn = (t) => {
|
|
56271
|
+
if (t.type === "palette-merge-tag") {
|
|
56272
|
+
let e = t.mergeTagValue || "", n = K;
|
|
56276
56273
|
if (n && (n.type === "text" || n.type === "heading" || n.type === "paragraph" || n.type === "button")) {
|
|
56277
|
-
let
|
|
56274
|
+
let t = n.attributes?.text || "";
|
|
56278
56275
|
ze(n.id, { attributes: {
|
|
56279
56276
|
...n.attributes,
|
|
56280
|
-
text:
|
|
56277
|
+
text: t + e
|
|
56281
56278
|
} });
|
|
56282
|
-
} else navigator?.clipboard?.writeText && navigator.clipboard.writeText(
|
|
56279
|
+
} else navigator?.clipboard?.writeText && navigator.clipboard.writeText(e).catch(() => {});
|
|
56283
56280
|
return;
|
|
56284
56281
|
}
|
|
56285
|
-
if (
|
|
56286
|
-
let
|
|
56282
|
+
if (t.type === "palette-row") {
|
|
56283
|
+
let e = t.widths, n = e?.length || t.columnsCount || 1, r = `row-${Date.now()}`, i = {
|
|
56287
56284
|
id: r,
|
|
56288
56285
|
style: {
|
|
56289
56286
|
backgroundColor: "#ffffff",
|
|
@@ -56292,58 +56289,58 @@ var LW = (e) => ({ body: {
|
|
|
56292
56289
|
borderRadius: "8px",
|
|
56293
56290
|
border: "1px solid #e2e8f0"
|
|
56294
56291
|
},
|
|
56295
|
-
columns: Array.from({ length: n }).map((
|
|
56292
|
+
columns: Array.from({ length: n }).map((t, i) => ({
|
|
56296
56293
|
id: `col-${r}-${i + 1}`,
|
|
56297
|
-
width:
|
|
56294
|
+
width: e?.[i] || (n === 1 ? "100%" : n === 2 ? "50%" : `${(100 / n).toFixed(2)}%`),
|
|
56298
56295
|
elements: []
|
|
56299
56296
|
}))
|
|
56300
56297
|
};
|
|
56301
56298
|
Fe(i, W.body.rows.length);
|
|
56302
56299
|
return;
|
|
56303
56300
|
}
|
|
56304
|
-
let
|
|
56305
|
-
id:
|
|
56306
|
-
type:
|
|
56307
|
-
style: EH(
|
|
56308
|
-
attributes: OH(
|
|
56301
|
+
let n = t.elementType || "button", r = `elem-${n}-${Date.now()}`, i = {
|
|
56302
|
+
id: r,
|
|
56303
|
+
type: n,
|
|
56304
|
+
style: EH(n),
|
|
56305
|
+
attributes: OH(n)
|
|
56309
56306
|
};
|
|
56310
56307
|
if (F) {
|
|
56311
|
-
let
|
|
56312
|
-
for (let
|
|
56313
|
-
if (
|
|
56314
|
-
rowId:
|
|
56315
|
-
colId:
|
|
56316
|
-
idx:
|
|
56308
|
+
let t = (n) => {
|
|
56309
|
+
for (let r of n) for (let n of r.columns) {
|
|
56310
|
+
if (n.elements.some((e) => e.id === F)) return {
|
|
56311
|
+
rowId: r.id,
|
|
56312
|
+
colId: n.id,
|
|
56313
|
+
idx: e(n).indexOf(F)
|
|
56317
56314
|
};
|
|
56318
|
-
let
|
|
56319
|
-
if (
|
|
56315
|
+
let i = t(n.nestedRows || []);
|
|
56316
|
+
if (i) return i;
|
|
56320
56317
|
}
|
|
56321
56318
|
return null;
|
|
56322
|
-
},
|
|
56323
|
-
if (
|
|
56324
|
-
z(
|
|
56319
|
+
}, n = t(W.body.rows);
|
|
56320
|
+
if (n) {
|
|
56321
|
+
z(n.rowId, n.colId, i, n.idx + 1), R(r);
|
|
56325
56322
|
return;
|
|
56326
56323
|
}
|
|
56327
56324
|
}
|
|
56328
56325
|
if (L) {
|
|
56329
56326
|
let e = Gn(L);
|
|
56330
56327
|
if (e) {
|
|
56331
|
-
z(e, L,
|
|
56328
|
+
z(e, L, i), R(r);
|
|
56332
56329
|
return;
|
|
56333
56330
|
}
|
|
56334
56331
|
}
|
|
56335
56332
|
if (I) {
|
|
56336
56333
|
let e = Kn(I, W.body.rows);
|
|
56337
56334
|
if (e && e.columns.length > 0) {
|
|
56338
|
-
z(e.id, e.columns[0].id,
|
|
56335
|
+
z(e.id, e.columns[0].id, i), R(r);
|
|
56339
56336
|
return;
|
|
56340
56337
|
}
|
|
56341
56338
|
}
|
|
56342
|
-
let
|
|
56343
|
-
if (
|
|
56344
|
-
let e =
|
|
56339
|
+
let a = W.body.rows;
|
|
56340
|
+
if (a.length > 0) {
|
|
56341
|
+
let e = a[a.length - 1], t = e.columns[e.columns.length - 1];
|
|
56345
56342
|
if (t) {
|
|
56346
|
-
z(e.id, t.id,
|
|
56343
|
+
z(e.id, t.id, i), R(r);
|
|
56347
56344
|
return;
|
|
56348
56345
|
}
|
|
56349
56346
|
}
|
|
@@ -56362,7 +56359,7 @@ var LW = (e) => ({ body: {
|
|
|
56362
56359
|
width: "100%",
|
|
56363
56360
|
elements: []
|
|
56364
56361
|
}]
|
|
56365
|
-
},
|
|
56362
|
+
}, a.length), z(o, s, i), R(r);
|
|
56366
56363
|
}, Yn = (e, t) => {
|
|
56367
56364
|
if (t !== 0 && mt.overId === e && mt.edge === "top") return 0;
|
|
56368
56365
|
}, Xn = (e, t) => mt.overId === e && mt.edge === "bottom" ? t + 1 : t, Zn = (e) => {
|
|
@@ -56389,11 +56386,11 @@ var LW = (e) => ({ body: {
|
|
|
56389
56386
|
overId: n.id,
|
|
56390
56387
|
edge: a < i ? "top" : "bottom"
|
|
56391
56388
|
});
|
|
56392
|
-
}, $n = (
|
|
56389
|
+
}, $n = (t) => {
|
|
56393
56390
|
pt(null), ht(ke);
|
|
56394
|
-
let { active:
|
|
56395
|
-
if (!
|
|
56396
|
-
let
|
|
56391
|
+
let { active: n, over: r } = t;
|
|
56392
|
+
if (!r) return;
|
|
56393
|
+
let i = n.id, a = r.id, o = n.data.current, s = r.data.current;
|
|
56397
56394
|
if (o?.type === "palette-row") {
|
|
56398
56395
|
let e = o.widths, t = e?.length || o.columnsCount, n = `row-${Date.now()}`, r = {
|
|
56399
56396
|
id: n,
|
|
@@ -56411,14 +56408,14 @@ var LW = (e) => ({ body: {
|
|
|
56411
56408
|
}))
|
|
56412
56409
|
};
|
|
56413
56410
|
if (s?.type === "column") {
|
|
56414
|
-
let e =
|
|
56411
|
+
let e = a, t = qn(e, W.body.rows)?.rowId ?? W.body.rows.find((t) => t.columns.some((t) => t.id === e))?.id;
|
|
56415
56412
|
if (t) {
|
|
56416
56413
|
et(t, e, r);
|
|
56417
56414
|
return;
|
|
56418
56415
|
}
|
|
56419
56416
|
}
|
|
56420
56417
|
if (s?.type === "row") {
|
|
56421
|
-
let e =
|
|
56418
|
+
let e = a, t = (n) => {
|
|
56422
56419
|
for (let r of n) {
|
|
56423
56420
|
if (r.id === e) return r;
|
|
56424
56421
|
for (let e of r.columns) {
|
|
@@ -56444,98 +56441,98 @@ var LW = (e) => ({ body: {
|
|
|
56444
56441
|
return;
|
|
56445
56442
|
}
|
|
56446
56443
|
if (o?.type === "palette-element") {
|
|
56447
|
-
let
|
|
56448
|
-
id:
|
|
56449
|
-
type:
|
|
56450
|
-
style: EH(
|
|
56451
|
-
attributes: OH(
|
|
56444
|
+
let t = o.elementType, n = `elem-${t}-${Date.now()}`, r = {
|
|
56445
|
+
id: n,
|
|
56446
|
+
type: t,
|
|
56447
|
+
style: EH(t),
|
|
56448
|
+
attributes: OH(t)
|
|
56452
56449
|
};
|
|
56453
56450
|
if (s?.type === "column") {
|
|
56454
|
-
let
|
|
56455
|
-
if (
|
|
56456
|
-
let
|
|
56457
|
-
z(
|
|
56451
|
+
let t = Gn(a);
|
|
56452
|
+
if (t) {
|
|
56453
|
+
let i = Kn(t, W.body.rows)?.columns.find((e) => e.id === a);
|
|
56454
|
+
z(t, a, r, Yn(a, i ? e(i).length : 0)), R(n);
|
|
56458
56455
|
}
|
|
56459
56456
|
} else if (s?.type === "element") {
|
|
56460
|
-
let
|
|
56461
|
-
if (
|
|
56462
|
-
let o = Kn(
|
|
56463
|
-
z(
|
|
56457
|
+
let t = s.columnId, i = s.rowId;
|
|
56458
|
+
if (t && i) {
|
|
56459
|
+
let o = Kn(i, W.body.rows)?.columns.find((e) => e.id === t), s = o ? e(o).indexOf(a) : -1;
|
|
56460
|
+
z(i, t, r, s === -1 ? void 0 : Xn(a, s)), R(n);
|
|
56464
56461
|
}
|
|
56465
56462
|
} else if (s?.type === "row") {
|
|
56466
|
-
let e = Kn(
|
|
56467
|
-
e && e.columns.length > 0 && (z(e.id, e.columns[0].id,
|
|
56463
|
+
let e = Kn(a, W.body.rows);
|
|
56464
|
+
e && e.columns.length > 0 && (z(e.id, e.columns[0].id, r), R(n));
|
|
56468
56465
|
} else if (s?.type === "canvas") {
|
|
56469
|
-
let e = W.body.rows,
|
|
56470
|
-
|
|
56466
|
+
let e = W.body.rows, t = e[e.length - 1], i = t?.columns[t.columns.length - 1];
|
|
56467
|
+
t && i && (z(t.id, i.id, r), R(n));
|
|
56471
56468
|
}
|
|
56472
56469
|
return;
|
|
56473
56470
|
}
|
|
56474
56471
|
if (o?.type === "palette-merge-tag") {
|
|
56475
|
-
let
|
|
56476
|
-
id:
|
|
56472
|
+
let t = o.mergeTagValue, n = `elem-text-${Date.now()}`, r = {
|
|
56473
|
+
id: n,
|
|
56477
56474
|
type: "text",
|
|
56478
56475
|
style: EH("text"),
|
|
56479
56476
|
attributes: {
|
|
56480
56477
|
...OH("text"),
|
|
56481
|
-
text:
|
|
56478
|
+
text: t
|
|
56482
56479
|
}
|
|
56483
56480
|
};
|
|
56484
56481
|
if (s?.type === "column") {
|
|
56485
|
-
let
|
|
56486
|
-
if (
|
|
56487
|
-
let
|
|
56488
|
-
z(
|
|
56482
|
+
let t = Gn(a);
|
|
56483
|
+
if (t) {
|
|
56484
|
+
let i = Kn(t, W.body.rows)?.columns.find((e) => e.id === a);
|
|
56485
|
+
z(t, a, r, Yn(a, i ? e(i).length : 0)), R(n);
|
|
56489
56486
|
}
|
|
56490
56487
|
} else if (s?.type === "element") {
|
|
56491
|
-
let
|
|
56492
|
-
if (
|
|
56493
|
-
let o = Kn(
|
|
56494
|
-
z(
|
|
56488
|
+
let t = s.columnId, i = s.rowId;
|
|
56489
|
+
if (t && i) {
|
|
56490
|
+
let o = Kn(i, W.body.rows)?.columns.find((e) => e.id === t), s = o ? e(o).indexOf(a) : -1;
|
|
56491
|
+
z(i, t, r, s === -1 ? void 0 : Xn(a, s)), R(n);
|
|
56495
56492
|
}
|
|
56496
56493
|
} else if (s?.type === "row") {
|
|
56497
|
-
let e = Kn(
|
|
56498
|
-
e && e.columns.length > 0 && (z(e.id, e.columns[0].id,
|
|
56494
|
+
let e = Kn(a, W.body.rows);
|
|
56495
|
+
e && e.columns.length > 0 && (z(e.id, e.columns[0].id, r), R(n));
|
|
56499
56496
|
} else if (s?.type === "canvas") {
|
|
56500
|
-
let e = W.body.rows,
|
|
56501
|
-
|
|
56497
|
+
let e = W.body.rows, t = e[e.length - 1], i = t?.columns[t.columns.length - 1];
|
|
56498
|
+
t && i && (z(t.id, i.id, r), R(n));
|
|
56502
56499
|
}
|
|
56503
56500
|
return;
|
|
56504
56501
|
}
|
|
56505
56502
|
if (o?.type === "strata-component") {
|
|
56506
|
-
let
|
|
56507
|
-
id:
|
|
56508
|
-
type:
|
|
56503
|
+
let t = o.elementType || "button", n = `elem-${t}-${Date.now()}`, r = {
|
|
56504
|
+
id: n,
|
|
56505
|
+
type: t,
|
|
56509
56506
|
style: {
|
|
56510
|
-
...EH(
|
|
56507
|
+
...EH(t),
|
|
56511
56508
|
...o.strataProps || {}
|
|
56512
56509
|
},
|
|
56513
|
-
attributes: OH(
|
|
56510
|
+
attributes: OH(t)
|
|
56514
56511
|
};
|
|
56515
56512
|
if (s?.type === "column") {
|
|
56516
|
-
let
|
|
56517
|
-
if (
|
|
56518
|
-
let
|
|
56519
|
-
z(
|
|
56513
|
+
let t = Gn(a);
|
|
56514
|
+
if (t) {
|
|
56515
|
+
let i = Kn(t, W.body.rows)?.columns.find((e) => e.id === a);
|
|
56516
|
+
z(t, a, r, Yn(a, i ? e(i).length : 0)), R(n);
|
|
56520
56517
|
}
|
|
56521
56518
|
} else if (s?.type === "element") {
|
|
56522
|
-
let
|
|
56523
|
-
if (
|
|
56524
|
-
let o = Kn(
|
|
56525
|
-
z(
|
|
56519
|
+
let t = s.columnId, i = s.rowId;
|
|
56520
|
+
if (t && i) {
|
|
56521
|
+
let o = Kn(i, W.body.rows)?.columns.find((e) => e.id === t), s = o ? e(o).indexOf(a) : -1;
|
|
56522
|
+
z(i, t, r, s === -1 ? void 0 : Xn(a, s)), R(n);
|
|
56526
56523
|
}
|
|
56527
56524
|
} else if (s?.type === "row") {
|
|
56528
|
-
let e = Kn(
|
|
56529
|
-
e && e.columns.length > 0 && (z(e.id, e.columns[0].id,
|
|
56525
|
+
let e = Kn(a, W.body.rows);
|
|
56526
|
+
e && e.columns.length > 0 && (z(e.id, e.columns[0].id, r), R(n));
|
|
56530
56527
|
} else if (s?.type === "canvas") {
|
|
56531
|
-
let e = W.body.rows,
|
|
56532
|
-
|
|
56528
|
+
let e = W.body.rows, t = e[e.length - 1], i = t?.columns[t.columns.length - 1];
|
|
56529
|
+
t && i && (z(t.id, i.id, r), R(n));
|
|
56533
56530
|
}
|
|
56534
56531
|
return;
|
|
56535
56532
|
}
|
|
56536
56533
|
if (o?.type === "row") {
|
|
56537
|
-
if (
|
|
56538
|
-
let
|
|
56534
|
+
if (i === a) return;
|
|
56535
|
+
let t = !!o.parentRowId, n = o.parentRowId, r = o.parentColId, c = (e, t) => {
|
|
56539
56536
|
for (let n of e) for (let e of n.columns) {
|
|
56540
56537
|
if (e.id === t) return e;
|
|
56541
56538
|
let n = c(e.nestedRows || [], t);
|
|
@@ -56543,91 +56540,91 @@ var LW = (e) => ({ body: {
|
|
|
56543
56540
|
}
|
|
56544
56541
|
return null;
|
|
56545
56542
|
};
|
|
56546
|
-
if (
|
|
56547
|
-
if (s?.type === "canvas") nt(
|
|
56543
|
+
if (t && n && r) {
|
|
56544
|
+
if (s?.type === "canvas") nt(i, n, r);
|
|
56548
56545
|
else if (s?.type === "row") if (s.parentRowId) {
|
|
56549
|
-
let
|
|
56550
|
-
H(
|
|
56546
|
+
let t = s.parentRowId, o = s.parentColId, l = c(W.body.rows, o), u = l ? e(l).indexOf(a) : -1;
|
|
56547
|
+
H(i, n, r, t, o, u === -1 ? void 0 : Xn(a, u));
|
|
56551
56548
|
} else {
|
|
56552
|
-
let e = W.body.rows.findIndex((e) => e.id ===
|
|
56553
|
-
nt(
|
|
56549
|
+
let e = W.body.rows.findIndex((e) => e.id === a);
|
|
56550
|
+
nt(i, n, r, e === -1 ? void 0 : e);
|
|
56554
56551
|
}
|
|
56555
56552
|
else if (s?.type === "column") {
|
|
56556
|
-
let
|
|
56557
|
-
if (l) H(
|
|
56553
|
+
let t = a, o = c(W.body.rows, t), s = Yn(t, o ? e(o).length : 0), l = qn(t, W.body.rows);
|
|
56554
|
+
if (l) H(i, n, r, l.rowId, t, s);
|
|
56558
56555
|
else {
|
|
56559
|
-
let
|
|
56560
|
-
|
|
56556
|
+
let e = W.body.rows.find((e) => e.columns.some((e) => e.id === t));
|
|
56557
|
+
e && H(i, n, r, e.id, t, s);
|
|
56561
56558
|
}
|
|
56562
56559
|
} else if (s?.type === "element") {
|
|
56563
|
-
let
|
|
56564
|
-
if (
|
|
56565
|
-
let s = c(W.body.rows,
|
|
56566
|
-
H(
|
|
56560
|
+
let t = s.columnId, o = s.rowId;
|
|
56561
|
+
if (t && o) {
|
|
56562
|
+
let s = c(W.body.rows, t), l = s ? e(s).indexOf(a) : -1;
|
|
56563
|
+
H(i, n, r, o, t, l === -1 ? void 0 : Xn(a, l));
|
|
56567
56564
|
}
|
|
56568
56565
|
}
|
|
56569
56566
|
} else if (s?.type === "row" && !s.parentRowId) {
|
|
56570
|
-
let e = W.body.rows.findIndex((e) => e.id ===
|
|
56571
|
-
e !== -1 && Le(
|
|
56567
|
+
let e = W.body.rows.findIndex((e) => e.id === a);
|
|
56568
|
+
e !== -1 && Le(i, Xn(a, e));
|
|
56572
56569
|
} else if (s?.type === "column") {
|
|
56573
|
-
let
|
|
56574
|
-
if (
|
|
56575
|
-
let
|
|
56576
|
-
tt(
|
|
56570
|
+
let t = a, n = qn(t, W.body.rows)?.rowId ?? W.body.rows.find((e) => e.columns.some((e) => e.id === t))?.id;
|
|
56571
|
+
if (n && n !== i) {
|
|
56572
|
+
let r = Kn(n, W.body.rows)?.columns.find((e) => e.id === t);
|
|
56573
|
+
tt(i, n, t, Yn(t, r ? e(r).length : 0));
|
|
56577
56574
|
}
|
|
56578
56575
|
} else if (s?.type === "element") {
|
|
56579
|
-
let
|
|
56580
|
-
if (
|
|
56581
|
-
let
|
|
56582
|
-
tt(
|
|
56576
|
+
let t = s.columnId, n = s.rowId;
|
|
56577
|
+
if (t && n && n !== i) {
|
|
56578
|
+
let r = c(W.body.rows, t), o = r ? e(r).indexOf(a) : -1;
|
|
56579
|
+
tt(i, n, t, o === -1 ? void 0 : Xn(a, o));
|
|
56583
56580
|
}
|
|
56584
56581
|
} else if (s?.type === "row" && s.parentRowId) {
|
|
56585
56582
|
let e = s.parentRowId, t = s.parentColId;
|
|
56586
|
-
e && t && e !==
|
|
56583
|
+
e && t && e !== i && tt(i, e, t);
|
|
56587
56584
|
}
|
|
56588
56585
|
return;
|
|
56589
56586
|
}
|
|
56590
56587
|
if (o?.type === "element") {
|
|
56591
56588
|
if (s?.type === "column") {
|
|
56592
|
-
let e =
|
|
56589
|
+
let e = a, t = Gn(e);
|
|
56593
56590
|
if (t) {
|
|
56594
56591
|
let n = Kn(t, W.body.rows)?.columns.find((t) => t.id === e);
|
|
56595
|
-
Re(
|
|
56592
|
+
Re(i, t, e, Yn(e, n?.elements.length ?? 0));
|
|
56596
56593
|
}
|
|
56597
|
-
} else if (s?.type === "element" &&
|
|
56598
|
-
let
|
|
56599
|
-
if (
|
|
56600
|
-
let
|
|
56601
|
-
Re(
|
|
56594
|
+
} else if (s?.type === "element" && i !== a) {
|
|
56595
|
+
let t = s.columnId, n = s.rowId;
|
|
56596
|
+
if (t && n) {
|
|
56597
|
+
let r = Kn(n, W.body.rows)?.columns.find((e) => e.id === t), o = r ? e(r).indexOf(a) : -1;
|
|
56598
|
+
Re(i, n, t, o === -1 ? void 0 : Xn(a, o));
|
|
56602
56599
|
}
|
|
56603
56600
|
} else if (s?.type === "row") {
|
|
56604
|
-
let e = Kn(
|
|
56605
|
-
e && e.columns.length > 0 && Re(
|
|
56601
|
+
let e = Kn(a, W.body.rows);
|
|
56602
|
+
e && e.columns.length > 0 && Re(i, e.id, e.columns[0].id);
|
|
56606
56603
|
} else if (s?.type === "canvas") {
|
|
56607
56604
|
let e = W.body.rows, t = e[e.length - 1], n = t?.columns[t.columns.length - 1];
|
|
56608
|
-
t && n && Re(
|
|
56605
|
+
t && n && Re(i, t.id, n.id);
|
|
56609
56606
|
}
|
|
56610
56607
|
return;
|
|
56611
56608
|
}
|
|
56612
|
-
}, er = (
|
|
56613
|
-
row:
|
|
56614
|
-
parentRowId:
|
|
56615
|
-
parentColId:
|
|
56609
|
+
}, er = (t, n, r) => /* @__PURE__ */ N(aW, {
|
|
56610
|
+
row: t,
|
|
56611
|
+
parentRowId: n,
|
|
56612
|
+
parentColId: r,
|
|
56616
56613
|
selectedRowId: I,
|
|
56617
56614
|
selectRow: Ee,
|
|
56618
56615
|
previewMode: Et,
|
|
56619
56616
|
deviceView: gt,
|
|
56620
56617
|
selectedElementId: F,
|
|
56621
|
-
children:
|
|
56622
|
-
col:
|
|
56623
|
-
rowId:
|
|
56624
|
-
parentRowId:
|
|
56625
|
-
parentColId:
|
|
56618
|
+
children: t.columns.map((i) => /* @__PURE__ */ N(oW, {
|
|
56619
|
+
col: i,
|
|
56620
|
+
rowId: t.id,
|
|
56621
|
+
parentRowId: n,
|
|
56622
|
+
parentColId: r,
|
|
56626
56623
|
selectedColumnId: L,
|
|
56627
56624
|
selectColumn: De,
|
|
56628
56625
|
previewMode: Et,
|
|
56629
56626
|
deviceView: gt,
|
|
56630
|
-
children:
|
|
56627
|
+
children: i.elements.length === 0 && (i.nestedRows || []).length === 0 ? Et ? /* @__PURE__ */ N("div", { className: "min-h-[48px]" }) : /* @__PURE__ */ P("div", {
|
|
56631
56628
|
className: "flex-1 flex flex-col items-center justify-center gap-3 p-5 border border-dashed border-slate-700/40 rounded-lg bg-slate-900/20 text-center select-none min-h-[80px]",
|
|
56632
56629
|
children: [/* @__PURE__ */ N("span", {
|
|
56633
56630
|
className: "text-[9px] font-semibold uppercase tracking-widest text-slate-500",
|
|
@@ -56638,10 +56635,10 @@ var LW = (e) => ({ body: {
|
|
|
56638
56635
|
children: [
|
|
56639
56636
|
/* @__PURE__ */ P("button", {
|
|
56640
56637
|
title: "Add Heading",
|
|
56641
|
-
onClick: (
|
|
56642
|
-
|
|
56638
|
+
onClick: (e) => {
|
|
56639
|
+
e.stopPropagation();
|
|
56643
56640
|
let n = `elem-heading-${Date.now()}`;
|
|
56644
|
-
z(
|
|
56641
|
+
z(t.id, i.id, {
|
|
56645
56642
|
id: n,
|
|
56646
56643
|
type: "heading",
|
|
56647
56644
|
style: EH("heading"),
|
|
@@ -56657,10 +56654,10 @@ var LW = (e) => ({ body: {
|
|
|
56657
56654
|
}),
|
|
56658
56655
|
/* @__PURE__ */ P("button", {
|
|
56659
56656
|
title: "Add Image",
|
|
56660
|
-
onClick: (
|
|
56661
|
-
|
|
56657
|
+
onClick: (e) => {
|
|
56658
|
+
e.stopPropagation();
|
|
56662
56659
|
let n = `elem-image-${Date.now()}`;
|
|
56663
|
-
z(
|
|
56660
|
+
z(t.id, i.id, {
|
|
56664
56661
|
id: n,
|
|
56665
56662
|
type: "image",
|
|
56666
56663
|
style: EH("image"),
|
|
@@ -56676,10 +56673,10 @@ var LW = (e) => ({ body: {
|
|
|
56676
56673
|
}),
|
|
56677
56674
|
/* @__PURE__ */ P("button", {
|
|
56678
56675
|
title: "Add Button",
|
|
56679
|
-
onClick: (
|
|
56680
|
-
|
|
56676
|
+
onClick: (e) => {
|
|
56677
|
+
e.stopPropagation();
|
|
56681
56678
|
let n = `elem-button-${Date.now()}`;
|
|
56682
|
-
z(
|
|
56679
|
+
z(t.id, i.id, {
|
|
56683
56680
|
id: n,
|
|
56684
56681
|
type: "button",
|
|
56685
56682
|
style: EH("button"),
|
|
@@ -56695,12 +56692,12 @@ var LW = (e) => ({ body: {
|
|
|
56695
56692
|
})
|
|
56696
56693
|
]
|
|
56697
56694
|
})]
|
|
56698
|
-
}) : /* @__PURE__ */ N(M, { children:
|
|
56699
|
-
let n =
|
|
56695
|
+
}) : /* @__PURE__ */ N(M, { children: e(i).map((e) => {
|
|
56696
|
+
let n = i.elements.find((t) => t.id === e);
|
|
56700
56697
|
if (n) return /* @__PURE__ */ N(lW, {
|
|
56701
56698
|
elem: n,
|
|
56702
|
-
columnId:
|
|
56703
|
-
rowId:
|
|
56699
|
+
columnId: i.id,
|
|
56700
|
+
rowId: t.id,
|
|
56704
56701
|
deviceView: gt,
|
|
56705
56702
|
selectedElementId: F,
|
|
56706
56703
|
selectElement: R,
|
|
@@ -56732,11 +56729,11 @@ var LW = (e) => ({ body: {
|
|
|
56732
56729
|
mergeTags: fe || [],
|
|
56733
56730
|
themeBgColor: j
|
|
56734
56731
|
}, n.id);
|
|
56735
|
-
let
|
|
56736
|
-
return
|
|
56732
|
+
let r = (i.nestedRows || []).find((t) => t.id === e);
|
|
56733
|
+
return r ? er(r, t.id, i.id) : null;
|
|
56737
56734
|
}) })
|
|
56738
|
-
},
|
|
56739
|
-
},
|
|
56735
|
+
}, i.id))
|
|
56736
|
+
}, t.id), tr = () => {
|
|
56740
56737
|
if (F) {
|
|
56741
56738
|
let e = (t) => {
|
|
56742
56739
|
for (let n of t) for (let t of n.columns) {
|
|
@@ -56906,7 +56903,7 @@ var LW = (e) => ({ body: {
|
|
|
56906
56903
|
Pn("You do not have enough tokens to perform this action."), fn("");
|
|
56907
56904
|
return;
|
|
56908
56905
|
}
|
|
56909
|
-
if (!
|
|
56906
|
+
if (!a) {
|
|
56910
56907
|
Pn("AI configuration incomplete. Please check your AI settings.");
|
|
56911
56908
|
return;
|
|
56912
56909
|
}
|
|
@@ -57269,7 +57266,7 @@ var LW = (e) => ({ body: {
|
|
|
57269
57266
|
/* @__PURE__ */ N(IH, {
|
|
57270
57267
|
activeTab: St,
|
|
57271
57268
|
setActiveTab: Ct,
|
|
57272
|
-
showSaveButton:
|
|
57269
|
+
showSaveButton: r && !_e,
|
|
57273
57270
|
isSavingLayout: _n,
|
|
57274
57271
|
onSaveClick: kn,
|
|
57275
57272
|
theme: J,
|
|
@@ -58107,7 +58104,7 @@ var LW = (e) => ({ body: {
|
|
|
58107
58104
|
DraggablePaletteItem: QH,
|
|
58108
58105
|
ICONS: X,
|
|
58109
58106
|
tierFeatures: xe,
|
|
58110
|
-
templateKind:
|
|
58107
|
+
templateKind: i,
|
|
58111
58108
|
onTapAdd: At === "mobile" ? Jn : void 0
|
|
58112
58109
|
}),
|
|
58113
58110
|
Pt === "blocks" && /* @__PURE__ */ N(qH, {
|
|
@@ -58177,7 +58174,7 @@ var LW = (e) => ({ body: {
|
|
|
58177
58174
|
AccordionSection: JH
|
|
58178
58175
|
}),
|
|
58179
58176
|
Pt === "settings" && /* @__PURE__ */ N(wU, {
|
|
58180
|
-
apiKey:
|
|
58177
|
+
apiKey: a,
|
|
58181
58178
|
templateId: E,
|
|
58182
58179
|
theme: J,
|
|
58183
58180
|
manageLandingPagePublishing: ut,
|